Files
CalamityModPublic/Items/Weapons/Melee/Waraxe.cs
T
DominicKarma42 55e89c9b98 Replaced (hopefully) every magic number with a constant
Note: Does not include item rarities, and appears to shown nonexistant using directive movement in the commit. This does not really affect anything, however.
2020-05-30 17:56:36 -04:00

50 lines
1.4 KiB
C#

using CalamityMod.Buffs.StatDebuffs;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Items.Weapons.Melee
{
public class Waraxe : ModItem
{
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Waraxe");
Tooltip.SetDefault("Critical hits cleave enemy armor, reducing their defense by 15 and protection by 25%");
}
public override void SetDefaults()
{
item.damage = 26;
item.melee = true;
item.width = 32;
item.height = 40;
item.useTime = 22;
item.useAnimation = 22;
item.useTurn = true;
item.axe = 10;
item.useStyle = ItemUseStyleID.SwingThrow;
item.knockBack = 5.25f;
item.value = Item.buyPrice(0, 1, 0, 0);
item.UseSound = SoundID.Item1;
item.autoReuse = true;
}
public override void OnHitNPC(Player player, NPC target, int damage, float knockback, bool crit)
{
if (crit)
{
target.AddBuff(ModContent.BuffType<WarCleave>(), 900);
}
}
public override void OnHitPvp(Player player, Player target, int damage, bool crit)
{
if (crit)
{
target.AddBuff(ModContent.BuffType<WarCleave>(), 900);
}
}
}
}