EnemyImmunitiesList.

This commit is contained in:
Memes authored and Cameron Ewell committed 2024-11-13 16:18:35 -05:00
1 parent 67715a62d4
commit ece86cc82f
15 files changed
+217 -159

No files matched your search

+3 -2
View File
@@ -1,6 +1,7 @@
using CalamityMod.Balancing;
using CalamityMod.Buffs.StatDebuffs;
using CalamityMod.NPCs;
using CalamityMod.Systems.Collections;
using Terraria;
using Terraria.ID;
using Terraria.Localization;
@@ -104,7 +105,7 @@ namespace CalamityMod.Buffs
{
if (npc.Calamity().webbed < npc.buffTime[buffIndex])
npc.Calamity().webbed = npc.buffTime[buffIndex];
if ((CalamityLists.enemyImmunityList.Contains(npc.type) || npc.boss) && npc.Calamity().debuffResistanceTimer <= 0)
if ((EnemyImmunitiesList.IsNPCImmune(npc) || npc.boss) && npc.Calamity().debuffResistanceTimer <= 0)
npc.Calamity().debuffResistanceTimer = CalamityGlobalNPC.slowingDebuffResistanceMin + npc.Calamity().webbed;
npc.DelBuff(buffIndex);
buffIndex--;
@@ -113,7 +114,7 @@ namespace CalamityMod.Buffs
{
if (npc.Calamity().slowed < npc.buffTime[buffIndex])
npc.Calamity().slowed = npc.buffTime[buffIndex];
if ((CalamityLists.enemyImmunityList.Contains(npc.type) || npc.boss) && npc.Calamity().debuffResistanceTimer <= 0)
if ((EnemyImmunitiesList.IsNPCImmune(npc) || npc.boss) && npc.Calamity().debuffResistanceTimer <= 0)
npc.Calamity().debuffResistanceTimer = CalamityGlobalNPC.slowingDebuffResistanceMin + npc.Calamity().slowed;
npc.DelBuff(buffIndex);
buffIndex--;
+2 -1
View File
@@ -1,6 +1,7 @@
using CalamityMod.Dusts;
using CalamityMod.NPCs;
using CalamityMod.Particles;
using CalamityMod.Systems.Collections;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.DataStructures;
@@ -40,7 +41,7 @@ namespace CalamityMod.Buffs.DamageOverTime
}
// Apply immunity timer.
if ((CalamityLists.enemyImmunityList.Contains(npc.type) || npc.boss) && cgn.debuffResistanceTimer <= 0)
if ((EnemyImmunitiesList.IsNPCImmune(npc) || npc.boss) && cgn.debuffResistanceTimer <= 0)
cgn.debuffResistanceTimer = CalamityGlobalNPC.slowingDebuffResistanceMin + cgn.trueVulnerabilityHex;
// Destroy the vanilla buff, we don't use it.
+2 -1
View File
@@ -1,4 +1,5 @@
using CalamityMod.NPCs;
using CalamityMod.Systems.Collections;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.DataStructures;
@@ -26,7 +27,7 @@ namespace CalamityMod.Buffs.DamageOverTime
{
if (npc.Calamity().vaporfied < npc.buffTime[buffIndex])
npc.Calamity().vaporfied = npc.buffTime[buffIndex];
if ((CalamityLists.enemyImmunityList.Contains(npc.type) || npc.boss) && npc.Calamity().debuffResistanceTimer <= 0)
if ((EnemyImmunitiesList.IsNPCImmune(npc) || npc.boss) && npc.Calamity().debuffResistanceTimer <= 0)
npc.Calamity().debuffResistanceTimer = CalamityGlobalNPC.slowingDebuffResistanceMin + npc.Calamity().vaporfied;
npc.DelBuff(buffIndex);
buffIndex--;
+2 -1
View File
@@ -1,6 +1,7 @@
using CalamityMod.Dusts;
using CalamityMod.NPCs;
using CalamityMod.Particles;
using CalamityMod.Systems.Collections;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.DataStructures;
@@ -43,7 +44,7 @@ namespace CalamityMod.Buffs.DamageOverTime
}
// Apply immunity timer.
if ((CalamityLists.enemyImmunityList.Contains(npc.type) || npc.boss) && cgn.debuffResistanceTimer <= 0)
if ((EnemyImmunitiesList.IsNPCImmune(npc) || npc.boss) && cgn.debuffResistanceTimer <= 0)
cgn.debuffResistanceTimer = CalamityGlobalNPC.slowingDebuffResistanceMin + cgn.vulnerabilityHex;
// Destroy the vanilla buff, we don't use it.
+2 -1
View File
@@ -1,4 +1,5 @@
using CalamityMod.NPCs;
using CalamityMod.Systems.Collections;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.DataStructures;
@@ -26,7 +27,7 @@ namespace CalamityMod.Buffs.StatDebuffs
{
if (npc.Calamity().eutrophication < npc.buffTime[buffIndex])
npc.Calamity().eutrophication = npc.buffTime[buffIndex];
if ((CalamityLists.enemyImmunityList.Contains(npc.type) || npc.boss) && npc.Calamity().debuffResistanceTimer <= 0)
if ((EnemyImmunitiesList.IsNPCImmune(npc) || npc.boss) && npc.Calamity().debuffResistanceTimer <= 0)
npc.Calamity().debuffResistanceTimer = CalamityGlobalNPC.slowingDebuffResistanceMin + npc.Calamity().eutrophication;
npc.DelBuff(buffIndex);
buffIndex--;
+2 -1
View File
@@ -1,4 +1,5 @@
using CalamityMod.NPCs;
using CalamityMod.Systems.Collections;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
@@ -19,7 +20,7 @@ namespace CalamityMod.Buffs.StatDebuffs
{
if (npc.Calamity().tesla < npc.buffTime[buffIndex])
npc.Calamity().tesla = npc.buffTime[buffIndex];
if ((CalamityLists.enemyImmunityList.Contains(npc.type) || npc.boss) && npc.Calamity().debuffResistanceTimer <= 0)
if ((EnemyImmunitiesList.IsNPCImmune(npc) || npc.boss) && npc.Calamity().debuffResistanceTimer <= 0)
npc.Calamity().debuffResistanceTimer = CalamityGlobalNPC.slowingDebuffResistanceMin + npc.Calamity().tesla;
npc.DelBuff(buffIndex);
buffIndex--;
+2 -1
View File
@@ -1,4 +1,5 @@
using CalamityMod.NPCs;
using CalamityMod.Systems.Collections;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.DataStructures;
@@ -26,7 +27,7 @@ namespace CalamityMod.Buffs.StatDebuffs
{
if (npc.Calamity().gState < npc.buffTime[buffIndex])
npc.Calamity().gState = npc.buffTime[buffIndex];
if ((CalamityLists.enemyImmunityList.Contains(npc.type) || npc.boss) && npc.Calamity().debuffResistanceTimer <= 0)
if ((EnemyImmunitiesList.IsNPCImmune(npc) || npc.boss) && npc.Calamity().debuffResistanceTimer <= 0)
npc.Calamity().debuffResistanceTimer = CalamityGlobalNPC.slowingDebuffResistanceMin + npc.Calamity().gState;
npc.DelBuff(buffIndex);
buffIndex--;
+2 -1
View File
@@ -1,4 +1,5 @@
using CalamityMod.NPCs;
using CalamityMod.Systems.Collections;
using Terraria;
using Terraria.ModLoader;
@@ -17,7 +18,7 @@ namespace CalamityMod.Buffs.StatDebuffs
{
if (npc.Calamity().kamiFlu < npc.buffTime[buffIndex])
npc.Calamity().kamiFlu = npc.buffTime[buffIndex];
if ((CalamityLists.enemyImmunityList.Contains(npc.type) || npc.boss) && npc.Calamity().debuffResistanceTimer <= 0)
if ((EnemyImmunitiesList.IsNPCImmune(npc) || npc.boss) && npc.Calamity().debuffResistanceTimer <= 0)
npc.Calamity().debuffResistanceTimer = CalamityGlobalNPC.slowingDebuffResistanceMin + npc.Calamity().kamiFlu;
npc.DelBuff(buffIndex);
buffIndex--;
+2 -1
View File
@@ -1,4 +1,5 @@
using CalamityMod.NPCs;
using CalamityMod.Systems.Collections;
using Terraria;
using Terraria.ModLoader;
@@ -17,7 +18,7 @@ namespace CalamityMod.Buffs.StatDebuffs
{
if (npc.Calamity().tSad < npc.buffTime[buffIndex])
npc.Calamity().tSad = npc.buffTime[buffIndex];
if ((CalamityLists.enemyImmunityList.Contains(npc.type) || npc.boss) && npc.Calamity().debuffResistanceTimer <= 0)
if ((EnemyImmunitiesList.IsNPCImmune(npc) || npc.boss) && npc.Calamity().debuffResistanceTimer <= 0)
npc.Calamity().debuffResistanceTimer = CalamityGlobalNPC.slowingDebuffResistanceMin + npc.Calamity().tSad;
npc.DelBuff(buffIndex);
buffIndex--;
+2 -1
View File
@@ -1,4 +1,5 @@
using CalamityMod.NPCs;
using CalamityMod.Systems.Collections;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
@@ -19,7 +20,7 @@ namespace CalamityMod.Buffs.StatDebuffs
{
if (npc.Calamity().timeSlow < npc.buffTime[buffIndex])
npc.Calamity().timeSlow = npc.buffTime[buffIndex];
if ((CalamityLists.enemyImmunityList.Contains(npc.type) || npc.boss) && npc.Calamity().debuffResistanceTimer <= 0)
if ((EnemyImmunitiesList.IsNPCImmune(npc) || npc.boss) && npc.Calamity().debuffResistanceTimer <= 0)
npc.Calamity().debuffResistanceTimer = CalamityGlobalNPC.slowingDebuffResistanceMin + npc.Calamity().timeSlow;
npc.DelBuff(buffIndex);
buffIndex--;
+1
View File
@@ -33,6 +33,7 @@ using Terraria.Audio;
using Terraria.ID;
using Terraria.ModLoader;
using static Terraria.ModLoader.ModContent;
using CalamityMod.Systems.Collections;
namespace CalamityMod.CalPlayer
{
-146
View File
@@ -80,8 +80,6 @@ namespace CalamityMod
{
public sealed class CalamityLists : ModSystem
{
public static List<int> projectileDestroyExceptionList;
public static List<int> enemyImmunityList;
public static List<int> confusionEnemyList;
public static List<int> dungeonEnemyBuffList;
public static List<int> dungeonProjectileBuffList;
@@ -164,150 +162,6 @@ namespace CalamityMod
public override void OnModLoad()
{
enemyImmunityList = new List<int>()
{
NPCID.KingSlime,
NPCType<KingSlimeJewelRuby>(),
NPCType<KingSlimeJewelSapphire>(),
NPCType<KingSlimeJewelEmerald>(),
NPCID.EyeofCthulhu,
NPCType<BloodlettingServant>(),
NPCID.EaterofWorldsHead,
NPCID.EaterofWorldsBody,
NPCID.EaterofWorldsTail,
NPCID.BrainofCthulhu,
NPCID.Creeper,
NPCID.QueenBee,
NPCID.Deerclops,
NPCID.SkeletronHead,
NPCID.SkeletronHand,
NPCID.WallofFlesh,
NPCID.WallofFleshEye,
NPCID.PirateShipCannon,
NPCID.QueenSlimeBoss,
NPCID.Probe,
NPCID.Retinazer,
NPCID.Spazmatism,
NPCType<Foveanator>(),
NPCID.SkeletronPrime,
NPCType<SkeletronPrime2>(),
NPCID.PrimeCannon,
NPCID.PrimeSaw,
NPCID.PrimeLaser,
NPCID.PrimeVice,
NPCID.Plantera,
NPCID.PlanterasTentacle,
NPCType<PlanterasFreeTentacle>(),
NPCID.Everscream,
NPCID.SantaNK1,
NPCID.IceQueen,
NPCID.MourningWood,
NPCID.Pumpking,
NPCID.Mothron,
NPCID.Golem,
NPCID.GolemHead,
NPCID.GolemHeadFree,
NPCID.GolemFistRight,
NPCID.GolemFistLeft,
NPCID.MartianSaucerCore,
NPCID.MartianSaucerCannon,
NPCID.MartianSaucerTurret,
NPCID.DukeFishron,
NPCID.Sharkron,
NPCID.Sharkron2,
NPCID.HallowBoss,
NPCID.CultistBoss,
NPCID.CultistDragonHead,
NPCID.CultistDragonBody1,
NPCID.CultistDragonBody2,
NPCID.CultistDragonBody3,
NPCID.CultistDragonBody4,
NPCID.CultistDragonTail,
NPCID.AncientCultistSquidhead,
NPCID.MoonLordHead,
NPCID.MoonLordHand,
NPCID.MoonLordCore,
NPCID.MoonLordFreeEye,
NPCID.DD2WyvernT1,
NPCID.DD2WyvernT2,
NPCID.DD2WyvernT3,
NPCID.DD2DarkMageT1,
NPCID.DD2DarkMageT3,
NPCID.DD2SkeletonT1,
NPCID.DD2SkeletonT3,
NPCID.DD2WitherBeastT2,
NPCID.DD2WitherBeastT3,
NPCID.DD2DrakinT2,
NPCID.DD2DrakinT3,
NPCID.DD2KoboldWalkerT2,
NPCID.DD2KoboldWalkerT3,
NPCID.DD2KoboldFlyerT2,
NPCID.DD2KoboldFlyerT3,
NPCID.DD2OgreT2,
NPCID.DD2OgreT3,
NPCID.DD2Betsy,
NPCType<DesertNuisanceHead>(),
NPCType<DesertNuisanceBody>(),
NPCType<DesertNuisanceTail>(),
NPCType<DesertNuisanceHeadYoung>(),
NPCType<DesertNuisanceBodyYoung>(),
NPCType<DesertNuisanceTailYoung>(),
NPCType<GiantClam>(),
NPCType<PerforatorHeadLarge>(),
NPCType<PerforatorHeadMedium>(),
NPCType<PerforatorHeadSmall>(),
NPCType<PerforatorBodyLarge>(),
NPCType<PerforatorBodyMedium>(),
NPCType<PerforatorBodySmall>(),
NPCType<PerforatorTailLarge>(),
NPCType<PerforatorTailMedium>(),
NPCType<PerforatorTailSmall>(),
NPCType<EbonianPaladin>(),
NPCType<CrimulanPaladin>(),
NPCType<SplitEbonianPaladin>(),
NPCType<SplitCrimulanPaladin>(),
NPCType<Horse>(),
NPCType<ThiccWaifu>(),
NPCType<CryogenShield>(),
NPCType<AquaticScourgeHead>(),
NPCType<AquaticScourgeBody>(),
NPCType<AquaticScourgeBodyAlt>(),
NPCType<AquaticScourgeTail>(),
NPCType<CragmawMire>(),
NPCType<Cataclysm>(),
NPCType<Catastrophe>(),
NPCType<SoulSeeker>(),
NPCType<GreatSandShark>(),
NPCType<AnahitasIceShield>(),
NPCType<AureusSpawn>(),
NPCType<PlaguebringerMiniboss>(),
NPCType<PlagueHomingMissile>(),
NPCType<PlagueMine>(),
NPCType<RavagerClawLeft>(),
NPCType<RavagerClawRight>(),
NPCType<RavagerLegLeft>(),
NPCType<RavagerLegRight>(),
NPCType<RockPillar>(),
NPCType<RavagerHead>(),
NPCType<ProfanedGuardianDefender>(),
NPCType<ProfanedGuardianHealer>(),
NPCType<Bumblefuck2>(),
NPCType<ProvSpawnDefense>(),
NPCType<ProvSpawnHealer>(),
NPCType<ProvSpawnOffense>(),
NPCType<BobbitWormHead>(),
NPCType<Mauler>(),
NPCType<ColossalSquid>(),
NPCType<ReaperShark>(),
NPCType<EidolonWyrmHead>(),
NPCType<NuclearTerror>(),
NPCType<OldDukeToothBall>(),
NPCType<SulphurousSharkron>(),
NPCType<SupremeCataclysm>(),
NPCType<SupremeCatastrophe>(),
NPCType<SoulSeekerSupreme>()
};
confusionEnemyList = new List<int>()
{
NPCType<AeroSlime>(),
+2 -1
View File
@@ -88,6 +88,7 @@ using Terraria.Utilities;
using static Terraria.ModLoader.ModContent;
using CalamityMod.ExtraTextures;
using MonoMod.Utils;
using CalamityMod.Systems.Collections;
namespace CalamityMod.NPCs
{
@@ -8689,7 +8690,7 @@ namespace CalamityMod.NPCs
if (target.damage > 0 && !target.boss && !target.friendly && !target.dontTakeDamage && target.type != NPCID.Creeper && target.type != NPCType<RavagerClawLeft>() &&
target.type != NPCID.MourningWood && target.type != NPCID.Everscream && target.type != NPCID.SantaNK1 && target.type != NPCType<RavagerClawRight>() &&
target.type != NPCType<ReaperShark>() && target.type != NPCType<Mauler>() && target.type != NPCType<EidolonWyrmHead>() && target.type != NPCID.GolemFistLeft && target.type != NPCID.GolemFistRight &&
target.type != NPCType<PrimordialWyrmHead>() && target.type != NPCType<ColossalSquid>() && target.type != NPCID.DD2Betsy && !CalamityLists.enemyImmunityList.Contains(target.type) && !AcidRainEvent.AllMinibosses.Contains(target.type))
target.type != NPCType<PrimordialWyrmHead>() && target.type != NPCType<ColossalSquid>() && target.type != NPCID.DD2Betsy && !EnemyImmunitiesList.IsNPCImmune(target) && !AcidRainEvent.AllMinibosses.Contains(target.type))
{
return true;
}
+191
View File
@@ -0,0 +1,191 @@
using System.Collections.Generic;
using CalamityMod.NPCs.Abyss;
using CalamityMod.NPCs.AcidRain;
using CalamityMod.NPCs.AquaticScourge;
using CalamityMod.NPCs.AstrumAureus;
using CalamityMod.NPCs.Bumblebirb;
using CalamityMod.NPCs.CalClone;
using CalamityMod.NPCs.Cryogen;
using CalamityMod.NPCs.DesertScourge;
using CalamityMod.NPCs.GreatSandShark;
using CalamityMod.NPCs.Leviathan;
using CalamityMod.NPCs.NormalNPCs;
using CalamityMod.NPCs.OldDuke;
using CalamityMod.NPCs.Perforator;
using CalamityMod.NPCs.PlaguebringerGoliath;
using CalamityMod.NPCs.PlagueEnemies;
using CalamityMod.NPCs.ProfanedGuardians;
using CalamityMod.NPCs.Providence;
using CalamityMod.NPCs.Ravager;
using CalamityMod.NPCs.SlimeGod;
using CalamityMod.NPCs.SunkenSea;
using CalamityMod.NPCs.SupremeCalamitas;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
using static Terraria.ModLoader.ModContent;
namespace CalamityMod.Systems.Collections
{
/// <summary>
/// A <see cref="ModSystem"/> that contains all of the NPC IDs of all NPCs that are immune to special debuffs.
/// </summary>
public sealed class EnemyImmunitiesList : ModSystem
{
public static IList<int> List { get; private set; }
public override void OnModLoad()
{
List =
[
NPCID.KingSlime,
NPCType<KingSlimeJewelRuby>(),
NPCType<KingSlimeJewelSapphire>(),
NPCType<KingSlimeJewelEmerald>(),
NPCID.EyeofCthulhu,
NPCType<BloodlettingServant>(),
NPCID.EaterofWorldsHead,
NPCID.EaterofWorldsBody,
NPCID.EaterofWorldsTail,
NPCID.BrainofCthulhu,
NPCID.Creeper,
NPCID.QueenBee,
NPCID.Deerclops,
NPCID.SkeletronHead,
NPCID.SkeletronHand,
NPCID.WallofFlesh,
NPCID.WallofFleshEye,
NPCID.PirateShipCannon,
NPCID.QueenSlimeBoss,
NPCID.Probe,
NPCID.Retinazer,
NPCID.Spazmatism,
NPCType<Foveanator>(),
NPCID.SkeletronPrime,
NPCType<SkeletronPrime2>(),
NPCID.PrimeCannon,
NPCID.PrimeSaw,
NPCID.PrimeLaser,
NPCID.PrimeVice,
NPCID.Plantera,
NPCID.PlanterasTentacle,
NPCType<PlanterasFreeTentacle>(),
NPCID.Everscream,
NPCID.SantaNK1,
NPCID.IceQueen,
NPCID.MourningWood,
NPCID.Pumpking,
NPCID.Mothron,
NPCID.Golem,
NPCID.GolemHead,
NPCID.GolemHeadFree,
NPCID.GolemFistRight,
NPCID.GolemFistLeft,
NPCID.MartianSaucerCore,
NPCID.MartianSaucerCannon,
NPCID.MartianSaucerTurret,
NPCID.DukeFishron,
NPCID.Sharkron,
NPCID.Sharkron2,
NPCID.HallowBoss,
NPCID.CultistBoss,
NPCID.CultistDragonHead,
NPCID.CultistDragonBody1,
NPCID.CultistDragonBody2,
NPCID.CultistDragonBody3,
NPCID.CultistDragonBody4,
NPCID.CultistDragonTail,
NPCID.AncientCultistSquidhead,
NPCID.MoonLordHead,
NPCID.MoonLordHand,
NPCID.MoonLordCore,
NPCID.MoonLordFreeEye,
NPCID.DD2WyvernT1,
NPCID.DD2WyvernT2,
NPCID.DD2WyvernT3,
NPCID.DD2DarkMageT1,
NPCID.DD2DarkMageT3,
NPCID.DD2SkeletonT1,
NPCID.DD2SkeletonT3,
NPCID.DD2WitherBeastT2,
NPCID.DD2WitherBeastT3,
NPCID.DD2DrakinT2,
NPCID.DD2DrakinT3,
NPCID.DD2KoboldWalkerT2,
NPCID.DD2KoboldWalkerT3,
NPCID.DD2KoboldFlyerT2,
NPCID.DD2KoboldFlyerT3,
NPCID.DD2OgreT2,
NPCID.DD2OgreT3,
NPCID.DD2Betsy,
NPCType<DesertNuisanceHead>(),
NPCType<DesertNuisanceBody>(),
NPCType<DesertNuisanceTail>(),
NPCType<DesertNuisanceHeadYoung>(),
NPCType<DesertNuisanceBodyYoung>(),
NPCType<DesertNuisanceTailYoung>(),
NPCType<GiantClam>(),
NPCType<PerforatorHeadLarge>(),
NPCType<PerforatorHeadMedium>(),
NPCType<PerforatorHeadSmall>(),
NPCType<PerforatorBodyLarge>(),
NPCType<PerforatorBodyMedium>(),
NPCType<PerforatorBodySmall>(),
NPCType<PerforatorTailLarge>(),
NPCType<PerforatorTailMedium>(),
NPCType<PerforatorTailSmall>(),
NPCType<EbonianPaladin>(),
NPCType<CrimulanPaladin>(),
NPCType<SplitEbonianPaladin>(),
NPCType<SplitCrimulanPaladin>(),
NPCType<Horse>(),
NPCType<ThiccWaifu>(),
NPCType<CryogenShield>(),
NPCType<AquaticScourgeHead>(),
NPCType<AquaticScourgeBody>(),
NPCType<AquaticScourgeBodyAlt>(),
NPCType<AquaticScourgeTail>(),
NPCType<CragmawMire>(),
NPCType<Cataclysm>(),
NPCType<Catastrophe>(),
NPCType<SoulSeeker>(),
NPCType<GreatSandShark>(),
NPCType<AnahitasIceShield>(),
NPCType<AureusSpawn>(),
NPCType<PlaguebringerMiniboss>(),
NPCType<PlagueHomingMissile>(),
NPCType<PlagueMine>(),
NPCType<RavagerClawLeft>(),
NPCType<RavagerClawRight>(),
NPCType<RavagerLegLeft>(),
NPCType<RavagerLegRight>(),
NPCType<RockPillar>(),
NPCType<RavagerHead>(),
NPCType<ProfanedGuardianDefender>(),
NPCType<ProfanedGuardianHealer>(),
NPCType<Bumblefuck2>(),
NPCType<ProvSpawnDefense>(),
NPCType<ProvSpawnHealer>(),
NPCType<ProvSpawnOffense>(),
NPCType<BobbitWormHead>(),
NPCType<Mauler>(),
NPCType<ColossalSquid>(),
NPCType<ReaperShark>(),
NPCType<EidolonWyrmHead>(),
NPCType<NuclearTerror>(),
NPCType<OldDukeToothBall>(),
NPCType<SulphurousSharkron>(),
NPCType<SupremeCataclysm>(),
NPCType<SupremeCatastrophe>(),
NPCType<SoulSeekerSupreme>()
];
}
public override void Unload() => List = null;
/// <summary>
/// A shorthand method to check if an NPC is in this list.
/// </summary>
public static bool IsNPCImmune(NPC npc) => List.Contains(npc.type);
}
}
+2 -1
View File
@@ -35,6 +35,7 @@ using CalamityMod.NPCs.SulphurousSea;
using CalamityMod.NPCs.SunkenSea;
using CalamityMod.NPCs.SupremeCalamitas;
using CalamityMod.NPCs.Yharon;
using CalamityMod.Systems.Collections;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
@@ -99,7 +100,7 @@ namespace CalamityMod
//
// All bosses and several enemies are automatically immune to Pearl Aura.
if (CalamityLists.enemyImmunityList.Contains(npc.type) || npc.boss)
if (EnemyImmunitiesList.IsNPCImmune(npc) || npc.boss)
NPCID.Sets.SpecificDebuffImmunity[npc.type][ModContent.BuffType<PearlAura>()] = true;
// Make all Cal NPCs immune to confused unless otherwise specified