BossHPScaling.

This commit is contained in:
Memes authored and Cameron Ewell committed 2024-11-13 16:18:35 -05:00
1 parent 140944081a
commit cb3e5e07e2
4 files changed
+156 -96

No files matched your search

-93
View File
@@ -50,7 +50,6 @@ using CalamityMod.NPCs.Perforator;
using CalamityMod.NPCs.PlaguebringerGoliath;
using CalamityMod.NPCs.PlagueEnemies;
using CalamityMod.NPCs.Polterghast;
using CalamityMod.NPCs.PrimordialWyrm;
using CalamityMod.NPCs.ProfanedGuardians;
using CalamityMod.NPCs.Providence;
using CalamityMod.NPCs.Ravager;
@@ -78,7 +77,6 @@ namespace CalamityMod
{
public sealed class CalamityLists : ModSystem
{
public static List<int> bossHPScaleList;
public static List<int> friendlyBeeList;
public static List<int> debuffList;
public static List<int> fireDebuffList;
@@ -157,93 +155,6 @@ namespace CalamityMod
public override void OnModLoad()
{
bossHPScaleList = new List<int>()
{
NPCID.EaterofWorldsHead,
NPCID.EaterofWorldsBody,
NPCID.EaterofWorldsTail,
NPCID.SkeletronHand,
NPCID.WallofFleshEye,
NPCID.TheDestroyerBody,
NPCID.TheDestroyerTail,
NPCID.PrimeCannon,
NPCID.PrimeLaser,
NPCID.PrimeVice,
NPCID.PrimeSaw,
NPCID.GolemHead,
NPCID.GolemHeadFree,
NPCID.GolemFistRight,
NPCID.GolemFistLeft,
NPCID.Sharkron,
NPCID.Sharkron2,
NPCID.MoonLordHead,
NPCID.MoonLordHand,
NPCType<DarkEnergy>(),
NPCType<BrimstoneHeart>(),
NPCType<SoulSeeker>(),
NPCType<SoulSeekerSupreme>(),
NPCType<Cataclysm>(),
NPCType<SupremeCataclysm>(),
NPCType<Catastrophe>(),
NPCType<SupremeCatastrophe>(),
NPCType<SepulcherHead>(),
NPCType<SepulcherBody>(),
NPCType<SepulcherTail>(),
NPCType<SepulcherArm>(),
NPCType<SepulcherBodyEnergyBall>(),
NPCType<PrimordialWyrmBody>(),
NPCType<PrimordialWyrmBodyAlt>(),
NPCType<PrimordialWyrmHead>(),
NPCType<PrimordialWyrmTail>(),
NPCType<AquaticAberration>(),
NPCType<AnahitasIceShield>(),
NPCType<CryogenShield>(),
NPCType<OldDukeToothBall>(),
NPCType<SulphurousSharkron>(),
NPCType<Bumblefuck2>(),
NPCType<AureusSpawn>(),
NPCType<Brimling>(),
NPCType<CrabShroom>(),
NPCType<CosmicGuardianBody>(),
NPCType<CosmicGuardianTail>(),
NPCType<CosmicGuardianHead>(),
NPCType<DankCreeper>(),
NPCType<HiveBlob>(),
NPCType<HiveBlob2>(),
NPCType<DarkHeart>(),
NPCType<DesertNuisanceBody>(),
NPCType<DesertNuisanceHead>(),
NPCType<DesertNuisanceTail>(),
NPCType<DesertNuisanceBodyYoung>(),
NPCType<DesertNuisanceHeadYoung>(),
NPCType<DesertNuisanceTailYoung>(),
NPCType<PolterPhantom>(),
NPCType<PhantomFuckYou>(),
NPCType<BloodlettingServant>(),
NPCType<KingSlimeJewelEmerald>(),
NPCType<KingSlimeJewelRuby>(),
NPCType<KingSlimeJewelSapphire>(),
NPCType<PlanterasFreeTentacle>(),
NPCType<SkeletronPrime2>(),
NPCType<PlagueHomingMissile>(),
NPCType<PlagueMine>(),
NPCType<ProfanedRocks>(),
NPCType<ProvSpawnDefense>(),
NPCType<ProvSpawnOffense>(),
NPCType<ProvSpawnHealer>(),
NPCType<RockPillar>(),
NPCType<FlamePillar>(),
NPCType<CosmicMine>(),
NPCType<CosmicLantern>(),
NPCType<ProfanedGuardianDefender>(),
NPCType<ProfanedGuardianHealer>(),
NPCType<CorruptSlimeSpawn>(),
NPCType<CorruptSlimeSpawn2>(),
NPCType<CrimsonSlimeSpawn>(),
NPCType<CrimsonSlimeSpawn2>(),
};
//Many more are added later with AddRange
friendlyBeeList = new List<int>()
{
ProjectileID.GiantBee,
@@ -1118,7 +1029,6 @@ namespace CalamityMod
NPCType<PerforatorBodySmall>(),
NPCType<PerforatorTailSmall>()
};
bossHPScaleList.AddRange(PerforatorIDs);
DesertScourgeIDs = new List<int>
{
@@ -1142,7 +1052,6 @@ namespace CalamityMod
NPCType<SplitCrimulanPaladin>(),
NPCType<SlimeGodCore>()
};
bossHPScaleList.AddRange(SlimeGodIDs);
DeathModeSplittingWormIDs = new List<int>
{
@@ -1208,7 +1117,6 @@ namespace CalamityMod
NPCType<RavagerLegRight>(),
NPCType<RavagerHead>()
};
bossHPScaleList.AddRange(RavagerIDs);
GolemIDs = new List<int>
{
@@ -1763,7 +1671,6 @@ namespace CalamityMod
public override void Unload()
{
bossHPScaleList = null;
friendlyBeeList = null;
debuffList = null;
fireDebuffList = null;
+3 -2
View File
@@ -7,6 +7,7 @@ using CalamityMod.Items;
using CalamityMod.NPCs;
using CalamityMod.NPCs.TownNPCs;
using CalamityMod.Systems;
using CalamityMod.Systems.Collections;
using CalamityMod.UI;
using CalamityMod.UI.CalamitasEnchants;
using CalamityMod.UI.DraedonSummoning;
@@ -1076,9 +1077,9 @@ namespace CalamityMod
//This is to add minions to the hp scaling config
public static bool AddToHPScaling(int type)
{
if (!CalamityLists.bossHPScaleList.Contains(type))
if (!BossHPScalingList.List.Contains(type))
{
CalamityLists.bossHPScaleList.Add(type);
BossHPScalingList.List.Add(type);
return true;
}
return false;
+1 -1
View File
@@ -3523,7 +3523,7 @@ namespace CalamityMod.NPCs
return;
bool countsAsBoss = npc.boss || NPCID.Sets.ShouldBeCountedAsBoss[npc.type];
bool scalesLikeBoss = countsAsBoss || CalamityLists.bossHPScaleList.Contains(npc.type);
bool scalesLikeBoss = countsAsBoss || BossHPScalingList.List.Contains(npc.type);
bool isCalamityNPC = npc.ModNPC != null && npc.ModNPC.Mod == CalamityMod.Instance;
// All bosses, NPCs that are supposed to scale like bosses, and Calamity NPCs follow these rules.
+152
View File
@@ -0,0 +1,152 @@
using System.Collections.Generic;
using CalamityMod.NPCs.AstrumAureus;
using CalamityMod.NPCs.BrimstoneElemental;
using CalamityMod.NPCs.Bumblebirb;
using CalamityMod.NPCs.CalClone;
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.Leviathan;
using CalamityMod.NPCs.NormalNPCs;
using CalamityMod.NPCs.OldDuke;
using CalamityMod.NPCs.Perforator;
using CalamityMod.NPCs.PlaguebringerGoliath;
using CalamityMod.NPCs.Polterghast;
using CalamityMod.NPCs.PrimordialWyrm;
using CalamityMod.NPCs.ProfanedGuardians;
using CalamityMod.NPCs.Providence;
using CalamityMod.NPCs.Ravager;
using CalamityMod.NPCs.Signus;
using CalamityMod.NPCs.SlimeGod;
using CalamityMod.NPCs.SupremeCalamitas;
using Terraria.ID;
using Terraria.ModLoader;
using static Terraria.ModLoader.ModContent;
namespace CalamityMod.Systems.Collections
{
/// <summary>
/// A <see cref="ModSystem"/> that contains a <see cref="IList{T}"/> that has all NPC IDs of bosses or boss minions that have HP scaling.
/// </summary>
public sealed class BossHPScalingList : ModSystem
{
public static IList<int> List { get; private set; }
public override void OnModLoad()
{
List =
[
NPCID.EaterofWorldsHead,
NPCID.EaterofWorldsBody,
NPCID.EaterofWorldsTail,
NPCID.SkeletronHand,
NPCID.WallofFleshEye,
NPCID.TheDestroyerBody,
NPCID.TheDestroyerTail,
NPCID.PrimeCannon,
NPCID.PrimeLaser,
NPCID.PrimeVice,
NPCID.PrimeSaw,
NPCID.GolemHead,
NPCID.GolemHeadFree,
NPCID.GolemFistRight,
NPCID.GolemFistLeft,
NPCID.Sharkron,
NPCID.Sharkron2,
NPCID.MoonLordHead,
NPCID.MoonLordHand,
NPCType<DarkEnergy>(),
NPCType<BrimstoneHeart>(),
NPCType<SoulSeeker>(),
NPCType<SoulSeekerSupreme>(),
NPCType<Cataclysm>(),
NPCType<SupremeCataclysm>(),
NPCType<Catastrophe>(),
NPCType<SupremeCatastrophe>(),
NPCType<SepulcherHead>(),
NPCType<SepulcherBody>(),
NPCType<SepulcherTail>(),
NPCType<SepulcherArm>(),
NPCType<SepulcherBodyEnergyBall>(),
NPCType<PrimordialWyrmBody>(),
NPCType<PrimordialWyrmBodyAlt>(),
NPCType<PrimordialWyrmHead>(),
NPCType<PrimordialWyrmTail>(),
NPCType<AquaticAberration>(),
NPCType<AnahitasIceShield>(),
NPCType<CryogenShield>(),
NPCType<OldDukeToothBall>(),
NPCType<SulphurousSharkron>(),
NPCType<Bumblefuck2>(),
NPCType<AureusSpawn>(),
NPCType<Brimling>(),
NPCType<CrabShroom>(),
NPCType<CosmicGuardianBody>(),
NPCType<CosmicGuardianTail>(),
NPCType<CosmicGuardianHead>(),
NPCType<DankCreeper>(),
NPCType<HiveBlob>(),
NPCType<HiveBlob2>(),
NPCType<DarkHeart>(),
NPCType<DesertNuisanceBody>(),
NPCType<DesertNuisanceHead>(),
NPCType<DesertNuisanceTail>(),
NPCType<DesertNuisanceBodyYoung>(),
NPCType<DesertNuisanceHeadYoung>(),
NPCType<DesertNuisanceTailYoung>(),
NPCType<PolterPhantom>(),
NPCType<PhantomFuckYou>(),
NPCType<BloodlettingServant>(),
NPCType<KingSlimeJewelEmerald>(),
NPCType<KingSlimeJewelRuby>(),
NPCType<KingSlimeJewelSapphire>(),
NPCType<PlanterasFreeTentacle>(),
NPCType<SkeletronPrime2>(),
NPCType<PlagueHomingMissile>(),
NPCType<PlagueMine>(),
NPCType<ProfanedRocks>(),
NPCType<ProvSpawnDefense>(),
NPCType<ProvSpawnOffense>(),
NPCType<ProvSpawnHealer>(),
NPCType<RockPillar>(),
NPCType<FlamePillar>(),
NPCType<CosmicMine>(),
NPCType<CosmicLantern>(),
NPCType<ProfanedGuardianDefender>(),
NPCType<ProfanedGuardianHealer>(),
NPCType<CorruptSlimeSpawn>(),
NPCType<CorruptSlimeSpawn2>(),
NPCType<CrimsonSlimeSpawn>(),
NPCType<CrimsonSlimeSpawn2>(),
NPCType<PerforatorHeadLarge>(),
NPCType<PerforatorBodyLarge>(),
NPCType<PerforatorTailLarge>(),
NPCType<PerforatorHeadMedium>(),
NPCType<PerforatorBodyMedium>(),
NPCType<PerforatorTailMedium>(),
NPCType<PerforatorHeadSmall>(),
NPCType<PerforatorBodySmall>(),
NPCType<PerforatorTailSmall>(),
NPCType<EbonianPaladin>(),
NPCType<CrimulanPaladin>(),
NPCType<SplitEbonianPaladin>(),
NPCType<SplitCrimulanPaladin>(),
NPCType<SlimeGodCore>(),
NPCType<RavagerBody>(),
NPCType<RavagerClawLeft>(),
NPCType<RavagerClawRight>(),
NPCType<RavagerLegLeft>(),
NPCType<RavagerLegRight>(),
NPCType<RavagerHead>()
];
}
public override void Unload() => List = null;
}
}