1 - Tesla Orbs know the identities of each other.

This commit is contained in:
Andrew Marheine committed 2021-08-25 18:37:21 -05:00
1 parent 624a85d4e3
commit 91b9a5943c
2 files changed
+3 -1

No files matched your search

+2 -1
View File
@@ -326,7 +326,8 @@ namespace CalamityMod.NPCs.ExoMechs.Ares
int type = ModContent.ProjectileType<AresTeslaOrb>();
int damage = npc.GetProjectileDamage(type);
Vector2 offset = Vector2.Normalize(teslaOrbVelocity) * 40f + Vector2.UnitY * 8f;
Projectile.NewProjectile(npc.Center + offset, teslaOrbVelocity, type, damage, 0f, Main.myPlayer, player.Center.X, player.Center.Y);
float identity = (calamityGlobalNPC.newAI[2] - teslaOrbTelegraphDuration) / divisor;
Projectile.NewProjectile(npc.Center + offset, teslaOrbVelocity, type, damage, 0f, Main.myPlayer, identity);
}
}
}
+1
View File
@@ -9,6 +9,7 @@ namespace CalamityMod.Projectiles.Boss
{
public class AresTeslaOrb : ModProjectile
{
public ref float Identity => ref projectile.ai[0];
private const int timeLeft = 480;
public override void SetStaticDefaults()