diff --git a/NPCs/CalamityGlobalNPC.cs b/NPCs/CalamityGlobalNPC.cs index a353f675e9..49eb5134dd 100644 --- a/NPCs/CalamityGlobalNPC.cs +++ b/NPCs/CalamityGlobalNPC.cs @@ -686,6 +686,16 @@ namespace CalamityMod.NPCs //NPCID.WanderingEyeFish, //NPCID.ZombieMerman, }; + + public static List BoundNPCIDs = new List + { + NPCID.BoundGoblin, + NPCID.BoundWizard, + NPCID.BoundMechanic, + NPCID.SleepingAngler, + NPCID.BartenderUnconscious, + //NPCID.GolferRescue + }; #endregion #region Instance Per Entity @@ -1098,6 +1108,8 @@ namespace CalamityMod.NPCs RevDeathStatChanges(npc, mod); OtherStatChanges(npc); + + CalamityGlobalTownNPC.BoundNPCSafety(mod, npc); } #endregion diff --git a/NPCs/CalamityGlobalTownNPC.cs b/NPCs/CalamityGlobalTownNPC.cs index 719a9a0067..03a7a39fa5 100644 --- a/NPCs/CalamityGlobalTownNPC.cs +++ b/NPCs/CalamityGlobalTownNPC.cs @@ -1148,6 +1148,15 @@ namespace CalamityMod.NPCs #endregion #region NPC Stat Changes + public static void BoundNPCSafety(Mod mod, NPC npc) + { + // Make Bound Town NPCs take no damage + if (CalamityGlobalNPC.BoundNPCIDs.Contains(npc.type)) + { + npc.dontTakeDamageFromHostiles = true; + } + } + public static void MakeTownNPCsTakeMoreDamage(NPC npc, Projectile projectile, Mod mod, ref int damage) { if (npc.townNPC && projectile.hostile)