Files
CalamityModPublic/Projectiles/DraedonsArsenal/TrackingDiskLaser.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

61 lines
1.8 KiB
C#

using Terraria;
using Terraria.ModLoader;
namespace CalamityMod.Projectiles.DraedonsArsenal
{
public class TrackingDiskLaser : ModProjectile
{
public override string Texture => "CalamityMod/Projectiles/InvisibleProj";
public float Time
{
get => Projectile.localAI[0];
set => Projectile.localAI[0] = value;
}
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Laser");
}
public override void SetDefaults()
{
Projectile.width = 2;
Projectile.height = 2;
Projectile.friendly = true;
Projectile.DamageType = RogueDamageClass.Instance;
Projectile.tileCollide = false;
Projectile.penetrate = 1;
Projectile.extraUpdates = 100;
Projectile.timeLeft = 600;
}
public override void AI()
{
Lighting.AddLight(Projectile.Center, 0.2f, 0.1f, 0f);
Time++;
if (Time >= 10f)
{
for (int i = 0; i < 2; i++)
{
Dust dust = Dust.NewDustDirect(Projectile.Center, 0, 0, 182, 0f, 0f, 160, default, 2f);
dust.position = Projectile.Center;
dust.velocity = Projectile.velocity;
dust.scale = Projectile.scale;
dust.noGravity = true;
}
}
}
public override void Kill(int timeLeft)
{
Projectile.ExpandHitboxBy(60);
Projectile.maxPenetrate = -1;
Projectile.penetrate = -1;
Projectile.usesLocalNPCImmunity = true;
Projectile.localNPCHitCooldown = 10;
Projectile.Damage();
}
}
}