diff --git a/NPCs/Ravager/RavagerBody.cs b/NPCs/Ravager/RavagerBody.cs index 9fce483037..87f6c0a533 100644 --- a/NPCs/Ravager/RavagerBody.cs +++ b/NPCs/Ravager/RavagerBody.cs @@ -632,29 +632,28 @@ namespace CalamityMod.NPCs.Ravager } int spawnDistance = 360; + SoundEngine.PlaySound(PillarSound, NPC.Center); if (death && phase2) + { spawnDistance = 300; - SoundEngine.PlaySound(PillarSound, NPC.Center); - NPC.NewNPC(NPC.GetSource_FromAI(), (int)(player.Center.X - spawnDistance * 1.25f), (int)player.Center.Y - 100, ModContent.NPCType()); - NPC.NewNPC(NPC.GetSource_FromAI(), (int)(player.Center.X + spawnDistance * 1.25f), (int)player.Center.Y - 100, ModContent.NPCType()); - - if (death && !leftClawActive && !rightClawActive) + var index = NPC.NewNPC(NPC.GetSource_FromAI(), (int)(player.Center.X), (int)player.Center.Y - spawnDistance - 100, ModContent.NPCType()); + if (Main.npc.IndexInRange(index)) { + var npc = Main.npc[index]; + (int, int) H_W = (npc.height, npc.width); + npc.position = npc.Center; + npc.height = H_W.Item2; + npc.width = H_W.Item1; + npc.rotation = -MathHelper.PiOver2; + npc.Center = npc.position; + npc.ModNPC.DrawOffsetY = npc.width / 2 - npc.height / 2; - var index = NPC.NewNPC(NPC.GetSource_FromAI(), (int)(player.Center.X), (int)player.Center.Y - spawnDistance - 100, ModContent.NPCType()); - if (Main.npc.IndexInRange(index)) - { - var npc = Main.npc[index]; - (int, int) H_W = (npc.height, npc.width); - npc.position = npc.Center; - npc.height = H_W.Item2; - npc.width = H_W.Item1; - npc.rotation = -MathHelper.PiOver2; - npc.Center = npc.position; - npc.ModNPC.DrawOffsetY = npc.width / 2 - npc.height / 2; - } } - if (!anyFlamePillars) + } + NPC.NewNPC(NPC.GetSource_FromAI(), (int)(player.Center.X - spawnDistance * 1.25f), (int)player.Center.Y - 100, ModContent.NPCType()); + NPC.NewNPC(NPC.GetSource_FromAI(), (int)(player.Center.X + spawnDistance * 1.25f), (int)player.Center.Y - 100, ModContent.NPCType()); + + if (!anyFlamePillars && !phase2) { float distanceMultiplier = finalPhase ? 2.5f : 2f; NPC.NewNPC(NPC.GetSource_FromAI(), (int)player.Center.X - (int)(spawnDistance * distanceMultiplier), (int)player.Center.Y - 100, ModContent.NPCType()); diff --git a/NPCs/Ravager/RavagerClawLeft.cs b/NPCs/Ravager/RavagerClawLeft.cs index 84cda3e20c..0c560f0992 100644 --- a/NPCs/Ravager/RavagerClawLeft.cs +++ b/NPCs/Ravager/RavagerClawLeft.cs @@ -67,7 +67,6 @@ namespace CalamityMod.NPCs.Ravager return; } - bool death = CalamityWorld.death || BossRushEvent.BossRushActive; if (NPC.timeLeft < 1800) { NPC.timeLeft = 1800; @@ -98,17 +97,17 @@ namespace CalamityMod.NPCs.Ravager NPC.rotation = 0f; NPC.Center = Main.npc[CalamityGlobalNPC.scavenger].Center + new Vector2(-120f, 50f); NPC.ai[1] += 1f; - if (NPC.life < NPC.lifeMax / 2 || death) + if (NPC.life < NPC.lifeMax / 2) { NPC.ai[1] += 1f; } - if (NPC.life < NPC.lifeMax / 3 || death) + if (NPC.life < NPC.lifeMax / 3) { NPC.ai[1] += 1f; } - if (NPC.life < NPC.lifeMax / 5 || death) + if (NPC.life < NPC.lifeMax / 5) { - NPC.ai[1] += 5f; + NPC.ai[1] += 2f; } if (NPC.ai[1] >= 60f) { @@ -148,17 +147,17 @@ namespace CalamityMod.NPCs.Ravager NPC.collideX = false; NPC.collideY = false; float clawSpeed = 12f; - if (NPC.life < NPC.lifeMax / 2 || death) + if (NPC.life < NPC.lifeMax / 2) { clawSpeed += 2f; } - if (NPC.life < NPC.lifeMax / 3 || death) + if (NPC.life < NPC.lifeMax / 3) { clawSpeed += 2f; } - if (NPC.life < NPC.lifeMax / 5 || death) + if (NPC.life < NPC.lifeMax / 5) { - clawSpeed += 5f; + clawSpeed += 4f; } Vector2 npcCenterAttack = new Vector2(NPC.Center.X, NPC.Center.Y); float targetX = Main.player[NPC.target].Center.X - npcCenterAttack.X; @@ -205,7 +204,7 @@ namespace CalamityMod.NPCs.Ravager bodyReturnYDist += 40f; bodyReturnXDist -= 110f; float bodyReturnDistance = (float)Math.Sqrt(bodyReturnXDist * bodyReturnXDist + bodyReturnYDist * bodyReturnYDist); - if ((bodyReturnDistance > (death ? 900f : 700f) || NPC.collideX || NPC.collideY) | NPC.justHit) + if ((bodyReturnDistance > 700f || NPC.collideX || NPC.collideY) | NPC.justHit) { // Avoid cheap bullshit NPC.damage = 0; diff --git a/NPCs/Ravager/RavagerClawRight.cs b/NPCs/Ravager/RavagerClawRight.cs index b8855ebe09..08d86aba82 100644 --- a/NPCs/Ravager/RavagerClawRight.cs +++ b/NPCs/Ravager/RavagerClawRight.cs @@ -68,7 +68,6 @@ namespace CalamityMod.NPCs.Ravager return; } - bool death = CalamityWorld.death || BossRushEvent.BossRushActive; if (NPC.timeLeft < 1800) { NPC.timeLeft = 1800; @@ -99,17 +98,17 @@ namespace CalamityMod.NPCs.Ravager NPC.rotation = 0f; NPC.Center = Main.npc[CalamityGlobalNPC.scavenger].Center + new Vector2(120f, 50f); NPC.ai[1] += 1f; - if (NPC.life < NPC.lifeMax / 2 || death) + if (NPC.life < NPC.lifeMax / 2) { NPC.ai[1] += 1f; } - if (NPC.life < NPC.lifeMax / 3 || death) + if (NPC.life < NPC.lifeMax / 3) { NPC.ai[1] += 1f; } - if (NPC.life < NPC.lifeMax / 5 || death) + if (NPC.life < NPC.lifeMax / 5) { - NPC.ai[1] += 5f; + NPC.ai[1] += 2f; } if (NPC.ai[1] >= 60f) { @@ -149,17 +148,17 @@ namespace CalamityMod.NPCs.Ravager NPC.collideX = false; NPC.collideY = false; float clawSpeed = 12f; - if (NPC.life < NPC.lifeMax / 2 || death) + if (NPC.life < NPC.lifeMax / 2) { clawSpeed += 2f; } - if (NPC.life < NPC.lifeMax / 3 || death) + if (NPC.life < NPC.lifeMax / 3) { clawSpeed += 2f; } - if (NPC.life < NPC.lifeMax / 5 || death) + if (NPC.life < NPC.lifeMax / 5) { - clawSpeed += 5f; + clawSpeed += 4f; } Vector2 npcCenterAttack = new Vector2(NPC.Center.X, NPC.Center.Y); float targetX = Main.player[NPC.target].Center.X - npcCenterAttack.X; @@ -206,7 +205,7 @@ namespace CalamityMod.NPCs.Ravager bodyReturnYDist += 40f; bodyReturnXDist += 110f; float bodyReturnDistance = (float)Math.Sqrt(bodyReturnXDist * bodyReturnXDist + bodyReturnYDist * bodyReturnYDist); - if ((bodyReturnDistance > (death ? 900f : 700f) || NPC.collideX || NPC.collideY) | NPC.justHit) + if ((bodyReturnDistance > 700f || NPC.collideX || NPC.collideY) | NPC.justHit) { // Avoid cheap bullshit NPC.damage = 0;