using Terraria; using Terraria.ModLoader; using CalamityMod.Buffs.DamageOverTime; namespace CalamityMod.Projectiles.Typeless { public class SabatonBoom : ModProjectile, ILocalizedModType { public new string LocalizationCategory => "Projectiles.Typeless"; public override string Texture => "CalamityMod/Projectiles/InvisibleProj"; public override void SetDefaults() { Projectile.penetrate = -1; Projectile.width = 450; Projectile.height = 450; Projectile.friendly = true; Projectile.tileCollide = false; Projectile.timeLeft = 40; Projectile.usesLocalNPCImmunity = true; Projectile.localNPCHitCooldown = -1; } public override void AI() { if (Projectile.ai[0] == 1f) { Projectile.ExpandHitboxBy(100); //Not really an expansion Projectile.timeLeft /= 2; Projectile.ai[0] = 0f; } } public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) => target.AddBuff(ModContent.BuffType(), 240); public override void OnHitPlayer(Player target, Player.HurtInfo info) => target.AddBuff(ModContent.BuffType(), 240); } }