62 lines
1.9 KiB
C#
62 lines
1.9 KiB
C#
using CalamityMod.Items.Materials;
|
|
using Microsoft.Xna.Framework;
|
|
using Terraria;
|
|
using Terraria.ID;
|
|
using Terraria.ModLoader;
|
|
|
|
namespace CalamityMod.Items.Tools
|
|
{
|
|
public class GallantPickaxe : ModItem
|
|
{
|
|
public override void SetStaticDefaults()
|
|
{
|
|
DisplayName.SetDefault("Gallant Pickaxe");
|
|
Tooltip.SetDefault("Can mine Uelibloom Ore");
|
|
}
|
|
|
|
public override void SetDefaults()
|
|
{
|
|
item.damage = 80;
|
|
item.melee = true;
|
|
item.width = 54;
|
|
item.height = 54;
|
|
item.useTime = 6;
|
|
item.useAnimation = 12;
|
|
item.useTurn = true;
|
|
item.pick = 250;
|
|
item.useStyle = 1;
|
|
item.knockBack = 6f;
|
|
item.value = Item.buyPrice(1, 20, 0, 0);
|
|
item.rare = 10;
|
|
item.UseSound = SoundID.Item1;
|
|
item.autoReuse = true;
|
|
item.tileBoost += 5;
|
|
item.Calamity().postMoonLordRarity = 12;
|
|
}
|
|
|
|
public override void AddRecipes()
|
|
{
|
|
ModRecipe recipe = new ModRecipe(mod);
|
|
recipe.AddIngredient(ModContent.ItemType<MeldiateBar>(), 9);
|
|
recipe.AddIngredient(ModContent.ItemType<GalacticaSingularity>());
|
|
recipe.AddRecipeGroup("LunarPickaxe");
|
|
recipe.AddTile(TileID.LunarCraftingStation);
|
|
recipe.SetResult(this);
|
|
recipe.AddRecipe();
|
|
}
|
|
|
|
public override void MeleeEffects(Player player, Rectangle hitbox)
|
|
{
|
|
if (Main.rand.NextBool(5))
|
|
{
|
|
int dust = Dust.NewDust(new Vector2(hitbox.X, hitbox.Y), hitbox.Width, hitbox.Height, 58);
|
|
}
|
|
}
|
|
|
|
public override void OnHitNPC(Player player, NPC target, int damage, float knockback, bool crit)
|
|
{
|
|
target.AddBuff(BuffID.CursedInferno, 300);
|
|
}
|
|
}
|
|
}
|