Files
CalamityModPublic/Projectiles/Rogue/CelestialReaperAfterimage.cs
T
DominicKarma42 55e89c9b98 Replaced (hopefully) every magic number with a constant
Note: Does not include item rarities, and appears to shown nonexistant using directive movement in the commit. This does not really affect anything, however.
2020-05-30 17:56:36 -04:00

37 lines
1.1 KiB
C#

using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ModLoader;
namespace CalamityMod.Projectiles.Rogue
{
public class CelestialReaperAfterimage : ModProjectile
{
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Celestial Reaper");
}
public override void SetDefaults()
{
projectile.width = 66;
projectile.height = 76;
projectile.friendly = true;
projectile.penetrate = 1;
projectile.timeLeft = 51;
projectile.tileCollide = false;
projectile.Calamity().rogue = true;
projectile.usesLocalNPCImmunity = true;
projectile.localNPCHitCooldown = 5;
}
public override void AI()
{
projectile.rotation += MathHelper.ToRadians(30f); //buzzsaw scythe
NPC target = projectile.position.ClosestNPCAt(640f);
if (target != null)
{
projectile.velocity = (projectile.velocity * 20f + projectile.DirectionTo(target.Center) * 20f) / 21f;
}
projectile.alpha += 5;
}
}
}