DoG no longer deals contact damage between laser wall end and teleport

This commit is contained in:
CongratsIsTrash committed 2026-02-12 14:44:09 -05:00
1 parent e5570c997d
commit fc4fef138a
3 files changed
+9 -2

No files matched your search

+3 -1
View File
@@ -250,6 +250,9 @@ namespace CalamityMod.NPCs.DevourerofGods
NPC.Opacity = Main.npc[(int)NPC.ai[2]].Opacity;
}
// Copy the damage state of the head
NPC.damage = Main.npc[(int)NPC.ai[2]].damage == 0 ? 0 : NPC.defDamage;
NPC aheadSegment = Main.npc[(int)NPC.ai[1]];
Vector2 directionToNextSegment = aheadSegment.Center - NPC.Center;
if (aheadSegment.rotation != NPC.rotation)
@@ -345,7 +348,6 @@ namespace CalamityMod.NPCs.DevourerofGods
public override bool CanHitPlayer(Player target, ref int cooldownSlot)
{
if (Main.npc[(int)NPC.ai[2]].dontTakeDamage)
return false;
cooldownSlot = ImmunityCooldownID.Bosses;
@@ -798,6 +798,8 @@ namespace CalamityMod.NPCs.DevourerofGods
if (NPC.Opacity >= 1f)
{
// Don't do contact damage while flying away after laser walls
NPC.damage = 0;
NPC.Opacity = 1f;
laserWallPhase = (int)LaserWallPhase.SetUp;
@@ -2299,6 +2301,7 @@ namespace CalamityMod.NPCs.DevourerofGods
AwaitingPhase2Teleport = false;
NPC.Opacity = 1f - (postTeleportTimer / 255f);
NPC.velocity = Vector2.Normalize(AdjustedPlayerCenter(10) - NPC.Center) * chargeVelocity;
NPC.damage = NPC.defDamage;
NPC.ForceNetUpdate(false);
NPC.rotation = (float)Math.Atan2(NPC.velocity.Y, NPC.velocity.X) + MathHelper.PiOver2;
foreach (NPC n in Main.ActiveNPCs)
+3 -1
View File
@@ -152,7 +152,6 @@ namespace CalamityMod.NPCs.DevourerofGods
NPC.life = Main.npc[(int)NPC.ai[2]].life;
NPC.lifeMax = Main.npc[(int)NPC.ai[2]].lifeMax;
// Percent life remaining
float lifeRatio = Main.npc[(int)NPC.ai[2]].life / (float)Main.npc[(int)NPC.ai[2]].lifeMax;
@@ -249,6 +248,9 @@ namespace CalamityMod.NPCs.DevourerofGods
NPC.Opacity = Main.npc[(int)NPC.ai[2]].Opacity;
}
// Copy the damage state of the head
NPC.damage = Main.npc[(int)NPC.ai[2]].damage == 0 ? 0 : NPC.defDamage;
Vector2 segmentDirection = NPC.Center;
float playerXDist = player.position.X + (player.width / 2);
float playerYDist = player.position.Y + (player.height / 2);