From 375c86fa5455bebd2e8a057feb039ae39651c9bd Mon Sep 17 00:00:00 2001 From: Ozzatron Date: Tue, 10 Mar 2020 17:33:01 -0400 Subject: [PATCH] Massive Boss Checklist refactor --- ModSupport/WeakReferenceSupport.cs | 1449 ++++++++++++++-------------- Utilities/CalamityUtils.cs | 7 + Utilities/Downed.cs | 35 + 3 files changed, 741 insertions(+), 750 deletions(-) create mode 100644 Utilities/Downed.cs diff --git a/ModSupport/WeakReferenceSupport.cs b/ModSupport/WeakReferenceSupport.cs index a7d2a719b5..31586a28d2 100644 --- a/ModSupport/WeakReferenceSupport.cs +++ b/ModSupport/WeakReferenceSupport.cs @@ -1,785 +1,734 @@ -using CalamityMod; -using CalamityMod.Items.Potions.Alcohol; -using CalamityMod.Items.Potions; -using CalamityMod.Items.SummonItems; +using CalamityMod.Buffs.Summon; using CalamityMod.Items.Accessories; using CalamityMod.Items.Accessories.Wings; -using CalamityMod.Items.DifficultyItems; -using CalamityMod.Items.PermanentBoosters; -using CalamityMod.Items.Materials; -using CalamityMod.Items.Placeables; -using CalamityMod.Items.Placeables.FurnitureCosmilite; -using CalamityMod.Items.Placeables.Furniture.Trophies; -using CalamityMod.Items.Placeables.Furniture.CraftingStations; using CalamityMod.Items.Armor.Vanity; +using CalamityMod.Items.DifficultyItems; using CalamityMod.Items.LoreItems; -using CalamityMod.Items.Weapons.Melee; -using CalamityMod.Items.Weapons.Ranged; -using CalamityMod.Items.Weapons.Magic; -using CalamityMod.Items.Weapons.Summon; -using CalamityMod.Items.Weapons.Rogue; +using CalamityMod.Items.Materials; using CalamityMod.Items.Mounts; +using CalamityMod.Items.PermanentBoosters; using CalamityMod.Items.Pets; +using CalamityMod.Items.Placeables; +using CalamityMod.Items.Placeables.Furniture.CraftingStations; +using CalamityMod.Items.Placeables.Furniture.Trophies; +using CalamityMod.Items.Placeables.FurnitureCosmilite; +using CalamityMod.Items.Potions; +using CalamityMod.Items.Potions.Alcohol; +using CalamityMod.Items.SummonItems; using CalamityMod.Items.Tools; using CalamityMod.Items.Tools.ClimateChange; using CalamityMod.Items.TreasureBags; -using CalamityMod.NPCs.DesertScourge; -using CalamityMod.NPCs.Crabulon; -using CalamityMod.NPCs.HiveMind; -using CalamityMod.NPCs.Perforator; -using CalamityMod.NPCs.SlimeGod; -using CalamityMod.NPCs.Cryogen; -using CalamityMod.NPCs.BrimstoneElemental; +using CalamityMod.Items.Weapons.Magic; +using CalamityMod.Items.Weapons.Melee; +using CalamityMod.Items.Weapons.Ranged; +using CalamityMod.Items.Weapons.Rogue; +using CalamityMod.Items.Weapons.Summon; using CalamityMod.NPCs.AquaticScourge; -using CalamityMod.NPCs.Leviathan; using CalamityMod.NPCs.AstrumAureus; -using CalamityMod.NPCs.PlaguebringerGoliath; -using CalamityMod.NPCs.Ravager; 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.GreatSandShark; +using CalamityMod.NPCs.HiveMind; +using CalamityMod.NPCs.Leviathan; +using CalamityMod.NPCs.Perforator; +using CalamityMod.NPCs.PlaguebringerGoliath; +using CalamityMod.NPCs.Polterghast; using CalamityMod.NPCs.ProfanedGuardians; using CalamityMod.NPCs.Providence; -using CalamityMod.NPCs.Bumblebirb; -using CalamityMod.NPCs.Polterghast; -using CalamityMod.NPCs.StormWeaver; -using CalamityMod.NPCs.CeaselessVoid; +using CalamityMod.NPCs.Ravager; using CalamityMod.NPCs.Signus; -using CalamityMod.NPCs.DevourerofGods; -using CalamityMod.NPCs.Yharon; -using CalamityMod.NPCs.Calamitas; -using CalamityMod.NPCs.SupremeCalamitas; +using CalamityMod.NPCs.SlimeGod; +using CalamityMod.NPCs.StormWeaver; using CalamityMod.NPCs.SunkenSea; -using CalamityMod.NPCs.GreatSandShark; +using CalamityMod.NPCs.SupremeCalamitas; using CalamityMod.NPCs.TownNPCs; -using CalamityMod.Buffs.Summon; +using CalamityMod.NPCs.Yharon; using CalamityMod.Projectiles.Summon; using CalamityMod.World; -using Microsoft.Xna.Framework.Graphics; +using Microsoft.Xna.Framework; using System; using System.Collections.Generic; -using Terraria; using Terraria.ID; using Terraria.ModLoader; -using Terraria.DataStructures; + +using static CalamityMod.Downed; +using static Terraria.ModLoader.ModContent; + namespace CalamityMod { - internal class WeakReferenceSupport - { - public static void Setup() - { - BossChecklistSupport(); - CensusSupport(); + internal class WeakReferenceSupport + { + private static readonly Dictionary BossDifficulty = new Dictionary + { + { "DesertScourge", 1.5f }, + { "GiantClam", 1.6f }, + { "Crabulon", 2.5f }, + { "HiveMind", 3.5f }, + { "Perforators", 3.5f }, + { "SlimeGod", 5.5f }, + { "Cryogen", 6.5f }, + { "BrimstoneElemental", 7.5f }, + { "AquaticScourge", 8.5f }, + { "Calamitas", 9.7f }, + { "GreatSandShark", 10.09f }, + { "Leviathan", 10.5f }, + { "AstrumAureus", 10.6f }, + { "PlaguebringerGoliath", 11.5f }, + { "Ravager", 12.5f }, + { "AstrumDeus", 13.5f }, + { "ProfanedGuardians", 14.5f }, + { "Bumblebirb", 14.6f }, + { "Providence", 15.01f }, // Thorium's Ragnarok is 15f + { "CeaselessVoid", 15.5f }, + { "StormWeaver", 15.51f }, + { "Signus", 15.52f }, + { "Polterghast", 16f }, + { "DevourerOfGods", 17f }, + { "Yharon", 18f }, + // { "Draedon", 18.5f }, + { "SupremeCalamitas", 19f }, + // { "Yharim", 20f }, + // { "Noxus", 120f }, + // { "Xeroc", 121f }, + }; + + public static void Setup() + { + BossChecklistSupport(); + FargosSupport(); + CensusSupport(); SummonersAssociationSupport(); - } - - private static void BossChecklistSupport() - { - Mod bossChecklist = ModLoader.GetMod("BossChecklist"); - Mod calamity = ModContent.GetInstance(); - Mod calamityModMusic = ModLoader.GetMod("CalamityModMusic"); - - if (bossChecklist != null) - { - // 14 is moonlord, 12 is duke fishron - - //Desert Scourge - bossChecklist.Call( - "AddBoss", - 1.5f, - new List() {ModContent.NPCType(), ModContent.NPCType(), ModContent.NPCType()}, - calamity, - "Desert Scourge", - (Func)(() => CalamityWorld.downedDesertScourge), - ModContent.ItemType(), - new List() {ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType()}, - new List() {ModContent.ItemType(), ItemID.SandBlock, ModContent.ItemType(), ItemID.Coral, ItemID.Seashell, ItemID.Starfish, ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ItemID.AnglerTackleBag, ItemID.HighTestFishingLine, ItemID.TackleBox, ItemID.AnglerEarring, ItemID.FishermansGuide, ItemID.WeatherRadio, ItemID.Sextant, ItemID.AnglerHat, ItemID.AnglerVest, ItemID.AnglerPants, ItemID.FishingPotion, ItemID.SonarPotion, ItemID.CratePotion, ItemID.GoldenBugNet, ItemID.LesserHealingPotion}, - "Use a [i:" + ModContent.ItemType() + "] in the Desert Biome", - "[c/EEE8AA:The scourge of the desert delved back into the sand.]", - "CalamityMod/NPCs/DesertScourge/DesertScourge_BossChecklist"); - - //Giant Clam - bossChecklist.Call( - "AddMiniBoss", - 1.6f, - ModContent.NPCType(), - calamity, - "Giant Clam", - (Func)(() => CalamityWorld.downedCLAM), - null, - null, - new List() { ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType()}, - "Can spawn naturally in the Sunken Sea", - "[c/7FFFD4:The Giant Clam returns into hiding in its grotto.]"); - - //Crabulon - bossChecklist.Call( - "AddBoss", - 2.5f, - ModContent.NPCType(), - calamity, - "Crabulon", - (Func)(() => CalamityWorld.downedCrabulon), - ModContent.ItemType(), - new List() { ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType()}, - new List() { ModContent.ItemType(), ItemID.GlowingMushroom, ItemID.MushroomGrassSeeds, ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ItemID.LesserHealingPotion}, - "Use a [i:" + ModContent.ItemType() + "] in the Mushroom Biome", - "[c/6495ED:The mycelium crab has lost interest.]"); - - //Hive Mind - bossChecklist.Call( - "AddBoss", - 3.5f, - new List() {ModContent.NPCType(), ModContent.NPCType()}, - calamity, - "Hive Mind", - (Func)(() => CalamityWorld.downedHiveMind), - ModContent.ItemType(), - new List() {ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType()}, - new List() {ModContent.ItemType(), ModContent.ItemType(), ItemID.DemoniteBar, ItemID.RottenChunk, ItemID.CursedFlame, ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ItemID.LesserHealingPotion}, - "By killing a Cyst in the Corruption or use a [i:" + ModContent.ItemType() + "] in the Corruption", - "[c/9400D3:The corrupted colony began searching for a new breeding ground.]"); - - //Perforators - bossChecklist.Call( - "AddBoss", - 3.5f, - new List() {ModContent.NPCType()}, - calamity, - "The Perforators", - (Func)(() => CalamityWorld.downedPerforator), - ModContent.ItemType(), - new List() {ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType()}, - new List() {ModContent.ItemType(), ModContent.ItemType(), ItemID.CrimtaneBar, ItemID.Vertebrae, ItemID.Ichor, ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ItemID.LesserHealingPotion}, - "By killing a Cyst in the Crimson or use a [i:" + ModContent.ItemType() + "] in the Crimson", - "[c/DC143C:The parasitic hive began searching for a new host.]"); - - //Slime God - bossChecklist.Call( - "AddBoss", - 5.5f, - new List() {ModContent.NPCType(), ModContent.NPCType(), ModContent.NPCType()}, - calamity, - "Slime God", - (Func)(() => CalamityWorld.downedSlimeGod), - ModContent.ItemType(), - new List() {ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType()}, - new List() {ModContent.ItemType(), ItemID.Gel, ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ItemID.HealingPotion}, - "Use an [i:" + ModContent.ItemType() + "]", - "[c/BA5533:The gelatinous monstrosity achieved vengeance for its breathren.]"); - - //Cryogen - bossChecklist.Call( - "AddBoss", - 6.5f, - ModContent.NPCType(), - calamity, - "Cryogen", - (Func)(() => CalamityWorld.downedCryogen), - ModContent.ItemType(), - new List() {ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType()}, - new List() {ModContent.ItemType(), ItemID.SoulofMight, ModContent.ItemType(), ModContent.ItemType(), ItemID.FrostCore, ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ItemID.FrozenKey, ItemID.GreaterHealingPotion}, - "Use a [i:" + ModContent.ItemType() + "] in the Snow Biome", - "[c/00FFFF:Cryogen drifts away, carried on a freezing wind.]", - "CalamityMod/NPCs/Cryogen/Cryogen_BossChecklist"); - - //Brimstone Elemental - bossChecklist.Call( - "AddBoss", - 7.5f, - ModContent.NPCType(), - calamity, - "Brimstone Elemental", - (Func)(() => CalamityWorld.downedBrimstoneElemental), - ModContent.ItemType(), - new List() {ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType()}, - new List() {ModContent.ItemType(), ItemID.SoulofFright, ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ItemID.GreaterHealingPotion}, - "Use a [i:" + ModContent.ItemType() + "] in the Brimstone Crag", - "[c/DC143C:Brimstone Elemental withdraws to the ruins of her shrine.]"); - - //Aquatic Scourge - bossChecklist.Call( - "AddBoss", - 8.5f, - new List() {ModContent.NPCType(), ModContent.NPCType(), ModContent.NPCType(), ModContent.NPCType()}, - calamity, - "Aquatic Scourge", - (Func)(() => CalamityWorld.downedAquaticScourge), - ModContent.ItemType(), - new List() { ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType()}, - new List() { ModContent.ItemType(), ModContent.ItemType(), ItemID.SoulofSight, ModContent.ItemType(), ItemID.Coral, ItemID.Seashell, ItemID.Starfish, ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ItemID.AnglerTackleBag, ItemID.HighTestFishingLine, ItemID.TackleBox, ItemID.AnglerEarring, ItemID.FishermansGuide, ItemID.WeatherRadio, ItemID.Sextant, ItemID.AnglerHat, ItemID.AnglerVest, ItemID.AnglerPants, ItemID.FishingPotion, ItemID.SonarPotion, ItemID.CratePotion, ItemID.GoldenBugNet, ItemID.GreaterHealingPotion}, - "Use a [i:" + ModContent.ItemType() + "] in the Sulphuric Sea or wait for it to spawn in the Sulphuric Sea", - "[c/F0E68C:The Aquatic Scourge swam back into the open ocean.]", - "CalamityMod/NPCs/AquaticScourge/AquaticScourge_BossChecklist"); - - //Calamitas - bossChecklist.Call( - "AddBoss", - 9.7f, - new List() {ModContent.NPCType()}, - calamity, - "Calamitas", - (Func)(() => CalamityWorld.downedCalamitas), - ModContent.ItemType(), - new List() {ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType()}, - new List() {ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ItemID.BrokenHeroSword, ItemID.GreaterHealingPotion}, - "Use an [i:" + ModContent.ItemType() + "] at Night", - "[c/FFA500:If you wanted a fight, you should've came more prepared.]"); - - //Great Sand Shark - bossChecklist.Call( - "AddMiniBoss", - 10.09f, - ModContent.NPCType(), - calamity, - "Great Sand Shark", - (Func)(() => CalamityWorld.downedGSS), - ModContent.ItemType(), - new List() {ItemID.MusicBoxSandstorm}, - new List() {ModContent.ItemType(), ItemID.AncientBattleArmorMaterial}, - "Kill 10 sand sharks after defeating Plantera or use a [i:" + ModContent.ItemType() + "] in the Desert Biome", - "[c/DAA520:The apex predator of the sands disappears into the dunes...]"); - - //Leviathan and Siren - bossChecklist.Call( - "AddBoss", - 10.5f, - new List() {ModContent.NPCType(), ModContent.NPCType()}, - calamity, - "Leviathan", - (Func)(() => CalamityWorld.downedLeviathan), - null, - new List() {ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType()}, - new List() {ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ItemID.HotlineFishingHook, ItemID.BottomlessBucket, ItemID.SuperAbsorbantSponge, ItemID.FishingPotion, ItemID.SonarPotion, ItemID.CratePotion, ItemID.GreaterHealingPotion}, - "By killing an unknown entity in the Ocean Biome", - "[c/7FFFD4:The aquatic entities sink back beneath the ocean depths.]", - "CalamityMod/NPCs/Leviathan/SirenandLevi_BossChecklist"); - - //Astrum Aureus - bossChecklist.Call( - "AddBoss", - 10.6f, - ModContent.NPCType(), - calamity, - "Astrum Aureus", - (Func)(() => CalamityWorld.downedAstrageldon), - ModContent.ItemType(), - new List() { ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType()}, - new List() { ModContent.ItemType(), ModContent.ItemType(), ItemID.FallenStar, ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ItemID.HallowedKey, ItemID.FragmentSolar, ItemID.FragmentVortex, ItemID.FragmentNebula, ItemID.FragmentStardust, ModContent.ItemType(), ItemID.GreaterHealingPotion}, - "Use an [i:" + ModContent.ItemType() + "] at Night in the Astral Biome", - "[c/FFD700:Astrum Aureus’ program has been executed. Initiate recall.]", - "CalamityMod/NPCs/AstrumAureus/AstrumAureus_BossChecklist"); - - //Plaguebringer Goliath - bossChecklist.Call( - "AddBoss", - 11.5f, - ModContent.NPCType(), - calamity, - "Plaguebringer Goliath", - (Func)(() => CalamityWorld.downedPlaguebringer), - ModContent.ItemType(), - new List() {ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType()}, - new List() {ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ItemID.GreaterHealingPotion}, - "Use an [i:" + ModContent.ItemType() + "] in the Jungle Biome", - "[c/00FF00:HOSTILE SPECIMENS TERMINATED. INITIATE RECALL TO HOME BASE.]"); - - //Ravager - bossChecklist.Call( - "AddBoss", - 12.5f, - new List() {ModContent.NPCType(), ModContent.NPCType(), ModContent.NPCType(), ModContent.NPCType(), ModContent.NPCType(), ModContent.NPCType()}, - calamity, - "Ravager", - (Func)(() => CalamityWorld.downedScavenger), - ModContent.ItemType(), - new List() {ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType()}, - new List() {ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ItemID.GreaterHealingPotion}, - "Use an [i:" + ModContent.ItemType() + "]", - "[c/B22222:The automaton of misshapen victims went looking for the true perpetrator.]", - "CalamityMod/NPCs/Ravager/Ravager_BossChecklist"); - - //Astrum Deus - bossChecklist.Call( - "AddBoss", - 13.5f, - new List() { ModContent.NPCType(), ModContent.NPCType(), ModContent.NPCType()}, - calamity, - "Astrum Deus", - (Func)(() => CalamityWorld.downedStarGod), - ModContent.ItemType(), - new List() { ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType()}, - new List() { ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ItemID.FragmentSolar, ItemID.FragmentVortex, ItemID.FragmentNebula, ItemID.FragmentStardust, ItemID.GreaterHealingPotion}, - "Defeat 3 empowered astral titans or use a [i:" + ModContent.ItemType() + "] at Night", - "[c/FFD700:The infected deity retreats to the heavens.]", - "CalamityMod/NPCs/AstrumDeus/AstrumDeus_BossChecklist"); - - //Profaned Guardians - bossChecklist.Call( - "AddBoss", - 14.5f, - new List() { ModContent.NPCType()}, - calamity, "Profaned Guardians", - (Func)(() => CalamityWorld.downedGuardians), - ModContent.ItemType(), - new List() { ModContent.ItemType(), ModContent.ItemType() }, - new List() { ModContent.ItemType(), ItemID.GreaterHealingPotion}, - "Use a [i:" + ModContent.ItemType() + "] in the Hallow or Underworld Biomes", - "[c/FFA500:The guardians must protect their goddess at all costs.]", - "CalamityMod/NPCs/ProfanedGuardians/ProfanedGuardians_BossChecklist"); - - //Bumblebirb - bossChecklist.Call( - "AddBoss", - 14.6f, - ModContent.NPCType(), - calamity, - "Bumblebirb", - (Func)(() => CalamityWorld.downedBumble), - ModContent.ItemType(), - new List() {ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType()}, - new List() {ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ItemID.SuperHealingPotion}, - "Use [i:" + ModContent.ItemType() + "] in the Jungle Biome", - "[c/FFD700:The failed experiment returns into its reproductive routine.]"); - - //Providence - bossChecklist.Call( - "AddBoss", - 15f, - new List() {ModContent.NPCType(), ModContent.NPCType(), ModContent.NPCType(), ModContent.NPCType()}, - calamity, - "Providence", - (Func)(() => CalamityWorld.downedProvidence), - new List() {ModContent.ItemType(), ModContent.ItemType()}, - new List() {ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType()}, - new List() {ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ItemID.SuperHealingPotion}, - "Use a [i:" + ModContent.ItemType() + "] in the Hallow or Underworld Biomes", - "[c/FFA500:The Profaned Goddess vanishes in a burning blaze.]", - "CalamityMod/NPCs/Providence/Providence_BossChecklist"); - - //Ceaseless Void - bossChecklist.Call( - "AddBoss", - 15.1f, - new List() {ModContent.NPCType(), ModContent.NPCType(), ModContent.NPCType(), ModContent.NPCType()}, - calamity, - "Ceaseless Void", - (Func)(() => CalamityWorld.downedSentinel1), - ModContent.ItemType(), - new List() {ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType()}, - new List() {ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ItemID.SuperHealingPotion}, "Use a [i:" + ModContent.ItemType() + "] in the Dungeon", - "[c/4B0082:The rift in time and space has moved away from your reach.]"); - - //Storm Weaver - bossChecklist.Call( - "AddBoss", - 15.2f, - new List() {ModContent.NPCType(), ModContent.NPCType(), ModContent.NPCType(), ModContent.NPCType(), ModContent.NPCType(), ModContent.NPCType()}, - calamity, - "Storm Weaver", - (Func)(() => CalamityWorld.downedSentinel2), ModContent.ItemType(), - new List() {ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType()}, - new List() {ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ItemID.SuperHealingPotion}, - "Use a [i:" + ModContent.ItemType() + "] in Space", - "[c/EE82EE:Storm Weaver hid itself once again within the stormfront.]", - "CalamityMod/NPCs/StormWeaver/StormWeaver_BossChecklist"); - - //Signus - bossChecklist.Call( - "AddBoss", - 15.3f, - ModContent.NPCType(), - calamity, - "Signus", - (Func)(() => CalamityWorld.downedSentinel3), - ModContent.ItemType(), - new List() {ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType()}, - new List() {ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ItemID.SuperHealingPotion}, - "Use a [i:" + ModContent.ItemType() + "] in the Underworld", - "[c/BA55D3:The Devourer's assassin has finished its easy task.]"); - - //Polterghast - bossChecklist.Call( - "AddBoss", - 15.5f, - new List() {ModContent.NPCType(), ModContent.NPCType()}, - calamity, - "Polterghast", - (Func)(() => CalamityWorld.downedPolterghast), - ModContent.ItemType(), - new List() {ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType()}, - new List() {ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ItemID.SuperHealingPotion}, - "Kill 30 phantom spirits or use a [i:" + ModContent.ItemType() + "] in the Dungeon", - "[c/B0E0E6:The volatile spirits disperse throughout the depths of the dungeon.]"); - - //Devourer of Gods - bossChecklist.Call( - "AddBoss", - 16f, - new List() {ModContent.NPCType()}, - calamity, - "Devourer of Gods", - (Func)(() => CalamityWorld.downedDoG), ModContent.ItemType(), - new List() {ModContent.ItemType(), ModContent.ItemType()}, - new List() {ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType()}, - "Use a [i:" + ModContent.ItemType() + "]", - "[c/00FFFF:The Devourer of Gods has slain everyone and feasted on their essence.]", - "CalamityMod/NPCs/DevourerofGods/DevourerofGods_BossChecklist", - "CalamityMod/NPCs/DevourerofGods/DevourerofGodsHead_Head_Boss"); - - //Yharon - bossChecklist.Call( - "AddBoss", - 17f, - ModContent.NPCType(), - calamity, - "Yharon", - (Func)(() => CalamityWorld.downedYharon), - ModContent.ItemType(), - new List() {ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType()}, - new List() {ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType()}, - "Use a [i:" + ModContent.ItemType() + "] in the Jungle Biome", - (CalamityWorld.buffedEclipse ? "[c/FFA500:Yharon prepared itself for the worst possible outcome.]" : "[c/FFA500:Yharon found you too weak to stay near your gravestone.]"), - "CalamityMod/NPCs/Yharon/Yharon_BossChecklist"); - - //Supreme Calamitas - bossChecklist.Call( - "AddBoss", - 18f, - new List() {ModContent.NPCType()}, - calamity, - "Supreme Calamitas", - (Func)(() => CalamityWorld.downedSCal), ModContent.ItemType(), - new List() {ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType()}, - new List() {ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType()}, - "Use an [i:" + ModContent.ItemType() + "]", - "[c/FFA500:Please don't waste my time.]"); - - //King Slime - bossChecklist.Call( - "AddToBossLoot", - "Terraria", - "KingSlime", - new List() {ModContent.ItemType()}); - - bossChecklist.Call( - "AddToBossCollection", - "Terraria", - "KingSlime", - new List() {ModContent.ItemType()}); - - //Eye of Cthulhu - bossChecklist.Call( - "AddToBossLoot", - "Terraria", - "EyeofCthulhu", - new List() {ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType()}); - - bossChecklist.Call( - "AddToBossCollection", - "Terraria", - "EyeofCthulhu", - new List() {ModContent.ItemType()}); - - //Eater of Worlds - bossChecklist.Call( - "AddToBossCollection", - "Terraria", - "EaterofWorldsHead", - new List() {ModContent.ItemType(), ModContent.ItemType()}); - - //Brain of Cthulhu - bossChecklist.Call( - "AddToBossCollection", - "Terraria", - "BrainofCthulhu", - new List() {ModContent.ItemType(), ModContent.ItemType()}); - - //Queen Bee - bossChecklist.Call( - "AddToBossLoot", - "Terraria", - "QueenBee", - new List() {ModContent.ItemType()}); - - bossChecklist.Call( - "AddToBossCollection", - "Terraria", - "QueenBee", - new List() {ModContent.ItemType()}); - - //Skeletron - bossChecklist.Call( - "AddToBossLoot", - "Terraria", - "SkeletronHead", - new List() {ModContent.ItemType()}); - - bossChecklist.Call( - "AddToBossCollection", - "Terraria", - "SkeletronHead", - new List() {ModContent.ItemType()}); - - //Wall of Flesh - bossChecklist.Call( - "AddToBossLoot", - "Terraria", - "WallofFlesh", - new List() {ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ItemID.CorruptionKey, ItemID.CrimsonKey}); - - bossChecklist.Call( - "AddToBossCollection", - "Terraria", - "WallofFlesh", - new List() {ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType()}); - - //The Twins - bossChecklist.Call( - "AddToBossCollection", - "Terraria", - "TheTwins", - new List() {ModContent.ItemType(), ModContent.ItemType()}); - - //The Destroyer - bossChecklist.Call( - "AddToBossLoot", - "Terraria", - "TheDestroyer", - new List() {ModContent.ItemType()}); - - bossChecklist.Call( - "AddToBossCollection", - "Terraria", - "TheDestroyer", - new List() {ModContent.ItemType(), ModContent.ItemType()}); - - //Skeletron Prime - bossChecklist.Call( - "AddToBossCollection", - "Terraria", - "SkeletronPrime", - new List() {ModContent.ItemType(), ModContent.ItemType()}); - - //Plantera - bossChecklist.Call( - "AddToBossLoot", - "Terraria", - "Plantera", - new List() {ModContent.ItemType(), ModContent.ItemType(), ItemID.JungleKey}); - - bossChecklist.Call( - "AddToBossCollection", - "Terraria", - "Plantera", - new List() {ModContent.ItemType()}); - - bossChecklist.Call( - "AddToBossSpawnItems", - "Terraria", - "Plantera", - new List() {ModContent.ItemType()}); - - //Golem - bossChecklist.Call( - "AddToBossLoot", - "Terraria", - "Golem", - new List() {ModContent.ItemType(), ModContent.ItemType()}); - - bossChecklist.Call( - "AddToBossCollection", - "Terraria", - "Golem", - new List() {ModContent.ItemType()}); - - bossChecklist.Call( - "AddToBossSpawnItems", - "Terraria", - "Golem", - new List() {ModContent.ItemType()}); - - //Duke Fishron - bossChecklist.Call( - "AddToBossLoot", - "Terraria", - "DukeFishron", - new List() {ModContent.ItemType(), ModContent.ItemType()}); - - bossChecklist.Call( - "AddToBossCollection", - "Terraria", - "DukeFishron", - new List() {ModContent.ItemType()}); - - //Lunatic Cultist - bossChecklist.Call( - "AddToBossLoot", - "Terraria", - "CultistBoss", - new List() {ModContent.ItemType(), ModContent.ItemType()}); - - bossChecklist.Call( - "AddToBossCollection", - "Terraria", - "CultistBoss", - new List() {ModContent.ItemType(), ModContent.ItemType()}); - - bossChecklist.Call( - "AddToBossSpawnItems", - "Terraria", - "CultistBoss", - new List() {ModContent.ItemType()}); - - //Moon Lord - bossChecklist.Call( - "AddToBossLoot", - "Terraria", - "MoonLord", - new List() {ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType()}); - - bossChecklist.Call( - "AddToBossCollection", - "Terraria", - "MoonLord", - new List() {ModContent.ItemType()}); - - //Betsy - bossChecklist.Call( - "AddToBossLoot", - "Terraria", - "DD2Betsy", - new List() {ModContent.ItemType()}); - - //Blood Moon - bossChecklist.Call( - "AddToBossLoot", - "Terraria", - "Blood Moon", - new List() {ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType()}); - - bossChecklist.Call( - "AddToBossSpawnItems", - "Terraria", - "Blood Moon", - new List() {ModContent.ItemType()}); - - //Goblin Army - bossChecklist.Call( - "AddToBossLoot", - "Terraria", - "Goblin Army", - new List() {ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType()}); - - //Pirates - bossChecklist.Call( - "AddToBossLoot", - "Terraria", - "Pirate Invasion", - new List() {ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType()}); - - //Solar Eclipse - bossChecklist.Call( - "AddToBossLoot", - "Terraria", - "Solar Eclipse", - new List() {ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType()}); - - //Pumpkin Moon - bossChecklist.Call( - "AddToBossLoot", - "Terraria", - "Pumpkin Moon", - new List() {ModContent.ItemType()}); - - //Pumpking - bossChecklist.Call( - "AddToBossLoot", - "Terraria", - "Pumpking", - new List() {ModContent.ItemType()}); - - //Frost Moon - bossChecklist.Call( - "AddToBossLoot", - "Terraria", - "Frost Moon", - new List() {ModContent.ItemType(), ModContent.ItemType()}); - - //Ice Queen - bossChecklist.Call( - "AddToBossLoot", - "Terraria", - "Ice Queen", - new List() {ModContent.ItemType()}); - - //Martian Madness - bossChecklist.Call( - "AddToBossLoot", - "Terraria", - "Martian Madness", - new List() {ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType()}); - - //Martian Saucer - bossChecklist.Call( - "AddToBossLoot", - "Terraria", - "Martian Saucer", - new List() {ModContent.ItemType()}); - - //Lunar Events - bossChecklist.Call( - "AddToBossLoot", - "Terraria", - "Lunar Event", - new List() {ModContent.ItemType()}); - } - } - - private static void CensusSupport() - { - Mod censusMod = ModLoader.GetMod("Census"); - if (censusMod != null) - { - censusMod.Call("TownNPCCondition", ModContent.NPCType(), "Defeat a Giant Clam after defeating the Desert Scourge"); - censusMod.Call("TownNPCCondition", ModContent.NPCType(), "Have a [i:" + ItemID.PlatinumCoin + "] in your inventory after defeating Skeletron"); - censusMod.Call("TownNPCCondition", ModContent.NPCType(), "Have [i:" + ModContent.ItemType() + "] in your inventory in Hardmode"); - censusMod.Call("TownNPCCondition", ModContent.NPCType(), "Defeat Cryogen"); - } - } + } + + // 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 loot, List collection, string instructions, string despawn, string bossLogTex = null, string bossHeadTex = null) + { + bossChecklist.Call("AddBoss", difficulty, npcType, hostMod, name, downed, summon ?? null, collection, loot, instructions, despawn, bossLogTex, 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 loot, List collection, string instructions, string despawn, string bossLogTex = null, string bossHeadTex = null) + { + bossChecklist.Call("AddBoss", difficulty, npcTypes, hostMod, name, downed, summon ?? null, collection, loot, instructions, despawn, bossLogTex, 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 loot, List collection, string instructions, string despawn, string bossLogTex = null, string bossHeadTex = null) + { + bossChecklist.Call("AddMiniBoss", difficulty, npcType, hostMod, name, downed, summon ?? null, collection, loot, instructions, despawn, bossLogTex, 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); + + /// + /// 1.0 = King Slime
+ /// 2.0 = Eye of Cthulhu
+ /// 3.0 = Eater of Worlds / Brain of Cthulhu
+ /// 4.0 = Queen Bee
+ /// 5.0 = Skeletron
+ /// 6.0 = Wall of Flesh
+ /// 7.0 = The Twins
+ /// 8.0 = The Destroyer
+ /// 9.0 = Skeletron Prime
+ /// 10.0 = Plantera
+ /// 11.0 = Golem
+ /// 12.0 = Duke Fishron
+ /// 13.0 = Lunatic Cultist
+ /// 14.0 = Moon Lord + ///
+ private static void BossChecklistSupport() + { + Mod bossChecklist = ModLoader.GetMod("BossChecklist"); + Mod calamity = GetInstance(); + + // TODO -- calamity music mod should call boss checklist to add loot to calamity bosses on its own + Mod calamityModMusic = ModLoader.GetMod("CalamityModMusic"); + + if (bossChecklist is null) + return; + + // Adds every single Calamity boss and miniboss to Boss Checklist's Boss Log. + AddCalamityBosses(bossChecklist, calamity); + + // Loot which Calamity adds to vanilla bosses and events is also added to Boss Checklist's Boss Log. + AddCalamityBossLoot(bossChecklist); + AddCalamityEventLoot(bossChecklist); + } + + private static void AddCalamityBosses(Mod bossChecklist, Mod calamity) + { + // Desert Scourge + { + BossDifficulty.TryGetValue("DesertScourge", out float order); + List segments = new List() { NPCType(), NPCType(), NPCType() }; + int summon = ItemType(); + List loot = new List() { ItemType(), ItemID.SandBlock, ItemType(), ItemID.Coral, ItemID.Seashell, ItemID.Starfish, ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemID.AnglerTackleBag, ItemID.HighTestFishingLine, ItemID.TackleBox, ItemID.AnglerEarring, ItemID.FishermansGuide, ItemID.WeatherRadio, ItemID.Sextant, ItemID.AnglerHat, ItemID.AnglerVest, ItemID.AnglerPants, ItemID.FishingPotion, ItemID.SonarPotion, ItemID.CratePotion, ItemID.GoldenBugNet, ItemID.LesserHealingPotion }; + List collection = new List() { ItemType(), ItemType(), ItemType() }; + string instructions = $"Use a [i:{summon}] in the Desert Biome"; + string despawn = CalamityUtils.ColorMessage("The scourge of the desert delved back into the sand.", new Color(0xEE, 0xE8, 0xAA)); + string bossLogTex = "CalamityMod/NPCs/DesertScourge/DesertScourge_BossChecklist"; + AddBoss(bossChecklist, calamity, "Desert Scourge", order, segments, DownedDesertScourge, summon, loot, collection, instructions, despawn, bossLogTex); + } + + // Giant Clam + { + BossDifficulty.TryGetValue("GiantClam", out float order); + int type = NPCType(); + List loot = new List() { ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType() }; + 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, loot, null, instructions, despawn); + } + + // Crabulon + { + BossDifficulty.TryGetValue("Crabulon", out float order); + int type = NPCType(); + int summon = ItemType(); + List loot = new List() { ItemType(), ItemID.GlowingMushroom, ItemID.MushroomGrassSeeds, ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemID.LesserHealingPotion }; + List collection = new List() { ItemType(), ItemType(), ItemType() }; + string instructions = $"Use a [i:{summon}] in the Mushroom Biome"; + string despawn = CalamityUtils.ColorMessage("The mycleium crab has lost interest.", new Color(0x64, 0x95, 0xED)); + AddBoss(bossChecklist, calamity, "Crabulon", order, type, DownedCrabulon, summon, loot, collection, instructions, despawn); + } + + // Hive Mind + { + BossDifficulty.TryGetValue("HiveMind", out float order); + List phases = new List() { NPCType(), NPCType() }; + int summon = ItemType(); + List loot = new List() { ItemType(), ItemType(), ItemID.DemoniteBar, ItemID.RottenChunk, ItemID.CursedFlame, ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemID.LesserHealingPotion }; + List collection = new List() { ItemType(), ItemType(), ItemType() }; + string instructions = $"Kill a Cyst in the Corruption or use a [i:{summon}] in the Corruption"; + string despawn = CalamityUtils.ColorMessage("The corrupted colony began searching for a new breeding ground.", new Color(0x94, 0x00, 0xD3)); + AddBoss(bossChecklist, calamity, "Hive Mind", order, phases, DownedHiveMind, summon, loot, collection, instructions, despawn); + } + + // Perforators + { + BossDifficulty.TryGetValue("Perforators", out float order); + int type = NPCType(); + int summon = ItemType(); + List loot = new List() { ItemType(), ItemType(), ItemID.CrimtaneBar, ItemID.Vertebrae, ItemID.Ichor, ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemID.LesserHealingPotion }; + List collection = new List() { 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 parasitic hive began searching for a new host.", new Color(0xDC, 0x14, 0x3C)); + AddBoss(bossChecklist, calamity, "The Perforators", order, type, DownedPerfs, summon, loot, collection, instructions, despawn); + } + + // Slime God + { + BossDifficulty.TryGetValue("SlimeGod", out float order); + List bosses = new List() { NPCType(), NPCType(), NPCType() }; + int summon = ItemType(); + List loot = new List() { ItemType(), ItemID.Gel, ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemID.HealingPotion }; + List collection = new List() { ItemType(), ItemType(), ItemType(), ItemType(), ItemType() }; + string instructions = $"Use an [i:{summon}]"; + string despawn = CalamityUtils.ColorMessage("The gelatinous monstrosity achieved vengeance for its breathren.", new Color(0xBA, 0x55, 0x33)); + AddBoss(bossChecklist, calamity, "Slime God", order, bosses, DownedSlimeGod, summon, loot, collection, instructions, despawn); + } + + // Cryogen + { + BossDifficulty.TryGetValue("Cryogen", out float order); + int type = NPCType(); + int summon = ItemType(); + List loot = new List() { ItemType(), ItemID.SoulofMight, ItemType(), ItemType(), ItemID.FrostCore, ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemID.FrozenKey, ItemID.GreaterHealingPotion }; + List collection = new List() { ItemType(), ItemType(), ItemType() }; + string instructions = $"Use a [i:{summon}] in the Snow Biome"; + string despawn = CalamityUtils.ColorMessage("Cryogen drifts away, carried on a freezing wind.", new Color(0x00, 0xFF, 0xFF)); + string bossLogTex = "CalamityMod/NPCs/Cryogen/Cryogen_BossChecklist"; + AddBoss(bossChecklist, calamity, "Cryogen", order, type, DownedCryogen, summon, loot, collection, instructions, despawn, bossLogTex); + } + + // Brimstone Elemental + { + BossDifficulty.TryGetValue("BrimstoneElemental", out float order); + int type = NPCType(); + int summon = ItemType(); + List loot = new List() { ItemType(), ItemID.SoulofFright, ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemID.GreaterHealingPotion }; + List collection = new List() { ItemType(), ItemType(), ItemType(), ItemType(), ItemType() }; + string instructions = $"Use a [i:{summon}] in the Brimstone Crag"; + string despawn = CalamityUtils.ColorMessage("Brimstone Elemental withdraws to the ruins of her shrine.", new Color(0xDC, 0x14, 0x3C)); + AddBoss(bossChecklist, calamity, "Brimstone Elemental", order, type, DownedBrimstoneElemental, summon, loot, collection, instructions, despawn); + } + + // Aquatic Scourge + { + BossDifficulty.TryGetValue("AquaticScourge", out float order); + List segments = new List() { NPCType(), NPCType(), NPCType(), NPCType() }; + int summon = ItemType(); + List loot = new List() { ItemType(), ItemType(), ItemID.SoulofSight, ItemType(), ItemID.Coral, ItemID.Seashell, ItemID.Starfish, ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemID.AnglerTackleBag, ItemID.HighTestFishingLine, ItemID.TackleBox, ItemID.AnglerEarring, ItemID.FishermansGuide, ItemID.WeatherRadio, ItemID.Sextant, ItemID.AnglerHat, ItemID.AnglerVest, ItemID.AnglerPants, ItemID.FishingPotion, ItemID.SonarPotion, ItemID.CratePotion, ItemID.GoldenBugNet, ItemID.GreaterHealingPotion }; + List collection = new List() { 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 Aquatic Scourge swam back into the open ocean.", new Color(0xF0, 0xE6, 0x8C)); + string bossLogTex = "CalamityMod/NPCs/AquaticScourge/AquaticScourge_BossChecklist"; + AddBoss(bossChecklist, calamity, "Aquatic Scourge", order, segments, DownedAquaticScourge, summon, loot, collection, instructions, despawn, bossLogTex); + } + + // Calamitas + { + BossDifficulty.TryGetValue("Calamitas", out float order); + int type = NPCType(); + int summon = ItemType(); + List loot = new List() { ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemID.BrokenHeroSword, ItemID.GreaterHealingPotion }; + List collection = new List() { ItemType(), ItemType(), ItemType(), ItemType() }; + string instructions = $"Use an [i:{summon}] at Night"; + string despawn = CalamityUtils.ColorMessage("If you wanted a fight, you should've came more prepared.", new Color(0xFF, 0xA5, 0x00)); + AddBoss(bossChecklist, calamity, "Calamitas", order, type, DownedCalamitas, summon, loot, collection, instructions, despawn); + } + + // Great Sand Shark + { + BossDifficulty.TryGetValue("GreatSandShark", out float order); + int type = NPCType(); + int summon = ItemType(); + List loot = new List() { ItemType(), ItemID.AncientBattleArmorMaterial }; + 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 into the dunes...", new Color(0xDA, 0xA5, 0x20)); + AddMiniBoss(bossChecklist, calamity, "Great Sand Shark", order, type, DownedGSS, summon, loot, collection, instructions, despawn); + } + + // Siren and Leviathan + { + BossDifficulty.TryGetValue("Leviathan", out float order); + List bosses = new List() { NPCType(), NPCType() }; + List loot = new List() { ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemID.HotlineFishingHook, ItemID.BottomlessBucket, ItemID.SuperAbsorbantSponge, ItemID.FishingPotion, ItemID.SonarPotion, ItemID.CratePotion, ItemID.GreaterHealingPotion }; + List collection = new List() { ItemType(), ItemType(), ItemType(), ItemType() }; + string instructions = "By killing an unknown entity in the Ocean Biome"; + string despawn = CalamityUtils.ColorMessage("The aquatic entities sink back beneath the ocean depths.", new Color(0x7F, 0xFF, 0xD4)); + string bossLogTex = "CalamityMod/NPCs/Leviathan/SirenandLevi_BossChecklist"; + AddBoss(bossChecklist, calamity, "Leviathan", order, bosses, DownedLeviathan, null, loot, collection, instructions, despawn, bossLogTex); + } + + // Astrum Aureus + { + BossDifficulty.TryGetValue("AstrumAureus", out float order); + int type = NPCType(); + int summon = ItemType(); + List loot = new List() { ItemType(), ItemType(), ItemID.FallenStar, ItemType(), ItemType(), ItemType(), ItemType(), ItemID.HallowedKey, ItemID.FragmentSolar, ItemID.FragmentVortex, ItemID.FragmentNebula, ItemID.FragmentStardust, ItemType(), ItemID.GreaterHealingPotion }; + List collection = new List() { ItemType(), ItemType(), ItemType() }; + string instructions = $"Use an [i:{summon}] at Night in the Astral Biome"; + string despawn = CalamityUtils.ColorMessage("Astrum Aureus’ program has been executed. Initiate recall.", new Color(0xFF, 0xD7, 0x00)); + string bossLogTex = "CalamityMod/NPCs/AstrumAureus/AstrumAureus_BossChecklist"; + AddBoss(bossChecklist, calamity, "Astrum Aureus", order, type, DownedAureus, summon, loot, collection, instructions, despawn, bossLogTex); + } + + // Plaguebringer Goliath + { + BossDifficulty.TryGetValue("PlaguebringerGoliath", out float order); + int type = NPCType(); + int summon = ItemType(); + List loot = new List() { ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemID.GreaterHealingPotion }; + List collection = new List() { ItemType(), ItemType(), ItemType() }; + string instructions = $"Use an [i:{summon}] in the Jungle Biome"; + string despawn = CalamityUtils.ColorMessage("HOSTILE SPECIMENS TERMINATED. INITIATE RECALL TO HOME BASE.", new Color(0x00, 0xFF, 0x00)); + AddBoss(bossChecklist, calamity, "Plaguebringer Goliath", order, type, DownedPBG, summon, loot, collection, instructions, despawn); + } + + // Ravager + { + BossDifficulty.TryGetValue("Ravager", out float order); + List segments = new List() { NPCType(), NPCType(), NPCType(), NPCType(), NPCType(), NPCType() }; + int summon = ItemType(); + List loot = new List() { ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemID.GreaterHealingPotion }; + List collection = new List() { ItemType(), ItemType(), ItemType() }; + string instructions = $"Use an [i:{summon}]"; + string despawn = CalamityUtils.ColorMessage("The automaton of misshapen victims went looking for the true perpetrator.", new Color(0xB2, 0x22, 0x22)); + string bossLogTex = "CalamityMod/NPCs/Ravager/Ravager_BossChecklist"; + AddBoss(bossChecklist, calamity, "Ravager", order, segments, DownedRavager, summon, loot, collection, instructions, despawn, bossLogTex); + } + + // Astrum Deus + { + BossDifficulty.TryGetValue("AstrumDeus", out float order); + List segments = new List() { NPCType(), NPCType(), NPCType() }; + int summon = ItemType(); + List loot = new List() { ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemID.FragmentSolar, ItemID.FragmentVortex, ItemID.FragmentNebula, ItemID.FragmentStardust, ItemID.GreaterHealingPotion }; + List collection = new List() { ItemType(), ItemType(), ItemType(), ItemType() }; + string instructions = $"Defeat 3 empowered astral titans or use a [i:{summon}] at Night"; + string despawn = CalamityUtils.ColorMessage("The infected deity retreats to the heavens.", new Color(0xFF, 0xD7, 0x00)); + string bossLogTex = "CalamityMod/NPCs/AstrumDeus/AstrumDeus_BossChecklist"; + AddBoss(bossChecklist, calamity, "Astrum Deus", order, segments, DownedDeus, summon, loot, collection, instructions, despawn, bossLogTex); + } + + // Profaned Guardians + { + BossDifficulty.TryGetValue("ProfanedGuardians", out float order); + int type = NPCType(); + int summon = ItemType(); + List loot = new List() { ItemType(), ItemID.GreaterHealingPotion }; + List collection = new List() { ItemType(), ItemType() }; + string instructions = $"Use a [i:{summon}] in the Hallow or Underworld Biomes"; + string despawn = CalamityUtils.ColorMessage("The guardians must protect their goddess at all costs.", new Color(0xFF, 0xA5, 0x00)); + string bossLogTex = "CalamityMod/NPCs/ProfanedGuardians/ProfanedGuardians_BossChecklist"; + AddBoss(bossChecklist, calamity, "Profaned Guardians", order, type, DownedGuardians, summon, loot, collection, instructions, despawn, bossLogTex); + } + + // Bumblebirb + { + BossDifficulty.TryGetValue("Bumblebirb", out float order); + int type = NPCType(); + int summon = ItemType(); + List loot = new List() { ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemID.SuperHealingPotion }; + List collection = new List() { ItemType(), ItemType(), ItemType() }; + string instructions = $"Use [i:{summon}] in the Jungle Biome"; + string despawn = CalamityUtils.ColorMessage("The failed experiment returns into its reproductive routine.", new Color(0xFF, 0xD7, 0x00)); + AddBoss(bossChecklist, calamity, "Bumblebirb", order, type, DownedBirb, summon, loot, collection, instructions, despawn); + } + + // Providence + { + BossDifficulty.TryGetValue("Providence", out float order); + List bosses = new List() { NPCType(), NPCType(), NPCType(), NPCType() }; + List summons = new List() { ItemType(), ItemType() }; + List loot = new List() { ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemID.SuperHealingPotion }; + List collection = new List() { ItemType(), ItemType(), ItemType() }; + string instructions = $"Use either [i:{ItemType()}] or [i:{ItemType()}] in the Hallow or Underworld Biomes"; + string despawn = CalamityUtils.ColorMessage("The Profaned Goddess vanishes in a burning blaze.", new Color(0xFF, 0xA5, 0x00)); + string bossLogTex = "CalamityMod/NPCs/Providence/Providence_BossChecklist"; + AddBoss(bossChecklist, calamity, "Providence", order, bosses, DownedProvidence, summons, loot, collection, instructions, despawn, bossLogTex); + } + + // Ceaseless Void + { + BossDifficulty.TryGetValue("CeaselessVoid", out float order); + List bosses = new List() { NPCType(), NPCType(), NPCType(), NPCType() }; + int summon = ItemType(); + List loot = new List() { ItemType(), ItemType(), ItemType(), ItemType(), ItemID.SuperHealingPotion }; + List collection = new List() { ItemType(), ItemType(), ItemType() }; + string instructions = $"Use a [i:{summon}] in the Dungeon"; + string despawn = CalamityUtils.ColorMessage("The rift in time and space has moved away from your reach.", new Color(0x4B, 0x00, 0x82)); + AddBoss(bossChecklist, calamity, "Ceaseless Void", order, bosses, DownedCeaselessVoid, summon, loot, collection, instructions, despawn); + } + + // Storm Weaver + { + BossDifficulty.TryGetValue("StormWeaver", out float order); + List segments = new List() { NPCType(), NPCType(), NPCType(), NPCType(), NPCType(), NPCType() }; + int summon = ItemType(); + List loot = new List() { ItemType(), ItemType(), ItemType(), ItemID.SuperHealingPotion }; + List collection = new List() { ItemType(), ItemType(), ItemType() }; + string instructions = $"Use a [i:{summon}] in Space"; + string despawn = CalamityUtils.ColorMessage("Storm Weaver hid itself once again within the stormfront.", new Color(0xEE, 0x82, 0xEE)); + string bossLogTex = "CalamityMod/NPCs/StormWeaver/StormWeaver_BossChecklist"; + AddBoss(bossChecklist, calamity, "Storm Weaver", order, segments, DownedStormWeaver, summon, loot, collection, instructions, despawn, bossLogTex); + } + + // Signus + { + BossDifficulty.TryGetValue("Signus", out float order); + int type = NPCType(); + int summon = ItemType(); + List loot = new List() { ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemID.SuperHealingPotion }; + List collection = new List() { ItemType(), ItemType(), ItemType() }; + string instructions = $"Use a [i:{summon}] in the Underworld"; + string despawn = CalamityUtils.ColorMessage("The Devourer's assassin has finished its easy task.", new Color(0xBA, 0x55, 0xD3)); + AddBoss(bossChecklist, calamity, "Signus", order, type, DownedSignus, summon, loot, collection, instructions, despawn); + } + + // Polterghast + { + BossDifficulty.TryGetValue("Polterghast", out float order); + List bosses = new List() { NPCType(), NPCType() }; + int summon = ItemType(); + List loot = new List() { ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemID.SuperHealingPotion }; + List collection = new List() { ItemType(), ItemType(), ItemType() }; + string instructions = $"Kill 30 phantom spirits or use a [i:{summon}] in the Dungeon"; + string despawn = CalamityUtils.ColorMessage("The volatile spirits disperse throughout the depths of the dungeon.", new Color(0xB0, 0xE0, 0xE6)); + AddBoss(bossChecklist, calamity, "Polterghast", order, bosses, DownedPolterghast, summon, loot, collection, instructions, despawn); + } + + // Devourer of Gods + { + BossDifficulty.TryGetValue("DevourerOfGods", out float order); + int type = NPCType(); + int summon = ItemType(); + List loot = new List() { ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType() }; + List collection = new List() { ItemType(), ItemType(), ItemType() }; + string instructions = $"Use a [i:{summon}]"; + string despawn = CalamityUtils.ColorMessage("The Devourer of Gods has slain everyone and feasted on their essence.", new Color(0x00, 0xFF, 0xFF)); + string bossLogTex = "CalamityMod/NPCs/DevourerofGods/DevourerofGods_BossChecklist"; + string bossHeadTex = "CalamityMod/NPCs/DevourerofGods/DevourerofGodsHead_Head_Boss"; + AddBoss(bossChecklist, calamity, "Devourer of Gods", order, type, DownedDoG, summon, loot, collection, instructions, despawn, bossLogTex, bossHeadTex); + } + + // Yharon + { + BossDifficulty.TryGetValue("Yharon", out float order); + int type = NPCType(); + int summon = ItemType(); + List loot = new List() { ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType() }; + List collection = new List() { ItemType(), ItemType(), ItemType(), ItemType(), ItemType() }; + string instructions = $"Use a [i:{summon}] in the Jungle Biome"; + // TODO -- this setup code is only run once, so the despawn message can't be changed post-eclipse. Find a way around this. + string despawn = CalamityUtils.ColorMessage("Yharon found you too weak to stay near your gravestone.", new Color(0xFF, 0xA5, 0x00)); + string bossLogTex = "CalamityMod/NPCs/Yharon/Yharon_BossChecklist"; + AddBoss(bossChecklist, calamity, "Yharon", order, type, DownedYharon, summon, loot, collection, instructions, despawn, bossLogTex); + } + + // Supreme Calamitas + { + BossDifficulty.TryGetValue("SupremeCalamitas", out float order); + int type = NPCType(); + int summon = ItemType(); + List loot = new List() { ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType() }; + List collection = new List() { ItemType(), ItemType(), ItemType() }; + string instructions = $"Use an [i:{summon}]"; + string despawn = CalamityUtils.ColorMessage("Please don't waste my time.", new Color(0xFF, 0xA5, 0x00)); + AddBoss(bossChecklist, calamity, "Supreme Calamitas", order, type, DownedSCal, summon, loot, collection, instructions, despawn); + } + } + + private static void AddCalamityBossLoot(Mod bossChecklist) + { + // King Slime + AddLoot(bossChecklist, "KingSlime", + new List() { ItemType() }, + new List() { ItemType() } + ); + + // Eye of Cthulhu + AddLoot(bossChecklist, "EyeofCthulhu", + new List() { ItemType(), ItemType(), ItemType() }, + new List() { ItemType() } + ); + + // Eater of Worlds + AddLoot(bossChecklist, "EaterofWorldsHead", + null, + new List() { ItemType(), ItemType() } + ); + + // Brain of Cthulhu + AddLoot(bossChecklist, "BrainofCthulhu", + null, + new List() { ItemType(), ItemType() } + ); + + // Queen Bee + AddLoot(bossChecklist, "QueenBee", + new List() { ItemType() }, + new List() { ItemType() } + ); + + // Skeletron + AddLoot(bossChecklist, "SkeletronHead", + new List() { ItemType() }, + new List() { ItemType() } + ); + + // Wall of Flesh + AddLoot(bossChecklist, "WallofFlesh", + new List() { ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemID.CorruptionKey, ItemID.CrimsonKey }, + new List() { ItemType(), ItemType(), ItemType() } + ); + + // The Twins + AddLoot(bossChecklist, "TheTwins", + null, + new List() { ItemType(), ItemType() } + ); + + // The Destroyer + AddLoot(bossChecklist, "TheDestroyer", + new List() { ItemType() }, + new List() { ItemType(), ItemType() } + ); + + // Skeletron Prime + AddLoot(bossChecklist, "SkeletronPrime", + null, + new List() { ItemType(), ItemType() } + ); + + // Plantera + AddLoot(bossChecklist, "Plantera", + new List() { ItemType(), ItemType(), ItemID.JungleKey }, + new List() { ItemType() } + ); + AddSummons(bossChecklist, "Plantera", new List() { ItemType() }); + + // Golem + AddLoot(bossChecklist, "Golem", + new List() { ItemType(), ItemType() }, + new List() { ItemType() } + ); + AddSummons(bossChecklist, "Golem", new List() { ItemType() }); + + // Duke Fishron + AddLoot(bossChecklist, "DukeFishron", + new List() { ItemType(), ItemType() }, + new List() { ItemType() } + ); + + // Betsy + AddLoot(bossChecklist, "DD2Betsy", + null, + new List() { ItemType() } + ); + + // Lunatic Cultist + AddLoot(bossChecklist, "CultistBoss", + new List() { ItemType(), ItemType() }, + new List() { ItemType(), ItemType() } + ); + AddSummons(bossChecklist, "CultistBoss", new List() { ItemType() }); + + // Moon Lord + AddLoot(bossChecklist, "MoonLord", + new List() { ItemType(), ItemType(), ItemType(), ItemType() }, + new List() { ItemType() } + ); + } + + private static void AddCalamityEventLoot(Mod bossChecklist) + { + // Blood Moon + AddLoot(bossChecklist, "Blood Moon", + new List() { ItemType(), ItemType(), ItemType() }, + null + ); + AddSummons(bossChecklist, "Blood Moon", new List() { ItemType() }); + + // Goblin Army + AddLoot(bossChecklist, "Goblin Army", + new List() { ItemType(), ItemType(), ItemType(), ItemType() }, + null + ); + + // Pirates + AddLoot(bossChecklist, "Pirate Invasion", + new List() { ItemType(), ItemType(), ItemType() }, + null + ); + + // Solar Eclipse + AddLoot(bossChecklist, "Solar Eclipse", + new List() { ItemType(), ItemType(), ItemType() }, + null + ); + + // Pumpkin Moon + AddLoot(bossChecklist, "Pumpkin Moon", + new List() { ItemType() }, + null + ); + AddLoot(bossChecklist, "Pumpking", + new List() { ItemType() }, + null + ); + + // Frost Moon + AddLoot(bossChecklist, "Frost Moon", + new List() { ItemType(), ItemType() }, + null + ); + AddLoot(bossChecklist, "Ice Queen", + new List() { ItemType() }, + null + ); + + // Martian Madness + AddLoot(bossChecklist, "Martian Madness", + new List() { ItemType(), ItemType(), ItemType() }, + null + ); + AddLoot(bossChecklist, "Martian Saucer", + new List() { ItemType() }, + null + ); + + // Lunar Events + AddLoot(bossChecklist, "Lunar Event", + new List() { ItemType() }, + null + ); + } + + private static void FargosSupport() + { + Mod fargos = ModLoader.GetMod("Fargowiltas"); + if (fargos is null) + return; + + // fargos.Call... + } + + private static void CensusSupport() + { + Mod censusMod = ModLoader.GetMod("Census"); + if (censusMod != null) + { + censusMod.Call("TownNPCCondition", NPCType(), "Defeat a Giant Clam after defeating the Desert Scourge"); + censusMod.Call("TownNPCCondition", NPCType(), "Have a [i:" + ItemID.PlatinumCoin + "] in your inventory after defeating Skeletron"); + censusMod.Call("TownNPCCondition", NPCType(), "Have [i:" + ItemType() + "] in your inventory in Hardmode"); + censusMod.Call("TownNPCCondition", NPCType(), "Defeat Cryogen"); + } + } private static void SummonersAssociationSupport() { Mod SummonersAssociation = ModLoader.GetMod("SummonersAssociation"); if(SummonersAssociation != null) { - SummonersAssociation.Call("AddMinionInfo", ModContent.ItemType(), ModContent.BuffType(), ModContent.ProjectileType()); - SummonersAssociation.Call("AddMinionInfo", ModContent.ItemType(), ModContent.BuffType(), ModContent.ProjectileType()); - SummonersAssociation.Call("AddMinionInfo", ModContent.ItemType(), ModContent.BuffType(), ModContent.ProjectileType()); - SummonersAssociation.Call("AddMinionInfo", ModContent.ItemType(), ModContent.BuffType(), ModContent.ProjectileType()); - SummonersAssociation.Call("AddMinionInfo", ModContent.ItemType(), ModContent.BuffType(), ModContent.ProjectileType()); - SummonersAssociation.Call("AddMinionInfo", ModContent.ItemType(), ModContent.BuffType(), ModContent.ProjectileType()); - SummonersAssociation.Call("AddMinionInfo", ModContent.ItemType(), ModContent.BuffType(), ModContent.ProjectileType()); - SummonersAssociation.Call("AddMinionInfo", ModContent.ItemType(), ModContent.BuffType(), ModContent.ProjectileType()); - SummonersAssociation.Call("AddMinionInfo", ModContent.ItemType(), ModContent.BuffType(), ModContent.ProjectileType()); - SummonersAssociation.Call("AddMinionInfo", ModContent.ItemType(), ModContent.BuffType(), ModContent.ProjectileType()); - SummonersAssociation.Call("AddMinionInfo", ModContent.ItemType(), ModContent.BuffType(), ModContent.ProjectileType()); - SummonersAssociation.Call("AddMinionInfo", ModContent.ItemType(), ModContent.BuffType(), ModContent.ProjectileType()); - SummonersAssociation.Call("AddMinionInfo", ModContent.ItemType(), ModContent.BuffType(), ModContent.ProjectileType()); - SummonersAssociation.Call("AddMinionInfo", ModContent.ItemType(), ModContent.BuffType(), ModContent.ProjectileType()); - SummonersAssociation.Call("AddMinionInfo", ModContent.ItemType(), ModContent.BuffType(), ModContent.ProjectileType()); - SummonersAssociation.Call("AddMinionInfo", ModContent.ItemType(), ModContent.BuffType(), new List() {ModContent.ProjectileType(), ModContent.ProjectileType(), ModContent.ProjectileType()}, new List() {(1f-0.6666666f), 0.3333333f, 0.3333333f}); //Entropy's Vigil is a bruh moment - SummonersAssociation.Call("AddMinionInfo", ModContent.ItemType(), ModContent.BuffType(), ModContent.ProjectileType()); - SummonersAssociation.Call("AddMinionInfo", ModContent.ItemType(), ModContent.BuffType(), new List() {ModContent.ProjectileType(), ModContent.ProjectileType()}); - SummonersAssociation.Call("AddMinionInfo", ModContent.ItemType(), ModContent.BuffType(), ModContent.ProjectileType()); - SummonersAssociation.Call("AddMinionInfo", ModContent.ItemType(), ModContent.BuffType(), ModContent.ProjectileType()); - SummonersAssociation.Call("AddMinionInfo", ModContent.ItemType(), ModContent.BuffType(), ModContent.ProjectileType()); - SummonersAssociation.Call("AddMinionInfo", ModContent.ItemType(), ModContent.BuffType(), ModContent.ProjectileType()); - SummonersAssociation.Call("AddMinionInfo", ModContent.ItemType(), ModContent.BuffType(), ModContent.ProjectileType()); - SummonersAssociation.Call("AddMinionInfo", ModContent.ItemType(), ModContent.BuffType(), ModContent.ProjectileType()); - SummonersAssociation.Call("AddMinionInfo", ModContent.ItemType(), ModContent.BuffType(), ModContent.ProjectileType(), 1f); - SummonersAssociation.Call("AddMinionInfo", ModContent.ItemType(), ModContent.BuffType(), ModContent.ProjectileType()); - SummonersAssociation.Call("AddMinionInfo", ModContent.ItemType(), ModContent.BuffType(), ModContent.ProjectileType()); - SummonersAssociation.Call("AddMinionInfo", ModContent.ItemType(), ModContent.BuffType(), ModContent.ProjectileType()); + SummonersAssociation.Call("AddMinionInfo", ItemType(), BuffType(), ProjectileType()); + SummonersAssociation.Call("AddMinionInfo", ItemType(), BuffType(), ProjectileType()); + SummonersAssociation.Call("AddMinionInfo", ItemType(), BuffType(), ProjectileType()); + SummonersAssociation.Call("AddMinionInfo", ItemType(), BuffType(), ProjectileType()); + SummonersAssociation.Call("AddMinionInfo", ItemType(), BuffType(), ProjectileType()); + SummonersAssociation.Call("AddMinionInfo", ItemType(), BuffType(), ProjectileType()); + SummonersAssociation.Call("AddMinionInfo", ItemType(), BuffType(), ProjectileType()); + SummonersAssociation.Call("AddMinionInfo", ItemType(), BuffType(), ProjectileType()); + SummonersAssociation.Call("AddMinionInfo", ItemType(), BuffType(), ProjectileType()); + SummonersAssociation.Call("AddMinionInfo", ItemType(), BuffType(), ProjectileType()); + SummonersAssociation.Call("AddMinionInfo", ItemType(), BuffType(), ProjectileType()); + SummonersAssociation.Call("AddMinionInfo", ItemType(), BuffType(), ProjectileType()); + SummonersAssociation.Call("AddMinionInfo", ItemType(), BuffType(), ProjectileType()); + SummonersAssociation.Call("AddMinionInfo", ItemType(), BuffType(), ProjectileType()); + SummonersAssociation.Call("AddMinionInfo", ItemType(), BuffType(), ProjectileType()); + SummonersAssociation.Call("AddMinionInfo", ItemType(), BuffType(), new List() { ProjectileType(), ProjectileType(), ProjectileType()}, new List() {1f-0.6666666f, 0.3333333f, 0.3333333f}); //Entropy's Vigil is a bruh moment + SummonersAssociation.Call("AddMinionInfo", ItemType(), BuffType(), ProjectileType()); + SummonersAssociation.Call("AddMinionInfo", ItemType(), BuffType(), new List() { ProjectileType(), ProjectileType()}); + SummonersAssociation.Call("AddMinionInfo", ItemType(), BuffType(), ProjectileType()); + SummonersAssociation.Call("AddMinionInfo", ItemType(), BuffType(), ProjectileType()); + SummonersAssociation.Call("AddMinionInfo", ItemType(), BuffType(), ProjectileType()); + SummonersAssociation.Call("AddMinionInfo", ItemType(), BuffType(), ProjectileType()); + SummonersAssociation.Call("AddMinionInfo", ItemType(), BuffType(), ProjectileType()); + SummonersAssociation.Call("AddMinionInfo", ItemType(), BuffType(), ProjectileType()); + SummonersAssociation.Call("AddMinionInfo", ItemType(), BuffType(), ProjectileType(), 1f); + SummonersAssociation.Call("AddMinionInfo", ItemType(), BuffType(), ProjectileType()); + SummonersAssociation.Call("AddMinionInfo", ItemType(), BuffType(), ProjectileType()); + SummonersAssociation.Call("AddMinionInfo", ItemType(), BuffType(), ProjectileType()); } } - } + } } diff --git a/Utilities/CalamityUtils.cs b/Utilities/CalamityUtils.cs index 1caae24bfc..99ebfccb94 100644 --- a/Utilities/CalamityUtils.cs +++ b/Utilities/CalamityUtils.cs @@ -2151,6 +2151,13 @@ namespace CalamityMod break; } } + + public static string ColorMessage(string msg, Color color) + { + StringBuilder sb = new StringBuilder(msg.Length + 12); + sb.Append("[c/").Append(color.Hex3()).Append(':').Append(msg).Append(']'); + return sb.ToString(); + } #endregion #region Miscellaneous Utilities diff --git a/Utilities/Downed.cs b/Utilities/Downed.cs new file mode 100644 index 0000000000..64a17c4610 --- /dev/null +++ b/Utilities/Downed.cs @@ -0,0 +1,35 @@ +using CalamityMod.World; +using System; + +namespace CalamityMod +{ + internal class Downed + { + public static readonly Func DownedDesertScourge = () => CalamityWorld.downedDesertScourge; + public static readonly Func DownedGiantClam = () => CalamityWorld.downedCLAM; + public static readonly Func DownedCrabulon = () => CalamityWorld.downedCrabulon; + public static readonly Func DownedHiveMind = () => CalamityWorld.downedHiveMind; + public static readonly Func DownedPerfs = () => CalamityWorld.downedPerforator; + public static readonly Func DownedSlimeGod = () => CalamityWorld.downedSlimeGod; + public static readonly Func DownedCryogen = () => CalamityWorld.downedCryogen; + public static readonly Func DownedBrimstoneElemental = () => CalamityWorld.downedBrimstoneElemental; + public static readonly Func DownedAquaticScourge = () => CalamityWorld.downedAquaticScourge; + public static readonly Func DownedCalamitas = () => CalamityWorld.downedCalamitas; + public static readonly Func DownedGSS = () => CalamityWorld.downedGSS; + public static readonly Func DownedLeviathan = () => CalamityWorld.downedLeviathan; + public static readonly Func DownedAureus = () => CalamityWorld.downedAstrageldon; + public static readonly Func DownedPBG = () => CalamityWorld.downedPlaguebringer; + public static readonly Func DownedRavager = () => CalamityWorld.downedScavenger; + public static readonly Func DownedDeus = () => CalamityWorld.downedStarGod; + public static readonly Func DownedGuardians = () => CalamityWorld.downedGuardians; + public static readonly Func DownedBirb = () => CalamityWorld.downedBumble; + public static readonly Func DownedProvidence = () => CalamityWorld.downedProvidence; + public static readonly Func DownedCeaselessVoid = () => CalamityWorld.downedSentinel1; + public static readonly Func DownedStormWeaver = () => CalamityWorld.downedSentinel2; + public static readonly Func DownedSignus = () => CalamityWorld.downedSentinel3; + public static readonly Func DownedPolterghast = () => CalamityWorld.downedPolterghast; + public static readonly Func DownedDoG = () => CalamityWorld.downedDoG; + public static readonly Func DownedYharon = () => CalamityWorld.downedYharon; + public static readonly Func DownedSCal = () => CalamityWorld.downedSCal; + } +}