diff --git a/CalamityMod.cs b/CalamityMod.cs index c1930408e4..b9a63989fa 100644 --- a/CalamityMod.cs +++ b/CalamityMod.cs @@ -151,7 +151,6 @@ namespace CalamityMod internal Mod ancientsAwakened = null; internal Mod bossChecklist = null; - internal Mod census = null; internal Mod crouchMod = null; internal Mod dialogueTweak = null; internal Mod fargos = null; @@ -182,8 +181,6 @@ namespace CalamityMod ModLoader.TryGetMod("AAMod", out ancientsAwakened); bossChecklist = null; ModLoader.TryGetMod("BossChecklist", out bossChecklist); - census = null; - ModLoader.TryGetMod("Census", out census); crouchMod = null; ModLoader.TryGetMod("CrouchMod", out crouchMod); dialogueTweak = null; @@ -422,7 +419,6 @@ namespace CalamityMod ancientsAwakened = null; bossChecklist = null; - census = null; crouchMod = null; dialogueTweak = null; fargos = null; diff --git a/Items/Accessories/ShatteredCommunity.cs b/Items/Accessories/ShatteredCommunity.cs index 1cca709bd7..404135f318 100644 --- a/Items/Accessories/ShatteredCommunity.cs +++ b/Items/Accessories/ShatteredCommunity.cs @@ -228,7 +228,7 @@ namespace CalamityMod.Items.Accessories // Display a level up text notification. Rectangle textArea = new Rectangle((int)Player.Center.X, (int)Player.Center.Y, 1, 1); Color textColor = new Color(236, 209, 236); - CombatText.NewText(textArea, textColor, "The Community cracks...", false, false); + CombatText.NewText(textArea, textColor, CalamityUtils.GetTextValueFromModItem("LevelUpText"), false, false); } } } diff --git a/Items/Accessories/SpectralVeil.cs b/Items/Accessories/SpectralVeil.cs index 930ddd4ba7..b2fae7054a 100644 --- a/Items/Accessories/SpectralVeil.cs +++ b/Items/Accessories/SpectralVeil.cs @@ -1,4 +1,5 @@ using CalamityMod.Rarities; +using System; using System.Collections.Generic; using System.Linq; using Terraria; @@ -23,10 +24,9 @@ namespace CalamityMod.Items.Accessories public override void ModifyTooltips(List list) { string hotkey = CalamityKeybinds.SpectralVeilHotKey.TooltipHotkeyString(); - TooltipLine line = list.FirstOrDefault(x => x.Mod == "Terraria" && x.Name == "Tooltip1"); - + TooltipLine line = list.FirstOrDefault(x => x.Mod == "Terraria" && x.Text.Contains("{0}")); if (line != null) - line.Text = "Press " + hotkey + " to consume 25% of your maximum stealth to perform a mid-range teleport and render you momentarily invulnerable"; + line.Text = String.Format(line.Text, hotkey); } public override void UpdateAccessory(Player player, bool hideVisual) diff --git a/Items/Armor/Auric/AuricTeslaBodyArmor.cs b/Items/Armor/Auric/AuricTeslaBodyArmor.cs index dfef3831b6..6bdf9b5265 100644 --- a/Items/Armor/Auric/AuricTeslaBodyArmor.cs +++ b/Items/Armor/Auric/AuricTeslaBodyArmor.cs @@ -1,5 +1,4 @@ using CalamityMod.CalPlayer; -using CalamityMod.Items.Accessories; using CalamityMod.Items.Materials; using CalamityMod.Rarities; using CalamityMod.Tiles.Furniture.CraftingStations; @@ -39,7 +38,6 @@ namespace CalamityMod.Items.Armor.Auric public override void UpdateEquip(Player player) { var modPlayer = player.Calamity(); - modPlayer.fBarrier = true; player.statLifeMax2 += 100; player.GetDamage() += 0.08f; player.GetCritChance() += 5; @@ -51,7 +49,6 @@ namespace CalamityMod.Items.Armor.Auric AddIngredient(). AddIngredient(). AddIngredient(). - AddIngredient(). AddIngredient(18). AddTile(). Register(); @@ -60,7 +57,6 @@ namespace CalamityMod.Items.Armor.Auric AddIngredient(). AddIngredient(). AddIngredient(). - AddIngredient(). AddIngredient(18). AddTile(). Register(); diff --git a/Items/Placeables/Furniture/DevPaintings/ThankYouPainting.cs b/Items/Placeables/Furniture/DevPaintings/ThankYouPainting.cs index d266b6737e..640bd9d4dc 100644 --- a/Items/Placeables/Furniture/DevPaintings/ThankYouPainting.cs +++ b/Items/Placeables/Furniture/DevPaintings/ThankYouPainting.cs @@ -65,7 +65,6 @@ namespace CalamityMod.Items.Placeables.Furniture.DevPaintings "AquaSG", "Atalya", "Ben-TK", - "Blastitle", "Cei", "Cooper", "CrabBar", @@ -108,6 +107,7 @@ namespace CalamityMod.Items.Placeables.Furniture.DevPaintings "Amadis", "AstroKnight", "Blast", + "Blastitle", "Blockaroz", "Boffin", "Bravioli", diff --git a/Items/Weapons/Summon/FlamsteedRing.cs b/Items/Weapons/Summon/FlamsteedRing.cs index 3d2df47ba3..e3b102d464 100644 --- a/Items/Weapons/Summon/FlamsteedRing.cs +++ b/Items/Weapons/Summon/FlamsteedRing.cs @@ -95,11 +95,11 @@ namespace CalamityMod.Items.Weapons.Summon if (!sufficientSpace) { Rectangle displayZone = player.Hitbox; - CombatText.NewText(displayZone, new Color(203, 157, 255), "Insufficient space!", true); + CombatText.NewText(displayZone, new Color(203, 157, 255), CalamityUtils.GetTextValueFromModItem("NoSpaceTextBottom"), true); displayZone.Y -= 30; - CombatText.NewText(displayZone, new Color(59, 194, 255), "Cannot Deploy", true); + CombatText.NewText(displayZone, new Color(59, 194, 255), CalamityUtils.GetTextValueFromModItem("NoSpaceTextTop"), true); return false; } diff --git a/Localization/en-US/Mods.CalamityMod.BossChecklistIntegration.hjson b/Localization/en-US/Mods.CalamityMod.BossChecklistIntegration.hjson new file mode 100644 index 0000000000..91c3126c8d --- /dev/null +++ b/Localization/en-US/Mods.CalamityMod.BossChecklistIntegration.hjson @@ -0,0 +1,19 @@ +AcidRainT1: { + EntryName: Acid Rain + SpawnInfo: Use a [i:CalamityMod/CausticTear] or wait for the invasion to occur naturally after the Eye of Cthulhu is defeated. +} + +AcidRainT2: { + EntryName: Acid Rain (Tier 2) + SpawnInfo: Use a [i:CalamityMod/CausticTear] or wait for the invasion to occur naturally after the Aquatic Scourge is defeated +} + +AcidRainT3: { + EntryName: Acid Rain (Tier 3) + SpawnInfo: Use a [i:CalamityMod/CausticTear] or wait for the invasion to occur naturally after the Polterghast is defeated +} + +BossRush: { + EntryName: Boss Rush + SpawnInfo: Use a [i:CalamityMod/Terminus] found at the bottom of the Abyss +} \ No newline at end of file diff --git a/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson b/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson index df1cc7bdef..61efcf1bb3 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson @@ -1451,7 +1451,7 @@ SpectralVeil: { DisplayName: Spectral Veil Tooltip: ''' - TOOLTIP LINE HERE + Press {0} to consume 25% of your maximum stealth to perform a mid-range teleport and render you momentarily invulnerable If you dodge something while invulnerable, you instantly gain full stealth Teleportation is disabled while Chaos State is active Stealth generates 15% faster diff --git a/Localization/en-US/Mods.CalamityMod.Items.Armor.PostMoonLord.hjson b/Localization/en-US/Mods.CalamityMod.Items.Armor.PostMoonLord.hjson index 8683b24959..af5cceaa09 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Armor.PostMoonLord.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Armor.PostMoonLord.hjson @@ -4,7 +4,6 @@ AuricTeslaBodyArmor: { ''' +100 max life 8% increased damage and 5% increased critical strike chance - You will freeze enemies near you when you are struck ''' } diff --git a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Summon.hjson b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Summon.hjson index 6f9f6399b4..a0c618d0da 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Summon.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Summon.hjson @@ -145,18 +145,6 @@ Cnidarian: { ''' } -GlacialEmbrace: { - DisplayName: Glacial Embrace - Tooltip: - ''' - Summons the power of the ancient ice castle - For each minion slot used, you will gain an additional orbiting shield spike - These spikes accelerate rapidly towards a nearby enemy to inflict heavy damage - They take some time to regenerate after launching themselves at the target, however - On right click, summons a duplicate ring around the targeted enemy, which slowly converges before exploding - ''' -} - CorroslimeStaff: { DisplayName: Corroslime Staff Tooltip: Summons a corro slime to fight for you @@ -334,6 +322,8 @@ EyeOfNight: { FlamsteedRing: { DisplayName: Flamsteed Ring + NoSpaceTextTop: Cannot Deploy + NoSpaceTextBottom: Insufficient space! Tooltip: ''' Summons a colossal controllable mech @@ -400,6 +390,18 @@ GastricBelcherStaff: { ''' } +GlacialEmbrace: { + DisplayName: Glacial Embrace + Tooltip: + ''' + Summons the power of the ancient ice castle + For each minion slot used, you will gain an additional orbiting shield spike + These spikes accelerate rapidly towards a nearby enemy to inflict heavy damage + They take some time to regenerate after launching themselves at the target, however + On right click, summons a duplicate ring around the targeted enemy, which slowly converges before exploding + ''' +} + GodspawnHelixStaff: { DisplayName: Godspawn Helix Staff Tooltip: Summons astral probes to protect you diff --git a/Localization/en-US/Mods.CalamityMod.Misc.hjson b/Localization/en-US/Mods.CalamityMod.Misc.hjson index 94604d30ab..5eb601d4b4 100644 --- a/Localization/en-US/Mods.CalamityMod.Misc.hjson +++ b/Localization/en-US/Mods.CalamityMod.Misc.hjson @@ -35,9 +35,20 @@ PlanetoidSchematicRecipeCondition: Place a schematic from the lab in the large p JungleSchematicRecipeCondition: Place a schematic from the lab deep within the jungle in your inventory at least once UnderworldSchematicRecipeCondition: Place a schematic from the lab near the edges of the underworld in your inventory at least once IceSchematicRecipeCondition: Place a schematic from the lab within the frozen caverns in your inventory at least once -// Item Messages +// Other CombatText uses and Item Messages ShiftToExpand: Hold SHIFT to see an expanded description LearnedSchematic: You learned how to create new things! +CragmawVibeCheck: Vibe check. +AutocannonHot: OUCH! HOT! +NoComputer: No decryption computer installed +ArkParry: Parry! +ClockworkTick: Tick +ClockworkTock: Tock +SevensJackpot: Jackpot!!! +SevensBust: Bust! +SevensDoubles: Doubles! +SevensTriples: Triples! +StylishHammerHit: Stylish! ThirdSageBlessingText: You have been blessed by the Third Sage! ThirdSageBlessingText2: The Third Sage has rescinded its blessing... GenericConsumedText: "[c/8a8a8a:You have already consumed this item]" diff --git a/Localization/en-US/Mods.CalamityMod.NPCs.hjson b/Localization/en-US/Mods.CalamityMod.NPCs.hjson index b67e6bdbf6..df51c5a56b 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,16 +547,36 @@ 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 DILF: { DisplayName: Archmage + Census.SpawnCondition: Defeat Cryogen Name.Permafrost: Permafrost Chat: { @@ -310,6 +615,7 @@ DILF: { FAP: { DisplayName: Drunk Princess + Census.SpawnCondition: Have {$Mods.CalamityMod.Items.Potions.FabsolsVodka.DisplayName} [i:CalamityMod/FabsolsVodka] in your inventory in Hardmode Name.Cirrus: Cirrus Chat: { @@ -404,6 +710,7 @@ FAP: { SEAHOE: { DisplayName: Sea King + Census.SpawnCondition: Defeat a Giant Clam after defeating the Desert Scourge Name.Amidias: Amidias Chat: { @@ -488,6 +795,7 @@ SEAHOE: { THIEF: { DisplayName: Bandit + Census.SpawnCondition: Have a {$ItemName.PlatinumCoin} [i:PlatinumCoin] in your inventory after defeating Skeletron Name: { Laura: Laura @@ -568,6 +876,7 @@ THIEF: { WITCH: { DisplayName: Brimstone Witch + Census.SpawnCondition: Defeat Supreme Witch, Calamitas Name.Calamitas: Calamitas Chat: { diff --git a/Localization/en-US/Mods.CalamityMod.Tiles.hjson b/Localization/en-US/Mods.CalamityMod.Tiles.hjson index 37c5e1cea6..a6610b23ae 100644 --- a/Localization/en-US/Mods.CalamityMod.Tiles.hjson +++ b/Localization/en-US/Mods.CalamityMod.Tiles.hjson @@ -20,9 +20,9 @@ Server: Server Terminal: Terminal // Individual entries // Sulphurous Sea & Abyss -SteamGeyser1.MapEntry: Geyser -AbyssVent1.MapEntry: Steam Vent -ThermalVent1.MapEntry: Thermal Vent +SteamGeyser.MapEntry: Geyser +AbyssVent.MapEntry: Steam Vent +ThermalVent.MapEntry: Thermal Vent // Brimstone Crag SpineSapling.MapEntry: Spine Sapling SpineTree.MapEntry: Giant Spine @@ -46,19 +46,13 @@ UelibloomOre.MapEntry: Uelibloom ArenaTile.MapEntry: Arena AshenChest: { - MapEntry0: "{$ItemName.AshenChest}" - MapEntry1: Locked Ashen Chest + MapEntry0: "{$Mods.CalamityMod.Items.Placeables.AshenChest.DisplayName}" + MapEntry1: Locked {$Mods.CalamityMod.Items.Placeables.AshenChest.DisplayName} } AstralChestLocked: { - MapEntry0: "{$ItemName.AstralChest}" - MapEntry1: Locked Astral Chest + MapEntry0: "{$Mods.CalamityMod.Items.Placeables.AstralChest.DisplayName}" + MapEntry1: Locked {$Mods.CalamityMod.Items.Placeables.AstralChest.DisplayName} } -PlaguedPlateBed.MapEntry: "'Bed'" -SteamGeyser3.MapEntry: Steam Geyser3 -SteamGeyser2.MapEntry: Steam Geyser2 -ThermalVent3.MapEntry: Thermal Vent3 -ThermalVent2.MapEntry: Thermal Vent2 -AbyssVent3.MapEntry: Abyss Vent3 -AbyssVent2.MapEntry: Abyss Vent2 \ No newline at end of file +PlaguedPlateBed.MapEntry: "'Bed'" \ No newline at end of file diff --git a/Localization/en-US/Mods.CalamityMod.UI.hjson b/Localization/en-US/Mods.CalamityMod.UI.hjson index d77b02dd95..496cb28f5a 100644 --- a/Localization/en-US/Mods.CalamityMod.UI.hjson +++ b/Localization/en-US/Mods.CalamityMod.UI.hjson @@ -88,6 +88,8 @@ Cooldowns: { InkBomb: Ink Bomb Cooldown LifeSteal: Life Steal Cooldown LionHeartShield: Energy Shell Cooldown + MasterChefShieldDurability: Energy Shield Durability + MasterChefShieldRecharge: Energy Shield Recharge NebulousCore: Nebulous Core Cooldown OmegaBlueActive: Abyssal Madness OmegaBlueCooldown: Abyssal Madness Cooldown diff --git a/ModSupport/WeakReferenceSupport.cs b/ModSupport/WeakReferenceSupport.cs index 34921ff0f1..168e97d359 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,32 +179,25 @@ 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(); FargosSupport(); - CensusSupport(); DialogueTweakSupport(); SummonersAssociationSupport(); } @@ -306,53 +302,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 +320,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 +345,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() { NPCType(), NPCType() }; - List collection = new List() { ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType() }; - string instructions = "By killing an unknown entity in the Ocean Biome"; - string despawn = CalamityUtils.ColorMessage("The aquatic outcasts return to their lonesome company.", new Color(0x7F, 0xFF, 0xD4)); - + List collection = new List() { ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType() }; Action portrait = (SpriteBatch sb, Rectangle rect, Color color) => { Texture2D texture = ModContent.Request("CalamityMod/NPCs/Leviathan/AnahitaLevi_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, "Leviathan", order, bosses, DownedLeviathan, null, collection, instructions, despawn, () => true, portrait); + AddBoss(bossChecklist, calamity, entryName, order, bosses, DownedLeviathan, new Dictionary() + { + ["collectibles"] = collection, + ["customPortrait"] = portrait + }); } // Astrum Aureus { - BossDifficulty.TryGetValue("AstrumAureus", out float order); + string entryName = "AstrumAureus"; + ModProgression.TryGetValue(entryName, out float order); int type = NPCType(); - int summon = ItemType(); - List collection = new List() { ItemType(), ItemType(), ItemType(), ItemType() }; - string instructions = $"Use an [i:{summon}] at Night in the Astral Biome"; - string despawn = CalamityUtils.ColorMessage("Aureus has neutralized all threats. Resume prior reconnaissance.", new Color(0xFF, 0xD7, 0x00)); - string bossLogTex = "CalamityMod/NPCs/AstrumAureus/AstrumAureus_Head_Boss"; - AddBoss(bossChecklist, calamity, "Astrum Aureus", order, type, DownedAureus, summon, collection, instructions, despawn, () => true, null, bossLogTex); + List collection = new List() { ItemType(), ItemType(), ItemType(), ItemType(), ItemType() }; + AddBoss(bossChecklist, calamity, entryName, order, type, DownedAureus, new Dictionary() + { + ["spawnItems"] = ItemType(), + ["collectibles"] = collection + }); } // Plaguebringer Goliath { - BossDifficulty.TryGetValue("PlaguebringerGoliath", out float order); + string entryName = "PlaguebringerGoliath"; + ModProgression.TryGetValue(entryName, out float order); int type = NPCType(); - int summon = ItemType(); - List collection = new List() { ItemType(), ItemType(), ItemType(), ItemType(), ItemType() }; - string instructions = $"Use an [i:{summon}] in the Jungle Biome"; - string despawn = CalamityUtils.ColorMessage("SPECIMENS EUTHANIZED. EXITING COMBAT PROTOCOL.", new Color(0x00, 0xFF, 0x00)); - string bossLogTex = "CalamityMod/NPCs/PlaguebringerGoliath/PlaguebringerGoliath_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/PlaguebringerGoliath/PlaguebringerGoliath_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, "Plaguebringer Goliath", order, type, DownedPBG, summon, collection, instructions, despawn, () => true, portrait, bossLogTex); + AddBoss(bossChecklist, calamity, entryName, order, type, DownedPBG, new Dictionary() + { + ["spawnItems"] = ItemType(), + ["collectibles"] = collection, + ["customPortrait"] = portrait + }); } // Ravager { - BossDifficulty.TryGetValue("Ravager", out float order); + string entryName = "Ravager"; + ModProgression.TryGetValue(entryName, out float order); List segments = new List() { NPCType(), NPCType(), NPCType(), NPCType(), NPCType(), NPCType() }; - int summon = ItemType(); - List collection = new List() { ItemType(), ItemType(), ItemType(), ItemType() }; - string instructions = $"Use a [i:{summon}]"; - string despawn = CalamityUtils.ColorMessage("The Ravager resumes its aimless, horrific rampage.", new Color(0xB2, 0x22, 0x22)); - string bossLogTex = "CalamityMod/NPCs/Ravager/RavagerBody_Head_Boss"; - + List collection = new List() { ItemType(), ItemType(), ItemType(), ItemType(), ItemType() }; Action portrait = (SpriteBatch sb, Rectangle rect, Color color) => { Texture2D texture = ModContent.Request("CalamityMod/NPCs/Ravager/Ravager_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, "Ravager", order, segments, DownedRavager, summon, collection, instructions, despawn, () => true, portrait, bossLogTex); + AddBoss(bossChecklist, calamity, entryName, order, segments, DownedRavager, new Dictionary() + { + ["spawnItems"] = ItemType(), + ["collectibles"] = collection, + ["customPortrait"] = portrait + }); } // Astrum Deus { - BossDifficulty.TryGetValue("AstrumDeus", out float order); + string entryName = "AstrumDeus"; + ModProgression.TryGetValue(entryName, out float order); List segments = new List() { NPCType(), NPCType(), NPCType() }; - int summon1 = ItemType(); - int summon2 = ItemType(); - int altar = ItemType(); - List summons = new List() { summon1, summon2 }; - List collection = new List() { ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType() }; - string instructions = $"Use a [i:{summon1}] or [i:{summon2}] as offering at an [i:{altar}]"; - string despawn = CalamityUtils.ColorMessage("The infected deity retreats to the heavens.", new Color(0xFF, 0xD7, 0x00)); - string bossLogTex = "CalamityMod/NPCs/AstrumDeus/AstrumDeusHead_Head_Boss"; - + List summons = new List() { ItemType(), ItemType() }; + List collection = new List() { ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType() }; Action portrait = (SpriteBatch sb, Rectangle rect, Color color) => { Texture2D texture = ModContent.Request("CalamityMod/NPCs/AstrumDeus/AstrumDeus_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, "Astrum Deus", order, segments, DownedDeus, summons, collection, instructions, despawn, () => true, portrait, bossLogTex); + AddBoss(bossChecklist, calamity, entryName, order, segments, DownedDeus, new Dictionary() + { + ["spawnItems"] = summons, + ["collectibles"] = collection, + ["customPortrait"] = portrait + }); } // Profaned Guardians { - BossDifficulty.TryGetValue("ProfanedGuardians", out float order); + string entryName = "ProfanedGuardians"; + 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 Hallow or Underworld Biomes"; - string despawn = CalamityUtils.ColorMessage("The Guardians are recalled to their Goddess' side.", new Color(0xFF, 0xA5, 0x00)); - string bossLogTex = "CalamityMod/NPCs/ProfanedGuardians/ProfanedGuardianCommander_Head_Boss"; - + List collection = new List() { ItemType(), ItemType(), ItemType(), ItemType(), ItemType() }; Action portrait = (SpriteBatch sb, Rectangle rect, Color color) => { Texture2D texture = ModContent.Request("CalamityMod/NPCs/ProfanedGuardians/ProfanedGuardians_BossChecklist").Value; float scale = 0.7f; Vector2 centered = new Vector2(rect.Center.X - texture.Width * scale / 2, rect.Center.Y - texture.Height * scale / 2); sb.Draw(texture, centered, null, color, 0f, Vector2.Zero, scale, SpriteEffects.None, 0f); }; - AddBoss(bossChecklist, calamity, "Profaned Guardians", order, type, DownedGuardians, summon, collection, instructions, despawn, () => true, portrait, bossLogTex); + AddBoss(bossChecklist, calamity, entryName, order, type, DownedGuardians, new Dictionary() + { + ["spawnItems"] = ItemType(), + ["collectibles"] = collection, + ["customPortrait"] = portrait, + ["overrideHeadTextures"] = "CalamityMod/NPCs/ProfanedGuardians/ProfanedGuardianCommander_Head_Boss" + }); } // Dragonfolly { - BossDifficulty.TryGetValue("Dragonfolly", out float order); + string entryName = "Dragonfolly"; + ModProgression.TryGetValue(entryName, out float order); int type = NPCType(); - int summon = ItemType(); - List collection = new List() { ItemType(), ItemType(), ItemType(), ItemType() }; - string instructions = $"Use [i:{summon}] in the Jungle Biome"; - string despawn = CalamityUtils.ColorMessage("The folly returns to its secluded roost.", new Color(0xFF, 0xD7, 0x00)); - AddBoss(bossChecklist, calamity, "Dragonfolly", order, type, DownedBirb, summon, collection, instructions, despawn, () => true); + List collection = new List() { ItemType(), ItemType(), ItemType(), ItemType(), ItemType() }; + AddBoss(bossChecklist, calamity, entryName, order, type, DownedBirb, new Dictionary() + { + ["spawnItems"] = ItemType(), + ["collectibles"] = collection + }); } // Providence { - BossDifficulty.TryGetValue("Providence", out float order); + string entryName = "Providence"; + ModProgression.TryGetValue(entryName, out float order); int type = NPCType(); - int summon = ItemType(); - List collection = new List() { ItemType(), ItemType(), ItemType(), ItemType() }; - string instructions = $"Use [i:{summon}] in the Hallow or Underworld Biomes"; - string despawn = CalamityUtils.ColorMessage("The Profaned Goddess veils herself in purifying flame, leaving only ashes behind…", new Color(0xFF, 0xA5, 0x00)); - string bossLogTex = "CalamityMod/NPCs/Providence/Providence_Head_Boss"; - + List collection = new List() { ItemType(), ItemType(), ItemType(), ItemType(), ItemType() }; Action portrait = (SpriteBatch sb, Rectangle rect, Color color) => { Texture2D texture = ModContent.Request("CalamityMod/NPCs/Providence/Providence_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, "Providence", order, type, DownedProvidence, summon, collection, instructions, despawn, () => true, portrait, bossLogTex); + AddBoss(bossChecklist, calamity, entryName, order, type, DownedProvidence, new Dictionary() + { + ["spawnItems"] = ItemType(), + ["collectibles"] = collection, + ["customPortrait"] = portrait + }); } // Ceaseless Void { - BossDifficulty.TryGetValue("CeaselessVoid", out float order); + string entryName = "CeaselessVoid"; + ModProgression.TryGetValue(entryName, out float order); List bosses = new List() { NPCType(), NPCType() }; - int summon = ItemType(); - List collection = new List() { ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType() }; - string instructions = $"Use a [i:{summon}] in the Dungeon"; - string despawn = CalamityUtils.ColorMessage("The ancient spatial rift slips away to places unknown.", new Color(0x4B, 0x00, 0x82)); - AddBoss(bossChecklist, calamity, "Ceaseless Void", order, bosses, DownedCeaselessVoid, summon, collection, instructions, despawn, () => true); + List collection = new List() { ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType() }; + AddBoss(bossChecklist, calamity, entryName, order, bosses, DownedCeaselessVoid, new Dictionary() + { + ["spawnItems"] = ItemType(), + ["collectibles"] = collection + }); } // Storm Weaver { - BossDifficulty.TryGetValue("StormWeaver", out float order); + string entryName = "StormWeaver"; + ModProgression.TryGetValue(entryName, out float order); List segments = new List() { NPCType(), NPCType(), NPCType() }; - int summon = ItemType(); List collection = new List() { ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType() }; - string instructions = $"Use a [i:{summon}] in Space"; - string despawn = CalamityUtils.ColorMessage("Storm Weaver hides itself within the fierce anvilhead clouds.", new Color(0xEE, 0x82, 0xEE)); - string bossLogTex = "CalamityMod/NPCs/StormWeaver/StormWeaverHead_Head_Boss"; Action portrait = (SpriteBatch sb, Rectangle rect, Color color) => { Texture2D texture = ModContent.Request("CalamityMod/NPCs/StormWeaver/StormWeaver_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, "Storm Weaver", order, segments, DownedStormWeaver, summon, collection, instructions, despawn, () => true, portrait, bossLogTex); + AddBoss(bossChecklist, calamity, entryName, order, segments, DownedStormWeaver, new Dictionary() + { + ["spawnItems"] = ItemType(), + ["collectibles"] = collection, + ["customPortrait"] = portrait, + ["overrideHeadTextures"] = "CalamityMod/NPCs/StormWeaver/StormWeaverHead_Head_Boss" + }); } // Signus { - BossDifficulty.TryGetValue("Signus", out float order); + string entryName = "Signus"; + ModProgression.TryGetValue(entryName, out float order); int type = NPCType(); - int summon = ItemType(); - List collection = new List() { ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType() }; - string instructions = $"Use a [i:{summon}] in the Underworld"; - string despawn = CalamityUtils.ColorMessage("Signus inexplicably ceases to be where he once was.", new Color(0xBA, 0x55, 0xD3)); - AddBoss(bossChecklist, calamity, "Signus", order, type, DownedSignus, summon, collection, instructions, despawn, () => true); + List collection = new List() { ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType() }; + AddBoss(bossChecklist, calamity, entryName, order, type, DownedSignus, new Dictionary() + { + ["spawnItems"] = ItemType(), + ["collectibles"] = collection + }); } // Polterghast { - BossDifficulty.TryGetValue("Polterghast", out float order); + string entryName = "Polterghast"; + ModProgression.TryGetValue(entryName, out float order); List bosses = new List() { NPCType(), NPCType() }; - int summon = ItemType(); - List collection = new List() { ItemType(), ItemType(), ItemType(), ItemType() }; - string instructions = $"Kill 30 phantom spirits or use a [i:{summon}] in the Dungeon"; - string despawn = CalamityUtils.ColorMessage("The volatile phantasm disperses in an echoing wail.", new Color(0xB0, 0xE0, 0xE6)); - AddBoss(bossChecklist, calamity, "Polterghast", order, bosses, DownedPolterghast, summon, collection, instructions, despawn, () => true); + List collection = new List() { ItemType(), ItemType(), ItemType(), ItemType(), ItemType() }; + AddBoss(bossChecklist, calamity, entryName, order, bosses, DownedPolterghast, new Dictionary() + { + ["spawnItems"] = ItemType(), + ["collectibles"] = collection + }); } // Mauler { - BossDifficulty.TryGetValue("Mauler", out float order); + string entryName = "Mauler"; + ModProgression.TryGetValue(entryName, out float order); int type = NPCType(); - int summon = ItemType(); - string instructions = $"Spawns during Acid Rain after Polterghast has been defeated.\nStart Acid Rain with a [i:{summon}]"; - string despawn = CalamityUtils.ColorMessage("The brutish shark looks elsewhere to turn its aggression.", new Color(0xF0, 0xE6, 0x8C)); - AddMiniBoss(bossChecklist, calamity, "Mauler", order, type, DownedMauler, null, null, instructions, despawn, () => true); + List collection = new List() { ItemType(), ItemType() }; + AddMiniBoss(bossChecklist, calamity, entryName, order, type, DownedMauler, new Dictionary() + { + ["spawnItems"] = ItemType(), + ["collectibles"] = collection, + ["availability"] = DownedAcidRainHardmode + }); } // Nuclear Terror { - BossDifficulty.TryGetValue("NuclearTerror", out float order); + string entryName = "NuclearTerror"; + ModProgression.TryGetValue(entryName, out float order); int type = NPCType(); - int summon = ItemType(); - string instructions = $"Spawns during Acid Rain after Polterghast has been defeated.\nStart Acid Rain with a [i:{summon}]"; - string despawn = CalamityUtils.ColorMessage("The radioactive aberration fades away in a sickly light.", new Color(0xF0, 0xE6, 0x8C)); - AddMiniBoss(bossChecklist, calamity, "Nuclear Terror", order, type, DownedNuclearTerror, null, null, instructions, despawn, () => true); + List collection = new List() { ItemType(), ItemType() }; + AddMiniBoss(bossChecklist, calamity, entryName, order, type, DownedNuclearTerror, new Dictionary() + { + ["spawnItems"] = ItemType(), + ["collectibles"] = collection, + ["availability"] = DownedAcidRainHardmode + }); } // Old Duke { - BossDifficulty.TryGetValue("OldDuke", out float order); - List bosses = new List() { NPCType() }; - int summon = ItemType(); - List collection = new List() { ItemType(), ItemType(), ItemType(), ItemType() }; - string instructions = $"Defeat the Acid Rain event post-Polterghast or fish using a [i:{summon}] in the Sulphurous Sea"; - string despawn = CalamityUtils.ColorMessage("The old duke retreats further into the acidic downpour.", new Color(0xF0, 0xE6, 0x8C)); - AddBoss(bossChecklist, calamity, "Old Duke", order, bosses, DownedBoomerDuke, summon, collection, instructions, despawn, () => true); + string entryName = "OldDuke"; + ModProgression.TryGetValue(entryName, out float order); + int type = NPCType(); + List collection = new List() { ItemType(), ItemType(), ItemType(), ItemType(), ItemType() }; + AddBoss(bossChecklist, calamity, entryName, order, type, DownedBoomerDuke, new Dictionary() + { + ["spawnItems"] = ItemType(), + ["collectibles"] = collection + }); } // Devourer of Gods { - BossDifficulty.TryGetValue("DevourerOfGods", out float order); + string entryName = "DevourerofGods"; + 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}]"; - string despawn = CalamityUtils.ColorMessage("The Devourer of Gods haughtily returns to the depths of the Distortion.", new Color(0x00, 0xFF, 0xFF)); - string bossHeadTex = "CalamityMod/NPCs/DevourerofGods/DevourerofGodsHead_Head_Boss"; + List collection = new List() { ItemType(), ItemType(), ItemType(), ItemType(), ItemType() }; Action portrait = (SpriteBatch sb, Rectangle rect, Color color) => { Texture2D texture = ModContent.Request("CalamityMod/NPCs/DevourerofGods/DevourerofGods_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, "Devourer of Gods", order, type, DownedDoG, summon, collection, instructions, despawn, () => true, portrait, bossHeadTex); + AddBoss(bossChecklist, calamity, entryName, order, type, DownedDoG, new Dictionary() + { + ["spawnItems"] = ItemType(), + ["collectibles"] = collection, + ["customPortrait"] = portrait, + ["overrideHeadTextures"] = "CalamityMod/NPCs/DevourerofGods/DevourerofGodsHead_Head_Boss" + }); } // Yharon { - BossDifficulty.TryGetValue("Yharon", out float order); + string entryName = "Yharon"; + ModProgression.TryGetValue(entryName, out float order); int type = NPCType(); - int summon = ItemType(); - List collection = new List() { ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType() }; - string instructions = $"Use a [i:{summon}]"; - string despawn = CalamityUtils.ColorMessage("Yharon soars out of sight, his task fulfilled.", new Color(0xFF, 0xA5, 0x00)); - string bossLogTex = "CalamityMod/NPCs/Yharon/Yharon_Head_Boss"; - AddBoss(bossChecklist, calamity, "Yharon", order, type, DownedYharon, summon, collection, instructions, despawn, () => true, null, bossLogTex); + List collection = new List() { ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType() }; + AddBoss(bossChecklist, calamity, entryName, order, type, DownedYharon, new Dictionary() + { + ["spawnItems"] = ItemType(), + ["collectibles"] = collection + }); } // Exo Mechs @@ -783,12 +802,10 @@ namespace CalamityMod // Instructions require edits // Despawn requires edits { - BossDifficulty.TryGetValue("ExoMechs", out float order); + string entryName = "ExoMechs"; + ModProgression.TryGetValue(entryName, out float order); List bosses = new List() { NPCType(), NPCType(), NPCType(), NPCType() }; - List collection = new List() { ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType() }; - string instructions = "By using a high-tech computer"; - string despawn = CalamityUtils.ColorMessage("An imperfection after all… what a shame.", new Color(0x7F, 0xFF, 0xD4)); - + List collection = new List() { ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType() }; Action portrait = (SpriteBatch sb, Rectangle rect, Color color) => { Texture2D texture = Request("CalamityMod/NPCs/ExoMechs/ExoMechs_BossChecklist").Value; float scale = 0.7f; @@ -796,22 +813,26 @@ namespace CalamityMod sb.Draw(texture, centered, null, color, 0f, Vector2.Zero, scale, SpriteEffects.None, 0f); }; - AddBoss(bossChecklist, calamity, "Exo Mechs", order, bosses, DownedExoMechs, null, collection, instructions, despawn, () => true, portrait); + AddBoss(bossChecklist, calamity, entryName, order, bosses, DownedExoMechs, new Dictionary() + { + ["collectibles"] = collection, + ["customPortrait"] = portrait + }); } // Calamitas { - BossDifficulty.TryGetValue("Calamitas", out float order); + string entryName = "Calamitas"; + ModProgression.TryGetValue(entryName, out float order); int type = NPCType(); - int summon1 = ItemType(); - int summon2 = ItemType(); - int altar = ItemType(); - List summons = new List() { summon1, summon2 }; - List collection = new List() { ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType() }; - string instructions = $"Use [i:{summon1}] or a [i:{summon2}] as offering at an [i:{altar}]"; - string despawn = CalamityUtils.ColorMessage("Please don't waste my time.", new Color(0xFF, 0xA5, 0x00)); - string bossHeadTex = "CalamityMod/NPCs/SupremeCalamitas/HoodedHeadIcon"; - AddBoss(bossChecklist, calamity, "Supreme Witch, Calamitas", order, type, DownedSCal, summons, collection, instructions, despawn, () => true, null, bossHeadTex); + List summons = new List() { ItemType(), ItemType() }; + List collection = new List() { ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType() }; + AddBoss(bossChecklist, calamity, entryName, order, type, DownedSCal, new Dictionary() + { + ["spawnItems"] = summons, + ["collectibles"] = collection, + ["overrideHeadTextures"] = "CalamityMod/NPCs/SupremeCalamitas/HoodedHeadIcon" + }); } } @@ -819,241 +840,118 @@ namespace CalamityMod { // Initial Acid Rain { - InvasionDifficulty.TryGetValue("Acid Rain Initial", out float order); + string entryName = "AcidRainT1"; + ModProgression.TryGetValue(entryName, out float order); List enemies = AcidRainEvent.PossibleEnemiesPreHM.Select(enemy => enemy.Key).ToList(); - int summon = ItemType(); - List collection = new List() { ItemType() }; - string instructions = $"Use a [i:{summon}] or wait for the invasion to occur naturally after the Eye of Cthulhu is defeated."; - string iconTexture = "CalamityMod/UI/MiscTextures/AcidRainIcon"; Action portrait = (SpriteBatch sb, Rectangle rect, Color color) => { Texture2D texture = ModContent.Request("CalamityMod/Events/AcidRainT1_BossChecklist").Value; - float scale = 1.3f; + float scale = 1f; Vector2 centered = new Vector2(rect.Center.X - texture.Width * scale / 2, rect.Center.Y - texture.Height * scale / 2); sb.Draw(texture, centered, null, color, 0f, Vector2.Zero, scale, SpriteEffects.None, 0f); }; - AddInvasion(bossChecklist, calamity, "Acid Rain", order, enemies, DownedAcidRainInitial, summon, collection, instructions, () => true, portrait, iconTexture); + AddInvasion(bossChecklist, calamity, entryName, order, enemies, DownedAcidRainInitial, new Dictionary() + { + ["spawnItems"] = ItemType(), + ["collectibles"] = ItemType(), + ["customPortrait"] = portrait, + ["overrideHeadTextures"] = "CalamityMod/UI/MiscTextures/AcidRainIcon" + }); } // Post-Aquatic Scourge Acid Rain { - InvasionDifficulty.TryGetValue("Acid Rain Aquatic Scourge", out float order); + string entryName = "AcidRainT2"; + ModProgression.TryGetValue(entryName, out float order); List enemies = AcidRainEvent.PossibleEnemiesAS.Select(enemy => enemy.Key).ToList(); enemies.Add(ModContent.NPCType()); enemies.AddRange(AcidRainEvent.PossibleMinibossesAS.Select(miniboss => miniboss.Key)); - List summons = new List() { ItemType() }; - List collection = new List() { ItemType() }; - string instructions = $"Use a [i:{ItemType()}] or wait for the invasion to occur naturally after the Aquatic Scourge is defeated"; - string iconTexture = "CalamityMod/UI/MiscTextures/AcidRainIcon"; + List collection = new List() { ItemType(), ItemType(), ItemType()}; Action portrait = (SpriteBatch sb, Rectangle rect, Color color) => { Texture2D texture = ModContent.Request("CalamityMod/Events/AcidRainT2_BossChecklist").Value; float scale = 0.9f; Vector2 centered = new Vector2(rect.Center.X - texture.Width * scale / 2, rect.Center.Y - texture.Height * scale / 2); sb.Draw(texture, centered, null, color, 0f, Vector2.Zero, scale, SpriteEffects.None, 0f); }; - AddInvasion(bossChecklist, calamity, "Acid Rain (Post-AS)", order, enemies, DownedAcidRainHardmode, summons, collection, instructions, () => true, portrait, iconTexture); + AddInvasion(bossChecklist, calamity, entryName, order, enemies, DownedAcidRainHardmode, new Dictionary() + { + ["spawnItems"] = ItemType(), + ["collectibles"] = collection, + ["customPortrait"] = portrait, + ["overrideHeadTextures"] = "CalamityMod/UI/MiscTextures/AcidRainIcon", + ["availability"] = DownedAcidRainInitial + }); } // Post-Polterghast Acid Rain { - InvasionDifficulty.TryGetValue("Acid Rain Polterghast", out float order); + string entryName = "AcidRainT3"; + ModProgression.TryGetValue(entryName, out float order); List enemies = AcidRainEvent.PossibleEnemiesPolter.Select(enemy => enemy.Key).ToList(); enemies.AddRange(AcidRainEvent.PossibleMinibossesPolter.Select(miniboss => miniboss.Key)); - List summons = new List() { ItemType() }; - List collection = new List() { ItemType() }; - string instructions = $"Use a [i:{ItemType()}] or wait for the invasion to occur naturally after the Polterghast is defeated"; - string iconTexture = "CalamityMod/UI/MiscTextures/AcidRainIcon"; + List collection = new List() { ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType()}; Action portrait = (SpriteBatch sb, Rectangle rect, Color color) => { Texture2D texture = ModContent.Request("CalamityMod/Events/AcidRainT3_BossChecklist").Value; float scale = 0.9f; Vector2 centered = new Vector2(rect.Center.X - texture.Width * scale / 2, rect.Center.Y - texture.Height * scale / 2); sb.Draw(texture, centered, null, color, 0f, Vector2.Zero, scale, SpriteEffects.None, 0f); }; - AddInvasion(bossChecklist, calamity, "Acid Rain (Post-Polter)", order, enemies, DownedBoomerDuke, summons, collection, instructions, () => true, portrait, iconTexture); + AddInvasion(bossChecklist, calamity, entryName, order, enemies, DownedBoomerDuke, new Dictionary() + { + ["spawnItems"] = ItemType(), + ["collectibles"] = collection, + ["customPortrait"] = portrait, + ["overrideHeadTextures"] = "CalamityMod/UI/MiscTextures/AcidRainIcon", + ["availability"] = DownedAcidRainHardmode + }); } // Boss Rush { - InvasionDifficulty.TryGetValue("Boss Rush", out float order); - List enemies = new List() { 0 }; // This is for loot purposes, which no bosses give during the event - List summons = new List() { ItemType() }; - List collection = new List() { ItemType() }; - string instructions = $"Use a [i:{ItemType()}] found at the bottom of the Abyss"; - string iconTexture = "CalamityMod/UI/MiscTextures/BossRushIcon"; + string entryName = "BossRush"; + ModProgression.TryGetValue(entryName, out float order); + List enemies = new List() { NPCID.None }; // This is for loot purposes, which no bosses give during the event Action portrait = (SpriteBatch sb, Rectangle rect, Color color) => { Texture2D texture = ModContent.Request("CalamityMod/Skies/XerocEye").Value; float scale = 0.5f; Vector2 centered = new Vector2(rect.Center.X - texture.Width * scale / 2, rect.Center.Y - texture.Height * scale / 2); sb.Draw(texture, centered, null, color, 0f, Vector2.Zero, scale, SpriteEffects.None, 0f); }; - AddInvasion(bossChecklist, calamity, "Boss Rush", order, enemies, DownedBossRush, summons, collection, instructions, () => true, portrait, iconTexture); + AddInvasion(bossChecklist, calamity, entryName, order, enemies, DownedBossRush, new Dictionary() + { + ["spawnItems"] = ItemType(), + ["collectibles"] = ItemType(), + ["customPortrait"] = portrait, + ["overrideHeadTextures"] = "CalamityMod/UI/MiscTextures/BossRushIcon" + }); } } - private static void AddCalamityBossLoot(Mod bossChecklist) + private static void RegisterCalamityExtraInfo(Mod bossChecklist, Mod calamity) { - // King Slime - AddLoot(bossChecklist, "KingSlime", - new List() { ItemType() }, - new List() { ItemType(), ItemType() } - ); + bossChecklist.Call("SubmitEntrySpawnItems", calamity, new Dictionary() + { + { "Terraria Plantera", ItemType() }, + { "Terraria Golem", ItemType() }, + { "Terraria CultistBoss", ItemType() } + }); - // Eye of Cthulhu - AddLoot(bossChecklist, "EyeofCthulhu", - new List() { ItemType(), ItemType() }, - new List() { ItemType(), ItemType() } - ); - - // Eater of Worlds - AddLoot(bossChecklist, "EaterofWorldsHead", - null, - new List() { ItemType(), ItemType(), ItemType() } - ); - - // Brain of Cthulhu - AddLoot(bossChecklist, "BrainofCthulhu", - null, - new List() { ItemType(), ItemType(), ItemType() } - ); - - // Queen Bee - AddLoot(bossChecklist, "QueenBee", - new List() { ItemType(), ItemID.Stinger, ItemType() }, - new List() { ItemType(), ItemType() } - ); - - // Skeletron - AddLoot(bossChecklist, "SkeletronHead", - null, - new List() { ItemType(), ItemType() } - ); - - // Wall of Flesh - AddLoot(bossChecklist, "WallofFlesh", - new List() { ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemID.CorruptionKey, ItemID.CrimsonKey }, - new List() { ItemType(), ItemType(), ItemType(), ItemType() } - ); - - // Queen Slime - AddLoot(bossChecklist, "QueenSlime", - new List() { ItemID.HallowedKey }, - new List() { ItemType(), ItemType() } - ); - - // The Twins - AddLoot(bossChecklist, "TheTwins", - new List() { ItemType() }, - new List() { ItemType(), ItemType(), ItemType() } - ); - - // The Destroyer - AddLoot(bossChecklist, "TheDestroyer", - new List() { ItemType(), ItemType(), ItemType() } - ); - - // Skeletron Prime - AddLoot(bossChecklist, "SkeletronPrime", - null, - new List() { ItemType(), ItemType(), ItemType() } - ); - - // Plantera - AddLoot(bossChecklist, "Plantera", - new List() { ItemType(), ItemType(), ItemType(), ItemID.JungleKey }, - new List() { ItemType(), ItemType() } - ); - AddSummons(bossChecklist, "Plantera", new List() { ItemType() }); - - // Golem - AddLoot(bossChecklist, "Golem", - new List() { ItemType(), ItemType() }, - new List() { ItemType(), ItemType() } - ); - AddSummons(bossChecklist, "Golem", new List() { ItemType() }); - - // Empress of Light - AddLoot(bossChecklist, "HallowBoss", - null, - new List() { ItemType(), ItemType() } - ); - - // Duke Fishron - AddLoot(bossChecklist, "DukeFishron", - new List() { ItemType(), ItemType() }, - new List() { ItemType(), ItemType() } - ); - - // Betsy - AddLoot(bossChecklist, "DD2Betsy", - null, - null - ); - - // Lunatic Cultist - AddLoot(bossChecklist, "CultistBoss", - null, - new List() { ItemType(), ItemType() } - ); - AddSummons(bossChecklist, "CultistBoss", new List() { ItemType() }); - - // Moon Lord - AddLoot(bossChecklist, "MoonLord", - new List() { ItemType(), ItemType() }, - new List() { ItemType(), ItemType() } - ); - } - - private static void AddCalamityEventLoot(Mod bossChecklist) - { - // Blood Moon - AddLoot(bossChecklist, "Blood Moon", - new List() { ItemType(), ItemType() }, - null - ); - - // Goblin Army - AddLoot(bossChecklist, "Goblin Army", - 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() }, - 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 - ); + bossChecklist.Call("SubmitEntryCollectibles", calamity, new Dictionary() + { + { "Terraria KingSlime", new List() { ItemType(), ItemType() } }, + { "Terraria EyeofCthulhu", new List() { ItemType(), ItemType() } }, + { "Terraria EaterofWorldsHead", new List() { ItemType(), ItemType(), ItemType() } }, + { "Terraria BrainofCthulhu", new List() { ItemType(), ItemType(), ItemType() } }, + { "Terraria QueenBee", new List() { ItemType(), ItemType() } }, + { "Terraria SkeletronHead", new List() { ItemType(), ItemType() } }, + { "Terraria WallofFlesh", new List() { ItemType(), ItemType(), ItemType(), ItemType() } }, + { "Terraria QueenSlimeBoss", new List() { ItemType(), ItemType() } }, + { "Terraria TheTwins", new List() { ItemType(), ItemType(), ItemType() } }, + { "Terraria TheDestroyer", new List() { ItemType(), ItemType(), ItemType() } }, + { "Terraria SkeletronPrime", new List() { ItemType(), ItemType(), ItemType() } }, + { "Terraria Plantera", new List() { ItemType(), ItemType() } }, + { "Terraria Golem", new List() { ItemType(), ItemType() } }, + { "Terraria HallowBoss", new List() { ItemType(), ItemType() } }, + { "Terraria DukeFishron", new List() { ItemType(), ItemType() } }, + { "Terraria CultistBoss", new List() { ItemType(), ItemType() } }, + { "Terraria MoonLord", new List() { ItemType(), ItemType() } } + }); } private static void FargosSupport() @@ -1064,7 +962,7 @@ namespace CalamityMod void AddToMutantShop(string bossName, string summonItemName, Func downed, int price) { - BossDifficulty.TryGetValue(bossName, out float order); + ModProgression.TryGetValue(bossName, out float order); fargos.Call("AddSummon", order, "CalamityMod", summonItemName, downed, price); } @@ -1073,19 +971,6 @@ namespace CalamityMod AddToMutantShop("OldDuke", "BloodwormItem", DownedBoomerDuke, Item.buyPrice(platinum: 2)); } - private static void CensusSupport() - { - Mod censusMod = GetInstance().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"); - censusMod.Call("TownNPCCondition", NPCType(), "Defeat Supreme Witch, Calamitas"); - } - } - private static void DialogueTweakSupport() { Mod dialogueMod = GetInstance().dialogueTweak; diff --git a/NPCs/CalamityGlobalAI.cs b/NPCs/CalamityGlobalAI.cs index 77f0a9f8a6..608431455e 100644 --- a/NPCs/CalamityGlobalAI.cs +++ b/NPCs/CalamityGlobalAI.cs @@ -11252,194 +11252,5 @@ namespace CalamityMod.NPCs #endregion #endregion - - #region DD2 Event AIs - public static int DD2EventEnemySpawnRate - { - get - { - int enemySpawnRateSpeedup = 0; - if (Main.npc.IndexInRange(CalamityGlobalNPC.DD2CrystalIndex) && Main.npc[CalamityGlobalNPC.DD2CrystalIndex].active) - enemySpawnRateSpeedup = (int)Main.npc[CalamityGlobalNPC.DD2CrystalIndex].ai[2]; - return Utils.Clamp(DD2Event.LaneSpawnRate - enemySpawnRateSpeedup, 15, DD2Event.LaneSpawnRate); - } - } - - public static void DD2PortalAI(NPC npc) - { - // Idly emit light if the portal has completely faded in. - if (npc.alpha == 0) - Lighting.AddLight(npc.Center, 0.5f, 0.1f, 0.3f); - - ref float enemySpawnTimer = ref npc.ai[0]; - ref float fadeOutTimer = ref npc.ai[2]; - ref float fadeInTimer = ref npc.localAI[0]; - ref float idlePlaySoundId = ref npc.localAI[3]; - if (npc.ai[1] == 0f) - { - // Play the portal opening sound at the moment of the portal's creation. - if (fadeInTimer == 0f) - { - SoundEngine.PlaySound(SoundID.DD2_EtherianPortalOpen, npc.Center); - idlePlaySoundId = SlotId.Invalid.ToFloat(); - } - - ActiveSound soundOut; - if (fadeInTimer > 150f && !SoundEngine.TryGetActiveSound(SlotId.FromFloat(idlePlaySoundId), out soundOut)) - idlePlaySoundId = SoundEngine.PlaySound(SoundID.DD2_EtherianPortalIdleLoop, npc.Center).ToFloat(); - - if (!DD2Event.EnemySpawningIsOnHold) - enemySpawnTimer++; - - if (enemySpawnTimer >= DD2EventEnemySpawnRate) - { - if (enemySpawnTimer >= DD2EventEnemySpawnRate * 3) - enemySpawnTimer = 0f; - - if (Main.netMode != NetmodeID.MultiplayerClient && (int)enemySpawnTimer % DD2EventEnemySpawnRate == 0) - { - DD2Event.SpawnMonsterFromGate(npc.Bottom); - - // If enemy spawning is on hold, add 1 to the spawn timer to ensure that the above - // modulo doesn't get activated every single frame due to no other change above. - if (DD2Event.EnemySpawningIsOnHold) - enemySpawnTimer++; - } - npc.netUpdate = true; - } - - fadeInTimer++; - - // Begin to fade out of existence if the crystal is gone and the portal is done doing fade-in effects. - if (Main.netMode != NetmodeID.MultiplayerClient && !NPC.AnyNPCs(NPCID.DD2EterniaCrystal) && fadeInTimer >= 180f) - { - npc.ai[1] = 1f; - enemySpawnTimer = 0f; - npc.dontTakeDamage = true; - npc.netUpdate = true; - } - } - - // Fade-out effects. - else if (npc.ai[1] == 1f) - { - fadeOutTimer++; - npc.scale = MathHelper.Lerp(1f, 0.05f, Utils.GetLerpValue(500f, 600f, fadeOutTimer, true)); - - // Reset the idle play sound if it didn't get activated before for some reason. - ActiveSound result; - if (!SoundEngine.TryGetActiveSound(SlotId.FromFloat(idlePlaySoundId), out result)) - idlePlaySoundId = SoundEngine.PlaySound(SoundID.DD2_EtherianPortalIdleLoop, npc.Center).ToFloat(); - - ActiveSound activeSound; - if (SoundEngine.TryGetActiveSound(SlotId.FromFloat(idlePlaySoundId), out activeSound)) - activeSound.Volume = npc.scale; - - // Kill the portal after enough time has passed. - if (fadeOutTimer >= 550f) - { - npc.dontTakeDamage = false; - npc.life = 0; - npc.checkDead(); - npc.netUpdate = true; - if (activeSound != null) - { - activeSound.Stop(); - return; - } - } - } - } - - public static void DD2CrystalExtraAI(NPC npc) - { - CalamityGlobalNPC.DD2CrystalIndex = npc.whoAmI; - - ref float initialClickDelay = ref npc.localAI[3]; - ref float enemySpawnRateSpeedup = ref npc.ai[2]; - ref float animationCountdown = ref npc.ai[3]; - - if (animationCountdown > 0f) - animationCountdown--; - - // This is done to ensure that the initial click on the pedestal is not registered as a click to the crystal itself. - initialClickDelay++; - - bool clickingOnCrystal = Main.mouseRight && Main.mouseRightRelease && CalamityUtils.MouseHitbox.Intersects(npc.Hitbox) && initialClickDelay > 25f; - - // Reset the spawn rate speed-up after the wave is over. - if (Main.netMode != NetmodeID.MultiplayerClient && DD2Event.TimeLeftBetweenWaves > 1 && enemySpawnRateSpeedup != 0f) - { - enemySpawnRateSpeedup = 0f; - npc.netUpdate = true; - } - - if (clickingOnCrystal && npc.WithinRange(Main.LocalPlayer.Center, 285f)) - { - bool changeOccured = false; - - // If the event is waiting for time to pass and a player clicks on the crystal skip the wait. - if (DD2Event.TimeLeftBetweenWaves > 1) - { - DD2Event.TimeLeftBetweenWaves = 1; - if (Main.netMode == NetmodeID.Server) - NetMessage.SendData(MessageID.CrystalInvasionSendWaitTime, -1, -1, null, DD2Event.TimeLeftBetweenWaves); - changeOccured = true; - } - - // Otherwise speed up the portal spawn rate for this wave. - else - { - if (Main.netMode != NetmodeID.MultiplayerClient) - { - int oldSpawnRate = DD2EventEnemySpawnRate; - enemySpawnRateSpeedup += 8f; - - // Release a circle of dust if a change was made to show that changes are indeed being done - // since the animation might be ongoing when this action is performed. - if (!Main.dedServ && oldSpawnRate != DD2EventEnemySpawnRate) - { - for (int i = 0; i < 55; i++) - { - for (float speed = 6f; speed < 13f; speed += 4f) - { - Vector2 shootDirection = (MathHelper.TwoPi * i / 55f).ToRotationVector2() * new Vector2(1f, 0.6f); - Dust etherealLight = Dust.NewDustPerfect(npc.Center - Vector2.UnitY * 20f + shootDirection * 12f, 264); - etherealLight.velocity = shootDirection * speed; - etherealLight.fadeIn = 0f; - etherealLight.scale = 2.3f; - etherealLight.noGravity = true; - etherealLight.noLight = true; - } - } - changeOccured = true; - } - npc.netUpdate = true; - } - } - - // Play an animation to accompany the change. - if (changeOccured) - { - if (animationCountdown <= 0f) - animationCountdown = 120f; - SoundEngine.PlaySound(SoundID.DD2_DarkMageHealImpact); - } - - // As well as some indicator text. - if (changeOccured) - { - bool dramaticText = DD2EventEnemySpawnRate <= 25; - Color textColor = dramaticText ? Color.DeepPink : Color.Pink; - string[] potentialTexts = new string[] - { - "The invasion hastens!", - "The ethereal invaders march ever-faster!" - }; - CombatText.NewText(npc.Hitbox, textColor, Main.rand.Next(potentialTexts), dramaticText); - } - } - } - #endregion DD2 Event AIs } } diff --git a/NPCs/CalamityGlobalNPC.cs b/NPCs/CalamityGlobalNPC.cs index c86ce178da..6ee9179c09 100644 --- a/NPCs/CalamityGlobalNPC.cs +++ b/NPCs/CalamityGlobalNPC.cs @@ -255,7 +255,6 @@ namespace CalamityMod.NPCs // whoAmI Variables public static int[] bobbitWormBottom = new int[5]; - public static int DD2CrystalIndex = -1; public static int hiveMind = -1; public static int perfHive = -1; public static int slimeGodPurple = -1; @@ -498,7 +497,6 @@ namespace CalamityMod.NPCs for (int i = 0; i < bobbitWormBottom.Length; i++) ResetSavedIndex(ref bobbitWormBottom[i], NPCType()); - ResetSavedIndex(ref DD2CrystalIndex, NPCID.DD2EterniaCrystal); ResetSavedIndex(ref hiveMind, NPCType()); ResetSavedIndex(ref perfHive, NPCType()); ResetSavedIndex(ref slimeGodPurple, NPCType(), NPCType()); @@ -3784,12 +3782,6 @@ namespace CalamityMod.NPCs } } - if (npc.type == NPCID.DD2LanePortal) - { - CalamityGlobalAI.DD2PortalAI(npc); - return false; - } - return true; } #endregion @@ -4310,9 +4302,6 @@ namespace CalamityMod.NPCs if (pearlAura > 0) npc.velocity *= 0.9f; } - - if (npc.type == NPCID.DD2EterniaCrystal) - CalamityGlobalAI.DD2CrystalExtraAI(npc); } #endregion diff --git a/NPCs/Providence/Providence.cs b/NPCs/Providence/Providence.cs index 942d852cd2..44fc7e7764 100644 --- a/NPCs/Providence/Providence.cs +++ b/NPCs/Providence/Providence.cs @@ -535,10 +535,10 @@ namespace CalamityMod.NPCs.Providence DoDeathAnimation(); return; } - // Trigger the death animation - else if (NPC.life == 1) + else if (NPC.life <= 1) { + NPC.life = 1; DespawnSpecificProjectiles(true); Dying = true; NPC.dontTakeDamage = true; @@ -1844,7 +1844,10 @@ namespace CalamityMod.NPCs.Providence { return false; } - + public override bool CheckDead() + { + return false; + } public override void OnKill() { CalamityGlobalNPC.SetNewBossJustDowned(NPC); diff --git a/Projectiles/Enemy/CragmawVibeCheckChain.cs b/Projectiles/Enemy/CragmawVibeCheckChain.cs index dca8f89914..4b931db4f5 100644 --- a/Projectiles/Enemy/CragmawVibeCheckChain.cs +++ b/Projectiles/Enemy/CragmawVibeCheckChain.cs @@ -59,7 +59,7 @@ namespace CalamityMod.Projectiles.Enemy { if (Main.zenithWorld) { - CombatText.NewText(Main.player[toTarget].getRect(), Color.Red, "Vibe check.", true); + CombatText.NewText(Main.player[toTarget].getRect(), Color.Red, CalamityUtils.GetTextValue("Misc.CragmawVibeCheck"), true); } Projectile.localAI[0] = 1f; ReelingPlayer = true; diff --git a/Projectiles/Melee/ArkOfTheAncients_ParryHoldout.cs b/Projectiles/Melee/ArkOfTheAncients_ParryHoldout.cs index b1613daefd..0c71f4b17a 100644 --- a/Projectiles/Melee/ArkOfTheAncients_ParryHoldout.cs +++ b/Projectiles/Melee/ArkOfTheAncients_ParryHoldout.cs @@ -26,9 +26,6 @@ namespace CalamityMod.Projectiles.Melee public ref float AlreadyParried => ref Projectile.ai[1]; public Player Owner => Main.player[Projectile.owner]; - public override void SetStaticDefaults() - { - } public override void SetDefaults() { Projectile.DamageType = DamageClass.MeleeNoSpeed; @@ -57,7 +54,7 @@ namespace CalamityMod.Projectiles.Melee SoundEngine.PlaySound(SoundID.DD2_WitherBeastCrystalImpact); SoundEngine.PlaySound(SoundID.Item67); - CombatText.NewText(Projectile.Hitbox, new Color(111, 247, 200), "Parry!", true); + CombatText.NewText(Projectile.Hitbox, new Color(111, 247, 200), CalamityUtils.GetTextValue("Misc.ArkParry"), true); AlreadyParried = 1f; } public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) diff --git a/Projectiles/Melee/ArkOfTheCosmos_ParryHoldout.cs b/Projectiles/Melee/ArkOfTheCosmos_ParryHoldout.cs index 0a799138db..ca7aac86d1 100644 --- a/Projectiles/Melee/ArkOfTheCosmos_ParryHoldout.cs +++ b/Projectiles/Melee/ArkOfTheCosmos_ParryHoldout.cs @@ -30,9 +30,6 @@ namespace CalamityMod.Projectiles.Melee public ref float AlreadyParried => ref Projectile.ai[1]; public Player Owner => Main.player[Projectile.owner]; - public override void SetStaticDefaults() - { - } public override void SetDefaults() { Projectile.DamageType = DamageClass.MeleeNoSpeed; @@ -64,7 +61,7 @@ namespace CalamityMod.Projectiles.Melee SoundEngine.PlaySound(SoundID.DD2_WitherBeastCrystalImpact); SoundEngine.PlaySound(CommonCalamitySounds.ScissorGuillotineSnapSound with { Volume = CommonCalamitySounds.ScissorGuillotineSnapSound.Volume * 1.3f }, Projectile.Center); - CombatText.NewText(Projectile.Hitbox, new Color(111, 247, 200), "Parry!", true); + CombatText.NewText(Projectile.Hitbox, new Color(111, 247, 200), CalamityUtils.GetTextValue("Misc.ArkParry"), true); for (int i = 0; i < 5; i ++) //Don't loose your way { diff --git a/Projectiles/Melee/ArkOfTheElements_ParryHoldout.cs b/Projectiles/Melee/ArkOfTheElements_ParryHoldout.cs index c1fed8d70a..09420a0796 100644 --- a/Projectiles/Melee/ArkOfTheElements_ParryHoldout.cs +++ b/Projectiles/Melee/ArkOfTheElements_ParryHoldout.cs @@ -29,9 +29,6 @@ namespace CalamityMod.Projectiles.Melee public ref float AlreadyParried => ref Projectile.ai[1]; public Player Owner => Main.player[Projectile.owner]; - public override void SetStaticDefaults() - { - } public override void SetDefaults() { Projectile.DamageType = DamageClass.MeleeNoSpeed; @@ -62,7 +59,7 @@ namespace CalamityMod.Projectiles.Melee } SoundEngine.PlaySound(SoundID.DD2_WitherBeastCrystalImpact); SoundEngine.PlaySound(CommonCalamitySounds.ScissorGuillotineSnapSound with { Volume = CommonCalamitySounds.ScissorGuillotineSnapSound.Volume * 1.3f }, Projectile.Center); - CombatText.NewText(Projectile.Hitbox, new Color(111, 247, 200), "Parry!", true); + CombatText.NewText(Projectile.Hitbox, new Color(111, 247, 200), CalamityUtils.GetTextValue("Misc.ArkParry"), true); for (int i = 0; i < 5; i ++) //Don't loose your way { diff --git a/Projectiles/Melee/TrueArkOfTheAncients_ParryHoldout.cs b/Projectiles/Melee/TrueArkOfTheAncients_ParryHoldout.cs index 4df0d9d744..7c908cca5c 100644 --- a/Projectiles/Melee/TrueArkOfTheAncients_ParryHoldout.cs +++ b/Projectiles/Melee/TrueArkOfTheAncients_ParryHoldout.cs @@ -26,9 +26,6 @@ namespace CalamityMod.Projectiles.Melee public ref float AlreadyParried => ref Projectile.ai[1]; public Player Owner => Main.player[Projectile.owner]; - public override void SetStaticDefaults() - { - } public override void SetDefaults() { Projectile.DamageType = DamageClass.MeleeNoSpeed; @@ -56,7 +53,7 @@ namespace CalamityMod.Projectiles.Melee sword.Charge = 10f; SoundEngine.PlaySound(SoundID.DD2_WitherBeastCrystalImpact); SoundEngine.PlaySound(SoundID.Item67); - CombatText.NewText(Projectile.Hitbox, new Color(111, 247, 200), "Parry!", true); + CombatText.NewText(Projectile.Hitbox, new Color(111, 247, 200), CalamityUtils.GetTextValue("Misc.ArkParry"), true); AlreadyParried = 1f; } diff --git a/Projectiles/Ranged/ClockworkBowHoldout.cs b/Projectiles/Ranged/ClockworkBowHoldout.cs index d0144325e4..3846715f27 100644 --- a/Projectiles/Ranged/ClockworkBowHoldout.cs +++ b/Projectiles/Ranged/ClockworkBowHoldout.cs @@ -94,9 +94,9 @@ namespace CalamityMod.Projectiles.Ranged ++LoadedBolts; if (LoadedBolts % 2 == 0) - CombatText.NewText(Owner.Hitbox, new Color(155, 255, 255), "Tock", true); + CombatText.NewText(Owner.Hitbox, new Color(155, 255, 255), CalamityUtils.GetTextValue("Misc.ClockworkTock"), true); else - CombatText.NewText(Owner.Hitbox, new Color(255, 200, 100), "Tick", true); + CombatText.NewText(Owner.Hitbox, new Color(255, 200, 100), CalamityUtils.GetTextValue("Misc.ClockworkTick"), true); FramesToLoadBolt *= 0.950f; diff --git a/Projectiles/Ranged/SevensStrikerHoldout.cs b/Projectiles/Ranged/SevensStrikerHoldout.cs index 2a1ffa2198..081da2d4f0 100644 --- a/Projectiles/Ranged/SevensStrikerHoldout.cs +++ b/Projectiles/Ranged/SevensStrikerHoldout.cs @@ -134,7 +134,7 @@ namespace CalamityMod.Projectiles.Ranged if (shottimer == 1) { SoundEngine.PlaySound(TheSevensStriker.JackpotSound, Projectile.Center); - CombatText.NewText(player.getRect(), Color.Gold, "Jackpot!!!", true); + CombatText.NewText(player.getRect(), Color.Gold, CalamityUtils.GetTextValue("Misc.SevensJackpot"), true); } // Every 5 frames, shoot 7 coins. The first 5 frames are excluded for timing purposes if (shottimer % 5 == 0 && shottimer > 5) @@ -164,14 +164,14 @@ namespace CalamityMod.Projectiles.Ranged // A single brick with 100% damage case 1: Shoot(1, ModContent.ProjectileType(), weaponDamage, 0, 2f, 0); - CombatText.NewText(player.getRect(), Color.Gray, "Bust!", true); + CombatText.NewText(player.getRect(), Color.Gray, CalamityUtils.GetTextValue("Misc.SevensBust"), true); SoundEngine.PlaySound(TheSevensStriker.BustSound, Projectile.Center); break; // 7 exploding oranges with 200% damage case 2: int doublesDamage = (int)(weaponDamage * TheSevensStriker.DoublesMultiplier); Shoot(7, ModContent.ProjectileType(), doublesDamage, weaponKnockback, 2f, 0.1f); - CombatText.NewText(player.getRect(), Color.Orange, "Doubles!", true); + CombatText.NewText(player.getRect(), Color.Orange, CalamityUtils.GetTextValue("Misc.SevensDoubles"), true); SoundEngine.PlaySound(TheSevensStriker.DoublesSound, Projectile.Center); break; // 7 piercing grapes with X% damage @@ -181,7 +181,7 @@ namespace CalamityMod.Projectiles.Ranged int grapeDamage = (int)(weaponDamage * TheSevensStriker.TriplesGrapeMultiplier); Shoot(7, ModContent.ProjectileType(), cherryDamage, weaponKnockback, 1.5f, 0.1f); Shoot(7, ModContent.ProjectileType(), grapeDamage, weaponKnockback, 2f, 0.2f); - CombatText.NewText(player.getRect(), Color.Red, "Triples!", true); + CombatText.NewText(player.getRect(), Color.Red, CalamityUtils.GetTextValue("Misc.SevensTriples"), true); SoundEngine.PlaySound(TheSevensStriker.TriplesSound, Projectile.Center); break; } diff --git a/Projectiles/Summon/AtlasMunitionsAutocannonHeld.cs b/Projectiles/Summon/AtlasMunitionsAutocannonHeld.cs index 08272e71ea..6f978ef544 100644 --- a/Projectiles/Summon/AtlasMunitionsAutocannonHeld.cs +++ b/Projectiles/Summon/AtlasMunitionsAutocannonHeld.cs @@ -122,7 +122,7 @@ namespace CalamityMod.Projectiles.Summon Projectile.velocity = new Vector2(Projectile.spriteDirection * 3f, -4f); Projectile.netUpdate = true; if (HeatInterpolant >= 1f) - CombatText.NewText(Owner.Hitbox, Color.OrangeRed, "OUCH! HOT!", true); + CombatText.NewText(Owner.Hitbox, Color.OrangeRed, CalamityUtils.GetTextValue("Misc.AutocannonHot"), true); return; } diff --git a/Projectiles/Summon/Umbrella/MagicHammer.cs b/Projectiles/Summon/Umbrella/MagicHammer.cs index 9d2841e9d1..2f450e6cae 100644 --- a/Projectiles/Summon/Umbrella/MagicHammer.cs +++ b/Projectiles/Summon/Umbrella/MagicHammer.cs @@ -263,7 +263,7 @@ namespace CalamityMod.Projectiles.Summon.Umbrella if ((Behavior == 3f || Behavior == 4f) && Main.rand.NextBool(20) && Projectile.soundDelay <= 0) { Rectangle location = new Rectangle((int)target.position.X, (int)target.position.Y, target.width, target.height); - CombatText.NewText(location, new Color(239, 113, 152), "Stylish!", true); + CombatText.NewText(location, new Color(239, 113, 152), CalamityUtils.GetTextValue("Misc.StylishHammerHit"), true); SoundEngine.PlaySound(StylishSound with { Volume = 0.35f }, target.Center); Projectile.soundDelay = 60; for (int i = 0; i < 5; i++) diff --git a/Tiles/Abyss/AbyssAmbient/AbyssVent.cs b/Tiles/Abyss/AbyssAmbient/AbyssVent.cs index 2c268d0b93..1f6eef7c60 100644 --- a/Tiles/Abyss/AbyssAmbient/AbyssVent.cs +++ b/Tiles/Abyss/AbyssAmbient/AbyssVent.cs @@ -21,7 +21,7 @@ namespace CalamityMod.Tiles.Abyss.AbyssAmbient Main.tileNoAttach[Type] = true; TileObjectData.newTile.CopyFrom(TileObjectData.Style2x2); TileObjectData.addTile(Type); - AddMapEntry(new Color(106, 80, 102), CreateMapEntryName()); + AddMapEntry(new Color(106, 80, 102), CalamityUtils.GetText($"{LocalizationCategory}.AbyssVent.MapEntry")); DustType = 33; base.SetStaticDefaults(); diff --git a/Tiles/Abyss/AbyssAmbient/ThermalVent.cs b/Tiles/Abyss/AbyssAmbient/ThermalVent.cs index c2bc6dfe05..14e185ff67 100644 --- a/Tiles/Abyss/AbyssAmbient/ThermalVent.cs +++ b/Tiles/Abyss/AbyssAmbient/ThermalVent.cs @@ -31,7 +31,7 @@ namespace CalamityMod.Tiles.Abyss.AbyssAmbient TileObjectData.newTile.LavaDeath = true; TileObjectData.newTile.DrawYOffset = 2; TileObjectData.addTile(Type); - AddMapEntry(new Color(132, 56, 42), CreateMapEntryName()); + AddMapEntry(new Color(132, 56, 42), CalamityUtils.GetText($"{LocalizationCategory}.ThermalVent.MapEntry")); DustType = 162; base.SetStaticDefaults(); diff --git a/Tiles/Abyss/SteamGeyser.cs b/Tiles/Abyss/SteamGeyser.cs index 0baf1704d0..994a68b8a8 100644 --- a/Tiles/Abyss/SteamGeyser.cs +++ b/Tiles/Abyss/SteamGeyser.cs @@ -22,7 +22,7 @@ namespace CalamityMod.Tiles.Abyss TileObjectData.newTile.DrawYOffset = 2; TileObjectData.newTile.CopyFrom(TileObjectData.Style2x2); TileObjectData.addTile(Type); - AddMapEntry(new Color(103, 65, 64), CreateMapEntryName()); + AddMapEntry(new Color(103, 65, 64), CalamityUtils.GetText($"{LocalizationCategory}.SteamGeyser.MapEntry")); DustType = (int)CalamityDusts.SulfurousSeaAcid; base.SetStaticDefaults(); diff --git a/Tiles/DraedonSummoner/CodebreakerTile.cs b/Tiles/DraedonSummoner/CodebreakerTile.cs index be256d1fa0..b716315fae 100644 --- a/Tiles/DraedonSummoner/CodebreakerTile.cs +++ b/Tiles/DraedonSummoner/CodebreakerTile.cs @@ -133,7 +133,7 @@ namespace CalamityMod.Tiles.DraedonSummoner { // Create a warning if someone attempts to click on a codebreaker without a computer with which to open the UI. if (!codebreakerTileEntity.ContainsDecryptionComputer) - CombatText.NewText(player.Hitbox, Color.Cyan, "No decryption computer installed"); + CombatText.NewText(player.Hitbox, Color.Cyan, CalamityUtils.GetTextValue("Misc.NoComputer")); CodebreakerUI.ViewedTileEntityID = -1; SoundEngine.PlaySound(SoundID.MenuClose); diff --git a/Utilities/FurnitureSetupUtils.cs b/Utilities/FurnitureSetupUtils.cs index 5cd81bc636..16ff5ce0a5 100644 --- a/Utilities/FurnitureSetupUtils.cs +++ b/Utilities/FurnitureSetupUtils.cs @@ -1145,6 +1145,7 @@ namespace CalamityMod /// Whether this tile is supposed to have a solid top. Defaults to true. internal static void SetUpPiano(this ModTile mt, bool lavaImmune = false, bool solidTop = true) { + Main.tileTable[mt.Type] = solidTop; Main.tileSolidTop[mt.Type] = solidTop; Main.tileLighted[mt.Type] = true; Main.tileFrameImportant[mt.Type] = true;