63 lines
2.0 KiB
C#
63 lines
2.0 KiB
C#
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
|
|
{
|
|
public override void SetStaticDefaults()
|
|
{
|
|
DisplayName.SetDefault("Brimlash");
|
|
Tooltip.SetDefault("Fires a brimstone bolt that explodes into more bolts on death");
|
|
}
|
|
|
|
public override void SetDefaults()
|
|
{
|
|
item.width = 50;
|
|
item.damage = 64;
|
|
item.melee = true;
|
|
item.useAnimation = 25;
|
|
item.useTime = 25;
|
|
item.useTurn = true;
|
|
item.useStyle = 1;
|
|
item.knockBack = 6f;
|
|
item.UseSound = SoundID.Item1;
|
|
item.autoReuse = true;
|
|
item.height = 50;
|
|
item.value = Item.buyPrice(0, 60, 0, 0);
|
|
item.rare = 7;
|
|
item.shoot = ModContent.ProjectileType<BrimlashProj>();
|
|
item.shootSpeed = 15f;
|
|
}
|
|
|
|
public override void AddRecipes()
|
|
{
|
|
ModRecipe recipe = new ModRecipe(mod);
|
|
recipe.AddIngredient(ModContent.ItemType<UnholyCore>(), 4);
|
|
recipe.AddIngredient(ModContent.ItemType<EssenceofChaos>(), 3);
|
|
recipe.AddIngredient(ModContent.ItemType<LivingShard>(), 5);
|
|
recipe.AddTile(TileID.MythrilAnvil);
|
|
recipe.SetResult(this);
|
|
recipe.AddRecipe();
|
|
}
|
|
|
|
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, 235);
|
|
}
|
|
}
|
|
|
|
public override void OnHitNPC(Player player, NPC target, int damage, float knockback, bool crit)
|
|
{
|
|
target.AddBuff(ModContent.BuffType<BrimstoneFlames>(), 300);
|
|
}
|
|
}
|
|
}
|