Files
CalamityModPublic/Projectiles/Summon/MK2RocketNormal.cs
T
Altixal 3a79bf6048 removed various dynamic/double minion scaling
actually both angelic alliance and atlas munitions triple scale
buffed munitions beacon because of the triple scale
also sirius use fix
2023-09-22 12:55:11 +07:00

60 lines
1.8 KiB
C#

using CalamityMod.Buffs.DamageOverTime;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
using Terraria.Audio;
namespace CalamityMod.Projectiles.Summon
{
public class MK2RocketNormal : ModProjectile, ILocalizedModType
{
public new string LocalizationCategory => "Projectiles.Summon";
public override void SetStaticDefaults()
{
Main.projFrames[Projectile.type] = 3;
ProjectileID.Sets.MinionShot[Projectile.type] = true;
}
public override void SetDefaults()
{
Projectile.width = Projectile.height = 14;
Projectile.light = 0.5f;
Projectile.extraUpdates = 1;
Projectile.tileCollide = false;
Projectile.friendly = true;
Projectile.ignoreWater = true;
Projectile.timeLeft = 600;
Projectile.DamageType = DamageClass.Summon;
}
public override void AI()
{
Projectile.frameCounter++;
if (Projectile.frameCounter > 8)
{
Projectile.frame++;
Projectile.frameCounter = 0;
}
if (Projectile.frame >= Main.projFrames[Projectile.type])
{
Projectile.frame = 0;
}
Projectile.rotation = Projectile.velocity.ToRotation() + MathHelper.PiOver2;
}
public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) => target.AddBuff(ModContent.BuffType<Plague>(), 180);
public override void Kill(int timeLeft)
{
SoundEngine.PlaySound(SoundID.Item14, Projectile.Center);
}
public override bool PreDraw(ref Color lightColor)
{
if (Projectile.timeLeft > 599)
return false;
return true;
}
}
}