61 lines
2.0 KiB
C#
61 lines
2.0 KiB
C#
using CalamityMod.Dusts;
|
|
using CalamityMod.Buffs.DamageOverTime;
|
|
using CalamityMod.Items.Materials;
|
|
using CalamityMod.Projectiles.Melee;
|
|
using Microsoft.Xna.Framework;
|
|
using Terraria;
|
|
using Terraria.ID;
|
|
using Terraria.ModLoader;
|
|
|
|
namespace CalamityMod.Items.Weapons.Melee
|
|
{
|
|
public class Brimlash : ModItem, ILocalizedModType
|
|
{
|
|
public new string LocalizationCategory => "Items.Weapons.Melee";
|
|
public override void SetDefaults()
|
|
{
|
|
Item.width = Item.height = 72;
|
|
Item.damage = 70;
|
|
Item.DamageType = DamageClass.Melee;
|
|
Item.useAnimation = 30;
|
|
Item.useTime = 30;
|
|
Item.useTurn = true;
|
|
Item.useStyle = ItemUseStyleID.Swing;
|
|
Item.knockBack = 6f;
|
|
Item.UseSound = SoundID.Item1;
|
|
Item.autoReuse = true;
|
|
Item.value = CalamityGlobalItem.Rarity7BuyPrice;
|
|
Item.rare = ItemRarityID.Lime;
|
|
Item.shoot = ModContent.ProjectileType<BrimlashProj>();
|
|
Item.shootSpeed = 10f;
|
|
}
|
|
|
|
public override void MeleeEffects(Player player, Rectangle hitbox)
|
|
{
|
|
if (Main.rand.NextBool(3))
|
|
{
|
|
int dust = Dust.NewDust(new Vector2(hitbox.X, hitbox.Y), hitbox.Width, hitbox.Height, (int)CalamityDusts.Brimstone);
|
|
}
|
|
}
|
|
|
|
public override void OnHitNPC(Player player, NPC target, NPC.HitInfo hit, int damageDone)
|
|
{
|
|
target.AddBuff(ModContent.BuffType<BrimstoneFlames>(), 300);
|
|
}
|
|
|
|
public override void OnHitPvp(Player player, Player target, Player.HurtInfo hurtInfo)
|
|
{
|
|
target.AddBuff(ModContent.BuffType<BrimstoneFlames>(), 300);
|
|
}
|
|
|
|
public override void AddRecipes()
|
|
{
|
|
CreateRecipe().
|
|
AddIngredient<AshesofCalamity>(12).
|
|
AddIngredient<UnholyCore>(4).
|
|
AddTile(TileID.MythrilAnvil).
|
|
Register();
|
|
}
|
|
}
|
|
}
|