From 8ece3644707e070947bac03ff72022a650fe12ce Mon Sep 17 00:00:00 2001 From: Nathanael Overton Date: Thu, 18 Jun 2026 02:21:00 -0400 Subject: [PATCH] added warbanner NPC blacklist --- Items/Accessories/WarbanneroftheRighteous.cs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Items/Accessories/WarbanneroftheRighteous.cs b/Items/Accessories/WarbanneroftheRighteous.cs index 1b880b8310..a4de80ab1d 100644 --- a/Items/Accessories/WarbanneroftheRighteous.cs +++ b/Items/Accessories/WarbanneroftheRighteous.cs @@ -40,6 +40,11 @@ namespace CalamityMod.Items.Accessories Item.expert = true; } + private static bool IsBlacklistedNPC(NPC npc) + { + return npc.type == NPCID.CultistArcherBlue || npc.type == NPCID.CultistDevote; + } + public override void UpdateAccessory(Player player, bool hideVisual) { CalamityPlayer modPlayer = player.Calamity(); @@ -75,7 +80,7 @@ namespace CalamityMod.Items.Accessories float generousHitboxWidth = Math.Max(nPC.Hitbox.Width / 2f, nPC.Hitbox.Height / 2f) + 100; // Adds some room so max bonus isnt when you're ON the hitbox float intensity = Utils.Remap(Utils.Distance(player.Center, nPC.Center), MaxDistance + generousHitboxWidth, generousHitboxWidth, 1, 3, true); // We have to have this seperate from bonus, otherwise all effected enemies take damage based on the closest enemy - if (Utils.Distance(nPC.Center, player.Center) < MaxDistance + generousHitboxWidth && (nPC.IsAnEnemy(true, true, false) || nPC.type == ModContent.NPCType()) && !nPC.dontTakeDamage) + if (Utils.Distance(nPC.Center, player.Center) < MaxDistance + generousHitboxWidth && (nPC.IsAnEnemy(true, true, false) || nPC.type == ModContent.NPCType()) && !nPC.dontTakeDamage && !IsBlacklistedNPC(nPC)) { float minDamageMult = 0.10f; int maxTargets = 7;