using CalamityMod.Dusts; using CalamityMod.Items.Placeables; using Microsoft.Xna.Framework; using Terraria; using Terraria.ID; using Terraria.ModLoader; namespace CalamityMod.Items.Tools { public class MonolithHammer : ModItem, ILocalizedModType { public new string LocalizationCategory => "Items.Tools"; public override void SetDefaults() { Item.damage = 29; Item.knockBack = 2.5f; Item.useTime = 5; Item.useAnimation = 9; Item.hammer = 35; Item.tileBoost = 1; Item.DamageType = DamageClass.Melee; Item.width = 46; Item.height = 44; Item.useTurn = true; Item.useStyle = ItemUseStyleID.Swing; Item.value = CalamityGlobalItem.RarityOrangeBuyPrice; Item.rare = ItemRarityID.Orange; Item.UseSound = SoundID.Item1; Item.autoReuse = true; } public override void MeleeEffects(Player player, Rectangle hitbox) { if (Main.rand.NextBool(3)) Dust.NewDust(new Vector2(hitbox.X, hitbox.Y), hitbox.Width, hitbox.Height, Main.rand.NextBool() ? ModContent.DustType() : ModContent.DustType()); } public override void AddRecipes() { CreateRecipe(). AddIngredient(8). AddTile(TileID.WorkBenches). Register(); } } }