From c88b849c0c42bda955e3adbd74ac9ed3a9ac6594 Mon Sep 17 00:00:00 2001
From: Altixal <73398287+Altixal@users.noreply.github.com>
Date: Sun, 16 Jul 2023 03:35:13 +0700
Subject: [PATCH 1/7] updating boss checklist support added relics to
collections
---
.../en-US/Mods.CalamityMod.NPCs.hjson | 364 +++++++-
ModSupport/WeakReferenceSupport.cs | 818 ++++++++----------
en-US.hjson | 25 +
3 files changed, 718 insertions(+), 489 deletions(-)
create mode 100644 en-US.hjson
diff --git a/Localization/en-US/Mods.CalamityMod.NPCs.hjson b/Localization/en-US/Mods.CalamityMod.NPCs.hjson
index b67e6bdbf6..c85a80f3c5 100644
--- a/Localization/en-US/Mods.CalamityMod.NPCs.hjson
+++ b/Localization/en-US/Mods.CalamityMod.NPCs.hjson
@@ -21,12 +21,50 @@ Viperfish.DisplayName: Viperfish
AcidEel.DisplayName: Acid Eel
BabyFlakCrab.DisplayName: Baby Flak Crab
BloodwormNormal.DisplayName: Bloodworm
-CragmawMire.DisplayName: Cragmaw Mire
+
+CragmawMire: {
+ DisplayName: Cragmaw Mire
+
+ BossChecklistIntegration: {
+ SpawnInfo:
+ '''
+ Spawns during Acid Rain after the Aquatic Scourge has been defeated.
+ Start Acid Rain with a [i:CalamityMod/CausticTear]
+ '''
+ DespawnMessage: "[c/f0e68c:The Cragmaw Mire buries itself within the sand.]"
+ }
+}
+
FlakCrab.DisplayName: Flak Crab
GammaSlime.DisplayName: Gamma Slime
IrradiatedSlime.DisplayName: Irradiated Slime
-Mauler.DisplayName: Mauler
-NuclearTerror.DisplayName: Nuclear Terror
+
+Mauler: {
+ DisplayName: Mauler
+
+ BossChecklistIntegration: {
+ SpawnInfo:
+ '''
+ Spawns during Acid Rain after Polterghast has been defeated.
+ Start Acid Rain with a [i:CalamityMod/CausticTear]
+ '''
+ DespawnMessage: "[c/f0e68c:The brutish shark looks elsewhere to turn its aggression.]"
+ }
+}
+
+NuclearTerror: {
+ DisplayName: Nuclear Terror
+
+ BossChecklistIntegration: {
+ SpawnInfo:
+ '''
+ Spawns during Acid Rain after Polterghast has been defeated.
+ Start Acid Rain with a [i:CalamityMod/CausticTear]
+ '''
+ DespawnMessage: "[c/f0e68c:The radioactive aberration fades away in a sickly light.]"
+ }
+}
+
NuclearToad.DisplayName: Nuclear Toad
Orthocera.DisplayName: Orthocera
Radiator.DisplayName: Radiator
@@ -35,7 +73,17 @@ SulphurousSkater.DisplayName: Sulphurous Skater
Trilobite.DisplayName: Trilobite
AdultEidolonWyrmHead.DisplayName: Adult Eidolon Wyrm
Jared: Jared
-AquaticScourgeHead.DisplayName: Aquatic Scourge
+
+AquaticScourgeHead: {
+ DisplayName: Aquatic Scourge
+
+ BossChecklistIntegration: {
+ SpawnInfo: Use a [i:CalamityMod/Seafood] in the Sulphuric Sea or wait for it to spawn in the Sulphuric Sea
+ DespawnMessage: "[c/f0e68c:The poisoned scourge swims back to the tranquil, open ocean.]"
+ EntryName: Aquatic Scourge
+ }
+}
+
Aries.DisplayName: Aries
AstralachneaGround.DisplayName: Astralachnea
AstralProbe.DisplayName: Astral Probe
@@ -52,22 +100,89 @@ SightseerCollider.DisplayName: Sightseer Collider
SightseerSpitter.DisplayName: Sightseer Spitter
StellarCulex.DisplayName: Stellar Culex
Twinkler.DisplayName: Twinkler
-AstrumAureus.DisplayName: Astrum Aureus
+
+AstrumAureus: {
+ DisplayName: Astrum Aureus
+
+ BossChecklistIntegration: {
+ SpawnInfo: Use an [i:CalamityMod/AstralChunk] at Night in the Astral Biome
+ DespawnMessage: "[c/ffd700:Aureus has neutralized all threats. Resume prior reconnaissance.]"
+ }
+}
+
AureusSpawn.DisplayName: Aureus Spawn
-AstrumDeusHead.DisplayName: Astrum Deus
+
+AstrumDeusHead: {
+ DisplayName: Astrum Deus
+
+ BossChecklistIntegration: {
+ SpawnInfo: Use a [i:CalamityMod/TitanHeart] or [i:CalamityMod/Starcore] as offering at an [i:CalamityMod/AstralBeaconItem]
+ DespawnMessage: "[c/ffd700:The infected deity retreats to the heavens.]"
+ EntryName: Astrum Deus
+ }
+}
+
Brimling.DisplayName: Brimling
-BrimstoneElemental.DisplayName: Brimstone Elemental
+
+BrimstoneElemental: {
+ DisplayName: Brimstone Elemental
+
+ BossChecklistIntegration: {
+ SpawnInfo: Use a [i:CalamityMod/CharredIdol] in the Brimstone Crag
+ DespawnMessage: "[c/dc143c:The elemental ever maintains her somber vigil over Azafure…]"
+ }
+}
+
Bumblebirb: Bumblebirb
-Bumblefuck.DisplayName: The Dragonfolly
+
+Bumblefuck: {
+ DisplayName: The Dragonfolly
+
+ BossChecklistIntegration: {
+ EntryName: Dragonfolly
+ SpawnInfo: Use [i:CalamityMod/ExoticPheromones] in the Jungle Biome
+ DespawnMessage: "[c/ffd700:The folly returns to its secluded roost.]"
+ }
+}
+
Bumblefuck2.DisplayName: Draconic Swarmer
-CalamitasClone.DisplayName: Calamitas Clone
+
+CalamitasClone: {
+ DisplayName: Calamitas Clone
+
+ BossChecklistIntegration: {
+ EntryName: The Calamitas Clone
+ SpawnInfo: Use an [i:CalamityMod/EyeofDesolation] at Night
+ DespawnMessage: "[c/ffa500:The clone spits a bit of blood in disappointment and vanishes.]"
+ }
+}
+
Cataclysm.DisplayName: Cataclysm
Catastrophe.DisplayName: Catastrophe
SoulSeeker.DisplayName: Soul Seeker
-CeaselessVoid.DisplayName: Ceaseless Void
+
+CeaselessVoid: {
+ DisplayName: Ceaseless Void
+
+ BossChecklistIntegration: {
+ SpawnInfo: Use a [i:CalamityMod/RuneofKos] in the Dungeon
+ DespawnMessage: "[c/4b0082:The ancient spatial rift slips away to places unknown.]"
+ EntryName: Ceaseless Void
+ }
+}
+
DarkEnergy.DisplayName: Dark Energy
CrabShroom.DisplayName: Crab Shroom
-Crabulon.DisplayName: Crabulon
+
+Crabulon: {
+ DisplayName: Crabulon
+
+ BossChecklistIntegration: {
+ SpawnInfo: Use a [i:CalamityMod/DecapoditaSprout] in the Mushroom Biome
+ DespawnMessage: "[c/6495ed:The monstrous mycelial crab shuffles away…]"
+ }
+}
+
CalamityEye.DisplayName: Calamity Eye
CharredSlime.DisplayName: Charred Slime
RenegadeWarlock.DisplayName: Renegade Warlock
@@ -76,14 +191,43 @@ HeatSpirit.DisplayName: Heat Spirit
Scryllar.DisplayName: Scryllar
ScryllarRage.DisplayName: Scryllar
SoulSlurper.DisplayName: Soul Slurper
-Cryogen.DisplayName: Cryogen
+
+Cryogen: {
+ DisplayName: Cryogen
+
+ BossChecklistIntegration: {
+ SpawnInfo: Use a [i:CalamityMod/CryoKey] in the Snow Biome
+ DespawnMessage: "[c/00ffff:Cryogen disappears amidst the biting winds of the blizzard.]"
+ }
+}
+
Pyrogen: Pyrogen
CryogenShield.DisplayName: Cryogen's Shield
PyrogenShield: Pyrogen's Shield
DesertNuisanceHead.DisplayName: A Desert Nuisance
-DesertScourgeHead.DisplayName: Desert Scourge
+
+DesertScourgeHead: {
+ DisplayName: Desert Scourge
+
+ BossChecklistIntegration: {
+ SpawnInfo: Use a [i:CalamityMod/DesertMedallion] in the Desert Biome
+ DespawnMessage: "[c/eee8aa:The scourge of the desert delves back into the sand.]"
+ EntryName: Desert Scourge
+ }
+}
+
CosmicGuardianHead.DisplayName: Cosmic Guardian
-DevourerofGodsHead.DisplayName: The Devourer of Gods
+
+DevourerofGodsHead: {
+ DisplayName: The Devourer of Gods
+
+ BossChecklistIntegration: {
+ EntryName: Devourer of Gods
+ SpawnInfo: Use a [i:CalamityMod/CosmicWorm]
+ DespawnMessage: "[c/00ffff:The Devourer of Gods haughtily returns to the depths of the Distortion.]"
+ }
+}
+
Androomba.DisplayName: Androomba
Nanodroid.DisplayName: Nanodroid
RepairUnitCritter.DisplayName: Repair Unit
@@ -91,6 +235,12 @@ RepairUnitCritter.DisplayName: Repair Unit
Apollo: {
DisplayName: XS-03 Apollo
HekateName: Corrosive Eye of XB-∞ Hekate
+
+ BossChecklistIntegration: {
+ EntryName: Exo Mechs
+ SpawnInfo: By using a high-tech computer
+ DespawnMessage: "[c/7fffd4:An imperfection after all… what a shame.]"
+ }
}
AresBody: {
@@ -130,16 +280,43 @@ ThanatosHead: {
HekateName: Spine of XB-∞ Hekate
}
-GreatSandShark.DisplayName: Great Sand Shark
+GreatSandShark: {
+ DisplayName: Great Sand Shark
+
+ BossChecklistIntegration: {
+ SpawnInfo: Kill 10 sand sharks after defeating Plantera or use a [i:CalamityMod/SandstormsCore] in the Desert Biome
+ DespawnMessage: "[c/daa520:The apex predator of the sands disappears between the dunes.]"
+ }
+}
+
DankCreeper.DisplayName: Dank Creeper
DarkHeart.DisplayName: Dark Heart
HiveBlob.DisplayName: Hive Blob
-HiveMind.DisplayName: The Hive Mind
+
+HiveMind: {
+ DisplayName: The Hive Mind
+
+ BossChecklistIntegration: {
+ SpawnInfo: Kill a Tumor in the Corruption or use a [i:CalamityMod/Teratoma] in the Corruption
+ DespawnMessage: "[c/9400d3:The Hive Mind flits away to brood elsewhere.]"
+ }
+}
+
HiveTumor.DisplayName: Hive Tumor
Anahita.DisplayName: Anahita
AnahitasIceShield.DisplayName: Ice Shield
AquaticAberration.DisplayName: Aquatic Aberration
-Leviathan.DisplayName: The Leviathan
+
+Leviathan: {
+ DisplayName: The Leviathan
+
+ BossChecklistIntegration: {
+ EntryName: Leviathan
+ SpawnInfo: By killing an unknown entity in the Ocean Biome
+ DespawnMessage: "[c/7fffd4:The aquatic outcasts return to their lonesome company.]"
+ }
+}
+
LeviathanStart.DisplayName: ???
AeroSlime.DisplayName: Aero Slime
ArmoredDiggerHead.DisplayName: Armored Digger
@@ -188,7 +365,17 @@ WulfrumDrone.DisplayName: Wulfrum Drone
WulfrumGyrator.DisplayName: Wulfrum Gyrator
WulfrumHovercraft.DisplayName: Wulfrum Hovercraft
WulfrumRover.DisplayName: Wulfrum Rover
-OldDuke.DisplayName: The Old Duke
+
+OldDuke: {
+ DisplayName: The Old Duke
+
+ BossChecklistIntegration: {
+ EntryName: Old Duke
+ SpawnInfo: Defeat the Acid Rain event post-Polterghast or fish using a [i:CalamityMod/BloodwormItem] in the Sulphurous Sea
+ DespawnMessage: "[c/f0e68c:The old duke retreats further into the acidic downpour.]"
+ }
+}
+
BoomerDuke: The Boomer Duke
OldDukeToothBall.DisplayName: Tooth Ball
SulphurousSharkron.DisplayName: Sulphurous Sharkron
@@ -200,8 +387,27 @@ PerforatorCyst.DisplayName: Perforator Cyst
PerforatorHeadLarge.DisplayName: The Perforator
PerforatorHeadMedium.DisplayName: The Perforator
PerforatorHeadSmall.DisplayName: The Perforator
-PerforatorHive.DisplayName: The Perforator Hive
-PlaguebringerGoliath.DisplayName: The Plaguebringer Goliath
+
+PerforatorHive: {
+ DisplayName: The Perforator Hive
+
+ BossChecklistIntegration: {
+ EntryName: The Perforators
+ SpawnInfo: Kill a Cyst in the Crimson or use a [i:CalamityMod/BloodyWormFood] in the Crimson
+ DespawnMessage: "[c/dc143c:The Perforators search for more hosts to gorge themselves on.]"
+ }
+}
+
+PlaguebringerGoliath: {
+ DisplayName: The Plaguebringer Goliath
+
+ BossChecklistIntegration: {
+ EntryName: Plaguebringer Goliath
+ SpawnInfo: Use an [i:CalamityMod/Abombination] in the Jungle Biome
+ DespawnMessage: "[c/00ff00:SPECIMENS EUTHANIZED. EXITING COMBAT PROTOCOL.]"
+ }
+}
+
PlagueHomingMissile.DisplayName: Plague Homing Missile
PlagueMine.DisplayName: Plague Mine
Melter.DisplayName: Melter
@@ -211,34 +417,104 @@ PlagueCharger.DisplayName: Plague Charger
Plagueshell.DisplayName: Plagueshell
Viruling.DisplayName: Viruling
PhantomFuckYou.DisplayName: Phantom
-Polterghast.DisplayName: Polterghast
+
+Polterghast: {
+ DisplayName: Polterghast
+
+ BossChecklistIntegration: {
+ SpawnInfo: Kill 30 phantom spirits or use a [i:CalamityMod/NecroplasmicBeacon] in the Dungeon
+ DespawnMessage: "[c/b0e0e6:The volatile phantasm disperses in an echoing wail.]"
+ EntryName: Polterghast
+ }
+}
+
Necroghast: Necroghast
Necroplasm: Necroplasm
Polterplasm: Polterplasm
PolterghastHook.DisplayName: Polterghast Hook
PolterPhantom.DisplayName: Polterghast
-ProfanedGuardianCommander.DisplayName: Guardian Commander
+
+ProfanedGuardianCommander: {
+ DisplayName: Guardian Commander
+
+ BossChecklistIntegration: {
+ EntryName: Profaned Guardians
+ SpawnInfo: Use a [i:CalamityMod/ProfanedShard] in the Hallow or Underworld Biomes
+ DespawnMessage: "[c/ffa500:The Guardians are recalled to their Goddess' side.]"
+ }
+}
+
ProfanedGuardianDefender.DisplayName: Guardian Defender
ProfanedGuardianHealer.DisplayName: Guardian Healer
ProfanedRocks.DisplayName: Profaned Rocks
-Providence.DisplayName: Providence, the Profaned Goddess
+
+Providence: {
+ DisplayName: Providence, the Profaned Goddess
+
+ BossChecklistIntegration: {
+ EntryName: Providence
+ SpawnInfo: Use [i:CalamityMod/ProfanedCore] in the Hallow or Underworld Biomes
+ DespawnMessage: "[c/ffa500:The Profaned Goddess veils herself in purifying flame, leaving only ashes behind…]"
+ }
+}
+
ProvSpawnDefense.DisplayName: Providence Defender
ProvSpawnHealer.DisplayName: Providence Healer
ProvSpawnOffense.DisplayName: Providence Offense
FlamePillar.DisplayName: Flame Pillar
-RavagerBody.DisplayName: Ravager
+
+RavagerBody: {
+ DisplayName: Ravager
+
+ BossChecklistIntegration: {
+ SpawnInfo: Use a [i:CalamityMod/DeathWhistle]
+ DespawnMessage: "[c/b22222:The Ravager resumes its aimless, horrific rampage.]"
+ EntryName: Ravager
+ }
+}
+
RockPillar.DisplayName: Rock Pillar
CosmicLantern.DisplayName: Cosmic Lantern
CosmicMine.DisplayName: Cosmic Mine
-Signus.DisplayName: Signus, Envoy of the Devourer
+
+Signus: {
+ DisplayName: Signus, Envoy of the Devourer
+
+ BossChecklistIntegration: {
+ EntryName: Signus
+ SpawnInfo: Use a [i:CalamityMod/RuneofKos] in the Underworld
+ DespawnMessage: "[c/ba55d3:Signus inexplicably ceases to be where he once was.]"
+ }
+}
+
CorruptSlimeSpawn.DisplayName: Corrupt Slime Spawn
CrimsonSlimeSpawn.DisplayName: Crimson Slime Spawn
CrimulanPaladin.DisplayName: Crimulan Paladin
EbonianPaladin.DisplayName: Ebonian Paladin
-SlimeGodCore.DisplayName: The Slime God
+
+SlimeGodCore: {
+ DisplayName: The Slime God
+
+ BossChecklistIntegration: {
+ EntryName: Slime God
+ SpawnInfo: Use an [i:CalamityMod/OverloadedSludge]
+ DespawnMessage: "[c/ba5533:The grimy, gelatinous God hops away, its vengeance achieved.]"
+ }
+}
+
SplitCrimulanPaladin.DisplayName: Crimulan Paladin
SplitEbonianPaladin.DisplayName: Ebonian Paladin
-StormWeaverHead.DisplayName: Storm Weaver
+
+StormWeaverHead: {
+ DisplayName: Storm Weaver
+
+ BossChecklistIntegration: {
+ SpawnInfo: Use a [i:CalamityMod/RuneofKos] in Space
+ DespawnMessage: "[c/ee82ee:Storm Weaver hides itself within the fierce anvilhead clouds.]"
+ EntryName: Storm Weaver
+ }
+}
+
AnthozoanCrab.DisplayName: Anthozoan Crab
AquaticUrchin.DisplayName: Aquatic Urchin
BelchingCoral.DisplayName: Belching Coral
@@ -252,7 +528,16 @@ BlindedAngler.DisplayName: Blinded Angler
Clam.DisplayName: Clam
EutrophicRay.DisplayName: Eutrophic Ray
GhostBell.DisplayName: Ghost Bell
-GiantClam.DisplayName: Giant Clam
+
+GiantClam: {
+ DisplayName: Giant Clam
+
+ BossChecklistIntegration: {
+ SpawnInfo: Can spawn naturally in the Sunken Sea
+ DespawnMessage: "[c/7fffd4:The Giant Clam returns into hiding in its grotto.]"
+ }
+}
+
Clamitas: Clamitas
SupremeClamitas: Supreme Clamitas
PrismBack.DisplayName: Prism-Back
@@ -262,10 +547,29 @@ SeaSerpent1.DisplayName: Sea Serpent
BrimstoneHeart.DisplayName: Brimstone Heart
SepulcherHead.DisplayName: Sepulcher
SoulSeekerSupreme.DisplayName: Soul Seeker
-SupremeCalamitas.DisplayName: Supreme Witch, Calamitas
+
+SupremeCalamitas: {
+ DisplayName: Supreme Witch, Calamitas
+
+ BossChecklistIntegration: {
+ SpawnInfo: Use [i:CalamityMod/AshesofCalamity] or a [i:CalamityMod/CeremonialUrn] as offering at an [i:CalamityMod/AltarOfTheAccursedItem]
+ DespawnMessage: "[c/ffa500:Please don't waste my time.]"
+ }
+}
+
SupremeCataclysm.DisplayName: Cataclysm
SupremeCatastrophe.DisplayName: Catastrophe
-Yharon.DisplayName: Yharon, Dragon of Rebirth
+
+Yharon: {
+ DisplayName: Yharon, Dragon of Rebirth
+
+ BossChecklistIntegration: {
+ EntryName: Yharon
+ SpawnInfo: Use a [i:CalamityMod/YharonEgg]
+ DespawnMessage: "[c/ffa500:Yharon soars out of sight, his task fulfilled.]"
+ }
+}
+
YharonPhase2: Yharon, Resplendent Phoenix
// Town NPCs, Pets, etc
AndroombaFriendly.DisplayName: Androomba Pal
diff --git a/ModSupport/WeakReferenceSupport.cs b/ModSupport/WeakReferenceSupport.cs
index 34921ff0f1..b3b7f37085 100644
--- a/ModSupport/WeakReferenceSupport.cs
+++ b/ModSupport/WeakReferenceSupport.cs
@@ -12,6 +12,7 @@ using CalamityMod.Items.PermanentBoosters;
using CalamityMod.Items.Pets;
using CalamityMod.Items.Placeables;
using CalamityMod.Items.Placeables.Furniture;
+using CalamityMod.Items.Placeables.Furniture.BossRelics;
using CalamityMod.Items.Placeables.Furniture.CraftingStations;
using CalamityMod.Items.Placeables.Furniture.DevPaintings;
using CalamityMod.Items.Placeables.Furniture.Trophies;
@@ -150,16 +151,18 @@ namespace CalamityMod
/// 17.0 = Lunatic Cultist
/// 18.0 = Moon Lord
///
- private static readonly Dictionary BossDifficulty = new Dictionary
+ private static readonly Dictionary ModProgression = new Dictionary
{
{ "DesertScourge", 1.6f },
{ "GiantClam", 1.61f },
+ { "AcidRainT1", 2.67f },
{ "Crabulon", 2.7f },
{ "HiveMind", 3.98f },
{ "Perforators", 3.99f },
{ "SlimeGod", 6.7f }, // Thorium Granite Energy Storm is 6.4f, Buried Champion is 6.5f, and Star Scouter is 6.9f
{ "Cryogen", 8.5f },
{ "AquaticScourge", 9.5f },
+ { "AcidRainT2", 9.51f },
{ "CragmawMire", 9.52f },
{ "BrimstoneElemental", 10.5f },
{ "CalamitasClone", 11.7f }, // Thorium Lich is 11.6f
@@ -176,27 +179,21 @@ namespace CalamityMod
{ "StormWeaver", 19.61f },
{ "Signus", 19.62f },
{ "Polterghast", 20f },
+ { "AcidRainT3", 20.49f },
{ "Mauler", 20.491f },
{ "NuclearTerror", 20.492f },
{ "OldDuke", 20.5f },
- { "DevourerOfGods", 21f },
+ { "DevourerofGods", 21f },
{ "Yharon", 22f },
{ "ExoMechs", 22.99f },
{ "Calamitas", 23f },
- { "AdultEidolonWyrm", 23.5f },
+ // { "AdultEidolonWyrm", 23.5f },
+ { "BossRush", 25.99f },
// { "Yharim", 24f },
// { "Noxus", 25f },
// { "Xeroc", 26f },
};
- private static readonly Dictionary InvasionDifficulty = new Dictionary
- {
- { "Acid Rain Initial", 2.67f },
- { "Acid Rain Aquatic Scourge", 9.51f },
- { "Acid Rain Polterghast", 20.49f },
- { "Boss Rush", 25.99f }
- };
-
public static void Setup()
{
BossChecklistSupport();
@@ -306,53 +303,6 @@ namespace CalamityMod
EnemyRedirect(ModContent.NPCType(), "%3F%3F%3F");
}
- // Wrapper function to add bosses to Boss Checklist.
- private static void AddBoss(Mod bossChecklist, Mod hostMod, string name, float difficulty, int npcType, Func downed, object summon,
- List collection, string instructions, string despawn, Func available, Action portrait = null, string bossHeadTex = null)
- {
- bossChecklist.Call("AddBoss", hostMod, name, npcType, difficulty, downed, available, collection, summon ?? null, instructions, despawn, portrait, bossHeadTex);
- }
-
- // Wrapper function to add bosses with multiple segments or phases to Boss Checklist.
- private static void AddBoss(Mod bossChecklist, Mod hostMod, string name, float difficulty, List npcTypes, Func downed, object summon,
- List collection, string instructions, string despawn, Func available, Action portrait = null, string bossHeadTex = null)
- {
- bossChecklist.Call("AddBoss", hostMod, name, npcTypes, difficulty, downed, available, collection, summon ?? null, instructions, despawn, portrait, bossHeadTex);
- }
-
- // Wrapper function to add minibosses to Boss Checklist.
- private static void AddMiniBoss(Mod bossChecklist, Mod hostMod, string name, float difficulty, int npcType, Func downed, object summon,
- List collection, string instructions, string despawn, Func available, Action portrait = null, string bossHeadTex = null)
- {
- bossChecklist.Call("AddMiniBoss", hostMod, name, npcType, difficulty, downed, available, collection, summon ?? null, instructions, despawn, portrait, bossHeadTex);
- }
-
- // Wrapper function to add events to Boss Checklist.
- private static void AddInvasion(Mod bossChecklist, Mod hostMod, string name, float difficulty, List npcTypes, Func downed, object summon,
- List collection, string instructions, Func available, Action portrait = null, string bossHeadTex = null)
- {
- bossChecklist.Call("AddEvent", hostMod, name, npcTypes, difficulty, downed, available, collection, summon ?? null, instructions, portrait, bossHeadTex);
- }
-
- // Wrapper function to add loot and collection items to vanilla bosses for Boss Checklist.
- private static void AddLoot(Mod bossChecklist, string bossName, List loot = null, List collection = null)
- => AddLoot(bossChecklist, "Terraria", bossName, loot, collection);
-
- // Wrapper function to add loot and collection items to other mods' bosses for Boss Checklist.
- private static void AddLoot(Mod bossChecklist, string mod, string bossName, List loot = null, List collection = null)
- {
- if (loot != null)
- bossChecklist.Call("AddToBossLoot", mod, bossName, loot);
- if (collection != null)
- bossChecklist.Call("AddToBossCollection", mod, bossName, collection);
- }
-
- // Wrapper function to add summon items to vanilla bosses for Boss Checklist.
- private static void AddSummons(Mod bossChecklist, string bossName, List summons) => AddSummons(bossChecklist, "Terraria", bossName, summons);
-
- // Wrapper function to add summon items to other mods' bosses for Boss Checklist.
- private static void AddSummons(Mod bossChecklist, string mod, string bossName, List summons) => bossChecklist.Call("AddToBossSpawnItems", mod, bossName, summons);
-
// Wrapper function to detect if a subworld is in use for Subworld Library.
internal static bool InAnySubworld()
{
@@ -371,6 +321,18 @@ namespace CalamityMod
return false;
}
+ // Wrapper function to add bosses to Boss Checklist.
+ private static void AddBoss(Mod bossChecklist, Mod hostMod, string name, float difficulty, object npcTypes, Func downed, Dictionary extraInfo)
+ => bossChecklist.Call("LogBoss", hostMod, name, difficulty, downed, npcTypes, extraInfo);
+
+ // Wrapper function to add minibosses to Boss Checklist.
+ private static void AddMiniBoss(Mod bossChecklist, Mod hostMod, string name, float difficulty, int npcType, Func downed, Dictionary extraInfo)
+ => bossChecklist.Call("LogMiniBoss", hostMod, name, difficulty, downed, npcType, extraInfo);
+
+ // Wrapper function to add events to Boss Checklist.
+ private static void AddInvasion(Mod bossChecklist, Mod hostMod, string name, float difficulty, List npcTypes, Func downed, Dictionary extraInfo)
+ => bossChecklist.Call("LogEvent", hostMod, name, difficulty, downed, npcTypes, extraInfo);
+
private static void BossChecklistSupport()
{
CalamityMod calamity = GetInstance();
@@ -384,398 +346,456 @@ namespace CalamityMod
// Adds every single Calamity invasion to the Boss Checklist's Invasion Log.
AddCalamityInvasions(bossChecklist, calamity);
- // Loot which Calamity adds to vanilla bosses and events is also added to Boss Checklist's Boss Log.
- AddCalamityBossLoot(bossChecklist);
- AddCalamityEventLoot(bossChecklist);
+ // Registers Calamity's special loot (ie. Lore items) and alternate spawn items to Boss Checklist's Boss Log.
+ RegisterCalamityExtraInfo(bossChecklist, calamity);
}
private static void AddCalamityBosses(Mod bossChecklist, Mod calamity)
{
// Desert Scourge
{
- BossDifficulty.TryGetValue("DesertScourge", out float order);
+ string entryName = "DesertScourge";
+ ModProgression.TryGetValue(entryName, out float order);
List segments = new List() { NPCType(), NPCType(), NPCType() };
- int summon = ItemType();
- List collection = new List() { ItemType(), ItemType(), ItemType(), ItemType() };
- string instructions = $"Use a [i:{summon}] in the Desert Biome";
- string despawn = CalamityUtils.ColorMessage("The scourge of the desert delves back into the sand.", new Color(0xEE, 0xE8, 0xAA));
+ List collection = new List() { ItemType(), ItemType(), ItemType(), ItemType(), ItemType() };
Action portrait = (SpriteBatch sb, Rectangle rect, Color color) => {
Texture2D texture = ModContent.Request("CalamityMod/NPCs/DesertScourge/DesertScourge_BossChecklist").Value;
Vector2 centered = new Vector2(rect.Center.X - (texture.Width / 2), rect.Center.Y - (texture.Height / 2));
sb.Draw(texture, centered, color);
};
- string bossHeadTex = "CalamityMod/NPCs/DesertScourge/DesertScourgeHead_Head_Boss";
- AddBoss(bossChecklist, calamity, "Desert Scourge", order, segments, DownedDesertScourge, summon, collection, instructions, despawn, () => true, portrait, bossHeadTex);
+ AddBoss(bossChecklist, calamity, entryName, order, segments, DownedDesertScourge, new Dictionary()
+ {
+ ["spawnItems"] = ItemType(),
+ ["collectibles"] = collection,
+ ["customPortrait"] = portrait
+ });
}
// Giant Clam
{
- BossDifficulty.TryGetValue("GiantClam", out float order);
+ string entryName = "GiantClam";
+ ModProgression.TryGetValue(entryName, out float order);
int type = NPCType();
- string instructions = "Can spawn naturally in the Sunken Sea";
- string despawn = CalamityUtils.ColorMessage("The Giant Clam returns into hiding in its grotto.", new Color(0x7F, 0xFF, 0xD4));
- AddMiniBoss(bossChecklist, calamity, "Giant Clam", order, type, DownedGiantClam, null, null, instructions, despawn, () => true);
+ List collection = new List() { ItemType(), ItemType() };
+ AddMiniBoss(bossChecklist, calamity, entryName, order, type, DownedGiantClam, new Dictionary()
+ {
+ ["collectibles"] = collection
+ });
}
// Crabulon
{
- BossDifficulty.TryGetValue("Crabulon", out float order);
+ string entryName = "Crabulon";
+ ModProgression.TryGetValue(entryName, out float order);
int type = NPCType();
- int summon = ItemType();
- List collection = new List() { ItemType(), ItemType(), ItemType(), ItemType() };
- string instructions = $"Use a [i:{summon}] in the Mushroom Biome";
- string despawn = CalamityUtils.ColorMessage("The monstrous mycelial crab shuffles away…", new Color(0x64, 0x95, 0xED));
- AddBoss(bossChecklist, calamity, "Crabulon", order, type, DownedCrabulon, summon, collection, instructions, despawn, () => true);
+ List collection = new List() { ItemType(), ItemType(), ItemType(), ItemType(), ItemType() };
+ AddBoss(bossChecklist, calamity, entryName, order, type, DownedCrabulon, new Dictionary()
+ {
+ ["spawnItems"] = ItemType(),
+ ["collectibles"] = collection
+ });
}
// Hive Mind
{
- BossDifficulty.TryGetValue("HiveMind", out float order);
+ string entryName = "HiveMind";
+ ModProgression.TryGetValue(entryName, out float order);
int type = NPCType();
- int summon = ItemType();
- List collection = new List() { ItemType(), ItemType(), ItemType(), ItemType(), ItemType() };
- string instructions = $"Kill a Tumor in the Corruption or use a [i:{summon}] in the Corruption";
- string despawn = CalamityUtils.ColorMessage("The Hive Mind flits away to brood elsewhere.", new Color(0x94, 0x00, 0xD3));
- string bossHeadTex = "CalamityMod/NPCs/HiveMind/HiveMindP2_Head_Boss";
- AddBoss(bossChecklist, calamity, "The Hive Mind", order, type, DownedHiveMind, summon, collection, instructions, despawn, () => true, null, bossHeadTex);
+ List collection = new List() { ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType() };
+ AddBoss(bossChecklist, calamity, entryName, order, type, DownedHiveMind, new Dictionary()
+ {
+ ["spawnItems"] = ItemType(),
+ ["collectibles"] = collection,
+ ["overrideHeadTextures"] = "CalamityMod/NPCs/HiveMind/HiveMindP2_Head_Boss"
+ });
}
// Perforators
{
- BossDifficulty.TryGetValue("Perforators", out float order);
+ string entryName = "Perforators";
+ ModProgression.TryGetValue(entryName, out float order);
int type = NPCType();
- int summon = ItemType();
- List collection = new List() { ItemType(), ItemType(), ItemType(), ItemType(), ItemType() };
- string instructions = $"Kill a Cyst in the Crimson or use a [i:{summon}] in the Crimson";
- string despawn = CalamityUtils.ColorMessage("The Perforators search for more hosts to gorge themselves on.", new Color(0xDC, 0x14, 0x3C));
- AddBoss(bossChecklist, calamity, "The Perforators", order, type, DownedPerfs, summon, collection, instructions, despawn, () => true);
+ List collection = new List() { ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType() };
+ AddBoss(bossChecklist, calamity, entryName, order, type, DownedPerfs, new Dictionary()
+ {
+ ["spawnItems"] = ItemType(),
+ ["collectibles"] = collection
+ });
}
// Slime God
{
- BossDifficulty.TryGetValue("SlimeGod", out float order);
+ string entryName = "SlimeGod";
+ ModProgression.TryGetValue(entryName, out float order);
List bosses = new List() { NPCType(), NPCType(), NPCType() };
- int summon = ItemType();
- List collection = new List() { ItemType(), ItemType(), ItemType(), ItemType(), ItemType() };
- string instructions = $"Use an [i:{summon}]";
- string despawn = CalamityUtils.ColorMessage("The grimy, gelatinous God hops away, its vengeance achieved.", new Color(0xBA, 0x55, 0x33));
- AddBoss(bossChecklist, calamity, "Slime God", order, bosses, DownedSlimeGod, summon, collection, instructions, despawn, () => true);
+ List collection = new List() { ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType() };
+ AddBoss(bossChecklist, calamity, entryName, order, bosses, DownedSlimeGod, new Dictionary()
+ {
+ ["spawnItems"] = ItemType(),
+ ["collectibles"] = collection
+ });
}
// Cryogen
{
- BossDifficulty.TryGetValue("Cryogen", out float order);
+ string entryName = "Cryogen";
+ ModProgression.TryGetValue(entryName, out float order);
int type = NPCType();
- int summon = ItemType();
- List collection = new List() { ItemType(), ItemType(), ItemType(), ItemType() };
- string instructions = $"Use a [i:{summon}] in the Snow Biome";
- string despawn = CalamityUtils.ColorMessage("Cryogen disappears amidst the biting winds of the blizzard.", new Color(0x00, 0xFF, 0xFF));
- string bossLogTex = "CalamityMod/NPCs/Cryogen/Cryogen_Phase1_Head_Boss";
- AddBoss(bossChecklist, calamity, "Cryogen", order, type, DownedCryogen, summon, collection, instructions, despawn, () => true, null, bossLogTex);
+ List collection = new List() { ItemType(), ItemType(), ItemType(), ItemType(), ItemType() };
+ AddBoss(bossChecklist, calamity, entryName, order, type, DownedCryogen, new Dictionary()
+ {
+ ["spawnItems"] = ItemType(),
+ ["collectibles"] = collection,
+ ["overrideHeadTextures"] = "CalamityMod/NPCs/Cryogen/Cryogen_Phase1_Head_Boss"
+ });
}
// Aquatic Scourge
{
- BossDifficulty.TryGetValue("AquaticScourge", out float order);
+ string entryName = "AquaticScourge";
+ ModProgression.TryGetValue(entryName, out float order);
List segments = new List() { NPCType(), NPCType(), NPCType(), NPCType() };
- int summon = ItemType();
- List collection = new List() { ItemType(), ItemType(), ItemType(), ItemType(), ItemType() };
- string instructions = $"Use a [i:{summon}] in the Sulphuric Sea or wait for it to spawn in the Sulphuric Sea";
- string despawn = CalamityUtils.ColorMessage("The poisoned scourge swims back to the tranquil, open ocean.", new Color(0xF0, 0xE6, 0x8C));
- string bossLogTex = "CalamityMod/NPCs/AquaticScourge/AquaticScourgeHead_Head_Boss";
+ List collection = new List() { ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType() };
Action portrait = (SpriteBatch sb, Rectangle rect, Color color) => {
Texture2D texture = ModContent.Request("CalamityMod/NPCs/AquaticScourge/AquaticScourge_BossChecklist").Value;
Vector2 centered = new Vector2(rect.Center.X - (texture.Width / 2), rect.Center.Y - (texture.Height / 2));
sb.Draw(texture, centered, color);
};
- AddBoss(bossChecklist, calamity, "Aquatic Scourge", order, segments, DownedAquaticScourge, summon, collection, instructions, despawn, () => true, portrait, bossLogTex);
+ AddBoss(bossChecklist, calamity, entryName, order, segments, DownedAquaticScourge, new Dictionary()
+ {
+ ["spawnItems"] = ItemType(),
+ ["collectibles"] = collection,
+ ["customPortrait"] = portrait
+ });
}
// Cragmaw Mire
{
- BossDifficulty.TryGetValue("CragmawMire", out float order);
+ string entryName = "CragmawMire";
+ ModProgression.TryGetValue(entryName, out float order);
int type = NPCType();
- int summon = ItemType();
- string instructions = $"Spawns during Acid Rain after the Aquatic Scourge has been defeated.\nStart Acid Rain with a [i:{summon}]";
- string despawn = CalamityUtils.ColorMessage("The Cragmaw Mire buries itself within the sand.", new Color(0xF0, 0xE6, 0x8C));
- AddMiniBoss(bossChecklist, calamity, "Cragmaw Mire", order, type, DownedCragmawMire, null, null, instructions, despawn, () => true);
+ List collection = new List() { ItemType(), ItemType() };
+ AddMiniBoss(bossChecklist, calamity, entryName, order, type, DownedCragmawMire, new Dictionary()
+ {
+ ["spawnItems"] = ItemType(),
+ ["collectibles"] = collection,
+ ["availability"] = DownedAcidRainInitial
+ });
}
// Brimstone Elemental
{
- BossDifficulty.TryGetValue("BrimstoneElemental", out float order);
+ string entryName = "BrimstoneElemental";
+ ModProgression.TryGetValue(entryName, out float order);
int type = NPCType();
- int summon = ItemType();
- List collection = new List() { ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType() };
- string instructions = $"Use a [i:{summon}] in the Brimstone Crag";
- string despawn = CalamityUtils.ColorMessage("The elemental ever maintains her somber vigil over Azafure…", new Color(0xDC, 0x14, 0x3C));
- AddBoss(bossChecklist, calamity, "Brimstone Elemental", order, type, DownedBrimstoneElemental, summon, collection, instructions, despawn, () => true);
+ List collection = new List() { ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType() };
+ AddBoss(bossChecklist, calamity, entryName, order, type, DownedBrimstoneElemental, new Dictionary()
+ {
+ ["spawnItems"] = ItemType(),
+ ["collectibles"] = collection
+ });
}
// Calamitas Clone
{
- BossDifficulty.TryGetValue("CalamitasClone", out float order);
+ string entryName = "CalamitasClone";
+ ModProgression.TryGetValue(entryName, out float order);
int type = NPCType();
- int summon = ItemType();
- List collection = new List() { ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType() };
- string instructions = $"Use an [i:{summon}] at Night";
- string despawn = CalamityUtils.ColorMessage("The clone spits a bit of blood in disappointment and vanishes.", new Color(0xFF, 0xA5, 0x00));
- AddBoss(bossChecklist, calamity, "The Calamitas Clone", order, type, DownedCalClone, summon, collection, instructions, despawn, () => true);
+ List collection = new List() { ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType() };
+ AddBoss(bossChecklist, calamity, entryName, order, type, DownedCalClone, new Dictionary()
+ {
+ ["spawnItems"] = ItemType(),
+ ["collectibles"] = collection
+ });
}
// Great Sand Shark
{
- BossDifficulty.TryGetValue("GreatSandShark", out float order);
+ string entryName = "GreatSandShark";
+ ModProgression.TryGetValue(entryName, out float order);
int type = NPCType();
- int summon = ItemType();
- List collection = new List() { ItemID.MusicBoxSandstorm };
- string instructions = $"Kill 10 sand sharks after defeating Plantera or use a [i:{summon}] in the Desert Biome";
- string despawn = CalamityUtils.ColorMessage("The apex predator of the sands disappears between the dunes.", new Color(0xDA, 0xA5, 0x20));
- AddMiniBoss(bossChecklist, calamity, "Great Sand Shark", order, type, DownedGSS, summon, collection, instructions, despawn, () => true);
+ List collection = new List() { ItemType(), ItemType(), ItemID.MusicBoxSandstorm };
+ AddMiniBoss(bossChecklist, calamity, entryName, order, type, DownedGSS, new Dictionary()
+ {
+ ["spawnItems"] = ItemType(),
+ ["collectibles"] = collection
+ });
}
// Anahita and Leviathan
{
- BossDifficulty.TryGetValue("Leviathan", out float order);
+ string entryName = "Leviathan";
+ ModProgression.TryGetValue(entryName, out float order);
List bosses = new List