55 lines
1.7 KiB
C#
55 lines
1.7 KiB
C#
using CalamityMod.Buffs.DamageOverTime;
|
|
using CalamityMod.Items.Materials;
|
|
using Terraria;
|
|
using Terraria.ID;
|
|
using Terraria.ModLoader;
|
|
|
|
namespace CalamityMod.Items.Weapons.Melee
|
|
{
|
|
public class BladeofEnmity : ModItem
|
|
{
|
|
public override void SetStaticDefaults()
|
|
{
|
|
DisplayName.SetDefault("Blade of Enmity");
|
|
}
|
|
|
|
public override void SetDefaults()
|
|
{
|
|
item.width = 60;
|
|
item.height = 64;
|
|
item.scale = 1.5f;
|
|
item.damage = 190;
|
|
item.melee = true;
|
|
item.useAnimation = 10;
|
|
item.useStyle = ItemUseStyleID.SwingThrow;
|
|
item.useTime = 10;
|
|
item.useTurn = true;
|
|
item.knockBack = 8f;
|
|
item.UseSound = SoundID.Item1;
|
|
item.autoReuse = true;
|
|
item.value = Item.buyPrice(0, 80, 0, 0);
|
|
item.rare = ItemRarityID.Yellow;
|
|
}
|
|
|
|
public override void AddRecipes()
|
|
{
|
|
ModRecipe recipe = new ModRecipe(mod);
|
|
recipe.AddIngredient(ModContent.ItemType<BarofLife>(), 5);
|
|
recipe.AddIngredient(ModContent.ItemType<CoreofCalamity>(), 3);
|
|
recipe.AddTile(TileID.MythrilAnvil);
|
|
recipe.SetResult(this);
|
|
recipe.AddRecipe();
|
|
}
|
|
|
|
public override void OnHitNPC(Player player, NPC target, int damage, float knockback, bool crit)
|
|
{
|
|
target.AddBuff(ModContent.BuffType<BrimstoneFlames>(), 300);
|
|
}
|
|
|
|
public override void OnHitPvp(Player player, Player target, int damage, bool crit)
|
|
{
|
|
target.AddBuff(ModContent.BuffType<BrimstoneFlames>(), 300);
|
|
}
|
|
}
|
|
}
|