using CalamityMod.Projectiles.BaseProjectiles; using Microsoft.Xna.Framework; using Terraria; using Terraria.ModLoader; namespace CalamityMod.Projectiles.DraedonsArsenal { public class WavePounderBoom : BaseMassiveExplosionProjectile, ILocalizedModType { public new string LocalizationCategory => "Projectiles.Misc"; public override int Lifetime => 60; public override bool UsesScreenshake => Projectile.Calamity().stealthStrike; public override float GetScreenshakePower(float pulseCompletionRatio) => CalamityUtils.Convert01To010(pulseCompletionRatio) * 16f; public override Color GetCurrentExplosionColor(float pulseCompletionRatio) => Color.Lerp(Color.Yellow * 1.6f, Color.White, MathHelper.Clamp(pulseCompletionRatio * 2.2f, 0f, 1f)); public override void SetDefaults() { Projectile.width = Projectile.height = 2; Projectile.friendly = true; Projectile.tileCollide = false; Projectile.penetrate = -1; Projectile.usesLocalNPCImmunity = true; Projectile.localNPCHitCooldown = 10; Projectile.timeLeft = Lifetime; Projectile.DamageType = RogueDamageClass.Instance; } public override void PostAI() => Lighting.AddLight(Projectile.Center, 0.2f, 0.1f, 0f); } }