57 lines
1.6 KiB
C#
57 lines
1.6 KiB
C#
using CalamityMod.Items.Materials;
|
|
using Microsoft.Xna.Framework;
|
|
using Terraria;
|
|
using Terraria.ID;
|
|
using Terraria.ModLoader;
|
|
|
|
namespace CalamityMod.Items.Tools
|
|
{
|
|
public class ShardlightPickaxe : ModItem
|
|
{
|
|
public override void SetStaticDefaults()
|
|
{
|
|
DisplayName.SetDefault("Shardlight Pickaxe");
|
|
}
|
|
|
|
public override void SetDefaults()
|
|
{
|
|
item.damage = 28;
|
|
item.melee = true;
|
|
item.width = 44;
|
|
item.height = 44;
|
|
item.useTime = 8;
|
|
item.useAnimation = 15;
|
|
item.useTurn = true;
|
|
item.pick = 190;
|
|
item.useStyle = 1;
|
|
item.knockBack = 4f;
|
|
item.value = Item.buyPrice(0, 36, 0, 0);
|
|
item.rare = 5;
|
|
item.UseSound = SoundID.Item1;
|
|
item.autoReuse = true;
|
|
}
|
|
|
|
public override void AddRecipes()
|
|
{
|
|
ModRecipe recipe = new ModRecipe(mod);
|
|
recipe.AddIngredient(ModContent.ItemType<VerstaltiteBar>(), 7);
|
|
recipe.AddTile(TileID.MythrilAnvil);
|
|
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, 29);
|
|
}
|
|
}
|
|
|
|
public override void OnHitNPC(Player player, NPC target, int damage, float knockback, bool crit)
|
|
{
|
|
target.AddBuff(BuffID.Frostburn, 120);
|
|
}
|
|
}
|
|
}
|