From ec8dfd572d669a5037bbed03b6f22809a38cbf09 Mon Sep 17 00:00:00 2001 From: Andrew Marheine Date: Sun, 10 Oct 2021 07:11:14 -0500 Subject: [PATCH] 1 - Draedon activates boss zen, if enabled. --- NPCs/CalamityGlobalNPC.cs | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/NPCs/CalamityGlobalNPC.cs b/NPCs/CalamityGlobalNPC.cs index 108ad11dd0..499fa7c106 100644 --- a/NPCs/CalamityGlobalNPC.cs +++ b/NPCs/CalamityGlobalNPC.cs @@ -2066,7 +2066,7 @@ namespace CalamityMod.NPCs maxVelocity = npc.velocity.Length(); } - if (KillTime > 0) + if (KillTime > 0 || npc.type == NPCType()) { // If any boss NPC is active, apply Zen to nearby players to reduce spawn rate if (CalamityConfig.Instance.BossZen) @@ -2078,16 +2078,19 @@ namespace CalamityMod.NPCs } } - if (AITimer < KillTime) - AITimer++; + if (npc.type != NPCType()) + { + if (AITimer < KillTime) + AITimer++; - // Separate timer for aggression to avoid entering later phases too quickly - int aggressionTimerCap = (int)(KillTime * 1.35); - if (AIIncreasedAggressionTimer < aggressionTimerCap) - AIIncreasedAggressionTimer++; + // Separate timer for aggression to avoid entering later phases too quickly + int aggressionTimerCap = (int)(KillTime * 1.35); + if (AIIncreasedAggressionTimer < aggressionTimerCap) + AIIncreasedAggressionTimer++; - // Increases aggression over time if the fight is taking too long - killTimeRatio_IncreasedAggression = 1f - (AIIncreasedAggressionTimer / (float)aggressionTimerCap); + // Increases aggression over time if the fight is taking too long + killTimeRatio_IncreasedAggression = 1f - (AIIncreasedAggressionTimer / (float)aggressionTimerCap); + } } if (npc.type == NPCID.TargetDummy || npc.type == NPCType())