using CalamityMod.Buffs.DamageOverTime; using CalamityMod.Dusts; using Terraria; using Terraria.ID; using Terraria.ModLoader; namespace CalamityMod.Projectiles.Rogue { public class Brimblade2 : ModProjectile, ILocalizedModType { public new string LocalizationCategory => "Projectiles.Rogue"; public override string Texture => "CalamityMod/Items/Weapons/Rogue/Brimblade"; public override void SetDefaults() { Projectile.width = 26; Projectile.height = 26; Projectile.friendly = true; Projectile.ignoreWater = true; Projectile.penetrate = 1; Projectile.aiStyle = ProjAIStyleID.Boomerang; Projectile.timeLeft = 180; AIType = ProjectileID.WoodenBoomerang; Projectile.DamageType = RogueDamageClass.Instance; } public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) { target.AddBuff(ModContent.BuffType(), 180); for (int k = 0; k < 5; k++) { Dust.NewDust(Projectile.position + Projectile.velocity, Projectile.width, Projectile.height, (int)CalamityDusts.Brimstone, Projectile.oldVelocity.X * 0.5f, Projectile.oldVelocity.Y * 0.5f); } } public override void OnHitPlayer(Player target, Player.HurtInfo info) { target.AddBuff(ModContent.BuffType(), 180); for (int k = 0; k < 5; k++) { Dust.NewDust(Projectile.position + Projectile.velocity, Projectile.width, Projectile.height, (int)CalamityDusts.Brimstone, Projectile.oldVelocity.X * 0.5f, Projectile.oldVelocity.Y * 0.5f); } } } }