54 lines
1.5 KiB
C#
54 lines
1.5 KiB
C#
using CalamityMod.Items.Materials;
|
|
using Microsoft.Xna.Framework;
|
|
using Terraria;
|
|
using Terraria.ID;
|
|
using Terraria.ModLoader;
|
|
|
|
namespace CalamityMod.Items.Tools
|
|
{
|
|
public class AerialHamaxe : ModItem
|
|
{
|
|
public override void SetStaticDefaults()
|
|
{
|
|
DisplayName.SetDefault("Aerial Hamaxe");
|
|
}
|
|
|
|
public override void SetDefaults()
|
|
{
|
|
item.damage = 20;
|
|
item.melee = true;
|
|
item.width = 44;
|
|
item.height = 44;
|
|
item.useTime = 26;
|
|
item.useAnimation = 26;
|
|
item.useTurn = true;
|
|
item.axe = 25;
|
|
item.hammer = 65;
|
|
item.useStyle = 1;
|
|
item.knockBack = 7f;
|
|
item.value = Item.buyPrice(0, 4, 0, 0);
|
|
item.rare = 3;
|
|
item.UseSound = SoundID.Item1;
|
|
item.autoReuse = true;
|
|
}
|
|
|
|
public override void AddRecipes()
|
|
{
|
|
ModRecipe recipe = new ModRecipe(mod);
|
|
recipe.AddIngredient(ModContent.ItemType<AerialiteBar>(), 6);
|
|
recipe.AddIngredient(ItemID.SunplateBlock, 5);
|
|
recipe.AddTile(TileID.SkyMill);
|
|
recipe.SetResult(this);
|
|
recipe.AddRecipe();
|
|
}
|
|
|
|
public override void MeleeEffects(Player player, Rectangle hitbox)
|
|
{
|
|
if (Main.rand.NextBool(3))
|
|
{
|
|
int dust = Dust.NewDust(new Vector2(hitbox.X, hitbox.Y), hitbox.Width, hitbox.Height, 59);
|
|
}
|
|
}
|
|
}
|
|
}
|