diff --git a/Items/Accessories/WarbanneroftheRighteous.cs b/Items/Accessories/WarbanneroftheRighteous.cs index d8cdcb655e..3d86e9105a 100644 --- a/Items/Accessories/WarbanneroftheRighteous.cs +++ b/Items/Accessories/WarbanneroftheRighteous.cs @@ -79,7 +79,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 && !CalamityItemSets.ProtectedHostileNPC[nPC.type]) + if (Utils.Distance(nPC.Center, player.Center) < MaxDistance + generousHitboxWidth && (nPC.IsAnEnemy(true, true, false) || nPC.type == ModContent.NPCType()) && !nPC.dontTakeDamage && !CalamityNPCSets.ProtectedHostileNPC[nPC.type]) { float minDamageMult = 0.10f; int maxTargets = 7; diff --git a/NPCs/CalamityGlobalNPC.cs b/NPCs/CalamityGlobalNPC.cs index 5b91de4cba..bfd43316ca 100644 --- a/NPCs/CalamityGlobalNPC.cs +++ b/NPCs/CalamityGlobalNPC.cs @@ -3550,7 +3550,7 @@ namespace CalamityMod.NPCs modifiers.HideCombatText(); // Block natural falling stars from killing boss spawners randomly - if (projectile.type == ProjectileID.FallingStar && projectile.damage >= 1000 && (CalamityItemSets.ProtectedHostileNPC[npc.type])) + if (projectile.type == ProjectileID.FallingStar && projectile.damage >= 1000 && CalamityNPCSets.ProtectedHostileNPC[npc.type]) modifiers.SourceDamage *= 0f; // Supercrits diff --git a/Systems/Collections/CalamityItemSets.cs b/Systems/Collections/CalamityItemSets.cs index 9bb6b99956..5abf9646f5 100644 --- a/Systems/Collections/CalamityItemSets.cs +++ b/Systems/Collections/CalamityItemSets.cs @@ -14,10 +14,6 @@ using CalamityMod.Items.Weapons.Magic; using CalamityMod.Items.Weapons.Melee; using CalamityMod.Items.Weapons.Ranged; using CalamityMod.Items.Weapons.Rogue; -using CalamityMod.NPCs.HiveMind; -using CalamityMod.NPCs.Leviathan; -using CalamityMod.NPCs.Perforator; -using ReLogic.Reflection; using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -66,15 +62,6 @@ namespace CalamityMod.Systems.Collections .Description("Prevents this item from triggering Venerated Locket's clone projectiles.") .RegisterBoolSet(ItemType(), ItemType(), ItemType()); - /// - /// If for an NPC type, this NPC will not be targeted by various sources of 'unpredicatable' damage.
- /// Primarily used for NPCs which summon bosses when killed.
- /// Defaults to . - ///
- public static bool[] ProtectedHostileNPC = Factory.CreateNamedSet("ProtectedHostileNPC") - .Description("Prevents this NPC from being targeted by various sources of 'unpredictable' damage.") - .RegisterBoolSet(NPCID.CultistArcherBlue, NPCID.CultistDevote, NPCType(), NPCType(), NPCType()); - /// /// If for an item type, this item is considered to be a magic gun.
/// Used for applying Calamity's reworked Meteor armor set bonus.
diff --git a/Systems/Collections/CalamityNPCSets.cs b/Systems/Collections/CalamityNPCSets.cs index a59adcbdd0..d97864f39f 100644 --- a/Systems/Collections/CalamityNPCSets.cs +++ b/Systems/Collections/CalamityNPCSets.cs @@ -78,6 +78,15 @@ namespace CalamityMod.Systems.Collections .Description("Labels this NPC as a bound town NPC, to prevent them from taking hostile damage.") .RegisterBoolSet(NPCID.BoundGoblin, NPCID.BoundWizard, NPCID.BoundMechanic, NPCID.SleepingAngler, NPCID.BartenderUnconscious, NPCID.WebbedStylist, NPCID.GolferRescue); + /// + /// If for an NPC type, this NPC will not be targeted by various sources of 'unpredicatable' damage.
+ /// Primarily used for NPCs which summon bosses when killed.
+ /// Defaults to . + ///
+ public static bool[] ProtectedHostileNPC = Factory.CreateNamedSet("ProtectedHostileNPC") + .Description("Prevents this NPC from being targeted by various sources of 'unpredictable' damage.") + .RegisterBoolSet(NPCID.CultistArcherBlue, NPCID.CultistDevote, NPCType(), NPCType(), NPCType()); + /// /// If for an NPC type, then that NPC will not provide increased Rage generation despite being considered a boss.
/// Primarily used by worm boss body and tail segments to prevent Rage being extraordinarily easy to get.