Files
CalamityModPublic/Items/Weapons/Melee/StellarContemptMelee.cs
T
2019-12-10 16:19:23 -05:00

64 lines
2.1 KiB
C#

using CalamityMod.Projectiles.Typeless;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Items.Weapons.Melee
{
public class StellarContemptMelee : ModItem
{
public static int BaseDamage = 350;
public static float Speed = 18f;
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Stellar Contempt");
Tooltip.SetDefault("Lunar flares rain down on enemy hits");
}
public override void SetDefaults()
{
item.width = 66;
item.height = 64;
item.melee = true;
item.damage = BaseDamage;
item.knockBack = 9f;
item.useTime = 13;
item.useAnimation = 13;
item.autoReuse = true;
item.noMelee = true;
item.noUseGraphic = true;
item.useStyle = 1;
item.UseSound = SoundID.Item1;
item.rare = 10;
item.Calamity().postMoonLordRarity = 12;
item.value = Item.buyPrice(1, 20, 0, 0);
item.shoot = ModContent.ProjectileType<StellarContemptHammer>();
item.shootSpeed = Speed;
}
public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack)
{
int proj = Projectile.NewProjectile(position, new Vector2(speedX, speedY), type, damage, knockBack, player.whoAmI);
Main.projectile[proj].Calamity().forceMelee = true;
return false;
}
public override void AddRecipes()
{
ModRecipe r = new ModRecipe(mod);
r.SetResult(this);
r.AddIngredient(ModContent.ItemType<TruePaladinsHammerMelee>());
r.AddIngredient(ItemID.LunarBar, 10);
r.AddIngredient(ItemID.FragmentSolar, 10);
r.AddIngredient(ItemID.FragmentNebula, 10);
r.AddTile(TileID.LunarCraftingStation);
r.AddRecipe();
}
}
}