Files
CalamityModPublic/Projectiles/Rogue/CosmicKunaiProj.cs
T
Ozzatron d4b5160f98 1 - Fully replaced Momentum Capacitor. It is now a channeled Burden Breaker.
2 - Stealth no longer gives movement speed.
3 - Moved a bunch of CalamityGlobalProjectile utilities to CalamityUtils where they belong.
4 - Renamed several things in CalamityGlobalProjectile
2022-07-02 19:42:56 -04:00

39 lines
1.3 KiB
C#

using System;
using Terraria;
using Terraria.ModLoader;
namespace CalamityMod.Projectiles.Rogue
{
public class CosmicKunaiProj : ModProjectile
{
public override string Texture => "CalamityMod/Items/Weapons/Rogue/CosmicKunai";
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Kunai");
}
public override void SetDefaults()
{
Projectile.width = 24;
Projectile.height = 24;
Projectile.friendly = true;
Projectile.tileCollide = false;
Projectile.ignoreWater = true;
Projectile.penetrate = 1;
Projectile.DamageType = RogueDamageClass.Instance;
}
public override void AI()
{
Projectile.rotation = (float)Math.Atan2((double)Projectile.velocity.Y, (double)Projectile.velocity.X) + 1.57f;
Projectile.alpha += 17;
if (Projectile.alpha >= 255)
{
Projectile.Kill();
}
Lighting.AddLight(Projectile.Center, (255 - Projectile.alpha) * 0.5f / 255f, (255 - Projectile.alpha) * 0f / 255f, (255 - Projectile.alpha) * 0.5f / 255f);
CalamityUtils.HomeInOnNPC(Projectile, true, 300f, 12f, 20f);
}
}
}