From 855c7555c4bd99a06cbe9564462381ed067d78b7 Mon Sep 17 00:00:00 2001 From: Ozzatron Date: Mon, 14 Dec 2020 11:42:56 -0500 Subject: [PATCH 1/7] stealth is now forgiving on "clockwork" rogue weapons --- CalPlayer/CalamityPlayer.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CalPlayer/CalamityPlayer.cs b/CalPlayer/CalamityPlayer.cs index c3e20b1b86..148dab5e3c 100644 --- a/CalPlayer/CalamityPlayer.cs +++ b/CalPlayer/CalamityPlayer.cs @@ -9202,7 +9202,8 @@ namespace CalamityMod.CalPlayer // Use time 20 = 242% damage ratio // Use time 30 = 263% damage ratio // Use time 59 = 297% damage ratio - double useTimeFactor = 0.75 + 0.75 * Math.Log(it.useTime + 2D, 4D); + int realUseTime = Math.Max(it.useTime, it.useAnimation); + double useTimeFactor = 0.75 + 0.75 * Math.Log(realUseTime + 2D, 4D); // 9.00 second stealth charge = 433% damage ratio // 6.00 second stealth charge = 330% damage ratio From b7458940364e705a32729f4761c8733e4d0161fc Mon Sep 17 00:00:00 2001 From: ben-tk <45545085+termigator1359@users.noreply.github.com> Date: Sun, 13 Dec 2020 21:19:31 -0500 Subject: [PATCH 2/7] Almost all debuff immunities/vulnerabilities are now centralized in NPCStats.cs This is called in GlobalNPC SetDefaults. Added a few comments explaining some stuff. Created a list for confusion weak enemies so they are also initialized in GlobalNPC SetDefaults. --- CalamityLists.cs | 44 +- NPCs/Abyss/Bloatfish.cs | 1 - NPCs/Abyss/BobbitWormHead.cs | 1 - NPCs/Abyss/BoxJellyfish.cs | 1 - NPCs/Abyss/ChaoticPuffer.cs | 1 - NPCs/Abyss/ColossalSquid.cs | 23 - NPCs/Abyss/Cuttlefish.cs | 1 - NPCs/Abyss/DevilFish.cs | 1 - NPCs/Abyss/DevilFishAlt.cs | 1 - NPCs/Abyss/EidolonWyrmBody.cs | 4 - NPCs/Abyss/EidolonWyrmBodyAlt.cs | 4 - NPCs/Abyss/EidolonWyrmBodyAltHuge.cs | 4 - NPCs/Abyss/EidolonWyrmBodyHuge.cs | 4 - NPCs/Abyss/EidolonWyrmHead.cs | 4 - NPCs/Abyss/EidolonWyrmHeadHuge.cs | 4 - NPCs/Abyss/EidolonWyrmTail.cs | 4 - NPCs/Abyss/EidolonWyrmTailHuge.cs | 4 - NPCs/Abyss/GiantSquid.cs | 1 - NPCs/Abyss/GulperEelBody.cs | 4 - NPCs/Abyss/GulperEelBodyAlt.cs | 4 - NPCs/Abyss/GulperEelHead.cs | 4 - NPCs/Abyss/GulperEelTail.cs | 4 - NPCs/Abyss/Laserfish.cs | 1 - NPCs/Abyss/LuminousCorvina.cs | 1 - NPCs/Abyss/MirageJelly.cs | 1 - NPCs/Abyss/MorayEel.cs | 1 - NPCs/Abyss/OarfishBody.cs | 4 - NPCs/Abyss/OarfishHead.cs | 4 - NPCs/Abyss/OarfishTail.cs | 4 - NPCs/Abyss/Reaper.cs | 23 - NPCs/Abyss/ToxicMinnow.cs | 1 - NPCs/Abyss/Viperfish.cs | 1 - NPCs/AcidRain/AcidEel.cs | 4 - NPCs/AcidRain/BloodwormFleeing.cs | 4 - NPCs/AcidRain/BloodwormNormal.cs | 4 - NPCs/AcidRain/CragmawMire.cs | 4 - NPCs/AcidRain/FlakBaby.cs | 4 - NPCs/AcidRain/FlakCrab.cs | 4 - NPCs/AcidRain/GammaSlime.cs | 4 - NPCs/AcidRain/IrradiatedSlime.cs | 8 +- NPCs/AcidRain/NuclearTerror.cs | 4 - NPCs/AcidRain/NuclearToad.cs | 4 - NPCs/AcidRain/Orthocera.cs | 4 - NPCs/AcidRain/Radiator.cs | 4 - NPCs/AcidRain/Skyfin.cs | 4 - NPCs/AcidRain/SulfurousSkater.cs | 4 - NPCs/AcidRain/Trilobite.cs | 4 - NPCs/AcidRain/WaterLeech.cs | 4 - NPCs/AquaticScourge/AquaticParasite.cs | 4 - NPCs/AquaticScourge/AquaticScourgeBody.cs | 4 - NPCs/AquaticScourge/AquaticScourgeBodyAlt.cs | 4 - NPCs/AquaticScourge/AquaticScourgeHead.cs | 4 - NPCs/AquaticScourge/AquaticScourgeTail.cs | 4 - NPCs/AquaticScourge/AquaticSeekerBody.cs | 4 - NPCs/AquaticScourge/AquaticSeekerHead.cs | 4 - NPCs/AquaticScourge/AquaticSeekerTail.cs | 4 - NPCs/AquaticScourge/AquaticUrchin.cs | 4 - NPCs/Astral/Aries.cs | 1 - NPCs/Astral/AstralProbe.cs | 1 - NPCs/Astral/AstralSlime.cs | 1 - NPCs/Astral/AstralachneaGround.cs | 3 - NPCs/Astral/AstralachneaWall.cs | 3 - NPCs/Astral/Atlas.cs | 1 - NPCs/Astral/BigSightseer.cs | 1 - NPCs/Astral/FusionFeeder.cs | 1 - NPCs/Astral/Hadarian.cs | 1 - NPCs/Astral/Hive.cs | 1 - NPCs/Astral/Hiveling.cs | 1 - NPCs/Astral/Mantis.cs | 1 - NPCs/Astral/Nova.cs | 1 - NPCs/Astral/SmallSightseer.cs | 1 - NPCs/Astral/StellarCulex.cs | 2 - NPCs/AstrumAureus/AstrumAureus.cs | 27 - NPCs/AstrumAureus/AureusSpawn.cs | 4 - NPCs/AstrumDeus/AstrumDeusBodySpectral.cs | 4 - NPCs/AstrumDeus/AstrumDeusHeadSpectral.cs | 4 - NPCs/AstrumDeus/AstrumDeusTailSpectral.cs | 4 - NPCs/BrimstoneElemental/Brimling.cs | 28 - NPCs/BrimstoneElemental/BrimstoneElemental.cs | 28 - NPCs/Bumblebirb/Bumblefuck.cs | 22 - NPCs/Bumblebirb/Bumblefuck2.cs | 22 - NPCs/Calamitas/Calamitas.cs | 28 - NPCs/Calamitas/CalamitasRun.cs | 28 - NPCs/Calamitas/CalamitasRun2.cs | 28 - NPCs/Calamitas/CalamitasRun3.cs | 28 - NPCs/Calamitas/LifeSeeker.cs | 1 - NPCs/Calamitas/SoulSeeker.cs | 28 - NPCs/CalamityGlobalNPC.cs | 22 +- NPCs/CeaselessVoid/CeaselessVoid.cs | 4 - NPCs/CeaselessVoid/DarkEnergy.cs | 4 - NPCs/CeaselessVoid/DarkEnergy2.cs | 4 - NPCs/CeaselessVoid/DarkEnergy3.cs | 4 - NPCs/Crabulon/CrabulonIdle.cs | 2 - NPCs/Crags/CalamityEye.cs | 1 - NPCs/Crags/CultistAssassin.cs | 1 - NPCs/Crags/DespairStone.cs | 1 - NPCs/Crags/Scryllar.cs | 1 - NPCs/Crags/ScryllarRage.cs | 1 - NPCs/Cryogen/Cryogen.cs | 30 - NPCs/DesertScourge/DesertScourgeBody.cs | 4 - NPCs/DesertScourge/DesertScourgeHead.cs | 4 - NPCs/DesertScourge/DesertScourgeTail.cs | 4 - NPCs/DevourerofGods/DevourerofGodsBody.cs | 4 - NPCs/DevourerofGods/DevourerofGodsBody2.cs | 4 - NPCs/DevourerofGods/DevourerofGodsBodyS.cs | 4 - NPCs/DevourerofGods/DevourerofGodsHead.cs | 4 - NPCs/DevourerofGods/DevourerofGodsHead2.cs | 4 - NPCs/DevourerofGods/DevourerofGodsHeadS.cs | 4 - NPCs/DevourerofGods/DevourerofGodsTail.cs | 4 - NPCs/DevourerofGods/DevourerofGodsTail2.cs | 4 - NPCs/DevourerofGods/DevourerofGodsTailS.cs | 4 - NPCs/GreatSandShark/GreatSandShark.cs | 25 - NPCs/HiveMind/HiveMind.cs | 2 - NPCs/HiveMind/HiveMindP2.cs | 2 - NPCs/Leviathan/Leviathan.cs | 27 - NPCs/Leviathan/Siren.cs | 28 - NPCs/NormalNPCs/AeroSlime.cs | 1 - NPCs/NormalNPCs/AngryDog.cs | 1 - NPCs/NormalNPCs/ArmoredDiggerBody.cs | 4 - NPCs/NormalNPCs/ArmoredDiggerHead.cs | 4 - NPCs/NormalNPCs/ArmoredDiggerTail.cs | 4 - NPCs/NormalNPCs/BlightedEye.cs | 1 - NPCs/NormalNPCs/BloomSlime.cs | 1 - NPCs/NormalNPCs/Bohldohr.cs | 1 - NPCs/NormalNPCs/CosmicElemental.cs | 1 - NPCs/NormalNPCs/CrimulanBlightSlime.cs | 2 - NPCs/NormalNPCs/CryoSlime.cs | 1 - NPCs/NormalNPCs/Cryon.cs | 1 - NPCs/NormalNPCs/EbonianBlightSlime.cs | 2 - NPCs/NormalNPCs/Eidolist.cs | 4 - NPCs/NormalNPCs/FearlessGoldfishWarrior.cs | 1 - NPCs/NormalNPCs/Frogfish.cs | 1 - NPCs/NormalNPCs/HeatSpirit.cs | 1 - NPCs/NormalNPCs/Horse.cs | 25 - NPCs/NormalNPCs/ImpiousImmolator.cs | 18 - NPCs/NormalNPCs/KingSlimeJewel.cs | 4 - NPCs/NormalNPCs/MantisShrimp.cs | 2 - NPCs/NormalNPCs/OverloadedSoldier.cs | 1 - NPCs/NormalNPCs/PerennialSlime.cs | 1 - NPCs/NormalNPCs/PhantomDebris.cs | 1 - NPCs/NormalNPCs/Pitbull.cs | 1 - NPCs/NormalNPCs/PlagueBee.cs | 6 - NPCs/NormalNPCs/PlagueBeeLarge.cs | 6 - NPCs/NormalNPCs/PlaguedDerpling.cs | 6 - NPCs/NormalNPCs/PlaguedFlyingFox.cs | 6 - NPCs/NormalNPCs/PlaguedJungleSlime.cs | 6 - NPCs/NormalNPCs/PlaguedTortoise.cs | 6 - NPCs/NormalNPCs/SandTortoise.cs | 1 - NPCs/NormalNPCs/ScornEater.cs | 18 - NPCs/NormalNPCs/SeaUrchin.cs | 1 - NPCs/NormalNPCs/StormlionCharger.cs | 1 - NPCs/NormalNPCs/SunBat.cs | 1 - NPCs/NormalNPCs/SuperDummyNPC.cs | 1 - NPCs/NormalNPCs/ThiccWaifu.cs | 2 - NPCs/NormalNPCs/WulfrumGyrator.cs | 1 - NPCs/NormalNPCs/WulfrumPylon.cs | 1 - NPCs/NormalNPCs/WulfrumRover.cs | 1 - NPCs/NormalNPCs/WulfrumSlime.cs | 1 - NPCs/OldDuke/OldDuke.cs | 4 - NPCs/OldDuke/OldDukeSharkron.cs | 4 - NPCs/OldDuke/OldDukeToothBall.cs | 4 - NPCs/Perforator/PerforatorBodyLarge.cs | 1 - NPCs/Perforator/PerforatorBodyMedium.cs | 1 - NPCs/Perforator/PerforatorBodySmall.cs | 1 - NPCs/Perforator/PerforatorHeadLarge.cs | 1 - NPCs/Perforator/PerforatorHeadMedium.cs | 1 - NPCs/Perforator/PerforatorHeadSmall.cs | 1 - NPCs/Perforator/PerforatorHive.cs | 2 - NPCs/Perforator/PerforatorTailLarge.cs | 1 - NPCs/Perforator/PerforatorTailMedium.cs | 1 - NPCs/Perforator/PerforatorTailSmall.cs | 1 - NPCs/PlaguebringerGoliath/PlagueBeeG.cs | 6 - NPCs/PlaguebringerGoliath/PlagueBeeLargeG.cs | 6 - .../PlagueHomingMissile.cs | 6 - .../PlaguebringerShade.cs | 22 - NPCs/Polterghast/PhantomFuckYou.cs | 4 - NPCs/Polterghast/PolterPhantom.cs | 15 - NPCs/Polterghast/PolterghastHook.cs | 4 - .../ProfanedGuardians/ProfanedGuardianBoss.cs | 19 - .../ProfanedGuardianBoss2.cs | 19 - .../ProfanedGuardianBoss3.cs | 19 - NPCs/Providence/ProvSpawnDefense.cs | 19 - NPCs/Providence/ProvSpawnHealer.cs | 19 - NPCs/Providence/ProvSpawnOffense.cs | 19 - NPCs/Providence/Providence.cs | 17 - NPCs/Ravager/FlamePillar.cs | 4 - NPCs/Ravager/RavagerBody.cs | 23 - NPCs/Ravager/RavagerClawLeft.cs | 23 - NPCs/Ravager/RavagerClawRight.cs | 23 - NPCs/Ravager/RavagerHead.cs | 23 - NPCs/Ravager/RavagerHead2.cs | 4 - NPCs/Ravager/RavagerLegLeft.cs | 22 - NPCs/Ravager/RavagerLegRight.cs | 22 - NPCs/Ravager/RockPillar.cs | 4 - NPCs/Signus/CosmicLantern.cs | 4 - NPCs/Signus/Signus.cs | 20 - NPCs/SlimeGod/SlimeGod.cs | 1 - NPCs/SlimeGod/SlimeGodCore.cs | 2 - NPCs/SlimeGod/SlimeGodRun.cs | 1 - NPCs/SlimeGod/SlimeGodRunSplit.cs | 1 - NPCs/SlimeGod/SlimeGodSplit.cs | 1 - NPCs/StormWeaver/StormWeaverBody.cs | 4 - NPCs/StormWeaver/StormWeaverBodyNaked.cs | 4 - NPCs/StormWeaver/StormWeaverHead.cs | 4 - NPCs/StormWeaver/StormWeaverHeadNaked.cs | 4 - NPCs/StormWeaver/StormWeaverTail.cs | 4 - NPCs/StormWeaver/StormWeaverTailNaked.cs | 4 - NPCs/SulphurousSea/AnthozoanCrab.cs | 4 - NPCs/SulphurousSea/BelchingCoral.cs | 4 - NPCs/SulphurousSea/Catfish.cs | 4 - NPCs/SulphurousSea/Flounder.cs | 4 - NPCs/SulphurousSea/Gnasher.cs | 4 - NPCs/SulphurousSea/Mauler.cs | 4 - NPCs/SulphurousSea/MicrobialCluster.cs | 4 - NPCs/SulphurousSea/Trasher.cs | 4 - NPCs/SunkenSea/GiantClam.cs | 1 - NPCs/SunkenSea/SeaSerpent1.cs | 4 - NPCs/SunkenSea/SeaSerpent2.cs | 4 - NPCs/SunkenSea/SeaSerpent3.cs | 4 - NPCs/SunkenSea/SeaSerpent4.cs | 4 - NPCs/SunkenSea/SeaSerpent5.cs | 4 - NPCs/SupremeCalamitas/SCalWormBody.cs | 4 - NPCs/SupremeCalamitas/SCalWormBodyWeak.cs | 4 - NPCs/SupremeCalamitas/SCalWormHead.cs | 4 - NPCs/SupremeCalamitas/SCalWormHeart.cs | 4 - NPCs/SupremeCalamitas/SCalWormTail.cs | 4 - NPCs/SupremeCalamitas/SoulSeekerSupreme.cs | 6 - NPCs/SupremeCalamitas/SupremeCalamitas.cs | 6 - NPCs/SupremeCalamitas/SupremeCataclysm.cs | 6 - NPCs/SupremeCalamitas/SupremeCatastrophe.cs | 6 - Utilities/NPCStats.cs | 1088 +++++++++++++++++ 231 files changed, 1153 insertions(+), 1379 deletions(-) diff --git a/CalamityLists.cs b/CalamityLists.cs index 0059b2fda1..fc8d2bff93 100644 --- a/CalamityLists.cs +++ b/CalamityLists.cs @@ -31,6 +31,7 @@ using CalamityMod.NPCs.Bumblebirb; using CalamityMod.NPCs.Calamitas; using CalamityMod.NPCs.CeaselessVoid; using CalamityMod.NPCs.Crabulon; +using CalamityMod.NPCs.Crags; using CalamityMod.NPCs.Cryogen; using CalamityMod.NPCs.DesertScourge; using CalamityMod.NPCs.DevourerofGods; @@ -77,6 +78,7 @@ namespace CalamityMod public static List projectileDestroyExceptionList; public static List projectileMinionList; public static List enemyImmunityList; + public static List confusionEnemyList; public static List dungeonEnemyBuffList; public static List dungeonProjectileBuffList; public static List bossHPScaleList; @@ -538,9 +540,44 @@ namespace CalamityMod ModContent.NPCType(), ModContent.NPCType(), ModContent.NPCType(), - ModContent.NPCType(), - ModContent.NPCType(), - ModContent.NPCType() //brothers + ModContent.NPCType() + }; + + confusionEnemyList = new List() + { + ModContent.NPCType(), + ModContent.NPCType(), + ModContent.NPCType(), + ModContent.NPCType(), + ModContent.NPCType(), + ModContent.NPCType(), + ModContent.NPCType(), + ModContent.NPCType(), + ModContent.NPCType(), + ModContent.NPCType(), + ModContent.NPCType(), + ModContent.NPCType(), + ModContent.NPCType(), + ModContent.NPCType(), + ModContent.NPCType(), + ModContent.NPCType(), + ModContent.NPCType(), + ModContent.NPCType(), + ModContent.NPCType(), + ModContent.NPCType(), + ModContent.NPCType(), + ModContent.NPCType(), + ModContent.NPCType(), + ModContent.NPCType(), + ModContent.NPCType(), + ModContent.NPCType(), + ModContent.NPCType(), + ModContent.NPCType(), + ModContent.NPCType(), + ModContent.NPCType(), + ModContent.NPCType(), + ModContent.NPCType(), + ModContent.NPCType() }; dungeonEnemyBuffList = new List() @@ -2215,6 +2252,7 @@ namespace CalamityMod projectileDestroyExceptionList = null; projectileMinionList = null; enemyImmunityList = null; + confusionEnemyList = null; dungeonEnemyBuffList = null; dungeonProjectileBuffList = null; bossHPScaleList = null; diff --git a/NPCs/Abyss/Bloatfish.cs b/NPCs/Abyss/Bloatfish.cs index a1e0cb381f..537940fb80 100644 --- a/NPCs/Abyss/Bloatfish.cs +++ b/NPCs/Abyss/Bloatfish.cs @@ -31,7 +31,6 @@ namespace CalamityMod.NPCs.Abyss npc.aiStyle = -1; aiType = -1; npc.value = Item.buyPrice(0, 0, 30, 0); - npc.buffImmune[ModContent.BuffType()] = true; npc.HitSound = SoundID.NPCHit1; npc.DeathSound = SoundID.NPCDeath1; npc.knockBackResist = 0.9f; diff --git a/NPCs/Abyss/BobbitWormHead.cs b/NPCs/Abyss/BobbitWormHead.cs index 74d0dd4506..667253aff3 100644 --- a/NPCs/Abyss/BobbitWormHead.cs +++ b/NPCs/Abyss/BobbitWormHead.cs @@ -37,7 +37,6 @@ namespace CalamityMod.NPCs.Abyss aiType = -1; npc.noGravity = true; npc.value = Item.buyPrice(0, 0, 50, 0); - npc.buffImmune[ModContent.BuffType()] = true; npc.HitSound = SoundID.NPCHit1; npc.DeathSound = SoundID.NPCDeath1; banner = npc.type; diff --git a/NPCs/Abyss/BoxJellyfish.cs b/NPCs/Abyss/BoxJellyfish.cs index 590f58e3c0..1100f0dea3 100644 --- a/NPCs/Abyss/BoxJellyfish.cs +++ b/NPCs/Abyss/BoxJellyfish.cs @@ -29,7 +29,6 @@ namespace CalamityMod.NPCs.Abyss npc.alpha = 20; npc.aiStyle = -1; aiType = -1; - npc.buffImmune[ModContent.BuffType()] = true; npc.value = Item.buyPrice(0, 0, 0, 80); npc.HitSound = SoundID.NPCHit25; npc.DeathSound = SoundID.NPCDeath28; diff --git a/NPCs/Abyss/ChaoticPuffer.cs b/NPCs/Abyss/ChaoticPuffer.cs index 6123f05f2b..75a83d3e33 100644 --- a/NPCs/Abyss/ChaoticPuffer.cs +++ b/NPCs/Abyss/ChaoticPuffer.cs @@ -37,7 +37,6 @@ namespace CalamityMod.NPCs.Abyss npc.aiStyle = -1; aiType = -1; npc.knockBackResist = 0f; - npc.buffImmune[ModContent.BuffType()] = true; npc.value = Item.buyPrice(0, 0, 30, 0); npc.HitSound = SoundID.NPCHit23; npc.DeathSound = SoundID.NPCDeath28; diff --git a/NPCs/Abyss/ColossalSquid.cs b/NPCs/Abyss/ColossalSquid.cs index 8fa17294b5..08fd5083bd 100644 --- a/NPCs/Abyss/ColossalSquid.cs +++ b/NPCs/Abyss/ColossalSquid.cs @@ -40,29 +40,6 @@ namespace CalamityMod.NPCs.Abyss npc.aiStyle = -1; aiType = -1; npc.knockBackResist = 0f; - for (int k = 0; k < npc.buffImmune.Length; k++) - { - npc.buffImmune[k] = true; - } - npc.buffImmune[BuffID.Ichor] = false; - npc.buffImmune[BuffID.Frostburn] = false; - npc.buffImmune[BuffID.CursedInferno] = false; - npc.buffImmune[BuffID.Daybreak] = false; - npc.buffImmune[BuffID.StardustMinionBleed] = false; - npc.buffImmune[BuffID.DryadsWardDebuff] = false; - npc.buffImmune[BuffID.Oiled] = false; - npc.buffImmune[BuffID.BetsysCurse] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; npc.timeLeft = NPC.activeTime * 30; npc.value = Item.buyPrice(0, 25, 0, 0); npc.HitSound = SoundID.NPCHit20; diff --git a/NPCs/Abyss/Cuttlefish.cs b/NPCs/Abyss/Cuttlefish.cs index 6d0bc891d2..f8fea7f814 100644 --- a/NPCs/Abyss/Cuttlefish.cs +++ b/NPCs/Abyss/Cuttlefish.cs @@ -33,7 +33,6 @@ namespace CalamityMod.NPCs.Abyss npc.lifeMax = 110; npc.aiStyle = -1; aiType = -1; - npc.buffImmune[ModContent.BuffType()] = true; npc.value = Item.buyPrice(0, 0, 1, 0); npc.HitSound = SoundID.NPCHit33; npc.DeathSound = SoundID.NPCDeath28; diff --git a/NPCs/Abyss/DevilFish.cs b/NPCs/Abyss/DevilFish.cs index 99bcd3e0ad..1486c53866 100644 --- a/NPCs/Abyss/DevilFish.cs +++ b/NPCs/Abyss/DevilFish.cs @@ -37,7 +37,6 @@ namespace CalamityMod.NPCs.Abyss npc.lifeMax = 400; npc.aiStyle = -1; aiType = -1; - npc.buffImmune[ModContent.BuffType()] = true; npc.value = Item.buyPrice(0, 0, 10, 0); npc.HitSound = SoundID.NPCHit4; npc.DeathSound = SoundID.NPCDeath1; diff --git a/NPCs/Abyss/DevilFishAlt.cs b/NPCs/Abyss/DevilFishAlt.cs index 9f4c7ea7ac..5e3c4ae2bb 100644 --- a/NPCs/Abyss/DevilFishAlt.cs +++ b/NPCs/Abyss/DevilFishAlt.cs @@ -37,7 +37,6 @@ namespace CalamityMod.NPCs.Abyss npc.lifeMax = 400; npc.aiStyle = -1; aiType = -1; - npc.buffImmune[ModContent.BuffType()] = true; npc.value = Item.buyPrice(0, 0, 10, 0); npc.HitSound = SoundID.NPCHit4; npc.DeathSound = SoundID.NPCDeath1; diff --git a/NPCs/Abyss/EidolonWyrmBody.cs b/NPCs/Abyss/EidolonWyrmBody.cs index d40716902b..ce21d46ffc 100644 --- a/NPCs/Abyss/EidolonWyrmBody.cs +++ b/NPCs/Abyss/EidolonWyrmBody.cs @@ -26,10 +26,6 @@ namespace CalamityMod.NPCs.Abyss aiType = -1; //new npc.knockBackResist = 0f; npc.alpha = 255; - for (int k = 0; k < npc.buffImmune.Length; k++) - { - npc.buffImmune[k] = true; - } npc.behindTiles = true; npc.noGravity = true; npc.noTileCollide = true; diff --git a/NPCs/Abyss/EidolonWyrmBodyAlt.cs b/NPCs/Abyss/EidolonWyrmBodyAlt.cs index a5f31a94cb..3b4ca6500b 100644 --- a/NPCs/Abyss/EidolonWyrmBodyAlt.cs +++ b/NPCs/Abyss/EidolonWyrmBodyAlt.cs @@ -26,10 +26,6 @@ namespace CalamityMod.NPCs.Abyss aiType = -1; //new npc.knockBackResist = 0f; npc.alpha = 255; - for (int k = 0; k < npc.buffImmune.Length; k++) - { - npc.buffImmune[k] = true; - } npc.behindTiles = true; npc.noGravity = true; npc.noTileCollide = true; diff --git a/NPCs/Abyss/EidolonWyrmBodyAltHuge.cs b/NPCs/Abyss/EidolonWyrmBodyAltHuge.cs index 2b2d3ab1d3..3f09a4d4ca 100644 --- a/NPCs/Abyss/EidolonWyrmBodyAltHuge.cs +++ b/NPCs/Abyss/EidolonWyrmBodyAltHuge.cs @@ -26,10 +26,6 @@ namespace CalamityMod.NPCs.Abyss aiType = -1; //new npc.knockBackResist = 0f; npc.alpha = 255; - for (int k = 0; k < npc.buffImmune.Length; k++) - { - npc.buffImmune[k] = true; - } npc.behindTiles = true; npc.noGravity = true; npc.noTileCollide = true; diff --git a/NPCs/Abyss/EidolonWyrmBodyHuge.cs b/NPCs/Abyss/EidolonWyrmBodyHuge.cs index 69dd451024..ea1e2be1ac 100644 --- a/NPCs/Abyss/EidolonWyrmBodyHuge.cs +++ b/NPCs/Abyss/EidolonWyrmBodyHuge.cs @@ -26,10 +26,6 @@ namespace CalamityMod.NPCs.Abyss aiType = -1; //new npc.knockBackResist = 0f; npc.alpha = 255; - for (int k = 0; k < npc.buffImmune.Length; k++) - { - npc.buffImmune[k] = true; - } npc.behindTiles = true; npc.noGravity = true; npc.noTileCollide = true; diff --git a/NPCs/Abyss/EidolonWyrmHead.cs b/NPCs/Abyss/EidolonWyrmHead.cs index 3a78cfec9a..0828cbe6f0 100644 --- a/NPCs/Abyss/EidolonWyrmHead.cs +++ b/NPCs/Abyss/EidolonWyrmHead.cs @@ -44,10 +44,6 @@ namespace CalamityMod.NPCs.Abyss npc.lifeMax = 160000; npc.aiStyle = -1; aiType = -1; - for (int k = 0; k < npc.buffImmune.Length; k++) - { - npc.buffImmune[k] = true; - } npc.knockBackResist = 0f; npc.value = Item.buyPrice(0, 25, 0, 0); npc.behindTiles = true; diff --git a/NPCs/Abyss/EidolonWyrmHeadHuge.cs b/NPCs/Abyss/EidolonWyrmHeadHuge.cs index 153ce8ab61..31d762ad5f 100644 --- a/NPCs/Abyss/EidolonWyrmHeadHuge.cs +++ b/NPCs/Abyss/EidolonWyrmHeadHuge.cs @@ -45,10 +45,6 @@ namespace CalamityMod.NPCs.Abyss npc.lifeMax = 1000000; npc.aiStyle = -1; aiType = -1; - for (int k = 0; k < npc.buffImmune.Length; k++) - { - npc.buffImmune[k] = true; - } npc.knockBackResist = 0f; npc.value = Item.buyPrice(10, 0, 0, 0); npc.behindTiles = true; diff --git a/NPCs/Abyss/EidolonWyrmTail.cs b/NPCs/Abyss/EidolonWyrmTail.cs index f8e6ce9535..92957f8c49 100644 --- a/NPCs/Abyss/EidolonWyrmTail.cs +++ b/NPCs/Abyss/EidolonWyrmTail.cs @@ -25,10 +25,6 @@ namespace CalamityMod.NPCs.Abyss aiType = -1; //new npc.knockBackResist = 0f; npc.alpha = 255; - for (int k = 0; k < npc.buffImmune.Length; k++) - { - npc.buffImmune[k] = true; - } npc.behindTiles = true; npc.noGravity = true; npc.noTileCollide = true; diff --git a/NPCs/Abyss/EidolonWyrmTailHuge.cs b/NPCs/Abyss/EidolonWyrmTailHuge.cs index c77d688ed9..88f1e10c25 100644 --- a/NPCs/Abyss/EidolonWyrmTailHuge.cs +++ b/NPCs/Abyss/EidolonWyrmTailHuge.cs @@ -25,10 +25,6 @@ namespace CalamityMod.NPCs.Abyss aiType = -1; //new npc.knockBackResist = 0f; npc.alpha = 255; - for (int k = 0; k < npc.buffImmune.Length; k++) - { - npc.buffImmune[k] = true; - } npc.behindTiles = true; npc.noGravity = true; npc.noTileCollide = true; diff --git a/NPCs/Abyss/GiantSquid.cs b/NPCs/Abyss/GiantSquid.cs index bb8aef786b..2a597eb479 100644 --- a/NPCs/Abyss/GiantSquid.cs +++ b/NPCs/Abyss/GiantSquid.cs @@ -35,7 +35,6 @@ namespace CalamityMod.NPCs.Abyss npc.lifeMax = 800; npc.aiStyle = -1; aiType = -1; - npc.buffImmune[ModContent.BuffType()] = true; npc.value = Item.buyPrice(0, 0, 15, 0); npc.HitSound = SoundID.NPCHit1; npc.DeathSound = SoundID.NPCDeath1; diff --git a/NPCs/Abyss/GulperEelBody.cs b/NPCs/Abyss/GulperEelBody.cs index 2692e09eac..6a589801fd 100644 --- a/NPCs/Abyss/GulperEelBody.cs +++ b/NPCs/Abyss/GulperEelBody.cs @@ -26,10 +26,6 @@ namespace CalamityMod.NPCs.Abyss aiType = -1; //new npc.knockBackResist = 0f; npc.alpha = 255; - for (int k = 0; k < npc.buffImmune.Length; k++) - { - npc.buffImmune[k] = true; - } npc.behindTiles = true; npc.noGravity = true; npc.noTileCollide = true; diff --git a/NPCs/Abyss/GulperEelBodyAlt.cs b/NPCs/Abyss/GulperEelBodyAlt.cs index 9c1ebce707..15d77bb456 100644 --- a/NPCs/Abyss/GulperEelBodyAlt.cs +++ b/NPCs/Abyss/GulperEelBodyAlt.cs @@ -26,10 +26,6 @@ namespace CalamityMod.NPCs.Abyss aiType = -1; //new npc.knockBackResist = 0f; npc.alpha = 255; - for (int k = 0; k < npc.buffImmune.Length; k++) - { - npc.buffImmune[k] = true; - } npc.behindTiles = true; npc.noGravity = true; npc.noTileCollide = true; diff --git a/NPCs/Abyss/GulperEelHead.cs b/NPCs/Abyss/GulperEelHead.cs index a88b658039..6d6415b79e 100644 --- a/NPCs/Abyss/GulperEelHead.cs +++ b/NPCs/Abyss/GulperEelHead.cs @@ -39,10 +39,6 @@ namespace CalamityMod.NPCs.Abyss npc.lifeMax = 60000; npc.aiStyle = -1; aiType = -1; - for (int k = 0; k < npc.buffImmune.Length; k++) - { - npc.buffImmune[k] = true; - } npc.knockBackResist = 0f; npc.value = Item.buyPrice(0, 0, 50, 0); npc.behindTiles = true; diff --git a/NPCs/Abyss/GulperEelTail.cs b/NPCs/Abyss/GulperEelTail.cs index f1441a9e16..c344e5b3a3 100644 --- a/NPCs/Abyss/GulperEelTail.cs +++ b/NPCs/Abyss/GulperEelTail.cs @@ -26,10 +26,6 @@ namespace CalamityMod.NPCs.Abyss aiType = -1; //new npc.knockBackResist = 0f; npc.alpha = 255; - for (int k = 0; k < npc.buffImmune.Length; k++) - { - npc.buffImmune[k] = true; - } npc.behindTiles = true; npc.noGravity = true; npc.noTileCollide = true; diff --git a/NPCs/Abyss/Laserfish.cs b/NPCs/Abyss/Laserfish.cs index b5b092a738..cede8f6696 100644 --- a/NPCs/Abyss/Laserfish.cs +++ b/NPCs/Abyss/Laserfish.cs @@ -30,7 +30,6 @@ namespace CalamityMod.NPCs.Abyss npc.lifeMax = 480; npc.aiStyle = -1; aiType = -1; - npc.buffImmune[ModContent.BuffType()] = true; npc.value = Item.buyPrice(0, 0, 10, 0); npc.HitSound = SoundID.NPCHit51; npc.DeathSound = SoundID.NPCDeath26; diff --git a/NPCs/Abyss/LuminousCorvina.cs b/NPCs/Abyss/LuminousCorvina.cs index 59e076a113..4a8efea776 100644 --- a/NPCs/Abyss/LuminousCorvina.cs +++ b/NPCs/Abyss/LuminousCorvina.cs @@ -36,7 +36,6 @@ namespace CalamityMod.NPCs.Abyss npc.lifeMax = 800; npc.aiStyle = -1; aiType = -1; - npc.buffImmune[ModContent.BuffType()] = true; npc.value = Item.buyPrice(0, 0, 15, 0); npc.HitSound = SoundID.NPCHit1; npc.DeathSound = SoundID.NPCDeath1; diff --git a/NPCs/Abyss/MirageJelly.cs b/NPCs/Abyss/MirageJelly.cs index b4701b7713..371ba96524 100644 --- a/NPCs/Abyss/MirageJelly.cs +++ b/NPCs/Abyss/MirageJelly.cs @@ -38,7 +38,6 @@ namespace CalamityMod.NPCs.Abyss npc.aiStyle = -1; aiType = -1; npc.knockBackResist = 0f; - npc.buffImmune[ModContent.BuffType()] = true; npc.value = Item.buyPrice(0, 0, 25, 0); npc.HitSound = SoundID.NPCHit25; npc.DeathSound = SoundID.NPCDeath28; diff --git a/NPCs/Abyss/MorayEel.cs b/NPCs/Abyss/MorayEel.cs index 97d594c28d..0af989517b 100644 --- a/NPCs/Abyss/MorayEel.cs +++ b/NPCs/Abyss/MorayEel.cs @@ -26,7 +26,6 @@ namespace CalamityMod.NPCs.Abyss npc.lifeMax = 360; npc.aiStyle = -1; aiType = -1; - npc.buffImmune[ModContent.BuffType()] = true; npc.value = Item.buyPrice(0, 0, 1, 0); npc.HitSound = SoundID.NPCHit1; npc.DeathSound = SoundID.NPCDeath1; diff --git a/NPCs/Abyss/OarfishBody.cs b/NPCs/Abyss/OarfishBody.cs index 5daa4643a8..7b225d713f 100644 --- a/NPCs/Abyss/OarfishBody.cs +++ b/NPCs/Abyss/OarfishBody.cs @@ -24,10 +24,6 @@ namespace CalamityMod.NPCs.Abyss aiType = -1; //new npc.knockBackResist = 0f; npc.alpha = 255; - for (int k = 0; k < npc.buffImmune.Length; k++) - { - npc.buffImmune[k] = true; - } npc.behindTiles = true; npc.noGravity = true; npc.noTileCollide = true; diff --git a/NPCs/Abyss/OarfishHead.cs b/NPCs/Abyss/OarfishHead.cs index 7cf4cd66f4..1c9cfdd3b7 100644 --- a/NPCs/Abyss/OarfishHead.cs +++ b/NPCs/Abyss/OarfishHead.cs @@ -36,10 +36,6 @@ namespace CalamityMod.NPCs.Abyss npc.lifeMax = 4000; npc.aiStyle = -1; aiType = -1; - for (int k = 0; k < npc.buffImmune.Length; k++) - { - npc.buffImmune[k] = true; - } npc.knockBackResist = 0f; npc.value = Item.buyPrice(0, 0, 10, 0); npc.behindTiles = true; diff --git a/NPCs/Abyss/OarfishTail.cs b/NPCs/Abyss/OarfishTail.cs index 89a90fa4f0..0e670a7e1b 100644 --- a/NPCs/Abyss/OarfishTail.cs +++ b/NPCs/Abyss/OarfishTail.cs @@ -24,10 +24,6 @@ namespace CalamityMod.NPCs.Abyss aiType = -1; //new npc.knockBackResist = 0f; npc.alpha = 255; - for (int k = 0; k < npc.buffImmune.Length; k++) - { - npc.buffImmune[k] = true; - } npc.behindTiles = true; npc.noGravity = true; npc.noTileCollide = true; diff --git a/NPCs/Abyss/Reaper.cs b/NPCs/Abyss/Reaper.cs index 5a4f85ce2e..e14fbf4967 100644 --- a/NPCs/Abyss/Reaper.cs +++ b/NPCs/Abyss/Reaper.cs @@ -41,29 +41,6 @@ namespace CalamityMod.NPCs.Abyss npc.lifeMax = 190000; npc.aiStyle = -1; aiType = -1; - for (int k = 0; k < npc.buffImmune.Length; k++) - { - npc.buffImmune[k] = true; - } - npc.buffImmune[BuffID.Ichor] = false; - npc.buffImmune[BuffID.Frostburn] = false; - npc.buffImmune[BuffID.CursedInferno] = false; - npc.buffImmune[BuffID.Daybreak] = false; - npc.buffImmune[BuffID.StardustMinionBleed] = false; - npc.buffImmune[BuffID.DryadsWardDebuff] = false; - npc.buffImmune[BuffID.Oiled] = false; - npc.buffImmune[BuffID.BetsysCurse] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; npc.timeLeft = NPC.activeTime * 30; npc.value = Item.buyPrice(0, 25, 0, 0); npc.HitSound = SoundID.NPCHit56; diff --git a/NPCs/Abyss/ToxicMinnow.cs b/NPCs/Abyss/ToxicMinnow.cs index e29963bdc8..6f445e1fe4 100644 --- a/NPCs/Abyss/ToxicMinnow.cs +++ b/NPCs/Abyss/ToxicMinnow.cs @@ -33,7 +33,6 @@ namespace CalamityMod.NPCs.Abyss npc.aiStyle = -1; aiType = -1; npc.value = Item.buyPrice(0, 0, 5, 0); - npc.buffImmune[ModContent.BuffType()] = true; npc.HitSound = SoundID.NPCHit1; npc.DeathSound = SoundID.NPCDeath1; npc.knockBackResist = 0.15f; diff --git a/NPCs/Abyss/Viperfish.cs b/NPCs/Abyss/Viperfish.cs index bb1bb3572a..21319f18b7 100644 --- a/NPCs/Abyss/Viperfish.cs +++ b/NPCs/Abyss/Viperfish.cs @@ -31,7 +31,6 @@ namespace CalamityMod.NPCs.Abyss npc.lifeMax = 320; npc.aiStyle = -1; aiType = -1; - npc.buffImmune[ModContent.BuffType()] = true; npc.value = Item.buyPrice(0, 0, 5, 0); npc.HitSound = SoundID.NPCHit1; npc.DeathSound = SoundID.NPCDeath1; diff --git a/NPCs/AcidRain/AcidEel.cs b/NPCs/AcidRain/AcidEel.cs index 33d50d8057..d50512893d 100644 --- a/NPCs/AcidRain/AcidEel.cs +++ b/NPCs/AcidRain/AcidEel.cs @@ -46,10 +46,6 @@ namespace CalamityMod.NPCs.AcidRain } npc.value = Item.buyPrice(0, 0, 3, 32); - for (int k = 0; k < npc.buffImmune.Length; k++) - { - npc.buffImmune[k] = true; - } npc.aiStyle = -1; aiType = -1; npc.lavaImmune = false; diff --git a/NPCs/AcidRain/BloodwormFleeing.cs b/NPCs/AcidRain/BloodwormFleeing.cs index 8e37e3e65b..3c0567b6af 100644 --- a/NPCs/AcidRain/BloodwormFleeing.cs +++ b/NPCs/AcidRain/BloodwormFleeing.cs @@ -21,10 +21,6 @@ namespace CalamityMod.NPCs.AcidRain npc.defense = 0; npc.lifeMax = 5; npc.knockBackResist = 0f; - for (int k = 0; k < npc.buffImmune.Length; k++) - { - npc.buffImmune[k] = true; - } npc.lavaImmune = true; npc.noGravity = true; npc.noTileCollide = true; diff --git a/NPCs/AcidRain/BloodwormNormal.cs b/NPCs/AcidRain/BloodwormNormal.cs index a7af8f89ac..04cefb237b 100644 --- a/NPCs/AcidRain/BloodwormNormal.cs +++ b/NPCs/AcidRain/BloodwormNormal.cs @@ -23,10 +23,6 @@ namespace CalamityMod.NPCs.AcidRain npc.defense = 0; npc.lifeMax = 5; npc.knockBackResist = 0f; - for (int k = 0; k < npc.buffImmune.Length; k++) - { - npc.buffImmune[k] = true; - } npc.lavaImmune = false; npc.noGravity = false; npc.noTileCollide = false; diff --git a/NPCs/AcidRain/CragmawMire.cs b/NPCs/AcidRain/CragmawMire.cs index cf1e8b74c0..9d34066ccb 100644 --- a/NPCs/AcidRain/CragmawMire.cs +++ b/NPCs/AcidRain/CragmawMire.cs @@ -44,10 +44,6 @@ namespace CalamityMod.NPCs.AcidRain npc.knockBackResist = 0f; npc.value = Item.buyPrice(0, 3, 60, 0); - for (int k = 0; k < npc.buffImmune.Length; k++) - { - npc.buffImmune[k] = true; - } npc.lavaImmune = false; npc.noGravity = false; npc.noTileCollide = false; diff --git a/NPCs/AcidRain/FlakBaby.cs b/NPCs/AcidRain/FlakBaby.cs index 9571742f06..bfbeb4f625 100644 --- a/NPCs/AcidRain/FlakBaby.cs +++ b/NPCs/AcidRain/FlakBaby.cs @@ -28,10 +28,6 @@ namespace CalamityMod.NPCs.AcidRain npc.lifeMax = 5; npc.defense = 5; - for (int k = 0; k < npc.buffImmune.Length; k++) - { - npc.buffImmune[k] = true; - } npc.value = Item.buyPrice(0, 0, 5, 55); npc.lavaImmune = true; npc.noGravity = false; diff --git a/NPCs/AcidRain/FlakCrab.cs b/NPCs/AcidRain/FlakCrab.cs index 5ef1001c53..a599bffc02 100644 --- a/NPCs/AcidRain/FlakCrab.cs +++ b/NPCs/AcidRain/FlakCrab.cs @@ -37,10 +37,6 @@ namespace CalamityMod.NPCs.AcidRain } npc.knockBackResist = 0f; - for (int k = 0; k < npc.buffImmune.Length; k++) - { - npc.buffImmune[k] = true; - } npc.value = Item.buyPrice(0, 0, 5, 55); npc.lavaImmune = true; npc.noGravity = false; diff --git a/NPCs/AcidRain/GammaSlime.cs b/NPCs/AcidRain/GammaSlime.cs index d15be6cbe3..299cd55a6e 100644 --- a/NPCs/AcidRain/GammaSlime.cs +++ b/NPCs/AcidRain/GammaSlime.cs @@ -43,10 +43,6 @@ namespace CalamityMod.NPCs.AcidRain npc.knockBackResist = 0f; animationType = NPCID.CorruptSlime; - for (int k = 0; k < npc.buffImmune.Length; k++) - { - npc.buffImmune[k] = true; - } npc.value = Item.buyPrice(0, 0, 8, 30); npc.alpha = 50; npc.lavaImmune = false; diff --git a/NPCs/AcidRain/IrradiatedSlime.cs b/NPCs/AcidRain/IrradiatedSlime.cs index 6dcbe3ba37..22c2f99d1a 100644 --- a/NPCs/AcidRain/IrradiatedSlime.cs +++ b/NPCs/AcidRain/IrradiatedSlime.cs @@ -31,10 +31,7 @@ namespace CalamityMod.NPCs.AcidRain npc.knockBackResist = 0f; animationType = NPCID.CorruptSlime; - for (int k = 0; k < npc.buffImmune.Length; k++) - { - npc.buffImmune[k] = true; - } + aiType = NPCID.ToxicSludge; npc.value = Item.buyPrice(0, 0, 5, 0); npc.alpha = 50; npc.lavaImmune = false; @@ -49,11 +46,13 @@ namespace CalamityMod.NPCs.AcidRain public override void SendExtraAI(BinaryWriter writer) { writer.Write(Falling); + writer.Write(npc.aiStyle); } public override void ReceiveExtraAI(BinaryReader reader) { Falling = reader.ReadBoolean(); + npc.aiStyle = reader.ReadInt32(); } public override void AI() @@ -80,7 +79,6 @@ namespace CalamityMod.NPCs.AcidRain else { npc.aiStyle = 1; - aiType = NPCID.ToxicSludge; } } diff --git a/NPCs/AcidRain/NuclearTerror.cs b/NPCs/AcidRain/NuclearTerror.cs index 4601994f93..6bbf7312bf 100644 --- a/NPCs/AcidRain/NuclearTerror.cs +++ b/NPCs/AcidRain/NuclearTerror.cs @@ -50,10 +50,6 @@ namespace CalamityMod.NPCs.AcidRain npc.knockBackResist = 0f; npc.value = Item.buyPrice(0, 20, 0, 0); - for (int k = 0; k < npc.buffImmune.Length; k++) - { - npc.buffImmune[k] = true; - } npc.DR_NERD(0.3f); npc.lavaImmune = false; npc.noGravity = false; diff --git a/NPCs/AcidRain/NuclearToad.cs b/NPCs/AcidRain/NuclearToad.cs index a85ea6b918..dcd092969a 100644 --- a/NPCs/AcidRain/NuclearToad.cs +++ b/NPCs/AcidRain/NuclearToad.cs @@ -44,10 +44,6 @@ namespace CalamityMod.NPCs.AcidRain npc.knockBackResist = 0.7f; npc.value = Item.buyPrice(0, 0, 5, 0); - for (int k = 0; k < npc.buffImmune.Length; k++) - { - npc.buffImmune[k] = true; - } npc.lavaImmune = false; npc.noGravity = true; npc.noTileCollide = false; diff --git a/NPCs/AcidRain/Orthocera.cs b/NPCs/AcidRain/Orthocera.cs index 124863ada8..0e34e7a0a5 100644 --- a/NPCs/AcidRain/Orthocera.cs +++ b/NPCs/AcidRain/Orthocera.cs @@ -40,10 +40,6 @@ namespace CalamityMod.NPCs.AcidRain } npc.knockBackResist = 0.6f; - for (int k = 0; k < npc.buffImmune.Length; k++) - { - npc.buffImmune[k] = true; - } npc.value = Item.buyPrice(0, 0, 4, 20); npc.lavaImmune = false; npc.noGravity = true; diff --git a/NPCs/AcidRain/Radiator.cs b/NPCs/AcidRain/Radiator.cs index 417b858238..d28a1a0a10 100644 --- a/NPCs/AcidRain/Radiator.cs +++ b/NPCs/AcidRain/Radiator.cs @@ -41,10 +41,6 @@ namespace CalamityMod.NPCs.AcidRain } npc.knockBackResist = 0f; - for (int k = 0; k < npc.buffImmune.Length; k++) - { - npc.buffImmune[k] = true; - } npc.value = Item.buyPrice(0, 0, 5, 0); npc.lavaImmune = false; npc.noGravity = false; diff --git a/NPCs/AcidRain/Skyfin.cs b/NPCs/AcidRain/Skyfin.cs index 7a91d02ee4..8eb2ff0767 100644 --- a/NPCs/AcidRain/Skyfin.cs +++ b/NPCs/AcidRain/Skyfin.cs @@ -52,10 +52,6 @@ namespace CalamityMod.NPCs.AcidRain } npc.value = Item.buyPrice(0, 0, 3, 65); - for (int k = 0; k < npc.buffImmune.Length; k++) - { - npc.buffImmune[k] = true; - } npc.lavaImmune = false; npc.noGravity = true; npc.HitSound = SoundID.NPCHit1; diff --git a/NPCs/AcidRain/SulfurousSkater.cs b/NPCs/AcidRain/SulfurousSkater.cs index 6bff91553e..2847e6cea1 100644 --- a/NPCs/AcidRain/SulfurousSkater.cs +++ b/NPCs/AcidRain/SulfurousSkater.cs @@ -55,10 +55,6 @@ namespace CalamityMod.NPCs.AcidRain npc.knockBackResist = 0.8f; npc.value = Item.buyPrice(0, 0, 5, 25); - for (int k = 0; k < npc.buffImmune.Length; k++) - { - npc.buffImmune[k] = true; - } npc.lavaImmune = false; npc.noGravity = true; npc.noTileCollide = false; diff --git a/NPCs/AcidRain/Trilobite.cs b/NPCs/AcidRain/Trilobite.cs index 4475c64172..ee1f397bdb 100644 --- a/NPCs/AcidRain/Trilobite.cs +++ b/NPCs/AcidRain/Trilobite.cs @@ -46,10 +46,6 @@ namespace CalamityMod.NPCs.AcidRain npc.knockBackResist = 0.2f; npc.value = Item.buyPrice(0, 0, 4, 0); - for (int k = 0; k < npc.buffImmune.Length; k++) - { - npc.buffImmune[k] = true; - } npc.lavaImmune = false; npc.noGravity = true; npc.noTileCollide = false; diff --git a/NPCs/AcidRain/WaterLeech.cs b/NPCs/AcidRain/WaterLeech.cs index 1e35aa3547..55e1ac8611 100644 --- a/NPCs/AcidRain/WaterLeech.cs +++ b/NPCs/AcidRain/WaterLeech.cs @@ -42,10 +42,6 @@ namespace CalamityMod.NPCs.AcidRain } npc.value = Item.buyPrice(0, 0, 2, 5); - for (int k = 0; k < npc.buffImmune.Length; k++) - { - npc.buffImmune[k] = true; - } npc.lavaImmune = false; npc.noGravity = true; npc.noTileCollide = false; diff --git a/NPCs/AquaticScourge/AquaticParasite.cs b/NPCs/AquaticScourge/AquaticParasite.cs index 80b1cf90c6..720f0b824a 100644 --- a/NPCs/AquaticScourge/AquaticParasite.cs +++ b/NPCs/AquaticScourge/AquaticParasite.cs @@ -24,10 +24,6 @@ namespace CalamityMod.NPCs.AquaticScourge npc.LifeMaxNERB(Main.hardMode ? 200 : 30); npc.aiStyle = -1; aiType = -1; - for (int k = 0; k < npc.buffImmune.Length; k++) - { - npc.buffImmune[k] = true; - } npc.value = Item.buyPrice(0, 0, 0, 60); npc.HitSound = SoundID.NPCHit1; npc.DeathSound = SoundID.NPCDeath1; diff --git a/NPCs/AquaticScourge/AquaticScourgeBody.cs b/NPCs/AquaticScourge/AquaticScourgeBody.cs index 04ee1928b8..217551fedc 100644 --- a/NPCs/AquaticScourge/AquaticScourgeBody.cs +++ b/NPCs/AquaticScourge/AquaticScourgeBody.cs @@ -29,10 +29,6 @@ namespace CalamityMod.NPCs.AquaticScourge npc.LifeMaxNERB(73000, 85000, 10000000); double HPBoost = CalamityConfig.Instance.BossHealthBoost * 0.01; npc.lifeMax += (int)(npc.lifeMax * HPBoost); - for (int k = 0; k < npc.buffImmune.Length; k++) - { - npc.buffImmune[k] = true; - } npc.behindTiles = true; npc.noGravity = true; npc.noTileCollide = true; diff --git a/NPCs/AquaticScourge/AquaticScourgeBodyAlt.cs b/NPCs/AquaticScourge/AquaticScourgeBodyAlt.cs index f5be842fa0..c7e1962ed8 100644 --- a/NPCs/AquaticScourge/AquaticScourgeBodyAlt.cs +++ b/NPCs/AquaticScourge/AquaticScourgeBodyAlt.cs @@ -29,10 +29,6 @@ namespace CalamityMod.NPCs.AquaticScourge npc.LifeMaxNERB(73000, 85000, 10000000); double HPBoost = CalamityConfig.Instance.BossHealthBoost * 0.01; npc.lifeMax += (int)(npc.lifeMax * HPBoost); - for (int k = 0; k < npc.buffImmune.Length; k++) - { - npc.buffImmune[k] = true; - } npc.behindTiles = true; npc.noGravity = true; npc.noTileCollide = true; diff --git a/NPCs/AquaticScourge/AquaticScourgeHead.cs b/NPCs/AquaticScourge/AquaticScourgeHead.cs index 48344b8fff..e663177122 100644 --- a/NPCs/AquaticScourge/AquaticScourgeHead.cs +++ b/NPCs/AquaticScourge/AquaticScourgeHead.cs @@ -45,10 +45,6 @@ namespace CalamityMod.NPCs.AquaticScourge npc.LifeMaxNERB(73000, 85000, 10000000); double HPBoost = CalamityConfig.Instance.BossHealthBoost * 0.01; npc.lifeMax += (int)(npc.lifeMax * HPBoost); - for (int k = 0; k < npc.buffImmune.Length; k++) - { - npc.buffImmune[k] = true; - } npc.knockBackResist = 0f; npc.value = Item.buyPrice(0, 12, 0, 0); npc.behindTiles = true; diff --git a/NPCs/AquaticScourge/AquaticScourgeTail.cs b/NPCs/AquaticScourge/AquaticScourgeTail.cs index e03afaad0a..11011c5002 100644 --- a/NPCs/AquaticScourge/AquaticScourgeTail.cs +++ b/NPCs/AquaticScourge/AquaticScourgeTail.cs @@ -29,10 +29,6 @@ namespace CalamityMod.NPCs.AquaticScourge npc.LifeMaxNERB(73000, 85000, 10000000); double HPBoost = CalamityConfig.Instance.BossHealthBoost * 0.01; npc.lifeMax += (int)(npc.lifeMax * HPBoost); - for (int k = 0; k < npc.buffImmune.Length; k++) - { - npc.buffImmune[k] = true; - } npc.behindTiles = true; npc.noGravity = true; npc.noTileCollide = true; diff --git a/NPCs/AquaticScourge/AquaticSeekerBody.cs b/NPCs/AquaticScourge/AquaticSeekerBody.cs index 895c5b0381..b637e9eb1f 100644 --- a/NPCs/AquaticScourge/AquaticSeekerBody.cs +++ b/NPCs/AquaticScourge/AquaticSeekerBody.cs @@ -26,10 +26,6 @@ namespace CalamityMod.NPCs.AquaticScourge aiType = -1; npc.knockBackResist = 0f; npc.alpha = 255; - for (int k = 0; k < npc.buffImmune.Length; k++) - { - npc.buffImmune[k] = true; - } npc.behindTiles = true; npc.noGravity = true; npc.noTileCollide = true; diff --git a/NPCs/AquaticScourge/AquaticSeekerHead.cs b/NPCs/AquaticScourge/AquaticSeekerHead.cs index 24a8bf14b5..1c3781b5f2 100644 --- a/NPCs/AquaticScourge/AquaticSeekerHead.cs +++ b/NPCs/AquaticScourge/AquaticSeekerHead.cs @@ -32,10 +32,6 @@ namespace CalamityMod.NPCs.AquaticScourge npc.lifeMax = Main.hardMode ? 500 : 60; npc.aiStyle = -1; aiType = -1; - for (int k = 0; k < npc.buffImmune.Length; k++) - { - npc.buffImmune[k] = true; - } npc.knockBackResist = 0f; npc.value = Item.buyPrice(0, 0, 0, 80); npc.behindTiles = true; diff --git a/NPCs/AquaticScourge/AquaticSeekerTail.cs b/NPCs/AquaticScourge/AquaticSeekerTail.cs index 11208a26b5..79ef4e517e 100644 --- a/NPCs/AquaticScourge/AquaticSeekerTail.cs +++ b/NPCs/AquaticScourge/AquaticSeekerTail.cs @@ -26,10 +26,6 @@ namespace CalamityMod.NPCs.AquaticScourge aiType = -1; npc.knockBackResist = 0f; npc.alpha = 255; - for (int k = 0; k < npc.buffImmune.Length; k++) - { - npc.buffImmune[k] = true; - } npc.behindTiles = true; npc.noGravity = true; npc.noTileCollide = true; diff --git a/NPCs/AquaticScourge/AquaticUrchin.cs b/NPCs/AquaticScourge/AquaticUrchin.cs index 2e69ec591d..18727ea594 100644 --- a/NPCs/AquaticScourge/AquaticUrchin.cs +++ b/NPCs/AquaticScourge/AquaticUrchin.cs @@ -25,10 +25,6 @@ namespace CalamityMod.NPCs.AquaticScourge npc.defense = 10; npc.lifeMax = Main.hardMode ? 300 : 50; npc.knockBackResist = 0.8f; - for (int k = 0; k < npc.buffImmune.Length; k++) - { - npc.buffImmune[k] = true; - } npc.value = Item.buyPrice(0, 0, 0, 80); npc.HitSound = SoundID.NPCHit1; npc.DeathSound = SoundID.NPCDeath15; diff --git a/NPCs/Astral/Aries.cs b/NPCs/Astral/Aries.cs index b42a0d3920..67b239136e 100644 --- a/NPCs/Astral/Aries.cs +++ b/NPCs/Astral/Aries.cs @@ -37,7 +37,6 @@ namespace CalamityMod.NPCs.Astral npc.DeathSound = mod.GetLegacySoundSlot(SoundType.NPCKilled, "Sounds/NPCKilled/AstralEnemyDeath"); banner = npc.type; bannerItem = ModContent.ItemType(); - npc.buffImmune[ModContent.BuffType()] = true; if (CalamityWorld.downedAstrageldon) { npc.damage = 85; diff --git a/NPCs/Astral/AstralProbe.cs b/NPCs/Astral/AstralProbe.cs index ca0288334e..b6d9be2fb1 100644 --- a/NPCs/Astral/AstralProbe.cs +++ b/NPCs/Astral/AstralProbe.cs @@ -36,7 +36,6 @@ namespace CalamityMod.NPCs.Astral npc.DeathSound = SoundID.NPCDeath14; banner = npc.type; bannerItem = ModContent.ItemType(); - npc.buffImmune[ModContent.BuffType()] = true; if (CalamityWorld.downedAstrageldon) { npc.damage = 30; diff --git a/NPCs/Astral/AstralSlime.cs b/NPCs/Astral/AstralSlime.cs index 64c4d5a2f1..2150386ec4 100644 --- a/NPCs/Astral/AstralSlime.cs +++ b/NPCs/Astral/AstralSlime.cs @@ -36,7 +36,6 @@ namespace CalamityMod.NPCs.Astral animationType = NPCID.BlueSlime; banner = npc.type; bannerItem = ModContent.ItemType(); - npc.buffImmune[ModContent.BuffType()] = true; if (CalamityWorld.downedAstrageldon) { npc.damage = 65; diff --git a/NPCs/Astral/AstralachneaGround.cs b/NPCs/Astral/AstralachneaGround.cs index 9b70b290a9..49b04aa869 100644 --- a/NPCs/Astral/AstralachneaGround.cs +++ b/NPCs/Astral/AstralachneaGround.cs @@ -45,9 +45,6 @@ namespace CalamityMod.NPCs.Astral animationType = NPCID.WallCreeper; banner = npc.type; bannerItem = ModContent.ItemType(); - npc.buffImmune[ModContent.BuffType()] = true; - npc.buffImmune[BuffID.Poisoned] = true; - npc.buffImmune[BuffID.Confused] = false; if (CalamityWorld.downedAstrageldon) { npc.damage = 90; diff --git a/NPCs/Astral/AstralachneaWall.cs b/NPCs/Astral/AstralachneaWall.cs index 7a016831c3..d0db01ba81 100644 --- a/NPCs/Astral/AstralachneaWall.cs +++ b/NPCs/Astral/AstralachneaWall.cs @@ -42,13 +42,10 @@ namespace CalamityMod.NPCs.Astral npc.knockBackResist = 0f; npc.noGravity = true; npc.value = Item.buyPrice(0, 0, 20, 0); - npc.buffImmune[BuffID.Poisoned] = true; - npc.buffImmune[BuffID.Confused] = false; npc.timeLeft = NPC.activeTime * 2; animationType = NPCID.BlackRecluseWall; banner = ModContent.NPCType(); bannerItem = ModContent.ItemType(); - npc.buffImmune[ModContent.BuffType()] = true; if (CalamityWorld.downedAstrageldon) { npc.damage = 90; diff --git a/NPCs/Astral/Atlas.cs b/NPCs/Astral/Atlas.cs index 96d77b5ed7..760f94d098 100644 --- a/NPCs/Astral/Atlas.cs +++ b/NPCs/Astral/Atlas.cs @@ -115,7 +115,6 @@ namespace CalamityMod.NPCs.Astral npc.DeathSound = mod.GetLegacySoundSlot(SoundType.NPCKilled, "Sounds/NPCKilled/AtlasDeath"); banner = npc.type; bannerItem = ModContent.ItemType(); - npc.buffImmune[ModContent.BuffType()] = true; if (CalamityWorld.downedAstrageldon) { npc.damage = 100; diff --git a/NPCs/Astral/BigSightseer.cs b/NPCs/Astral/BigSightseer.cs index cb11cdb772..f0947b4215 100644 --- a/NPCs/Astral/BigSightseer.cs +++ b/NPCs/Astral/BigSightseer.cs @@ -39,7 +39,6 @@ namespace CalamityMod.NPCs.Astral npc.aiStyle = -1; banner = npc.type; bannerItem = ModContent.ItemType(); - npc.buffImmune[ModContent.BuffType()] = true; if (CalamityWorld.downedAstrageldon) { npc.damage = 85; diff --git a/NPCs/Astral/FusionFeeder.cs b/NPCs/Astral/FusionFeeder.cs index 626ed46787..8b8f519211 100644 --- a/NPCs/Astral/FusionFeeder.cs +++ b/NPCs/Astral/FusionFeeder.cs @@ -41,7 +41,6 @@ namespace CalamityMod.NPCs.Astral animationType = NPCID.SandShark; banner = npc.type; bannerItem = ModContent.ItemType(); - npc.buffImmune[ModContent.BuffType()] = true; if (CalamityWorld.downedAstrageldon) { npc.damage = 65; diff --git a/NPCs/Astral/Hadarian.cs b/NPCs/Astral/Hadarian.cs index 1e36ba89e4..41fe166b1d 100644 --- a/NPCs/Astral/Hadarian.cs +++ b/NPCs/Astral/Hadarian.cs @@ -39,7 +39,6 @@ namespace CalamityMod.NPCs.Astral npc.value = Item.buyPrice(0, 0, 15, 0); banner = npc.type; bannerItem = ModContent.ItemType(); - npc.buffImmune[ModContent.BuffType()] = true; if (CalamityWorld.downedAstrageldon) { npc.damage = 80; diff --git a/NPCs/Astral/Hive.cs b/NPCs/Astral/Hive.cs index e7c160b5d8..5079cf5f8c 100644 --- a/NPCs/Astral/Hive.cs +++ b/NPCs/Astral/Hive.cs @@ -38,7 +38,6 @@ namespace CalamityMod.NPCs.Astral npc.value = Item.buyPrice(0, 0, 15, 0); banner = npc.type; bannerItem = ModContent.ItemType(); - npc.buffImmune[ModContent.BuffType()] = true; if (CalamityWorld.downedAstrageldon) { npc.damage = 90; diff --git a/NPCs/Astral/Hiveling.cs b/NPCs/Astral/Hiveling.cs index 8ca89bb392..e578b40fa1 100644 --- a/NPCs/Astral/Hiveling.cs +++ b/NPCs/Astral/Hiveling.cs @@ -33,7 +33,6 @@ namespace CalamityMod.NPCs.Astral npc.knockBackResist = 0.5f; npc.noGravity = true; npc.value = Item.buyPrice(0, 0, 5, 0); - npc.buffImmune[ModContent.BuffType()] = true; if (CalamityWorld.downedAstrageldon) { npc.damage = 50; diff --git a/NPCs/Astral/Mantis.cs b/NPCs/Astral/Mantis.cs index c2eef587bf..b4dc0af2c4 100644 --- a/NPCs/Astral/Mantis.cs +++ b/NPCs/Astral/Mantis.cs @@ -41,7 +41,6 @@ namespace CalamityMod.NPCs.Astral npc.DeathSound = mod.GetLegacySoundSlot(SoundType.NPCKilled, "Sounds/NPCKilled/AstralEnemyDeath"); banner = npc.type; bannerItem = ModContent.ItemType(); - npc.buffImmune[ModContent.BuffType()] = true; if (CalamityWorld.downedAstrageldon) { npc.damage = 85; diff --git a/NPCs/Astral/Nova.cs b/NPCs/Astral/Nova.cs index b872bba02a..51d013c589 100644 --- a/NPCs/Astral/Nova.cs +++ b/NPCs/Astral/Nova.cs @@ -48,7 +48,6 @@ namespace CalamityMod.NPCs.Astral npc.aiStyle = -1; banner = npc.type; bannerItem = ModContent.ItemType(); - npc.buffImmune[ModContent.BuffType()] = true; if (CalamityWorld.downedAstrageldon) { npc.damage = 75; diff --git a/NPCs/Astral/SmallSightseer.cs b/NPCs/Astral/SmallSightseer.cs index d09d79a452..1e0409db31 100644 --- a/NPCs/Astral/SmallSightseer.cs +++ b/NPCs/Astral/SmallSightseer.cs @@ -39,7 +39,6 @@ namespace CalamityMod.NPCs.Astral npc.aiStyle = -1; banner = npc.type; bannerItem = ModContent.ItemType(); - npc.buffImmune[ModContent.BuffType()] = true; if (CalamityWorld.downedAstrageldon) { npc.damage = 58; diff --git a/NPCs/Astral/StellarCulex.cs b/NPCs/Astral/StellarCulex.cs index 3e1006dd62..f24a9e2a74 100644 --- a/NPCs/Astral/StellarCulex.cs +++ b/NPCs/Astral/StellarCulex.cs @@ -41,8 +41,6 @@ namespace CalamityMod.NPCs.Astral animationType = NPCID.GiantFlyingFox; banner = npc.type; bannerItem = ModContent.ItemType(); - npc.buffImmune[ModContent.BuffType()] = true; - npc.buffImmune[BuffID.Confused] = false; if (CalamityWorld.downedAstrageldon) { npc.damage = 90; diff --git a/NPCs/AstrumAureus/AstrumAureus.cs b/NPCs/AstrumAureus/AstrumAureus.cs index 0beb78092a..5b8c7641e1 100644 --- a/NPCs/AstrumAureus/AstrumAureus.cs +++ b/NPCs/AstrumAureus/AstrumAureus.cs @@ -53,33 +53,6 @@ namespace CalamityMod.NPCs.AstrumAureus aiType = -1; npc.knockBackResist = 0f; npc.value = Item.buyPrice(0, 15, 0, 0); - for (int k = 0; k < npc.buffImmune.Length; k++) - { - npc.buffImmune[k] = true; - } - npc.buffImmune[BuffID.Ichor] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[BuffID.Frostburn] = false; - npc.buffImmune[BuffID.CursedInferno] = false; - npc.buffImmune[BuffID.Daybreak] = false; - npc.buffImmune[BuffID.BetsysCurse] = false; - npc.buffImmune[BuffID.StardustMinionBleed] = false; - npc.buffImmune[BuffID.DryadsWardDebuff] = false; - npc.buffImmune[BuffID.Oiled] = false; - npc.buffImmune[BuffID.BoneJavelin] = false; - npc.buffImmune[BuffID.Venom] = false; - npc.buffImmune[BuffID.SoulDrain] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; npc.boss = true; npc.DeathSound = SoundID.NPCDeath14; Mod calamityModMusic = ModLoader.GetMod("CalamityModMusic"); diff --git a/NPCs/AstrumAureus/AureusSpawn.cs b/NPCs/AstrumAureus/AureusSpawn.cs index 86aaffac2e..fd2e802ed2 100644 --- a/NPCs/AstrumAureus/AureusSpawn.cs +++ b/NPCs/AstrumAureus/AureusSpawn.cs @@ -35,10 +35,6 @@ namespace CalamityMod.NPCs.AstrumAureus npc.lifeMax = 30000; } npc.knockBackResist = 0f; - for (int k = 0; k < npc.buffImmune.Length; k++) - { - npc.buffImmune[k] = true; - } npc.noGravity = true; npc.noTileCollide = true; npc.canGhostHeal = false; diff --git a/NPCs/AstrumDeus/AstrumDeusBodySpectral.cs b/NPCs/AstrumDeus/AstrumDeusBodySpectral.cs index 1ea01b4ab3..9c9d99c80b 100644 --- a/NPCs/AstrumDeus/AstrumDeusBodySpectral.cs +++ b/NPCs/AstrumDeus/AstrumDeusBodySpectral.cs @@ -44,10 +44,6 @@ namespace CalamityMod.NPCs.AstrumDeus npc.DeathSound = mod.GetLegacySoundSlot(SoundType.NPCKilled, "Sounds/NPCKilled/AstrumDeusDeath"); npc.netAlways = true; npc.boss = true; - for (int k = 0; k < npc.buffImmune.Length; k++) - { - npc.buffImmune[k] = true; - } Mod calamityModMusic = ModLoader.GetMod("CalamityModMusic"); if (calamityModMusic != null) music = calamityModMusic.GetSoundSlot(SoundType.Music, "Sounds/Music/AstrumDeus"); diff --git a/NPCs/AstrumDeus/AstrumDeusHeadSpectral.cs b/NPCs/AstrumDeus/AstrumDeusHeadSpectral.cs index 73fd22effb..b0ab55b865 100644 --- a/NPCs/AstrumDeus/AstrumDeusHeadSpectral.cs +++ b/NPCs/AstrumDeus/AstrumDeusHeadSpectral.cs @@ -54,10 +54,6 @@ namespace CalamityMod.NPCs.AstrumDeus npc.boss = true; npc.value = Item.buyPrice(0, 20, 0, 0); npc.alpha = 255; - for (int k = 0; k < npc.buffImmune.Length; k++) - { - npc.buffImmune[k] = true; - } npc.behindTiles = true; npc.noGravity = true; npc.noTileCollide = true; diff --git a/NPCs/AstrumDeus/AstrumDeusTailSpectral.cs b/NPCs/AstrumDeus/AstrumDeusTailSpectral.cs index f86b5797bd..752273cc37 100644 --- a/NPCs/AstrumDeus/AstrumDeusTailSpectral.cs +++ b/NPCs/AstrumDeus/AstrumDeusTailSpectral.cs @@ -44,10 +44,6 @@ namespace CalamityMod.NPCs.AstrumDeus npc.DeathSound = mod.GetLegacySoundSlot(SoundType.NPCKilled, "Sounds/NPCKilled/AstrumDeusDeath"); npc.netAlways = true; npc.boss = true; - for (int k = 0; k < npc.buffImmune.Length; k++) - { - npc.buffImmune[k] = true; - } Mod calamityModMusic = ModLoader.GetMod("CalamityModMusic"); if (calamityModMusic != null) music = calamityModMusic.GetSoundSlot(SoundType.Music, "Sounds/Music/AstrumDeus"); diff --git a/NPCs/BrimstoneElemental/Brimling.cs b/NPCs/BrimstoneElemental/Brimling.cs index 5c5a9aa996..714fef215a 100644 --- a/NPCs/BrimstoneElemental/Brimling.cs +++ b/NPCs/BrimstoneElemental/Brimling.cs @@ -36,34 +36,6 @@ namespace CalamityMod.NPCs.BrimstoneElemental npc.DR_NERD(normalDR); npc.lifeMax = 2000; npc.knockBackResist = 0f; - for (int k = 0; k < npc.buffImmune.Length; k++) - { - npc.buffImmune[k] = true; - } - npc.buffImmune[BuffID.Ichor] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[BuffID.Frostburn] = false; - npc.buffImmune[BuffID.CursedInferno] = false; - npc.buffImmune[BuffID.Daybreak] = false; - npc.buffImmune[BuffID.BetsysCurse] = false; - npc.buffImmune[BuffID.StardustMinionBleed] = false; - npc.buffImmune[BuffID.DryadsWardDebuff] = false; - npc.buffImmune[BuffID.Oiled] = false; - npc.buffImmune[BuffID.BoneJavelin] = false; - npc.buffImmune[BuffID.SoulDrain] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; npc.noGravity = true; npc.noTileCollide = true; npc.canGhostHeal = false; diff --git a/NPCs/BrimstoneElemental/BrimstoneElemental.cs b/NPCs/BrimstoneElemental/BrimstoneElemental.cs index c5aaa6f601..8dd7a5f588 100644 --- a/NPCs/BrimstoneElemental/BrimstoneElemental.cs +++ b/NPCs/BrimstoneElemental/BrimstoneElemental.cs @@ -52,34 +52,6 @@ namespace CalamityMod.NPCs.BrimstoneElemental npc.knockBackResist = 0f; npc.aiStyle = -1; aiType = -1; - for (int k = 0; k < npc.buffImmune.Length; k++) - { - npc.buffImmune[k] = true; - } - npc.buffImmune[BuffID.Ichor] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[BuffID.Frostburn] = false; - npc.buffImmune[BuffID.CursedInferno] = false; - npc.buffImmune[BuffID.Daybreak] = false; - npc.buffImmune[BuffID.BetsysCurse] = false; - npc.buffImmune[BuffID.StardustMinionBleed] = false; - npc.buffImmune[BuffID.DryadsWardDebuff] = false; - npc.buffImmune[BuffID.Oiled] = false; - npc.buffImmune[BuffID.BoneJavelin] = false; - npc.buffImmune[BuffID.SoulDrain] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; npc.boss = true; npc.noGravity = true; npc.noTileCollide = true; diff --git a/NPCs/Bumblebirb/Bumblefuck.cs b/NPCs/Bumblebirb/Bumblefuck.cs index ae5ff0c0e3..1d0d4da37d 100644 --- a/NPCs/Bumblebirb/Bumblefuck.cs +++ b/NPCs/Bumblebirb/Bumblefuck.cs @@ -51,28 +51,6 @@ namespace CalamityMod.NPCs.Bumblebirb double HPBoost = CalamityConfig.Instance.BossHealthBoost * 0.01; npc.lifeMax += (int)(npc.lifeMax * HPBoost); npc.knockBackResist = 0f; - for (int k = 0; k < npc.buffImmune.Length; k++) - { - npc.buffImmune[k] = true; - } - npc.buffImmune[BuffID.Ichor] = false; - npc.buffImmune[BuffID.CursedInferno] = false; - npc.buffImmune[BuffID.StardustMinionBleed] = false; - npc.buffImmune[BuffID.DryadsWardDebuff] = false; - npc.buffImmune[BuffID.Oiled] = false; - npc.buffImmune[BuffID.Daybreak] = false; - npc.buffImmune[BuffID.BetsysCurse] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; npc.boss = true; Mod calamityModMusic = ModLoader.GetMod("CalamityModMusic"); if (calamityModMusic != null) diff --git a/NPCs/Bumblebirb/Bumblefuck2.cs b/NPCs/Bumblebirb/Bumblefuck2.cs index 000330d5ce..657a89e5a7 100644 --- a/NPCs/Bumblebirb/Bumblefuck2.cs +++ b/NPCs/Bumblebirb/Bumblefuck2.cs @@ -32,28 +32,6 @@ namespace CalamityMod.NPCs.Bumblebirb npc.defense = 20; npc.LifeMaxNERB(9000, 11250, 50000); // Old HP - 12000, 15000 npc.knockBackResist = 0f; - for (int k = 0; k < npc.buffImmune.Length; k++) - { - npc.buffImmune[k] = true; - } - npc.buffImmune[BuffID.Ichor] = false; - npc.buffImmune[BuffID.CursedInferno] = false; - npc.buffImmune[BuffID.StardustMinionBleed] = false; - npc.buffImmune[BuffID.DryadsWardDebuff] = false; - npc.buffImmune[BuffID.Oiled] = false; - npc.buffImmune[BuffID.Daybreak] = false; - npc.buffImmune[BuffID.BetsysCurse] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; npc.lavaImmune = true; npc.noGravity = true; npc.canGhostHeal = false; diff --git a/NPCs/Calamitas/Calamitas.cs b/NPCs/Calamitas/Calamitas.cs index 4d94d5cb37..d882d53d42 100644 --- a/NPCs/Calamitas/Calamitas.cs +++ b/NPCs/Calamitas/Calamitas.cs @@ -42,34 +42,6 @@ namespace CalamityMod.NPCs.Calamitas npc.aiStyle = -1; aiType = -1; npc.knockBackResist = 0f; - for (int k = 0; k < npc.buffImmune.Length; k++) - { - npc.buffImmune[k] = true; - } - npc.buffImmune[BuffID.Ichor] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[BuffID.Frostburn] = false; - npc.buffImmune[BuffID.CursedInferno] = false; - npc.buffImmune[BuffID.Daybreak] = false; - npc.buffImmune[BuffID.BetsysCurse] = false; - npc.buffImmune[BuffID.StardustMinionBleed] = false; - npc.buffImmune[BuffID.DryadsWardDebuff] = false; - npc.buffImmune[BuffID.Oiled] = false; - npc.buffImmune[BuffID.BoneJavelin] = false; - npc.buffImmune[BuffID.SoulDrain] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; npc.boss = true; npc.noGravity = true; npc.noTileCollide = true; diff --git a/NPCs/Calamitas/CalamitasRun.cs b/NPCs/Calamitas/CalamitasRun.cs index 86c4143930..151abbd645 100644 --- a/NPCs/Calamitas/CalamitasRun.cs +++ b/NPCs/Calamitas/CalamitasRun.cs @@ -42,34 +42,6 @@ namespace CalamityMod.NPCs.Calamitas npc.aiStyle = -1; aiType = -1; npc.knockBackResist = 0f; - for (int k = 0; k < npc.buffImmune.Length; k++) - { - npc.buffImmune[k] = true; - } - npc.buffImmune[BuffID.Ichor] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[BuffID.Frostburn] = false; - npc.buffImmune[BuffID.CursedInferno] = false; - npc.buffImmune[BuffID.Daybreak] = false; - npc.buffImmune[BuffID.BetsysCurse] = false; - npc.buffImmune[BuffID.StardustMinionBleed] = false; - npc.buffImmune[BuffID.DryadsWardDebuff] = false; - npc.buffImmune[BuffID.Oiled] = false; - npc.buffImmune[BuffID.BoneJavelin] = false; - npc.buffImmune[BuffID.SoulDrain] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; npc.noGravity = true; npc.noTileCollide = true; npc.HitSound = SoundID.NPCHit4; diff --git a/NPCs/Calamitas/CalamitasRun2.cs b/NPCs/Calamitas/CalamitasRun2.cs index 38cd0b1c66..6547b7956b 100644 --- a/NPCs/Calamitas/CalamitasRun2.cs +++ b/NPCs/Calamitas/CalamitasRun2.cs @@ -44,34 +44,6 @@ namespace CalamityMod.NPCs.Calamitas npc.knockBackResist = 0f; npc.noGravity = true; npc.noTileCollide = true; - for (int k = 0; k < npc.buffImmune.Length; k++) - { - npc.buffImmune[k] = true; - } - npc.buffImmune[BuffID.Ichor] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[BuffID.Frostburn] = false; - npc.buffImmune[BuffID.CursedInferno] = false; - npc.buffImmune[BuffID.Daybreak] = false; - npc.buffImmune[BuffID.BetsysCurse] = false; - npc.buffImmune[BuffID.StardustMinionBleed] = false; - npc.buffImmune[BuffID.DryadsWardDebuff] = false; - npc.buffImmune[BuffID.Oiled] = false; - npc.buffImmune[BuffID.BoneJavelin] = false; - npc.buffImmune[BuffID.SoulDrain] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; npc.HitSound = SoundID.NPCHit4; npc.DeathSound = SoundID.NPCDeath14; Mod calamityModMusic = ModLoader.GetMod("CalamityModMusic"); diff --git a/NPCs/Calamitas/CalamitasRun3.cs b/NPCs/Calamitas/CalamitasRun3.cs index 84326c22fc..82f5971825 100644 --- a/NPCs/Calamitas/CalamitasRun3.cs +++ b/NPCs/Calamitas/CalamitasRun3.cs @@ -56,34 +56,6 @@ namespace CalamityMod.NPCs.Calamitas npc.aiStyle = -1; aiType = -1; npc.knockBackResist = 0f; - for (int k = 0; k < npc.buffImmune.Length; k++) - { - npc.buffImmune[k] = true; - } - npc.buffImmune[BuffID.Ichor] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[BuffID.Frostburn] = false; - npc.buffImmune[BuffID.CursedInferno] = false; - npc.buffImmune[BuffID.Daybreak] = false; - npc.buffImmune[BuffID.BetsysCurse] = false; - npc.buffImmune[BuffID.StardustMinionBleed] = false; - npc.buffImmune[BuffID.DryadsWardDebuff] = false; - npc.buffImmune[BuffID.Oiled] = false; - npc.buffImmune[BuffID.BoneJavelin] = false; - npc.buffImmune[BuffID.SoulDrain] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; npc.boss = true; npc.noGravity = true; npc.noTileCollide = true; diff --git a/NPCs/Calamitas/LifeSeeker.cs b/NPCs/Calamitas/LifeSeeker.cs index 1e3ef0335d..9f9ee6f774 100644 --- a/NPCs/Calamitas/LifeSeeker.cs +++ b/NPCs/Calamitas/LifeSeeker.cs @@ -36,7 +36,6 @@ namespace CalamityMod.NPCs.Calamitas npc.canGhostHeal = false; npc.HitSound = SoundID.NPCHit4; npc.DeathSound = SoundID.NPCDeath14; - npc.buffImmune[BuffID.OnFire] = true; } public override bool PreAI() diff --git a/NPCs/Calamitas/SoulSeeker.cs b/NPCs/Calamitas/SoulSeeker.cs index 3dec9f8484..e02c9e85df 100644 --- a/NPCs/Calamitas/SoulSeeker.cs +++ b/NPCs/Calamitas/SoulSeeker.cs @@ -42,34 +42,6 @@ namespace CalamityMod.NPCs.Calamitas { npc.lifeMax = 150000; } - for (int k = 0; k < npc.buffImmune.Length; k++) - { - npc.buffImmune[k] = true; - } - npc.buffImmune[BuffID.Ichor] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[BuffID.Frostburn] = false; - npc.buffImmune[BuffID.CursedInferno] = false; - npc.buffImmune[BuffID.Daybreak] = false; - npc.buffImmune[BuffID.BetsysCurse] = false; - npc.buffImmune[BuffID.StardustMinionBleed] = false; - npc.buffImmune[BuffID.DryadsWardDebuff] = false; - npc.buffImmune[BuffID.Oiled] = false; - npc.buffImmune[BuffID.BoneJavelin] = false; - npc.buffImmune[BuffID.SoulDrain] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; npc.HitSound = SoundID.NPCHit4; npc.DeathSound = SoundID.NPCDeath14; } diff --git a/NPCs/CalamityGlobalNPC.cs b/NPCs/CalamityGlobalNPC.cs index 9526c1c24e..e732195ed3 100644 --- a/NPCs/CalamityGlobalNPC.cs +++ b/NPCs/CalamityGlobalNPC.cs @@ -838,6 +838,10 @@ namespace CalamityMod.NPCs #region Debuff Immunities private void DebuffImmunities(NPC npc) { + // Check out NPCStats.cs as this function sets the debuff immunities for all enemies in Cal bar the ones described below + npc.SetNPCDebuffImmunities(); + + // All bosses and several enemies are automatically immune to most of the movement debuffs. Silva Stun and Exo Freeze are excluded, but will not affect a boss if it has the debuff regardless. if (CalamityLists.enemyImmunityList.Contains(npc.type) || npc.boss) { npc.buffImmune[BuffType()] = true; @@ -850,6 +854,14 @@ namespace CalamityMod.NPCs npc.buffImmune[BuffID.Slow] = true; } + // All enemies are automatically immune to the Confused debuff, so we must specifically set them not to be. + // Extra note: Clams are not in this list as they initially immune to Confused, but are no longer immune once aggro'd. This is set in their AI(). + if (CalamityLists.confusionEnemyList.Contains(npc.type)) + { + npc.buffImmune[BuffID.Confused] = false; + } + + // Triple checks that several entities are immune to all debuffs if (DestroyerIDs.Contains(npc.type) || npc.type == NPCID.SkeletronHead || (EaterofWorldsIDs.Contains(npc.type) && BossRushEvent.BossRushActive) || npc.type == NPCID.DD2EterniaCrystal || npc.townNPC || npc.type == NPCID.SpikeBall || npc.type == NPCID.BlazingWheel) { for (int k = 0; k < npc.buffImmune.Length; k++) @@ -866,14 +878,22 @@ namespace CalamityMod.NPCs } } + // Any enemy not immune to Venom, shouldn't be immune to Sulphuric Poisoning as it is an upgrade if (!npc.buffImmune[BuffID.Venom]) { npc.buffImmune[BuffType()] = false; } + // Most bosses and boss servants are not immune to Kami Flu if (YanmeisKnifeSlash.CanRecieveCoolEffectsFrom(npc)) npc.buffImmune[BuffType()] = false; + + // Nothing should be immune to Enraged npc.buffImmune[BuffType()] = false; + + // Extra Notes: + // Shellfish minions set debuff immunity to Shellfish Claps on enemy hits, so most things are technically not immune + // The Spiteful Candle sets the debuff immunity of Spite to all nearby enemies in the tile file for an enemy with less than 99% DR } #endregion @@ -3009,7 +3029,7 @@ namespace CalamityMod.NPCs npc.velocity = Vector2.Clamp(npc.velocity, new Vector2(-KamiDebuff.MaxNPCSpeed), new Vector2(KamiDebuff.MaxNPCSpeed)); } - if (!CalamityPlayer.areThereAnyDamnBosses) + if (!CalamityPlayer.areThereAnyDamnBosses && !CalamityLists.enemyImmunityList.Contains(npc.type)) { if (pearlAura > 0) npc.velocity *= 0.9f; diff --git a/NPCs/CeaselessVoid/CeaselessVoid.cs b/NPCs/CeaselessVoid/CeaselessVoid.cs index 167e73f190..318b4e7e04 100644 --- a/NPCs/CeaselessVoid/CeaselessVoid.cs +++ b/NPCs/CeaselessVoid/CeaselessVoid.cs @@ -52,10 +52,6 @@ namespace CalamityMod.NPCs.CeaselessVoid npc.aiStyle = -1; aiType = -1; npc.knockBackResist = 0f; - for (int k = 0; k < npc.buffImmune.Length; k++) - { - npc.buffImmune[k] = true; - } npc.noGravity = true; npc.noTileCollide = true; npc.boss = true; diff --git a/NPCs/CeaselessVoid/DarkEnergy.cs b/NPCs/CeaselessVoid/DarkEnergy.cs index 4311df7117..018a49eb3b 100644 --- a/NPCs/CeaselessVoid/DarkEnergy.cs +++ b/NPCs/CeaselessVoid/DarkEnergy.cs @@ -47,10 +47,6 @@ namespace CalamityMod.NPCs.CeaselessVoid npc.noTileCollide = true; npc.canGhostHeal = false; aiType = -1; - for (int k = 0; k < npc.buffImmune.Length; k++) - { - npc.buffImmune[k] = true; - } npc.HitSound = SoundID.NPCHit53; npc.DeathSound = SoundID.NPCDeath44; } diff --git a/NPCs/CeaselessVoid/DarkEnergy2.cs b/NPCs/CeaselessVoid/DarkEnergy2.cs index 7a719c6f4f..ebebc7b72c 100644 --- a/NPCs/CeaselessVoid/DarkEnergy2.cs +++ b/NPCs/CeaselessVoid/DarkEnergy2.cs @@ -47,10 +47,6 @@ namespace CalamityMod.NPCs.CeaselessVoid npc.noTileCollide = true; npc.canGhostHeal = false; aiType = -1; - for (int k = 0; k < npc.buffImmune.Length; k++) - { - npc.buffImmune[k] = true; - } npc.HitSound = SoundID.NPCHit53; npc.DeathSound = SoundID.NPCDeath44; } diff --git a/NPCs/CeaselessVoid/DarkEnergy3.cs b/NPCs/CeaselessVoid/DarkEnergy3.cs index ef028c4376..0d9becc070 100644 --- a/NPCs/CeaselessVoid/DarkEnergy3.cs +++ b/NPCs/CeaselessVoid/DarkEnergy3.cs @@ -48,10 +48,6 @@ namespace CalamityMod.NPCs.CeaselessVoid npc.noGravity = true; npc.noTileCollide = true; npc.canGhostHeal = false; - for (int k = 0; k < npc.buffImmune.Length; k++) - { - npc.buffImmune[k] = true; - } npc.HitSound = SoundID.NPCHit53; npc.DeathSound = SoundID.NPCDeath44; } diff --git a/NPCs/Crabulon/CrabulonIdle.cs b/NPCs/Crabulon/CrabulonIdle.cs index f09bdadc1e..cf0ae8ef85 100644 --- a/NPCs/Crabulon/CrabulonIdle.cs +++ b/NPCs/Crabulon/CrabulonIdle.cs @@ -43,8 +43,6 @@ namespace CalamityMod.NPCs.Crabulon npc.lifeMax += (int)(npc.lifeMax * HPBoost); npc.aiStyle = -1; aiType = -1; - npc.buffImmune[ModContent.BuffType()] = true; - npc.buffImmune[ModContent.BuffType()] = true; npc.noGravity = false; npc.noTileCollide = false; Mod calamityModMusic = ModLoader.GetMod("CalamityModMusic"); diff --git a/NPCs/Crags/CalamityEye.cs b/NPCs/Crags/CalamityEye.cs index 9056fa563e..f012c62c28 100644 --- a/NPCs/Crags/CalamityEye.cs +++ b/NPCs/Crags/CalamityEye.cs @@ -39,7 +39,6 @@ namespace CalamityMod.NPCs.Crags } banner = npc.type; bannerItem = ModContent.ItemType(); - npc.buffImmune[BuffID.Confused] = false; } public override void AI() diff --git a/NPCs/Crags/CultistAssassin.cs b/NPCs/Crags/CultistAssassin.cs index 6a87f9f543..c2e7822ef8 100644 --- a/NPCs/Crags/CultistAssassin.cs +++ b/NPCs/Crags/CultistAssassin.cs @@ -38,7 +38,6 @@ namespace CalamityMod.NPCs.Crags } banner = npc.type; bannerItem = ModContent.ItemType(); - npc.buffImmune[BuffID.Confused] = false; } public override float SpawnChance(NPCSpawnInfo spawnInfo) diff --git a/NPCs/Crags/DespairStone.cs b/NPCs/Crags/DespairStone.cs index f20c6e059e..f0395882c6 100644 --- a/NPCs/Crags/DespairStone.cs +++ b/NPCs/Crags/DespairStone.cs @@ -39,7 +39,6 @@ namespace CalamityMod.NPCs.Crags } banner = npc.type; bannerItem = ModContent.ItemType(); - npc.buffImmune[BuffID.Confused] = false; } public override void AI() diff --git a/NPCs/Crags/Scryllar.cs b/NPCs/Crags/Scryllar.cs index 88c1f61d1a..cb2daee080 100644 --- a/NPCs/Crags/Scryllar.cs +++ b/NPCs/Crags/Scryllar.cs @@ -41,7 +41,6 @@ namespace CalamityMod.NPCs.Crags } banner = npc.type; bannerItem = ModContent.ItemType(); - npc.buffImmune[BuffID.Confused] = false; } public override void AI() diff --git a/NPCs/Crags/ScryllarRage.cs b/NPCs/Crags/ScryllarRage.cs index 4eb0010319..a621aa593a 100644 --- a/NPCs/Crags/ScryllarRage.cs +++ b/NPCs/Crags/ScryllarRage.cs @@ -41,7 +41,6 @@ namespace CalamityMod.NPCs.Crags } banner = ModContent.NPCType(); bannerItem = ModContent.ItemType(); - npc.buffImmune[BuffID.Confused] = false; } public override void AI() diff --git a/NPCs/Cryogen/Cryogen.cs b/NPCs/Cryogen/Cryogen.cs index df31490f8e..6df6bd0491 100644 --- a/NPCs/Cryogen/Cryogen.cs +++ b/NPCs/Cryogen/Cryogen.cs @@ -55,36 +55,6 @@ namespace CalamityMod.NPCs.Cryogen aiType = -1; npc.knockBackResist = 0f; npc.value = Item.buyPrice(0, 12, 0, 0); - for (int k = 0; k < npc.buffImmune.Length; k++) - { - npc.buffImmune[k] = true; - } - npc.buffImmune[BuffID.Ichor] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[BuffID.OnFire] = false; - npc.buffImmune[BuffID.CursedInferno] = false; - npc.buffImmune[BuffID.Daybreak] = false; - npc.buffImmune[BuffID.BetsysCurse] = false; - npc.buffImmune[BuffID.StardustMinionBleed] = false; - npc.buffImmune[BuffID.DryadsWardDebuff] = false; - npc.buffImmune[BuffID.Oiled] = false; - npc.buffImmune[BuffID.BoneJavelin] = false; - npc.buffImmune[BuffID.ShadowFlame] = false; - npc.buffImmune[BuffID.SoulDrain] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; npc.boss = true; npc.noGravity = true; npc.noTileCollide = true; diff --git a/NPCs/DesertScourge/DesertScourgeBody.cs b/NPCs/DesertScourge/DesertScourgeBody.cs index a11f85b12c..84e79bc7b6 100644 --- a/NPCs/DesertScourge/DesertScourgeBody.cs +++ b/NPCs/DesertScourge/DesertScourgeBody.cs @@ -31,10 +31,6 @@ namespace CalamityMod.NPCs.DesertScourge aiType = -1; npc.knockBackResist = 0f; npc.alpha = 255; - for (int k = 0; k < npc.buffImmune.Length; k++) - { - npc.buffImmune[k] = true; - } npc.boss = true; Mod calamityModMusic = ModLoader.GetMod("CalamityModMusic"); if (calamityModMusic != null) diff --git a/NPCs/DesertScourge/DesertScourgeHead.cs b/NPCs/DesertScourge/DesertScourgeHead.cs index 4009bd2e2b..c10f4fe0a7 100644 --- a/NPCs/DesertScourge/DesertScourgeHead.cs +++ b/NPCs/DesertScourge/DesertScourgeHead.cs @@ -48,10 +48,6 @@ namespace CalamityMod.NPCs.DesertScourge npc.boss = true; npc.value = Item.buyPrice(0, 2, 0, 0); npc.alpha = 255; - for (int k = 0; k < npc.buffImmune.Length; k++) - { - npc.buffImmune[k] = true; - } npc.behindTiles = true; npc.noGravity = true; npc.noTileCollide = true; diff --git a/NPCs/DesertScourge/DesertScourgeTail.cs b/NPCs/DesertScourge/DesertScourgeTail.cs index 56b141884d..03321ef370 100644 --- a/NPCs/DesertScourge/DesertScourgeTail.cs +++ b/NPCs/DesertScourge/DesertScourgeTail.cs @@ -29,10 +29,6 @@ namespace CalamityMod.NPCs.DesertScourge aiType = -1; npc.knockBackResist = 0f; npc.alpha = 255; - for (int k = 0; k < npc.buffImmune.Length; k++) - { - npc.buffImmune[k] = true; - } npc.boss = true; Mod calamityModMusic = ModLoader.GetMod("CalamityModMusic"); if (calamityModMusic != null) diff --git a/NPCs/DevourerofGods/DevourerofGodsBody.cs b/NPCs/DevourerofGods/DevourerofGodsBody.cs index 84965b7c45..8baea13583 100644 --- a/NPCs/DevourerofGods/DevourerofGodsBody.cs +++ b/NPCs/DevourerofGods/DevourerofGodsBody.cs @@ -47,10 +47,6 @@ namespace CalamityMod.NPCs.DevourerofGods npc.DeathSound = SoundID.NPCDeath14; npc.netAlways = true; npc.boss = true; - for (int k = 0; k < npc.buffImmune.Length; k++) - { - npc.buffImmune[k] = true; - } Mod calamityModMusic = ModLoader.GetMod("CalamityModMusic"); if (calamityModMusic != null) music = calamityModMusic.GetSoundSlot(SoundType.Music, "Sounds/Music/ScourgeofTheUniverse"); diff --git a/NPCs/DevourerofGods/DevourerofGodsBody2.cs b/NPCs/DevourerofGods/DevourerofGodsBody2.cs index b841275094..eb7a2274a7 100644 --- a/NPCs/DevourerofGods/DevourerofGodsBody2.cs +++ b/NPCs/DevourerofGods/DevourerofGodsBody2.cs @@ -39,10 +39,6 @@ namespace CalamityMod.NPCs.DevourerofGods npc.HitSound = SoundID.NPCHit4; npc.DeathSound = SoundID.NPCDeath14; npc.netAlways = true; - for (int k = 0; k < npc.buffImmune.Length; k++) - { - npc.buffImmune[k] = true; - } npc.dontCountMe = true; } diff --git a/NPCs/DevourerofGods/DevourerofGodsBodyS.cs b/NPCs/DevourerofGods/DevourerofGodsBodyS.cs index 9a4e988a5d..6d8a2b56e6 100644 --- a/NPCs/DevourerofGods/DevourerofGodsBodyS.cs +++ b/NPCs/DevourerofGods/DevourerofGodsBodyS.cs @@ -47,10 +47,6 @@ namespace CalamityMod.NPCs.DevourerofGods npc.DeathSound = SoundID.NPCDeath14; npc.netAlways = true; npc.boss = true; - for (int k = 0; k < npc.buffImmune.Length; k++) - { - npc.buffImmune[k] = true; - } Mod calamityModMusic = ModLoader.GetMod("CalamityModMusic"); if (calamityModMusic != null) music = calamityModMusic.GetSoundSlot(SoundType.Music, "Sounds/Music/UniversalCollapse"); diff --git a/NPCs/DevourerofGods/DevourerofGodsHead.cs b/NPCs/DevourerofGods/DevourerofGodsHead.cs index 85f2c6a281..bc3531c1e9 100644 --- a/NPCs/DevourerofGods/DevourerofGodsHead.cs +++ b/NPCs/DevourerofGods/DevourerofGodsHead.cs @@ -69,10 +69,6 @@ namespace CalamityMod.NPCs.DevourerofGods npc.noTileCollide = true; npc.DeathSound = SoundID.NPCDeath14; npc.netAlways = true; - for (int k = 0; k < npc.buffImmune.Length; k++) - { - npc.buffImmune[k] = true; - } Mod calamityModMusic = ModLoader.GetMod("CalamityModMusic"); if (calamityModMusic != null) music = calamityModMusic.GetSoundSlot(SoundType.Music, "Sounds/Music/ScourgeofTheUniverse"); diff --git a/NPCs/DevourerofGods/DevourerofGodsHead2.cs b/NPCs/DevourerofGods/DevourerofGodsHead2.cs index da1959bc90..f3723caf85 100644 --- a/NPCs/DevourerofGods/DevourerofGodsHead2.cs +++ b/NPCs/DevourerofGods/DevourerofGodsHead2.cs @@ -42,10 +42,6 @@ namespace CalamityMod.NPCs.DevourerofGods npc.HitSound = SoundID.NPCHit4; npc.DeathSound = SoundID.NPCDeath14; npc.netAlways = true; - for (int k = 0; k < npc.buffImmune.Length; k++) - { - npc.buffImmune[k] = true; - } } public override void SendExtraAI(BinaryWriter writer) diff --git a/NPCs/DevourerofGods/DevourerofGodsHeadS.cs b/NPCs/DevourerofGods/DevourerofGodsHeadS.cs index 2c58bd7ea4..01e8628f66 100644 --- a/NPCs/DevourerofGods/DevourerofGodsHeadS.cs +++ b/NPCs/DevourerofGods/DevourerofGodsHeadS.cs @@ -98,10 +98,6 @@ namespace CalamityMod.NPCs.DevourerofGods npc.noTileCollide = true; npc.DeathSound = SoundID.NPCDeath14; npc.netAlways = true; - for (int k = 0; k < npc.buffImmune.Length; k++) - { - npc.buffImmune[k] = true; - } Mod calamityModMusic = ModLoader.GetMod("CalamityModMusic"); if (calamityModMusic != null) music = calamityModMusic.GetSoundSlot(SoundType.Music, "Sounds/Music/UniversalCollapse"); diff --git a/NPCs/DevourerofGods/DevourerofGodsTail.cs b/NPCs/DevourerofGods/DevourerofGodsTail.cs index 903d432305..63b6887af1 100644 --- a/NPCs/DevourerofGods/DevourerofGodsTail.cs +++ b/NPCs/DevourerofGods/DevourerofGodsTail.cs @@ -40,10 +40,6 @@ namespace CalamityMod.NPCs.DevourerofGods npc.netAlways = true; npc.boss = true; npc.takenDamageMultiplier = 1.25f; - for (int k = 0; k < npc.buffImmune.Length; k++) - { - npc.buffImmune[k] = true; - } Mod calamityModMusic = ModLoader.GetMod("CalamityModMusic"); if (calamityModMusic != null) music = calamityModMusic.GetSoundSlot(SoundType.Music, "Sounds/Music/ScourgeofTheUniverse"); diff --git a/NPCs/DevourerofGods/DevourerofGodsTail2.cs b/NPCs/DevourerofGods/DevourerofGodsTail2.cs index 7f525ba81a..bdb66187a8 100644 --- a/NPCs/DevourerofGods/DevourerofGodsTail2.cs +++ b/NPCs/DevourerofGods/DevourerofGodsTail2.cs @@ -36,10 +36,6 @@ namespace CalamityMod.NPCs.DevourerofGods npc.HitSound = SoundID.NPCHit4; npc.DeathSound = SoundID.NPCDeath14; npc.netAlways = true; - for (int k = 0; k < npc.buffImmune.Length; k++) - { - npc.buffImmune[k] = true; - } npc.dontCountMe = true; } diff --git a/NPCs/DevourerofGods/DevourerofGodsTailS.cs b/NPCs/DevourerofGods/DevourerofGodsTailS.cs index 3e164f9806..87d8040dac 100644 --- a/NPCs/DevourerofGods/DevourerofGodsTailS.cs +++ b/NPCs/DevourerofGods/DevourerofGodsTailS.cs @@ -49,10 +49,6 @@ namespace CalamityMod.NPCs.DevourerofGods npc.DeathSound = SoundID.NPCDeath14; npc.netAlways = true; npc.boss = true; - for (int k = 0; k < npc.buffImmune.Length; k++) - { - npc.buffImmune[k] = true; - } Mod calamityModMusic = ModLoader.GetMod("CalamityModMusic"); if (calamityModMusic != null) music = calamityModMusic.GetSoundSlot(SoundType.Music, "Sounds/Music/UniversalCollapse"); diff --git a/NPCs/GreatSandShark/GreatSandShark.cs b/NPCs/GreatSandShark/GreatSandShark.cs index fa50059b9b..81699c4c86 100644 --- a/NPCs/GreatSandShark/GreatSandShark.cs +++ b/NPCs/GreatSandShark/GreatSandShark.cs @@ -42,31 +42,6 @@ namespace CalamityMod.NPCs.GreatSandShark npc.value = Item.buyPrice(0, 10, 0, 0); NPCID.Sets.TrailCacheLength[npc.type] = 8; NPCID.Sets.TrailingMode[npc.type] = 1; - for (int k = 0; k < npc.buffImmune.Length; k++) - { - npc.buffImmune[k] = true; - } - npc.buffImmune[BuffID.Ichor] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[BuffID.Frostburn] = false; - npc.buffImmune[BuffID.CursedInferno] = false; - npc.buffImmune[BuffID.Daybreak] = false; - npc.buffImmune[BuffID.StardustMinionBleed] = false; - npc.buffImmune[BuffID.DryadsWardDebuff] = false; - npc.buffImmune[BuffID.Oiled] = false; - npc.buffImmune[BuffID.BetsysCurse] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; npc.behindTiles = true; npc.netAlways = true; npc.HitSound = SoundID.NPCHit1; diff --git a/NPCs/HiveMind/HiveMind.cs b/NPCs/HiveMind/HiveMind.cs index 0f4d3b65ee..c2fe0a281a 100644 --- a/NPCs/HiveMind/HiveMind.cs +++ b/NPCs/HiveMind/HiveMind.cs @@ -31,8 +31,6 @@ namespace CalamityMod.NPCs.HiveMind npc.lifeMax += (int)(npc.lifeMax * HPBoost); npc.aiStyle = -1; aiType = -1; - npc.buffImmune[ModContent.BuffType()] = true; - npc.buffImmune[ModContent.BuffType()] = true; npc.knockBackResist = 0f; npc.boss = true; npc.value = 0f; diff --git a/NPCs/HiveMind/HiveMindP2.cs b/NPCs/HiveMind/HiveMindP2.cs index 67bba81b9d..dd2a1c8f1c 100644 --- a/NPCs/HiveMind/HiveMindP2.cs +++ b/NPCs/HiveMind/HiveMindP2.cs @@ -79,8 +79,6 @@ namespace CalamityMod.NPCs.HiveMind npc.lifeMax += (int)(npc.lifeMax * HPBoost); npc.aiStyle = -1; aiType = -1; - npc.buffImmune[ModContent.BuffType()] = true; - npc.buffImmune[ModContent.BuffType()] = true; npc.knockBackResist = 0f; npc.value = Item.buyPrice(0, 6, 0, 0); npc.boss = true; diff --git a/NPCs/Leviathan/Leviathan.cs b/NPCs/Leviathan/Leviathan.cs index 2dbd97c4e1..bbdabc8888 100644 --- a/NPCs/Leviathan/Leviathan.cs +++ b/NPCs/Leviathan/Leviathan.cs @@ -55,33 +55,6 @@ namespace CalamityMod.NPCs.Leviathan aiType = -1; npc.Opacity = 0f; npc.value = Item.buyPrice(0, 15, 0, 0); - for (int k = 0; k < npc.buffImmune.Length; k++) - { - npc.buffImmune[k] = true; - } - npc.buffImmune[BuffID.Ichor] = false; - npc.buffImmune[BuffID.CursedInferno] = false; - npc.buffImmune[BuffID.Frostburn] = false; - npc.buffImmune[BuffID.Daybreak] = false; - npc.buffImmune[BuffID.BetsysCurse] = false; - npc.buffImmune[BuffID.StardustMinionBleed] = false; - npc.buffImmune[BuffID.DryadsWardDebuff] = false; - npc.buffImmune[BuffID.Oiled] = false; - npc.buffImmune[BuffID.BoneJavelin] = false; - npc.buffImmune[BuffID.SoulDrain] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; npc.HitSound = SoundID.NPCHit56; npc.DeathSound = SoundID.NPCDeath60; npc.noTileCollide = true; diff --git a/NPCs/Leviathan/Siren.cs b/NPCs/Leviathan/Siren.cs index 53e8da1b95..5679abe405 100644 --- a/NPCs/Leviathan/Siren.cs +++ b/NPCs/Leviathan/Siren.cs @@ -45,34 +45,6 @@ namespace CalamityMod.NPCs.Leviathan aiType = -1; npc.boss = true; npc.value = Item.buyPrice(0, 15, 0, 0); - for (int k = 0; k < npc.buffImmune.Length; k++) - { - npc.buffImmune[k] = true; - } - npc.buffImmune[BuffID.Ichor] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[BuffID.Frostburn] = false; - npc.buffImmune[BuffID.CursedInferno] = false; - npc.buffImmune[BuffID.Daybreak] = false; - npc.buffImmune[BuffID.BetsysCurse] = false; - npc.buffImmune[BuffID.StardustMinionBleed] = false; - npc.buffImmune[BuffID.DryadsWardDebuff] = false; - npc.buffImmune[BuffID.Oiled] = false; - npc.buffImmune[BuffID.BoneJavelin] = false; - npc.buffImmune[BuffID.SoulDrain] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; npc.noGravity = true; npc.noTileCollide = true; npc.HitSound = SoundID.NPCHit1; diff --git a/NPCs/NormalNPCs/AeroSlime.cs b/NPCs/NormalNPCs/AeroSlime.cs index 7735463328..98d9630126 100644 --- a/NPCs/NormalNPCs/AeroSlime.cs +++ b/NPCs/NormalNPCs/AeroSlime.cs @@ -33,7 +33,6 @@ namespace CalamityMod.NPCs.NormalNPCs npc.DeathSound = SoundID.NPCDeath1; banner = npc.type; bannerItem = ModContent.ItemType(); - npc.buffImmune[BuffID.Confused] = false; } public override float SpawnChance(NPCSpawnInfo spawnInfo) diff --git a/NPCs/NormalNPCs/AngryDog.cs b/NPCs/NormalNPCs/AngryDog.cs index 513d594dce..a78056a1af 100644 --- a/NPCs/NormalNPCs/AngryDog.cs +++ b/NPCs/NormalNPCs/AngryDog.cs @@ -41,7 +41,6 @@ namespace CalamityMod.NPCs.NormalNPCs banner = npc.type; bannerItem = ModContent.ItemType(); npc.coldDamage = true; - npc.buffImmune[BuffID.Confused] = false; } public override void SendExtraAI(BinaryWriter writer) diff --git a/NPCs/NormalNPCs/ArmoredDiggerBody.cs b/NPCs/NormalNPCs/ArmoredDiggerBody.cs index 8fc37d8929..f05c040215 100644 --- a/NPCs/NormalNPCs/ArmoredDiggerBody.cs +++ b/NPCs/NormalNPCs/ArmoredDiggerBody.cs @@ -30,10 +30,6 @@ namespace CalamityMod.NPCs.NormalNPCs npc.noTileCollide = true; npc.HitSound = SoundID.NPCHit4; npc.DeathSound = SoundID.NPCDeath14; - for (int k = 0; k < npc.buffImmune.Length; k++) - { - npc.buffImmune[k] = true; - } npc.netAlways = true; npc.dontCountMe = true; banner = ModContent.NPCType(); diff --git a/NPCs/NormalNPCs/ArmoredDiggerHead.cs b/NPCs/NormalNPCs/ArmoredDiggerHead.cs index 31c3cfa7dd..8f38f46cd6 100644 --- a/NPCs/NormalNPCs/ArmoredDiggerHead.cs +++ b/NPCs/NormalNPCs/ArmoredDiggerHead.cs @@ -37,10 +37,6 @@ namespace CalamityMod.NPCs.NormalNPCs npc.noTileCollide = true; npc.HitSound = SoundID.NPCHit4; npc.DeathSound = SoundID.NPCDeath14; - for (int k = 0; k < npc.buffImmune.Length; k++) - { - npc.buffImmune[k] = true; - } npc.netAlways = true; banner = npc.type; bannerItem = ModContent.ItemType(); diff --git a/NPCs/NormalNPCs/ArmoredDiggerTail.cs b/NPCs/NormalNPCs/ArmoredDiggerTail.cs index 58e205e33b..44ce657a2e 100644 --- a/NPCs/NormalNPCs/ArmoredDiggerTail.cs +++ b/NPCs/NormalNPCs/ArmoredDiggerTail.cs @@ -30,10 +30,6 @@ namespace CalamityMod.NPCs.NormalNPCs npc.noTileCollide = true; npc.HitSound = SoundID.NPCHit4; npc.DeathSound = SoundID.NPCDeath14; - for (int k = 0; k < npc.buffImmune.Length; k++) - { - npc.buffImmune[k] = true; - } npc.netAlways = true; npc.dontCountMe = true; banner = ModContent.NPCType(); diff --git a/NPCs/NormalNPCs/BlightedEye.cs b/NPCs/NormalNPCs/BlightedEye.cs index 89b768762e..b44f7eddd0 100644 --- a/NPCs/NormalNPCs/BlightedEye.cs +++ b/NPCs/NormalNPCs/BlightedEye.cs @@ -29,7 +29,6 @@ namespace CalamityMod.NPCs.NormalNPCs npc.DeathSound = SoundID.NPCDeath1; banner = npc.type; bannerItem = ModContent.ItemType(); - npc.buffImmune[BuffID.Confused] = false; } public override void HitEffect(int hitDirection, double damage) diff --git a/NPCs/NormalNPCs/BloomSlime.cs b/NPCs/NormalNPCs/BloomSlime.cs index ac35a6f3c6..676d6adacc 100644 --- a/NPCs/NormalNPCs/BloomSlime.cs +++ b/NPCs/NormalNPCs/BloomSlime.cs @@ -35,7 +35,6 @@ namespace CalamityMod.NPCs.NormalNPCs npc.DeathSound = SoundID.NPCDeath1; banner = npc.type; bannerItem = ModContent.ItemType(); - npc.buffImmune[BuffID.Confused] = false; } public override float SpawnChance(NPCSpawnInfo spawnInfo) diff --git a/NPCs/NormalNPCs/Bohldohr.cs b/NPCs/NormalNPCs/Bohldohr.cs index b859c74696..adeb43488e 100644 --- a/NPCs/NormalNPCs/Bohldohr.cs +++ b/NPCs/NormalNPCs/Bohldohr.cs @@ -29,7 +29,6 @@ namespace CalamityMod.NPCs.NormalNPCs npc.behindTiles = true; banner = npc.type; bannerItem = ModContent.ItemType(); - npc.buffImmune[BuffID.Confused] = false; } public override void AI() diff --git a/NPCs/NormalNPCs/CosmicElemental.cs b/NPCs/NormalNPCs/CosmicElemental.cs index eff9773f7a..fb8f02fbaf 100644 --- a/NPCs/NormalNPCs/CosmicElemental.cs +++ b/NPCs/NormalNPCs/CosmicElemental.cs @@ -30,7 +30,6 @@ namespace CalamityMod.NPCs.NormalNPCs npc.DeathSound = SoundID.NPCDeath6; banner = npc.type; bannerItem = ModContent.ItemType(); - npc.buffImmune[BuffID.Confused] = false; } public override void FindFrame(int frameHeight) diff --git a/NPCs/NormalNPCs/CrimulanBlightSlime.cs b/NPCs/NormalNPCs/CrimulanBlightSlime.cs index c14cf6dfde..a3ccc97f70 100644 --- a/NPCs/NormalNPCs/CrimulanBlightSlime.cs +++ b/NPCs/NormalNPCs/CrimulanBlightSlime.cs @@ -34,8 +34,6 @@ namespace CalamityMod.NPCs.NormalNPCs npc.noTileCollide = false; npc.HitSound = SoundID.NPCHit1; npc.DeathSound = SoundID.NPCDeath1; - npc.buffImmune[BuffID.OnFire] = true; - npc.buffImmune[BuffID.Confused] = false; banner = npc.type; bannerItem = ModContent.ItemType(); } diff --git a/NPCs/NormalNPCs/CryoSlime.cs b/NPCs/NormalNPCs/CryoSlime.cs index 143f6375f2..521cef9d8f 100644 --- a/NPCs/NormalNPCs/CryoSlime.cs +++ b/NPCs/NormalNPCs/CryoSlime.cs @@ -34,7 +34,6 @@ namespace CalamityMod.NPCs.NormalNPCs npc.DeathSound = SoundID.NPCDeath1; banner = npc.type; bannerItem = ModContent.ItemType(); - npc.buffImmune[BuffID.Confused] = false; } public override float SpawnChance(NPCSpawnInfo spawnInfo) diff --git a/NPCs/NormalNPCs/Cryon.cs b/NPCs/NormalNPCs/Cryon.cs index efd580df12..355d71b86c 100644 --- a/NPCs/NormalNPCs/Cryon.cs +++ b/NPCs/NormalNPCs/Cryon.cs @@ -32,7 +32,6 @@ namespace CalamityMod.NPCs.NormalNPCs banner = npc.type; bannerItem = ModContent.ItemType(); npc.coldDamage = true; - npc.buffImmune[BuffID.Confused] = false; } public override void AI() diff --git a/NPCs/NormalNPCs/EbonianBlightSlime.cs b/NPCs/NormalNPCs/EbonianBlightSlime.cs index 60c5b8402d..e2c6130047 100644 --- a/NPCs/NormalNPCs/EbonianBlightSlime.cs +++ b/NPCs/NormalNPCs/EbonianBlightSlime.cs @@ -31,8 +31,6 @@ namespace CalamityMod.NPCs.NormalNPCs npc.noTileCollide = false; npc.HitSound = SoundID.NPCHit1; npc.DeathSound = SoundID.NPCDeath1; - npc.buffImmune[BuffID.OnFire] = true; - npc.buffImmune[BuffID.Confused] = false; banner = npc.type; bannerItem = ModContent.ItemType(); } diff --git a/NPCs/NormalNPCs/Eidolist.cs b/NPCs/NormalNPCs/Eidolist.cs index cc4053446c..7335cb94cd 100644 --- a/NPCs/NormalNPCs/Eidolist.cs +++ b/NPCs/NormalNPCs/Eidolist.cs @@ -29,10 +29,6 @@ namespace CalamityMod.NPCs.NormalNPCs npc.height = 80; npc.lifeMax = 10000; npc.knockBackResist = 0f; - for (int k = 0; k < npc.buffImmune.Length; k++) - { - npc.buffImmune[k] = true; - } npc.value = Item.buyPrice(0, 1, 0, 0); npc.alpha = 50; npc.noGravity = true; diff --git a/NPCs/NormalNPCs/FearlessGoldfishWarrior.cs b/NPCs/NormalNPCs/FearlessGoldfishWarrior.cs index 6ae21c91e2..35ae98da42 100644 --- a/NPCs/NormalNPCs/FearlessGoldfishWarrior.cs +++ b/NPCs/NormalNPCs/FearlessGoldfishWarrior.cs @@ -33,7 +33,6 @@ namespace CalamityMod.NPCs.NormalNPCs npc.DeathSound = SoundID.NPCDeath1; banner = npc.type; bannerItem = ModContent.ItemType(); - npc.buffImmune[BuffID.Confused] = false; } public override void AI() diff --git a/NPCs/NormalNPCs/Frogfish.cs b/NPCs/NormalNPCs/Frogfish.cs index c249e4af60..365766c901 100644 --- a/NPCs/NormalNPCs/Frogfish.cs +++ b/NPCs/NormalNPCs/Frogfish.cs @@ -25,7 +25,6 @@ namespace CalamityMod.NPCs.NormalNPCs npc.lifeMax = 80; npc.aiStyle = -1; aiType = -1; - npc.buffImmune[ModContent.BuffType()] = true; npc.value = Item.buyPrice(0, 0, 0, 80); npc.HitSound = SoundID.NPCHit1; npc.DeathSound = SoundID.NPCDeath1; diff --git a/NPCs/NormalNPCs/HeatSpirit.cs b/NPCs/NormalNPCs/HeatSpirit.cs index a0402cff51..3467711ba5 100644 --- a/NPCs/NormalNPCs/HeatSpirit.cs +++ b/NPCs/NormalNPCs/HeatSpirit.cs @@ -30,7 +30,6 @@ namespace CalamityMod.NPCs.NormalNPCs npc.DeathSound = SoundID.NPCDeath55; banner = npc.type; bannerItem = ModContent.ItemType(); - npc.buffImmune[BuffID.Confused] = false; } public override float SpawnChance(NPCSpawnInfo spawnInfo) diff --git a/NPCs/NormalNPCs/Horse.cs b/NPCs/NormalNPCs/Horse.cs index 37786873b8..2adb898f15 100644 --- a/NPCs/NormalNPCs/Horse.cs +++ b/NPCs/NormalNPCs/Horse.cs @@ -37,31 +37,6 @@ namespace CalamityMod.NPCs.NormalNPCs npc.lifeMax = 3800; npc.aiStyle = -1; aiType = -1; - for (int k = 0; k < npc.buffImmune.Length; k++) - { - npc.buffImmune[k] = true; - } - npc.buffImmune[BuffID.Ichor] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[BuffID.Frostburn] = false; - npc.buffImmune[BuffID.CursedInferno] = false; - npc.buffImmune[BuffID.Daybreak] = false; - npc.buffImmune[BuffID.StardustMinionBleed] = false; - npc.buffImmune[BuffID.DryadsWardDebuff] = false; - npc.buffImmune[BuffID.Oiled] = false; - npc.buffImmune[BuffID.BetsysCurse] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; npc.knockBackResist = 0f; npc.value = Item.buyPrice(0, 1, 50, 0); npc.noGravity = true; diff --git a/NPCs/NormalNPCs/ImpiousImmolator.cs b/NPCs/NormalNPCs/ImpiousImmolator.cs index 8ab6526b62..7c3c9f777a 100644 --- a/NPCs/NormalNPCs/ImpiousImmolator.cs +++ b/NPCs/NormalNPCs/ImpiousImmolator.cs @@ -35,24 +35,6 @@ namespace CalamityMod.NPCs.NormalNPCs npc.lifeMax = 8250; npc.aiStyle = -1; aiType = -1; - for (int k = 0; k < npc.buffImmune.Length; k++) - { - npc.buffImmune[k] = true; - } - npc.buffImmune[BuffID.Ichor] = false; - npc.buffImmune[BuffID.CursedInferno] = false; - npc.buffImmune[BuffID.StardustMinionBleed] = false; - npc.buffImmune[BuffID.BetsysCurse] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; npc.value = Item.buyPrice(0, 0, 50, 0); npc.HitSound = SoundID.NPCHit5; npc.DeathSound = SoundID.NPCDeath7; diff --git a/NPCs/NormalNPCs/KingSlimeJewel.cs b/NPCs/NormalNPCs/KingSlimeJewel.cs index 81c5ca3807..6c89f31dac 100644 --- a/NPCs/NormalNPCs/KingSlimeJewel.cs +++ b/NPCs/NormalNPCs/KingSlimeJewel.cs @@ -24,10 +24,6 @@ namespace CalamityMod.NPCs.NormalNPCs npc.height = 22; npc.lifeMax = 999; npc.knockBackResist = 0f; - for (int k = 0; k < npc.buffImmune.Length; k++) - { - npc.buffImmune[k] = true; - } npc.noGravity = true; npc.noTileCollide = true; npc.dontTakeDamage = true; diff --git a/NPCs/NormalNPCs/MantisShrimp.cs b/NPCs/NormalNPCs/MantisShrimp.cs index 9b5ec16f19..f6c13c649d 100644 --- a/NPCs/NormalNPCs/MantisShrimp.cs +++ b/NPCs/NormalNPCs/MantisShrimp.cs @@ -28,8 +28,6 @@ namespace CalamityMod.NPCs.NormalNPCs npc.value = Item.buyPrice(0, 0, 1, 0); npc.HitSound = SoundID.NPCHit1; npc.DeathSound = SoundID.NPCDeath1; - npc.buffImmune[BuffID.Daybreak] = true; - npc.buffImmune[BuffID.Confused] = false; banner = npc.type; bannerItem = ModContent.ItemType(); } diff --git a/NPCs/NormalNPCs/OverloadedSoldier.cs b/NPCs/NormalNPCs/OverloadedSoldier.cs index 57cc5e973b..4f8350d4a1 100644 --- a/NPCs/NormalNPCs/OverloadedSoldier.cs +++ b/NPCs/NormalNPCs/OverloadedSoldier.cs @@ -35,7 +35,6 @@ namespace CalamityMod.NPCs.NormalNPCs npc.DeathSound = SoundID.NPCDeath2; banner = npc.type; bannerItem = ModContent.ItemType(); - npc.buffImmune[BuffID.Confused] = false; } public override void FindFrame(int frameHeight) diff --git a/NPCs/NormalNPCs/PerennialSlime.cs b/NPCs/NormalNPCs/PerennialSlime.cs index a0d29f1d89..880a27cbb7 100644 --- a/NPCs/NormalNPCs/PerennialSlime.cs +++ b/NPCs/NormalNPCs/PerennialSlime.cs @@ -33,7 +33,6 @@ namespace CalamityMod.NPCs.NormalNPCs npc.DeathSound = SoundID.NPCDeath1; banner = npc.type; bannerItem = ModContent.ItemType(); - npc.buffImmune[BuffID.Confused] = false; } public override float SpawnChance(NPCSpawnInfo spawnInfo) diff --git a/NPCs/NormalNPCs/PhantomDebris.cs b/NPCs/NormalNPCs/PhantomDebris.cs index 1d094dbbc6..9a9aab2596 100644 --- a/NPCs/NormalNPCs/PhantomDebris.cs +++ b/NPCs/NormalNPCs/PhantomDebris.cs @@ -35,7 +35,6 @@ namespace CalamityMod.NPCs.NormalNPCs npc.DeathSound = SoundID.NPCDeath36; banner = npc.type; bannerItem = ModContent.ItemType(); - npc.buffImmune[BuffID.Confused] = false; } public override void FindFrame(int frameHeight) diff --git a/NPCs/NormalNPCs/Pitbull.cs b/NPCs/NormalNPCs/Pitbull.cs index 304f6eef89..c017b9018c 100644 --- a/NPCs/NormalNPCs/Pitbull.cs +++ b/NPCs/NormalNPCs/Pitbull.cs @@ -29,7 +29,6 @@ namespace CalamityMod.NPCs.NormalNPCs npc.DeathSound = SoundID.NPCDeath5; banner = npc.type; bannerItem = ModContent.ItemType(); - npc.buffImmune[BuffID.Confused] = false; } public override float SpawnChance(NPCSpawnInfo spawnInfo) diff --git a/NPCs/NormalNPCs/PlagueBee.cs b/NPCs/NormalNPCs/PlagueBee.cs index 51b21d9229..3856a5a576 100644 --- a/NPCs/NormalNPCs/PlagueBee.cs +++ b/NPCs/NormalNPCs/PlagueBee.cs @@ -36,12 +36,6 @@ namespace CalamityMod.NPCs.NormalNPCs npc.DeathSound = SoundID.NPCDeath14; npc.noGravity = true; npc.noTileCollide = false; - npc.buffImmune[BuffID.ShadowFlame] = true; - npc.buffImmune[BuffID.Venom] = true; - npc.buffImmune[BuffID.OnFire] = true; - npc.buffImmune[BuffID.Poisoned] = true; - npc.buffImmune[ModContent.BuffType()] = true; - npc.buffImmune[ModContent.BuffType()] = true; banner = npc.type; bannerItem = ModContent.ItemType(); } diff --git a/NPCs/NormalNPCs/PlagueBeeLarge.cs b/NPCs/NormalNPCs/PlagueBeeLarge.cs index 0ce7d36fcb..4fb181ef52 100644 --- a/NPCs/NormalNPCs/PlagueBeeLarge.cs +++ b/NPCs/NormalNPCs/PlagueBeeLarge.cs @@ -35,12 +35,6 @@ namespace CalamityMod.NPCs.NormalNPCs npc.DeathSound = SoundID.NPCDeath14; npc.noGravity = true; npc.noTileCollide = false; - npc.buffImmune[BuffID.ShadowFlame] = true; - npc.buffImmune[BuffID.Venom] = true; - npc.buffImmune[BuffID.OnFire] = true; - npc.buffImmune[BuffID.Poisoned] = true; - npc.buffImmune[ModContent.BuffType()] = true; - npc.buffImmune[ModContent.BuffType()] = true; banner = ModContent.NPCType(); bannerItem = ModContent.ItemType(); } diff --git a/NPCs/NormalNPCs/PlaguedDerpling.cs b/NPCs/NormalNPCs/PlaguedDerpling.cs index 58a7850425..0d99f51ae9 100644 --- a/NPCs/NormalNPCs/PlaguedDerpling.cs +++ b/NPCs/NormalNPCs/PlaguedDerpling.cs @@ -32,12 +32,6 @@ namespace CalamityMod.NPCs.NormalNPCs npc.value = Item.buyPrice(0, 0, 10, 0); npc.HitSound = SoundID.NPCHit22; npc.DeathSound = SoundID.NPCDeath25; - npc.buffImmune[BuffID.ShadowFlame] = true; - npc.buffImmune[BuffID.Venom] = true; - npc.buffImmune[BuffID.OnFire] = true; - npc.buffImmune[BuffID.Poisoned] = true; - npc.buffImmune[ModContent.BuffType()] = true; - npc.buffImmune[ModContent.BuffType()] = true; banner = npc.type; bannerItem = ModContent.ItemType(); } diff --git a/NPCs/NormalNPCs/PlaguedFlyingFox.cs b/NPCs/NormalNPCs/PlaguedFlyingFox.cs index 8bcdf74723..6cc2b9a2e5 100644 --- a/NPCs/NormalNPCs/PlaguedFlyingFox.cs +++ b/NPCs/NormalNPCs/PlaguedFlyingFox.cs @@ -30,12 +30,6 @@ namespace CalamityMod.NPCs.NormalNPCs npc.value = Item.buyPrice(0, 0, 10, 0); npc.HitSound = SoundID.NPCHit1; npc.DeathSound = SoundID.NPCDeath4; - npc.buffImmune[BuffID.ShadowFlame] = true; - npc.buffImmune[BuffID.Venom] = true; - npc.buffImmune[BuffID.OnFire] = true; - npc.buffImmune[BuffID.Poisoned] = true; - npc.buffImmune[ModContent.BuffType()] = true; - npc.buffImmune[ModContent.BuffType()] = true; banner = npc.type; bannerItem = ModContent.ItemType(); } diff --git a/NPCs/NormalNPCs/PlaguedJungleSlime.cs b/NPCs/NormalNPCs/PlaguedJungleSlime.cs index 22513e92ce..955a322888 100644 --- a/NPCs/NormalNPCs/PlaguedJungleSlime.cs +++ b/NPCs/NormalNPCs/PlaguedJungleSlime.cs @@ -37,12 +37,6 @@ namespace CalamityMod.NPCs.NormalNPCs npc.noTileCollide = false; npc.HitSound = SoundID.NPCHit1; npc.DeathSound = SoundID.NPCDeath1; - npc.buffImmune[BuffID.ShadowFlame] = true; - npc.buffImmune[BuffID.Venom] = true; - npc.buffImmune[BuffID.OnFire] = true; - npc.buffImmune[BuffID.Poisoned] = true; - npc.buffImmune[ModContent.BuffType()] = true; - npc.buffImmune[ModContent.BuffType()] = true; banner = npc.type; bannerItem = ModContent.ItemType(); } diff --git a/NPCs/NormalNPCs/PlaguedTortoise.cs b/NPCs/NormalNPCs/PlaguedTortoise.cs index d105b09243..993fa93dff 100644 --- a/NPCs/NormalNPCs/PlaguedTortoise.cs +++ b/NPCs/NormalNPCs/PlaguedTortoise.cs @@ -30,12 +30,6 @@ namespace CalamityMod.NPCs.NormalNPCs npc.HitSound = SoundID.NPCHit24; npc.DeathSound = SoundID.NPCDeath27; npc.noGravity = false; - npc.buffImmune[BuffID.ShadowFlame] = true; - npc.buffImmune[BuffID.Venom] = true; - npc.buffImmune[BuffID.OnFire] = true; - npc.buffImmune[BuffID.Poisoned] = true; - npc.buffImmune[ModContent.BuffType()] = true; - npc.buffImmune[ModContent.BuffType()] = true; banner = npc.type; bannerItem = ModContent.ItemType(); } diff --git a/NPCs/NormalNPCs/SandTortoise.cs b/NPCs/NormalNPCs/SandTortoise.cs index 3d0cdd8d68..a0232bebe2 100644 --- a/NPCs/NormalNPCs/SandTortoise.cs +++ b/NPCs/NormalNPCs/SandTortoise.cs @@ -31,7 +31,6 @@ namespace CalamityMod.NPCs.NormalNPCs npc.noGravity = false; banner = npc.type; bannerItem = ModContent.ItemType(); - npc.buffImmune[BuffID.Confused] = false; } public override void HitEffect(int hitDirection, double damage) diff --git a/NPCs/NormalNPCs/ScornEater.cs b/NPCs/NormalNPCs/ScornEater.cs index b48bd28841..f87c92d4b2 100644 --- a/NPCs/NormalNPCs/ScornEater.cs +++ b/NPCs/NormalNPCs/ScornEater.cs @@ -31,24 +31,6 @@ namespace CalamityMod.NPCs.NormalNPCs npc.lifeMax = 12000; npc.knockBackResist = 0f; aiType = -1; - for (int k = 0; k < npc.buffImmune.Length; k++) - { - npc.buffImmune[k] = true; - } - npc.buffImmune[BuffID.Ichor] = false; - npc.buffImmune[BuffID.CursedInferno] = false; - npc.buffImmune[BuffID.StardustMinionBleed] = false; - npc.buffImmune[BuffID.BetsysCurse] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; npc.lavaImmune = true; npc.value = Item.buyPrice(0, 0, 50, 0); npc.DeathSound = mod.GetLegacySoundSlot(SoundType.NPCKilled, "Sounds/NPCKilled/ScornDeath"); diff --git a/NPCs/NormalNPCs/SeaUrchin.cs b/NPCs/NormalNPCs/SeaUrchin.cs index c4cc6ec4ce..e1e7e8cc7a 100644 --- a/NPCs/NormalNPCs/SeaUrchin.cs +++ b/NPCs/NormalNPCs/SeaUrchin.cs @@ -29,7 +29,6 @@ namespace CalamityMod.NPCs.NormalNPCs npc.behindTiles = true; banner = npc.type; bannerItem = ModContent.ItemType(); - npc.buffImmune[BuffID.Confused] = false; } public override void AI() diff --git a/NPCs/NormalNPCs/StormlionCharger.cs b/NPCs/NormalNPCs/StormlionCharger.cs index 4eb682ee86..4e3b793486 100644 --- a/NPCs/NormalNPCs/StormlionCharger.cs +++ b/NPCs/NormalNPCs/StormlionCharger.cs @@ -30,7 +30,6 @@ namespace CalamityMod.NPCs.NormalNPCs npc.DeathSound = SoundID.NPCDeath34; banner = npc.type; bannerItem = ModContent.ItemType(); - npc.buffImmune[BuffID.Confused] = false; } public override void HitEffect(int hitDirection, double damage) diff --git a/NPCs/NormalNPCs/SunBat.cs b/NPCs/NormalNPCs/SunBat.cs index d25f7152ac..7ef8433c82 100644 --- a/NPCs/NormalNPCs/SunBat.cs +++ b/NPCs/NormalNPCs/SunBat.cs @@ -30,7 +30,6 @@ namespace CalamityMod.NPCs.NormalNPCs npc.DeathSound = SoundID.NPCDeath4; banner = npc.type; bannerItem = ModContent.ItemType(); - npc.buffImmune[BuffID.Confused] = false; } public override void FindFrame(int frameHeight) diff --git a/NPCs/NormalNPCs/SuperDummyNPC.cs b/NPCs/NormalNPCs/SuperDummyNPC.cs index 034a8ac109..6c3660dc0e 100644 --- a/NPCs/NormalNPCs/SuperDummyNPC.cs +++ b/NPCs/NormalNPCs/SuperDummyNPC.cs @@ -21,7 +21,6 @@ namespace CalamityMod.NPCs.NormalNPCs npc.DeathSound = SoundID.NPCDeath2; npc.value = 0f; npc.knockBackResist = 0f; - npc.buffImmune[BuffID.Confused] = false; npc.netAlways = true; npc.aiStyle = 0; } diff --git a/NPCs/NormalNPCs/ThiccWaifu.cs b/NPCs/NormalNPCs/ThiccWaifu.cs index 8a9e3a41ee..7b3083e45e 100644 --- a/NPCs/NormalNPCs/ThiccWaifu.cs +++ b/NPCs/NormalNPCs/ThiccWaifu.cs @@ -34,8 +34,6 @@ namespace CalamityMod.NPCs.NormalNPCs npc.value = Item.buyPrice(0, 1, 50, 0); npc.HitSound = SoundID.NPCHit23; npc.DeathSound = SoundID.NPCDeath39; - npc.buffImmune[20] = true; - npc.buffImmune[44] = true; npc.noGravity = true; npc.noTileCollide = true; npc.rarity = 2; diff --git a/NPCs/NormalNPCs/WulfrumGyrator.cs b/NPCs/NormalNPCs/WulfrumGyrator.cs index c44266b3a8..dfdca63712 100644 --- a/NPCs/NormalNPCs/WulfrumGyrator.cs +++ b/NPCs/NormalNPCs/WulfrumGyrator.cs @@ -49,7 +49,6 @@ namespace CalamityMod.NPCs.NormalNPCs npc.DeathSound = SoundID.NPCDeath14; banner = npc.type; bannerItem = ModContent.ItemType(); - npc.buffImmune[BuffID.Confused] = false; } public override void FindFrame(int frameHeight) diff --git a/NPCs/NormalNPCs/WulfrumPylon.cs b/NPCs/NormalNPCs/WulfrumPylon.cs index 53776b2b99..8e1ce7e09d 100644 --- a/NPCs/NormalNPCs/WulfrumPylon.cs +++ b/NPCs/NormalNPCs/WulfrumPylon.cs @@ -50,7 +50,6 @@ namespace CalamityMod.NPCs.NormalNPCs npc.noTileCollide = false; npc.HitSound = SoundID.NPCHit4; npc.DeathSound = SoundID.NPCDeath14; - npc.buffImmune[BuffID.Confused] = false; banner = npc.type; bannerItem = ModContent.ItemType(); } diff --git a/NPCs/NormalNPCs/WulfrumRover.cs b/NPCs/NormalNPCs/WulfrumRover.cs index e2518f5606..316df54f57 100644 --- a/NPCs/NormalNPCs/WulfrumRover.cs +++ b/NPCs/NormalNPCs/WulfrumRover.cs @@ -43,7 +43,6 @@ namespace CalamityMod.NPCs.NormalNPCs npc.DeathSound = SoundID.NPCDeath14; banner = npc.type; bannerItem = ModContent.ItemType(); - npc.buffImmune[BuffID.Confused] = false; } public override void FindFrame(int frameHeight) diff --git a/NPCs/NormalNPCs/WulfrumSlime.cs b/NPCs/NormalNPCs/WulfrumSlime.cs index 8ac0ef9fb2..467bc4aa84 100644 --- a/NPCs/NormalNPCs/WulfrumSlime.cs +++ b/NPCs/NormalNPCs/WulfrumSlime.cs @@ -32,7 +32,6 @@ namespace CalamityMod.NPCs.NormalNPCs npc.DeathSound = SoundID.NPCDeath1; banner = npc.type; bannerItem = ModContent.ItemType(); - npc.buffImmune[BuffID.Confused] = false; } /*public override float SpawnChance(NPCSpawnInfo spawnInfo) diff --git a/NPCs/OldDuke/OldDuke.cs b/NPCs/OldDuke/OldDuke.cs index 93b3d12403..75a0add39f 100644 --- a/NPCs/OldDuke/OldDuke.cs +++ b/NPCs/OldDuke/OldDuke.cs @@ -61,10 +61,6 @@ namespace CalamityMod.NPCs.OldDuke else music = MusicID.Boss1; bossBag = ModContent.ItemType(); - for (int k = 0; k < npc.buffImmune.Length; k++) - { - npc.buffImmune[k] = true; - } } public override void SendExtraAI(BinaryWriter writer) diff --git a/NPCs/OldDuke/OldDukeSharkron.cs b/NPCs/OldDuke/OldDukeSharkron.cs index 84881262a1..6e4e76b671 100644 --- a/NPCs/OldDuke/OldDukeSharkron.cs +++ b/NPCs/OldDuke/OldDukeSharkron.cs @@ -41,10 +41,6 @@ namespace CalamityMod.NPCs.OldDuke npc.noGravity = true; npc.dontTakeDamage = true; npc.noTileCollide = true; - for (int k = 0; k < npc.buffImmune.Length; k++) - { - npc.buffImmune[k] = true; - } } public override void SendExtraAI(BinaryWriter writer) diff --git a/NPCs/OldDuke/OldDukeToothBall.cs b/NPCs/OldDuke/OldDukeToothBall.cs index c428b6e37e..577859d322 100644 --- a/NPCs/OldDuke/OldDukeToothBall.cs +++ b/NPCs/OldDuke/OldDukeToothBall.cs @@ -35,10 +35,6 @@ namespace CalamityMod.NPCs.OldDuke } npc.alpha = 255; npc.knockBackResist = 0f; - for (int k = 0; k < npc.buffImmune.Length; k++) - { - npc.buffImmune[k] = true; - } npc.HitSound = SoundID.NPCHit1; npc.DeathSound = SoundID.NPCDeath11; npc.noGravity = true; diff --git a/NPCs/Perforator/PerforatorBodyLarge.cs b/NPCs/Perforator/PerforatorBodyLarge.cs index 76ac30c409..29c55933d8 100644 --- a/NPCs/Perforator/PerforatorBodyLarge.cs +++ b/NPCs/Perforator/PerforatorBodyLarge.cs @@ -32,7 +32,6 @@ namespace CalamityMod.NPCs.Perforator aiType = -1; npc.knockBackResist = 0f; npc.alpha = 255; - npc.buffImmune[ModContent.BuffType()] = false; npc.behindTiles = true; npc.noGravity = true; npc.noTileCollide = true; diff --git a/NPCs/Perforator/PerforatorBodyMedium.cs b/NPCs/Perforator/PerforatorBodyMedium.cs index e1cb651959..c648437da3 100644 --- a/NPCs/Perforator/PerforatorBodyMedium.cs +++ b/NPCs/Perforator/PerforatorBodyMedium.cs @@ -31,7 +31,6 @@ namespace CalamityMod.NPCs.Perforator aiType = -1; npc.knockBackResist = 0f; npc.alpha = 255; - npc.buffImmune[ModContent.BuffType()] = false; npc.behindTiles = true; npc.noGravity = true; npc.noTileCollide = true; diff --git a/NPCs/Perforator/PerforatorBodySmall.cs b/NPCs/Perforator/PerforatorBodySmall.cs index 70aed2d29d..e9c3e722b0 100644 --- a/NPCs/Perforator/PerforatorBodySmall.cs +++ b/NPCs/Perforator/PerforatorBodySmall.cs @@ -32,7 +32,6 @@ namespace CalamityMod.NPCs.Perforator aiType = -1; npc.knockBackResist = 0f; npc.alpha = 255; - npc.buffImmune[ModContent.BuffType()] = false; npc.behindTiles = true; npc.noGravity = true; npc.noTileCollide = true; diff --git a/NPCs/Perforator/PerforatorHeadLarge.cs b/NPCs/Perforator/PerforatorHeadLarge.cs index 9f5ef81591..7022093d71 100644 --- a/NPCs/Perforator/PerforatorHeadLarge.cs +++ b/NPCs/Perforator/PerforatorHeadLarge.cs @@ -37,7 +37,6 @@ namespace CalamityMod.NPCs.Perforator aiType = -1; npc.knockBackResist = 0f; npc.alpha = 255; - npc.buffImmune[ModContent.BuffType()] = false; npc.behindTiles = true; npc.noGravity = true; npc.noTileCollide = true; diff --git a/NPCs/Perforator/PerforatorHeadMedium.cs b/NPCs/Perforator/PerforatorHeadMedium.cs index 56bfb01ba2..e99cc3b0e6 100644 --- a/NPCs/Perforator/PerforatorHeadMedium.cs +++ b/NPCs/Perforator/PerforatorHeadMedium.cs @@ -34,7 +34,6 @@ namespace CalamityMod.NPCs.Perforator aiType = -1; npc.knockBackResist = 0f; npc.alpha = 255; - npc.buffImmune[ModContent.BuffType()] = false; npc.behindTiles = true; npc.noGravity = true; npc.noTileCollide = true; diff --git a/NPCs/Perforator/PerforatorHeadSmall.cs b/NPCs/Perforator/PerforatorHeadSmall.cs index 85af36ea43..e76be86619 100644 --- a/NPCs/Perforator/PerforatorHeadSmall.cs +++ b/NPCs/Perforator/PerforatorHeadSmall.cs @@ -36,7 +36,6 @@ namespace CalamityMod.NPCs.Perforator aiType = -1; npc.knockBackResist = 0f; npc.alpha = 255; - npc.buffImmune[ModContent.BuffType()] = false; npc.behindTiles = true; npc.noGravity = true; npc.noTileCollide = true; diff --git a/NPCs/Perforator/PerforatorHive.cs b/NPCs/Perforator/PerforatorHive.cs index 81e19b3eab..89260de56b 100644 --- a/NPCs/Perforator/PerforatorHive.cs +++ b/NPCs/Perforator/PerforatorHive.cs @@ -49,8 +49,6 @@ namespace CalamityMod.NPCs.Perforator npc.lifeMax += (int)(npc.lifeMax * HPBoost); npc.aiStyle = -1; aiType = -1; - npc.buffImmune[ModContent.BuffType()] = true; - npc.buffImmune[ModContent.BuffType()] = true; npc.knockBackResist = 0f; npc.value = Item.buyPrice(0, 6, 0, 0); npc.boss = true; diff --git a/NPCs/Perforator/PerforatorTailLarge.cs b/NPCs/Perforator/PerforatorTailLarge.cs index 4a91bd394c..396c886c27 100644 --- a/NPCs/Perforator/PerforatorTailLarge.cs +++ b/NPCs/Perforator/PerforatorTailLarge.cs @@ -30,7 +30,6 @@ namespace CalamityMod.NPCs.Perforator aiType = -1; npc.knockBackResist = 0f; npc.alpha = 255; - npc.buffImmune[ModContent.BuffType()] = false; npc.behindTiles = true; npc.noGravity = true; npc.noTileCollide = true; diff --git a/NPCs/Perforator/PerforatorTailMedium.cs b/NPCs/Perforator/PerforatorTailMedium.cs index 2c9d1a7a6c..b6bf4ac259 100644 --- a/NPCs/Perforator/PerforatorTailMedium.cs +++ b/NPCs/Perforator/PerforatorTailMedium.cs @@ -31,7 +31,6 @@ namespace CalamityMod.NPCs.Perforator aiType = -1; npc.knockBackResist = 0f; npc.alpha = 255; - npc.buffImmune[ModContent.BuffType()] = false; npc.behindTiles = true; npc.noGravity = true; npc.noTileCollide = true; diff --git a/NPCs/Perforator/PerforatorTailSmall.cs b/NPCs/Perforator/PerforatorTailSmall.cs index c62ab2d1e6..6068ea1aa9 100644 --- a/NPCs/Perforator/PerforatorTailSmall.cs +++ b/NPCs/Perforator/PerforatorTailSmall.cs @@ -31,7 +31,6 @@ namespace CalamityMod.NPCs.Perforator npc.knockBackResist = 0f; npc.scale = 0.9f; npc.alpha = 255; - npc.buffImmune[ModContent.BuffType()] = false; npc.behindTiles = true; npc.noGravity = true; npc.noTileCollide = true; diff --git a/NPCs/PlaguebringerGoliath/PlagueBeeG.cs b/NPCs/PlaguebringerGoliath/PlagueBeeG.cs index f016377571..f9f6e66940 100644 --- a/NPCs/PlaguebringerGoliath/PlagueBeeG.cs +++ b/NPCs/PlaguebringerGoliath/PlagueBeeG.cs @@ -40,12 +40,6 @@ namespace CalamityMod.NPCs.PlaguebringerGoliath npc.noGravity = true; npc.noTileCollide = true; npc.canGhostHeal = false; - npc.buffImmune[BuffID.ShadowFlame] = true; - npc.buffImmune[BuffID.Venom] = true; - npc.buffImmune[BuffID.OnFire] = true; - npc.buffImmune[BuffID.Poisoned] = true; - npc.buffImmune[ModContent.BuffType()] = true; - npc.buffImmune[ModContent.BuffType()] = true; } public override void AI() diff --git a/NPCs/PlaguebringerGoliath/PlagueBeeLargeG.cs b/NPCs/PlaguebringerGoliath/PlagueBeeLargeG.cs index cbc06d735c..8e158996de 100644 --- a/NPCs/PlaguebringerGoliath/PlagueBeeLargeG.cs +++ b/NPCs/PlaguebringerGoliath/PlagueBeeLargeG.cs @@ -38,12 +38,6 @@ namespace CalamityMod.NPCs.PlaguebringerGoliath npc.noGravity = true; npc.noTileCollide = true; npc.canGhostHeal = false; - npc.buffImmune[BuffID.ShadowFlame] = true; - npc.buffImmune[BuffID.Venom] = true; - npc.buffImmune[BuffID.OnFire] = true; - npc.buffImmune[BuffID.Poisoned] = true; - npc.buffImmune[ModContent.BuffType()] = true; - npc.buffImmune[ModContent.BuffType()] = true; } public override void FindFrame(int frameHeight) diff --git a/NPCs/PlaguebringerGoliath/PlagueHomingMissile.cs b/NPCs/PlaguebringerGoliath/PlagueHomingMissile.cs index de032992c2..774b6defbe 100644 --- a/NPCs/PlaguebringerGoliath/PlagueHomingMissile.cs +++ b/NPCs/PlaguebringerGoliath/PlagueHomingMissile.cs @@ -35,12 +35,6 @@ namespace CalamityMod.NPCs.PlaguebringerGoliath npc.noGravity = true; npc.canGhostHeal = false; npc.noTileCollide = true; - npc.buffImmune[BuffID.ShadowFlame] = true; - npc.buffImmune[BuffID.Venom] = true; - npc.buffImmune[BuffID.OnFire] = true; - npc.buffImmune[BuffID.Poisoned] = true; - npc.buffImmune[ModContent.BuffType()] = true; - npc.buffImmune[ModContent.BuffType()] = true; } public override void AI() diff --git a/NPCs/PlaguebringerGoliath/PlaguebringerShade.cs b/NPCs/PlaguebringerGoliath/PlaguebringerShade.cs index e389e2d10f..102cfa931a 100644 --- a/NPCs/PlaguebringerGoliath/PlaguebringerShade.cs +++ b/NPCs/PlaguebringerGoliath/PlaguebringerShade.cs @@ -44,28 +44,6 @@ namespace CalamityMod.NPCs.PlaguebringerGoliath npc.aiStyle = -1; aiType = -1; animationType = NPCID.QueenBee; - for (int k = 0; k < npc.buffImmune.Length; k++) - { - npc.buffImmune[k] = true; - } - npc.buffImmune[BuffID.Ichor] = false; - npc.buffImmune[BuffID.CursedInferno] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[BuffID.Frostburn] = false; - npc.buffImmune[BuffID.Daybreak] = false; - npc.buffImmune[BuffID.BetsysCurse] = false; - npc.buffImmune[BuffID.StardustMinionBleed] = false; - npc.buffImmune[BuffID.Oiled] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; npc.noGravity = true; npc.noTileCollide = true; npc.HitSound = SoundID.NPCHit4; diff --git a/NPCs/Polterghast/PhantomFuckYou.cs b/NPCs/Polterghast/PhantomFuckYou.cs index 78a948c46c..10cfbbd867 100644 --- a/NPCs/Polterghast/PhantomFuckYou.cs +++ b/NPCs/Polterghast/PhantomFuckYou.cs @@ -31,10 +31,6 @@ namespace CalamityMod.NPCs.Polterghast npc.damage = 0; npc.lifeMax = 1500; npc.dontTakeDamage = true; - for (int k = 0; k < npc.buffImmune.Length; k++) - { - npc.buffImmune[k] = true; - } npc.HitSound = SoundID.NPCHit4; npc.DeathSound = SoundID.NPCDeath14; } diff --git a/NPCs/Polterghast/PolterPhantom.cs b/NPCs/Polterghast/PolterPhantom.cs index 13b8f14c67..88481e66a2 100644 --- a/NPCs/Polterghast/PolterPhantom.cs +++ b/NPCs/Polterghast/PolterPhantom.cs @@ -37,21 +37,6 @@ namespace CalamityMod.NPCs.Polterghast npc.aiStyle = -1; aiType = -1; npc.Opacity = 0f; - for (int k = 0; k < npc.buffImmune.Length; k++) - { - npc.buffImmune[k] = true; - } - npc.buffImmune[BuffID.Ichor] = false; - npc.buffImmune[BuffID.CursedInferno] = false; - npc.buffImmune[BuffID.Daybreak] = false; - npc.buffImmune[BuffID.StardustMinionBleed] = false; - npc.buffImmune[BuffID.BetsysCurse] = false; - npc.buffImmune[BuffID.Oiled] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; npc.noGravity = true; npc.noTileCollide = true; npc.netAlways = true; diff --git a/NPCs/Polterghast/PolterghastHook.cs b/NPCs/Polterghast/PolterghastHook.cs index a742611fd0..5d28c2d955 100644 --- a/NPCs/Polterghast/PolterghastHook.cs +++ b/NPCs/Polterghast/PolterghastHook.cs @@ -34,10 +34,6 @@ namespace CalamityMod.NPCs.Polterghast npc.dontTakeDamage = true; npc.noGravity = true; npc.noTileCollide = true; - for (int k = 0; k < npc.buffImmune.Length; k++) - { - npc.buffImmune[k] = true; - } npc.HitSound = SoundID.NPCHit34; npc.DeathSound = SoundID.NPCDeath39; } diff --git a/NPCs/ProfanedGuardians/ProfanedGuardianBoss.cs b/NPCs/ProfanedGuardians/ProfanedGuardianBoss.cs index 31e22886a3..db4162ffd3 100644 --- a/NPCs/ProfanedGuardians/ProfanedGuardianBoss.cs +++ b/NPCs/ProfanedGuardians/ProfanedGuardianBoss.cs @@ -56,25 +56,6 @@ namespace CalamityMod.NPCs.ProfanedGuardians music = calamityModMusic.GetSoundSlot(SoundType.Music, "Sounds/Music/Guardians"); else music = MusicID.Boss1; - for (int k = 0; k < npc.buffImmune.Length; k++) - { - npc.buffImmune[k] = true; - } - npc.buffImmune[BuffID.Ichor] = false; - npc.buffImmune[BuffID.CursedInferno] = false; - npc.buffImmune[BuffID.StardustMinionBleed] = false; - npc.buffImmune[BuffID.Oiled] = false; - npc.buffImmune[BuffID.BetsysCurse] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; npc.value = Item.buyPrice(0, 25, 0, 0); npc.HitSound = SoundID.NPCHit52; npc.DeathSound = SoundID.NPCDeath55; diff --git a/NPCs/ProfanedGuardians/ProfanedGuardianBoss2.cs b/NPCs/ProfanedGuardians/ProfanedGuardianBoss2.cs index f25bcc1577..cf033ef52b 100644 --- a/NPCs/ProfanedGuardians/ProfanedGuardianBoss2.cs +++ b/NPCs/ProfanedGuardians/ProfanedGuardianBoss2.cs @@ -48,25 +48,6 @@ namespace CalamityMod.NPCs.ProfanedGuardians music = calamityModMusic.GetSoundSlot(SoundType.Music, "Sounds/Music/Guardians"); else music = MusicID.Boss1; - for (int k = 0; k < npc.buffImmune.Length; k++) - { - npc.buffImmune[k] = true; - } - npc.buffImmune[BuffID.Ichor] = false; - npc.buffImmune[BuffID.CursedInferno] = false; - npc.buffImmune[BuffID.StardustMinionBleed] = false; - npc.buffImmune[BuffID.Oiled] = false; - npc.buffImmune[BuffID.BetsysCurse] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; npc.HitSound = SoundID.NPCHit52; npc.DeathSound = SoundID.NPCDeath55; } diff --git a/NPCs/ProfanedGuardians/ProfanedGuardianBoss3.cs b/NPCs/ProfanedGuardians/ProfanedGuardianBoss3.cs index b91d6551af..83f01d6f2e 100644 --- a/NPCs/ProfanedGuardians/ProfanedGuardianBoss3.cs +++ b/NPCs/ProfanedGuardians/ProfanedGuardianBoss3.cs @@ -48,25 +48,6 @@ namespace CalamityMod.NPCs.ProfanedGuardians music = calamityModMusic.GetSoundSlot(SoundType.Music, "Sounds/Music/Guardians"); else music = MusicID.Boss1; - for (int k = 0; k < npc.buffImmune.Length; k++) - { - npc.buffImmune[k] = true; - } - npc.buffImmune[BuffID.Ichor] = false; - npc.buffImmune[BuffID.CursedInferno] = false; - npc.buffImmune[BuffID.StardustMinionBleed] = false; - npc.buffImmune[BuffID.Oiled] = false; - npc.buffImmune[BuffID.BetsysCurse] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; npc.HitSound = SoundID.NPCHit52; npc.DeathSound = SoundID.NPCDeath55; } diff --git a/NPCs/Providence/ProvSpawnDefense.cs b/NPCs/Providence/ProvSpawnDefense.cs index cbbabba58f..89a9c9c566 100644 --- a/NPCs/Providence/ProvSpawnDefense.cs +++ b/NPCs/Providence/ProvSpawnDefense.cs @@ -40,25 +40,6 @@ namespace CalamityMod.NPCs.Providence npc.noGravity = true; npc.noTileCollide = true; aiType = -1; - for (int k = 0; k < npc.buffImmune.Length; k++) - { - npc.buffImmune[k] = true; - } - npc.buffImmune[BuffID.Ichor] = false; - npc.buffImmune[BuffID.CursedInferno] = false; - npc.buffImmune[BuffID.StardustMinionBleed] = false; - npc.buffImmune[BuffID.Oiled] = false; - npc.buffImmune[BuffID.BetsysCurse] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; npc.HitSound = SoundID.NPCHit52; npc.DeathSound = SoundID.NPCDeath55; } diff --git a/NPCs/Providence/ProvSpawnHealer.cs b/NPCs/Providence/ProvSpawnHealer.cs index 211c131622..df7d017a79 100644 --- a/NPCs/Providence/ProvSpawnHealer.cs +++ b/NPCs/Providence/ProvSpawnHealer.cs @@ -41,25 +41,6 @@ namespace CalamityMod.NPCs.Providence npc.noGravity = true; npc.noTileCollide = true; aiType = -1; - for (int k = 0; k < npc.buffImmune.Length; k++) - { - npc.buffImmune[k] = true; - } - npc.buffImmune[BuffID.Ichor] = false; - npc.buffImmune[BuffID.CursedInferno] = false; - npc.buffImmune[BuffID.StardustMinionBleed] = false; - npc.buffImmune[BuffID.Oiled] = false; - npc.buffImmune[BuffID.BetsysCurse] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; npc.HitSound = SoundID.NPCHit52; npc.DeathSound = SoundID.NPCDeath55; } diff --git a/NPCs/Providence/ProvSpawnOffense.cs b/NPCs/Providence/ProvSpawnOffense.cs index d7db761490..3d322e0b92 100644 --- a/NPCs/Providence/ProvSpawnOffense.cs +++ b/NPCs/Providence/ProvSpawnOffense.cs @@ -44,25 +44,6 @@ namespace CalamityMod.NPCs.Providence npc.noGravity = true; npc.noTileCollide = true; aiType = -1; - for (int k = 0; k < npc.buffImmune.Length; k++) - { - npc.buffImmune[k] = true; - } - npc.buffImmune[BuffID.Ichor] = false; - npc.buffImmune[BuffID.CursedInferno] = false; - npc.buffImmune[BuffID.StardustMinionBleed] = false; - npc.buffImmune[BuffID.Oiled] = false; - npc.buffImmune[BuffID.BetsysCurse] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; npc.HitSound = SoundID.NPCHit52; npc.DeathSound = SoundID.NPCDeath55; } diff --git a/NPCs/Providence/Providence.cs b/NPCs/Providence/Providence.cs index ca0a8501f2..ee844a0708 100644 --- a/NPCs/Providence/Providence.cs +++ b/NPCs/Providence/Providence.cs @@ -99,23 +99,6 @@ namespace CalamityMod.NPCs.Providence npc.value = Item.buyPrice(0, 50, 0, 0); npc.boss = true; npc.Opacity = 0f; - for (int k = 0; k < npc.buffImmune.Length; k++) - { - npc.buffImmune[k] = true; - } - npc.buffImmune[BuffID.Ichor] = false; - npc.buffImmune[BuffID.CursedInferno] = false; - npc.buffImmune[BuffID.StardustMinionBleed] = false; - npc.buffImmune[BuffID.BetsysCurse] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; npc.noGravity = true; npc.noTileCollide = true; npc.netAlways = true; diff --git a/NPCs/Ravager/FlamePillar.cs b/NPCs/Ravager/FlamePillar.cs index 8d51013816..f782d75aca 100644 --- a/NPCs/Ravager/FlamePillar.cs +++ b/NPCs/Ravager/FlamePillar.cs @@ -27,10 +27,6 @@ namespace CalamityMod.NPCs.Ravager npc.aiStyle = -1; aiType = -1; npc.knockBackResist = 0f; - for (int k = 0; k < npc.buffImmune.Length; k++) - { - npc.buffImmune[k] = true; - } npc.dontTakeDamage = true; npc.HitSound = SoundID.NPCHit4; npc.DeathSound = SoundID.NPCDeath14; diff --git a/NPCs/Ravager/RavagerBody.cs b/NPCs/Ravager/RavagerBody.cs index bded5ce97b..1a922ac011 100644 --- a/NPCs/Ravager/RavagerBody.cs +++ b/NPCs/Ravager/RavagerBody.cs @@ -58,29 +58,6 @@ namespace CalamityMod.NPCs.Ravager npc.lifeMax += (int)(npc.lifeMax * HPBoost); npc.knockBackResist = 0f; aiType = -1; - for (int k = 0; k < npc.buffImmune.Length; k++) - { - npc.buffImmune[k] = true; - } - npc.buffImmune[BuffID.Ichor] = false; - npc.buffImmune[BuffID.CursedInferno] = false; - npc.buffImmune[BuffID.Frostburn] = false; - npc.buffImmune[BuffID.Daybreak] = false; - npc.buffImmune[BuffID.BetsysCurse] = false; - npc.buffImmune[BuffID.StardustMinionBleed] = false; - npc.buffImmune[BuffID.DryadsWardDebuff] = false; - npc.buffImmune[BuffID.Oiled] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; npc.boss = true; npc.alpha = 255; npc.HitSound = SoundID.NPCHit41; diff --git a/NPCs/Ravager/RavagerClawLeft.cs b/NPCs/Ravager/RavagerClawLeft.cs index e69eff62eb..17b0a6b108 100644 --- a/NPCs/Ravager/RavagerClawLeft.cs +++ b/NPCs/Ravager/RavagerClawLeft.cs @@ -30,29 +30,6 @@ namespace CalamityMod.NPCs.Ravager npc.lifeMax = 11120; npc.knockBackResist = 0f; aiType = -1; - for (int k = 0; k < npc.buffImmune.Length; k++) - { - npc.buffImmune[k] = true; - } - npc.buffImmune[BuffID.Ichor] = false; - npc.buffImmune[BuffID.CursedInferno] = false; - npc.buffImmune[BuffID.Frostburn] = false; - npc.buffImmune[BuffID.Daybreak] = false; - npc.buffImmune[BuffID.StardustMinionBleed] = false; - npc.buffImmune[BuffID.DryadsWardDebuff] = false; - npc.buffImmune[BuffID.Oiled] = false; - npc.buffImmune[BuffID.BetsysCurse] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; npc.noGravity = true; npc.canGhostHeal = false; npc.alpha = 255; diff --git a/NPCs/Ravager/RavagerClawRight.cs b/NPCs/Ravager/RavagerClawRight.cs index 24b3279258..88df004c7b 100644 --- a/NPCs/Ravager/RavagerClawRight.cs +++ b/NPCs/Ravager/RavagerClawRight.cs @@ -30,29 +30,6 @@ namespace CalamityMod.NPCs.Ravager npc.lifeMax = 11120; npc.knockBackResist = 0f; aiType = -1; - for (int k = 0; k < npc.buffImmune.Length; k++) - { - npc.buffImmune[k] = true; - } - npc.buffImmune[BuffID.Ichor] = false; - npc.buffImmune[BuffID.CursedInferno] = false; - npc.buffImmune[BuffID.Frostburn] = false; - npc.buffImmune[BuffID.Daybreak] = false; - npc.buffImmune[BuffID.StardustMinionBleed] = false; - npc.buffImmune[BuffID.DryadsWardDebuff] = false; - npc.buffImmune[BuffID.Oiled] = false; - npc.buffImmune[BuffID.BetsysCurse] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; npc.noGravity = true; npc.canGhostHeal = false; npc.alpha = 255; diff --git a/NPCs/Ravager/RavagerHead.cs b/NPCs/Ravager/RavagerHead.cs index 9061f2d006..c4fe687dba 100644 --- a/NPCs/Ravager/RavagerHead.cs +++ b/NPCs/Ravager/RavagerHead.cs @@ -28,29 +28,6 @@ namespace CalamityMod.NPCs.Ravager npc.lifeMax = 32705; npc.knockBackResist = 0f; aiType = -1; - for (int k = 0; k < npc.buffImmune.Length; k++) - { - npc.buffImmune[k] = true; - } - npc.buffImmune[BuffID.Ichor] = false; - npc.buffImmune[BuffID.CursedInferno] = false; - npc.buffImmune[BuffID.Frostburn] = false; - npc.buffImmune[BuffID.Daybreak] = false; - npc.buffImmune[BuffID.BetsysCurse] = false; - npc.buffImmune[BuffID.StardustMinionBleed] = false; - npc.buffImmune[BuffID.DryadsWardDebuff] = false; - npc.buffImmune[BuffID.Oiled] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; npc.noGravity = true; npc.canGhostHeal = false; npc.noTileCollide = true; diff --git a/NPCs/Ravager/RavagerHead2.cs b/NPCs/Ravager/RavagerHead2.cs index 975a4ca09b..bf0da01ed6 100644 --- a/NPCs/Ravager/RavagerHead2.cs +++ b/NPCs/Ravager/RavagerHead2.cs @@ -25,10 +25,6 @@ namespace CalamityMod.NPCs.Ravager npc.lifeMax = 100; npc.knockBackResist = 0f; aiType = -1; - for (int k = 0; k < npc.buffImmune.Length; k++) - { - npc.buffImmune[k] = true; - } npc.dontTakeDamage = true; npc.noGravity = true; npc.noTileCollide = true; diff --git a/NPCs/Ravager/RavagerLegLeft.cs b/NPCs/Ravager/RavagerLegLeft.cs index d7a7fcf72b..b17916793a 100644 --- a/NPCs/Ravager/RavagerLegLeft.cs +++ b/NPCs/Ravager/RavagerLegLeft.cs @@ -27,28 +27,6 @@ namespace CalamityMod.NPCs.Ravager npc.lifeMax = 22010; npc.knockBackResist = 0f; aiType = -1; - for (int k = 0; k < npc.buffImmune.Length; k++) - { - npc.buffImmune[k] = true; - } - npc.buffImmune[BuffID.Ichor] = false; - npc.buffImmune[BuffID.CursedInferno] = false; - npc.buffImmune[BuffID.Frostburn] = false; - npc.buffImmune[BuffID.Daybreak] = false; - npc.buffImmune[BuffID.BetsysCurse] = false; - npc.buffImmune[BuffID.StardustMinionBleed] = false; - npc.buffImmune[BuffID.DryadsWardDebuff] = false; - npc.buffImmune[BuffID.Oiled] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; npc.noGravity = true; npc.canGhostHeal = false; npc.noTileCollide = true; diff --git a/NPCs/Ravager/RavagerLegRight.cs b/NPCs/Ravager/RavagerLegRight.cs index 2f467d096b..c01f381224 100644 --- a/NPCs/Ravager/RavagerLegRight.cs +++ b/NPCs/Ravager/RavagerLegRight.cs @@ -27,28 +27,6 @@ namespace CalamityMod.NPCs.Ravager npc.lifeMax = 22010; npc.knockBackResist = 0f; aiType = -1; - for (int k = 0; k < npc.buffImmune.Length; k++) - { - npc.buffImmune[k] = true; - } - npc.buffImmune[BuffID.Ichor] = false; - npc.buffImmune[BuffID.CursedInferno] = false; - npc.buffImmune[BuffID.Frostburn] = false; - npc.buffImmune[BuffID.Daybreak] = false; - npc.buffImmune[BuffID.StardustMinionBleed] = false; - npc.buffImmune[BuffID.DryadsWardDebuff] = false; - npc.buffImmune[BuffID.Oiled] = false; - npc.buffImmune[BuffID.BetsysCurse] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; npc.noGravity = true; npc.canGhostHeal = false; npc.noTileCollide = true; diff --git a/NPCs/Ravager/RockPillar.cs b/NPCs/Ravager/RockPillar.cs index 46cf2b03d3..c36ef4e161 100644 --- a/NPCs/Ravager/RockPillar.cs +++ b/NPCs/Ravager/RockPillar.cs @@ -29,10 +29,6 @@ namespace CalamityMod.NPCs.Ravager npc.aiStyle = -1; aiType = -1; npc.knockBackResist = 0f; - for (int k = 0; k < npc.buffImmune.Length; k++) - { - npc.buffImmune[k] = true; - } npc.HitSound = SoundID.NPCHit41; npc.DeathSound = SoundID.NPCDeath14; } diff --git a/NPCs/Signus/CosmicLantern.cs b/NPCs/Signus/CosmicLantern.cs index 6354ed38ed..43aa284d34 100644 --- a/NPCs/Signus/CosmicLantern.cs +++ b/NPCs/Signus/CosmicLantern.cs @@ -34,10 +34,6 @@ namespace CalamityMod.NPCs.Signus npc.chaseable = false; npc.canGhostHeal = false; npc.noTileCollide = true; - for (int k = 0; k < npc.buffImmune.Length; k++) - { - npc.buffImmune[k] = true; - } npc.HitSound = SoundID.NPCHit53; npc.DeathSound = SoundID.NPCDeath44; } diff --git a/NPCs/Signus/Signus.cs b/NPCs/Signus/Signus.cs index 8c4076557b..97a94e34f3 100644 --- a/NPCs/Signus/Signus.cs +++ b/NPCs/Signus/Signus.cs @@ -63,26 +63,6 @@ namespace CalamityMod.NPCs.Signus npc.aiStyle = -1; aiType = -1; npc.boss = true; - for (int k = 0; k < npc.buffImmune.Length; k++) - { - npc.buffImmune[k] = true; - } - npc.buffImmune[BuffID.Ichor] = false; - npc.buffImmune[BuffID.CursedInferno] = false; - npc.buffImmune[BuffID.StardustMinionBleed] = false; - npc.buffImmune[BuffID.Oiled] = false; - npc.buffImmune[BuffID.BetsysCurse] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; - npc.buffImmune[ModContent.BuffType()] = false; npc.noGravity = true; npc.noTileCollide = true; npc.netAlways = true; diff --git a/NPCs/SlimeGod/SlimeGod.cs b/NPCs/SlimeGod/SlimeGod.cs index d41471d05e..6b56b11972 100644 --- a/NPCs/SlimeGod/SlimeGod.cs +++ b/NPCs/SlimeGod/SlimeGod.cs @@ -34,7 +34,6 @@ namespace CalamityMod.NPCs.SlimeGod npc.lifeMax += (int)(npc.lifeMax * HPBoost); npc.aiStyle = -1; aiType = -1; - npc.buffImmune[ModContent.BuffType()] = false; npc.knockBackResist = 0f; animationType = NPCID.KingSlime; npc.value = 0f; diff --git a/NPCs/SlimeGod/SlimeGodCore.cs b/NPCs/SlimeGod/SlimeGodCore.cs index a66bd2da10..37054f2360 100644 --- a/NPCs/SlimeGod/SlimeGodCore.cs +++ b/NPCs/SlimeGod/SlimeGodCore.cs @@ -47,8 +47,6 @@ namespace CalamityMod.NPCs.SlimeGod NPCID.Sets.TrailingMode[npc.type] = 1; npc.aiStyle = -1; aiType = -1; - npc.buffImmune[ModContent.BuffType()] = true; - npc.buffImmune[ModContent.BuffType()] = true; npc.knockBackResist = 0f; npc.value = Item.buyPrice(0, 8, 0, 0); npc.alpha = 55; diff --git a/NPCs/SlimeGod/SlimeGodRun.cs b/NPCs/SlimeGod/SlimeGodRun.cs index fd81bad08f..4b1c28e2c1 100644 --- a/NPCs/SlimeGod/SlimeGodRun.cs +++ b/NPCs/SlimeGod/SlimeGodRun.cs @@ -34,7 +34,6 @@ namespace CalamityMod.NPCs.SlimeGod npc.lifeMax += (int)(npc.lifeMax * HPBoost); npc.knockBackResist = 0f; animationType = NPCID.KingSlime; - npc.buffImmune[ModContent.BuffType()] = false; npc.value = 0f; npc.alpha = 55; npc.lavaImmune = false; diff --git a/NPCs/SlimeGod/SlimeGodRunSplit.cs b/NPCs/SlimeGod/SlimeGodRunSplit.cs index f6ca0ba5e5..a1a30a9955 100644 --- a/NPCs/SlimeGod/SlimeGodRunSplit.cs +++ b/NPCs/SlimeGod/SlimeGodRunSplit.cs @@ -33,7 +33,6 @@ namespace CalamityMod.NPCs.SlimeGod npc.scale = 0.8f; npc.defense = 10; npc.knockBackResist = 0f; - npc.buffImmune[ModContent.BuffType()] = false; animationType = NPCID.KingSlime; npc.value = Item.buyPrice(0, 1, 0, 0); npc.alpha = 55; diff --git a/NPCs/SlimeGod/SlimeGodSplit.cs b/NPCs/SlimeGod/SlimeGodSplit.cs index 53168a84f3..98d93fd1e4 100644 --- a/NPCs/SlimeGod/SlimeGodSplit.cs +++ b/NPCs/SlimeGod/SlimeGodSplit.cs @@ -35,7 +35,6 @@ namespace CalamityMod.NPCs.SlimeGod npc.aiStyle = -1; aiType = -1; npc.knockBackResist = 0f; - npc.buffImmune[ModContent.BuffType()] = false; animationType = NPCID.KingSlime; npc.value = Item.buyPrice(0, 1, 0, 0); npc.alpha = 55; diff --git a/NPCs/StormWeaver/StormWeaverBody.cs b/NPCs/StormWeaver/StormWeaverBody.cs index 8ddd7f79ce..6611bf37f2 100644 --- a/NPCs/StormWeaver/StormWeaverBody.cs +++ b/NPCs/StormWeaver/StormWeaverBody.cs @@ -53,10 +53,6 @@ namespace CalamityMod.NPCs.StormWeaver npc.DeathSound = SoundID.NPCDeath14; npc.netAlways = true; npc.chaseable = false; - for (int k = 0; k < npc.buffImmune.Length; k++) - { - npc.buffImmune[k] = true; - } npc.dontCountMe = true; if (CalamityWorld.death || BossRushEvent.BossRushActive) diff --git a/NPCs/StormWeaver/StormWeaverBodyNaked.cs b/NPCs/StormWeaver/StormWeaverBodyNaked.cs index ecf3120295..97cf29072e 100644 --- a/NPCs/StormWeaver/StormWeaverBodyNaked.cs +++ b/NPCs/StormWeaver/StormWeaverBodyNaked.cs @@ -55,10 +55,6 @@ namespace CalamityMod.NPCs.StormWeaver npc.HitSound = SoundID.NPCHit13; npc.DeathSound = SoundID.NPCDeath13; npc.netAlways = true; - for (int k = 0; k < npc.buffImmune.Length; k++) - { - npc.buffImmune[k] = true; - } npc.dontCountMe = true; if (CalamityWorld.death || BossRushEvent.BossRushActive) diff --git a/NPCs/StormWeaver/StormWeaverHead.cs b/NPCs/StormWeaver/StormWeaverHead.cs index 85bd21cfe4..722289a625 100644 --- a/NPCs/StormWeaver/StormWeaverHead.cs +++ b/NPCs/StormWeaver/StormWeaverHead.cs @@ -63,10 +63,6 @@ namespace CalamityMod.NPCs.StormWeaver npc.HitSound = SoundID.NPCHit4; npc.DeathSound = SoundID.NPCDeath14; npc.netAlways = true; - for (int k = 0; k < npc.buffImmune.Length; k++) - { - npc.buffImmune[k] = true; - } if (CalamityWorld.death || BossRushEvent.BossRushActive) npc.scale = 1.2f; diff --git a/NPCs/StormWeaver/StormWeaverHeadNaked.cs b/NPCs/StormWeaver/StormWeaverHeadNaked.cs index f2aaef8f43..ddab19d494 100644 --- a/NPCs/StormWeaver/StormWeaverHeadNaked.cs +++ b/NPCs/StormWeaver/StormWeaverHeadNaked.cs @@ -67,10 +67,6 @@ namespace CalamityMod.NPCs.StormWeaver npc.HitSound = SoundID.NPCHit13; npc.DeathSound = SoundID.NPCDeath13; npc.netAlways = true; - for (int k = 0; k < npc.buffImmune.Length; k++) - { - npc.buffImmune[k] = true; - } if (CalamityWorld.death || BossRushEvent.BossRushActive) npc.scale = 1.2f; diff --git a/NPCs/StormWeaver/StormWeaverTail.cs b/NPCs/StormWeaver/StormWeaverTail.cs index ce31d1c7e1..1b0837a4fe 100644 --- a/NPCs/StormWeaver/StormWeaverTail.cs +++ b/NPCs/StormWeaver/StormWeaverTail.cs @@ -51,10 +51,6 @@ namespace CalamityMod.NPCs.StormWeaver npc.HitSound = SoundID.NPCHit53; npc.DeathSound = SoundID.NPCDeath14; npc.netAlways = true; - for (int k = 0; k < npc.buffImmune.Length; k++) - { - npc.buffImmune[k] = true; - } npc.dontCountMe = true; if (CalamityWorld.death || BossRushEvent.BossRushActive) diff --git a/NPCs/StormWeaver/StormWeaverTailNaked.cs b/NPCs/StormWeaver/StormWeaverTailNaked.cs index 955a15080c..fd0c40a377 100644 --- a/NPCs/StormWeaver/StormWeaverTailNaked.cs +++ b/NPCs/StormWeaver/StormWeaverTailNaked.cs @@ -54,10 +54,6 @@ namespace CalamityMod.NPCs.StormWeaver npc.HitSound = SoundID.NPCHit13; npc.DeathSound = SoundID.NPCDeath13; npc.netAlways = true; - for (int k = 0; k < npc.buffImmune.Length; k++) - { - npc.buffImmune[k] = true; - } npc.dontCountMe = true; if (CalamityWorld.death || BossRushEvent.BossRushActive) diff --git a/NPCs/SulphurousSea/AnthozoanCrab.cs b/NPCs/SulphurousSea/AnthozoanCrab.cs index f1d141f0f3..52109275aa 100644 --- a/NPCs/SulphurousSea/AnthozoanCrab.cs +++ b/NPCs/SulphurousSea/AnthozoanCrab.cs @@ -30,10 +30,6 @@ namespace CalamityMod.NPCs.SulphurousSea npc.defense = 22; npc.lifeMax = 920; npc.aiStyle = aiType = -1; - for (int k = 0; k < npc.buffImmune.Length; k++) - { - npc.buffImmune[k] = true; - } npc.value = Item.buyPrice(0, 0, 1, 0); npc.HitSound = SoundID.NPCHit38; npc.DeathSound = SoundID.NPCDeath46; diff --git a/NPCs/SulphurousSea/BelchingCoral.cs b/NPCs/SulphurousSea/BelchingCoral.cs index f92862330f..7da6e84a8c 100644 --- a/NPCs/SulphurousSea/BelchingCoral.cs +++ b/NPCs/SulphurousSea/BelchingCoral.cs @@ -29,10 +29,6 @@ namespace CalamityMod.NPCs.SulphurousSea npc.defense = 25; npc.lifeMax = 1000; npc.aiStyle = aiType = -1; - for (int k = 0; k < npc.buffImmune.Length; k++) - { - npc.buffImmune[k] = true; - } npc.value = Item.buyPrice(0, 0, 3, 50); npc.HitSound = SoundID.NPCHit42; npc.DeathSound = SoundID.NPCDeath5; diff --git a/NPCs/SulphurousSea/Catfish.cs b/NPCs/SulphurousSea/Catfish.cs index 59875b9a5f..48bd63fd84 100644 --- a/NPCs/SulphurousSea/Catfish.cs +++ b/NPCs/SulphurousSea/Catfish.cs @@ -24,10 +24,6 @@ namespace CalamityMod.NPCs.SulphurousSea npc.lifeMax = 120; npc.aiStyle = -1; aiType = -1; - for (int k = 0; k < npc.buffImmune.Length; k++) - { - npc.buffImmune[k] = true; - } npc.value = Item.buyPrice(0, 0, 1, 0); npc.HitSound = SoundID.NPCHit1; npc.DeathSound = SoundID.NPCDeath40; diff --git a/NPCs/SulphurousSea/Flounder.cs b/NPCs/SulphurousSea/Flounder.cs index 9adf0576ed..4661cc92d8 100644 --- a/NPCs/SulphurousSea/Flounder.cs +++ b/NPCs/SulphurousSea/Flounder.cs @@ -24,10 +24,6 @@ namespace CalamityMod.NPCs.SulphurousSea npc.lifeMax = 40; npc.aiStyle = -1; aiType = -1; - for (int k = 0; k < npc.buffImmune.Length; k++) - { - npc.buffImmune[k] = true; - } npc.value = Item.buyPrice(0, 0, 0, 80); npc.HitSound = SoundID.NPCHit50; npc.DeathSound = SoundID.NPCDeath53; diff --git a/NPCs/SulphurousSea/Gnasher.cs b/NPCs/SulphurousSea/Gnasher.cs index 001d0f2e29..0346d252de 100644 --- a/NPCs/SulphurousSea/Gnasher.cs +++ b/NPCs/SulphurousSea/Gnasher.cs @@ -29,10 +29,6 @@ namespace CalamityMod.NPCs.SulphurousSea npc.value = Item.buyPrice(0, 0, 0, 60); npc.HitSound = SoundID.NPCHit50; npc.DeathSound = SoundID.NPCDeath54; - for (int k = 0; k < npc.buffImmune.Length; k++) - { - npc.buffImmune[k] = true; - } banner = npc.type; bannerItem = ModContent.ItemType(); } diff --git a/NPCs/SulphurousSea/Mauler.cs b/NPCs/SulphurousSea/Mauler.cs index f4664c9eb8..feea79b679 100644 --- a/NPCs/SulphurousSea/Mauler.cs +++ b/NPCs/SulphurousSea/Mauler.cs @@ -35,10 +35,6 @@ namespace CalamityMod.NPCs.SulphurousSea npc.lifeMax = 165000; npc.aiStyle = -1; aiType = -1; - for (int k = 0; k < npc.buffImmune.Length; k++) - { - npc.buffImmune[k] = true; - } npc.value = Item.buyPrice(0, 25, 0, 0); npc.HitSound = SoundID.NPCHit1; npc.DeathSound = SoundID.NPCDeath60; diff --git a/NPCs/SulphurousSea/MicrobialCluster.cs b/NPCs/SulphurousSea/MicrobialCluster.cs index 4136974dd3..c7046b8da1 100644 --- a/NPCs/SulphurousSea/MicrobialCluster.cs +++ b/NPCs/SulphurousSea/MicrobialCluster.cs @@ -23,10 +23,6 @@ namespace CalamityMod.NPCs.SulphurousSea npc.height = 24; npc.lifeMax = 5; npc.aiStyle = aiType = -1; - for (int k = 0; k < npc.buffImmune.Length; k++) - { - npc.buffImmune[k] = true; - } npc.noTileCollide = false; npc.noGravity = true; npc.HitSound = SoundID.NPCHit1; diff --git a/NPCs/SulphurousSea/Trasher.cs b/NPCs/SulphurousSea/Trasher.cs index 1f8d266c09..f08dc8781f 100644 --- a/NPCs/SulphurousSea/Trasher.cs +++ b/NPCs/SulphurousSea/Trasher.cs @@ -31,10 +31,6 @@ namespace CalamityMod.NPCs.SulphurousSea npc.lifeMax = 200; npc.aiStyle = -1; aiType = -1; - for (int k = 0; k < npc.buffImmune.Length; k++) - { - npc.buffImmune[k] = true; - } npc.value = Item.buyPrice(0, 0, 3, 0); npc.HitSound = SoundID.NPCHit1; npc.DeathSound = SoundID.NPCDeath5; diff --git a/NPCs/SunkenSea/GiantClam.cs b/NPCs/SunkenSea/GiantClam.cs index ac602ea935..50e6f4cfbd 100644 --- a/NPCs/SunkenSea/GiantClam.cs +++ b/NPCs/SunkenSea/GiantClam.cs @@ -46,7 +46,6 @@ namespace CalamityMod.NPCs.SunkenSea npc.defense = 9999; npc.DR_NERD(0.3f); npc.lifeMax = Main.hardMode ? 7500 : 1250; - npc.buffImmune[ModContent.BuffType()] = false; npc.aiStyle = -1; aiType = -1; npc.value = Main.hardMode ? Item.buyPrice(0, 10, 0, 0) : Item.buyPrice(0, 1, 0, 0); diff --git a/NPCs/SunkenSea/SeaSerpent1.cs b/NPCs/SunkenSea/SeaSerpent1.cs index a65b0aee2d..8edb7c8c7d 100644 --- a/NPCs/SunkenSea/SeaSerpent1.cs +++ b/NPCs/SunkenSea/SeaSerpent1.cs @@ -30,10 +30,6 @@ namespace CalamityMod.NPCs.SunkenSea aiType = -1; npc.knockBackResist = 0f; npc.value = Item.buyPrice(0, 0, 20, 0); - for (int k = 0; k < npc.buffImmune.Length; k++) - { - npc.buffImmune[k] = true; - } npc.behindTiles = true; npc.noGravity = true; npc.noTileCollide = true; diff --git a/NPCs/SunkenSea/SeaSerpent2.cs b/NPCs/SunkenSea/SeaSerpent2.cs index 6534de15c5..f239eae8b6 100644 --- a/NPCs/SunkenSea/SeaSerpent2.cs +++ b/NPCs/SunkenSea/SeaSerpent2.cs @@ -26,10 +26,6 @@ namespace CalamityMod.NPCs.SunkenSea aiType = -1; //new npc.knockBackResist = 0f; npc.alpha = 255; - for (int k = 0; k < npc.buffImmune.Length; k++) - { - npc.buffImmune[k] = true; - } npc.behindTiles = true; npc.noGravity = true; npc.noTileCollide = true; diff --git a/NPCs/SunkenSea/SeaSerpent3.cs b/NPCs/SunkenSea/SeaSerpent3.cs index cb4b02cc7d..4f890e5dd3 100644 --- a/NPCs/SunkenSea/SeaSerpent3.cs +++ b/NPCs/SunkenSea/SeaSerpent3.cs @@ -23,10 +23,6 @@ namespace CalamityMod.NPCs.SunkenSea aiType = -1; //new npc.knockBackResist = 0f; npc.alpha = 255; - for (int k = 0; k < npc.buffImmune.Length; k++) - { - npc.buffImmune[k] = true; - } npc.behindTiles = true; npc.noGravity = true; npc.noTileCollide = true; diff --git a/NPCs/SunkenSea/SeaSerpent4.cs b/NPCs/SunkenSea/SeaSerpent4.cs index faddc7c362..7fd77f36e1 100644 --- a/NPCs/SunkenSea/SeaSerpent4.cs +++ b/NPCs/SunkenSea/SeaSerpent4.cs @@ -23,10 +23,6 @@ namespace CalamityMod.NPCs.SunkenSea aiType = -1; //new npc.knockBackResist = 0f; npc.alpha = 255; - for (int k = 0; k < npc.buffImmune.Length; k++) - { - npc.buffImmune[k] = true; - } npc.behindTiles = true; npc.noGravity = true; npc.noTileCollide = true; diff --git a/NPCs/SunkenSea/SeaSerpent5.cs b/NPCs/SunkenSea/SeaSerpent5.cs index ddb07b0079..fca9623c43 100644 --- a/NPCs/SunkenSea/SeaSerpent5.cs +++ b/NPCs/SunkenSea/SeaSerpent5.cs @@ -23,10 +23,6 @@ namespace CalamityMod.NPCs.SunkenSea aiType = -1; //new npc.knockBackResist = 0f; npc.alpha = 255; - for (int k = 0; k < npc.buffImmune.Length; k++) - { - npc.buffImmune[k] = true; - } npc.behindTiles = true; npc.noGravity = true; npc.noTileCollide = true; diff --git a/NPCs/SupremeCalamitas/SCalWormBody.cs b/NPCs/SupremeCalamitas/SCalWormBody.cs index 06bdd37cb8..5361dee67f 100644 --- a/NPCs/SupremeCalamitas/SCalWormBody.cs +++ b/NPCs/SupremeCalamitas/SCalWormBody.cs @@ -50,10 +50,6 @@ namespace CalamityMod.NPCs.SupremeCalamitas npc.HitSound = SoundID.NPCHit4; npc.DeathSound = SoundID.NPCDeath14; npc.netAlways = true; - for (int k = 0; k < npc.buffImmune.Length; k++) - { - npc.buffImmune[k] = true; - } npc.dontCountMe = true; } diff --git a/NPCs/SupremeCalamitas/SCalWormBodyWeak.cs b/NPCs/SupremeCalamitas/SCalWormBodyWeak.cs index 1aa097ef65..7c408348f0 100644 --- a/NPCs/SupremeCalamitas/SCalWormBodyWeak.cs +++ b/NPCs/SupremeCalamitas/SCalWormBodyWeak.cs @@ -48,10 +48,6 @@ namespace CalamityMod.NPCs.SupremeCalamitas npc.HitSound = SoundID.NPCHit13; npc.DeathSound = SoundID.NPCDeath13; npc.netAlways = true; - for (int k = 0; k < npc.buffImmune.Length; k++) - { - npc.buffImmune[k] = true; - } npc.dontCountMe = true; } diff --git a/NPCs/SupremeCalamitas/SCalWormHead.cs b/NPCs/SupremeCalamitas/SCalWormHead.cs index 9f376a84ce..12b5e043ec 100644 --- a/NPCs/SupremeCalamitas/SCalWormHead.cs +++ b/NPCs/SupremeCalamitas/SCalWormHead.cs @@ -46,10 +46,6 @@ namespace CalamityMod.NPCs.SupremeCalamitas npc.scale = 1.35f; } npc.alpha = 255; - for (int k = 0; k < npc.buffImmune.Length; k++) - { - npc.buffImmune[k] = true; - } npc.chaseable = false; npc.behindTiles = true; npc.noGravity = true; diff --git a/NPCs/SupremeCalamitas/SCalWormHeart.cs b/NPCs/SupremeCalamitas/SCalWormHeart.cs index f9f859796a..37f5062a72 100644 --- a/NPCs/SupremeCalamitas/SCalWormHeart.cs +++ b/NPCs/SupremeCalamitas/SCalWormHeart.cs @@ -28,10 +28,6 @@ namespace CalamityMod.NPCs.SupremeCalamitas npc.canGhostHeal = false; npc.HitSound = SoundID.NPCHit13; npc.DeathSound = SoundID.NPCDeath1; - for (int k = 0; k < npc.buffImmune.Length; k++) - { - npc.buffImmune[k] = true; - } } public override void AI() diff --git a/NPCs/SupremeCalamitas/SCalWormTail.cs b/NPCs/SupremeCalamitas/SCalWormTail.cs index bc04772d16..af2cfbb6e3 100644 --- a/NPCs/SupremeCalamitas/SCalWormTail.cs +++ b/NPCs/SupremeCalamitas/SCalWormTail.cs @@ -49,10 +49,6 @@ namespace CalamityMod.NPCs.SupremeCalamitas npc.HitSound = SoundID.NPCHit4; npc.DeathSound = SoundID.NPCDeath14; npc.netAlways = true; - for (int k = 0; k < npc.buffImmune.Length; k++) - { - npc.buffImmune[k] = true; - } npc.dontCountMe = true; } diff --git a/NPCs/SupremeCalamitas/SoulSeekerSupreme.cs b/NPCs/SupremeCalamitas/SoulSeekerSupreme.cs index f9b35903fd..b5c7040ebe 100644 --- a/NPCs/SupremeCalamitas/SoulSeekerSupreme.cs +++ b/NPCs/SupremeCalamitas/SoulSeekerSupreme.cs @@ -34,12 +34,6 @@ namespace CalamityMod.NPCs.SupremeCalamitas npc.defense = 60; npc.DR_NERD(0.25f); npc.LifeMaxNERB(Main.expertMode ? 90000 : 50000, 170000); - for (int k = 0; k < npc.buffImmune.Length; k++) - { - npc.buffImmune[k] = true; - } - npc.buffImmune[BuffID.Ichor] = false; - npc.buffImmune[BuffID.CursedInferno] = false; npc.HitSound = SoundID.NPCHit4; npc.DeathSound = SoundID.NPCDeath14; } diff --git a/NPCs/SupremeCalamitas/SupremeCalamitas.cs b/NPCs/SupremeCalamitas/SupremeCalamitas.cs index 828b1dcc39..e01cf0a5af 100644 --- a/NPCs/SupremeCalamitas/SupremeCalamitas.cs +++ b/NPCs/SupremeCalamitas/SupremeCalamitas.cs @@ -96,12 +96,6 @@ namespace CalamityMod.NPCs.SupremeCalamitas npc.aiStyle = -1; aiType = -1; npc.knockBackResist = 0f; - for (int k = 0; k < npc.buffImmune.Length; k++) - { - npc.buffImmune[k] = true; - } - npc.buffImmune[BuffID.Ichor] = false; - npc.buffImmune[BuffID.CursedInferno] = false; npc.dontTakeDamage = false; npc.chaseable = true; npc.boss = true; diff --git a/NPCs/SupremeCalamitas/SupremeCataclysm.cs b/NPCs/SupremeCalamitas/SupremeCataclysm.cs index bc421188d4..afc957fadb 100644 --- a/NPCs/SupremeCalamitas/SupremeCataclysm.cs +++ b/NPCs/SupremeCalamitas/SupremeCataclysm.cs @@ -40,12 +40,6 @@ namespace CalamityMod.NPCs.SupremeCalamitas npc.aiStyle = -1; aiType = -1; npc.knockBackResist = 0f; - for (int k = 0; k < npc.buffImmune.Length; k++) - { - npc.buffImmune[k] = true; - } - npc.buffImmune[BuffID.Ichor] = false; - npc.buffImmune[BuffID.CursedInferno] = false; npc.noGravity = true; npc.noTileCollide = true; npc.HitSound = SoundID.NPCHit4; diff --git a/NPCs/SupremeCalamitas/SupremeCatastrophe.cs b/NPCs/SupremeCalamitas/SupremeCatastrophe.cs index f906318812..ce50adb7de 100644 --- a/NPCs/SupremeCalamitas/SupremeCatastrophe.cs +++ b/NPCs/SupremeCalamitas/SupremeCatastrophe.cs @@ -42,12 +42,6 @@ namespace CalamityMod.NPCs.SupremeCalamitas npc.knockBackResist = 0f; npc.noGravity = true; npc.noTileCollide = true; - for (int k = 0; k < npc.buffImmune.Length; k++) - { - npc.buffImmune[k] = true; - } - npc.buffImmune[BuffID.Ichor] = false; - npc.buffImmune[BuffID.CursedInferno] = false; npc.HitSound = SoundID.NPCHit4; npc.DeathSound = SoundID.NPCDeath14; } diff --git a/Utilities/NPCStats.cs b/Utilities/NPCStats.cs index f34c9710a4..a99d2c9922 100644 --- a/Utilities/NPCStats.cs +++ b/Utilities/NPCStats.cs @@ -1,4 +1,9 @@ +using CalamityMod.Buffs.DamageOverTime; +using CalamityMod.Buffs.StatDebuffs; +using CalamityMod.NPCs.Abyss; +using CalamityMod.NPCs.AcidRain; using CalamityMod.NPCs.AquaticScourge; +using CalamityMod.NPCs.Astral; using CalamityMod.NPCs.AstrumAureus; using CalamityMod.NPCs.AstrumDeus; using CalamityMod.NPCs.BrimstoneElemental; @@ -10,6 +15,7 @@ using CalamityMod.NPCs.Cryogen; using CalamityMod.NPCs.DesertScourge; using CalamityMod.NPCs.DevourerofGods; using CalamityMod.NPCs.HiveMind; +using CalamityMod.NPCs.GreatSandShark; using CalamityMod.NPCs.Leviathan; using CalamityMod.NPCs.NormalNPCs; using CalamityMod.NPCs.OldDuke; @@ -22,6 +28,8 @@ using CalamityMod.NPCs.Ravager; using CalamityMod.NPCs.Signus; using CalamityMod.NPCs.SlimeGod; using CalamityMod.NPCs.StormWeaver; +using CalamityMod.NPCs.SulphurousSea; +using CalamityMod.NPCs.SunkenSea; using CalamityMod.NPCs.SupremeCalamitas; using CalamityMod.NPCs.Yharon; using CalamityMod.Projectiles.Boss; @@ -47,6 +55,7 @@ namespace CalamityMod public static SortedDictionary ExpertDamageMultiplier; public static SortedDictionary ContactDamageValues; public static SortedDictionary, int[]> ProjectileDamageValues; + public static SortedDictionary> DebuffImmunities; }; #endregion @@ -134,6 +143,31 @@ namespace CalamityMod bool exists = BossStats.ExpertDamageMultiplier.TryGetValue(npc.type, out double damageMult); return exists ? damageMult : 1D; } + + public static void SetNPCDebuffImmunities(this NPC npc) + { + // Safety check: If for some reason the debuff array is not initialized yet, return and do nothing. + // If the npc is not in the dictionary, return and do nothing. + // Also, can I just say that I hate Sorted Dictionaries and Tuples and want to make something explode? -Ben + var stupidTupleThing = new Tuple(true, new int[] {}); + bool exists = BossStats.DebuffImmunities.TryGetValue(npc.type, out stupidTupleThing); + if (npc.modNPC is null || !exists) + return; + + // If the npc is immune to everything, make it immune to everything + if (stupidTupleThing.Item1) + { + for (int k = 0; k < npc.buffImmune.Length; k++) + { + npc.buffImmune[k] = true; + } + } + // Then set debuff vulnerabilities, or immunities if not immune to everything + for (int i = 0; i < stupidTupleThing.Item2.Length; ++i) + { + npc.buffImmune[stupidTupleThing.Item2[i]] = !stupidTupleThing.Item1; + } + } #endregion #region Load/Unload @@ -765,6 +799,1059 @@ namespace CalamityMod { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 400, 600, 632, 648, 948 } }, { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 350, 528, 556, 572, 834 } } }; + + BossStats.DebuffImmunities = new SortedDictionary> + { + { ModContent.NPCType(), new Tuple(true, new int[] { }) }, + + { ModContent.NPCType(), new Tuple(true, new int[] { }) }, + { ModContent.NPCType(), new Tuple(true, new int[] { }) }, + { ModContent.NPCType(), new Tuple(true, new int[] { }) }, + { ModContent.NPCType(), new Tuple(false, new int[] { }) }, + { ModContent.NPCType(), new Tuple(false, new int[] { }) }, + { ModContent.NPCType(), new Tuple(false, new int[] { }) }, + { ModContent.NPCType(), new Tuple(false, new int[] { }) }, + { ModContent.NPCType(), new Tuple(false, new int[] { }) }, + { ModContent.NPCType(), new Tuple(false, new int[] { }) }, + + { ModContent.NPCType(), new Tuple(false, new int[] { }) }, + { ModContent.NPCType(), new Tuple(false, new int[] { }) }, + + { ModContent.NPCType(), new Tuple(false, new int[] { }) }, + { ModContent.NPCType(), new Tuple(false, new int[] { }) }, + { ModContent.NPCType(), new Tuple(false, new int[] { }) }, + { ModContent.NPCType(), new Tuple(false, new int[] { }) }, + { ModContent.NPCType(), new Tuple(false, new int[] { }) }, + { ModContent.NPCType(), new Tuple(false, new int[] { }) }, + + { ModContent.NPCType(), new Tuple(false, new int[] { }) }, + { ModContent.NPCType(), new Tuple(false, new int[] { }) }, + { ModContent.NPCType(), new Tuple(false, new int[] { }) }, + { ModContent.NPCType(), new Tuple(false, new int[] { }) }, + { ModContent.NPCType(), new Tuple(false, new int[] { }) }, + { ModContent.NPCType(), new Tuple(false, new int[] { }) }, + { ModContent.NPCType(), new Tuple(false, new int[] { }) }, + { ModContent.NPCType(), new Tuple(false, new int[] { }) }, + { ModContent.NPCType(), new Tuple(false, new int[] { }) }, + { ModContent.NPCType(), new Tuple(false, new int[] { }) }, + + { ModContent.NPCType(), new Tuple(false, new int[] { }) }, + { ModContent.NPCType(), new Tuple(false, new int[] { }) }, + { ModContent.NPCType(), new Tuple(false, new int[] { }) }, + { ModContent.NPCType(), new Tuple(false, new int[] { }) }, + { ModContent.NPCType(), new Tuple(false, new int[] { }) }, + { ModContent.NPCType(), new Tuple(false, new int[] { BuffID.OnFire }) }, + { ModContent.NPCType(), new Tuple(false, new int[] { BuffID.OnFire }) }, + { ModContent.NPCType(), new Tuple(false, new int[] { BuffID.OnFire }) }, + { ModContent.NPCType(), new Tuple(false, new int[] { BuffID.OnFire }) }, + + { ModContent.NPCType(), new Tuple(true, new int[] { + BuffID.BetsysCurse, + BuffID.BoneJavelin, + BuffID.CursedInferno, + BuffID.Daybreak, + BuffID.DryadsWardDebuff, + BuffID.Ichor, + BuffID.Oiled, + BuffID.OnFire, + BuffID.ShadowFlame, + BuffID.SoulDrain, + BuffID.StardustMinionBleed, + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType() + }) }, + { ModContent.NPCType(), new Tuple(false, new int[] { }) }, + { ModContent.NPCType(), new Tuple(false, new int[] { }) }, + { ModContent.NPCType(), new Tuple(false, new int[] { }) }, + { ModContent.NPCType(), new Tuple(false, new int[] { }) }, + + { ModContent.NPCType(), new Tuple(true, new int[] { }) }, + { ModContent.NPCType(), new Tuple(true, new int[] { }) }, + { ModContent.NPCType(), new Tuple(true, new int[] { }) }, + { ModContent.NPCType(), new Tuple(true, new int[] { }) }, + + { ModContent.NPCType(), new Tuple(true, new int[] { + BuffID.BetsysCurse, + BuffID.BoneJavelin, + BuffID.CursedInferno, + BuffID.Daybreak, + BuffID.DryadsWardDebuff, + BuffID.Frostburn, + BuffID.Ichor, + BuffID.Oiled, + BuffID.SoulDrain, + BuffID.StardustMinionBleed, + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType() + }) }, + { ModContent.NPCType(), new Tuple(true, new int[] { + BuffID.BetsysCurse, + BuffID.BoneJavelin, + BuffID.CursedInferno, + BuffID.Daybreak, + BuffID.DryadsWardDebuff, + BuffID.Frostburn, + BuffID.Ichor, + BuffID.Oiled, + BuffID.SoulDrain, + BuffID.StardustMinionBleed, + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType() + }) }, + + { ModContent.NPCType(), new Tuple(true, new int[] { + BuffID.BetsysCurse, + BuffID.BoneJavelin, + BuffID.CursedInferno, + BuffID.Daybreak, + BuffID.DryadsWardDebuff, + BuffID.Frostburn, + BuffID.Ichor, + BuffID.Oiled, + BuffID.SoulDrain, + BuffID.StardustMinionBleed, + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType() + }) }, + { ModContent.NPCType(), new Tuple(true, new int[] { + BuffID.BetsysCurse, + BuffID.BoneJavelin, + BuffID.CursedInferno, + BuffID.Daybreak, + BuffID.DryadsWardDebuff, + BuffID.Frostburn, + BuffID.Ichor, + BuffID.Oiled, + BuffID.SoulDrain, + BuffID.StardustMinionBleed, + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType() + }) }, + { ModContent.NPCType(), new Tuple(true, new int[] { + BuffID.BetsysCurse, + BuffID.BoneJavelin, + BuffID.CursedInferno, + BuffID.Daybreak, + BuffID.DryadsWardDebuff, + BuffID.Frostburn, + BuffID.Ichor, + BuffID.Oiled, + BuffID.SoulDrain, + BuffID.StardustMinionBleed, + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType() + }) }, + { ModContent.NPCType(), new Tuple(true, new int[] { + BuffID.BetsysCurse, + BuffID.BoneJavelin, + BuffID.CursedInferno, + BuffID.Daybreak, + BuffID.DryadsWardDebuff, + BuffID.Frostburn, + BuffID.Ichor, + BuffID.Oiled, + BuffID.SoulDrain, + BuffID.StardustMinionBleed, + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType() + }) }, + { ModContent.NPCType(), new Tuple(true, new int[] { + BuffID.BetsysCurse, + BuffID.BoneJavelin, + BuffID.CursedInferno, + BuffID.Daybreak, + BuffID.DryadsWardDebuff, + BuffID.Frostburn, + BuffID.Ichor, + BuffID.Oiled, + BuffID.SoulDrain, + BuffID.StardustMinionBleed, + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType() + }) }, + { ModContent.NPCType(), new Tuple(false, new int[] { BuffID.OnFire }) }, + + { ModContent.NPCType(), new Tuple(true, new int[] { + BuffID.BetsysCurse, + BuffID.BoneJavelin, + BuffID.CursedInferno, + BuffID.Daybreak, + BuffID.DryadsWardDebuff, + BuffID.Frostburn, + BuffID.Ichor, + BuffID.Oiled, + BuffID.SoulDrain, + BuffID.StardustMinionBleed, + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType() + }) }, + { ModContent.NPCType(), new Tuple(true, new int[] { + BuffID.BetsysCurse, + BuffID.BoneJavelin, + BuffID.CursedInferno, + BuffID.Daybreak, + BuffID.DryadsWardDebuff, + BuffID.Frostburn, + BuffID.Ichor, + BuffID.Oiled, + BuffID.SoulDrain, + BuffID.StardustMinionBleed, + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType() + }) }, + { ModContent.NPCType(), new Tuple(false, new int[] { }) }, + { ModContent.NPCType(), new Tuple(false, new int[] { }) }, + { ModContent.NPCType(), new Tuple(false, new int[] { }) }, + + { ModContent.NPCType(), new Tuple(true, new int[] { + BuffID.BetsysCurse, + BuffID.BoneJavelin, + BuffID.CursedInferno, + BuffID.Daybreak, + BuffID.DryadsWardDebuff, + BuffID.Frostburn, + BuffID.Ichor, + BuffID.Oiled, + BuffID.SoulDrain, + BuffID.StardustMinionBleed, + BuffID.Venom, + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType() + }) }, + { ModContent.NPCType(), new Tuple(true, new int[] { }) }, + + { ModContent.NPCType(), new Tuple(true, new int[] { + BuffID.BetsysCurse, + BuffID.CursedInferno, + BuffID.Daybreak, + BuffID.Frostburn, + BuffID.Ichor, + BuffID.Oiled, + BuffID.StardustMinionBleed, + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType() + }) }, + { ModContent.NPCType(), new Tuple(true, new int[] { + BuffID.BetsysCurse, + BuffID.CursedInferno, + BuffID.Daybreak, + BuffID.Frostburn, + BuffID.Ichor, + BuffID.Oiled, + BuffID.StardustMinionBleed, + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType() + }) }, + { ModContent.NPCType(), new Tuple(false, new int[] { }) }, + { ModContent.NPCType(), new Tuple(false, new int[] { + BuffID.OnFire, + BuffID.Poisoned, + BuffID.ShadowFlame, + BuffID.Venom, + ModContent.BuffType(), + ModContent.BuffType() + }) }, + { ModContent.NPCType(), new Tuple(false, new int[] { + BuffID.OnFire, + BuffID.Poisoned, + BuffID.ShadowFlame, + BuffID.Venom, + ModContent.BuffType(), + ModContent.BuffType() + }) }, + { ModContent.NPCType(), new Tuple(false, new int[] { + BuffID.OnFire, + BuffID.Poisoned, + BuffID.ShadowFlame, + BuffID.Venom, + ModContent.BuffType(), + ModContent.BuffType() + }) }, + + { ModContent.NPCType(), new Tuple(true, new int[] { + BuffID.BetsysCurse, + BuffID.CursedInferno, + BuffID.Daybreak, + BuffID.DryadsWardDebuff, + BuffID.Frostburn, + BuffID.Ichor, + BuffID.Oiled, + BuffID.StardustMinionBleed, + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType() + }) }, + { ModContent.NPCType(), new Tuple(true, new int[] { + BuffID.BetsysCurse, + BuffID.CursedInferno, + BuffID.Daybreak, + BuffID.DryadsWardDebuff, + BuffID.Frostburn, + BuffID.Ichor, + BuffID.Oiled, + BuffID.StardustMinionBleed, + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType() + }) }, + { ModContent.NPCType(), new Tuple(true, new int[] { + BuffID.BetsysCurse, + BuffID.CursedInferno, + BuffID.Daybreak, + BuffID.DryadsWardDebuff, + BuffID.Frostburn, + BuffID.Ichor, + BuffID.Oiled, + BuffID.StardustMinionBleed, + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType() + }) }, + { ModContent.NPCType(), new Tuple(true, new int[] { + BuffID.BetsysCurse, + BuffID.CursedInferno, + BuffID.Daybreak, + BuffID.DryadsWardDebuff, + BuffID.Frostburn, + BuffID.Ichor, + BuffID.Oiled, + BuffID.StardustMinionBleed, + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType() + }) }, + { ModContent.NPCType(), new Tuple(true, new int[] { + BuffID.BetsysCurse, + BuffID.CursedInferno, + BuffID.Daybreak, + BuffID.DryadsWardDebuff, + BuffID.Frostburn, + BuffID.Ichor, + BuffID.Oiled, + BuffID.StardustMinionBleed, + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType() + }) }, + { ModContent.NPCType(), new Tuple(true, new int[] { + BuffID.BetsysCurse, + BuffID.CursedInferno, + BuffID.Daybreak, + BuffID.DryadsWardDebuff, + BuffID.Frostburn, + BuffID.Ichor, + BuffID.Oiled, + BuffID.StardustMinionBleed, + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType() + }) }, + { ModContent.NPCType(), new Tuple(true, new int[] { }) }, + { ModContent.NPCType(), new Tuple(true, new int[] { }) }, + { ModContent.NPCType(), new Tuple(true, new int[] { }) }, + + { ModContent.NPCType(), new Tuple(true, new int[] { }) }, + { ModContent.NPCType(), new Tuple(true, new int[] { }) }, + { ModContent.NPCType(), new Tuple(true, new int[] { }) }, + + { ModContent.NPCType(), new Tuple(true, new int[] { + BuffID.BetsysCurse, + BuffID.CursedInferno, + BuffID.Ichor, + BuffID.Oiled, + BuffID.StardustMinionBleed, + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType() + }) }, + { ModContent.NPCType(), new Tuple(true, new int[] { + BuffID.BetsysCurse, + BuffID.CursedInferno, + BuffID.Ichor, + BuffID.Oiled, + BuffID.StardustMinionBleed, + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType() + }) }, + { ModContent.NPCType(), new Tuple(true, new int[] { + BuffID.BetsysCurse, + BuffID.CursedInferno, + BuffID.Ichor, + BuffID.Oiled, + BuffID.StardustMinionBleed, + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType() + }) }, + + { ModContent.NPCType(), new Tuple(true, new int[] { + BuffID.BetsysCurse, + BuffID.CursedInferno, + BuffID.Daybreak, + BuffID.DryadsWardDebuff, + BuffID.Ichor, + BuffID.Oiled, + BuffID.StardustMinionBleed, + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType() + }) }, + { ModContent.NPCType(), new Tuple(true, new int[] { + BuffID.BetsysCurse, + BuffID.CursedInferno, + BuffID.Daybreak, + BuffID.DryadsWardDebuff, + BuffID.Ichor, + BuffID.Oiled, + BuffID.StardustMinionBleed, + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType() + }) }, + + { ModContent.NPCType(), new Tuple(true, new int[] { + BuffID.BetsysCurse, + BuffID.CursedInferno, + BuffID.Ichor, + BuffID.StardustMinionBleed, + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType() + }) }, + { ModContent.NPCType(), new Tuple(true, new int[] { + BuffID.BetsysCurse, + BuffID.CursedInferno, + BuffID.Ichor, + BuffID.Oiled, + BuffID.StardustMinionBleed, + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType() + }) }, + { ModContent.NPCType(), new Tuple(true, new int[] { + BuffID.BetsysCurse, + BuffID.CursedInferno, + BuffID.Ichor, + BuffID.Oiled, + BuffID.StardustMinionBleed, + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType() + }) }, + { ModContent.NPCType(), new Tuple(true, new int[] { + BuffID.BetsysCurse, + BuffID.CursedInferno, + BuffID.Ichor, + BuffID.Oiled, + BuffID.StardustMinionBleed, + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType() + }) }, + + { ModContent.NPCType(), new Tuple(true, new int[] { }) }, + { ModContent.NPCType(), new Tuple(true, new int[] { }) }, + { ModContent.NPCType(), new Tuple(true, new int[] { }) }, + { ModContent.NPCType(), new Tuple(true, new int[] { }) }, + + { ModContent.NPCType(), new Tuple(true, new int[] { }) }, + { ModContent.NPCType(), new Tuple(true, new int[] { }) }, + { ModContent.NPCType(), new Tuple(true, new int[] { }) }, + { ModContent.NPCType(), new Tuple(true, new int[] { }) }, + { ModContent.NPCType(), new Tuple(true, new int[] { }) }, + { ModContent.NPCType(), new Tuple(true, new int[] { }) }, + + { ModContent.NPCType(), new Tuple(true, new int[] { + BuffID.BetsysCurse, + BuffID.CursedInferno, + BuffID.Ichor, + BuffID.Oiled, + BuffID.StardustMinionBleed, + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType() + }) }, + { ModContent.NPCType(), new Tuple(true, new int[] { }) }, + { ModContent.NPCType(), new Tuple(false, new int[] { }) }, + + { ModContent.NPCType(), new Tuple(true, new int[] { + BuffID.BetsysCurse, + BuffID.CursedInferno, + BuffID.Daybreak, + BuffID.Ichor, + BuffID.Oiled, + BuffID.StardustMinionBleed, + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType() + }) }, + { ModContent.NPCType(), new Tuple(true, new int[] { }) }, + { ModContent.NPCType(), new Tuple(true, new int[] { }) }, + { ModContent.NPCType(), new Tuple(true, new int[] { }) }, + + { ModContent.NPCType(), new Tuple(true, new int[] { }) }, + { ModContent.NPCType(), new Tuple(true, new int[] { }) }, + { ModContent.NPCType(), new Tuple(true, new int[] { }) }, + + { ModContent.NPCType(), new Tuple(true, new int[] { }) }, + { ModContent.NPCType(), new Tuple(true, new int[] { }) }, + { ModContent.NPCType(), new Tuple(true, new int[] { }) }, + { ModContent.NPCType(), new Tuple(true, new int[] { }) }, + { ModContent.NPCType(), new Tuple(true, new int[] { }) }, + { ModContent.NPCType(), new Tuple(true, new int[] { }) }, + { ModContent.NPCType(), new Tuple(true, new int[] { }) }, + { ModContent.NPCType(), new Tuple(true, new int[] { }) }, + { ModContent.NPCType(), new Tuple(true, new int[] { }) }, + + { ModContent.NPCType(), new Tuple(true, new int[] { + BuffID.CursedInferno, + BuffID.Ichor, + ModContent.BuffType(), + ModContent.BuffType() + }) }, + { ModContent.NPCType(), new Tuple(false, new int[] { }) }, + { ModContent.NPCType(), new Tuple(false, new int[] { }) }, + + { ModContent.NPCType(), new Tuple(true, new int[] { + BuffID.CursedInferno, + BuffID.Ichor + }) }, + { ModContent.NPCType(), new Tuple(true, new int[] { + BuffID.CursedInferno, + BuffID.Ichor + }) }, + { ModContent.NPCType(), new Tuple(true, new int[] { + BuffID.CursedInferno, + BuffID.Ichor + }) }, + { ModContent.NPCType(), new Tuple(true, new int[] { + BuffID.CursedInferno, + BuffID.Ichor + }) }, + { ModContent.NPCType(), new Tuple(true, new int[] { }) }, + { ModContent.NPCType(), new Tuple(true, new int[] { }) }, + { ModContent.NPCType(), new Tuple(true, new int[] { }) }, + { ModContent.NPCType(), new Tuple(true, new int[] { }) }, + { ModContent.NPCType(), new Tuple(true, new int[] { }) }, + + // The struct is called BossStats but we have all the enemies... just something to consider... + { ModContent.NPCType(), new Tuple(false, new int[] { ModContent.BuffType() }) }, + { ModContent.NPCType(), new Tuple(false, new int[] { ModContent.BuffType() }) }, + { ModContent.NPCType(), new Tuple(false, new int[] { ModContent.BuffType() }) }, + { ModContent.NPCType(), new Tuple(false, new int[] { ModContent.BuffType() }) }, + { ModContent.NPCType(), new Tuple(false, new int[] { ModContent.BuffType() }) }, + { ModContent.NPCType(), new Tuple(false, new int[] { ModContent.BuffType() }) }, + { ModContent.NPCType(), new Tuple(false, new int[] { ModContent.BuffType() }) }, + { ModContent.NPCType(), new Tuple(false, new int[] { ModContent.BuffType() }) }, + { ModContent.NPCType(), new Tuple(true, new int[] { }) }, + { ModContent.NPCType(), new Tuple(true, new int[] { }) }, + { ModContent.NPCType(), new Tuple(true, new int[] { }) }, + { ModContent.NPCType(), new Tuple(true, new int[] { }) }, + { ModContent.NPCType(), new Tuple(false, new int[] { ModContent.BuffType() }) }, + { ModContent.NPCType(), new Tuple(false, new int[] { ModContent.BuffType() }) }, + { ModContent.NPCType(), new Tuple(false, new int[] { ModContent.BuffType() }) }, + { ModContent.NPCType(), new Tuple(false, new int[] { ModContent.BuffType() }) }, + { ModContent.NPCType(), new Tuple(true, new int[] { }) }, + { ModContent.NPCType(), new Tuple(true, new int[] { }) }, + { ModContent.NPCType(), new Tuple(true, new int[] { }) }, + { ModContent.NPCType(), new Tuple(false, new int[] { ModContent.BuffType() }) }, + { ModContent.NPCType(), new Tuple(false, new int[] { ModContent.BuffType() }) }, + + { ModContent.NPCType(), new Tuple(true, new int[] { }) }, + { ModContent.NPCType(), new Tuple(true, new int[] { }) }, + { ModContent.NPCType(), new Tuple(true, new int[] { }) }, + { ModContent.NPCType(), new Tuple(true, new int[] { }) }, + { ModContent.NPCType(), new Tuple(true, new int[] { }) }, + { ModContent.NPCType(), new Tuple(true, new int[] { }) }, + { ModContent.NPCType(), new Tuple(true, new int[] { }) }, + { ModContent.NPCType(), new Tuple(true, new int[] { }) }, + { ModContent.NPCType(), new Tuple(true, new int[] { + BuffID.BetsysCurse, + BuffID.CursedInferno, + BuffID.Daybreak, + BuffID.DryadsWardDebuff, + BuffID.Frostburn, + BuffID.Ichor, + BuffID.Oiled, + BuffID.StardustMinionBleed, + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType() + }) }, + { ModContent.NPCType(), new Tuple(true, new int[] { + BuffID.BetsysCurse, + BuffID.CursedInferno, + BuffID.Daybreak, + BuffID.DryadsWardDebuff, + BuffID.Frostburn, + BuffID.Ichor, + BuffID.Oiled, + BuffID.StardustMinionBleed, + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType() + }) }, + + { ModContent.NPCType(), new Tuple(true, new int[] { }) }, + { ModContent.NPCType(), new Tuple(true, new int[] { }) }, + { ModContent.NPCType(), new Tuple(true, new int[] { }) }, + { ModContent.NPCType(), new Tuple(true, new int[] { }) }, + { ModContent.NPCType(), new Tuple(true, new int[] { }) }, + { ModContent.NPCType(), new Tuple(true, new int[] { }) }, + { ModContent.NPCType(), new Tuple(true, new int[] { }) }, + { ModContent.NPCType(), new Tuple(true, new int[] { }) }, + { ModContent.NPCType(), new Tuple(true, new int[] { }) }, + { ModContent.NPCType(), new Tuple(true, new int[] { }) }, + { ModContent.NPCType(), new Tuple(true, new int[] { }) }, + { ModContent.NPCType(), new Tuple(true, new int[] { }) }, + { ModContent.NPCType(), new Tuple(true, new int[] { }) }, + { ModContent.NPCType(), new Tuple(true, new int[] { }) }, + { ModContent.NPCType(), new Tuple(true, new int[] { }) }, + { ModContent.NPCType(), new Tuple(true, new int[] { }) }, + + { ModContent.NPCType(), new Tuple(true, new int[] { }) }, + { ModContent.NPCType(), new Tuple(true, new int[] { }) }, + { ModContent.NPCType(), new Tuple(true, new int[] { }) }, + { ModContent.NPCType(), new Tuple(true, new int[] { }) }, + { ModContent.NPCType(), new Tuple(true, new int[] { }) }, + { ModContent.NPCType(), new Tuple(true, new int[] { }) }, + { ModContent.NPCType(), new Tuple(true, new int[] { }) }, + { ModContent.NPCType(), new Tuple(true, new int[] { }) }, + { ModContent.NPCType(), new Tuple(true, new int[] { }) }, + { ModContent.NPCType(), new Tuple(true, new int[] { }) }, + { ModContent.NPCType(), new Tuple(true, new int[] { }) }, + { ModContent.NPCType(), new Tuple(true, new int[] { }) }, + { ModContent.NPCType(), new Tuple(true, new int[] { }) }, + + { ModContent.NPCType(), new Tuple(false, new int[] { ModContent.BuffType() }) }, + { ModContent.NPCType(), new Tuple(false, new int[] { ModContent.BuffType(), BuffID.Poisoned }) }, + { ModContent.NPCType(), new Tuple(false, new int[] { ModContent.BuffType(), BuffID.Poisoned }) }, + { ModContent.NPCType(), new Tuple(false, new int[] { ModContent.BuffType() }) }, + { ModContent.NPCType(), new Tuple(false, new int[] { ModContent.BuffType() }) }, + { ModContent.NPCType(), new Tuple(false, new int[] { ModContent.BuffType() }) }, + { ModContent.NPCType(), new Tuple(false, new int[] { ModContent.BuffType() }) }, + { ModContent.NPCType(), new Tuple(false, new int[] { ModContent.BuffType() }) }, + { ModContent.NPCType(), new Tuple(false, new int[] { ModContent.BuffType() }) }, + { ModContent.NPCType(), new Tuple(false, new int[] { ModContent.BuffType() }) }, + { ModContent.NPCType(), new Tuple(false, new int[] { ModContent.BuffType() }) }, + { ModContent.NPCType(), new Tuple(false, new int[] { ModContent.BuffType() }) }, + { ModContent.NPCType(), new Tuple(false, new int[] { ModContent.BuffType() }) }, + { ModContent.NPCType(), new Tuple(false, new int[] { ModContent.BuffType() }) }, + { ModContent.NPCType(), new Tuple(false, new int[] { ModContent.BuffType() }) }, + + { ModContent.NPCType(), new Tuple(true, new int[] { + BuffID.BetsysCurse, + BuffID.CursedInferno, + BuffID.Daybreak, + BuffID.DryadsWardDebuff, + BuffID.Frostburn, + BuffID.Ichor, + BuffID.Oiled, + BuffID.StardustMinionBleed, + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType() + }) }, + + { ModContent.NPCType(), new Tuple(true, new int[] { }) }, + { ModContent.NPCType(), new Tuple(true, new int[] { }) }, + { ModContent.NPCType(), new Tuple(true, new int[] { }) }, + { ModContent.NPCType(), new Tuple(true, new int[] { }) }, + { ModContent.NPCType(), new Tuple(true, new int[] { }) }, + + { ModContent.NPCType(), new Tuple(true, new int[] { + BuffID.BetsysCurse, + BuffID.CursedInferno, + BuffID.Ichor, + BuffID.Oiled, + BuffID.StardustMinionBleed, + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType() + }) }, + { ModContent.NPCType(), new Tuple(true, new int[] { + BuffID.BetsysCurse, + BuffID.CursedInferno, + BuffID.Ichor, + BuffID.Oiled, + BuffID.StardustMinionBleed, + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType() + }) }, + { ModContent.NPCType(), new Tuple(true, new int[] { + BuffID.BetsysCurse, + BuffID.CursedInferno, + BuffID.Daybreak, + BuffID.DryadsWardDebuff, + BuffID.Frostburn, + BuffID.Ichor, + BuffID.Oiled, + BuffID.StardustMinionBleed, + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType() + }) }, + { ModContent.NPCType(), new Tuple(false, new int[] { + BuffID.OnFire, + BuffID.Poisoned, + BuffID.ShadowFlame, + BuffID.Venom, + ModContent.BuffType(), + ModContent.BuffType() + }) }, + { ModContent.NPCType(), new Tuple(false, new int[] { + BuffID.OnFire, + BuffID.Poisoned, + BuffID.ShadowFlame, + BuffID.Venom, + ModContent.BuffType(), + ModContent.BuffType() + }) }, + { ModContent.NPCType(), new Tuple(false, new int[] { + BuffID.OnFire, + BuffID.Poisoned, + BuffID.ShadowFlame, + BuffID.Venom, + ModContent.BuffType(), + ModContent.BuffType() + }) }, + { ModContent.NPCType(), new Tuple(false, new int[] { + BuffID.OnFire, + BuffID.Poisoned, + BuffID.ShadowFlame, + BuffID.Venom, + ModContent.BuffType(), + ModContent.BuffType() + }) }, + { ModContent.NPCType(), new Tuple(false, new int[] { + BuffID.OnFire, + BuffID.Poisoned, + BuffID.ShadowFlame, + BuffID.Venom, + ModContent.BuffType(), + ModContent.BuffType() + }) }, + { ModContent.NPCType(), new Tuple(false, new int[] { + BuffID.OnFire, + BuffID.Poisoned, + BuffID.ShadowFlame, + BuffID.Venom, + ModContent.BuffType(), + ModContent.BuffType() + }) }, + { ModContent.NPCType(), new Tuple(true, new int[] { }) }, + { ModContent.NPCType(), new Tuple(true, new int[] { }) }, + { ModContent.NPCType(), new Tuple(true, new int[] { }) }, + { ModContent.NPCType(), new Tuple(true, new int[] { }) }, + { ModContent.NPCType(), new Tuple(false, new int[] { BuffID.Poisoned }) }, + { ModContent.NPCType(), new Tuple(false, new int[] { BuffID.OnFire }) }, + { ModContent.NPCType(), new Tuple(false, new int[] { BuffID.OnFire }) }, + { ModContent.NPCType(), new Tuple(false, new int[] { ModContent.BuffType() }) }, + { ModContent.NPCType(), new Tuple(false, new int[] { BuffID.Daybreak }) } + }; } // Destroys the BossStats struct to save memory because mod assemblies will not be fully unloaded until TML 1.4. @@ -773,6 +1860,7 @@ namespace CalamityMod BossStats.ExpertDamageMultiplier = null; BossStats.ContactDamageValues = null; BossStats.ProjectileDamageValues = null; + BossStats.DebuffImmunities = null; } #endregion } From 7499972b8c761d2e5f4a0868c408d75ae60611fc Mon Sep 17 00:00:00 2001 From: ben-tk <45545085+termigator1359@users.noreply.github.com> Date: Sun, 13 Dec 2020 21:30:25 -0500 Subject: [PATCH 3/7] comment grammar --- NPCs/CalamityGlobalNPC.cs | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/NPCs/CalamityGlobalNPC.cs b/NPCs/CalamityGlobalNPC.cs index e732195ed3..50aae3f652 100644 --- a/NPCs/CalamityGlobalNPC.cs +++ b/NPCs/CalamityGlobalNPC.cs @@ -838,7 +838,7 @@ namespace CalamityMod.NPCs #region Debuff Immunities private void DebuffImmunities(NPC npc) { - // Check out NPCStats.cs as this function sets the debuff immunities for all enemies in Cal bar the ones described below + // Check out NPCStats.cs as this function sets the debuff immunities for all enemies in Cal bar the ones described below. npc.SetNPCDebuffImmunities(); // All bosses and several enemies are automatically immune to most of the movement debuffs. Silva Stun and Exo Freeze are excluded, but will not affect a boss if it has the debuff regardless. @@ -861,7 +861,13 @@ namespace CalamityMod.NPCs npc.buffImmune[BuffID.Confused] = false; } - // Triple checks that several entities are immune to all debuffs + // Any enemy not immune to Venom shouldn't be immune to Sulphuric Poisoning as it is an upgrade. + if (!npc.buffImmune[BuffID.Venom]) + { + npc.buffImmune[BuffType()] = false; + } + + // Sets certain vanilla NPCs and all town NPCs to be immune to all debuffs. if (DestroyerIDs.Contains(npc.type) || npc.type == NPCID.SkeletronHead || (EaterofWorldsIDs.Contains(npc.type) && BossRushEvent.BossRushActive) || npc.type == NPCID.DD2EterniaCrystal || npc.townNPC || npc.type == NPCID.SpikeBall || npc.type == NPCID.BlazingWheel) { for (int k = 0; k < npc.buffImmune.Length; k++) @@ -878,22 +884,16 @@ namespace CalamityMod.NPCs } } - // Any enemy not immune to Venom, shouldn't be immune to Sulphuric Poisoning as it is an upgrade - if (!npc.buffImmune[BuffID.Venom]) - { - npc.buffImmune[BuffType()] = false; - } - - // Most bosses and boss servants are not immune to Kami Flu + // Most bosses and boss servants are not immune to Kami Flu. if (YanmeisKnifeSlash.CanRecieveCoolEffectsFrom(npc)) npc.buffImmune[BuffType()] = false; - // Nothing should be immune to Enraged + // Nothing should be immune to Enraged. npc.buffImmune[BuffType()] = false; // Extra Notes: - // Shellfish minions set debuff immunity to Shellfish Claps on enemy hits, so most things are technically not immune - // The Spiteful Candle sets the debuff immunity of Spite to all nearby enemies in the tile file for an enemy with less than 99% DR + // Shellfish minions set debuff immunity to Shellfish Claps on enemy hits, so most things are technically not immune. + // The Spiteful Candle sets the debuff immunity of Spite to all nearby enemies in the tile file for an enemy with less than 99% DR. } #endregion From a5d2dd2b519ef32182a616c27ca48f1d92708b14 Mon Sep 17 00:00:00 2001 From: ben-tk <45545085+termigator1359@users.noreply.github.com> Date: Mon, 14 Dec 2020 19:09:47 -0500 Subject: [PATCH 4/7] moved debuffs to its own file --- NPCs/CalamityGlobalNPC.cs | 2 +- Utilities/NPCDebuffs.cs | 1145 +++++++++++++++++++++++++++++++++++++ Utilities/NPCStats.cs | 1107 +---------------------------------- 3 files changed, 1161 insertions(+), 1093 deletions(-) create mode 100644 Utilities/NPCDebuffs.cs diff --git a/NPCs/CalamityGlobalNPC.cs b/NPCs/CalamityGlobalNPC.cs index 50aae3f652..5ef365ee70 100644 --- a/NPCs/CalamityGlobalNPC.cs +++ b/NPCs/CalamityGlobalNPC.cs @@ -838,7 +838,7 @@ namespace CalamityMod.NPCs #region Debuff Immunities private void DebuffImmunities(NPC npc) { - // Check out NPCStats.cs as this function sets the debuff immunities for all enemies in Cal bar the ones described below. + // Check out NPCDebuffs.cs as this function sets the debuff immunities for all enemies in Cal bar the ones described below. npc.SetNPCDebuffImmunities(); // All bosses and several enemies are automatically immune to most of the movement debuffs. Silva Stun and Exo Freeze are excluded, but will not affect a boss if it has the debuff regardless. diff --git a/Utilities/NPCDebuffs.cs b/Utilities/NPCDebuffs.cs new file mode 100644 index 0000000000..ae14119480 --- /dev/null +++ b/Utilities/NPCDebuffs.cs @@ -0,0 +1,1145 @@ +using CalamityMod.Buffs.DamageOverTime; +using CalamityMod.Buffs.StatDebuffs; +using CalamityMod.NPCs.Abyss; +using CalamityMod.NPCs.AcidRain; +using CalamityMod.NPCs.AquaticScourge; +using CalamityMod.NPCs.Astral; +using CalamityMod.NPCs.AstrumAureus; +using CalamityMod.NPCs.AstrumDeus; +using CalamityMod.NPCs.BrimstoneElemental; +using CalamityMod.NPCs.Bumblebirb; +using CalamityMod.NPCs.Calamitas; +using CalamityMod.NPCs.CeaselessVoid; +using CalamityMod.NPCs.Crabulon; +using CalamityMod.NPCs.Cryogen; +using CalamityMod.NPCs.DesertScourge; +using CalamityMod.NPCs.DevourerofGods; +using CalamityMod.NPCs.HiveMind; +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.Polterghast; +using CalamityMod.NPCs.ProfanedGuardians; +using CalamityMod.NPCs.Providence; +using CalamityMod.NPCs.Ravager; +using CalamityMod.NPCs.Signus; +using CalamityMod.NPCs.SlimeGod; +using CalamityMod.NPCs.StormWeaver; +using CalamityMod.NPCs.SulphurousSea; +using CalamityMod.NPCs.SunkenSea; +using CalamityMod.NPCs.SupremeCalamitas; +using CalamityMod.NPCs.Yharon; +using System; +using System.Collections.Generic; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod +{ + public static partial class NPCStats + { + #region Boss Stats Container Struct + internal partial struct BossStats + { + public static SortedDictionary> DebuffImmunities; + }; + #endregion + + #region Stat Retrieval Methods + public static void SetNPCDebuffImmunities(this NPC npc) + { + // Safety check: If for some reason the debuff array is not initialized yet, return and do nothing. + // If the npc is not in the dictionary, return and do nothing. + // Also, can I just say that I hate Sorted Dictionaries and Tuples and want to make something explode? -Ben + var stupidTupleThing = new Tuple(true, new int[] {}); + bool exists = BossStats.DebuffImmunities.TryGetValue(npc.type, out stupidTupleThing); + if (npc.modNPC is null || !exists) + return; + + // If the npc is immune to everything, make it immune to everything + if (stupidTupleThing.Item1) + { + for (int k = 0; k < npc.buffImmune.Length; k++) + { + npc.buffImmune[k] = true; + } + } + // Then set debuff vulnerabilities, or immunities if not immune to everything + for (int i = 0; i < stupidTupleThing.Item2.Length; ++i) + { + npc.buffImmune[stupidTupleThing.Item2[i]] = !stupidTupleThing.Item1; + } + } + #endregion + + #region Load/Unload + // A static function, called exactly once, which initializes the BossStats struct at a predictable time. + // This is necessary to ensure this dictionary is populated as early as possible. + internal static void LoadDebuffs() + { + BossStats.DebuffImmunities = new SortedDictionary> + { + { ModContent.NPCType(), new Tuple(true, new int[] { }) }, + + { ModContent.NPCType(), new Tuple(true, new int[] { }) }, + { ModContent.NPCType(), new Tuple(true, new int[] { }) }, + { ModContent.NPCType(), new Tuple(true, new int[] { }) }, + { ModContent.NPCType(), new Tuple(false, new int[] { }) }, + { ModContent.NPCType(), new Tuple(false, new int[] { }) }, + { ModContent.NPCType(), new Tuple(false, new int[] { }) }, + { ModContent.NPCType(), new Tuple(false, new int[] { }) }, + { ModContent.NPCType(), new Tuple(false, new int[] { }) }, + { ModContent.NPCType(), new Tuple(false, new int[] { }) }, + + { ModContent.NPCType(), new Tuple(false, new int[] { }) }, + { ModContent.NPCType(), new Tuple(false, new int[] { }) }, + + { ModContent.NPCType(), new Tuple(false, new int[] { }) }, + { ModContent.NPCType(), new Tuple(false, new int[] { }) }, + { ModContent.NPCType(), new Tuple(false, new int[] { }) }, + { ModContent.NPCType(), new Tuple(false, new int[] { }) }, + { ModContent.NPCType(), new Tuple(false, new int[] { }) }, + { ModContent.NPCType(), new Tuple(false, new int[] { }) }, + + { ModContent.NPCType(), new Tuple(false, new int[] { }) }, + { ModContent.NPCType(), new Tuple(false, new int[] { }) }, + { ModContent.NPCType(), new Tuple(false, new int[] { }) }, + { ModContent.NPCType(), new Tuple(false, new int[] { }) }, + { ModContent.NPCType(), new Tuple(false, new int[] { }) }, + { ModContent.NPCType(), new Tuple(false, new int[] { }) }, + { ModContent.NPCType(), new Tuple(false, new int[] { }) }, + { ModContent.NPCType(), new Tuple(false, new int[] { }) }, + { ModContent.NPCType(), new Tuple(false, new int[] { }) }, + { ModContent.NPCType(), new Tuple(false, new int[] { }) }, + + { ModContent.NPCType(), new Tuple(false, new int[] { }) }, + { ModContent.NPCType(), new Tuple(false, new int[] { }) }, + { ModContent.NPCType(), new Tuple(false, new int[] { }) }, + { ModContent.NPCType(), new Tuple(false, new int[] { }) }, + { ModContent.NPCType(), new Tuple(false, new int[] { }) }, + { ModContent.NPCType(), new Tuple(false, new int[] { BuffID.OnFire }) }, + { ModContent.NPCType(), new Tuple(false, new int[] { BuffID.OnFire }) }, + { ModContent.NPCType(), new Tuple(false, new int[] { BuffID.OnFire }) }, + { ModContent.NPCType(), new Tuple(false, new int[] { BuffID.OnFire }) }, + + { ModContent.NPCType(), new Tuple(true, new int[] { + BuffID.BetsysCurse, + BuffID.BoneJavelin, + BuffID.CursedInferno, + BuffID.Daybreak, + BuffID.DryadsWardDebuff, + BuffID.Ichor, + BuffID.Oiled, + BuffID.OnFire, + BuffID.ShadowFlame, + BuffID.SoulDrain, + BuffID.StardustMinionBleed, + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType() + }) }, + { ModContent.NPCType(), new Tuple(false, new int[] { }) }, + { ModContent.NPCType(), new Tuple(false, new int[] { }) }, + { ModContent.NPCType(), new Tuple(false, new int[] { }) }, + { ModContent.NPCType(), new Tuple(false, new int[] { }) }, + + { ModContent.NPCType(), new Tuple(true, new int[] { }) }, + { ModContent.NPCType(), new Tuple(true, new int[] { }) }, + { ModContent.NPCType(), new Tuple(true, new int[] { }) }, + { ModContent.NPCType(), new Tuple(true, new int[] { }) }, + + { ModContent.NPCType(), new Tuple(true, new int[] { + BuffID.BetsysCurse, + BuffID.BoneJavelin, + BuffID.CursedInferno, + BuffID.Daybreak, + BuffID.DryadsWardDebuff, + BuffID.Frostburn, + BuffID.Ichor, + BuffID.Oiled, + BuffID.SoulDrain, + BuffID.StardustMinionBleed, + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType() + }) }, + { ModContent.NPCType(), new Tuple(true, new int[] { + BuffID.BetsysCurse, + BuffID.BoneJavelin, + BuffID.CursedInferno, + BuffID.Daybreak, + BuffID.DryadsWardDebuff, + BuffID.Frostburn, + BuffID.Ichor, + BuffID.Oiled, + BuffID.SoulDrain, + BuffID.StardustMinionBleed, + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType() + }) }, + + { ModContent.NPCType(), new Tuple(true, new int[] { + BuffID.BetsysCurse, + BuffID.BoneJavelin, + BuffID.CursedInferno, + BuffID.Daybreak, + BuffID.DryadsWardDebuff, + BuffID.Frostburn, + BuffID.Ichor, + BuffID.Oiled, + BuffID.SoulDrain, + BuffID.StardustMinionBleed, + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType() + }) }, + { ModContent.NPCType(), new Tuple(true, new int[] { + BuffID.BetsysCurse, + BuffID.BoneJavelin, + BuffID.CursedInferno, + BuffID.Daybreak, + BuffID.DryadsWardDebuff, + BuffID.Frostburn, + BuffID.Ichor, + BuffID.Oiled, + BuffID.SoulDrain, + BuffID.StardustMinionBleed, + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType() + }) }, + { ModContent.NPCType(), new Tuple(true, new int[] { + BuffID.BetsysCurse, + BuffID.BoneJavelin, + BuffID.CursedInferno, + BuffID.Daybreak, + BuffID.DryadsWardDebuff, + BuffID.Frostburn, + BuffID.Ichor, + BuffID.Oiled, + BuffID.SoulDrain, + BuffID.StardustMinionBleed, + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType() + }) }, + { ModContent.NPCType(), new Tuple(true, new int[] { + BuffID.BetsysCurse, + BuffID.BoneJavelin, + BuffID.CursedInferno, + BuffID.Daybreak, + BuffID.DryadsWardDebuff, + BuffID.Frostburn, + BuffID.Ichor, + BuffID.Oiled, + BuffID.SoulDrain, + BuffID.StardustMinionBleed, + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType() + }) }, + { ModContent.NPCType(), new Tuple(true, new int[] { + BuffID.BetsysCurse, + BuffID.BoneJavelin, + BuffID.CursedInferno, + BuffID.Daybreak, + BuffID.DryadsWardDebuff, + BuffID.Frostburn, + BuffID.Ichor, + BuffID.Oiled, + BuffID.SoulDrain, + BuffID.StardustMinionBleed, + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType() + }) }, + { ModContent.NPCType(), new Tuple(false, new int[] { BuffID.OnFire }) }, + + { ModContent.NPCType(), new Tuple(true, new int[] { + BuffID.BetsysCurse, + BuffID.BoneJavelin, + BuffID.CursedInferno, + BuffID.Daybreak, + BuffID.DryadsWardDebuff, + BuffID.Frostburn, + BuffID.Ichor, + BuffID.Oiled, + BuffID.SoulDrain, + BuffID.StardustMinionBleed, + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType() + }) }, + { ModContent.NPCType(), new Tuple(true, new int[] { + BuffID.BetsysCurse, + BuffID.BoneJavelin, + BuffID.CursedInferno, + BuffID.Daybreak, + BuffID.DryadsWardDebuff, + BuffID.Frostburn, + BuffID.Ichor, + BuffID.Oiled, + BuffID.SoulDrain, + BuffID.StardustMinionBleed, + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType() + }) }, + { ModContent.NPCType(), new Tuple(false, new int[] { }) }, + { ModContent.NPCType(), new Tuple(false, new int[] { }) }, + { ModContent.NPCType(), new Tuple(false, new int[] { }) }, + + { ModContent.NPCType(), new Tuple(true, new int[] { + BuffID.BetsysCurse, + BuffID.BoneJavelin, + BuffID.CursedInferno, + BuffID.Daybreak, + BuffID.DryadsWardDebuff, + BuffID.Frostburn, + BuffID.Ichor, + BuffID.Oiled, + BuffID.SoulDrain, + BuffID.StardustMinionBleed, + BuffID.Venom, + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType() + }) }, + { ModContent.NPCType(), new Tuple(true, new int[] { }) }, + + { ModContent.NPCType(), new Tuple(true, new int[] { + BuffID.BetsysCurse, + BuffID.CursedInferno, + BuffID.Daybreak, + BuffID.Frostburn, + BuffID.Ichor, + BuffID.Oiled, + BuffID.StardustMinionBleed, + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType() + }) }, + { ModContent.NPCType(), new Tuple(true, new int[] { + BuffID.BetsysCurse, + BuffID.CursedInferno, + BuffID.Daybreak, + BuffID.Frostburn, + BuffID.Ichor, + BuffID.Oiled, + BuffID.StardustMinionBleed, + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType() + }) }, + { ModContent.NPCType(), new Tuple(false, new int[] { }) }, + { ModContent.NPCType(), new Tuple(false, new int[] { + BuffID.OnFire, + BuffID.Poisoned, + BuffID.ShadowFlame, + BuffID.Venom, + ModContent.BuffType(), + ModContent.BuffType() + }) }, + { ModContent.NPCType(), new Tuple(false, new int[] { + BuffID.OnFire, + BuffID.Poisoned, + BuffID.ShadowFlame, + BuffID.Venom, + ModContent.BuffType(), + ModContent.BuffType() + }) }, + { ModContent.NPCType(), new Tuple(false, new int[] { + BuffID.OnFire, + BuffID.Poisoned, + BuffID.ShadowFlame, + BuffID.Venom, + ModContent.BuffType(), + ModContent.BuffType() + }) }, + + { ModContent.NPCType(), new Tuple(true, new int[] { + BuffID.BetsysCurse, + BuffID.CursedInferno, + BuffID.Daybreak, + BuffID.DryadsWardDebuff, + BuffID.Frostburn, + BuffID.Ichor, + BuffID.Oiled, + BuffID.StardustMinionBleed, + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType() + }) }, + { ModContent.NPCType(), new Tuple(true, new int[] { + BuffID.BetsysCurse, + BuffID.CursedInferno, + BuffID.Daybreak, + BuffID.DryadsWardDebuff, + BuffID.Frostburn, + BuffID.Ichor, + BuffID.Oiled, + BuffID.StardustMinionBleed, + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType() + }) }, + { ModContent.NPCType(), new Tuple(true, new int[] { + BuffID.BetsysCurse, + BuffID.CursedInferno, + BuffID.Daybreak, + BuffID.DryadsWardDebuff, + BuffID.Frostburn, + BuffID.Ichor, + BuffID.Oiled, + BuffID.StardustMinionBleed, + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType() + }) }, + { ModContent.NPCType(), new Tuple(true, new int[] { + BuffID.BetsysCurse, + BuffID.CursedInferno, + BuffID.Daybreak, + BuffID.DryadsWardDebuff, + BuffID.Frostburn, + BuffID.Ichor, + BuffID.Oiled, + BuffID.StardustMinionBleed, + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType() + }) }, + { ModContent.NPCType(), new Tuple(true, new int[] { + BuffID.BetsysCurse, + BuffID.CursedInferno, + BuffID.Daybreak, + BuffID.DryadsWardDebuff, + BuffID.Frostburn, + BuffID.Ichor, + BuffID.Oiled, + BuffID.StardustMinionBleed, + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType() + }) }, + { ModContent.NPCType(), new Tuple(true, new int[] { + BuffID.BetsysCurse, + BuffID.CursedInferno, + BuffID.Daybreak, + BuffID.DryadsWardDebuff, + BuffID.Frostburn, + BuffID.Ichor, + BuffID.Oiled, + BuffID.StardustMinionBleed, + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType() + }) }, + { ModContent.NPCType(), new Tuple(true, new int[] { }) }, + { ModContent.NPCType(), new Tuple(true, new int[] { }) }, + { ModContent.NPCType(), new Tuple(true, new int[] { }) }, + + { ModContent.NPCType(), new Tuple(true, new int[] { }) }, + { ModContent.NPCType(), new Tuple(true, new int[] { }) }, + { ModContent.NPCType(), new Tuple(true, new int[] { }) }, + + { ModContent.NPCType(), new Tuple(true, new int[] { + BuffID.BetsysCurse, + BuffID.CursedInferno, + BuffID.Ichor, + BuffID.Oiled, + BuffID.StardustMinionBleed, + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType() + }) }, + { ModContent.NPCType(), new Tuple(true, new int[] { + BuffID.BetsysCurse, + BuffID.CursedInferno, + BuffID.Ichor, + BuffID.Oiled, + BuffID.StardustMinionBleed, + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType() + }) }, + { ModContent.NPCType(), new Tuple(true, new int[] { + BuffID.BetsysCurse, + BuffID.CursedInferno, + BuffID.Ichor, + BuffID.Oiled, + BuffID.StardustMinionBleed, + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType() + }) }, + + { ModContent.NPCType(), new Tuple(true, new int[] { + BuffID.BetsysCurse, + BuffID.CursedInferno, + BuffID.Daybreak, + BuffID.DryadsWardDebuff, + BuffID.Ichor, + BuffID.Oiled, + BuffID.StardustMinionBleed, + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType() + }) }, + { ModContent.NPCType(), new Tuple(true, new int[] { + BuffID.BetsysCurse, + BuffID.CursedInferno, + BuffID.Daybreak, + BuffID.DryadsWardDebuff, + BuffID.Ichor, + BuffID.Oiled, + BuffID.StardustMinionBleed, + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType() + }) }, + + { ModContent.NPCType(), new Tuple(true, new int[] { + BuffID.BetsysCurse, + BuffID.CursedInferno, + BuffID.Ichor, + BuffID.StardustMinionBleed, + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType() + }) }, + { ModContent.NPCType(), new Tuple(true, new int[] { + BuffID.BetsysCurse, + BuffID.CursedInferno, + BuffID.Ichor, + BuffID.Oiled, + BuffID.StardustMinionBleed, + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType() + }) }, + { ModContent.NPCType(), new Tuple(true, new int[] { + BuffID.BetsysCurse, + BuffID.CursedInferno, + BuffID.Ichor, + BuffID.Oiled, + BuffID.StardustMinionBleed, + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType() + }) }, + { ModContent.NPCType(), new Tuple(true, new int[] { + BuffID.BetsysCurse, + BuffID.CursedInferno, + BuffID.Ichor, + BuffID.Oiled, + BuffID.StardustMinionBleed, + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType() + }) }, + + { ModContent.NPCType(), new Tuple(true, new int[] { }) }, + { ModContent.NPCType(), new Tuple(true, new int[] { }) }, + { ModContent.NPCType(), new Tuple(true, new int[] { }) }, + { ModContent.NPCType(), new Tuple(true, new int[] { }) }, + + { ModContent.NPCType(), new Tuple(true, new int[] { }) }, + { ModContent.NPCType(), new Tuple(true, new int[] { }) }, + { ModContent.NPCType(), new Tuple(true, new int[] { }) }, + { ModContent.NPCType(), new Tuple(true, new int[] { }) }, + { ModContent.NPCType(), new Tuple(true, new int[] { }) }, + { ModContent.NPCType(), new Tuple(true, new int[] { }) }, + + { ModContent.NPCType(), new Tuple(true, new int[] { + BuffID.BetsysCurse, + BuffID.CursedInferno, + BuffID.Ichor, + BuffID.Oiled, + BuffID.StardustMinionBleed, + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType() + }) }, + { ModContent.NPCType(), new Tuple(true, new int[] { }) }, + { ModContent.NPCType(), new Tuple(false, new int[] { }) }, + + { ModContent.NPCType(), new Tuple(true, new int[] { + BuffID.BetsysCurse, + BuffID.CursedInferno, + BuffID.Daybreak, + BuffID.Ichor, + BuffID.Oiled, + BuffID.StardustMinionBleed, + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType() + }) }, + { ModContent.NPCType(), new Tuple(true, new int[] { }) }, + { ModContent.NPCType(), new Tuple(true, new int[] { }) }, + { ModContent.NPCType(), new Tuple(true, new int[] { }) }, + + { ModContent.NPCType(), new Tuple(true, new int[] { }) }, + { ModContent.NPCType(), new Tuple(true, new int[] { }) }, + { ModContent.NPCType(), new Tuple(true, new int[] { }) }, + + { ModContent.NPCType(), new Tuple(true, new int[] { }) }, + { ModContent.NPCType(), new Tuple(true, new int[] { }) }, + { ModContent.NPCType(), new Tuple(true, new int[] { }) }, + { ModContent.NPCType(), new Tuple(true, new int[] { }) }, + { ModContent.NPCType(), new Tuple(true, new int[] { }) }, + { ModContent.NPCType(), new Tuple(true, new int[] { }) }, + { ModContent.NPCType(), new Tuple(true, new int[] { }) }, + { ModContent.NPCType(), new Tuple(true, new int[] { }) }, + { ModContent.NPCType(), new Tuple(true, new int[] { }) }, + + { ModContent.NPCType(), new Tuple(true, new int[] { + BuffID.CursedInferno, + BuffID.Ichor, + ModContent.BuffType(), + ModContent.BuffType() + }) }, + { ModContent.NPCType(), new Tuple(false, new int[] { }) }, + { ModContent.NPCType(), new Tuple(false, new int[] { }) }, + + { ModContent.NPCType(), new Tuple(true, new int[] { + BuffID.CursedInferno, + BuffID.Ichor + }) }, + { ModContent.NPCType(), new Tuple(true, new int[] { + BuffID.CursedInferno, + BuffID.Ichor + }) }, + { ModContent.NPCType(), new Tuple(true, new int[] { + BuffID.CursedInferno, + BuffID.Ichor + }) }, + { ModContent.NPCType(), new Tuple(true, new int[] { + BuffID.CursedInferno, + BuffID.Ichor + }) }, + { ModContent.NPCType(), new Tuple(true, new int[] { }) }, + { ModContent.NPCType(), new Tuple(true, new int[] { }) }, + { ModContent.NPCType(), new Tuple(true, new int[] { }) }, + { ModContent.NPCType(), new Tuple(true, new int[] { }) }, + { ModContent.NPCType(), new Tuple(true, new int[] { }) }, + + // The struct is called BossStats but we have all the enemies... just something to consider... + { ModContent.NPCType(), new Tuple(false, new int[] { ModContent.BuffType() }) }, + { ModContent.NPCType(), new Tuple(false, new int[] { ModContent.BuffType() }) }, + { ModContent.NPCType(), new Tuple(false, new int[] { ModContent.BuffType() }) }, + { ModContent.NPCType(), new Tuple(false, new int[] { ModContent.BuffType() }) }, + { ModContent.NPCType(), new Tuple(false, new int[] { ModContent.BuffType() }) }, + { ModContent.NPCType(), new Tuple(false, new int[] { ModContent.BuffType() }) }, + { ModContent.NPCType(), new Tuple(false, new int[] { ModContent.BuffType() }) }, + { ModContent.NPCType(), new Tuple(false, new int[] { ModContent.BuffType() }) }, + { ModContent.NPCType(), new Tuple(true, new int[] { }) }, + { ModContent.NPCType(), new Tuple(true, new int[] { }) }, + { ModContent.NPCType(), new Tuple(true, new int[] { }) }, + { ModContent.NPCType(), new Tuple(true, new int[] { }) }, + { ModContent.NPCType(), new Tuple(false, new int[] { ModContent.BuffType() }) }, + { ModContent.NPCType(), new Tuple(false, new int[] { ModContent.BuffType() }) }, + { ModContent.NPCType(), new Tuple(false, new int[] { ModContent.BuffType() }) }, + { ModContent.NPCType(), new Tuple(false, new int[] { ModContent.BuffType() }) }, + { ModContent.NPCType(), new Tuple(true, new int[] { }) }, + { ModContent.NPCType(), new Tuple(true, new int[] { }) }, + { ModContent.NPCType(), new Tuple(true, new int[] { }) }, + { ModContent.NPCType(), new Tuple(false, new int[] { ModContent.BuffType() }) }, + { ModContent.NPCType(), new Tuple(false, new int[] { ModContent.BuffType() }) }, + + { ModContent.NPCType(), new Tuple(true, new int[] { }) }, + { ModContent.NPCType(), new Tuple(true, new int[] { }) }, + { ModContent.NPCType(), new Tuple(true, new int[] { }) }, + { ModContent.NPCType(), new Tuple(true, new int[] { }) }, + { ModContent.NPCType(), new Tuple(true, new int[] { }) }, + { ModContent.NPCType(), new Tuple(true, new int[] { }) }, + { ModContent.NPCType(), new Tuple(true, new int[] { }) }, + { ModContent.NPCType(), new Tuple(true, new int[] { }) }, + { ModContent.NPCType(), new Tuple(true, new int[] { + BuffID.BetsysCurse, + BuffID.CursedInferno, + BuffID.Daybreak, + BuffID.DryadsWardDebuff, + BuffID.Frostburn, + BuffID.Ichor, + BuffID.Oiled, + BuffID.StardustMinionBleed, + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType() + }) }, + { ModContent.NPCType(), new Tuple(true, new int[] { + BuffID.BetsysCurse, + BuffID.CursedInferno, + BuffID.Daybreak, + BuffID.DryadsWardDebuff, + BuffID.Frostburn, + BuffID.Ichor, + BuffID.Oiled, + BuffID.StardustMinionBleed, + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType() + }) }, + + { ModContent.NPCType(), new Tuple(true, new int[] { }) }, + { ModContent.NPCType(), new Tuple(true, new int[] { }) }, + { ModContent.NPCType(), new Tuple(true, new int[] { }) }, + { ModContent.NPCType(), new Tuple(true, new int[] { }) }, + { ModContent.NPCType(), new Tuple(true, new int[] { }) }, + { ModContent.NPCType(), new Tuple(true, new int[] { }) }, + { ModContent.NPCType(), new Tuple(true, new int[] { }) }, + { ModContent.NPCType(), new Tuple(true, new int[] { }) }, + { ModContent.NPCType(), new Tuple(true, new int[] { }) }, + { ModContent.NPCType(), new Tuple(true, new int[] { }) }, + { ModContent.NPCType(), new Tuple(true, new int[] { }) }, + { ModContent.NPCType(), new Tuple(true, new int[] { }) }, + { ModContent.NPCType(), new Tuple(true, new int[] { }) }, + { ModContent.NPCType(), new Tuple(true, new int[] { }) }, + { ModContent.NPCType(), new Tuple(true, new int[] { }) }, + { ModContent.NPCType(), new Tuple(true, new int[] { }) }, + + { ModContent.NPCType(), new Tuple(true, new int[] { }) }, + { ModContent.NPCType(), new Tuple(true, new int[] { }) }, + { ModContent.NPCType(), new Tuple(true, new int[] { }) }, + { ModContent.NPCType(), new Tuple(true, new int[] { }) }, + { ModContent.NPCType(), new Tuple(true, new int[] { }) }, + { ModContent.NPCType(), new Tuple(true, new int[] { }) }, + { ModContent.NPCType(), new Tuple(true, new int[] { }) }, + { ModContent.NPCType(), new Tuple(true, new int[] { }) }, + { ModContent.NPCType(), new Tuple(true, new int[] { }) }, + { ModContent.NPCType(), new Tuple(true, new int[] { }) }, + { ModContent.NPCType(), new Tuple(true, new int[] { }) }, + { ModContent.NPCType(), new Tuple(true, new int[] { }) }, + { ModContent.NPCType(), new Tuple(true, new int[] { }) }, + + { ModContent.NPCType(), new Tuple(false, new int[] { ModContent.BuffType() }) }, + { ModContent.NPCType(), new Tuple(false, new int[] { ModContent.BuffType(), BuffID.Poisoned }) }, + { ModContent.NPCType(), new Tuple(false, new int[] { ModContent.BuffType(), BuffID.Poisoned }) }, + { ModContent.NPCType(), new Tuple(false, new int[] { ModContent.BuffType() }) }, + { ModContent.NPCType(), new Tuple(false, new int[] { ModContent.BuffType() }) }, + { ModContent.NPCType(), new Tuple(false, new int[] { ModContent.BuffType() }) }, + { ModContent.NPCType(), new Tuple(false, new int[] { ModContent.BuffType() }) }, + { ModContent.NPCType(), new Tuple(false, new int[] { ModContent.BuffType() }) }, + { ModContent.NPCType(), new Tuple(false, new int[] { ModContent.BuffType() }) }, + { ModContent.NPCType(), new Tuple(false, new int[] { ModContent.BuffType() }) }, + { ModContent.NPCType(), new Tuple(false, new int[] { ModContent.BuffType() }) }, + { ModContent.NPCType(), new Tuple(false, new int[] { ModContent.BuffType() }) }, + { ModContent.NPCType(), new Tuple(false, new int[] { ModContent.BuffType() }) }, + { ModContent.NPCType(), new Tuple(false, new int[] { ModContent.BuffType() }) }, + { ModContent.NPCType(), new Tuple(false, new int[] { ModContent.BuffType() }) }, + + { ModContent.NPCType(), new Tuple(true, new int[] { + BuffID.BetsysCurse, + BuffID.CursedInferno, + BuffID.Daybreak, + BuffID.DryadsWardDebuff, + BuffID.Frostburn, + BuffID.Ichor, + BuffID.Oiled, + BuffID.StardustMinionBleed, + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType() + }) }, + + { ModContent.NPCType(), new Tuple(true, new int[] { }) }, + { ModContent.NPCType(), new Tuple(true, new int[] { }) }, + { ModContent.NPCType(), new Tuple(true, new int[] { }) }, + { ModContent.NPCType(), new Tuple(true, new int[] { }) }, + { ModContent.NPCType(), new Tuple(true, new int[] { }) }, + + { ModContent.NPCType(), new Tuple(true, new int[] { + BuffID.BetsysCurse, + BuffID.CursedInferno, + BuffID.Ichor, + BuffID.Oiled, + BuffID.StardustMinionBleed, + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType() + }) }, + { ModContent.NPCType(), new Tuple(true, new int[] { + BuffID.BetsysCurse, + BuffID.CursedInferno, + BuffID.Ichor, + BuffID.Oiled, + BuffID.StardustMinionBleed, + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType() + }) }, + { ModContent.NPCType(), new Tuple(true, new int[] { + BuffID.BetsysCurse, + BuffID.CursedInferno, + BuffID.Daybreak, + BuffID.DryadsWardDebuff, + BuffID.Frostburn, + BuffID.Ichor, + BuffID.Oiled, + BuffID.StardustMinionBleed, + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType() + }) }, + { ModContent.NPCType(), new Tuple(false, new int[] { + BuffID.OnFire, + BuffID.Poisoned, + BuffID.ShadowFlame, + BuffID.Venom, + ModContent.BuffType(), + ModContent.BuffType() + }) }, + { ModContent.NPCType(), new Tuple(false, new int[] { + BuffID.OnFire, + BuffID.Poisoned, + BuffID.ShadowFlame, + BuffID.Venom, + ModContent.BuffType(), + ModContent.BuffType() + }) }, + { ModContent.NPCType(), new Tuple(false, new int[] { + BuffID.OnFire, + BuffID.Poisoned, + BuffID.ShadowFlame, + BuffID.Venom, + ModContent.BuffType(), + ModContent.BuffType() + }) }, + { ModContent.NPCType(), new Tuple(false, new int[] { + BuffID.OnFire, + BuffID.Poisoned, + BuffID.ShadowFlame, + BuffID.Venom, + ModContent.BuffType(), + ModContent.BuffType() + }) }, + { ModContent.NPCType(), new Tuple(false, new int[] { + BuffID.OnFire, + BuffID.Poisoned, + BuffID.ShadowFlame, + BuffID.Venom, + ModContent.BuffType(), + ModContent.BuffType() + }) }, + { ModContent.NPCType(), new Tuple(false, new int[] { + BuffID.OnFire, + BuffID.Poisoned, + BuffID.ShadowFlame, + BuffID.Venom, + ModContent.BuffType(), + ModContent.BuffType() + }) }, + { ModContent.NPCType(), new Tuple(true, new int[] { }) }, + { ModContent.NPCType(), new Tuple(true, new int[] { }) }, + { ModContent.NPCType(), new Tuple(true, new int[] { }) }, + { ModContent.NPCType(), new Tuple(true, new int[] { }) }, + { ModContent.NPCType(), new Tuple(false, new int[] { BuffID.Poisoned }) }, + { ModContent.NPCType(), new Tuple(false, new int[] { BuffID.OnFire }) }, + { ModContent.NPCType(), new Tuple(false, new int[] { BuffID.OnFire }) }, + { ModContent.NPCType(), new Tuple(false, new int[] { ModContent.BuffType() }) }, + { ModContent.NPCType(), new Tuple(false, new int[] { BuffID.Daybreak }) } + }; + } + + // Destroys the BossStats struct to save memory because mod assemblies will not be fully unloaded until TML 1.4. + internal static void UnloadDebuffs() + { + BossStats.DebuffImmunities = null; + } + #endregion + } +} diff --git a/Utilities/NPCStats.cs b/Utilities/NPCStats.cs index a99d2c9922..a6aac89dca 100644 --- a/Utilities/NPCStats.cs +++ b/Utilities/NPCStats.cs @@ -1,9 +1,4 @@ -using CalamityMod.Buffs.DamageOverTime; -using CalamityMod.Buffs.StatDebuffs; -using CalamityMod.NPCs.Abyss; -using CalamityMod.NPCs.AcidRain; using CalamityMod.NPCs.AquaticScourge; -using CalamityMod.NPCs.Astral; using CalamityMod.NPCs.AstrumAureus; using CalamityMod.NPCs.AstrumDeus; using CalamityMod.NPCs.BrimstoneElemental; @@ -15,7 +10,6 @@ using CalamityMod.NPCs.Cryogen; using CalamityMod.NPCs.DesertScourge; using CalamityMod.NPCs.DevourerofGods; using CalamityMod.NPCs.HiveMind; -using CalamityMod.NPCs.GreatSandShark; using CalamityMod.NPCs.Leviathan; using CalamityMod.NPCs.NormalNPCs; using CalamityMod.NPCs.OldDuke; @@ -28,8 +22,6 @@ using CalamityMod.NPCs.Ravager; using CalamityMod.NPCs.Signus; using CalamityMod.NPCs.SlimeGod; using CalamityMod.NPCs.StormWeaver; -using CalamityMod.NPCs.SulphurousSea; -using CalamityMod.NPCs.SunkenSea; using CalamityMod.NPCs.SupremeCalamitas; using CalamityMod.NPCs.Yharon; using CalamityMod.Projectiles.Boss; @@ -43,19 +35,18 @@ using Terraria.ModLoader; namespace CalamityMod { - public static class NPCStats + public static partial class NPCStats { private const double ExpertContactVanillaMultiplier = 2D; private const double NormalProjectileVanillaMultiplier = 2D; private const double ExpertProjectileVanillaMultiplier = 4D; #region Boss Stats Container Struct - internal struct BossStats + internal partial struct BossStats { public static SortedDictionary ExpertDamageMultiplier; public static SortedDictionary ContactDamageValues; public static SortedDictionary, int[]> ProjectileDamageValues; - public static SortedDictionary> DebuffImmunities; }; #endregion @@ -143,37 +134,23 @@ namespace CalamityMod bool exists = BossStats.ExpertDamageMultiplier.TryGetValue(npc.type, out double damageMult); return exists ? damageMult : 1D; } - - public static void SetNPCDebuffImmunities(this NPC npc) - { - // Safety check: If for some reason the debuff array is not initialized yet, return and do nothing. - // If the npc is not in the dictionary, return and do nothing. - // Also, can I just say that I hate Sorted Dictionaries and Tuples and want to make something explode? -Ben - var stupidTupleThing = new Tuple(true, new int[] {}); - bool exists = BossStats.DebuffImmunities.TryGetValue(npc.type, out stupidTupleThing); - if (npc.modNPC is null || !exists) - return; - - // If the npc is immune to everything, make it immune to everything - if (stupidTupleThing.Item1) - { - for (int k = 0; k < npc.buffImmune.Length; k++) - { - npc.buffImmune[k] = true; - } - } - // Then set debuff vulnerabilities, or immunities if not immune to everything - for (int i = 0; i < stupidTupleThing.Item2.Length; ++i) - { - npc.buffImmune[stupidTupleThing.Item2[i]] = !stupidTupleThing.Item1; - } - } #endregion #region Load/Unload + internal static void Load() + { + LoadBossStats(); + LoadDebuffs(); + } + internal static void Unload() + { + UnloadBossStats(); + UnloadDebuffs(); + } + // A static function, called exactly once, which initializes the BossStats struct at a predictable time. // This is necessary to ensure this dictionary is populated as early as possible. - internal static void Load() + internal static void LoadBossStats() { BossStats.ExpertDamageMultiplier = new SortedDictionary { @@ -799,1068 +776,14 @@ namespace CalamityMod { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 400, 600, 632, 648, 948 } }, { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 350, 528, 556, 572, 834 } } }; - - BossStats.DebuffImmunities = new SortedDictionary> - { - { ModContent.NPCType(), new Tuple(true, new int[] { }) }, - - { ModContent.NPCType(), new Tuple(true, new int[] { }) }, - { ModContent.NPCType(), new Tuple(true, new int[] { }) }, - { ModContent.NPCType(), new Tuple(true, new int[] { }) }, - { ModContent.NPCType(), new Tuple(false, new int[] { }) }, - { ModContent.NPCType(), new Tuple(false, new int[] { }) }, - { ModContent.NPCType(), new Tuple(false, new int[] { }) }, - { ModContent.NPCType(), new Tuple(false, new int[] { }) }, - { ModContent.NPCType(), new Tuple(false, new int[] { }) }, - { ModContent.NPCType(), new Tuple(false, new int[] { }) }, - - { ModContent.NPCType(), new Tuple(false, new int[] { }) }, - { ModContent.NPCType(), new Tuple(false, new int[] { }) }, - - { ModContent.NPCType(), new Tuple(false, new int[] { }) }, - { ModContent.NPCType(), new Tuple(false, new int[] { }) }, - { ModContent.NPCType(), new Tuple(false, new int[] { }) }, - { ModContent.NPCType(), new Tuple(false, new int[] { }) }, - { ModContent.NPCType(), new Tuple(false, new int[] { }) }, - { ModContent.NPCType(), new Tuple(false, new int[] { }) }, - - { ModContent.NPCType(), new Tuple(false, new int[] { }) }, - { ModContent.NPCType(), new Tuple(false, new int[] { }) }, - { ModContent.NPCType(), new Tuple(false, new int[] { }) }, - { ModContent.NPCType(), new Tuple(false, new int[] { }) }, - { ModContent.NPCType(), new Tuple(false, new int[] { }) }, - { ModContent.NPCType(), new Tuple(false, new int[] { }) }, - { ModContent.NPCType(), new Tuple(false, new int[] { }) }, - { ModContent.NPCType(), new Tuple(false, new int[] { }) }, - { ModContent.NPCType(), new Tuple(false, new int[] { }) }, - { ModContent.NPCType(), new Tuple(false, new int[] { }) }, - - { ModContent.NPCType(), new Tuple(false, new int[] { }) }, - { ModContent.NPCType(), new Tuple(false, new int[] { }) }, - { ModContent.NPCType(), new Tuple(false, new int[] { }) }, - { ModContent.NPCType(), new Tuple(false, new int[] { }) }, - { ModContent.NPCType(), new Tuple(false, new int[] { }) }, - { ModContent.NPCType(), new Tuple(false, new int[] { BuffID.OnFire }) }, - { ModContent.NPCType(), new Tuple(false, new int[] { BuffID.OnFire }) }, - { ModContent.NPCType(), new Tuple(false, new int[] { BuffID.OnFire }) }, - { ModContent.NPCType(), new Tuple(false, new int[] { BuffID.OnFire }) }, - - { ModContent.NPCType(), new Tuple(true, new int[] { - BuffID.BetsysCurse, - BuffID.BoneJavelin, - BuffID.CursedInferno, - BuffID.Daybreak, - BuffID.DryadsWardDebuff, - BuffID.Ichor, - BuffID.Oiled, - BuffID.OnFire, - BuffID.ShadowFlame, - BuffID.SoulDrain, - BuffID.StardustMinionBleed, - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType() - }) }, - { ModContent.NPCType(), new Tuple(false, new int[] { }) }, - { ModContent.NPCType(), new Tuple(false, new int[] { }) }, - { ModContent.NPCType(), new Tuple(false, new int[] { }) }, - { ModContent.NPCType(), new Tuple(false, new int[] { }) }, - - { ModContent.NPCType(), new Tuple(true, new int[] { }) }, - { ModContent.NPCType(), new Tuple(true, new int[] { }) }, - { ModContent.NPCType(), new Tuple(true, new int[] { }) }, - { ModContent.NPCType(), new Tuple(true, new int[] { }) }, - - { ModContent.NPCType(), new Tuple(true, new int[] { - BuffID.BetsysCurse, - BuffID.BoneJavelin, - BuffID.CursedInferno, - BuffID.Daybreak, - BuffID.DryadsWardDebuff, - BuffID.Frostburn, - BuffID.Ichor, - BuffID.Oiled, - BuffID.SoulDrain, - BuffID.StardustMinionBleed, - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType() - }) }, - { ModContent.NPCType(), new Tuple(true, new int[] { - BuffID.BetsysCurse, - BuffID.BoneJavelin, - BuffID.CursedInferno, - BuffID.Daybreak, - BuffID.DryadsWardDebuff, - BuffID.Frostburn, - BuffID.Ichor, - BuffID.Oiled, - BuffID.SoulDrain, - BuffID.StardustMinionBleed, - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType() - }) }, - - { ModContent.NPCType(), new Tuple(true, new int[] { - BuffID.BetsysCurse, - BuffID.BoneJavelin, - BuffID.CursedInferno, - BuffID.Daybreak, - BuffID.DryadsWardDebuff, - BuffID.Frostburn, - BuffID.Ichor, - BuffID.Oiled, - BuffID.SoulDrain, - BuffID.StardustMinionBleed, - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType() - }) }, - { ModContent.NPCType(), new Tuple(true, new int[] { - BuffID.BetsysCurse, - BuffID.BoneJavelin, - BuffID.CursedInferno, - BuffID.Daybreak, - BuffID.DryadsWardDebuff, - BuffID.Frostburn, - BuffID.Ichor, - BuffID.Oiled, - BuffID.SoulDrain, - BuffID.StardustMinionBleed, - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType() - }) }, - { ModContent.NPCType(), new Tuple(true, new int[] { - BuffID.BetsysCurse, - BuffID.BoneJavelin, - BuffID.CursedInferno, - BuffID.Daybreak, - BuffID.DryadsWardDebuff, - BuffID.Frostburn, - BuffID.Ichor, - BuffID.Oiled, - BuffID.SoulDrain, - BuffID.StardustMinionBleed, - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType() - }) }, - { ModContent.NPCType(), new Tuple(true, new int[] { - BuffID.BetsysCurse, - BuffID.BoneJavelin, - BuffID.CursedInferno, - BuffID.Daybreak, - BuffID.DryadsWardDebuff, - BuffID.Frostburn, - BuffID.Ichor, - BuffID.Oiled, - BuffID.SoulDrain, - BuffID.StardustMinionBleed, - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType() - }) }, - { ModContent.NPCType(), new Tuple(true, new int[] { - BuffID.BetsysCurse, - BuffID.BoneJavelin, - BuffID.CursedInferno, - BuffID.Daybreak, - BuffID.DryadsWardDebuff, - BuffID.Frostburn, - BuffID.Ichor, - BuffID.Oiled, - BuffID.SoulDrain, - BuffID.StardustMinionBleed, - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType() - }) }, - { ModContent.NPCType(), new Tuple(false, new int[] { BuffID.OnFire }) }, - - { ModContent.NPCType(), new Tuple(true, new int[] { - BuffID.BetsysCurse, - BuffID.BoneJavelin, - BuffID.CursedInferno, - BuffID.Daybreak, - BuffID.DryadsWardDebuff, - BuffID.Frostburn, - BuffID.Ichor, - BuffID.Oiled, - BuffID.SoulDrain, - BuffID.StardustMinionBleed, - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType() - }) }, - { ModContent.NPCType(), new Tuple(true, new int[] { - BuffID.BetsysCurse, - BuffID.BoneJavelin, - BuffID.CursedInferno, - BuffID.Daybreak, - BuffID.DryadsWardDebuff, - BuffID.Frostburn, - BuffID.Ichor, - BuffID.Oiled, - BuffID.SoulDrain, - BuffID.StardustMinionBleed, - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType() - }) }, - { ModContent.NPCType(), new Tuple(false, new int[] { }) }, - { ModContent.NPCType(), new Tuple(false, new int[] { }) }, - { ModContent.NPCType(), new Tuple(false, new int[] { }) }, - - { ModContent.NPCType(), new Tuple(true, new int[] { - BuffID.BetsysCurse, - BuffID.BoneJavelin, - BuffID.CursedInferno, - BuffID.Daybreak, - BuffID.DryadsWardDebuff, - BuffID.Frostburn, - BuffID.Ichor, - BuffID.Oiled, - BuffID.SoulDrain, - BuffID.StardustMinionBleed, - BuffID.Venom, - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType() - }) }, - { ModContent.NPCType(), new Tuple(true, new int[] { }) }, - - { ModContent.NPCType(), new Tuple(true, new int[] { - BuffID.BetsysCurse, - BuffID.CursedInferno, - BuffID.Daybreak, - BuffID.Frostburn, - BuffID.Ichor, - BuffID.Oiled, - BuffID.StardustMinionBleed, - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType() - }) }, - { ModContent.NPCType(), new Tuple(true, new int[] { - BuffID.BetsysCurse, - BuffID.CursedInferno, - BuffID.Daybreak, - BuffID.Frostburn, - BuffID.Ichor, - BuffID.Oiled, - BuffID.StardustMinionBleed, - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType() - }) }, - { ModContent.NPCType(), new Tuple(false, new int[] { }) }, - { ModContent.NPCType(), new Tuple(false, new int[] { - BuffID.OnFire, - BuffID.Poisoned, - BuffID.ShadowFlame, - BuffID.Venom, - ModContent.BuffType(), - ModContent.BuffType() - }) }, - { ModContent.NPCType(), new Tuple(false, new int[] { - BuffID.OnFire, - BuffID.Poisoned, - BuffID.ShadowFlame, - BuffID.Venom, - ModContent.BuffType(), - ModContent.BuffType() - }) }, - { ModContent.NPCType(), new Tuple(false, new int[] { - BuffID.OnFire, - BuffID.Poisoned, - BuffID.ShadowFlame, - BuffID.Venom, - ModContent.BuffType(), - ModContent.BuffType() - }) }, - - { ModContent.NPCType(), new Tuple(true, new int[] { - BuffID.BetsysCurse, - BuffID.CursedInferno, - BuffID.Daybreak, - BuffID.DryadsWardDebuff, - BuffID.Frostburn, - BuffID.Ichor, - BuffID.Oiled, - BuffID.StardustMinionBleed, - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType() - }) }, - { ModContent.NPCType(), new Tuple(true, new int[] { - BuffID.BetsysCurse, - BuffID.CursedInferno, - BuffID.Daybreak, - BuffID.DryadsWardDebuff, - BuffID.Frostburn, - BuffID.Ichor, - BuffID.Oiled, - BuffID.StardustMinionBleed, - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType() - }) }, - { ModContent.NPCType(), new Tuple(true, new int[] { - BuffID.BetsysCurse, - BuffID.CursedInferno, - BuffID.Daybreak, - BuffID.DryadsWardDebuff, - BuffID.Frostburn, - BuffID.Ichor, - BuffID.Oiled, - BuffID.StardustMinionBleed, - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType() - }) }, - { ModContent.NPCType(), new Tuple(true, new int[] { - BuffID.BetsysCurse, - BuffID.CursedInferno, - BuffID.Daybreak, - BuffID.DryadsWardDebuff, - BuffID.Frostburn, - BuffID.Ichor, - BuffID.Oiled, - BuffID.StardustMinionBleed, - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType() - }) }, - { ModContent.NPCType(), new Tuple(true, new int[] { - BuffID.BetsysCurse, - BuffID.CursedInferno, - BuffID.Daybreak, - BuffID.DryadsWardDebuff, - BuffID.Frostburn, - BuffID.Ichor, - BuffID.Oiled, - BuffID.StardustMinionBleed, - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType() - }) }, - { ModContent.NPCType(), new Tuple(true, new int[] { - BuffID.BetsysCurse, - BuffID.CursedInferno, - BuffID.Daybreak, - BuffID.DryadsWardDebuff, - BuffID.Frostburn, - BuffID.Ichor, - BuffID.Oiled, - BuffID.StardustMinionBleed, - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType() - }) }, - { ModContent.NPCType(), new Tuple(true, new int[] { }) }, - { ModContent.NPCType(), new Tuple(true, new int[] { }) }, - { ModContent.NPCType(), new Tuple(true, new int[] { }) }, - - { ModContent.NPCType(), new Tuple(true, new int[] { }) }, - { ModContent.NPCType(), new Tuple(true, new int[] { }) }, - { ModContent.NPCType(), new Tuple(true, new int[] { }) }, - - { ModContent.NPCType(), new Tuple(true, new int[] { - BuffID.BetsysCurse, - BuffID.CursedInferno, - BuffID.Ichor, - BuffID.Oiled, - BuffID.StardustMinionBleed, - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType() - }) }, - { ModContent.NPCType(), new Tuple(true, new int[] { - BuffID.BetsysCurse, - BuffID.CursedInferno, - BuffID.Ichor, - BuffID.Oiled, - BuffID.StardustMinionBleed, - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType() - }) }, - { ModContent.NPCType(), new Tuple(true, new int[] { - BuffID.BetsysCurse, - BuffID.CursedInferno, - BuffID.Ichor, - BuffID.Oiled, - BuffID.StardustMinionBleed, - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType() - }) }, - - { ModContent.NPCType(), new Tuple(true, new int[] { - BuffID.BetsysCurse, - BuffID.CursedInferno, - BuffID.Daybreak, - BuffID.DryadsWardDebuff, - BuffID.Ichor, - BuffID.Oiled, - BuffID.StardustMinionBleed, - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType() - }) }, - { ModContent.NPCType(), new Tuple(true, new int[] { - BuffID.BetsysCurse, - BuffID.CursedInferno, - BuffID.Daybreak, - BuffID.DryadsWardDebuff, - BuffID.Ichor, - BuffID.Oiled, - BuffID.StardustMinionBleed, - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType() - }) }, - - { ModContent.NPCType(), new Tuple(true, new int[] { - BuffID.BetsysCurse, - BuffID.CursedInferno, - BuffID.Ichor, - BuffID.StardustMinionBleed, - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType() - }) }, - { ModContent.NPCType(), new Tuple(true, new int[] { - BuffID.BetsysCurse, - BuffID.CursedInferno, - BuffID.Ichor, - BuffID.Oiled, - BuffID.StardustMinionBleed, - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType() - }) }, - { ModContent.NPCType(), new Tuple(true, new int[] { - BuffID.BetsysCurse, - BuffID.CursedInferno, - BuffID.Ichor, - BuffID.Oiled, - BuffID.StardustMinionBleed, - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType() - }) }, - { ModContent.NPCType(), new Tuple(true, new int[] { - BuffID.BetsysCurse, - BuffID.CursedInferno, - BuffID.Ichor, - BuffID.Oiled, - BuffID.StardustMinionBleed, - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType() - }) }, - - { ModContent.NPCType(), new Tuple(true, new int[] { }) }, - { ModContent.NPCType(), new Tuple(true, new int[] { }) }, - { ModContent.NPCType(), new Tuple(true, new int[] { }) }, - { ModContent.NPCType(), new Tuple(true, new int[] { }) }, - - { ModContent.NPCType(), new Tuple(true, new int[] { }) }, - { ModContent.NPCType(), new Tuple(true, new int[] { }) }, - { ModContent.NPCType(), new Tuple(true, new int[] { }) }, - { ModContent.NPCType(), new Tuple(true, new int[] { }) }, - { ModContent.NPCType(), new Tuple(true, new int[] { }) }, - { ModContent.NPCType(), new Tuple(true, new int[] { }) }, - - { ModContent.NPCType(), new Tuple(true, new int[] { - BuffID.BetsysCurse, - BuffID.CursedInferno, - BuffID.Ichor, - BuffID.Oiled, - BuffID.StardustMinionBleed, - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType() - }) }, - { ModContent.NPCType(), new Tuple(true, new int[] { }) }, - { ModContent.NPCType(), new Tuple(false, new int[] { }) }, - - { ModContent.NPCType(), new Tuple(true, new int[] { - BuffID.BetsysCurse, - BuffID.CursedInferno, - BuffID.Daybreak, - BuffID.Ichor, - BuffID.Oiled, - BuffID.StardustMinionBleed, - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType() - }) }, - { ModContent.NPCType(), new Tuple(true, new int[] { }) }, - { ModContent.NPCType(), new Tuple(true, new int[] { }) }, - { ModContent.NPCType(), new Tuple(true, new int[] { }) }, - - { ModContent.NPCType(), new Tuple(true, new int[] { }) }, - { ModContent.NPCType(), new Tuple(true, new int[] { }) }, - { ModContent.NPCType(), new Tuple(true, new int[] { }) }, - - { ModContent.NPCType(), new Tuple(true, new int[] { }) }, - { ModContent.NPCType(), new Tuple(true, new int[] { }) }, - { ModContent.NPCType(), new Tuple(true, new int[] { }) }, - { ModContent.NPCType(), new Tuple(true, new int[] { }) }, - { ModContent.NPCType(), new Tuple(true, new int[] { }) }, - { ModContent.NPCType(), new Tuple(true, new int[] { }) }, - { ModContent.NPCType(), new Tuple(true, new int[] { }) }, - { ModContent.NPCType(), new Tuple(true, new int[] { }) }, - { ModContent.NPCType(), new Tuple(true, new int[] { }) }, - - { ModContent.NPCType(), new Tuple(true, new int[] { - BuffID.CursedInferno, - BuffID.Ichor, - ModContent.BuffType(), - ModContent.BuffType() - }) }, - { ModContent.NPCType(), new Tuple(false, new int[] { }) }, - { ModContent.NPCType(), new Tuple(false, new int[] { }) }, - - { ModContent.NPCType(), new Tuple(true, new int[] { - BuffID.CursedInferno, - BuffID.Ichor - }) }, - { ModContent.NPCType(), new Tuple(true, new int[] { - BuffID.CursedInferno, - BuffID.Ichor - }) }, - { ModContent.NPCType(), new Tuple(true, new int[] { - BuffID.CursedInferno, - BuffID.Ichor - }) }, - { ModContent.NPCType(), new Tuple(true, new int[] { - BuffID.CursedInferno, - BuffID.Ichor - }) }, - { ModContent.NPCType(), new Tuple(true, new int[] { }) }, - { ModContent.NPCType(), new Tuple(true, new int[] { }) }, - { ModContent.NPCType(), new Tuple(true, new int[] { }) }, - { ModContent.NPCType(), new Tuple(true, new int[] { }) }, - { ModContent.NPCType(), new Tuple(true, new int[] { }) }, - - // The struct is called BossStats but we have all the enemies... just something to consider... - { ModContent.NPCType(), new Tuple(false, new int[] { ModContent.BuffType() }) }, - { ModContent.NPCType(), new Tuple(false, new int[] { ModContent.BuffType() }) }, - { ModContent.NPCType(), new Tuple(false, new int[] { ModContent.BuffType() }) }, - { ModContent.NPCType(), new Tuple(false, new int[] { ModContent.BuffType() }) }, - { ModContent.NPCType(), new Tuple(false, new int[] { ModContent.BuffType() }) }, - { ModContent.NPCType(), new Tuple(false, new int[] { ModContent.BuffType() }) }, - { ModContent.NPCType(), new Tuple(false, new int[] { ModContent.BuffType() }) }, - { ModContent.NPCType(), new Tuple(false, new int[] { ModContent.BuffType() }) }, - { ModContent.NPCType(), new Tuple(true, new int[] { }) }, - { ModContent.NPCType(), new Tuple(true, new int[] { }) }, - { ModContent.NPCType(), new Tuple(true, new int[] { }) }, - { ModContent.NPCType(), new Tuple(true, new int[] { }) }, - { ModContent.NPCType(), new Tuple(false, new int[] { ModContent.BuffType() }) }, - { ModContent.NPCType(), new Tuple(false, new int[] { ModContent.BuffType() }) }, - { ModContent.NPCType(), new Tuple(false, new int[] { ModContent.BuffType() }) }, - { ModContent.NPCType(), new Tuple(false, new int[] { ModContent.BuffType() }) }, - { ModContent.NPCType(), new Tuple(true, new int[] { }) }, - { ModContent.NPCType(), new Tuple(true, new int[] { }) }, - { ModContent.NPCType(), new Tuple(true, new int[] { }) }, - { ModContent.NPCType(), new Tuple(false, new int[] { ModContent.BuffType() }) }, - { ModContent.NPCType(), new Tuple(false, new int[] { ModContent.BuffType() }) }, - - { ModContent.NPCType(), new Tuple(true, new int[] { }) }, - { ModContent.NPCType(), new Tuple(true, new int[] { }) }, - { ModContent.NPCType(), new Tuple(true, new int[] { }) }, - { ModContent.NPCType(), new Tuple(true, new int[] { }) }, - { ModContent.NPCType(), new Tuple(true, new int[] { }) }, - { ModContent.NPCType(), new Tuple(true, new int[] { }) }, - { ModContent.NPCType(), new Tuple(true, new int[] { }) }, - { ModContent.NPCType(), new Tuple(true, new int[] { }) }, - { ModContent.NPCType(), new Tuple(true, new int[] { - BuffID.BetsysCurse, - BuffID.CursedInferno, - BuffID.Daybreak, - BuffID.DryadsWardDebuff, - BuffID.Frostburn, - BuffID.Ichor, - BuffID.Oiled, - BuffID.StardustMinionBleed, - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType() - }) }, - { ModContent.NPCType(), new Tuple(true, new int[] { - BuffID.BetsysCurse, - BuffID.CursedInferno, - BuffID.Daybreak, - BuffID.DryadsWardDebuff, - BuffID.Frostburn, - BuffID.Ichor, - BuffID.Oiled, - BuffID.StardustMinionBleed, - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType() - }) }, - - { ModContent.NPCType(), new Tuple(true, new int[] { }) }, - { ModContent.NPCType(), new Tuple(true, new int[] { }) }, - { ModContent.NPCType(), new Tuple(true, new int[] { }) }, - { ModContent.NPCType(), new Tuple(true, new int[] { }) }, - { ModContent.NPCType(), new Tuple(true, new int[] { }) }, - { ModContent.NPCType(), new Tuple(true, new int[] { }) }, - { ModContent.NPCType(), new Tuple(true, new int[] { }) }, - { ModContent.NPCType(), new Tuple(true, new int[] { }) }, - { ModContent.NPCType(), new Tuple(true, new int[] { }) }, - { ModContent.NPCType(), new Tuple(true, new int[] { }) }, - { ModContent.NPCType(), new Tuple(true, new int[] { }) }, - { ModContent.NPCType(), new Tuple(true, new int[] { }) }, - { ModContent.NPCType(), new Tuple(true, new int[] { }) }, - { ModContent.NPCType(), new Tuple(true, new int[] { }) }, - { ModContent.NPCType(), new Tuple(true, new int[] { }) }, - { ModContent.NPCType(), new Tuple(true, new int[] { }) }, - - { ModContent.NPCType(), new Tuple(true, new int[] { }) }, - { ModContent.NPCType(), new Tuple(true, new int[] { }) }, - { ModContent.NPCType(), new Tuple(true, new int[] { }) }, - { ModContent.NPCType(), new Tuple(true, new int[] { }) }, - { ModContent.NPCType(), new Tuple(true, new int[] { }) }, - { ModContent.NPCType(), new Tuple(true, new int[] { }) }, - { ModContent.NPCType(), new Tuple(true, new int[] { }) }, - { ModContent.NPCType(), new Tuple(true, new int[] { }) }, - { ModContent.NPCType(), new Tuple(true, new int[] { }) }, - { ModContent.NPCType(), new Tuple(true, new int[] { }) }, - { ModContent.NPCType(), new Tuple(true, new int[] { }) }, - { ModContent.NPCType(), new Tuple(true, new int[] { }) }, - { ModContent.NPCType(), new Tuple(true, new int[] { }) }, - - { ModContent.NPCType(), new Tuple(false, new int[] { ModContent.BuffType() }) }, - { ModContent.NPCType(), new Tuple(false, new int[] { ModContent.BuffType(), BuffID.Poisoned }) }, - { ModContent.NPCType(), new Tuple(false, new int[] { ModContent.BuffType(), BuffID.Poisoned }) }, - { ModContent.NPCType(), new Tuple(false, new int[] { ModContent.BuffType() }) }, - { ModContent.NPCType(), new Tuple(false, new int[] { ModContent.BuffType() }) }, - { ModContent.NPCType(), new Tuple(false, new int[] { ModContent.BuffType() }) }, - { ModContent.NPCType(), new Tuple(false, new int[] { ModContent.BuffType() }) }, - { ModContent.NPCType(), new Tuple(false, new int[] { ModContent.BuffType() }) }, - { ModContent.NPCType(), new Tuple(false, new int[] { ModContent.BuffType() }) }, - { ModContent.NPCType(), new Tuple(false, new int[] { ModContent.BuffType() }) }, - { ModContent.NPCType(), new Tuple(false, new int[] { ModContent.BuffType() }) }, - { ModContent.NPCType(), new Tuple(false, new int[] { ModContent.BuffType() }) }, - { ModContent.NPCType(), new Tuple(false, new int[] { ModContent.BuffType() }) }, - { ModContent.NPCType(), new Tuple(false, new int[] { ModContent.BuffType() }) }, - { ModContent.NPCType(), new Tuple(false, new int[] { ModContent.BuffType() }) }, - - { ModContent.NPCType(), new Tuple(true, new int[] { - BuffID.BetsysCurse, - BuffID.CursedInferno, - BuffID.Daybreak, - BuffID.DryadsWardDebuff, - BuffID.Frostburn, - BuffID.Ichor, - BuffID.Oiled, - BuffID.StardustMinionBleed, - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType() - }) }, - - { ModContent.NPCType(), new Tuple(true, new int[] { }) }, - { ModContent.NPCType(), new Tuple(true, new int[] { }) }, - { ModContent.NPCType(), new Tuple(true, new int[] { }) }, - { ModContent.NPCType(), new Tuple(true, new int[] { }) }, - { ModContent.NPCType(), new Tuple(true, new int[] { }) }, - - { ModContent.NPCType(), new Tuple(true, new int[] { - BuffID.BetsysCurse, - BuffID.CursedInferno, - BuffID.Ichor, - BuffID.Oiled, - BuffID.StardustMinionBleed, - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType() - }) }, - { ModContent.NPCType(), new Tuple(true, new int[] { - BuffID.BetsysCurse, - BuffID.CursedInferno, - BuffID.Ichor, - BuffID.Oiled, - BuffID.StardustMinionBleed, - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType() - }) }, - { ModContent.NPCType(), new Tuple(true, new int[] { - BuffID.BetsysCurse, - BuffID.CursedInferno, - BuffID.Daybreak, - BuffID.DryadsWardDebuff, - BuffID.Frostburn, - BuffID.Ichor, - BuffID.Oiled, - BuffID.StardustMinionBleed, - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType() - }) }, - { ModContent.NPCType(), new Tuple(false, new int[] { - BuffID.OnFire, - BuffID.Poisoned, - BuffID.ShadowFlame, - BuffID.Venom, - ModContent.BuffType(), - ModContent.BuffType() - }) }, - { ModContent.NPCType(), new Tuple(false, new int[] { - BuffID.OnFire, - BuffID.Poisoned, - BuffID.ShadowFlame, - BuffID.Venom, - ModContent.BuffType(), - ModContent.BuffType() - }) }, - { ModContent.NPCType(), new Tuple(false, new int[] { - BuffID.OnFire, - BuffID.Poisoned, - BuffID.ShadowFlame, - BuffID.Venom, - ModContent.BuffType(), - ModContent.BuffType() - }) }, - { ModContent.NPCType(), new Tuple(false, new int[] { - BuffID.OnFire, - BuffID.Poisoned, - BuffID.ShadowFlame, - BuffID.Venom, - ModContent.BuffType(), - ModContent.BuffType() - }) }, - { ModContent.NPCType(), new Tuple(false, new int[] { - BuffID.OnFire, - BuffID.Poisoned, - BuffID.ShadowFlame, - BuffID.Venom, - ModContent.BuffType(), - ModContent.BuffType() - }) }, - { ModContent.NPCType(), new Tuple(false, new int[] { - BuffID.OnFire, - BuffID.Poisoned, - BuffID.ShadowFlame, - BuffID.Venom, - ModContent.BuffType(), - ModContent.BuffType() - }) }, - { ModContent.NPCType(), new Tuple(true, new int[] { }) }, - { ModContent.NPCType(), new Tuple(true, new int[] { }) }, - { ModContent.NPCType(), new Tuple(true, new int[] { }) }, - { ModContent.NPCType(), new Tuple(true, new int[] { }) }, - { ModContent.NPCType(), new Tuple(false, new int[] { BuffID.Poisoned }) }, - { ModContent.NPCType(), new Tuple(false, new int[] { BuffID.OnFire }) }, - { ModContent.NPCType(), new Tuple(false, new int[] { BuffID.OnFire }) }, - { ModContent.NPCType(), new Tuple(false, new int[] { ModContent.BuffType() }) }, - { ModContent.NPCType(), new Tuple(false, new int[] { BuffID.Daybreak }) } - }; } // Destroys the BossStats struct to save memory because mod assemblies will not be fully unloaded until TML 1.4. - internal static void Unload() + internal static void UnloadBossStats() { BossStats.ExpertDamageMultiplier = null; BossStats.ContactDamageValues = null; BossStats.ProjectileDamageValues = null; - BossStats.DebuffImmunities = null; } #endregion } From 3a5c7634ffdb06ac21aa588c44e0ffd823d07a6a Mon Sep 17 00:00:00 2001 From: ben-tk <45545085+termigator1359@users.noreply.github.com> Date: Mon, 14 Dec 2020 20:16:46 -0500 Subject: [PATCH 5/7] made aureus not immune to venom by removing poison immunity vanilla please --- Utilities/NPCDebuffs.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/Utilities/NPCDebuffs.cs b/Utilities/NPCDebuffs.cs index ae14119480..f728ead889 100644 --- a/Utilities/NPCDebuffs.cs +++ b/Utilities/NPCDebuffs.cs @@ -403,6 +403,7 @@ namespace CalamityMod BuffID.Frostburn, BuffID.Ichor, BuffID.Oiled, + BuffID.Poisoned, BuffID.SoulDrain, BuffID.StardustMinionBleed, BuffID.Venom, From 8af311055182bc7cbd7b9c094b1e3874b826b900 Mon Sep 17 00:00:00 2001 From: Cameron Ewell Date: Mon, 14 Dec 2020 23:33:04 -0500 Subject: [PATCH 6/7] Added Patreon-GitHub sponsor integration --- .github/FUNDING.yml | 1 + 1 file changed, 1 insertion(+) create mode 100644 .github/FUNDING.yml diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml new file mode 100644 index 0000000000..583986729d --- /dev/null +++ b/.github/FUNDING.yml @@ -0,0 +1 @@ +patreon: Fabsol From 99fd27bd884c06588a024b0e5770cb1927b39e4e Mon Sep 17 00:00:00 2001 From: Andrew Marheine Date: Wed, 16 Dec 2020 08:14:49 -0600 Subject: [PATCH 7/7] 1 - Yharon no longer sticks to a position before doing an attack. 2 - Yharon decreases his fast charge telegraph time as he enters later phases. 3 - Ultimus Cleaver and Inferna Cutter no longer benefit from true melee boosts. 4 - Reduced the potency of defense damage. 5 - Lava and honey no longer inflict sulphur poison while in the sulphur sea. 6 - Reduced Elysian Wings move speed boost. 7 - Reduced Hadarian Wings move speed boost while wearing Astral Armor. 8 - Buffed MOAB jump speed boost. 9 - Nerfed Heart of the Elements damage in post-ML. 10 - Nerfed Holy Fire Bullet damage. 11 - Nerfed Angel Wings, Demon Wings, Butterfly Wings, Fairy Wings, Bone Wings, Flame Wings, Ghost Wings, Beetle Wings, Leaf Wings, Bat Wings and Festive Wings extra bonuses. 12 - DoG head and tail damage multiplier scales with distance from target. 13 - DoG phase 1 and 2 fire a single laser directly at the player during laser attacks in expert+. 14 - Old Duke Tooth Balls and projectiles no longer i-frame fuck the player. 15 - Increased Aquatic Scourge despawn distance from 500 tiles to 800 to prevent fear of accidental despawns. 16 - Golem Head hitbox fix, I hope. 17 - Greatly increased post-DoG event spawn rates. 18 - Increased Elemental Axe i-frames from 6 to 15. --- CalPlayer/CalamityPlayer.cs | 8 +- CalPlayer/CalamityPlayerLifeRegen.cs | 2 +- Items/Accessories/HeartoftheElements.cs | 2 +- Items/Accessories/Wings/ElysianWings.cs | 6 +- Items/Accessories/Wings/HadarianWings.cs | 4 +- Items/Accessories/Wings/MOAB.cs | 4 +- Items/Ammo/HolyFireBullet.cs | 2 +- Items/CalamityGlobalItem.cs | 72 +++--- NPCs/CalamityAI.cs | 2 +- NPCs/CalamityGlobalNPC.cs | 49 +++- NPCs/DevourerofGods/DevourerofGodsHead.cs | 58 +++-- NPCs/DevourerofGods/DevourerofGodsHeadS.cs | 32 ++- NPCs/DevourerofGods/DevourerofGodsTail.cs | 14 +- NPCs/DevourerofGods/DevourerofGodsTailS.cs | 14 +- NPCs/OldDuke/OldDukeToothBall.cs | 4 +- NPCs/Providence/Providence.cs | 2 +- NPCs/Yharon/Yharon.cs | 240 +++++++++++------- Projectiles/Boss/SandPoisonCloud.cs | 13 +- Projectiles/Boss/SandPoisonCloudOldDuke.cs | 73 ++++++ Projectiles/Boss/SandTooth.cs | 11 +- Projectiles/Boss/SandToothOldDuke.cs | 52 ++++ Projectiles/Ranged/HolyFireBulletProj.cs | 2 +- Projectiles/Summon/ElementalAxeMinion.cs | 2 +- .../Summon/TacticalPlagueEngineSummon.cs | 2 +- Utilities/NPCStats.cs | 4 +- 25 files changed, 459 insertions(+), 215 deletions(-) create mode 100644 Projectiles/Boss/SandPoisonCloudOldDuke.cs create mode 100644 Projectiles/Boss/SandToothOldDuke.cs diff --git a/CalPlayer/CalamityPlayer.cs b/CalPlayer/CalamityPlayer.cs index 9ae6e57720..00ec1cb8d4 100644 --- a/CalPlayer/CalamityPlayer.cs +++ b/CalPlayer/CalamityPlayer.cs @@ -12,6 +12,7 @@ using CalamityMod.Items.Armor; using CalamityMod.Items.DifficultyItems; using CalamityMod.Items.Dyes; using CalamityMod.Items.Mounts; +using CalamityMod.Items.Tools; using CalamityMod.Items.TreasureBags; using CalamityMod.Items.Weapons.Melee; using CalamityMod.Items.Weapons.Ranged; @@ -41,7 +42,6 @@ using CalamityMod.Projectiles.Boss; using CalamityMod.Projectiles.DraedonsArsenal; using CalamityMod.Projectiles.Enemy; using CalamityMod.Projectiles.Environment; -using CalamityMod.Projectiles.Healing; using CalamityMod.Projectiles.Melee; using CalamityMod.Projectiles.Ranged; using CalamityMod.Projectiles.Rogue; @@ -4932,7 +4932,7 @@ namespace CalamityMod.CalPlayer { damageMult += 4.0; } - if (item.melee) + if (item.melee && item.type != ModContent.ItemType() && item.type != ModContent.ItemType()) { damageMult += trueMeleeDamage; } @@ -5496,7 +5496,7 @@ namespace CalamityMod.CalPlayer { int newDamage = damage; - double defenseStatDamageMult = CalamityWorld.death ? 0.25 : CalamityWorld.revenge ? 0.2 : Main.expertMode ? 0.15 : 0.1; + double defenseStatDamageMult = CalamityWorld.death ? 0.15 : CalamityWorld.revenge ? 0.125 : Main.expertMode ? 0.1 : 0.05; if (draedonsHeart) defenseStatDamageMult *= 0.5; @@ -5830,7 +5830,7 @@ namespace CalamityMod.CalPlayer { int newDamage = damage; - double defenseStatDamageMult = CalamityWorld.death ? 0.25 : CalamityWorld.revenge ? 0.2 : Main.expertMode ? 0.15 : 0.1; + double defenseStatDamageMult = CalamityWorld.death ? 0.15 : CalamityWorld.revenge ? 0.125 : Main.expertMode ? 0.1 : 0.05; if (draedonsHeart) defenseStatDamageMult *= 0.5; diff --git a/CalPlayer/CalamityPlayerLifeRegen.cs b/CalPlayer/CalamityPlayerLifeRegen.cs index bc2f84baa8..c67e458421 100644 --- a/CalPlayer/CalamityPlayerLifeRegen.cs +++ b/CalPlayer/CalamityPlayerLifeRegen.cs @@ -144,7 +144,7 @@ namespace CalamityMod.CalPlayer lifeRegenLost += 20; } - if (modPlayer.ZoneSulphur && player.IsUnderwater() && !modPlayer.aquaticScourgeLore && !modPlayer.decayEffigy) + if (modPlayer.ZoneSulphur && player.IsUnderwater() && !modPlayer.aquaticScourgeLore && !modPlayer.decayEffigy && !player.lavaWet && !player.honeyWet) { player.AddBuff(ModContent.BuffType(), 2, true); modPlayer.pissWaterBoost++; diff --git a/Items/Accessories/HeartoftheElements.cs b/Items/Accessories/HeartoftheElements.cs index 386c033959..896f2658a4 100644 --- a/Items/Accessories/HeartoftheElements.cs +++ b/Items/Accessories/HeartoftheElements.cs @@ -77,7 +77,7 @@ namespace CalamityMod.Items.Accessories if (!hideVisual) { Vector2 velocity = new Vector2(0f, -1f); - int damage = NPC.downedMoonlord ? 150 : 90; + int damage = NPC.downedMoonlord ? 110 : 90; float damageMult = CalamityWorld.downedDoG ? 2f : 1f; int elementalDmg = (int)(damage * damageMult * player.MinionDamage()); float kBack = 2f + player.minionKB; diff --git a/Items/Accessories/Wings/ElysianWings.cs b/Items/Accessories/Wings/ElysianWings.cs index fd1b0cf45c..b7712a0e17 100644 --- a/Items/Accessories/Wings/ElysianWings.cs +++ b/Items/Accessories/Wings/ElysianWings.cs @@ -18,7 +18,7 @@ namespace CalamityMod.Items.Accessories.Wings "Acceleration multiplier: 2.7\n" + "Great vertical speed\n" + "Flight time: 200\n" + - "Temporary immunity to lava and 30% increased movement speed"); + "Temporary immunity to lava and 15% increased movement speed"); } public override void SetDefaults() @@ -39,7 +39,7 @@ namespace CalamityMod.Items.Accessories.Wings { if (line2.mod == "Terraria" && line2.Name == "Tooltip5") { - line2.text = "Temporary immunity to lava and 30% increased movement speed\n" + + line2.text = "Temporary immunity to lava and 15% increased movement speed\n" + "Provides heat protection in Death Mode"; } } @@ -49,7 +49,7 @@ namespace CalamityMod.Items.Accessories.Wings public override void UpdateAccessory(Player player, bool hideVisual) { CalamityPlayer modPlayer = player.Calamity(); - player.moveSpeed += 0.3f; + player.moveSpeed += 0.15f; player.lavaMax += 240; player.wingTimeMax = 200; player.noFallDmg = true; diff --git a/Items/Accessories/Wings/HadarianWings.cs b/Items/Accessories/Wings/HadarianWings.cs index 6cf9d5fc80..9025f0b57b 100644 --- a/Items/Accessories/Wings/HadarianWings.cs +++ b/Items/Accessories/Wings/HadarianWings.cs @@ -22,7 +22,7 @@ namespace CalamityMod.Items.Accessories.Wings "Acceleration multiplier: 1.75\n" + "Good vertical speed\n" + "Flight time: 120\n" + - "15% increased movement speed and 8% increased jump speed while wearing the Astral Armor"); + "10% increased movement speed and 8% increased jump speed while wearing the Astral Armor"); } public override void SetDefaults() @@ -38,7 +38,7 @@ namespace CalamityMod.Items.Accessories.Wings { if (player.armor[0].type == ModContent.ItemType() && player.armor[1].type == ModContent.ItemType() && player.armor[2].type == ModContent.ItemType()) { - player.moveSpeed += 0.15f; + player.moveSpeed += 0.1f; player.jumpSpeedBoost += 0.4f; } diff --git a/Items/Accessories/Wings/MOAB.cs b/Items/Accessories/Wings/MOAB.cs index 67ff14258b..d5a4e591b0 100644 --- a/Items/Accessories/Wings/MOAB.cs +++ b/Items/Accessories/Wings/MOAB.cs @@ -18,7 +18,7 @@ namespace CalamityMod.Items.Accessories.Wings "Acceleration multiplier: 1\n" + "Good vertical speed\n" + "Flight time: 75\n" + - "16% increased jump speed and allows auto-jump\n" + + "20% increased jump speed and allows auto-jump\n" + "Grants the player cloud, blizzard, and sandstorm mid-air jumps"); } @@ -92,7 +92,7 @@ namespace CalamityMod.Items.Accessories.Wings player.jumpBoost = true; player.autoJump = true; player.noFallDmg = true; - player.jumpSpeedBoost += 0.8f; + player.jumpSpeedBoost += 1f; player.wingTimeMax = 75; } diff --git a/Items/Ammo/HolyFireBullet.cs b/Items/Ammo/HolyFireBullet.cs index 50e6418e9d..f2fd12c1fa 100644 --- a/Items/Ammo/HolyFireBullet.cs +++ b/Items/Ammo/HolyFireBullet.cs @@ -14,7 +14,7 @@ namespace CalamityMod.Items.Ammo public override void SetDefaults() { - item.damage = 27; + item.damage = 22; item.ranged = true; item.width = 22; item.height = 22; diff --git a/Items/CalamityGlobalItem.cs b/Items/CalamityGlobalItem.cs index bc8ab79247..9b8361648f 100644 --- a/Items/CalamityGlobalItem.cs +++ b/Items/CalamityGlobalItem.cs @@ -2023,7 +2023,7 @@ Grants immunity to fire blocks, and temporary immunity to lava"; "Acceleration multiplier: 1\n" + "Average vertical speed\n" + "Flight time: 100\n" + - "+20 max life, +15 defense and +3 life regen"; + "+20 max life, +10 defense and +2 life regen"; } } } @@ -2038,7 +2038,7 @@ Grants immunity to fire blocks, and temporary immunity to lava"; "Acceleration multiplier: 1\n" + "Average vertical speed\n" + "Flight time: 100\n" + - "10% increased damage and critical strike chance"; + "5% increased damage and critical strike chance"; } } } @@ -2067,8 +2067,8 @@ Grants immunity to fire blocks, and temporary immunity to lava"; "Acceleration multiplier: 1\n" + "Average vertical speed\n" + "Flight time: 130\n" + - "+50 max mana, 5% decreased mana usage,\n" + - "10% increased magic damage and 5% increased magic critical strike chance"; + "+20 max mana, 5% decreased mana usage,\n" + + "5% increased magic damage and magic critical strike chance"; } } } @@ -2083,7 +2083,7 @@ Grants immunity to fire blocks, and temporary immunity to lava"; "Acceleration multiplier: 1\n" + "Average vertical speed\n" + "Flight time: 130\n" + - "+80 max life"; + "+60 max life"; } } } @@ -2129,8 +2129,7 @@ Grants immunity to fire blocks, and temporary immunity to lava"; "Acceleration multiplier: 1\n" + "Average vertical speed\n" + "Flight time: 140\n" + - "10% increased movement speed, 12% increased ranged damage,\n" + - "16% increased ranged critical strike chance\n" + + "10% increased movement speed, ranged damage and critical strike chance\n" + "and +30 defense while wearing the Necro Armor"; } } @@ -2146,8 +2145,7 @@ Grants immunity to fire blocks, and temporary immunity to lava"; "Acceleration multiplier: 1\n" + "Average vertical speed\n" + "Flight time: 160\n" + - "10% increased melee damage\n" + - "and 5% increased melee critical strike chance"; + "5% increased melee damage and critical strike chance"; } } } @@ -2180,8 +2178,7 @@ Grants immunity to fire blocks, and temporary immunity to lava"; "Average vertical speed\n" + "Flight time: 160\n" + "+10 defense and 5% increased damage reduction while wearing the Spectre Armor and Hood\n" + - "+20 max mana, 5% increased magic damage and critical strike chance,\n" + - "and 5% decreased mana usage while wearing the Spectre Armor and Mask"; + "5% increased magic damage and critical strike chance while wearing the Spectre Armor and Mask"; } } } @@ -2196,8 +2193,8 @@ Grants immunity to fire blocks, and temporary immunity to lava"; "Acceleration multiplier: 1\n" + "Average vertical speed\n" + "Flight time: 160\n" + - "+15 defense and 10% increased damage reduction while wearing the Beetle Armor and Shell\n" + - "10% increased melee damage and critical strike chance while wearing the Beetle Armor and Scale Mail"; + "+10 defense and 5% increased damage reduction while wearing the Beetle Armor and Shell\n" + + "5% increased melee damage and critical strike chance while wearing the Beetle Armor and Scale Mail"; } } } @@ -2259,7 +2256,7 @@ Grants immunity to fire blocks, and temporary immunity to lava"; "Acceleration multiplier: 1\n" + "Average vertical speed\n" + "Flight time: 160\n" + - "+10 defense, 10% increased damage reduction,\n" + + "+5 defense, 5% increased damage reduction,\n" + "and the Dryad's permanent blessing while wearing the Tiki Armor"; } } @@ -2277,7 +2274,7 @@ Grants immunity to fire blocks, and temporary immunity to lava"; "Flight time: 140\n" + "At night or during an eclipse, you will gain the following boosts:\n" + "10% increased movement speed, 20% increased jump speed,\n" + - "+15 defense, 10% increased damage, and 5% increased critical strike chance"; + "7% increased damage and 3% increased critical strike chance"; } } } @@ -2355,7 +2352,7 @@ Grants immunity to fire blocks, and temporary immunity to lava"; "Acceleration multiplier: 1\n" + "Average vertical speed\n" + "Flight time: 170\n" + - "+50 max life\n" + + "+40 max life\n" + "Ornaments rain down as you fly"; } } @@ -3223,14 +3220,14 @@ Grants immunity to fire blocks, and temporary immunity to lava"; if (item.type == ItemID.AngelWings) // Boost to max life, defense, and life regen { player.statLifeMax2 += 20; - player.statDefense += 15; - player.lifeRegen += 3; + player.statDefense += 10; + player.lifeRegen += 2; player.noFallDmg = true; } else if (item.type == ItemID.DemonWings) // Boost to all damage and crit { - player.allDamage += 0.1f; - modPlayer.AllCritBoost(10); + player.allDamage += 0.05f; + modPlayer.AllCritBoost(5); player.noFallDmg = true; } else if (item.type == ItemID.FinWings) // Boosted water abilities, faster fall in water @@ -3253,15 +3250,15 @@ Grants immunity to fire blocks, and temporary immunity to lava"; } else if (item.type == ItemID.ButterflyWings) // Boost to magic stats { - player.statManaMax2 += 50; - player.magicDamage += 0.1f; + player.statManaMax2 += 20; + player.magicDamage += 0.05f; player.manaCost *= 0.95f; player.magicCrit += 5; player.noFallDmg = true; } else if (item.type == ItemID.FairyWings) // Boost to max life { - player.statLifeMax2 += 80; + player.statLifeMax2 += 60; player.noFallDmg = true; } else if (item.type == ItemID.BatWings) // Stronger at night @@ -3269,10 +3266,9 @@ Grants immunity to fire blocks, and temporary immunity to lava"; player.noFallDmg = true; if (!Main.dayTime || Main.eclipse) { - player.jumpSpeedBoost += 1.0f; - player.statDefense += 15; - player.allDamage += 0.1f; - modPlayer.AllCritBoost(5); + player.jumpSpeedBoost += 1f; + player.allDamage += 0.07f; + modPlayer.AllCritBoost(3); player.moveSpeed += 0.1f; } } @@ -3289,8 +3285,8 @@ Grants immunity to fire blocks, and temporary immunity to lava"; player.body == ArmorIDs.Body.NecroBreastplate && player.legs == ArmorIDs.Legs.NecroGreaves) { player.moveSpeed += 0.1f; - player.rangedDamage += 0.12f; - player.rangedCrit += 16; + player.rangedDamage += 0.1f; + player.rangedCrit += 10; player.statDefense += 30; } } @@ -3315,7 +3311,7 @@ Grants immunity to fire blocks, and temporary immunity to lava"; } else if (item.type == ItemID.FlameWings) // Bonus to melee stats { - player.meleeDamage += 0.1f; + player.meleeDamage += 0.05f; player.meleeCrit += 5; player.noFallDmg = true; } @@ -3331,9 +3327,7 @@ Grants immunity to fire blocks, and temporary immunity to lava"; } else if (player.head == ArmorIDs.Head.SpectreMask) { - player.statManaMax2 += 20; player.magicDamage += 0.05f; - player.manaCost *= 0.95f; player.magicCrit += 5; } } @@ -3345,13 +3339,13 @@ Grants immunity to fire blocks, and temporary immunity to lava"; { if (player.body == ArmorIDs.Body.BeetleShell) { - player.statDefense += 15; - player.endurance += 0.1f; + player.statDefense += 10; + player.endurance += 0.05f; } else if (player.body == ArmorIDs.Body.BeetleScaleMail) { - player.meleeDamage += 0.1f; - player.meleeCrit += 10; + player.meleeDamage += 0.05f; + player.meleeCrit += 5; } } } @@ -3383,15 +3377,15 @@ Grants immunity to fire blocks, and temporary immunity to lava"; player.noFallDmg = true; if (player.head == ArmorIDs.Head.TikiMask && player.body == ArmorIDs.Body.TikiShirt && player.legs == ArmorIDs.Legs.TikiPants) { - player.statDefense += 10; - player.endurance += 0.1f; + player.statDefense += 5; + player.endurance += 0.05f; player.AddBuff(BuffID.DryadsWard, 5, true); // Dryad's Blessing } } else if (item.type == ItemID.FestiveWings) // Drop powerful homing christmas tree bulbs while in flight { player.noFallDmg = true; - player.statLifeMax2 += 50; + player.statLifeMax2 += 40; if (modPlayer.icicleCooldown <= 0) { if (player.controlJump && !player.jumpAgainCloud && player.jump == 0 && player.velocity.Y != 0f && !player.mount.Active && !player.mount.Cart) diff --git a/NPCs/CalamityAI.cs b/NPCs/CalamityAI.cs index 59f5ad3abc..0aba605f9a 100644 --- a/NPCs/CalamityAI.cs +++ b/NPCs/CalamityAI.cs @@ -333,7 +333,7 @@ namespace CalamityMod.NPCs } } - float maxDistance = calamityGlobalNPC.newAI[0] == 1f ? 8000f : 4000f; + float maxDistance = calamityGlobalNPC.newAI[0] == 1f ? 12800f : 6400f; if (player.dead || Vector2.Distance(npc.Center, player.Center) > maxDistance) { calamityGlobalNPC.newAI[1] = 1f; diff --git a/NPCs/CalamityGlobalNPC.cs b/NPCs/CalamityGlobalNPC.cs index 9526c1c24e..2c0e6b71af 100644 --- a/NPCs/CalamityGlobalNPC.cs +++ b/NPCs/CalamityGlobalNPC.cs @@ -580,9 +580,8 @@ namespace CalamityMod.NPCs int projectileCount = 0; for (int j = 0; j < Main.maxProjectiles; j++) { - if (Main.projectile[j].active && - (Main.projectile[j].type == ProjectileType() && - Main.projectile[j].ai[0] == 1f && Main.projectile[j].ai[1] == npc.whoAmI)) + if (Main.projectile[j].active && Main.projectile[j].type == ProjectileType() && + Main.projectile[j].ai[0] == 1f && Main.projectile[j].ai[1] == npc.whoAmI) { projectileCount++; } @@ -604,8 +603,7 @@ namespace CalamityMod.NPCs int projectileCount = 0; for (int j = 0; j < Main.maxProjectiles; j++) { - if (Main.projectile[j].active && - (Main.projectile[j].type == ProjectileType()) && + if (Main.projectile[j].active && Main.projectile[j].type == ProjectileType() && Main.projectile[j].ai[0] == 1f && Main.projectile[j].ai[1] == npc.whoAmI) { projectileCount++; @@ -1004,7 +1002,8 @@ namespace CalamityMod.NPCs } else if (npc.type == NPCID.GolemHead) { - npc.lifeMax = (int)(npc.lifeMax * 1.5); + npc.width = npc.height = 100; + npc.lifeMax = (int)(npc.lifeMax * 1.5); } else if (npc.type == NPCID.GolemHeadFree) { @@ -3505,8 +3504,8 @@ namespace CalamityMod.NPCs // Boosts if (CalamityWorld.downedDoG && (Main.pumpkinMoon || Main.snowMoon || Main.eclipse)) { - spawnRate = (int)(spawnRate * 0.75); - maxSpawns = (int)(maxSpawns * 2f); + spawnRate = (int)(spawnRate * 0.5); + maxSpawns = (int)(maxSpawns * 5f); } if (player.Calamity().clamity) @@ -4302,7 +4301,7 @@ namespace CalamityMod.NPCs { if (CalamityWorld.revenge || BossRushEvent.BossRushActive) { - if (npc.type == NPCID.GolemHeadFree) + if (npc.type == NPCID.GolemHeadFree || npc.type == NPCID.GolemHead) { Texture2D npcTexture = Main.npcTexture[npc.type]; int frameHeight = npcTexture.Height / Main.npcFrameCount[npc.type]; @@ -4311,10 +4310,36 @@ namespace CalamityMod.NPCs if (npc.spriteDirection == 1) spriteEffects = SpriteEffects.FlipHorizontally; - if (npc.localAI[0] == 1f) - npc.frame.Y = frameHeight; + if (npc.type == NPCID.GolemHead) + { + if (npc.ai[0] == 0f) + { + if (npc.localAI[0] == 1f) + npc.frame.Y = frameHeight; + else + npc.frame.Y = 0; + } + else if (npc.ai[0] == 1f) + { + if (npc.localAI[0] == 1f) + npc.frame.Y = frameHeight; + else + npc.frame.Y = 0; + + if (npc.localAI[1] == -1f) + npc.frame.Y += frameHeight * 4; + + if (npc.localAI[1] == 1f) + npc.frame.Y += frameHeight * 2; + } + } else - npc.frame.Y = 0; + { + if (npc.localAI[0] == 1f) + npc.frame.Y = frameHeight; + else + npc.frame.Y = 0; + } spriteBatch.Draw(npcTexture, npc.Center - Main.screenPosition + new Vector2(0, npc.gfxOffY), npc.frame, npc.GetAlpha(drawColor), npc.rotation, npc.frame.Size() / 2, npc.scale, spriteEffects, 0); } diff --git a/NPCs/DevourerofGods/DevourerofGodsHead.cs b/NPCs/DevourerofGods/DevourerofGodsHead.cs index 85f2c6a281..429d3682ad 100644 --- a/NPCs/DevourerofGods/DevourerofGodsHead.cs +++ b/NPCs/DevourerofGods/DevourerofGodsHead.cs @@ -138,10 +138,18 @@ namespace CalamityMod.NPCs.DevourerofGods Player player = Main.player[npc.target]; - bool increaseSpeed = Vector2.Distance(player.Center, vector) > CalamityGlobalNPC.CatchUpDistance200Tiles; - bool increaseSpeedMore = Vector2.Distance(player.Center, vector) > CalamityGlobalNPC.CatchUpDistance350Tiles; - bool takeLessDamage = Vector2.Distance(player.Center, vector) > CalamityGlobalNPC.CatchUpDistance200Tiles * 0.5f; - npc.takenDamageMultiplier = increaseSpeed ? 1f : takeLessDamage ? 1.15f : 1.25f; + float distanceFromTarget = Vector2.Distance(player.Center, vector); + bool increaseSpeed = distanceFromTarget > CalamityGlobalNPC.CatchUpDistance200Tiles; + bool increaseSpeedMore = distanceFromTarget > CalamityGlobalNPC.CatchUpDistance350Tiles; + + float takeLessDamageDistance = 1600f; + if (distanceFromTarget > takeLessDamageDistance) + { + float damageTakenScalar = MathHelper.Clamp(1f - ((distanceFromTarget - takeLessDamageDistance) / takeLessDamageDistance), 0f, 1f); + npc.takenDamageMultiplier = MathHelper.Lerp(1f, 1.25f, damageTakenScalar); + } + else + npc.takenDamageMultiplier = 1.25f; // Spawn Guardians if (phase3) @@ -256,11 +264,14 @@ namespace CalamityMod.NPCs.DevourerofGods start = new Vector2(player.position.X + spawnOffset, player.position.Y + shotSpacing); aim.Y += laserWallSpacingOffset * (x - 3); velocity = Vector2.Normalize(aim - start) * speed; - Projectile.NewProjectile(start, velocity, type, damage, 0f, Main.myPlayer, 0f, 0f); + Projectile.NewProjectile(start, velocity, type, damage, 0f, Main.myPlayer); shotSpacing -= spacingVar; } + if (expertMode) + Projectile.NewProjectile(player.position.X + spawnOffset, player.position.Y, -speed, 0f, type, damage, 0f, Main.myPlayer); + laserWallType = (int)LaserWallType.DiagonalLeft; break; @@ -271,11 +282,14 @@ namespace CalamityMod.NPCs.DevourerofGods start = new Vector2(player.position.X - spawnOffset, player.position.Y + shotSpacing); aim.Y += laserWallSpacingOffset * (x - 3); velocity = Vector2.Normalize(aim - start) * speed; - Projectile.NewProjectile(start, velocity, type, damage, 0f, Main.myPlayer, 0f, 0f); + Projectile.NewProjectile(start, velocity, type, damage, 0f, Main.myPlayer); shotSpacing -= spacingVar; } + if (expertMode) + Projectile.NewProjectile(player.position.X - spawnOffset, player.position.Y, speed, 0f, type, damage, 0f, Main.myPlayer); + laserWallType = expertMode ? (int)LaserWallType.DiagonalHorizontal : (int)LaserWallType.DiagonalRight; break; @@ -286,15 +300,21 @@ namespace CalamityMod.NPCs.DevourerofGods start = new Vector2(player.position.X + spawnOffset, player.position.Y + shotSpacing); aim.Y += laserWallSpacingOffset * (x - 3); velocity = Vector2.Normalize(aim - start) * speed; - Projectile.NewProjectile(start, velocity, type, damage, 0f, Main.myPlayer, 0f, 0f); + Projectile.NewProjectile(start, velocity, type, damage, 0f, Main.myPlayer); start = new Vector2(player.position.X - spawnOffset, player.position.Y + shotSpacing); velocity = Vector2.Normalize(aim - start) * speed; - Projectile.NewProjectile(start, velocity, type, damage, 0f, Main.myPlayer, 0f, 0f); + Projectile.NewProjectile(start, velocity, type, damage, 0f, Main.myPlayer); shotSpacing -= spacingVar; } + if (expertMode) + { + Projectile.NewProjectile(player.position.X + spawnOffset, player.position.Y, -speed, 0f, type, damage, 0f, Main.myPlayer); + Projectile.NewProjectile(player.position.X - spawnOffset, player.position.Y, speed, 0f, type, damage, 0f, Main.myPlayer); + } + laserWallType = revenge ? (int)LaserWallType.DiagonalCross : (int)LaserWallType.DiagonalRight; break; @@ -305,24 +325,30 @@ namespace CalamityMod.NPCs.DevourerofGods start = new Vector2(player.position.X + spawnOffset, player.position.Y + shotSpacing); aim.Y += laserWallSpacingOffset * (x - 3); velocity = Vector2.Normalize(aim - start) * speed; - Projectile.NewProjectile(start, velocity, type, damage, 0f, Main.myPlayer, 0f, 0f); + Projectile.NewProjectile(start, velocity, type, damage, 0f, Main.myPlayer); start = new Vector2(player.position.X - spawnOffset, player.position.Y + shotSpacing); velocity = Vector2.Normalize(aim - start) * speed; - Projectile.NewProjectile(start, velocity, type, damage, 0f, Main.myPlayer, 0f, 0f); + Projectile.NewProjectile(start, velocity, type, damage, 0f, Main.myPlayer); start = new Vector2(player.position.X + shotSpacing, player.position.Y + spawnOffset); aimClone.X += laserWallSpacingOffset * (x - 3); velocity = Vector2.Normalize(aimClone - start) * speed; - Projectile.NewProjectile(start, velocity, type, damage, 0f, Main.myPlayer, 0f, 0f); + Projectile.NewProjectile(start, velocity, type, damage, 0f, Main.myPlayer); start = new Vector2(player.position.X + shotSpacing, player.position.Y - spawnOffset); velocity = Vector2.Normalize(aimClone - start) * speed; - Projectile.NewProjectile(start, velocity, type, damage, 0f, Main.myPlayer, 0f, 0f); + Projectile.NewProjectile(start, velocity, type, damage, 0f, Main.myPlayer); shotSpacing -= spacingVar; } + if (expertMode) + { + Projectile.NewProjectile(player.position.X + spawnOffset, player.position.Y, -speed, 0f, type, damage, 0f, Main.myPlayer); + Projectile.NewProjectile(player.position.X - spawnOffset, player.position.Y, speed, 0f, type, damage, 0f, Main.myPlayer); + } + laserWallType = (int)LaserWallType.DiagonalRight; break; } @@ -456,8 +482,8 @@ namespace CalamityMod.NPCs.DevourerofGods if (expertMode) { - num188 += Vector2.Distance(player.Center, npc.Center) * 0.005f * (1f - lifeRatio); - num189 += Vector2.Distance(player.Center, npc.Center) * 0.0001f * (1f - lifeRatio); + num188 += distanceFromTarget * 0.005f * (1f - lifeRatio); + num189 += distanceFromTarget * 0.0001f * (1f - lifeRatio); } float num48 = num188 * 1.3f; @@ -588,8 +614,8 @@ namespace CalamityMod.NPCs.DevourerofGods fallSpeed += 3.5f * (1f - lifeRatio); speed += 0.08f * (1f - lifeRatio); turnSpeed += 0.12f * (1f - lifeRatio); - speed += Vector2.Distance(player.Center, npc.Center) * 0.00005f * (1f - lifeRatio); - turnSpeed += Vector2.Distance(player.Center, npc.Center) * 0.00005f * (1f - lifeRatio); + speed += distanceFromTarget * 0.00005f * (1f - lifeRatio); + turnSpeed += distanceFromTarget * 0.00005f * (1f - lifeRatio); } // Enrage diff --git a/NPCs/DevourerofGods/DevourerofGodsHeadS.cs b/NPCs/DevourerofGods/DevourerofGodsHeadS.cs index 2c58bd7ea4..4e385d665c 100644 --- a/NPCs/DevourerofGods/DevourerofGodsHeadS.cs +++ b/NPCs/DevourerofGods/DevourerofGodsHeadS.cs @@ -183,8 +183,15 @@ namespace CalamityMod.NPCs.DevourerofGods float distanceFromTarget = Vector2.Distance(player.Center, vector); bool increaseSpeed = distanceFromTarget > CalamityGlobalNPC.CatchUpDistance200Tiles; bool increaseSpeedMore = distanceFromTarget > CalamityGlobalNPC.CatchUpDistance350Tiles; - bool takeLessDamage = Vector2.Distance(player.Center, vector) > CalamityGlobalNPC.CatchUpDistance200Tiles * 0.5f; - npc.takenDamageMultiplier = increaseSpeed ? 1f : takeLessDamage ? 1.15f : 1.25f; + + float takeLessDamageDistance = 1600f; + if (distanceFromTarget > takeLessDamageDistance) + { + float damageTakenScalar = MathHelper.Clamp(1f - ((distanceFromTarget - takeLessDamageDistance) / takeLessDamageDistance), 0f, 1f); + npc.takenDamageMultiplier = MathHelper.Lerp(1f, 1.25f, damageTakenScalar); + } + else + npc.takenDamageMultiplier = 1.25f; // Immunity after teleport npc.dontTakeDamage = postTeleportTimer > 0; @@ -380,6 +387,12 @@ namespace CalamityMod.NPCs.DevourerofGods shotSpacing[0] -= spacingVar; } + if (expertMode) + { + Projectile.NewProjectile(player.position.X + spawnOffset, targetPosY, -speed, 0f, type, damage, 0f, Main.myPlayer); + Projectile.NewProjectile(player.position.X - spawnOffset, targetPosY, speed, 0f, type, damage, 0f, Main.myPlayer); + } + laserWallType = (int)LaserWallType.Offset; break; @@ -393,6 +406,12 @@ namespace CalamityMod.NPCs.DevourerofGods shotSpacing[0] -= spacingVar; } + if (expertMode) + { + Projectile.NewProjectile(player.position.X, targetPosY + spawnOffset, 0f, -speed, type, damage, 0f, Main.myPlayer); + Projectile.NewProjectile(player.position.X, targetPosY - spawnOffset, 0f, speed, type, damage, 0f, Main.myPlayer); + } + laserWallType = revenge ? (int)LaserWallType.MultiLayered : expertMode ? (int)LaserWallType.DiagonalHorizontal : (int)LaserWallType.Normal; break; @@ -413,6 +432,9 @@ namespace CalamityMod.NPCs.DevourerofGods shotSpacing[3] -= Main.rand.NextBool(2) ? 180 : 200; } + Projectile.NewProjectile(player.position.X + spawnOffset, targetPosY, -speed, 0f, type, damage, 0f, Main.myPlayer); + Projectile.NewProjectile(player.position.X - spawnOffset, targetPosY, speed, 0f, type, damage, 0f, Main.myPlayer); + laserWallType = (int)LaserWallType.DiagonalHorizontal; break; @@ -432,6 +454,9 @@ namespace CalamityMod.NPCs.DevourerofGods shotSpacing[0] -= diagonalSpacingVar; } + Projectile.NewProjectile(player.position.X, targetPosY + spawnOffset, 0f, -speed, type, damage, 0f, Main.myPlayer); + Projectile.NewProjectile(player.position.X, targetPosY - spawnOffset, 0f, speed, type, damage, 0f, Main.myPlayer); + laserWallType = revenge ? (int)LaserWallType.DiagonalVertical : (int)LaserWallType.Normal; break; @@ -451,6 +476,9 @@ namespace CalamityMod.NPCs.DevourerofGods shotSpacing[0] -= diagonalSpacingVar; } + Projectile.NewProjectile(player.position.X + spawnOffset, targetPosY, -speed, 0f, type, damage, 0f, Main.myPlayer); + Projectile.NewProjectile(player.position.X - spawnOffset, targetPosY, speed, 0f, type, damage, 0f, Main.myPlayer); + laserWallType = (int)LaserWallType.Normal; break; } diff --git a/NPCs/DevourerofGods/DevourerofGodsTail.cs b/NPCs/DevourerofGods/DevourerofGodsTail.cs index 903d432305..a0d3f28c05 100644 --- a/NPCs/DevourerofGods/DevourerofGodsTail.cs +++ b/NPCs/DevourerofGods/DevourerofGodsTail.cs @@ -71,11 +71,17 @@ namespace CalamityMod.NPCs.DevourerofGods Player player = Main.player[npc.target]; - bool increaseSpeed = Vector2.Distance(player.Center, npc.Center) > CalamityGlobalNPC.CatchUpDistance200Tiles; - bool takeLessDamage = Vector2.Distance(player.Center, npc.Center) > CalamityGlobalNPC.CatchUpDistance200Tiles * 0.5f; - npc.takenDamageMultiplier = increaseSpeed ? 1f : takeLessDamage ? 1.15f : 1.25f; + float distanceFromTarget = Vector2.Distance(player.Center, npc.Center); + float takeLessDamageDistance = 1600f; + if (distanceFromTarget > takeLessDamageDistance) + { + float damageTakenScalar = MathHelper.Clamp(1f - ((distanceFromTarget - takeLessDamageDistance) / takeLessDamageDistance), 0f, 1f); + npc.takenDamageMultiplier = MathHelper.Lerp(1f, 1.25f, damageTakenScalar); + } + else + npc.takenDamageMultiplier = 1.25f; - if (npc.velocity.X < 0f) + if (npc.velocity.X < 0f) npc.spriteDirection = -1; else if (npc.velocity.X > 0f) npc.spriteDirection = 1; diff --git a/NPCs/DevourerofGods/DevourerofGodsTailS.cs b/NPCs/DevourerofGods/DevourerofGodsTailS.cs index 3e164f9806..31a55ad38e 100644 --- a/NPCs/DevourerofGods/DevourerofGodsTailS.cs +++ b/NPCs/DevourerofGods/DevourerofGodsTailS.cs @@ -109,11 +109,17 @@ namespace CalamityMod.NPCs.DevourerofGods Player player = Main.player[npc.target]; - bool increaseSpeed = Vector2.Distance(player.Center, npc.Center) > CalamityGlobalNPC.CatchUpDistance200Tiles; - bool takeLessDamage = Vector2.Distance(player.Center, npc.Center) > CalamityGlobalNPC.CatchUpDistance200Tiles * 0.5f; - npc.takenDamageMultiplier = increaseSpeed ? 1f : takeLessDamage ? 1.15f : 1.25f; + float distanceFromTarget = Vector2.Distance(player.Center, npc.Center); + float takeLessDamageDistance = 1600f; + if (distanceFromTarget > takeLessDamageDistance) + { + float damageTakenScalar = MathHelper.Clamp(1f - ((distanceFromTarget - takeLessDamageDistance) / takeLessDamageDistance), 0f, 1f); + npc.takenDamageMultiplier = MathHelper.Lerp(1f, 1.25f, damageTakenScalar); + } + else + npc.takenDamageMultiplier = 1.25f; - if (npc.velocity.X < 0f) + if (npc.velocity.X < 0f) npc.spriteDirection = -1; else if (npc.velocity.X > 0f) npc.spriteDirection = 1; diff --git a/NPCs/OldDuke/OldDukeToothBall.cs b/NPCs/OldDuke/OldDukeToothBall.cs index c428b6e37e..1874971ced 100644 --- a/NPCs/OldDuke/OldDukeToothBall.cs +++ b/NPCs/OldDuke/OldDukeToothBall.cs @@ -228,10 +228,10 @@ namespace CalamityMod.NPCs.OldDuke { float velocity = Main.rand.Next(7, 11); Vector2 vector255 = new Vector2(0f, -velocity).RotatedBy(radians * k); - int proj = Projectile.NewProjectile(npc.Center, vector255, ModContent.ProjectileType(), damage, 0f, Main.myPlayer, 0f, 0f); + int proj = Projectile.NewProjectile(npc.Center, vector255, ModContent.ProjectileType(), damage, 0f, Main.myPlayer, 0f, 0f); Main.projectile[proj].timeLeft = 360; } - Projectile.NewProjectile(npc.Center, Vector2.Zero, ModContent.ProjectileType(), damage, 0f, Main.myPlayer, 0f, 0f); + Projectile.NewProjectile(npc.Center, Vector2.Zero, ModContent.ProjectileType(), damage, 0f, Main.myPlayer, 0f, 0f); } return true; diff --git a/NPCs/Providence/Providence.cs b/NPCs/Providence/Providence.cs index ca0a8501f2..614c3335e4 100644 --- a/NPCs/Providence/Providence.cs +++ b/NPCs/Providence/Providence.cs @@ -927,7 +927,7 @@ namespace CalamityMod.NPCs.Providence if (Main.player[p].active && !Main.player[p].dead) targets.Add(p); - if (targets.Count > 9) + if (targets.Count > 4) break; } foreach (int t in targets) diff --git a/NPCs/Yharon/Yharon.cs b/NPCs/Yharon/Yharon.cs index dddb987fda..5cf2254380 100644 --- a/NPCs/Yharon/Yharon.cs +++ b/NPCs/Yharon/Yharon.cs @@ -44,8 +44,9 @@ namespace CalamityMod.NPCs.Yharon private bool startSecondAI = false; private bool spawnArena = false; private int invincibilityCounter = 0; + private int fastChargeTelegraphTime = 120; - public static float normalDR = 0.22f; + public static float normalDR = 0.22f; public static float ChargeTelegraph_DR = 0.4f; public static float EnragedDR = 0.9f; @@ -119,6 +120,7 @@ namespace CalamityMod.NPCs.Yharon writer.Write(secondPhasePhase); writer.Write(teleportLocation); writer.Write(invincibilityCounter); + writer.Write(fastChargeTelegraphTime); writer.WriteVector2(flareDustBulletHellSpawn); writer.Write(safeBox.X); writer.Write(safeBox.Y); @@ -142,6 +144,7 @@ namespace CalamityMod.NPCs.Yharon secondPhasePhase = reader.ReadInt32(); teleportLocation = reader.ReadInt32(); invincibilityCounter = reader.ReadInt32(); + fastChargeTelegraphTime = reader.ReadInt32(); flareDustBulletHellSpawn = reader.ReadVector2(); safeBox.X = reader.ReadInt32(); safeBox.Y = reader.ReadInt32(); @@ -169,10 +172,12 @@ namespace CalamityMod.NPCs.Yharon bool death = CalamityWorld.death || BossRushEvent.BossRushActive; float pie = (float)Math.PI; + Vector2 vectorCenter = npc.Center; + // Start phase 2 or not if (startSecondAI) { - Yharon_AI2(expertMode, revenge, death, pie, lifeRatio); + Yharon_AI2(expertMode, revenge, death, pie, lifeRatio, vectorCenter); return; } @@ -184,7 +189,6 @@ namespace CalamityMod.NPCs.Yharon bool phase1Change = npc.ai[0] > -1f; bool phase2Change = npc.ai[0] > 5f; bool phase3Change = npc.ai[0] > 12f; - bool isCharging = npc.ai[3] < 20f; // Flare limit int maxFlareCount = 3; @@ -207,31 +211,34 @@ namespace CalamityMod.NPCs.Yharon acceleration = 0.95f; velocity = 15f; phaseSwitchTimer = 25; + fastChargeTelegraphTime = 60; } else if (phase3Change) { acceleration = expertMode ? 0.85f : 0.8f; velocity = expertMode ? 14f : 13f; phaseSwitchTimer = expertMode ? 25 : 28; + fastChargeTelegraphTime = 100; } - else if (phase2Change && isCharging) + else if (phase2Change) { acceleration = expertMode ? 0.8f : 0.75f; velocity = expertMode ? 13f : 12f; phaseSwitchTimer = expertMode ? 32 : 36; + fastChargeTelegraphTime = 110; } - else if (isCharging && !phase2Change && !phase3Change) - { + else phaseSwitchTimer = 25; - } // Timers and velocity for charging + float reduceSpeedChargeDistance = 540f; int chargeTime = expertMode ? 40 : 45; float chargeSpeed = expertMode ? 28f : 26f; float fastChargeVelocityMultiplier = 1.5f; - int fastChargeTelegraphTimer = 120; + bool playFastChargeRoarSound = npc.localAI[1] == fastChargeTelegraphTime * 0.5f; + bool doFastCharge = npc.localAI[1] > fastChargeTelegraphTime; - if (npc.Calamity().enraged > 0 || (CalamityConfig.Instance.BossRushXerocCurse && BossRushEvent.BossRushActive)) + if (npc.Calamity().enraged > 0 || (CalamityConfig.Instance.BossRushXerocCurse && BossRushEvent.BossRushActive)) { chargeTime = 30; chargeSpeed = 40f; @@ -241,7 +248,7 @@ namespace CalamityMod.NPCs.Yharon chargeTime = 35; chargeSpeed = 30f; } - else if (isCharging && phase2Change) + else if (phase2Change) { chargeTime = expertMode ? 38 : 43; @@ -260,6 +267,7 @@ namespace CalamityMod.NPCs.Yharon chargeSpeed *= velocityMult; } + float reduceSpeedFlareBombDistance = 570f; int flareBombPhaseTimer = death ? 40 : 60; int flareBombSpawnDivisor = flareBombPhaseTimer / 20; float flareBombPhaseAcceleration = death ? 0.92f : 0.8f; @@ -289,8 +297,6 @@ namespace CalamityMod.NPCs.Yharon int spawnPhaseTimer = 75; - Vector2 vectorCenter = npc.Center; - // Target if (npc.target < 0 || npc.target == 255 || Main.player[npc.target].dead || !Main.player[npc.target].active) { @@ -462,8 +468,8 @@ namespace CalamityMod.NPCs.Yharon for (int num1469 = 0; num1469 < num1468; num1469++) { Vector2 vector169 = Vector2.Normalize(npc.velocity) * new Vector2(npc.width / 2f, npc.height) * 0.75f * 0.5f; - vector169 = vector169.RotatedBy((num1469 - (num1468 / 2 - 1)) * MathHelper.TwoPi / num1468) + npc.Center; - Vector2 value16 = vector169 - npc.Center; + vector169 = vector169.RotatedBy((num1469 - (num1468 / 2 - 1)) * MathHelper.TwoPi / num1468) + vectorCenter; + Vector2 value16 = vector169 - vectorCenter; int num1470 = Dust.NewDust(vector169 + value16, 0, 0, 244, value16.X * 2f, value16.Y * 2f, 100, default, 1.4f); Main.dust[num1470].noGravity = true; Main.dust[num1470].noLight = true; @@ -488,11 +494,16 @@ namespace CalamityMod.NPCs.Yharon else if (npc.ai[0] == 0f && !player.dead) { if (npc.ai[1] == 0f) - npc.ai[1] = 500 * Math.Sign((vectorCenter - player.Center).X); + npc.ai[1] = Math.Sign((vectorCenter - player.Center).X); - Vector2 value17 = player.Center + new Vector2(npc.ai[1], -200f) - vectorCenter; - Vector2 vector170 = Vector2.Normalize(value17 - npc.velocity) * velocity; - npc.SimpleFlyMovement(vector170, acceleration); + Vector2 destination = player.Center + new Vector2(npc.ai[1], 0); + Vector2 distanceFromDestination = destination - vectorCenter; + Vector2 desiredVelocity = Vector2.Normalize(distanceFromDestination - npc.velocity) * velocity; + + if (Vector2.Distance(vectorCenter, destination) > reduceSpeedChargeDistance) + npc.SimpleFlyMovement(desiredVelocity, acceleration); + else + npc.velocity *= 0.98f; int num1471 = Math.Sign(player.Center.X - vectorCenter.X); if (num1471 != 0) @@ -574,11 +585,10 @@ namespace CalamityMod.NPCs.Yharon } else if (aiState == 5) { - npc.localAI[1] += 1f; - if (npc.localAI[1] == fastChargeTelegraphTimer - 60) + if (playFastChargeRoarSound) Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Custom, "Sounds/Custom/YharonRoar"), (int)npc.position.X, (int)npc.position.Y); - if (npc.localAI[1] > fastChargeTelegraphTimer) + if (doFastCharge) { npc.ai[0] = 5f; npc.ai[1] = 0f; @@ -598,7 +608,9 @@ namespace CalamityMod.NPCs.Yharon npc.spriteDirection = -npc.direction; } } - } + else + npc.localAI[1] += 1f; + } npc.netUpdate = true; } @@ -625,12 +637,17 @@ namespace CalamityMod.NPCs.Yharon // Fireball breath else if (npc.ai[0] == 2f) { - if (npc.ai[1] == 0f) - npc.ai[1] = 500 * Math.Sign((vectorCenter - player.Center).X); + if (npc.ai[1] == 0f) + npc.ai[1] = Math.Sign((vectorCenter - player.Center).X); - Vector2 value19 = player.Center + new Vector2(npc.ai[1], -400f) - vectorCenter; - Vector2 vector172 = Vector2.Normalize(value19 - npc.velocity) * flareBombPhaseVelocity; - npc.SimpleFlyMovement(vector172, flareBombPhaseAcceleration); + Vector2 destination = player.Center + new Vector2(npc.ai[1], 0); + Vector2 value17 = destination - vectorCenter; + Vector2 vector170 = Vector2.Normalize(value17 - npc.velocity) * flareBombPhaseVelocity; + + if (Vector2.Distance(vectorCenter, destination) > reduceSpeedFlareBombDistance) + npc.SimpleFlyMovement(vector170, flareBombPhaseAcceleration); + else + npc.velocity *= 0.98f; if (npc.ai[2] == 0f) Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Custom, "Sounds/Custom/YharonRoar"), (int)npc.position.X, (int)npc.position.Y); @@ -736,14 +753,19 @@ namespace CalamityMod.NPCs.Yharon // Phase switch else if (npc.ai[0] == 6f && !player.dead) { - if (npc.ai[1] == 0f) - npc.ai[1] = 500 * Math.Sign((vectorCenter - player.Center).X); + if (npc.ai[1] == 0f) + npc.ai[1] = Math.Sign((vectorCenter - player.Center).X); - Vector2 value20 = player.Center + new Vector2(npc.ai[1], -200f) - vectorCenter; - Vector2 vector175 = Vector2.Normalize(value20 - npc.velocity) * velocity; - npc.SimpleFlyMovement(vector175, acceleration); + Vector2 destination = player.Center + new Vector2(npc.ai[1], 0); + Vector2 distanceFromDestination = destination - vectorCenter; + Vector2 desiredVelocity = Vector2.Normalize(distanceFromDestination - npc.velocity) * velocity; - int num1477 = Math.Sign(player.Center.X - vectorCenter.X); + if (Vector2.Distance(vectorCenter, destination) > reduceSpeedChargeDistance) + npc.SimpleFlyMovement(desiredVelocity, acceleration); + else + npc.velocity *= 0.98f; + + int num1477 = Math.Sign(player.Center.X - vectorCenter.X); if (num1477 != 0) { if (npc.ai[2] == 0f && num1477 != npc.direction) @@ -808,7 +830,7 @@ namespace CalamityMod.NPCs.Yharon } else if (aiState == 2) { - Vector2 npcCenter = npc.Center; + Vector2 npcCenter = vectorCenter; if (npc.alpha < 255) { @@ -861,11 +883,10 @@ namespace CalamityMod.NPCs.Yharon } else if (aiState == 5) { - npc.localAI[1] += 1f; - if (npc.localAI[1] == fastChargeTelegraphTimer - 60) + if (playFastChargeRoarSound) Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Custom, "Sounds/Custom/YharonRoar"), (int)npc.position.X, (int)npc.position.Y); - if (npc.localAI[1] > fastChargeTelegraphTimer) + if (doFastCharge) { npc.ai[0] = 11f; npc.ai[1] = 0f; @@ -885,7 +906,9 @@ namespace CalamityMod.NPCs.Yharon npc.spriteDirection = -npc.direction; } } - } + else + npc.localAI[1] += 1f; + } else if (aiState == 6) { npc.velocity = Vector2.Normalize(player.Center - vectorCenter) * spinPhaseVelocity; @@ -957,6 +980,9 @@ namespace CalamityMod.NPCs.Yharon { if (Main.player[p].active && !Main.player[p].dead) targets.Add(p); + + if (targets.Count > 4) + break; } foreach (int t in targets) { @@ -1080,14 +1106,19 @@ namespace CalamityMod.NPCs.Yharon // Phase switch else if (npc.ai[0] == 13f && !player.dead) { - if (npc.ai[1] == 0f) - npc.ai[1] = 500 * Math.Sign((vectorCenter - player.Center).X); + if (npc.ai[1] == 0f) + npc.ai[1] = Math.Sign((vectorCenter - player.Center).X); - Vector2 value20 = player.Center + new Vector2(npc.ai[1], -200f) - vectorCenter; - Vector2 vector175 = Vector2.Normalize(value20 - npc.velocity) * velocity; - npc.SimpleFlyMovement(vector175, acceleration); + Vector2 destination = player.Center + new Vector2(npc.ai[1], 0); + Vector2 distanceFromDestination = destination - vectorCenter; + Vector2 desiredVelocity = Vector2.Normalize(distanceFromDestination - npc.velocity) * velocity; - int num1477 = Math.Sign(player.Center.X - vectorCenter.X); + if (Vector2.Distance(vectorCenter, destination) > reduceSpeedChargeDistance) + npc.SimpleFlyMovement(desiredVelocity, acceleration); + else + npc.velocity *= 0.98f; + + int num1477 = Math.Sign(player.Center.X - vectorCenter.X); if (num1477 != 0) { if (npc.ai[2] == 0f && num1477 != npc.direction) @@ -1155,7 +1186,7 @@ namespace CalamityMod.NPCs.Yharon } else if (aiState == 2) { - Vector2 npcCenter = npc.Center; + Vector2 npcCenter = vectorCenter; if (npc.alpha < 255) { @@ -1208,11 +1239,10 @@ namespace CalamityMod.NPCs.Yharon } else if (aiState == 5) { - npc.localAI[1] += 1f; - if (npc.localAI[1] == fastChargeTelegraphTimer - 60) + if (playFastChargeRoarSound) Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Custom, "Sounds/Custom/YharonRoar"), (int)npc.position.X, (int)npc.position.Y); - if (npc.localAI[1] > fastChargeTelegraphTimer) + if (doFastCharge) { npc.ai[0] = 18f; npc.ai[1] = 0f; @@ -1232,7 +1262,9 @@ namespace CalamityMod.NPCs.Yharon npc.spriteDirection = -npc.direction; } } - } + else + npc.localAI[1] += 1f; + } else if (aiState == 6) { npc.velocity = Vector2.Normalize(player.Center - vectorCenter) * spinPhaseVelocity; @@ -1314,6 +1346,9 @@ namespace CalamityMod.NPCs.Yharon { if (Main.player[p].active && !Main.player[p].dead) targets.Add(p); + + if (targets.Count > 4) + break; } foreach (int t in targets) { @@ -1439,11 +1474,16 @@ namespace CalamityMod.NPCs.Yharon else if (npc.ai[0] == 20f) { if (npc.ai[1] == 0f) - npc.ai[1] = 400 * Math.Sign((vectorCenter - player.Center).X); + npc.ai[1] = Math.Sign((vectorCenter - player.Center).X); - Vector2 value19 = player.Center + new Vector2(npc.ai[1], -400f) - vectorCenter; - Vector2 vector172 = Vector2.Normalize(value19 - npc.velocity) * flareBombPhaseVelocity; - npc.SimpleFlyMovement(vector172, flareBombPhaseAcceleration); + Vector2 destination = player.Center + new Vector2(npc.ai[1], 0); + Vector2 value17 = destination - vectorCenter; + Vector2 vector170 = Vector2.Normalize(value17 - npc.velocity) * flareBombPhaseVelocity; + + if (Vector2.Distance(vectorCenter, destination) > reduceSpeedFlareBombDistance) + npc.SimpleFlyMovement(vector170, flareBombPhaseAcceleration); + else + npc.velocity *= 0.98f; if (npc.ai[2] == 0f) Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Custom, "Sounds/Custom/YharonRoar"), (int)npc.position.X, (int)npc.position.Y); @@ -1483,7 +1523,7 @@ namespace CalamityMod.NPCs.Yharon } #region AI2 - public void Yharon_AI2(bool expertMode, bool revenge, bool death, float pie, float lifeRatio) + public void Yharon_AI2(bool expertMode, bool revenge, bool death, float pie, float lifeRatio, Vector2 vectorCenter) { float phase2GateValue = revenge ? 0.8f : expertMode ? 0.7f : 0.5f; bool phase2 = death || lifeRatio <= phase2GateValue; @@ -1617,13 +1657,17 @@ namespace CalamityMod.NPCs.Yharon if (bulletHell) npc.damage = 0; + float reduceSpeedChargeDistance = 500f; float phaseSwitchTimer = expertMode ? 30f : 32f; float acceleration = expertMode ? 0.92f : 0.9f; float velocity = expertMode ? 14.5f : 14f; float chargeTime = expertMode ? 32f : 35f; float chargeSpeed = expertMode ? 32f : 30f; + float fastChargeVelocityMultiplier = 1.5f; - int fastChargeTelegraphTimer = secondPhasePhase == 4 ? 60 : 120; + fastChargeTelegraphTime = protectionBoost ? 60 : (100 - secondPhasePhase * 10); + bool playFastChargeRoarSound = npc.localAI[1] == fastChargeTelegraphTime * 0.5f; + bool doFastChargeTelegraph = npc.localAI[1] <= fastChargeTelegraphTime; float fireballBreathTimer = 60f; float fireballBreathPhaseTimer = fireballBreathTimer + 120f; @@ -1683,16 +1727,21 @@ namespace CalamityMod.NPCs.Yharon } else if (npc.ai[0] == 1f) { - if (npc.ai[2] == 0f) - npc.ai[2] = (npc.Center.X < targetData.Center.X) ? 1 : -1; + if (npc.ai[2] == 0f) + npc.ai[2] = (vectorCenter.X < targetData.Center.X) ? 1 : -1; - Vector2 destination = targetData.Center + new Vector2(-npc.ai[2] * 450f, -200f); - Vector2 desiredVelocity = npc.DirectionTo(destination) * velocity; + Vector2 destination = targetData.Center + new Vector2(-npc.ai[2], 0f); + Vector2 desiredVelocity = npc.DirectionTo(destination) * velocity; if (!targetDead) - npc.SimpleFlyMovement(desiredVelocity, acceleration); + { + if (Vector2.Distance(vectorCenter, destination) > reduceSpeedChargeDistance) + npc.SimpleFlyMovement(desiredVelocity, acceleration); + else + npc.velocity *= 0.98f; + } - int num27 = (npc.Center.X < targetData.Center.X) ? 1 : -1; + int num27 = (vectorCenter.X < targetData.Center.X) ? 1 : -1; npc.direction = npc.spriteDirection = num27; npc.ai[1] += 1f; @@ -1850,7 +1899,7 @@ namespace CalamityMod.NPCs.Yharon if (amount != 0f) npc.rotation = npc.rotation.AngleTowards(newRotation, amount); - Vector2 npcCenter = npc.Center; + Vector2 npcCenter = vectorCenter; if (npc.alpha < 255) { @@ -1872,7 +1921,7 @@ namespace CalamityMod.NPCs.Yharon return; } - if (num28 == 7 && npc.localAI[1] <= fastChargeTelegraphTimer) + if (num28 == 7 && doFastChargeTelegraph) { float newRotation = npc.DirectionTo(targetData.Center).ToRotation(); float amount = 0.04f; @@ -1883,10 +1932,11 @@ namespace CalamityMod.NPCs.Yharon if (amount != 0f) npc.rotation = npc.rotation.AngleTowards(newRotation, amount); - npc.localAI[1] += 1f; - if (npc.localAI[1] == fastChargeTelegraphTimer - (secondPhasePhase == 4 ? 30 : 60)) + if (playFastChargeRoarSound) Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Custom, "Sounds/Custom/YharonRoar"), (int)npc.position.X, (int)npc.position.Y); + npc.localAI[1] += 1f; + return; } @@ -1960,7 +2010,7 @@ namespace CalamityMod.NPCs.Yharon } case 3: //fireballs { - Vector2 vector2 = new Vector2((targetData.Center.X > npc.Center.X) ? 1 : -1, 0f); + Vector2 vector2 = new Vector2((targetData.Center.X > vectorCenter.X) ? 1 : -1, 0f); npc.spriteDirection = (vector2.X > 0f) ? 1 : -1; npc.velocity = vector2 * -2f; @@ -2018,7 +2068,7 @@ namespace CalamityMod.NPCs.Yharon // Fireball spit else if (npc.ai[0] == 3f) { - int num29 = (npc.Center.X < targetData.Center.X) ? 1 : -1; + int num29 = (vectorCenter.X < targetData.Center.X) ? 1 : -1; npc.ai[2] = num29; npc.ai[1] += 1f; @@ -2038,7 +2088,7 @@ namespace CalamityMod.NPCs.Yharon if (npc.ai[1] == fireballBreathTimer) { - int direction = (targetData.Center.X > npc.Center.X) ? 1 : -1; + int direction = (targetData.Center.X > vectorCenter.X) ? 1 : -1; npc.velocity = new Vector2(direction, 0f) * fireballBreathPhaseVelocity; npc.direction = npc.spriteDirection = direction; } @@ -2048,7 +2098,7 @@ namespace CalamityMod.NPCs.Yharon if (npc.ai[1] % 10 == 0 && Main.netMode != NetmodeID.MultiplayerClient) { float xOffset = 30f; - Vector2 position = npc.Center + new Vector2((110f + xOffset) * npc.direction, -20f).RotatedBy(npc.rotation); + Vector2 position = vectorCenter + new Vector2((110f + xOffset) * npc.direction, -20f).RotatedBy(npc.rotation); Vector2 projectileVelocity = targetData.Center - position; projectileVelocity.Normalize(); projectileVelocity *= 0.1f; @@ -2057,7 +2107,7 @@ namespace CalamityMod.NPCs.Yharon Projectile.NewProjectile(position, projectileVelocity, type, damage, 0f, Main.myPlayer, 1f, 0f); } - if (Math.Abs(targetData.Center.X - npc.Center.X) > 700f && Math.Abs(npc.velocity.X) < chargeSpeed) + if (Math.Abs(targetData.Center.X - vectorCenter.X) > 700f && Math.Abs(npc.velocity.X) < chargeSpeed) npc.velocity.X += Math.Sign(npc.velocity.X) * 0.5f; } @@ -2072,7 +2122,7 @@ namespace CalamityMod.NPCs.Yharon // Splitting fireball breath else if (npc.ai[0] == 4f) { - int num31 = (npc.Center.X < targetData.Center.X) ? 1 : -1; + int num31 = (vectorCenter.X < targetData.Center.X) ? 1 : -1; npc.ai[2] = num31; if (npc.ai[1] < splittingFireballBreathTimer) @@ -2082,10 +2132,10 @@ namespace CalamityMod.NPCs.Yharon npc.velocity = Vector2.Lerp(npc.velocity, value2, 0.0333333351f); - int direction = (npc.Center.X < targetData.Center.X) ? 1 : -1; + int direction = (vectorCenter.X < targetData.Center.X) ? 1 : -1; npc.direction = npc.spriteDirection = direction; - if (Vector2.Distance(vector5, npc.Center) < 32f) + if (Vector2.Distance(vector5, vectorCenter) < 32f) npc.ai[1] = splittingFireballBreathTimer - 1f; } else if (npc.ai[1] == splittingFireballBreathTimer) @@ -2108,7 +2158,7 @@ namespace CalamityMod.NPCs.Yharon npc.position.Y += npc.DirectionTo(targetData.Center + new Vector2(0f, -400f)).Y * 6f; float xOffset = 30f; - Vector2 position = npc.Center + new Vector2((110f + xOffset) * npc.direction, -20f).RotatedBy(npc.rotation); + Vector2 position = vectorCenter + new Vector2((110f + xOffset) * npc.direction, -20f).RotatedBy(npc.rotation); int num34 = (int)(npc.ai[1] - splittingFireballBreathTimer + 1f); int type = ModContent.ProjectileType(); @@ -2165,6 +2215,9 @@ namespace CalamityMod.NPCs.Yharon { if (Main.player[p].active && !Main.player[p].dead) targets.Add(p); + + if (targets.Count > 4) + break; } foreach (int t in targets) { @@ -2192,6 +2245,9 @@ namespace CalamityMod.NPCs.Yharon { if (Main.player[p].active && !Main.player[p].dead) targets.Add(p); + + if (targets.Count > 4) + break; } foreach (int t in targets) { @@ -2206,7 +2262,7 @@ namespace CalamityMod.NPCs.Yharon if (npc.ai[1] == 210f && secondPhasePhase == 4 && useTornado) { useTornado = false; - Projectile.NewProjectile(npc.Center.X, npc.Center.Y, 0f, 0f, ModContent.ProjectileType(), 0, 0f, Main.myPlayer, 1f, npc.target + 1); + Projectile.NewProjectile(vectorCenter, Vector2.Zero, ModContent.ProjectileType(), 0, 0f, Main.myPlayer, 1f, npc.target + 1); } } @@ -2229,7 +2285,7 @@ namespace CalamityMod.NPCs.Yharon Vector2 desiredVelocity2 = npc.DirectionTo(destination2) * velocity * 1.5f; npc.SimpleFlyMovement(desiredVelocity2, acceleration * 1.5f); - int num35 = (npc.Center.X < targetData.Center.X) ? 1 : -1; + int num35 = (vectorCenter.X < targetData.Center.X) ? 1 : -1; npc.direction = npc.spriteDirection = num35; npc.ai[2] += 1f; @@ -2263,7 +2319,7 @@ namespace CalamityMod.NPCs.Yharon if (expertMode) DoFireRing(300, npc.GetProjectileDamage(ModContent.ProjectileType()), npc.target, 1f); - Vector2 vector7 = npc.Center + (MathHelper.TwoPi * Main.rand.NextFloat()).ToRotationVector2() * new Vector2(2f, 1f) * 100f * (0.6f + Main.rand.NextFloat() * 0.4f); + Vector2 vector7 = vectorCenter + (MathHelper.TwoPi * Main.rand.NextFloat()).ToRotationVector2() * new Vector2(2f, 1f) * 100f * (0.6f + Main.rand.NextFloat() * 0.4f); if (Vector2.Distance(vector7, targetData.Center) > 150f) SpawnDetonatingFlares(vector7, targetData, 6, new int[] { ModContent.NPCType(), ModContent.NPCType() }); @@ -2278,7 +2334,7 @@ namespace CalamityMod.NPCs.Yharon Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Custom, "Sounds/Custom/YharonRoarShort"), (int)npc.position.X, (int)npc.position.Y); if (Main.netMode != NetmodeID.MultiplayerClient) - Projectile.NewProjectile(npc.Center.X, npc.Center.Y, 0f, 0f, ModContent.ProjectileType(), 0, 0f, Main.myPlayer, 1f, npc.target + 1); + Projectile.NewProjectile(vectorCenter, Vector2.Zero, ModContent.ProjectileType(), 0, 0f, Main.myPlayer, 1f, npc.target + 1); npc.ai[0] = 1f; npc.ai[1] = 0f; @@ -2308,7 +2364,7 @@ namespace CalamityMod.NPCs.Yharon // Teleport else if (npc.ai[0] == 8f) { - Vector2 npcCenter = npc.Center; + Vector2 npcCenter = vectorCenter; if (npc.alpha < 255) { @@ -2339,7 +2395,7 @@ namespace CalamityMod.NPCs.Yharon npc.ai[0] = 1f; npc.ai[1] = 0f; npc.ai[2] = 0f; - npc.localAI[1] = fastChargeTelegraphTimer + 1f; + npc.localAI[1] = fastChargeTelegraphTime + 1f; npc.netUpdate = true; } } @@ -2360,7 +2416,7 @@ namespace CalamityMod.NPCs.Yharon { if (secondPhasePhase == 4) { - for (int x = 0; x < 1000; x++) + for (int x = 0; x < Main.maxProjectiles; x++) { Projectile projectile = Main.projectile[x]; if (projectile.active) @@ -2684,20 +2740,20 @@ namespace CalamityMod.NPCs.Yharon Vector2 vector43 = npc.Center - Main.screenPosition; vector43 -= new Vector2(texture.Width, texture.Height / Main.npcFrameCount[npc.type]) * npc.scale / 2f; vector43 += vector11 * npc.scale + new Vector2(0f, 4f + npc.gfxOffY); - spriteBatch.Draw(texture, vector43, npc.frame, (invincible ? invincibleColor : npc.GetAlpha(lightColor)), npc.rotation, vector11, npc.scale, spriteEffects, 0f); + spriteBatch.Draw(texture, vector43, npc.frame, invincible ? invincibleColor : npc.GetAlpha(lightColor), npc.rotation, vector11, npc.scale, spriteEffects, 0f); if (flag8 || npc.ai[0] == 4f || startSecondAI) { texture = ModContent.GetTexture("CalamityMod/NPCs/Yharon/YharonGlowOrange"); - Color color40 = Color.Lerp(Color.White, (invincible ? invincibleColor : Color.Orange), 0.5f); + Color color40 = Color.Lerp(Color.White, invincible ? invincibleColor : Color.Orange, 0.5f); color36 = invincible ? invincibleColor : Color.Orange; Texture2D texture2 = ModContent.GetTexture("CalamityMod/NPCs/Yharon/YharonGlowGreen"); - Color color43 = Color.Lerp(Color.White, (invincible ? invincibleColor : Color.Chartreuse), 0.5f); + Color color43 = Color.Lerp(Color.White, invincible ? invincibleColor : Color.Chartreuse, 0.5f); Color color44 = invincible ? invincibleColor : Color.Chartreuse; Texture2D texture3 = ModContent.GetTexture("CalamityMod/NPCs/Yharon/YharonGlowPurple"); - Color color45 = Color.Lerp(Color.White, (invincible ? invincibleColor : Color.BlueViolet), 0.5f); + Color color45 = Color.Lerp(Color.White, invincible ? invincibleColor : Color.BlueViolet, 0.5f); Color color46 = invincible ? invincibleColor : Color.BlueViolet; amount9 = 1f; @@ -2947,10 +3003,10 @@ namespace CalamityMod.NPCs.Yharon if (chargeTelegraph) { - bool phase4 = startSecondAI && npc.life <= npc.lifeMax * 0.15 && (CalamityWorld.revenge || BossRushEvent.BossRushActive); - - int num86 = phase4 ? 60 : 120; - if (npc.localAI[1] < num86 - (phase4 ? 30 : 60) || npc.localAI[1] > num86 - (phase4 ? 10 : 20)) + bool doTelegraphFlightAnimation = npc.localAI[1] < fastChargeTelegraphTime * 0.5f || npc.localAI[1] > fastChargeTelegraphTime - (fastChargeTelegraphTime / 6f); + bool doTelegraphRoarAnimation = npc.localAI[1] > fastChargeTelegraphTime - fastChargeTelegraphTime * 0.4f && npc.localAI[1] < fastChargeTelegraphTime - fastChargeTelegraphTime * 0.2f; + bool phase4 = startSecondAI && npc.life <= npc.lifeMax * ((CalamityWorld.death || BossRushEvent.BossRushActive) ? 0.3f : 0.2f) && (CalamityWorld.revenge || BossRushEvent.BossRushActive); + if (doTelegraphFlightAnimation) { npc.frameCounter += phase4 ? 2D : 1D; if (npc.frameCounter > 5D) @@ -2959,17 +3015,13 @@ namespace CalamityMod.NPCs.Yharon npc.frame.Y += frameHeight; } if (npc.frame.Y >= frameHeight * 5) - { npc.frame.Y = 0; - } } else { npc.frame.Y = frameHeight * 5; - if (npc.localAI[1] > num86 - (phase4 ? 25 : 50) && npc.localAI[1] < num86 - (phase4 ? 12 : 25)) - { + if (doTelegraphRoarAnimation) npc.frame.Y = frameHeight * 6; - } } return; } diff --git a/Projectiles/Boss/SandPoisonCloud.cs b/Projectiles/Boss/SandPoisonCloud.cs index 589bfffd5a..69bca44b2f 100644 --- a/Projectiles/Boss/SandPoisonCloud.cs +++ b/Projectiles/Boss/SandPoisonCloud.cs @@ -35,9 +35,7 @@ namespace CalamityMod.Projectiles.Boss projectile.frameCounter = 0; } if (projectile.frame > 3) - { projectile.frame = 0; - } projectile.velocity *= 0.995f; @@ -58,20 +56,11 @@ namespace CalamityMod.Projectiles.Boss { projectile.alpha -= 30; if (projectile.alpha < 30) - { projectile.alpha = 30; - } } } - public override bool CanHitPlayer(Player target) - { - if (projectile.timeLeft < 180) - { - return false; - } - return true; - } + public override bool CanHitPlayer(Player target) => projectile.timeLeft >= 180; public override void OnHitPlayer(Player target, int damage, bool crit) { diff --git a/Projectiles/Boss/SandPoisonCloudOldDuke.cs b/Projectiles/Boss/SandPoisonCloudOldDuke.cs new file mode 100644 index 0000000000..758604392b --- /dev/null +++ b/Projectiles/Boss/SandPoisonCloudOldDuke.cs @@ -0,0 +1,73 @@ +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Projectiles.Boss +{ + public class SandPoisonCloudOldDuke : ModProjectile + { + public override string Texture => "CalamityMod/Projectiles/Boss/SandPoisonCloud"; + + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Toxic Cloud"); + Main.projFrames[projectile.type] = 4; + } + + public override void SetDefaults() + { + projectile.width = 32; + projectile.height = 32; + projectile.hostile = true; + projectile.alpha = 255; + projectile.penetrate = -1; + projectile.tileCollide = false; + projectile.ignoreWater = true; + projectile.timeLeft = 1800; + cooldownSlot = 1; + } + + public override void AI() + { + Lighting.AddLight(projectile.Center, 0.5f, 0.3f, 0f); + + projectile.frameCounter++; + if (projectile.frameCounter > 9) + { + projectile.frame++; + projectile.frameCounter = 0; + } + if (projectile.frame > 3) + projectile.frame = 0; + + projectile.velocity *= 0.995f; + + if (projectile.timeLeft < 180) + { + projectile.damage = 0; + if (projectile.alpha < 255) + { + projectile.alpha += 5; + if (projectile.alpha > 255) + { + projectile.alpha = 255; + projectile.Kill(); + } + } + } + else if (projectile.alpha > 30) + { + projectile.alpha -= 30; + if (projectile.alpha < 30) + projectile.alpha = 30; + } + } + + public override bool CanHitPlayer(Player target) => projectile.timeLeft >= 180; + + public override void OnHitPlayer(Player target, int damage, bool crit) + { + target.AddBuff(BuffID.Venom, 300); + } + } +} diff --git a/Projectiles/Boss/SandTooth.cs b/Projectiles/Boss/SandTooth.cs index 4accbc05e5..17cb505008 100644 --- a/Projectiles/Boss/SandTooth.cs +++ b/Projectiles/Boss/SandTooth.cs @@ -24,7 +24,7 @@ namespace CalamityMod.Projectiles.Boss public override void AI() { - int num103 = (int)Player.FindClosest(projectile.Center, 1, 1); + int num103 = Player.FindClosest(projectile.Center, 1, 1); projectile.ai[1] += 1f; if (projectile.ai[1] < 250f && projectile.ai[1] > 60f) { @@ -36,14 +36,7 @@ namespace CalamityMod.Projectiles.Boss projectile.velocity.Normalize(); projectile.velocity *= scaleFactor2; } - if (projectile.ai[0] < 0f) - { - if (projectile.velocity.Length() < 18f) //18 - { - projectile.velocity *= 1.01f; - } - } - projectile.rotation = (float)Math.Atan2((double)projectile.velocity.Y, (double)projectile.velocity.X) + 0.785f; + projectile.rotation = (float)Math.Atan2(projectile.velocity.Y, projectile.velocity.X) + MathHelper.PiOver4; } public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) diff --git a/Projectiles/Boss/SandToothOldDuke.cs b/Projectiles/Boss/SandToothOldDuke.cs new file mode 100644 index 0000000000..1f844cebb4 --- /dev/null +++ b/Projectiles/Boss/SandToothOldDuke.cs @@ -0,0 +1,52 @@ +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using System; +using Terraria; +using Terraria.ModLoader; +namespace CalamityMod.Projectiles.Boss +{ + public class SandToothOldDuke : ModProjectile + { + public override string Texture => "CalamityMod/Projectiles/Boss/SandTooth"; + + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Sand Tooth"); + } + + public override void SetDefaults() + { + projectile.width = 20; + projectile.height = 20; + projectile.hostile = true; + projectile.ignoreWater = true; + projectile.penetrate = 1; + projectile.timeLeft = 450; + cooldownSlot = 1; + } + + public override void AI() + { + int num103 = Player.FindClosest(projectile.Center, 1, 1); + projectile.ai[1] += 1f; + if (projectile.ai[1] < 250f && projectile.ai[1] > 60f) + { + float scaleFactor2 = projectile.velocity.Length(); + Vector2 vector11 = Main.player[num103].Center - projectile.Center; + vector11.Normalize(); + vector11 *= scaleFactor2; + projectile.velocity = (projectile.velocity * 24f + vector11) / 25f; + projectile.velocity.Normalize(); + projectile.velocity *= scaleFactor2; + } + projectile.rotation = (float)Math.Atan2(projectile.velocity.Y, projectile.velocity.X) + MathHelper.PiOver4; + } + + public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) + { + Texture2D tex = Main.projectileTexture[projectile.type]; + spriteBatch.Draw(tex, projectile.Center - Main.screenPosition, null, projectile.GetAlpha(lightColor), projectile.rotation, tex.Size() / 2f, projectile.scale, SpriteEffects.None, 0f); + return false; + } + } +} diff --git a/Projectiles/Ranged/HolyFireBulletProj.cs b/Projectiles/Ranged/HolyFireBulletProj.cs index d5d9374195..b816b2c64d 100644 --- a/Projectiles/Ranged/HolyFireBulletProj.cs +++ b/Projectiles/Ranged/HolyFireBulletProj.cs @@ -64,7 +64,7 @@ namespace CalamityMod.Projectiles.Ranged { if (projectile.owner == Main.myPlayer) { - int blastDamage = (int)(projectile.damage * 0.85f); + int blastDamage = (int)(projectile.damage * 0.75); float scale = 0.85f + Main.rand.NextFloat() * 1.15f; int boom = Projectile.NewProjectile(projectile.Center, Vector2.Zero, ModContent.ProjectileType(), blastDamage, projectile.knockBack, projectile.owner, 0f, scale); if (boom.WithinBounds(Main.maxProjectiles)) diff --git a/Projectiles/Summon/ElementalAxeMinion.cs b/Projectiles/Summon/ElementalAxeMinion.cs index 9915329df5..897f4b1ac6 100644 --- a/Projectiles/Summon/ElementalAxeMinion.cs +++ b/Projectiles/Summon/ElementalAxeMinion.cs @@ -35,7 +35,7 @@ namespace CalamityMod.Projectiles.Summon projectile.tileCollide = false; projectile.extraUpdates = 1; projectile.usesLocalNPCImmunity = true; - projectile.localNPCHitCooldown = 6; + projectile.localNPCHitCooldown = 15; } public override void AI() diff --git a/Projectiles/Summon/TacticalPlagueEngineSummon.cs b/Projectiles/Summon/TacticalPlagueEngineSummon.cs index 429b4420e0..68a5b20f98 100644 --- a/Projectiles/Summon/TacticalPlagueEngineSummon.cs +++ b/Projectiles/Summon/TacticalPlagueEngineSummon.cs @@ -146,7 +146,7 @@ namespace CalamityMod.Projectiles.Summon if (projectile.ai[0]++ % 75f == 24f) { int damage = projectile.damage; - if (Main.rand.NextBool(20)) + if (projectile.ai[1]++ % 20f == 0f) { int idx = Projectile.NewProjectile(projectile.Center, projectile.DirectionTo(potentialTarget.Center) * 18f, ModContent.ProjectileType(), (int)(damage * 1.5), 5f, projectile.owner); diff --git a/Utilities/NPCStats.cs b/Utilities/NPCStats.cs index f34c9710a4..b0a41cce68 100644 --- a/Utilities/NPCStats.cs +++ b/Utilities/NPCStats.cs @@ -734,8 +734,8 @@ namespace CalamityMod { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 140, 220, 244, 256, 366 } }, { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 280, 400, 440, 464, 660 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 140, 220, 264, 292, 396 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 140, 220, 252, 272, 378 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 140, 220, 264, 292, 396 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 140, 220, 252, 272, 378 } }, { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 140, 220, 244, 256, 366 } }, { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 160, 276, 304, 320, 456 } },