Files
CalamityModPublic/Items/Tools/AstralPickaxe.cs
T
Xyk 7aa44ad7d9 Changed all ~640 instances of Main.rand.NextBool(2) to remove the unnecessary 2
Also I forgot to push my reality rupture and ichor spear minor tweaks before hand so they're in here too.
Reality rupture stealth hit sound is louder.
Reality rupture stealth visual always has at least one big crack, cracks fade out.
There's more consistency in the spark particles on realty rupture stealth and ichor spear on hit sparks.
Reality Rupture stealth produces light.
2023-09-26 01:58:55 -07:00

60 lines
1.9 KiB
C#

using CalamityMod.Buffs.DamageOverTime;
using CalamityMod.Dusts;
using CalamityMod.Items.Materials;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Items.Tools
{
public class AstralPickaxe : ModItem, ILocalizedModType
{
public new string LocalizationCategory => "Items.Tools";
public override void SetDefaults()
{
Item.damage = 65;
Item.knockBack = 5f;
Item.useTime = 6;
Item.useAnimation = 10;
Item.pick = 220;
Item.tileBoost += 3;
Item.DamageType = DamageClass.Melee;
Item.width = 50;
Item.height = 60;
Item.useTurn = true;
Item.useStyle = ItemUseStyleID.Swing;
Item.value = CalamityGlobalItem.Rarity9BuyPrice;
Item.rare = ItemRarityID.Cyan;
Item.UseSound = SoundID.Item1;
Item.autoReuse = true;
}
// Terraria seems to really dislike high crit values in SetDefaults
public override void ModifyWeaponCrit(Player player, ref float crit) => crit += 25;
public override void AddRecipes()
{
CreateRecipe().
AddIngredient<AstralBar>(7).
AddTile(TileID.LunarCraftingStation).
Register();
}
public override void OnHitNPC(Player player, NPC target, NPC.HitInfo hit, int damageDone)
{
target.AddBuff(ModContent.BuffType<AstralInfectionDebuff>(), 300);
}
public override void MeleeEffects(Player player, Rectangle hitbox)
{
Dust d = CalamityUtils.MeleeDustHelper(player, Main.rand.NextBool() ? ModContent.DustType<AstralOrange>() : ModContent.DustType<AstralBlue>(), 0.56f, 40, 65, -0.13f, 0.13f);
if (d != null)
{
d.customData = 0.02f;
}
}
}
}