Moved the set to CalamityNPCSets

This commit is contained in:
CongratsIsTrash committed 2026-06-21 22:19:14 -04:00
1 parent f24eeee97f
commit d1f46811bf
4 files changed
+11 -15

No files matched your search

+1 -1
View File
@@ -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<SuperDummyNPC>()) && !nPC.dontTakeDamage && !CalamityItemSets.ProtectedHostileNPC[nPC.type])
if (Utils.Distance(nPC.Center, player.Center) < MaxDistance + generousHitboxWidth && (nPC.IsAnEnemy(true, true, false) || nPC.type == ModContent.NPCType<SuperDummyNPC>()) && !nPC.dontTakeDamage && !CalamityNPCSets.ProtectedHostileNPC[nPC.type])
{
float minDamageMult = 0.10f;
int maxTargets = 7;
+1 -1
View File
@@ -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
-13
View File
@@ -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<SlickCane>(), ItemType<Mycoroot>(), ItemType<CosmicKunai>());
/// <summary>
/// If <see langword="true"/> for an NPC type, this NPC will not be targeted by various sources of 'unpredicatable' damage.<br/>
/// Primarily used for NPCs which summon bosses when killed.<br/>
/// Defaults to <see langword="false"/>.
/// </summary>
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<PerforatorCyst>(), NPCType<HiveTumor>(), NPCType<LeviathanStart>());
/// <summary>
/// If <see langword="true"/> for an item type, this item is considered to be a magic gun.<br/>
/// Used for applying Calamity's reworked Meteor armor set bonus.<br/>
+9
View File
@@ -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);
/// <summary>
/// If <see langword="true"/> for an NPC type, this NPC will not be targeted by various sources of 'unpredicatable' damage.<br/>
/// Primarily used for NPCs which summon bosses when killed.<br/>
/// Defaults to <see langword="false"/>.
/// </summary>
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<PerforatorCyst>(), NPCType<HiveTumor>(), NPCType<LeviathanStart>());
/// <summary>
/// If <see langword="true"/> for an NPC type, then that NPC will not provide increased Rage generation despite being considered a boss.<br/>
/// Primarily used by worm boss body and tail segments to prevent Rage being extraordinarily easy to get.<br/>