Files
CalamityModPublic/Items/Weapons/Melee/NeptunesBounty.cs
T
2023-08-01 06:22:24 +07:00

65 lines
2.0 KiB
C#

using CalamityMod.Buffs.DamageOverTime;
using CalamityMod.Items.Materials;
using CalamityMod.Items.Placeables;
using CalamityMod.Projectiles.Melee;
using CalamityMod.Rarities;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Items.Weapons.Melee
{
public class NeptunesBounty : ModItem, ILocalizedModType
{
public new string LocalizationCategory => "Items.Weapons.Melee";
public override void SetDefaults()
{
Item.width = 122;
Item.height = 122;
Item.damage = 270;
Item.DamageType = DamageClass.Melee;
Item.useAnimation = 22;
Item.useTime = 22;
Item.useTurn = true;
Item.useStyle = ItemUseStyleID.Swing;
Item.knockBack = 9f;
Item.UseSound = SoundID.Item1;
Item.autoReuse = true;
Item.shoot = ModContent.ProjectileType<NeptuneOrb>();
Item.shootSpeed = 12f;
Item.value = CalamityGlobalItem.Rarity13BuyPrice;
Item.rare = ModContent.RarityType<PureGreen>();
}
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, 33);
}
}
public override void OnHitNPC(Player player, NPC target, NPC.HitInfo hit, int damageDone)
{
target.AddBuff(ModContent.BuffType<CrushDepth>(), 300);
}
public override void OnHitPvp(Player player, Player target, Player.HurtInfo hurtInfo)
{
target.AddBuff(ModContent.BuffType<CrushDepth>(), 300);
}
public override void AddRecipes()
{
CreateRecipe().
AddIngredient<AbyssBlade>().
AddIngredient<ReaperTooth>(6).
AddIngredient<RuinousSoul>(5).
AddTile(TileID.LunarCraftingStation).
Register();
}
}
}