Files
CalamityModPublic/Projectiles/Melee/FossilSpike.cs
T
Andrew Marheine 204b7bc4f2 1 - Edited Evil Smasher to only lose 1 stack when you get hit and no longer creates fossil spikes on hit, buffed damage to compensate.
2 - Aegis Blade, Gauss Dagger, Galvanizing Glaive, Brimlance, Anarchy Blade, Ancient Crusher, Nebulash, Grand Guardian and Terra-cotta on hit projectiles now use ID static i-frames to avoid stacking damage potential on stationary/slow targets.
3 - Death Mode lightning should lag less now.
4 - Comet Quasher, Feralthorn Claymore and Greentide generate less projectiles on hit.
2021-07-04 11:50:30 -05:00

42 lines
1.2 KiB
C#

using Terraria;
using Terraria.ModLoader;
namespace CalamityMod.Projectiles.Melee
{
public class FossilSpike : ModProjectile
{
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Spike");
Main.projFrames[projectile.type] = 4;
}
public override void SetDefaults()
{
projectile.width = 20;
projectile.height = 40;
projectile.friendly = true;
projectile.penetrate = 2;
projectile.tileCollide = false;
projectile.timeLeft = 300;
projectile.melee = true;
projectile.usesIDStaticNPCImmunity = true;
projectile.idStaticNPCHitCooldown = 10;
}
public override void AI()
{
if (Main.rand.NextBool(5))
Dust.NewDust(projectile.position + projectile.velocity, projectile.width, projectile.height, 32, projectile.velocity.X * 0.5f, projectile.velocity.Y * 0.5f);
projectile.frameCounter++;
if (projectile.frameCounter > 4)
{
projectile.frame++;
projectile.frameCounter = 0;
}
if (projectile.frame > 3)
projectile.frame = 0;
}
}
}