+
+ {% for mission_name, location_info in missions.items() %}
+
{{mission_name}}
+ {% for location_name, collected in location_info %}
+
{{location_name}}
+ {% endfor %}
+
+
+ {% endfor %}
+
+
+
+
+
+
\ No newline at end of file
diff --git a/WebHostLib/tracker.py b/WebHostLib/tracker.py
index 4b92f4b4..18145dae 100644
--- a/WebHostLib/tracker.py
+++ b/WebHostLib/tracker.py
@@ -1247,1114 +1247,225 @@ if "ChecksFinder" in network_data_package["games"]:
if "Starcraft 2" in network_data_package["games"]:
def render_Starcraft2_tracker(tracker_data: TrackerData, team: int, player: int) -> str:
- SC2WOL_LOC_ID_OFFSET = 1000
- SC2HOTS_LOC_ID_OFFSET = 20000000 # Avoid clashes with The Legend of Zelda
- SC2LOTV_LOC_ID_OFFSET = SC2HOTS_LOC_ID_OFFSET + 2000
- SC2NCO_LOC_ID_OFFSET = SC2LOTV_LOC_ID_OFFSET + 2500
-
SC2WOL_ITEM_ID_OFFSET = 1000
- SC2HOTS_ITEM_ID_OFFSET = SC2WOL_ITEM_ID_OFFSET + 1000
- SC2LOTV_ITEM_ID_OFFSET = SC2HOTS_ITEM_ID_OFFSET + 1000
+ SC2HOTS_ITEM_ID_OFFSET = 2000
+ SC2LOTV_ITEM_ID_OFFSET = 2000
+ SC2_KEY_ITEM_ID_OFFSET = 4000
+ NCO_LOCATION_ID_LOW = 20004500
+ NCO_LOCATION_ID_HIGH = NCO_LOCATION_ID_LOW + 1000
+ STARTING_MINERALS_ITEM_ID = 1800
+ STARTING_VESPENE_ITEM_ID = 1801
+ STARTING_SUPPLY_ITEM_ID = 1802
+ # NOTHING_ITEM_ID = 1803
+ MAX_SUPPLY_ITEM_ID = 1804
+ SHIELD_REGENERATION_ITEM_ID = 1805
+ BUILDING_CONSTRUCTION_SPEED_ITEM_ID = 1806
+ UPGRADE_RESEARCH_SPEED_ITEM_ID = 1807
+ UPGRADE_RESEARCH_COST_ITEM_ID = 1808
+ REDUCED_MAX_SUPPLY_ITEM_ID = 1850
slot_data = tracker_data.get_slot_data(team, player)
- minerals_per_item = slot_data.get("minerals_per_item", 15)
- vespene_per_item = slot_data.get("vespene_per_item", 15)
- starting_supply_per_item = slot_data.get("starting_supply_per_item", 2)
-
- github_icon_base_url = "https://matthewmarinets.github.io/ap_sc2_icons/icons/"
- organics_icon_base_url = "https://0rganics.org/archipelago/sc2wol/"
-
- icons = {
- "Starting Minerals": github_icon_base_url + "blizzard/icon-mineral-nobg.png",
- "Starting Vespene": github_icon_base_url + "blizzard/icon-gas-terran-nobg.png",
- "Starting Supply": github_icon_base_url + "blizzard/icon-supply-terran_nobg.png",
-
- "Terran Infantry Weapons Level 1": github_icon_base_url + "blizzard/btn-upgrade-terran-infantryweaponslevel1.png",
- "Terran Infantry Weapons Level 2": github_icon_base_url + "blizzard/btn-upgrade-terran-infantryweaponslevel2.png",
- "Terran Infantry Weapons Level 3": github_icon_base_url + "blizzard/btn-upgrade-terran-infantryweaponslevel3.png",
- "Terran Infantry Armor Level 1": github_icon_base_url + "blizzard/btn-upgrade-terran-infantryarmorlevel1.png",
- "Terran Infantry Armor Level 2": github_icon_base_url + "blizzard/btn-upgrade-terran-infantryarmorlevel2.png",
- "Terran Infantry Armor Level 3": github_icon_base_url + "blizzard/btn-upgrade-terran-infantryarmorlevel3.png",
- "Terran Vehicle Weapons Level 1": github_icon_base_url + "blizzard/btn-upgrade-terran-vehicleweaponslevel1.png",
- "Terran Vehicle Weapons Level 2": github_icon_base_url + "blizzard/btn-upgrade-terran-vehicleweaponslevel2.png",
- "Terran Vehicle Weapons Level 3": github_icon_base_url + "blizzard/btn-upgrade-terran-vehicleweaponslevel3.png",
- "Terran Vehicle Armor Level 1": github_icon_base_url + "blizzard/btn-upgrade-terran-vehicleplatinglevel1.png",
- "Terran Vehicle Armor Level 2": github_icon_base_url + "blizzard/btn-upgrade-terran-vehicleplatinglevel2.png",
- "Terran Vehicle Armor Level 3": github_icon_base_url + "blizzard/btn-upgrade-terran-vehicleplatinglevel3.png",
- "Terran Ship Weapons Level 1": github_icon_base_url + "blizzard/btn-upgrade-terran-shipweaponslevel1.png",
- "Terran Ship Weapons Level 2": github_icon_base_url + "blizzard/btn-upgrade-terran-shipweaponslevel2.png",
- "Terran Ship Weapons Level 3": github_icon_base_url + "blizzard/btn-upgrade-terran-shipweaponslevel3.png",
- "Terran Ship Armor Level 1": github_icon_base_url + "blizzard/btn-upgrade-terran-shipplatinglevel1.png",
- "Terran Ship Armor Level 2": github_icon_base_url + "blizzard/btn-upgrade-terran-shipplatinglevel2.png",
- "Terran Ship Armor Level 3": github_icon_base_url + "blizzard/btn-upgrade-terran-shipplatinglevel3.png",
-
- "Bunker": "https://static.wikia.nocookie.net/starcraft/images/c/c5/Bunker_SC2_Icon1.jpg",
- "Missile Turret": "https://static.wikia.nocookie.net/starcraft/images/5/5f/MissileTurret_SC2_Icon1.jpg",
- "Sensor Tower": "https://static.wikia.nocookie.net/starcraft/images/d/d2/SensorTower_SC2_Icon1.jpg",
-
- "Projectile Accelerator (Bunker)": github_icon_base_url + "blizzard/btn-upgrade-zerg-stukov-bunkerresearchbundle_05.png",
- "Neosteel Bunker (Bunker)": organics_icon_base_url + "NeosteelBunker.png",
- "Titanium Housing (Missile Turret)": organics_icon_base_url + "TitaniumHousing.png",
- "Hellstorm Batteries (Missile Turret)": github_icon_base_url + "blizzard/btn-ability-stetmann-corruptormissilebarrage.png",
- "Advanced Construction (SCV)": github_icon_base_url + "blizzard/btn-ability-mengsk-trooper-advancedconstruction.png",
- "Dual-Fusion Welders (SCV)": github_icon_base_url + "blizzard/btn-upgrade-swann-scvdoublerepair.png",
- "Hostile Environment Adaptation (SCV)": github_icon_base_url + "blizzard/btn-upgrade-swann-hellarmor.png",
- "Fire-Suppression System Level 1": organics_icon_base_url + "Fire-SuppressionSystem.png",
- "Fire-Suppression System Level 2": github_icon_base_url + "blizzard/btn-upgrade-swann-firesuppressionsystem.png",
-
- "Orbital Command": organics_icon_base_url + "OrbitalCommandCampaign.png",
- "Planetary Command Module": github_icon_base_url + "original/btn-orbital-fortress.png",
- "Lift Off (Planetary Fortress)": github_icon_base_url + "blizzard/btn-ability-terran-liftoff.png",
- "Armament Stabilizers (Planetary Fortress)": github_icon_base_url + "blizzard/btn-ability-mengsk-siegetank-flyingtankarmament.png",
- "Advanced Targeting (Planetary Fortress)": github_icon_base_url + "blizzard/btn-ability-terran-detectionconedebuff.png",
-
- "Marine": "https://static.wikia.nocookie.net/starcraft/images/4/47/Marine_SC2_Icon1.jpg",
- "Medic": github_icon_base_url + "blizzard/btn-unit-terran-medic.png",
- "Firebat": github_icon_base_url + "blizzard/btn-unit-terran-firebat.png",
- "Marauder": "https://static.wikia.nocookie.net/starcraft/images/b/ba/Marauder_SC2_Icon1.jpg",
- "Reaper": "https://static.wikia.nocookie.net/starcraft/images/7/7d/Reaper_SC2_Icon1.jpg",
- "Ghost": "https://static.wikia.nocookie.net/starcraft/images/6/6e/Ghost_SC2_Icon1.jpg",
- "Spectre": github_icon_base_url + "original/btn-unit-terran-spectre.png",
- "HERC": github_icon_base_url + "blizzard/btn-unit-terran-herc.png",
-
- "Stimpack (Marine)": github_icon_base_url + "blizzard/btn-ability-terran-stimpack-color.png",
- "Super Stimpack (Marine)": github_icon_base_url + "blizzard/btn-upgrade-terran-superstimppack.png",
- "Combat Shield (Marine)": github_icon_base_url + "blizzard/btn-techupgrade-terran-combatshield-color.png",
- "Laser Targeting System (Marine)": github_icon_base_url + "blizzard/btn-upgrade-terran-lazertargetingsystem.png",
- "Magrail Munitions (Marine)": github_icon_base_url + "blizzard/btn-upgrade-terran-magrailmunitions.png",
- "Optimized Logistics (Marine)": github_icon_base_url + "blizzard/btn-upgrade-terran-optimizedlogistics.png",
- "Advanced Medic Facilities (Medic)": organics_icon_base_url + "AdvancedMedicFacilities.png",
- "Stabilizer Medpacks (Medic)": github_icon_base_url + "blizzard/btn-upgrade-raynor-stabilizermedpacks.png",
- "Restoration (Medic)": github_icon_base_url + "original/btn-ability-terran-restoration@scbw.png",
- "Optical Flare (Medic)": github_icon_base_url + "blizzard/btn-upgrade-protoss-fenix-dragoonsolariteflare.png",
- "Resource Efficiency (Medic)": github_icon_base_url + "blizzard/btn-ability-hornerhan-salvagebonus.png",
- "Adaptive Medpacks (Medic)": github_icon_base_url + "blizzard/btn-ability-terran-heal-color.png",
- "Nano Projector (Medic)": github_icon_base_url + "blizzard/talent-raynor-level03-firebatmedicrange.png",
- "Incinerator Gauntlets (Firebat)": github_icon_base_url + "blizzard/btn-upgrade-raynor-incineratorgauntlets.png",
- "Juggernaut Plating (Firebat)": github_icon_base_url + "blizzard/btn-upgrade-raynor-juggernautplating.png",
- "Stimpack (Firebat)": github_icon_base_url + "blizzard/btn-ability-terran-stimpack-color.png",
- "Super Stimpack (Firebat)": github_icon_base_url + "blizzard/btn-upgrade-terran-superstimppack.png",
- "Resource Efficiency (Firebat)": github_icon_base_url + "blizzard/btn-ability-hornerhan-salvagebonus.png",
- "Infernal Pre-Igniter (Firebat)": github_icon_base_url + "blizzard/btn-upgrade-terran-infernalpreigniter.png",
- "Kinetic Foam (Firebat)": organics_icon_base_url + "KineticFoam.png",
- "Nano Projectors (Firebat)": github_icon_base_url + "blizzard/talent-raynor-level03-firebatmedicrange.png",
- "Concussive Shells (Marauder)": github_icon_base_url + "blizzard/btn-ability-terran-punishergrenade-color.png",
- "Kinetic Foam (Marauder)": organics_icon_base_url + "KineticFoam.png",
- "Stimpack (Marauder)": github_icon_base_url + "blizzard/btn-ability-terran-stimpack-color.png",
- "Super Stimpack (Marauder)": github_icon_base_url + "blizzard/btn-upgrade-terran-superstimppack.png",
- "Laser Targeting System (Marauder)": github_icon_base_url + "blizzard/btn-upgrade-terran-lazertargetingsystem.png",
- "Magrail Munitions (Marauder)": github_icon_base_url + "blizzard/btn-upgrade-terran-magrailmunitions.png",
- "Internal Tech Module (Marauder)": github_icon_base_url + "blizzard/btn-upgrade-terran-internalizedtechmodule.png",
- "Juggernaut Plating (Marauder)": organics_icon_base_url + "JuggernautPlating.png",
- "U-238 Rounds (Reaper)": organics_icon_base_url + "U-238Rounds.png",
- "G-4 Clusterbomb (Reaper)": github_icon_base_url + "blizzard/btn-upgrade-terran-kd8chargeex3.png",
- "Stimpack (Reaper)": github_icon_base_url + "blizzard/btn-ability-terran-stimpack-color.png",
- "Super Stimpack (Reaper)": github_icon_base_url + "blizzard/btn-upgrade-terran-superstimppack.png",
- "Laser Targeting System (Reaper)": github_icon_base_url + "blizzard/btn-upgrade-terran-lazertargetingsystem.png",
- "Advanced Cloaking Field (Reaper)": github_icon_base_url + "original/btn-permacloak-reaper.png",
- "Spider Mines (Reaper)": github_icon_base_url + "original/btn-ability-terran-spidermine.png",
- "Combat Drugs (Reaper)": github_icon_base_url + "blizzard/btn-upgrade-terran-reapercombatdrugs.png",
- "Jet Pack Overdrive (Reaper)": github_icon_base_url + "blizzard/btn-ability-hornerhan-reaper-flightmode.png",
- "Ocular Implants (Ghost)": organics_icon_base_url + "OcularImplants.png",
- "Crius Suit (Ghost)": github_icon_base_url + "original/btn-permacloak-ghost.png",
- "EMP Rounds (Ghost)": github_icon_base_url + "blizzard/btn-ability-terran-emp-color.png",
- "Lockdown (Ghost)": github_icon_base_url + "original/btn-abilty-terran-lockdown@scbw.png",
- "Resource Efficiency (Ghost)": github_icon_base_url + "blizzard/btn-ability-hornerhan-salvagebonus.png",
- "Psionic Lash (Spectre)": organics_icon_base_url + "PsionicLash.png",
- "Nyx-Class Cloaking Module (Spectre)": github_icon_base_url + "original/btn-permacloak-spectre.png",
- "Impaler Rounds (Spectre)": github_icon_base_url + "blizzard/btn-techupgrade-terran-impalerrounds.png",
- "Resource Efficiency (Spectre)": github_icon_base_url + "blizzard/btn-ability-hornerhan-salvagebonus.png",
- "Juggernaut Plating (HERC)": organics_icon_base_url + "JuggernautPlating.png",
- "Kinetic Foam (HERC)": organics_icon_base_url + "KineticFoam.png",
- "Resource Efficiency (HERC)": github_icon_base_url + "blizzard/btn-ability-hornerhan-salvagebonus.png",
-
- "Hellion": "https://static.wikia.nocookie.net/starcraft/images/5/56/Hellion_SC2_Icon1.jpg",
- "Vulture": github_icon_base_url + "blizzard/btn-unit-terran-vulture.png",
- "Goliath": github_icon_base_url + "blizzard/btn-unit-terran-goliath.png",
- "Diamondback": github_icon_base_url + "blizzard/btn-unit-terran-cobra.png",
- "Siege Tank": "https://static.wikia.nocookie.net/starcraft/images/5/57/SiegeTank_SC2_Icon1.jpg",
- "Thor": "https://static.wikia.nocookie.net/starcraft/images/e/ef/Thor_SC2_Icon1.jpg",
- "Predator": github_icon_base_url + "original/btn-unit-terran-predator.png",
- "Widow Mine": github_icon_base_url + "blizzard/btn-unit-terran-widowmine.png",
- "Cyclone": github_icon_base_url + "blizzard/btn-unit-terran-cyclone.png",
- "Warhound": github_icon_base_url + "blizzard/btn-unit-terran-warhound.png",
-
- "Twin-Linked Flamethrower (Hellion)": github_icon_base_url + "blizzard/btn-upgrade-mengsk-trooper-flamethrower.png",
- "Thermite Filaments (Hellion)": github_icon_base_url + "blizzard/btn-upgrade-terran-infernalpreigniter.png",
- "Hellbat Aspect (Hellion)": github_icon_base_url + "blizzard/btn-unit-terran-hellionbattlemode.png",
- "Smart Servos (Hellion)": github_icon_base_url + "blizzard/btn-upgrade-terran-transformationservos.png",
- "Optimized Logistics (Hellion)": github_icon_base_url + "blizzard/btn-upgrade-terran-optimizedlogistics.png",
- "Jump Jets (Hellion)": github_icon_base_url + "blizzard/btn-upgrade-terran-jumpjets.png",
- "Stimpack (Hellion)": github_icon_base_url + "blizzard/btn-ability-terran-stimpack-color.png",
- "Super Stimpack (Hellion)": github_icon_base_url + "blizzard/btn-upgrade-terran-superstimppack.png",
- "Infernal Plating (Hellion)": github_icon_base_url + "blizzard/btn-upgrade-swann-hellarmor.png",
- "Cerberus Mine (Spider Mine)": github_icon_base_url + "blizzard/btn-upgrade-raynor-cerberusmines.png",
- "High Explosive Munition (Spider Mine)": github_icon_base_url + "original/btn-ability-terran-spidermine.png",
- "Replenishable Magazine (Vulture)": github_icon_base_url + "blizzard/btn-upgrade-raynor-replenishablemagazine.png",
- "Replenishable Magazine (Free) (Vulture)": github_icon_base_url + "blizzard/btn-upgrade-raynor-replenishablemagazine.png",
- "Ion Thrusters (Vulture)": github_icon_base_url + "blizzard/btn-ability-terran-emergencythrusters.png",
- "Auto Launchers (Vulture)": github_icon_base_url + "blizzard/btn-upgrade-terran-jotunboosters.png",
- "Auto-Repair (Vulture)": github_icon_base_url + "blizzard/ui_tipicon_campaign_space01-repair.png",
- "Multi-Lock Weapons System (Goliath)": github_icon_base_url + "blizzard/btn-upgrade-swann-multilockweaponsystem.png",
- "Ares-Class Targeting System (Goliath)": github_icon_base_url + "blizzard/btn-upgrade-swann-aresclasstargetingsystem.png",
- "Jump Jets (Goliath)": github_icon_base_url + "blizzard/btn-upgrade-terran-jumpjets.png",
- "Optimized Logistics (Goliath)": github_icon_base_url + "blizzard/btn-upgrade-terran-optimizedlogistics.png",
- "Shaped Hull (Goliath)": organics_icon_base_url + "ShapedHull.png",
- "Resource Efficiency (Goliath)": github_icon_base_url + "blizzard/btn-ability-hornerhan-salvagebonus.png",
- "Internal Tech Module (Goliath)": github_icon_base_url + "blizzard/btn-upgrade-terran-internalizedtechmodule.png",
- "Tri-Lithium Power Cell (Diamondback)": github_icon_base_url + "original/btn-upgrade-terran-trilithium-power-cell.png",
- "Tungsten Spikes (Diamondback)": github_icon_base_url + "original/btn-upgrade-terran-tungsten-spikes.png",
- "Shaped Hull (Diamondback)": organics_icon_base_url + "ShapedHull.png",
- "Hyperfluxor (Diamondback)": github_icon_base_url + "blizzard/btn-upgrade-mengsk-engineeringbay-orbitaldrop.png",
- "Burst Capacitors (Diamondback)": github_icon_base_url + "blizzard/btn-ability-terran-electricfield.png",
- "Ion Thrusters (Diamondback)": github_icon_base_url + "blizzard/btn-ability-terran-emergencythrusters.png",
- "Resource Efficiency (Diamondback)": github_icon_base_url + "blizzard/btn-ability-hornerhan-salvagebonus.png",
- "Maelstrom Rounds (Siege Tank)": github_icon_base_url + "blizzard/btn-upgrade-raynor-maelstromrounds.png",
- "Shaped Blast (Siege Tank)": organics_icon_base_url + "ShapedBlast.png",
- "Jump Jets (Siege Tank)": github_icon_base_url + "blizzard/btn-upgrade-terran-jumpjets.png",
- "Spider Mines (Siege Tank)": github_icon_base_url + "blizzard/btn-upgrade-siegetank-spidermines.png",
- "Smart Servos (Siege Tank)": github_icon_base_url + "blizzard/btn-upgrade-terran-transformationservos.png",
- "Graduating Range (Siege Tank)": github_icon_base_url + "blizzard/btn-upgrade-terran-nova-siegetankrange.png",
- "Laser Targeting System (Siege Tank)": github_icon_base_url + "blizzard/btn-upgrade-terran-lazertargetingsystem.png",
- "Advanced Siege Tech (Siege Tank)": github_icon_base_url + "blizzard/btn-upgrade-raynor-improvedsiegemode.png",
- "Internal Tech Module (Siege Tank)": github_icon_base_url + "blizzard/btn-upgrade-terran-internalizedtechmodule.png",
- "Shaped Hull (Siege Tank)": organics_icon_base_url + "ShapedHull.png",
- "Resource Efficiency (Siege Tank)": github_icon_base_url + "blizzard/btn-ability-hornerhan-salvagebonus.png",
- "330mm Barrage Cannon (Thor)": github_icon_base_url + "original/btn-ability-thor-330mm.png",
- "Immortality Protocol (Thor)": github_icon_base_url + "blizzard/btn-techupgrade-terran-immortalityprotocol.png",
- "Immortality Protocol (Free) (Thor)": github_icon_base_url + "blizzard/btn-techupgrade-terran-immortalityprotocol.png",
- "High Impact Payload (Thor)": github_icon_base_url + "blizzard/btn-unit-terran-thorsiegemode.png",
- "Smart Servos (Thor)": github_icon_base_url + "blizzard/btn-upgrade-terran-transformationservos.png",
- "Button With a Skull on It (Thor)": github_icon_base_url + "blizzard/btn-ability-terran-nuclearstrike-color.png",
- "Laser Targeting System (Thor)": github_icon_base_url + "blizzard/btn-upgrade-terran-lazertargetingsystem.png",
- "Large Scale Field Construction (Thor)": github_icon_base_url + "blizzard/talent-swann-level12-immortalityprotocol.png",
- "Resource Efficiency (Predator)": github_icon_base_url + "blizzard/btn-ability-hornerhan-salvagebonus.png",
- "Cloak (Predator)": github_icon_base_url + "blizzard/btn-ability-terran-cloak-color.png",
- "Charge (Predator)": github_icon_base_url + "blizzard/btn-ability-protoss-charge-color.png",
- "Predator's Fury (Predator)": github_icon_base_url + "blizzard/btn-ability-protoss-shadowfury.png",
- "Drilling Claws (Widow Mine)": github_icon_base_url + "blizzard/btn-upgrade-terran-researchdrillingclaws.png",
- "Concealment (Widow Mine)": github_icon_base_url + "blizzard/btn-ability-terran-widowminehidden.png",
- "Black Market Launchers (Widow Mine)": github_icon_base_url + "blizzard/btn-ability-hornerhan-widowmine-attackrange.png",
- "Executioner Missiles (Widow Mine)": github_icon_base_url + "blizzard/btn-ability-hornerhan-widowmine-deathblossom.png",
- "Mag-Field Accelerators (Cyclone)": github_icon_base_url + "blizzard/btn-upgrade-terran-magfieldaccelerator.png",
- "Mag-Field Launchers (Cyclone)": github_icon_base_url + "blizzard/btn-upgrade-terran-cyclonerangeupgrade.png",
- "Targeting Optics (Cyclone)": github_icon_base_url + "blizzard/btn-upgrade-swann-targetingoptics.png",
- "Rapid Fire Launchers (Cyclone)": github_icon_base_url + "blizzard/btn-upgrade-raynor-ripwavemissiles.png",
- "Resource Efficiency (Cyclone)": github_icon_base_url + "blizzard/btn-ability-hornerhan-salvagebonus.png",
- "Internal Tech Module (Cyclone)": github_icon_base_url + "blizzard/btn-upgrade-terran-internalizedtechmodule.png",
- "Resource Efficiency (Warhound)": github_icon_base_url + "blizzard/btn-ability-hornerhan-salvagebonus.png",
- "Reinforced Plating (Warhound)": github_icon_base_url + "original/btn-research-zerg-fortifiedbunker.png",
-
- "Medivac": "https://static.wikia.nocookie.net/starcraft/images/d/db/Medivac_SC2_Icon1.jpg",
- "Wraith": github_icon_base_url + "blizzard/btn-unit-terran-wraith.png",
- "Viking": "https://static.wikia.nocookie.net/starcraft/images/2/2a/Viking_SC2_Icon1.jpg",
- "Banshee": "https://static.wikia.nocookie.net/starcraft/images/3/32/Banshee_SC2_Icon1.jpg",
- "Battlecruiser": "https://static.wikia.nocookie.net/starcraft/images/f/f5/Battlecruiser_SC2_Icon1.jpg",
- "Raven": "https://static.wikia.nocookie.net/starcraft/images/1/19/SC2_Lab_Raven_Icon.png",
- "Science Vessel": "https://static.wikia.nocookie.net/starcraft/images/c/c3/SC2_Lab_SciVes_Icon.png",
- "Hercules": "https://static.wikia.nocookie.net/starcraft/images/4/40/SC2_Lab_Hercules_Icon.png",
- "Liberator": github_icon_base_url + "blizzard/btn-unit-terran-liberator.png",
- "Valkyrie": github_icon_base_url + "original/btn-unit-terran-valkyrie@scbw.png",
-
- "Rapid Deployment Tube (Medivac)": organics_icon_base_url + "RapidDeploymentTube.png",
- "Advanced Healing AI (Medivac)": github_icon_base_url + "blizzard/btn-ability-mengsk-medivac-doublehealbeam.png",
- "Expanded Hull (Medivac)": github_icon_base_url + "blizzard/btn-upgrade-mengsk-engineeringbay-neosteelfortifiedarmor.png",
- "Afterburners (Medivac)": github_icon_base_url + "blizzard/btn-upgrade-terran-medivacemergencythrusters.png",
- "Scatter Veil (Medivac)": github_icon_base_url + "blizzard/btn-upgrade-swann-defensivematrix.png",
- "Advanced Cloaking Field (Medivac)": github_icon_base_url + "original/btn-permacloak-medivac.png",
- "Tomahawk Power Cells (Wraith)": organics_icon_base_url + "TomahawkPowerCells.png",
- "Unregistered Cloaking Module (Wraith)": github_icon_base_url + "original/btn-permacloak-wraith.png",
- "Trigger Override (Wraith)": github_icon_base_url + "blizzard/btn-ability-hornerhan-wraith-attackspeed.png",
- "Internal Tech Module (Wraith)": github_icon_base_url + "blizzard/btn-upgrade-terran-internalizedtechmodule.png",
- "Resource Efficiency (Wraith)": github_icon_base_url + "blizzard/btn-ability-hornerhan-salvagebonus.png",
- "Displacement Field (Wraith)": github_icon_base_url + "blizzard/btn-upgrade-swann-displacementfield.png",
- "Advanced Laser Technology (Wraith)": github_icon_base_url + "blizzard/btn-upgrade-swann-improvedburstlaser.png",
- "Ripwave Missiles (Viking)": github_icon_base_url + "blizzard/btn-upgrade-raynor-ripwavemissiles.png",
- "Phobos-Class Weapons System (Viking)": github_icon_base_url + "blizzard/btn-upgrade-raynor-phobosclassweaponssystem.png",
- "Smart Servos (Viking)": github_icon_base_url + "blizzard/btn-upgrade-terran-transformationservos.png",
- "Anti-Mechanical Munition (Viking)": github_icon_base_url + "blizzard/btn-ability-terran-ignorearmor.png",
- "Shredder Rounds (Viking)": github_icon_base_url + "blizzard/btn-ability-hornerhan-viking-piercingattacks.png",
- "W.I.L.D. Missiles (Viking)": github_icon_base_url + "blizzard/btn-ability-hornerhan-viking-missileupgrade.png",
- "Cross-Spectrum Dampeners (Banshee)": github_icon_base_url + "original/btn-banshee-cross-spectrum-dampeners.png",
- "Advanced Cross-Spectrum Dampeners (Banshee)": github_icon_base_url + "original/btn-permacloak-banshee.png",
- "Shockwave Missile Battery (Banshee)": github_icon_base_url + "blizzard/btn-upgrade-raynor-shockwavemissilebattery.png",
- "Hyperflight Rotors (Banshee)": github_icon_base_url + "blizzard/btn-upgrade-terran-hyperflightrotors.png",
- "Laser Targeting System (Banshee)": github_icon_base_url + "blizzard/btn-upgrade-terran-lazertargetingsystem.png",
- "Internal Tech Module (Banshee)": github_icon_base_url + "blizzard/btn-upgrade-terran-internalizedtechmodule.png",
- "Shaped Hull (Banshee)": organics_icon_base_url + "ShapedHull.png",
- "Advanced Targeting Optics (Banshee)": github_icon_base_url + "blizzard/btn-ability-terran-detectionconedebuff.png",
- "Distortion Blasters (Banshee)": github_icon_base_url + "blizzard/btn-techupgrade-terran-cloakdistortionfield.png",
- "Rocket Barrage (Banshee)": github_icon_base_url + "blizzard/btn-upgrade-terran-nova-bansheemissilestrik.png",
- "Missile Pods (Battlecruiser) Level 1": organics_icon_base_url + "MissilePods.png",
- "Missile Pods (Battlecruiser) Level 2": github_icon_base_url + "blizzard/btn-upgrade-terran-nova-bansheemissilestrik.png",
- "Defensive Matrix (Battlecruiser)": github_icon_base_url + "blizzard/btn-upgrade-swann-defensivematrix.png",
- "Advanced Defensive Matrix (Battlecruiser)": github_icon_base_url + "blizzard/btn-upgrade-swann-defensivematrix.png",
- "Tactical Jump (Battlecruiser)": github_icon_base_url + "blizzard/btn-ability-terran-warpjump.png",
- "Cloak (Battlecruiser)": github_icon_base_url + "blizzard/btn-ability-terran-cloak-color.png",
- "ATX Laser Battery (Battlecruiser)": github_icon_base_url + "blizzard/btn-upgrade-terran-nova-specialordance.png",
- "Optimized Logistics (Battlecruiser)": github_icon_base_url + "blizzard/btn-upgrade-terran-optimizedlogistics.png",
- "Internal Tech Module (Battlecruiser)": github_icon_base_url + "blizzard/btn-upgrade-terran-internalizedtechmodule.png",
- "Behemoth Plating (Battlecruiser)": github_icon_base_url + "original/btn-research-zerg-fortifiedbunker.png",
- "Covert Ops Engines (Battlecruiser)": github_icon_base_url + "blizzard/btn-ability-terran-emergencythrusters.png",
- "Bio Mechanical Repair Drone (Raven)": github_icon_base_url + "blizzard/btn-unit-biomechanicaldrone.png",
- "Spider Mines (Raven)": github_icon_base_url + "blizzard/btn-upgrade-siegetank-spidermines.png",
- "Railgun Turret (Raven)": github_icon_base_url + "blizzard/btn-unit-terran-autoturretblackops.png",
- "Hunter-Seeker Weapon (Raven)": github_icon_base_url + "blizzard/btn-upgrade-terran-nova-specialordance.png",
- "Interference Matrix (Raven)": github_icon_base_url + "blizzard/btn-upgrade-terran-interferencematrix.png",
- "Anti-Armor Missile (Raven)": github_icon_base_url + "blizzard/btn-ability-terran-shreddermissile-color.png",
- "Internal Tech Module (Raven)": github_icon_base_url + "blizzard/btn-upgrade-terran-internalizedtechmodule.png",
- "Resource Efficiency (Raven)": github_icon_base_url + "blizzard/btn-ability-hornerhan-salvagebonus.png",
- "Durable Materials (Raven)": github_icon_base_url + "blizzard/btn-upgrade-terran-durablematerials.png",
- "EMP Shockwave (Science Vessel)": github_icon_base_url + "blizzard/btn-ability-mengsk-ghost-staticempblast.png",
- "Defensive Matrix (Science Vessel)": github_icon_base_url + "blizzard/btn-upgrade-swann-defensivematrix.png",
- "Improved Nano-Repair (Science Vessel)": github_icon_base_url + "blizzard/btn-upgrade-swann-improvednanorepair.png",
- "Advanced AI Systems (Science Vessel)": github_icon_base_url + "blizzard/btn-ability-mengsk-medivac-doublehealbeam.png",
- "Internal Fusion Module (Hercules)": github_icon_base_url + "blizzard/btn-upgrade-terran-internalizedtechmodule.png",
- "Tactical Jump (Hercules)": github_icon_base_url + "blizzard/btn-ability-terran-hercules-tacticaljump.png",
- "Advanced Ballistics (Liberator)": github_icon_base_url + "blizzard/btn-upgrade-terran-advanceballistics.png",
- "Raid Artillery (Liberator)": github_icon_base_url + "blizzard/btn-upgrade-terran-nova-terrandefendermodestructureattack.png",
- "Cloak (Liberator)": github_icon_base_url + "blizzard/btn-ability-terran-cloak-color.png",
- "Laser Targeting System (Liberator)": github_icon_base_url + "blizzard/btn-upgrade-terran-lazertargetingsystem.png",
- "Optimized Logistics (Liberator)": github_icon_base_url + "blizzard/btn-upgrade-terran-optimizedlogistics.png",
- "Smart Servos (Liberator)": github_icon_base_url + "blizzard/btn-upgrade-terran-transformationservos.png",
- "Resource Efficiency (Liberator)": github_icon_base_url + "blizzard/btn-ability-hornerhan-salvagebonus.png",
- "Enhanced Cluster Launchers (Valkyrie)": github_icon_base_url + "blizzard/btn-ability-stetmann-corruptormissilebarrage.png",
- "Shaped Hull (Valkyrie)": organics_icon_base_url + "ShapedHull.png",
- "Flechette Missiles (Valkyrie)": github_icon_base_url + "blizzard/btn-ability-hornerhan-viking-missileupgrade.png",
- "Afterburners (Valkyrie)": github_icon_base_url + "blizzard/btn-upgrade-terran-medivacemergencythrusters.png",
- "Launching Vector Compensator (Valkyrie)": github_icon_base_url + "blizzard/btn-ability-terran-emergencythrusters.png",
- "Resource Efficiency (Valkyrie)": github_icon_base_url + "blizzard/btn-ability-hornerhan-salvagebonus.png",
-
- "War Pigs": "https://static.wikia.nocookie.net/starcraft/images/e/ed/WarPigs_SC2_Icon1.jpg",
- "Devil Dogs": "https://static.wikia.nocookie.net/starcraft/images/3/33/DevilDogs_SC2_Icon1.jpg",
- "Hammer Securities": "https://static.wikia.nocookie.net/starcraft/images/3/3b/HammerSecurity_SC2_Icon1.jpg",
- "Spartan Company": "https://static.wikia.nocookie.net/starcraft/images/b/be/SpartanCompany_SC2_Icon1.jpg",
- "Siege Breakers": "https://static.wikia.nocookie.net/starcraft/images/3/31/SiegeBreakers_SC2_Icon1.jpg",
- "Hel's Angels": "https://static.wikia.nocookie.net/starcraft/images/6/63/HelsAngels_SC2_Icon1.jpg",
- "Dusk Wings": "https://static.wikia.nocookie.net/starcraft/images/5/52/DuskWings_SC2_Icon1.jpg",
- "Jackson's Revenge": "https://static.wikia.nocookie.net/starcraft/images/9/95/JacksonsRevenge_SC2_Icon1.jpg",
- "Skibi's Angels": github_icon_base_url + "blizzard/btn-unit-terran-medicelite.png",
- "Death Heads": github_icon_base_url + "blizzard/btn-unit-terran-deathhead.png",
- "Winged Nightmares": github_icon_base_url + "blizzard/btn-unit-collection-wraith-junker.png",
- "Midnight Riders": github_icon_base_url + "blizzard/btn-unit-terran-liberatorblackops.png",
- "Brynhilds": github_icon_base_url + "blizzard/btn-unit-collection-vikingfighter-covertops.png",
- "Jotun": github_icon_base_url + "blizzard/btn-unit-terran-thormengsk.png",
-
- "Ultra-Capacitors": "https://static.wikia.nocookie.net/starcraft/images/2/23/SC2_Lab_Ultra_Capacitors_Icon.png",
- "Vanadium Plating": "https://static.wikia.nocookie.net/starcraft/images/6/67/SC2_Lab_VanPlating_Icon.png",
- "Orbital Depots": "https://static.wikia.nocookie.net/starcraft/images/0/01/SC2_Lab_Orbital_Depot_Icon.png",
- "Micro-Filtering": "https://static.wikia.nocookie.net/starcraft/images/2/20/SC2_Lab_MicroFilter_Icon.png",
- "Automated Refinery": "https://static.wikia.nocookie.net/starcraft/images/7/71/SC2_Lab_Auto_Refinery_Icon.png",
- "Command Center Reactor": "https://static.wikia.nocookie.net/starcraft/images/e/ef/SC2_Lab_CC_Reactor_Icon.png",
- "Tech Reactor": "https://static.wikia.nocookie.net/starcraft/images/c/c5/SC2_Lab_Tech_Reactor_Icon.png",
- "Orbital Strike": "https://static.wikia.nocookie.net/starcraft/images/d/df/SC2_Lab_Orb_Strike_Icon.png",
-
- "Shrike Turret (Bunker)": "https://static.wikia.nocookie.net/starcraft/images/4/44/SC2_Lab_Shrike_Turret_Icon.png",
- "Fortified Bunker (Bunker)": "https://static.wikia.nocookie.net/starcraft/images/4/4f/SC2_Lab_FortBunker_Icon.png",
- "Planetary Fortress": "https://static.wikia.nocookie.net/starcraft/images/0/0b/SC2_Lab_PlanetFortress_Icon.png",
- "Perdition Turret": "https://static.wikia.nocookie.net/starcraft/images/a/af/SC2_Lab_PerdTurret_Icon.png",
- "Cellular Reactor": "https://static.wikia.nocookie.net/starcraft/images/d/d8/SC2_Lab_CellReactor_Icon.png",
- "Regenerative Bio-Steel Level 1": github_icon_base_url + "original/btn-regenerativebiosteel-green.png",
- "Regenerative Bio-Steel Level 2": github_icon_base_url + "original/btn-regenerativebiosteel-blue.png",
- "Regenerative Bio-Steel Level 3": github_icon_base_url + "blizzard/btn-research-zerg-regenerativebio-steel.png",
- "Hive Mind Emulator": "https://static.wikia.nocookie.net/starcraft/images/b/bc/SC2_Lab_Hive_Emulator_Icon.png",
- "Psi Disrupter": "https://static.wikia.nocookie.net/starcraft/images/c/cf/SC2_Lab_Psi_Disruptor_Icon.png",
-
- "Structure Armor": github_icon_base_url + "blizzard/btn-upgrade-terran-buildingarmor.png",
- "Hi-Sec Auto Tracking": github_icon_base_url + "blizzard/btn-upgrade-terran-hisecautotracking.png",
- "Advanced Optics": github_icon_base_url + "blizzard/btn-upgrade-swann-vehiclerangeincrease.png",
- "Rogue Forces": github_icon_base_url + "blizzard/btn-unit-terran-tosh.png",
-
- "Ghost Visor (Nova Equipment)": github_icon_base_url + "blizzard/btn-upgrade-nova-equipment-ghostvisor.png",
- "Rangefinder Oculus (Nova Equipment)": github_icon_base_url + "blizzard/btn-upgrade-nova-equipment-rangefinderoculus.png",
- "Domination (Nova Ability)": github_icon_base_url + "blizzard/btn-ability-nova-domination.png",
- "Blink (Nova Ability)": github_icon_base_url + "blizzard/btn-upgrade-nova-blink.png",
- "Stealth Suit Module (Nova Suit Module)": github_icon_base_url + "blizzard/btn-upgrade-nova-equipment-stealthsuit.png",
- "Cloak (Nova Suit Module)": github_icon_base_url + "blizzard/btn-ability-terran-cloak-color.png",
- "Permanently Cloaked (Nova Suit Module)": github_icon_base_url + "blizzard/btn-upgrade-nova-tacticalstealthsuit.png",
- "Energy Suit Module (Nova Suit Module)": github_icon_base_url + "blizzard/btn-upgrade-nova-equipment-apolloinfantrysuit.png",
- "Armored Suit Module (Nova Suit Module)": github_icon_base_url + "blizzard/btn-upgrade-nova-equipment-blinksuit.png",
- "Jump Suit Module (Nova Suit Module)": github_icon_base_url + "blizzard/btn-upgrade-nova-jetpack.png",
- "C20A Canister Rifle (Nova Weapon)": github_icon_base_url + "blizzard/btn-upgrade-nova-equipment-canisterrifle.png",
- "Hellfire Shotgun (Nova Weapon)": github_icon_base_url + "blizzard/btn-upgrade-nova-equipment-shotgun.png",
- "Plasma Rifle (Nova Weapon)": github_icon_base_url + "blizzard/btn-upgrade-nova-equipment-plasmagun.png",
- "Monomolecular Blade (Nova Weapon)": github_icon_base_url + "blizzard/btn-upgrade-nova-equipment-monomolecularblade.png",
- "Blazefire Gunblade (Nova Weapon)": github_icon_base_url + "blizzard/btn-upgrade-nova-equipment-gunblade_sword.png",
- "Stim Infusion (Nova Gadget)": github_icon_base_url + "blizzard/btn-upgrade-terran-superstimppack.png",
- "Pulse Grenades (Nova Gadget)": github_icon_base_url + "blizzard/btn-upgrade-nova-btn-upgrade-nova-pulsegrenade.png",
- "Flashbang Grenades (Nova Gadget)": github_icon_base_url + "blizzard/btn-upgrade-nova-btn-upgrade-nova-flashgrenade.png",
- "Ionic Force Field (Nova Gadget)": github_icon_base_url + "blizzard/btn-upgrade-terran-nova-personaldefensivematrix.png",
- "Holo Decoy (Nova Gadget)": github_icon_base_url + "blizzard/btn-upgrade-nova-holographicdecoy.png",
- "Tac Nuke Strike (Nova Ability)": github_icon_base_url + "blizzard/btn-ability-terran-nuclearstrike-color.png",
-
- "Zerg Melee Attack Level 1": github_icon_base_url + "blizzard/btn-upgrade-zerg-meleeattacks-level1.png",
- "Zerg Melee Attack Level 2": github_icon_base_url + "blizzard/btn-upgrade-zerg-meleeattacks-level2.png",
- "Zerg Melee Attack Level 3": github_icon_base_url + "blizzard/btn-upgrade-zerg-meleeattacks-level3.png",
- "Zerg Missile Attack Level 1": github_icon_base_url + "blizzard/btn-upgrade-zerg-missileattacks-level1.png",
- "Zerg Missile Attack Level 2": github_icon_base_url + "blizzard/btn-upgrade-zerg-missileattacks-level2.png",
- "Zerg Missile Attack Level 3": github_icon_base_url + "blizzard/btn-upgrade-zerg-missileattacks-level3.png",
- "Zerg Ground Carapace Level 1": github_icon_base_url + "blizzard/btn-upgrade-zerg-groundcarapace-level1.png",
- "Zerg Ground Carapace Level 2": github_icon_base_url + "blizzard/btn-upgrade-zerg-groundcarapace-level2.png",
- "Zerg Ground Carapace Level 3": github_icon_base_url + "blizzard/btn-upgrade-zerg-groundcarapace-level3.png",
- "Zerg Flyer Attack Level 1": github_icon_base_url + "blizzard/btn-upgrade-zerg-airattacks-level1.png",
- "Zerg Flyer Attack Level 2": github_icon_base_url + "blizzard/btn-upgrade-zerg-airattacks-level2.png",
- "Zerg Flyer Attack Level 3": github_icon_base_url + "blizzard/btn-upgrade-zerg-airattacks-level3.png",
- "Zerg Flyer Carapace Level 1": github_icon_base_url + "blizzard/btn-upgrade-zerg-flyercarapace-level1.png",
- "Zerg Flyer Carapace Level 2": github_icon_base_url + "blizzard/btn-upgrade-zerg-flyercarapace-level2.png",
- "Zerg Flyer Carapace Level 3": github_icon_base_url + "blizzard/btn-upgrade-zerg-flyercarapace-level3.png",
-
- "Automated Extractors (Kerrigan Tier 3)": github_icon_base_url + "blizzard/btn-ability-kerrigan-automatedextractors.png",
- "Vespene Efficiency (Kerrigan Tier 5)": github_icon_base_url + "blizzard/btn-ability-kerrigan-vespeneefficiency.png",
- "Twin Drones (Kerrigan Tier 5)": github_icon_base_url + "blizzard/btn-ability-kerrigan-twindrones.png",
- "Improved Overlords (Kerrigan Tier 3)": github_icon_base_url + "blizzard/btn-ability-kerrigan-improvedoverlords.png",
- "Ventral Sacs (Overlord)": github_icon_base_url + "blizzard/btn-upgrade-zerg-ventralsacs.png",
- "Malignant Creep (Kerrigan Tier 5)": github_icon_base_url + "blizzard/btn-ability-kerrigan-malignantcreep.png",
-
- "Spine Crawler": github_icon_base_url + "blizzard/btn-building-zerg-spinecrawler.png",
- "Spore Crawler": github_icon_base_url + "blizzard/btn-building-zerg-sporecrawler.png",
-
- "Zergling": github_icon_base_url + "blizzard/btn-unit-zerg-zergling.png",
- "Swarm Queen": github_icon_base_url + "blizzard/btn-unit-zerg-broodqueen.png",
- "Roach": github_icon_base_url + "blizzard/btn-unit-zerg-roach.png",
- "Hydralisk": github_icon_base_url + "blizzard/btn-unit-zerg-hydralisk.png",
- "Aberration": github_icon_base_url + "blizzard/btn-unit-zerg-aberration.png",
- "Mutalisk": github_icon_base_url + "blizzard/btn-unit-zerg-mutalisk.png",
- "Corruptor": github_icon_base_url + "blizzard/btn-unit-zerg-corruptor.png",
- "Swarm Host": github_icon_base_url + "blizzard/btn-unit-zerg-swarmhost.png",
- "Infestor": github_icon_base_url + "blizzard/btn-unit-zerg-infestor.png",
- "Defiler": github_icon_base_url + "original/btn-unit-zerg-defiler@scbw.png",
- "Ultralisk": github_icon_base_url + "blizzard/btn-unit-zerg-ultralisk.png",
- "Brood Queen": github_icon_base_url + "blizzard/btn-unit-zerg-classicqueen.png",
- "Scourge": github_icon_base_url + "blizzard/btn-unit-zerg-scourge.png",
-
- "Baneling Aspect (Zergling)": github_icon_base_url + "blizzard/btn-unit-zerg-baneling.png",
- "Ravager Aspect (Roach)": github_icon_base_url + "blizzard/btn-unit-zerg-ravager.png",
- "Impaler Aspect (Hydralisk)": github_icon_base_url + "blizzard/btn-unit-zerg-impaler.png",
- "Lurker Aspect (Hydralisk)": github_icon_base_url + "blizzard/btn-unit-zerg-lurker.png",
- "Brood Lord Aspect (Mutalisk/Corruptor)": github_icon_base_url + "blizzard/btn-unit-zerg-broodlord.png",
- "Viper Aspect (Mutalisk/Corruptor)": github_icon_base_url + "blizzard/btn-unit-zerg-viper.png",
- "Guardian Aspect (Mutalisk/Corruptor)": github_icon_base_url + "blizzard/btn-unit-zerg-primalguardian.png",
- "Devourer Aspect (Mutalisk/Corruptor)": github_icon_base_url + "blizzard/btn-unit-zerg-devourerex3.png",
-
- "Raptor Strain (Zergling)": github_icon_base_url + "blizzard/btn-unit-zerg-zergling-raptor.png",
- "Swarmling Strain (Zergling)": github_icon_base_url + "blizzard/btn-unit-zerg-zergling-swarmling.png",
- "Hardened Carapace (Zergling)": github_icon_base_url + "blizzard/btn-upgrade-zerg-hardenedcarapace.png",
- "Adrenal Overload (Zergling)": github_icon_base_url + "blizzard/btn-upgrade-zerg-adrenaloverload.png",
- "Metabolic Boost (Zergling)": github_icon_base_url + "blizzard/btn-upgrade-zerg-hotsmetabolicboost.png",
- "Shredding Claws (Zergling)": github_icon_base_url + "blizzard/btn-upgrade-zergling-armorshredding.png",
- "Zergling Reconstitution (Kerrigan Tier 3)": github_icon_base_url + "blizzard/btn-ability-kerrigan-zerglingreconstitution.png",
- "Splitter Strain (Baneling)": github_icon_base_url + "blizzard/talent-zagara-level14-unlocksplitterling.png",
- "Hunter Strain (Baneling)": github_icon_base_url + "blizzard/btn-ability-zerg-cliffjump-baneling.png",
- "Corrosive Acid (Baneling)": github_icon_base_url + "blizzard/btn-upgrade-zerg-corrosiveacid.png",
- "Rupture (Baneling)": github_icon_base_url + "blizzard/btn-upgrade-zerg-rupture.png",
- "Regenerative Acid (Baneling)": github_icon_base_url + "blizzard/btn-upgrade-zerg-regenerativebile.png",
- "Centrifugal Hooks (Baneling)": github_icon_base_url + "blizzard/btn-upgrade-zerg-centrifugalhooks.png",
- "Tunneling Jaws (Baneling)": github_icon_base_url + "blizzard/btn-upgrade-zerg-tunnelingjaws.png",
- "Rapid Metamorph (Baneling)": github_icon_base_url + "blizzard/btn-upgrade-terran-optimizedlogistics.png",
- "Spawn Larvae (Swarm Queen)": github_icon_base_url + "blizzard/btn-unit-zerg-larva.png",
- "Deep Tunnel (Swarm Queen)": github_icon_base_url + "blizzard/btn-ability-zerg-deeptunnel.png",
- "Organic Carapace (Swarm Queen)": github_icon_base_url + "blizzard/btn-upgrade-zerg-organiccarapace.png",
- "Bio-Mechanical Transfusion (Swarm Queen)": github_icon_base_url + "blizzard/btn-upgrade-zerg-abathur-biomechanicaltransfusion.png",
- "Resource Efficiency (Swarm Queen)": github_icon_base_url + "blizzard/btn-ability-hornerhan-salvagebonus.png",
- "Incubator Chamber (Swarm Queen)": github_icon_base_url + "blizzard/btn-upgrade-zerg-abathur-incubationchamber.png",
- "Vile Strain (Roach)": github_icon_base_url + "blizzard/btn-unit-zerg-roach-vile.png",
- "Corpser Strain (Roach)": github_icon_base_url + "blizzard/btn-unit-zerg-roach-corpser.png",
- "Hydriodic Bile (Roach)": github_icon_base_url + "blizzard/btn-upgrade-zerg-hydriaticacid.png",
- "Adaptive Plating (Roach)": github_icon_base_url + "blizzard/btn-upgrade-zerg-adaptivecarapace.png",
- "Tunneling Claws (Roach)": github_icon_base_url + "blizzard/btn-upgrade-zerg-hotstunnelingclaws.png",
- "Glial Reconstitution (Roach)": github_icon_base_url + "blizzard/btn-upgrade-zerg-glialreconstitution.png",
- "Organic Carapace (Roach)": github_icon_base_url + "blizzard/btn-upgrade-zerg-organiccarapace.png",
- "Potent Bile (Ravager)": github_icon_base_url + "blizzard/potentbile_coop.png",
- "Bloated Bile Ducts (Ravager)": github_icon_base_url + "blizzard/btn-ability-zerg-abathur-corrosivebilelarge.png",
- "Deep Tunnel (Ravager)": github_icon_base_url + "blizzard/btn-ability-zerg-deeptunnel.png",
- "Frenzy (Hydralisk)": github_icon_base_url + "blizzard/btn-upgrade-zerg-frenzy.png",
- "Ancillary Carapace (Hydralisk)": github_icon_base_url + "blizzard/btn-upgrade-zerg-ancillaryarmor.png",
- "Grooved Spines (Hydralisk)": github_icon_base_url + "blizzard/btn-upgrade-zerg-hotsgroovedspines.png",
- "Muscular Augments (Hydralisk)": github_icon_base_url + "blizzard/btn-upgrade-zerg-evolvemuscularaugments.png",
- "Resource Efficiency (Hydralisk)": github_icon_base_url + "blizzard/btn-ability-hornerhan-salvagebonus.png",
- "Adaptive Talons (Impaler)": github_icon_base_url + "blizzard/btn-upgrade-zerg-adaptivetalons.png",
- "Secretion Glands (Impaler)": github_icon_base_url + "blizzard/btn-ability-zerg-creepspread.png",
- "Hardened Tentacle Spines (Impaler)": github_icon_base_url + "blizzard/btn-ability-zerg-dehaka-impaler-tenderize.png",
- "Seismic Spines (Lurker)": github_icon_base_url + "blizzard/btn-upgrade-kerrigan-seismicspines.png",
- "Adapted Spines (Lurker)": github_icon_base_url + "blizzard/btn-upgrade-zerg-groovedspines.png",
- "Vicious Glaive (Mutalisk)": github_icon_base_url + "blizzard/btn-upgrade-zerg-viciousglaive.png",
- "Rapid Regeneration (Mutalisk)": github_icon_base_url + "blizzard/btn-upgrade-zerg-rapidregeneration.png",
- "Sundering Glaive (Mutalisk)": github_icon_base_url + "blizzard/btn-upgrade-zerg-explosiveglaive.png",
- "Severing Glaive (Mutalisk)": github_icon_base_url + "blizzard/btn-upgrade-zerg-explosiveglaive.png",
- "Aerodynamic Glaive Shape (Mutalisk)": github_icon_base_url + "blizzard/btn-ability-dehaka-airbonusdamage.png",
- "Corruption (Corruptor)": github_icon_base_url + "blizzard/btn-ability-zerg-causticspray.png",
- "Caustic Spray (Corruptor)": github_icon_base_url + "blizzard/btn-ability-zerg-corruption-color.png",
- "Porous Cartilage (Brood Lord)": github_icon_base_url + "blizzard/btn-upgrade-kerrigan-broodlordspeed.png",
- "Evolved Carapace (Brood Lord)": github_icon_base_url + "blizzard/btn-upgrade-zerg-chitinousplating.png",
- "Splitter Mitosis (Brood Lord)": github_icon_base_url + "blizzard/abilityicon_spawnbroodlings_square.png",
- "Resource Efficiency (Brood Lord)": github_icon_base_url + "blizzard/btn-ability-hornerhan-salvagebonus.png",
- "Parasitic Bomb (Viper)": github_icon_base_url + "blizzard/btn-ability-zerg-parasiticbomb.png",
- "Paralytic Barbs (Viper)": github_icon_base_url + "blizzard/btn-upgrade-zerg-abathur-abduct.png",
- "Virulent Microbes (Viper)": github_icon_base_url + "blizzard/btn-upgrade-zerg-abathur-castrange.png",
- "Prolonged Dispersion (Guardian)": github_icon_base_url + "blizzard/btn-upgrade-zerg-abathur-prolongeddispersion.png",
- "Primal Adaptation (Guardian)": github_icon_base_url + "blizzard/biomassrecovery_coop.png",
- "Soronan Acid (Guardian)": github_icon_base_url + "blizzard/btn-upgrade-zerg-abathur-biomass.png",
- "Corrosive Spray (Devourer)": github_icon_base_url + "blizzard/btn-upgrade-zerg-abathur-devourer-corrosivespray.png",
- "Gaping Maw (Devourer)": github_icon_base_url + "blizzard/btn-ability-zerg-explode-color.png",
- "Improved Osmosis (Devourer)": github_icon_base_url + "blizzard/btn-upgrade-zerg-pneumatizedcarapace.png",
- "Prescient Spores (Devourer)": github_icon_base_url + "blizzard/btn-upgrade-zerg-airattacks-level2.png",
- "Carrion Strain (Swarm Host)": github_icon_base_url + "blizzard/btn-unit-zerg-swarmhost-carrion.png",
- "Creeper Strain (Swarm Host)": github_icon_base_url + "blizzard/btn-unit-zerg-swarmhost-creeper.png",
- "Burrow (Swarm Host)": github_icon_base_url + "blizzard/btn-ability-zerg-burrow-color.png",
- "Rapid Incubation (Swarm Host)": github_icon_base_url + "blizzard/btn-upgrade-zerg-rapidincubation.png",
- "Pressurized Glands (Swarm Host)": github_icon_base_url + "blizzard/btn-upgrade-zerg-pressurizedglands.png",
- "Locust Metabolic Boost (Swarm Host)": github_icon_base_url + "blizzard/btn-upgrade-zerg-glialreconstitution.png",
- "Enduring Locusts (Swarm Host)": github_icon_base_url + "blizzard/btn-upgrade-zerg-evolveincreasedlocustlifetime.png",
- "Organic Carapace (Swarm Host)": github_icon_base_url + "blizzard/btn-upgrade-zerg-organiccarapace.png",
- "Resource Efficiency (Swarm Host)": github_icon_base_url + "blizzard/btn-ability-hornerhan-salvagebonus.png",
- "Infested Terran (Infestor)": github_icon_base_url + "blizzard/btn-unit-zerg-infestedmarine.png",
- "Microbial Shroud (Infestor)": github_icon_base_url + "blizzard/btn-ability-zerg-darkswarm.png",
- "Noxious Strain (Ultralisk)": github_icon_base_url + "blizzard/btn-unit-zerg-ultralisk-noxious.png",
- "Torrasque Strain (Ultralisk)": github_icon_base_url + "blizzard/btn-unit-zerg-ultralisk-torrasque.png",
- "Burrow Charge (Ultralisk)": github_icon_base_url + "blizzard/btn-upgrade-zerg-burrowcharge.png",
- "Tissue Assimilation (Ultralisk)": github_icon_base_url + "blizzard/btn-upgrade-zerg-tissueassimilation.png",
- "Monarch Blades (Ultralisk)": github_icon_base_url + "blizzard/btn-upgrade-zerg-monarchblades.png",
- "Anabolic Synthesis (Ultralisk)": github_icon_base_url + "blizzard/btn-upgrade-zerg-anabolicsynthesis.png",
- "Chitinous Plating (Ultralisk)": github_icon_base_url + "blizzard/btn-upgrade-zerg-chitinousplating.png",
- "Organic Carapace (Ultralisk)": github_icon_base_url + "blizzard/btn-upgrade-zerg-organiccarapace.png",
- "Resource Efficiency (Ultralisk)": github_icon_base_url + "blizzard/btn-ability-hornerhan-salvagebonus.png",
- "Fungal Growth (Brood Queen)": github_icon_base_url + "blizzard/btn-upgrade-zerg-stukov-researchqueenfungalgrowth.png",
- "Ensnare (Brood Queen)": github_icon_base_url + "blizzard/btn-ability-zerg-fungalgrowth-color.png",
- "Enhanced Mitochondria (Brood Queen)": github_icon_base_url + "blizzard/btn-upgrade-zerg-stukov-queenenergyregen.png",
- "Virulent Spores (Scourge)": github_icon_base_url + "blizzard/btn-upgrade-zagara-scourgesplashdamage.png",
- "Resource Efficiency (Scourge)": github_icon_base_url + "blizzard/btn-ability-hornerhan-salvagebonus.png",
- "Swarm Scourge (Scourge)": github_icon_base_url + "original/btn-upgrade-custom-triple-scourge.png",
-
- "Infested Medics": github_icon_base_url + "blizzard/btn-unit-terran-medicelite.png",
- "Infested Siege Tanks": github_icon_base_url + "original/btn-unit-terran-siegetankmercenary-tank.png",
- "Infested Banshees": github_icon_base_url + "original/btn-unit-terran-bansheemercenary.png",
-
- "Primal Form (Kerrigan)": github_icon_base_url + "blizzard/btn-unit-zerg-kerriganinfested.png",
- "Kinetic Blast (Kerrigan Tier 1)": github_icon_base_url + "blizzard/btn-ability-kerrigan-kineticblast.png",
- "Heroic Fortitude (Kerrigan Tier 1)": github_icon_base_url + "blizzard/btn-ability-kerrigan-heroicfortitude.png",
- "Leaping Strike (Kerrigan Tier 1)": github_icon_base_url + "blizzard/btn-ability-kerrigan-leapingstrike.png",
- "Crushing Grip (Kerrigan Tier 2)": github_icon_base_url + "blizzard/btn-ability-swarm-kerrigan-crushinggrip.png",
- "Chain Reaction (Kerrigan Tier 2)": github_icon_base_url + "blizzard/btn-ability-swarm-kerrigan-chainreaction.png",
- "Psionic Shift (Kerrigan Tier 2)": github_icon_base_url + "blizzard/btn-ability-kerrigan-psychicshift.png",
- "Wild Mutation (Kerrigan Tier 4)": github_icon_base_url + "blizzard/btn-ability-kerrigan-wildmutation.png",
- "Spawn Banelings (Kerrigan Tier 4)": github_icon_base_url + "blizzard/abilityicon_spawnbanelings_square.png",
- "Mend (Kerrigan Tier 4)": github_icon_base_url + "blizzard/btn-ability-zerg-transfusion-color.png",
- "Infest Broodlings (Kerrigan Tier 6)": github_icon_base_url + "blizzard/abilityicon_spawnbroodlings_square.png",
- "Fury (Kerrigan Tier 6)": github_icon_base_url + "blizzard/btn-ability-kerrigan-fury.png",
- "Ability Efficiency (Kerrigan Tier 6)": github_icon_base_url + "blizzard/btn-ability-kerrigan-abilityefficiency.png",
- "Apocalypse (Kerrigan Tier 7)": github_icon_base_url + "blizzard/btn-ability-kerrigan-apocalypse.png",
- "Spawn Leviathan (Kerrigan Tier 7)": github_icon_base_url + "blizzard/btn-unit-zerg-leviathan.png",
- "Drop-Pods (Kerrigan Tier 7)": github_icon_base_url + "blizzard/btn-ability-kerrigan-droppods.png",
-
- "Protoss Ground Weapon Level 1": github_icon_base_url + "blizzard/btn-upgrade-protoss-groundweaponslevel1.png",
- "Protoss Ground Weapon Level 2": github_icon_base_url + "blizzard/btn-upgrade-protoss-groundweaponslevel2.png",
- "Protoss Ground Weapon Level 3": github_icon_base_url + "blizzard/btn-upgrade-protoss-groundweaponslevel3.png",
- "Protoss Ground Armor Level 1": github_icon_base_url + "blizzard/btn-upgrade-protoss-groundarmorlevel1.png",
- "Protoss Ground Armor Level 2": github_icon_base_url + "blizzard/btn-upgrade-protoss-groundarmorlevel2.png",
- "Protoss Ground Armor Level 3": github_icon_base_url + "blizzard/btn-upgrade-protoss-groundarmorlevel3.png",
- "Protoss Shields Level 1": github_icon_base_url + "blizzard/btn-upgrade-protoss-shieldslevel1.png",
- "Protoss Shields Level 2": github_icon_base_url + "blizzard/btn-upgrade-protoss-shieldslevel2.png",
- "Protoss Shields Level 3": github_icon_base_url + "blizzard/btn-upgrade-protoss-shieldslevel3.png",
- "Protoss Air Weapon Level 1": github_icon_base_url + "blizzard/btn-upgrade-protoss-airweaponslevel1.png",
- "Protoss Air Weapon Level 2": github_icon_base_url + "blizzard/btn-upgrade-protoss-airweaponslevel2.png",
- "Protoss Air Weapon Level 3": github_icon_base_url + "blizzard/btn-upgrade-protoss-airweaponslevel3.png",
- "Protoss Air Armor Level 1": github_icon_base_url + "blizzard/btn-upgrade-protoss-airarmorlevel1.png",
- "Protoss Air Armor Level 2": github_icon_base_url + "blizzard/btn-upgrade-protoss-airarmorlevel2.png",
- "Protoss Air Armor Level 3": github_icon_base_url + "blizzard/btn-upgrade-protoss-airarmorlevel3.png",
-
- "Quatro": github_icon_base_url + "blizzard/btn-progression-protoss-fenix-6-forgeresearch.png",
-
- "Photon Cannon": github_icon_base_url + "blizzard/btn-building-protoss-photoncannon.png",
- "Khaydarin Monolith": github_icon_base_url + "blizzard/btn-unit-protoss-khaydarinmonolith.png",
- "Shield Battery": github_icon_base_url + "blizzard/btn-building-protoss-shieldbattery.png",
-
- "Enhanced Targeting": github_icon_base_url + "blizzard/btn-upgrade-karax-turretrange.png",
- "Optimized Ordnance": github_icon_base_url + "blizzard/btn-upgrade-karax-turretattackspeed.png",
- "Khalai Ingenuity": github_icon_base_url + "blizzard/btn-upgrade-karax-pylonwarpininstantly.png",
- "Orbital Assimilators": github_icon_base_url + "blizzard/btn-ability-spearofadun-orbitalassimilator.png",
- "Amplified Assimilators": github_icon_base_url + "original/btn-research-terran-microfiltering.png",
- "Warp Harmonization": github_icon_base_url + "blizzard/btn-ability-spearofadun-warpharmonization.png",
- "Superior Warp Gates": github_icon_base_url + "blizzard/talent-artanis-level03-warpgatecharges.png",
- "Nexus Overcharge": github_icon_base_url + "blizzard/btn-ability-spearofadun-nexusovercharge.png",
-
- "Zealot": github_icon_base_url + "blizzard/btn-unit-protoss-zealot-aiur.png",
- "Centurion": github_icon_base_url + "blizzard/btn-unit-protoss-zealot-nerazim.png",
- "Sentinel": github_icon_base_url + "blizzard/btn-unit-protoss-zealot-purifier.png",
- "Supplicant": github_icon_base_url + "blizzard/btn-unit-protoss-alarak-taldarim-supplicant.png",
- "Sentry": github_icon_base_url + "blizzard/btn-unit-protoss-sentry.png",
- "Energizer": github_icon_base_url + "blizzard/btn-unit-protoss-sentry-purifier.png",
- "Havoc": github_icon_base_url + "blizzard/btn-unit-protoss-sentry-taldarim.png",
- "Stalker": "https://static.wikia.nocookie.net/starcraft/images/0/0d/Icon_Protoss_Stalker.jpg",
- "Instigator": github_icon_base_url + "blizzard/btn-unit-protoss-stalker-purifier.png",
- "Slayer": github_icon_base_url + "blizzard/btn-unit-protoss-alarak-taldarim-stalker.png",
- "Dragoon": github_icon_base_url + "blizzard/btn-unit-protoss-dragoon-void.png",
- "Adept": github_icon_base_url + "blizzard/btn-unit-protoss-adept-purifier.png",
- "High Templar": "https://static.wikia.nocookie.net/starcraft/images/a/a0/Icon_Protoss_High_Templar.jpg",
- "Signifier": github_icon_base_url + "original/btn-unit-protoss-hightemplar-nerazim.png",
- "Ascendant": github_icon_base_url + "blizzard/btn-unit-protoss-hightemplar-taldarim.png",
- "Dark Archon": github_icon_base_url + "blizzard/talent-vorazun-level05-unlockdarkarchon.png",
- "Dark Templar": "https://static.wikia.nocookie.net/starcraft/images/9/90/Icon_Protoss_Dark_Templar.jpg",
- "Avenger": github_icon_base_url + "blizzard/btn-unit-protoss-darktemplar-aiur.png",
- "Blood Hunter": github_icon_base_url + "blizzard/btn-unit-protoss-darktemplar-taldarim.png",
-
- "Leg Enhancements (Zealot/Sentinel/Centurion)": github_icon_base_url + "blizzard/btn-ability-protoss-charge-color.png",
- "Shield Capacity (Zealot/Sentinel/Centurion)": github_icon_base_url + "blizzard/btn-upgrade-protoss-shieldslevel1.png",
- "Blood Shield (Supplicant)": github_icon_base_url + "blizzard/btn-upgrade-protoss-alarak-supplicantarmor.png",
- "Soul Augmentation (Supplicant)": github_icon_base_url + "blizzard/btn-upgrade-protoss-alarak-supplicantextrashields.png",
- "Shield Regeneration (Supplicant)": github_icon_base_url + "blizzard/btn-ability-protoss-voidarmor.png",
- "Force Field (Sentry)": github_icon_base_url + "blizzard/btn-ability-protoss-forcefield-color.png",
- "Hallucination (Sentry)": github_icon_base_url + "blizzard/btn-ability-protoss-hallucination-color.png",
- "Reclamation (Energizer)": github_icon_base_url + "blizzard/btn-ability-protoss-reclamation.png",
- "Forged Chassis (Energizer)": github_icon_base_url + "blizzard/btn-upgrade-protoss-groundarmorlevel0.png",
- "Detect Weakness (Havoc)": github_icon_base_url + "blizzard/btn-upgrade-protoss-alarak-havoctargetlockbuffed.png",
- "Bloodshard Resonance (Havoc)": github_icon_base_url + "blizzard/btn-upgrade-protoss-alarak-rangeincrease.png",
- "Cloaking Module (Sentry/Energizer/Havoc)": github_icon_base_url + "blizzard/btn-upgrade-protoss-alarak-permanentcloak.png",
- "Rapid Recharging (Sentry/Energizer/Havoc/Shield Battery)": github_icon_base_url + "blizzard/btn-upgrade-karax-energyregen200.png",
- "Disintegrating Particles (Stalker/Instigator/Slayer)": github_icon_base_url + "blizzard/btn-ability-protoss-phasedisruptor.png",
- "Particle Reflection (Stalker/Instigator/Slayer)": github_icon_base_url + "blizzard/btn-upgrade-protoss-fenix-adeptchampionbounceattack.png",
- "High Impact Phase Disruptor (Dragoon)": github_icon_base_url + "blizzard/btn-ability-protoss-phasedisruptor.png",
- "Trillic Compression System (Dragoon)": github_icon_base_url + "blizzard/btn-ability-protoss-dragoonchassis.png",
- "Singularity Charge (Dragoon)": github_icon_base_url + "blizzard/btn-upgrade-artanis-singularitycharge.png",
- "Enhanced Strider Servos (Dragoon)": github_icon_base_url + "blizzard/btn-upgrade-terran-transformationservos.png",
- "Shockwave (Adept)": github_icon_base_url + "blizzard/btn-upgrade-protoss-fenix-adept-recochetglaiveupgraded.png",
- "Resonating Glaives (Adept)": github_icon_base_url + "blizzard/btn-upgrade-protoss-resonatingglaives.png",
- "Phase Bulwark (Adept)": github_icon_base_url + "blizzard/btn-upgrade-protoss-adeptshieldupgrade.png",
- "Unshackled Psionic Storm (High Templar/Signifier)": github_icon_base_url + "blizzard/btn-ability-protoss-psistorm.png",
- "Hallucination (High Templar/Signifier)": github_icon_base_url + "blizzard/btn-ability-protoss-hallucination-color.png",
- "Khaydarin Amulet (High Templar/Signifier)": github_icon_base_url + "blizzard/btn-upgrade-protoss-khaydarinamulet.png",
- "High Archon (Archon)": github_icon_base_url + "blizzard/btn-upgrade-artanis-healingpsionicstorm.png",
- "Power Overwhelming (Ascendant)": github_icon_base_url + "blizzard/btn-upgrade-protoss-alarak-ascendantspermanentlybetter.png",
- "Chaotic Attunement (Ascendant)": github_icon_base_url + "blizzard/btn-upgrade-protoss-alarak-ascendant'spsiorbtravelsfurther.png",
- "Blood Amulet (Ascendant)": github_icon_base_url + "blizzard/btn-upgrade-protoss-wrathwalker-chargetimeimproved.png",
- "Feedback (Dark Archon)": github_icon_base_url + "blizzard/btn-ability-protoss-feedback-color.png",
- "Maelstrom (Dark Archon)": github_icon_base_url + "blizzard/btn-ability-protoss-voidstasis.png",
- "Argus Talisman (Dark Archon)": github_icon_base_url + "original/btn-upgrade-protoss-argustalisman@scbw.png",
- "Dark Archon Meld (Dark Templar)": github_icon_base_url + "blizzard/talent-vorazun-level05-unlockdarkarchon.png",
- "Shroud of Adun (Dark Templar/Avenger/Blood Hunter)": github_icon_base_url + "blizzard/talent-vorazun-level01-shadowstalk.png",
- "Shadow Guard Training (Dark Templar/Avenger/Blood Hunter)": github_icon_base_url + "blizzard/btn-ability-terran-heal-color.png",
- "Blink (Dark Templar/Avenger/Blood Hunter)": github_icon_base_url + "blizzard/btn-ability-protoss-shadowdash.png",
- "Resource Efficiency (Dark Templar/Avenger/Blood Hunter)": github_icon_base_url + "blizzard/btn-ability-hornerhan-salvagebonus.png",
-
- "Warp Prism": github_icon_base_url + "blizzard/btn-unit-protoss-warpprism.png",
- "Immortal": "https://static.wikia.nocookie.net/starcraft/images/c/c1/Icon_Protoss_Immortal.jpg",
- "Annihilator": github_icon_base_url + "blizzard/btn-unit-protoss-immortal-nerazim.png",
- "Vanguard": github_icon_base_url + "blizzard/btn-unit-protoss-immortal-taldarim.png",
- "Colossus": github_icon_base_url + "blizzard/btn-unit-protoss-colossus-purifier.png",
- "Wrathwalker": github_icon_base_url + "blizzard/btn-unit-protoss-colossus-taldarim.png",
- "Observer": github_icon_base_url + "blizzard/btn-unit-protoss-observer.png",
- "Reaver": github_icon_base_url + "blizzard/btn-unit-protoss-reaver.png",
- "Disruptor": github_icon_base_url + "blizzard/btn-unit-protoss-disruptor.png",
-
- "Gravitic Drive (Warp Prism)": github_icon_base_url + "blizzard/btn-upgrade-protoss-graviticdrive.png",
- "Phase Blaster (Warp Prism)": github_icon_base_url + "blizzard/btn-upgrade-protoss-airweaponslevel0.png",
- "War Configuration (Warp Prism)": github_icon_base_url + "blizzard/btn-upgrade-protoss-alarak-graviticdrive.png",
- "Singularity Charge (Immortal/Annihilator)": github_icon_base_url + "blizzard/btn-upgrade-artanis-singularitycharge.png",
- "Advanced Targeting Mechanics (Immortal/Annihilator)": github_icon_base_url + "blizzard/btn-ability-terran-detectionconedebuff.png",
- "Agony Launchers (Vanguard)": github_icon_base_url + "blizzard/btn-upgrade-protoss-vanguard-aoeradiusincreased.png",
- "Matter Dispersion (Vanguard)": github_icon_base_url + "blizzard/btn-ability-terran-detectionconedebuff.png",
- "Pacification Protocol (Colossus)": github_icon_base_url + "blizzard/btn-ability-protoss-chargedblast.png",
- "Rapid Power Cycling (Wrathwalker)": github_icon_base_url + "blizzard/btn-upgrade-protoss-wrathwalker-chargetimeimproved.png",
- "Eye of Wrath (Wrathwalker)": github_icon_base_url + "blizzard/btn-upgrade-protoss-extendedthermallance.png",
- "Gravitic Boosters (Observer)": github_icon_base_url + "blizzard/btn-upgrade-protoss-graviticbooster.png",
- "Sensor Array (Observer)": github_icon_base_url + "blizzard/btn-ability-zeratul-observer-sensorarray.png",
- "Scarab Damage (Reaver)": github_icon_base_url + "blizzard/btn-ability-protoss-scarabshot.png",
- "Solarite Payload (Reaver)": github_icon_base_url + "blizzard/btn-upgrade-artanis-scarabsplashradius.png",
- "Reaver Capacity (Reaver)": github_icon_base_url + "original/btn-upgrade-protoss-increasedscarabcapacity@scbw.png",
- "Resource Efficiency (Reaver)": github_icon_base_url + "blizzard/btn-ability-hornerhan-salvagebonus.png",
-
- "Phoenix": "https://static.wikia.nocookie.net/starcraft/images/b/b1/Icon_Protoss_Phoenix.jpg",
- "Mirage": github_icon_base_url + "blizzard/btn-unit-protoss-phoenix-purifier.png",
- "Corsair": github_icon_base_url + "blizzard/btn-unit-protoss-corsair.png",
- "Destroyer": github_icon_base_url + "blizzard/btn-unit-protoss-voidray-taldarim.png",
- "Void Ray": github_icon_base_url + "blizzard/btn-unit-protoss-voidray-nerazim.png",
- "Carrier": "https://static.wikia.nocookie.net/starcraft/images/2/2c/Icon_Protoss_Carrier.jpg",
- "Scout": github_icon_base_url + "original/btn-unit-protoss-scout.png",
- "Tempest": github_icon_base_url + "blizzard/btn-unit-protoss-tempest-purifier.png",
- "Mothership": github_icon_base_url + "blizzard/btn-unit-protoss-mothership-taldarim.png",
- "Arbiter": github_icon_base_url + "blizzard/btn-unit-protoss-arbiter.png",
- "Oracle": github_icon_base_url + "blizzard/btn-unit-protoss-oracle.png",
-
- "Ionic Wavelength Flux (Phoenix/Mirage)": github_icon_base_url + "blizzard/btn-upgrade-protoss-airweaponslevel0.png",
- "Anion Pulse-Crystals (Phoenix/Mirage)": github_icon_base_url + "blizzard/btn-upgrade-protoss-phoenixrange.png",
- "Stealth Drive (Corsair)": github_icon_base_url + "blizzard/btn-upgrade-vorazun-corsairpermanentlycloaked.png",
- "Argus Jewel (Corsair)": github_icon_base_url + "blizzard/btn-ability-protoss-stasistrap.png",
- "Sustaining Disruption (Corsair)": github_icon_base_url + "blizzard/btn-ability-protoss-disruptionweb.png",
- "Neutron Shields (Corsair)": github_icon_base_url + "blizzard/btn-upgrade-protoss-shieldslevel1.png",
- "Reforged Bloodshard Core (Destroyer)": github_icon_base_url + "blizzard/btn-amonshardsarmor.png",
- "Flux Vanes (Void Ray/Destroyer)": github_icon_base_url + "blizzard/btn-upgrade-protoss-fluxvanes.png",
- "Graviton Catapult (Carrier)": github_icon_base_url + "blizzard/btn-upgrade-protoss-gravitoncatapult.png",
- "Hull of Past Glories (Carrier)": github_icon_base_url + "blizzard/btn-progression-protoss-fenix-14-colossusandcarrierchampionsresearch.png",
- "Combat Sensor Array (Scout)": github_icon_base_url + "blizzard/btn-upgrade-protoss-fenix-scoutchampionrange.png",
- "Apial Sensors (Scout)": github_icon_base_url + "blizzard/btn-upgrade-tychus-detection.png",
- "Gravitic Thrusters (Scout)": github_icon_base_url + "blizzard/btn-upgrade-protoss-graviticbooster.png",
- "Advanced Photon Blasters (Scout)": github_icon_base_url + "blizzard/btn-upgrade-protoss-airweaponslevel3.png",
- "Tectonic Destabilizers (Tempest)": github_icon_base_url + "blizzard/btn-ability-protoss-disruptionblast.png",
- "Quantic Reactor (Tempest)": github_icon_base_url + "blizzard/btn-upgrade-protoss-researchgravitysling.png",
- "Gravity Sling (Tempest)": github_icon_base_url + "blizzard/btn-upgrade-protoss-tectonicdisruptors.png",
- "Chronostatic Reinforcement (Arbiter)": github_icon_base_url + "blizzard/btn-upgrade-protoss-airarmorlevel2.png",
- "Khaydarin Core (Arbiter)": github_icon_base_url + "blizzard/btn-upgrade-protoss-adeptshieldupgrade.png",
- "Spacetime Anchor (Arbiter)": github_icon_base_url + "blizzard/btn-ability-protoss-stasisfield.png",
- "Resource Efficiency (Arbiter)": github_icon_base_url + "blizzard/btn-ability-hornerhan-salvagebonus.png",
- "Enhanced Cloak Field (Arbiter)": github_icon_base_url + "blizzard/btn-ability-stetmann-stetzonegenerator-speed.png",
- "Stealth Drive (Oracle)": github_icon_base_url + "blizzard/btn-upgrade-vorazun-oraclepermanentlycloaked.png",
- "Stasis Calibration (Oracle)": github_icon_base_url + "blizzard/btn-ability-protoss-oracle-stasiscalibration.png",
- "Temporal Acceleration Beam (Oracle)": github_icon_base_url + "blizzard/btn-ability-protoss-oraclepulsarcannonon.png",
-
- "Matrix Overload": github_icon_base_url + "blizzard/btn-ability-spearofadun-matrixoverload.png",
- "Guardian Shell": github_icon_base_url + "blizzard/btn-ability-spearofadun-guardianshell.png",
-
- "Chrono Surge (Spear of Adun Calldown)": github_icon_base_url + "blizzard/btn-ability-spearofadun-chronosurge.png",
- "Proxy Pylon (Spear of Adun Calldown)": github_icon_base_url + "blizzard/btn-ability-spearofadun-deploypylon.png",
- "Warp In Reinforcements (Spear of Adun Calldown)": github_icon_base_url + "blizzard/btn-ability-spearofadun-warpinreinforcements.png",
- "Pylon Overcharge (Spear of Adun Calldown)": github_icon_base_url + "blizzard/btn-ability-protoss-purify.png",
- "Orbital Strike (Spear of Adun Calldown)": github_icon_base_url + "blizzard/btn-ability-spearofadun-orbitalstrike.png",
- "Temporal Field (Spear of Adun Calldown)": github_icon_base_url + "blizzard/btn-ability-spearofadun-temporalfield.png",
- "Solar Lance (Spear of Adun Calldown)": github_icon_base_url + "blizzard/btn-ability-spearofadun-solarlance.png",
- "Mass Recall (Spear of Adun Calldown)": github_icon_base_url + "blizzard/btn-ability-spearofadun-massrecall.png",
- "Shield Overcharge (Spear of Adun Calldown)": github_icon_base_url + "blizzard/btn-ability-spearofadun-shieldovercharge.png",
- "Deploy Fenix (Spear of Adun Calldown)": github_icon_base_url + "blizzard/btn-unit-protoss-fenix.png",
- "Purifier Beam (Spear of Adun Calldown)": github_icon_base_url + "blizzard/btn-ability-spearofadun-purifierbeam.png",
- "Time Stop (Spear of Adun Calldown)": github_icon_base_url + "blizzard/btn-ability-spearofadun-timestop.png",
- "Solar Bombardment (Spear of Adun Calldown)": github_icon_base_url + "blizzard/btn-ability-spearofadun-solarbombardment.png",
-
- "Reconstruction Beam (Spear of Adun Auto-Cast)": github_icon_base_url + "blizzard/btn-ability-spearofadun-reconstructionbeam.png",
- "Overwatch (Spear of Adun Auto-Cast)": github_icon_base_url + "blizzard/btn-ability-zeratul-chargedcrystal-psionicwinds.png",
-
- "Nothing": "",
- }
- sc2wol_location_ids = {
- "Liberation Day": range(SC2WOL_LOC_ID_OFFSET + 100, SC2WOL_LOC_ID_OFFSET + 200),
- "The Outlaws": range(SC2WOL_LOC_ID_OFFSET + 200, SC2WOL_LOC_ID_OFFSET + 300),
- "Zero Hour": range(SC2WOL_LOC_ID_OFFSET + 300, SC2WOL_LOC_ID_OFFSET + 400),
- "Evacuation": range(SC2WOL_LOC_ID_OFFSET + 400, SC2WOL_LOC_ID_OFFSET + 500),
- "Outbreak": range(SC2WOL_LOC_ID_OFFSET + 500, SC2WOL_LOC_ID_OFFSET + 600),
- "Safe Haven": range(SC2WOL_LOC_ID_OFFSET + 600, SC2WOL_LOC_ID_OFFSET + 700),
- "Haven's Fall": range(SC2WOL_LOC_ID_OFFSET + 700, SC2WOL_LOC_ID_OFFSET + 800),
- "Smash and Grab": range(SC2WOL_LOC_ID_OFFSET + 800, SC2WOL_LOC_ID_OFFSET + 900),
- "The Dig": range(SC2WOL_LOC_ID_OFFSET + 900, SC2WOL_LOC_ID_OFFSET + 1000),
- "The Moebius Factor": range(SC2WOL_LOC_ID_OFFSET + 1000, SC2WOL_LOC_ID_OFFSET + 1100),
- "Supernova": range(SC2WOL_LOC_ID_OFFSET + 1100, SC2WOL_LOC_ID_OFFSET + 1200),
- "Maw of the Void": range(SC2WOL_LOC_ID_OFFSET + 1200, SC2WOL_LOC_ID_OFFSET + 1300),
- "Devil's Playground": range(SC2WOL_LOC_ID_OFFSET + 1300, SC2WOL_LOC_ID_OFFSET + 1400),
- "Welcome to the Jungle": range(SC2WOL_LOC_ID_OFFSET + 1400, SC2WOL_LOC_ID_OFFSET + 1500),
- "Breakout": range(SC2WOL_LOC_ID_OFFSET + 1500, SC2WOL_LOC_ID_OFFSET + 1600),
- "Ghost of a Chance": range(SC2WOL_LOC_ID_OFFSET + 1600, SC2WOL_LOC_ID_OFFSET + 1700),
- "The Great Train Robbery": range(SC2WOL_LOC_ID_OFFSET + 1700, SC2WOL_LOC_ID_OFFSET + 1800),
- "Cutthroat": range(SC2WOL_LOC_ID_OFFSET + 1800, SC2WOL_LOC_ID_OFFSET + 1900),
- "Engine of Destruction": range(SC2WOL_LOC_ID_OFFSET + 1900, SC2WOL_LOC_ID_OFFSET + 2000),
- "Media Blitz": range(SC2WOL_LOC_ID_OFFSET + 2000, SC2WOL_LOC_ID_OFFSET + 2100),
- "Piercing the Shroud": range(SC2WOL_LOC_ID_OFFSET + 2100, SC2WOL_LOC_ID_OFFSET + 2200),
- "Whispers of Doom": range(SC2WOL_LOC_ID_OFFSET + 2200, SC2WOL_LOC_ID_OFFSET + 2300),
- "A Sinister Turn": range(SC2WOL_LOC_ID_OFFSET + 2300, SC2WOL_LOC_ID_OFFSET + 2400),
- "Echoes of the Future": range(SC2WOL_LOC_ID_OFFSET + 2400, SC2WOL_LOC_ID_OFFSET + 2500),
- "In Utter Darkness": range(SC2WOL_LOC_ID_OFFSET + 2500, SC2WOL_LOC_ID_OFFSET + 2600),
- "Gates of Hell": range(SC2WOL_LOC_ID_OFFSET + 2600, SC2WOL_LOC_ID_OFFSET + 2700),
- "Belly of the Beast": range(SC2WOL_LOC_ID_OFFSET + 2700, SC2WOL_LOC_ID_OFFSET + 2800),
- "Shatter the Sky": range(SC2WOL_LOC_ID_OFFSET + 2800, SC2WOL_LOC_ID_OFFSET + 2900),
- "All-In": range(SC2WOL_LOC_ID_OFFSET + 2900, SC2WOL_LOC_ID_OFFSET + 3000),
-
- "Lab Rat": range(SC2HOTS_LOC_ID_OFFSET + 100, SC2HOTS_LOC_ID_OFFSET + 200),
- "Back in the Saddle": range(SC2HOTS_LOC_ID_OFFSET + 200, SC2HOTS_LOC_ID_OFFSET + 300),
- "Rendezvous": range(SC2HOTS_LOC_ID_OFFSET + 300, SC2HOTS_LOC_ID_OFFSET + 400),
- "Harvest of Screams": range(SC2HOTS_LOC_ID_OFFSET + 400, SC2HOTS_LOC_ID_OFFSET + 500),
- "Shoot the Messenger": range(SC2HOTS_LOC_ID_OFFSET + 500, SC2HOTS_LOC_ID_OFFSET + 600),
- "Enemy Within": range(SC2HOTS_LOC_ID_OFFSET + 600, SC2HOTS_LOC_ID_OFFSET + 700),
- "Domination": range(SC2HOTS_LOC_ID_OFFSET + 700, SC2HOTS_LOC_ID_OFFSET + 800),
- "Fire in the Sky": range(SC2HOTS_LOC_ID_OFFSET + 800, SC2HOTS_LOC_ID_OFFSET + 900),
- "Old Soldiers": range(SC2HOTS_LOC_ID_OFFSET + 900, SC2HOTS_LOC_ID_OFFSET + 1000),
- "Waking the Ancient": range(SC2HOTS_LOC_ID_OFFSET + 1000, SC2HOTS_LOC_ID_OFFSET + 1100),
- "The Crucible": range(SC2HOTS_LOC_ID_OFFSET + 1100, SC2HOTS_LOC_ID_OFFSET + 1200),
- "Supreme": range(SC2HOTS_LOC_ID_OFFSET + 1200, SC2HOTS_LOC_ID_OFFSET + 1300),
- "Infested": range(SC2HOTS_LOC_ID_OFFSET + 1300, SC2HOTS_LOC_ID_OFFSET + 1400),
- "Hand of Darkness": range(SC2HOTS_LOC_ID_OFFSET + 1400, SC2HOTS_LOC_ID_OFFSET + 1500),
- "Phantoms of the Void": range(SC2HOTS_LOC_ID_OFFSET + 1500, SC2HOTS_LOC_ID_OFFSET + 1600),
- "With Friends Like These": range(SC2HOTS_LOC_ID_OFFSET + 1600, SC2HOTS_LOC_ID_OFFSET + 1700),
- "Conviction": range(SC2HOTS_LOC_ID_OFFSET + 1700, SC2HOTS_LOC_ID_OFFSET + 1800),
- "Planetfall": range(SC2HOTS_LOC_ID_OFFSET + 1800, SC2HOTS_LOC_ID_OFFSET + 1900),
- "Death From Above": range(SC2HOTS_LOC_ID_OFFSET + 1900, SC2HOTS_LOC_ID_OFFSET + 2000),
- "The Reckoning": range(SC2HOTS_LOC_ID_OFFSET + 2000, SC2HOTS_LOC_ID_OFFSET + 2100),
-
- "Dark Whispers": range(SC2LOTV_LOC_ID_OFFSET + 100, SC2LOTV_LOC_ID_OFFSET + 200),
- "Ghosts in the Fog": range(SC2LOTV_LOC_ID_OFFSET + 200, SC2LOTV_LOC_ID_OFFSET + 300),
- "Evil Awoken": range(SC2LOTV_LOC_ID_OFFSET + 300, SC2LOTV_LOC_ID_OFFSET + 400),
-
- "For Aiur!": range(SC2LOTV_LOC_ID_OFFSET + 400, SC2LOTV_LOC_ID_OFFSET + 500),
- "The Growing Shadow": range(SC2LOTV_LOC_ID_OFFSET + 500, SC2LOTV_LOC_ID_OFFSET + 600),
- "The Spear of Adun": range(SC2LOTV_LOC_ID_OFFSET + 600, SC2LOTV_LOC_ID_OFFSET + 700),
- "Sky Shield": range(SC2LOTV_LOC_ID_OFFSET + 700, SC2LOTV_LOC_ID_OFFSET + 800),
- "Brothers in Arms": range(SC2LOTV_LOC_ID_OFFSET + 800, SC2LOTV_LOC_ID_OFFSET + 900),
- "Amon's Reach": range(SC2LOTV_LOC_ID_OFFSET + 900, SC2LOTV_LOC_ID_OFFSET + 1000),
- "Last Stand": range(SC2LOTV_LOC_ID_OFFSET + 1000, SC2LOTV_LOC_ID_OFFSET + 1100),
- "Forbidden Weapon": range(SC2LOTV_LOC_ID_OFFSET + 1100, SC2LOTV_LOC_ID_OFFSET + 1200),
- "Temple of Unification": range(SC2LOTV_LOC_ID_OFFSET + 1200, SC2LOTV_LOC_ID_OFFSET + 1300),
- "The Infinite Cycle": range(SC2LOTV_LOC_ID_OFFSET + 1300, SC2LOTV_LOC_ID_OFFSET + 1400),
- "Harbinger of Oblivion": range(SC2LOTV_LOC_ID_OFFSET + 1400, SC2LOTV_LOC_ID_OFFSET + 1500),
- "Unsealing the Past": range(SC2LOTV_LOC_ID_OFFSET + 1500, SC2LOTV_LOC_ID_OFFSET + 1600),
- "Purification": range(SC2LOTV_LOC_ID_OFFSET + 1600, SC2LOTV_LOC_ID_OFFSET + 1700),
- "Steps of the Rite": range(SC2LOTV_LOC_ID_OFFSET + 1700, SC2LOTV_LOC_ID_OFFSET + 1800),
- "Rak'Shir": range(SC2LOTV_LOC_ID_OFFSET + 1800, SC2LOTV_LOC_ID_OFFSET + 1900),
- "Templar's Charge": range(SC2LOTV_LOC_ID_OFFSET + 1900, SC2LOTV_LOC_ID_OFFSET + 2000),
- "Templar's Return": range(SC2LOTV_LOC_ID_OFFSET + 2000, SC2LOTV_LOC_ID_OFFSET + 2100),
- "The Host": range(SC2LOTV_LOC_ID_OFFSET + 2100, SC2LOTV_LOC_ID_OFFSET + 2200),
- "Salvation": range(SC2LOTV_LOC_ID_OFFSET + 2200, SC2LOTV_LOC_ID_OFFSET + 2300),
-
- "Into the Void": range(SC2LOTV_LOC_ID_OFFSET + 2300, SC2LOTV_LOC_ID_OFFSET + 2400),
- "The Essence of Eternity": range(SC2LOTV_LOC_ID_OFFSET + 2400, SC2LOTV_LOC_ID_OFFSET + 2500),
- "Amon's Fall": range(SC2LOTV_LOC_ID_OFFSET + 2500, SC2LOTV_LOC_ID_OFFSET + 2600),
-
- "The Escape": range(SC2NCO_LOC_ID_OFFSET + 100, SC2NCO_LOC_ID_OFFSET + 200),
- "Sudden Strike": range(SC2NCO_LOC_ID_OFFSET + 200, SC2NCO_LOC_ID_OFFSET + 300),
- "Enemy Intelligence": range(SC2NCO_LOC_ID_OFFSET + 300, SC2NCO_LOC_ID_OFFSET + 400),
- "Trouble In Paradise": range(SC2NCO_LOC_ID_OFFSET + 400, SC2NCO_LOC_ID_OFFSET + 500),
- "Night Terrors": range(SC2NCO_LOC_ID_OFFSET + 500, SC2NCO_LOC_ID_OFFSET + 600),
- "Flashpoint": range(SC2NCO_LOC_ID_OFFSET + 600, SC2NCO_LOC_ID_OFFSET + 700),
- "In the Enemy's Shadow": range(SC2NCO_LOC_ID_OFFSET + 700, SC2NCO_LOC_ID_OFFSET + 800),
- "Dark Skies": range(SC2NCO_LOC_ID_OFFSET + 800, SC2NCO_LOC_ID_OFFSET + 900),
- "End Game": range(SC2NCO_LOC_ID_OFFSET + 900, SC2NCO_LOC_ID_OFFSET + 1000),
- }
+ inventory: collections.Counter[int] = tracker_data.get_player_inventory_counts(team, player)
+ item_id_to_name = tracker_data.item_id_to_name["Starcraft 2"]
+ location_id_to_name = tracker_data.location_id_to_name["Starcraft 2"]
+ # Filler item counters
display_data = {}
-
- # Grouped Items
- grouped_item_ids = {
- "Progressive Terran Weapon Upgrade": 107 + SC2WOL_ITEM_ID_OFFSET,
- "Progressive Terran Armor Upgrade": 108 + SC2WOL_ITEM_ID_OFFSET,
- "Progressive Terran Infantry Upgrade": 109 + SC2WOL_ITEM_ID_OFFSET,
- "Progressive Terran Vehicle Upgrade": 110 + SC2WOL_ITEM_ID_OFFSET,
- "Progressive Terran Ship Upgrade": 111 + SC2WOL_ITEM_ID_OFFSET,
- "Progressive Terran Weapon/Armor Upgrade": 112 + SC2WOL_ITEM_ID_OFFSET,
- "Progressive Zerg Weapon Upgrade": 105 + SC2HOTS_ITEM_ID_OFFSET,
- "Progressive Zerg Armor Upgrade": 106 + SC2HOTS_ITEM_ID_OFFSET,
- "Progressive Zerg Ground Upgrade": 107 + SC2HOTS_ITEM_ID_OFFSET,
- "Progressive Zerg Flyer Upgrade": 108 + SC2HOTS_ITEM_ID_OFFSET,
- "Progressive Zerg Weapon/Armor Upgrade": 109 + SC2HOTS_ITEM_ID_OFFSET,
- "Progressive Protoss Weapon Upgrade": 105 + SC2LOTV_ITEM_ID_OFFSET,
- "Progressive Protoss Armor Upgrade": 106 + SC2LOTV_ITEM_ID_OFFSET,
- "Progressive Protoss Ground Upgrade": 107 + SC2LOTV_ITEM_ID_OFFSET,
- "Progressive Protoss Air Upgrade": 108 + SC2LOTV_ITEM_ID_OFFSET,
- "Progressive Protoss Weapon/Armor Upgrade": 109 + SC2LOTV_ITEM_ID_OFFSET,
- }
- grouped_item_replacements = {
- "Progressive Terran Weapon Upgrade": ["Progressive Terran Infantry Weapon",
- "Progressive Terran Vehicle Weapon",
- "Progressive Terran Ship Weapon"],
- "Progressive Terran Armor Upgrade": ["Progressive Terran Infantry Armor",
- "Progressive Terran Vehicle Armor",
- "Progressive Terran Ship Armor"],
- "Progressive Terran Infantry Upgrade": ["Progressive Terran Infantry Weapon",
- "Progressive Terran Infantry Armor"],
- "Progressive Terran Vehicle Upgrade": ["Progressive Terran Vehicle Weapon",
- "Progressive Terran Vehicle Armor"],
- "Progressive Terran Ship Upgrade": ["Progressive Terran Ship Weapon", "Progressive Terran Ship Armor"],
- "Progressive Zerg Weapon Upgrade": ["Progressive Zerg Melee Attack", "Progressive Zerg Missile Attack",
- "Progressive Zerg Flyer Attack"],
- "Progressive Zerg Armor Upgrade": ["Progressive Zerg Ground Carapace",
- "Progressive Zerg Flyer Carapace"],
- "Progressive Zerg Ground Upgrade": ["Progressive Zerg Melee Attack", "Progressive Zerg Missile Attack",
- "Progressive Zerg Ground Carapace"],
- "Progressive Zerg Flyer Upgrade": ["Progressive Zerg Flyer Attack", "Progressive Zerg Flyer Carapace"],
- "Progressive Protoss Weapon Upgrade": ["Progressive Protoss Ground Weapon",
- "Progressive Protoss Air Weapon"],
- "Progressive Protoss Armor Upgrade": ["Progressive Protoss Ground Armor", "Progressive Protoss Shields",
- "Progressive Protoss Air Armor"],
- "Progressive Protoss Ground Upgrade": ["Progressive Protoss Ground Weapon",
- "Progressive Protoss Ground Armor",
- "Progressive Protoss Shields"],
- "Progressive Protoss Air Upgrade": ["Progressive Protoss Air Weapon", "Progressive Protoss Air Armor",
- "Progressive Protoss Shields"]
- }
- grouped_item_replacements["Progressive Terran Weapon/Armor Upgrade"] = \
- grouped_item_replacements["Progressive Terran Weapon Upgrade"] \
- + grouped_item_replacements["Progressive Terran Armor Upgrade"]
- grouped_item_replacements["Progressive Zerg Weapon/Armor Upgrade"] = \
- grouped_item_replacements["Progressive Zerg Weapon Upgrade"] \
- + grouped_item_replacements["Progressive Zerg Armor Upgrade"]
- grouped_item_replacements["Progressive Protoss Weapon/Armor Upgrade"] = \
- grouped_item_replacements["Progressive Protoss Weapon Upgrade"] \
- + grouped_item_replacements["Progressive Protoss Armor Upgrade"]
- replacement_item_ids = {
- "Progressive Terran Infantry Weapon": 100 + SC2WOL_ITEM_ID_OFFSET,
- "Progressive Terran Infantry Armor": 102 + SC2WOL_ITEM_ID_OFFSET,
- "Progressive Terran Vehicle Weapon": 103 + SC2WOL_ITEM_ID_OFFSET,
- "Progressive Terran Vehicle Armor": 104 + SC2WOL_ITEM_ID_OFFSET,
- "Progressive Terran Ship Weapon": 105 + SC2WOL_ITEM_ID_OFFSET,
- "Progressive Terran Ship Armor": 106 + SC2WOL_ITEM_ID_OFFSET,
- "Progressive Zerg Melee Attack": 100 + SC2HOTS_ITEM_ID_OFFSET,
- "Progressive Zerg Missile Attack": 101 + SC2HOTS_ITEM_ID_OFFSET,
- "Progressive Zerg Ground Carapace": 102 + SC2HOTS_ITEM_ID_OFFSET,
- "Progressive Zerg Flyer Attack": 103 + SC2HOTS_ITEM_ID_OFFSET,
- "Progressive Zerg Flyer Carapace": 104 + SC2HOTS_ITEM_ID_OFFSET,
- "Progressive Protoss Ground Weapon": 100 + SC2LOTV_ITEM_ID_OFFSET,
- "Progressive Protoss Ground Armor": 101 + SC2LOTV_ITEM_ID_OFFSET,
- "Progressive Protoss Shields": 102 + SC2LOTV_ITEM_ID_OFFSET,
- "Progressive Protoss Air Weapon": 103 + SC2LOTV_ITEM_ID_OFFSET,
- "Progressive Protoss Air Armor": 104 + SC2LOTV_ITEM_ID_OFFSET,
- }
-
- inventory: collections.Counter = tracker_data.get_player_inventory_counts(team, player)
- for grouped_item_name, grouped_item_id in grouped_item_ids.items():
- count: int = inventory[grouped_item_id]
- if count > 0:
- for replacement_item in grouped_item_replacements[grouped_item_name]:
- replacement_id: int = replacement_item_ids[replacement_item]
- if replacement_id not in inventory or count > inventory[replacement_id]:
- # If two groups provide the same individual item, maximum is used
- # (this behavior is used for Protoss Shields)
- inventory[replacement_id] = count
-
- # Determine display for progressive items
- progressive_items = {
- "Progressive Terran Infantry Weapon": 100 + SC2WOL_ITEM_ID_OFFSET,
- "Progressive Terran Infantry Armor": 102 + SC2WOL_ITEM_ID_OFFSET,
- "Progressive Terran Vehicle Weapon": 103 + SC2WOL_ITEM_ID_OFFSET,
- "Progressive Terran Vehicle Armor": 104 + SC2WOL_ITEM_ID_OFFSET,
- "Progressive Terran Ship Weapon": 105 + SC2WOL_ITEM_ID_OFFSET,
- "Progressive Terran Ship Armor": 106 + SC2WOL_ITEM_ID_OFFSET,
- "Progressive Fire-Suppression System": 206 + SC2WOL_ITEM_ID_OFFSET,
- "Progressive Orbital Command": 207 + SC2WOL_ITEM_ID_OFFSET,
- "Progressive Stimpack (Marine)": 208 + SC2WOL_ITEM_ID_OFFSET,
- "Progressive Stimpack (Firebat)": 226 + SC2WOL_ITEM_ID_OFFSET,
- "Progressive Stimpack (Marauder)": 228 + SC2WOL_ITEM_ID_OFFSET,
- "Progressive Stimpack (Reaper)": 250 + SC2WOL_ITEM_ID_OFFSET,
- "Progressive Stimpack (Hellion)": 259 + SC2WOL_ITEM_ID_OFFSET,
- "Progressive Replenishable Magazine (Vulture)": 303 + SC2WOL_ITEM_ID_OFFSET,
- "Progressive Tri-Lithium Power Cell (Diamondback)": 306 + SC2WOL_ITEM_ID_OFFSET,
- "Progressive Tomahawk Power Cells (Wraith)": 312 + SC2WOL_ITEM_ID_OFFSET,
- "Progressive Cross-Spectrum Dampeners (Banshee)": 316 + SC2WOL_ITEM_ID_OFFSET,
- "Progressive Missile Pods (Battlecruiser)": 318 + SC2WOL_ITEM_ID_OFFSET,
- "Progressive Defensive Matrix (Battlecruiser)": 319 + SC2WOL_ITEM_ID_OFFSET,
- "Progressive Immortality Protocol (Thor)": 325 + SC2WOL_ITEM_ID_OFFSET,
- "Progressive High Impact Payload (Thor)": 361 + SC2WOL_ITEM_ID_OFFSET,
- "Progressive Augmented Thrusters (Planetary Fortress)": 388 + SC2WOL_ITEM_ID_OFFSET,
- "Progressive Regenerative Bio-Steel": 617 + SC2WOL_ITEM_ID_OFFSET,
- "Progressive Stealth Suit Module (Nova Suit Module)": 904 + SC2WOL_ITEM_ID_OFFSET,
- "Progressive Zerg Melee Attack": 100 + SC2HOTS_ITEM_ID_OFFSET,
- "Progressive Zerg Missile Attack": 101 + SC2HOTS_ITEM_ID_OFFSET,
- "Progressive Zerg Ground Carapace": 102 + SC2HOTS_ITEM_ID_OFFSET,
- "Progressive Zerg Flyer Attack": 103 + SC2HOTS_ITEM_ID_OFFSET,
- "Progressive Zerg Flyer Carapace": 104 + SC2HOTS_ITEM_ID_OFFSET,
- "Progressive Protoss Ground Weapon": 100 + SC2LOTV_ITEM_ID_OFFSET,
- "Progressive Protoss Ground Armor": 101 + SC2LOTV_ITEM_ID_OFFSET,
- "Progressive Protoss Shields": 102 + SC2LOTV_ITEM_ID_OFFSET,
- "Progressive Protoss Air Weapon": 103 + SC2LOTV_ITEM_ID_OFFSET,
- "Progressive Protoss Air Armor": 104 + SC2LOTV_ITEM_ID_OFFSET,
- "Progressive Proxy Pylon (Spear of Adun Calldown)": 701 + SC2LOTV_ITEM_ID_OFFSET,
- }
- # Format: L0, L1, L2, L3
- progressive_names = {
- "Progressive Terran Infantry Weapon": ["Terran Infantry Weapons Level 1",
- "Terran Infantry Weapons Level 1",
- "Terran Infantry Weapons Level 2",
- "Terran Infantry Weapons Level 3"],
- "Progressive Terran Infantry Armor": ["Terran Infantry Armor Level 1",
- "Terran Infantry Armor Level 1",
- "Terran Infantry Armor Level 2",
- "Terran Infantry Armor Level 3"],
- "Progressive Terran Vehicle Weapon": ["Terran Vehicle Weapons Level 1",
- "Terran Vehicle Weapons Level 1",
- "Terran Vehicle Weapons Level 2",
- "Terran Vehicle Weapons Level 3"],
- "Progressive Terran Vehicle Armor": ["Terran Vehicle Armor Level 1",
- "Terran Vehicle Armor Level 1",
- "Terran Vehicle Armor Level 2",
- "Terran Vehicle Armor Level 3"],
- "Progressive Terran Ship Weapon": ["Terran Ship Weapons Level 1",
- "Terran Ship Weapons Level 1",
- "Terran Ship Weapons Level 2",
- "Terran Ship Weapons Level 3"],
- "Progressive Terran Ship Armor": ["Terran Ship Armor Level 1",
- "Terran Ship Armor Level 1",
- "Terran Ship Armor Level 2",
- "Terran Ship Armor Level 3"],
- "Progressive Fire-Suppression System": ["Fire-Suppression System Level 1",
- "Fire-Suppression System Level 1",
- "Fire-Suppression System Level 2"],
- "Progressive Orbital Command": ["Orbital Command", "Orbital Command",
- "Planetary Command Module"],
- "Progressive Stimpack (Marine)": ["Stimpack (Marine)", "Stimpack (Marine)",
- "Super Stimpack (Marine)"],
- "Progressive Stimpack (Firebat)": ["Stimpack (Firebat)", "Stimpack (Firebat)",
- "Super Stimpack (Firebat)"],
- "Progressive Stimpack (Marauder)": ["Stimpack (Marauder)", "Stimpack (Marauder)",
- "Super Stimpack (Marauder)"],
- "Progressive Stimpack (Reaper)": ["Stimpack (Reaper)", "Stimpack (Reaper)",
- "Super Stimpack (Reaper)"],
- "Progressive Stimpack (Hellion)": ["Stimpack (Hellion)", "Stimpack (Hellion)",
- "Super Stimpack (Hellion)"],
- "Progressive Replenishable Magazine (Vulture)": ["Replenishable Magazine (Vulture)",
- "Replenishable Magazine (Vulture)",
- "Replenishable Magazine (Free) (Vulture)"],
- "Progressive Tri-Lithium Power Cell (Diamondback)": ["Tri-Lithium Power Cell (Diamondback)",
- "Tri-Lithium Power Cell (Diamondback)",
- "Tungsten Spikes (Diamondback)"],
- "Progressive Tomahawk Power Cells (Wraith)": ["Tomahawk Power Cells (Wraith)",
- "Tomahawk Power Cells (Wraith)",
- "Unregistered Cloaking Module (Wraith)"],
- "Progressive Cross-Spectrum Dampeners (Banshee)": ["Cross-Spectrum Dampeners (Banshee)",
- "Cross-Spectrum Dampeners (Banshee)",
- "Advanced Cross-Spectrum Dampeners (Banshee)"],
- "Progressive Missile Pods (Battlecruiser)": ["Missile Pods (Battlecruiser) Level 1",
- "Missile Pods (Battlecruiser) Level 1",
- "Missile Pods (Battlecruiser) Level 2"],
- "Progressive Defensive Matrix (Battlecruiser)": ["Defensive Matrix (Battlecruiser)",
- "Defensive Matrix (Battlecruiser)",
- "Advanced Defensive Matrix (Battlecruiser)"],
- "Progressive Immortality Protocol (Thor)": ["Immortality Protocol (Thor)",
- "Immortality Protocol (Thor)",
- "Immortality Protocol (Free) (Thor)"],
- "Progressive High Impact Payload (Thor)": ["High Impact Payload (Thor)",
- "High Impact Payload (Thor)", "Smart Servos (Thor)"],
- "Progressive Augmented Thrusters (Planetary Fortress)": ["Lift Off (Planetary Fortress)",
- "Lift Off (Planetary Fortress)",
- "Armament Stabilizers (Planetary Fortress)"],
- "Progressive Regenerative Bio-Steel": ["Regenerative Bio-Steel Level 1",
- "Regenerative Bio-Steel Level 1",
- "Regenerative Bio-Steel Level 2",
- "Regenerative Bio-Steel Level 3"],
- "Progressive Stealth Suit Module (Nova Suit Module)": ["Stealth Suit Module (Nova Suit Module)",
- "Cloak (Nova Suit Module)",
- "Permanently Cloaked (Nova Suit Module)"],
- "Progressive Zerg Melee Attack": ["Zerg Melee Attack Level 1",
- "Zerg Melee Attack Level 1",
- "Zerg Melee Attack Level 2",
- "Zerg Melee Attack Level 3"],
- "Progressive Zerg Missile Attack": ["Zerg Missile Attack Level 1",
- "Zerg Missile Attack Level 1",
- "Zerg Missile Attack Level 2",
- "Zerg Missile Attack Level 3"],
- "Progressive Zerg Ground Carapace": ["Zerg Ground Carapace Level 1",
- "Zerg Ground Carapace Level 1",
- "Zerg Ground Carapace Level 2",
- "Zerg Ground Carapace Level 3"],
- "Progressive Zerg Flyer Attack": ["Zerg Flyer Attack Level 1",
- "Zerg Flyer Attack Level 1",
- "Zerg Flyer Attack Level 2",
- "Zerg Flyer Attack Level 3"],
- "Progressive Zerg Flyer Carapace": ["Zerg Flyer Carapace Level 1",
- "Zerg Flyer Carapace Level 1",
- "Zerg Flyer Carapace Level 2",
- "Zerg Flyer Carapace Level 3"],
- "Progressive Protoss Ground Weapon": ["Protoss Ground Weapon Level 1",
- "Protoss Ground Weapon Level 1",
- "Protoss Ground Weapon Level 2",
- "Protoss Ground Weapon Level 3"],
- "Progressive Protoss Ground Armor": ["Protoss Ground Armor Level 1",
- "Protoss Ground Armor Level 1",
- "Protoss Ground Armor Level 2",
- "Protoss Ground Armor Level 3"],
- "Progressive Protoss Shields": ["Protoss Shields Level 1", "Protoss Shields Level 1",
- "Protoss Shields Level 2", "Protoss Shields Level 3"],
- "Progressive Protoss Air Weapon": ["Protoss Air Weapon Level 1",
- "Protoss Air Weapon Level 1",
- "Protoss Air Weapon Level 2",
- "Protoss Air Weapon Level 3"],
- "Progressive Protoss Air Armor": ["Protoss Air Armor Level 1",
- "Protoss Air Armor Level 1",
- "Protoss Air Armor Level 2",
- "Protoss Air Armor Level 3"],
- "Progressive Proxy Pylon (Spear of Adun Calldown)": ["Proxy Pylon (Spear of Adun Calldown)",
- "Proxy Pylon (Spear of Adun Calldown)",
- "Warp In Reinforcements (Spear of Adun Calldown)"]
- }
- for item_name, item_id in progressive_items.items():
- level = min(inventory[item_id], len(progressive_names[item_name]) - 1)
- display_name = progressive_names[item_name][level]
- base_name = (item_name.split(maxsplit=1)[1].lower()
- .replace(' ', '_')
- .replace("-", "")
- .replace("(", "")
- .replace(")", ""))
- display_data[base_name + "_level"] = level
- display_data[base_name + "_url"] = icons[display_name] if display_name in icons else "FIXME"
- display_data[base_name + "_name"] = display_name
-
- # Multi-items
- multi_items = {
- "Additional Starting Minerals": 800 + SC2WOL_ITEM_ID_OFFSET,
- "Additional Starting Vespene": 801 + SC2WOL_ITEM_ID_OFFSET,
- "Additional Starting Supply": 802 + SC2WOL_ITEM_ID_OFFSET
- }
- for item_name, item_id in multi_items.items():
- base_name = item_name.split()[-1].lower()
- count = inventory[item_id]
- if base_name == "supply":
- count = count * starting_supply_per_item
- elif base_name == "minerals":
- count = count * minerals_per_item
- elif base_name == "vespene":
- count = count * vespene_per_item
- display_data[base_name + "_count"] = count
- # Kerrigan level
- level_items = {
- "1 Kerrigan Level": 509 + SC2HOTS_ITEM_ID_OFFSET,
- "2 Kerrigan Levels": 508 + SC2HOTS_ITEM_ID_OFFSET,
- "3 Kerrigan Levels": 507 + SC2HOTS_ITEM_ID_OFFSET,
- "4 Kerrigan Levels": 506 + SC2HOTS_ITEM_ID_OFFSET,
- "5 Kerrigan Levels": 505 + SC2HOTS_ITEM_ID_OFFSET,
- "6 Kerrigan Levels": 504 + SC2HOTS_ITEM_ID_OFFSET,
- "7 Kerrigan Levels": 503 + SC2HOTS_ITEM_ID_OFFSET,
- "8 Kerrigan Levels": 502 + SC2HOTS_ITEM_ID_OFFSET,
- "9 Kerrigan Levels": 501 + SC2HOTS_ITEM_ID_OFFSET,
- "10 Kerrigan Levels": 500 + SC2HOTS_ITEM_ID_OFFSET,
- "14 Kerrigan Levels": 510 + SC2HOTS_ITEM_ID_OFFSET,
- "35 Kerrigan Levels": 511 + SC2HOTS_ITEM_ID_OFFSET,
- "70 Kerrigan Levels": 512 + SC2HOTS_ITEM_ID_OFFSET,
- }
- level_amounts = {
- "1 Kerrigan Level": 1,
- "2 Kerrigan Levels": 2,
- "3 Kerrigan Levels": 3,
- "4 Kerrigan Levels": 4,
- "5 Kerrigan Levels": 5,
- "6 Kerrigan Levels": 6,
- "7 Kerrigan Levels": 7,
- "8 Kerrigan Levels": 8,
- "9 Kerrigan Levels": 9,
- "10 Kerrigan Levels": 10,
- "14 Kerrigan Levels": 14,
- "35 Kerrigan Levels": 35,
- "70 Kerrigan Levels": 70,
- }
- kerrigan_level = 0
- for item_name, item_id in level_items.items():
- count = inventory[item_id]
- amount = level_amounts[item_name]
- kerrigan_level += count * amount
- display_data["kerrigan_level"] = kerrigan_level
-
- # Victory condition
- game_state = tracker_data.get_player_client_status(team, player)
- display_data["game_finished"] = game_state == 30
-
- # Turn location IDs into mission objective counts
+ display_data["minerals_count"] = slot_data.get("minerals_per_item", 15) * inventory.get(STARTING_MINERALS_ITEM_ID, 0)
+ display_data["vespene_count"] = slot_data.get("vespene_per_item", 15) * inventory.get(STARTING_VESPENE_ITEM_ID, 0)
+ display_data["supply_count"] = slot_data.get("starting_supply_per_item", 2) * inventory.get(STARTING_SUPPLY_ITEM_ID, 0)
+ display_data["max_supply_count"] = slot_data.get("maximum_supply_per_item", 1) * inventory.get(MAX_SUPPLY_ITEM_ID, 0)
+ display_data["reduced_supply_count"] = slot_data.get("maximum_supply_reduction_per_item", 1) * inventory.get(REDUCED_MAX_SUPPLY_ITEM_ID, 0)
+ display_data["construction_speed_count"] = inventory.get(BUILDING_CONSTRUCTION_SPEED_ITEM_ID, 0)
+ display_data["shield_regen_count"] = inventory.get(SHIELD_REGENERATION_ITEM_ID, 0)
+ display_data["upgrade_speed_count"] = inventory.get(UPGRADE_RESEARCH_SPEED_ITEM_ID, 0)
+ display_data["research_cost_count"] = inventory.get(UPGRADE_RESEARCH_COST_ITEM_ID, 0)
+
+ # Locations
+ have_nco_locations = False
locations = tracker_data.get_player_locations(team, player)
checked_locations = tracker_data.get_player_checked_locations(team, player)
- lookup_name = lambda id: tracker_data.location_id_to_name["Starcraft 2"][id]
- location_info = {mission_name: {lookup_name(id): (id in checked_locations) for id in mission_locations if
- id in set(locations)} for mission_name, mission_locations in
- sc2wol_location_ids.items()}
- checks_done = {mission_name: len(
- [id for id in mission_locations if id in checked_locations and id in set(locations)]) for
- mission_name, mission_locations in sc2wol_location_ids.items()}
- checks_done['Total'] = len(checked_locations)
- checks_in_area = {mission_name: len([id for id in mission_locations if id in set(locations)]) for
- mission_name, mission_locations in sc2wol_location_ids.items()}
- checks_in_area['Total'] = sum(checks_in_area.values())
+ missions: dict[str, list[tuple[str, bool]]] = {}
+ for location_id in locations:
+ location_name = location_id_to_name.get(location_id, "")
+ if ":" not in location_name:
+ continue
+ mission_name = location_name.split(":", 1)[0]
+ missions.setdefault(mission_name, []).append((location_name, location_id in checked_locations))
+ if location_id >= NCO_LOCATION_ID_LOW and location_id < NCO_LOCATION_ID_HIGH:
+ have_nco_locations = True
+ missions = {mission: missions[mission] for mission in sorted(missions)}
+
+ # Kerrigan level
+ level_item_id_to_amount = (
+ (509 + SC2HOTS_ITEM_ID_OFFSET, 1,),
+ (508 + SC2HOTS_ITEM_ID_OFFSET, 2,),
+ (507 + SC2HOTS_ITEM_ID_OFFSET, 3,),
+ (506 + SC2HOTS_ITEM_ID_OFFSET, 4,),
+ (505 + SC2HOTS_ITEM_ID_OFFSET, 5,),
+ (504 + SC2HOTS_ITEM_ID_OFFSET, 6,),
+ (503 + SC2HOTS_ITEM_ID_OFFSET, 7,),
+ (502 + SC2HOTS_ITEM_ID_OFFSET, 8,),
+ (501 + SC2HOTS_ITEM_ID_OFFSET, 9,),
+ (500 + SC2HOTS_ITEM_ID_OFFSET, 10,),
+ (510 + SC2HOTS_ITEM_ID_OFFSET, 14,),
+ (511 + SC2HOTS_ITEM_ID_OFFSET, 35,),
+ (512 + SC2HOTS_ITEM_ID_OFFSET, 70,),
+ )
+ kerrigan_level = 0
+ for item_id, levels_per_item in level_item_id_to_amount:
+ kerrigan_level += levels_per_item * inventory[item_id]
+ display_data["kerrigan_level"] = kerrigan_level
+
+ # Hero presence
+ display_data["kerrigan_present"] = slot_data.get("kerrigan_presence", 0) == 0
+ display_data["nova_present"] = have_nco_locations
+
+ # Upgrades
+ TERRAN_INFANTRY_WEAPON_ID = 100 + SC2WOL_ITEM_ID_OFFSET
+ TERRAN_INFANTRY_ARMOR_ID = 102 + SC2WOL_ITEM_ID_OFFSET
+ TERRAN_VEHICLE_WEAPON_ID = 103 + SC2WOL_ITEM_ID_OFFSET
+ TERRAN_VEHICLE_ARMOR_ID = 104 + SC2WOL_ITEM_ID_OFFSET
+ TERRAN_SHIP_WEAPON_ID = 105 + SC2WOL_ITEM_ID_OFFSET
+ TERRAN_SHIP_ARMOR_ID = 106 + SC2WOL_ITEM_ID_OFFSET
+ ZERG_MELEE_ATTACK_ID = 100 + SC2HOTS_ITEM_ID_OFFSET
+ ZERG_MISSILE_ATTACK_ID = 101 + SC2HOTS_ITEM_ID_OFFSET
+ ZERG_GROUND_CARAPACE_ID = 102 + SC2HOTS_ITEM_ID_OFFSET
+ ZERG_FLYER_ATTACK_ID = 103 + SC2HOTS_ITEM_ID_OFFSET
+ ZERG_FLYER_CARAPACE_ID = 104 + SC2HOTS_ITEM_ID_OFFSET
+ PROTOSS_GROUND_WEAPON_ID = 100 + SC2LOTV_ITEM_ID_OFFSET
+ PROTOSS_GROUND_ARMOR_ID = 101 + SC2LOTV_ITEM_ID_OFFSET
+ PROTOSS_SHIELDS_ID = 102 + SC2LOTV_ITEM_ID_OFFSET
+ PROTOSS_AIR_WEAPON_ID = 103 + SC2LOTV_ITEM_ID_OFFSET
+ PROTOSS_AIR_ARMOR_ID = 104 + SC2LOTV_ITEM_ID_OFFSET
+
+ # Bundles
+ TERRAN_WEAPON_UPGRADE_ID = 107 + SC2WOL_ITEM_ID_OFFSET
+ TERRAN_ARMOR_UPGRADE_ID = 108 + SC2WOL_ITEM_ID_OFFSET
+ TERRAN_INFANTRY_UPGRADE_ID = 109 + SC2WOL_ITEM_ID_OFFSET
+ TERRAN_VEHICLE_UPGRADE_ID = 110 + SC2WOL_ITEM_ID_OFFSET
+ TERRAN_SHIP_UPGRADE_ID = 111 + SC2WOL_ITEM_ID_OFFSET
+ TERRAN_WEAPON_ARMOR_UPGRADE_ID = 112 + SC2WOL_ITEM_ID_OFFSET
+ ZERG_WEAPON_UPGRADE_ID = 105 + SC2HOTS_ITEM_ID_OFFSET
+ ZERG_ARMOR_UPGRADE_ID = 106 + SC2HOTS_ITEM_ID_OFFSET
+ ZERG_GROUND_UPGRADE_ID = 107 + SC2HOTS_ITEM_ID_OFFSET
+ ZERG_FLYER_UPGRADE_ID = 108 + SC2HOTS_ITEM_ID_OFFSET
+ ZERG_WEAPON_ARMOR_UPGRADE_ID = 109 + SC2HOTS_ITEM_ID_OFFSET
+ PROTOSS_WEAPON_UPGRADE_ID = 105 + SC2LOTV_ITEM_ID_OFFSET
+ PROTOSS_ARMOR_UPGRADE_ID = 106 + SC2LOTV_ITEM_ID_OFFSET
+ PROTOSS_GROUND_UPGRADE_ID = 107 + SC2LOTV_ITEM_ID_OFFSET
+ PROTOSS_AIR_UPGRADE_ID = 108 + SC2LOTV_ITEM_ID_OFFSET
+ PROTOSS_WEAPON_ARMOR_UPGRADE_ID = 109 + SC2LOTV_ITEM_ID_OFFSET
+ grouped_item_replacements = {
+ TERRAN_WEAPON_UPGRADE_ID: [
+ TERRAN_INFANTRY_WEAPON_ID,
+ TERRAN_VEHICLE_WEAPON_ID,
+ TERRAN_SHIP_WEAPON_ID,
+ ],
+ TERRAN_ARMOR_UPGRADE_ID: [
+ TERRAN_INFANTRY_ARMOR_ID,
+ TERRAN_VEHICLE_ARMOR_ID,
+ TERRAN_SHIP_ARMOR_ID,
+ ],
+ TERRAN_INFANTRY_UPGRADE_ID: [
+ TERRAN_INFANTRY_WEAPON_ID,
+ TERRAN_INFANTRY_ARMOR_ID,
+ ],
+ TERRAN_VEHICLE_UPGRADE_ID: [
+ TERRAN_VEHICLE_WEAPON_ID,
+ TERRAN_VEHICLE_ARMOR_ID,
+ ],
+ TERRAN_SHIP_UPGRADE_ID: [
+ TERRAN_SHIP_WEAPON_ID,
+ TERRAN_SHIP_ARMOR_ID
+ ],
+ ZERG_WEAPON_UPGRADE_ID: [
+ ZERG_MELEE_ATTACK_ID,
+ ZERG_MISSILE_ATTACK_ID,
+ ZERG_FLYER_ATTACK_ID,
+ ],
+ ZERG_ARMOR_UPGRADE_ID: [
+ ZERG_GROUND_CARAPACE_ID,
+ ZERG_FLYER_CARAPACE_ID,
+ ],
+ ZERG_GROUND_UPGRADE_ID: [
+ ZERG_MELEE_ATTACK_ID,
+ ZERG_MISSILE_ATTACK_ID,
+ ZERG_GROUND_CARAPACE_ID,
+ ],
+ ZERG_FLYER_UPGRADE_ID: [
+ ZERG_FLYER_ATTACK_ID,
+ ZERG_FLYER_CARAPACE_ID,
+ ],
+ PROTOSS_WEAPON_UPGRADE_ID: [
+ PROTOSS_GROUND_WEAPON_ID,
+ PROTOSS_AIR_WEAPON_ID,
+ ],
+ PROTOSS_ARMOR_UPGRADE_ID: [
+ PROTOSS_GROUND_ARMOR_ID,
+ PROTOSS_SHIELDS_ID,
+ PROTOSS_AIR_ARMOR_ID,
+ ],
+ PROTOSS_GROUND_UPGRADE_ID: [
+ PROTOSS_GROUND_WEAPON_ID,
+ PROTOSS_GROUND_ARMOR_ID,
+ PROTOSS_SHIELDS_ID,
+ ],
+ PROTOSS_AIR_UPGRADE_ID: [
+ PROTOSS_AIR_WEAPON_ID,
+ PROTOSS_AIR_ARMOR_ID,
+ PROTOSS_SHIELDS_ID,
+ ]
+ }
+ grouped_item_replacements[TERRAN_WEAPON_ARMOR_UPGRADE_ID] = (
+ grouped_item_replacements[TERRAN_WEAPON_UPGRADE_ID]
+ + grouped_item_replacements[TERRAN_ARMOR_UPGRADE_ID]
+ )
+ grouped_item_replacements[ZERG_WEAPON_ARMOR_UPGRADE_ID] = (
+ grouped_item_replacements[ZERG_WEAPON_UPGRADE_ID]
+ + grouped_item_replacements[ZERG_ARMOR_UPGRADE_ID]
+ )
+ grouped_item_replacements[PROTOSS_WEAPON_ARMOR_UPGRADE_ID] = (
+ grouped_item_replacements[PROTOSS_WEAPON_UPGRADE_ID]
+ + grouped_item_replacements[PROTOSS_ARMOR_UPGRADE_ID]
+ )
+ for bundle_id, upgrade_ids in grouped_item_replacements.items():
+ bundle_amount = inventory[bundle_id]
+ for upgrade_id in upgrade_ids:
+ if bundle_amount > inventory[upgrade_id]:
+ # Only assign, don't add.
+ # This behaviour mimics protoss shields, where the output is
+ # the maximum bundle contribution, not the sum
+ inventory[upgrade_id] = bundle_amount
+
+
+ # Victory condition
+ game_state = tracker_data.get_player_client_status(team, player)
+ display_data["game_finished"] = game_state == ClientStatus.CLIENT_GOAL
+
+ # Keys
+ keys: dict[str, int] = {}
+ for item_id, item_count in inventory.items():
+ if item_id < SC2_KEY_ITEM_ID_OFFSET:
+ continue
+ keys[item_id_to_name[item_id]] = item_count
- lookup_any_item_id_to_name = tracker_data.item_id_to_name["Starcraft 2"]
return render_template(
"tracker__Starcraft2.html",
inventory=inventory,
- icons=icons,
- acquired_items={lookup_any_item_id_to_name[id] for id, count in inventory.items() if count > 0},
player=player,
team=team,
room=tracker_data.room,
player_name=tracker_data.get_player_name(team, player),
- checks_done=checks_done,
- checks_in_area=checks_in_area,
- location_info=location_info,
+ missions=missions,
+ locations=locations,
+ checked_locations=checked_locations,
+ location_id_to_name=location_id_to_name,
+ item_id_to_name=item_id_to_name,
+ keys=keys,
+ saving_second=tracker_data.get_room_saving_second(),
**display_data,
)
+
_player_trackers["Starcraft 2"] = render_Starcraft2_tracker
diff --git a/worlds/LauncherComponents.py b/worlds/LauncherComponents.py
index 06c77ab0..7bd47d0b 100644
--- a/worlds/LauncherComponents.py
+++ b/worlds/LauncherComponents.py
@@ -229,8 +229,6 @@ components: List[Component] = [
Component('Zelda 1 Client', 'Zelda1Client', file_identifier=SuffixIdentifier('.aptloz')),
# ChecksFinder
Component('ChecksFinder Client', 'ChecksFinderClient'),
- # Starcraft 2
- Component('Starcraft 2 Client', 'Starcraft2Client'),
# Zillion
Component('Zillion Client', 'ZillionClient',
file_identifier=SuffixIdentifier('.apzl')),
diff --git a/worlds/_sc2common/bot/game_data.py b/worlds/_sc2common/bot/game_data.py
index 50f10bd6..ed0edf0b 100644
--- a/worlds/_sc2common/bot/game_data.py
+++ b/worlds/_sc2common/bot/game_data.py
@@ -19,7 +19,7 @@ class GameData:
"""
:param data:
"""
- self.abilities: Dict[int, AbilityData] = {}
+ self.abilities: Dict[int, AbilityData] = {a.ability_id: AbilityData(self, a) for a in data.abilities if a.available}
self.units: Dict[int, UnitTypeData] = {u.unit_id: UnitTypeData(self, u) for u in data.units if u.available}
self.upgrades: Dict[int, UpgradeData] = {u.upgrade_id: UpgradeData(self, u) for u in data.upgrades}
# Cached UnitTypeIds so that conversion does not take long. This needs to be moved elsewhere if a new GameData object is created multiple times per game
@@ -40,7 +40,7 @@ class AbilityData:
self._proto = proto
# What happens if we comment this out? Should this not be commented out? What is its purpose?
- assert self.id != 0
+ # assert self.id != 0 # let the world burn
def __repr__(self) -> str:
return f"AbilityData(name={self._proto.button_name})"
diff --git a/worlds/sc2/Client.py b/worlds/sc2/Client.py
deleted file mode 100644
index 77b13a5a..00000000
--- a/worlds/sc2/Client.py
+++ /dev/null
@@ -1,1630 +0,0 @@
-from __future__ import annotations
-
-import asyncio
-import copy
-import ctypes
-import enum
-import inspect
-import logging
-import multiprocessing
-import os.path
-import re
-import sys
-import tempfile
-import typing
-import queue
-import zipfile
-import io
-import random
-import concurrent.futures
-from pathlib import Path
-
-# CommonClient import first to trigger ModuleUpdater
-from CommonClient import CommonContext, server_loop, ClientCommandProcessor, gui_enabled, get_base_parser
-from Utils import init_logging, is_windows, async_start
-from . import ItemNames, Options
-from .ItemGroups import item_name_groups
-from .Options import (
- MissionOrder, KerriganPrimalStatus, kerrigan_unit_available, KerriganPresence,
- GameSpeed, GenericUpgradeItems, GenericUpgradeResearch, ColorChoice, GenericUpgradeMissions,
- LocationInclusion, ExtraLocations, MasteryLocations, ChallengeLocations, VanillaLocations,
- DisableForcedCamera, SkipCutscenes, GrantStoryTech, GrantStoryLevels, TakeOverAIAllies, RequiredTactics,
- SpearOfAdunPresence, SpearOfAdunPresentInNoBuild, SpearOfAdunAutonomouslyCastAbilityPresence,
- SpearOfAdunAutonomouslyCastPresentInNoBuild
-)
-
-
-if __name__ == "__main__":
- init_logging("SC2Client", exception_logger="Client")
-
-logger = logging.getLogger("Client")
-sc2_logger = logging.getLogger("Starcraft2")
-
-import nest_asyncio
-from worlds._sc2common import bot
-from worlds._sc2common.bot.data import Race
-from worlds._sc2common.bot.main import run_game
-from worlds._sc2common.bot.player import Bot
-from .Items import (lookup_id_to_name, get_full_item_list, ItemData, type_flaggroups, upgrade_numbers,
- upgrade_numbers_all)
-from .Locations import SC2WOL_LOC_ID_OFFSET, LocationType, SC2HOTS_LOC_ID_OFFSET
-from .MissionTables import (lookup_id_to_mission, SC2Campaign, lookup_name_to_mission,
- lookup_id_to_campaign, MissionConnection, SC2Mission, campaign_mission_table, SC2Race)
-from .Regions import MissionInfo
-
-import colorama
-from Options import Option
-from NetUtils import ClientStatus, NetworkItem, JSONtoTextParser, JSONMessagePart, add_json_item, add_json_location, add_json_text, JSONTypes
-from MultiServer import mark_raw
-
-pool = concurrent.futures.ThreadPoolExecutor(1)
-loop = asyncio.get_event_loop_policy().new_event_loop()
-nest_asyncio.apply(loop)
-MAX_BONUS: int = 28
-VICTORY_MODULO: int = 100
-
-# GitHub repo where the Map/mod data is hosted for /download_data command
-DATA_REPO_OWNER = "Ziktofel"
-DATA_REPO_NAME = "Archipelago-SC2-data"
-DATA_API_VERSION = "API3"
-
-# Bot controller
-CONTROLLER_HEALTH: int = 38281
-CONTROLLER2_HEALTH: int = 38282
-
-# Games
-STARCRAFT2 = "Starcraft 2"
-STARCRAFT2_WOL = "Starcraft 2 Wings of Liberty"
-
-
-# Data version file path.
-# This file is used to tell if the downloaded data are outdated
-# Associated with /download_data command
-def get_metadata_file() -> str:
- return os.environ["SC2PATH"] + os.sep + "ArchipelagoSC2Metadata.txt"
-
-
-class ConfigurableOptionType(enum.Enum):
- INTEGER = enum.auto()
- ENUM = enum.auto()
-
-class ConfigurableOptionInfo(typing.NamedTuple):
- name: str
- variable_name: str
- option_class: typing.Type[Option]
- option_type: ConfigurableOptionType = ConfigurableOptionType.ENUM
- can_break_logic: bool = False
-
-
-class ColouredMessage:
- def __init__(self, text: str = '', *, keep_markup: bool = False) -> None:
- self.parts: typing.List[dict] = []
- if text:
- self(text, keep_markup=keep_markup)
- def __call__(self, text: str, *, keep_markup: bool = False) -> 'ColouredMessage':
- add_json_text(self.parts, text, keep_markup=keep_markup)
- return self
- def coloured(self, text: str, colour: str) -> 'ColouredMessage':
- add_json_text(self.parts, text, type="color", color=colour)
- return self
- def location(self, location_id: int, player_id: int) -> 'ColouredMessage':
- add_json_location(self.parts, location_id, player_id)
- return self
- def item(self, item_id: int, player_id: int, flags: int = 0) -> 'ColouredMessage':
- add_json_item(self.parts, item_id, player_id, flags)
- return self
- def player(self, player_id: int) -> 'ColouredMessage':
- add_json_text(self.parts, str(player_id), type=JSONTypes.player_id)
- return self
- def send(self, ctx: SC2Context) -> None:
- ctx.on_print_json({"data": self.parts, "cmd": "PrintJSON"})
-
-
-class StarcraftClientProcessor(ClientCommandProcessor):
- ctx: SC2Context
-
- def formatted_print(self, text: str) -> None:
- """Prints with kivy formatting to the GUI, and also prints to command-line and to all logs"""
- # Note(mm): Bold/underline can help readability, but unfortunately the CommonClient does not filter bold tags from command-line output.
- # Regardless, using `on_print_json` to get formatted text in the GUI and output in the command-line and in the logs,
- # without having to branch code from CommonClient
- self.ctx.on_print_json({"data": [{"text": text, "keep_markup": True}]})
-
- def _cmd_difficulty(self, difficulty: str = "") -> bool:
- """Overrides the current difficulty set for the world. Takes the argument casual, normal, hard, or brutal"""
- options = difficulty.split()
- num_options = len(options)
-
- if num_options > 0:
- difficulty_choice = options[0].lower()
- if difficulty_choice == "casual":
- self.ctx.difficulty_override = 0
- elif difficulty_choice == "normal":
- self.ctx.difficulty_override = 1
- elif difficulty_choice == "hard":
- self.ctx.difficulty_override = 2
- elif difficulty_choice == "brutal":
- self.ctx.difficulty_override = 3
- else:
- self.output("Unable to parse difficulty '" + options[0] + "'")
- return False
-
- self.output("Difficulty set to " + options[0])
- return True
-
- else:
- if self.ctx.difficulty == -1:
- self.output("Please connect to a seed before checking difficulty.")
- else:
- current_difficulty = self.ctx.difficulty
- if self.ctx.difficulty_override >= 0:
- current_difficulty = self.ctx.difficulty_override
- self.output("Current difficulty: " + ["Casual", "Normal", "Hard", "Brutal"][current_difficulty])
- self.output("To change the difficulty, add the name of the difficulty after the command.")
- return False
-
-
- def _cmd_game_speed(self, game_speed: str = "") -> bool:
- """Overrides the current game speed for the world.
- Takes the arguments default, slower, slow, normal, fast, faster"""
- options = game_speed.split()
- num_options = len(options)
-
- if num_options > 0:
- speed_choice = options[0].lower()
- if speed_choice == "default":
- self.ctx.game_speed_override = 0
- elif speed_choice == "slower":
- self.ctx.game_speed_override = 1
- elif speed_choice == "slow":
- self.ctx.game_speed_override = 2
- elif speed_choice == "normal":
- self.ctx.game_speed_override = 3
- elif speed_choice == "fast":
- self.ctx.game_speed_override = 4
- elif speed_choice == "faster":
- self.ctx.game_speed_override = 5
- else:
- self.output("Unable to parse game speed '" + options[0] + "'")
- return False
-
- self.output("Game speed set to " + options[0])
- return True
-
- else:
- if self.ctx.game_speed == -1:
- self.output("Please connect to a seed before checking game speed.")
- else:
- current_speed = self.ctx.game_speed
- if self.ctx.game_speed_override >= 0:
- current_speed = self.ctx.game_speed_override
- self.output("Current game speed: "
- + ["Default", "Slower", "Slow", "Normal", "Fast", "Faster"][current_speed])
- self.output("To change the game speed, add the name of the speed after the command,"
- " or Default to select based on difficulty.")
- return False
-
- @mark_raw
- def _cmd_received(self, filter_search: str = "") -> bool:
- """List received items.
- Pass in a parameter to filter the search by partial item name or exact item group."""
- # Groups must be matched case-sensitively, so we properly capitalize the search term
- # eg. "Spear of Adun" over "Spear Of Adun" or "spear of adun"
- # This fails a lot of item name matches, but those should be found by partial name match
- formatted_filter_search = " ".join([(part.lower() if len(part) <= 3 else part.lower().capitalize()) for part in filter_search.split()])
-
- def item_matches_filter(item_name: str) -> bool:
- # The filter can be an exact group name or a partial item name
- # Partial item name can be matched case-insensitively
- if filter_search.lower() in item_name.lower():
- return True
- # The search term should already be formatted as a group name
- if formatted_filter_search in item_name_groups and item_name in item_name_groups[formatted_filter_search]:
- return True
- return False
-
- items = get_full_item_list()
- categorized_items: typing.Dict[SC2Race, typing.List[int]] = {}
- parent_to_child: typing.Dict[int, typing.List[int]] = {}
- items_received: typing.Dict[int, typing.List[NetworkItem]] = {}
- filter_match_count = 0
- for item in self.ctx.items_received:
- items_received.setdefault(item.item, []).append(item)
- items_received_set = set(items_received)
- for item_data in items.values():
- if item_data.parent_item:
- parent_to_child.setdefault(items[item_data.parent_item].code, []).append(item_data.code)
- else:
- categorized_items.setdefault(item_data.race, []).append(item_data.code)
- for faction in SC2Race:
- has_printed_faction_title = False
- def print_faction_title():
- if not has_printed_faction_title:
- self.formatted_print(f" [u]{faction.name}[/u] ")
-
- for item_id in categorized_items[faction]:
- item_name = self.ctx.item_names.lookup_in_game(item_id)
- received_child_items = items_received_set.intersection(parent_to_child.get(item_id, []))
- matching_children = [child for child in received_child_items
- if item_matches_filter(self.ctx.item_names.lookup_in_game(child))]
- received_items_of_this_type = items_received.get(item_id, [])
- item_is_match = item_matches_filter(item_name)
- if item_is_match or len(matching_children) > 0:
- # Print found item if it or its children match the filter
- if item_is_match:
- filter_match_count += len(received_items_of_this_type)
- for item in received_items_of_this_type:
- print_faction_title()
- has_printed_faction_title = True
- (ColouredMessage('* ').item(item.item, self.ctx.slot, flags=item.flags)
- (" from ").location(item.location, item.player)
- (" by ").player(item.player)
- ).send(self.ctx)
-
- if received_child_items:
- # We have this item's children
- if len(matching_children) == 0:
- # ...but none of them match the filter
- continue
-
- if not received_items_of_this_type:
- # We didn't receive the item itself
- print_faction_title()
- has_printed_faction_title = True
- ColouredMessage("- ").coloured(item_name, "black")(" - not obtained").send(self.ctx)
-
- for child_item in matching_children:
- received_items_of_this_type = items_received.get(child_item, [])
- for item in received_items_of_this_type:
- filter_match_count += len(received_items_of_this_type)
- (ColouredMessage(' * ').item(item.item, self.ctx.slot, flags=item.flags)
- (" from ").location(item.location, item.player)
- (" by ").player(item.player)
- ).send(self.ctx)
-
- non_matching_children = len(received_child_items) - len(matching_children)
- if non_matching_children > 0:
- self.formatted_print(f" + {non_matching_children} child items that don't match the filter")
- if filter_search == "":
- self.formatted_print(f"[b]Obtained: {len(self.ctx.items_received)} items[/b]")
- else:
- self.formatted_print(f"[b]Filter \"{filter_search}\" found {filter_match_count} out of {len(self.ctx.items_received)} obtained items[/b]")
- return True
-
- def _cmd_option(self, option_name: str = "", option_value: str = "") -> None:
- """Sets a Starcraft game option that can be changed after generation. Use "/option list" to see all options."""
-
- LOGIC_WARNING = f" *Note changing this may result in logically unbeatable games*\n"
-
- options = (
- ConfigurableOptionInfo('kerrigan_presence', 'kerrigan_presence', Options.KerriganPresence, can_break_logic=True),
- ConfigurableOptionInfo('soa_presence', 'spear_of_adun_presence', Options.SpearOfAdunPresence, can_break_logic=True),
- ConfigurableOptionInfo('soa_in_nobuilds', 'spear_of_adun_present_in_no_build', Options.SpearOfAdunPresentInNoBuild, can_break_logic=True),
- ConfigurableOptionInfo('control_ally', 'take_over_ai_allies', Options.TakeOverAIAllies, can_break_logic=True),
- ConfigurableOptionInfo('minerals_per_item', 'minerals_per_item', Options.MineralsPerItem, ConfigurableOptionType.INTEGER),
- ConfigurableOptionInfo('gas_per_item', 'vespene_per_item', Options.VespenePerItem, ConfigurableOptionType.INTEGER),
- ConfigurableOptionInfo('supply_per_item', 'starting_supply_per_item', Options.StartingSupplyPerItem, ConfigurableOptionType.INTEGER),
- ConfigurableOptionInfo('no_forced_camera', 'disable_forced_camera', Options.DisableForcedCamera),
- ConfigurableOptionInfo('skip_cutscenes', 'skip_cutscenes', Options.SkipCutscenes),
- )
-
- WARNING_COLOUR = "salmon"
- CMD_COLOUR = "slateblue"
- boolean_option_map = {
- 'y': 'true', 'yes': 'true', 'n': 'false', 'no': 'false',
- }
-
- help_message = ColouredMessage(inspect.cleandoc("""
- Options
- --------------------
- """))('\n')
- for option in options:
- option_help_text = inspect.cleandoc(option.option_class.__doc__ or "No description provided.").split('\n', 1)[0]
- help_message.coloured(option.name, CMD_COLOUR)(": " + " | ".join(option.option_class.options)
- + f" -- {option_help_text}\n")
- if option.can_break_logic:
- help_message.coloured(LOGIC_WARNING, WARNING_COLOUR)
- help_message("--------------------\nEnter an option without arguments to see its current value.\n")
-
- if not option_name or option_name == 'list' or option_name == 'help':
- help_message.send(self.ctx)
- return
- for option in options:
- if option_name == option.name:
- option_value = boolean_option_map.get(option_value, option_value)
- if not option_value:
- pass
- elif option.option_type == ConfigurableOptionType.ENUM and option_value in option.option_class.options:
- self.ctx.__dict__[option.variable_name] = option.option_class.options[option_value]
- elif option.option_type == ConfigurableOptionType.INTEGER:
- try:
- self.ctx.__dict__[option.variable_name] = int(option_value, base=0)
- except:
- self.output(f"{option_value} is not a valid integer")
- else:
- self.output(f"Unknown option value '{option_value}'")
- ColouredMessage(f"{option.name} is '{option.option_class.get_option_name(self.ctx.__dict__[option.variable_name])}'").send(self.ctx)
- break
- else:
- self.output(f"Unknown option '{option_name}'")
- help_message.send(self.ctx)
-
- def _cmd_color(self, faction: str = "", color: str = "") -> None:
- """Changes the player color for a given faction."""
- player_colors = [
- "White", "Red", "Blue", "Teal",
- "Purple", "Yellow", "Orange", "Green",
- "LightPink", "Violet", "LightGrey", "DarkGreen",
- "Brown", "LightGreen", "DarkGrey", "Pink",
- "Rainbow", "Random", "Default"
- ]
- var_names = {
- 'raynor': 'player_color_raynor',
- 'kerrigan': 'player_color_zerg',
- 'primal': 'player_color_zerg_primal',
- 'protoss': 'player_color_protoss',
- 'nova': 'player_color_nova',
- }
- faction = faction.lower()
- if not faction:
- for faction_name, key in var_names.items():
- self.output(f"Current player color for {faction_name}: {player_colors[self.ctx.__dict__[key]]}")
- self.output("To change your color, add the faction name and color after the command.")
- self.output("Available factions: " + ', '.join(var_names))
- self.output("Available colors: " + ', '.join(player_colors))
- return
- elif faction not in var_names:
- self.output(f"Unknown faction '{faction}'.")
- self.output("Available factions: " + ', '.join(var_names))
- return
- match_colors = [player_color.lower() for player_color in player_colors]
- if not color:
- self.output(f"Current player color for {faction}: {player_colors[self.ctx.__dict__[var_names[faction]]]}")
- self.output("To change this faction's colors, add the name of the color after the command.")
- self.output("Available colors: " + ', '.join(player_colors))
- else:
- if color.lower() not in match_colors:
- self.output(color + " is not a valid color. Available colors: " + ', '.join(player_colors))
- return
- if color.lower() == "random":
- color = random.choice(player_colors[:16])
- self.ctx.__dict__[var_names[faction]] = match_colors.index(color.lower())
- self.ctx.pending_color_update = True
- self.output(f"Color for {faction} set to " + player_colors[self.ctx.__dict__[var_names[faction]]])
-
- def _cmd_disable_mission_check(self) -> bool:
- """Disables the check to see if a mission is available to play. Meant for co-op runs where one player can play
- the next mission in a chain the other player is doing."""
- self.ctx.missions_unlocked = True
- sc2_logger.info("Mission check has been disabled")
- return True
-
- def _cmd_play(self, mission_id: str = "") -> bool:
- """Start a Starcraft 2 mission"""
-
- options = mission_id.split()
- num_options = len(options)
-
- if num_options > 0:
- mission_number = int(options[0])
-
- self.ctx.play_mission(mission_number)
-
- else:
- sc2_logger.info(
- "Mission ID needs to be specified. Use /unfinished or /available to view ids for available missions.")
- return False
-
- return True
-
- def _cmd_available(self) -> bool:
- """Get what missions are currently available to play"""
-
- request_available_missions(self.ctx)
- return True
-
- def _cmd_unfinished(self) -> bool:
- """Get what missions are currently available to play and have not had all locations checked"""
-
- request_unfinished_missions(self.ctx)
- return True
-
- @mark_raw
- def _cmd_set_path(self, path: str = '') -> bool:
- """Manually set the SC2 install directory (if the automatic detection fails)."""
- if path:
- os.environ["SC2PATH"] = path
- is_mod_installed_correctly()
- return True
- else:
- sc2_logger.warning("When using set_path, you must type the path to your SC2 install directory.")
- return False
-
- def _cmd_download_data(self) -> bool:
- """Download the most recent release of the necessary files for playing SC2 with
- Archipelago. Will overwrite existing files."""
- pool.submit(self._download_data)
- return True
-
- @staticmethod
- def _download_data() -> bool:
- if "SC2PATH" not in os.environ:
- check_game_install_path()
-
- if os.path.exists(get_metadata_file()):
- with open(get_metadata_file(), "r") as f:
- metadata = f.read()
- else:
- metadata = None
-
- tempzip, metadata = download_latest_release_zip(
- DATA_REPO_OWNER, DATA_REPO_NAME, DATA_API_VERSION, metadata=metadata, force_download=True)
-
- if tempzip:
- try:
- zipfile.ZipFile(tempzip).extractall(path=os.environ["SC2PATH"])
- sc2_logger.info(f"Download complete. Package installed.")
- if metadata is not None:
- with open(get_metadata_file(), "w") as f:
- f.write(metadata)
- finally:
- os.remove(tempzip)
- else:
- sc2_logger.warning("Download aborted/failed. Read the log for more information.")
- return False
- return True
-
-
-class SC2JSONtoTextParser(JSONtoTextParser):
- def __init__(self, ctx) -> None:
- self.handlers = {
- "ItemSend": self._handle_color,
- "ItemCheat": self._handle_color,
- "Hint": self._handle_color,
- }
- super().__init__(ctx)
-
- def _handle_color(self, node: JSONMessagePart) -> str:
- codes = node["color"].split(";")
- buffer = "".join(self.color_code(code) for code in codes if code in self.color_codes)
- return buffer + self._handle_text(node) + ''
-
- def color_code(self, code: str) -> str:
- return ''
-
-
-class SC2Context(CommonContext):
- command_processor = StarcraftClientProcessor
- game = STARCRAFT2
- items_handling = 0b111
-
- def __init__(self, *args, **kwargs) -> None:
- super(SC2Context, self).__init__(*args, **kwargs)
- self.raw_text_parser = SC2JSONtoTextParser(self)
-
- self.difficulty = -1
- self.game_speed = -1
- self.disable_forced_camera = 0
- self.skip_cutscenes = 0
- self.all_in_choice = 0
- self.mission_order = 0
- self.player_color_raynor = ColorChoice.option_blue
- self.player_color_zerg = ColorChoice.option_orange
- self.player_color_zerg_primal = ColorChoice.option_purple
- self.player_color_protoss = ColorChoice.option_blue
- self.player_color_nova = ColorChoice.option_dark_grey
- self.pending_color_update = False
- self.kerrigan_presence = 0
- self.kerrigan_primal_status = 0
- self.levels_per_check = 0
- self.checks_per_level = 1
- self.mission_req_table: typing.Dict[SC2Campaign, typing.Dict[str, MissionInfo]] = {}
- self.final_mission: int = 29
- self.announcements: queue.Queue = queue.Queue()
- self.sc2_run_task: typing.Optional[asyncio.Task] = None
- self.missions_unlocked: bool = False # allow launching missions ignoring requirements
- self.generic_upgrade_missions = 0
- self.generic_upgrade_research = 0
- self.generic_upgrade_items = 0
- self.location_inclusions: typing.Dict[LocationType, int] = {}
- self.plando_locations: typing.List[str] = []
- self.current_tooltip = None
- self.last_loc_list = None
- self.difficulty_override = -1
- self.game_speed_override = -1
- self.mission_id_to_location_ids: typing.Dict[int, typing.List[int]] = {}
- self.last_bot: typing.Optional[ArchipelagoBot] = None
- self.slot_data_version = 2
- self.grant_story_tech = 0
- self.required_tactics = RequiredTactics.option_standard
- self.take_over_ai_allies = TakeOverAIAllies.option_false
- self.spear_of_adun_presence = SpearOfAdunPresence.option_not_present
- self.spear_of_adun_present_in_no_build = SpearOfAdunPresentInNoBuild.option_false
- self.spear_of_adun_autonomously_cast_ability_presence = SpearOfAdunAutonomouslyCastAbilityPresence.option_not_present
- self.spear_of_adun_autonomously_cast_present_in_no_build = SpearOfAdunAutonomouslyCastPresentInNoBuild.option_false
- self.minerals_per_item = 15
- self.vespene_per_item = 15
- self.starting_supply_per_item = 2
- self.nova_covert_ops_only = False
- self.kerrigan_levels_per_mission_completed = 0
-
- async def server_auth(self, password_requested: bool = False) -> None:
- self.game = STARCRAFT2
- if password_requested and not self.password:
- await super(SC2Context, self).server_auth(password_requested)
- await self.get_username()
- await self.send_connect()
- if self.ui:
- self.ui.first_check = True
-
- def is_legacy_game(self):
- return self.game == STARCRAFT2_WOL
-
- def event_invalid_game(self):
- if self.is_legacy_game():
- self.game = STARCRAFT2
- super().event_invalid_game()
- else:
- self.game = STARCRAFT2_WOL
- async_start(self.send_connect())
-
- def on_package(self, cmd: str, args: dict) -> None:
- if cmd == "Connected":
- self.difficulty = args["slot_data"]["game_difficulty"]
- self.game_speed = args["slot_data"].get("game_speed", GameSpeed.option_default)
- self.disable_forced_camera = args["slot_data"].get("disable_forced_camera", DisableForcedCamera.default)
- self.skip_cutscenes = args["slot_data"].get("skip_cutscenes", SkipCutscenes.default)
- self.all_in_choice = args["slot_data"]["all_in_map"]
- self.slot_data_version = args["slot_data"].get("version", 2)
- slot_req_table: dict = args["slot_data"]["mission_req"]
-
- first_item = list(slot_req_table.keys())[0]
- # Maintaining backwards compatibility with older slot data
- if first_item in [str(campaign.id) for campaign in SC2Campaign]:
- # Multi-campaign
- self.mission_req_table = {}
- for campaign_id in slot_req_table:
- campaign = lookup_id_to_campaign[int(campaign_id)]
- self.mission_req_table[campaign] = {
- mission: self.parse_mission_info(mission_info)
- for mission, mission_info in slot_req_table[campaign_id].items()
- }
- else:
- # Old format
- self.mission_req_table = {SC2Campaign.GLOBAL: {
- mission: self.parse_mission_info(mission_info)
- for mission, mission_info in slot_req_table.items()
- }
- }
-
- self.mission_order = args["slot_data"].get("mission_order", MissionOrder.option_vanilla)
- self.final_mission = args["slot_data"].get("final_mission", SC2Mission.ALL_IN.id)
- self.player_color_raynor = args["slot_data"].get("player_color_terran_raynor", ColorChoice.option_blue)
- self.player_color_zerg = args["slot_data"].get("player_color_zerg", ColorChoice.option_orange)
- self.player_color_zerg_primal = args["slot_data"].get("player_color_zerg_primal", ColorChoice.option_purple)
- self.player_color_protoss = args["slot_data"].get("player_color_protoss", ColorChoice.option_blue)
- self.player_color_nova = args["slot_data"].get("player_color_nova", ColorChoice.option_dark_grey)
- self.generic_upgrade_missions = args["slot_data"].get("generic_upgrade_missions", GenericUpgradeMissions.default)
- self.generic_upgrade_items = args["slot_data"].get("generic_upgrade_items", GenericUpgradeItems.option_individual_items)
- self.generic_upgrade_research = args["slot_data"].get("generic_upgrade_research", GenericUpgradeResearch.option_vanilla)
- self.kerrigan_presence = args["slot_data"].get("kerrigan_presence", KerriganPresence.option_vanilla)
- self.kerrigan_primal_status = args["slot_data"].get("kerrigan_primal_status", KerriganPrimalStatus.option_vanilla)
- self.kerrigan_levels_per_mission_completed = args["slot_data"].get("kerrigan_levels_per_mission_completed", 0)
- self.kerrigan_levels_per_mission_completed_cap = args["slot_data"].get("kerrigan_levels_per_mission_completed_cap", -1)
- self.kerrigan_total_level_cap = args["slot_data"].get("kerrigan_total_level_cap", -1)
- self.grant_story_tech = args["slot_data"].get("grant_story_tech", GrantStoryTech.option_false)
- self.grant_story_levels = args["slot_data"].get("grant_story_levels", GrantStoryLevels.option_additive)
- self.required_tactics = args["slot_data"].get("required_tactics", RequiredTactics.option_standard)
- self.take_over_ai_allies = args["slot_data"].get("take_over_ai_allies", TakeOverAIAllies.option_false)
- self.spear_of_adun_presence = args["slot_data"].get("spear_of_adun_presence", SpearOfAdunPresence.option_not_present)
- self.spear_of_adun_present_in_no_build = args["slot_data"].get("spear_of_adun_present_in_no_build", SpearOfAdunPresentInNoBuild.option_false)
- self.spear_of_adun_autonomously_cast_ability_presence = args["slot_data"].get("spear_of_adun_autonomously_cast_ability_presence", SpearOfAdunAutonomouslyCastAbilityPresence.option_not_present)
- self.spear_of_adun_autonomously_cast_present_in_no_build = args["slot_data"].get("spear_of_adun_autonomously_cast_present_in_no_build", SpearOfAdunAutonomouslyCastPresentInNoBuild.option_false)
- self.minerals_per_item = args["slot_data"].get("minerals_per_item", 15)
- self.vespene_per_item = args["slot_data"].get("vespene_per_item", 15)
- self.starting_supply_per_item = args["slot_data"].get("starting_supply_per_item", 2)
- self.nova_covert_ops_only = args["slot_data"].get("nova_covert_ops_only", False)
-
- if self.required_tactics == RequiredTactics.option_no_logic:
- # Locking Grant Story Tech/Levels if no logic
- self.grant_story_tech = GrantStoryTech.option_true
- self.grant_story_levels = GrantStoryLevels.option_minimum
-
- self.location_inclusions = {
- LocationType.VICTORY: LocationInclusion.option_enabled, # Victory checks are always enabled
- LocationType.VANILLA: args["slot_data"].get("vanilla_locations", VanillaLocations.default),
- LocationType.EXTRA: args["slot_data"].get("extra_locations", ExtraLocations.default),
- LocationType.CHALLENGE: args["slot_data"].get("challenge_locations", ChallengeLocations.default),
- LocationType.MASTERY: args["slot_data"].get("mastery_locations", MasteryLocations.default),
- }
- self.plando_locations = args["slot_data"].get("plando_locations", [])
-
- self.build_location_to_mission_mapping()
-
- # Looks for the required maps and mods for SC2. Runs check_game_install_path.
- maps_present = is_mod_installed_correctly()
- if os.path.exists(get_metadata_file()):
- with open(get_metadata_file(), "r") as f:
- current_ver = f.read()
- sc2_logger.debug(f"Current version: {current_ver}")
- if is_mod_update_available(DATA_REPO_OWNER, DATA_REPO_NAME, DATA_API_VERSION, current_ver):
- sc2_logger.info("NOTICE: Update for required files found. Run /download_data to install.")
- elif maps_present:
- sc2_logger.warning("NOTICE: Your map files may be outdated (version number not found). "
- "Run /download_data to update them.")
-
- @staticmethod
- def parse_mission_info(mission_info: dict[str, typing.Any]) -> MissionInfo:
- if mission_info.get("id") is not None:
- mission_info["mission"] = lookup_id_to_mission[mission_info["id"]]
- elif isinstance(mission_info["mission"], int):
- mission_info["mission"] = lookup_id_to_mission[mission_info["mission"]]
-
- return MissionInfo(
- **{field: value for field, value in mission_info.items() if field in MissionInfo._fields}
- )
-
- def find_campaign(self, mission_name: str) -> SC2Campaign:
- data = self.mission_req_table
- for campaign in data.keys():
- if mission_name in data[campaign].keys():
- return campaign
- sc2_logger.info(f"Attempted to find campaign of unknown mission '{mission_name}'; defaulting to GLOBAL")
- return SC2Campaign.GLOBAL
-
-
-
- def on_print_json(self, args: dict) -> None:
- # goes to this world
- if "receiving" in args and self.slot_concerns_self(args["receiving"]):
- relevant = True
- # found in this world
- elif "item" in args and self.slot_concerns_self(args["item"].player):
- relevant = True
- # not related
- else:
- relevant = False
-
- if relevant:
- self.announcements.put(self.raw_text_parser(copy.deepcopy(args["data"])))
-
- super(SC2Context, self).on_print_json(args)
-
- def run_gui(self) -> None:
- from .ClientGui import start_gui
- start_gui(self)
-
-
- async def shutdown(self) -> None:
- await super(SC2Context, self).shutdown()
- if self.last_bot:
- self.last_bot.want_close = True
- if self.sc2_run_task:
- self.sc2_run_task.cancel()
-
- def play_mission(self, mission_id: int) -> bool:
- if self.missions_unlocked or is_mission_available(self, mission_id):
- if self.sc2_run_task:
- if not self.sc2_run_task.done():
- sc2_logger.warning("Starcraft 2 Client is still running!")
- self.sc2_run_task.cancel() # doesn't actually close the game, just stops the python task
- if self.slot is None:
- sc2_logger.warning("Launching Mission without Archipelago authentication, "
- "checks will not be registered to server.")
- self.sc2_run_task = asyncio.create_task(starcraft_launch(self, mission_id),
- name="Starcraft 2 Launch")
- return True
- else:
- sc2_logger.info(
- f"{lookup_id_to_mission[mission_id].mission_name} is not currently unlocked. "
- f"Use /unfinished or /available to see what is available.")
- return False
-
- def build_location_to_mission_mapping(self) -> None:
- mission_id_to_location_ids: typing.Dict[int, typing.Set[int]] = {
- mission_info.mission.id: set() for campaign_mission in self.mission_req_table.values() for mission_info in campaign_mission.values()
- }
-
- for loc in self.server_locations:
- offset = SC2WOL_LOC_ID_OFFSET if loc < SC2HOTS_LOC_ID_OFFSET \
- else (SC2HOTS_LOC_ID_OFFSET - SC2Mission.ALL_IN.id * VICTORY_MODULO)
- mission_id, objective = divmod(loc - offset, VICTORY_MODULO)
- mission_id_to_location_ids[mission_id].add(objective)
- self.mission_id_to_location_ids = {mission_id: sorted(objectives) for mission_id, objectives in
- mission_id_to_location_ids.items()}
-
- def locations_for_mission(self, mission_name: str):
- mission = lookup_name_to_mission[mission_name]
- mission_id: int = mission.id
- objectives = self.mission_id_to_location_ids[mission_id]
- for objective in objectives:
- yield get_location_offset(mission_id) + mission_id * VICTORY_MODULO + objective
-
-
-class CompatItemHolder(typing.NamedTuple):
- name: str
- quantity: int = 1
-
-
-async def main():
- multiprocessing.freeze_support()
- parser = get_base_parser()
- parser.add_argument('--name', default=None, help="Slot Name to connect as.")
- args = parser.parse_args()
-
- ctx = SC2Context(args.connect, args.password)
- ctx.auth = args.name
- if ctx.server_task is None:
- ctx.server_task = asyncio.create_task(server_loop(ctx), name="ServerLoop")
-
- if gui_enabled:
- ctx.run_gui()
- ctx.run_cli()
-
- await ctx.exit_event.wait()
-
- await ctx.shutdown()
-
-# These items must be given to the player if the game is generated on version 2
-API2_TO_API3_COMPAT_ITEMS: typing.Set[CompatItemHolder] = {
- CompatItemHolder(ItemNames.PHOTON_CANNON),
- CompatItemHolder(ItemNames.OBSERVER),
- CompatItemHolder(ItemNames.WARP_HARMONIZATION),
- CompatItemHolder(ItemNames.PROGRESSIVE_PROTOSS_GROUND_WEAPON, 3),
- CompatItemHolder(ItemNames.PROGRESSIVE_PROTOSS_GROUND_ARMOR, 3),
- CompatItemHolder(ItemNames.PROGRESSIVE_PROTOSS_SHIELDS, 3),
- CompatItemHolder(ItemNames.PROGRESSIVE_PROTOSS_AIR_WEAPON, 3),
- CompatItemHolder(ItemNames.PROGRESSIVE_PROTOSS_AIR_ARMOR, 3),
- CompatItemHolder(ItemNames.PROGRESSIVE_PROTOSS_WEAPON_ARMOR_UPGRADE, 3)
-}
-
-
-def compat_item_to_network_items(compat_item: CompatItemHolder) -> typing.List[NetworkItem]:
- item_id = get_full_item_list()[compat_item.name].code
- network_item = NetworkItem(item_id, 0, 0, 0)
- return compat_item.quantity * [network_item]
-
-
-def calculate_items(ctx: SC2Context) -> typing.Dict[SC2Race, typing.List[int]]:
- items = ctx.items_received.copy()
- # Items unlocked in API2 by default (Prophecy default items)
- if ctx.slot_data_version < 3:
- for compat_item in API2_TO_API3_COMPAT_ITEMS:
- items.extend(compat_item_to_network_items(compat_item))
-
- network_item: NetworkItem
- accumulators: typing.Dict[SC2Race, typing.List[int]] = {race: [0 for _ in type_flaggroups[race]] for race in SC2Race}
-
- # Protoss Shield grouped item specific logic
- shields_from_ground_upgrade: int = 0
- shields_from_air_upgrade: int = 0
-
- item_list = get_full_item_list()
- for network_item in items:
- name: str = lookup_id_to_name[network_item.item]
- item_data: ItemData = item_list[name]
-
- # exists exactly once
- if item_data.quantity == 1:
- accumulators[item_data.race][type_flaggroups[item_data.race][item_data.type]] |= 1 << item_data.number
-
- # exists multiple times
- elif item_data.type in ["Upgrade", "Progressive Upgrade","Progressive Upgrade 2"]:
- flaggroup = type_flaggroups[item_data.race][item_data.type]
-
- # Generic upgrades apply only to Weapon / Armor upgrades
- if item_data.type != "Upgrade" or ctx.generic_upgrade_items == 0:
- accumulators[item_data.race][flaggroup] += 1 << item_data.number
- else:
- if name == ItemNames.PROGRESSIVE_PROTOSS_GROUND_UPGRADE:
- shields_from_ground_upgrade += 1
- if name == ItemNames.PROGRESSIVE_PROTOSS_AIR_UPGRADE:
- shields_from_air_upgrade += 1
- for bundled_number in upgrade_numbers[item_data.number]:
- accumulators[item_data.race][flaggroup] += 1 << bundled_number
-
- # Regen bio-steel nerf with API3 - undo for older games
- if ctx.slot_data_version < 3 and name == ItemNames.PROGRESSIVE_REGENERATIVE_BIO_STEEL:
- current_level = (accumulators[item_data.race][flaggroup] >> item_data.number) % 4
- if current_level == 2:
- # Switch from level 2 to level 3 for compatibility
- accumulators[item_data.race][flaggroup] += 1 << item_data.number
- # sum
- else:
- if name == ItemNames.STARTING_MINERALS:
- accumulators[item_data.race][type_flaggroups[item_data.race][item_data.type]] += ctx.minerals_per_item
- elif name == ItemNames.STARTING_VESPENE:
- accumulators[item_data.race][type_flaggroups[item_data.race][item_data.type]] += ctx.vespene_per_item
- elif name == ItemNames.STARTING_SUPPLY:
- accumulators[item_data.race][type_flaggroups[item_data.race][item_data.type]] += ctx.starting_supply_per_item
- else:
- accumulators[item_data.race][type_flaggroups[item_data.race][item_data.type]] += item_data.number
-
- # Fix Shields from generic upgrades by unit class (Maximum of ground/air upgrades)
- if shields_from_ground_upgrade > 0 or shields_from_air_upgrade > 0:
- shield_upgrade_level = max(shields_from_ground_upgrade, shields_from_air_upgrade)
- shield_upgrade_item = item_list[ItemNames.PROGRESSIVE_PROTOSS_SHIELDS]
- for _ in range(0, shield_upgrade_level):
- accumulators[shield_upgrade_item.race][type_flaggroups[shield_upgrade_item.race][shield_upgrade_item.type]] += 1 << shield_upgrade_item.number
-
- # Kerrigan levels per check
- accumulators[SC2Race.ZERG][type_flaggroups[SC2Race.ZERG]["Level"]] += (len(ctx.checked_locations) // ctx.checks_per_level) * ctx.levels_per_check
-
- # Upgrades from completed missions
- if ctx.generic_upgrade_missions > 0:
- total_missions = sum(len(ctx.mission_req_table[campaign]) for campaign in ctx.mission_req_table)
- for race in SC2Race:
- if "Upgrade" not in type_flaggroups[race]:
- continue
- upgrade_flaggroup = type_flaggroups[race]["Upgrade"]
- num_missions = ctx.generic_upgrade_missions * total_missions
- amounts = [
- num_missions // 100,
- 2 * num_missions // 100,
- 3 * num_missions // 100
- ]
- upgrade_count = 0
- completed = len([id for id in ctx.mission_id_to_location_ids if get_location_offset(id) + VICTORY_MODULO * id in ctx.checked_locations])
- for amount in amounts:
- if completed >= amount:
- upgrade_count += 1
- # Equivalent to "Progressive Weapon/Armor Upgrade" item
- for bundled_number in upgrade_numbers[upgrade_numbers_all[race]]:
- accumulators[race][upgrade_flaggroup] += upgrade_count << bundled_number
-
- return accumulators
-
-
-def calc_difficulty(difficulty: int):
- if difficulty == 0:
- return 'C'
- elif difficulty == 1:
- return 'N'
- elif difficulty == 2:
- return 'H'
- elif difficulty == 3:
- return 'B'
-
- return 'X'
-
-
-def get_kerrigan_level(ctx: SC2Context, items: typing.Dict[SC2Race, typing.List[int]], missions_beaten: int) -> int:
- item_value = items[SC2Race.ZERG][type_flaggroups[SC2Race.ZERG]["Level"]]
- mission_value = missions_beaten * ctx.kerrigan_levels_per_mission_completed
- if ctx.kerrigan_levels_per_mission_completed_cap != -1:
- mission_value = min(mission_value, ctx.kerrigan_levels_per_mission_completed_cap)
- total_value = item_value + mission_value
- if ctx.kerrigan_total_level_cap != -1:
- total_value = min(total_value, ctx.kerrigan_total_level_cap)
- return total_value
-
-
-def calculate_kerrigan_options(ctx: SC2Context) -> int:
- options = 0
-
- # Bits 0, 1
- # Kerrigan unit available
- if ctx.kerrigan_presence in kerrigan_unit_available:
- options |= 1 << 0
-
- # Bit 2
- # Kerrigan primal status by map
- if ctx.kerrigan_primal_status == KerriganPrimalStatus.option_vanilla:
- options |= 1 << 2
-
- return options
-
-
-def caclulate_soa_options(ctx: SC2Context) -> int:
- options = 0
-
- # Bits 0, 1
- # SoA Calldowns available
- soa_presence_value = 0
- if ctx.spear_of_adun_presence == SpearOfAdunPresence.option_not_present:
- soa_presence_value = 0
- elif ctx.spear_of_adun_presence == SpearOfAdunPresence.option_lotv_protoss:
- soa_presence_value = 1
- elif ctx.spear_of_adun_presence == SpearOfAdunPresence.option_protoss:
- soa_presence_value = 2
- elif ctx.spear_of_adun_presence == SpearOfAdunPresence.option_everywhere:
- soa_presence_value = 3
- options |= soa_presence_value << 0
-
- # Bit 2
- # SoA Calldowns for no-builds
- if ctx.spear_of_adun_present_in_no_build == SpearOfAdunPresentInNoBuild.option_true:
- options |= 1 << 2
-
- # Bits 3,4
- # Autocasts
- soa_autocasts_presence_value = 0
- if ctx.spear_of_adun_autonomously_cast_ability_presence == SpearOfAdunAutonomouslyCastAbilityPresence.option_not_present:
- soa_autocasts_presence_value = 0
- elif ctx.spear_of_adun_autonomously_cast_ability_presence == SpearOfAdunAutonomouslyCastAbilityPresence.option_lotv_protoss:
- soa_autocasts_presence_value = 1
- elif ctx.spear_of_adun_autonomously_cast_ability_presence == SpearOfAdunAutonomouslyCastAbilityPresence.option_protoss:
- soa_autocasts_presence_value = 2
- elif ctx.spear_of_adun_autonomously_cast_ability_presence == SpearOfAdunAutonomouslyCastAbilityPresence.option_everywhere:
- soa_autocasts_presence_value = 3
- options |= soa_autocasts_presence_value << 3
-
- # Bit 5
- # Autocasts in no-builds
- if ctx.spear_of_adun_autonomously_cast_present_in_no_build == SpearOfAdunAutonomouslyCastPresentInNoBuild.option_true:
- options |= 1 << 5
-
- return options
-
-def kerrigan_primal(ctx: SC2Context, kerrigan_level: int) -> bool:
- if ctx.kerrigan_primal_status == KerriganPrimalStatus.option_always_zerg:
- return True
- elif ctx.kerrigan_primal_status == KerriganPrimalStatus.option_always_human:
- return False
- elif ctx.kerrigan_primal_status == KerriganPrimalStatus.option_level_35:
- return kerrigan_level >= 35
- elif ctx.kerrigan_primal_status == KerriganPrimalStatus.option_half_completion:
- total_missions = len(ctx.mission_id_to_location_ids)
- completed = sum((mission_id * VICTORY_MODULO + get_location_offset(mission_id)) in ctx.checked_locations
- for mission_id in ctx.mission_id_to_location_ids)
- return completed >= (total_missions / 2)
- elif ctx.kerrigan_primal_status == KerriganPrimalStatus.option_item:
- codes = [item.item for item in ctx.items_received]
- return get_full_item_list()[ItemNames.KERRIGAN_PRIMAL_FORM].code in codes
- return False
-
-async def starcraft_launch(ctx: SC2Context, mission_id: int):
- sc2_logger.info(f"Launching {lookup_id_to_mission[mission_id].mission_name}. If game does not launch check log file for errors.")
-
- with DllDirectory(None):
- run_game(bot.maps.get(lookup_id_to_mission[mission_id].map_file), [Bot(Race.Terran, ArchipelagoBot(ctx, mission_id),
- name="Archipelago", fullscreen=True)], realtime=True)
-
-
-class ArchipelagoBot(bot.bot_ai.BotAI):
- __slots__ = [
- 'game_running',
- 'mission_completed',
- 'boni',
- 'setup_done',
- 'ctx',
- 'mission_id',
- 'want_close',
- 'can_read_game',
- 'last_received_update',
- ]
-
- def __init__(self, ctx: SC2Context, mission_id: int):
- self.game_running = False
- self.mission_completed = False
- self.want_close = False
- self.can_read_game = False
- self.last_received_update: int = 0
- self.setup_done = False
- self.ctx = ctx
- self.ctx.last_bot = self
- self.mission_id = mission_id
- self.boni = [False for _ in range(MAX_BONUS)]
-
- super(ArchipelagoBot, self).__init__()
-
- async def on_step(self, iteration: int):
- if self.want_close:
- self.want_close = False
- await self._client.leave()
- return
- game_state = 0
- if not self.setup_done:
- self.setup_done = True
- start_items = calculate_items(self.ctx)
- missions_beaten = self.missions_beaten_count()
- kerrigan_level = get_kerrigan_level(self.ctx, start_items, missions_beaten)
- kerrigan_options = calculate_kerrigan_options(self.ctx)
- soa_options = caclulate_soa_options(self.ctx)
- if self.ctx.difficulty_override >= 0:
- difficulty = calc_difficulty(self.ctx.difficulty_override)
- else:
- difficulty = calc_difficulty(self.ctx.difficulty)
- if self.ctx.game_speed_override >= 0:
- game_speed = self.ctx.game_speed_override
- else:
- game_speed = self.ctx.game_speed
- await self.chat_send("?SetOptions {} {} {} {} {} {} {} {} {} {} {} {} {}".format(
- difficulty,
- self.ctx.generic_upgrade_research,
- self.ctx.all_in_choice,
- game_speed,
- self.ctx.disable_forced_camera,
- self.ctx.skip_cutscenes,
- kerrigan_options,
- self.ctx.grant_story_tech,
- self.ctx.take_over_ai_allies,
- soa_options,
- self.ctx.mission_order,
- 1 if self.ctx.nova_covert_ops_only else 0,
- self.ctx.grant_story_levels
- ))
- await self.chat_send("?GiveResources {} {} {}".format(
- start_items[SC2Race.ANY][0],
- start_items[SC2Race.ANY][1],
- start_items[SC2Race.ANY][2]
- ))
- await self.updateTerranTech(start_items)
- await self.updateZergTech(start_items, kerrigan_level)
- await self.updateProtossTech(start_items)
- await self.updateColors()
- await self.chat_send("?LoadFinished")
- self.last_received_update = len(self.ctx.items_received)
-
- else:
- if self.ctx.pending_color_update:
- await self.updateColors()
-
- if not self.ctx.announcements.empty():
- message = self.ctx.announcements.get(timeout=1)
- await self.chat_send("?SendMessage " + message)
- self.ctx.announcements.task_done()
-
- # Archipelago reads the health
- controller1_state = 0
- controller2_state = 0
- for unit in self.all_own_units():
- if unit.health_max == CONTROLLER_HEALTH:
- controller1_state = int(CONTROLLER_HEALTH - unit.health)
- self.can_read_game = True
- elif unit.health_max == CONTROLLER2_HEALTH:
- controller2_state = int(CONTROLLER2_HEALTH - unit.health)
- self.can_read_game = True
- game_state = controller1_state + (controller2_state << 15)
-
- if iteration == 160 and not game_state & 1:
- await self.chat_send("?SendMessage Warning: Archipelago unable to connect or has lost connection to " +
- "Starcraft 2 (This is likely a map issue)")
-
- if self.last_received_update < len(self.ctx.items_received):
- current_items = calculate_items(self.ctx)
- missions_beaten = self.missions_beaten_count()
- kerrigan_level = get_kerrigan_level(self.ctx, current_items, missions_beaten)
- await self.updateTerranTech(current_items)
- await self.updateZergTech(current_items, kerrigan_level)
- await self.updateProtossTech(current_items)
- self.last_received_update = len(self.ctx.items_received)
-
- if game_state & 1:
- if not self.game_running:
- print("Archipelago Connected")
- self.game_running = True
-
- if self.can_read_game:
- if game_state & (1 << 1) and not self.mission_completed:
- if self.mission_id != self.ctx.final_mission:
- print("Mission Completed")
- await self.ctx.send_msgs(
- [{"cmd": 'LocationChecks',
- "locations": [get_location_offset(self.mission_id) + VICTORY_MODULO * self.mission_id]}])
- self.mission_completed = True
- else:
- print("Game Complete")
- await self.ctx.send_msgs([{"cmd": 'StatusUpdate', "status": ClientStatus.CLIENT_GOAL}])
- self.mission_completed = True
-
- for x, completed in enumerate(self.boni):
- if not completed and game_state & (1 << (x + 2)):
- await self.ctx.send_msgs(
- [{"cmd": 'LocationChecks',
- "locations": [get_location_offset(self.mission_id) + VICTORY_MODULO * self.mission_id + x + 1]}])
- self.boni[x] = True
- else:
- await self.chat_send("?SendMessage LostConnection - Lost connection to game.")
-
- def missions_beaten_count(self):
- return len([location for location in self.ctx.checked_locations if location % VICTORY_MODULO == 0])
-
- async def updateColors(self):
- await self.chat_send("?SetColor rr " + str(self.ctx.player_color_raynor))
- await self.chat_send("?SetColor ks " + str(self.ctx.player_color_zerg))
- await self.chat_send("?SetColor pz " + str(self.ctx.player_color_zerg_primal))
- await self.chat_send("?SetColor da " + str(self.ctx.player_color_protoss))
- await self.chat_send("?SetColor nova " + str(self.ctx.player_color_nova))
- self.ctx.pending_color_update = False
-
- async def updateTerranTech(self, current_items):
- terran_items = current_items[SC2Race.TERRAN]
- await self.chat_send("?GiveTerranTech {} {} {} {} {} {} {} {} {} {} {} {} {} {}".format(
- terran_items[0], terran_items[1], terran_items[2], terran_items[3], terran_items[4],
- terran_items[5], terran_items[6], terran_items[7], terran_items[8], terran_items[9], terran_items[10],
- terran_items[11], terran_items[12], terran_items[13]))
-
- async def updateZergTech(self, current_items, kerrigan_level):
- zerg_items = current_items[SC2Race.ZERG]
- kerrigan_primal_by_items = kerrigan_primal(self.ctx, kerrigan_level)
- kerrigan_primal_bot_value = 1 if kerrigan_primal_by_items else 0
- await self.chat_send("?GiveZergTech {} {} {} {} {} {} {} {} {} {} {} {}".format(
- kerrigan_level, kerrigan_primal_bot_value, zerg_items[0], zerg_items[1], zerg_items[2],
- zerg_items[3], zerg_items[4], zerg_items[5], zerg_items[6], zerg_items[9], zerg_items[10], zerg_items[11]
- ))
-
- async def updateProtossTech(self, current_items):
- protoss_items = current_items[SC2Race.PROTOSS]
- await self.chat_send("?GiveProtossTech {} {} {} {} {} {} {} {} {} {}".format(
- protoss_items[0], protoss_items[1], protoss_items[2], protoss_items[3], protoss_items[4],
- protoss_items[5], protoss_items[6], protoss_items[7], protoss_items[8], protoss_items[9]
- ))
-
-
-def request_unfinished_missions(ctx: SC2Context) -> None:
- if ctx.mission_req_table:
- message = "Unfinished Missions: "
- unlocks = initialize_blank_mission_dict(ctx.mission_req_table)
- unfinished_locations: typing.Dict[SC2Mission, typing.List[str]] = {}
-
- _, unfinished_missions = calc_unfinished_missions(ctx, unlocks=unlocks)
-
- for mission in unfinished_missions:
- objectives = set(ctx.locations_for_mission(mission))
- if objectives:
- remaining_objectives = objectives.difference(ctx.checked_locations)
- unfinished_locations[mission] = [ctx.location_names.lookup_in_game(location_id) for location_id in remaining_objectives]
- else:
- unfinished_locations[mission] = []
-
- # Removing All-In from location pool
- final_mission = lookup_id_to_mission[ctx.final_mission]
- if final_mission in unfinished_missions.keys():
- message = f"Final Mission Available: {final_mission}[{ctx.final_mission}]\n" + message
- if unfinished_missions[final_mission] == -1:
- unfinished_missions.pop(final_mission)
-
- message += ", ".join(f"{mark_up_mission_name(ctx, mission, unlocks)}[{ctx.mission_req_table[ctx.find_campaign(mission)][mission].mission.id}] " +
- mark_up_objectives(
- f"[{len(unfinished_missions[mission])}/"
- f"{sum(1 for _ in ctx.locations_for_mission(mission))}]",
- ctx, unfinished_locations, mission)
- for mission in unfinished_missions)
-
- if ctx.ui:
- ctx.ui.log_panels['All'].on_message_markup(message)
- ctx.ui.log_panels['Starcraft2'].on_message_markup(message)
- else:
- sc2_logger.info(message)
- else:
- sc2_logger.warning("No mission table found, you are likely not connected to a server.")
-
-
-def calc_unfinished_missions(ctx: SC2Context, unlocks: typing.Optional[typing.Dict] = None):
- unfinished_missions: typing.List[str] = []
- locations_completed: typing.List[typing.Union[typing.Set[int], typing.Literal[-1]]] = []
-
- if not unlocks:
- unlocks = initialize_blank_mission_dict(ctx.mission_req_table)
-
- available_missions = calc_available_missions(ctx, unlocks)
-
- for name in available_missions:
- objectives = set(ctx.locations_for_mission(name))
- if objectives:
- objectives_completed = ctx.checked_locations & objectives
- if len(objectives_completed) < len(objectives):
- unfinished_missions.append(name)
- locations_completed.append(objectives_completed)
-
- else: # infer that this is the final mission as it has no objectives
- unfinished_missions.append(name)
- locations_completed.append(-1)
-
- return available_missions, dict(zip(unfinished_missions, locations_completed))
-
-
-def is_mission_available(ctx: SC2Context, mission_id_to_check: int) -> bool:
- unfinished_missions = calc_available_missions(ctx)
-
- return any(mission_id_to_check == ctx.mission_req_table[ctx.find_campaign(mission)][mission].mission.id for mission in unfinished_missions)
-
-
-def mark_up_mission_name(ctx: SC2Context, mission_name: str, unlock_table: typing.Dict) -> str:
- """Checks if the mission is required for game completion and adds '*' to the name to mark that."""
-
- campaign = ctx.find_campaign(mission_name)
- mission_info = ctx.mission_req_table[campaign][mission_name]
- if mission_info.completion_critical:
- if ctx.ui:
- message = "[color=AF99EF]" + mission_name + "[/color]"
- else:
- message = "*" + mission_name + "*"
- else:
- message = mission_name
-
- if ctx.ui:
- campaign_missions = list(ctx.mission_req_table[campaign].keys())
- unlocks: typing.List[str]
- index = campaign_missions.index(mission_name)
- if index in unlock_table[campaign]:
- unlocks = unlock_table[campaign][index]
- else:
- unlocks = []
-
- if len(unlocks) > 0:
- pre_message = f"[ref={mission_info.mission.id}|Unlocks: "
- pre_message += ", ".join(f"{unlock}({ctx.mission_req_table[ctx.find_campaign(unlock)][unlock].mission.id})" for unlock in unlocks)
- pre_message += f"]"
- message = pre_message + message + "[/ref]"
-
- return message
-
-
-def mark_up_objectives(message, ctx, unfinished_locations, mission):
- formatted_message = message
-
- if ctx.ui:
- locations = unfinished_locations[mission]
- campaign = ctx.find_campaign(mission)
-
- pre_message = f"[ref={list(ctx.mission_req_table[campaign]).index(mission) + 30}|"
- pre_message += " ".join(location for location in locations)
- pre_message += f"]"
- formatted_message = pre_message + message + "[/ref]"
-
- return formatted_message
-
-
-def request_available_missions(ctx: SC2Context):
- if ctx.mission_req_table:
- message = "Available Missions: "
-
- # Initialize mission unlock table
- unlocks = initialize_blank_mission_dict(ctx.mission_req_table)
-
- missions = calc_available_missions(ctx, unlocks)
- message += \
- ", ".join(f"{mark_up_mission_name(ctx, mission, unlocks)}"
- f"[{ctx.mission_req_table[ctx.find_campaign(mission)][mission].mission.id}]"
- for mission in missions)
-
- if ctx.ui:
- ctx.ui.log_panels['All'].on_message_markup(message)
- ctx.ui.log_panels['Starcraft2'].on_message_markup(message)
- else:
- sc2_logger.info(message)
- else:
- sc2_logger.warning("No mission table found, you are likely not connected to a server.")
-
-
-def calc_available_missions(ctx: SC2Context, unlocks: typing.Optional[dict] = None) -> typing.List[str]:
- available_missions: typing.List[str] = []
- missions_complete = 0
-
- # Get number of missions completed
- for loc in ctx.checked_locations:
- if loc % VICTORY_MODULO == 0:
- missions_complete += 1
-
- for campaign in ctx.mission_req_table:
- # Go through the required missions for each mission and fill up unlock table used later for hover-over tooltips
- for mission_name in ctx.mission_req_table[campaign]:
- if unlocks:
- for unlock in ctx.mission_req_table[campaign][mission_name].required_world:
- parsed_unlock = parse_unlock(unlock)
- # TODO prophecy-only wants to connect to WoL here
- index = parsed_unlock.connect_to - 1
- unlock_mission = list(ctx.mission_req_table[parsed_unlock.campaign])[index]
- unlock_campaign = ctx.find_campaign(unlock_mission)
- if unlock_campaign in unlocks:
- if index not in unlocks[unlock_campaign]:
- unlocks[unlock_campaign][index] = list()
- unlocks[unlock_campaign][index].append(mission_name)
-
- if mission_reqs_completed(ctx, mission_name, missions_complete):
- available_missions.append(mission_name)
-
- return available_missions
-
-
-def parse_unlock(unlock: typing.Union[typing.Dict[typing.Literal["connect_to", "campaign"], int], MissionConnection, int]) -> MissionConnection:
- if isinstance(unlock, int):
- # Legacy
- return MissionConnection(unlock)
- elif isinstance(unlock, MissionConnection):
- return unlock
- else:
- # Multi-campaign
- return MissionConnection(unlock["connect_to"], lookup_id_to_campaign[unlock["campaign"]])
-
-
-def mission_reqs_completed(ctx: SC2Context, mission_name: str, missions_complete: int) -> bool:
- """Returns a bool signifying if the mission has all requirements complete and can be done
-
- Arguments:
- ctx -- instance of SC2Context
- locations_to_check -- the mission string name to check
- missions_complete -- an int of how many missions have been completed
- mission_path -- a list of missions that have already been checked
- """
- campaign = ctx.find_campaign(mission_name)
-
- if len(ctx.mission_req_table[campaign][mission_name].required_world) >= 1:
- # A check for when the requirements are being or'd
- or_success = False
-
- # Loop through required missions
- for req_mission in ctx.mission_req_table[campaign][mission_name].required_world:
- req_success = True
- parsed_req_mission = parse_unlock(req_mission)
-
- # Check if required mission has been completed
- mission_id = ctx.mission_req_table[parsed_req_mission.campaign][
- list(ctx.mission_req_table[parsed_req_mission.campaign])[parsed_req_mission.connect_to - 1]].mission.id
- if not (mission_id * VICTORY_MODULO + get_location_offset(mission_id)) in ctx.checked_locations:
- if not ctx.mission_req_table[campaign][mission_name].or_requirements:
- return False
- else:
- req_success = False
-
- # Grid-specific logic (to avoid long path checks and infinite recursion)
- if ctx.mission_order in (MissionOrder.option_grid, MissionOrder.option_mini_grid, MissionOrder.option_medium_grid):
- if req_success:
- return True
- else:
- if parsed_req_mission == ctx.mission_req_table[campaign][mission_name].required_world[-1]:
- return False
- else:
- continue
-
- # Recursively check required mission to see if it's requirements are met, in case !collect has been done
- # Skipping recursive check on Grid settings to speed up checks and avoid infinite recursion
- if not mission_reqs_completed(ctx, list(ctx.mission_req_table[parsed_req_mission.campaign])[parsed_req_mission.connect_to - 1], missions_complete):
- if not ctx.mission_req_table[campaign][mission_name].or_requirements:
- return False
- else:
- req_success = False
-
- # If requirement check succeeded mark or as satisfied
- if ctx.mission_req_table[campaign][mission_name].or_requirements and req_success:
- or_success = True
-
- if ctx.mission_req_table[campaign][mission_name].or_requirements:
- # Return false if or requirements not met
- if not or_success:
- return False
-
- # Check number of missions
- if missions_complete >= ctx.mission_req_table[campaign][mission_name].number:
- return True
- else:
- return False
- else:
- return True
-
-
-def initialize_blank_mission_dict(location_table: typing.Dict[SC2Campaign, typing.Dict[str, MissionInfo]]):
- unlocks: typing.Dict[SC2Campaign, typing.Dict] = {}
-
- for mission in list(location_table):
- unlocks[mission] = {}
-
- return unlocks
-
-
-def check_game_install_path() -> bool:
- # First thing: go to the default location for ExecuteInfo.
- # An exception for Windows is included because it's very difficult to find ~\Documents if the user moved it.
- if is_windows:
- # The next five lines of utterly inscrutable code are brought to you by copy-paste from Stack Overflow.
- # https://stackoverflow.com/questions/6227590/finding-the-users-my-documents-path/30924555#
- import ctypes.wintypes
- CSIDL_PERSONAL = 5 # My Documents
- SHGFP_TYPE_CURRENT = 0 # Get current, not default value
-
- buf = ctypes.create_unicode_buffer(ctypes.wintypes.MAX_PATH)
- ctypes.windll.shell32.SHGetFolderPathW(None, CSIDL_PERSONAL, None, SHGFP_TYPE_CURRENT, buf)
- documentspath: str = buf.value
- einfo = str(documentspath / Path("StarCraft II\\ExecuteInfo.txt"))
- else:
- einfo = str(bot.paths.get_home() / Path(bot.paths.USERPATH[bot.paths.PF]))
-
- # Check if the file exists.
- if os.path.isfile(einfo):
-
- # Open the file and read it, picking out the latest executable's path.
- with open(einfo) as f:
- content = f.read()
- if content:
- search_result = re.search(r" = (.*)Versions", content)
- if not search_result:
- sc2_logger.warning(f"Found {einfo}, but it was empty. Run SC2 through the Blizzard launcher, "
- "then try again.")
- return False
- base = search_result.group(1)
-
- if os.path.exists(base):
- executable = bot.paths.latest_executeble(Path(base).expanduser() / "Versions")
-
- # Finally, check the path for an actual executable.
- # If we find one, great. Set up the SC2PATH.
- if os.path.isfile(executable):
- sc2_logger.info(f"Found an SC2 install at {base}!")
- sc2_logger.debug(f"Latest executable at {executable}.")
- os.environ["SC2PATH"] = base
- sc2_logger.debug(f"SC2PATH set to {base}.")
- return True
- else:
- sc2_logger.warning(f"We may have found an SC2 install at {base}, but couldn't find {executable}.")
- else:
- sc2_logger.warning(f"{einfo} pointed to {base}, but we could not find an SC2 install there.")
- else:
- sc2_logger.warning(f"Couldn't find {einfo}. Run SC2 through the Blizzard launcher, then try again. "
- f"If that fails, please run /set_path with your SC2 install directory.")
- return False
-
-
-def is_mod_installed_correctly() -> bool:
- """Searches for all required files."""
- if "SC2PATH" not in os.environ:
- check_game_install_path()
- sc2_path: str = os.environ["SC2PATH"]
- mapdir = sc2_path / Path('Maps/ArchipelagoCampaign')
- mods = ["ArchipelagoCore", "ArchipelagoPlayer", "ArchipelagoPlayerSuper", "ArchipelagoPatches",
- "ArchipelagoTriggers", "ArchipelagoPlayerWoL", "ArchipelagoPlayerHotS",
- "ArchipelagoPlayerLotV", "ArchipelagoPlayerLotVPrologue", "ArchipelagoPlayerNCO"]
- modfiles = [sc2_path / Path("Mods/" + mod + ".SC2Mod") for mod in mods]
- wol_required_maps: typing.List[str] = ["WoL" + os.sep + mission.map_file + ".SC2Map" for mission in SC2Mission
- if mission.campaign in (SC2Campaign.WOL, SC2Campaign.PROPHECY)]
- hots_required_maps: typing.List[str] = ["HotS" + os.sep + mission.map_file + ".SC2Map" for mission in campaign_mission_table[SC2Campaign.HOTS]]
- lotv_required_maps: typing.List[str] = ["LotV" + os.sep + mission.map_file + ".SC2Map" for mission in SC2Mission
- if mission.campaign in (SC2Campaign.LOTV, SC2Campaign.PROLOGUE, SC2Campaign.EPILOGUE)]
- nco_required_maps: typing.List[str] = ["NCO" + os.sep + mission.map_file + ".SC2Map" for mission in campaign_mission_table[SC2Campaign.NCO]]
- required_maps = wol_required_maps + hots_required_maps + lotv_required_maps + nco_required_maps
- needs_files = False
-
- # Check for maps.
- missing_maps: typing.List[str] = []
- for mapfile in required_maps:
- if not os.path.isfile(mapdir / mapfile):
- missing_maps.append(mapfile)
- if len(missing_maps) >= 19:
- sc2_logger.warning(f"All map files missing from {mapdir}.")
- needs_files = True
- elif len(missing_maps) > 0:
- for map in missing_maps:
- sc2_logger.debug(f"Missing {map} from {mapdir}.")
- sc2_logger.warning(f"Missing {len(missing_maps)} map files.")
- needs_files = True
- else: # Must be no maps missing
- sc2_logger.info(f"All maps found in {mapdir}.")
-
- # Check for mods.
- for modfile in modfiles:
- if os.path.isfile(modfile) or os.path.isdir(modfile):
- sc2_logger.info(f"Archipelago mod found at {modfile}.")
- else:
- sc2_logger.warning(f"Archipelago mod could not be found at {modfile}.")
- needs_files = True
-
- # Final verdict.
- if needs_files:
- sc2_logger.warning(f"Required files are missing. Run /download_data to acquire them.")
- return False
- else:
- sc2_logger.debug(f"All map/mod files are properly installed.")
- return True
-
-
-class DllDirectory:
- # Credit to Black Sliver for this code.
- # More info: https://docs.microsoft.com/en-us/windows/win32/api/winbase/nf-winbase-setdlldirectoryw
- _old: typing.Optional[str] = None
- _new: typing.Optional[str] = None
-
- def __init__(self, new: typing.Optional[str]):
- self._new = new
-
- def __enter__(self):
- old = self.get()
- if self.set(self._new):
- self._old = old
-
- def __exit__(self, *args):
- if self._old is not None:
- self.set(self._old)
-
- @staticmethod
- def get() -> typing.Optional[str]:
- if sys.platform == "win32":
- n = ctypes.windll.kernel32.GetDllDirectoryW(0, None)
- buf = ctypes.create_unicode_buffer(n)
- ctypes.windll.kernel32.GetDllDirectoryW(n, buf)
- return buf.value
- # NOTE: other OS may support os.environ["LD_LIBRARY_PATH"], but this fix is windows-specific
- return None
-
- @staticmethod
- def set(s: typing.Optional[str]) -> bool:
- if sys.platform == "win32":
- return ctypes.windll.kernel32.SetDllDirectoryW(s) != 0
- # NOTE: other OS may support os.environ["LD_LIBRARY_PATH"], but this fix is windows-specific
- return False
-
-
-def download_latest_release_zip(
- owner: str,
- repo: str,
- api_version: str,
- metadata: typing.Optional[str] = None,
- force_download=False
-) -> typing.Tuple[str, typing.Optional[str]]:
- """Downloads the latest release of a GitHub repo to the current directory as a .zip file."""
- import requests
-
- headers = {"Accept": 'application/vnd.github.v3+json'}
- url = f"https://api.github.com/repos/{owner}/{repo}/releases/tags/{api_version}"
-
- r1 = requests.get(url, headers=headers)
- if r1.status_code == 200:
- latest_metadata = r1.json()
- cleanup_downloaded_metadata(latest_metadata)
- latest_metadata = str(latest_metadata)
- # sc2_logger.info(f"Latest version: {latest_metadata}.")
- else:
- sc2_logger.warning(f"Status code: {r1.status_code}")
- sc2_logger.warning(f"Failed to reach GitHub. Could not find download link.")
- sc2_logger.warning(f"text: {r1.text}")
- return "", metadata
-
- if (force_download is False) and (metadata == latest_metadata):
- sc2_logger.info("Latest version already installed.")
- return "", metadata
-
- sc2_logger.info(f"Attempting to download latest version of API version {api_version} of {repo}.")
- download_url = r1.json()["assets"][0]["browser_download_url"]
-
- r2 = requests.get(download_url, headers=headers)
- if r2.status_code == 200 and zipfile.is_zipfile(io.BytesIO(r2.content)):
- tempdir = tempfile.gettempdir()
- file = tempdir + os.sep + f"{repo}.zip"
- with open(file, "wb") as fh:
- fh.write(r2.content)
- sc2_logger.info(f"Successfully downloaded {repo}.zip.")
- return file, latest_metadata
- else:
- sc2_logger.warning(f"Status code: {r2.status_code}")
- sc2_logger.warning("Download failed.")
- sc2_logger.warning(f"text: {r2.text}")
- return "", metadata
-
-
-def cleanup_downloaded_metadata(medatada_json: dict) -> None:
- for asset in medatada_json['assets']:
- del asset['download_count']
-
-
-def is_mod_update_available(owner: str, repo: str, api_version: str, metadata: str) -> bool:
- import requests
-
- headers = {"Accept": 'application/vnd.github.v3+json'}
- url = f"https://api.github.com/repos/{owner}/{repo}/releases/tags/{api_version}"
-
- r1 = requests.get(url, headers=headers)
- if r1.status_code == 200:
- latest_metadata = r1.json()
- cleanup_downloaded_metadata(latest_metadata)
- latest_metadata = str(latest_metadata)
- if metadata != latest_metadata:
- return True
- else:
- return False
-
- else:
- sc2_logger.warning(f"Failed to reach GitHub while checking for updates.")
- sc2_logger.warning(f"Status code: {r1.status_code}")
- sc2_logger.warning(f"text: {r1.text}")
- return False
-
-
-def get_location_offset(mission_id):
- return SC2WOL_LOC_ID_OFFSET if mission_id <= SC2Mission.ALL_IN.id \
- else (SC2HOTS_LOC_ID_OFFSET - SC2Mission.ALL_IN.id * VICTORY_MODULO)
-
-
-def launch():
- colorama.just_fix_windows_console()
- asyncio.run(main())
- colorama.deinit()
diff --git a/worlds/sc2/ClientGui.py b/worlds/sc2/ClientGui.py
deleted file mode 100644
index d16acad8..00000000
--- a/worlds/sc2/ClientGui.py
+++ /dev/null
@@ -1,306 +0,0 @@
-from typing import *
-import asyncio
-
-from NetUtils import JSONMessagePart
-from kvui import GameManager, HoverBehavior, ServerToolTip, KivyJSONtoTextParser
-from kivy.app import App
-from kivy.clock import Clock
-from kivy.uix.gridlayout import GridLayout
-from kivy.lang import Builder
-from kivy.uix.label import Label
-from kivy.uix.button import Button
-from kivymd.uix.tooltip import MDTooltip
-from kivy.uix.scrollview import ScrollView
-from kivy.properties import StringProperty
-
-from .Client import SC2Context, calc_unfinished_missions, parse_unlock
-from .MissionTables import (lookup_id_to_mission, lookup_name_to_mission, campaign_race_exceptions, SC2Mission, SC2Race,
- SC2Campaign)
-from .Locations import LocationType, lookup_location_id_to_type
-from .Options import LocationInclusion
-from . import SC2World, get_first_mission
-
-
-class HoverableButton(HoverBehavior, Button):
- pass
-
-
-class MissionButton(HoverableButton, MDTooltip):
- tooltip_text = StringProperty("Test")
-
- def __init__(self, *args, **kwargs):
- super(HoverableButton, self).__init__(**kwargs)
- self._tooltip = ServerToolTip(text=self.text, markup=True)
- self._tooltip.padding = [5, 2, 5, 2]
-
- def on_enter(self):
- self._tooltip.text = self.tooltip_text
-
- if self.tooltip_text != "":
- self.display_tooltip()
-
- def on_leave(self):
- self.remove_tooltip()
-
- @property
- def ctx(self) -> SC2Context:
- return App.get_running_app().ctx
-
-class CampaignScroll(ScrollView):
- pass
-
-class MultiCampaignLayout(GridLayout):
- pass
-
-class CampaignLayout(GridLayout):
- pass
-
-class MissionLayout(GridLayout):
- pass
-
-class MissionCategory(GridLayout):
- pass
-
-
-class SC2JSONtoKivyParser(KivyJSONtoTextParser):
- def _handle_text(self, node: JSONMessagePart):
- if node.get("keep_markup", False):
- for ref in node.get("refs", []):
- node["text"] = f"[ref={self.ref_count}|{ref}]{node['text']}[/ref]"
- self.ref_count += 1
- return super(KivyJSONtoTextParser, self)._handle_text(node)
- else:
- return super()._handle_text(node)
-
-
-class SC2Manager(GameManager):
- logging_pairs = [
- ("Client", "Archipelago"),
- ("Starcraft2", "Starcraft2"),
- ]
- base_title = "Archipelago Starcraft 2 Client"
-
- campaign_panel: Optional[CampaignLayout] = None
- last_checked_locations: Set[int] = set()
- mission_id_to_button: Dict[int, MissionButton] = {}
- launching: Union[bool, int] = False # if int -> mission ID
- refresh_from_launching = True
- first_check = True
- first_mission = ""
- ctx: SC2Context
-
- def __init__(self, ctx) -> None:
- super().__init__(ctx)
- self.json_to_kivy_parser = SC2JSONtoKivyParser(ctx)
-
- def clear_tooltip(self) -> None:
- if self.ctx.current_tooltip:
- App.get_running_app().root.remove_widget(self.ctx.current_tooltip)
-
- self.ctx.current_tooltip = None
-
- def build(self):
- container = super().build()
-
- panel = self.add_client_tab("Starcraft 2 Launcher", CampaignScroll())
- self.campaign_panel = MultiCampaignLayout()
- panel.content.add_widget(self.campaign_panel)
-
- Clock.schedule_interval(self.build_mission_table, 0.5)
-
- return container
-
- def build_mission_table(self, dt) -> None:
- if (not self.launching and (not self.last_checked_locations == self.ctx.checked_locations or
- not self.refresh_from_launching)) or self.first_check:
- assert self.campaign_panel is not None
- self.refresh_from_launching = True
-
- self.campaign_panel.clear_widgets()
- if self.ctx.mission_req_table:
- self.last_checked_locations = self.ctx.checked_locations.copy()
- self.first_check = False
- self.first_mission = get_first_mission(self.ctx.mission_req_table)
-
- self.mission_id_to_button = {}
-
- available_missions, unfinished_missions = calc_unfinished_missions(self.ctx)
-
- multi_campaign_layout_height = 0
-
- for campaign, missions in sorted(self.ctx.mission_req_table.items(), key=lambda item: item[0].id):
- categories: Dict[str, List[str]] = {}
-
- # separate missions into categories
- for mission_index in missions:
- mission_info = self.ctx.mission_req_table[campaign][mission_index]
- if mission_info.category not in categories:
- categories[mission_info.category] = []
-
- categories[mission_info.category].append(mission_index)
-
- max_mission_count = max(len(categories[category]) for category in categories)
- if max_mission_count == 1:
- campaign_layout_height = 115
- else:
- campaign_layout_height = (max_mission_count + 2) * 50
- multi_campaign_layout_height += campaign_layout_height
- campaign_layout = CampaignLayout(size_hint_y=None, height=campaign_layout_height)
- if campaign != SC2Campaign.GLOBAL:
- campaign_layout.add_widget(
- Label(text=campaign.campaign_name, size_hint_y=None, height=25, outline_width=1)
- )
- mission_layout = MissionLayout()
-
- for category in categories:
- category_name_height = 0
- category_spacing = 3
- if category.startswith('_'):
- category_display_name = ''
- else:
- category_display_name = category
- category_name_height += 25
- category_spacing = 10
- category_panel = MissionCategory(padding=[category_spacing,6,category_spacing,6])
- category_panel.add_widget(
- Label(text=category_display_name, size_hint_y=None, height=category_name_height, outline_width=1))
-
- for mission in categories[category]:
- text: str = mission
- tooltip: str = ""
- mission_obj: SC2Mission = lookup_name_to_mission[mission]
- mission_id: int = mission_obj.id
- mission_data = self.ctx.mission_req_table[campaign][mission]
- remaining_locations, plando_locations, remaining_count = self.sort_unfinished_locations(mission)
- # Map has uncollected locations
- if mission in unfinished_missions:
- if self.any_valuable_locations(remaining_locations):
- text = f"[color=6495ED]{text}[/color]"
- else:
- text = f"[color=A0BEF4]{text}[/color]"
- elif mission in available_missions:
- text = f"[color=FFFFFF]{text}[/color]"
- # Map requirements not met
- else:
- text = f"[color=a9a9a9]{text}[/color]"
- tooltip = f"Requires: "
- if mission_data.required_world:
- tooltip += ", ".join(list(self.ctx.mission_req_table[parse_unlock(req_mission).campaign])[parse_unlock(req_mission).connect_to - 1] for
- req_mission in
- mission_data.required_world)
-
- if mission_data.number:
- tooltip += " and "
- if mission_data.number:
- tooltip += f"{self.ctx.mission_req_table[campaign][mission].number} missions completed"
-
- if mission_id == self.ctx.final_mission:
- if mission in available_missions:
- text = f"[color=FFBC95]{mission}[/color]"
- else:
- text = f"[color=D0C0BE]{mission}[/color]"
- if tooltip:
- tooltip += "\n"
- tooltip += "Final Mission"
-
- if remaining_count > 0:
- if tooltip:
- tooltip += "\n\n"
- tooltip += f"-- Uncollected locations --"
- for loctype in LocationType:
- if len(remaining_locations[loctype]) > 0:
- if loctype == LocationType.VICTORY:
- tooltip += f"\n- {remaining_locations[loctype][0]}"
- else:
- tooltip += f"\n{self.get_location_type_title(loctype)}:\n- "
- tooltip += "\n- ".join(remaining_locations[loctype])
- if len(plando_locations) > 0:
- tooltip += f"\nPlando:\n- "
- tooltip += "\n- ".join(plando_locations)
-
- MISSION_BUTTON_HEIGHT = 50
- for pad in range(mission_data.ui_vertical_padding):
- column_spacer = Label(text='', size_hint_y=None, height=MISSION_BUTTON_HEIGHT)
- category_panel.add_widget(column_spacer)
- mission_button = MissionButton(text=text, size_hint_y=None, height=MISSION_BUTTON_HEIGHT)
- mission_race = mission_obj.race
- if mission_race == SC2Race.ANY:
- mission_race = mission_obj.campaign.race
- race = campaign_race_exceptions.get(mission_obj, mission_race)
- racial_colors = {
- SC2Race.TERRAN: (0.24, 0.84, 0.68),
- SC2Race.ZERG: (1, 0.65, 0.37),
- SC2Race.PROTOSS: (0.55, 0.7, 1)
- }
- if race in racial_colors:
- mission_button.background_color = racial_colors[race]
- mission_button.tooltip_text = tooltip
- mission_button.bind(on_press=self.mission_callback)
- self.mission_id_to_button[mission_id] = mission_button
- category_panel.add_widget(mission_button)
-
- category_panel.add_widget(Label(text=""))
- mission_layout.add_widget(category_panel)
- campaign_layout.add_widget(mission_layout)
- self.campaign_panel.add_widget(campaign_layout)
- self.campaign_panel.height = multi_campaign_layout_height
-
- elif self.launching:
- assert self.campaign_panel is not None
- self.refresh_from_launching = False
-
- self.campaign_panel.clear_widgets()
- self.campaign_panel.add_widget(Label(text="Launching Mission: " +
- lookup_id_to_mission[self.launching].mission_name))
- if self.ctx.ui:
- self.ctx.ui.clear_tooltip()
-
- def mission_callback(self, button: MissionButton) -> None:
- if not self.launching:
- mission_id: int = next(k for k, v in self.mission_id_to_button.items() if v == button)
- if self.ctx.play_mission(mission_id):
- self.launching = mission_id
- Clock.schedule_once(self.finish_launching, 10)
-
- def finish_launching(self, dt):
- self.launching = False
-
- def sort_unfinished_locations(self, mission_name: str) -> Tuple[Dict[LocationType, List[str]], List[str], int]:
- locations: Dict[LocationType, List[str]] = {loctype: [] for loctype in LocationType}
- count = 0
- for loc in self.ctx.locations_for_mission(mission_name):
- if loc in self.ctx.missing_locations:
- count += 1
- locations[lookup_location_id_to_type[loc]].append(self.ctx.location_names.lookup_in_game(loc))
-
- plando_locations = []
- for plando_loc in self.ctx.plando_locations:
- for loctype in LocationType:
- if plando_loc in locations[loctype]:
- locations[loctype].remove(plando_loc)
- plando_locations.append(plando_loc)
-
- return locations, plando_locations, count
-
- def any_valuable_locations(self, locations: Dict[LocationType, List[str]]) -> bool:
- for loctype in LocationType:
- if len(locations[loctype]) > 0 and self.ctx.location_inclusions[loctype] == LocationInclusion.option_enabled:
- return True
- return False
-
- def get_location_type_title(self, location_type: LocationType) -> str:
- title = location_type.name.title().replace("_", " ")
- if self.ctx.location_inclusions[location_type] == LocationInclusion.option_disabled:
- title += " (Nothing)"
- elif self.ctx.location_inclusions[location_type] == LocationInclusion.option_resources:
- title += " (Resources)"
- else:
- title += ""
- return title
-
-def start_gui(context: SC2Context):
- context.ui = SC2Manager(context)
- context.ui_task = asyncio.create_task(context.ui.async_run(), name="UI")
- import pkgutil
- data = pkgutil.get_data(SC2World.__module__, "Starcraft2.kv").decode()
- Builder.load_string(data)
diff --git a/worlds/sc2/ItemGroups.py b/worlds/sc2/ItemGroups.py
deleted file mode 100644
index 3a373304..00000000
--- a/worlds/sc2/ItemGroups.py
+++ /dev/null
@@ -1,100 +0,0 @@
-import typing
-from . import Items, ItemNames
-from .MissionTables import campaign_mission_table, SC2Campaign, SC2Mission
-
-"""
-Item name groups, given to Archipelago and used in YAMLs and /received filtering.
-For non-developers the following will be useful:
-* Items with a bracket get groups named after the unbracketed part
- * eg. "Advanced Healing AI (Medivac)" is accessible as "Advanced Healing AI"
- * The exception to this are item names that would be ambiguous (eg. "Resource Efficiency")
-* Item flaggroups get unique groups as well as combined groups for numbered flaggroups
- * eg. "Unit" contains all units, "Armory" contains "Armory 1" through "Armory 6"
- * The best place to look these up is at the bottom of Items.py
-* Items that have a parent are grouped together
- * eg. "Zergling Items" contains all items that have "Zergling" as a parent
- * These groups do NOT contain the parent item
- * This currently does not include items with multiple potential parents, like some LotV unit upgrades
-* All items are grouped by their race ("Terran", "Protoss", "Zerg", "Any")
-* Hand-crafted item groups can be found at the bottom of this file
-"""
-
-item_name_groups: typing.Dict[str, typing.List[str]] = {}
-
-# Groups for use in world logic
-item_name_groups["Missions"] = ["Beat " + mission.mission_name for mission in SC2Mission]
-item_name_groups["WoL Missions"] = ["Beat " + mission.mission_name for mission in campaign_mission_table[SC2Campaign.WOL]] + \
- ["Beat " + mission.mission_name for mission in campaign_mission_table[SC2Campaign.PROPHECY]]
-
-# These item name groups should not show up in documentation
-unlisted_item_name_groups = {
- "Missions", "WoL Missions"
-}
-
-# Some item names only differ in bracketed parts
-# These items are ambiguous for short-hand name groups
-bracketless_duplicates: typing.Set[str]
-# This is a list of names in ItemNames with bracketed parts removed, for internal use
-_shortened_names = [(name[:name.find(' (')] if '(' in name else name)
- for name in [ItemNames.__dict__[name] for name in ItemNames.__dir__() if not name.startswith('_')]]
-# Remove the first instance of every short-name from the full item list
-bracketless_duplicates = set(_shortened_names)
-for name in bracketless_duplicates:
- _shortened_names.remove(name)
-# The remaining short-names are the duplicates
-bracketless_duplicates = set(_shortened_names)
-del _shortened_names
-
-# All items get sorted into their data type
-for item, data in Items.get_full_item_list().items():
- # Items get assigned to their flaggroup's type
- item_name_groups.setdefault(data.type, []).append(item)
- # Numbered flaggroups get sorted into an unnumbered group
- # Currently supports numbers of one or two digits
- if data.type[-2:].strip().isnumeric():
- type_group = data.type[:-2].strip()
- item_name_groups.setdefault(type_group, []).append(item)
- # Flaggroups with numbers are unlisted
- unlisted_item_name_groups.add(data.type)
- # Items with a bracket get a short-hand name group for ease of use in YAMLs
- if '(' in item:
- short_name = item[:item.find(' (')]
- # Ambiguous short-names are dropped
- if short_name not in bracketless_duplicates:
- item_name_groups[short_name] = [item]
- # Short-name groups are unlisted
- unlisted_item_name_groups.add(short_name)
- # Items with a parent get assigned to their parent's group
- if data.parent_item:
- # The parent groups need a special name, otherwise they are ambiguous with the parent
- parent_group = f"{data.parent_item} Items"
- item_name_groups.setdefault(parent_group, []).append(item)
- # Parent groups are unlisted
- unlisted_item_name_groups.add(parent_group)
- # All items get assigned to their race's group
- race_group = data.race.name.capitalize()
- item_name_groups.setdefault(race_group, []).append(item)
-
-
-# Hand-made groups
-item_name_groups["Aiur"] = [
- ItemNames.ZEALOT, ItemNames.DRAGOON, ItemNames.SENTRY, ItemNames.AVENGER, ItemNames.HIGH_TEMPLAR,
- ItemNames.IMMORTAL, ItemNames.REAVER,
- ItemNames.PHOENIX, ItemNames.SCOUT, ItemNames.ARBITER, ItemNames.CARRIER,
-]
-item_name_groups["Nerazim"] = [
- ItemNames.CENTURION, ItemNames.STALKER, ItemNames.DARK_TEMPLAR, ItemNames.SIGNIFIER, ItemNames.DARK_ARCHON,
- ItemNames.ANNIHILATOR,
- ItemNames.CORSAIR, ItemNames.ORACLE, ItemNames.VOID_RAY,
-]
-item_name_groups["Tal'Darim"] = [
- ItemNames.SUPPLICANT, ItemNames.SLAYER, ItemNames.HAVOC, ItemNames.BLOOD_HUNTER, ItemNames.ASCENDANT,
- ItemNames.VANGUARD, ItemNames.WRATHWALKER,
- ItemNames.DESTROYER, ItemNames.MOTHERSHIP,
- ItemNames.WARP_PRISM_PHASE_BLASTER,
-]
-item_name_groups["Purifier"] = [
- ItemNames.SENTINEL, ItemNames.ADEPT, ItemNames.INSTIGATOR, ItemNames.ENERGIZER,
- ItemNames.COLOSSUS, ItemNames.DISRUPTOR,
- ItemNames.MIRAGE, ItemNames.TEMPEST,
-]
\ No newline at end of file
diff --git a/worlds/sc2/ItemNames.py b/worlds/sc2/ItemNames.py
deleted file mode 100644
index 10c71391..00000000
--- a/worlds/sc2/ItemNames.py
+++ /dev/null
@@ -1,661 +0,0 @@
-"""
-A complete collection of Starcraft 2 item names as strings.
-Users of this data may make some assumptions about the structure of a name:
-* The upgrade for a unit will end with the unit's name in parentheses
-* Weapon / armor upgrades may be grouped by a common prefix specified within this file
-"""
-
-# Terran Units
-MARINE = "Marine"
-MEDIC = "Medic"
-FIREBAT = "Firebat"
-MARAUDER = "Marauder"
-REAPER = "Reaper"
-HELLION = "Hellion"
-VULTURE = "Vulture"
-GOLIATH = "Goliath"
-DIAMONDBACK = "Diamondback"
-SIEGE_TANK = "Siege Tank"
-MEDIVAC = "Medivac"
-WRAITH = "Wraith"
-VIKING = "Viking"
-BANSHEE = "Banshee"
-BATTLECRUISER = "Battlecruiser"
-GHOST = "Ghost"
-SPECTRE = "Spectre"
-THOR = "Thor"
-RAVEN = "Raven"
-SCIENCE_VESSEL = "Science Vessel"
-PREDATOR = "Predator"
-HERCULES = "Hercules"
-# Extended units
-LIBERATOR = "Liberator"
-VALKYRIE = "Valkyrie"
-WIDOW_MINE = "Widow Mine"
-CYCLONE = "Cyclone"
-HERC = "HERC"
-WARHOUND = "Warhound"
-
-# Terran Buildings
-BUNKER = "Bunker"
-MISSILE_TURRET = "Missile Turret"
-SENSOR_TOWER = "Sensor Tower"
-PLANETARY_FORTRESS = "Planetary Fortress"
-PERDITION_TURRET = "Perdition Turret"
-HIVE_MIND_EMULATOR = "Hive Mind Emulator"
-PSI_DISRUPTER = "Psi Disrupter"
-
-# Terran Weapon / Armor Upgrades
-TERRAN_UPGRADE_PREFIX = "Progressive Terran"
-TERRAN_INFANTRY_UPGRADE_PREFIX = f"{TERRAN_UPGRADE_PREFIX} Infantry"
-TERRAN_VEHICLE_UPGRADE_PREFIX = f"{TERRAN_UPGRADE_PREFIX} Vehicle"
-TERRAN_SHIP_UPGRADE_PREFIX = f"{TERRAN_UPGRADE_PREFIX} Ship"
-
-PROGRESSIVE_TERRAN_INFANTRY_WEAPON = f"{TERRAN_INFANTRY_UPGRADE_PREFIX} Weapon"
-PROGRESSIVE_TERRAN_INFANTRY_ARMOR = f"{TERRAN_INFANTRY_UPGRADE_PREFIX} Armor"
-PROGRESSIVE_TERRAN_VEHICLE_WEAPON = f"{TERRAN_VEHICLE_UPGRADE_PREFIX} Weapon"
-PROGRESSIVE_TERRAN_VEHICLE_ARMOR = f"{TERRAN_VEHICLE_UPGRADE_PREFIX} Armor"
-PROGRESSIVE_TERRAN_SHIP_WEAPON = f"{TERRAN_SHIP_UPGRADE_PREFIX} Weapon"
-PROGRESSIVE_TERRAN_SHIP_ARMOR = f"{TERRAN_SHIP_UPGRADE_PREFIX} Armor"
-PROGRESSIVE_TERRAN_WEAPON_UPGRADE = f"{TERRAN_UPGRADE_PREFIX} Weapon Upgrade"
-PROGRESSIVE_TERRAN_ARMOR_UPGRADE = f"{TERRAN_UPGRADE_PREFIX} Armor Upgrade"
-PROGRESSIVE_TERRAN_INFANTRY_UPGRADE = f"{TERRAN_INFANTRY_UPGRADE_PREFIX} Upgrade"
-PROGRESSIVE_TERRAN_VEHICLE_UPGRADE = f"{TERRAN_VEHICLE_UPGRADE_PREFIX} Upgrade"
-PROGRESSIVE_TERRAN_SHIP_UPGRADE = f"{TERRAN_SHIP_UPGRADE_PREFIX} Upgrade"
-PROGRESSIVE_TERRAN_WEAPON_ARMOR_UPGRADE = f"{TERRAN_UPGRADE_PREFIX} Weapon/Armor Upgrade"
-
-# Mercenaries
-WAR_PIGS = "War Pigs"
-DEVIL_DOGS = "Devil Dogs"
-HAMMER_SECURITIES = "Hammer Securities"
-SPARTAN_COMPANY = "Spartan Company"
-SIEGE_BREAKERS = "Siege Breakers"
-HELS_ANGELS = "Hel's Angels"
-DUSK_WINGS = "Dusk Wings"
-JACKSONS_REVENGE = "Jackson's Revenge"
-SKIBIS_ANGELS = "Skibi's Angels"
-DEATH_HEADS = "Death Heads"
-WINGED_NIGHTMARES = "Winged Nightmares"
-MIDNIGHT_RIDERS = "Midnight Riders"
-BRYNHILDS = "Brynhilds"
-JOTUN = "Jotun"
-
-# Lab / Global
-ULTRA_CAPACITORS = "Ultra-Capacitors"
-VANADIUM_PLATING = "Vanadium Plating"
-ORBITAL_DEPOTS = "Orbital Depots"
-MICRO_FILTERING = "Micro-Filtering"
-AUTOMATED_REFINERY = "Automated Refinery"
-COMMAND_CENTER_REACTOR = "Command Center Reactor"
-TECH_REACTOR = "Tech Reactor"
-ORBITAL_STRIKE = "Orbital Strike"
-CELLULAR_REACTOR = "Cellular Reactor"
-PROGRESSIVE_REGENERATIVE_BIO_STEEL = "Progressive Regenerative Bio-Steel"
-PROGRESSIVE_FIRE_SUPPRESSION_SYSTEM = "Progressive Fire-Suppression System"
-PROGRESSIVE_ORBITAL_COMMAND = "Progressive Orbital Command"
-STRUCTURE_ARMOR = "Structure Armor"
-HI_SEC_AUTO_TRACKING = "Hi-Sec Auto Tracking"
-ADVANCED_OPTICS = "Advanced Optics"
-ROGUE_FORCES = "Rogue Forces"
-
-# Terran Unit Upgrades
-BANSHEE_HYPERFLIGHT_ROTORS = "Hyperflight Rotors (Banshee)"
-BANSHEE_INTERNAL_TECH_MODULE = "Internal Tech Module (Banshee)"
-BANSHEE_LASER_TARGETING_SYSTEM = "Laser Targeting System (Banshee)"
-BANSHEE_PROGRESSIVE_CROSS_SPECTRUM_DAMPENERS = "Progressive Cross-Spectrum Dampeners (Banshee)"
-BANSHEE_SHOCKWAVE_MISSILE_BATTERY = "Shockwave Missile Battery (Banshee)"
-BANSHEE_SHAPED_HULL = "Shaped Hull (Banshee)"
-BANSHEE_ADVANCED_TARGETING_OPTICS = "Advanced Targeting Optics (Banshee)"
-BANSHEE_DISTORTION_BLASTERS = "Distortion Blasters (Banshee)"
-BANSHEE_ROCKET_BARRAGE = "Rocket Barrage (Banshee)"
-BATTLECRUISER_ATX_LASER_BATTERY = "ATX Laser Battery (Battlecruiser)"
-BATTLECRUISER_CLOAK = "Cloak (Battlecruiser)"
-BATTLECRUISER_PROGRESSIVE_DEFENSIVE_MATRIX = "Progressive Defensive Matrix (Battlecruiser)"
-BATTLECRUISER_INTERNAL_TECH_MODULE = "Internal Tech Module (Battlecruiser)"
-BATTLECRUISER_PROGRESSIVE_MISSILE_PODS = "Progressive Missile Pods (Battlecruiser)"
-BATTLECRUISER_OPTIMIZED_LOGISTICS = "Optimized Logistics (Battlecruiser)"
-BATTLECRUISER_TACTICAL_JUMP = "Tactical Jump (Battlecruiser)"
-BATTLECRUISER_BEHEMOTH_PLATING = "Behemoth Plating (Battlecruiser)"
-BATTLECRUISER_COVERT_OPS_ENGINES = "Covert Ops Engines (Battlecruiser)"
-BUNKER_NEOSTEEL_BUNKER = "Neosteel Bunker (Bunker)"
-BUNKER_PROJECTILE_ACCELERATOR = "Projectile Accelerator (Bunker)"
-BUNKER_SHRIKE_TURRET = "Shrike Turret (Bunker)"
-BUNKER_FORTIFIED_BUNKER = "Fortified Bunker (Bunker)"
-CYCLONE_MAG_FIELD_ACCELERATORS = "Mag-Field Accelerators (Cyclone)"
-CYCLONE_MAG_FIELD_LAUNCHERS = "Mag-Field Launchers (Cyclone)"
-CYCLONE_RAPID_FIRE_LAUNCHERS = "Rapid Fire Launchers (Cyclone)"
-CYCLONE_TARGETING_OPTICS = "Targeting Optics (Cyclone)"
-CYCLONE_RESOURCE_EFFICIENCY = "Resource Efficiency (Cyclone)"
-CYCLONE_INTERNAL_TECH_MODULE = "Internal Tech Module (Cyclone)"
-DIAMONDBACK_BURST_CAPACITORS = "Burst Capacitors (Diamondback)"
-DIAMONDBACK_HYPERFLUXOR = "Hyperfluxor (Diamondback)"
-DIAMONDBACK_RESOURCE_EFFICIENCY = "Resource Efficiency (Diamondback)"
-DIAMONDBACK_SHAPED_HULL = "Shaped Hull (Diamondback)"
-DIAMONDBACK_PROGRESSIVE_TRI_LITHIUM_POWER_CELL = "Progressive Tri-Lithium Power Cell (Diamondback)"
-DIAMONDBACK_ION_THRUSTERS = "Ion Thrusters (Diamondback)"
-FIREBAT_INCINERATOR_GAUNTLETS = "Incinerator Gauntlets (Firebat)"
-FIREBAT_JUGGERNAUT_PLATING = "Juggernaut Plating (Firebat)"
-FIREBAT_RESOURCE_EFFICIENCY = "Resource Efficiency (Firebat)"
-FIREBAT_PROGRESSIVE_STIMPACK = "Progressive Stimpack (Firebat)"
-FIREBAT_INFERNAL_PRE_IGNITER = "Infernal Pre-Igniter (Firebat)"
-FIREBAT_KINETIC_FOAM = "Kinetic Foam (Firebat)"
-FIREBAT_NANO_PROJECTORS = "Nano Projectors (Firebat)"
-GHOST_CRIUS_SUIT = "Crius Suit (Ghost)"
-GHOST_EMP_ROUNDS = "EMP Rounds (Ghost)"
-GHOST_LOCKDOWN = "Lockdown (Ghost)"
-GHOST_OCULAR_IMPLANTS = "Ocular Implants (Ghost)"
-GHOST_RESOURCE_EFFICIENCY = "Resource Efficiency (Ghost)"
-GOLIATH_ARES_CLASS_TARGETING_SYSTEM = "Ares-Class Targeting System (Goliath)"
-GOLIATH_JUMP_JETS = "Jump Jets (Goliath)"
-GOLIATH_MULTI_LOCK_WEAPONS_SYSTEM = "Multi-Lock Weapons System (Goliath)"
-GOLIATH_OPTIMIZED_LOGISTICS = "Optimized Logistics (Goliath)"
-GOLIATH_SHAPED_HULL = "Shaped Hull (Goliath)"
-GOLIATH_RESOURCE_EFFICIENCY = "Resource Efficiency (Goliath)"
-GOLIATH_INTERNAL_TECH_MODULE = "Internal Tech Module (Goliath)"
-HELLION_HELLBAT_ASPECT = "Hellbat Aspect (Hellion)"
-HELLION_JUMP_JETS = "Jump Jets (Hellion)"
-HELLION_OPTIMIZED_LOGISTICS = "Optimized Logistics (Hellion)"
-HELLION_PROGRESSIVE_STIMPACK = "Progressive Stimpack (Hellion)"
-HELLION_SMART_SERVOS = "Smart Servos (Hellion)"
-HELLION_THERMITE_FILAMENTS = "Thermite Filaments (Hellion)"
-HELLION_TWIN_LINKED_FLAMETHROWER = "Twin-Linked Flamethrower (Hellion)"
-HELLION_INFERNAL_PLATING = "Infernal Plating (Hellion)"
-HERC_JUGGERNAUT_PLATING = "Juggernaut Plating (HERC)"
-HERC_KINETIC_FOAM = "Kinetic Foam (HERC)"
-HERC_RESOURCE_EFFICIENCY = "Resource Efficiency (HERC)"
-HERCULES_INTERNAL_FUSION_MODULE = "Internal Fusion Module (Hercules)"
-HERCULES_TACTICAL_JUMP = "Tactical Jump (Hercules)"
-LIBERATOR_ADVANCED_BALLISTICS = "Advanced Ballistics (Liberator)"
-LIBERATOR_CLOAK = "Cloak (Liberator)"
-LIBERATOR_LASER_TARGETING_SYSTEM = "Laser Targeting System (Liberator)"
-LIBERATOR_OPTIMIZED_LOGISTICS = "Optimized Logistics (Liberator)"
-LIBERATOR_RAID_ARTILLERY = "Raid Artillery (Liberator)"
-LIBERATOR_SMART_SERVOS = "Smart Servos (Liberator)"
-LIBERATOR_RESOURCE_EFFICIENCY = "Resource Efficiency (Liberator)"
-MARAUDER_CONCUSSIVE_SHELLS = "Concussive Shells (Marauder)"
-MARAUDER_INTERNAL_TECH_MODULE = "Internal Tech Module (Marauder)"
-MARAUDER_KINETIC_FOAM = "Kinetic Foam (Marauder)"
-MARAUDER_LASER_TARGETING_SYSTEM = "Laser Targeting System (Marauder)"
-MARAUDER_MAGRAIL_MUNITIONS = "Magrail Munitions (Marauder)"
-MARAUDER_PROGRESSIVE_STIMPACK = "Progressive Stimpack (Marauder)"
-MARAUDER_JUGGERNAUT_PLATING = "Juggernaut Plating (Marauder)"
-MARINE_COMBAT_SHIELD = "Combat Shield (Marine)"
-MARINE_LASER_TARGETING_SYSTEM = "Laser Targeting System (Marine)"
-MARINE_MAGRAIL_MUNITIONS = "Magrail Munitions (Marine)"
-MARINE_OPTIMIZED_LOGISTICS = "Optimized Logistics (Marine)"
-MARINE_PROGRESSIVE_STIMPACK = "Progressive Stimpack (Marine)"
-MEDIC_ADVANCED_MEDIC_FACILITIES = "Advanced Medic Facilities (Medic)"
-MEDIC_OPTICAL_FLARE = "Optical Flare (Medic)"
-MEDIC_RESOURCE_EFFICIENCY = "Resource Efficiency (Medic)"
-MEDIC_RESTORATION = "Restoration (Medic)"
-MEDIC_STABILIZER_MEDPACKS = "Stabilizer Medpacks (Medic)"
-MEDIC_ADAPTIVE_MEDPACKS = "Adaptive Medpacks (Medic)"
-MEDIC_NANO_PROJECTOR = "Nano Projector (Medic)"
-MEDIVAC_ADVANCED_HEALING_AI = "Advanced Healing AI (Medivac)"
-MEDIVAC_AFTERBURNERS = "Afterburners (Medivac)"
-MEDIVAC_EXPANDED_HULL = "Expanded Hull (Medivac)"
-MEDIVAC_RAPID_DEPLOYMENT_TUBE = "Rapid Deployment Tube (Medivac)"
-MEDIVAC_SCATTER_VEIL = "Scatter Veil (Medivac)"
-MEDIVAC_ADVANCED_CLOAKING_FIELD = "Advanced Cloaking Field (Medivac)"
-MISSILE_TURRET_HELLSTORM_BATTERIES = "Hellstorm Batteries (Missile Turret)"
-MISSILE_TURRET_TITANIUM_HOUSING = "Titanium Housing (Missile Turret)"
-PLANETARY_FORTRESS_PROGRESSIVE_AUGMENTED_THRUSTERS = "Progressive Augmented Thrusters (Planetary Fortress)"
-PLANETARY_FORTRESS_ADVANCED_TARGETING = "Advanced Targeting (Planetary Fortress)"
-PREDATOR_RESOURCE_EFFICIENCY = "Resource Efficiency (Predator)"
-PREDATOR_CLOAK = "Cloak (Predator)"
-PREDATOR_CHARGE = "Charge (Predator)"
-PREDATOR_PREDATOR_S_FURY = "Predator's Fury (Predator)"
-RAVEN_ANTI_ARMOR_MISSILE = "Anti-Armor Missile (Raven)"
-RAVEN_BIO_MECHANICAL_REPAIR_DRONE = "Bio Mechanical Repair Drone (Raven)"
-RAVEN_HUNTER_SEEKER_WEAPON = "Hunter-Seeker Weapon (Raven)"
-RAVEN_INTERFERENCE_MATRIX = "Interference Matrix (Raven)"
-RAVEN_INTERNAL_TECH_MODULE = "Internal Tech Module (Raven)"
-RAVEN_RAILGUN_TURRET = "Railgun Turret (Raven)"
-RAVEN_SPIDER_MINES = "Spider Mines (Raven)"
-RAVEN_RESOURCE_EFFICIENCY = "Resource Efficiency (Raven)"
-RAVEN_DURABLE_MATERIALS = "Durable Materials (Raven)"
-REAPER_ADVANCED_CLOAKING_FIELD = "Advanced Cloaking Field (Reaper)"
-REAPER_COMBAT_DRUGS = "Combat Drugs (Reaper)"
-REAPER_G4_CLUSTERBOMB = "G-4 Clusterbomb (Reaper)"
-REAPER_LASER_TARGETING_SYSTEM = "Laser Targeting System (Reaper)"
-REAPER_PROGRESSIVE_STIMPACK = "Progressive Stimpack (Reaper)"
-REAPER_SPIDER_MINES = "Spider Mines (Reaper)"
-REAPER_U238_ROUNDS = "U-238 Rounds (Reaper)"
-REAPER_JET_PACK_OVERDRIVE = "Jet Pack Overdrive (Reaper)"
-SCIENCE_VESSEL_DEFENSIVE_MATRIX = "Defensive Matrix (Science Vessel)"
-SCIENCE_VESSEL_EMP_SHOCKWAVE = "EMP Shockwave (Science Vessel)"
-SCIENCE_VESSEL_IMPROVED_NANO_REPAIR = "Improved Nano-Repair (Science Vessel)"
-SCIENCE_VESSEL_ADVANCED_AI_SYSTEMS = "Advanced AI Systems (Science Vessel)"
-SCV_ADVANCED_CONSTRUCTION = "Advanced Construction (SCV)"
-SCV_DUAL_FUSION_WELDERS = "Dual-Fusion Welders (SCV)"
-SCV_HOSTILE_ENVIRONMENT_ADAPTATION = "Hostile Environment Adaptation (SCV)"
-SIEGE_TANK_ADVANCED_SIEGE_TECH = "Advanced Siege Tech (Siege Tank)"
-SIEGE_TANK_GRADUATING_RANGE = "Graduating Range (Siege Tank)"
-SIEGE_TANK_INTERNAL_TECH_MODULE = "Internal Tech Module (Siege Tank)"
-SIEGE_TANK_JUMP_JETS = "Jump Jets (Siege Tank)"
-SIEGE_TANK_LASER_TARGETING_SYSTEM = "Laser Targeting System (Siege Tank)"
-SIEGE_TANK_MAELSTROM_ROUNDS = "Maelstrom Rounds (Siege Tank)"
-SIEGE_TANK_SHAPED_BLAST = "Shaped Blast (Siege Tank)"
-SIEGE_TANK_SMART_SERVOS = "Smart Servos (Siege Tank)"
-SIEGE_TANK_SPIDER_MINES = "Spider Mines (Siege Tank)"
-SIEGE_TANK_SHAPED_HULL = "Shaped Hull (Siege Tank)"
-SIEGE_TANK_RESOURCE_EFFICIENCY = "Resource Efficiency (Siege Tank)"
-SPECTRE_IMPALER_ROUNDS = "Impaler Rounds (Spectre)"
-SPECTRE_NYX_CLASS_CLOAKING_MODULE = "Nyx-Class Cloaking Module (Spectre)"
-SPECTRE_PSIONIC_LASH = "Psionic Lash (Spectre)"
-SPECTRE_RESOURCE_EFFICIENCY = "Resource Efficiency (Spectre)"
-SPIDER_MINE_CERBERUS_MINE = "Cerberus Mine (Spider Mine)"
-SPIDER_MINE_HIGH_EXPLOSIVE_MUNITION = "High Explosive Munition (Spider Mine)"
-THOR_330MM_BARRAGE_CANNON = "330mm Barrage Cannon (Thor)"
-THOR_PROGRESSIVE_IMMORTALITY_PROTOCOL = "Progressive Immortality Protocol (Thor)"
-THOR_PROGRESSIVE_HIGH_IMPACT_PAYLOAD = "Progressive High Impact Payload (Thor)"
-THOR_BUTTON_WITH_A_SKULL_ON_IT = "Button With a Skull on It (Thor)"
-THOR_LASER_TARGETING_SYSTEM = "Laser Targeting System (Thor)"
-THOR_LARGE_SCALE_FIELD_CONSTRUCTION = "Large Scale Field Construction (Thor)"
-VALKYRIE_AFTERBURNERS = "Afterburners (Valkyrie)"
-VALKYRIE_FLECHETTE_MISSILES = "Flechette Missiles (Valkyrie)"
-VALKYRIE_ENHANCED_CLUSTER_LAUNCHERS = "Enhanced Cluster Launchers (Valkyrie)"
-VALKYRIE_SHAPED_HULL = "Shaped Hull (Valkyrie)"
-VALKYRIE_LAUNCHING_VECTOR_COMPENSATOR = "Launching Vector Compensator (Valkyrie)"
-VALKYRIE_RESOURCE_EFFICIENCY = "Resource Efficiency (Valkyrie)"
-VIKING_ANTI_MECHANICAL_MUNITION = "Anti-Mechanical Munition (Viking)"
-VIKING_PHOBOS_CLASS_WEAPONS_SYSTEM = "Phobos-Class Weapons System (Viking)"
-VIKING_RIPWAVE_MISSILES = "Ripwave Missiles (Viking)"
-VIKING_SMART_SERVOS = "Smart Servos (Viking)"
-VIKING_SHREDDER_ROUNDS = "Shredder Rounds (Viking)"
-VIKING_WILD_MISSILES = "W.I.L.D. Missiles (Viking)"
-VULTURE_AUTO_LAUNCHERS = "Auto Launchers (Vulture)"
-VULTURE_ION_THRUSTERS = "Ion Thrusters (Vulture)"
-VULTURE_PROGRESSIVE_REPLENISHABLE_MAGAZINE = "Progressive Replenishable Magazine (Vulture)"
-VULTURE_AUTO_REPAIR = "Auto-Repair (Vulture)"
-WARHOUND_RESOURCE_EFFICIENCY = "Resource Efficiency (Warhound)"
-WARHOUND_REINFORCED_PLATING = "Reinforced Plating (Warhound)"
-WIDOW_MINE_BLACK_MARKET_LAUNCHERS = "Black Market Launchers (Widow Mine)"
-WIDOW_MINE_CONCEALMENT = "Concealment (Widow Mine)"
-WIDOW_MINE_DRILLING_CLAWS = "Drilling Claws (Widow Mine)"
-WIDOW_MINE_EXECUTIONER_MISSILES = "Executioner Missiles (Widow Mine)"
-WRAITH_ADVANCED_LASER_TECHNOLOGY = "Advanced Laser Technology (Wraith)"
-WRAITH_DISPLACEMENT_FIELD = "Displacement Field (Wraith)"
-WRAITH_PROGRESSIVE_TOMAHAWK_POWER_CELLS = "Progressive Tomahawk Power Cells (Wraith)"
-WRAITH_TRIGGER_OVERRIDE = "Trigger Override (Wraith)"
-WRAITH_INTERNAL_TECH_MODULE = "Internal Tech Module (Wraith)"
-WRAITH_RESOURCE_EFFICIENCY = "Resource Efficiency (Wraith)"
-
-# Nova
-NOVA_GHOST_VISOR = "Ghost Visor (Nova Equipment)"
-NOVA_RANGEFINDER_OCULUS = "Rangefinder Oculus (Nova Equipment)"
-NOVA_DOMINATION = "Domination (Nova Ability)"
-NOVA_BLINK = "Blink (Nova Ability)"
-NOVA_PROGRESSIVE_STEALTH_SUIT_MODULE = "Progressive Stealth Suit Module (Nova Suit Module)"
-NOVA_ENERGY_SUIT_MODULE = "Energy Suit Module (Nova Suit Module)"
-NOVA_ARMORED_SUIT_MODULE = "Armored Suit Module (Nova Suit Module)"
-NOVA_JUMP_SUIT_MODULE = "Jump Suit Module (Nova Suit Module)"
-NOVA_C20A_CANISTER_RIFLE = "C20A Canister Rifle (Nova Weapon)"
-NOVA_HELLFIRE_SHOTGUN = "Hellfire Shotgun (Nova Weapon)"
-NOVA_PLASMA_RIFLE = "Plasma Rifle (Nova Weapon)"
-NOVA_MONOMOLECULAR_BLADE = "Monomolecular Blade (Nova Weapon)"
-NOVA_BLAZEFIRE_GUNBLADE = "Blazefire Gunblade (Nova Weapon)"
-NOVA_STIM_INFUSION = "Stim Infusion (Nova Gadget)"
-NOVA_PULSE_GRENADES = "Pulse Grenades (Nova Gadget)"
-NOVA_FLASHBANG_GRENADES = "Flashbang Grenades (Nova Gadget)"
-NOVA_IONIC_FORCE_FIELD = "Ionic Force Field (Nova Gadget)"
-NOVA_HOLO_DECOY = "Holo Decoy (Nova Gadget)"
-NOVA_NUKE = "Tac Nuke Strike (Nova Ability)"
-
-# Zerg Units
-ZERGLING = "Zergling"
-SWARM_QUEEN = "Swarm Queen"
-ROACH = "Roach"
-HYDRALISK = "Hydralisk"
-ABERRATION = "Aberration"
-MUTALISK = "Mutalisk"
-SWARM_HOST = "Swarm Host"
-INFESTOR = "Infestor"
-ULTRALISK = "Ultralisk"
-CORRUPTOR = "Corruptor"
-SCOURGE = "Scourge"
-BROOD_QUEEN = "Brood Queen"
-DEFILER = "Defiler"
-
-# Zerg Buildings
-SPORE_CRAWLER = "Spore Crawler"
-SPINE_CRAWLER = "Spine Crawler"
-
-# Zerg Weapon / Armor Upgrades
-ZERG_UPGRADE_PREFIX = "Progressive Zerg"
-ZERG_FLYER_UPGRADE_PREFIX = f"{ZERG_UPGRADE_PREFIX} Flyer"
-
-PROGRESSIVE_ZERG_MELEE_ATTACK = f"{ZERG_UPGRADE_PREFIX} Melee Attack"
-PROGRESSIVE_ZERG_MISSILE_ATTACK = f"{ZERG_UPGRADE_PREFIX} Missile Attack"
-PROGRESSIVE_ZERG_GROUND_CARAPACE = f"{ZERG_UPGRADE_PREFIX} Ground Carapace"
-PROGRESSIVE_ZERG_FLYER_ATTACK = f"{ZERG_FLYER_UPGRADE_PREFIX} Attack"
-PROGRESSIVE_ZERG_FLYER_CARAPACE = f"{ZERG_FLYER_UPGRADE_PREFIX} Carapace"
-PROGRESSIVE_ZERG_WEAPON_UPGRADE = f"{ZERG_UPGRADE_PREFIX} Weapon Upgrade"
-PROGRESSIVE_ZERG_ARMOR_UPGRADE = f"{ZERG_UPGRADE_PREFIX} Armor Upgrade"
-PROGRESSIVE_ZERG_GROUND_UPGRADE = f"{ZERG_UPGRADE_PREFIX} Ground Upgrade"
-PROGRESSIVE_ZERG_FLYER_UPGRADE = f"{ZERG_FLYER_UPGRADE_PREFIX} Upgrade"
-PROGRESSIVE_ZERG_WEAPON_ARMOR_UPGRADE = f"{ZERG_UPGRADE_PREFIX} Weapon/Armor Upgrade"
-
-# Zerg Unit Upgrades
-ZERGLING_HARDENED_CARAPACE = "Hardened Carapace (Zergling)"
-ZERGLING_ADRENAL_OVERLOAD = "Adrenal Overload (Zergling)"
-ZERGLING_METABOLIC_BOOST = "Metabolic Boost (Zergling)"
-ZERGLING_SHREDDING_CLAWS = "Shredding Claws (Zergling)"
-ROACH_HYDRIODIC_BILE = "Hydriodic Bile (Roach)"
-ROACH_ADAPTIVE_PLATING = "Adaptive Plating (Roach)"
-ROACH_TUNNELING_CLAWS = "Tunneling Claws (Roach)"
-ROACH_GLIAL_RECONSTITUTION = "Glial Reconstitution (Roach)"
-ROACH_ORGANIC_CARAPACE = "Organic Carapace (Roach)"
-HYDRALISK_FRENZY = "Frenzy (Hydralisk)"
-HYDRALISK_ANCILLARY_CARAPACE = "Ancillary Carapace (Hydralisk)"
-HYDRALISK_GROOVED_SPINES = "Grooved Spines (Hydralisk)"
-HYDRALISK_MUSCULAR_AUGMENTS = "Muscular Augments (Hydralisk)"
-HYDRALISK_RESOURCE_EFFICIENCY = "Resource Efficiency (Hydralisk)"
-BANELING_CORROSIVE_ACID = "Corrosive Acid (Baneling)"
-BANELING_RUPTURE = "Rupture (Baneling)"
-BANELING_REGENERATIVE_ACID = "Regenerative Acid (Baneling)"
-BANELING_CENTRIFUGAL_HOOKS = "Centrifugal Hooks (Baneling)"
-BANELING_TUNNELING_JAWS = "Tunneling Jaws (Baneling)"
-BANELING_RAPID_METAMORPH = "Rapid Metamorph (Baneling)"
-MUTALISK_VICIOUS_GLAIVE = "Vicious Glaive (Mutalisk)"
-MUTALISK_RAPID_REGENERATION = "Rapid Regeneration (Mutalisk)"
-MUTALISK_SUNDERING_GLAIVE = "Sundering Glaive (Mutalisk)"
-MUTALISK_SEVERING_GLAIVE = "Severing Glaive (Mutalisk)"
-MUTALISK_AERODYNAMIC_GLAIVE_SHAPE = "Aerodynamic Glaive Shape (Mutalisk)"
-SWARM_HOST_BURROW = "Burrow (Swarm Host)"
-SWARM_HOST_RAPID_INCUBATION = "Rapid Incubation (Swarm Host)"
-SWARM_HOST_PRESSURIZED_GLANDS = "Pressurized Glands (Swarm Host)"
-SWARM_HOST_LOCUST_METABOLIC_BOOST = "Locust Metabolic Boost (Swarm Host)"
-SWARM_HOST_ENDURING_LOCUSTS = "Enduring Locusts (Swarm Host)"
-SWARM_HOST_ORGANIC_CARAPACE = "Organic Carapace (Swarm Host)"
-SWARM_HOST_RESOURCE_EFFICIENCY = "Resource Efficiency (Swarm Host)"
-ULTRALISK_BURROW_CHARGE = "Burrow Charge (Ultralisk)"
-ULTRALISK_TISSUE_ASSIMILATION = "Tissue Assimilation (Ultralisk)"
-ULTRALISK_MONARCH_BLADES = "Monarch Blades (Ultralisk)"
-ULTRALISK_ANABOLIC_SYNTHESIS = "Anabolic Synthesis (Ultralisk)"
-ULTRALISK_CHITINOUS_PLATING = "Chitinous Plating (Ultralisk)"
-ULTRALISK_ORGANIC_CARAPACE = "Organic Carapace (Ultralisk)"
-ULTRALISK_RESOURCE_EFFICIENCY = "Resource Efficiency (Ultralisk)"
-CORRUPTOR_CORRUPTION = "Corruption (Corruptor)"
-CORRUPTOR_CAUSTIC_SPRAY = "Caustic Spray (Corruptor)"
-SCOURGE_VIRULENT_SPORES = "Virulent Spores (Scourge)"
-SCOURGE_RESOURCE_EFFICIENCY = "Resource Efficiency (Scourge)"
-SCOURGE_SWARM_SCOURGE = "Swarm Scourge (Scourge)"
-DEVOURER_CORROSIVE_SPRAY = "Corrosive Spray (Devourer)"
-DEVOURER_GAPING_MAW = "Gaping Maw (Devourer)"
-DEVOURER_IMPROVED_OSMOSIS = "Improved Osmosis (Devourer)"
-DEVOURER_PRESCIENT_SPORES = "Prescient Spores (Devourer)"
-GUARDIAN_PROLONGED_DISPERSION = "Prolonged Dispersion (Guardian)"
-GUARDIAN_PRIMAL_ADAPTATION = "Primal Adaptation (Guardian)"
-GUARDIAN_SORONAN_ACID = "Soronan Acid (Guardian)"
-IMPALER_ADAPTIVE_TALONS = "Adaptive Talons (Impaler)"
-IMPALER_SECRETION_GLANDS = "Secretion Glands (Impaler)"
-IMPALER_HARDENED_TENTACLE_SPINES = "Hardened Tentacle Spines (Impaler)"
-LURKER_SEISMIC_SPINES = "Seismic Spines (Lurker)"
-LURKER_ADAPTED_SPINES = "Adapted Spines (Lurker)"
-RAVAGER_POTENT_BILE = "Potent Bile (Ravager)"
-RAVAGER_BLOATED_BILE_DUCTS = "Bloated Bile Ducts (Ravager)"
-RAVAGER_DEEP_TUNNEL = "Deep Tunnel (Ravager)"
-VIPER_PARASITIC_BOMB = "Parasitic Bomb (Viper)"
-VIPER_PARALYTIC_BARBS = "Paralytic Barbs (Viper)"
-VIPER_VIRULENT_MICROBES = "Virulent Microbes (Viper)"
-BROOD_LORD_POROUS_CARTILAGE = "Porous Cartilage (Brood Lord)"
-BROOD_LORD_EVOLVED_CARAPACE = "Evolved Carapace (Brood Lord)"
-BROOD_LORD_SPLITTER_MITOSIS = "Splitter Mitosis (Brood Lord)"
-BROOD_LORD_RESOURCE_EFFICIENCY = "Resource Efficiency (Brood Lord)"
-INFESTOR_INFESTED_TERRAN = "Infested Terran (Infestor)"
-INFESTOR_MICROBIAL_SHROUD = "Microbial Shroud (Infestor)"
-SWARM_QUEEN_SPAWN_LARVAE = "Spawn Larvae (Swarm Queen)"
-SWARM_QUEEN_DEEP_TUNNEL = "Deep Tunnel (Swarm Queen)"
-SWARM_QUEEN_ORGANIC_CARAPACE = "Organic Carapace (Swarm Queen)"
-SWARM_QUEEN_BIO_MECHANICAL_TRANSFUSION = "Bio-Mechanical Transfusion (Swarm Queen)"
-SWARM_QUEEN_RESOURCE_EFFICIENCY = "Resource Efficiency (Swarm Queen)"
-SWARM_QUEEN_INCUBATOR_CHAMBER = "Incubator Chamber (Swarm Queen)"
-BROOD_QUEEN_FUNGAL_GROWTH = "Fungal Growth (Brood Queen)"
-BROOD_QUEEN_ENSNARE = "Ensnare (Brood Queen)"
-BROOD_QUEEN_ENHANCED_MITOCHONDRIA = "Enhanced Mitochondria (Brood Queen)"
-
-# Zerg Strains
-ZERGLING_RAPTOR_STRAIN = "Raptor Strain (Zergling)"
-ZERGLING_SWARMLING_STRAIN = "Swarmling Strain (Zergling)"
-ROACH_VILE_STRAIN = "Vile Strain (Roach)"
-ROACH_CORPSER_STRAIN = "Corpser Strain (Roach)"
-BANELING_SPLITTER_STRAIN = "Splitter Strain (Baneling)"
-BANELING_HUNTER_STRAIN = "Hunter Strain (Baneling)"
-SWARM_HOST_CARRION_STRAIN = "Carrion Strain (Swarm Host)"
-SWARM_HOST_CREEPER_STRAIN = "Creeper Strain (Swarm Host)"
-ULTRALISK_NOXIOUS_STRAIN = "Noxious Strain (Ultralisk)"
-ULTRALISK_TORRASQUE_STRAIN = "Torrasque Strain (Ultralisk)"
-
-# Morphs
-ZERGLING_BANELING_ASPECT = "Baneling Aspect (Zergling)"
-HYDRALISK_IMPALER_ASPECT = "Impaler Aspect (Hydralisk)"
-HYDRALISK_LURKER_ASPECT = "Lurker Aspect (Hydralisk)"
-MUTALISK_CORRUPTOR_BROOD_LORD_ASPECT = "Brood Lord Aspect (Mutalisk/Corruptor)"
-MUTALISK_CORRUPTOR_VIPER_ASPECT = "Viper Aspect (Mutalisk/Corruptor)"
-MUTALISK_CORRUPTOR_GUARDIAN_ASPECT = "Guardian Aspect (Mutalisk/Corruptor)"
-MUTALISK_CORRUPTOR_DEVOURER_ASPECT = "Devourer Aspect (Mutalisk/Corruptor)"
-ROACH_RAVAGER_ASPECT = "Ravager Aspect (Roach)"
-
-# Zerg Mercs
-INFESTED_MEDICS = "Infested Medics"
-INFESTED_SIEGE_TANKS = "Infested Siege Tanks"
-INFESTED_BANSHEES = "Infested Banshees"
-
-# Kerrigan Upgrades
-KERRIGAN_KINETIC_BLAST = "Kinetic Blast (Kerrigan Tier 1)"
-KERRIGAN_HEROIC_FORTITUDE = "Heroic Fortitude (Kerrigan Tier 1)"
-KERRIGAN_LEAPING_STRIKE = "Leaping Strike (Kerrigan Tier 1)"
-KERRIGAN_CRUSHING_GRIP = "Crushing Grip (Kerrigan Tier 2)"
-KERRIGAN_CHAIN_REACTION = "Chain Reaction (Kerrigan Tier 2)"
-KERRIGAN_PSIONIC_SHIFT = "Psionic Shift (Kerrigan Tier 2)"
-KERRIGAN_WILD_MUTATION = "Wild Mutation (Kerrigan Tier 4)"
-KERRIGAN_SPAWN_BANELINGS = "Spawn Banelings (Kerrigan Tier 4)"
-KERRIGAN_MEND = "Mend (Kerrigan Tier 4)"
-KERRIGAN_INFEST_BROODLINGS = "Infest Broodlings (Kerrigan Tier 6)"
-KERRIGAN_FURY = "Fury (Kerrigan Tier 6)"
-KERRIGAN_ABILITY_EFFICIENCY = "Ability Efficiency (Kerrigan Tier 6)"
-KERRIGAN_APOCALYPSE = "Apocalypse (Kerrigan Tier 7)"
-KERRIGAN_SPAWN_LEVIATHAN = "Spawn Leviathan (Kerrigan Tier 7)"
-KERRIGAN_DROP_PODS = "Drop-Pods (Kerrigan Tier 7)"
-KERRIGAN_PRIMAL_FORM = "Primal Form (Kerrigan)"
-
-# Misc Upgrades
-KERRIGAN_ZERGLING_RECONSTITUTION = "Zergling Reconstitution (Kerrigan Tier 3)"
-KERRIGAN_IMPROVED_OVERLORDS = "Improved Overlords (Kerrigan Tier 3)"
-KERRIGAN_AUTOMATED_EXTRACTORS = "Automated Extractors (Kerrigan Tier 3)"
-KERRIGAN_TWIN_DRONES = "Twin Drones (Kerrigan Tier 5)"
-KERRIGAN_MALIGNANT_CREEP = "Malignant Creep (Kerrigan Tier 5)"
-KERRIGAN_VESPENE_EFFICIENCY = "Vespene Efficiency (Kerrigan Tier 5)"
-OVERLORD_VENTRAL_SACS = "Ventral Sacs (Overlord)"
-
-# Kerrigan Levels
-KERRIGAN_LEVELS_1 = "1 Kerrigan Level"
-KERRIGAN_LEVELS_2 = "2 Kerrigan Levels"
-KERRIGAN_LEVELS_3 = "3 Kerrigan Levels"
-KERRIGAN_LEVELS_4 = "4 Kerrigan Levels"
-KERRIGAN_LEVELS_5 = "5 Kerrigan Levels"
-KERRIGAN_LEVELS_6 = "6 Kerrigan Levels"
-KERRIGAN_LEVELS_7 = "7 Kerrigan Levels"
-KERRIGAN_LEVELS_8 = "8 Kerrigan Levels"
-KERRIGAN_LEVELS_9 = "9 Kerrigan Levels"
-KERRIGAN_LEVELS_10 = "10 Kerrigan Levels"
-KERRIGAN_LEVELS_14 = "14 Kerrigan Levels"
-KERRIGAN_LEVELS_35 = "35 Kerrigan Levels"
-KERRIGAN_LEVELS_70 = "70 Kerrigan Levels"
-
-# Protoss Units
-ZEALOT = "Zealot"
-STALKER = "Stalker"
-HIGH_TEMPLAR = "High Templar"
-DARK_TEMPLAR = "Dark Templar"
-IMMORTAL = "Immortal"
-COLOSSUS = "Colossus"
-PHOENIX = "Phoenix"
-VOID_RAY = "Void Ray"
-CARRIER = "Carrier"
-OBSERVER = "Observer"
-CENTURION = "Centurion"
-SENTINEL = "Sentinel"
-SUPPLICANT = "Supplicant"
-INSTIGATOR = "Instigator"
-SLAYER = "Slayer"
-SENTRY = "Sentry"
-ENERGIZER = "Energizer"
-HAVOC = "Havoc"
-SIGNIFIER = "Signifier"
-ASCENDANT = "Ascendant"
-AVENGER = "Avenger"
-BLOOD_HUNTER = "Blood Hunter"
-DRAGOON = "Dragoon"
-DARK_ARCHON = "Dark Archon"
-ADEPT = "Adept"
-WARP_PRISM = "Warp Prism"
-ANNIHILATOR = "Annihilator"
-VANGUARD = "Vanguard"
-WRATHWALKER = "Wrathwalker"
-REAVER = "Reaver"
-DISRUPTOR = "Disruptor"
-MIRAGE = "Mirage"
-CORSAIR = "Corsair"
-DESTROYER = "Destroyer"
-SCOUT = "Scout"
-TEMPEST = "Tempest"
-MOTHERSHIP = "Mothership"
-ARBITER = "Arbiter"
-ORACLE = "Oracle"
-
-# Upgrades
-PROTOSS_UPGRADE_PREFIX = "Progressive Protoss"
-PROTOSS_GROUND_UPGRADE_PREFIX = f"{PROTOSS_UPGRADE_PREFIX} Ground"
-PROTOSS_AIR_UPGRADE_PREFIX = f"{PROTOSS_UPGRADE_PREFIX} Air"
-PROGRESSIVE_PROTOSS_GROUND_WEAPON = f"{PROTOSS_GROUND_UPGRADE_PREFIX} Weapon"
-PROGRESSIVE_PROTOSS_GROUND_ARMOR = f"{PROTOSS_GROUND_UPGRADE_PREFIX} Armor"
-PROGRESSIVE_PROTOSS_SHIELDS = f"{PROTOSS_UPGRADE_PREFIX} Shields"
-PROGRESSIVE_PROTOSS_AIR_WEAPON = f"{PROTOSS_AIR_UPGRADE_PREFIX} Weapon"
-PROGRESSIVE_PROTOSS_AIR_ARMOR = f"{PROTOSS_AIR_UPGRADE_PREFIX} Armor"
-PROGRESSIVE_PROTOSS_WEAPON_UPGRADE = f"{PROTOSS_UPGRADE_PREFIX} Weapon Upgrade"
-PROGRESSIVE_PROTOSS_ARMOR_UPGRADE = f"{PROTOSS_UPGRADE_PREFIX} Armor Upgrade"
-PROGRESSIVE_PROTOSS_GROUND_UPGRADE = f"{PROTOSS_GROUND_UPGRADE_PREFIX} Upgrade"
-PROGRESSIVE_PROTOSS_AIR_UPGRADE = f"{PROTOSS_AIR_UPGRADE_PREFIX} Upgrade"
-PROGRESSIVE_PROTOSS_WEAPON_ARMOR_UPGRADE = f"{PROTOSS_UPGRADE_PREFIX} Weapon/Armor Upgrade"
-
-# Buildings
-PHOTON_CANNON = "Photon Cannon"
-KHAYDARIN_MONOLITH = "Khaydarin Monolith"
-SHIELD_BATTERY = "Shield Battery"
-
-# Unit Upgrades
-SUPPLICANT_BLOOD_SHIELD = "Blood Shield (Supplicant)"
-SUPPLICANT_SOUL_AUGMENTATION = "Soul Augmentation (Supplicant)"
-SUPPLICANT_SHIELD_REGENERATION = "Shield Regeneration (Supplicant)"
-ADEPT_SHOCKWAVE = "Shockwave (Adept)"
-ADEPT_RESONATING_GLAIVES = "Resonating Glaives (Adept)"
-ADEPT_PHASE_BULWARK = "Phase Bulwark (Adept)"
-STALKER_INSTIGATOR_SLAYER_DISINTEGRATING_PARTICLES = "Disintegrating Particles (Stalker/Instigator/Slayer)"
-STALKER_INSTIGATOR_SLAYER_PARTICLE_REFLECTION = "Particle Reflection (Stalker/Instigator/Slayer)"
-DRAGOON_HIGH_IMPACT_PHASE_DISRUPTORS = "High Impact Phase Disruptor (Dragoon)"
-DRAGOON_TRILLIC_COMPRESSION_SYSTEM = "Trillic Compression System (Dragoon)"
-DRAGOON_SINGULARITY_CHARGE = "Singularity Charge (Dragoon)"
-DRAGOON_ENHANCED_STRIDER_SERVOS = "Enhanced Strider Servos (Dragoon)"
-SCOUT_COMBAT_SENSOR_ARRAY = "Combat Sensor Array (Scout)"
-SCOUT_APIAL_SENSORS = "Apial Sensors (Scout)"
-SCOUT_GRAVITIC_THRUSTERS = "Gravitic Thrusters (Scout)"
-SCOUT_ADVANCED_PHOTON_BLASTERS = "Advanced Photon Blasters (Scout)"
-TEMPEST_TECTONIC_DESTABILIZERS = "Tectonic Destabilizers (Tempest)"
-TEMPEST_QUANTIC_REACTOR = "Quantic Reactor (Tempest)"
-TEMPEST_GRAVITY_SLING = "Gravity Sling (Tempest)"
-PHOENIX_MIRAGE_IONIC_WAVELENGTH_FLUX = "Ionic Wavelength Flux (Phoenix/Mirage)"
-PHOENIX_MIRAGE_ANION_PULSE_CRYSTALS = "Anion Pulse-Crystals (Phoenix/Mirage)"
-CORSAIR_STEALTH_DRIVE = "Stealth Drive (Corsair)"
-CORSAIR_ARGUS_JEWEL = "Argus Jewel (Corsair)"
-CORSAIR_SUSTAINING_DISRUPTION = "Sustaining Disruption (Corsair)"
-CORSAIR_NEUTRON_SHIELDS = "Neutron Shields (Corsair)"
-ORACLE_STEALTH_DRIVE = "Stealth Drive (Oracle)"
-ORACLE_STASIS_CALIBRATION = "Stasis Calibration (Oracle)"
-ORACLE_TEMPORAL_ACCELERATION_BEAM = "Temporal Acceleration Beam (Oracle)"
-ARBITER_CHRONOSTATIC_REINFORCEMENT = "Chronostatic Reinforcement (Arbiter)"
-ARBITER_KHAYDARIN_CORE = "Khaydarin Core (Arbiter)"
-ARBITER_SPACETIME_ANCHOR = "Spacetime Anchor (Arbiter)"
-ARBITER_RESOURCE_EFFICIENCY = "Resource Efficiency (Arbiter)"
-ARBITER_ENHANCED_CLOAK_FIELD = "Enhanced Cloak Field (Arbiter)"
-CARRIER_GRAVITON_CATAPULT = "Graviton Catapult (Carrier)"
-CARRIER_HULL_OF_PAST_GLORIES = "Hull of Past Glories (Carrier)"
-VOID_RAY_DESTROYER_FLUX_VANES = "Flux Vanes (Void Ray/Destroyer)"
-DESTROYER_REFORGED_BLOODSHARD_CORE = "Reforged Bloodshard Core (Destroyer)"
-WARP_PRISM_GRAVITIC_DRIVE = "Gravitic Drive (Warp Prism)"
-WARP_PRISM_PHASE_BLASTER = "Phase Blaster (Warp Prism)"
-WARP_PRISM_WAR_CONFIGURATION = "War Configuration (Warp Prism)"
-OBSERVER_GRAVITIC_BOOSTERS = "Gravitic Boosters (Observer)"
-OBSERVER_SENSOR_ARRAY = "Sensor Array (Observer)"
-REAVER_SCARAB_DAMAGE = "Scarab Damage (Reaver)"
-REAVER_SOLARITE_PAYLOAD = "Solarite Payload (Reaver)"
-REAVER_REAVER_CAPACITY = "Reaver Capacity (Reaver)"
-REAVER_RESOURCE_EFFICIENCY = "Resource Efficiency (Reaver)"
-VANGUARD_AGONY_LAUNCHERS = "Agony Launchers (Vanguard)"
-VANGUARD_MATTER_DISPERSION = "Matter Dispersion (Vanguard)"
-IMMORTAL_ANNIHILATOR_SINGULARITY_CHARGE = "Singularity Charge (Immortal/Annihilator)"
-IMMORTAL_ANNIHILATOR_ADVANCED_TARGETING_MECHANICS = "Advanced Targeting Mechanics (Immortal/Annihilator)"
-COLOSSUS_PACIFICATION_PROTOCOL = "Pacification Protocol (Colossus)"
-WRATHWALKER_RAPID_POWER_CYCLING = "Rapid Power Cycling (Wrathwalker)"
-WRATHWALKER_EYE_OF_WRATH = "Eye of Wrath (Wrathwalker)"
-DARK_TEMPLAR_AVENGER_BLOOD_HUNTER_SHROUD_OF_ADUN = "Shroud of Adun (Dark Templar/Avenger/Blood Hunter)"
-DARK_TEMPLAR_AVENGER_BLOOD_HUNTER_SHADOW_GUARD_TRAINING = "Shadow Guard Training (Dark Templar/Avenger/Blood Hunter)"
-DARK_TEMPLAR_AVENGER_BLOOD_HUNTER_BLINK = "Blink (Dark Templar/Avenger/Blood Hunter)"
-DARK_TEMPLAR_AVENGER_BLOOD_HUNTER_RESOURCE_EFFICIENCY = "Resource Efficiency (Dark Templar/Avenger/Blood Hunter)"
-DARK_TEMPLAR_DARK_ARCHON_MELD = "Dark Archon Meld (Dark Templar)"
-HIGH_TEMPLAR_SIGNIFIER_UNSHACKLED_PSIONIC_STORM = "Unshackled Psionic Storm (High Templar/Signifier)"
-HIGH_TEMPLAR_SIGNIFIER_HALLUCINATION = "Hallucination (High Templar/Signifier)"
-HIGH_TEMPLAR_SIGNIFIER_KHAYDARIN_AMULET = "Khaydarin Amulet (High Templar/Signifier)"
-ARCHON_HIGH_ARCHON = "High Archon (Archon)"
-DARK_ARCHON_FEEDBACK = "Feedback (Dark Archon)"
-DARK_ARCHON_MAELSTROM = "Maelstrom (Dark Archon)"
-DARK_ARCHON_ARGUS_TALISMAN = "Argus Talisman (Dark Archon)"
-ASCENDANT_POWER_OVERWHELMING = "Power Overwhelming (Ascendant)"
-ASCENDANT_CHAOTIC_ATTUNEMENT = "Chaotic Attunement (Ascendant)"
-ASCENDANT_BLOOD_AMULET = "Blood Amulet (Ascendant)"
-SENTRY_ENERGIZER_HAVOC_CLOAKING_MODULE = "Cloaking Module (Sentry/Energizer/Havoc)"
-SENTRY_ENERGIZER_HAVOC_SHIELD_BATTERY_RAPID_RECHARGING = "Rapid Recharging (Sentry/Energizer/Havoc/Shield Battery)"
-SENTRY_FORCE_FIELD = "Force Field (Sentry)"
-SENTRY_HALLUCINATION = "Hallucination (Sentry)"
-ENERGIZER_RECLAMATION = "Reclamation (Energizer)"
-ENERGIZER_FORGED_CHASSIS = "Forged Chassis (Energizer)"
-HAVOC_DETECT_WEAKNESS = "Detect Weakness (Havoc)"
-HAVOC_BLOODSHARD_RESONANCE = "Bloodshard Resonance (Havoc)"
-ZEALOT_SENTINEL_CENTURION_LEG_ENHANCEMENTS = "Leg Enhancements (Zealot/Sentinel/Centurion)"
-ZEALOT_SENTINEL_CENTURION_SHIELD_CAPACITY = "Shield Capacity (Zealot/Sentinel/Centurion)"
-
-# Spear Of Adun
-SOA_CHRONO_SURGE = "Chrono Surge (Spear of Adun Calldown)"
-SOA_PROGRESSIVE_PROXY_PYLON = "Progressive Proxy Pylon (Spear of Adun Calldown)"
-SOA_PYLON_OVERCHARGE = "Pylon Overcharge (Spear of Adun Calldown)"
-SOA_ORBITAL_STRIKE = "Orbital Strike (Spear of Adun Calldown)"
-SOA_TEMPORAL_FIELD = "Temporal Field (Spear of Adun Calldown)"
-SOA_SOLAR_LANCE = "Solar Lance (Spear of Adun Calldown)"
-SOA_MASS_RECALL = "Mass Recall (Spear of Adun Calldown)"
-SOA_SHIELD_OVERCHARGE = "Shield Overcharge (Spear of Adun Calldown)"
-SOA_DEPLOY_FENIX = "Deploy Fenix (Spear of Adun Calldown)"
-SOA_PURIFIER_BEAM = "Purifier Beam (Spear of Adun Calldown)"
-SOA_TIME_STOP = "Time Stop (Spear of Adun Calldown)"
-SOA_SOLAR_BOMBARDMENT = "Solar Bombardment (Spear of Adun Calldown)"
-
-# Generic upgrades
-MATRIX_OVERLOAD = "Matrix Overload"
-QUATRO = "Quatro"
-NEXUS_OVERCHARGE = "Nexus Overcharge"
-ORBITAL_ASSIMILATORS = "Orbital Assimilators"
-WARP_HARMONIZATION = "Warp Harmonization"
-GUARDIAN_SHELL = "Guardian Shell"
-RECONSTRUCTION_BEAM = "Reconstruction Beam (Spear of Adun Auto-Cast)"
-OVERWATCH = "Overwatch (Spear of Adun Auto-Cast)"
-SUPERIOR_WARP_GATES = "Superior Warp Gates"
-ENHANCED_TARGETING = "Enhanced Targeting"
-OPTIMIZED_ORDNANCE = "Optimized Ordnance"
-KHALAI_INGENUITY = "Khalai Ingenuity"
-AMPLIFIED_ASSIMILATORS = "Amplified Assimilators"
-
-# Filler items
-STARTING_MINERALS = "Additional Starting Minerals"
-STARTING_VESPENE = "Additional Starting Vespene"
-STARTING_SUPPLY = "Additional Starting Supply"
-NOTHING = "Nothing"
diff --git a/worlds/sc2/Items.py b/worlds/sc2/Items.py
deleted file mode 100644
index ee1f34d7..00000000
--- a/worlds/sc2/Items.py
+++ /dev/null
@@ -1,2554 +0,0 @@
-import inspect
-from pydoc import describe
-
-from BaseClasses import Item, ItemClassification, MultiWorld
-import typing
-
-from .Options import get_option_value, RequiredTactics
-from .MissionTables import SC2Mission, SC2Race, SC2Campaign, campaign_mission_table
-from . import ItemNames
-from worlds.AutoWorld import World
-
-
-class ItemData(typing.NamedTuple):
- code: int
- type: str
- number: int # Important for bot commands to send the item into the game
- race: SC2Race
- classification: ItemClassification = ItemClassification.useful
- quantity: int = 1
- parent_item: typing.Optional[str] = None
- origin: typing.Set[str] = {"wol"}
- description: typing.Optional[str] = None
- important_for_filtering: bool = False
-
- def is_important_for_filtering(self):
- return self.important_for_filtering \
- or self.classification == ItemClassification.progression \
- or self.classification == ItemClassification.progression_skip_balancing
-
-
-class StarcraftItem(Item):
- game: str = "Starcraft 2"
-
-
-def get_full_item_list():
- return item_table
-
-
-SC2WOL_ITEM_ID_OFFSET = 1000
-SC2HOTS_ITEM_ID_OFFSET = SC2WOL_ITEM_ID_OFFSET + 1000
-SC2LOTV_ITEM_ID_OFFSET = SC2HOTS_ITEM_ID_OFFSET + 1000
-
-# Descriptions
-WEAPON_ARMOR_UPGRADE_NOTE = inspect.cleandoc("""
- Must be researched during the mission if the mission type isn't set to auto-unlock generic upgrades.
-""")
-LASER_TARGETING_SYSTEMS_DESCRIPTION = "Increases vision by 2 and weapon range by 1."
-STIMPACK_SMALL_COST = 10
-STIMPACK_SMALL_HEAL = 30
-STIMPACK_LARGE_COST = 20
-STIMPACK_LARGE_HEAL = 60
-STIMPACK_TEMPLATE = inspect.cleandoc("""
- Level 1: Stimpack: Increases unit movement and attack speed for 15 seconds. Injures the unit for {} life.
- Level 2: Super Stimpack: Instead of injuring the unit, heals the unit for {} life instead.
-""")
-STIMPACK_SMALL_DESCRIPTION = STIMPACK_TEMPLATE.format(STIMPACK_SMALL_COST, STIMPACK_SMALL_HEAL)
-STIMPACK_LARGE_DESCRIPTION = STIMPACK_TEMPLATE.format(STIMPACK_LARGE_COST, STIMPACK_LARGE_HEAL)
-SMART_SERVOS_DESCRIPTION = "Increases transformation speed between modes."
-INTERNAL_TECH_MODULE_DESCRIPTION_TEMPLATE = "{} can be trained from a {} without an attached Tech Lab."
-RESOURCE_EFFICIENCY_DESCRIPTION_TEMPLATE = "Reduces {} resource and supply cost."
-RESOURCE_EFFICIENCY_NO_SUPPLY_DESCRIPTION_TEMPLATE = "Reduces {} resource cost."
-CLOAK_DESCRIPTION_TEMPLATE = "Allows {} to use the Cloak ability."
-
-
-# The items are sorted by their IDs. The IDs shall be kept for compatibility with older games.
-item_table = {
- # WoL
- ItemNames.MARINE:
- ItemData(0 + SC2WOL_ITEM_ID_OFFSET, "Unit", 0, SC2Race.TERRAN,
- classification=ItemClassification.progression,
- description="General-purpose infantry."),
- ItemNames.MEDIC:
- ItemData(1 + SC2WOL_ITEM_ID_OFFSET, "Unit", 1, SC2Race.TERRAN,
- classification=ItemClassification.progression,
- description="Support trooper. Heals nearby biological units."),
- ItemNames.FIREBAT:
- ItemData(2 + SC2WOL_ITEM_ID_OFFSET, "Unit", 2, SC2Race.TERRAN,
- classification=ItemClassification.progression,
- description="Specialized anti-infantry attacker."),
- ItemNames.MARAUDER:
- ItemData(3 + SC2WOL_ITEM_ID_OFFSET, "Unit", 3, SC2Race.TERRAN,
- classification=ItemClassification.progression,
- description="Heavy assault infantry."),
- ItemNames.REAPER:
- ItemData(4 + SC2WOL_ITEM_ID_OFFSET, "Unit", 4, SC2Race.TERRAN,
- classification=ItemClassification.progression,
- description="Raider. Capable of jumping up and down cliffs. Throws explosive mines."),
- ItemNames.HELLION:
- ItemData(5 + SC2WOL_ITEM_ID_OFFSET, "Unit", 5, SC2Race.TERRAN,
- classification=ItemClassification.progression,
- description="Fast scout. Has a flame attack that damages all enemy units in its line of fire."),
- ItemNames.VULTURE:
- ItemData(6 + SC2WOL_ITEM_ID_OFFSET, "Unit", 6, SC2Race.TERRAN,
- classification=ItemClassification.progression,
- description="Fast skirmish unit. Can use the Spider Mine ability."),
- ItemNames.GOLIATH:
- ItemData(7 + SC2WOL_ITEM_ID_OFFSET, "Unit", 7, SC2Race.TERRAN,
- classification=ItemClassification.progression,
- description="Heavy-fire support unit."),
- ItemNames.DIAMONDBACK:
- ItemData(8 + SC2WOL_ITEM_ID_OFFSET, "Unit", 8, SC2Race.TERRAN,
- classification=ItemClassification.progression,
- description="Fast, high-damage hovertank. Rail Gun can fire while the Diamondback is moving."),
- ItemNames.SIEGE_TANK:
- ItemData(9 + SC2WOL_ITEM_ID_OFFSET, "Unit", 9, SC2Race.TERRAN,
- classification=ItemClassification.progression,
- description="Heavy tank. Long-range artillery in Siege Mode."),
- ItemNames.MEDIVAC:
- ItemData(10 + SC2WOL_ITEM_ID_OFFSET, "Unit", 10, SC2Race.TERRAN,
- classification=ItemClassification.progression,
- description="Air transport. Heals nearby biological units."),
- ItemNames.WRAITH:
- ItemData(11 + SC2WOL_ITEM_ID_OFFSET, "Unit", 11, SC2Race.TERRAN,
- classification=ItemClassification.progression,
- description="Highly mobile flying unit. Excellent at surgical strikes."),
- ItemNames.VIKING:
- ItemData(12 + SC2WOL_ITEM_ID_OFFSET, "Unit", 12, SC2Race.TERRAN,
- classification=ItemClassification.progression,
- description=inspect.cleandoc(
- """
- Durable support flyer. Loaded with strong anti-capital air missiles.
- Can switch into Assault Mode to attack ground units.
- """
- )),
- ItemNames.BANSHEE:
- ItemData(13 + SC2WOL_ITEM_ID_OFFSET, "Unit", 13, SC2Race.TERRAN,
- classification=ItemClassification.progression,
- description="Tactical-strike aircraft."),
- ItemNames.BATTLECRUISER:
- ItemData(14 + SC2WOL_ITEM_ID_OFFSET, "Unit", 14, SC2Race.TERRAN,
- classification=ItemClassification.progression,
- description="Powerful warship."),
- ItemNames.GHOST:
- ItemData(15 + SC2WOL_ITEM_ID_OFFSET, "Unit", 15, SC2Race.TERRAN,
- classification=ItemClassification.progression,
- description=inspect.cleandoc(
- """
- Infiltration unit. Can use Snipe and Cloak abilities. Can also call down Tactical Nukes.
- """
- )),
- ItemNames.SPECTRE:
- ItemData(16 + SC2WOL_ITEM_ID_OFFSET, "Unit", 16, SC2Race.TERRAN,
- classification=ItemClassification.progression,
- description=inspect.cleandoc(
- """
- Infiltration unit. Can use Ultrasonic Pulse, Psionic Lash, and Cloak.
- Can also call down Tactical Nukes.
- """
- )),
- ItemNames.THOR:
- ItemData(17 + SC2WOL_ITEM_ID_OFFSET, "Unit", 17, SC2Race.TERRAN,
- classification=ItemClassification.progression,
- description="Heavy assault mech."),
- # EE units
- ItemNames.LIBERATOR:
- ItemData(18 + SC2WOL_ITEM_ID_OFFSET, "Unit", 18, SC2Race.TERRAN,
- classification=ItemClassification.progression, origin={"nco", "ext"},
- description=inspect.cleandoc(
- """
- Artillery fighter. Loaded with missiles that deal area damage to enemy air targets.
- Can switch into Defender Mode to provide siege support.
- """
- )),
- ItemNames.VALKYRIE:
- ItemData(19 + SC2WOL_ITEM_ID_OFFSET, "Unit", 19, SC2Race.TERRAN,
- classification=ItemClassification.progression, origin={"bw"},
- description=inspect.cleandoc(
- """
- Advanced anti-aircraft fighter.
- Able to use cluster missiles that deal area damage to air targets.
- """
- )),
- ItemNames.WIDOW_MINE:
- ItemData(20 + SC2WOL_ITEM_ID_OFFSET, "Unit", 20, SC2Race.TERRAN,
- classification=ItemClassification.progression, origin={"ext"},
- description=inspect.cleandoc(
- """
- Robotic mine. Launches missiles at nearby enemy units while burrowed.
- Attacks deal splash damage in a small area around the target.
- Widow Mine is revealed when Sentinel Missile is on cooldown.
- """
- )),
- ItemNames.CYCLONE:
- ItemData(21 + SC2WOL_ITEM_ID_OFFSET, "Unit", 21, SC2Race.TERRAN,
- classification=ItemClassification.progression, origin={"ext"},
- description=inspect.cleandoc(
- """
- Mobile assault vehicle. Can use Lock On to quickly fire while moving.
- """
- )),
- ItemNames.HERC:
- ItemData(22 + SC2WOL_ITEM_ID_OFFSET, "Unit", 26, SC2Race.TERRAN,
- classification=ItemClassification.progression, origin={"ext"},
- description=inspect.cleandoc(
- """
- Front-line infantry. Can use Grapple.
- """
- )),
- ItemNames.WARHOUND:
- ItemData(23 + SC2WOL_ITEM_ID_OFFSET, "Unit", 27, SC2Race.TERRAN,
- classification=ItemClassification.progression, origin={"ext"},
- description=inspect.cleandoc(
- """
- Anti-vehicle mech. Haywire missiles do bonus damage to mechanical units.
- """
- )),
-
- # Some other items are moved to Upgrade group because of the way how the bot message is parsed
- ItemNames.PROGRESSIVE_TERRAN_INFANTRY_WEAPON:
- ItemData(100 + SC2WOL_ITEM_ID_OFFSET, "Upgrade", 0, SC2Race.TERRAN,
- quantity=3,
- description=inspect.cleandoc(
- f"""
- Increases damage of Terran infantry units.
- {WEAPON_ARMOR_UPGRADE_NOTE}
- """
- )),
- ItemNames.PROGRESSIVE_TERRAN_INFANTRY_ARMOR:
- ItemData(102 + SC2WOL_ITEM_ID_OFFSET, "Upgrade", 2, SC2Race.TERRAN,
- quantity=3,
- description=inspect.cleandoc(
- f"""
- Increases armor of Terran infantry units.
- {WEAPON_ARMOR_UPGRADE_NOTE}
- """
- )),
- ItemNames.PROGRESSIVE_TERRAN_VEHICLE_WEAPON:
- ItemData(103 + SC2WOL_ITEM_ID_OFFSET, "Upgrade", 4, SC2Race.TERRAN,
- quantity=3,
- description=inspect.cleandoc(
- f"""
- Increases damage of Terran vehicle units.
- {WEAPON_ARMOR_UPGRADE_NOTE}
- """
- )),
- ItemNames.PROGRESSIVE_TERRAN_VEHICLE_ARMOR:
- ItemData(104 + SC2WOL_ITEM_ID_OFFSET, "Upgrade", 6, SC2Race.TERRAN,
- quantity=3,
- description=inspect.cleandoc(
- f"""
- Increases armor of Terran vehicle units.
- {WEAPON_ARMOR_UPGRADE_NOTE}
- """
- )),
- ItemNames.PROGRESSIVE_TERRAN_SHIP_WEAPON:
- ItemData(105 + SC2WOL_ITEM_ID_OFFSET, "Upgrade", 8, SC2Race.TERRAN,
- quantity=3,
- description=inspect.cleandoc(
- f"""
- Increases damage of Terran starship units.
- {WEAPON_ARMOR_UPGRADE_NOTE}
- """
- )),
- ItemNames.PROGRESSIVE_TERRAN_SHIP_ARMOR:
- ItemData(106 + SC2WOL_ITEM_ID_OFFSET, "Upgrade", 10, SC2Race.TERRAN,
- quantity=3,
- description=inspect.cleandoc(
- f"""
- Increases armor of Terran starship units.
- {WEAPON_ARMOR_UPGRADE_NOTE}
- """
- )),
- # Upgrade bundle 'number' values are used as indices to get affected 'number's
- ItemNames.PROGRESSIVE_TERRAN_WEAPON_UPGRADE: ItemData(107 + SC2WOL_ITEM_ID_OFFSET, "Upgrade", 0, SC2Race.TERRAN, quantity=3),
- ItemNames.PROGRESSIVE_TERRAN_ARMOR_UPGRADE: ItemData(108 + SC2WOL_ITEM_ID_OFFSET, "Upgrade", 1, SC2Race.TERRAN, quantity=3),
- ItemNames.PROGRESSIVE_TERRAN_INFANTRY_UPGRADE: ItemData(109 + SC2WOL_ITEM_ID_OFFSET, "Upgrade", 2, SC2Race.TERRAN, quantity=3),
- ItemNames.PROGRESSIVE_TERRAN_VEHICLE_UPGRADE: ItemData(110 + SC2WOL_ITEM_ID_OFFSET, "Upgrade", 3, SC2Race.TERRAN, quantity=3),
- ItemNames.PROGRESSIVE_TERRAN_SHIP_UPGRADE: ItemData(111 + SC2WOL_ITEM_ID_OFFSET, "Upgrade", 4, SC2Race.TERRAN, quantity=3),
- ItemNames.PROGRESSIVE_TERRAN_WEAPON_ARMOR_UPGRADE: ItemData(112 + SC2WOL_ITEM_ID_OFFSET, "Upgrade", 5, SC2Race.TERRAN, quantity=3),
-
- # Unit and structure upgrades
- ItemNames.BUNKER_PROJECTILE_ACCELERATOR:
- ItemData(200 + SC2WOL_ITEM_ID_OFFSET, "Armory 1", 0, SC2Race.TERRAN,
- parent_item=ItemNames.BUNKER,
- description="Increases range of all units in the Bunker by 1."),
- ItemNames.BUNKER_NEOSTEEL_BUNKER:
- ItemData(201 + SC2WOL_ITEM_ID_OFFSET, "Armory 1", 1, SC2Race.TERRAN,
- parent_item=ItemNames.BUNKER,
- description="Increases the number of Bunker slots by 2."),
- ItemNames.MISSILE_TURRET_TITANIUM_HOUSING:
- ItemData(202 + SC2WOL_ITEM_ID_OFFSET, "Armory 1", 2, SC2Race.TERRAN,
- classification=ItemClassification.filler, parent_item=ItemNames.MISSILE_TURRET,
- description="Increases Missile Turret life by 75."),
- ItemNames.MISSILE_TURRET_HELLSTORM_BATTERIES:
- ItemData(203 + SC2WOL_ITEM_ID_OFFSET, "Armory 1", 3, SC2Race.TERRAN,
- parent_item=ItemNames.MISSILE_TURRET,
- description="The Missile Turret unleashes an additional flurry of missiles with each attack."),
- ItemNames.SCV_ADVANCED_CONSTRUCTION:
- ItemData(204 + SC2WOL_ITEM_ID_OFFSET, "Armory 1", 4, SC2Race.TERRAN,
- description="Multiple SCVs can construct a structure, reducing its construction time."),
- ItemNames.SCV_DUAL_FUSION_WELDERS:
- ItemData(205 + SC2WOL_ITEM_ID_OFFSET, "Armory 1", 5, SC2Race.TERRAN,
- description="SCVs repair twice as fast."),
- ItemNames.PROGRESSIVE_FIRE_SUPPRESSION_SYSTEM:
- ItemData(206 + SC2WOL_ITEM_ID_OFFSET, "Progressive Upgrade", 24, SC2Race.TERRAN,
- quantity=2,
- description=inspect.cleandoc(
- """
- Level 1: While on low health, Terran structures are repaired to half health instead of burning down.
- Level 2: Terran structures are repaired to full health instead of half health
- """
- )),
- ItemNames.PROGRESSIVE_ORBITAL_COMMAND:
- ItemData(207 + SC2WOL_ITEM_ID_OFFSET, "Progressive Upgrade", 26, SC2Race.TERRAN,
- quantity=2, classification=ItemClassification.progression,
- description=inspect.cleandoc(
- """
- Level 1: Allows Command Centers to use Scanner Sweep and Calldown: MULE abilities.
- Level 2: Orbital Command abilities work even in Planetary Fortress mode.
- """
- )),
- ItemNames.MARINE_PROGRESSIVE_STIMPACK:
- ItemData(208 + SC2WOL_ITEM_ID_OFFSET, "Progressive Upgrade", 0, SC2Race.TERRAN,
- classification=ItemClassification.progression, parent_item=ItemNames.MARINE, quantity=2,
- description=STIMPACK_SMALL_DESCRIPTION),
- ItemNames.MARINE_COMBAT_SHIELD:
- ItemData(209 + SC2WOL_ITEM_ID_OFFSET, "Armory 1", 9, SC2Race.TERRAN,
- classification=ItemClassification.progression, parent_item=ItemNames.MARINE,
- description="Increases Marine life by 10."),
- ItemNames.MEDIC_ADVANCED_MEDIC_FACILITIES:
- ItemData(210 + SC2WOL_ITEM_ID_OFFSET, "Armory 1", 10, SC2Race.TERRAN,
- classification=ItemClassification.filler, parent_item=ItemNames.MEDIC,
- description=INTERNAL_TECH_MODULE_DESCRIPTION_TEMPLATE.format("Medics", "Barracks")),
- ItemNames.MEDIC_STABILIZER_MEDPACKS:
- ItemData(211 + SC2WOL_ITEM_ID_OFFSET, "Armory 1", 11, SC2Race.TERRAN,
- classification=ItemClassification.progression, parent_item=ItemNames.MEDIC,
- description="Increases Medic heal speed. Reduces the amount of energy required for each heal."),
- ItemNames.FIREBAT_INCINERATOR_GAUNTLETS:
- ItemData(212 + SC2WOL_ITEM_ID_OFFSET, "Armory 1", 12, SC2Race.TERRAN,
- classification=ItemClassification.filler, parent_item=ItemNames.FIREBAT,
- description="Increases Firebat's damage radius by 40%"),
- ItemNames.FIREBAT_JUGGERNAUT_PLATING:
- ItemData(213 + SC2WOL_ITEM_ID_OFFSET, "Armory 1", 13, SC2Race.TERRAN,
- parent_item=ItemNames.FIREBAT,
- description="Increases Firebat's armor by 2."),
- ItemNames.MARAUDER_CONCUSSIVE_SHELLS:
- ItemData(214 + SC2WOL_ITEM_ID_OFFSET, "Armory 1", 14, SC2Race.TERRAN,
- parent_item=ItemNames.MARAUDER,
- description="Marauder attack temporarily slows all units in target area."),
- ItemNames.MARAUDER_KINETIC_FOAM:
- ItemData(215 + SC2WOL_ITEM_ID_OFFSET, "Armory 1", 15, SC2Race.TERRAN,
- parent_item=ItemNames.MARAUDER,
- description="Increases Marauder life by 25."),
- ItemNames.REAPER_U238_ROUNDS:
- ItemData(216 + SC2WOL_ITEM_ID_OFFSET, "Armory 1", 16, SC2Race.TERRAN,
- parent_item=ItemNames.REAPER,
- description=inspect.cleandoc(
- """
- Increases Reaper pistol attack range by 1.
- Reaper pistols do additional 3 damage to Light Armor.
- """
- )),
- ItemNames.REAPER_G4_CLUSTERBOMB:
- ItemData(217 + SC2WOL_ITEM_ID_OFFSET, "Armory 1", 17, SC2Race.TERRAN,
- classification=ItemClassification.progression, parent_item=ItemNames.REAPER,
- description="Timed explosive that does heavy area damage."),
- ItemNames.CYCLONE_MAG_FIELD_ACCELERATORS:
- ItemData(218 + SC2WOL_ITEM_ID_OFFSET, "Armory 1", 18, SC2Race.TERRAN,
- parent_item=ItemNames.CYCLONE, origin={"ext"},
- description="Increases Cyclone Lock On damage"),
- ItemNames.CYCLONE_MAG_FIELD_LAUNCHERS:
- ItemData(219 + SC2WOL_ITEM_ID_OFFSET, "Armory 1", 19, SC2Race.TERRAN,
- parent_item=ItemNames.CYCLONE, origin={"ext"},
- description="Increases Cyclone attack range by 2."),
- ItemNames.MARINE_LASER_TARGETING_SYSTEM:
- ItemData(220 + SC2WOL_ITEM_ID_OFFSET, "Armory 1", 8, SC2Race.TERRAN,
- classification=ItemClassification.filler, parent_item=ItemNames.MARINE, origin={"nco"},
- description=LASER_TARGETING_SYSTEMS_DESCRIPTION),
- ItemNames.MARINE_MAGRAIL_MUNITIONS:
- ItemData(221 + SC2WOL_ITEM_ID_OFFSET, "Armory 1", 20, SC2Race.TERRAN,
- classification=ItemClassification.progression, parent_item=ItemNames.MARINE, origin={"nco"},
- description="Deals 20 damage to target unit. Autocast on attack with a cooldown."),
- ItemNames.MARINE_OPTIMIZED_LOGISTICS:
- ItemData(222 + SC2WOL_ITEM_ID_OFFSET, "Armory 1", 21, SC2Race.TERRAN,
- classification=ItemClassification.filler, parent_item=ItemNames.MARINE, origin={"nco"},
- description="Increases Marine training speed."),
- ItemNames.MEDIC_RESTORATION:
- ItemData(223 + SC2WOL_ITEM_ID_OFFSET, "Armory 1", 22, SC2Race.TERRAN,
- classification=ItemClassification.filler, parent_item=ItemNames.MEDIC, origin={"bw"},
- description="Removes negative status effects from target allied unit."),
- ItemNames.MEDIC_OPTICAL_FLARE:
- ItemData(224 + SC2WOL_ITEM_ID_OFFSET, "Armory 1", 23, SC2Race.TERRAN,
- classification=ItemClassification.filler, parent_item=ItemNames.MEDIC, origin={"bw"},
- description="Reduces vision range of target enemy unit. Disables detection."),
- ItemNames.MEDIC_RESOURCE_EFFICIENCY:
- ItemData(225 + SC2WOL_ITEM_ID_OFFSET, "Armory 1", 24, SC2Race.TERRAN,
- classification=ItemClassification.filler, parent_item=ItemNames.MEDIC, origin={"bw"},
- description=RESOURCE_EFFICIENCY_DESCRIPTION_TEMPLATE.format("Medic")),
- ItemNames.FIREBAT_PROGRESSIVE_STIMPACK:
- ItemData(226 + SC2WOL_ITEM_ID_OFFSET, "Progressive Upgrade", 6, SC2Race.TERRAN,
- parent_item=ItemNames.FIREBAT, quantity=2, origin={"bw"},
- description=STIMPACK_LARGE_DESCRIPTION),
- ItemNames.FIREBAT_RESOURCE_EFFICIENCY:
- ItemData(227 + SC2WOL_ITEM_ID_OFFSET, "Armory 1", 25, SC2Race.TERRAN,
- parent_item=ItemNames.FIREBAT, origin={"bw"},
- description=RESOURCE_EFFICIENCY_DESCRIPTION_TEMPLATE.format("Firebat")),
- ItemNames.MARAUDER_PROGRESSIVE_STIMPACK:
- ItemData(228 + SC2WOL_ITEM_ID_OFFSET, "Progressive Upgrade", 8, SC2Race.TERRAN,
- parent_item=ItemNames.MARAUDER, quantity=2, origin={"nco"},
- description=STIMPACK_LARGE_DESCRIPTION),
- ItemNames.MARAUDER_LASER_TARGETING_SYSTEM:
- ItemData(229 + SC2WOL_ITEM_ID_OFFSET, "Armory 1", 26, SC2Race.TERRAN,
- classification=ItemClassification.filler, parent_item=ItemNames.MARAUDER, origin={"nco"},
- description=LASER_TARGETING_SYSTEMS_DESCRIPTION),
- ItemNames.MARAUDER_MAGRAIL_MUNITIONS:
- ItemData(230 + SC2WOL_ITEM_ID_OFFSET, "Armory 1", 27, SC2Race.TERRAN,
- classification=ItemClassification.filler, parent_item=ItemNames.MARAUDER, origin={"nco"},
- description="Deals 20 damage to target unit. Autocast on attack with a cooldown."),
- ItemNames.MARAUDER_INTERNAL_TECH_MODULE:
- ItemData(231 + SC2WOL_ITEM_ID_OFFSET, "Armory 1", 28, SC2Race.TERRAN,
- classification=ItemClassification.filler, parent_item=ItemNames.MARAUDER, origin={"nco"},
- description=INTERNAL_TECH_MODULE_DESCRIPTION_TEMPLATE.format("Marauders", "Barracks")),
- ItemNames.SCV_HOSTILE_ENVIRONMENT_ADAPTATION:
- ItemData(232 + SC2WOL_ITEM_ID_OFFSET, "Armory 1", 29, SC2Race.TERRAN,
- classification=ItemClassification.filler, origin={"bw"},
- description="Increases SCV life by 15 and attack speed slightly."),
- ItemNames.MEDIC_ADAPTIVE_MEDPACKS:
- ItemData(233 + SC2WOL_ITEM_ID_OFFSET, "Armory 2", 0, SC2Race.TERRAN,
- classification=ItemClassification.progression, parent_item=ItemNames.MEDIC, origin={"ext"},
- description="Allows Medics to heal mechanical and air units."),
- ItemNames.MEDIC_NANO_PROJECTOR:
- ItemData(234 + SC2WOL_ITEM_ID_OFFSET, "Armory 2", 1, SC2Race.TERRAN,
- classification=ItemClassification.filler, parent_item=ItemNames.MEDIC, origin={"ext"},
- description="Increases Medic heal range by 2."),
- ItemNames.FIREBAT_INFERNAL_PRE_IGNITER:
- ItemData(235 + SC2WOL_ITEM_ID_OFFSET, "Armory 2", 2, SC2Race.TERRAN,
- parent_item=ItemNames.FIREBAT, origin={"bw"},
- description="Firebats do an additional 4 damage to Light Armor."),
- ItemNames.FIREBAT_KINETIC_FOAM:
- ItemData(236 + SC2WOL_ITEM_ID_OFFSET, "Armory 2", 3, SC2Race.TERRAN,
- parent_item=ItemNames.FIREBAT, origin={"ext"},
- description="Increases Firebat life by 100."),
- ItemNames.FIREBAT_NANO_PROJECTORS:
- ItemData(237 + SC2WOL_ITEM_ID_OFFSET, "Armory 2", 4, SC2Race.TERRAN,
- parent_item=ItemNames.FIREBAT, origin={"ext"},
- description="Increases Firebat attack range by 2"),
- ItemNames.MARAUDER_JUGGERNAUT_PLATING:
- ItemData(238 + SC2WOL_ITEM_ID_OFFSET, "Armory 2", 5, SC2Race.TERRAN,
- parent_item=ItemNames.MARAUDER, origin={"ext"},
- description="Increases Marauder's armor by 2."),
- ItemNames.REAPER_JET_PACK_OVERDRIVE:
- ItemData(239 + SC2WOL_ITEM_ID_OFFSET, "Armory 2", 6, SC2Race.TERRAN,
- parent_item=ItemNames.REAPER, origin={"ext"},
- description=inspect.cleandoc(
- """
- Allows the Reaper to fly for 10 seconds.
- While flying, the Reaper can attack air units.
- """
- )),
- ItemNames.HELLION_INFERNAL_PLATING:
- ItemData(240 + SC2WOL_ITEM_ID_OFFSET, "Armory 2", 7, SC2Race.TERRAN,
- parent_item=ItemNames.HELLION, origin={"ext"},
- description="Increases Hellion and Hellbat armor by 2."),
- ItemNames.VULTURE_AUTO_REPAIR:
- ItemData(241 + SC2WOL_ITEM_ID_OFFSET, "Armory 2", 8, SC2Race.TERRAN,
- parent_item=ItemNames.VULTURE, origin={"ext"},
- description="Vultures regenerate life."),
- ItemNames.GOLIATH_SHAPED_HULL:
- ItemData(242 + SC2WOL_ITEM_ID_OFFSET, "Armory 2", 9, SC2Race.TERRAN,
- classification=ItemClassification.filler, parent_item=ItemNames.GOLIATH, origin={"nco", "ext"},
- description="Increases Goliath life by 25."),
- ItemNames.GOLIATH_RESOURCE_EFFICIENCY:
- ItemData(243 + SC2WOL_ITEM_ID_OFFSET, "Armory 2", 10, SC2Race.TERRAN,
- parent_item=ItemNames.GOLIATH, origin={"nco", "bw"},
- description=RESOURCE_EFFICIENCY_DESCRIPTION_TEMPLATE.format("Goliath")),
- ItemNames.GOLIATH_INTERNAL_TECH_MODULE:
- ItemData(244 + SC2WOL_ITEM_ID_OFFSET, "Armory 2", 11, SC2Race.TERRAN,
- classification=ItemClassification.filler, parent_item=ItemNames.GOLIATH, origin={"nco", "bw"},
- description=INTERNAL_TECH_MODULE_DESCRIPTION_TEMPLATE.format("Goliaths", "Factory")),
- ItemNames.SIEGE_TANK_SHAPED_HULL:
- ItemData(245 + SC2WOL_ITEM_ID_OFFSET, "Armory 2", 12, SC2Race.TERRAN,
- classification=ItemClassification.filler, parent_item=ItemNames.SIEGE_TANK, origin={"nco", "ext"},
- description="Increases Siege Tank life by 25."),
- ItemNames.SIEGE_TANK_RESOURCE_EFFICIENCY:
- ItemData(246 + SC2WOL_ITEM_ID_OFFSET, "Armory 2", 13, SC2Race.TERRAN,
- parent_item=ItemNames.SIEGE_TANK, origin={"bw"},
- description=RESOURCE_EFFICIENCY_DESCRIPTION_TEMPLATE.format("Siege Tank")),
- ItemNames.PREDATOR_CLOAK:
- ItemData(247 + SC2WOL_ITEM_ID_OFFSET, "Armory 2", 14, SC2Race.TERRAN,
- classification=ItemClassification.filler, parent_item=ItemNames.PREDATOR, origin={"ext"},
- description=CLOAK_DESCRIPTION_TEMPLATE.format("Predators")),
- ItemNames.PREDATOR_CHARGE:
- ItemData(248 + SC2WOL_ITEM_ID_OFFSET, "Armory 2", 15, SC2Race.TERRAN,
- classification=ItemClassification.filler, parent_item=ItemNames.PREDATOR, origin={"ext"},
- description="Allows Predators to intercept enemy ground units."),
- ItemNames.MEDIVAC_SCATTER_VEIL:
- ItemData(249 + SC2WOL_ITEM_ID_OFFSET, "Armory 2", 16, SC2Race.TERRAN,
- parent_item=ItemNames.MEDIVAC, origin={"ext"},
- description="Medivacs get 100 shields."),
- ItemNames.REAPER_PROGRESSIVE_STIMPACK:
- ItemData(250 + SC2WOL_ITEM_ID_OFFSET, "Progressive Upgrade", 10, SC2Race.TERRAN,
- parent_item=ItemNames.REAPER, quantity=2, origin={"nco"},
- description=STIMPACK_SMALL_DESCRIPTION),
- ItemNames.REAPER_LASER_TARGETING_SYSTEM:
- ItemData(251 + SC2WOL_ITEM_ID_OFFSET, "Armory 2", 17, SC2Race.TERRAN,
- classification=ItemClassification.filler, parent_item=ItemNames.REAPER, origin={"nco"},
- description=LASER_TARGETING_SYSTEMS_DESCRIPTION),
- ItemNames.REAPER_ADVANCED_CLOAKING_FIELD:
- ItemData(252 + SC2WOL_ITEM_ID_OFFSET, "Armory 2", 18, SC2Race.TERRAN,
- parent_item=ItemNames.REAPER, origin={"nco"},
- description="Reapers are permanently cloaked."),
- ItemNames.REAPER_SPIDER_MINES:
- ItemData(253 + SC2WOL_ITEM_ID_OFFSET, "Armory 2", 19, SC2Race.TERRAN,
- classification=ItemClassification.filler, parent_item=ItemNames.REAPER, origin={"nco"},
- important_for_filtering=True,
- description="Allows Reapers to lay Spider Mines. 3 charges per Reaper."),
- ItemNames.REAPER_COMBAT_DRUGS:
- ItemData(254 + SC2WOL_ITEM_ID_OFFSET, "Armory 2", 20, SC2Race.TERRAN,
- classification=ItemClassification.filler, parent_item=ItemNames.REAPER, origin={"ext"},
- description="Reapers regenerate life while out of combat."),
- ItemNames.HELLION_HELLBAT_ASPECT:
- ItemData(255 + SC2WOL_ITEM_ID_OFFSET, "Armory 2", 21, SC2Race.TERRAN,
- classification=ItemClassification.progression, parent_item=ItemNames.HELLION, origin={"nco"},
- description="Allows Hellions to transform into Hellbats."),
- ItemNames.HELLION_SMART_SERVOS:
- ItemData(256 + SC2WOL_ITEM_ID_OFFSET, "Armory 2", 22, SC2Race.TERRAN,
- parent_item=ItemNames.HELLION, origin={"nco"},
- description="Transforms faster between modes. Hellions can attack while moving."),
- ItemNames.HELLION_OPTIMIZED_LOGISTICS:
- ItemData(257 + SC2WOL_ITEM_ID_OFFSET, "Armory 2", 23, SC2Race.TERRAN,
- classification=ItemClassification.filler, parent_item=ItemNames.HELLION, origin={"nco"},
- description="Increases Hellion training speed."),
- ItemNames.HELLION_JUMP_JETS:
- ItemData(258 + SC2WOL_ITEM_ID_OFFSET, "Armory 2", 24, SC2Race.TERRAN,
- classification=ItemClassification.filler, parent_item=ItemNames.HELLION, origin={"nco"},
- description=inspect.cleandoc(
- """
- Increases movement speed in Hellion mode.
- In Hellbat mode, launches the Hellbat toward enemy ground units and briefly stuns them.
- """
- )),
- ItemNames.HELLION_PROGRESSIVE_STIMPACK:
- ItemData(259 + SC2WOL_ITEM_ID_OFFSET, "Progressive Upgrade", 12, SC2Race.TERRAN,
- parent_item=ItemNames.HELLION, quantity=2, origin={"nco"},
- description=STIMPACK_LARGE_DESCRIPTION),
- ItemNames.VULTURE_ION_THRUSTERS:
- ItemData(260 + SC2WOL_ITEM_ID_OFFSET, "Armory 2", 25, SC2Race.TERRAN,
- classification=ItemClassification.filler, parent_item=ItemNames.VULTURE, origin={"bw"},
- description="Increases Vulture movement speed."),
- ItemNames.VULTURE_AUTO_LAUNCHERS:
- ItemData(261 + SC2WOL_ITEM_ID_OFFSET, "Armory 2", 26, SC2Race.TERRAN,
- parent_item=ItemNames.VULTURE, origin={"bw"},
- description="Allows Vultures to attack while moving."),
- ItemNames.SPIDER_MINE_HIGH_EXPLOSIVE_MUNITION:
- ItemData(262 + SC2WOL_ITEM_ID_OFFSET, "Armory 2", 27, SC2Race.TERRAN,
- origin={"bw"},
- description="Increases Spider mine damage."),
- ItemNames.GOLIATH_JUMP_JETS:
- ItemData(263 + SC2WOL_ITEM_ID_OFFSET, "Armory 2", 28, SC2Race.TERRAN,
- classification=ItemClassification.progression, parent_item=ItemNames.GOLIATH, origin={"nco"},
- description="Allows Goliaths to jump up and down cliffs."),
- ItemNames.GOLIATH_OPTIMIZED_LOGISTICS:
- ItemData(264 + SC2WOL_ITEM_ID_OFFSET, "Armory 2", 29, SC2Race.TERRAN,
- classification=ItemClassification.filler, parent_item=ItemNames.GOLIATH, origin={"nco"},
- description="Increases Goliath training speed."),
- ItemNames.DIAMONDBACK_HYPERFLUXOR:
- ItemData(265 + SC2WOL_ITEM_ID_OFFSET, "Armory 3", 0, SC2Race.TERRAN,
- parent_item=ItemNames.DIAMONDBACK, origin={"ext"},
- description="Increases Diamondback attack speed."),
- ItemNames.DIAMONDBACK_BURST_CAPACITORS:
- ItemData(266 + SC2WOL_ITEM_ID_OFFSET, "Armory 3", 1, SC2Race.TERRAN,
- classification=ItemClassification.filler, parent_item=ItemNames.DIAMONDBACK, origin={"ext"},
- description=inspect.cleandoc(
- """
- While not attacking, the Diamondback charges its weapon.
- The next attack does 10 additional damage.
- """
- )),
- ItemNames.DIAMONDBACK_RESOURCE_EFFICIENCY:
- ItemData(267 + SC2WOL_ITEM_ID_OFFSET, "Armory 3", 2, SC2Race.TERRAN,
- parent_item=ItemNames.DIAMONDBACK, origin={"ext"},
- description=RESOURCE_EFFICIENCY_DESCRIPTION_TEMPLATE.format("Diamondback")),
- ItemNames.SIEGE_TANK_JUMP_JETS:
- ItemData(268 + SC2WOL_ITEM_ID_OFFSET, "Armory 3", 3, SC2Race.TERRAN,
- classification=ItemClassification.progression, parent_item=ItemNames.SIEGE_TANK, origin={"nco"},
- description=inspect.cleandoc(
- """
- Repositions Siege Tank to a target location.
- Can be used in either mode and to jump up and down cliffs.
- """
- )),
- ItemNames.SIEGE_TANK_SPIDER_MINES:
- ItemData(269 + SC2WOL_ITEM_ID_OFFSET, "Armory 3", 4, SC2Race.TERRAN,
- classification=ItemClassification.filler, parent_item=ItemNames.SIEGE_TANK, origin={"nco"},
- important_for_filtering=True,
- description=inspect.cleandoc(
- """
- Allows Siege Tanks to lay Spider Mines.
- Lays 3 Spider Mines at once. 3 charges
- """
- )),
- ItemNames.SIEGE_TANK_SMART_SERVOS:
- ItemData(270 + SC2WOL_ITEM_ID_OFFSET, "Armory 3", 5, SC2Race.TERRAN,
- classification=ItemClassification.filler, parent_item=ItemNames.SIEGE_TANK, origin={"nco"},
- description=SMART_SERVOS_DESCRIPTION),
- ItemNames.SIEGE_TANK_GRADUATING_RANGE:
- ItemData(271 + SC2WOL_ITEM_ID_OFFSET, "Armory 3", 6, SC2Race.TERRAN,
- classification=ItemClassification.progression, parent_item=ItemNames.SIEGE_TANK, origin={"ext"},
- description=inspect.cleandoc(
- """
- Increases the Siege Tank's attack range by 1 every 3 seconds while in Siege Mode,
- up to a maximum of 5 additional range.
- """
- )),
- ItemNames.SIEGE_TANK_LASER_TARGETING_SYSTEM:
- ItemData(272 + SC2WOL_ITEM_ID_OFFSET, "Armory 3", 7, SC2Race.TERRAN,
- parent_item=ItemNames.SIEGE_TANK, origin={"nco"},
- description=LASER_TARGETING_SYSTEMS_DESCRIPTION),
- ItemNames.SIEGE_TANK_ADVANCED_SIEGE_TECH:
- ItemData(273 + SC2WOL_ITEM_ID_OFFSET, "Armory 3", 8, SC2Race.TERRAN,
- parent_item=ItemNames.SIEGE_TANK, origin={"ext"},
- description="Siege Tanks gain +3 armor in Siege Mode."),
- ItemNames.SIEGE_TANK_INTERNAL_TECH_MODULE:
- ItemData(274 + SC2WOL_ITEM_ID_OFFSET, "Armory 3", 9, SC2Race.TERRAN,
- classification=ItemClassification.filler, parent_item=ItemNames.SIEGE_TANK, origin={"nco"},
- description=INTERNAL_TECH_MODULE_DESCRIPTION_TEMPLATE.format("Siege Tanks", "Factory")),
- ItemNames.PREDATOR_RESOURCE_EFFICIENCY:
- ItemData(275 + SC2WOL_ITEM_ID_OFFSET, "Armory 3", 10, SC2Race.TERRAN,
- classification=ItemClassification.filler, parent_item=ItemNames.PREDATOR, origin={"ext"},
- description="Decreases Predator resource and supply cost."),
- ItemNames.MEDIVAC_EXPANDED_HULL:
- ItemData(276 + SC2WOL_ITEM_ID_OFFSET, "Armory 3", 11, SC2Race.TERRAN,
- classification=ItemClassification.filler, parent_item=ItemNames.MEDIVAC, origin={"ext"},
- description="Increases Medivac cargo space by 4."),
- ItemNames.MEDIVAC_AFTERBURNERS:
- ItemData(277 + SC2WOL_ITEM_ID_OFFSET, "Armory 3", 12, SC2Race.TERRAN,
- classification=ItemClassification.filler, parent_item=ItemNames.MEDIVAC, origin={"ext"},
- description="Ability. Temporarily increases the Medivac's movement speed by 70%."),
- ItemNames.WRAITH_ADVANCED_LASER_TECHNOLOGY:
- ItemData(278 + SC2WOL_ITEM_ID_OFFSET, "Armory 3", 13, SC2Race.TERRAN,
- classification=ItemClassification.progression, parent_item=ItemNames.WRAITH, origin={"ext"},
- description=inspect.cleandoc(
- """
- Burst Lasers do more damage and can hit both ground and air targets.
- Replaces Gemini Missiles weapon.
- """
- )),
- ItemNames.VIKING_SMART_SERVOS:
- ItemData(279 + SC2WOL_ITEM_ID_OFFSET, "Armory 3", 14, SC2Race.TERRAN,
- parent_item=ItemNames.VIKING, origin={"ext"},
- description=SMART_SERVOS_DESCRIPTION),
- ItemNames.VIKING_ANTI_MECHANICAL_MUNITION:
- ItemData(280 + SC2WOL_ITEM_ID_OFFSET, "Armory 3", 15, SC2Race.TERRAN,
- parent_item=ItemNames.VIKING, origin={"ext"},
- description="Increases Viking damage to mechanical units while in Assault Mode."),
- ItemNames.DIAMONDBACK_ION_THRUSTERS:
- ItemData(281 + SC2WOL_ITEM_ID_OFFSET, "Armory 3", 21, SC2Race.TERRAN,
- parent_item=ItemNames.DIAMONDBACK, origin={"ext"},
- description="Increases Diamondback movement speed."),
- ItemNames.WARHOUND_RESOURCE_EFFICIENCY:
- ItemData(282 + SC2WOL_ITEM_ID_OFFSET, "Armory 6", 13, SC2Race.TERRAN,
- parent_item=ItemNames.WARHOUND, origin={"ext"},
- description=RESOURCE_EFFICIENCY_NO_SUPPLY_DESCRIPTION_TEMPLATE.format("Warhound")),
- ItemNames.WARHOUND_REINFORCED_PLATING:
- ItemData(283 + SC2WOL_ITEM_ID_OFFSET, "Armory 6", 14, SC2Race.TERRAN,
- parent_item=ItemNames.WARHOUND, origin={"ext"},
- description="Increases Warhound armor by 2."),
- ItemNames.HERC_RESOURCE_EFFICIENCY:
- ItemData(284 + SC2WOL_ITEM_ID_OFFSET, "Armory 6", 15, SC2Race.TERRAN,
- parent_item=ItemNames.HERC, origin={"ext"},
- description=RESOURCE_EFFICIENCY_DESCRIPTION_TEMPLATE.format("HERC")),
- ItemNames.HERC_JUGGERNAUT_PLATING:
- ItemData(285 + SC2WOL_ITEM_ID_OFFSET, "Armory 6", 16, SC2Race.TERRAN,
- parent_item=ItemNames.HERC, origin={"ext"},
- description="Increases HERC armor by 2."),
- ItemNames.HERC_KINETIC_FOAM:
- ItemData(286 + SC2WOL_ITEM_ID_OFFSET, "Armory 6", 17, SC2Race.TERRAN,
- parent_item=ItemNames.HERC, origin={"ext"},
- description="Increases HERC life by 50."),
-
- ItemNames.HELLION_TWIN_LINKED_FLAMETHROWER:
- ItemData(300 + SC2WOL_ITEM_ID_OFFSET, "Armory 3", 16, SC2Race.TERRAN,
- classification=ItemClassification.filler, parent_item=ItemNames.HELLION,
- description="Doubles the width of the Hellion's flame attack."),
- ItemNames.HELLION_THERMITE_FILAMENTS:
- ItemData(301 + SC2WOL_ITEM_ID_OFFSET, "Armory 3", 17, SC2Race.TERRAN,
- parent_item=ItemNames.HELLION,
- description="Hellions do an additional 10 damage to Light Armor."),
- ItemNames.SPIDER_MINE_CERBERUS_MINE:
- ItemData(302 + SC2WOL_ITEM_ID_OFFSET, "Armory 3", 18, SC2Race.TERRAN,
- classification=ItemClassification.filler,
- description="Increases trigger and blast radius of Spider Mines."),
- ItemNames.VULTURE_PROGRESSIVE_REPLENISHABLE_MAGAZINE:
- ItemData(303 + SC2WOL_ITEM_ID_OFFSET, "Progressive Upgrade", 16, SC2Race.TERRAN,
- classification=ItemClassification.filler, parent_item=ItemNames.VULTURE, quantity=2,
- description=inspect.cleandoc(
- """
- Level 1: Allows Vultures to replace used Spider Mines. Costs 15 minerals.
- Level 2: Replacing used Spider Mines no longer costs minerals.
- """
- )),
- ItemNames.GOLIATH_MULTI_LOCK_WEAPONS_SYSTEM:
- ItemData(304 + SC2WOL_ITEM_ID_OFFSET, "Armory 3", 19, SC2Race.TERRAN,
- parent_item=ItemNames.GOLIATH,
- description="Goliaths can attack both ground and air targets simultaneously."),
- ItemNames.GOLIATH_ARES_CLASS_TARGETING_SYSTEM:
- ItemData(305 + SC2WOL_ITEM_ID_OFFSET, "Armory 3", 20, SC2Race.TERRAN,
- parent_item=ItemNames.GOLIATH,
- description="Increases Goliath ground attack range by 1 and air by 3."),
- ItemNames.DIAMONDBACK_PROGRESSIVE_TRI_LITHIUM_POWER_CELL:
- ItemData(306 + SC2WOL_ITEM_ID_OFFSET, "Progressive Upgrade 2", 4, SC2Race.TERRAN,
- parent_item=ItemNames.DIAMONDBACK, quantity=2,
- description=inspect.cleandoc(
- """
- Level 1: Tri-Lithium Power Cell: Increases Diamondback attack range by 1.
- Level 2: Tungsten Spikes: Increases Diamondback attack range by 3.
- """
- )),
- ItemNames.DIAMONDBACK_SHAPED_HULL:
- ItemData(307 + SC2WOL_ITEM_ID_OFFSET, "Armory 3", 22, SC2Race.TERRAN,
- classification=ItemClassification.filler, parent_item=ItemNames.DIAMONDBACK,
- description="Increases Diamondback life by 50."),
- ItemNames.SIEGE_TANK_MAELSTROM_ROUNDS:
- ItemData(308 + SC2WOL_ITEM_ID_OFFSET, "Armory 3", 23, SC2Race.TERRAN,
- classification=ItemClassification.progression, parent_item=ItemNames.SIEGE_TANK,
- description="Siege Tanks do an additional 40 damage to the primary target in Siege Mode."),
- ItemNames.SIEGE_TANK_SHAPED_BLAST:
- ItemData(309 + SC2WOL_ITEM_ID_OFFSET, "Armory 3", 24, SC2Race.TERRAN,
- parent_item=ItemNames.SIEGE_TANK,
- description="Reduces splash damage to friendly targets while in Siege Mode by 75%."),
- ItemNames.MEDIVAC_RAPID_DEPLOYMENT_TUBE:
- ItemData(310 + SC2WOL_ITEM_ID_OFFSET, "Armory 3", 25, SC2Race.TERRAN,
- classification=ItemClassification.filler, parent_item=ItemNames.MEDIVAC,
- description="Medivacs deploy loaded troops almost instantly."),
- ItemNames.MEDIVAC_ADVANCED_HEALING_AI:
- ItemData(311 + SC2WOL_ITEM_ID_OFFSET, "Armory 3", 26, SC2Race.TERRAN,
- classification=ItemClassification.filler, parent_item=ItemNames.MEDIVAC,
- description="Medivacs can heal two targets at once."),
- ItemNames.WRAITH_PROGRESSIVE_TOMAHAWK_POWER_CELLS:
- ItemData(312 + SC2WOL_ITEM_ID_OFFSET, "Progressive Upgrade", 18, SC2Race.TERRAN,
- classification=ItemClassification.filler, parent_item=ItemNames.WRAITH, quantity=2,
- description=inspect.cleandoc(
- """
- Level 1: Tomahawk Power Cells: Increases Wraith starting energy by 100.
- Level 2: Unregistered Cloaking Module: Wraiths do not require energy to cloak and remain cloaked.
- """
- )),
- ItemNames.WRAITH_DISPLACEMENT_FIELD:
- ItemData(313 + SC2WOL_ITEM_ID_OFFSET, "Armory 3", 27, SC2Race.TERRAN,
- classification=ItemClassification.filler, parent_item=ItemNames.WRAITH,
- description="Wraiths evade 20% of incoming attacks while cloaked."),
- ItemNames.VIKING_RIPWAVE_MISSILES:
- ItemData(314 + SC2WOL_ITEM_ID_OFFSET, "Armory 3", 28, SC2Race.TERRAN,
- parent_item=ItemNames.VIKING,
- description="Vikings do area damage while in Fighter Mode"),
- ItemNames.VIKING_PHOBOS_CLASS_WEAPONS_SYSTEM:
- ItemData(315 + SC2WOL_ITEM_ID_OFFSET, "Armory 3", 29, SC2Race.TERRAN,
- parent_item=ItemNames.VIKING,
- description="Increases Viking attack range by 1 in Assault mode and 2 in Fighter mode."),
- ItemNames.BANSHEE_PROGRESSIVE_CROSS_SPECTRUM_DAMPENERS:
- ItemData(316 + SC2WOL_ITEM_ID_OFFSET, "Progressive Upgrade", 2, SC2Race.TERRAN,
- classification=ItemClassification.filler, parent_item=ItemNames.BANSHEE, quantity=2,
- description=inspect.cleandoc(
- """
- Level 1: Banshees can remain cloaked twice as long.
- Level 2: Banshees do not require energy to cloak and remain cloaked.
- """
- )),
- ItemNames.BANSHEE_SHOCKWAVE_MISSILE_BATTERY:
- ItemData(317 + SC2WOL_ITEM_ID_OFFSET, "Armory 4", 0, SC2Race.TERRAN,
- classification=ItemClassification.progression, parent_item=ItemNames.BANSHEE,
- description="Banshees do area damage in a straight line."),
- ItemNames.BATTLECRUISER_PROGRESSIVE_MISSILE_PODS:
- ItemData(318 + SC2WOL_ITEM_ID_OFFSET, "Progressive Upgrade 2", 2, SC2Race.TERRAN,
- parent_item=ItemNames.BATTLECRUISER, quantity=2,
- description="Spell. Missile Pods do damage to air targets in a target area."),
- ItemNames.BATTLECRUISER_PROGRESSIVE_DEFENSIVE_MATRIX:
- ItemData(319 + SC2WOL_ITEM_ID_OFFSET, "Progressive Upgrade", 20, SC2Race.TERRAN,
- parent_item=ItemNames.BATTLECRUISER, quantity=2,
- description=inspect.cleandoc(
- """
- Level 1: Spell. For 20 seconds the Battlecruiser gains a shield that can absorb up to 200 damage.
- Level 2: Passive. Battlecruiser gets 200 shields.
- """
- )),
- ItemNames.GHOST_OCULAR_IMPLANTS:
- ItemData(320 + SC2WOL_ITEM_ID_OFFSET, "Armory 4", 2, SC2Race.TERRAN,
- parent_item=ItemNames.GHOST,
- description="Increases Ghost sight range by 3 and attack range by 2."),
- ItemNames.GHOST_CRIUS_SUIT:
- ItemData(321 + SC2WOL_ITEM_ID_OFFSET, "Armory 4", 3, SC2Race.TERRAN,
- parent_item=ItemNames.GHOST,
- description="Cloak no longer requires energy to activate or maintain."),
- ItemNames.SPECTRE_PSIONIC_LASH:
- ItemData(322 + SC2WOL_ITEM_ID_OFFSET, "Armory 4", 4, SC2Race.TERRAN,
- classification=ItemClassification.progression, parent_item=ItemNames.SPECTRE,
- description="Spell. Deals 200 damage to a single target."),
- ItemNames.SPECTRE_NYX_CLASS_CLOAKING_MODULE:
- ItemData(323 + SC2WOL_ITEM_ID_OFFSET, "Armory 4", 5, SC2Race.TERRAN,
- parent_item=ItemNames.SPECTRE,
- description="Cloak no longer requires energy to activate or maintain."),
- ItemNames.THOR_330MM_BARRAGE_CANNON:
- ItemData(324 + SC2WOL_ITEM_ID_OFFSET, "Armory 4", 6, SC2Race.TERRAN,
- classification=ItemClassification.filler, parent_item=ItemNames.THOR,
- description=inspect.cleandoc(
- """
- Improves 250mm Strike Cannons ability to deal area damage and stun units in a small area.
- Can be also freely aimed on ground.
- """
- )),
- ItemNames.THOR_PROGRESSIVE_IMMORTALITY_PROTOCOL:
- ItemData(325 + SC2WOL_ITEM_ID_OFFSET, "Progressive Upgrade", 22, SC2Race.TERRAN,
- classification=ItemClassification.filler, parent_item=ItemNames.THOR, quantity=2,
- description=inspect.cleandoc("""
- Level 1: Allows destroyed Thors to be reconstructed on the field. Costs Vespene Gas.
- Level 2: Thors are automatically reconstructed after falling for free.
- """
- )),
- ItemNames.LIBERATOR_ADVANCED_BALLISTICS:
- ItemData(326 + SC2WOL_ITEM_ID_OFFSET, "Armory 4", 7, SC2Race.TERRAN,
- parent_item=ItemNames.LIBERATOR, origin={"ext"},
- description="Increases Liberator range by 3 in Defender Mode."),
- ItemNames.LIBERATOR_RAID_ARTILLERY:
- ItemData(327 + SC2WOL_ITEM_ID_OFFSET, "Armory 4", 8, SC2Race.TERRAN,
- classification=ItemClassification.progression, parent_item=ItemNames.LIBERATOR, origin={"nco"},
- description="Allows Liberators to attack structures while in Defender Mode."),
- ItemNames.WIDOW_MINE_DRILLING_CLAWS:
- ItemData(328 + SC2WOL_ITEM_ID_OFFSET, "Armory 4", 9, SC2Race.TERRAN,
- classification=ItemClassification.filler, parent_item=ItemNames.WIDOW_MINE, origin={"ext"},
- description="Allows Widow Mines to burrow and unburrow faster."),
- ItemNames.WIDOW_MINE_CONCEALMENT:
- ItemData(329 + SC2WOL_ITEM_ID_OFFSET, "Armory 4", 10, SC2Race.TERRAN,
- classification=ItemClassification.progression, parent_item=ItemNames.WIDOW_MINE, origin={"ext"},
- description="Burrowed Widow Mines are no longer revealed when the Sentinel Missile is on cooldown."),
- ItemNames.MEDIVAC_ADVANCED_CLOAKING_FIELD:
- ItemData(330 + SC2WOL_ITEM_ID_OFFSET, "Armory 4", 11, SC2Race.TERRAN,
- parent_item=ItemNames.MEDIVAC, origin={"ext"},
- description="Medivacs are permanently cloaked."),
- ItemNames.WRAITH_TRIGGER_OVERRIDE:
- ItemData(331 + SC2WOL_ITEM_ID_OFFSET, "Armory 4", 12, SC2Race.TERRAN,
- parent_item=ItemNames.WRAITH, origin={"ext"},
- description="Wraith attack speed increases by 10% with each attack, up to a maximum of 100%."),
- ItemNames.WRAITH_INTERNAL_TECH_MODULE:
- ItemData(332 + SC2WOL_ITEM_ID_OFFSET, "Armory 4", 13, SC2Race.TERRAN,
- classification=ItemClassification.filler, parent_item=ItemNames.WRAITH, origin={"bw"},
- description=INTERNAL_TECH_MODULE_DESCRIPTION_TEMPLATE.format("Wraiths", "Starport")),
- ItemNames.WRAITH_RESOURCE_EFFICIENCY:
- ItemData(333 + SC2WOL_ITEM_ID_OFFSET, "Armory 4", 14, SC2Race.TERRAN,
- parent_item=ItemNames.WRAITH, origin={"bw"},
- description=RESOURCE_EFFICIENCY_NO_SUPPLY_DESCRIPTION_TEMPLATE.format("Wraith")),
- ItemNames.VIKING_SHREDDER_ROUNDS:
- ItemData(334 + SC2WOL_ITEM_ID_OFFSET, "Armory 4", 15, SC2Race.TERRAN,
- classification=ItemClassification.progression, parent_item=ItemNames.VIKING, origin={"ext"},
- description="Attacks in Assault mode do line splash damage."),
- ItemNames.VIKING_WILD_MISSILES:
- ItemData(335 + SC2WOL_ITEM_ID_OFFSET, "Armory 4", 16, SC2Race.TERRAN,
- parent_item=ItemNames.VIKING, origin={"ext"},
- description="Launches 5 rockets at the target unit. Each rocket does 25 (40 vs armored) damage."),
- ItemNames.BANSHEE_SHAPED_HULL:
- ItemData(336 + SC2WOL_ITEM_ID_OFFSET, "Armory 4", 17, SC2Race.TERRAN,
- parent_item=ItemNames.BANSHEE, origin={"ext"},
- description="Increases Banshee life by 100."),
- ItemNames.BANSHEE_ADVANCED_TARGETING_OPTICS:
- ItemData(337 + SC2WOL_ITEM_ID_OFFSET, "Armory 4", 18, SC2Race.TERRAN,
- classification=ItemClassification.progression, parent_item=ItemNames.BANSHEE, origin={"ext"},
- description="Increases Banshee attack range by 2 while cloaked."),
- ItemNames.BANSHEE_DISTORTION_BLASTERS:
- ItemData(338 + SC2WOL_ITEM_ID_OFFSET, "Armory 4", 19, SC2Race.TERRAN,
- parent_item=ItemNames.BANSHEE, origin={"ext"},
- description="Increases Banshee attack damage by 25% while cloaked."),
- ItemNames.BANSHEE_ROCKET_BARRAGE:
- ItemData(339 + SC2WOL_ITEM_ID_OFFSET, "Armory 4", 20, SC2Race.TERRAN,
- parent_item=ItemNames.BANSHEE, origin={"ext"},
- description="Deals 75 damage to enemy ground units in the target area."),
- ItemNames.GHOST_RESOURCE_EFFICIENCY:
- ItemData(340 + SC2WOL_ITEM_ID_OFFSET, "Armory 4", 21, SC2Race.TERRAN,
- parent_item=ItemNames.GHOST, origin={"bw"},
- description=RESOURCE_EFFICIENCY_DESCRIPTION_TEMPLATE.format("Ghost")),
- ItemNames.SPECTRE_RESOURCE_EFFICIENCY:
- ItemData(341 + SC2WOL_ITEM_ID_OFFSET, "Armory 4", 22, SC2Race.TERRAN,
- parent_item=ItemNames.SPECTRE, origin={"ext"},
- description=RESOURCE_EFFICIENCY_DESCRIPTION_TEMPLATE.format("Spectre")),
- ItemNames.THOR_BUTTON_WITH_A_SKULL_ON_IT:
- ItemData(342 + SC2WOL_ITEM_ID_OFFSET, "Armory 4", 23, SC2Race.TERRAN,
- classification=ItemClassification.progression, parent_item=ItemNames.THOR, origin={"ext"},
- description="Allows Thors to launch nukes."),
- ItemNames.THOR_LASER_TARGETING_SYSTEM:
- ItemData(343 + SC2WOL_ITEM_ID_OFFSET, "Armory 4", 24, SC2Race.TERRAN,
- classification=ItemClassification.filler, parent_item=ItemNames.THOR, origin={"ext"},
- description=LASER_TARGETING_SYSTEMS_DESCRIPTION),
- ItemNames.THOR_LARGE_SCALE_FIELD_CONSTRUCTION:
- ItemData(344 + SC2WOL_ITEM_ID_OFFSET, "Armory 4", 25, SC2Race.TERRAN,
- classification=ItemClassification.filler, parent_item=ItemNames.THOR, origin={"ext"},
- description="Allows Thors to be built by SCVs like a structure."),
- ItemNames.RAVEN_RESOURCE_EFFICIENCY:
- ItemData(345 + SC2WOL_ITEM_ID_OFFSET, "Armory 4", 26, SC2Race.TERRAN,
- parent_item=ItemNames.RAVEN, origin={"ext"},
- description=RESOURCE_EFFICIENCY_NO_SUPPLY_DESCRIPTION_TEMPLATE.format("Raven")),
- ItemNames.RAVEN_DURABLE_MATERIALS:
- ItemData(346 + SC2WOL_ITEM_ID_OFFSET, "Armory 4", 27, SC2Race.TERRAN,
- classification=ItemClassification.filler, parent_item=ItemNames.RAVEN, origin={"ext"},
- description="Extends timed life duration of Raven's summoned objects."),
- ItemNames.SCIENCE_VESSEL_IMPROVED_NANO_REPAIR:
- ItemData(347 + SC2WOL_ITEM_ID_OFFSET, "Armory 4", 28, SC2Race.TERRAN,
- parent_item=ItemNames.SCIENCE_VESSEL, origin={"ext"},
- description="Nano-Repair no longer requires energy to use."),
- ItemNames.SCIENCE_VESSEL_ADVANCED_AI_SYSTEMS:
- ItemData(348 + SC2WOL_ITEM_ID_OFFSET, "Armory 4", 29, SC2Race.TERRAN,
- parent_item=ItemNames.SCIENCE_VESSEL, origin={"ext"},
- description="Science Vessel can use Nano-Repair at two targets at once."),
- ItemNames.CYCLONE_RESOURCE_EFFICIENCY:
- ItemData(349 + SC2WOL_ITEM_ID_OFFSET, "Armory 5", 0, SC2Race.TERRAN,
- parent_item=ItemNames.CYCLONE, origin={"ext"},
- description=RESOURCE_EFFICIENCY_DESCRIPTION_TEMPLATE.format("Cyclone")),
- ItemNames.BANSHEE_HYPERFLIGHT_ROTORS:
- ItemData(350 + SC2WOL_ITEM_ID_OFFSET, "Armory 5", 1, SC2Race.TERRAN,
- classification=ItemClassification.filler, parent_item=ItemNames.BANSHEE, origin={"ext"},
- description="Increases Banshee movement speed."),
- ItemNames.BANSHEE_LASER_TARGETING_SYSTEM:
- ItemData(351 + SC2WOL_ITEM_ID_OFFSET, "Armory 5", 2, SC2Race.TERRAN,
- classification=ItemClassification.filler, parent_item=ItemNames.BANSHEE, origin={"nco"},
- description=LASER_TARGETING_SYSTEMS_DESCRIPTION),
- ItemNames.BANSHEE_INTERNAL_TECH_MODULE:
- ItemData(352 + SC2WOL_ITEM_ID_OFFSET, "Armory 5", 3, SC2Race.TERRAN,
- classification=ItemClassification.filler, parent_item=ItemNames.BANSHEE, origin={"nco"},
- description=INTERNAL_TECH_MODULE_DESCRIPTION_TEMPLATE.format("Banshees", "Starport")),
- ItemNames.BATTLECRUISER_TACTICAL_JUMP:
- ItemData(353 + SC2WOL_ITEM_ID_OFFSET, "Armory 5", 4, SC2Race.TERRAN,
- parent_item=ItemNames.BATTLECRUISER, origin={"nco", "ext"},
- description=inspect.cleandoc(
- """
- Allows Battlecruisers to warp to a target location anywhere on the map.
- """
- )),
- ItemNames.BATTLECRUISER_CLOAK:
- ItemData(354 + SC2WOL_ITEM_ID_OFFSET, "Armory 5", 5, SC2Race.TERRAN,
- parent_item=ItemNames.BATTLECRUISER, origin={"nco"},
- description=CLOAK_DESCRIPTION_TEMPLATE.format("Battlecruisers")),
- ItemNames.BATTLECRUISER_ATX_LASER_BATTERY:
- ItemData(355 + SC2WOL_ITEM_ID_OFFSET, "Armory 5", 6, SC2Race.TERRAN,
- classification=ItemClassification.progression, parent_item=ItemNames.BATTLECRUISER, origin={"nco"},
- description=inspect.cleandoc(
- """
- Battlecruisers can attack while moving,
- do the same damage to both ground and air targets, and fire faster.
- """
- )),
- ItemNames.BATTLECRUISER_OPTIMIZED_LOGISTICS:
- ItemData(356 + SC2WOL_ITEM_ID_OFFSET, "Armory 5", 7, SC2Race.TERRAN,
- classification=ItemClassification.filler, parent_item=ItemNames.BATTLECRUISER, origin={"ext"},
- description="Increases Battlecruiser training speed."),
- ItemNames.BATTLECRUISER_INTERNAL_TECH_MODULE:
- ItemData(357 + SC2WOL_ITEM_ID_OFFSET, "Armory 5", 8, SC2Race.TERRAN,
- classification=ItemClassification.filler, parent_item=ItemNames.BATTLECRUISER, origin={"nco"},
- description=INTERNAL_TECH_MODULE_DESCRIPTION_TEMPLATE.format("Battlecruisers", "Starport")),
- ItemNames.GHOST_EMP_ROUNDS:
- ItemData(358 + SC2WOL_ITEM_ID_OFFSET, "Armory 5", 9, SC2Race.TERRAN,
- parent_item=ItemNames.GHOST, origin={"ext"},
- description=inspect.cleandoc(
- """
- Spell. Does 100 damage to shields and drains all energy from units in the targeted area.
- Cloaked units hit by EMP are revealed for a short time.
- """
- )),
- ItemNames.GHOST_LOCKDOWN:
- ItemData(359 + SC2WOL_ITEM_ID_OFFSET, "Armory 5", 10, SC2Race.TERRAN,
- parent_item=ItemNames.GHOST, origin={"bw"},
- description="Spell. Stuns a target mechanical unit for a long time."),
- ItemNames.SPECTRE_IMPALER_ROUNDS:
- ItemData(360 + SC2WOL_ITEM_ID_OFFSET, "Armory 5", 11, SC2Race.TERRAN,
- parent_item=ItemNames.SPECTRE, origin={"ext"},
- description="Spectres do additional damage to armored targets."),
- ItemNames.THOR_PROGRESSIVE_HIGH_IMPACT_PAYLOAD:
- ItemData(361 + SC2WOL_ITEM_ID_OFFSET, "Progressive Upgrade", 14, SC2Race.TERRAN,
- parent_item=ItemNames.THOR, quantity=2, origin={"ext"},
- description=inspect.cleandoc(
- f"""
- Level 1: Allows Thors to transform in order to use an alternative air attack.
- Level 2: {SMART_SERVOS_DESCRIPTION}
- """
- )),
- ItemNames.RAVEN_BIO_MECHANICAL_REPAIR_DRONE:
- ItemData(363 + SC2WOL_ITEM_ID_OFFSET, "Armory 5", 12, SC2Race.TERRAN,
- classification=ItemClassification.progression, parent_item=ItemNames.RAVEN, origin={"nco"},
- description="Spell. Deploys a drone that can heal biological or mechanical units."),
- ItemNames.RAVEN_SPIDER_MINES:
- ItemData(364 + SC2WOL_ITEM_ID_OFFSET, "Armory 5", 13, SC2Race.TERRAN,
- parent_item=ItemNames.RAVEN, origin={"nco"}, important_for_filtering=True,
- description="Spell. Deploys 3 Spider Mines to a target location."),
- ItemNames.RAVEN_RAILGUN_TURRET:
- ItemData(365 + SC2WOL_ITEM_ID_OFFSET, "Armory 5", 14, SC2Race.TERRAN,
- parent_item=ItemNames.RAVEN, origin={"nco"},
- description=inspect.cleandoc(
- """
- Spell. Allows Ravens to deploy an advanced Auto-Turret,
- that can attack enemy ground units in a straight line.
- """
- )),
- ItemNames.RAVEN_HUNTER_SEEKER_WEAPON:
- ItemData(366 + SC2WOL_ITEM_ID_OFFSET, "Armory 5", 15, SC2Race.TERRAN,
- classification=ItemClassification.progression, parent_item=ItemNames.RAVEN, origin={"nco"},
- description="Allows Ravens to attack with a Hunter-Seeker weapon."),
- ItemNames.RAVEN_INTERFERENCE_MATRIX:
- ItemData(367 + SC2WOL_ITEM_ID_OFFSET, "Armory 5", 16, SC2Race.TERRAN,
- parent_item=ItemNames.RAVEN, origin={"ext"},
- description=inspect.cleandoc(
- """
- Spell. Target enemy Mechanical or Psionic unit can't attack or use abilities for a short duration.
- """
- )),
- ItemNames.RAVEN_ANTI_ARMOR_MISSILE:
- ItemData(368 + SC2WOL_ITEM_ID_OFFSET, "Armory 5", 17, SC2Race.TERRAN,
- classification=ItemClassification.filler, parent_item=ItemNames.RAVEN, origin={"ext"},
- description="Spell. Decreases target and nearby enemy units armor by 2."),
- ItemNames.RAVEN_INTERNAL_TECH_MODULE:
- ItemData(369 + SC2WOL_ITEM_ID_OFFSET, "Armory 5", 18, SC2Race.TERRAN,
- classification=ItemClassification.filler, parent_item=ItemNames.RAVEN, origin={"nco"},
- description=INTERNAL_TECH_MODULE_DESCRIPTION_TEMPLATE.format("Ravens", "Starport")),
- ItemNames.SCIENCE_VESSEL_EMP_SHOCKWAVE:
- ItemData(370 + SC2WOL_ITEM_ID_OFFSET, "Armory 5", 19, SC2Race.TERRAN,
- parent_item=ItemNames.SCIENCE_VESSEL, origin={"bw"},
- description="Spell. Depletes all energy and shields of all units in a target area."),
- ItemNames.SCIENCE_VESSEL_DEFENSIVE_MATRIX:
- ItemData(371 + SC2WOL_ITEM_ID_OFFSET, "Armory 5", 20, SC2Race.TERRAN,
- parent_item=ItemNames.SCIENCE_VESSEL, origin={"bw"},
- description=inspect.cleandoc(
- """
- Spell. Provides a target unit with a defensive barrier that can absorb up to 250 damage
- """
- )),
- ItemNames.CYCLONE_TARGETING_OPTICS:
- ItemData(372 + SC2WOL_ITEM_ID_OFFSET, "Armory 5", 21, SC2Race.TERRAN,
- parent_item=ItemNames.CYCLONE, origin={"ext"},
- description="Increases Cyclone Lock On casting range and the range while Locked On."),
- ItemNames.CYCLONE_RAPID_FIRE_LAUNCHERS:
- ItemData(373 + SC2WOL_ITEM_ID_OFFSET, "Armory 5", 22, SC2Race.TERRAN,
- parent_item=ItemNames.CYCLONE, origin={"ext"},
- description="The first 12 shots of Lock On are fired more quickly."),
- ItemNames.LIBERATOR_CLOAK:
- ItemData(374 + SC2WOL_ITEM_ID_OFFSET, "Armory 5", 23, SC2Race.TERRAN,
- classification=ItemClassification.filler, parent_item=ItemNames.LIBERATOR, origin={"nco"},
- description=CLOAK_DESCRIPTION_TEMPLATE.format("Liberators")),
- ItemNames.LIBERATOR_LASER_TARGETING_SYSTEM:
- ItemData(375 + SC2WOL_ITEM_ID_OFFSET, "Armory 5", 24, SC2Race.TERRAN,
- classification=ItemClassification.filler, parent_item=ItemNames.LIBERATOR, origin={"ext"},
- description=LASER_TARGETING_SYSTEMS_DESCRIPTION),
- ItemNames.LIBERATOR_OPTIMIZED_LOGISTICS:
- ItemData(376 + SC2WOL_ITEM_ID_OFFSET, "Armory 5", 25, SC2Race.TERRAN,
- classification=ItemClassification.filler, parent_item=ItemNames.LIBERATOR, origin={"nco"},
- description="Increases Liberator training speed."),
- ItemNames.WIDOW_MINE_BLACK_MARKET_LAUNCHERS:
- ItemData(377 + SC2WOL_ITEM_ID_OFFSET, "Armory 5", 26, SC2Race.TERRAN,
- classification=ItemClassification.filler, parent_item=ItemNames.WIDOW_MINE, origin={"ext"},
- description="Increases Widow Mine Sentinel Missile range."),
- ItemNames.WIDOW_MINE_EXECUTIONER_MISSILES:
- ItemData(378 + SC2WOL_ITEM_ID_OFFSET, "Armory 5", 27, SC2Race.TERRAN,
- parent_item=ItemNames.WIDOW_MINE, origin={"ext"},
- description=inspect.cleandoc(
- """
- Reduces Sentinel Missile cooldown.
- When killed, Widow Mines will launch several missiles at random enemy targets.
- """
- )),
- ItemNames.VALKYRIE_ENHANCED_CLUSTER_LAUNCHERS:
- ItemData(379 + SC2WOL_ITEM_ID_OFFSET, "Armory 5", 28,
- SC2Race.TERRAN, parent_item=ItemNames.VALKYRIE, origin={"ext"},
- description="Valkyries fire 2 additional rockets each volley."),
- ItemNames.VALKYRIE_SHAPED_HULL:
- ItemData(380 + SC2WOL_ITEM_ID_OFFSET, "Armory 5", 29, SC2Race.TERRAN,
- classification=ItemClassification.filler, parent_item=ItemNames.VALKYRIE, origin={"ext"},
- description="Increases Valkyrie life by 50."),
- ItemNames.VALKYRIE_FLECHETTE_MISSILES:
- ItemData(381 + SC2WOL_ITEM_ID_OFFSET, "Armory 6", 0, SC2Race.TERRAN,
- parent_item=ItemNames.VALKYRIE, origin={"ext"},
- description="Equips Valkyries with Air-to-Surface missiles to attack ground units."),
- ItemNames.VALKYRIE_AFTERBURNERS:
- ItemData(382 + SC2WOL_ITEM_ID_OFFSET, "Armory 6", 1, SC2Race.TERRAN,
- classification=ItemClassification.filler, parent_item=ItemNames.VALKYRIE, origin={"ext"},
- description="Ability. Temporarily increases the Valkyries's movement speed by 70%."),
- ItemNames.CYCLONE_INTERNAL_TECH_MODULE:
- ItemData(383 + SC2WOL_ITEM_ID_OFFSET, "Armory 6", 2, SC2Race.TERRAN,
- classification=ItemClassification.filler, parent_item=ItemNames.CYCLONE, origin={"ext"},
- description=INTERNAL_TECH_MODULE_DESCRIPTION_TEMPLATE.format("Cyclones", "Factory")),
- ItemNames.LIBERATOR_SMART_SERVOS:
- ItemData(384 + SC2WOL_ITEM_ID_OFFSET, "Armory 6", 3, SC2Race.TERRAN,
- classification=ItemClassification.filler, parent_item=ItemNames.LIBERATOR, origin={"nco"},
- description=SMART_SERVOS_DESCRIPTION),
- ItemNames.LIBERATOR_RESOURCE_EFFICIENCY:
- ItemData(385 + SC2WOL_ITEM_ID_OFFSET, "Armory 6", 4, SC2Race.TERRAN,
- classification=ItemClassification.filler, parent_item=ItemNames.LIBERATOR, origin={"ext"},
- description=RESOURCE_EFFICIENCY_NO_SUPPLY_DESCRIPTION_TEMPLATE.format("Liberator")),
- ItemNames.HERCULES_INTERNAL_FUSION_MODULE:
- ItemData(386 + SC2WOL_ITEM_ID_OFFSET, "Armory 6", 5, SC2Race.TERRAN,
- classification=ItemClassification.filler, parent_item=ItemNames.HERCULES, origin={"ext"},
- description="Hercules can be trained from a Starport without having a Fusion Core."),
- ItemNames.HERCULES_TACTICAL_JUMP:
- ItemData(387 + SC2WOL_ITEM_ID_OFFSET, "Armory 6", 6, SC2Race.TERRAN,
- parent_item=ItemNames.HERCULES, origin={"ext"},
- description=inspect.cleandoc(
- """
- Allows Hercules to warp to a target location anywhere on the map.
- """
- )),
- ItemNames.PLANETARY_FORTRESS_PROGRESSIVE_AUGMENTED_THRUSTERS:
- ItemData(388 + SC2WOL_ITEM_ID_OFFSET, "Progressive Upgrade", 28, SC2Race.TERRAN,
- parent_item=ItemNames.PLANETARY_FORTRESS, origin={"ext"}, quantity=2,
- description=inspect.cleandoc(
- """
- Level 1: Lift Off - Planetary Fortress can lift off.
- Level 2: Armament Stabilizers - Planetary Fortress can attack while lifted off.
- """
- )),
- ItemNames.PLANETARY_FORTRESS_ADVANCED_TARGETING:
- ItemData(389 + SC2WOL_ITEM_ID_OFFSET, "Armory 6", 7, SC2Race.TERRAN,
- parent_item=ItemNames.PLANETARY_FORTRESS, origin={"ext"},
- description="Planetary Fortress can attack air units."),
- ItemNames.VALKYRIE_LAUNCHING_VECTOR_COMPENSATOR:
- ItemData(390 + SC2WOL_ITEM_ID_OFFSET, "Armory 6", 8, SC2Race.TERRAN,
- classification=ItemClassification.filler, parent_item=ItemNames.VALKYRIE, origin={"ext"},
- description="Allows Valkyries to shoot air while moving."),
- ItemNames.VALKYRIE_RESOURCE_EFFICIENCY:
- ItemData(391 + SC2WOL_ITEM_ID_OFFSET, "Armory 6", 9, SC2Race.TERRAN,
- parent_item=ItemNames.VALKYRIE, origin={"ext"},
- description=RESOURCE_EFFICIENCY_DESCRIPTION_TEMPLATE.format("Valkyrie")),
- ItemNames.PREDATOR_PREDATOR_S_FURY:
- ItemData(392 + SC2WOL_ITEM_ID_OFFSET, "Armory 6", 10, SC2Race.TERRAN,
- parent_item=ItemNames.PREDATOR, origin={"ext"},
- description="Predators can use an attack that jumps between targets."),
- ItemNames.BATTLECRUISER_BEHEMOTH_PLATING:
- ItemData(393 + SC2WOL_ITEM_ID_OFFSET, "Armory 6", 11, SC2Race.TERRAN,
- parent_item=ItemNames.BATTLECRUISER, origin={"ext"},
- description="Increases Battlecruiser armor by 2."),
- ItemNames.BATTLECRUISER_COVERT_OPS_ENGINES:
- ItemData(394 + SC2WOL_ITEM_ID_OFFSET, "Armory 6", 12, SC2Race.TERRAN,
- parent_item=ItemNames.BATTLECRUISER, origin={"nco"},
- description="Increases Battlecruiser movement speed."),
-
- #Buildings
- ItemNames.BUNKER:
- ItemData(400 + SC2WOL_ITEM_ID_OFFSET, "Building", 0, SC2Race.TERRAN,
- classification=ItemClassification.progression,
- description="Defensive structure. Able to load infantry units, giving them +1 range to their attacks."),
- ItemNames.MISSILE_TURRET:
- ItemData(401 + SC2WOL_ITEM_ID_OFFSET, "Building", 1, SC2Race.TERRAN,
- classification=ItemClassification.progression,
- description="Anti-air defensive structure."),
- ItemNames.SENSOR_TOWER:
- ItemData(402 + SC2WOL_ITEM_ID_OFFSET, "Building", 2, SC2Race.TERRAN,
- description="Reveals locations of enemy units at long range."),
-
- ItemNames.WAR_PIGS:
- ItemData(500 + SC2WOL_ITEM_ID_OFFSET, "Mercenary", 0, SC2Race.TERRAN,
- classification=ItemClassification.progression,
- description="Mercenary Marines"),
- ItemNames.DEVIL_DOGS:
- ItemData(501 + SC2WOL_ITEM_ID_OFFSET, "Mercenary", 1, SC2Race.TERRAN,
- classification=ItemClassification.filler,
- description="Mercenary Firebats"),
- ItemNames.HAMMER_SECURITIES:
- ItemData(502 + SC2WOL_ITEM_ID_OFFSET, "Mercenary", 2, SC2Race.TERRAN,
- description="Mercenary Marauders"),
- ItemNames.SPARTAN_COMPANY:
- ItemData(503 + SC2WOL_ITEM_ID_OFFSET, "Mercenary", 3, SC2Race.TERRAN,
- classification=ItemClassification.progression,
- description="Mercenary Goliaths"),
- ItemNames.SIEGE_BREAKERS:
- ItemData(504 + SC2WOL_ITEM_ID_OFFSET, "Mercenary", 4, SC2Race.TERRAN,
- description="Mercenary Siege Tanks"),
- ItemNames.HELS_ANGELS:
- ItemData(505 + SC2WOL_ITEM_ID_OFFSET, "Mercenary", 5, SC2Race.TERRAN,
- classification=ItemClassification.progression,
- description="Mercenary Vikings"),
- ItemNames.DUSK_WINGS:
- ItemData(506 + SC2WOL_ITEM_ID_OFFSET, "Mercenary", 6, SC2Race.TERRAN,
- description="Mercenary Banshees"),
- ItemNames.JACKSONS_REVENGE:
- ItemData(507 + SC2WOL_ITEM_ID_OFFSET, "Mercenary", 7, SC2Race.TERRAN,
- description="Mercenary Battlecruiser"),
- ItemNames.SKIBIS_ANGELS:
- ItemData(508 + SC2WOL_ITEM_ID_OFFSET, "Mercenary", 8, SC2Race.TERRAN,
- origin={"ext"},
- description="Mercenary Medics"),
- ItemNames.DEATH_HEADS:
- ItemData(509 + SC2WOL_ITEM_ID_OFFSET, "Mercenary", 9, SC2Race.TERRAN,
- origin={"ext"},
- description="Mercenary Reapers"),
- ItemNames.WINGED_NIGHTMARES:
- ItemData(510 + SC2WOL_ITEM_ID_OFFSET, "Mercenary", 10, SC2Race.TERRAN,
- classification=ItemClassification.progression, origin={"ext"},
- description="Mercenary Wraiths"),
- ItemNames.MIDNIGHT_RIDERS:
- ItemData(511 + SC2WOL_ITEM_ID_OFFSET, "Mercenary", 11, SC2Race.TERRAN,
- origin={"ext"},
- description="Mercenary Liberators"),
- ItemNames.BRYNHILDS:
- ItemData(512 + SC2WOL_ITEM_ID_OFFSET, "Mercenary", 12, SC2Race.TERRAN,
- classification=ItemClassification.progression, origin={"ext"},
- description="Mercenary Valkyries"),
- ItemNames.JOTUN:
- ItemData(513 + SC2WOL_ITEM_ID_OFFSET, "Mercenary", 13, SC2Race.TERRAN,
- origin={"ext"},
- description="Mercenary Thor"),
-
- ItemNames.ULTRA_CAPACITORS:
- ItemData(600 + SC2WOL_ITEM_ID_OFFSET, "Laboratory", 0, SC2Race.TERRAN,
- description="Increases attack speed of units by 5% per weapon upgrade."),
- ItemNames.VANADIUM_PLATING:
- ItemData(601 + SC2WOL_ITEM_ID_OFFSET, "Laboratory", 1, SC2Race.TERRAN,
- description="Increases the life of units by 5% per armor upgrade."),
- ItemNames.ORBITAL_DEPOTS:
- ItemData(602 + SC2WOL_ITEM_ID_OFFSET, "Laboratory", 2, SC2Race.TERRAN,
- description="Supply depots are built instantly."),
- ItemNames.MICRO_FILTERING:
- ItemData(603 + SC2WOL_ITEM_ID_OFFSET, "Laboratory", 3, SC2Race.TERRAN,
- description="Refineries produce Vespene gas 25% faster."),
- ItemNames.AUTOMATED_REFINERY:
- ItemData(604 + SC2WOL_ITEM_ID_OFFSET, "Laboratory", 4, SC2Race.TERRAN,
- description="Eliminates the need for SCVs in vespene gas production."),
- ItemNames.COMMAND_CENTER_REACTOR:
- ItemData(605 + SC2WOL_ITEM_ID_OFFSET, "Laboratory", 5, SC2Race.TERRAN,
- description="Command Centers can train two SCVs at once."),
- ItemNames.RAVEN:
- ItemData(606 + SC2WOL_ITEM_ID_OFFSET, "Unit", 22, SC2Race.TERRAN,
- classification=ItemClassification.progression,
- description="Aerial Caster unit."),
- ItemNames.SCIENCE_VESSEL:
- ItemData(607 + SC2WOL_ITEM_ID_OFFSET, "Unit", 23, SC2Race.TERRAN,
- classification=ItemClassification.progression,
- description="Aerial Caster unit. Can repair mechanical units."),
- ItemNames.TECH_REACTOR:
- ItemData(608 + SC2WOL_ITEM_ID_OFFSET, "Laboratory", 6, SC2Race.TERRAN,
- description="Merges Tech Labs and Reactors into one add on structure to provide both functions."),
- ItemNames.ORBITAL_STRIKE:
- ItemData(609 + SC2WOL_ITEM_ID_OFFSET, "Laboratory", 7, SC2Race.TERRAN,
- description="Trained units from Barracks are instantly deployed on rally point."),
- ItemNames.BUNKER_SHRIKE_TURRET:
- ItemData(610 + SC2WOL_ITEM_ID_OFFSET, "Armory 1", 6, SC2Race.TERRAN,
- parent_item=ItemNames.BUNKER,
- description="Adds an automated turret to Bunkers."),
- ItemNames.BUNKER_FORTIFIED_BUNKER:
- ItemData(611 + SC2WOL_ITEM_ID_OFFSET, "Armory 1", 7, SC2Race.TERRAN,
- parent_item=ItemNames.BUNKER,
- description="Bunkers have more life."),
- ItemNames.PLANETARY_FORTRESS:
- ItemData(612 + SC2WOL_ITEM_ID_OFFSET, "Building", 3, SC2Race.TERRAN,
- classification=ItemClassification.progression,
- description=inspect.cleandoc(
- """
- Allows Command Centers to upgrade into a defensive structure with a turret and additional armor.
- Planetary Fortresses cannot Lift Off, or cast Orbital Command spells.
- """
- )),
- ItemNames.PERDITION_TURRET:
- ItemData(613 + SC2WOL_ITEM_ID_OFFSET, "Building", 4, SC2Race.TERRAN,
- classification=ItemClassification.progression,
- description="Automated defensive turret. Burrows down while no enemies are nearby."),
- ItemNames.PREDATOR:
- ItemData(614 + SC2WOL_ITEM_ID_OFFSET, "Unit", 24, SC2Race.TERRAN,
- classification=ItemClassification.filler,
- description="Anti-infantry specialist that deals area damage with each attack."),
- ItemNames.HERCULES:
- ItemData(615 + SC2WOL_ITEM_ID_OFFSET, "Unit", 25, SC2Race.TERRAN,
- classification=ItemClassification.progression,
- description="Massive transport ship."),
- ItemNames.CELLULAR_REACTOR:
- ItemData(616 + SC2WOL_ITEM_ID_OFFSET, "Laboratory", 8, SC2Race.TERRAN,
- description="All Terran spellcasters get +100 starting and maximum energy."),
- ItemNames.PROGRESSIVE_REGENERATIVE_BIO_STEEL:
- ItemData(617 + SC2WOL_ITEM_ID_OFFSET, "Progressive Upgrade", 4, SC2Race.TERRAN, quantity=3,
- classification= ItemClassification.progression,
- description=inspect.cleandoc(
- """
- Allows Terran mechanical units to regenerate health while not in combat.
- Each level increases life regeneration speed.
- """
- )),
- ItemNames.HIVE_MIND_EMULATOR:
- ItemData(618 + SC2WOL_ITEM_ID_OFFSET, "Building", 5, SC2Race.TERRAN,
- ItemClassification.progression,
- description="Defensive structure. Can permanently Mind Control Zerg units."),
- ItemNames.PSI_DISRUPTER:
- ItemData(619 + SC2WOL_ITEM_ID_OFFSET, "Building", 6, SC2Race.TERRAN,
- classification=ItemClassification.progression,
- description="Defensive structure. Slows the attack and movement speeds of all nearby Zerg units."),
- ItemNames.STRUCTURE_ARMOR:
- ItemData(620 + SC2WOL_ITEM_ID_OFFSET, "Laboratory", 9, SC2Race.TERRAN,
- description="Increases armor of all Terran structures by 2.", origin={"ext"}),
- ItemNames.HI_SEC_AUTO_TRACKING:
- ItemData(621 + SC2WOL_ITEM_ID_OFFSET, "Laboratory", 10, SC2Race.TERRAN,
- description="Increases attack range of all Terran structures by 1.", origin={"ext"}),
- ItemNames.ADVANCED_OPTICS:
- ItemData(622 + SC2WOL_ITEM_ID_OFFSET, "Laboratory", 11, SC2Race.TERRAN,
- description="Increases attack range of all Terran mechanical units by 1.", origin={"ext"}),
- ItemNames.ROGUE_FORCES:
- ItemData(623 + SC2WOL_ITEM_ID_OFFSET, "Laboratory", 12, SC2Race.TERRAN,
- description="Mercenary calldowns are no longer limited by charges.", origin={"ext"}),
-
- ItemNames.ZEALOT:
- ItemData(700 + SC2WOL_ITEM_ID_OFFSET, "Unit", 0, SC2Race.PROTOSS,
- classification=ItemClassification.progression, origin={"wol", "lotv"},
- description="Powerful melee warrior. Can use the charge ability."),
- ItemNames.STALKER:
- ItemData(701 + SC2WOL_ITEM_ID_OFFSET, "Unit", 1, SC2Race.PROTOSS,
- classification=ItemClassification.progression, origin={"wol", "lotv"},
- description="Ranged attack strider. Can use the Blink ability."),
- ItemNames.HIGH_TEMPLAR:
- ItemData(702 + SC2WOL_ITEM_ID_OFFSET, "Unit", 2, SC2Race.PROTOSS,
- classification=ItemClassification.progression, origin={"wol", "lotv"},
- description="Potent psionic master. Can use the Feedback and Psionic Storm abilities. Can merge into an Archon."),
- ItemNames.DARK_TEMPLAR:
- ItemData(703 + SC2WOL_ITEM_ID_OFFSET, "Unit", 3, SC2Race.PROTOSS,
- classification=ItemClassification.progression, origin={"wol", "lotv"},
- description="Deadly warrior-assassin. Permanently cloaked. Can use the Shadow Fury ability."),
- ItemNames.IMMORTAL:
- ItemData(704 + SC2WOL_ITEM_ID_OFFSET, "Unit", 4, SC2Race.PROTOSS,
- classification=ItemClassification.progression, origin={"wol", "lotv"},
- description="Assault strider. Can use Barrier to absorb damage."),
- ItemNames.COLOSSUS:
- ItemData(705 + SC2WOL_ITEM_ID_OFFSET, "Unit", 5, SC2Race.PROTOSS,
- classification=ItemClassification.progression, origin={"wol", "lotv"},
- description="Battle strider with a powerful area attack. Can walk up and down cliffs. Attacks set fire to the ground, dealing extra damage to enemies over time."),
- ItemNames.PHOENIX:
- ItemData(706 + SC2WOL_ITEM_ID_OFFSET, "Unit", 6, SC2Race.PROTOSS,
- classification=ItemClassification.progression, origin={"wol", "lotv"},
- description="Air superiority starfighter. Can use Graviton Beam and Phasing Armor abilities."),
- ItemNames.VOID_RAY:
- ItemData(707 + SC2WOL_ITEM_ID_OFFSET, "Unit", 7, SC2Race.PROTOSS,
- classification=ItemClassification.progression, origin={"wol", "lotv"},
- description="Surgical strike craft. Has the Prismatic Alignment and Prismatic Range abilities."),
- ItemNames.CARRIER:
- ItemData(708 + SC2WOL_ITEM_ID_OFFSET, "Unit", 8, SC2Race.PROTOSS,
- classification=ItemClassification.progression, origin={"wol", "lotv"},
- description="Capital ship. Builds and launches Interceptors that attack enemy targets. Repair Drones heal nearby mechanical units."),
-
- # Filler items to fill remaining spots
- ItemNames.STARTING_MINERALS:
- ItemData(800 + SC2WOL_ITEM_ID_OFFSET, "Minerals", 15, SC2Race.ANY, quantity=0,
- classification=ItemClassification.filler,
- description="Increases the starting minerals for all missions."),
- ItemNames.STARTING_VESPENE:
- ItemData(801 + SC2WOL_ITEM_ID_OFFSET, "Vespene", 15, SC2Race.ANY, quantity=0,
- classification=ItemClassification.filler,
- description="Increases the starting vespene for all missions."),
- ItemNames.STARTING_SUPPLY:
- ItemData(802 + SC2WOL_ITEM_ID_OFFSET, "Supply", 2, SC2Race.ANY, quantity=0,
- classification=ItemClassification.filler,
- description="Increases the starting supply for all missions."),
- # This item is used to "remove" location from the game. Never placed unless plando'd
- ItemNames.NOTHING:
- ItemData(803 + SC2WOL_ITEM_ID_OFFSET, "Nothing Group", 2, SC2Race.ANY, quantity=0,
- classification=ItemClassification.trap,
- description="Does nothing. Used to remove a location from the game."),
-
- # Nova gear
- ItemNames.NOVA_GHOST_VISOR:
- ItemData(900 + SC2WOL_ITEM_ID_OFFSET, "Nova Gear", 0, SC2Race.TERRAN, origin={"nco"},
- description="Reveals the locations of enemy units in the fog of war around Nova. Can detect cloaked units."),
- ItemNames.NOVA_RANGEFINDER_OCULUS:
- ItemData(901 + SC2WOL_ITEM_ID_OFFSET, "Nova Gear", 1, SC2Race.TERRAN, origin={"nco"},
- description="Increaases Nova's vision range and non-melee weapon attack range by 2. Also increases range of melee weapons by 1."),
- ItemNames.NOVA_DOMINATION:
- ItemData(902 + SC2WOL_ITEM_ID_OFFSET, "Nova Gear", 2, SC2Race.TERRAN, origin={"nco"},
- classification=ItemClassification.progression,
- description="Gives Nova the ability to mind-control a target enemy unit."),
- ItemNames.NOVA_BLINK:
- ItemData(903 + SC2WOL_ITEM_ID_OFFSET, "Nova Gear", 3, SC2Race.TERRAN, origin={"nco"},
- classification=ItemClassification.progression,
- description="Gives Nova the ability to teleport a short distance and cloak for 10s."),
- ItemNames.NOVA_PROGRESSIVE_STEALTH_SUIT_MODULE:
- ItemData(904 + SC2WOL_ITEM_ID_OFFSET, "Progressive Upgrade 2", 0, SC2Race.TERRAN, quantity=2, origin={"nco"},
- classification=ItemClassification.progression,
- description=inspect.cleandoc(
- """
- Level 1: Gives Nova the ability to cloak.
- Level 2: Nova is permanently cloaked.
- """
- )),
- ItemNames.NOVA_ENERGY_SUIT_MODULE:
- ItemData(905 + SC2WOL_ITEM_ID_OFFSET, "Nova Gear", 4, SC2Race.TERRAN, origin={"nco"},
- description="Increases Nova's maximum energy and energy regeneration rate."),
- ItemNames.NOVA_ARMORED_SUIT_MODULE:
- ItemData(906 + SC2WOL_ITEM_ID_OFFSET, "Nova Gear", 5, SC2Race.TERRAN, origin={"nco"},
- classification=ItemClassification.progression,
- description="Increases Nova's health by 100 and armour by 1. Nova also regenerates life quickly out of combat."),
- ItemNames.NOVA_JUMP_SUIT_MODULE:
- ItemData(907 + SC2WOL_ITEM_ID_OFFSET, "Nova Gear", 6, SC2Race.TERRAN, origin={"nco"},
- classification=ItemClassification.progression,
- description="Increases Nova's movement speed and allows her to jump up and down cliffs."),
- ItemNames.NOVA_C20A_CANISTER_RIFLE:
- ItemData(908 + SC2WOL_ITEM_ID_OFFSET, "Nova Gear", 7, SC2Race.TERRAN, origin={"nco"},
- classification=ItemClassification.progression,
- description="Allows Nova to equip the C20A Canister Rifle, which has a ranged attack and allows Nova to cast Snipe."),
- ItemNames.NOVA_HELLFIRE_SHOTGUN:
- ItemData(909 + SC2WOL_ITEM_ID_OFFSET, "Nova Gear", 8, SC2Race.TERRAN, origin={"nco"},
- classification=ItemClassification.progression,
- description="Allows Nova to equip the Hellfire Shotgun, which has a short-range area attack in a cone and allows Nova to cast Penetrating Blast."),
- ItemNames.NOVA_PLASMA_RIFLE:
- ItemData(910 + SC2WOL_ITEM_ID_OFFSET, "Nova Gear", 9, SC2Race.TERRAN, origin={"nco"},
- classification=ItemClassification.progression,
- description="Allows Nova to equip the Plasma Rifle, which has a rapidfire ranged attack and allows Nova to cast Plasma Shot."),
- ItemNames.NOVA_MONOMOLECULAR_BLADE:
- ItemData(911 + SC2WOL_ITEM_ID_OFFSET, "Nova Gear", 10, SC2Race.TERRAN, origin={"nco"},
- classification=ItemClassification.progression,
- description="Allows Nova to equip the Monomolecular Blade, which has a melee attack and allows Nova to cast Dash Attack."),
- ItemNames.NOVA_BLAZEFIRE_GUNBLADE:
- ItemData(912 + SC2WOL_ITEM_ID_OFFSET, "Nova Gear", 11, SC2Race.TERRAN, origin={"nco"},
- classification=ItemClassification.progression,
- description="Allows Nova to equip the Blazefire Gunblade, which has a melee attack and allows Nova to cast Fury of One."),
- ItemNames.NOVA_STIM_INFUSION:
- ItemData(913 + SC2WOL_ITEM_ID_OFFSET, "Nova Gear", 12, SC2Race.TERRAN, origin={"nco"},
- classification=ItemClassification.progression,
- description="Gives Nova the ability to heal herself and temporarily increase her movement and attack speeds."),
- ItemNames.NOVA_PULSE_GRENADES:
- ItemData(914 + SC2WOL_ITEM_ID_OFFSET, "Nova Gear", 13, SC2Race.TERRAN, origin={"nco"},
- classification=ItemClassification.progression,
- description="Gives Nova the ability to throw a grenade dealing large damage in an area."),
- ItemNames.NOVA_FLASHBANG_GRENADES:
- ItemData(915 + SC2WOL_ITEM_ID_OFFSET, "Nova Gear", 14, SC2Race.TERRAN, origin={"nco"},
- classification=ItemClassification.progression,
- description="Gives Nova the ability to throw a grenade to stun enemies and disable detection in a large area."),
- ItemNames.NOVA_IONIC_FORCE_FIELD:
- ItemData(916 + SC2WOL_ITEM_ID_OFFSET, "Nova Gear", 15, SC2Race.TERRAN, origin={"nco"},
- classification=ItemClassification.progression,
- description="Gives Nova the ability to shield herself temporarily."),
- ItemNames.NOVA_HOLO_DECOY:
- ItemData(917 + SC2WOL_ITEM_ID_OFFSET, "Nova Gear", 16, SC2Race.TERRAN, origin={"nco"},
- classification=ItemClassification.progression,
- description="Gives Nova the ability to summon a decoy unit which enemies will prefer to target and takes reduced damage."),
- ItemNames.NOVA_NUKE:
- ItemData(918 + SC2WOL_ITEM_ID_OFFSET, "Nova Gear", 17, SC2Race.TERRAN, origin={"nco"},
- classification=ItemClassification.progression,
- description="Gives Nova the ability to launch tactical nukes built from the Shadow Ops."),
-
- # HotS
- ItemNames.ZERGLING:
- ItemData(0 + SC2HOTS_ITEM_ID_OFFSET, "Unit", 0, SC2Race.ZERG,
- classification=ItemClassification.progression, origin={"hots"},
- description="Fast inexpensive melee attacker. Hatches in pairs from a single larva. Can morph into a Baneling."),
- ItemNames.SWARM_QUEEN:
- ItemData(1 + SC2HOTS_ITEM_ID_OFFSET, "Unit", 1, SC2Race.ZERG,
- classification=ItemClassification.progression, origin={"hots"},
- description="Ranged support caster. Can use the Spawn Creep Tumor and Rapid Transfusion abilities."),
- ItemNames.ROACH:
- ItemData(2 + SC2HOTS_ITEM_ID_OFFSET, "Unit", 2, SC2Race.ZERG,
- classification=ItemClassification.progression, origin={"hots"},
- description="Durable short ranged attacker. Regenerates life quickly when burrowed."),
- ItemNames.HYDRALISK:
- ItemData(3 + SC2HOTS_ITEM_ID_OFFSET, "Unit", 3, SC2Race.ZERG,
- classification=ItemClassification.progression, origin={"hots"},
- description="High-damage generalist ranged attacker."),
- ItemNames.ZERGLING_BANELING_ASPECT:
- ItemData(4 + SC2HOTS_ITEM_ID_OFFSET, "Morph", 5, SC2Race.ZERG,
- classification=ItemClassification.progression, origin={"hots"},
- description="Anti-ground suicide unit. Does damage over a small area on death."),
- ItemNames.ABERRATION:
- ItemData(5 + SC2HOTS_ITEM_ID_OFFSET, "Unit", 5, SC2Race.ZERG,
- classification=ItemClassification.progression, origin={"hots"},
- description="Durable melee attacker that deals heavy damage and can walk over other units."),
- ItemNames.MUTALISK:
- ItemData(6 + SC2HOTS_ITEM_ID_OFFSET, "Unit", 6, SC2Race.ZERG,
- classification=ItemClassification.progression, origin={"hots"},
- description="Fragile flying attacker. Attacks bounce between targets."),
- ItemNames.SWARM_HOST:
- ItemData(7 + SC2HOTS_ITEM_ID_OFFSET, "Unit", 7, SC2Race.ZERG,
- classification=ItemClassification.progression, origin={"hots"},
- description="Siege unit that attacks by rooting in place and continually spawning Locusts."),
- ItemNames.INFESTOR:
- ItemData(8 + SC2HOTS_ITEM_ID_OFFSET, "Unit", 8, SC2Race.ZERG,
- classification=ItemClassification.progression, origin={"hots"},
- description="Support caster that can move while burrowed. Can use the Fungal Growth, Parasitic Domination, and Consumption abilities."),
- ItemNames.ULTRALISK:
- ItemData(9 + SC2HOTS_ITEM_ID_OFFSET, "Unit", 9, SC2Race.ZERG,
- classification=ItemClassification.progression, origin={"hots"},
- description="Massive melee attacker. Has an area-damage cleave attack."),
- ItemNames.SPORE_CRAWLER:
- ItemData(10 + SC2HOTS_ITEM_ID_OFFSET, "Unit", 10, SC2Race.ZERG,
- classification=ItemClassification.progression, origin={"hots"},
- description="Anti-air defensive structure that can detect cloaked units."),
- ItemNames.SPINE_CRAWLER:
- ItemData(11 + SC2HOTS_ITEM_ID_OFFSET, "Unit", 11, SC2Race.ZERG,
- classification=ItemClassification.progression, origin={"hots"},
- description="Anti-ground defensive structure."),
- ItemNames.CORRUPTOR:
- ItemData(12 + SC2HOTS_ITEM_ID_OFFSET, "Unit", 12, SC2Race.ZERG,
- classification=ItemClassification.progression, origin={"ext"},
- description="Anti-air flying attacker specializing in taking down enemy capital ships."),
- ItemNames.SCOURGE:
- ItemData(13 + SC2HOTS_ITEM_ID_OFFSET, "Unit", 13, SC2Race.ZERG,
- classification=ItemClassification.progression, origin={"bw", "ext"},
- description="Flying anti-air suicide unit. Hatches in pairs from a single larva."),
- ItemNames.BROOD_QUEEN:
- ItemData(14 + SC2HOTS_ITEM_ID_OFFSET, "Unit", 4, SC2Race.ZERG,
- classification=ItemClassification.progression, origin={"bw", "ext"},
- description="Flying support caster. Can cast the Ocular Symbiote and Spawn Broodlings abilities."),
- ItemNames.DEFILER:
- ItemData(15 + SC2HOTS_ITEM_ID_OFFSET, "Unit", 14, SC2Race.ZERG,
- classification=ItemClassification.progression, origin={"bw"},
- description="Support caster. Can use the Dark Swarm, Consume, and Plague abilities."),
-
- ItemNames.PROGRESSIVE_ZERG_MELEE_ATTACK: ItemData(100 + SC2HOTS_ITEM_ID_OFFSET, "Upgrade", 0, SC2Race.ZERG, quantity=3, origin={"hots"}),
- ItemNames.PROGRESSIVE_ZERG_MISSILE_ATTACK: ItemData(101 + SC2HOTS_ITEM_ID_OFFSET, "Upgrade", 2, SC2Race.ZERG, quantity=3, origin={"hots"}),
- ItemNames.PROGRESSIVE_ZERG_GROUND_CARAPACE: ItemData(102 + SC2HOTS_ITEM_ID_OFFSET, "Upgrade", 4, SC2Race.ZERG, quantity=3, origin={"hots"}),
- ItemNames.PROGRESSIVE_ZERG_FLYER_ATTACK: ItemData(103 + SC2HOTS_ITEM_ID_OFFSET, "Upgrade", 6, SC2Race.ZERG, quantity=3, origin={"hots"}),
- ItemNames.PROGRESSIVE_ZERG_FLYER_CARAPACE: ItemData(104 + SC2HOTS_ITEM_ID_OFFSET, "Upgrade", 8, SC2Race.ZERG, quantity=3, origin={"hots"}),
- # Upgrade bundle 'number' values are used as indices to get affected 'number's
- ItemNames.PROGRESSIVE_ZERG_WEAPON_UPGRADE: ItemData(105 + SC2HOTS_ITEM_ID_OFFSET, "Upgrade", 6, SC2Race.ZERG, quantity=3, origin={"hots"}),
- ItemNames.PROGRESSIVE_ZERG_ARMOR_UPGRADE: ItemData(106 + SC2HOTS_ITEM_ID_OFFSET, "Upgrade", 7, SC2Race.ZERG, quantity=3, origin={"hots"}),
- ItemNames.PROGRESSIVE_ZERG_GROUND_UPGRADE: ItemData(107 + SC2HOTS_ITEM_ID_OFFSET, "Upgrade", 8, SC2Race.ZERG, quantity=3, origin={"hots"}),
- ItemNames.PROGRESSIVE_ZERG_FLYER_UPGRADE: ItemData(108 + SC2HOTS_ITEM_ID_OFFSET, "Upgrade", 9, SC2Race.ZERG, quantity=3, origin={"hots"}),
- ItemNames.PROGRESSIVE_ZERG_WEAPON_ARMOR_UPGRADE: ItemData(109 + SC2HOTS_ITEM_ID_OFFSET, "Upgrade", 10, SC2Race.ZERG, quantity=3, origin={"hots"}),
-
- ItemNames.ZERGLING_HARDENED_CARAPACE:
- ItemData(200 + SC2HOTS_ITEM_ID_OFFSET, "Mutation 1", 0, SC2Race.ZERG, parent_item=ItemNames.ZERGLING,
- origin={"hots"}, description="Increases Zergling health by +10."),
- ItemNames.ZERGLING_ADRENAL_OVERLOAD:
- ItemData(201 + SC2HOTS_ITEM_ID_OFFSET, "Mutation 1", 1, SC2Race.ZERG, parent_item=ItemNames.ZERGLING,
- origin={"hots"}, description="Increases Zergling attack speed."),
- ItemNames.ZERGLING_METABOLIC_BOOST:
- ItemData(202 + SC2HOTS_ITEM_ID_OFFSET, "Mutation 1", 2, SC2Race.ZERG, parent_item=ItemNames.ZERGLING,
- origin={"hots"}, classification=ItemClassification.filler,
- description="Increases Zergling movement speed."),
- ItemNames.ROACH_HYDRIODIC_BILE:
- ItemData(203 + SC2HOTS_ITEM_ID_OFFSET, "Mutation 1", 3, SC2Race.ZERG, parent_item=ItemNames.ROACH,
- origin={"hots"}, description="Roaches deal +8 damage to light targets."),
- ItemNames.ROACH_ADAPTIVE_PLATING:
- ItemData(204 + SC2HOTS_ITEM_ID_OFFSET, "Mutation 1", 4, SC2Race.ZERG, parent_item=ItemNames.ROACH,
- origin={"hots"}, description="Roaches gain +3 armour when their life is below 50%."),
- ItemNames.ROACH_TUNNELING_CLAWS:
- ItemData(205 + SC2HOTS_ITEM_ID_OFFSET, "Mutation 1", 5, SC2Race.ZERG, parent_item=ItemNames.ROACH,
- origin={"hots"}, classification=ItemClassification.filler,
- description="Allows Roaches to move while burrowed."),
- ItemNames.HYDRALISK_FRENZY:
- ItemData(206 + SC2HOTS_ITEM_ID_OFFSET, "Mutation 1", 6, SC2Race.ZERG, parent_item=ItemNames.HYDRALISK,
- origin={"hots"},
- description="Allows Hydralisks to use the Frenzy ability, which increases their attack speed by 50%."),
- ItemNames.HYDRALISK_ANCILLARY_CARAPACE:
- ItemData(207 + SC2HOTS_ITEM_ID_OFFSET, "Mutation 1", 7, SC2Race.ZERG, parent_item=ItemNames.HYDRALISK,
- origin={"hots"}, classification=ItemClassification.filler, description="Hydralisks gain +20 health."),
- ItemNames.HYDRALISK_GROOVED_SPINES:
- ItemData(208 + SC2HOTS_ITEM_ID_OFFSET, "Mutation 1", 8, SC2Race.ZERG, parent_item=ItemNames.HYDRALISK,
- origin={"hots"}, description="Hydralisks gain +1 range."),
- ItemNames.BANELING_CORROSIVE_ACID:
- ItemData(209 + SC2HOTS_ITEM_ID_OFFSET, "Mutation 1", 9, SC2Race.ZERG,
- parent_item=ItemNames.ZERGLING_BANELING_ASPECT, origin={"hots"},
- description="Increases the damage banelings deal to their primary target. Splash damage remains the same."),
- ItemNames.BANELING_RUPTURE:
- ItemData(210 + SC2HOTS_ITEM_ID_OFFSET, "Mutation 1", 10, SC2Race.ZERG,
- parent_item=ItemNames.ZERGLING_BANELING_ASPECT, origin={"hots"},
- classification=ItemClassification.filler,
- description="Increases the splash radius of baneling attacks."),
- ItemNames.BANELING_REGENERATIVE_ACID:
- ItemData(211 + SC2HOTS_ITEM_ID_OFFSET, "Mutation 1", 11, SC2Race.ZERG,
- parent_item=ItemNames.ZERGLING_BANELING_ASPECT, origin={"hots"},
- classification=ItemClassification.filler,
- description="Banelings will heal nearby friendly units when they explode."),
- ItemNames.MUTALISK_VICIOUS_GLAIVE:
- ItemData(212 + SC2HOTS_ITEM_ID_OFFSET, "Mutation 1", 12, SC2Race.ZERG, parent_item=ItemNames.MUTALISK,
- origin={"hots"}, description="Mutalisks attacks will bounce an additional 3 times."),
- ItemNames.MUTALISK_RAPID_REGENERATION:
- ItemData(213 + SC2HOTS_ITEM_ID_OFFSET, "Mutation 1", 13, SC2Race.ZERG, parent_item=ItemNames.MUTALISK,
- origin={"hots"}, description="Mutalisks will regenerate quickly when out of combat."),
- ItemNames.MUTALISK_SUNDERING_GLAIVE:
- ItemData(214 + SC2HOTS_ITEM_ID_OFFSET, "Mutation 1", 14, SC2Race.ZERG, parent_item=ItemNames.MUTALISK,
- origin={"hots"}, description="Mutalisks deal increased damage to their primary target."),
- ItemNames.SWARM_HOST_BURROW:
- ItemData(215 + SC2HOTS_ITEM_ID_OFFSET, "Mutation 1", 15, SC2Race.ZERG, parent_item=ItemNames.SWARM_HOST,
- origin={"hots"}, classification=ItemClassification.filler,
- description="Allows Swarm Hosts to burrow instead of root to spawn locusts."),
- ItemNames.SWARM_HOST_RAPID_INCUBATION:
- ItemData(216 + SC2HOTS_ITEM_ID_OFFSET, "Mutation 1", 16, SC2Race.ZERG, parent_item=ItemNames.SWARM_HOST,
- origin={"hots"}, description="Swarm Hosts will spawn locusts 20% faster."),
- ItemNames.SWARM_HOST_PRESSURIZED_GLANDS:
- ItemData(217 + SC2HOTS_ITEM_ID_OFFSET, "Mutation 1", 17, SC2Race.ZERG, parent_item=ItemNames.SWARM_HOST,
- origin={"hots"}, classification=ItemClassification.progression,
- description="Allows Swarm Host Locusts to attack air targets."),
- ItemNames.ULTRALISK_BURROW_CHARGE:
- ItemData(218 + SC2HOTS_ITEM_ID_OFFSET, "Mutation 1", 18, SC2Race.ZERG, parent_item=ItemNames.ULTRALISK,
- origin={"hots"},
- description="Allows Ultralisks to burrow and charge at enemy units, knocking back and stunning units when it emerges."),
- ItemNames.ULTRALISK_TISSUE_ASSIMILATION:
- ItemData(219 + SC2HOTS_ITEM_ID_OFFSET, "Mutation 1", 19, SC2Race.ZERG, parent_item=ItemNames.ULTRALISK,
- origin={"hots"}, description="Ultralisks recover health when they deal damage."),
- ItemNames.ULTRALISK_MONARCH_BLADES:
- ItemData(220 + SC2HOTS_ITEM_ID_OFFSET, "Mutation 1", 20, SC2Race.ZERG, parent_item=ItemNames.ULTRALISK,
- origin={"hots"}, description="Ultralisks gain increased splash damage."),
- ItemNames.CORRUPTOR_CAUSTIC_SPRAY:
- ItemData(221 + SC2HOTS_ITEM_ID_OFFSET, "Mutation 1", 21, SC2Race.ZERG, parent_item=ItemNames.CORRUPTOR,
- origin={"ext"},
- description="Allows Corruptors to use the Caustic Spray ability, which deals ramping damage to buildings over time."),
- ItemNames.CORRUPTOR_CORRUPTION:
- ItemData(222 + SC2HOTS_ITEM_ID_OFFSET, "Mutation 1", 22, SC2Race.ZERG, parent_item=ItemNames.CORRUPTOR,
- origin={"ext"},
- description="Allows Corruptors to use the Corruption ability, which causes a target enemy unit to take increased damage."),
- ItemNames.SCOURGE_VIRULENT_SPORES:
- ItemData(223 + SC2HOTS_ITEM_ID_OFFSET, "Mutation 1", 23, SC2Race.ZERG, parent_item=ItemNames.SCOURGE,
- origin={"ext"}, description="Scourge will deal splash damage."),
- ItemNames.SCOURGE_RESOURCE_EFFICIENCY:
- ItemData(224 + SC2HOTS_ITEM_ID_OFFSET, "Mutation 1", 24, SC2Race.ZERG, parent_item=ItemNames.SCOURGE,
- origin={"ext"}, classification=ItemClassification.progression,
- description="Reduces the cost of Scourge by 50 gas per egg."),
- ItemNames.SCOURGE_SWARM_SCOURGE:
- ItemData(225 + SC2HOTS_ITEM_ID_OFFSET, "Mutation 1", 25, SC2Race.ZERG, parent_item=ItemNames.SCOURGE,
- origin={"ext"}, description="An extra Scourge will be built from each egg at no additional cost."),
- ItemNames.ZERGLING_SHREDDING_CLAWS:
- ItemData(226 + SC2HOTS_ITEM_ID_OFFSET, "Mutation 1", 26, SC2Race.ZERG, parent_item=ItemNames.ZERGLING,
- origin={"ext"}, description="Zergling attacks will temporarily reduce their target's armour to 0."),
- ItemNames.ROACH_GLIAL_RECONSTITUTION:
- ItemData(227 + SC2HOTS_ITEM_ID_OFFSET, "Mutation 1", 27, SC2Race.ZERG, parent_item=ItemNames.ROACH,
- origin={"ext"}, description="Increases Roach movement speed."),
- ItemNames.ROACH_ORGANIC_CARAPACE:
- ItemData(228 + SC2HOTS_ITEM_ID_OFFSET, "Mutation 1", 28, SC2Race.ZERG, parent_item=ItemNames.ROACH,
- origin={"ext"}, description="Increases Roach health by +25."),
- ItemNames.HYDRALISK_MUSCULAR_AUGMENTS:
- ItemData(229 + SC2HOTS_ITEM_ID_OFFSET, "Mutation 1", 29, SC2Race.ZERG, parent_item=ItemNames.HYDRALISK,
- origin={"bw"}, description="Increases Hydralisk movement speed."),
- ItemNames.HYDRALISK_RESOURCE_EFFICIENCY:
- ItemData(230 + SC2HOTS_ITEM_ID_OFFSET, "Mutation 2", 0, SC2Race.ZERG, parent_item=ItemNames.HYDRALISK,
- origin={"bw"}, description="Reduces Hydralisk resource cost by 25/25 and supply cost by 1."),
- ItemNames.BANELING_CENTRIFUGAL_HOOKS:
- ItemData(231 + SC2HOTS_ITEM_ID_OFFSET, "Mutation 2", 1, SC2Race.ZERG,
- parent_item=ItemNames.ZERGLING_BANELING_ASPECT, origin={"ext"},
- description="Increases the movement speed of Banelings."),
- ItemNames.BANELING_TUNNELING_JAWS:
- ItemData(232 + SC2HOTS_ITEM_ID_OFFSET, "Mutation 2", 2, SC2Race.ZERG,
- parent_item=ItemNames.ZERGLING_BANELING_ASPECT, origin={"ext"},
- description="Allows Banelings to move while burrowed."),
- ItemNames.BANELING_RAPID_METAMORPH:
- ItemData(233 + SC2HOTS_ITEM_ID_OFFSET, "Mutation 2", 3, SC2Race.ZERG,
- parent_item=ItemNames.ZERGLING_BANELING_ASPECT, origin={"ext"}, description="Banelings morph faster."),
- ItemNames.MUTALISK_SEVERING_GLAIVE:
- ItemData(234 + SC2HOTS_ITEM_ID_OFFSET, "Mutation 2", 4, SC2Race.ZERG, parent_item=ItemNames.MUTALISK,
- origin={"ext"}, description="Mutalisk bounce attacks will deal full damage."),
- ItemNames.MUTALISK_AERODYNAMIC_GLAIVE_SHAPE:
- ItemData(235 + SC2HOTS_ITEM_ID_OFFSET, "Mutation 2", 5, SC2Race.ZERG, parent_item=ItemNames.MUTALISK,
- origin={"ext"}, description="Increases the attack range of Mutalisks by 2."),
- ItemNames.SWARM_HOST_LOCUST_METABOLIC_BOOST:
- ItemData(236 + SC2HOTS_ITEM_ID_OFFSET, "Mutation 2", 6, SC2Race.ZERG, parent_item=ItemNames.SWARM_HOST,
- origin={"ext"}, classification=ItemClassification.filler,
- description="Increases Locust movement speed."),
- ItemNames.SWARM_HOST_ENDURING_LOCUSTS:
- ItemData(237 + SC2HOTS_ITEM_ID_OFFSET, "Mutation 2", 7, SC2Race.ZERG, parent_item=ItemNames.SWARM_HOST,
- origin={"ext"}, description="Increases the duration of Swarm Hosts' Locusts by 10s."),
- ItemNames.SWARM_HOST_ORGANIC_CARAPACE:
- ItemData(238 + SC2HOTS_ITEM_ID_OFFSET, "Mutation 2", 8, SC2Race.ZERG, parent_item=ItemNames.SWARM_HOST,
- origin={"ext"}, description="Increases Swarm Host health by +40."),
- ItemNames.SWARM_HOST_RESOURCE_EFFICIENCY:
- ItemData(239 + SC2HOTS_ITEM_ID_OFFSET, "Mutation 2", 9, SC2Race.ZERG, parent_item=ItemNames.SWARM_HOST,
- origin={"ext"}, description="Reduces Swarm Host resource cost by 100/25."),
- ItemNames.ULTRALISK_ANABOLIC_SYNTHESIS:
- ItemData(240 + SC2HOTS_ITEM_ID_OFFSET, "Mutation 2", 10, SC2Race.ZERG, parent_item=ItemNames.ULTRALISK,
- origin={"bw"}, classification=ItemClassification.filler),
- ItemNames.ULTRALISK_CHITINOUS_PLATING:
- ItemData(241 + SC2HOTS_ITEM_ID_OFFSET, "Mutation 2", 11, SC2Race.ZERG, parent_item=ItemNames.ULTRALISK,
- origin={"bw"}),
- ItemNames.ULTRALISK_ORGANIC_CARAPACE:
- ItemData(242 + SC2HOTS_ITEM_ID_OFFSET, "Mutation 2", 12, SC2Race.ZERG, parent_item=ItemNames.ULTRALISK,
- origin={"ext"}),
- ItemNames.ULTRALISK_RESOURCE_EFFICIENCY:
- ItemData(243 + SC2HOTS_ITEM_ID_OFFSET, "Mutation 2", 13, SC2Race.ZERG, parent_item=ItemNames.ULTRALISK,
- origin={"bw"}),
- ItemNames.DEVOURER_CORROSIVE_SPRAY:
- ItemData(244 + SC2HOTS_ITEM_ID_OFFSET, "Mutation 2", 14, SC2Race.ZERG,
- parent_item=ItemNames.MUTALISK_CORRUPTOR_DEVOURER_ASPECT, origin={"ext"}),
- ItemNames.DEVOURER_GAPING_MAW:
- ItemData(245 + SC2HOTS_ITEM_ID_OFFSET, "Mutation 2", 15, SC2Race.ZERG,
- parent_item=ItemNames.MUTALISK_CORRUPTOR_DEVOURER_ASPECT, origin={"ext"}),
- ItemNames.DEVOURER_IMPROVED_OSMOSIS:
- ItemData(246 + SC2HOTS_ITEM_ID_OFFSET, "Mutation 2", 16, SC2Race.ZERG,
- parent_item=ItemNames.MUTALISK_CORRUPTOR_DEVOURER_ASPECT, origin={"ext"},
- classification=ItemClassification.filler),
- ItemNames.DEVOURER_PRESCIENT_SPORES:
- ItemData(247 + SC2HOTS_ITEM_ID_OFFSET, "Mutation 2", 17, SC2Race.ZERG,
- parent_item=ItemNames.MUTALISK_CORRUPTOR_DEVOURER_ASPECT, origin={"ext"}),
- ItemNames.GUARDIAN_PROLONGED_DISPERSION:
- ItemData(248 + SC2HOTS_ITEM_ID_OFFSET, "Mutation 2", 18, SC2Race.ZERG,
- parent_item=ItemNames.MUTALISK_CORRUPTOR_GUARDIAN_ASPECT, origin={"ext"}),
- ItemNames.GUARDIAN_PRIMAL_ADAPTATION:
- ItemData(249 + SC2HOTS_ITEM_ID_OFFSET, "Mutation 2", 19, SC2Race.ZERG,
- parent_item=ItemNames.MUTALISK_CORRUPTOR_GUARDIAN_ASPECT, origin={"ext"}),
- ItemNames.GUARDIAN_SORONAN_ACID:
- ItemData(250 + SC2HOTS_ITEM_ID_OFFSET, "Mutation 2", 20, SC2Race.ZERG,
- parent_item=ItemNames.MUTALISK_CORRUPTOR_GUARDIAN_ASPECT, origin={"ext"}),
- ItemNames.IMPALER_ADAPTIVE_TALONS:
- ItemData(251 + SC2HOTS_ITEM_ID_OFFSET, "Mutation 2", 21, SC2Race.ZERG,
- parent_item=ItemNames.HYDRALISK_IMPALER_ASPECT, origin={"ext"},
- classification=ItemClassification.filler),
- ItemNames.IMPALER_SECRETION_GLANDS:
- ItemData(252 + SC2HOTS_ITEM_ID_OFFSET, "Mutation 2", 22, SC2Race.ZERG,
- parent_item=ItemNames.HYDRALISK_IMPALER_ASPECT, origin={"ext"}),
- ItemNames.IMPALER_HARDENED_TENTACLE_SPINES:
- ItemData(253 + SC2HOTS_ITEM_ID_OFFSET, "Mutation 2", 23, SC2Race.ZERG,
- parent_item=ItemNames.HYDRALISK_IMPALER_ASPECT, origin={"ext"}),
- ItemNames.LURKER_SEISMIC_SPINES:
- ItemData(254 + SC2HOTS_ITEM_ID_OFFSET, "Mutation 2", 24, SC2Race.ZERG,
- parent_item=ItemNames.HYDRALISK_LURKER_ASPECT, origin={"ext"}),
- ItemNames.LURKER_ADAPTED_SPINES:
- ItemData(255 + SC2HOTS_ITEM_ID_OFFSET, "Mutation 2", 25, SC2Race.ZERG,
- parent_item=ItemNames.HYDRALISK_LURKER_ASPECT, origin={"ext"}),
- ItemNames.RAVAGER_POTENT_BILE:
- ItemData(256 + SC2HOTS_ITEM_ID_OFFSET, "Mutation 2", 26, SC2Race.ZERG,
- parent_item=ItemNames.ROACH_RAVAGER_ASPECT, origin={"ext"}),
- ItemNames.RAVAGER_BLOATED_BILE_DUCTS:
- ItemData(257 + SC2HOTS_ITEM_ID_OFFSET, "Mutation 2", 27, SC2Race.ZERG,
- parent_item=ItemNames.ROACH_RAVAGER_ASPECT, origin={"ext"}),
- ItemNames.RAVAGER_DEEP_TUNNEL:
- ItemData(258 + SC2HOTS_ITEM_ID_OFFSET, "Mutation 2", 28, SC2Race.ZERG,
- parent_item=ItemNames.ROACH_RAVAGER_ASPECT, origin={"ext"}),
- ItemNames.VIPER_PARASITIC_BOMB:
- ItemData(259 + SC2HOTS_ITEM_ID_OFFSET, "Mutation 2", 29, SC2Race.ZERG,
- parent_item=ItemNames.MUTALISK_CORRUPTOR_VIPER_ASPECT, origin={"ext"}),
- ItemNames.VIPER_PARALYTIC_BARBS:
- ItemData(260 + SC2HOTS_ITEM_ID_OFFSET, "Mutation 3", 0, SC2Race.ZERG,
- parent_item=ItemNames.MUTALISK_CORRUPTOR_VIPER_ASPECT, origin={"ext"}),
- ItemNames.VIPER_VIRULENT_MICROBES:
- ItemData(261 + SC2HOTS_ITEM_ID_OFFSET, "Mutation 3", 1, SC2Race.ZERG,
- parent_item=ItemNames.MUTALISK_CORRUPTOR_VIPER_ASPECT, origin={"ext"}),
- ItemNames.BROOD_LORD_POROUS_CARTILAGE:
- ItemData(262 + SC2HOTS_ITEM_ID_OFFSET, "Mutation 3", 2, SC2Race.ZERG,
- parent_item=ItemNames.MUTALISK_CORRUPTOR_BROOD_LORD_ASPECT, origin={"ext"}),
- ItemNames.BROOD_LORD_EVOLVED_CARAPACE:
- ItemData(263 + SC2HOTS_ITEM_ID_OFFSET, "Mutation 3", 3, SC2Race.ZERG,
- parent_item=ItemNames.MUTALISK_CORRUPTOR_BROOD_LORD_ASPECT, origin={"ext"}),
- ItemNames.BROOD_LORD_SPLITTER_MITOSIS:
- ItemData(264 + SC2HOTS_ITEM_ID_OFFSET, "Mutation 3", 4, SC2Race.ZERG,
- parent_item=ItemNames.MUTALISK_CORRUPTOR_BROOD_LORD_ASPECT, origin={"ext"}),
- ItemNames.BROOD_LORD_RESOURCE_EFFICIENCY:
- ItemData(265 + SC2HOTS_ITEM_ID_OFFSET, "Mutation 3", 5, SC2Race.ZERG,
- parent_item=ItemNames.MUTALISK_CORRUPTOR_BROOD_LORD_ASPECT, origin={"ext"}),
- ItemNames.INFESTOR_INFESTED_TERRAN:
- ItemData(266 + SC2HOTS_ITEM_ID_OFFSET, "Mutation 3", 6, SC2Race.ZERG, parent_item=ItemNames.INFESTOR,
- origin={"ext"}),
- ItemNames.INFESTOR_MICROBIAL_SHROUD:
- ItemData(267 + SC2HOTS_ITEM_ID_OFFSET, "Mutation 3", 7, SC2Race.ZERG, parent_item=ItemNames.INFESTOR,
- origin={"ext"}),
- ItemNames.SWARM_QUEEN_SPAWN_LARVAE:
- ItemData(268 + SC2HOTS_ITEM_ID_OFFSET, "Mutation 3", 8, SC2Race.ZERG, parent_item=ItemNames.SWARM_QUEEN,
- origin={"ext"}),
- ItemNames.SWARM_QUEEN_DEEP_TUNNEL:
- ItemData(269 + SC2HOTS_ITEM_ID_OFFSET, "Mutation 3", 9, SC2Race.ZERG, parent_item=ItemNames.SWARM_QUEEN,
- origin={"ext"}),
- ItemNames.SWARM_QUEEN_ORGANIC_CARAPACE:
- ItemData(270 + SC2HOTS_ITEM_ID_OFFSET, "Mutation 3", 10, SC2Race.ZERG, parent_item=ItemNames.SWARM_QUEEN,
- origin={"ext"}, classification=ItemClassification.filler),
- ItemNames.SWARM_QUEEN_BIO_MECHANICAL_TRANSFUSION:
- ItemData(271 + SC2HOTS_ITEM_ID_OFFSET, "Mutation 3", 11, SC2Race.ZERG, parent_item=ItemNames.SWARM_QUEEN,
- origin={"ext"}),
- ItemNames.SWARM_QUEEN_RESOURCE_EFFICIENCY:
- ItemData(272 + SC2HOTS_ITEM_ID_OFFSET, "Mutation 3", 12, SC2Race.ZERG, parent_item=ItemNames.SWARM_QUEEN,
- origin={"ext"}),
- ItemNames.SWARM_QUEEN_INCUBATOR_CHAMBER:
- ItemData(273 + SC2HOTS_ITEM_ID_OFFSET, "Mutation 3", 13, SC2Race.ZERG, parent_item=ItemNames.SWARM_QUEEN,
- origin={"ext"}),
- ItemNames.BROOD_QUEEN_FUNGAL_GROWTH:
- ItemData(274 + SC2HOTS_ITEM_ID_OFFSET, "Mutation 3", 14, SC2Race.ZERG, parent_item=ItemNames.BROOD_QUEEN,
- origin={"ext"}),
- ItemNames.BROOD_QUEEN_ENSNARE:
- ItemData(275 + SC2HOTS_ITEM_ID_OFFSET, "Mutation 3", 15, SC2Race.ZERG, parent_item=ItemNames.BROOD_QUEEN,
- origin={"ext"}),
- ItemNames.BROOD_QUEEN_ENHANCED_MITOCHONDRIA:
- ItemData(276 + SC2HOTS_ITEM_ID_OFFSET, "Mutation 3", 16, SC2Race.ZERG, parent_item=ItemNames.BROOD_QUEEN,
- origin={"ext"}),
-
- ItemNames.ZERGLING_RAPTOR_STRAIN:
- ItemData(300 + SC2HOTS_ITEM_ID_OFFSET, "Strain", 0, SC2Race.ZERG, parent_item=ItemNames.ZERGLING,
- origin={"hots"},
- description="Allows Zerglings to jump up and down cliffs and leap onto enemies. Also increases Zergling attack damage by 2."),
- ItemNames.ZERGLING_SWARMLING_STRAIN:
- ItemData(301 + SC2HOTS_ITEM_ID_OFFSET, "Strain", 1, SC2Race.ZERG, parent_item=ItemNames.ZERGLING,
- origin={"hots"},
- description="Zerglings will spawn instantly and with an extra Zergling per egg at no additional cost."),
- ItemNames.ROACH_VILE_STRAIN:
- ItemData(302 + SC2HOTS_ITEM_ID_OFFSET, "Strain", 2, SC2Race.ZERG, parent_item=ItemNames.ROACH, origin={"hots"},
- description="Roach attacks will slow the movement and attack speed of enemies."),
- ItemNames.ROACH_CORPSER_STRAIN:
- ItemData(303 + SC2HOTS_ITEM_ID_OFFSET, "Strain", 3, SC2Race.ZERG, parent_item=ItemNames.ROACH, origin={"hots"},
- description="Units killed after being attacked by Roaches will spawn 2 Roachlings."),
- ItemNames.HYDRALISK_IMPALER_ASPECT:
- ItemData(304 + SC2HOTS_ITEM_ID_OFFSET, "Morph", 0, SC2Race.ZERG, origin={"hots"},
- classification=ItemClassification.progression,
- description="Allows Hydralisks to morph into Impalers."),
- ItemNames.HYDRALISK_LURKER_ASPECT:
- ItemData(305 + SC2HOTS_ITEM_ID_OFFSET, "Morph", 1, SC2Race.ZERG, origin={"hots"},
- classification=ItemClassification.progression, description="Allows Hydralisks to morph into Lurkers."),
- ItemNames.BANELING_SPLITTER_STRAIN:
- ItemData(306 + SC2HOTS_ITEM_ID_OFFSET, "Strain", 6, SC2Race.ZERG,
- parent_item=ItemNames.ZERGLING_BANELING_ASPECT, origin={"hots"},
- description="Banelings will split into two smaller Splitterlings on exploding."),
- ItemNames.BANELING_HUNTER_STRAIN:
- ItemData(307 + SC2HOTS_ITEM_ID_OFFSET, "Strain", 7, SC2Race.ZERG,
- parent_item=ItemNames.ZERGLING_BANELING_ASPECT, origin={"hots"},
- description="Allows Banelings to jump up and down cliffs and leap onto enemies."),
- ItemNames.MUTALISK_CORRUPTOR_BROOD_LORD_ASPECT:
- ItemData(308 + SC2HOTS_ITEM_ID_OFFSET, "Morph", 2, SC2Race.ZERG, origin={"hots"},
- classification=ItemClassification.progression,
- description="Allows Mutalisks and Corruptors to morph into Brood Lords."),
- ItemNames.MUTALISK_CORRUPTOR_VIPER_ASPECT:
- ItemData(309 + SC2HOTS_ITEM_ID_OFFSET, "Morph", 3, SC2Race.ZERG, origin={"hots"},
- classification=ItemClassification.progression,
- description="Allows Mutalisks and Corruptors to morph into Vipers."),
- ItemNames.SWARM_HOST_CARRION_STRAIN:
- ItemData(310 + SC2HOTS_ITEM_ID_OFFSET, "Strain", 10, SC2Race.ZERG, parent_item=ItemNames.SWARM_HOST,
- origin={"hots"}, description="Swarm Hosts will spawn Flying Locusts."),
- ItemNames.SWARM_HOST_CREEPER_STRAIN:
- ItemData(311 + SC2HOTS_ITEM_ID_OFFSET, "Strain", 11, SC2Race.ZERG, parent_item=ItemNames.SWARM_HOST,
- origin={"hots"}, classification=ItemClassification.filler,
- description="Allows Swarm Hosts to teleport to any creep on the map in vision. Swarm Hosts will spread creep around them when rooted or burrowed."),
- ItemNames.ULTRALISK_NOXIOUS_STRAIN:
- ItemData(312 + SC2HOTS_ITEM_ID_OFFSET, "Strain", 12, SC2Race.ZERG, parent_item=ItemNames.ULTRALISK,
- origin={"hots"}, classification=ItemClassification.filler,
- description="Ultralisks will periodically spread poison, damaging nearby biological enemies."),
- ItemNames.ULTRALISK_TORRASQUE_STRAIN:
- ItemData(313 + SC2HOTS_ITEM_ID_OFFSET, "Strain", 13, SC2Race.ZERG, parent_item=ItemNames.ULTRALISK,
- origin={"hots"}, description="Ultralisks will revive after being killed."),
-
- ItemNames.KERRIGAN_KINETIC_BLAST: ItemData(400 + SC2HOTS_ITEM_ID_OFFSET, "Ability", 0, SC2Race.ZERG, origin={"hots"}, classification=ItemClassification.progression),
- ItemNames.KERRIGAN_HEROIC_FORTITUDE: ItemData(401 + SC2HOTS_ITEM_ID_OFFSET, "Ability", 1, SC2Race.ZERG, origin={"hots"}, classification=ItemClassification.progression),
- ItemNames.KERRIGAN_LEAPING_STRIKE: ItemData(402 + SC2HOTS_ITEM_ID_OFFSET, "Ability", 2, SC2Race.ZERG, origin={"hots"}, classification=ItemClassification.progression),
- ItemNames.KERRIGAN_CRUSHING_GRIP: ItemData(403 + SC2HOTS_ITEM_ID_OFFSET, "Ability", 3, SC2Race.ZERG, origin={"hots"}, classification=ItemClassification.progression),
- ItemNames.KERRIGAN_CHAIN_REACTION: ItemData(404 + SC2HOTS_ITEM_ID_OFFSET, "Ability", 4, SC2Race.ZERG, origin={"hots"}, classification=ItemClassification.progression),
- ItemNames.KERRIGAN_PSIONIC_SHIFT: ItemData(405 + SC2HOTS_ITEM_ID_OFFSET, "Ability", 5, SC2Race.ZERG, origin={"hots"}, classification=ItemClassification.progression),
- ItemNames.KERRIGAN_ZERGLING_RECONSTITUTION: ItemData(406 + SC2HOTS_ITEM_ID_OFFSET, "Evolution Pit", 0, SC2Race.ZERG, origin={"hots"}, classification=ItemClassification.filler),
- ItemNames.KERRIGAN_IMPROVED_OVERLORDS: ItemData(407 + SC2HOTS_ITEM_ID_OFFSET, "Evolution Pit", 1, SC2Race.ZERG, origin={"hots"}),
- ItemNames.KERRIGAN_AUTOMATED_EXTRACTORS: ItemData(408 + SC2HOTS_ITEM_ID_OFFSET, "Evolution Pit", 2, SC2Race.ZERG, origin={"hots"}),
- ItemNames.KERRIGAN_WILD_MUTATION: ItemData(409 + SC2HOTS_ITEM_ID_OFFSET, "Ability", 6, SC2Race.ZERG, origin={"hots"}, classification=ItemClassification.progression),
- ItemNames.KERRIGAN_SPAWN_BANELINGS: ItemData(410 + SC2HOTS_ITEM_ID_OFFSET, "Ability", 7, SC2Race.ZERG, origin={"hots"}, classification=ItemClassification.progression),
- ItemNames.KERRIGAN_MEND: ItemData(411 + SC2HOTS_ITEM_ID_OFFSET, "Ability", 8, SC2Race.ZERG, origin={"hots"}, classification=ItemClassification.progression),
- ItemNames.KERRIGAN_TWIN_DRONES: ItemData(412 + SC2HOTS_ITEM_ID_OFFSET, "Evolution Pit", 3, SC2Race.ZERG, origin={"hots"}),
- ItemNames.KERRIGAN_MALIGNANT_CREEP: ItemData(413 + SC2HOTS_ITEM_ID_OFFSET, "Evolution Pit", 4, SC2Race.ZERG, origin={"hots"}),
- ItemNames.KERRIGAN_VESPENE_EFFICIENCY: ItemData(414 + SC2HOTS_ITEM_ID_OFFSET, "Evolution Pit", 5, SC2Race.ZERG, origin={"hots"}),
- ItemNames.KERRIGAN_INFEST_BROODLINGS: ItemData(415 + SC2HOTS_ITEM_ID_OFFSET, "Ability", 9, SC2Race.ZERG, origin={"hots"}, classification=ItemClassification.progression),
- ItemNames.KERRIGAN_FURY: ItemData(416 + SC2HOTS_ITEM_ID_OFFSET, "Ability", 10, SC2Race.ZERG, origin={"hots"}, classification=ItemClassification.progression),
- ItemNames.KERRIGAN_ABILITY_EFFICIENCY: ItemData(417 + SC2HOTS_ITEM_ID_OFFSET, "Ability", 11, SC2Race.ZERG, origin={"hots"}),
- ItemNames.KERRIGAN_APOCALYPSE: ItemData(418 + SC2HOTS_ITEM_ID_OFFSET, "Ability", 12, SC2Race.ZERG, origin={"hots"}, classification=ItemClassification.progression),
- ItemNames.KERRIGAN_SPAWN_LEVIATHAN: ItemData(419 + SC2HOTS_ITEM_ID_OFFSET, "Ability", 13, SC2Race.ZERG, origin={"hots"}, classification=ItemClassification.progression),
- ItemNames.KERRIGAN_DROP_PODS: ItemData(420 + SC2HOTS_ITEM_ID_OFFSET, "Ability", 14, SC2Race.ZERG, origin={"hots"}, classification=ItemClassification.progression),
- # Handled separately from other abilities
- ItemNames.KERRIGAN_PRIMAL_FORM: ItemData(421 + SC2HOTS_ITEM_ID_OFFSET, "Primal Form", 0, SC2Race.ZERG, origin={"hots"}),
-
- ItemNames.KERRIGAN_LEVELS_10: ItemData(500 + SC2HOTS_ITEM_ID_OFFSET, "Level", 10, SC2Race.ZERG, origin={"hots"}, quantity=0, classification=ItemClassification.progression),
- ItemNames.KERRIGAN_LEVELS_9: ItemData(501 + SC2HOTS_ITEM_ID_OFFSET, "Level", 9, SC2Race.ZERG, origin={"hots"}, quantity=0, classification=ItemClassification.progression),
- ItemNames.KERRIGAN_LEVELS_8: ItemData(502 + SC2HOTS_ITEM_ID_OFFSET, "Level", 8, SC2Race.ZERG, origin={"hots"}, quantity=0, classification=ItemClassification.progression),
- ItemNames.KERRIGAN_LEVELS_7: ItemData(503 + SC2HOTS_ITEM_ID_OFFSET, "Level", 7, SC2Race.ZERG, origin={"hots"}, quantity=0, classification=ItemClassification.progression),
- ItemNames.KERRIGAN_LEVELS_6: ItemData(504 + SC2HOTS_ITEM_ID_OFFSET, "Level", 6, SC2Race.ZERG, origin={"hots"}, quantity=0, classification=ItemClassification.progression),
- ItemNames.KERRIGAN_LEVELS_5: ItemData(505 + SC2HOTS_ITEM_ID_OFFSET, "Level", 5, SC2Race.ZERG, origin={"hots"}, quantity=0, classification=ItemClassification.progression),
- ItemNames.KERRIGAN_LEVELS_4: ItemData(506 + SC2HOTS_ITEM_ID_OFFSET, "Level", 4, SC2Race.ZERG, origin={"hots"}, quantity=0, classification=ItemClassification.progression_skip_balancing),
- ItemNames.KERRIGAN_LEVELS_3: ItemData(507 + SC2HOTS_ITEM_ID_OFFSET, "Level", 3, SC2Race.ZERG, origin={"hots"}, quantity=0, classification=ItemClassification.progression_skip_balancing),
- ItemNames.KERRIGAN_LEVELS_2: ItemData(508 + SC2HOTS_ITEM_ID_OFFSET, "Level", 2, SC2Race.ZERG, origin={"hots"}, quantity=0, classification=ItemClassification.progression_skip_balancing),
- ItemNames.KERRIGAN_LEVELS_1: ItemData(509 + SC2HOTS_ITEM_ID_OFFSET, "Level", 1, SC2Race.ZERG, origin={"hots"}, quantity=0, classification=ItemClassification.progression_skip_balancing),
- ItemNames.KERRIGAN_LEVELS_14: ItemData(510 + SC2HOTS_ITEM_ID_OFFSET, "Level", 14, SC2Race.ZERG, origin={"hots"}, quantity=0, classification=ItemClassification.progression),
- ItemNames.KERRIGAN_LEVELS_35: ItemData(511 + SC2HOTS_ITEM_ID_OFFSET, "Level", 35, SC2Race.ZERG, origin={"hots"}, quantity=0, classification=ItemClassification.progression),
- ItemNames.KERRIGAN_LEVELS_70: ItemData(512 + SC2HOTS_ITEM_ID_OFFSET, "Level", 70, SC2Race.ZERG, origin={"hots"}, quantity=0, classification=ItemClassification.progression),
-
- # Zerg Mercs
- ItemNames.INFESTED_MEDICS: ItemData(600 + SC2HOTS_ITEM_ID_OFFSET, "Mercenary", 0, SC2Race.ZERG, origin={"ext"}),
- ItemNames.INFESTED_SIEGE_TANKS: ItemData(601 + SC2HOTS_ITEM_ID_OFFSET, "Mercenary", 1, SC2Race.ZERG, origin={"ext"}),
- ItemNames.INFESTED_BANSHEES: ItemData(602 + SC2HOTS_ITEM_ID_OFFSET, "Mercenary", 2, SC2Race.ZERG, origin={"ext"}),
-
- # Misc Upgrades
- ItemNames.OVERLORD_VENTRAL_SACS: ItemData(700 + SC2HOTS_ITEM_ID_OFFSET, "Evolution Pit", 6, SC2Race.ZERG, origin={"bw"}),
-
- # Morphs
- ItemNames.MUTALISK_CORRUPTOR_GUARDIAN_ASPECT: ItemData(800 + SC2HOTS_ITEM_ID_OFFSET, "Morph", 6, SC2Race.ZERG, origin={"bw"}),
- ItemNames.MUTALISK_CORRUPTOR_DEVOURER_ASPECT: ItemData(801 + SC2HOTS_ITEM_ID_OFFSET, "Morph", 7, SC2Race.ZERG, origin={"bw"}),
- ItemNames.ROACH_RAVAGER_ASPECT: ItemData(802 + SC2HOTS_ITEM_ID_OFFSET, "Morph", 8, SC2Race.ZERG, origin={"ext"}),
-
-
- # Protoss Units (those that aren't as items in WoL (Prophecy))
- ItemNames.OBSERVER: ItemData(0 + SC2LOTV_ITEM_ID_OFFSET, "Unit", 9, SC2Race.PROTOSS,
- classification=ItemClassification.filler, origin={"wol"},
- description="Flying spy. Cloak renders the unit invisible to enemies without detection."),
- ItemNames.CENTURION: ItemData(1 + SC2LOTV_ITEM_ID_OFFSET, "Unit", 10, SC2Race.PROTOSS,
- classification=ItemClassification.progression, origin={"lotv"},
- description="Powerful melee warrior. Has the Shadow Charge and Darkcoil abilities."),
- ItemNames.SENTINEL: ItemData(2 + SC2LOTV_ITEM_ID_OFFSET, "Unit", 11, SC2Race.PROTOSS,
- classification=ItemClassification.progression, origin={"lotv"},
- description="Powerful melee warrior. Has the Charge and Reconstruction abilities."),
- ItemNames.SUPPLICANT: ItemData(3 + SC2LOTV_ITEM_ID_OFFSET, "Unit", 12, SC2Race.PROTOSS,
- classification=ItemClassification.filler, important_for_filtering=True, origin={"ext"},
- description="Powerful melee warrior. Has powerful damage resistant shields."),
- ItemNames.INSTIGATOR: ItemData(4 + SC2LOTV_ITEM_ID_OFFSET, "Unit", 13, SC2Race.PROTOSS,
- classification=ItemClassification.progression, origin={"ext"},
- description="Ranged support strider. Can store multiple Blink charges."),
- ItemNames.SLAYER: ItemData(5 + SC2LOTV_ITEM_ID_OFFSET, "Unit", 14, SC2Race.PROTOSS,
- classification=ItemClassification.progression, origin={"ext"},
- description="Ranged attack strider. Can use the Phase Blink and Phasing Armor abilities."),
- ItemNames.SENTRY: ItemData(6 + SC2LOTV_ITEM_ID_OFFSET, "Unit", 15, SC2Race.PROTOSS,
- classification=ItemClassification.progression, origin={"lotv"},
- description="Robotic support unit can use the Guardian Shield ability and restore the shields of nearby Protoss units."),
- ItemNames.ENERGIZER: ItemData(7 + SC2LOTV_ITEM_ID_OFFSET, "Unit", 16, SC2Race.PROTOSS,
- classification=ItemClassification.progression, origin={"lotv"},
- description="Robotic support unit. Can use the Chrono Beam ability and become stationary to power nearby structures."),
- ItemNames.HAVOC: ItemData(8 + SC2LOTV_ITEM_ID_OFFSET, "Unit", 17, SC2Race.PROTOSS,
- origin={"lotv"}, important_for_filtering=True,
- description="Robotic support unit. Can use the Target Lock and Force Field abilities and increase the range of nearby Protoss units."),
- ItemNames.SIGNIFIER: ItemData(9 + SC2LOTV_ITEM_ID_OFFSET, "Unit", 18, SC2Race.PROTOSS,
- classification=ItemClassification.progression, origin={"ext"},
- description="Potent permanently cloaked psionic master. Can use the Feedback and Crippling Psionic Storm abilities. Can merge into an Archon."),
- ItemNames.ASCENDANT: ItemData(10 + SC2LOTV_ITEM_ID_OFFSET, "Unit", 19, SC2Race.PROTOSS,
- classification=ItemClassification.progression, origin={"lotv"},
- description="Potent psionic master. Can use the Psionic Orb, Mind Blast, and Sacrifice abilities."),
- ItemNames.AVENGER: ItemData(11 + SC2LOTV_ITEM_ID_OFFSET, "Unit", 20, SC2Race.PROTOSS,
- classification=ItemClassification.progression, origin={"lotv"},
- description="Deadly warrior-assassin. Permanently cloaked. Recalls to the nearest Dark Shrine upon death."),
- ItemNames.BLOOD_HUNTER: ItemData(12 + SC2LOTV_ITEM_ID_OFFSET, "Unit", 21, SC2Race.PROTOSS,
- classification=ItemClassification.progression, origin={"lotv"},
- description="Deadly warrior-assassin. Permanently cloaked. Can use the Void Stasis ability."),
- ItemNames.DRAGOON: ItemData(13 + SC2LOTV_ITEM_ID_OFFSET, "Unit", 22, SC2Race.PROTOSS,
- classification=ItemClassification.progression, origin={"lotv"},
- description="Ranged assault strider. Has enhanced health and damage."),
- ItemNames.DARK_ARCHON: ItemData(14 + SC2LOTV_ITEM_ID_OFFSET, "Unit", 23, SC2Race.PROTOSS,
- classification=ItemClassification.progression, origin={"lotv"},
- description="Potent psionic master. Can use the Confuse and Mind Control abilities."),
- ItemNames.ADEPT: ItemData(15 + SC2LOTV_ITEM_ID_OFFSET, "Unit", 24, SC2Race.PROTOSS,
- classification=ItemClassification.progression, origin={"lotv"},
- description="Ranged specialist. Can use the Psionic Transfer ability."),
- ItemNames.WARP_PRISM: ItemData(16 + SC2LOTV_ITEM_ID_OFFSET, "Unit", 25, SC2Race.PROTOSS,
- classification=ItemClassification.progression, origin={"ext"},
- description="Flying transport. Can carry units and become stationary to deploy a power field."),
- ItemNames.ANNIHILATOR: ItemData(17 + SC2LOTV_ITEM_ID_OFFSET, "Unit", 26, SC2Race.PROTOSS,
- classification=ItemClassification.progression, origin={"lotv"},
- description="Assault Strider. Can use the Shadow Cannon ability to damage air and ground units."),
- ItemNames.VANGUARD: ItemData(18 + SC2LOTV_ITEM_ID_OFFSET, "Unit", 27, SC2Race.PROTOSS,
- classification=ItemClassification.progression, origin={"lotv"},
- description="Assault Strider. Deals splash damage around the primary target."),
- ItemNames.WRATHWALKER: ItemData(19 + SC2LOTV_ITEM_ID_OFFSET, "Unit", 28, SC2Race.PROTOSS,
- classification=ItemClassification.progression, origin={"lotv"},
- description="Battle strider with a powerful single target attack. Can walk up and down cliffs."),
- ItemNames.REAVER: ItemData(20 + SC2LOTV_ITEM_ID_OFFSET, "Unit", 29, SC2Race.PROTOSS,
- classification=ItemClassification.progression, origin={"lotv"},
- description="Area damage siege unit. Builds and launches explosive Scarabs for high burst damage."),
- ItemNames.DISRUPTOR: ItemData(21 + SC2LOTV_ITEM_ID_OFFSET, "Unit 2", 0, SC2Race.PROTOSS,
- classification=ItemClassification.progression, origin={"ext"},
- description="Robotic disruption unit. Can use the Purification Nova ability to deal heavy area damage."),
- ItemNames.MIRAGE: ItemData(22 + SC2LOTV_ITEM_ID_OFFSET, "Unit 2", 1, SC2Race.PROTOSS,
- classification=ItemClassification.progression, origin={"lotv"},
- description="Air superiority starfighter. Can use Graviton Beam and Phasing Armor abilities."),
- ItemNames.CORSAIR: ItemData(23 + SC2LOTV_ITEM_ID_OFFSET, "Unit 2", 2, SC2Race.PROTOSS,
- classification=ItemClassification.progression, origin={"lotv"},
- description="Air superiority starfighter. Can use the Disruption Web ability."),
- ItemNames.DESTROYER: ItemData(24 + SC2LOTV_ITEM_ID_OFFSET, "Unit 2", 3, SC2Race.PROTOSS,
- classification=ItemClassification.progression, origin={"lotv"},
- description="Area assault craft. Can use the Destruction Beam ability to attack multiple units at once."),
- ItemNames.SCOUT: ItemData(25 + SC2LOTV_ITEM_ID_OFFSET, "Unit 2", 4, SC2Race.PROTOSS,
- classification=ItemClassification.progression, origin={"ext"},
- description="Versatile high-speed fighter."),
- ItemNames.TEMPEST: ItemData(26 + SC2LOTV_ITEM_ID_OFFSET, "Unit 2", 5, SC2Race.PROTOSS,
- classification=ItemClassification.progression, origin={"lotv"},
- description="Siege artillery craft. Attacks from long range. Can use the Disintegration ability."),
- ItemNames.MOTHERSHIP: ItemData(27 + SC2LOTV_ITEM_ID_OFFSET, "Unit 2", 6, SC2Race.PROTOSS,
- classification=ItemClassification.progression, origin={"lotv"},
- description="Ultimate Protoss vessel, Can use the Vortex and Mass Recall abilities. Cloaks nearby units and structures."),
- ItemNames.ARBITER: ItemData(28 + SC2LOTV_ITEM_ID_OFFSET, "Unit 2", 7, SC2Race.PROTOSS,
- classification=ItemClassification.progression, origin={"lotv"},
- description="Army support craft. Has the Stasis Field and Recall abilities. Cloaks nearby units."),
- ItemNames.ORACLE: ItemData(29 + SC2LOTV_ITEM_ID_OFFSET, "Unit 2", 8, SC2Race.PROTOSS,
- classification=ItemClassification.progression, origin={"ext"},
- description="Flying caster. Can use the Revelation and Stasis Ward abilities."),
-
- # Protoss Upgrades
- ItemNames.PROGRESSIVE_PROTOSS_GROUND_WEAPON: ItemData(100 + SC2LOTV_ITEM_ID_OFFSET, "Upgrade", 0, SC2Race.PROTOSS, quantity=3, origin={"wol", "lotv"}),
- ItemNames.PROGRESSIVE_PROTOSS_GROUND_ARMOR: ItemData(101 + SC2LOTV_ITEM_ID_OFFSET, "Upgrade", 2, SC2Race.PROTOSS, quantity=3, origin={"wol", "lotv"}),
- ItemNames.PROGRESSIVE_PROTOSS_SHIELDS: ItemData(102 + SC2LOTV_ITEM_ID_OFFSET, "Upgrade", 4, SC2Race.PROTOSS, quantity=3, origin={"wol", "lotv"}),
- ItemNames.PROGRESSIVE_PROTOSS_AIR_WEAPON: ItemData(103 + SC2LOTV_ITEM_ID_OFFSET, "Upgrade", 6, SC2Race.PROTOSS, quantity=3, origin={"wol", "lotv"}),
- ItemNames.PROGRESSIVE_PROTOSS_AIR_ARMOR: ItemData(104 + SC2LOTV_ITEM_ID_OFFSET, "Upgrade", 8, SC2Race.PROTOSS, quantity=3, origin={"wol", "lotv"}),
- # Upgrade bundle 'number' values are used as indices to get affected 'number's
- ItemNames.PROGRESSIVE_PROTOSS_WEAPON_UPGRADE: ItemData(105 + SC2LOTV_ITEM_ID_OFFSET, "Upgrade", 11, SC2Race.PROTOSS, quantity=3, origin={"wol", "lotv"}),
- ItemNames.PROGRESSIVE_PROTOSS_ARMOR_UPGRADE: ItemData(106 + SC2LOTV_ITEM_ID_OFFSET, "Upgrade", 12, SC2Race.PROTOSS, quantity=3, origin={"wol", "lotv"}),
- ItemNames.PROGRESSIVE_PROTOSS_GROUND_UPGRADE: ItemData(107 + SC2LOTV_ITEM_ID_OFFSET, "Upgrade", 13, SC2Race.PROTOSS, quantity=3, origin={"wol", "lotv"}),
- ItemNames.PROGRESSIVE_PROTOSS_AIR_UPGRADE: ItemData(108 + SC2LOTV_ITEM_ID_OFFSET, "Upgrade", 14, SC2Race.PROTOSS, quantity=3, origin={"wol", "lotv"}),
- ItemNames.PROGRESSIVE_PROTOSS_WEAPON_ARMOR_UPGRADE: ItemData(109 + SC2LOTV_ITEM_ID_OFFSET, "Upgrade", 15, SC2Race.PROTOSS, quantity=3, origin={"wol", "lotv"}),
-
- # Protoss Buildings
- ItemNames.PHOTON_CANNON: ItemData(200 + SC2LOTV_ITEM_ID_OFFSET, "Building", 0, SC2Race.PROTOSS, classification=ItemClassification.progression, origin={"wol", "lotv"}),
- ItemNames.KHAYDARIN_MONOLITH: ItemData(201 + SC2LOTV_ITEM_ID_OFFSET, "Building", 1, SC2Race.PROTOSS, classification=ItemClassification.progression, origin={"lotv"}),
- ItemNames.SHIELD_BATTERY: ItemData(202 + SC2LOTV_ITEM_ID_OFFSET, "Building", 2, SC2Race.PROTOSS, classification=ItemClassification.progression, origin={"lotv"}),
-
- # Protoss Unit Upgrades
- ItemNames.SUPPLICANT_BLOOD_SHIELD: ItemData(300 + SC2LOTV_ITEM_ID_OFFSET, "Forge 1", 0, SC2Race.PROTOSS, classification=ItemClassification.filler, origin={"ext"}, parent_item=ItemNames.SUPPLICANT),
- ItemNames.SUPPLICANT_SOUL_AUGMENTATION: ItemData(301 + SC2LOTV_ITEM_ID_OFFSET, "Forge 1", 1, SC2Race.PROTOSS, classification=ItemClassification.filler, origin={"ext"}, parent_item=ItemNames.SUPPLICANT),
- ItemNames.SUPPLICANT_SHIELD_REGENERATION: ItemData(302 + SC2LOTV_ITEM_ID_OFFSET, "Forge 1", 2, SC2Race.PROTOSS, classification=ItemClassification.filler, origin={"ext"}, parent_item=ItemNames.SUPPLICANT),
- ItemNames.ADEPT_SHOCKWAVE: ItemData(303 + SC2LOTV_ITEM_ID_OFFSET, "Forge 1", 3, SC2Race.PROTOSS, origin={"ext"}, parent_item=ItemNames.ADEPT),
- ItemNames.ADEPT_RESONATING_GLAIVES: ItemData(304 + SC2LOTV_ITEM_ID_OFFSET, "Forge 1", 4, SC2Race.PROTOSS, origin={"ext"}, parent_item=ItemNames.ADEPT),
- ItemNames.ADEPT_PHASE_BULWARK: ItemData(305 + SC2LOTV_ITEM_ID_OFFSET, "Forge 1", 5, SC2Race.PROTOSS, origin={"ext"}, parent_item=ItemNames.ADEPT),
- ItemNames.STALKER_INSTIGATOR_SLAYER_DISINTEGRATING_PARTICLES: ItemData(306 + SC2LOTV_ITEM_ID_OFFSET, "Forge 1", 6, SC2Race.PROTOSS, origin={"ext"}, classification=ItemClassification.progression),
- ItemNames.STALKER_INSTIGATOR_SLAYER_PARTICLE_REFLECTION: ItemData(307 + SC2LOTV_ITEM_ID_OFFSET, "Forge 1", 7, SC2Race.PROTOSS, origin={"ext"}, classification=ItemClassification.progression),
- ItemNames.DRAGOON_HIGH_IMPACT_PHASE_DISRUPTORS: ItemData(308 + SC2LOTV_ITEM_ID_OFFSET, "Forge 1", 8, SC2Race.PROTOSS, origin={"ext"}, parent_item=ItemNames.DRAGOON),
- ItemNames.DRAGOON_TRILLIC_COMPRESSION_SYSTEM: ItemData(309 + SC2LOTV_ITEM_ID_OFFSET, "Forge 1", 9, SC2Race.PROTOSS, origin={"ext"}, parent_item=ItemNames.DRAGOON),
- ItemNames.DRAGOON_SINGULARITY_CHARGE: ItemData(310 + SC2LOTV_ITEM_ID_OFFSET, "Forge 1", 10, SC2Race.PROTOSS, origin={"bw"}, parent_item=ItemNames.DRAGOON),
- ItemNames.DRAGOON_ENHANCED_STRIDER_SERVOS: ItemData(311 + SC2LOTV_ITEM_ID_OFFSET, "Forge 1", 11, SC2Race.PROTOSS, classification=ItemClassification.filler, origin={"bw"}, parent_item=ItemNames.DRAGOON),
- ItemNames.SCOUT_COMBAT_SENSOR_ARRAY: ItemData(312 + SC2LOTV_ITEM_ID_OFFSET, "Forge 1", 12, SC2Race.PROTOSS, origin={"ext"}, parent_item=ItemNames.SCOUT),
- ItemNames.SCOUT_APIAL_SENSORS: ItemData(313 + SC2LOTV_ITEM_ID_OFFSET, "Forge 1", 13, SC2Race.PROTOSS, classification=ItemClassification.filler, origin={"bw"}, parent_item=ItemNames.SCOUT),
- ItemNames.SCOUT_GRAVITIC_THRUSTERS: ItemData(314 + SC2LOTV_ITEM_ID_OFFSET, "Forge 1", 14, SC2Race.PROTOSS, classification=ItemClassification.filler, origin={"bw"}, parent_item=ItemNames.SCOUT),
- ItemNames.SCOUT_ADVANCED_PHOTON_BLASTERS: ItemData(315 + SC2LOTV_ITEM_ID_OFFSET, "Forge 1", 15, SC2Race.PROTOSS, origin={"ext"}, parent_item=ItemNames.SCOUT),
- ItemNames.TEMPEST_TECTONIC_DESTABILIZERS: ItemData(316 + SC2LOTV_ITEM_ID_OFFSET, "Forge 1", 16, SC2Race.PROTOSS, classification=ItemClassification.filler, origin={"ext"}, parent_item=ItemNames.TEMPEST),
- ItemNames.TEMPEST_QUANTIC_REACTOR: ItemData(317 + SC2LOTV_ITEM_ID_OFFSET, "Forge 1", 17, SC2Race.PROTOSS, classification=ItemClassification.filler, origin={"ext"}, parent_item=ItemNames.TEMPEST),
- ItemNames.TEMPEST_GRAVITY_SLING: ItemData(318 + SC2LOTV_ITEM_ID_OFFSET, "Forge 1", 18, SC2Race.PROTOSS, origin={"ext"}, parent_item=ItemNames.TEMPEST),
- ItemNames.PHOENIX_MIRAGE_IONIC_WAVELENGTH_FLUX: ItemData(319 + SC2LOTV_ITEM_ID_OFFSET, "Forge 1", 19, SC2Race.PROTOSS, origin={"ext"}),
- ItemNames.PHOENIX_MIRAGE_ANION_PULSE_CRYSTALS: ItemData(320 + SC2LOTV_ITEM_ID_OFFSET, "Forge 1", 20, SC2Race.PROTOSS, origin={"ext"}),
- ItemNames.CORSAIR_STEALTH_DRIVE: ItemData(321 + SC2LOTV_ITEM_ID_OFFSET, "Forge 1", 21, SC2Race.PROTOSS, origin={"ext"}, parent_item=ItemNames.CORSAIR),
- ItemNames.CORSAIR_ARGUS_JEWEL: ItemData(322 + SC2LOTV_ITEM_ID_OFFSET, "Forge 1", 22, SC2Race.PROTOSS, origin={"bw"}, parent_item=ItemNames.CORSAIR),
- ItemNames.CORSAIR_SUSTAINING_DISRUPTION: ItemData(323 + SC2LOTV_ITEM_ID_OFFSET, "Forge 1", 23, SC2Race.PROTOSS, origin={"bw"}, parent_item=ItemNames.CORSAIR),
- ItemNames.CORSAIR_NEUTRON_SHIELDS: ItemData(324 + SC2LOTV_ITEM_ID_OFFSET, "Forge 1", 24, SC2Race.PROTOSS, classification=ItemClassification.filler, origin={"bw"}, parent_item=ItemNames.CORSAIR),
- ItemNames.ORACLE_STEALTH_DRIVE: ItemData(325 + SC2LOTV_ITEM_ID_OFFSET, "Forge 1", 25, SC2Race.PROTOSS, origin={"ext"}, parent_item=ItemNames.ORACLE),
- ItemNames.ORACLE_STASIS_CALIBRATION: ItemData(326 + SC2LOTV_ITEM_ID_OFFSET, "Forge 1", 26, SC2Race.PROTOSS, origin={"ext"}, parent_item=ItemNames.ORACLE),
- ItemNames.ORACLE_TEMPORAL_ACCELERATION_BEAM: ItemData(327 + SC2LOTV_ITEM_ID_OFFSET, "Forge 1", 27, SC2Race.PROTOSS, origin={"ext"}, parent_item=ItemNames.ORACLE),
- ItemNames.ARBITER_CHRONOSTATIC_REINFORCEMENT: ItemData(328 + SC2LOTV_ITEM_ID_OFFSET, "Forge 1", 28, SC2Race.PROTOSS, origin={"bw"}, parent_item=ItemNames.ARBITER),
- ItemNames.ARBITER_KHAYDARIN_CORE: ItemData(329 + SC2LOTV_ITEM_ID_OFFSET, "Forge 1", 29, SC2Race.PROTOSS, origin={"bw"}, parent_item=ItemNames.ARBITER),
- ItemNames.ARBITER_SPACETIME_ANCHOR: ItemData(330 + SC2LOTV_ITEM_ID_OFFSET, "Forge 2", 0, SC2Race.PROTOSS, origin={"bw"}, parent_item=ItemNames.ARBITER),
- ItemNames.ARBITER_RESOURCE_EFFICIENCY: ItemData(331 + SC2LOTV_ITEM_ID_OFFSET, "Forge 2", 1, SC2Race.PROTOSS, classification=ItemClassification.filler, origin={"bw"}, parent_item=ItemNames.ARBITER),
- ItemNames.ARBITER_ENHANCED_CLOAK_FIELD: ItemData(332 + SC2LOTV_ITEM_ID_OFFSET, "Forge 2", 2, SC2Race.PROTOSS, classification=ItemClassification.filler, origin={"bw"}, parent_item=ItemNames.ARBITER),
- ItemNames.CARRIER_GRAVITON_CATAPULT:
- ItemData(333 + SC2LOTV_ITEM_ID_OFFSET, "Forge 2", 3, SC2Race.PROTOSS, origin={"wol"},
- parent_item=ItemNames.CARRIER,
- description="Carriers can launch Interceptors more quickly."),
- ItemNames.CARRIER_HULL_OF_PAST_GLORIES:
- ItemData(334 + SC2LOTV_ITEM_ID_OFFSET, "Forge 2", 4, SC2Race.PROTOSS, origin={"bw"},
- parent_item=ItemNames.CARRIER,
- description="Carriers gain +2 armour."),
- ItemNames.VOID_RAY_DESTROYER_FLUX_VANES:
- ItemData(335 + SC2LOTV_ITEM_ID_OFFSET, "Forge 2", 5, SC2Race.PROTOSS, classification=ItemClassification.filler,
- origin={"ext"},
- description="Increases Void Ray and Destroyer movement speed."),
- ItemNames.DESTROYER_REFORGED_BLOODSHARD_CORE:
- ItemData(336 + SC2LOTV_ITEM_ID_OFFSET, "Forge 2", 6, SC2Race.PROTOSS, origin={"ext"},
- parent_item=ItemNames.DESTROYER,
- description="When fully charged, the Destroyer's Destruction Beam weapon does full damage to secondary targets."),
- ItemNames.WARP_PRISM_GRAVITIC_DRIVE:
- ItemData(337 + SC2LOTV_ITEM_ID_OFFSET, "Forge 2", 7, SC2Race.PROTOSS, classification=ItemClassification.filler,
- origin={"ext"}, parent_item=ItemNames.WARP_PRISM,
- description="Increases the movement speed of Warp Prisms."),
- ItemNames.WARP_PRISM_PHASE_BLASTER:
- ItemData(338 + SC2LOTV_ITEM_ID_OFFSET, "Forge 2", 8, SC2Race.PROTOSS,
- classification=ItemClassification.progression, origin={"ext"}, parent_item=ItemNames.WARP_PRISM,
- description="Equips Warp Prisms with an auto-attack that can hit ground and air targets."),
- ItemNames.WARP_PRISM_WAR_CONFIGURATION: ItemData(339 + SC2LOTV_ITEM_ID_OFFSET, "Forge 2", 9, SC2Race.PROTOSS, origin={"ext"}, parent_item=ItemNames.WARP_PRISM),
- ItemNames.OBSERVER_GRAVITIC_BOOSTERS: ItemData(340 + SC2LOTV_ITEM_ID_OFFSET, "Forge 2", 10, SC2Race.PROTOSS, classification=ItemClassification.filler, origin={"bw"}, parent_item=ItemNames.OBSERVER),
- ItemNames.OBSERVER_SENSOR_ARRAY: ItemData(341 + SC2LOTV_ITEM_ID_OFFSET, "Forge 2", 11, SC2Race.PROTOSS, classification=ItemClassification.filler, origin={"bw"}, parent_item=ItemNames.OBSERVER),
- ItemNames.REAVER_SCARAB_DAMAGE: ItemData(342 + SC2LOTV_ITEM_ID_OFFSET, "Forge 2", 12, SC2Race.PROTOSS, origin={"bw"}, parent_item=ItemNames.REAVER),
- ItemNames.REAVER_SOLARITE_PAYLOAD: ItemData(343 + SC2LOTV_ITEM_ID_OFFSET, "Forge 2", 13, SC2Race.PROTOSS, origin={"ext"}, parent_item=ItemNames.REAVER),
- ItemNames.REAVER_REAVER_CAPACITY: ItemData(344 + SC2LOTV_ITEM_ID_OFFSET, "Forge 2", 14, SC2Race.PROTOSS, classification=ItemClassification.filler, origin={"bw"}, parent_item=ItemNames.REAVER),
- ItemNames.REAVER_RESOURCE_EFFICIENCY: ItemData(345 + SC2LOTV_ITEM_ID_OFFSET, "Forge 2", 15, SC2Race.PROTOSS, origin={"bw"}, parent_item=ItemNames.REAVER),
- ItemNames.VANGUARD_AGONY_LAUNCHERS: ItemData(346 + SC2LOTV_ITEM_ID_OFFSET, "Forge 2", 16, SC2Race.PROTOSS, origin={"ext"}, parent_item=ItemNames.VANGUARD),
- ItemNames.VANGUARD_MATTER_DISPERSION: ItemData(347 + SC2LOTV_ITEM_ID_OFFSET, "Forge 2", 17, SC2Race.PROTOSS, origin={"ext"}, parent_item=ItemNames.VANGUARD),
- ItemNames.IMMORTAL_ANNIHILATOR_SINGULARITY_CHARGE: ItemData(348 + SC2LOTV_ITEM_ID_OFFSET, "Forge 2", 18, SC2Race.PROTOSS, origin={"ext"}),
- ItemNames.IMMORTAL_ANNIHILATOR_ADVANCED_TARGETING_MECHANICS: ItemData(349 + SC2LOTV_ITEM_ID_OFFSET, "Forge 2", 19, SC2Race.PROTOSS, classification=ItemClassification.progression, origin={"ext"}),
- ItemNames.COLOSSUS_PACIFICATION_PROTOCOL: ItemData(350 + SC2LOTV_ITEM_ID_OFFSET, "Forge 2", 20, SC2Race.PROTOSS, origin={"ext"}, parent_item=ItemNames.COLOSSUS),
- ItemNames.WRATHWALKER_RAPID_POWER_CYCLING: ItemData(351 + SC2LOTV_ITEM_ID_OFFSET, "Forge 2", 21, SC2Race.PROTOSS, origin={"ext"}, parent_item=ItemNames.WRATHWALKER),
- ItemNames.WRATHWALKER_EYE_OF_WRATH: ItemData(352 + SC2LOTV_ITEM_ID_OFFSET, "Forge 2", 22, SC2Race.PROTOSS, classification=ItemClassification.filler, origin={"ext"}, parent_item=ItemNames.WRATHWALKER),
- ItemNames.DARK_TEMPLAR_AVENGER_BLOOD_HUNTER_SHROUD_OF_ADUN: ItemData(353 + SC2LOTV_ITEM_ID_OFFSET, "Forge 2", 23, SC2Race.PROTOSS, origin={"ext"}),
- ItemNames.DARK_TEMPLAR_AVENGER_BLOOD_HUNTER_SHADOW_GUARD_TRAINING: ItemData(354 + SC2LOTV_ITEM_ID_OFFSET, "Forge 2", 24, SC2Race.PROTOSS, origin={"bw"}),
- ItemNames.DARK_TEMPLAR_AVENGER_BLOOD_HUNTER_BLINK: ItemData(355 + SC2LOTV_ITEM_ID_OFFSET, "Forge 2", 25, SC2Race.PROTOSS, classification=ItemClassification.progression, origin={"ext"}),
- ItemNames.DARK_TEMPLAR_AVENGER_BLOOD_HUNTER_RESOURCE_EFFICIENCY: ItemData(356 + SC2LOTV_ITEM_ID_OFFSET, "Forge 2", 26, SC2Race.PROTOSS, origin={"ext"}),
- ItemNames.DARK_TEMPLAR_DARK_ARCHON_MELD: ItemData(357 + SC2LOTV_ITEM_ID_OFFSET, "Forge 2", 27, SC2Race.PROTOSS, origin={"bw"}, important_for_filtering=True ,parent_item=ItemNames.DARK_TEMPLAR),
- ItemNames.HIGH_TEMPLAR_SIGNIFIER_UNSHACKLED_PSIONIC_STORM: ItemData(358 + SC2LOTV_ITEM_ID_OFFSET, "Forge 2", 28, SC2Race.PROTOSS, origin={"bw"}),
- ItemNames.HIGH_TEMPLAR_SIGNIFIER_HALLUCINATION: ItemData(359 + SC2LOTV_ITEM_ID_OFFSET, "Forge 2", 29, SC2Race.PROTOSS, classification=ItemClassification.filler, origin={"bw"}),
- ItemNames.HIGH_TEMPLAR_SIGNIFIER_KHAYDARIN_AMULET: ItemData(360 + SC2LOTV_ITEM_ID_OFFSET, "Forge 3", 0, SC2Race.PROTOSS, origin={"bw"}),
- ItemNames.ARCHON_HIGH_ARCHON: ItemData(361 + SC2LOTV_ITEM_ID_OFFSET, "Forge 3", 1, SC2Race.PROTOSS, origin={"ext"}, important_for_filtering=True),
- ItemNames.DARK_ARCHON_FEEDBACK: ItemData(362 + SC2LOTV_ITEM_ID_OFFSET, "Forge 3", 2, SC2Race.PROTOSS, origin={"bw"}),
- ItemNames.DARK_ARCHON_MAELSTROM: ItemData(363 + SC2LOTV_ITEM_ID_OFFSET, "Forge 3", 3, SC2Race.PROTOSS, origin={"bw"}),
- ItemNames.DARK_ARCHON_ARGUS_TALISMAN: ItemData(364 + SC2LOTV_ITEM_ID_OFFSET, "Forge 3", 4, SC2Race.PROTOSS, origin={"bw"}),
- ItemNames.ASCENDANT_POWER_OVERWHELMING: ItemData(365 + SC2LOTV_ITEM_ID_OFFSET, "Forge 3", 5, SC2Race.PROTOSS, origin={"ext"}, parent_item=ItemNames.ASCENDANT),
- ItemNames.ASCENDANT_CHAOTIC_ATTUNEMENT: ItemData(366 + SC2LOTV_ITEM_ID_OFFSET, "Forge 3", 6, SC2Race.PROTOSS, origin={"ext"}, parent_item=ItemNames.ASCENDANT),
- ItemNames.ASCENDANT_BLOOD_AMULET: ItemData(367 + SC2LOTV_ITEM_ID_OFFSET, "Forge 3", 7, SC2Race.PROTOSS, origin={"ext"}, parent_item=ItemNames.ASCENDANT),
- ItemNames.SENTRY_ENERGIZER_HAVOC_CLOAKING_MODULE: ItemData(368 + SC2LOTV_ITEM_ID_OFFSET, "Forge 3", 8, SC2Race.PROTOSS, origin={"ext"}),
- ItemNames.SENTRY_ENERGIZER_HAVOC_SHIELD_BATTERY_RAPID_RECHARGING: ItemData(369 + SC2LOTV_ITEM_ID_OFFSET, "Forge 3", 9, SC2Race.PROTOSS, origin={"ext"}),
- ItemNames.SENTRY_FORCE_FIELD: ItemData(370 + SC2LOTV_ITEM_ID_OFFSET, "Forge 3", 10, SC2Race.PROTOSS, classification=ItemClassification.filler, origin={"ext"}, parent_item=ItemNames.SENTRY),
- ItemNames.SENTRY_HALLUCINATION: ItemData(371 + SC2LOTV_ITEM_ID_OFFSET, "Forge 3", 11, SC2Race.PROTOSS, classification=ItemClassification.filler, origin={"ext"}, parent_item=ItemNames.SENTRY),
- ItemNames.ENERGIZER_RECLAMATION: ItemData(372 + SC2LOTV_ITEM_ID_OFFSET, "Forge 3", 12, SC2Race.PROTOSS, origin={"ext"}, parent_item=ItemNames.ENERGIZER),
- ItemNames.ENERGIZER_FORGED_CHASSIS: ItemData(373 + SC2LOTV_ITEM_ID_OFFSET, "Forge 3", 13, SC2Race.PROTOSS, origin={"ext"}, parent_item=ItemNames.ENERGIZER),
- ItemNames.HAVOC_DETECT_WEAKNESS: ItemData(374 + SC2LOTV_ITEM_ID_OFFSET, "Forge 3", 14, SC2Race.PROTOSS, origin={"ext"}, parent_item=ItemNames.HAVOC),
- ItemNames.HAVOC_BLOODSHARD_RESONANCE: ItemData(375 + SC2LOTV_ITEM_ID_OFFSET, "Forge 3", 15, SC2Race.PROTOSS, origin={"ext"}, parent_item=ItemNames.HAVOC),
- ItemNames.ZEALOT_SENTINEL_CENTURION_LEG_ENHANCEMENTS: ItemData(376 + SC2LOTV_ITEM_ID_OFFSET, "Forge 3", 16, SC2Race.PROTOSS, origin={"bw"}),
- ItemNames.ZEALOT_SENTINEL_CENTURION_SHIELD_CAPACITY: ItemData(377 + SC2LOTV_ITEM_ID_OFFSET, "Forge 3", 17, SC2Race.PROTOSS, origin={"bw"}),
-
- # SoA Calldown powers
- ItemNames.SOA_CHRONO_SURGE: ItemData(700 + SC2LOTV_ITEM_ID_OFFSET, "Spear of Adun", 0, SC2Race.PROTOSS, origin={"lotv"}),
- ItemNames.SOA_PROGRESSIVE_PROXY_PYLON: ItemData(701 + SC2LOTV_ITEM_ID_OFFSET, "Progressive Upgrade", 0, SC2Race.PROTOSS, origin={"lotv"}, quantity=2),
- ItemNames.SOA_PYLON_OVERCHARGE: ItemData(702 + SC2LOTV_ITEM_ID_OFFSET, "Spear of Adun", 1, SC2Race.PROTOSS, origin={"ext"}),
- ItemNames.SOA_ORBITAL_STRIKE: ItemData(703 + SC2LOTV_ITEM_ID_OFFSET, "Spear of Adun", 2, SC2Race.PROTOSS, origin={"lotv"}),
- ItemNames.SOA_TEMPORAL_FIELD: ItemData(704 + SC2LOTV_ITEM_ID_OFFSET, "Spear of Adun", 3, SC2Race.PROTOSS, origin={"lotv"}),
- ItemNames.SOA_SOLAR_LANCE: ItemData(705 + SC2LOTV_ITEM_ID_OFFSET, "Spear of Adun", 4, SC2Race.PROTOSS, classification=ItemClassification.progression, origin={"lotv"}),
- ItemNames.SOA_MASS_RECALL: ItemData(706 + SC2LOTV_ITEM_ID_OFFSET, "Spear of Adun", 5, SC2Race.PROTOSS, origin={"lotv"}),
- ItemNames.SOA_SHIELD_OVERCHARGE: ItemData(707 + SC2LOTV_ITEM_ID_OFFSET, "Spear of Adun", 6, SC2Race.PROTOSS, origin={"lotv"}),
- ItemNames.SOA_DEPLOY_FENIX: ItemData(708 + SC2LOTV_ITEM_ID_OFFSET, "Spear of Adun", 7, SC2Race.PROTOSS, classification=ItemClassification.progression, origin={"lotv"}),
- ItemNames.SOA_PURIFIER_BEAM: ItemData(709 + SC2LOTV_ITEM_ID_OFFSET, "Spear of Adun", 8, SC2Race.PROTOSS, origin={"lotv"}),
- ItemNames.SOA_TIME_STOP: ItemData(710 + SC2LOTV_ITEM_ID_OFFSET, "Spear of Adun", 9, SC2Race.PROTOSS, classification=ItemClassification.progression, origin={"lotv"}),
- ItemNames.SOA_SOLAR_BOMBARDMENT: ItemData(711 + SC2LOTV_ITEM_ID_OFFSET, "Spear of Adun", 10, SC2Race.PROTOSS, origin={"lotv"}),
-
- # Generic Protoss Upgrades
- ItemNames.MATRIX_OVERLOAD:
- ItemData(800 + SC2LOTV_ITEM_ID_OFFSET, "Solarite Core", 0, SC2Race.PROTOSS, origin={"lotv"},
- description=r"All friendly units gain 25% movement speed and 15% attack speed within a Pylon's power field and for 15 seconds after leaving it."),
- ItemNames.QUATRO:
- ItemData(801 + SC2LOTV_ITEM_ID_OFFSET, "Solarite Core", 1, SC2Race.PROTOSS, origin={"ext"},
- description="All friendly Protoss units gain the equivalent of their +1 armour, attack, and shield upgrades."),
- ItemNames.NEXUS_OVERCHARGE:
- ItemData(802 + SC2LOTV_ITEM_ID_OFFSET, "Solarite Core", 2, SC2Race.PROTOSS, origin={"lotv"},
- important_for_filtering=True, description="The Protoss Nexus gains a long-range auto-attack."),
- ItemNames.ORBITAL_ASSIMILATORS:
- ItemData(803 + SC2LOTV_ITEM_ID_OFFSET, "Solarite Core", 3, SC2Race.PROTOSS, origin={"lotv"},
- description="Assimilators automatically harvest Vespene Gas without the need for Probes."),
- ItemNames.WARP_HARMONIZATION:
- ItemData(804 + SC2LOTV_ITEM_ID_OFFSET, "Solarite Core", 4, SC2Race.PROTOSS, origin={"lotv"},
- description=r"Stargates and Robotics Facilities can transform to utilize Warp In technology. Warp In cooldowns are 20% faster than original build times."),
- ItemNames.GUARDIAN_SHELL:
- ItemData(805 + SC2LOTV_ITEM_ID_OFFSET, "Solarite Core", 5, SC2Race.PROTOSS, origin={"lotv"},
- description="The Spear of Adun passively shields friendly Protoss units before death, making them invulnerable for 5 seconds. Each unit can only be shielded once every 60 seconds."),
- ItemNames.RECONSTRUCTION_BEAM:
- ItemData(806 + SC2LOTV_ITEM_ID_OFFSET, "Solarite Core", 6, SC2Race.PROTOSS,
- classification=ItemClassification.progression, origin={"lotv"},
- description="The Spear of Adun will passively heal mechanical units for 5 and non-biological structures for 10 life per second. Up to 3 targets can be repaired at once."),
- ItemNames.OVERWATCH:
- ItemData(807 + SC2LOTV_ITEM_ID_OFFSET, "Solarite Core", 7, SC2Race.PROTOSS, origin={"ext"},
- description="Once per second, the Spear of Adun will last-hit a damaged enemy unit that is below 50 health."),
- ItemNames.SUPERIOR_WARP_GATES:
- ItemData(808 + SC2LOTV_ITEM_ID_OFFSET, "Solarite Core", 8, SC2Race.PROTOSS, origin={"ext"},
- description="Protoss Warp Gates can hold up to 3 charges of unit warp-ins."),
- ItemNames.ENHANCED_TARGETING:
- ItemData(809 + SC2LOTV_ITEM_ID_OFFSET, "Solarite Core", 9, SC2Race.PROTOSS, origin={"ext"},
- description="Protoss defensive structures gain +2 range."),
- ItemNames.OPTIMIZED_ORDNANCE:
- ItemData(810 + SC2LOTV_ITEM_ID_OFFSET, "Solarite Core", 10, SC2Race.PROTOSS, origin={"ext"},
- description="Increases the attack speed of Protoss defensive structures by 25%."),
- ItemNames.KHALAI_INGENUITY:
- ItemData(811 + SC2LOTV_ITEM_ID_OFFSET, "Solarite Core", 11, SC2Race.PROTOSS, origin={"ext"},
- description="Pylons, Photon Cannons, Monoliths, and Shield Batteries warp in near-instantly."),
- ItemNames.AMPLIFIED_ASSIMILATORS:
- ItemData(812 + SC2LOTV_ITEM_ID_OFFSET, "Solarite Core", 12, SC2Race.PROTOSS, origin={"ext"},
- description=r"Assimilators produce Vespene gas 25% faster."),
-}
-
-
-def get_item_table():
- return item_table
-
-
-basic_units = {
- SC2Race.TERRAN: {
- ItemNames.MARINE,
- ItemNames.MARAUDER,
- ItemNames.GOLIATH,
- ItemNames.HELLION,
- ItemNames.VULTURE,
- ItemNames.WARHOUND,
- },
- SC2Race.ZERG: {
- ItemNames.ZERGLING,
- ItemNames.SWARM_QUEEN,
- ItemNames.ROACH,
- ItemNames.HYDRALISK,
- },
- SC2Race.PROTOSS: {
- ItemNames.ZEALOT,
- ItemNames.CENTURION,
- ItemNames.SENTINEL,
- ItemNames.STALKER,
- ItemNames.INSTIGATOR,
- ItemNames.SLAYER,
- ItemNames.DRAGOON,
- ItemNames.ADEPT,
- }
-}
-
-advanced_basic_units = {
- SC2Race.TERRAN: basic_units[SC2Race.TERRAN].union({
- ItemNames.REAPER,
- ItemNames.DIAMONDBACK,
- ItemNames.VIKING,
- ItemNames.SIEGE_TANK,
- ItemNames.BANSHEE,
- ItemNames.THOR,
- ItemNames.BATTLECRUISER,
- ItemNames.CYCLONE
- }),
- SC2Race.ZERG: basic_units[SC2Race.ZERG].union({
- ItemNames.INFESTOR,
- ItemNames.ABERRATION,
- }),
- SC2Race.PROTOSS: basic_units[SC2Race.PROTOSS].union({
- ItemNames.DARK_TEMPLAR,
- ItemNames.BLOOD_HUNTER,
- ItemNames.AVENGER,
- ItemNames.IMMORTAL,
- ItemNames.ANNIHILATOR,
- ItemNames.VANGUARD,
- })
-}
-
-no_logic_starting_units = {
- SC2Race.TERRAN: advanced_basic_units[SC2Race.TERRAN].union({
- ItemNames.FIREBAT,
- ItemNames.GHOST,
- ItemNames.SPECTRE,
- ItemNames.WRAITH,
- ItemNames.RAVEN,
- ItemNames.PREDATOR,
- ItemNames.LIBERATOR,
- ItemNames.HERC,
- }),
- SC2Race.ZERG: advanced_basic_units[SC2Race.ZERG].union({
- ItemNames.ULTRALISK,
- ItemNames.SWARM_HOST
- }),
- SC2Race.PROTOSS: advanced_basic_units[SC2Race.PROTOSS].union({
- ItemNames.CARRIER,
- ItemNames.TEMPEST,
- ItemNames.VOID_RAY,
- ItemNames.DESTROYER,
- ItemNames.COLOSSUS,
- ItemNames.WRATHWALKER,
- ItemNames.SCOUT,
- ItemNames.HIGH_TEMPLAR,
- ItemNames.SIGNIFIER,
- ItemNames.ASCENDANT,
- ItemNames.DARK_ARCHON,
- ItemNames.SUPPLICANT,
- })
-}
-
-not_balanced_starting_units = {
- ItemNames.SIEGE_TANK,
- ItemNames.THOR,
- ItemNames.BANSHEE,
- ItemNames.BATTLECRUISER,
- ItemNames.ULTRALISK,
- ItemNames.CARRIER,
- ItemNames.TEMPEST,
-}
-
-
-def get_basic_units(world: World, race: SC2Race) -> typing.Set[str]:
- logic_level = get_option_value(world, 'required_tactics')
- if logic_level == RequiredTactics.option_no_logic:
- return no_logic_starting_units[race]
- elif logic_level == RequiredTactics.option_advanced:
- return advanced_basic_units[race]
- else:
- return basic_units[race]
-
-
-# Items that can be placed before resources if not already in
-# General upgrades and Mercs
-second_pass_placeable_items: typing.Tuple[str, ...] = (
- # Global weapon/armor upgrades
- ItemNames.PROGRESSIVE_TERRAN_ARMOR_UPGRADE,
- ItemNames.PROGRESSIVE_TERRAN_WEAPON_UPGRADE,
- ItemNames.PROGRESSIVE_TERRAN_WEAPON_ARMOR_UPGRADE,
- ItemNames.PROGRESSIVE_ZERG_ARMOR_UPGRADE,
- ItemNames.PROGRESSIVE_ZERG_WEAPON_UPGRADE,
- ItemNames.PROGRESSIVE_ZERG_WEAPON_ARMOR_UPGRADE,
- ItemNames.PROGRESSIVE_PROTOSS_ARMOR_UPGRADE,
- ItemNames.PROGRESSIVE_PROTOSS_WEAPON_UPGRADE,
- ItemNames.PROGRESSIVE_PROTOSS_WEAPON_ARMOR_UPGRADE,
- ItemNames.PROGRESSIVE_PROTOSS_SHIELDS,
- # Terran Buildings without upgrades
- ItemNames.SENSOR_TOWER,
- ItemNames.HIVE_MIND_EMULATOR,
- ItemNames.PSI_DISRUPTER,
- ItemNames.PERDITION_TURRET,
- # Terran units without upgrades
- ItemNames.HERC,
- ItemNames.WARHOUND,
- # General Terran upgrades without any dependencies
- ItemNames.SCV_ADVANCED_CONSTRUCTION,
- ItemNames.SCV_DUAL_FUSION_WELDERS,
- ItemNames.PROGRESSIVE_FIRE_SUPPRESSION_SYSTEM,
- ItemNames.PROGRESSIVE_ORBITAL_COMMAND,
- ItemNames.ULTRA_CAPACITORS,
- ItemNames.VANADIUM_PLATING,
- ItemNames.ORBITAL_DEPOTS,
- ItemNames.MICRO_FILTERING,
- ItemNames.AUTOMATED_REFINERY,
- ItemNames.COMMAND_CENTER_REACTOR,
- ItemNames.TECH_REACTOR,
- ItemNames.CELLULAR_REACTOR,
- ItemNames.PROGRESSIVE_REGENERATIVE_BIO_STEEL, # Place only L1
- ItemNames.STRUCTURE_ARMOR,
- ItemNames.HI_SEC_AUTO_TRACKING,
- ItemNames.ADVANCED_OPTICS,
- ItemNames.ROGUE_FORCES,
- # Mercenaries (All races)
- *[item_name for item_name, item_data in get_full_item_list().items()
- if item_data.type == "Mercenary"],
- # Kerrigan and Nova levels, abilities and generally useful stuff
- *[item_name for item_name, item_data in get_full_item_list().items()
- if item_data.type in ("Level", "Ability", "Evolution Pit", "Nova Gear")],
- ItemNames.NOVA_PROGRESSIVE_STEALTH_SUIT_MODULE,
- # Zerg static defenses
- ItemNames.SPORE_CRAWLER,
- ItemNames.SPINE_CRAWLER,
- # Defiler, Aberration (no upgrades)
- ItemNames.DEFILER,
- ItemNames.ABERRATION,
- # Spear of Adun Abilities
- ItemNames.SOA_CHRONO_SURGE,
- ItemNames.SOA_PROGRESSIVE_PROXY_PYLON,
- ItemNames.SOA_PYLON_OVERCHARGE,
- ItemNames.SOA_ORBITAL_STRIKE,
- ItemNames.SOA_TEMPORAL_FIELD,
- ItemNames.SOA_SOLAR_LANCE,
- ItemNames.SOA_MASS_RECALL,
- ItemNames.SOA_SHIELD_OVERCHARGE,
- ItemNames.SOA_DEPLOY_FENIX,
- ItemNames.SOA_PURIFIER_BEAM,
- ItemNames.SOA_TIME_STOP,
- ItemNames.SOA_SOLAR_BOMBARDMENT,
- # Protoss generic upgrades
- ItemNames.MATRIX_OVERLOAD,
- ItemNames.QUATRO,
- ItemNames.NEXUS_OVERCHARGE,
- ItemNames.ORBITAL_ASSIMILATORS,
- ItemNames.WARP_HARMONIZATION,
- ItemNames.GUARDIAN_SHELL,
- ItemNames.RECONSTRUCTION_BEAM,
- ItemNames.OVERWATCH,
- ItemNames.SUPERIOR_WARP_GATES,
- ItemNames.KHALAI_INGENUITY,
- ItemNames.AMPLIFIED_ASSIMILATORS,
- # Protoss static defenses
- ItemNames.PHOTON_CANNON,
- ItemNames.KHAYDARIN_MONOLITH,
- ItemNames.SHIELD_BATTERY
-)
-
-
-filler_items: typing.Tuple[str, ...] = (
- ItemNames.STARTING_MINERALS,
- ItemNames.STARTING_VESPENE,
- ItemNames.STARTING_SUPPLY,
-)
-
-# Defense rating table
-# Commented defense ratings are handled in LogicMixin
-defense_ratings = {
- ItemNames.SIEGE_TANK: 5,
- # "Maelstrom Rounds": 2,
- ItemNames.PLANETARY_FORTRESS: 3,
- # Bunker w/ Marine/Marauder: 3,
- ItemNames.PERDITION_TURRET: 2,
- ItemNames.VULTURE: 1,
- ItemNames.BANSHEE: 1,
- ItemNames.BATTLECRUISER: 1,
- ItemNames.LIBERATOR: 4,
- ItemNames.WIDOW_MINE: 1,
- # "Concealment (Widow Mine)": 1
-}
-zerg_defense_ratings = {
- ItemNames.PERDITION_TURRET: 2,
- # Bunker w/ Firebat: 2,
- ItemNames.LIBERATOR: -2,
- ItemNames.HIVE_MIND_EMULATOR: 3,
- ItemNames.PSI_DISRUPTER: 3,
-}
-air_defense_ratings = {
- ItemNames.MISSILE_TURRET: 2,
-}
-
-kerrigan_levels = [item_name for item_name, item_data in get_full_item_list().items()
- if item_data.type == "Level" and item_data.race == SC2Race.ZERG]
-
-spider_mine_sources = {
- ItemNames.VULTURE,
- ItemNames.REAPER_SPIDER_MINES,
- ItemNames.SIEGE_TANK_SPIDER_MINES,
- ItemNames.RAVEN_SPIDER_MINES,
-}
-
-progressive_if_nco = {
- ItemNames.MARINE_PROGRESSIVE_STIMPACK,
- ItemNames.FIREBAT_PROGRESSIVE_STIMPACK,
- ItemNames.BANSHEE_PROGRESSIVE_CROSS_SPECTRUM_DAMPENERS,
- ItemNames.PROGRESSIVE_REGENERATIVE_BIO_STEEL,
-}
-
-progressive_if_ext = {
- ItemNames.VULTURE_PROGRESSIVE_REPLENISHABLE_MAGAZINE,
- ItemNames.WRAITH_PROGRESSIVE_TOMAHAWK_POWER_CELLS,
- ItemNames.BATTLECRUISER_PROGRESSIVE_DEFENSIVE_MATRIX,
- ItemNames.BATTLECRUISER_PROGRESSIVE_MISSILE_PODS,
- ItemNames.THOR_PROGRESSIVE_IMMORTALITY_PROTOCOL,
- ItemNames.PROGRESSIVE_FIRE_SUPPRESSION_SYSTEM,
- ItemNames.DIAMONDBACK_PROGRESSIVE_TRI_LITHIUM_POWER_CELL,
- ItemNames.PROGRESSIVE_ORBITAL_COMMAND
-}
-
-kerrigan_actives: typing.List[typing.Set[str]] = [
- {ItemNames.KERRIGAN_KINETIC_BLAST, ItemNames.KERRIGAN_LEAPING_STRIKE},
- {ItemNames.KERRIGAN_CRUSHING_GRIP, ItemNames.KERRIGAN_PSIONIC_SHIFT},
- set(),
- {ItemNames.KERRIGAN_WILD_MUTATION, ItemNames.KERRIGAN_SPAWN_BANELINGS, ItemNames.KERRIGAN_MEND},
- set(),
- set(),
- {ItemNames.KERRIGAN_APOCALYPSE, ItemNames.KERRIGAN_SPAWN_LEVIATHAN, ItemNames.KERRIGAN_DROP_PODS},
-]
-
-kerrigan_passives: typing.List[typing.Set[str]] = [
- {ItemNames.KERRIGAN_HEROIC_FORTITUDE},
- {ItemNames.KERRIGAN_CHAIN_REACTION},
- {ItemNames.KERRIGAN_ZERGLING_RECONSTITUTION, ItemNames.KERRIGAN_IMPROVED_OVERLORDS, ItemNames.KERRIGAN_AUTOMATED_EXTRACTORS},
- set(),
- {ItemNames.KERRIGAN_TWIN_DRONES, ItemNames.KERRIGAN_MALIGNANT_CREEP, ItemNames.KERRIGAN_VESPENE_EFFICIENCY},
- {ItemNames.KERRIGAN_INFEST_BROODLINGS, ItemNames.KERRIGAN_FURY, ItemNames.KERRIGAN_ABILITY_EFFICIENCY},
- set(),
-]
-
-kerrigan_only_passives = {
- ItemNames.KERRIGAN_HEROIC_FORTITUDE, ItemNames.KERRIGAN_CHAIN_REACTION,
- ItemNames.KERRIGAN_INFEST_BROODLINGS, ItemNames.KERRIGAN_FURY, ItemNames.KERRIGAN_ABILITY_EFFICIENCY,
-}
-
-spear_of_adun_calldowns = {
- ItemNames.SOA_CHRONO_SURGE,
- ItemNames.SOA_PROGRESSIVE_PROXY_PYLON,
- ItemNames.SOA_PYLON_OVERCHARGE,
- ItemNames.SOA_ORBITAL_STRIKE,
- ItemNames.SOA_TEMPORAL_FIELD,
- ItemNames.SOA_SOLAR_LANCE,
- ItemNames.SOA_MASS_RECALL,
- ItemNames.SOA_SHIELD_OVERCHARGE,
- ItemNames.SOA_DEPLOY_FENIX,
- ItemNames.SOA_PURIFIER_BEAM,
- ItemNames.SOA_TIME_STOP,
- ItemNames.SOA_SOLAR_BOMBARDMENT
-}
-
-spear_of_adun_castable_passives = {
- ItemNames.RECONSTRUCTION_BEAM,
- ItemNames.OVERWATCH,
-}
-
-nova_equipment = {
- *[item_name for item_name, item_data in get_full_item_list().items()
- if item_data.type == "Nova Gear"],
- ItemNames.NOVA_PROGRESSIVE_STEALTH_SUIT_MODULE
-}
-
-# 'number' values of upgrades for upgrade bundle items
-upgrade_numbers = [
- # Terran
- {0, 4, 8}, # Weapon
- {2, 6, 10}, # Armor
- {0, 2}, # Infantry
- {4, 6}, # Vehicle
- {8, 10}, # Starship
- {0, 2, 4, 6, 8, 10}, # All
- # Zerg
- {0, 2, 6}, # Weapon
- {4, 8}, # Armor
- {0, 2, 4}, # Ground
- {6, 8}, # Flyer
- {0, 2, 4, 6, 8}, # All
- # Protoss
- {0, 6}, # Weapon
- {2, 4, 8}, # Armor
- {0, 2}, # Ground, Shields are handled specially
- {6, 8}, # Air, Shields are handled specially
- {0, 2, 4, 6, 8}, # All
-]
-# 'upgrade_numbers' indices for all upgrades
-upgrade_numbers_all = {
- SC2Race.TERRAN: 5,
- SC2Race.ZERG: 10,
- SC2Race.PROTOSS: 15,
-}
-
-# Names of upgrades to be included for different options
-upgrade_included_names = [
- { # Individual Items
- ItemNames.PROGRESSIVE_TERRAN_INFANTRY_WEAPON,
- ItemNames.PROGRESSIVE_TERRAN_INFANTRY_ARMOR,
- ItemNames.PROGRESSIVE_TERRAN_VEHICLE_WEAPON,
- ItemNames.PROGRESSIVE_TERRAN_VEHICLE_ARMOR,
- ItemNames.PROGRESSIVE_TERRAN_SHIP_WEAPON,
- ItemNames.PROGRESSIVE_TERRAN_SHIP_ARMOR,
- ItemNames.PROGRESSIVE_ZERG_MELEE_ATTACK,
- ItemNames.PROGRESSIVE_ZERG_MISSILE_ATTACK,
- ItemNames.PROGRESSIVE_ZERG_GROUND_CARAPACE,
- ItemNames.PROGRESSIVE_ZERG_FLYER_ATTACK,
- ItemNames.PROGRESSIVE_ZERG_FLYER_CARAPACE,
- ItemNames.PROGRESSIVE_PROTOSS_GROUND_WEAPON,
- ItemNames.PROGRESSIVE_PROTOSS_GROUND_ARMOR,
- ItemNames.PROGRESSIVE_PROTOSS_SHIELDS,
- ItemNames.PROGRESSIVE_PROTOSS_AIR_WEAPON,
- ItemNames.PROGRESSIVE_PROTOSS_AIR_ARMOR,
- },
- { # Bundle Weapon And Armor
- ItemNames.PROGRESSIVE_TERRAN_WEAPON_UPGRADE,
- ItemNames.PROGRESSIVE_TERRAN_ARMOR_UPGRADE,
- ItemNames.PROGRESSIVE_ZERG_WEAPON_UPGRADE,
- ItemNames.PROGRESSIVE_ZERG_ARMOR_UPGRADE,
- ItemNames.PROGRESSIVE_PROTOSS_WEAPON_UPGRADE,
- ItemNames.PROGRESSIVE_PROTOSS_ARMOR_UPGRADE,
- },
- { # Bundle Unit Class
- ItemNames.PROGRESSIVE_TERRAN_INFANTRY_UPGRADE,
- ItemNames.PROGRESSIVE_TERRAN_VEHICLE_UPGRADE,
- ItemNames.PROGRESSIVE_TERRAN_SHIP_UPGRADE,
- ItemNames.PROGRESSIVE_ZERG_GROUND_UPGRADE,
- ItemNames.PROGRESSIVE_ZERG_FLYER_UPGRADE,
- ItemNames.PROGRESSIVE_PROTOSS_GROUND_UPGRADE,
- ItemNames.PROGRESSIVE_PROTOSS_AIR_UPGRADE,
- },
- { # Bundle All
- ItemNames.PROGRESSIVE_TERRAN_WEAPON_ARMOR_UPGRADE,
- ItemNames.PROGRESSIVE_ZERG_WEAPON_ARMOR_UPGRADE,
- ItemNames.PROGRESSIVE_PROTOSS_WEAPON_ARMOR_UPGRADE,
- }
-]
-
-lookup_id_to_name: typing.Dict[int, str] = {data.code: item_name for item_name, data in get_full_item_list().items() if
- data.code}
-
-# Map type to expected int
-type_flaggroups: typing.Dict[SC2Race, typing.Dict[str, int]] = {
- SC2Race.ANY: {
- "Minerals": 0,
- "Vespene": 1,
- "Supply": 2,
- "Goal": 3,
- "Nothing Group": 4,
- },
- SC2Race.TERRAN: {
- "Armory 1": 0,
- "Armory 2": 1,
- "Armory 3": 2,
- "Armory 4": 3,
- "Armory 5": 4,
- "Armory 6": 5,
- "Progressive Upgrade": 6, # Unit upgrades that exist multiple times (Stimpack / Super Stimpack)
- "Laboratory": 7,
- "Upgrade": 8, # Weapon / Armor upgrades
- "Unit": 9,
- "Building": 10,
- "Mercenary": 11,
- "Nova Gear": 12,
- "Progressive Upgrade 2": 13,
- },
- SC2Race.ZERG: {
- "Ability": 0,
- "Mutation 1": 1,
- "Strain": 2,
- "Morph": 3,
- "Upgrade": 4,
- "Mercenary": 5,
- "Unit": 6,
- "Level": 7,
- "Primal Form": 8,
- "Evolution Pit": 9,
- "Mutation 2": 10,
- "Mutation 3": 11
- },
- SC2Race.PROTOSS: {
- "Unit": 0,
- "Unit 2": 1,
- "Upgrade": 2, # Weapon / Armor upgrades
- "Building": 3,
- "Progressive Upgrade": 4,
- "Spear of Adun": 5,
- "Solarite Core": 6,
- "Forge 1": 7,
- "Forge 2": 8,
- "Forge 3": 9,
- }
-}
diff --git a/worlds/sc2/Locations.py b/worlds/sc2/Locations.py
deleted file mode 100644
index 42b1dd4d..00000000
--- a/worlds/sc2/Locations.py
+++ /dev/null
@@ -1,1635 +0,0 @@
-from enum import IntEnum
-from typing import List, Tuple, Optional, Callable, NamedTuple, Set, Any
-from BaseClasses import MultiWorld
-from . import ItemNames
-from .Options import get_option_value, kerrigan_unit_available, RequiredTactics, GrantStoryTech, LocationInclusion, \
- EnableHotsMissions
-from .Rules import SC2Logic
-
-from BaseClasses import Location
-from worlds.AutoWorld import World
-
-SC2WOL_LOC_ID_OFFSET = 1000
-SC2HOTS_LOC_ID_OFFSET = 20000000 # Avoid clashes with The Legend of Zelda
-SC2LOTV_LOC_ID_OFFSET = SC2HOTS_LOC_ID_OFFSET + 2000
-SC2NCO_LOC_ID_OFFSET = SC2LOTV_LOC_ID_OFFSET + 2500
-
-
-class SC2Location(Location):
- game: str = "Starcraft2"
-
-
-class LocationType(IntEnum):
- VICTORY = 0 # Winning a mission
- VANILLA = 1 # Objectives that provided metaprogression in the original campaign, along with a few other locations for a balanced experience
- EXTRA = 2 # Additional locations based on mission progression, collecting in-mission rewards, etc. that do not significantly increase the challenge.
- CHALLENGE = 3 # Challenging objectives, often harder than just completing a mission, and often associated with Achievements
- MASTERY = 4 # Extremely challenging objectives often associated with Masteries and Feats of Strength in the original campaign
-
-
-class LocationData(NamedTuple):
- region: str
- name: str
- code: Optional[int]
- type: LocationType
- rule: Optional[Callable[[Any], bool]] = Location.access_rule
-
-
-def get_location_types(world: World, inclusion_type: LocationInclusion) -> Set[LocationType]:
- """
-
- :param multiworld:
- :param player:
- :param inclusion_type: Level of inclusion to check for
- :return: A list of location types that match the inclusion type
- """
- exclusion_options = [
- ("vanilla_locations", LocationType.VANILLA),
- ("extra_locations", LocationType.EXTRA),
- ("challenge_locations", LocationType.CHALLENGE),
- ("mastery_locations", LocationType.MASTERY)
- ]
- excluded_location_types = set()
- for option_name, location_type in exclusion_options:
- if get_option_value(world, option_name) is inclusion_type:
- excluded_location_types.add(location_type)
- return excluded_location_types
-
-
-def get_plando_locations(world: World) -> List[str]:
- """
-
- :param multiworld:
- :param player:
- :return: A list of locations affected by a plando in a world
- """
- if world is None:
- return []
- plando_locations = []
- for plando_setting in world.options.plando_items:
- plando_locations += plando_setting.locations
-
- return plando_locations
-
-
-def get_locations(world: Optional[World]) -> Tuple[LocationData, ...]:
- # Note: rules which are ended with or True are rules identified as needed later when restricted units is an option
- logic_level = get_option_value(world, 'required_tactics')
- adv_tactics = logic_level != RequiredTactics.option_standard
- kerriganless = get_option_value(world, 'kerrigan_presence') not in kerrigan_unit_available \
- or get_option_value(world, "enable_hots_missions") == EnableHotsMissions.option_false
- story_tech_granted = get_option_value(world, "grant_story_tech") == GrantStoryTech.option_true
- logic = SC2Logic(world)
- player = None if world is None else world.player
- location_table: List[LocationData] = [
- # WoL
- LocationData("Liberation Day", "Liberation Day: Victory", SC2WOL_LOC_ID_OFFSET + 100, LocationType.VICTORY),
- LocationData("Liberation Day", "Liberation Day: First Statue", SC2WOL_LOC_ID_OFFSET + 101, LocationType.VANILLA),
- LocationData("Liberation Day", "Liberation Day: Second Statue", SC2WOL_LOC_ID_OFFSET + 102, LocationType.VANILLA),
- LocationData("Liberation Day", "Liberation Day: Third Statue", SC2WOL_LOC_ID_OFFSET + 103, LocationType.VANILLA),
- LocationData("Liberation Day", "Liberation Day: Fourth Statue", SC2WOL_LOC_ID_OFFSET + 104, LocationType.VANILLA),
- LocationData("Liberation Day", "Liberation Day: Fifth Statue", SC2WOL_LOC_ID_OFFSET + 105, LocationType.VANILLA),
- LocationData("Liberation Day", "Liberation Day: Sixth Statue", SC2WOL_LOC_ID_OFFSET + 106, LocationType.VANILLA),
- LocationData("Liberation Day", "Liberation Day: Special Delivery", SC2WOL_LOC_ID_OFFSET + 107, LocationType.EXTRA),
- LocationData("Liberation Day", "Liberation Day: Transport", SC2WOL_LOC_ID_OFFSET + 108, LocationType.EXTRA),
- LocationData("The Outlaws", "The Outlaws: Victory", SC2WOL_LOC_ID_OFFSET + 200, LocationType.VICTORY,
- lambda state: logic.terran_early_tech(state)),
- LocationData("The Outlaws", "The Outlaws: Rebel Base", SC2WOL_LOC_ID_OFFSET + 201, LocationType.VANILLA,
- lambda state: logic.terran_early_tech(state)),
- LocationData("The Outlaws", "The Outlaws: North Resource Pickups", SC2WOL_LOC_ID_OFFSET + 202, LocationType.EXTRA,
- lambda state: logic.terran_early_tech(state)),
- LocationData("The Outlaws", "The Outlaws: Bunker", SC2WOL_LOC_ID_OFFSET + 203, LocationType.VANILLA,
- lambda state: logic.terran_early_tech(state)),
- LocationData("The Outlaws", "The Outlaws: Close Resource Pickups", SC2WOL_LOC_ID_OFFSET + 204, LocationType.EXTRA),
- LocationData("Zero Hour", "Zero Hour: Victory", SC2WOL_LOC_ID_OFFSET + 300, LocationType.VICTORY,
- lambda state: logic.terran_common_unit(state) and
- logic.terran_defense_rating(state, True) >= 2 and
- (adv_tactics or logic.terran_basic_anti_air(state))),
- LocationData("Zero Hour", "Zero Hour: First Group Rescued", SC2WOL_LOC_ID_OFFSET + 301, LocationType.VANILLA),
- LocationData("Zero Hour", "Zero Hour: Second Group Rescued", SC2WOL_LOC_ID_OFFSET + 302, LocationType.VANILLA,
- lambda state: logic.terran_common_unit(state)),
- LocationData("Zero Hour", "Zero Hour: Third Group Rescued", SC2WOL_LOC_ID_OFFSET + 303, LocationType.VANILLA,
- lambda state: logic.terran_common_unit(state) and
- logic.terran_defense_rating(state, True) >= 2),
- LocationData("Zero Hour", "Zero Hour: First Hatchery", SC2WOL_LOC_ID_OFFSET + 304, LocationType.CHALLENGE,
- lambda state: logic.terran_competent_comp(state)),
- LocationData("Zero Hour", "Zero Hour: Second Hatchery", SC2WOL_LOC_ID_OFFSET + 305, LocationType.CHALLENGE,
- lambda state: logic.terran_competent_comp(state)),
- LocationData("Zero Hour", "Zero Hour: Third Hatchery", SC2WOL_LOC_ID_OFFSET + 306, LocationType.CHALLENGE,
- lambda state: logic.terran_competent_comp(state)),
- LocationData("Zero Hour", "Zero Hour: Fourth Hatchery", SC2WOL_LOC_ID_OFFSET + 307, LocationType.CHALLENGE,
- lambda state: logic.terran_competent_comp(state)),
- LocationData("Zero Hour", "Zero Hour: Ride's on its Way", SC2WOL_LOC_ID_OFFSET + 308, LocationType.EXTRA,
- lambda state: logic.terran_common_unit(state)),
- LocationData("Zero Hour", "Zero Hour: Hold Just a Little Longer", SC2WOL_LOC_ID_OFFSET + 309, LocationType.EXTRA,
- lambda state: logic.terran_common_unit(state) and
- logic.terran_defense_rating(state, True) >= 2),
- LocationData("Zero Hour", "Zero Hour: Cavalry's on the Way", SC2WOL_LOC_ID_OFFSET + 310, LocationType.EXTRA,
- lambda state: logic.terran_common_unit(state) and
- logic.terran_defense_rating(state, True) >= 2),
- LocationData("Evacuation", "Evacuation: Victory", SC2WOL_LOC_ID_OFFSET + 400, LocationType.VICTORY,
- lambda state: logic.terran_early_tech(state) and
- (adv_tactics and logic.terran_basic_anti_air(state)
- or logic.terran_competent_anti_air(state))),
- LocationData("Evacuation", "Evacuation: North Chrysalis", SC2WOL_LOC_ID_OFFSET + 401, LocationType.VANILLA),
- LocationData("Evacuation", "Evacuation: West Chrysalis", SC2WOL_LOC_ID_OFFSET + 402, LocationType.VANILLA,
- lambda state: logic.terran_early_tech(state)),
- LocationData("Evacuation", "Evacuation: East Chrysalis", SC2WOL_LOC_ID_OFFSET + 403, LocationType.VANILLA,
- lambda state: logic.terran_early_tech(state)),
- LocationData("Evacuation", "Evacuation: Reach Hanson", SC2WOL_LOC_ID_OFFSET + 404, LocationType.EXTRA),
- LocationData("Evacuation", "Evacuation: Secret Resource Stash", SC2WOL_LOC_ID_OFFSET + 405, LocationType.EXTRA),
- LocationData("Evacuation", "Evacuation: Flawless", SC2WOL_LOC_ID_OFFSET + 406, LocationType.CHALLENGE,
- lambda state: logic.terran_early_tech(state) and
- logic.terran_defense_rating(state, True, False) >= 2 and
- (adv_tactics and logic.terran_basic_anti_air(state)
- or logic.terran_competent_anti_air(state))),
- LocationData("Outbreak", "Outbreak: Victory", SC2WOL_LOC_ID_OFFSET + 500, LocationType.VICTORY,
- lambda state: logic.terran_defense_rating(state, True, False) >= 4 and
- (logic.terran_common_unit(state) or state.has(ItemNames.REAPER, player))),
- LocationData("Outbreak", "Outbreak: Left Infestor", SC2WOL_LOC_ID_OFFSET + 501, LocationType.VANILLA,
- lambda state: logic.terran_defense_rating(state, True, False) >= 2 and
- (logic.terran_common_unit(state) or state.has(ItemNames.REAPER, player))),
- LocationData("Outbreak", "Outbreak: Right Infestor", SC2WOL_LOC_ID_OFFSET + 502, LocationType.VANILLA,
- lambda state: logic.terran_defense_rating(state, True, False) >= 2 and
- (logic.terran_common_unit(state) or state.has(ItemNames.REAPER, player))),
- LocationData("Outbreak", "Outbreak: North Infested Command Center", SC2WOL_LOC_ID_OFFSET + 503, LocationType.EXTRA,
- lambda state: logic.terran_defense_rating(state, True, False) >= 2 and
- (logic.terran_common_unit(state) or state.has(ItemNames.REAPER, player))),
- LocationData("Outbreak", "Outbreak: South Infested Command Center", SC2WOL_LOC_ID_OFFSET + 504, LocationType.EXTRA,
- lambda state: logic.terran_defense_rating(state, True, False) >= 2 and
- (logic.terran_common_unit(state) or state.has(ItemNames.REAPER, player))),
- LocationData("Outbreak", "Outbreak: Northwest Bar", SC2WOL_LOC_ID_OFFSET + 505, LocationType.EXTRA,
- lambda state: logic.terran_defense_rating(state, True, False) >= 2 and
- (logic.terran_common_unit(state) or state.has(ItemNames.REAPER, player))),
- LocationData("Outbreak", "Outbreak: North Bar", SC2WOL_LOC_ID_OFFSET + 506, LocationType.EXTRA,
- lambda state: logic.terran_defense_rating(state, True, False) >= 2 and
- (logic.terran_common_unit(state) or state.has(ItemNames.REAPER, player))),
- LocationData("Outbreak", "Outbreak: South Bar", SC2WOL_LOC_ID_OFFSET + 507, LocationType.EXTRA,
- lambda state: logic.terran_defense_rating(state, True, False) >= 2 and
- (logic.terran_common_unit(state) or state.has(ItemNames.REAPER, player))),
- LocationData("Safe Haven", "Safe Haven: Victory", SC2WOL_LOC_ID_OFFSET + 600, LocationType.VICTORY,
- lambda state: logic.terran_common_unit(state) and
- logic.terran_competent_anti_air(state)),
- LocationData("Safe Haven", "Safe Haven: North Nexus", SC2WOL_LOC_ID_OFFSET + 601, LocationType.EXTRA,
- lambda state: logic.terran_common_unit(state) and
- logic.terran_competent_anti_air(state)),
- LocationData("Safe Haven", "Safe Haven: East Nexus", SC2WOL_LOC_ID_OFFSET + 602, LocationType.EXTRA,
- lambda state: logic.terran_common_unit(state) and
- logic.terran_competent_anti_air(state)),
- LocationData("Safe Haven", "Safe Haven: South Nexus", SC2WOL_LOC_ID_OFFSET + 603, LocationType.EXTRA,
- lambda state: logic.terran_common_unit(state) and
- logic.terran_competent_anti_air(state)),
- LocationData("Safe Haven", "Safe Haven: First Terror Fleet", SC2WOL_LOC_ID_OFFSET + 604, LocationType.VANILLA,
- lambda state: logic.terran_common_unit(state) and
- logic.terran_competent_anti_air(state)),
- LocationData("Safe Haven", "Safe Haven: Second Terror Fleet", SC2WOL_LOC_ID_OFFSET + 605, LocationType.VANILLA,
- lambda state: logic.terran_common_unit(state) and
- logic.terran_competent_anti_air(state)),
- LocationData("Safe Haven", "Safe Haven: Third Terror Fleet", SC2WOL_LOC_ID_OFFSET + 606, LocationType.VANILLA,
- lambda state: logic.terran_common_unit(state) and
- logic.terran_competent_anti_air(state)),
- LocationData("Haven's Fall", "Haven's Fall: Victory", SC2WOL_LOC_ID_OFFSET + 700, LocationType.VICTORY,
- lambda state: logic.terran_common_unit(state) and
- logic.terran_competent_anti_air(state) and
- logic.terran_defense_rating(state, True) >= 3),
- LocationData("Haven's Fall", "Haven's Fall: North Hive", SC2WOL_LOC_ID_OFFSET + 701, LocationType.VANILLA,
- lambda state: logic.terran_common_unit(state) and
- logic.terran_competent_anti_air(state) and
- logic.terran_defense_rating(state, True) >= 3),
- LocationData("Haven's Fall", "Haven's Fall: East Hive", SC2WOL_LOC_ID_OFFSET + 702, LocationType.VANILLA,
- lambda state: logic.terran_common_unit(state) and
- logic.terran_competent_anti_air(state) and
- logic.terran_defense_rating(state, True) >= 3),
- LocationData("Haven's Fall", "Haven's Fall: South Hive", SC2WOL_LOC_ID_OFFSET + 703, LocationType.VANILLA,
- lambda state: logic.terran_common_unit(state) and
- logic.terran_competent_anti_air(state) and
- logic.terran_defense_rating(state, True) >= 3),
- LocationData("Haven's Fall", "Haven's Fall: Northeast Colony Base", SC2WOL_LOC_ID_OFFSET + 704, LocationType.CHALLENGE,
- lambda state: logic.terran_respond_to_colony_infestations(state)),
- LocationData("Haven's Fall", "Haven's Fall: East Colony Base", SC2WOL_LOC_ID_OFFSET + 705, LocationType.CHALLENGE,
- lambda state: logic.terran_respond_to_colony_infestations(state)),
- LocationData("Haven's Fall", "Haven's Fall: Middle Colony Base", SC2WOL_LOC_ID_OFFSET + 706, LocationType.CHALLENGE,
- lambda state: logic.terran_respond_to_colony_infestations(state)),
- LocationData("Haven's Fall", "Haven's Fall: Southeast Colony Base", SC2WOL_LOC_ID_OFFSET + 707, LocationType.CHALLENGE,
- lambda state: logic.terran_respond_to_colony_infestations(state)),
- LocationData("Haven's Fall", "Haven's Fall: Southwest Colony Base", SC2WOL_LOC_ID_OFFSET + 708, LocationType.CHALLENGE,
- lambda state: logic.terran_respond_to_colony_infestations(state)),
- LocationData("Haven's Fall", "Haven's Fall: Southwest Gas Pickups", SC2WOL_LOC_ID_OFFSET + 709, LocationType.EXTRA,
- lambda state: logic.terran_common_unit(state) and
- logic.terran_competent_anti_air(state) and
- logic.terran_defense_rating(state, True) >= 3),
- LocationData("Haven's Fall", "Haven's Fall: East Gas Pickups", SC2WOL_LOC_ID_OFFSET + 710, LocationType.EXTRA,
- lambda state: logic.terran_common_unit(state) and
- logic.terran_competent_anti_air(state) and
- logic.terran_defense_rating(state, True) >= 3),
- LocationData("Haven's Fall", "Haven's Fall: Southeast Gas Pickups", SC2WOL_LOC_ID_OFFSET + 711, LocationType.EXTRA,
- lambda state: logic.terran_common_unit(state) and
- logic.terran_competent_anti_air(state) and
- logic.terran_defense_rating(state, True) >= 3),
- LocationData("Smash and Grab", "Smash and Grab: Victory", SC2WOL_LOC_ID_OFFSET + 800, LocationType.VICTORY,
- lambda state: logic.terran_common_unit(state) and
- (adv_tactics and logic.terran_basic_anti_air(state)
- or logic.terran_competent_anti_air(state))),
- LocationData("Smash and Grab", "Smash and Grab: First Relic", SC2WOL_LOC_ID_OFFSET + 801, LocationType.VANILLA),
- LocationData("Smash and Grab", "Smash and Grab: Second Relic", SC2WOL_LOC_ID_OFFSET + 802, LocationType.VANILLA),
- LocationData("Smash and Grab", "Smash and Grab: Third Relic", SC2WOL_LOC_ID_OFFSET + 803, LocationType.VANILLA,
- lambda state: logic.terran_common_unit(state) and
- (adv_tactics and logic.terran_basic_anti_air(state)
- or logic.terran_competent_anti_air(state))),
- LocationData("Smash and Grab", "Smash and Grab: Fourth Relic", SC2WOL_LOC_ID_OFFSET + 804, LocationType.VANILLA,
- lambda state: logic.terran_common_unit(state) and
- (adv_tactics and logic.terran_basic_anti_air(state)
- or logic.terran_competent_anti_air(state))),
- LocationData("Smash and Grab", "Smash and Grab: First Forcefield Area Busted", SC2WOL_LOC_ID_OFFSET + 805, LocationType.EXTRA,
- lambda state: logic.terran_common_unit(state) and
- (adv_tactics and logic.terran_basic_anti_air(state)
- or logic.terran_competent_anti_air(state))),
- LocationData("Smash and Grab", "Smash and Grab: Second Forcefield Area Busted", SC2WOL_LOC_ID_OFFSET + 806, LocationType.EXTRA,
- lambda state: logic.terran_common_unit(state) and
- (adv_tactics and logic.terran_basic_anti_air(state)
- or logic.terran_competent_anti_air(state))),
- LocationData("The Dig", "The Dig: Victory", SC2WOL_LOC_ID_OFFSET + 900, LocationType.VICTORY,
- lambda state: logic.terran_basic_anti_air(state)
- and logic.terran_defense_rating(state, False, True) >= 8
- and logic.terran_defense_rating(state, False, False) >= 6
- and logic.terran_common_unit(state)
- and (logic.marine_medic_upgrade(state) or adv_tactics)),
- LocationData("The Dig", "The Dig: Left Relic", SC2WOL_LOC_ID_OFFSET + 901, LocationType.VANILLA,
- lambda state: logic.terran_defense_rating(state, False, False) >= 6
- and logic.terran_common_unit(state)
- and (logic.marine_medic_upgrade(state) or adv_tactics)),
- LocationData("The Dig", "The Dig: Right Ground Relic", SC2WOL_LOC_ID_OFFSET + 902, LocationType.VANILLA,
- lambda state: logic.terran_defense_rating(state, False, False) >= 6
- and logic.terran_common_unit(state)
- and (logic.marine_medic_upgrade(state) or adv_tactics)),
- LocationData("The Dig", "The Dig: Right Cliff Relic", SC2WOL_LOC_ID_OFFSET + 903, LocationType.VANILLA,
- lambda state: logic.terran_defense_rating(state, False, False) >= 6
- and logic.terran_common_unit(state)
- and (logic.marine_medic_upgrade(state) or adv_tactics)),
- LocationData("The Dig", "The Dig: Moebius Base", SC2WOL_LOC_ID_OFFSET + 904, LocationType.EXTRA,
- lambda state: logic.marine_medic_upgrade(state) or adv_tactics),
- LocationData("The Dig", "The Dig: Door Outer Layer", SC2WOL_LOC_ID_OFFSET + 905, LocationType.EXTRA,
- lambda state: logic.terran_defense_rating(state, False, False) >= 6
- and logic.terran_common_unit(state)
- and (logic.marine_medic_upgrade(state) or adv_tactics)),
- LocationData("The Dig", "The Dig: Door Thermal Barrier", SC2WOL_LOC_ID_OFFSET + 906, LocationType.EXTRA,
- lambda state: logic.terran_basic_anti_air(state)
- and logic.terran_defense_rating(state, False, True) >= 8
- and logic.terran_defense_rating(state, False, False) >= 6
- and logic.terran_common_unit(state)
- and (logic.marine_medic_upgrade(state) or adv_tactics)),
- LocationData("The Dig", "The Dig: Cutting Through the Core", SC2WOL_LOC_ID_OFFSET + 907, LocationType.EXTRA,
- lambda state: logic.terran_basic_anti_air(state)
- and logic.terran_defense_rating(state, False, True) >= 8
- and logic.terran_defense_rating(state, False, False) >= 6
- and logic.terran_common_unit(state)
- and (logic.marine_medic_upgrade(state) or adv_tactics)),
- LocationData("The Dig", "The Dig: Structure Access Imminent", SC2WOL_LOC_ID_OFFSET + 908, LocationType.EXTRA,
- lambda state: logic.terran_basic_anti_air(state)
- and logic.terran_defense_rating(state, False, True) >= 8
- and logic.terran_defense_rating(state, False, False) >= 6
- and logic.terran_common_unit(state)
- and (logic.marine_medic_upgrade(state) or adv_tactics)),
- LocationData("The Moebius Factor", "The Moebius Factor: Victory", SC2WOL_LOC_ID_OFFSET + 1000, LocationType.VICTORY,
- lambda state: logic.terran_basic_anti_air(state) and
- (logic.terran_air(state)
- or state.has_any({ItemNames.MEDIVAC, ItemNames.HERCULES}, player)
- and logic.terran_common_unit(state))),
- LocationData("The Moebius Factor", "The Moebius Factor: 1st Data Core", SC2WOL_LOC_ID_OFFSET + 1001, LocationType.VANILLA),
- LocationData("The Moebius Factor", "The Moebius Factor: 2nd Data Core", SC2WOL_LOC_ID_OFFSET + 1002, LocationType.VANILLA,
- lambda state: (logic.terran_air(state)
- or state.has_any({ItemNames.MEDIVAC, ItemNames.HERCULES}, player)
- and logic.terran_common_unit(state))),
- LocationData("The Moebius Factor", "The Moebius Factor: South Rescue", SC2WOL_LOC_ID_OFFSET + 1003, LocationType.EXTRA,
- lambda state: logic.terran_can_rescue(state)),
- LocationData("The Moebius Factor", "The Moebius Factor: Wall Rescue", SC2WOL_LOC_ID_OFFSET + 1004, LocationType.EXTRA,
- lambda state: logic.terran_can_rescue(state)),
- LocationData("The Moebius Factor", "The Moebius Factor: Mid Rescue", SC2WOL_LOC_ID_OFFSET + 1005, LocationType.EXTRA,
- lambda state: logic.terran_can_rescue(state)),
- LocationData("The Moebius Factor", "The Moebius Factor: Nydus Roof Rescue", SC2WOL_LOC_ID_OFFSET + 1006, LocationType.EXTRA,
- lambda state: logic.terran_can_rescue(state)),
- LocationData("The Moebius Factor", "The Moebius Factor: Alive Inside Rescue", SC2WOL_LOC_ID_OFFSET + 1007, LocationType.EXTRA,
- lambda state: logic.terran_can_rescue(state)),
- LocationData("The Moebius Factor", "The Moebius Factor: Brutalisk", SC2WOL_LOC_ID_OFFSET + 1008, LocationType.VANILLA,
- lambda state: logic.terran_basic_anti_air(state) and
- (logic.terran_air(state)
- or state.has_any({ItemNames.MEDIVAC, ItemNames.HERCULES}, player)
- and logic.terran_common_unit(state))),
- LocationData("The Moebius Factor", "The Moebius Factor: 3rd Data Core", SC2WOL_LOC_ID_OFFSET + 1009, LocationType.VANILLA,
- lambda state: logic.terran_basic_anti_air(state) and
- (logic.terran_air(state)
- or state.has_any({ItemNames.MEDIVAC, ItemNames.HERCULES}, player)
- and logic.terran_common_unit(state))),
- LocationData("Supernova", "Supernova: Victory", SC2WOL_LOC_ID_OFFSET + 1100, LocationType.VICTORY,
- lambda state: logic.terran_beats_protoss_deathball(state)),
- LocationData("Supernova", "Supernova: West Relic", SC2WOL_LOC_ID_OFFSET + 1101, LocationType.VANILLA),
- LocationData("Supernova", "Supernova: North Relic", SC2WOL_LOC_ID_OFFSET + 1102, LocationType.VANILLA),
- LocationData("Supernova", "Supernova: South Relic", SC2WOL_LOC_ID_OFFSET + 1103, LocationType.VANILLA,
- lambda state: logic.terran_beats_protoss_deathball(state)),
- LocationData("Supernova", "Supernova: East Relic", SC2WOL_LOC_ID_OFFSET + 1104, LocationType.VANILLA,
- lambda state: logic.terran_beats_protoss_deathball(state)),
- LocationData("Supernova", "Supernova: Landing Zone Cleared", SC2WOL_LOC_ID_OFFSET + 1105, LocationType.EXTRA),
- LocationData("Supernova", "Supernova: Middle Base", SC2WOL_LOC_ID_OFFSET + 1106, LocationType.EXTRA,
- lambda state: logic.terran_beats_protoss_deathball(state)),
- LocationData("Supernova", "Supernova: Southeast Base", SC2WOL_LOC_ID_OFFSET + 1107, LocationType.EXTRA,
- lambda state: logic.terran_beats_protoss_deathball(state)),
- LocationData("Maw of the Void", "Maw of the Void: Victory", SC2WOL_LOC_ID_OFFSET + 1200, LocationType.VICTORY,
- lambda state: logic.terran_survives_rip_field(state)),
- LocationData("Maw of the Void", "Maw of the Void: Landing Zone Cleared", SC2WOL_LOC_ID_OFFSET + 1201, LocationType.EXTRA),
- LocationData("Maw of the Void", "Maw of the Void: Expansion Prisoners", SC2WOL_LOC_ID_OFFSET + 1202, LocationType.VANILLA,
- lambda state: adv_tactics or logic.terran_survives_rip_field(state)),
- LocationData("Maw of the Void", "Maw of the Void: South Close Prisoners", SC2WOL_LOC_ID_OFFSET + 1203, LocationType.VANILLA,
- lambda state: adv_tactics or logic.terran_survives_rip_field(state)),
- LocationData("Maw of the Void", "Maw of the Void: South Far Prisoners", SC2WOL_LOC_ID_OFFSET + 1204, LocationType.VANILLA,
- lambda state: logic.terran_survives_rip_field(state)),
- LocationData("Maw of the Void", "Maw of the Void: North Prisoners", SC2WOL_LOC_ID_OFFSET + 1205, LocationType.VANILLA,
- lambda state: logic.terran_survives_rip_field(state)),
- LocationData("Maw of the Void", "Maw of the Void: Mothership", SC2WOL_LOC_ID_OFFSET + 1206, LocationType.EXTRA,
- lambda state: logic.terran_survives_rip_field(state)),
- LocationData("Maw of the Void", "Maw of the Void: Expansion Rip Field Generator", SC2WOL_LOC_ID_OFFSET + 1207, LocationType.EXTRA,
- lambda state: adv_tactics or logic.terran_survives_rip_field(state)),
- LocationData("Maw of the Void", "Maw of the Void: Middle Rip Field Generator", SC2WOL_LOC_ID_OFFSET + 1208, LocationType.EXTRA,
- lambda state: logic.terran_survives_rip_field(state)),
- LocationData("Maw of the Void", "Maw of the Void: Southeast Rip Field Generator", SC2WOL_LOC_ID_OFFSET + 1209, LocationType.EXTRA,
- lambda state: logic.terran_survives_rip_field(state)),
- LocationData("Maw of the Void", "Maw of the Void: Stargate Rip Field Generator", SC2WOL_LOC_ID_OFFSET + 1210, LocationType.EXTRA,
- lambda state: logic.terran_survives_rip_field(state)),
- LocationData("Maw of the Void", "Maw of the Void: Northwest Rip Field Generator", SC2WOL_LOC_ID_OFFSET + 1211, LocationType.CHALLENGE,
- lambda state: logic.terran_survives_rip_field(state)),
- LocationData("Maw of the Void", "Maw of the Void: West Rip Field Generator", SC2WOL_LOC_ID_OFFSET + 1212, LocationType.CHALLENGE,
- lambda state: logic.terran_survives_rip_field(state)),
- LocationData("Maw of the Void", "Maw of the Void: Southwest Rip Field Generator", SC2WOL_LOC_ID_OFFSET + 1213, LocationType.CHALLENGE,
- lambda state: logic.terran_survives_rip_field(state)),
- LocationData("Devil's Playground", "Devil's Playground: Victory", SC2WOL_LOC_ID_OFFSET + 1300, LocationType.VICTORY,
- lambda state: adv_tactics or
- logic.terran_basic_anti_air(state) and (
- logic.terran_common_unit(state) or state.has(ItemNames.REAPER, player))),
- LocationData("Devil's Playground", "Devil's Playground: Tosh's Miners", SC2WOL_LOC_ID_OFFSET + 1301, LocationType.VANILLA),
- LocationData("Devil's Playground", "Devil's Playground: Brutalisk", SC2WOL_LOC_ID_OFFSET + 1302, LocationType.VANILLA,
- lambda state: adv_tactics or logic.terran_common_unit(state) or state.has(ItemNames.REAPER, player)),
- LocationData("Devil's Playground", "Devil's Playground: North Reapers", SC2WOL_LOC_ID_OFFSET + 1303, LocationType.EXTRA),
- LocationData("Devil's Playground", "Devil's Playground: Middle Reapers", SC2WOL_LOC_ID_OFFSET + 1304, LocationType.EXTRA,
- lambda state: adv_tactics or logic.terran_common_unit(state) or state.has(ItemNames.REAPER, player)),
- LocationData("Devil's Playground", "Devil's Playground: Southwest Reapers", SC2WOL_LOC_ID_OFFSET + 1305, LocationType.EXTRA,
- lambda state: adv_tactics or logic.terran_common_unit(state) or state.has(ItemNames.REAPER, player)),
- LocationData("Devil's Playground", "Devil's Playground: Southeast Reapers", SC2WOL_LOC_ID_OFFSET + 1306, LocationType.EXTRA,
- lambda state: adv_tactics or
- logic.terran_basic_anti_air(state) and (
- logic.terran_common_unit(state) or state.has(ItemNames.REAPER, player))),
- LocationData("Devil's Playground", "Devil's Playground: East Reapers", SC2WOL_LOC_ID_OFFSET + 1307, LocationType.CHALLENGE,
- lambda state: logic.terran_basic_anti_air(state) and
- (adv_tactics or
- logic.terran_common_unit(state) or state.has(ItemNames.REAPER, player))),
- LocationData("Devil's Playground", "Devil's Playground: Zerg Cleared", SC2WOL_LOC_ID_OFFSET + 1308, LocationType.CHALLENGE,
- lambda state: logic.terran_competent_anti_air(state) and (
- logic.terran_common_unit(state) or state.has(ItemNames.REAPER, player))),
- LocationData("Welcome to the Jungle", "Welcome to the Jungle: Victory", SC2WOL_LOC_ID_OFFSET + 1400, LocationType.VICTORY,
- lambda state: logic.welcome_to_the_jungle_requirement(state)),
- LocationData("Welcome to the Jungle", "Welcome to the Jungle: Close Relic", SC2WOL_LOC_ID_OFFSET + 1401, LocationType.VANILLA),
- LocationData("Welcome to the Jungle", "Welcome to the Jungle: West Relic", SC2WOL_LOC_ID_OFFSET + 1402, LocationType.VANILLA,
- lambda state: logic.welcome_to_the_jungle_requirement(state)),
- LocationData("Welcome to the Jungle", "Welcome to the Jungle: North-East Relic", SC2WOL_LOC_ID_OFFSET + 1403, LocationType.VANILLA,
- lambda state: logic.welcome_to_the_jungle_requirement(state)),
- LocationData("Welcome to the Jungle", "Welcome to the Jungle: Middle Base", SC2WOL_LOC_ID_OFFSET + 1404, LocationType.EXTRA,
- lambda state: logic.welcome_to_the_jungle_requirement(state)),
- LocationData("Welcome to the Jungle", "Welcome to the Jungle: Main Base", SC2WOL_LOC_ID_OFFSET + 1405,
- LocationType.MASTERY,
- lambda state: logic.welcome_to_the_jungle_requirement(state)
- and logic.terran_beats_protoss_deathball(state)
- and logic.terran_base_trasher(state)),
- LocationData("Welcome to the Jungle", "Welcome to the Jungle: No Terrazine Nodes Sealed", SC2WOL_LOC_ID_OFFSET + 1406, LocationType.CHALLENGE,
- lambda state: logic.welcome_to_the_jungle_requirement(state)
- and logic.terran_competent_ground_to_air(state)
- and logic.terran_beats_protoss_deathball(state)),
- LocationData("Welcome to the Jungle", "Welcome to the Jungle: Up to 1 Terrazine Node Sealed", SC2WOL_LOC_ID_OFFSET + 1407, LocationType.CHALLENGE,
- lambda state: logic.welcome_to_the_jungle_requirement(state)
- and logic.terran_competent_ground_to_air(state)
- and logic.terran_beats_protoss_deathball(state)),
- LocationData("Welcome to the Jungle", "Welcome to the Jungle: Up to 2 Terrazine Nodes Sealed", SC2WOL_LOC_ID_OFFSET + 1408, LocationType.CHALLENGE,
- lambda state: logic.welcome_to_the_jungle_requirement(state)
- and logic.terran_beats_protoss_deathball(state)),
- LocationData("Welcome to the Jungle", "Welcome to the Jungle: Up to 3 Terrazine Nodes Sealed", SC2WOL_LOC_ID_OFFSET + 1409, LocationType.CHALLENGE,
- lambda state: logic.welcome_to_the_jungle_requirement(state)
- and logic.terran_competent_comp(state)),
- LocationData("Welcome to the Jungle", "Welcome to the Jungle: Up to 4 Terrazine Nodes Sealed", SC2WOL_LOC_ID_OFFSET + 1410, LocationType.EXTRA,
- lambda state: logic.welcome_to_the_jungle_requirement(state)),
- LocationData("Welcome to the Jungle", "Welcome to the Jungle: Up to 5 Terrazine Nodes Sealed", SC2WOL_LOC_ID_OFFSET + 1411, LocationType.EXTRA,
- lambda state: logic.welcome_to_the_jungle_requirement(state)),
- LocationData("Breakout", "Breakout: Victory", SC2WOL_LOC_ID_OFFSET + 1500, LocationType.VICTORY),
- LocationData("Breakout", "Breakout: Diamondback Prison", SC2WOL_LOC_ID_OFFSET + 1501, LocationType.VANILLA),
- LocationData("Breakout", "Breakout: Siege Tank Prison", SC2WOL_LOC_ID_OFFSET + 1502, LocationType.VANILLA),
- LocationData("Breakout", "Breakout: First Checkpoint", SC2WOL_LOC_ID_OFFSET + 1503, LocationType.EXTRA),
- LocationData("Breakout", "Breakout: Second Checkpoint", SC2WOL_LOC_ID_OFFSET + 1504, LocationType.EXTRA),
- LocationData("Ghost of a Chance", "Ghost of a Chance: Victory", SC2WOL_LOC_ID_OFFSET + 1600, LocationType.VICTORY),
- LocationData("Ghost of a Chance", "Ghost of a Chance: Terrazine Tank", SC2WOL_LOC_ID_OFFSET + 1601, LocationType.EXTRA),
- LocationData("Ghost of a Chance", "Ghost of a Chance: Jorium Stockpile", SC2WOL_LOC_ID_OFFSET + 1602, LocationType.EXTRA),
- LocationData("Ghost of a Chance", "Ghost of a Chance: First Island Spectres", SC2WOL_LOC_ID_OFFSET + 1603, LocationType.VANILLA),
- LocationData("Ghost of a Chance", "Ghost of a Chance: Second Island Spectres", SC2WOL_LOC_ID_OFFSET + 1604, LocationType.VANILLA),
- LocationData("Ghost of a Chance", "Ghost of a Chance: Third Island Spectres", SC2WOL_LOC_ID_OFFSET + 1605, LocationType.VANILLA),
- LocationData("The Great Train Robbery", "The Great Train Robbery: Victory", SC2WOL_LOC_ID_OFFSET + 1700, LocationType.VICTORY,
- lambda state: logic.great_train_robbery_train_stopper(state) and
- logic.terran_basic_anti_air(state)),
- LocationData("The Great Train Robbery", "The Great Train Robbery: North Defiler", SC2WOL_LOC_ID_OFFSET + 1701, LocationType.VANILLA),
- LocationData("The Great Train Robbery", "The Great Train Robbery: Mid Defiler", SC2WOL_LOC_ID_OFFSET + 1702, LocationType.VANILLA),
- LocationData("The Great Train Robbery", "The Great Train Robbery: South Defiler", SC2WOL_LOC_ID_OFFSET + 1703, LocationType.VANILLA),
- LocationData("The Great Train Robbery", "The Great Train Robbery: Close Diamondback", SC2WOL_LOC_ID_OFFSET + 1704, LocationType.EXTRA),
- LocationData("The Great Train Robbery", "The Great Train Robbery: Northwest Diamondback", SC2WOL_LOC_ID_OFFSET + 1705, LocationType.EXTRA),
- LocationData("The Great Train Robbery", "The Great Train Robbery: North Diamondback", SC2WOL_LOC_ID_OFFSET + 1706, LocationType.EXTRA),
- LocationData("The Great Train Robbery", "The Great Train Robbery: Northeast Diamondback", SC2WOL_LOC_ID_OFFSET + 1707, LocationType.EXTRA),
- LocationData("The Great Train Robbery", "The Great Train Robbery: Southwest Diamondback", SC2WOL_LOC_ID_OFFSET + 1708, LocationType.EXTRA),
- LocationData("The Great Train Robbery", "The Great Train Robbery: Southeast Diamondback", SC2WOL_LOC_ID_OFFSET + 1709, LocationType.EXTRA),
- LocationData("The Great Train Robbery", "The Great Train Robbery: Kill Team", SC2WOL_LOC_ID_OFFSET + 1710, LocationType.CHALLENGE,
- lambda state: (adv_tactics or logic.terran_common_unit(state)) and
- logic.great_train_robbery_train_stopper(state) and
- logic.terran_basic_anti_air(state)),
- LocationData("The Great Train Robbery", "The Great Train Robbery: Flawless", SC2WOL_LOC_ID_OFFSET + 1711, LocationType.CHALLENGE,
- lambda state: logic.great_train_robbery_train_stopper(state) and
- logic.terran_basic_anti_air(state)),
- LocationData("The Great Train Robbery", "The Great Train Robbery: 2 Trains Destroyed", SC2WOL_LOC_ID_OFFSET + 1712, LocationType.EXTRA,
- lambda state: logic.great_train_robbery_train_stopper(state)),
- LocationData("The Great Train Robbery", "The Great Train Robbery: 4 Trains Destroyed", SC2WOL_LOC_ID_OFFSET + 1713, LocationType.EXTRA,
- lambda state: logic.great_train_robbery_train_stopper(state) and
- logic.terran_basic_anti_air(state)),
- LocationData("The Great Train Robbery", "The Great Train Robbery: 6 Trains Destroyed", SC2WOL_LOC_ID_OFFSET + 1714, LocationType.EXTRA,
- lambda state: logic.great_train_robbery_train_stopper(state) and
- logic.terran_basic_anti_air(state)),
- LocationData("Cutthroat", "Cutthroat: Victory", SC2WOL_LOC_ID_OFFSET + 1800, LocationType.VICTORY,
- lambda state: logic.terran_common_unit(state) and
- (adv_tactics or logic.terran_basic_anti_air)),
- LocationData("Cutthroat", "Cutthroat: Mira Han", SC2WOL_LOC_ID_OFFSET + 1801, LocationType.EXTRA,
- lambda state: logic.terran_common_unit(state)),
- LocationData("Cutthroat", "Cutthroat: North Relic", SC2WOL_LOC_ID_OFFSET + 1802, LocationType.VANILLA,
- lambda state: logic.terran_common_unit(state)),
- LocationData("Cutthroat", "Cutthroat: Mid Relic", SC2WOL_LOC_ID_OFFSET + 1803, LocationType.VANILLA),
- LocationData("Cutthroat", "Cutthroat: Southwest Relic", SC2WOL_LOC_ID_OFFSET + 1804, LocationType.VANILLA,
- lambda state: logic.terran_common_unit(state)),
- LocationData("Cutthroat", "Cutthroat: North Command Center", SC2WOL_LOC_ID_OFFSET + 1805, LocationType.EXTRA,
- lambda state: logic.terran_common_unit(state)),
- LocationData("Cutthroat", "Cutthroat: South Command Center", SC2WOL_LOC_ID_OFFSET + 1806, LocationType.EXTRA,
- lambda state: logic.terran_common_unit(state)),
- LocationData("Cutthroat", "Cutthroat: West Command Center", SC2WOL_LOC_ID_OFFSET + 1807, LocationType.EXTRA,
- lambda state: logic.terran_common_unit(state)),
- LocationData("Engine of Destruction", "Engine of Destruction: Victory", SC2WOL_LOC_ID_OFFSET + 1900, LocationType.VICTORY,
- lambda state: logic.engine_of_destruction_requirement(state)),
- LocationData("Engine of Destruction", "Engine of Destruction: Odin", SC2WOL_LOC_ID_OFFSET + 1901, LocationType.EXTRA,
- lambda state: logic.marine_medic_upgrade(state)),
- LocationData("Engine of Destruction", "Engine of Destruction: Loki", SC2WOL_LOC_ID_OFFSET + 1902,
- LocationType.CHALLENGE,
- lambda state: logic.engine_of_destruction_requirement(state)),
- LocationData("Engine of Destruction", "Engine of Destruction: Lab Devourer", SC2WOL_LOC_ID_OFFSET + 1903, LocationType.VANILLA,
- lambda state: logic.marine_medic_upgrade(state)),
- LocationData("Engine of Destruction", "Engine of Destruction: North Devourer", SC2WOL_LOC_ID_OFFSET + 1904, LocationType.VANILLA,
- lambda state: logic.engine_of_destruction_requirement(state)),
- LocationData("Engine of Destruction", "Engine of Destruction: Southeast Devourer", SC2WOL_LOC_ID_OFFSET + 1905, LocationType.VANILLA,
- lambda state: logic.engine_of_destruction_requirement(state)),
- LocationData("Engine of Destruction", "Engine of Destruction: West Base", SC2WOL_LOC_ID_OFFSET + 1906, LocationType.EXTRA,
- lambda state: logic.engine_of_destruction_requirement(state)),
- LocationData("Engine of Destruction", "Engine of Destruction: Northwest Base", SC2WOL_LOC_ID_OFFSET + 1907, LocationType.EXTRA,
- lambda state: logic.engine_of_destruction_requirement(state)),
- LocationData("Engine of Destruction", "Engine of Destruction: Northeast Base", SC2WOL_LOC_ID_OFFSET + 1908, LocationType.EXTRA,
- lambda state: logic.engine_of_destruction_requirement(state)),
- LocationData("Engine of Destruction", "Engine of Destruction: Southeast Base", SC2WOL_LOC_ID_OFFSET + 1909, LocationType.EXTRA,
- lambda state: logic.engine_of_destruction_requirement(state)),
- LocationData("Media Blitz", "Media Blitz: Victory", SC2WOL_LOC_ID_OFFSET + 2000, LocationType.VICTORY,
- lambda state: logic.terran_competent_comp(state)),
- LocationData("Media Blitz", "Media Blitz: Tower 1", SC2WOL_LOC_ID_OFFSET + 2001, LocationType.VANILLA,
- lambda state: logic.terran_competent_comp(state)),
- LocationData("Media Blitz", "Media Blitz: Tower 2", SC2WOL_LOC_ID_OFFSET + 2002, LocationType.VANILLA,
- lambda state: logic.terran_competent_comp(state)),
- LocationData("Media Blitz", "Media Blitz: Tower 3", SC2WOL_LOC_ID_OFFSET + 2003, LocationType.VANILLA,
- lambda state: logic.terran_competent_comp(state)),
- LocationData("Media Blitz", "Media Blitz: Science Facility", SC2WOL_LOC_ID_OFFSET + 2004, LocationType.VANILLA),
- LocationData("Media Blitz", "Media Blitz: All Barracks", SC2WOL_LOC_ID_OFFSET + 2005, LocationType.EXTRA,
- lambda state: logic.terran_competent_comp(state)),
- LocationData("Media Blitz", "Media Blitz: All Factories", SC2WOL_LOC_ID_OFFSET + 2006, LocationType.EXTRA,
- lambda state: logic.terran_competent_comp(state)),
- LocationData("Media Blitz", "Media Blitz: All Starports", SC2WOL_LOC_ID_OFFSET + 2007, LocationType.EXTRA,
- lambda state: adv_tactics or logic.terran_competent_comp(state)),
- LocationData("Media Blitz", "Media Blitz: Odin Not Trashed", SC2WOL_LOC_ID_OFFSET + 2008, LocationType.CHALLENGE,
- lambda state: logic.terran_competent_comp(state)),
- LocationData("Media Blitz", "Media Blitz: Surprise Attack Ends", SC2WOL_LOC_ID_OFFSET + 2009, LocationType.EXTRA),
- LocationData("Piercing the Shroud", "Piercing the Shroud: Victory", SC2WOL_LOC_ID_OFFSET + 2100, LocationType.VICTORY,
- lambda state: logic.marine_medic_upgrade(state)),
- LocationData("Piercing the Shroud", "Piercing the Shroud: Holding Cell Relic", SC2WOL_LOC_ID_OFFSET + 2101, LocationType.VANILLA),
- LocationData("Piercing the Shroud", "Piercing the Shroud: Brutalisk Relic", SC2WOL_LOC_ID_OFFSET + 2102, LocationType.VANILLA,
- lambda state: logic.marine_medic_upgrade(state)),
- LocationData("Piercing the Shroud", "Piercing the Shroud: First Escape Relic", SC2WOL_LOC_ID_OFFSET + 2103, LocationType.VANILLA,
- lambda state: logic.marine_medic_upgrade(state)),
- LocationData("Piercing the Shroud", "Piercing the Shroud: Second Escape Relic", SC2WOL_LOC_ID_OFFSET + 2104, LocationType.VANILLA,
- lambda state: logic.marine_medic_upgrade(state)),
- LocationData("Piercing the Shroud", "Piercing the Shroud: Brutalisk", SC2WOL_LOC_ID_OFFSET + 2105, LocationType.VANILLA,
- lambda state: logic.marine_medic_upgrade(state)),
- LocationData("Piercing the Shroud", "Piercing the Shroud: Fusion Reactor", SC2WOL_LOC_ID_OFFSET + 2106, LocationType.EXTRA,
- lambda state: logic.marine_medic_upgrade(state)),
- LocationData("Piercing the Shroud", "Piercing the Shroud: Entrance Holding Pen", SC2WOL_LOC_ID_OFFSET + 2107, LocationType.EXTRA),
- LocationData("Piercing the Shroud", "Piercing the Shroud: Cargo Bay Warbot", SC2WOL_LOC_ID_OFFSET + 2108, LocationType.EXTRA),
- LocationData("Piercing the Shroud", "Piercing the Shroud: Escape Warbot", SC2WOL_LOC_ID_OFFSET + 2109, LocationType.EXTRA,
- lambda state: logic.marine_medic_upgrade(state)),
- LocationData("Whispers of Doom", "Whispers of Doom: Victory", SC2WOL_LOC_ID_OFFSET + 2200, LocationType.VICTORY),
- LocationData("Whispers of Doom", "Whispers of Doom: First Hatchery", SC2WOL_LOC_ID_OFFSET + 2201, LocationType.VANILLA),
- LocationData("Whispers of Doom", "Whispers of Doom: Second Hatchery", SC2WOL_LOC_ID_OFFSET + 2202, LocationType.VANILLA),
- LocationData("Whispers of Doom", "Whispers of Doom: Third Hatchery", SC2WOL_LOC_ID_OFFSET + 2203, LocationType.VANILLA),
- LocationData("Whispers of Doom", "Whispers of Doom: First Prophecy Fragment", SC2WOL_LOC_ID_OFFSET + 2204, LocationType.EXTRA),
- LocationData("Whispers of Doom", "Whispers of Doom: Second Prophecy Fragment", SC2WOL_LOC_ID_OFFSET + 2205, LocationType.EXTRA),
- LocationData("Whispers of Doom", "Whispers of Doom: Third Prophecy Fragment", SC2WOL_LOC_ID_OFFSET + 2206, LocationType.EXTRA),
- LocationData("A Sinister Turn", "A Sinister Turn: Victory", SC2WOL_LOC_ID_OFFSET + 2300, LocationType.VICTORY,
- lambda state: logic.protoss_common_unit(state) and logic.protoss_competent_anti_air(state)),
- LocationData("A Sinister Turn", "A Sinister Turn: Robotics Facility", SC2WOL_LOC_ID_OFFSET + 2301, LocationType.VANILLA,
- lambda state: adv_tactics or logic.protoss_common_unit(state)),
- LocationData("A Sinister Turn", "A Sinister Turn: Dark Shrine", SC2WOL_LOC_ID_OFFSET + 2302, LocationType.VANILLA,
- lambda state: adv_tactics or logic.protoss_common_unit(state)),
- LocationData("A Sinister Turn", "A Sinister Turn: Templar Archives", SC2WOL_LOC_ID_OFFSET + 2303, LocationType.VANILLA,
- lambda state: logic.protoss_common_unit(state) and logic.protoss_competent_anti_air(state)),
- LocationData("A Sinister Turn", "A Sinister Turn: Northeast Base", SC2WOL_LOC_ID_OFFSET + 2304, LocationType.EXTRA,
- lambda state: logic.protoss_common_unit(state) and logic.protoss_competent_anti_air(state)),
- LocationData("A Sinister Turn", "A Sinister Turn: Southwest Base", SC2WOL_LOC_ID_OFFSET + 2305, LocationType.CHALLENGE,
- lambda state: logic.protoss_common_unit(state) and logic.protoss_competent_anti_air(state)),
- LocationData("A Sinister Turn", "A Sinister Turn: Maar", SC2WOL_LOC_ID_OFFSET + 2306, LocationType.EXTRA,
- lambda state: logic.protoss_common_unit(state)),
- LocationData("A Sinister Turn", "A Sinister Turn: Northwest Preserver", SC2WOL_LOC_ID_OFFSET + 2307, LocationType.EXTRA,
- lambda state: logic.protoss_common_unit(state) and logic.protoss_competent_anti_air(state)),
- LocationData("A Sinister Turn", "A Sinister Turn: Southwest Preserver", SC2WOL_LOC_ID_OFFSET + 2308, LocationType.EXTRA,
- lambda state: logic.protoss_common_unit(state) and logic.protoss_competent_anti_air(state)),
- LocationData("A Sinister Turn", "A Sinister Turn: East Preserver", SC2WOL_LOC_ID_OFFSET + 2309, LocationType.EXTRA,
- lambda state: logic.protoss_common_unit(state) and logic.protoss_competent_anti_air(state)),
- LocationData("Echoes of the Future", "Echoes of the Future: Victory", SC2WOL_LOC_ID_OFFSET + 2400, LocationType.VICTORY,
- lambda state: adv_tactics and logic.protoss_static_defense(state) or logic.protoss_common_unit(state) and logic.protoss_competent_anti_air(state)),
- LocationData("Echoes of the Future", "Echoes of the Future: Close Obelisk", SC2WOL_LOC_ID_OFFSET + 2401, LocationType.VANILLA),
- LocationData("Echoes of the Future", "Echoes of the Future: West Obelisk", SC2WOL_LOC_ID_OFFSET + 2402, LocationType.VANILLA,
- lambda state: adv_tactics and logic.protoss_static_defense(state) or logic.protoss_common_unit(state)),
- LocationData("Echoes of the Future", "Echoes of the Future: Base", SC2WOL_LOC_ID_OFFSET + 2403, LocationType.EXTRA),
- LocationData("Echoes of the Future", "Echoes of the Future: Southwest Tendril", SC2WOL_LOC_ID_OFFSET + 2404, LocationType.EXTRA),
- LocationData("Echoes of the Future", "Echoes of the Future: Southeast Tendril", SC2WOL_LOC_ID_OFFSET + 2405, LocationType.EXTRA,
- lambda state: adv_tactics and logic.protoss_static_defense(state) or logic.protoss_common_unit(state)),
- LocationData("Echoes of the Future", "Echoes of the Future: Northeast Tendril", SC2WOL_LOC_ID_OFFSET + 2406, LocationType.EXTRA,
- lambda state: adv_tactics and logic.protoss_static_defense(state) or logic.protoss_common_unit(state)),
- LocationData("Echoes of the Future", "Echoes of the Future: Northwest Tendril", SC2WOL_LOC_ID_OFFSET + 2407, LocationType.EXTRA,
- lambda state: adv_tactics and logic.protoss_static_defense(state) or logic.protoss_common_unit(state)),
- LocationData("In Utter Darkness", "In Utter Darkness: Defeat", SC2WOL_LOC_ID_OFFSET + 2500, LocationType.VICTORY),
- LocationData("In Utter Darkness", "In Utter Darkness: Protoss Archive", SC2WOL_LOC_ID_OFFSET + 2501, LocationType.VANILLA,
- lambda state: logic.last_stand_requirement(state)),
- LocationData("In Utter Darkness", "In Utter Darkness: Kills", SC2WOL_LOC_ID_OFFSET + 2502, LocationType.VANILLA,
- lambda state: logic.last_stand_requirement(state)),
- LocationData("In Utter Darkness", "In Utter Darkness: Urun", SC2WOL_LOC_ID_OFFSET + 2503, LocationType.EXTRA),
- LocationData("In Utter Darkness", "In Utter Darkness: Mohandar", SC2WOL_LOC_ID_OFFSET + 2504, LocationType.EXTRA,
- lambda state: logic.last_stand_requirement(state)),
- LocationData("In Utter Darkness", "In Utter Darkness: Selendis", SC2WOL_LOC_ID_OFFSET + 2505, LocationType.EXTRA,
- lambda state: logic.last_stand_requirement(state)),
- LocationData("In Utter Darkness", "In Utter Darkness: Artanis", SC2WOL_LOC_ID_OFFSET + 2506, LocationType.EXTRA,
- lambda state: logic.last_stand_requirement(state)),
- LocationData("Gates of Hell", "Gates of Hell: Victory", SC2WOL_LOC_ID_OFFSET + 2600, LocationType.VICTORY,
- lambda state: logic.terran_competent_comp(state) and
- logic.terran_defense_rating(state, True) > 6),
- LocationData("Gates of Hell", "Gates of Hell: Large Army", SC2WOL_LOC_ID_OFFSET + 2601, LocationType.VANILLA,
- lambda state: logic.terran_competent_comp(state) and
- logic.terran_defense_rating(state, True) > 6),
- LocationData("Gates of Hell", "Gates of Hell: 2 Drop Pods", SC2WOL_LOC_ID_OFFSET + 2602, LocationType.VANILLA,
- lambda state: logic.terran_competent_comp(state) and
- logic.terran_defense_rating(state, True) > 6),
- LocationData("Gates of Hell", "Gates of Hell: 4 Drop Pods", SC2WOL_LOC_ID_OFFSET + 2603, LocationType.VANILLA,
- lambda state: logic.terran_competent_comp(state) and
- logic.terran_defense_rating(state, True) > 6),
- LocationData("Gates of Hell", "Gates of Hell: 6 Drop Pods", SC2WOL_LOC_ID_OFFSET + 2604, LocationType.EXTRA,
- lambda state: logic.terran_competent_comp(state) and
- logic.terran_defense_rating(state, True) > 6),
- LocationData("Gates of Hell", "Gates of Hell: 8 Drop Pods", SC2WOL_LOC_ID_OFFSET + 2605, LocationType.CHALLENGE,
- lambda state: logic.terran_competent_comp(state) and
- logic.terran_defense_rating(state, True) > 6),
- LocationData("Gates of Hell", "Gates of Hell: Southwest Spore Cannon", SC2WOL_LOC_ID_OFFSET + 2606, LocationType.EXTRA,
- lambda state: logic.terran_competent_comp(state) and
- logic.terran_defense_rating(state, True) > 6),
- LocationData("Gates of Hell", "Gates of Hell: Northwest Spore Cannon", SC2WOL_LOC_ID_OFFSET + 2607, LocationType.EXTRA,
- lambda state: logic.terran_competent_comp(state) and
- logic.terran_defense_rating(state, True) > 6),
- LocationData("Gates of Hell", "Gates of Hell: Northeast Spore Cannon", SC2WOL_LOC_ID_OFFSET + 2608, LocationType.EXTRA,
- lambda state: logic.terran_competent_comp(state) and
- logic.terran_defense_rating(state, True) > 6),
- LocationData("Gates of Hell", "Gates of Hell: East Spore Cannon", SC2WOL_LOC_ID_OFFSET + 2609, LocationType.EXTRA,
- lambda state: logic.terran_competent_comp(state) and
- logic.terran_defense_rating(state, True) > 6),
- LocationData("Gates of Hell", "Gates of Hell: Southeast Spore Cannon", SC2WOL_LOC_ID_OFFSET + 2610, LocationType.EXTRA,
- lambda state: logic.terran_competent_comp(state) and
- logic.terran_defense_rating(state, True) > 6),
- LocationData("Gates of Hell", "Gates of Hell: Expansion Spore Cannon", SC2WOL_LOC_ID_OFFSET + 2611, LocationType.EXTRA,
- lambda state: logic.terran_competent_comp(state) and
- logic.terran_defense_rating(state, True) > 6),
- LocationData("Belly of the Beast", "Belly of the Beast: Victory", SC2WOL_LOC_ID_OFFSET + 2700, LocationType.VICTORY),
- LocationData("Belly of the Beast", "Belly of the Beast: First Charge", SC2WOL_LOC_ID_OFFSET + 2701, LocationType.EXTRA),
- LocationData("Belly of the Beast", "Belly of the Beast: Second Charge", SC2WOL_LOC_ID_OFFSET + 2702, LocationType.EXTRA),
- LocationData("Belly of the Beast", "Belly of the Beast: Third Charge", SC2WOL_LOC_ID_OFFSET + 2703, LocationType.EXTRA),
- LocationData("Belly of the Beast", "Belly of the Beast: First Group Rescued", SC2WOL_LOC_ID_OFFSET + 2704, LocationType.VANILLA),
- LocationData("Belly of the Beast", "Belly of the Beast: Second Group Rescued", SC2WOL_LOC_ID_OFFSET + 2705, LocationType.VANILLA),
- LocationData("Belly of the Beast", "Belly of the Beast: Third Group Rescued", SC2WOL_LOC_ID_OFFSET + 2706, LocationType.VANILLA),
- LocationData("Shatter the Sky", "Shatter the Sky: Victory", SC2WOL_LOC_ID_OFFSET + 2800, LocationType.VICTORY,
- lambda state: logic.terran_competent_comp(state)),
- LocationData("Shatter the Sky", "Shatter the Sky: Close Coolant Tower", SC2WOL_LOC_ID_OFFSET + 2801, LocationType.VANILLA,
- lambda state: logic.terran_competent_comp(state)),
- LocationData("Shatter the Sky", "Shatter the Sky: Northwest Coolant Tower", SC2WOL_LOC_ID_OFFSET + 2802, LocationType.VANILLA,
- lambda state: logic.terran_competent_comp(state)),
- LocationData("Shatter the Sky", "Shatter the Sky: Southeast Coolant Tower", SC2WOL_LOC_ID_OFFSET + 2803, LocationType.VANILLA,
- lambda state: logic.terran_competent_comp(state)),
- LocationData("Shatter the Sky", "Shatter the Sky: Southwest Coolant Tower", SC2WOL_LOC_ID_OFFSET + 2804, LocationType.VANILLA,
- lambda state: logic.terran_competent_comp(state)),
- LocationData("Shatter the Sky", "Shatter the Sky: Leviathan", SC2WOL_LOC_ID_OFFSET + 2805, LocationType.VANILLA,
- lambda state: logic.terran_competent_comp(state)),
- LocationData("Shatter the Sky", "Shatter the Sky: East Hatchery", SC2WOL_LOC_ID_OFFSET + 2806, LocationType.EXTRA,
- lambda state: logic.terran_competent_comp(state)),
- LocationData("Shatter the Sky", "Shatter the Sky: North Hatchery", SC2WOL_LOC_ID_OFFSET + 2807, LocationType.EXTRA,
- lambda state: logic.terran_competent_comp(state)),
- LocationData("Shatter the Sky", "Shatter the Sky: Mid Hatchery", SC2WOL_LOC_ID_OFFSET + 2808, LocationType.EXTRA,
- lambda state: logic.terran_competent_comp(state)),
- LocationData("All-In", "All-In: Victory", SC2WOL_LOC_ID_OFFSET + 2900, LocationType.VICTORY,
- lambda state: logic.all_in_requirement(state)),
- LocationData("All-In", "All-In: First Kerrigan Attack", SC2WOL_LOC_ID_OFFSET + 2901, LocationType.EXTRA,
- lambda state: logic.all_in_requirement(state)),
- LocationData("All-In", "All-In: Second Kerrigan Attack", SC2WOL_LOC_ID_OFFSET + 2902, LocationType.EXTRA,
- lambda state: logic.all_in_requirement(state)),
- LocationData("All-In", "All-In: Third Kerrigan Attack", SC2WOL_LOC_ID_OFFSET + 2903, LocationType.EXTRA,
- lambda state: logic.all_in_requirement(state)),
- LocationData("All-In", "All-In: Fourth Kerrigan Attack", SC2WOL_LOC_ID_OFFSET + 2904, LocationType.EXTRA,
- lambda state: logic.all_in_requirement(state)),
- LocationData("All-In", "All-In: Fifth Kerrigan Attack", SC2WOL_LOC_ID_OFFSET + 2905, LocationType.EXTRA,
- lambda state: logic.all_in_requirement(state)),
-
- # HotS
- LocationData("Lab Rat", "Lab Rat: Victory", SC2HOTS_LOC_ID_OFFSET + 100, LocationType.VICTORY,
- lambda state: logic.zerg_common_unit(state)),
- LocationData("Lab Rat", "Lab Rat: Gather Minerals", SC2HOTS_LOC_ID_OFFSET + 101, LocationType.VANILLA),
- LocationData("Lab Rat", "Lab Rat: South Zergling Group", SC2HOTS_LOC_ID_OFFSET + 102, LocationType.VANILLA,
- lambda state: adv_tactics or logic.zerg_common_unit(state)),
- LocationData("Lab Rat", "Lab Rat: East Zergling Group", SC2HOTS_LOC_ID_OFFSET + 103, LocationType.VANILLA,
- lambda state: adv_tactics or logic.zerg_common_unit(state)),
- LocationData("Lab Rat", "Lab Rat: West Zergling Group", SC2HOTS_LOC_ID_OFFSET + 104, LocationType.VANILLA,
- lambda state: adv_tactics or logic.zerg_common_unit(state)),
- LocationData("Lab Rat", "Lab Rat: Hatchery", SC2HOTS_LOC_ID_OFFSET + 105, LocationType.EXTRA),
- LocationData("Lab Rat", "Lab Rat: Overlord", SC2HOTS_LOC_ID_OFFSET + 106, LocationType.EXTRA),
- LocationData("Lab Rat", "Lab Rat: Gas Turrets", SC2HOTS_LOC_ID_OFFSET + 107, LocationType.EXTRA,
- lambda state: adv_tactics or logic.zerg_common_unit(state)),
- LocationData("Back in the Saddle", "Back in the Saddle: Victory", SC2HOTS_LOC_ID_OFFSET + 200, LocationType.VICTORY,
- lambda state: logic.basic_kerrigan(state) or kerriganless or logic.story_tech_granted),
- LocationData("Back in the Saddle", "Back in the Saddle: Defend the Tram", SC2HOTS_LOC_ID_OFFSET + 201, LocationType.EXTRA,
- lambda state: logic.basic_kerrigan(state) or kerriganless or logic.story_tech_granted),
- LocationData("Back in the Saddle", "Back in the Saddle: Kinetic Blast", SC2HOTS_LOC_ID_OFFSET + 202, LocationType.VANILLA),
- LocationData("Back in the Saddle", "Back in the Saddle: Crushing Grip", SC2HOTS_LOC_ID_OFFSET + 203, LocationType.VANILLA),
- LocationData("Back in the Saddle", "Back in the Saddle: Reach the Sublevel", SC2HOTS_LOC_ID_OFFSET + 204, LocationType.EXTRA),
- LocationData("Back in the Saddle", "Back in the Saddle: Door Section Cleared", SC2HOTS_LOC_ID_OFFSET + 205, LocationType.EXTRA,
- lambda state: logic.basic_kerrigan(state) or kerriganless or logic.story_tech_granted),
- LocationData("Rendezvous", "Rendezvous: Victory", SC2HOTS_LOC_ID_OFFSET + 300, LocationType.VICTORY,
- lambda state: logic.zerg_common_unit(state) and
- logic.zerg_basic_anti_air(state)),
- LocationData("Rendezvous", "Rendezvous: Right Queen", SC2HOTS_LOC_ID_OFFSET + 301, LocationType.VANILLA,
- lambda state: logic.zerg_common_unit(state) and
- logic.zerg_basic_anti_air(state)),
- LocationData("Rendezvous", "Rendezvous: Center Queen", SC2HOTS_LOC_ID_OFFSET + 302, LocationType.VANILLA,
- lambda state: logic.zerg_common_unit(state) and
- logic.zerg_basic_anti_air(state)),
- LocationData("Rendezvous", "Rendezvous: Left Queen", SC2HOTS_LOC_ID_OFFSET + 303, LocationType.VANILLA,
- lambda state: logic.zerg_common_unit(state) and
- logic.zerg_basic_anti_air(state)),
- LocationData("Rendezvous", "Rendezvous: Hold Out Finished", SC2HOTS_LOC_ID_OFFSET + 304, LocationType.EXTRA,
- lambda state: logic.zerg_common_unit(state) and
- logic.zerg_basic_anti_air(state)),
- LocationData("Harvest of Screams", "Harvest of Screams: Victory", SC2HOTS_LOC_ID_OFFSET + 400, LocationType.VICTORY,
- lambda state: logic.zerg_common_unit(state)
- and logic.zerg_basic_anti_air(state)),
- LocationData("Harvest of Screams", "Harvest of Screams: First Ursadon Matriarch", SC2HOTS_LOC_ID_OFFSET + 401, LocationType.VANILLA),
- LocationData("Harvest of Screams", "Harvest of Screams: North Ursadon Matriarch", SC2HOTS_LOC_ID_OFFSET + 402, LocationType.VANILLA,
- lambda state: logic.zerg_common_unit(state)),
- LocationData("Harvest of Screams", "Harvest of Screams: West Ursadon Matriarch", SC2HOTS_LOC_ID_OFFSET + 403, LocationType.VANILLA,
- lambda state: logic.zerg_common_unit(state)),
- LocationData("Harvest of Screams", "Harvest of Screams: Lost Brood", SC2HOTS_LOC_ID_OFFSET + 404, LocationType.EXTRA),
- LocationData("Harvest of Screams", "Harvest of Screams: Northeast Psi-link Spire", SC2HOTS_LOC_ID_OFFSET + 405, LocationType.EXTRA,
- lambda state: logic.zerg_common_unit(state)),
- LocationData("Harvest of Screams", "Harvest of Screams: Northwest Psi-link Spire", SC2HOTS_LOC_ID_OFFSET + 406, LocationType.EXTRA,
- lambda state: logic.zerg_common_unit(state)
- and logic.zerg_basic_anti_air(state)),
- LocationData("Harvest of Screams", "Harvest of Screams: Southwest Psi-link Spire", SC2HOTS_LOC_ID_OFFSET + 407, LocationType.EXTRA,
- lambda state: logic.zerg_common_unit(state)
- and logic.zerg_basic_anti_air(state)),
- LocationData("Harvest of Screams", "Harvest of Screams: Nafash", SC2HOTS_LOC_ID_OFFSET + 408, LocationType.EXTRA,
- lambda state: logic.zerg_common_unit(state)
- and logic.zerg_basic_anti_air(state)),
- LocationData("Shoot the Messenger", "Shoot the Messenger: Victory", SC2HOTS_LOC_ID_OFFSET + 500, LocationType.VICTORY,
- lambda state: logic.zerg_common_unit(state) and
- logic.zerg_competent_anti_air(state)),
- LocationData("Shoot the Messenger", "Shoot the Messenger: East Stasis Chamber", SC2HOTS_LOC_ID_OFFSET + 501, LocationType.VANILLA,
- lambda state: logic.zerg_common_unit(state) and logic.zerg_basic_anti_air(state)),
- LocationData("Shoot the Messenger", "Shoot the Messenger: Center Stasis Chamber", SC2HOTS_LOC_ID_OFFSET + 502, LocationType.VANILLA,
- lambda state: logic.zerg_common_unit(state) or adv_tactics),
- LocationData("Shoot the Messenger", "Shoot the Messenger: West Stasis Chamber", SC2HOTS_LOC_ID_OFFSET + 503, LocationType.VANILLA,
- lambda state: logic.zerg_common_unit(state) and logic.zerg_basic_anti_air(state)),
- LocationData("Shoot the Messenger", "Shoot the Messenger: Destroy 4 Shuttles", SC2HOTS_LOC_ID_OFFSET + 504, LocationType.EXTRA,
- lambda state: logic.zerg_common_unit(state) and logic.zerg_basic_anti_air(state)),
- LocationData("Shoot the Messenger", "Shoot the Messenger: Frozen Expansion", SC2HOTS_LOC_ID_OFFSET + 505, LocationType.EXTRA,
- lambda state: logic.zerg_common_unit(state)),
- LocationData("Shoot the Messenger", "Shoot the Messenger: Southwest Frozen Zerg", SC2HOTS_LOC_ID_OFFSET + 506, LocationType.EXTRA),
- LocationData("Shoot the Messenger", "Shoot the Messenger: Southeast Frozen Zerg", SC2HOTS_LOC_ID_OFFSET + 507, LocationType.EXTRA,
- lambda state: logic.zerg_common_unit(state) or adv_tactics),
- LocationData("Shoot the Messenger", "Shoot the Messenger: West Frozen Zerg", SC2HOTS_LOC_ID_OFFSET + 508, LocationType.EXTRA,
- lambda state: logic.zerg_common_unit(state) and logic.zerg_basic_anti_air(state)),
- LocationData("Shoot the Messenger", "Shoot the Messenger: East Frozen Zerg", SC2HOTS_LOC_ID_OFFSET + 509, LocationType.EXTRA,
- lambda state: logic.zerg_common_unit(state) and logic.zerg_competent_anti_air(state)),
- LocationData("Enemy Within", "Enemy Within: Victory", SC2HOTS_LOC_ID_OFFSET + 600, LocationType.VICTORY,
- lambda state: logic.zerg_pass_vents(state)
- and (logic.story_tech_granted
- or state.has_any({ItemNames.ZERGLING_RAPTOR_STRAIN, ItemNames.ROACH,
- ItemNames.HYDRALISK, ItemNames.INFESTOR}, player))
- ),
- LocationData("Enemy Within", "Enemy Within: Infest Giant Ursadon", SC2HOTS_LOC_ID_OFFSET + 601, LocationType.VANILLA,
- lambda state: logic.zerg_pass_vents(state)),
- LocationData("Enemy Within", "Enemy Within: First Niadra Evolution", SC2HOTS_LOC_ID_OFFSET + 602, LocationType.VANILLA,
- lambda state: logic.zerg_pass_vents(state)),
- LocationData("Enemy Within", "Enemy Within: Second Niadra Evolution", SC2HOTS_LOC_ID_OFFSET + 603, LocationType.VANILLA,
- lambda state: logic.zerg_pass_vents(state)),
- LocationData("Enemy Within", "Enemy Within: Third Niadra Evolution", SC2HOTS_LOC_ID_OFFSET + 604, LocationType.VANILLA,
- lambda state: logic.zerg_pass_vents(state)),
- LocationData("Enemy Within", "Enemy Within: Warp Drive", SC2HOTS_LOC_ID_OFFSET + 605, LocationType.EXTRA,
- lambda state: logic.zerg_pass_vents(state)),
- LocationData("Enemy Within", "Enemy Within: Stasis Quadrant", SC2HOTS_LOC_ID_OFFSET + 606, LocationType.EXTRA,
- lambda state: logic.zerg_pass_vents(state)),
- LocationData("Domination", "Domination: Victory", SC2HOTS_LOC_ID_OFFSET + 700, LocationType.VICTORY,
- lambda state: logic.zerg_common_unit(state) and logic.zerg_basic_anti_air(state)),
- LocationData("Domination", "Domination: Center Infested Command Center", SC2HOTS_LOC_ID_OFFSET + 701, LocationType.VANILLA,
- lambda state: logic.zerg_common_unit(state)),
- LocationData("Domination", "Domination: North Infested Command Center", SC2HOTS_LOC_ID_OFFSET + 702, LocationType.VANILLA,
- lambda state: logic.zerg_common_unit(state)),
- LocationData("Domination", "Domination: Repel Zagara", SC2HOTS_LOC_ID_OFFSET + 703, LocationType.EXTRA),
- LocationData("Domination", "Domination: Close Baneling Nest", SC2HOTS_LOC_ID_OFFSET + 704, LocationType.EXTRA),
- LocationData("Domination", "Domination: South Baneling Nest", SC2HOTS_LOC_ID_OFFSET + 705, LocationType.EXTRA,
- lambda state: adv_tactics or logic.zerg_common_unit(state)),
- LocationData("Domination", "Domination: Southwest Baneling Nest", SC2HOTS_LOC_ID_OFFSET + 706, LocationType.EXTRA,
- lambda state: logic.zerg_common_unit(state)),
- LocationData("Domination", "Domination: Southeast Baneling Nest", SC2HOTS_LOC_ID_OFFSET + 707, LocationType.EXTRA,
- lambda state: logic.zerg_common_unit(state) and logic.zerg_basic_anti_air(state)),
- LocationData("Domination", "Domination: North Baneling Nest", SC2HOTS_LOC_ID_OFFSET + 708, LocationType.EXTRA,
- lambda state: logic.zerg_common_unit(state)),
- LocationData("Domination", "Domination: Northeast Baneling Nest", SC2HOTS_LOC_ID_OFFSET + 709, LocationType.EXTRA,
- lambda state: logic.zerg_common_unit(state)),
- LocationData("Fire in the Sky", "Fire in the Sky: Victory", SC2HOTS_LOC_ID_OFFSET + 800, LocationType.VICTORY,
- lambda state: logic.zerg_competent_comp(state) and
- logic.zerg_basic_anti_air(state) and
- logic.spread_creep(state)),
- LocationData("Fire in the Sky", "Fire in the Sky: West Biomass", SC2HOTS_LOC_ID_OFFSET + 801, LocationType.VANILLA),
- LocationData("Fire in the Sky", "Fire in the Sky: North Biomass", SC2HOTS_LOC_ID_OFFSET + 802, LocationType.VANILLA,
- lambda state: logic.zerg_competent_comp(state) and
- logic.zerg_basic_anti_air(state) and
- logic.spread_creep(state)),
- LocationData("Fire in the Sky", "Fire in the Sky: South Biomass", SC2HOTS_LOC_ID_OFFSET + 803, LocationType.VANILLA,
- lambda state: logic.zerg_competent_comp(state) and
- logic.zerg_basic_anti_air(state) and
- logic.spread_creep(state)),
- LocationData("Fire in the Sky", "Fire in the Sky: Destroy 3 Gorgons", SC2HOTS_LOC_ID_OFFSET + 804, LocationType.EXTRA,
- lambda state: logic.zerg_competent_comp(state) and
- logic.zerg_basic_anti_air(state) and
- logic.spread_creep(state)),
- LocationData("Fire in the Sky", "Fire in the Sky: Close Zerg Rescue", SC2HOTS_LOC_ID_OFFSET + 805, LocationType.EXTRA),
- LocationData("Fire in the Sky", "Fire in the Sky: South Zerg Rescue", SC2HOTS_LOC_ID_OFFSET + 806, LocationType.EXTRA,
- lambda state: logic.zerg_common_unit(state)),
- LocationData("Fire in the Sky", "Fire in the Sky: North Zerg Rescue", SC2HOTS_LOC_ID_OFFSET + 807, LocationType.EXTRA,
- lambda state: logic.zerg_competent_comp(state) and
- logic.zerg_basic_anti_air(state) and
- logic.spread_creep(state)),
- LocationData("Fire in the Sky", "Fire in the Sky: West Queen Rescue", SC2HOTS_LOC_ID_OFFSET + 808, LocationType.EXTRA,
- lambda state: logic.zerg_competent_comp(state) and
- logic.zerg_basic_anti_air(state) and
- logic.spread_creep(state)),
- LocationData("Fire in the Sky", "Fire in the Sky: East Queen Rescue", SC2HOTS_LOC_ID_OFFSET + 809, LocationType.EXTRA,
- lambda state: logic.zerg_competent_comp(state) and
- logic.zerg_basic_anti_air(state) and
- logic.spread_creep(state)),
- LocationData("Old Soldiers", "Old Soldiers: Victory", SC2HOTS_LOC_ID_OFFSET + 900, LocationType.VICTORY,
- lambda state: logic.zerg_competent_comp(state) and
- logic.zerg_basic_anti_air(state)),
- LocationData("Old Soldiers", "Old Soldiers: East Science Lab", SC2HOTS_LOC_ID_OFFSET + 901, LocationType.VANILLA,
- lambda state: logic.zerg_competent_comp(state) and
- logic.zerg_basic_anti_air(state)),
- LocationData("Old Soldiers", "Old Soldiers: North Science Lab", SC2HOTS_LOC_ID_OFFSET + 902, LocationType.VANILLA,
- lambda state: logic.zerg_competent_comp(state) and
- logic.zerg_basic_anti_air(state)),
- LocationData("Old Soldiers", "Old Soldiers: Get Nuked", SC2HOTS_LOC_ID_OFFSET + 903, LocationType.EXTRA),
- LocationData("Old Soldiers", "Old Soldiers: Entrance Gate", SC2HOTS_LOC_ID_OFFSET + 904, LocationType.EXTRA),
- LocationData("Old Soldiers", "Old Soldiers: Citadel Gate", SC2HOTS_LOC_ID_OFFSET + 905, LocationType.EXTRA,
- lambda state: logic.zerg_competent_comp(state) and
- logic.zerg_basic_anti_air(state)),
- LocationData("Old Soldiers", "Old Soldiers: South Expansion", SC2HOTS_LOC_ID_OFFSET + 906, LocationType.EXTRA),
- LocationData("Old Soldiers", "Old Soldiers: Rich Mineral Expansion", SC2HOTS_LOC_ID_OFFSET + 907, LocationType.EXTRA,
- lambda state: logic.zerg_competent_comp(state) and
- logic.zerg_basic_anti_air(state)),
- LocationData("Waking the Ancient", "Waking the Ancient: Victory", SC2HOTS_LOC_ID_OFFSET + 1000, LocationType.VICTORY,
- lambda state: logic.zerg_common_unit(state) and
- logic.zerg_competent_anti_air(state)),
- LocationData("Waking the Ancient", "Waking the Ancient: Center Essence Pool", SC2HOTS_LOC_ID_OFFSET + 1001, LocationType.VANILLA),
- LocationData("Waking the Ancient", "Waking the Ancient: East Essence Pool", SC2HOTS_LOC_ID_OFFSET + 1002, LocationType.VANILLA,
- lambda state: logic.zerg_common_unit(state) and
- (adv_tactics and logic.zerg_basic_anti_air(state)
- or logic.zerg_competent_anti_air(state))),
- LocationData("Waking the Ancient", "Waking the Ancient: South Essence Pool", SC2HOTS_LOC_ID_OFFSET + 1003, LocationType.VANILLA,
- lambda state: logic.zerg_common_unit(state) and
- (adv_tactics and logic.zerg_basic_anti_air(state)
- or logic.zerg_competent_anti_air(state))),
- LocationData("Waking the Ancient", "Waking the Ancient: Finish Feeding", SC2HOTS_LOC_ID_OFFSET + 1004, LocationType.EXTRA,
- lambda state: logic.zerg_common_unit(state) and
- logic.zerg_competent_anti_air(state)),
- LocationData("Waking the Ancient", "Waking the Ancient: South Proxy Primal Hive", SC2HOTS_LOC_ID_OFFSET + 1005, LocationType.CHALLENGE,
- lambda state: logic.zerg_common_unit(state) and
- logic.zerg_competent_anti_air(state)),
- LocationData("Waking the Ancient", "Waking the Ancient: East Proxy Primal Hive", SC2HOTS_LOC_ID_OFFSET + 1006, LocationType.CHALLENGE,
- lambda state: logic.zerg_common_unit(state) and
- logic.zerg_competent_anti_air(state)),
- LocationData("Waking the Ancient", "Waking the Ancient: South Main Primal Hive", SC2HOTS_LOC_ID_OFFSET + 1007, LocationType.CHALLENGE,
- lambda state: logic.zerg_common_unit(state) and
- logic.zerg_competent_anti_air(state)),
- LocationData("Waking the Ancient", "Waking the Ancient: East Main Primal Hive", SC2HOTS_LOC_ID_OFFSET + 1008, LocationType.CHALLENGE,
- lambda state: logic.zerg_common_unit(state) and
- logic.zerg_competent_anti_air(state)),
- LocationData("The Crucible", "The Crucible: Victory", SC2HOTS_LOC_ID_OFFSET + 1100, LocationType.VICTORY,
- lambda state: logic.zerg_competent_defense(state) and
- logic.zerg_competent_anti_air(state)),
- LocationData("The Crucible", "The Crucible: Tyrannozor", SC2HOTS_LOC_ID_OFFSET + 1101, LocationType.VANILLA,
- lambda state: logic.zerg_competent_defense(state) and
- logic.zerg_competent_anti_air(state)),
- LocationData("The Crucible", "The Crucible: Reach the Pool", SC2HOTS_LOC_ID_OFFSET + 1102, LocationType.VANILLA),
- LocationData("The Crucible", "The Crucible: 15 Minutes Remaining", SC2HOTS_LOC_ID_OFFSET + 1103, LocationType.EXTRA,
- lambda state: logic.zerg_competent_defense(state) and
- logic.zerg_competent_anti_air(state)),
- LocationData("The Crucible", "The Crucible: 5 Minutes Remaining", SC2HOTS_LOC_ID_OFFSET + 1104, LocationType.EXTRA,
- lambda state: logic.zerg_competent_defense(state) and
- logic.zerg_competent_anti_air(state)),
- LocationData("The Crucible", "The Crucible: Pincer Attack", SC2HOTS_LOC_ID_OFFSET + 1105, LocationType.EXTRA,
- lambda state: logic.zerg_competent_defense(state) and
- logic.zerg_competent_anti_air(state)),
- LocationData("The Crucible", "The Crucible: Yagdra Claims Brakk's Pack", SC2HOTS_LOC_ID_OFFSET + 1106, LocationType.EXTRA,
- lambda state: logic.zerg_competent_defense(state) and
- logic.zerg_competent_anti_air(state)),
- LocationData("Supreme", "Supreme: Victory", SC2HOTS_LOC_ID_OFFSET + 1200, LocationType.VICTORY,
- lambda state: logic.supreme_requirement(state)),
- LocationData("Supreme", "Supreme: First Relic", SC2HOTS_LOC_ID_OFFSET + 1201, LocationType.VANILLA,
- lambda state: logic.supreme_requirement(state)),
- LocationData("Supreme", "Supreme: Second Relic", SC2HOTS_LOC_ID_OFFSET + 1202, LocationType.VANILLA,
- lambda state: logic.supreme_requirement(state)),
- LocationData("Supreme", "Supreme: Third Relic", SC2HOTS_LOC_ID_OFFSET + 1203, LocationType.VANILLA,
- lambda state: logic.supreme_requirement(state)),
- LocationData("Supreme", "Supreme: Fourth Relic", SC2HOTS_LOC_ID_OFFSET + 1204, LocationType.VANILLA,
- lambda state: logic.supreme_requirement(state)),
- LocationData("Supreme", "Supreme: Yagdra", SC2HOTS_LOC_ID_OFFSET + 1205, LocationType.EXTRA,
- lambda state: logic.supreme_requirement(state)),
- LocationData("Supreme", "Supreme: Kraith", SC2HOTS_LOC_ID_OFFSET + 1206, LocationType.EXTRA,
- lambda state: logic.supreme_requirement(state)),
- LocationData("Supreme", "Supreme: Slivan", SC2HOTS_LOC_ID_OFFSET + 1207, LocationType.EXTRA,
- lambda state: logic.supreme_requirement(state)),
- LocationData("Infested", "Infested: Victory", SC2HOTS_LOC_ID_OFFSET + 1300, LocationType.VICTORY,
- lambda state: logic.zerg_common_unit(state) and
- ((logic.zerg_competent_anti_air(state) and state.has(ItemNames.INFESTOR, player)) or
- (adv_tactics and logic.zerg_basic_anti_air(state)))),
- LocationData("Infested", "Infested: East Science Facility", SC2HOTS_LOC_ID_OFFSET + 1301, LocationType.VANILLA,
- lambda state: logic.zerg_common_unit(state) and
- logic.zerg_basic_anti_air(state) and
- logic.spread_creep(state)),
- LocationData("Infested", "Infested: Center Science Facility", SC2HOTS_LOC_ID_OFFSET + 1302, LocationType.VANILLA,
- lambda state: logic.zerg_common_unit(state) and
- logic.zerg_basic_anti_air(state) and
- logic.spread_creep(state)),
- LocationData("Infested", "Infested: West Science Facility", SC2HOTS_LOC_ID_OFFSET + 1303, LocationType.VANILLA,
- lambda state: logic.zerg_common_unit(state) and
- logic.zerg_basic_anti_air(state) and
- logic.spread_creep(state)),
- LocationData("Infested", "Infested: First Intro Garrison", SC2HOTS_LOC_ID_OFFSET + 1304, LocationType.EXTRA),
- LocationData("Infested", "Infested: Second Intro Garrison", SC2HOTS_LOC_ID_OFFSET + 1305, LocationType.EXTRA),
- LocationData("Infested", "Infested: Base Garrison", SC2HOTS_LOC_ID_OFFSET + 1306, LocationType.EXTRA),
- LocationData("Infested", "Infested: East Garrison", SC2HOTS_LOC_ID_OFFSET + 1307, LocationType.EXTRA,
- lambda state: logic.zerg_common_unit(state)
- and logic.zerg_basic_anti_air(state)
- and (adv_tactics or state.has(ItemNames.INFESTOR, player))),
- LocationData("Infested", "Infested: Mid Garrison", SC2HOTS_LOC_ID_OFFSET + 1308, LocationType.EXTRA,
- lambda state: logic.zerg_common_unit(state)
- and logic.zerg_basic_anti_air(state)
- and (adv_tactics or state.has(ItemNames.INFESTOR, player))),
- LocationData("Infested", "Infested: North Garrison", SC2HOTS_LOC_ID_OFFSET + 1309, LocationType.EXTRA,
- lambda state: logic.zerg_common_unit(state)
- and logic.zerg_basic_anti_air(state)
- and (adv_tactics or state.has(ItemNames.INFESTOR, player))),
- LocationData("Infested", "Infested: Close Southwest Garrison", SC2HOTS_LOC_ID_OFFSET + 1310, LocationType.EXTRA,
- lambda state: logic.zerg_common_unit(state)
- and logic.zerg_basic_anti_air(state)
- and (adv_tactics or state.has(ItemNames.INFESTOR, player))),
- LocationData("Infested", "Infested: Far Southwest Garrison", SC2HOTS_LOC_ID_OFFSET + 1311, LocationType.EXTRA,
- lambda state: logic.zerg_common_unit(state)
- and logic.zerg_basic_anti_air(state)
- and (adv_tactics or state.has(ItemNames.INFESTOR, player))),
- LocationData("Hand of Darkness", "Hand of Darkness: Victory", SC2HOTS_LOC_ID_OFFSET + 1400, LocationType.VICTORY,
- lambda state: logic.zerg_competent_comp(state) and
- logic.zerg_basic_anti_air(state)),
- LocationData("Hand of Darkness", "Hand of Darkness: North Brutalisk", SC2HOTS_LOC_ID_OFFSET + 1401, LocationType.VANILLA,
- lambda state: logic.zerg_competent_comp(state) and
- logic.zerg_basic_anti_air(state)),
- LocationData("Hand of Darkness", "Hand of Darkness: South Brutalisk", SC2HOTS_LOC_ID_OFFSET + 1402, LocationType.VANILLA,
- lambda state: logic.zerg_competent_comp(state) and
- logic.zerg_basic_anti_air(state)),
- LocationData("Hand of Darkness", "Hand of Darkness: Kill 1 Hybrid", SC2HOTS_LOC_ID_OFFSET + 1403, LocationType.EXTRA,
- lambda state: logic.zerg_competent_comp(state) and
- logic.zerg_basic_anti_air(state)),
- LocationData("Hand of Darkness", "Hand of Darkness: Kill 2 Hybrid", SC2HOTS_LOC_ID_OFFSET + 1404, LocationType.EXTRA,
- lambda state: logic.zerg_competent_comp(state) and
- logic.zerg_basic_anti_air(state)),
- LocationData("Hand of Darkness", "Hand of Darkness: Kill 3 Hybrid", SC2HOTS_LOC_ID_OFFSET + 1405, LocationType.EXTRA,
- lambda state: logic.zerg_competent_comp(state) and
- logic.zerg_basic_anti_air(state)),
- LocationData("Hand of Darkness", "Hand of Darkness: Kill 4 Hybrid", SC2HOTS_LOC_ID_OFFSET + 1406, LocationType.EXTRA,
- lambda state: logic.zerg_competent_comp(state) and
- logic.zerg_basic_anti_air(state)),
- LocationData("Hand of Darkness", "Hand of Darkness: Kill 5 Hybrid", SC2HOTS_LOC_ID_OFFSET + 1407, LocationType.EXTRA,
- lambda state: logic.zerg_competent_comp(state) and
- logic.zerg_basic_anti_air(state)),
- LocationData("Hand of Darkness", "Hand of Darkness: Kill 6 Hybrid", SC2HOTS_LOC_ID_OFFSET + 1408, LocationType.EXTRA,
- lambda state: logic.zerg_competent_comp(state) and
- logic.zerg_basic_anti_air(state)),
- LocationData("Hand of Darkness", "Hand of Darkness: Kill 7 Hybrid", SC2HOTS_LOC_ID_OFFSET + 1409, LocationType.EXTRA,
- lambda state: logic.zerg_competent_comp(state) and
- logic.zerg_basic_anti_air(state)),
- LocationData("Phantoms of the Void", "Phantoms of the Void: Victory", SC2HOTS_LOC_ID_OFFSET + 1500, LocationType.VICTORY,
- lambda state: logic.zerg_competent_comp(state) and
- (logic.zerg_competent_anti_air(state) or adv_tactics)),
- LocationData("Phantoms of the Void", "Phantoms of the Void: Northwest Crystal", SC2HOTS_LOC_ID_OFFSET + 1501, LocationType.VANILLA,
- lambda state: logic.zerg_competent_comp(state) and
- (logic.zerg_competent_anti_air(state) or adv_tactics)),
- LocationData("Phantoms of the Void", "Phantoms of the Void: Northeast Crystal", SC2HOTS_LOC_ID_OFFSET + 1502, LocationType.VANILLA,
- lambda state: logic.zerg_competent_comp(state) and
- (logic.zerg_competent_anti_air(state) or adv_tactics)),
- LocationData("Phantoms of the Void", "Phantoms of the Void: South Crystal", SC2HOTS_LOC_ID_OFFSET + 1503, LocationType.VANILLA),
- LocationData("Phantoms of the Void", "Phantoms of the Void: Base Established", SC2HOTS_LOC_ID_OFFSET + 1504, LocationType.EXTRA),
- LocationData("Phantoms of the Void", "Phantoms of the Void: Close Temple", SC2HOTS_LOC_ID_OFFSET + 1505, LocationType.EXTRA,
- lambda state: logic.zerg_competent_comp(state) and
- (logic.zerg_competent_anti_air(state) or adv_tactics)),
- LocationData("Phantoms of the Void", "Phantoms of the Void: Mid Temple", SC2HOTS_LOC_ID_OFFSET + 1506, LocationType.EXTRA,
- lambda state: logic.zerg_competent_comp(state) and
- (logic.zerg_competent_anti_air(state) or adv_tactics)),
- LocationData("Phantoms of the Void", "Phantoms of the Void: Southeast Temple", SC2HOTS_LOC_ID_OFFSET + 1507, LocationType.EXTRA,
- lambda state: logic.zerg_competent_comp(state) and
- (logic.zerg_competent_anti_air(state) or adv_tactics)),
- LocationData("Phantoms of the Void", "Phantoms of the Void: Northeast Temple", SC2HOTS_LOC_ID_OFFSET + 1508, LocationType.EXTRA,
- lambda state: logic.zerg_competent_comp(state) and
- (logic.zerg_competent_anti_air(state) or adv_tactics)),
- LocationData("Phantoms of the Void", "Phantoms of the Void: Northwest Temple", SC2HOTS_LOC_ID_OFFSET + 1509, LocationType.EXTRA,
- lambda state: logic.zerg_competent_comp(state) and
- (logic.zerg_competent_anti_air(state) or adv_tactics)),
- LocationData("With Friends Like These", "With Friends Like These: Victory", SC2HOTS_LOC_ID_OFFSET + 1600, LocationType.VICTORY),
- LocationData("With Friends Like These", "With Friends Like These: Pirate Capital Ship", SC2HOTS_LOC_ID_OFFSET + 1601, LocationType.VANILLA),
- LocationData("With Friends Like These", "With Friends Like These: First Mineral Patch", SC2HOTS_LOC_ID_OFFSET + 1602, LocationType.VANILLA),
- LocationData("With Friends Like These", "With Friends Like These: Second Mineral Patch", SC2HOTS_LOC_ID_OFFSET + 1603, LocationType.VANILLA),
- LocationData("With Friends Like These", "With Friends Like These: Third Mineral Patch", SC2HOTS_LOC_ID_OFFSET + 1604, LocationType.VANILLA),
- LocationData("Conviction", "Conviction: Victory", SC2HOTS_LOC_ID_OFFSET + 1700, LocationType.VICTORY,
- lambda state: logic.two_kerrigan_actives(state) and
- (logic.basic_kerrigan(state) or logic.story_tech_granted) or kerriganless),
- LocationData("Conviction", "Conviction: First Secret Documents", SC2HOTS_LOC_ID_OFFSET + 1701, LocationType.VANILLA,
- lambda state: logic.two_kerrigan_actives(state) or kerriganless),
- LocationData("Conviction", "Conviction: Second Secret Documents", SC2HOTS_LOC_ID_OFFSET + 1702, LocationType.VANILLA,
- lambda state: logic.two_kerrigan_actives(state) and
- (logic.basic_kerrigan(state) or logic.story_tech_granted) or kerriganless),
- LocationData("Conviction", "Conviction: Power Coupling", SC2HOTS_LOC_ID_OFFSET + 1703, LocationType.EXTRA,
- lambda state: logic.two_kerrigan_actives(state) or kerriganless),
- LocationData("Conviction", "Conviction: Door Blasted", SC2HOTS_LOC_ID_OFFSET + 1704, LocationType.EXTRA,
- lambda state: logic.two_kerrigan_actives(state) or kerriganless),
- LocationData("Planetfall", "Planetfall: Victory", SC2HOTS_LOC_ID_OFFSET + 1800, LocationType.VICTORY,
- lambda state: logic.zerg_competent_comp(state) and
- logic.zerg_competent_anti_air(state)),
- LocationData("Planetfall", "Planetfall: East Gate", SC2HOTS_LOC_ID_OFFSET + 1801, LocationType.VANILLA,
- lambda state: logic.zerg_competent_comp(state) and
- logic.zerg_competent_anti_air(state)),
- LocationData("Planetfall", "Planetfall: Northwest Gate", SC2HOTS_LOC_ID_OFFSET + 1802, LocationType.VANILLA,
- lambda state: logic.zerg_competent_comp(state) and
- logic.zerg_competent_anti_air(state)),
- LocationData("Planetfall", "Planetfall: North Gate", SC2HOTS_LOC_ID_OFFSET + 1803, LocationType.VANILLA,
- lambda state: logic.zerg_competent_comp(state) and
- logic.zerg_competent_anti_air(state)),
- LocationData("Planetfall", "Planetfall: 1 Bile Launcher Deployed", SC2HOTS_LOC_ID_OFFSET + 1804, LocationType.EXTRA,
- lambda state: logic.zerg_competent_comp(state) and
- logic.zerg_competent_anti_air(state)),
- LocationData("Planetfall", "Planetfall: 2 Bile Launchers Deployed", SC2HOTS_LOC_ID_OFFSET + 1805, LocationType.EXTRA,
- lambda state: logic.zerg_competent_comp(state) and
- logic.zerg_competent_anti_air(state)),
- LocationData("Planetfall", "Planetfall: 3 Bile Launchers Deployed", SC2HOTS_LOC_ID_OFFSET + 1806, LocationType.EXTRA,
- lambda state: logic.zerg_competent_comp(state) and
- logic.zerg_competent_anti_air(state)),
- LocationData("Planetfall", "Planetfall: 4 Bile Launchers Deployed", SC2HOTS_LOC_ID_OFFSET + 1807, LocationType.EXTRA,
- lambda state: logic.zerg_competent_comp(state) and
- logic.zerg_competent_anti_air(state)),
- LocationData("Planetfall", "Planetfall: 5 Bile Launchers Deployed", SC2HOTS_LOC_ID_OFFSET + 1808, LocationType.EXTRA,
- lambda state: logic.zerg_competent_comp(state) and
- logic.zerg_competent_anti_air(state)),
- LocationData("Planetfall", "Planetfall: Sons of Korhal", SC2HOTS_LOC_ID_OFFSET + 1809, LocationType.EXTRA,
- lambda state: logic.zerg_competent_comp(state) and
- logic.zerg_competent_anti_air(state)),
- LocationData("Planetfall", "Planetfall: Night Wolves", SC2HOTS_LOC_ID_OFFSET + 1810, LocationType.EXTRA,
- lambda state: logic.zerg_competent_comp(state) and
- logic.zerg_competent_anti_air(state)),
- LocationData("Planetfall", "Planetfall: West Expansion", SC2HOTS_LOC_ID_OFFSET + 1811, LocationType.EXTRA,
- lambda state: logic.zerg_competent_comp(state) and
- logic.zerg_competent_anti_air(state)),
- LocationData("Planetfall", "Planetfall: Mid Expansion", SC2HOTS_LOC_ID_OFFSET + 1812, LocationType.EXTRA,
- lambda state: logic.zerg_competent_comp(state) and
- logic.zerg_competent_anti_air(state)),
- LocationData("Death From Above", "Death From Above: Victory", SC2HOTS_LOC_ID_OFFSET + 1900, LocationType.VICTORY,
- lambda state: logic.zerg_competent_comp(state) and
- logic.zerg_competent_anti_air(state)),
- LocationData("Death From Above", "Death From Above: First Power Link", SC2HOTS_LOC_ID_OFFSET + 1901, LocationType.VANILLA),
- LocationData("Death From Above", "Death From Above: Second Power Link", SC2HOTS_LOC_ID_OFFSET + 1902, LocationType.VANILLA,
- lambda state: logic.zerg_competent_comp(state) and
- logic.zerg_competent_anti_air(state)),
- LocationData("Death From Above", "Death From Above: Third Power Link", SC2HOTS_LOC_ID_OFFSET + 1903, LocationType.VANILLA,
- lambda state: logic.zerg_competent_comp(state) and
- logic.zerg_competent_anti_air(state)),
- LocationData("Death From Above", "Death From Above: Expansion Command Center", SC2HOTS_LOC_ID_OFFSET + 1904, LocationType.EXTRA,
- lambda state: logic.zerg_competent_comp(state) and
- logic.zerg_competent_anti_air(state)),
- LocationData("Death From Above", "Death From Above: Main Path Command Center", SC2HOTS_LOC_ID_OFFSET + 1905, LocationType.EXTRA,
- lambda state: logic.zerg_competent_comp(state) and
- logic.zerg_competent_anti_air(state)),
- LocationData("The Reckoning", "The Reckoning: Victory", SC2HOTS_LOC_ID_OFFSET + 2000, LocationType.VICTORY,
- lambda state: logic.the_reckoning_requirement(state)),
- LocationData("The Reckoning", "The Reckoning: South Lane", SC2HOTS_LOC_ID_OFFSET + 2001, LocationType.VANILLA,
- lambda state: logic.the_reckoning_requirement(state)),
- LocationData("The Reckoning", "The Reckoning: North Lane", SC2HOTS_LOC_ID_OFFSET + 2002, LocationType.VANILLA,
- lambda state: logic.the_reckoning_requirement(state)),
- LocationData("The Reckoning", "The Reckoning: East Lane", SC2HOTS_LOC_ID_OFFSET + 2003, LocationType.VANILLA,
- lambda state: logic.the_reckoning_requirement(state)),
- LocationData("The Reckoning", "The Reckoning: Odin", SC2HOTS_LOC_ID_OFFSET + 2004, LocationType.EXTRA,
- lambda state: logic.the_reckoning_requirement(state)),
-
- # LotV Prologue
- LocationData("Dark Whispers", "Dark Whispers: Victory", SC2LOTV_LOC_ID_OFFSET + 100, LocationType.VICTORY,
- lambda state: logic.protoss_common_unit(state) \
- and logic.protoss_basic_anti_air(state)),
- LocationData("Dark Whispers", "Dark Whispers: First Prisoner Group", SC2LOTV_LOC_ID_OFFSET + 101, LocationType.VANILLA,
- lambda state: logic.protoss_common_unit(state) \
- and logic.protoss_basic_anti_air(state)),
- LocationData("Dark Whispers", "Dark Whispers: Second Prisoner Group", SC2LOTV_LOC_ID_OFFSET + 102, LocationType.VANILLA,
- lambda state: logic.protoss_common_unit(state) \
- and logic.protoss_basic_anti_air(state)),
- LocationData("Dark Whispers", "Dark Whispers: First Pylon", SC2LOTV_LOC_ID_OFFSET + 103, LocationType.VANILLA,
- lambda state: logic.protoss_common_unit(state) \
- and logic.protoss_basic_anti_air(state)),
- LocationData("Dark Whispers", "Dark Whispers: Second Pylon", SC2LOTV_LOC_ID_OFFSET + 104, LocationType.VANILLA,
- lambda state: logic.protoss_common_unit(state) \
- and logic.protoss_basic_anti_air(state)),
- LocationData("Ghosts in the Fog", "Ghosts in the Fog: Victory", SC2LOTV_LOC_ID_OFFSET + 200, LocationType.VICTORY,
- lambda state: logic.protoss_common_unit(state) \
- and logic.protoss_anti_armor_anti_air(state)),
- LocationData("Ghosts in the Fog", "Ghosts in the Fog: South Rock Formation", SC2LOTV_LOC_ID_OFFSET + 201, LocationType.VANILLA,
- lambda state: logic.protoss_common_unit(state) \
- and logic.protoss_anti_armor_anti_air(state)),
- LocationData("Ghosts in the Fog", "Ghosts in the Fog: West Rock Formation", SC2LOTV_LOC_ID_OFFSET + 202, LocationType.VANILLA,
- lambda state: logic.protoss_common_unit(state) \
- and logic.protoss_anti_armor_anti_air(state)),
- LocationData("Ghosts in the Fog", "Ghosts in the Fog: East Rock Formation", SC2LOTV_LOC_ID_OFFSET + 203, LocationType.VANILLA,
- lambda state: logic.protoss_common_unit(state) \
- and logic.protoss_anti_armor_anti_air(state) \
- and logic.protoss_can_attack_behind_chasm(state)),
- LocationData("Evil Awoken", "Evil Awoken: Victory", SC2LOTV_LOC_ID_OFFSET + 300, LocationType.VICTORY,
- lambda state: adv_tactics or logic.protoss_stalker_upgrade(state)),
- LocationData("Evil Awoken", "Evil Awoken: Temple Investigated", SC2LOTV_LOC_ID_OFFSET + 301, LocationType.EXTRA),
- LocationData("Evil Awoken", "Evil Awoken: Void Catalyst", SC2LOTV_LOC_ID_OFFSET + 302, LocationType.EXTRA),
- LocationData("Evil Awoken", "Evil Awoken: First Particle Cannon", SC2LOTV_LOC_ID_OFFSET + 303, LocationType.VANILLA),
- LocationData("Evil Awoken", "Evil Awoken: Second Particle Cannon", SC2LOTV_LOC_ID_OFFSET + 304, LocationType.VANILLA),
- LocationData("Evil Awoken", "Evil Awoken: Third Particle Cannon", SC2LOTV_LOC_ID_OFFSET + 305, LocationType.VANILLA),
-
-
- # LotV
- LocationData("For Aiur!", "For Aiur!: Victory", SC2LOTV_LOC_ID_OFFSET + 400, LocationType.VICTORY),
- LocationData("For Aiur!", "For Aiur!: Southwest Hive", SC2LOTV_LOC_ID_OFFSET + 401, LocationType.VANILLA),
- LocationData("For Aiur!", "For Aiur!: Northwest Hive", SC2LOTV_LOC_ID_OFFSET + 402, LocationType.VANILLA),
- LocationData("For Aiur!", "For Aiur!: Northeast Hive", SC2LOTV_LOC_ID_OFFSET + 403, LocationType.VANILLA),
- LocationData("For Aiur!", "For Aiur!: East Hive", SC2LOTV_LOC_ID_OFFSET + 404, LocationType.VANILLA),
- LocationData("For Aiur!", "For Aiur!: West Conduit", SC2LOTV_LOC_ID_OFFSET + 405, LocationType.EXTRA),
- LocationData("For Aiur!", "For Aiur!: Middle Conduit", SC2LOTV_LOC_ID_OFFSET + 406, LocationType.EXTRA),
- LocationData("For Aiur!", "For Aiur!: Northeast Conduit", SC2LOTV_LOC_ID_OFFSET + 407, LocationType.EXTRA),
- LocationData("The Growing Shadow", "The Growing Shadow: Victory", SC2LOTV_LOC_ID_OFFSET + 500, LocationType.VICTORY,
- lambda state: logic.protoss_common_unit(state)
- and logic.protoss_basic_anti_air(state)),
- LocationData("The Growing Shadow", "The Growing Shadow: Close Pylon", SC2LOTV_LOC_ID_OFFSET + 501, LocationType.VANILLA),
- LocationData("The Growing Shadow", "The Growing Shadow: East Pylon", SC2LOTV_LOC_ID_OFFSET + 502, LocationType.VANILLA,
- lambda state: logic.protoss_common_unit(state)
- and logic.protoss_basic_anti_air(state)),
- LocationData("The Growing Shadow", "The Growing Shadow: West Pylon", SC2LOTV_LOC_ID_OFFSET + 503, LocationType.VANILLA,
- lambda state: logic.protoss_common_unit(state)
- and logic.protoss_basic_anti_air(state)),
- LocationData("The Growing Shadow", "The Growing Shadow: Nexus", SC2LOTV_LOC_ID_OFFSET + 504, LocationType.EXTRA),
- LocationData("The Growing Shadow", "The Growing Shadow: Templar Base", SC2LOTV_LOC_ID_OFFSET + 505, LocationType.EXTRA,
- lambda state: logic.protoss_common_unit(state)
- and logic.protoss_basic_anti_air(state)),
- LocationData("The Spear of Adun", "The Spear of Adun: Victory", SC2LOTV_LOC_ID_OFFSET + 600, LocationType.VICTORY,
- lambda state: logic.protoss_common_unit(state)
- and logic.protoss_anti_light_anti_air(state)),
- LocationData("The Spear of Adun", "The Spear of Adun: Close Warp Gate", SC2LOTV_LOC_ID_OFFSET + 601, LocationType.VANILLA),
- LocationData("The Spear of Adun", "The Spear of Adun: West Warp Gate", SC2LOTV_LOC_ID_OFFSET + 602, LocationType.VANILLA,
- lambda state: logic.protoss_common_unit(state)
- and logic.protoss_anti_light_anti_air(state)),
- LocationData("The Spear of Adun", "The Spear of Adun: North Warp Gate", SC2LOTV_LOC_ID_OFFSET + 603, LocationType.VANILLA,
- lambda state: logic.protoss_common_unit(state)
- and logic.protoss_anti_light_anti_air(state)),
- LocationData("The Spear of Adun", "The Spear of Adun: North Power Cell", SC2LOTV_LOC_ID_OFFSET + 604, LocationType.EXTRA,
- lambda state: logic.protoss_common_unit(state)
- and logic.protoss_anti_light_anti_air(state)),
- LocationData("The Spear of Adun", "The Spear of Adun: East Power Cell", SC2LOTV_LOC_ID_OFFSET + 605, LocationType.EXTRA,
- lambda state: logic.protoss_common_unit(state)
- and logic.protoss_anti_light_anti_air(state)),
- LocationData("The Spear of Adun", "The Spear of Adun: South Power Cell", SC2LOTV_LOC_ID_OFFSET + 606, LocationType.EXTRA,
- lambda state: logic.protoss_common_unit(state)
- and logic.protoss_anti_light_anti_air(state)),
- LocationData("The Spear of Adun", "The Spear of Adun: Southeast Power Cell", SC2LOTV_LOC_ID_OFFSET + 607, LocationType.EXTRA,
- lambda state: logic.protoss_common_unit(state)
- and logic.protoss_anti_light_anti_air(state)),
- LocationData("Sky Shield", "Sky Shield: Victory", SC2LOTV_LOC_ID_OFFSET + 700, LocationType.VICTORY,
- lambda state: logic.protoss_common_unit(state)
- and logic.protoss_basic_anti_air(state)),
- LocationData("Sky Shield", "Sky Shield: Mid EMP Scrambler", SC2LOTV_LOC_ID_OFFSET + 701, LocationType.VANILLA,
- lambda state: logic.protoss_common_unit(state)
- and logic.protoss_basic_anti_air(state)),
- LocationData("Sky Shield", "Sky Shield: Southeast EMP Scrambler", SC2LOTV_LOC_ID_OFFSET + 702, LocationType.VANILLA,
- lambda state: logic.protoss_common_unit(state)
- and logic.protoss_basic_anti_air(state)),
- LocationData("Sky Shield", "Sky Shield: North EMP Scrambler", SC2LOTV_LOC_ID_OFFSET + 703, LocationType.VANILLA,
- lambda state: logic.protoss_common_unit(state)
- and logic.protoss_basic_anti_air(state)),
- LocationData("Sky Shield", "Sky Shield: Mid Stabilizer", SC2LOTV_LOC_ID_OFFSET + 704, LocationType.EXTRA),
- LocationData("Sky Shield", "Sky Shield: Southwest Stabilizer", SC2LOTV_LOC_ID_OFFSET + 705, LocationType.EXTRA,
- lambda state: logic.protoss_common_unit(state)
- and logic.protoss_basic_anti_air(state)),
- LocationData("Sky Shield", "Sky Shield: Northwest Stabilizer", SC2LOTV_LOC_ID_OFFSET + 706, LocationType.EXTRA,
- lambda state: logic.protoss_common_unit(state)
- and logic.protoss_basic_anti_air(state)),
- LocationData("Sky Shield", "Sky Shield: Northeast Stabilizer", SC2LOTV_LOC_ID_OFFSET + 707, LocationType.EXTRA,
- lambda state: logic.protoss_common_unit(state)
- and logic.protoss_basic_anti_air(state)),
- LocationData("Sky Shield", "Sky Shield: Southeast Stabilizer", SC2LOTV_LOC_ID_OFFSET + 708, LocationType.EXTRA,
- lambda state: logic.protoss_common_unit(state)
- and logic.protoss_basic_anti_air(state)),
- LocationData("Sky Shield", "Sky Shield: West Raynor Base", SC2LOTV_LOC_ID_OFFSET + 709, LocationType.EXTRA,
- lambda state: logic.protoss_common_unit(state)
- and logic.protoss_basic_anti_air(state)),
- LocationData("Sky Shield", "Sky Shield: East Raynor Base", SC2LOTV_LOC_ID_OFFSET + 710, LocationType.EXTRA,
- lambda state: logic.protoss_common_unit(state)
- and logic.protoss_basic_anti_air(state)),
- LocationData("Brothers in Arms", "Brothers in Arms: Victory", SC2LOTV_LOC_ID_OFFSET + 800, LocationType.VICTORY,
- lambda state: logic.brothers_in_arms_requirement(state)),
- LocationData("Brothers in Arms", "Brothers in Arms: Mid Science Facility", SC2LOTV_LOC_ID_OFFSET + 801, LocationType.VANILLA,
- lambda state: logic.protoss_common_unit(state) or logic.take_over_ai_allies),
- LocationData("Brothers in Arms", "Brothers in Arms: North Science Facility", SC2LOTV_LOC_ID_OFFSET + 802, LocationType.VANILLA,
- lambda state: logic.brothers_in_arms_requirement(state)
- or logic.take_over_ai_allies
- and logic.advanced_tactics
- and (
- logic.terran_common_unit(state)
- or logic.protoss_common_unit(state)
- )
- ),
- LocationData("Brothers in Arms", "Brothers in Arms: South Science Facility", SC2LOTV_LOC_ID_OFFSET + 803, LocationType.VANILLA,
- lambda state: logic.brothers_in_arms_requirement(state)),
- LocationData("Amon's Reach", "Amon's Reach: Victory", SC2LOTV_LOC_ID_OFFSET + 900, LocationType.VICTORY,
- lambda state: logic.protoss_common_unit(state)
- and logic.protoss_anti_light_anti_air(state)),
- LocationData("Amon's Reach", "Amon's Reach: Close Solarite Reserve", SC2LOTV_LOC_ID_OFFSET + 901, LocationType.VANILLA),
- LocationData("Amon's Reach", "Amon's Reach: North Solarite Reserve", SC2LOTV_LOC_ID_OFFSET + 902, LocationType.VANILLA,
- lambda state: logic.protoss_common_unit(state)
- and logic.protoss_anti_light_anti_air(state)),
- LocationData("Amon's Reach", "Amon's Reach: East Solarite Reserve", SC2LOTV_LOC_ID_OFFSET + 903, LocationType.VANILLA,
- lambda state: logic.protoss_common_unit(state)
- and logic.protoss_anti_light_anti_air(state)),
- LocationData("Amon's Reach", "Amon's Reach: West Launch Bay", SC2LOTV_LOC_ID_OFFSET + 904, LocationType.EXTRA,
- lambda state: logic.protoss_common_unit(state)
- and logic.protoss_anti_light_anti_air(state)),
- LocationData("Amon's Reach", "Amon's Reach: South Launch Bay", SC2LOTV_LOC_ID_OFFSET + 905, LocationType.EXTRA,
- lambda state: logic.protoss_common_unit(state)
- and logic.protoss_anti_light_anti_air(state)),
- LocationData("Amon's Reach", "Amon's Reach: Northwest Launch Bay", SC2LOTV_LOC_ID_OFFSET + 906, LocationType.EXTRA,
- lambda state: logic.protoss_common_unit(state)
- and logic.protoss_anti_light_anti_air(state)),
- LocationData("Amon's Reach", "Amon's Reach: East Launch Bay", SC2LOTV_LOC_ID_OFFSET + 907, LocationType.EXTRA,
- lambda state: logic.protoss_common_unit(state)
- and logic.protoss_anti_light_anti_air(state)),
- LocationData("Last Stand", "Last Stand: Victory", SC2LOTV_LOC_ID_OFFSET + 1000, LocationType.VICTORY,
- lambda state: logic.last_stand_requirement(state)),
- LocationData("Last Stand", "Last Stand: West Zenith Stone", SC2LOTV_LOC_ID_OFFSET + 1001, LocationType.VANILLA,
- lambda state: logic.last_stand_requirement(state)),
- LocationData("Last Stand", "Last Stand: North Zenith Stone", SC2LOTV_LOC_ID_OFFSET + 1002, LocationType.VANILLA,
- lambda state: logic.last_stand_requirement(state)),
- LocationData("Last Stand", "Last Stand: East Zenith Stone", SC2LOTV_LOC_ID_OFFSET + 1003, LocationType.VANILLA,
- lambda state: logic.last_stand_requirement(state)),
- LocationData("Last Stand", "Last Stand: 1 Billion Zerg", SC2LOTV_LOC_ID_OFFSET + 1004, LocationType.EXTRA,
- lambda state: logic.last_stand_requirement(state)),
- LocationData("Last Stand", "Last Stand: 1.5 Billion Zerg", SC2LOTV_LOC_ID_OFFSET + 1005, LocationType.VANILLA,
- lambda state: logic.last_stand_requirement(state) and (
- state.has_all({ItemNames.KHAYDARIN_MONOLITH, ItemNames.PHOTON_CANNON, ItemNames.SHIELD_BATTERY}, player)
- or state.has_any({ItemNames.SOA_SOLAR_LANCE, ItemNames.SOA_DEPLOY_FENIX}, player)
- )),
- LocationData("Forbidden Weapon", "Forbidden Weapon: Victory", SC2LOTV_LOC_ID_OFFSET + 1100, LocationType.VICTORY,
- lambda state: logic.protoss_common_unit(state)
- and logic.protoss_anti_armor_anti_air(state)),
- LocationData("Forbidden Weapon", "Forbidden Weapon: South Solarite", SC2LOTV_LOC_ID_OFFSET + 1101, LocationType.VANILLA,
- lambda state: logic.protoss_common_unit(state)
- and logic.protoss_anti_armor_anti_air(state)),
- LocationData("Forbidden Weapon", "Forbidden Weapon: North Solarite", SC2LOTV_LOC_ID_OFFSET + 1102, LocationType.VANILLA,
- lambda state: logic.protoss_common_unit(state)
- and logic.protoss_anti_armor_anti_air(state)),
- LocationData("Forbidden Weapon", "Forbidden Weapon: Northwest Solarite", SC2LOTV_LOC_ID_OFFSET + 1103, LocationType.VANILLA,
- lambda state: logic.protoss_common_unit(state)
- and logic.protoss_anti_armor_anti_air(state)),
- LocationData("Temple of Unification", "Temple of Unification: Victory", SC2LOTV_LOC_ID_OFFSET + 1200, LocationType.VICTORY,
- lambda state: logic.protoss_common_unit(state)
- and logic.protoss_anti_armor_anti_air(state)),
- LocationData("Temple of Unification", "Temple of Unification: Mid Celestial Lock", SC2LOTV_LOC_ID_OFFSET + 1201, LocationType.EXTRA,
- lambda state: logic.protoss_common_unit(state)
- and logic.protoss_anti_armor_anti_air(state)),
- LocationData("Temple of Unification", "Temple of Unification: West Celestial Lock", SC2LOTV_LOC_ID_OFFSET + 1202, LocationType.EXTRA,
- lambda state: logic.protoss_common_unit(state)
- and logic.protoss_anti_armor_anti_air(state)),
- LocationData("Temple of Unification", "Temple of Unification: South Celestial Lock", SC2LOTV_LOC_ID_OFFSET + 1203, LocationType.EXTRA,
- lambda state: logic.protoss_common_unit(state)
- and logic.protoss_anti_armor_anti_air(state)),
- LocationData("Temple of Unification", "Temple of Unification: East Celestial Lock", SC2LOTV_LOC_ID_OFFSET + 1204, LocationType.EXTRA,
- lambda state: logic.protoss_common_unit(state)
- and logic.protoss_anti_armor_anti_air(state)),
- LocationData("Temple of Unification", "Temple of Unification: North Celestial Lock", SC2LOTV_LOC_ID_OFFSET + 1205, LocationType.EXTRA,
- lambda state: logic.protoss_common_unit(state)
- and logic.protoss_anti_armor_anti_air(state)),
- LocationData("Temple of Unification", "Temple of Unification: Titanic Warp Prism", SC2LOTV_LOC_ID_OFFSET + 1206, LocationType.VANILLA,
- lambda state: logic.protoss_common_unit(state)
- and logic.protoss_anti_armor_anti_air(state)),
- LocationData("The Infinite Cycle", "The Infinite Cycle: Victory", SC2LOTV_LOC_ID_OFFSET + 1300, LocationType.VICTORY,
- lambda state: logic.the_infinite_cycle_requirement(state)),
- LocationData("The Infinite Cycle", "The Infinite Cycle: First Hall of Revelation", SC2LOTV_LOC_ID_OFFSET + 1301, LocationType.EXTRA,
- lambda state: logic.the_infinite_cycle_requirement(state)),
- LocationData("The Infinite Cycle", "The Infinite Cycle: Second Hall of Revelation", SC2LOTV_LOC_ID_OFFSET + 1302, LocationType.EXTRA,
- lambda state: logic.the_infinite_cycle_requirement(state)),
- LocationData("The Infinite Cycle", "The Infinite Cycle: First Xel'Naga Device", SC2LOTV_LOC_ID_OFFSET + 1303, LocationType.VANILLA,
- lambda state: logic.the_infinite_cycle_requirement(state)),
- LocationData("The Infinite Cycle", "The Infinite Cycle: Second Xel'Naga Device", SC2LOTV_LOC_ID_OFFSET + 1304, LocationType.VANILLA,
- lambda state: logic.the_infinite_cycle_requirement(state)),
- LocationData("The Infinite Cycle", "The Infinite Cycle: Third Xel'Naga Device", SC2LOTV_LOC_ID_OFFSET + 1305, LocationType.VANILLA,
- lambda state: logic.the_infinite_cycle_requirement(state)),
- LocationData("Harbinger of Oblivion", "Harbinger of Oblivion: Victory", SC2LOTV_LOC_ID_OFFSET + 1400, LocationType.VICTORY,
- lambda state: logic.harbinger_of_oblivion_requirement(state)),
- LocationData("Harbinger of Oblivion", "Harbinger of Oblivion: Artanis", SC2LOTV_LOC_ID_OFFSET + 1401, LocationType.EXTRA),
- LocationData("Harbinger of Oblivion", "Harbinger of Oblivion: Northwest Void Crystal", SC2LOTV_LOC_ID_OFFSET + 1402, LocationType.EXTRA,
- lambda state: logic.harbinger_of_oblivion_requirement(state)),
- LocationData("Harbinger of Oblivion", "Harbinger of Oblivion: Northeast Void Crystal", SC2LOTV_LOC_ID_OFFSET + 1403, LocationType.EXTRA,
- lambda state: logic.harbinger_of_oblivion_requirement(state)),
- LocationData("Harbinger of Oblivion", "Harbinger of Oblivion: Southwest Void Crystal", SC2LOTV_LOC_ID_OFFSET + 1404, LocationType.EXTRA,
- lambda state: logic.harbinger_of_oblivion_requirement(state)),
- LocationData("Harbinger of Oblivion", "Harbinger of Oblivion: Southeast Void Crystal", SC2LOTV_LOC_ID_OFFSET + 1405, LocationType.EXTRA,
- lambda state: logic.harbinger_of_oblivion_requirement(state)),
- LocationData("Harbinger of Oblivion", "Harbinger of Oblivion: South Xel'Naga Vessel", SC2LOTV_LOC_ID_OFFSET + 1406, LocationType.VANILLA),
- LocationData("Harbinger of Oblivion", "Harbinger of Oblivion: Mid Xel'Naga Vessel", SC2LOTV_LOC_ID_OFFSET + 1407, LocationType.VANILLA,
- lambda state: logic.harbinger_of_oblivion_requirement(state)),
- LocationData("Harbinger of Oblivion", "Harbinger of Oblivion: North Xel'Naga Vessel", SC2LOTV_LOC_ID_OFFSET + 1408, LocationType.VANILLA,
- lambda state: logic.harbinger_of_oblivion_requirement(state)),
- LocationData("Unsealing the Past", "Unsealing the Past: Victory", SC2LOTV_LOC_ID_OFFSET + 1500, LocationType.VICTORY,
- lambda state: logic.protoss_basic_splash(state)
- and logic.protoss_anti_light_anti_air(state)),
- LocationData("Unsealing the Past", "Unsealing the Past: Zerg Cleared", SC2LOTV_LOC_ID_OFFSET + 1501, LocationType.EXTRA),
- LocationData("Unsealing the Past", "Unsealing the Past: First Stasis Lock", SC2LOTV_LOC_ID_OFFSET + 1502, LocationType.EXTRA,
- lambda state: logic.advanced_tactics \
- or logic.protoss_basic_splash(state)
- and logic.protoss_anti_light_anti_air(state)),
- LocationData("Unsealing the Past", "Unsealing the Past: Second Stasis Lock", SC2LOTV_LOC_ID_OFFSET + 1503, LocationType.EXTRA,
- lambda state: logic.protoss_basic_splash(state)
- and logic.protoss_anti_light_anti_air(state)),
- LocationData("Unsealing the Past", "Unsealing the Past: Third Stasis Lock", SC2LOTV_LOC_ID_OFFSET + 1504, LocationType.EXTRA,
- lambda state: logic.protoss_basic_splash(state)
- and logic.protoss_anti_light_anti_air(state)),
- LocationData("Unsealing the Past", "Unsealing the Past: Fourth Stasis Lock", SC2LOTV_LOC_ID_OFFSET + 1505, LocationType.EXTRA,
- lambda state: logic.protoss_basic_splash(state)
- and logic.protoss_anti_light_anti_air(state)),
- LocationData("Unsealing the Past", "Unsealing the Past: South Power Core", SC2LOTV_LOC_ID_OFFSET + 1506, LocationType.VANILLA,
- lambda state: logic.protoss_basic_splash(state)
- and logic.protoss_anti_light_anti_air(state)),
- LocationData("Unsealing the Past", "Unsealing the Past: East Power Core", SC2LOTV_LOC_ID_OFFSET + 1507, LocationType.VANILLA,
- lambda state: logic.protoss_basic_splash(state)
- and logic.protoss_anti_light_anti_air(state)),
- LocationData("Purification", "Purification: Victory", SC2LOTV_LOC_ID_OFFSET + 1600, LocationType.VICTORY,
- lambda state: logic.protoss_competent_comp(state)),
- LocationData("Purification", "Purification: North Sector: West Null Circuit", SC2LOTV_LOC_ID_OFFSET + 1601, LocationType.VANILLA,
- lambda state: logic.protoss_competent_comp(state)),
- LocationData("Purification", "Purification: North Sector: Northeast Null Circuit", SC2LOTV_LOC_ID_OFFSET + 1602, LocationType.EXTRA,
- lambda state: logic.protoss_competent_comp(state)),
- LocationData("Purification", "Purification: North Sector: Southeast Null Circuit", SC2LOTV_LOC_ID_OFFSET + 1603, LocationType.EXTRA,
- lambda state: logic.protoss_competent_comp(state)),
- LocationData("Purification", "Purification: South Sector: West Null Circuit", SC2LOTV_LOC_ID_OFFSET + 1604, LocationType.VANILLA,
- lambda state: logic.protoss_competent_comp(state)),
- LocationData("Purification", "Purification: South Sector: North Null Circuit", SC2LOTV_LOC_ID_OFFSET + 1605, LocationType.EXTRA,
- lambda state: logic.protoss_competent_comp(state)),
- LocationData("Purification", "Purification: South Sector: East Null Circuit", SC2LOTV_LOC_ID_OFFSET + 1606, LocationType.EXTRA,
- lambda state: logic.protoss_competent_comp(state)),
- LocationData("Purification", "Purification: West Sector: West Null Circuit", SC2LOTV_LOC_ID_OFFSET + 1607, LocationType.VANILLA,
- lambda state: logic.protoss_competent_comp(state)),
- LocationData("Purification", "Purification: West Sector: Mid Null Circuit", SC2LOTV_LOC_ID_OFFSET + 1608, LocationType.EXTRA,
- lambda state: logic.protoss_competent_comp(state)),
- LocationData("Purification", "Purification: West Sector: East Null Circuit", SC2LOTV_LOC_ID_OFFSET + 1609, LocationType.EXTRA,
- lambda state: logic.protoss_competent_comp(state)),
- LocationData("Purification", "Purification: East Sector: North Null Circuit", SC2LOTV_LOC_ID_OFFSET + 1610, LocationType.VANILLA,
- lambda state: logic.protoss_competent_comp(state)),
- LocationData("Purification", "Purification: East Sector: West Null Circuit", SC2LOTV_LOC_ID_OFFSET + 1611, LocationType.EXTRA,
- lambda state: logic.protoss_competent_comp(state)),
- LocationData("Purification", "Purification: East Sector: South Null Circuit", SC2LOTV_LOC_ID_OFFSET + 1612, LocationType.EXTRA,
- lambda state: logic.protoss_competent_comp(state)),
- LocationData("Purification", "Purification: Purifier Warden", SC2LOTV_LOC_ID_OFFSET + 1613, LocationType.VANILLA,
- lambda state: logic.protoss_competent_comp(state)),
- LocationData("Steps of the Rite", "Steps of the Rite: Victory", SC2LOTV_LOC_ID_OFFSET + 1700, LocationType.VICTORY,
- lambda state: logic.steps_of_the_rite_requirement(state)),
- LocationData("Steps of the Rite", "Steps of the Rite: First Terrazine Fog", SC2LOTV_LOC_ID_OFFSET + 1701, LocationType.EXTRA,
- lambda state: logic.steps_of_the_rite_requirement(state)),
- LocationData("Steps of the Rite", "Steps of the Rite: Southwest Guardian", SC2LOTV_LOC_ID_OFFSET + 1702, LocationType.EXTRA,
- lambda state: logic.steps_of_the_rite_requirement(state)),
- LocationData("Steps of the Rite", "Steps of the Rite: West Guardian", SC2LOTV_LOC_ID_OFFSET + 1703, LocationType.EXTRA,
- lambda state: logic.steps_of_the_rite_requirement(state)),
- LocationData("Steps of the Rite", "Steps of the Rite: Northwest Guardian", SC2LOTV_LOC_ID_OFFSET + 1704, LocationType.EXTRA,
- lambda state: logic.steps_of_the_rite_requirement(state)),
- LocationData("Steps of the Rite", "Steps of the Rite: Northeast Guardian", SC2LOTV_LOC_ID_OFFSET + 1705, LocationType.EXTRA,
- lambda state: logic.steps_of_the_rite_requirement(state)),
- LocationData("Steps of the Rite", "Steps of the Rite: North Mothership", SC2LOTV_LOC_ID_OFFSET + 1706, LocationType.VANILLA,
- lambda state: logic.steps_of_the_rite_requirement(state)),
- LocationData("Steps of the Rite", "Steps of the Rite: South Mothership", SC2LOTV_LOC_ID_OFFSET + 1707, LocationType.VANILLA,
- lambda state: logic.steps_of_the_rite_requirement(state)),
- LocationData("Rak'Shir", "Rak'Shir: Victory", SC2LOTV_LOC_ID_OFFSET + 1800, LocationType.VICTORY,
- lambda state: logic.protoss_competent_comp(state)),
- LocationData("Rak'Shir", "Rak'Shir: North Slayn Elemental", SC2LOTV_LOC_ID_OFFSET + 1801, LocationType.VANILLA,
- lambda state: logic.protoss_competent_comp(state)),
- LocationData("Rak'Shir", "Rak'Shir: Southwest Slayn Elemental", SC2LOTV_LOC_ID_OFFSET + 1802, LocationType.VANILLA,
- lambda state: logic.protoss_competent_comp(state)),
- LocationData("Rak'Shir", "Rak'Shir: East Slayn Elemental", SC2LOTV_LOC_ID_OFFSET + 1803, LocationType.VANILLA,
- lambda state: logic.protoss_competent_comp(state)),
- LocationData("Templar's Charge", "Templar's Charge: Victory", SC2LOTV_LOC_ID_OFFSET + 1900, LocationType.VICTORY,
- lambda state: logic.templars_charge_requirement(state)),
- LocationData("Templar's Charge", "Templar's Charge: Northwest Power Core", SC2LOTV_LOC_ID_OFFSET + 1901, LocationType.EXTRA,
- lambda state: logic.templars_charge_requirement(state)),
- LocationData("Templar's Charge", "Templar's Charge: Northeast Power Core", SC2LOTV_LOC_ID_OFFSET + 1902, LocationType.EXTRA,
- lambda state: logic.templars_charge_requirement(state)),
- LocationData("Templar's Charge", "Templar's Charge: Southeast Power Core", SC2LOTV_LOC_ID_OFFSET + 1903, LocationType.EXTRA,
- lambda state: logic.templars_charge_requirement(state)),
- LocationData("Templar's Charge", "Templar's Charge: West Hybrid Stasis Chamber", SC2LOTV_LOC_ID_OFFSET + 1904, LocationType.VANILLA,
- lambda state: logic.templars_charge_requirement(state)),
- LocationData("Templar's Charge", "Templar's Charge: Southeast Hybrid Stasis Chamber", SC2LOTV_LOC_ID_OFFSET + 1905, LocationType.VANILLA,
- lambda state: logic.protoss_fleet(state)),
- LocationData("Templar's Return", "Templar's Return: Victory", SC2LOTV_LOC_ID_OFFSET + 2000, LocationType.VICTORY,
- lambda state: logic.templars_return_requirement(state)),
- LocationData("Templar's Return", "Templar's Return: Citadel: First Gate", SC2LOTV_LOC_ID_OFFSET + 2001, LocationType.EXTRA),
- LocationData("Templar's Return", "Templar's Return: Citadel: Second Gate", SC2LOTV_LOC_ID_OFFSET + 2002, LocationType.EXTRA),
- LocationData("Templar's Return", "Templar's Return: Citadel: Power Structure", SC2LOTV_LOC_ID_OFFSET + 2003, LocationType.VANILLA),
- LocationData("Templar's Return", "Templar's Return: Temple Grounds: Gather Army", SC2LOTV_LOC_ID_OFFSET + 2004, LocationType.VANILLA,
- lambda state: logic.templars_return_requirement(state)),
- LocationData("Templar's Return", "Templar's Return: Temple Grounds: Power Structure", SC2LOTV_LOC_ID_OFFSET + 2005, LocationType.VANILLA,
- lambda state: logic.templars_return_requirement(state)),
- LocationData("Templar's Return", "Templar's Return: Caverns: Purifier", SC2LOTV_LOC_ID_OFFSET + 2006, LocationType.EXTRA,
- lambda state: logic.templars_return_requirement(state)),
- LocationData("Templar's Return", "Templar's Return: Caverns: Dark Templar", SC2LOTV_LOC_ID_OFFSET + 2007, LocationType.EXTRA,
- lambda state: logic.templars_return_requirement(state)),
- LocationData("The Host", "The Host: Victory", SC2LOTV_LOC_ID_OFFSET + 2100, LocationType.VICTORY,
- lambda state: logic.the_host_requirement(state)),
- LocationData("The Host", "The Host: Southeast Void Shard", SC2LOTV_LOC_ID_OFFSET + 2101, LocationType.EXTRA,
- lambda state: logic.the_host_requirement(state)),
- LocationData("The Host", "The Host: South Void Shard", SC2LOTV_LOC_ID_OFFSET + 2102, LocationType.EXTRA,
- lambda state: logic.the_host_requirement(state)),
- LocationData("The Host", "The Host: Southwest Void Shard", SC2LOTV_LOC_ID_OFFSET + 2103, LocationType.EXTRA,
- lambda state: logic.the_host_requirement(state)),
- LocationData("The Host", "The Host: North Void Shard", SC2LOTV_LOC_ID_OFFSET + 2104, LocationType.EXTRA,
- lambda state: logic.the_host_requirement(state)),
- LocationData("The Host", "The Host: Northwest Void Shard", SC2LOTV_LOC_ID_OFFSET + 2105, LocationType.EXTRA,
- lambda state: logic.the_host_requirement(state)),
- LocationData("The Host", "The Host: Nerazim Warp in Zone", SC2LOTV_LOC_ID_OFFSET + 2106, LocationType.VANILLA,
- lambda state: logic.the_host_requirement(state)),
- LocationData("The Host", "The Host: Tal'darim Warp in Zone", SC2LOTV_LOC_ID_OFFSET + 2107, LocationType.VANILLA,
- lambda state: logic.the_host_requirement(state)),
- LocationData("The Host", "The Host: Purifier Warp in Zone", SC2LOTV_LOC_ID_OFFSET + 2108, LocationType.VANILLA,
- lambda state: logic.the_host_requirement(state)),
- LocationData("Salvation", "Salvation: Victory", SC2LOTV_LOC_ID_OFFSET + 2200, LocationType.VICTORY,
- lambda state: logic.salvation_requirement(state)),
- LocationData("Salvation", "Salvation: Fabrication Matrix", SC2LOTV_LOC_ID_OFFSET + 2201, LocationType.EXTRA,
- lambda state: logic.salvation_requirement(state)),
- LocationData("Salvation", "Salvation: Assault Cluster", SC2LOTV_LOC_ID_OFFSET + 2202, LocationType.EXTRA,
- lambda state: logic.salvation_requirement(state)),
- LocationData("Salvation", "Salvation: Hull Breach", SC2LOTV_LOC_ID_OFFSET + 2203, LocationType.EXTRA,
- lambda state: logic.salvation_requirement(state)),
- LocationData("Salvation", "Salvation: Core Critical", SC2LOTV_LOC_ID_OFFSET + 2204, LocationType.EXTRA,
- lambda state: logic.salvation_requirement(state)),
-
- # Epilogue
- LocationData("Into the Void", "Into the Void: Victory", SC2LOTV_LOC_ID_OFFSET + 2300, LocationType.VICTORY,
- lambda state: logic.into_the_void_requirement(state)),
- LocationData("Into the Void", "Into the Void: Corruption Source", SC2LOTV_LOC_ID_OFFSET + 2301, LocationType.EXTRA),
- LocationData("Into the Void", "Into the Void: Southwest Forward Position", SC2LOTV_LOC_ID_OFFSET + 2302, LocationType.VANILLA,
- lambda state: logic.into_the_void_requirement(state)),
- LocationData("Into the Void", "Into the Void: Northwest Forward Position", SC2LOTV_LOC_ID_OFFSET + 2303, LocationType.VANILLA,
- lambda state: logic.into_the_void_requirement(state)),
- LocationData("Into the Void", "Into the Void: Southeast Forward Position", SC2LOTV_LOC_ID_OFFSET + 2304, LocationType.VANILLA,
- lambda state: logic.into_the_void_requirement(state)),
- LocationData("Into the Void", "Into the Void: Northeast Forward Position", SC2LOTV_LOC_ID_OFFSET + 2305, LocationType.VANILLA),
- LocationData("The Essence of Eternity", "The Essence of Eternity: Victory", SC2LOTV_LOC_ID_OFFSET + 2400, LocationType.VICTORY,
- lambda state: logic.essence_of_eternity_requirement(state)),
- LocationData("The Essence of Eternity", "The Essence of Eternity: Void Trashers", SC2LOTV_LOC_ID_OFFSET + 2401, LocationType.EXTRA),
- LocationData("Amon's Fall", "Amon's Fall: Victory", SC2LOTV_LOC_ID_OFFSET + 2500, LocationType.VICTORY,
- lambda state: logic.amons_fall_requirement(state)),
-
- # Nova Covert Ops
- LocationData("The Escape", "The Escape: Victory", SC2NCO_LOC_ID_OFFSET + 100, LocationType.VICTORY,
- lambda state: logic.the_escape_requirement(state)),
- LocationData("The Escape", "The Escape: Rifle", SC2NCO_LOC_ID_OFFSET + 101, LocationType.VANILLA,
- lambda state: logic.the_escape_first_stage_requirement(state)),
- LocationData("The Escape", "The Escape: Grenades", SC2NCO_LOC_ID_OFFSET + 102, LocationType.VANILLA,
- lambda state: logic.the_escape_first_stage_requirement(state)),
- LocationData("The Escape", "The Escape: Agent Delta", SC2NCO_LOC_ID_OFFSET + 103, LocationType.VANILLA,
- lambda state: logic.the_escape_requirement(state)),
- LocationData("The Escape", "The Escape: Agent Pierce", SC2NCO_LOC_ID_OFFSET + 104, LocationType.VANILLA,
- lambda state: logic.the_escape_requirement(state)),
- LocationData("The Escape", "The Escape: Agent Stone", SC2NCO_LOC_ID_OFFSET + 105, LocationType.VANILLA,
- lambda state: logic.the_escape_requirement(state)),
- LocationData("Sudden Strike", "Sudden Strike: Victory", SC2NCO_LOC_ID_OFFSET + 200, LocationType.VICTORY,
- lambda state: logic.sudden_strike_requirement(state)),
- LocationData("Sudden Strike", "Sudden Strike: Research Center", SC2NCO_LOC_ID_OFFSET + 201, LocationType.VANILLA,
- lambda state: logic.sudden_strike_can_reach_objectives(state)),
- LocationData("Sudden Strike", "Sudden Strike: Weaponry Labs", SC2NCO_LOC_ID_OFFSET + 202, LocationType.VANILLA,
- lambda state: logic.sudden_strike_can_reach_objectives(state)),
- LocationData("Sudden Strike", "Sudden Strike: Brutalisk", SC2NCO_LOC_ID_OFFSET + 203, LocationType.EXTRA,
- lambda state: logic.sudden_strike_requirement(state)),
- LocationData("Enemy Intelligence", "Enemy Intelligence: Victory", SC2NCO_LOC_ID_OFFSET + 300, LocationType.VICTORY,
- lambda state: logic.enemy_intelligence_third_stage_requirement(state)),
- LocationData("Enemy Intelligence", "Enemy Intelligence: West Garrison", SC2NCO_LOC_ID_OFFSET + 301, LocationType.EXTRA,
- lambda state: logic.enemy_intelligence_first_stage_requirement(state)),
- LocationData("Enemy Intelligence", "Enemy Intelligence: Close Garrison", SC2NCO_LOC_ID_OFFSET + 302, LocationType.EXTRA,
- lambda state: logic.enemy_intelligence_first_stage_requirement(state)),
- LocationData("Enemy Intelligence", "Enemy Intelligence: Northeast Garrison", SC2NCO_LOC_ID_OFFSET + 303, LocationType.EXTRA,
- lambda state: logic.enemy_intelligence_first_stage_requirement(state)),
- LocationData("Enemy Intelligence", "Enemy Intelligence: Southeast Garrison", SC2NCO_LOC_ID_OFFSET + 304, LocationType.EXTRA,
- lambda state: logic.enemy_intelligence_first_stage_requirement(state)
- and logic.enemy_intelligence_cliff_garrison(state)),
- LocationData("Enemy Intelligence", "Enemy Intelligence: South Garrison", SC2NCO_LOC_ID_OFFSET + 305, LocationType.EXTRA,
- lambda state: logic.enemy_intelligence_first_stage_requirement(state)),
- LocationData("Enemy Intelligence", "Enemy Intelligence: All Garrisons", SC2NCO_LOC_ID_OFFSET + 306, LocationType.VANILLA,
- lambda state: logic.enemy_intelligence_first_stage_requirement(state)
- and logic.enemy_intelligence_cliff_garrison(state)),
- LocationData("Enemy Intelligence", "Enemy Intelligence: Forces Rescued", SC2NCO_LOC_ID_OFFSET + 307, LocationType.VANILLA,
- lambda state: logic.enemy_intelligence_first_stage_requirement(state)),
- LocationData("Enemy Intelligence", "Enemy Intelligence: Communications Hub", SC2NCO_LOC_ID_OFFSET + 308, LocationType.VANILLA,
- lambda state: logic.enemy_intelligence_second_stage_requirement(state)),
- LocationData("Trouble In Paradise", "Trouble In Paradise: Victory", SC2NCO_LOC_ID_OFFSET + 400, LocationType.VICTORY,
- lambda state: logic.trouble_in_paradise_requirement(state)),
- LocationData("Trouble In Paradise", "Trouble In Paradise: North Base: West Hatchery", SC2NCO_LOC_ID_OFFSET + 401, LocationType.VANILLA,
- lambda state: logic.trouble_in_paradise_requirement(state)),
- LocationData("Trouble In Paradise", "Trouble In Paradise: North Base: North Hatchery", SC2NCO_LOC_ID_OFFSET + 402, LocationType.VANILLA,
- lambda state: logic.trouble_in_paradise_requirement(state)),
- LocationData("Trouble In Paradise", "Trouble In Paradise: North Base: East Hatchery", SC2NCO_LOC_ID_OFFSET + 403, LocationType.VANILLA),
- LocationData("Trouble In Paradise", "Trouble In Paradise: South Base: Northwest Hatchery", SC2NCO_LOC_ID_OFFSET + 404, LocationType.VANILLA,
- lambda state: logic.trouble_in_paradise_requirement(state)),
- LocationData("Trouble In Paradise", "Trouble In Paradise: South Base: Southwest Hatchery", SC2NCO_LOC_ID_OFFSET + 405, LocationType.VANILLA,
- lambda state: logic.trouble_in_paradise_requirement(state)),
- LocationData("Trouble In Paradise", "Trouble In Paradise: South Base: East Hatchery", SC2NCO_LOC_ID_OFFSET + 406, LocationType.VANILLA),
- LocationData("Trouble In Paradise", "Trouble In Paradise: North Shield Projector", SC2NCO_LOC_ID_OFFSET + 407, LocationType.EXTRA,
- lambda state: logic.trouble_in_paradise_requirement(state)),
- LocationData("Trouble In Paradise", "Trouble In Paradise: East Shield Projector", SC2NCO_LOC_ID_OFFSET + 408, LocationType.EXTRA,
- lambda state: logic.trouble_in_paradise_requirement(state)),
- LocationData("Trouble In Paradise", "Trouble In Paradise: South Shield Projector", SC2NCO_LOC_ID_OFFSET + 409, LocationType.EXTRA,
- lambda state: logic.trouble_in_paradise_requirement(state)),
- LocationData("Trouble In Paradise", "Trouble In Paradise: West Shield Projector", SC2NCO_LOC_ID_OFFSET + 410, LocationType.EXTRA,
- lambda state: logic.trouble_in_paradise_requirement(state)),
- LocationData("Trouble In Paradise", "Trouble In Paradise: Fleet Beacon", SC2NCO_LOC_ID_OFFSET + 411, LocationType.VANILLA,
- lambda state: logic.trouble_in_paradise_requirement(state)),
- LocationData("Night Terrors", "Night Terrors: Victory", SC2NCO_LOC_ID_OFFSET + 500, LocationType.VICTORY,
- lambda state: logic.night_terrors_requirement(state)),
- LocationData("Night Terrors", "Night Terrors: 1 Terrazine Node Collected", SC2NCO_LOC_ID_OFFSET + 501, LocationType.EXTRA,
- lambda state: logic.night_terrors_requirement(state)),
- LocationData("Night Terrors", "Night Terrors: 2 Terrazine Nodes Collected", SC2NCO_LOC_ID_OFFSET + 502, LocationType.EXTRA,
- lambda state: logic.night_terrors_requirement(state)),
- LocationData("Night Terrors", "Night Terrors: 3 Terrazine Nodes Collected", SC2NCO_LOC_ID_OFFSET + 503, LocationType.EXTRA,
- lambda state: logic.night_terrors_requirement(state)),
- LocationData("Night Terrors", "Night Terrors: 4 Terrazine Nodes Collected", SC2NCO_LOC_ID_OFFSET + 504, LocationType.EXTRA,
- lambda state: logic.night_terrors_requirement(state)),
- LocationData("Night Terrors", "Night Terrors: 5 Terrazine Nodes Collected", SC2NCO_LOC_ID_OFFSET + 505, LocationType.EXTRA,
- lambda state: logic.night_terrors_requirement(state)),
- LocationData("Night Terrors", "Night Terrors: HERC Outpost", SC2NCO_LOC_ID_OFFSET + 506, LocationType.VANILLA,
- lambda state: logic.night_terrors_requirement(state)),
- LocationData("Night Terrors", "Night Terrors: Umojan Mine", SC2NCO_LOC_ID_OFFSET + 507, LocationType.EXTRA,
- lambda state: logic.night_terrors_requirement(state)),
- LocationData("Night Terrors", "Night Terrors: Blightbringer", SC2NCO_LOC_ID_OFFSET + 508, LocationType.VANILLA,
- lambda state: logic.night_terrors_requirement(state)
- and logic.nova_ranged_weapon(state)
- and state.has_any(
- {ItemNames.NOVA_HELLFIRE_SHOTGUN, ItemNames.NOVA_PULSE_GRENADES, ItemNames.NOVA_STIM_INFUSION,
- ItemNames.NOVA_HOLO_DECOY}, player)),
- LocationData("Night Terrors", "Night Terrors: Science Facility", SC2NCO_LOC_ID_OFFSET + 509, LocationType.EXTRA,
- lambda state: logic.night_terrors_requirement(state)),
- LocationData("Night Terrors", "Night Terrors: Eradicators", SC2NCO_LOC_ID_OFFSET + 510, LocationType.VANILLA,
- lambda state: logic.night_terrors_requirement(state)
- and logic.nova_any_weapon(state)),
- LocationData("Flashpoint", "Flashpoint: Victory", SC2NCO_LOC_ID_OFFSET + 600, LocationType.VICTORY,
- lambda state: logic.flashpoint_far_requirement(state)),
- LocationData("Flashpoint", "Flashpoint: Close North Evidence Coordinates", SC2NCO_LOC_ID_OFFSET + 601, LocationType.EXTRA,
- lambda state: state.has_any(
- {ItemNames.LIBERATOR_RAID_ARTILLERY, ItemNames.RAVEN_HUNTER_SEEKER_WEAPON}, player)
- or logic.terran_common_unit(state)),
- LocationData("Flashpoint", "Flashpoint: Close East Evidence Coordinates", SC2NCO_LOC_ID_OFFSET + 602, LocationType.EXTRA,
- lambda state: state.has_any(
- {ItemNames.LIBERATOR_RAID_ARTILLERY, ItemNames.RAVEN_HUNTER_SEEKER_WEAPON}, player)
- or logic.terran_common_unit(state)),
- LocationData("Flashpoint", "Flashpoint: Far North Evidence Coordinates", SC2NCO_LOC_ID_OFFSET + 603, LocationType.EXTRA,
- lambda state: logic.flashpoint_far_requirement(state)),
- LocationData("Flashpoint", "Flashpoint: Far East Evidence Coordinates", SC2NCO_LOC_ID_OFFSET + 604, LocationType.EXTRA,
- lambda state: logic.flashpoint_far_requirement(state)),
- LocationData("Flashpoint", "Flashpoint: Experimental Weapon", SC2NCO_LOC_ID_OFFSET + 605, LocationType.VANILLA,
- lambda state: logic.flashpoint_far_requirement(state)),
- LocationData("Flashpoint", "Flashpoint: Northwest Subway Entrance", SC2NCO_LOC_ID_OFFSET + 606, LocationType.VANILLA,
- lambda state: state.has_any(
- {ItemNames.LIBERATOR_RAID_ARTILLERY, ItemNames.RAVEN_HUNTER_SEEKER_WEAPON}, player)
- and logic.terran_common_unit(state)
- or logic.flashpoint_far_requirement(state)),
- LocationData("Flashpoint", "Flashpoint: Southeast Subway Entrance", SC2NCO_LOC_ID_OFFSET + 607, LocationType.VANILLA,
- lambda state: state.has_any(
- {ItemNames.LIBERATOR_RAID_ARTILLERY, ItemNames.RAVEN_HUNTER_SEEKER_WEAPON}, player)
- and logic.terran_common_unit(state)
- or logic.flashpoint_far_requirement(state)),
- LocationData("Flashpoint", "Flashpoint: Northeast Subway Entrance", SC2NCO_LOC_ID_OFFSET + 608, LocationType.VANILLA,
- lambda state: logic.flashpoint_far_requirement(state)),
- LocationData("Flashpoint", "Flashpoint: Expansion Hatchery", SC2NCO_LOC_ID_OFFSET + 609, LocationType.EXTRA,
- lambda state: state.has(ItemNames.LIBERATOR_RAID_ARTILLERY, player) and logic.terran_common_unit(state)
- or logic.flashpoint_far_requirement(state)),
- LocationData("Flashpoint", "Flashpoint: Baneling Spawns", SC2NCO_LOC_ID_OFFSET + 610, LocationType.EXTRA,
- lambda state: logic.flashpoint_far_requirement(state)),
- LocationData("Flashpoint", "Flashpoint: Mutalisk Spawns", SC2NCO_LOC_ID_OFFSET + 611, LocationType.EXTRA,
- lambda state: logic.flashpoint_far_requirement(state)),
- LocationData("Flashpoint", "Flashpoint: Nydus Worm Spawns", SC2NCO_LOC_ID_OFFSET + 612, LocationType.EXTRA,
- lambda state: logic.flashpoint_far_requirement(state)),
- LocationData("Flashpoint", "Flashpoint: Lurker Spawns", SC2NCO_LOC_ID_OFFSET + 613, LocationType.EXTRA,
- lambda state: logic.flashpoint_far_requirement(state)),
- LocationData("Flashpoint", "Flashpoint: Brood Lord Spawns", SC2NCO_LOC_ID_OFFSET + 614, LocationType.EXTRA,
- lambda state: logic.flashpoint_far_requirement(state)),
- LocationData("Flashpoint", "Flashpoint: Ultralisk Spawns", SC2NCO_LOC_ID_OFFSET + 615, LocationType.EXTRA,
- lambda state: logic.flashpoint_far_requirement(state)),
- LocationData("In the Enemy's Shadow", "In the Enemy's Shadow: Victory", SC2NCO_LOC_ID_OFFSET + 700, LocationType.VICTORY,
- lambda state: logic.enemy_shadow_victory(state)),
- LocationData("In the Enemy's Shadow", "In the Enemy's Shadow: Sewers: Domination Visor", SC2NCO_LOC_ID_OFFSET + 701, LocationType.VANILLA,
- lambda state: logic.enemy_shadow_domination(state)),
- LocationData("In the Enemy's Shadow", "In the Enemy's Shadow: Sewers: Resupply Crate", SC2NCO_LOC_ID_OFFSET + 702, LocationType.EXTRA,
- lambda state: logic.enemy_shadow_first_stage(state)),
- LocationData("In the Enemy's Shadow", "In the Enemy's Shadow: Sewers: Facility Access", SC2NCO_LOC_ID_OFFSET + 703, LocationType.VANILLA,
- lambda state: logic.enemy_shadow_first_stage(state)),
- LocationData("In the Enemy's Shadow", "In the Enemy's Shadow: Facility: Northwest Door Lock", SC2NCO_LOC_ID_OFFSET + 704, LocationType.VANILLA,
- lambda state: logic.enemy_shadow_door_controls(state)),
- LocationData("In the Enemy's Shadow", "In the Enemy's Shadow: Facility: Southeast Door Lock", SC2NCO_LOC_ID_OFFSET + 705, LocationType.VANILLA,
- lambda state: logic.enemy_shadow_door_controls(state)),
- LocationData("In the Enemy's Shadow", "In the Enemy's Shadow: Facility: Blazefire Gunblade", SC2NCO_LOC_ID_OFFSET + 706, LocationType.VANILLA,
- lambda state: logic.enemy_shadow_second_stage(state)
- and (story_tech_granted
- or state.has(ItemNames.NOVA_BLINK, player)
- or (adv_tactics and state.has_all({ItemNames.NOVA_DOMINATION, ItemNames.NOVA_HOLO_DECOY, ItemNames.NOVA_JUMP_SUIT_MODULE}, player))
- )
- ),
- LocationData("In the Enemy's Shadow", "In the Enemy's Shadow: Facility: Blink Suit", SC2NCO_LOC_ID_OFFSET + 707, LocationType.VANILLA,
- lambda state: logic.enemy_shadow_second_stage(state)),
- LocationData("In the Enemy's Shadow", "In the Enemy's Shadow: Facility: Advanced Weaponry", SC2NCO_LOC_ID_OFFSET + 708, LocationType.VANILLA,
- lambda state: logic.enemy_shadow_second_stage(state)),
- LocationData("In the Enemy's Shadow", "In the Enemy's Shadow: Facility: Entrance Resupply Crate", SC2NCO_LOC_ID_OFFSET + 709, LocationType.EXTRA,
- lambda state: logic.enemy_shadow_first_stage(state)),
- LocationData("In the Enemy's Shadow", "In the Enemy's Shadow: Facility: West Resupply Crate", SC2NCO_LOC_ID_OFFSET + 710, LocationType.EXTRA,
- lambda state: logic.enemy_shadow_second_stage(state)),
- LocationData("In the Enemy's Shadow", "In the Enemy's Shadow: Facility: North Resupply Crate", SC2NCO_LOC_ID_OFFSET + 711, LocationType.EXTRA,
- lambda state: logic.enemy_shadow_second_stage(state)),
- LocationData("In the Enemy's Shadow", "In the Enemy's Shadow: Facility: East Resupply Crate", SC2NCO_LOC_ID_OFFSET + 712, LocationType.EXTRA,
- lambda state: logic.enemy_shadow_second_stage(state)),
- LocationData("In the Enemy's Shadow", "In the Enemy's Shadow: Facility: South Resupply Crate", SC2NCO_LOC_ID_OFFSET + 713, LocationType.EXTRA,
- lambda state: logic.enemy_shadow_second_stage(state)),
- LocationData("Dark Skies", "Dark Skies: Victory", SC2NCO_LOC_ID_OFFSET + 800, LocationType.VICTORY,
- lambda state: logic.dark_skies_requirement(state)),
- LocationData("Dark Skies", "Dark Skies: First Squadron of Dominion Fleet", SC2NCO_LOC_ID_OFFSET + 801, LocationType.EXTRA,
- lambda state: logic.dark_skies_requirement(state)),
- LocationData("Dark Skies", "Dark Skies: Remainder of Dominion Fleet", SC2NCO_LOC_ID_OFFSET + 802, LocationType.EXTRA,
- lambda state: logic.dark_skies_requirement(state)),
- LocationData("Dark Skies", "Dark Skies: Ji'nara", SC2NCO_LOC_ID_OFFSET + 803, LocationType.EXTRA,
- lambda state: logic.dark_skies_requirement(state)),
- LocationData("Dark Skies", "Dark Skies: Science Facility", SC2NCO_LOC_ID_OFFSET + 804, LocationType.VANILLA,
- lambda state: logic.dark_skies_requirement(state)),
- LocationData("End Game", "End Game: Victory", SC2NCO_LOC_ID_OFFSET + 900, LocationType.VICTORY,
- lambda state: logic.end_game_requirement(state) and logic.nova_any_weapon(state)),
- LocationData("End Game", "End Game: Xanthos", SC2NCO_LOC_ID_OFFSET + 901, LocationType.VANILLA,
- lambda state: logic.end_game_requirement(state)),
- ]
-
- beat_events = []
- # Filtering out excluded locations
- if world is not None:
- excluded_location_types = get_location_types(world, LocationInclusion.option_disabled)
- plando_locations = get_plando_locations(world)
- exclude_locations = get_option_value(world, "exclude_locations")
- location_table = [location for location in location_table
- if (location.type is LocationType.VICTORY or location.name not in exclude_locations)
- and location.type not in excluded_location_types
- or location.name in plando_locations]
- for i, location_data in enumerate(location_table):
- # Removing all item-based logic on No Logic
- if logic_level == RequiredTactics.option_no_logic:
- location_data = location_data._replace(rule=Location.access_rule)
- location_table[i] = location_data
- # Generating Beat event locations
- if location_data.name.endswith((": Victory", ": Defeat")):
- beat_events.append(
- location_data._replace(name="Beat " + location_data.name.rsplit(": ", 1)[0], code=None)
- )
- return tuple(location_table + beat_events)
-
-lookup_location_id_to_type = {loc.code: loc.type for loc in get_locations(None) if loc.code is not None}
\ No newline at end of file
diff --git a/worlds/sc2/MissionTables.py b/worlds/sc2/MissionTables.py
deleted file mode 100644
index 08e1f133..00000000
--- a/worlds/sc2/MissionTables.py
+++ /dev/null
@@ -1,739 +0,0 @@
-from typing import NamedTuple, Dict, List, Set, Union, Literal, Iterable, Callable
-from enum import IntEnum, Enum
-
-
-class SC2Race(IntEnum):
- ANY = 0
- TERRAN = 1
- ZERG = 2
- PROTOSS = 3
-
-
-class MissionPools(IntEnum):
- STARTER = 0
- EASY = 1
- MEDIUM = 2
- HARD = 3
- VERY_HARD = 4
- FINAL = 5
-
-
-class SC2CampaignGoalPriority(IntEnum):
- """
- Campaign's priority to goal election
- """
- NONE = 0
- MINI_CAMPAIGN = 1 # A goal shouldn't be in a mini-campaign if there's at least one 'big' campaign
- HARD = 2 # A campaign ending with a hard mission
- VERY_HARD = 3 # A campaign ending with a very hard mission
- EPILOGUE = 4 # Epilogue shall be always preferred as the goal if present
-
-
-class SC2Campaign(Enum):
-
- def __new__(cls, *args, **kwargs):
- value = len(cls.__members__) + 1
- obj = object.__new__(cls)
- obj._value_ = value
- return obj
-
- def __init__(self, campaign_id: int, name: str, goal_priority: SC2CampaignGoalPriority, race: SC2Race):
- self.id = campaign_id
- self.campaign_name = name
- self.goal_priority = goal_priority
- self.race = race
-
- def __lt__(self, other: "SC2Campaign"):
- return self.id < other.id
-
- GLOBAL = 0, "Global", SC2CampaignGoalPriority.NONE, SC2Race.ANY
- WOL = 1, "Wings of Liberty", SC2CampaignGoalPriority.VERY_HARD, SC2Race.TERRAN
- PROPHECY = 2, "Prophecy", SC2CampaignGoalPriority.MINI_CAMPAIGN, SC2Race.PROTOSS
- HOTS = 3, "Heart of the Swarm", SC2CampaignGoalPriority.HARD, SC2Race.ZERG
- PROLOGUE = 4, "Whispers of Oblivion (Legacy of the Void: Prologue)", SC2CampaignGoalPriority.MINI_CAMPAIGN, SC2Race.PROTOSS
- LOTV = 5, "Legacy of the Void", SC2CampaignGoalPriority.VERY_HARD, SC2Race.PROTOSS
- EPILOGUE = 6, "Into the Void (Legacy of the Void: Epilogue)", SC2CampaignGoalPriority.EPILOGUE, SC2Race.ANY
- NCO = 7, "Nova Covert Ops", SC2CampaignGoalPriority.HARD, SC2Race.TERRAN
-
-
-class SC2Mission(Enum):
-
- def __new__(cls, *args, **kwargs):
- value = len(cls.__members__) + 1
- obj = object.__new__(cls)
- obj._value_ = value
- return obj
-
- def __init__(self, mission_id: int, name: str, campaign: SC2Campaign, area: str, race: SC2Race, pool: MissionPools, map_file: str, build: bool = True):
- self.id = mission_id
- self.mission_name = name
- self.campaign = campaign
- self.area = area
- self.race = race
- self.pool = pool
- self.map_file = map_file
- self.build = build
-
- # Wings of Liberty
- LIBERATION_DAY = 1, "Liberation Day", SC2Campaign.WOL, "Mar Sara", SC2Race.ANY, MissionPools.STARTER, "ap_liberation_day", False
- THE_OUTLAWS = 2, "The Outlaws", SC2Campaign.WOL, "Mar Sara", SC2Race.TERRAN, MissionPools.EASY, "ap_the_outlaws"
- ZERO_HOUR = 3, "Zero Hour", SC2Campaign.WOL, "Mar Sara", SC2Race.TERRAN, MissionPools.EASY, "ap_zero_hour"
- EVACUATION = 4, "Evacuation", SC2Campaign.WOL, "Colonist", SC2Race.TERRAN, MissionPools.EASY, "ap_evacuation"
- OUTBREAK = 5, "Outbreak", SC2Campaign.WOL, "Colonist", SC2Race.TERRAN, MissionPools.EASY, "ap_outbreak"
- SAFE_HAVEN = 6, "Safe Haven", SC2Campaign.WOL, "Colonist", SC2Race.TERRAN, MissionPools.MEDIUM, "ap_safe_haven"
- HAVENS_FALL = 7, "Haven's Fall", SC2Campaign.WOL, "Colonist", SC2Race.TERRAN, MissionPools.MEDIUM, "ap_havens_fall"
- SMASH_AND_GRAB = 8, "Smash and Grab", SC2Campaign.WOL, "Artifact", SC2Race.TERRAN, MissionPools.EASY, "ap_smash_and_grab"
- THE_DIG = 9, "The Dig", SC2Campaign.WOL, "Artifact", SC2Race.TERRAN, MissionPools.MEDIUM, "ap_the_dig"
- THE_MOEBIUS_FACTOR = 10, "The Moebius Factor", SC2Campaign.WOL, "Artifact", SC2Race.TERRAN, MissionPools.MEDIUM, "ap_the_moebius_factor"
- SUPERNOVA = 11, "Supernova", SC2Campaign.WOL, "Artifact", SC2Race.TERRAN, MissionPools.HARD, "ap_supernova"
- MAW_OF_THE_VOID = 12, "Maw of the Void", SC2Campaign.WOL, "Artifact", SC2Race.TERRAN, MissionPools.HARD, "ap_maw_of_the_void"
- DEVILS_PLAYGROUND = 13, "Devil's Playground", SC2Campaign.WOL, "Covert", SC2Race.TERRAN, MissionPools.EASY, "ap_devils_playground"
- WELCOME_TO_THE_JUNGLE = 14, "Welcome to the Jungle", SC2Campaign.WOL, "Covert", SC2Race.TERRAN, MissionPools.MEDIUM, "ap_welcome_to_the_jungle"
- BREAKOUT = 15, "Breakout", SC2Campaign.WOL, "Covert", SC2Race.ANY, MissionPools.STARTER, "ap_breakout", False
- GHOST_OF_A_CHANCE = 16, "Ghost of a Chance", SC2Campaign.WOL, "Covert", SC2Race.ANY, MissionPools.STARTER, "ap_ghost_of_a_chance", False
- THE_GREAT_TRAIN_ROBBERY = 17, "The Great Train Robbery", SC2Campaign.WOL, "Rebellion", SC2Race.TERRAN, MissionPools.MEDIUM, "ap_the_great_train_robbery"
- CUTTHROAT = 18, "Cutthroat", SC2Campaign.WOL, "Rebellion", SC2Race.TERRAN, MissionPools.MEDIUM, "ap_cutthroat"
- ENGINE_OF_DESTRUCTION = 19, "Engine of Destruction", SC2Campaign.WOL, "Rebellion", SC2Race.TERRAN, MissionPools.HARD, "ap_engine_of_destruction"
- MEDIA_BLITZ = 20, "Media Blitz", SC2Campaign.WOL, "Rebellion", SC2Race.TERRAN, MissionPools.MEDIUM, "ap_media_blitz"
- PIERCING_OF_THE_SHROUD = 21, "Piercing the Shroud", SC2Campaign.WOL, "Rebellion", SC2Race.TERRAN, MissionPools.STARTER, "ap_piercing_the_shroud", False
- GATES_OF_HELL = 26, "Gates of Hell", SC2Campaign.WOL, "Char", SC2Race.TERRAN, MissionPools.HARD, "ap_gates_of_hell"
- BELLY_OF_THE_BEAST = 27, "Belly of the Beast", SC2Campaign.WOL, "Char", SC2Race.ANY, MissionPools.STARTER, "ap_belly_of_the_beast", False
- SHATTER_THE_SKY = 28, "Shatter the Sky", SC2Campaign.WOL, "Char", SC2Race.TERRAN, MissionPools.HARD, "ap_shatter_the_sky"
- ALL_IN = 29, "All-In", SC2Campaign.WOL, "Char", SC2Race.TERRAN, MissionPools.VERY_HARD, "ap_all_in"
-
- # Prophecy
- WHISPERS_OF_DOOM = 22, "Whispers of Doom", SC2Campaign.PROPHECY, "_1", SC2Race.ANY, MissionPools.STARTER, "ap_whispers_of_doom", False
- A_SINISTER_TURN = 23, "A Sinister Turn", SC2Campaign.PROPHECY, "_2", SC2Race.PROTOSS, MissionPools.MEDIUM, "ap_a_sinister_turn"
- ECHOES_OF_THE_FUTURE = 24, "Echoes of the Future", SC2Campaign.PROPHECY, "_3", SC2Race.PROTOSS, MissionPools.MEDIUM, "ap_echoes_of_the_future"
- IN_UTTER_DARKNESS = 25, "In Utter Darkness", SC2Campaign.PROPHECY, "_4", SC2Race.PROTOSS, MissionPools.HARD, "ap_in_utter_darkness"
-
- # Heart of the Swarm
- LAB_RAT = 30, "Lab Rat", SC2Campaign.HOTS, "Umoja", SC2Race.ZERG, MissionPools.STARTER, "ap_lab_rat"
- BACK_IN_THE_SADDLE = 31, "Back in the Saddle", SC2Campaign.HOTS, "Umoja", SC2Race.ANY, MissionPools.STARTER, "ap_back_in_the_saddle", False
- RENDEZVOUS = 32, "Rendezvous", SC2Campaign.HOTS, "Umoja", SC2Race.ZERG, MissionPools.EASY, "ap_rendezvous"
- HARVEST_OF_SCREAMS = 33, "Harvest of Screams", SC2Campaign.HOTS, "Kaldir", SC2Race.ZERG, MissionPools.EASY, "ap_harvest_of_screams"
- SHOOT_THE_MESSENGER = 34, "Shoot the Messenger", SC2Campaign.HOTS, "Kaldir", SC2Race.ZERG, MissionPools.EASY, "ap_shoot_the_messenger"
- ENEMY_WITHIN = 35, "Enemy Within", SC2Campaign.HOTS, "Kaldir", SC2Race.ANY, MissionPools.EASY, "ap_enemy_within", False
- DOMINATION = 36, "Domination", SC2Campaign.HOTS, "Char", SC2Race.ZERG, MissionPools.EASY, "ap_domination"
- FIRE_IN_THE_SKY = 37, "Fire in the Sky", SC2Campaign.HOTS, "Char", SC2Race.ZERG, MissionPools.MEDIUM, "ap_fire_in_the_sky"
- OLD_SOLDIERS = 38, "Old Soldiers", SC2Campaign.HOTS, "Char", SC2Race.ZERG, MissionPools.MEDIUM, "ap_old_soldiers"
- WAKING_THE_ANCIENT = 39, "Waking the Ancient", SC2Campaign.HOTS, "Zerus", SC2Race.ZERG, MissionPools.MEDIUM, "ap_waking_the_ancient"
- THE_CRUCIBLE = 40, "The Crucible", SC2Campaign.HOTS, "Zerus", SC2Race.ZERG, MissionPools.MEDIUM, "ap_the_crucible"
- SUPREME = 41, "Supreme", SC2Campaign.HOTS, "Zerus", SC2Race.ANY, MissionPools.MEDIUM, "ap_supreme", False
- INFESTED = 42, "Infested", SC2Campaign.HOTS, "Skygeirr Station", SC2Race.ZERG, MissionPools.MEDIUM, "ap_infested"
- HAND_OF_DARKNESS = 43, "Hand of Darkness", SC2Campaign.HOTS, "Skygeirr Station", SC2Race.ZERG, MissionPools.HARD, "ap_hand_of_darkness"
- PHANTOMS_OF_THE_VOID = 44, "Phantoms of the Void", SC2Campaign.HOTS, "Skygeirr Station", SC2Race.ZERG, MissionPools.HARD, "ap_phantoms_of_the_void"
- WITH_FRIENDS_LIKE_THESE = 45, "With Friends Like These", SC2Campaign.HOTS, "Dominion Space", SC2Race.ANY, MissionPools.STARTER, "ap_with_friends_like_these", False
- CONVICTION = 46, "Conviction", SC2Campaign.HOTS, "Dominion Space", SC2Race.ANY, MissionPools.MEDIUM, "ap_conviction", False
- PLANETFALL = 47, "Planetfall", SC2Campaign.HOTS, "Korhal", SC2Race.ZERG, MissionPools.HARD, "ap_planetfall"
- DEATH_FROM_ABOVE = 48, "Death From Above", SC2Campaign.HOTS, "Korhal", SC2Race.ZERG, MissionPools.HARD, "ap_death_from_above"
- THE_RECKONING = 49, "The Reckoning", SC2Campaign.HOTS, "Korhal", SC2Race.ZERG, MissionPools.HARD, "ap_the_reckoning"
-
- # Prologue
- DARK_WHISPERS = 50, "Dark Whispers", SC2Campaign.PROLOGUE, "_1", SC2Race.PROTOSS, MissionPools.EASY, "ap_dark_whispers"
- GHOSTS_IN_THE_FOG = 51, "Ghosts in the Fog", SC2Campaign.PROLOGUE, "_2", SC2Race.PROTOSS, MissionPools.MEDIUM, "ap_ghosts_in_the_fog"
- EVIL_AWOKEN = 52, "Evil Awoken", SC2Campaign.PROLOGUE, "_3", SC2Race.PROTOSS, MissionPools.STARTER, "ap_evil_awoken", False
-
- # LotV
- FOR_AIUR = 53, "For Aiur!", SC2Campaign.LOTV, "Aiur", SC2Race.ANY, MissionPools.STARTER, "ap_for_aiur", False
- THE_GROWING_SHADOW = 54, "The Growing Shadow", SC2Campaign.LOTV, "Aiur", SC2Race.PROTOSS, MissionPools.EASY, "ap_the_growing_shadow"
- THE_SPEAR_OF_ADUN = 55, "The Spear of Adun", SC2Campaign.LOTV, "Aiur", SC2Race.PROTOSS, MissionPools.EASY, "ap_the_spear_of_adun"
- SKY_SHIELD = 56, "Sky Shield", SC2Campaign.LOTV, "Korhal", SC2Race.PROTOSS, MissionPools.EASY, "ap_sky_shield"
- BROTHERS_IN_ARMS = 57, "Brothers in Arms", SC2Campaign.LOTV, "Korhal", SC2Race.PROTOSS, MissionPools.MEDIUM, "ap_brothers_in_arms"
- AMON_S_REACH = 58, "Amon's Reach", SC2Campaign.LOTV, "Shakuras", SC2Race.PROTOSS, MissionPools.EASY, "ap_amon_s_reach"
- LAST_STAND = 59, "Last Stand", SC2Campaign.LOTV, "Shakuras", SC2Race.PROTOSS, MissionPools.HARD, "ap_last_stand"
- FORBIDDEN_WEAPON = 60, "Forbidden Weapon", SC2Campaign.LOTV, "Purifier", SC2Race.PROTOSS, MissionPools.MEDIUM, "ap_forbidden_weapon"
- TEMPLE_OF_UNIFICATION = 61, "Temple of Unification", SC2Campaign.LOTV, "Ulnar", SC2Race.PROTOSS, MissionPools.MEDIUM, "ap_temple_of_unification"
- THE_INFINITE_CYCLE = 62, "The Infinite Cycle", SC2Campaign.LOTV, "Ulnar", SC2Race.ANY, MissionPools.HARD, "ap_the_infinite_cycle", False
- HARBINGER_OF_OBLIVION = 63, "Harbinger of Oblivion", SC2Campaign.LOTV, "Ulnar", SC2Race.PROTOSS, MissionPools.MEDIUM, "ap_harbinger_of_oblivion"
- UNSEALING_THE_PAST = 64, "Unsealing the Past", SC2Campaign.LOTV, "Purifier", SC2Race.PROTOSS, MissionPools.MEDIUM, "ap_unsealing_the_past"
- PURIFICATION = 65, "Purification", SC2Campaign.LOTV, "Purifier", SC2Race.PROTOSS, MissionPools.HARD, "ap_purification"
- STEPS_OF_THE_RITE = 66, "Steps of the Rite", SC2Campaign.LOTV, "Tal'darim", SC2Race.PROTOSS, MissionPools.HARD, "ap_steps_of_the_rite"
- RAK_SHIR = 67, "Rak'Shir", SC2Campaign.LOTV, "Tal'darim", SC2Race.PROTOSS, MissionPools.HARD, "ap_rak_shir"
- TEMPLAR_S_CHARGE = 68, "Templar's Charge", SC2Campaign.LOTV, "Moebius", SC2Race.PROTOSS, MissionPools.HARD, "ap_templar_s_charge"
- TEMPLAR_S_RETURN = 69, "Templar's Return", SC2Campaign.LOTV, "Return to Aiur", SC2Race.PROTOSS, MissionPools.EASY, "ap_templar_s_return", False
- THE_HOST = 70, "The Host", SC2Campaign.LOTV, "Return to Aiur", SC2Race.PROTOSS, MissionPools.HARD, "ap_the_host",
- SALVATION = 71, "Salvation", SC2Campaign.LOTV, "Return to Aiur", SC2Race.PROTOSS, MissionPools.VERY_HARD, "ap_salvation"
-
- # Epilogue
- INTO_THE_VOID = 72, "Into the Void", SC2Campaign.EPILOGUE, "_1", SC2Race.PROTOSS, MissionPools.VERY_HARD, "ap_into_the_void"
- THE_ESSENCE_OF_ETERNITY = 73, "The Essence of Eternity", SC2Campaign.EPILOGUE, "_2", SC2Race.TERRAN, MissionPools.VERY_HARD, "ap_the_essence_of_eternity"
- AMON_S_FALL = 74, "Amon's Fall", SC2Campaign.EPILOGUE, "_3", SC2Race.ZERG, MissionPools.VERY_HARD, "ap_amon_s_fall"
-
- # Nova Covert Ops
- THE_ESCAPE = 75, "The Escape", SC2Campaign.NCO, "_1", SC2Race.ANY, MissionPools.MEDIUM, "ap_the_escape", False
- SUDDEN_STRIKE = 76, "Sudden Strike", SC2Campaign.NCO, "_1", SC2Race.TERRAN, MissionPools.EASY, "ap_sudden_strike"
- ENEMY_INTELLIGENCE = 77, "Enemy Intelligence", SC2Campaign.NCO, "_1", SC2Race.TERRAN, MissionPools.MEDIUM, "ap_enemy_intelligence"
- TROUBLE_IN_PARADISE = 78, "Trouble In Paradise", SC2Campaign.NCO, "_2", SC2Race.TERRAN, MissionPools.HARD, "ap_trouble_in_paradise"
- NIGHT_TERRORS = 79, "Night Terrors", SC2Campaign.NCO, "_2", SC2Race.TERRAN, MissionPools.MEDIUM, "ap_night_terrors"
- FLASHPOINT = 80, "Flashpoint", SC2Campaign.NCO, "_2", SC2Race.TERRAN, MissionPools.HARD, "ap_flashpoint"
- IN_THE_ENEMY_S_SHADOW = 81, "In the Enemy's Shadow", SC2Campaign.NCO, "_3", SC2Race.TERRAN, MissionPools.MEDIUM, "ap_in_the_enemy_s_shadow", False
- DARK_SKIES = 82, "Dark Skies", SC2Campaign.NCO, "_3", SC2Race.TERRAN, MissionPools.HARD, "ap_dark_skies"
- END_GAME = 83, "End Game", SC2Campaign.NCO, "_3", SC2Race.TERRAN, MissionPools.VERY_HARD, "ap_end_game"
-
-
-class MissionConnection:
- campaign: SC2Campaign
- connect_to: int # -1 connects to Menu
-
- def __init__(self, connect_to, campaign = SC2Campaign.GLOBAL):
- self.campaign = campaign
- self.connect_to = connect_to
-
- def _asdict(self):
- return {
- "campaign": self.campaign.id,
- "connect_to": self.connect_to
- }
-
-
-class MissionInfo(NamedTuple):
- mission: SC2Mission
- required_world: List[Union[MissionConnection, Dict[Literal["campaign", "connect_to"], int]]]
- category: str
- number: int = 0 # number of worlds need beaten
- completion_critical: bool = False # missions needed to beat game
- or_requirements: bool = False # true if the requirements should be or-ed instead of and-ed
- ui_vertical_padding: int = 0
-
-
-class FillMission(NamedTuple):
- type: MissionPools
- connect_to: List[MissionConnection]
- category: str
- number: int = 0 # number of worlds need beaten
- completion_critical: bool = False # missions needed to beat game
- or_requirements: bool = False # true if the requirements should be or-ed instead of and-ed
- removal_priority: int = 0 # how many missions missing from the pool required to remove this mission
-
-
-
-def vanilla_shuffle_order() -> Dict[SC2Campaign, List[FillMission]]:
- return {
- SC2Campaign.WOL: [
- FillMission(MissionPools.STARTER, [MissionConnection(-1, SC2Campaign.WOL)], "Mar Sara", completion_critical=True),
- FillMission(MissionPools.EASY, [MissionConnection(0, SC2Campaign.WOL)], "Mar Sara", completion_critical=True),
- FillMission(MissionPools.EASY, [MissionConnection(1, SC2Campaign.WOL)], "Mar Sara", completion_critical=True),
- FillMission(MissionPools.EASY, [MissionConnection(2, SC2Campaign.WOL)], "Colonist"),
- FillMission(MissionPools.MEDIUM, [MissionConnection(3, SC2Campaign.WOL)], "Colonist"),
- FillMission(MissionPools.HARD, [MissionConnection(4, SC2Campaign.WOL)], "Colonist", number=7),
- FillMission(MissionPools.HARD, [MissionConnection(4, SC2Campaign.WOL)], "Colonist", number=7, removal_priority=1),
- FillMission(MissionPools.EASY, [MissionConnection(2, SC2Campaign.WOL)], "Artifact", completion_critical=True),
- FillMission(MissionPools.MEDIUM, [MissionConnection(7, SC2Campaign.WOL)], "Artifact", number=8, completion_critical=True),
- FillMission(MissionPools.HARD, [MissionConnection(8, SC2Campaign.WOL)], "Artifact", number=11, completion_critical=True),
- FillMission(MissionPools.HARD, [MissionConnection(9, SC2Campaign.WOL)], "Artifact", number=14, completion_critical=True, removal_priority=7),
- FillMission(MissionPools.HARD, [MissionConnection(10, SC2Campaign.WOL)], "Artifact", completion_critical=True, removal_priority=6),
- FillMission(MissionPools.MEDIUM, [MissionConnection(2, SC2Campaign.WOL)], "Covert", number=4),
- FillMission(MissionPools.MEDIUM, [MissionConnection(12, SC2Campaign.WOL)], "Covert"),
- FillMission(MissionPools.HARD, [MissionConnection(13, SC2Campaign.WOL)], "Covert", number=8, removal_priority=3),
- FillMission(MissionPools.HARD, [MissionConnection(13, SC2Campaign.WOL)], "Covert", number=8, removal_priority=2),
- FillMission(MissionPools.MEDIUM, [MissionConnection(2, SC2Campaign.WOL)], "Rebellion", number=6),
- FillMission(MissionPools.HARD, [MissionConnection(16, SC2Campaign.WOL)], "Rebellion"),
- FillMission(MissionPools.HARD, [MissionConnection(17, SC2Campaign.WOL)], "Rebellion"),
- FillMission(MissionPools.HARD, [MissionConnection(18, SC2Campaign.WOL)], "Rebellion", removal_priority=8),
- FillMission(MissionPools.HARD, [MissionConnection(19, SC2Campaign.WOL)], "Rebellion", removal_priority=5),
- FillMission(MissionPools.HARD, [MissionConnection(11, SC2Campaign.WOL)], "Char", completion_critical=True),
- FillMission(MissionPools.HARD, [MissionConnection(21, SC2Campaign.WOL)], "Char", completion_critical=True, removal_priority=4),
- FillMission(MissionPools.HARD, [MissionConnection(21, SC2Campaign.WOL)], "Char", completion_critical=True),
- FillMission(MissionPools.FINAL, [MissionConnection(22, SC2Campaign.WOL), MissionConnection(23, SC2Campaign.WOL)], "Char", completion_critical=True, or_requirements=True)
- ],
- SC2Campaign.PROPHECY: [
- FillMission(MissionPools.MEDIUM, [MissionConnection(8, SC2Campaign.WOL)], "_1"),
- FillMission(MissionPools.HARD, [MissionConnection(0, SC2Campaign.PROPHECY)], "_2", removal_priority=2),
- FillMission(MissionPools.HARD, [MissionConnection(1, SC2Campaign.PROPHECY)], "_3", removal_priority=1),
- FillMission(MissionPools.FINAL, [MissionConnection(2, SC2Campaign.PROPHECY)], "_4"),
- ],
- SC2Campaign.HOTS: [
- FillMission(MissionPools.STARTER, [MissionConnection(-1, SC2Campaign.HOTS)], "Umoja", completion_critical=True),
- FillMission(MissionPools.EASY, [MissionConnection(0, SC2Campaign.HOTS)], "Umoja", completion_critical=True),
- FillMission(MissionPools.EASY, [MissionConnection(1, SC2Campaign.HOTS)], "Umoja", completion_critical=True, removal_priority=1),
- FillMission(MissionPools.EASY, [MissionConnection(2, SC2Campaign.HOTS)], "Kaldir", completion_critical=True),
- FillMission(MissionPools.MEDIUM, [MissionConnection(3, SC2Campaign.HOTS)], "Kaldir", completion_critical=True, removal_priority=2),
- FillMission(MissionPools.MEDIUM, [MissionConnection(4, SC2Campaign.HOTS)], "Kaldir", completion_critical=True),
- FillMission(MissionPools.EASY, [MissionConnection(2, SC2Campaign.HOTS)], "Char", completion_critical=True),
- FillMission(MissionPools.MEDIUM, [MissionConnection(6, SC2Campaign.HOTS)], "Char", completion_critical=True, removal_priority=3),
- FillMission(MissionPools.MEDIUM, [MissionConnection(7, SC2Campaign.HOTS)], "Char", completion_critical=True),
- FillMission(MissionPools.MEDIUM, [MissionConnection(5, SC2Campaign.HOTS), MissionConnection(8, SC2Campaign.HOTS)], "Zerus", completion_critical=True, or_requirements=True),
- FillMission(MissionPools.MEDIUM, [MissionConnection(9, SC2Campaign.HOTS)], "Zerus", completion_critical=True, removal_priority=4),
- FillMission(MissionPools.MEDIUM, [MissionConnection(10, SC2Campaign.HOTS)], "Zerus", completion_critical=True),
- FillMission(MissionPools.MEDIUM, [MissionConnection(5, SC2Campaign.HOTS), MissionConnection(8, SC2Campaign.HOTS), MissionConnection(11, SC2Campaign.HOTS)], "Skygeirr Station", completion_critical=True),
- FillMission(MissionPools.HARD, [MissionConnection(12, SC2Campaign.HOTS)], "Skygeirr Station", completion_critical=True, removal_priority=5),
- FillMission(MissionPools.HARD, [MissionConnection(13, SC2Campaign.HOTS)], "Skygeirr Station", completion_critical=True),
- FillMission(MissionPools.MEDIUM, [MissionConnection(5, SC2Campaign.HOTS), MissionConnection(8, SC2Campaign.HOTS), MissionConnection(11, SC2Campaign.HOTS)], "Dominion Space", completion_critical=True),
- FillMission(MissionPools.HARD, [MissionConnection(15, SC2Campaign.HOTS)], "Dominion Space", completion_critical=True),
- FillMission(MissionPools.HARD, [MissionConnection(14, SC2Campaign.HOTS), MissionConnection(16, SC2Campaign.HOTS)], "Korhal", completion_critical=True),
- FillMission(MissionPools.HARD, [MissionConnection(17, SC2Campaign.HOTS)], "Korhal", completion_critical=True),
- FillMission(MissionPools.FINAL, [MissionConnection(18, SC2Campaign.HOTS)], "Korhal", completion_critical=True),
- ],
- SC2Campaign.PROLOGUE: [
- FillMission(MissionPools.STARTER, [MissionConnection(-1, SC2Campaign.PROLOGUE)], "_1"),
- FillMission(MissionPools.MEDIUM, [MissionConnection(0, SC2Campaign.PROLOGUE)], "_2", removal_priority=1),
- FillMission(MissionPools.FINAL, [MissionConnection(1, SC2Campaign.PROLOGUE)], "_3")
- ],
- SC2Campaign.LOTV: [
- FillMission(MissionPools.STARTER, [MissionConnection(-1, SC2Campaign.LOTV)], "Aiur", completion_critical=True),
- FillMission(MissionPools.EASY, [MissionConnection(0, SC2Campaign.LOTV)], "Aiur", completion_critical=True, removal_priority=3),
- FillMission(MissionPools.EASY, [MissionConnection(1, SC2Campaign.LOTV)], "Aiur", completion_critical=True),
- FillMission(MissionPools.MEDIUM, [MissionConnection(2, SC2Campaign.LOTV)], "Korhal", completion_critical=True),
- FillMission(MissionPools.MEDIUM, [MissionConnection(3, SC2Campaign.LOTV)], "Korhal", completion_critical=True, removal_priority=7),
- FillMission(MissionPools.MEDIUM, [MissionConnection(2, SC2Campaign.LOTV)], "Shakuras", completion_critical=True),
- FillMission(MissionPools.HARD, [MissionConnection(5, SC2Campaign.LOTV)], "Shakuras", completion_critical=True, removal_priority=6),
- FillMission(MissionPools.HARD, [MissionConnection(4, SC2Campaign.LOTV), MissionConnection(6, SC2Campaign.LOTV)], "Purifier", completion_critical=True, or_requirements=True),
- FillMission(MissionPools.HARD, [MissionConnection(4, SC2Campaign.LOTV), MissionConnection(6, SC2Campaign.LOTV), MissionConnection(7, SC2Campaign.LOTV)], "Ulnar", completion_critical=True),
- FillMission(MissionPools.HARD, [MissionConnection(8, SC2Campaign.LOTV)], "Ulnar", completion_critical=True, removal_priority=1),
- FillMission(MissionPools.HARD, [MissionConnection(9, SC2Campaign.LOTV)], "Ulnar", completion_critical=True),
- FillMission(MissionPools.HARD, [MissionConnection(10, SC2Campaign.LOTV)], "Purifier", completion_critical=True),
- FillMission(MissionPools.HARD, [MissionConnection(11, SC2Campaign.LOTV)], "Purifier", completion_critical=True, removal_priority=5),
- FillMission(MissionPools.HARD, [MissionConnection(10, SC2Campaign.LOTV)], "Tal'darim", completion_critical=True),
- FillMission(MissionPools.HARD, [MissionConnection(13, SC2Campaign.LOTV)], "Tal'darim", completion_critical=True, removal_priority=4),
- FillMission(MissionPools.HARD, [MissionConnection(12, SC2Campaign.LOTV), MissionConnection(14, SC2Campaign.LOTV)], "Moebius", completion_critical=True, or_requirements=True),
- FillMission(MissionPools.HARD, [MissionConnection(12, SC2Campaign.LOTV), MissionConnection(14, SC2Campaign.LOTV), MissionConnection(15, SC2Campaign.LOTV)], "Return to Aiur", completion_critical=True),
- FillMission(MissionPools.HARD, [MissionConnection(16, SC2Campaign.LOTV)], "Return to Aiur", completion_critical=True, removal_priority=2),
- FillMission(MissionPools.FINAL, [MissionConnection(17, SC2Campaign.LOTV)], "Return to Aiur", completion_critical=True),
- ],
- SC2Campaign.EPILOGUE: [
- FillMission(MissionPools.VERY_HARD, [MissionConnection(24, SC2Campaign.WOL), MissionConnection(19, SC2Campaign.HOTS), MissionConnection(18, SC2Campaign.LOTV)], "_1", completion_critical=True),
- FillMission(MissionPools.VERY_HARD, [MissionConnection(0, SC2Campaign.EPILOGUE)], "_2", completion_critical=True, removal_priority=1),
- FillMission(MissionPools.FINAL, [MissionConnection(1, SC2Campaign.EPILOGUE)], "_3", completion_critical=True),
- ],
- SC2Campaign.NCO: [
- FillMission(MissionPools.EASY, [MissionConnection(-1, SC2Campaign.NCO)], "_1", completion_critical=True),
- FillMission(MissionPools.MEDIUM, [MissionConnection(0, SC2Campaign.NCO)], "_1", completion_critical=True, removal_priority=6),
- FillMission(MissionPools.MEDIUM, [MissionConnection(1, SC2Campaign.NCO)], "_1", completion_critical=True, removal_priority=5),
- FillMission(MissionPools.HARD, [MissionConnection(2, SC2Campaign.NCO)], "_2", completion_critical=True, removal_priority=7),
- FillMission(MissionPools.HARD, [MissionConnection(3, SC2Campaign.NCO)], "_2", completion_critical=True, removal_priority=4),
- FillMission(MissionPools.HARD, [MissionConnection(4, SC2Campaign.NCO)], "_2", completion_critical=True, removal_priority=3),
- FillMission(MissionPools.HARD, [MissionConnection(5, SC2Campaign.NCO)], "_3", completion_critical=True, removal_priority=2),
- FillMission(MissionPools.HARD, [MissionConnection(6, SC2Campaign.NCO)], "_3", completion_critical=True, removal_priority=1),
- FillMission(MissionPools.FINAL, [MissionConnection(7, SC2Campaign.NCO)], "_3", completion_critical=True),
- ]
- }
-
-
-def mini_campaign_order() -> Dict[SC2Campaign, List[FillMission]]:
- return {
- SC2Campaign.WOL: [
- FillMission(MissionPools.STARTER, [MissionConnection(-1, SC2Campaign.WOL)], "Mar Sara", completion_critical=True),
- FillMission(MissionPools.EASY, [MissionConnection(0, SC2Campaign.WOL)], "Colonist"),
- FillMission(MissionPools.MEDIUM, [MissionConnection(1, SC2Campaign.WOL)], "Colonist"),
- FillMission(MissionPools.EASY, [MissionConnection(0, SC2Campaign.WOL)], "Artifact", completion_critical=True),
- FillMission(MissionPools.MEDIUM, [MissionConnection(3, SC2Campaign.WOL)], "Artifact", number=4, completion_critical=True),
- FillMission(MissionPools.HARD, [MissionConnection(4, SC2Campaign.WOL)], "Artifact", number=8, completion_critical=True),
- FillMission(MissionPools.MEDIUM, [MissionConnection(0, SC2Campaign.WOL)], "Covert", number=2),
- FillMission(MissionPools.HARD, [MissionConnection(6, SC2Campaign.WOL)], "Covert"),
- FillMission(MissionPools.MEDIUM, [MissionConnection(0, SC2Campaign.WOL)], "Rebellion", number=3),
- FillMission(MissionPools.HARD, [MissionConnection(8, SC2Campaign.WOL)], "Rebellion"),
- FillMission(MissionPools.HARD, [MissionConnection(5, SC2Campaign.WOL)], "Char", completion_critical=True),
- FillMission(MissionPools.HARD, [MissionConnection(5, SC2Campaign.WOL)], "Char", completion_critical=True),
- FillMission(MissionPools.FINAL, [MissionConnection(10, SC2Campaign.WOL), MissionConnection(11, SC2Campaign.WOL)], "Char", completion_critical=True, or_requirements=True)
- ],
- SC2Campaign.PROPHECY: [
- FillMission(MissionPools.MEDIUM, [MissionConnection(4, SC2Campaign.WOL)], "_1"),
- FillMission(MissionPools.FINAL, [MissionConnection(0, SC2Campaign.PROPHECY)], "_2"),
- ],
- SC2Campaign.HOTS: [
- FillMission(MissionPools.STARTER, [MissionConnection(-1, SC2Campaign.HOTS)], "Umoja", completion_critical=True),
- FillMission(MissionPools.EASY, [MissionConnection(0, SC2Campaign.HOTS)], "Kaldir"),
- FillMission(MissionPools.MEDIUM, [MissionConnection(1, SC2Campaign.HOTS)], "Kaldir"),
- FillMission(MissionPools.EASY, [MissionConnection(0, SC2Campaign.HOTS)], "Char"),
- FillMission(MissionPools.MEDIUM, [MissionConnection(3, SC2Campaign.HOTS)], "Char"),
- FillMission(MissionPools.MEDIUM, [MissionConnection(0, SC2Campaign.HOTS)], "Zerus", number=3),
- FillMission(MissionPools.MEDIUM, [MissionConnection(5, SC2Campaign.HOTS)], "Zerus"),
- FillMission(MissionPools.HARD, [MissionConnection(6, SC2Campaign.HOTS)], "Skygeirr Station", number=5),
- FillMission(MissionPools.HARD, [MissionConnection(7, SC2Campaign.HOTS)], "Skygeirr Station"),
- FillMission(MissionPools.HARD, [MissionConnection(6, SC2Campaign.HOTS)], "Dominion Space", number=5),
- FillMission(MissionPools.HARD, [MissionConnection(9, SC2Campaign.HOTS)], "Dominion Space"),
- FillMission(MissionPools.HARD, [MissionConnection(6, SC2Campaign.HOTS)], "Korhal", completion_critical=True, number=8),
- FillMission(MissionPools.FINAL, [MissionConnection(11, SC2Campaign.HOTS)], "Korhal", completion_critical=True),
- ],
- SC2Campaign.PROLOGUE: [
- FillMission(MissionPools.EASY, [MissionConnection(-1, SC2Campaign.PROLOGUE)], "_1"),
- FillMission(MissionPools.FINAL, [MissionConnection(0, SC2Campaign.PROLOGUE)], "_2")
- ],
- SC2Campaign.LOTV: [
- FillMission(MissionPools.STARTER, [MissionConnection(-1, SC2Campaign.LOTV)], "Aiur",completion_critical=True),
- FillMission(MissionPools.EASY, [MissionConnection(0, SC2Campaign.LOTV)], "Aiur", completion_critical=True),
- FillMission(MissionPools.EASY, [MissionConnection(1, SC2Campaign.LOTV)], "Korhal", completion_critical=True),
- FillMission(MissionPools.MEDIUM, [MissionConnection(1, SC2Campaign.LOTV)], "Shakuras", completion_critical=True),
- FillMission(MissionPools.MEDIUM, [MissionConnection(2, SC2Campaign.LOTV), MissionConnection(3, SC2Campaign.LOTV)], "Purifier", completion_critical=True),
- FillMission(MissionPools.HARD, [MissionConnection(6, SC2Campaign.LOTV)], "Purifier", completion_critical=True),
- FillMission(MissionPools.HARD, [MissionConnection(4, SC2Campaign.LOTV)], "Ulnar", completion_critical=True),
- FillMission(MissionPools.HARD, [MissionConnection(6, SC2Campaign.LOTV)], "Tal'darim", completion_critical=True),
- FillMission(MissionPools.HARD, [MissionConnection(5, SC2Campaign.LOTV), MissionConnection(7, SC2Campaign.LOTV)], "Return to Aiur", completion_critical=True),
- FillMission(MissionPools.FINAL, [MissionConnection(8, SC2Campaign.LOTV)], "Return to Aiur", completion_critical=True),
- ],
- SC2Campaign.EPILOGUE: [
- FillMission(MissionPools.VERY_HARD, [MissionConnection(12, SC2Campaign.WOL), MissionConnection(12, SC2Campaign.HOTS), MissionConnection(9, SC2Campaign.LOTV)], "_1", completion_critical=True),
- FillMission(MissionPools.FINAL, [MissionConnection(0, SC2Campaign.EPILOGUE)], "_2", completion_critical=True),
- ],
- SC2Campaign.NCO: [
- FillMission(MissionPools.EASY, [MissionConnection(-1, SC2Campaign.NCO)], "_1", completion_critical=True),
- FillMission(MissionPools.MEDIUM, [MissionConnection(0, SC2Campaign.NCO)], "_1", completion_critical=True),
- FillMission(MissionPools.MEDIUM, [MissionConnection(1, SC2Campaign.NCO)], "_2", completion_critical=True),
- FillMission(MissionPools.HARD, [MissionConnection(2, SC2Campaign.NCO)], "_3", completion_critical=True),
- FillMission(MissionPools.FINAL, [MissionConnection(3, SC2Campaign.NCO)], "_3", completion_critical=True),
- ]
- }
-
-
-def gauntlet_order() -> Dict[SC2Campaign, List[FillMission]]:
- return {
- SC2Campaign.GLOBAL: [
- FillMission(MissionPools.STARTER, [MissionConnection(-1)], "I", completion_critical=True),
- FillMission(MissionPools.EASY, [MissionConnection(0)], "II", completion_critical=True),
- FillMission(MissionPools.EASY, [MissionConnection(1)], "III", completion_critical=True),
- FillMission(MissionPools.MEDIUM, [MissionConnection(2)], "IV", completion_critical=True),
- FillMission(MissionPools.MEDIUM, [MissionConnection(3)], "V", completion_critical=True),
- FillMission(MissionPools.HARD, [MissionConnection(4)], "VI", completion_critical=True),
- FillMission(MissionPools.FINAL, [MissionConnection(5)], "Final", completion_critical=True)
- ]
- }
-
-
-def mini_gauntlet_order() -> Dict[SC2Campaign, List[FillMission]]:
- return {
- SC2Campaign.GLOBAL: [
- FillMission(MissionPools.STARTER, [MissionConnection(-1)], "I", completion_critical=True),
- FillMission(MissionPools.EASY, [MissionConnection(0)], "II", completion_critical=True),
- FillMission(MissionPools.MEDIUM, [MissionConnection(1)], "III", completion_critical=True),
- FillMission(MissionPools.FINAL, [MissionConnection(2)], "Final", completion_critical=True)
- ]
- }
-
-
-def grid_order() -> Dict[SC2Campaign, List[FillMission]]:
- return {
- SC2Campaign.GLOBAL: [
- FillMission(MissionPools.STARTER, [MissionConnection(-1)], "_1"),
- FillMission(MissionPools.EASY, [MissionConnection(0)], "_1"),
- FillMission(MissionPools.MEDIUM, [MissionConnection(1), MissionConnection(6), MissionConnection( 3)], "_1", or_requirements=True),
- FillMission(MissionPools.HARD, [MissionConnection(2), MissionConnection(7)], "_1", or_requirements=True),
- FillMission(MissionPools.EASY, [MissionConnection(0)], "_2"),
- FillMission(MissionPools.MEDIUM, [MissionConnection(1), MissionConnection(4)], "_2", or_requirements=True),
- FillMission(MissionPools.HARD, [MissionConnection(2), MissionConnection(5), MissionConnection(10), MissionConnection(7)], "_2", or_requirements=True),
- FillMission(MissionPools.HARD, [MissionConnection(3), MissionConnection(6), MissionConnection(11)], "_2", or_requirements=True),
- FillMission(MissionPools.MEDIUM, [MissionConnection(4), MissionConnection(9), MissionConnection(12)], "_3", or_requirements=True),
- FillMission(MissionPools.HARD, [MissionConnection(5), MissionConnection(8), MissionConnection(10), MissionConnection(13)], "_3", or_requirements=True),
- FillMission(MissionPools.HARD, [MissionConnection(6), MissionConnection(9), MissionConnection(11), MissionConnection(14)], "_3", or_requirements=True),
- FillMission(MissionPools.HARD, [MissionConnection(7), MissionConnection(10)], "_3", or_requirements=True),
- FillMission(MissionPools.HARD, [MissionConnection(8), MissionConnection(13)], "_4", or_requirements=True),
- FillMission(MissionPools.HARD, [MissionConnection(9), MissionConnection(12), MissionConnection(14)], "_4", or_requirements=True),
- FillMission(MissionPools.HARD, [MissionConnection(10), MissionConnection(13)], "_4", or_requirements=True),
- FillMission(MissionPools.FINAL, [MissionConnection(11), MissionConnection(14)], "_4", or_requirements=True)
- ]
- }
-
-def mini_grid_order() -> Dict[SC2Campaign, List[FillMission]]:
- return {
- SC2Campaign.GLOBAL: [
- FillMission(MissionPools.STARTER, [MissionConnection(-1)], "_1"),
- FillMission(MissionPools.EASY, [MissionConnection(0)], "_1"),
- FillMission(MissionPools.MEDIUM, [MissionConnection(1), MissionConnection(5)], "_1", or_requirements=True),
- FillMission(MissionPools.EASY, [MissionConnection(0)], "_2"),
- FillMission(MissionPools.MEDIUM, [MissionConnection(1), MissionConnection(3)], "_2", or_requirements=True),
- FillMission(MissionPools.HARD, [MissionConnection(2), MissionConnection(4)], "_2", or_requirements=True),
- FillMission(MissionPools.MEDIUM, [MissionConnection(3), MissionConnection(7)], "_3", or_requirements=True),
- FillMission(MissionPools.HARD, [MissionConnection(4), MissionConnection(6)], "_3", or_requirements=True),
- FillMission(MissionPools.FINAL, [MissionConnection(5), MissionConnection(7)], "_3", or_requirements=True)
- ]
- }
-
-def tiny_grid_order() -> Dict[SC2Campaign, List[FillMission]]:
- return {
- SC2Campaign.GLOBAL: [
- FillMission(MissionPools.STARTER, [MissionConnection(-1)], "_1"),
- FillMission(MissionPools.MEDIUM, [MissionConnection(0)], "_1"),
- FillMission(MissionPools.EASY, [MissionConnection(0)], "_2"),
- FillMission(MissionPools.FINAL, [MissionConnection(1), MissionConnection(2)], "_2", or_requirements=True),
- ]
- }
-
-def blitz_order() -> Dict[SC2Campaign, List[FillMission]]:
- return {
- SC2Campaign.GLOBAL: [
- FillMission(MissionPools.STARTER, [MissionConnection(-1)], "I"),
- FillMission(MissionPools.EASY, [MissionConnection(-1)], "I"),
- FillMission(MissionPools.MEDIUM, [MissionConnection(0), MissionConnection(1)], "II", number=1, or_requirements=True),
- FillMission(MissionPools.MEDIUM, [MissionConnection(0), MissionConnection(1)], "II", number=1, or_requirements=True),
- FillMission(MissionPools.MEDIUM, [MissionConnection(0), MissionConnection(1)], "III", number=2, or_requirements=True),
- FillMission(MissionPools.MEDIUM, [MissionConnection(0), MissionConnection(1)], "III", number=2, or_requirements=True),
- FillMission(MissionPools.HARD, [MissionConnection(0), MissionConnection(1)], "IV", number=3, or_requirements=True),
- FillMission(MissionPools.HARD, [MissionConnection(0), MissionConnection(1)], "IV", number=3, or_requirements=True),
- FillMission(MissionPools.HARD, [MissionConnection(0), MissionConnection(1)], "V", number=4, or_requirements=True),
- FillMission(MissionPools.HARD, [MissionConnection(0), MissionConnection(1)], "V", number=4, or_requirements=True),
- FillMission(MissionPools.HARD, [MissionConnection(0), MissionConnection(1)], "Final", number=5, or_requirements=True),
- FillMission(MissionPools.FINAL, [MissionConnection(0), MissionConnection(1)], "Final", number=5, or_requirements=True)
- ]
- }
-
-
-mission_orders: List[Callable[[], Dict[SC2Campaign, List[FillMission]]]] = [
- vanilla_shuffle_order,
- vanilla_shuffle_order,
- mini_campaign_order,
- grid_order,
- mini_grid_order,
- blitz_order,
- gauntlet_order,
- mini_gauntlet_order,
- tiny_grid_order
-]
-
-
-vanilla_mission_req_table: Dict[SC2Campaign, Dict[str, MissionInfo]] = {
- SC2Campaign.WOL: {
- SC2Mission.LIBERATION_DAY.mission_name: MissionInfo(SC2Mission.LIBERATION_DAY, [], SC2Mission.LIBERATION_DAY.area, completion_critical=True),
- SC2Mission.THE_OUTLAWS.mission_name: MissionInfo(SC2Mission.THE_OUTLAWS, [MissionConnection(1, SC2Campaign.WOL)], SC2Mission.THE_OUTLAWS.area, completion_critical=True),
- SC2Mission.ZERO_HOUR.mission_name: MissionInfo(SC2Mission.ZERO_HOUR, [MissionConnection(2, SC2Campaign.WOL)], SC2Mission.ZERO_HOUR.area, completion_critical=True),
- SC2Mission.EVACUATION.mission_name: MissionInfo(SC2Mission.EVACUATION, [MissionConnection(3, SC2Campaign.WOL)], SC2Mission.EVACUATION.area),
- SC2Mission.OUTBREAK.mission_name: MissionInfo(SC2Mission.OUTBREAK, [MissionConnection(4, SC2Campaign.WOL)], SC2Mission.OUTBREAK.area),
- SC2Mission.SAFE_HAVEN.mission_name: MissionInfo(SC2Mission.SAFE_HAVEN, [MissionConnection(5, SC2Campaign.WOL)], SC2Mission.SAFE_HAVEN.area, number=7),
- SC2Mission.HAVENS_FALL.mission_name: MissionInfo(SC2Mission.HAVENS_FALL, [MissionConnection(5, SC2Campaign.WOL)], SC2Mission.HAVENS_FALL.area, number=7),
- SC2Mission.SMASH_AND_GRAB.mission_name: MissionInfo(SC2Mission.SMASH_AND_GRAB, [MissionConnection(3, SC2Campaign.WOL)], SC2Mission.SMASH_AND_GRAB.area, completion_critical=True),
- SC2Mission.THE_DIG.mission_name: MissionInfo(SC2Mission.THE_DIG, [MissionConnection(8, SC2Campaign.WOL)], SC2Mission.THE_DIG.area, number=8, completion_critical=True),
- SC2Mission.THE_MOEBIUS_FACTOR.mission_name: MissionInfo(SC2Mission.THE_MOEBIUS_FACTOR, [MissionConnection(9, SC2Campaign.WOL)], SC2Mission.THE_MOEBIUS_FACTOR.area, number=11, completion_critical=True),
- SC2Mission.SUPERNOVA.mission_name: MissionInfo(SC2Mission.SUPERNOVA, [MissionConnection(10, SC2Campaign.WOL)], SC2Mission.SUPERNOVA.area, number=14, completion_critical=True),
- SC2Mission.MAW_OF_THE_VOID.mission_name: MissionInfo(SC2Mission.MAW_OF_THE_VOID, [MissionConnection(11, SC2Campaign.WOL)], SC2Mission.MAW_OF_THE_VOID.area, completion_critical=True),
- SC2Mission.DEVILS_PLAYGROUND.mission_name: MissionInfo(SC2Mission.DEVILS_PLAYGROUND, [MissionConnection(3, SC2Campaign.WOL)], SC2Mission.DEVILS_PLAYGROUND.area, number=4),
- SC2Mission.WELCOME_TO_THE_JUNGLE.mission_name: MissionInfo(SC2Mission.WELCOME_TO_THE_JUNGLE, [MissionConnection(13, SC2Campaign.WOL)], SC2Mission.WELCOME_TO_THE_JUNGLE.area),
- SC2Mission.BREAKOUT.mission_name: MissionInfo(SC2Mission.BREAKOUT, [MissionConnection(14, SC2Campaign.WOL)], SC2Mission.BREAKOUT.area, number=8),
- SC2Mission.GHOST_OF_A_CHANCE.mission_name: MissionInfo(SC2Mission.GHOST_OF_A_CHANCE, [MissionConnection(14, SC2Campaign.WOL)], SC2Mission.GHOST_OF_A_CHANCE.area, number=8),
- SC2Mission.THE_GREAT_TRAIN_ROBBERY.mission_name: MissionInfo(SC2Mission.THE_GREAT_TRAIN_ROBBERY, [MissionConnection(3, SC2Campaign.WOL)], SC2Mission.THE_GREAT_TRAIN_ROBBERY.area, number=6),
- SC2Mission.CUTTHROAT.mission_name: MissionInfo(SC2Mission.CUTTHROAT, [MissionConnection(17, SC2Campaign.WOL)], SC2Mission.THE_GREAT_TRAIN_ROBBERY.area),
- SC2Mission.ENGINE_OF_DESTRUCTION.mission_name: MissionInfo(SC2Mission.ENGINE_OF_DESTRUCTION, [MissionConnection(18, SC2Campaign.WOL)], SC2Mission.ENGINE_OF_DESTRUCTION.area),
- SC2Mission.MEDIA_BLITZ.mission_name: MissionInfo(SC2Mission.MEDIA_BLITZ, [MissionConnection(19, SC2Campaign.WOL)], SC2Mission.MEDIA_BLITZ.area),
- SC2Mission.PIERCING_OF_THE_SHROUD.mission_name: MissionInfo(SC2Mission.PIERCING_OF_THE_SHROUD, [MissionConnection(20, SC2Campaign.WOL)], SC2Mission.PIERCING_OF_THE_SHROUD.area),
- SC2Mission.GATES_OF_HELL.mission_name: MissionInfo(SC2Mission.GATES_OF_HELL, [MissionConnection(12, SC2Campaign.WOL)], SC2Mission.GATES_OF_HELL.area, completion_critical=True),
- SC2Mission.BELLY_OF_THE_BEAST.mission_name: MissionInfo(SC2Mission.BELLY_OF_THE_BEAST, [MissionConnection(22, SC2Campaign.WOL)], SC2Mission.BELLY_OF_THE_BEAST.area, completion_critical=True),
- SC2Mission.SHATTER_THE_SKY.mission_name: MissionInfo(SC2Mission.SHATTER_THE_SKY, [MissionConnection(22, SC2Campaign.WOL)], SC2Mission.SHATTER_THE_SKY.area, completion_critical=True),
- SC2Mission.ALL_IN.mission_name: MissionInfo(SC2Mission.ALL_IN, [MissionConnection(23, SC2Campaign.WOL), MissionConnection(24, SC2Campaign.WOL)], SC2Mission.ALL_IN.area, or_requirements=True, completion_critical=True)
- },
- SC2Campaign.PROPHECY: {
- SC2Mission.WHISPERS_OF_DOOM.mission_name: MissionInfo(SC2Mission.WHISPERS_OF_DOOM, [MissionConnection(9, SC2Campaign.WOL)], SC2Mission.WHISPERS_OF_DOOM.area),
- SC2Mission.A_SINISTER_TURN.mission_name: MissionInfo(SC2Mission.A_SINISTER_TURN, [MissionConnection(1, SC2Campaign.PROPHECY)], SC2Mission.A_SINISTER_TURN.area),
- SC2Mission.ECHOES_OF_THE_FUTURE.mission_name: MissionInfo(SC2Mission.ECHOES_OF_THE_FUTURE, [MissionConnection(2, SC2Campaign.PROPHECY)], SC2Mission.ECHOES_OF_THE_FUTURE.area),
- SC2Mission.IN_UTTER_DARKNESS.mission_name: MissionInfo(SC2Mission.IN_UTTER_DARKNESS, [MissionConnection(3, SC2Campaign.PROPHECY)], SC2Mission.IN_UTTER_DARKNESS.area)
- },
- SC2Campaign.HOTS: {
- SC2Mission.LAB_RAT.mission_name: MissionInfo(SC2Mission.LAB_RAT, [], SC2Mission.LAB_RAT.area, completion_critical=True),
- SC2Mission.BACK_IN_THE_SADDLE.mission_name: MissionInfo(SC2Mission.BACK_IN_THE_SADDLE, [MissionConnection(1, SC2Campaign.HOTS)], SC2Mission.BACK_IN_THE_SADDLE.area, completion_critical=True),
- SC2Mission.RENDEZVOUS.mission_name: MissionInfo(SC2Mission.RENDEZVOUS, [MissionConnection(2, SC2Campaign.HOTS)], SC2Mission.RENDEZVOUS.area, completion_critical=True),
- SC2Mission.HARVEST_OF_SCREAMS.mission_name: MissionInfo(SC2Mission.HARVEST_OF_SCREAMS, [MissionConnection(3, SC2Campaign.HOTS)], SC2Mission.HARVEST_OF_SCREAMS.area),
- SC2Mission.SHOOT_THE_MESSENGER.mission_name: MissionInfo(SC2Mission.SHOOT_THE_MESSENGER, [MissionConnection(4, SC2Campaign.HOTS)], SC2Mission.SHOOT_THE_MESSENGER.area),
- SC2Mission.ENEMY_WITHIN.mission_name: MissionInfo(SC2Mission.ENEMY_WITHIN, [MissionConnection(5, SC2Campaign.HOTS)], SC2Mission.ENEMY_WITHIN.area),
- SC2Mission.DOMINATION.mission_name: MissionInfo(SC2Mission.DOMINATION, [MissionConnection(3, SC2Campaign.HOTS)], SC2Mission.DOMINATION.area),
- SC2Mission.FIRE_IN_THE_SKY.mission_name: MissionInfo(SC2Mission.FIRE_IN_THE_SKY, [MissionConnection(7, SC2Campaign.HOTS)], SC2Mission.FIRE_IN_THE_SKY.area),
- SC2Mission.OLD_SOLDIERS.mission_name: MissionInfo(SC2Mission.OLD_SOLDIERS, [MissionConnection(8, SC2Campaign.HOTS)], SC2Mission.OLD_SOLDIERS.area),
- SC2Mission.WAKING_THE_ANCIENT.mission_name: MissionInfo(SC2Mission.WAKING_THE_ANCIENT, [MissionConnection(6, SC2Campaign.HOTS), MissionConnection(9, SC2Campaign.HOTS)], SC2Mission.WAKING_THE_ANCIENT.area, completion_critical=True, or_requirements=True),
- SC2Mission.THE_CRUCIBLE.mission_name: MissionInfo(SC2Mission.THE_CRUCIBLE, [MissionConnection(10, SC2Campaign.HOTS)], SC2Mission.THE_CRUCIBLE.area, completion_critical=True),
- SC2Mission.SUPREME.mission_name: MissionInfo(SC2Mission.SUPREME, [MissionConnection(11, SC2Campaign.HOTS)], SC2Mission.SUPREME.area, completion_critical=True),
- SC2Mission.INFESTED.mission_name: MissionInfo(SC2Mission.INFESTED, [MissionConnection(6, SC2Campaign.HOTS), MissionConnection(9, SC2Campaign.HOTS), MissionConnection(12, SC2Campaign.HOTS)], SC2Mission.INFESTED.area),
- SC2Mission.HAND_OF_DARKNESS.mission_name: MissionInfo(SC2Mission.HAND_OF_DARKNESS, [MissionConnection(13, SC2Campaign.HOTS)], SC2Mission.HAND_OF_DARKNESS.area),
- SC2Mission.PHANTOMS_OF_THE_VOID.mission_name: MissionInfo(SC2Mission.PHANTOMS_OF_THE_VOID, [MissionConnection(14, SC2Campaign.HOTS)], SC2Mission.PHANTOMS_OF_THE_VOID.area),
- SC2Mission.WITH_FRIENDS_LIKE_THESE.mission_name: MissionInfo(SC2Mission.WITH_FRIENDS_LIKE_THESE, [MissionConnection(6, SC2Campaign.HOTS), MissionConnection(9, SC2Campaign.HOTS), MissionConnection(12, SC2Campaign.HOTS)], SC2Mission.WITH_FRIENDS_LIKE_THESE.area),
- SC2Mission.CONVICTION.mission_name: MissionInfo(SC2Mission.CONVICTION, [MissionConnection(16, SC2Campaign.HOTS)], SC2Mission.CONVICTION.area),
- SC2Mission.PLANETFALL.mission_name: MissionInfo(SC2Mission.PLANETFALL, [MissionConnection(15, SC2Campaign.HOTS), MissionConnection(17, SC2Campaign.HOTS)], SC2Mission.PLANETFALL.area, completion_critical=True),
- SC2Mission.DEATH_FROM_ABOVE.mission_name: MissionInfo(SC2Mission.DEATH_FROM_ABOVE, [MissionConnection(18, SC2Campaign.HOTS)], SC2Mission.DEATH_FROM_ABOVE.area, completion_critical=True),
- SC2Mission.THE_RECKONING.mission_name: MissionInfo(SC2Mission.THE_RECKONING, [MissionConnection(19, SC2Campaign.HOTS)], SC2Mission.THE_RECKONING.area, completion_critical=True),
- },
- SC2Campaign.PROLOGUE: {
- SC2Mission.DARK_WHISPERS.mission_name: MissionInfo(SC2Mission.DARK_WHISPERS, [], SC2Mission.DARK_WHISPERS.area),
- SC2Mission.GHOSTS_IN_THE_FOG.mission_name: MissionInfo(SC2Mission.GHOSTS_IN_THE_FOG, [MissionConnection(1, SC2Campaign.PROLOGUE)], SC2Mission.GHOSTS_IN_THE_FOG.area),
- SC2Mission.EVIL_AWOKEN.mission_name: MissionInfo(SC2Mission.EVIL_AWOKEN, [MissionConnection(2, SC2Campaign.PROLOGUE)], SC2Mission.EVIL_AWOKEN.area)
- },
- SC2Campaign.LOTV: {
- SC2Mission.FOR_AIUR.mission_name: MissionInfo(SC2Mission.FOR_AIUR, [], SC2Mission.FOR_AIUR.area, completion_critical=True),
- SC2Mission.THE_GROWING_SHADOW.mission_name: MissionInfo(SC2Mission.THE_GROWING_SHADOW, [MissionConnection(1, SC2Campaign.LOTV)], SC2Mission.THE_GROWING_SHADOW.area, completion_critical=True),
- SC2Mission.THE_SPEAR_OF_ADUN.mission_name: MissionInfo(SC2Mission.THE_SPEAR_OF_ADUN, [MissionConnection(2, SC2Campaign.LOTV)], SC2Mission.THE_SPEAR_OF_ADUN.area, completion_critical=True),
- SC2Mission.SKY_SHIELD.mission_name: MissionInfo(SC2Mission.SKY_SHIELD, [MissionConnection(3, SC2Campaign.LOTV)], SC2Mission.SKY_SHIELD.area, completion_critical=True),
- SC2Mission.BROTHERS_IN_ARMS.mission_name: MissionInfo(SC2Mission.BROTHERS_IN_ARMS, [MissionConnection(4, SC2Campaign.LOTV)], SC2Mission.BROTHERS_IN_ARMS.area, completion_critical=True),
- SC2Mission.AMON_S_REACH.mission_name: MissionInfo(SC2Mission.AMON_S_REACH, [MissionConnection(3, SC2Campaign.LOTV)], SC2Mission.AMON_S_REACH.area, completion_critical=True),
- SC2Mission.LAST_STAND.mission_name: MissionInfo(SC2Mission.LAST_STAND, [MissionConnection(6, SC2Campaign.LOTV)], SC2Mission.LAST_STAND.area, completion_critical=True),
- SC2Mission.FORBIDDEN_WEAPON.mission_name: MissionInfo(SC2Mission.FORBIDDEN_WEAPON, [MissionConnection(5, SC2Campaign.LOTV), MissionConnection(7, SC2Campaign.LOTV)], SC2Mission.FORBIDDEN_WEAPON.area, completion_critical=True, or_requirements=True),
- SC2Mission.TEMPLE_OF_UNIFICATION.mission_name: MissionInfo(SC2Mission.TEMPLE_OF_UNIFICATION, [MissionConnection(5, SC2Campaign.LOTV), MissionConnection(7, SC2Campaign.LOTV), MissionConnection(8, SC2Campaign.LOTV)], SC2Mission.TEMPLE_OF_UNIFICATION.area, completion_critical=True),
- SC2Mission.THE_INFINITE_CYCLE.mission_name: MissionInfo(SC2Mission.THE_INFINITE_CYCLE, [MissionConnection(9, SC2Campaign.LOTV)], SC2Mission.THE_INFINITE_CYCLE.area, completion_critical=True),
- SC2Mission.HARBINGER_OF_OBLIVION.mission_name: MissionInfo(SC2Mission.HARBINGER_OF_OBLIVION, [MissionConnection(10, SC2Campaign.LOTV)], SC2Mission.HARBINGER_OF_OBLIVION.area, completion_critical=True),
- SC2Mission.UNSEALING_THE_PAST.mission_name: MissionInfo(SC2Mission.UNSEALING_THE_PAST, [MissionConnection(11, SC2Campaign.LOTV)], SC2Mission.UNSEALING_THE_PAST.area, completion_critical=True),
- SC2Mission.PURIFICATION.mission_name: MissionInfo(SC2Mission.PURIFICATION, [MissionConnection(12, SC2Campaign.LOTV)], SC2Mission.PURIFICATION.area, completion_critical=True),
- SC2Mission.STEPS_OF_THE_RITE.mission_name: MissionInfo(SC2Mission.STEPS_OF_THE_RITE, [MissionConnection(11, SC2Campaign.LOTV)], SC2Mission.STEPS_OF_THE_RITE.area, completion_critical=True),
- SC2Mission.RAK_SHIR.mission_name: MissionInfo(SC2Mission.RAK_SHIR, [MissionConnection(14, SC2Campaign.LOTV)], SC2Mission.RAK_SHIR.area, completion_critical=True),
- SC2Mission.TEMPLAR_S_CHARGE.mission_name: MissionInfo(SC2Mission.TEMPLAR_S_CHARGE, [MissionConnection(13, SC2Campaign.LOTV), MissionConnection(15, SC2Campaign.LOTV)], SC2Mission.TEMPLAR_S_CHARGE.area, completion_critical=True, or_requirements=True),
- SC2Mission.TEMPLAR_S_RETURN.mission_name: MissionInfo(SC2Mission.TEMPLAR_S_RETURN, [MissionConnection(13, SC2Campaign.LOTV), MissionConnection(15, SC2Campaign.LOTV), MissionConnection(16, SC2Campaign.LOTV)], SC2Mission.TEMPLAR_S_RETURN.area, completion_critical=True),
- SC2Mission.THE_HOST.mission_name: MissionInfo(SC2Mission.THE_HOST, [MissionConnection(17, SC2Campaign.LOTV)], SC2Mission.THE_HOST.area, completion_critical=True),
- SC2Mission.SALVATION.mission_name: MissionInfo(SC2Mission.SALVATION, [MissionConnection(18, SC2Campaign.LOTV)], SC2Mission.SALVATION.area, completion_critical=True),
- },
- SC2Campaign.EPILOGUE: {
- SC2Mission.INTO_THE_VOID.mission_name: MissionInfo(SC2Mission.INTO_THE_VOID, [MissionConnection(25, SC2Campaign.WOL), MissionConnection(20, SC2Campaign.HOTS), MissionConnection(19, SC2Campaign.LOTV)], SC2Mission.INTO_THE_VOID.area, completion_critical=True),
- SC2Mission.THE_ESSENCE_OF_ETERNITY.mission_name: MissionInfo(SC2Mission.THE_ESSENCE_OF_ETERNITY, [MissionConnection(1, SC2Campaign.EPILOGUE)], SC2Mission.THE_ESSENCE_OF_ETERNITY.area, completion_critical=True),
- SC2Mission.AMON_S_FALL.mission_name: MissionInfo(SC2Mission.AMON_S_FALL, [MissionConnection(2, SC2Campaign.EPILOGUE)], SC2Mission.AMON_S_FALL.area, completion_critical=True),
- },
- SC2Campaign.NCO: {
- SC2Mission.THE_ESCAPE.mission_name: MissionInfo(SC2Mission.THE_ESCAPE, [], SC2Mission.THE_ESCAPE.area, completion_critical=True),
- SC2Mission.SUDDEN_STRIKE.mission_name: MissionInfo(SC2Mission.SUDDEN_STRIKE, [MissionConnection(1, SC2Campaign.NCO)], SC2Mission.SUDDEN_STRIKE.area, completion_critical=True),
- SC2Mission.ENEMY_INTELLIGENCE.mission_name: MissionInfo(SC2Mission.ENEMY_INTELLIGENCE, [MissionConnection(2, SC2Campaign.NCO)], SC2Mission.ENEMY_INTELLIGENCE.area, completion_critical=True),
- SC2Mission.TROUBLE_IN_PARADISE.mission_name: MissionInfo(SC2Mission.TROUBLE_IN_PARADISE, [MissionConnection(3, SC2Campaign.NCO)], SC2Mission.TROUBLE_IN_PARADISE.area, completion_critical=True),
- SC2Mission.NIGHT_TERRORS.mission_name: MissionInfo(SC2Mission.NIGHT_TERRORS, [MissionConnection(4, SC2Campaign.NCO)], SC2Mission.NIGHT_TERRORS.area, completion_critical=True),
- SC2Mission.FLASHPOINT.mission_name: MissionInfo(SC2Mission.FLASHPOINT, [MissionConnection(5, SC2Campaign.NCO)], SC2Mission.FLASHPOINT.area, completion_critical=True),
- SC2Mission.IN_THE_ENEMY_S_SHADOW.mission_name: MissionInfo(SC2Mission.IN_THE_ENEMY_S_SHADOW, [MissionConnection(6, SC2Campaign.NCO)], SC2Mission.IN_THE_ENEMY_S_SHADOW.area, completion_critical=True),
- SC2Mission.DARK_SKIES.mission_name: MissionInfo(SC2Mission.DARK_SKIES, [MissionConnection(7, SC2Campaign.NCO)], SC2Mission.DARK_SKIES.area, completion_critical=True),
- SC2Mission.END_GAME.mission_name: MissionInfo(SC2Mission.END_GAME, [MissionConnection(8, SC2Campaign.NCO)], SC2Mission.END_GAME.area, completion_critical=True),
- }
-}
-
-lookup_id_to_mission: Dict[int, SC2Mission] = {
- mission.id: mission for mission in SC2Mission
-}
-
-lookup_name_to_mission: Dict[str, SC2Mission] = {
- mission.mission_name: mission for mission in SC2Mission
-}
-
-lookup_id_to_campaign: Dict[int, SC2Campaign] = {
- campaign.id: campaign for campaign in SC2Campaign
-}
-
-
-campaign_mission_table: Dict[SC2Campaign, Set[SC2Mission]] = {
- campaign: set() for campaign in SC2Campaign
-}
-for mission in SC2Mission:
- campaign_mission_table[mission.campaign].add(mission)
-
-
-def get_campaign_difficulty(campaign: SC2Campaign, excluded_missions: Iterable[SC2Mission] = ()) -> MissionPools:
- """
-
- :param campaign:
- :param excluded_missions:
- :return: Campaign's the most difficult non-excluded mission
- """
- excluded_mission_set = set(excluded_missions)
- included_missions = campaign_mission_table[campaign].difference(excluded_mission_set)
- return max([mission.pool for mission in included_missions])
-
-
-def get_campaign_goal_priority(campaign: SC2Campaign, excluded_missions: Iterable[SC2Mission] = ()) -> SC2CampaignGoalPriority:
- """
- Gets a modified campaign goal priority.
- If all the campaign's goal missions are excluded, it's ineligible to have the goal
- If the campaign's very hard missions are excluded, the priority is lowered to hard
- :param campaign:
- :param excluded_missions:
- :return:
- """
- if excluded_missions is None:
- return campaign.goal_priority
- else:
- goal_missions = set(get_campaign_potential_goal_missions(campaign))
- excluded_mission_set = set(excluded_missions)
- remaining_goals = goal_missions.difference(excluded_mission_set)
- if remaining_goals == set():
- # All potential goals are excluded, the campaign can't be a goal
- return SC2CampaignGoalPriority.NONE
- elif campaign.goal_priority == SC2CampaignGoalPriority.VERY_HARD:
- # Check if a very hard campaign doesn't get rid of it's last very hard mission
- difficulty = get_campaign_difficulty(campaign, excluded_missions)
- if difficulty == MissionPools.VERY_HARD:
- return SC2CampaignGoalPriority.VERY_HARD
- else:
- return SC2CampaignGoalPriority.HARD
- else:
- return campaign.goal_priority
-
-
-class SC2CampaignGoal(NamedTuple):
- mission: SC2Mission
- location: str
-
-
-campaign_final_mission_locations: Dict[SC2Campaign, SC2CampaignGoal] = {
- SC2Campaign.WOL: SC2CampaignGoal(SC2Mission.ALL_IN, "All-In: Victory"),
- SC2Campaign.PROPHECY: SC2CampaignGoal(SC2Mission.IN_UTTER_DARKNESS, "In Utter Darkness: Kills"),
- SC2Campaign.HOTS: None,
- SC2Campaign.PROLOGUE: SC2CampaignGoal(SC2Mission.EVIL_AWOKEN, "Evil Awoken: Victory"),
- SC2Campaign.LOTV: SC2CampaignGoal(SC2Mission.SALVATION, "Salvation: Victory"),
- SC2Campaign.EPILOGUE: None,
- SC2Campaign.NCO: SC2CampaignGoal(SC2Mission.END_GAME, "End Game: Victory"),
-}
-
-campaign_alt_final_mission_locations: Dict[SC2Campaign, Dict[SC2Mission, str]] = {
- SC2Campaign.WOL: {
- SC2Mission.MAW_OF_THE_VOID: "Maw of the Void: Victory",
- SC2Mission.ENGINE_OF_DESTRUCTION: "Engine of Destruction: Victory",
- SC2Mission.SUPERNOVA: "Supernova: Victory",
- SC2Mission.GATES_OF_HELL: "Gates of Hell: Victory",
- SC2Mission.SHATTER_THE_SKY: "Shatter the Sky: Victory"
- },
- SC2Campaign.PROPHECY: None,
- SC2Campaign.HOTS: {
- SC2Mission.THE_RECKONING: "The Reckoning: Victory",
- SC2Mission.THE_CRUCIBLE: "The Crucible: Victory",
- SC2Mission.HAND_OF_DARKNESS: "Hand of Darkness: Victory",
- SC2Mission.PHANTOMS_OF_THE_VOID: "Phantoms of the Void: Victory",
- SC2Mission.PLANETFALL: "Planetfall: Victory",
- SC2Mission.DEATH_FROM_ABOVE: "Death From Above: Victory"
- },
- SC2Campaign.PROLOGUE: {
- SC2Mission.GHOSTS_IN_THE_FOG: "Ghosts in the Fog: Victory"
- },
- SC2Campaign.LOTV: {
- SC2Mission.THE_HOST: "The Host: Victory",
- SC2Mission.TEMPLAR_S_CHARGE: "Templar's Charge: Victory"
- },
- SC2Campaign.EPILOGUE: {
- SC2Mission.AMON_S_FALL: "Amon's Fall: Victory",
- SC2Mission.INTO_THE_VOID: "Into the Void: Victory",
- SC2Mission.THE_ESSENCE_OF_ETERNITY: "The Essence of Eternity: Victory",
- },
- SC2Campaign.NCO: {
- SC2Mission.FLASHPOINT: "Flashpoint: Victory",
- SC2Mission.DARK_SKIES: "Dark Skies: Victory",
- SC2Mission.NIGHT_TERRORS: "Night Terrors: Victory",
- SC2Mission.TROUBLE_IN_PARADISE: "Trouble In Paradise: Victory"
- }
-}
-
-campaign_race_exceptions: Dict[SC2Mission, SC2Race] = {
- SC2Mission.WITH_FRIENDS_LIKE_THESE: SC2Race.TERRAN
-}
-
-
-def get_goal_location(mission: SC2Mission) -> Union[str, None]:
- """
-
- :param mission:
- :return: Goal location assigned to the goal mission
- """
- campaign = mission.campaign
- primary_campaign_goal = campaign_final_mission_locations[campaign]
- if primary_campaign_goal is not None:
- if primary_campaign_goal.mission == mission:
- return primary_campaign_goal.location
-
- campaign_alt_goals = campaign_alt_final_mission_locations[campaign]
- if campaign_alt_goals is not None and mission in campaign_alt_goals:
- return campaign_alt_goals.get(mission)
-
- return mission.mission_name + ": Victory"
-
-
-def get_campaign_potential_goal_missions(campaign: SC2Campaign) -> List[SC2Mission]:
- """
-
- :param campaign:
- :return: All missions that can be the campaign's goal
- """
- missions: List[SC2Mission] = list()
- primary_goal_mission = campaign_final_mission_locations[campaign]
- if primary_goal_mission is not None:
- missions.append(primary_goal_mission.mission)
- alt_goal_locations = campaign_alt_final_mission_locations[campaign]
- if alt_goal_locations is not None:
- for mission in alt_goal_locations.keys():
- missions.append(mission)
-
- return missions
-
-
-def get_no_build_missions() -> List[SC2Mission]:
- return [mission for mission in SC2Mission if not mission.build]
diff --git a/worlds/sc2/Options.py b/worlds/sc2/Options.py
deleted file mode 100644
index 88febb70..00000000
--- a/worlds/sc2/Options.py
+++ /dev/null
@@ -1,908 +0,0 @@
-from dataclasses import dataclass, fields, Field
-from typing import FrozenSet, Union, Set
-
-from Options import Choice, Toggle, DefaultOnToggle, ItemSet, OptionSet, Range, PerGameCommonOptions
-from .MissionTables import SC2Campaign, SC2Mission, lookup_name_to_mission, MissionPools, get_no_build_missions, \
- campaign_mission_table
-from worlds.AutoWorld import World
-
-
-class GameDifficulty(Choice):
- """
- The difficulty of the campaign, affects enemy AI, starting units, and game speed.
-
- For those unfamiliar with the Archipelago randomizer, the recommended settings are one difficulty level
- lower than the vanilla game
- """
- display_name = "Game Difficulty"
- option_casual = 0
- option_normal = 1
- option_hard = 2
- option_brutal = 3
- default = 1
-
-
-class GameSpeed(Choice):
- """Optional setting to override difficulty-based game speed."""
- display_name = "Game Speed"
- option_default = 0
- option_slower = 1
- option_slow = 2
- option_normal = 3
- option_fast = 4
- option_faster = 5
- default = option_default
-
-
-class DisableForcedCamera(Toggle):
- """
- Prevents the game from moving or locking the camera without the player's consent.
- """
- display_name = "Disable Forced Camera Movement"
-
-
-class SkipCutscenes(Toggle):
- """
- Skips all cutscenes and prevents dialog from blocking progress.
- """
- display_name = "Skip Cutscenes"
-
-
-class AllInMap(Choice):
- """Determines what version of All-In (WoL final map) that will be generated for the campaign."""
- display_name = "All In Map"
- option_ground = 0
- option_air = 1
-
-
-class MissionOrder(Choice):
- """
- Determines the order the missions are played in. The last three mission orders end in a random mission.
- Vanilla (83 total if all campaigns enabled): Keeps the standard mission order and branching from the vanilla Campaigns.
- Vanilla Shuffled (83 total if all campaigns enabled): Keeps same branching paths from the vanilla Campaigns but randomizes the order of missions within.
- Mini Campaign (47 total if all campaigns enabled): Shorter version of the campaign with randomized missions and optional branches.
- Medium Grid (16): A 4x4 grid of random missions. Start at the top-left and forge a path towards bottom-right mission to win.
- Mini Grid (9): A 3x3 version of Grid. Complete the bottom-right mission to win.
- Blitz (12): 12 random missions that open up very quickly. Complete the bottom-right mission to win.
- Gauntlet (7): Linear series of 7 random missions to complete the campaign.
- Mini Gauntlet (4): Linear series of 4 random missions to complete the campaign.
- Tiny Grid (4): A 2x2 version of Grid. Complete the bottom-right mission to win.
- Grid (variable): A grid that will resize to use all non-excluded missions. Corners may be omitted to make the grid more square. Complete the bottom-right mission to win.
- """
- display_name = "Mission Order"
- option_vanilla = 0
- option_vanilla_shuffled = 1
- option_mini_campaign = 2
- option_medium_grid = 3
- option_mini_grid = 4
- option_blitz = 5
- option_gauntlet = 6
- option_mini_gauntlet = 7
- option_tiny_grid = 8
- option_grid = 9
-
-
-class MaximumCampaignSize(Range):
- """
- Sets an upper bound on how many missions to include when a variable-size mission order is selected.
- If a set-size mission order is selected, does nothing.
- """
- display_name = "Maximum Campaign Size"
- range_start = 1
- range_end = 83
- default = 83
-
-
-class GridTwoStartPositions(Toggle):
- """
- If turned on and 'grid' mission order is selected, removes a mission from the starting
- corner sets the adjacent two missions as the starter missions.
- """
- display_name = "Start with two unlocked missions on grid"
- default = Toggle.option_false
-
-
-class ColorChoice(Choice):
- option_white = 0
- option_red = 1
- option_blue = 2
- option_teal = 3
- option_purple = 4
- option_yellow = 5
- option_orange = 6
- option_green = 7
- option_light_pink = 8
- option_violet = 9
- option_light_grey = 10
- option_dark_green = 11
- option_brown = 12
- option_light_green = 13
- option_dark_grey = 14
- option_pink = 15
- option_rainbow = 16
- option_default = 17
- default = option_default
-
-
-class PlayerColorTerranRaynor(ColorChoice):
- """Determines in-game team color for playable Raynor's Raiders (Terran) factions."""
- display_name = "Terran Player Color (Raynor)"
-
-
-class PlayerColorProtoss(ColorChoice):
- """Determines in-game team color for playable Protoss factions."""
- display_name = "Protoss Player Color"
-
-
-class PlayerColorZerg(ColorChoice):
- """Determines in-game team color for playable Zerg factions before Kerrigan becomes Primal Kerrigan."""
- display_name = "Zerg Player Color"
-
-
-class PlayerColorZergPrimal(ColorChoice):
- """Determines in-game team color for playable Zerg factions after Kerrigan becomes Primal Kerrigan."""
- display_name = "Zerg Player Color (Primal)"
-
-
-class EnableWolMissions(DefaultOnToggle):
- """
- Enables missions from main Wings of Liberty campaign.
- """
- display_name = "Enable Wings of Liberty missions"
-
-
-class EnableProphecyMissions(DefaultOnToggle):
- """
- Enables missions from Prophecy mini-campaign.
- """
- display_name = "Enable Prophecy missions"
-
-
-class EnableHotsMissions(DefaultOnToggle):
- """
- Enables missions from Heart of the Swarm campaign.
- """
- display_name = "Enable Heart of the Swarm missions"
-
-
-class EnableLotVPrologueMissions(DefaultOnToggle):
- """
- Enables missions from Prologue campaign.
- """
- display_name = "Enable Prologue (Legacy of the Void) missions"
-
-
-class EnableLotVMissions(DefaultOnToggle):
- """
- Enables missions from Legacy of the Void campaign.
- """
- display_name = "Enable Legacy of the Void (main campaign) missions"
-
-
-class EnableEpilogueMissions(DefaultOnToggle):
- """
- Enables missions from Epilogue campaign.
- These missions are considered very hard.
-
- Enabling Wings of Liberty, Heart of the Swarm and Legacy of the Void is strongly recommended in order to play Epilogue.
- Not recommended for short mission orders.
- See also: Exclude Very Hard Missions
- """
- display_name = "Enable Epilogue missions"
-
-
-class EnableNCOMissions(DefaultOnToggle):
- """
- Enables missions from Nova Covert Ops campaign.
-
- Note: For best gameplay experience it's recommended to also enable Wings of Liberty campaign.
- """
- display_name = "Enable Nova Covert Ops missions"
-
-
-class ShuffleCampaigns(DefaultOnToggle):
- """
- Shuffles the missions between campaigns if enabled.
- Only available for Vanilla Shuffled and Mini Campaign mission order
- """
- display_name = "Shuffle Campaigns"
-
-
-class ShuffleNoBuild(DefaultOnToggle):
- """
- Determines if the no-build missions are included in the shuffle.
- If turned off, the no-build missions will not appear. Has no effect for Vanilla mission order.
- """
- display_name = "Shuffle No-Build Missions"
-
-
-class StarterUnit(Choice):
- """
- Unlocks a random unit at the start of the game.
-
- Off: No units are provided, the first unit must be obtained from the randomizer
- Balanced: A unit that doesn't give the player too much power early on is given
- Any Starter Unit: Any starter unit can be given
- """
- display_name = "Starter Unit"
- option_off = 0
- option_balanced = 1
- option_any_starter_unit = 2
-
-
-class RequiredTactics(Choice):
- """
- Determines the maximum tactical difficulty of the world (separate from mission difficulty). Higher settings
- increase randomness.
-
- Standard: All missions can be completed with good micro and macro.
- Advanced: Completing missions may require relying on starting units and micro-heavy units.
- No Logic: Units and upgrades may be placed anywhere. LIKELY TO RENDER THE RUN IMPOSSIBLE ON HARDER DIFFICULTIES!
- Locks Grant Story Tech option to true.
- """
- display_name = "Required Tactics"
- option_standard = 0
- option_advanced = 1
- option_no_logic = 2
-
-
-class GenericUpgradeMissions(Range):
- """Determines the percentage of missions in the mission order that must be completed before
- level 1 of all weapon and armor upgrades is unlocked. Level 2 upgrades require double the amount of missions,
- and level 3 requires triple the amount. The required amounts are always rounded down.
- If set to 0, upgrades are instead added to the item pool and must be found to be used."""
- display_name = "Generic Upgrade Missions"
- range_start = 0
- range_end = 100
- default = 0
-
-
-class GenericUpgradeResearch(Choice):
- """Determines how weapon and armor upgrades affect missions once unlocked.
-
- Vanilla: Upgrades must be researched as normal.
- Auto In No-Build: In No-Build missions, upgrades are automatically researched.
- In all other missions, upgrades must be researched as normal.
- Auto In Build: In No-Build missions, upgrades are unavailable as normal.
- In all other missions, upgrades are automatically researched.
- Always Auto: Upgrades are automatically researched in all missions."""
- display_name = "Generic Upgrade Research"
- option_vanilla = 0
- option_auto_in_no_build = 1
- option_auto_in_build = 2
- option_always_auto = 3
-
-
-class GenericUpgradeItems(Choice):
- """Determines how weapon and armor upgrades are split into items. All options produce 3 levels of each item.
- Does nothing if upgrades are unlocked by completed mission counts.
-
- Individual Items: All weapon and armor upgrades are each an item,
- resulting in 18 total upgrade items for Terran and 15 total items for Zerg and Protoss each.
- Bundle Weapon And Armor: All types of weapon upgrades are one item per race,
- and all types of armor upgrades are one item per race,
- resulting in 18 total items.
- Bundle Unit Class: Weapon and armor upgrades are merged,
- but upgrades are bundled separately for each race:
- Infantry, Vehicle, and Starship upgrades for Terran (9 items),
- Ground and Flyer upgrades for Zerg (6 items),
- Ground and Air upgrades for Protoss (6 items),
- resulting in 21 total items.
- Bundle All: All weapon and armor upgrades are one item per race,
- resulting in 9 total items."""
- display_name = "Generic Upgrade Items"
- option_individual_items = 0
- option_bundle_weapon_and_armor = 1
- option_bundle_unit_class = 2
- option_bundle_all = 3
-
-
-class NovaCovertOpsItems(Toggle):
- """
- If turned on, the equipment upgrades from Nova Covert Ops may be present in the world.
-
- If Nova Covert Ops campaign is enabled, this option is locked to be turned on.
- """
- display_name = "Nova Covert Ops Items"
- default = Toggle.option_true
-
-
-class BroodWarItems(Toggle):
- """If turned on, returning items from StarCraft: Brood War may appear in the world."""
- display_name = "Brood War Items"
- default = Toggle.option_true
-
-
-class ExtendedItems(Toggle):
- """If turned on, original items that did not appear in Campaign mode may appear in the world."""
- display_name = "Extended Items"
- default = Toggle.option_true
-
-
-# Current maximum number of upgrades for a unit
-MAX_UPGRADES_OPTION = 12
-
-
-class EnsureGenericItems(Range):
- """
- Specifies a minimum percentage of the generic item pool that will be present for the slot.
- The generic item pool is the pool of all generically useful items after all exclusions.
- Generically-useful items include: Worker upgrades, Building upgrades, economy upgrades,
- Mercenaries, Kerrigan levels and abilities, and Spear of Adun abilities
- Increasing this percentage will make units less common.
- """
- display_name = "Ensure Generic Items"
- range_start = 0
- range_end = 100
- default = 25
-
-
-class MinNumberOfUpgrades(Range):
- """
- Set a minimum to the number of upgrades a unit/structure can have.
- Note that most units have 4 or 6 upgrades.
- If a unit has fewer upgrades than the minimum, it will have all of its upgrades.
-
- Doesn't affect shared unit upgrades.
- """
- display_name = "Minimum number of upgrades per unit/structure"
- range_start = 0
- range_end = MAX_UPGRADES_OPTION
- default = 2
-
-
-class MaxNumberOfUpgrades(Range):
- """
- Set a maximum to the number of upgrades a unit/structure can have. -1 is used to define unlimited.
- Note that most unit have 4 to 6 upgrades.
-
- Doesn't affect shared unit upgrades.
- """
- display_name = "Maximum number of upgrades per unit/structure"
- range_start = -1
- range_end = MAX_UPGRADES_OPTION
- default = -1
-
-
-class KerriganPresence(Choice):
- """
- Determines whether Kerrigan is playable outside of missions that require her.
-
- Vanilla: Kerrigan is playable as normal, appears in the same missions as in vanilla game.
- Not Present: Kerrigan is not playable, unless the mission requires her to be present. Other hero units stay playable,
- and locations normally requiring Kerrigan can be checked by any unit.
- Kerrigan level items, active abilities and passive abilities affecting her will not appear.
- In missions where the Kerrigan unit is required, story abilities are given in same way as Grant Story Tech is set to true
- Not Present And No Passives: In addition to the above, Kerrigan's passive abilities affecting other units (such as Twin Drones) will not appear.
-
- Note: Always set to "Not Present" if Heart of the Swarm campaign is disabled.
- """
- display_name = "Kerrigan Presence"
- option_vanilla = 0
- option_not_present = 1
- option_not_present_and_no_passives = 2
-
-
-class KerriganLevelsPerMissionCompleted(Range):
- """
- Determines how many levels Kerrigan gains when a mission is beaten.
-
- NOTE: Setting this too low can result in generation failures if The Infinite Cycle or Supreme are in the mission pool.
- """
- display_name = "Levels Per Mission Beaten"
- range_start = 0
- range_end = 20
- default = 0
-
-
-class KerriganLevelsPerMissionCompletedCap(Range):
- """
- Limits how many total levels Kerrigan can gain from beating missions. This does not affect levels gained from items.
- Set to -1 to disable this limit.
-
- NOTE: The following missions have these level requirements:
- Supreme: 35
- The Infinite Cycle: 70
- See Grant Story Levels for more details.
- """
- display_name = "Levels Per Mission Beaten Cap"
- range_start = -1
- range_end = 140
- default = -1
-
-
-class KerriganLevelItemSum(Range):
- """
- Determines the sum of the level items in the world. This does not affect levels gained from beating missions.
-
- NOTE: The following missions have these level requirements:
- Supreme: 35
- The Infinite Cycle: 70
- See Grant Story Levels for more details.
- """
- display_name = "Kerrigan Level Item Sum"
- range_start = 0
- range_end = 140
- default = 70
-
-
-class KerriganLevelItemDistribution(Choice):
- """Determines the amount and size of Kerrigan level items.
-
- Vanilla: Uses the distribution in the vanilla campaign.
- This entails 32 individual levels and 6 packs of varying sizes.
- This distribution always adds up to 70, ignoring the Level Item Sum setting.
- Smooth: Uses a custom, condensed distribution of 10 items between sizes 4 and 10,
- intended to fit more levels into settings with little room for filler while keeping some variance in level gains.
- This distribution always adds up to 70, ignoring the Level Item Sum setting.
- Size 70: Uses items worth 70 levels each.
- Size 35: Uses items worth 35 levels each.
- Size 14: Uses items worth 14 levels each.
- Size 10: Uses items worth 10 levels each.
- Size 7: Uses items worth 7 levels each.
- Size 5: Uses items worth 5 levels each.
- Size 2: Uses items worth 2 level eachs.
- Size 1: Uses individual levels. As there are not enough locations in the game for this distribution,
- this will result in a greatly reduced total level, and is likely to remove many other items."""
- display_name = "Kerrigan Level Item Distribution"
- option_vanilla = 0
- option_smooth = 1
- option_size_70 = 2
- option_size_35 = 3
- option_size_14 = 4
- option_size_10 = 5
- option_size_7 = 6
- option_size_5 = 7
- option_size_2 = 8
- option_size_1 = 9
- default = option_smooth
-
-
-class KerriganTotalLevelCap(Range):
- """
- Limits how many total levels Kerrigan can gain from any source. Depending on your other settings,
- there may be more levels available in the world, but they will not affect Kerrigan.
- Set to -1 to disable this limit.
-
- NOTE: The following missions have these level requirements:
- Supreme: 35
- The Infinite Cycle: 70
- See Grant Story Levels for more details.
- """
- display_name = "Total Level Cap"
- range_start = -1
- range_end = 140
- default = -1
-
-
-class StartPrimaryAbilities(Range):
- """Number of Primary Abilities (Kerrigan Tier 1, 2, and 4) to start the game with.
- If set to 4, a Tier 7 ability is also included."""
- display_name = "Starting Primary Abilities"
- range_start = 0
- range_end = 4
- default = 0
-
-
-class KerriganPrimalStatus(Choice):
- """Determines when Kerrigan appears in her Primal Zerg form.
- This greatly increases her energy regeneration.
-
- Vanilla: Kerrigan is human in missions that canonically appear before The Crucible,
- and zerg thereafter.
- Always Zerg: Kerrigan is always zerg.
- Always Human: Kerrigan is always human.
- Level 35: Kerrigan is human until reaching level 35, and zerg thereafter.
- Half Completion: Kerrigan is human until half of the missions in the world are completed,
- and zerg thereafter.
- Item: Kerrigan's Primal Form is an item. She is human until it is found, and zerg thereafter."""
- display_name = "Kerrigan Primal Status"
- option_vanilla = 0
- option_always_zerg = 1
- option_always_human = 2
- option_level_35 = 3
- option_half_completion = 4
- option_item = 5
-
-
-class SpearOfAdunPresence(Choice):
- """
- Determines in which missions Spear of Adun calldowns will be available.
- Affects only abilities used from Spear of Adun top menu.
-
- Not Present: Spear of Adun calldowns are unavailable.
- LotV Protoss: Spear of Adun calldowns are only available in LotV main campaign
- Protoss: Spear od Adun calldowns are available in any Protoss mission
- Everywhere: Spear od Adun calldowns are available in any mission of any race
- """
- display_name = "Spear of Adun Presence"
- option_not_present = 0
- option_lotv_protoss = 1
- option_protoss = 2
- option_everywhere = 3
- default = option_lotv_protoss
-
- # Fix case
- @classmethod
- def get_option_name(cls, value: int) -> str:
- if value == SpearOfAdunPresence.option_lotv_protoss:
- return "LotV Protoss"
- else:
- return super().get_option_name(value)
-
-
-class SpearOfAdunPresentInNoBuild(Toggle):
- """
- Determines if Spear of Adun calldowns are available in no-build missions.
-
- If turned on, Spear of Adun calldown powers are available in missions specified under "Spear of Adun Presence".
- If turned off, Spear of Adun calldown powers are unavailable in all no-build missions
- """
- display_name = "Spear of Adun Present in No-Build"
-
-
-class SpearOfAdunAutonomouslyCastAbilityPresence(Choice):
- """
- Determines availability of Spear of Adun powers, that are autonomously cast.
- Affects abilities like Reconstruction Beam or Overwatch
-
- Not Presents: Autocasts are not available.
- LotV Protoss: Spear of Adun autocasts are only available in LotV main campaign
- Protoss: Spear od Adun autocasts are available in any Protoss mission
- Everywhere: Spear od Adun autocasts are available in any mission of any race
- """
- display_name = "Spear of Adun Autonomously Cast Powers Presence"
- option_not_present = 0
- option_lotv_protoss = 1
- option_protoss = 2
- option_everywhere = 3
- default = option_lotv_protoss
-
- # Fix case
- @classmethod
- def get_option_name(cls, value: int) -> str:
- if value == SpearOfAdunPresence.option_lotv_protoss:
- return "LotV Protoss"
- else:
- return super().get_option_name(value)
-
-
-class SpearOfAdunAutonomouslyCastPresentInNoBuild(Toggle):
- """
- Determines if Spear of Adun autocasts are available in no-build missions.
-
- If turned on, Spear of Adun autocasts are available in missions specified under "Spear of Adun Autonomously Cast Powers Presence".
- If turned off, Spear of Adun autocasts are unavailable in all no-build missions
- """
- display_name = "Spear of Adun Autonomously Cast Powers Present in No-Build"
-
-
-class GrantStoryTech(Toggle):
- """
- If set true, grants special tech required for story mission completion for duration of the mission.
- Otherwise, you need to find these tech by a normal means as items.
- Affects story missions like Back in the Saddle and Supreme
-
- Locked to true if Required Tactics is set to no logic.
- """
- display_name = "Grant Story Tech"
-
-
-class GrantStoryLevels(Choice):
- """
- If enabled, grants Kerrigan the required minimum levels for the following missions:
- Supreme: 35
- The Infinite Cycle: 70
- The bonus levels only apply during the listed missions, and can exceed the Total Level Cap.
-
- If disabled, either of these missions is included, and there are not enough levels in the world, generation may fail.
- To prevent this, either increase the amount of levels in the world, or enable this option.
-
- If disabled and Required Tactics is set to no logic, this option is forced to Minimum.
-
- Disabled: Kerrigan does not get bonus levels for these missions,
- instead the levels must be gained from items or beating missions.
- Additive: Kerrigan gains bonus levels equal to the mission's required level.
- Minimum: Kerrigan is either at her real level, or at the mission's required level,
- depending on which is higher.
- """
- display_name = "Grant Story Levels"
- option_disabled = 0
- option_additive = 1
- option_minimum = 2
- default = option_minimum
-
-
-class TakeOverAIAllies(Toggle):
- """
- On maps supporting this feature allows you to take control over an AI Ally.
- """
- display_name = "Take Over AI Allies"
-
-
-class LockedItems(ItemSet):
- """Guarantees that these items will be unlockable"""
- display_name = "Locked Items"
-
-
-class ExcludedItems(ItemSet):
- """Guarantees that these items will not be unlockable"""
- display_name = "Excluded Items"
-
-
-class ExcludedMissions(OptionSet):
- """Guarantees that these missions will not appear in the campaign
- Doesn't apply to vanilla mission order.
- It may be impossible to build a valid campaign if too many missions are excluded."""
- display_name = "Excluded Missions"
- valid_keys = {mission.mission_name for mission in SC2Mission}
-
-
-class ExcludeVeryHardMissions(Choice):
- """
- Excludes Very Hard missions outside of Epilogue campaign (All-In, Salvation, and all Epilogue missions are considered Very Hard).
- Doesn't apply to "Vanilla" mission order.
-
- Default: Not excluded for mission orders "Vanilla Shuffled" or "Grid" with Maximum Campaign Size >= 20,
- excluded for any other order
- Yes: Non-Epilogue Very Hard missions are excluded and won't be generated
- No: Non-Epilogue Very Hard missions can appear normally. Not recommended for too short mission orders.
-
- See also: Excluded Missions, Enable Epilogue Missions, Maximum Campaign Size
- """
- display_name = "Exclude Very Hard Missions"
- option_default = 0
- option_true = 1
- option_false = 2
-
- @classmethod
- def get_option_name(cls, value):
- return ["Default", "Yes", "No"][int(value)]
-
-
-class LocationInclusion(Choice):
- option_enabled = 0
- option_resources = 1
- option_disabled = 2
-
-
-class VanillaLocations(LocationInclusion):
- """
- Enables or disables item rewards for completing vanilla objectives.
- Vanilla objectives are bonus objectives from the vanilla game,
- along with some additional objectives to balance the missions.
- Enable these locations for a balanced experience.
-
- Enabled: All locations fitting into this do their normal rewards
- Resources: Forces these locations to contain Starting Resources
- Disabled: Removes item rewards from these locations.
-
- Note: Individual locations subject to plando are always enabled, so the plando can be placed properly.
- See also: Excluded Locations, Item Plando (https://archipelago.gg/tutorial/Archipelago/plando/en#item-plando)
- """
- display_name = "Vanilla Locations"
-
-
-class ExtraLocations(LocationInclusion):
- """
- Enables or disables item rewards for mission progress and minor objectives.
- This includes mandatory mission objectives,
- collecting reinforcements and resource pickups,
- destroying structures, and overcoming minor challenges.
- Enables these locations to add more checks and items to your world.
-
- Enabled: All locations fitting into this do their normal rewards
- Resources: Forces these locations to contain Starting Resources
- Disabled: Removes item rewards from these locations.
-
- Note: Individual locations subject to plando are always enabled, so the plando can be placed properly.
- See also: Excluded Locations, Item Plando (https://archipelago.gg/tutorial/Archipelago/plando/en#item-plando)
- """
- display_name = "Extra Locations"
-
-
-class ChallengeLocations(LocationInclusion):
- """
- Enables or disables item rewards for completing challenge tasks.
- Challenges are tasks that are more difficult than completing the mission, and are often based on achievements.
- You might be required to visit the same mission later after getting stronger in order to finish these tasks.
- Enable these locations to increase the difficulty of completing the multiworld.
-
- Enabled: All locations fitting into this do their normal rewards
- Resources: Forces these locations to contain Starting Resources
- Disabled: Removes item rewards from these locations.
-
- Note: Individual locations subject to plando are always enabled, so the plando can be placed properly.
- See also: Excluded Locations, Item Plando (https://archipelago.gg/tutorial/Archipelago/plando/en#item-plando)
- """
- display_name = "Challenge Locations"
-
-
-class MasteryLocations(LocationInclusion):
- """
- Enables or disables item rewards for overcoming especially difficult challenges.
- These challenges are often based on Mastery achievements and Feats of Strength.
- Enable these locations to add the most difficult checks to the world.
-
- Enabled: All locations fitting into this do their normal rewards
- Resources: Forces these locations to contain Starting Resources
- Disabled: Removes item rewards from these locations.
-
- Note: Individual locations subject to plando are always enabled, so the plando can be placed properly.
- See also: Excluded Locations, Item Plando (https://archipelago.gg/tutorial/Archipelago/plando/en#item-plando)
- """
- display_name = "Mastery Locations"
-
-
-class MineralsPerItem(Range):
- """
- Configures how many minerals are given per resource item.
- """
- display_name = "Minerals Per Item"
- range_start = 0
- range_end = 500
- default = 25
-
-
-class VespenePerItem(Range):
- """
- Configures how much vespene gas is given per resource item.
- """
- display_name = "Vespene Per Item"
- range_start = 0
- range_end = 500
- default = 25
-
-
-class StartingSupplyPerItem(Range):
- """
- Configures how much starting supply per is given per item.
- """
- display_name = "Starting Supply Per Item"
- range_start = 0
- range_end = 200
- default = 5
-
-
-@dataclass
-class Starcraft2Options(PerGameCommonOptions):
- game_difficulty: GameDifficulty
- game_speed: GameSpeed
- disable_forced_camera: DisableForcedCamera
- skip_cutscenes: SkipCutscenes
- all_in_map: AllInMap
- mission_order: MissionOrder
- maximum_campaign_size: MaximumCampaignSize
- grid_two_start_positions: GridTwoStartPositions
- player_color_terran_raynor: PlayerColorTerranRaynor
- player_color_protoss: PlayerColorProtoss
- player_color_zerg: PlayerColorZerg
- player_color_zerg_primal: PlayerColorZergPrimal
- enable_wol_missions: EnableWolMissions
- enable_prophecy_missions: EnableProphecyMissions
- enable_hots_missions: EnableHotsMissions
- enable_lotv_prologue_missions: EnableLotVPrologueMissions
- enable_lotv_missions: EnableLotVMissions
- enable_epilogue_missions: EnableEpilogueMissions
- enable_nco_missions: EnableNCOMissions
- shuffle_campaigns: ShuffleCampaigns
- shuffle_no_build: ShuffleNoBuild
- starter_unit: StarterUnit
- required_tactics: RequiredTactics
- ensure_generic_items: EnsureGenericItems
- min_number_of_upgrades: MinNumberOfUpgrades
- max_number_of_upgrades: MaxNumberOfUpgrades
- generic_upgrade_missions: GenericUpgradeMissions
- generic_upgrade_research: GenericUpgradeResearch
- generic_upgrade_items: GenericUpgradeItems
- kerrigan_presence: KerriganPresence
- kerrigan_levels_per_mission_completed: KerriganLevelsPerMissionCompleted
- kerrigan_levels_per_mission_completed_cap: KerriganLevelsPerMissionCompletedCap
- kerrigan_level_item_sum: KerriganLevelItemSum
- kerrigan_level_item_distribution: KerriganLevelItemDistribution
- kerrigan_total_level_cap: KerriganTotalLevelCap
- start_primary_abilities: StartPrimaryAbilities
- kerrigan_primal_status: KerriganPrimalStatus
- spear_of_adun_presence: SpearOfAdunPresence
- spear_of_adun_present_in_no_build: SpearOfAdunPresentInNoBuild
- spear_of_adun_autonomously_cast_ability_presence: SpearOfAdunAutonomouslyCastAbilityPresence
- spear_of_adun_autonomously_cast_present_in_no_build: SpearOfAdunAutonomouslyCastPresentInNoBuild
- grant_story_tech: GrantStoryTech
- grant_story_levels: GrantStoryLevels
- take_over_ai_allies: TakeOverAIAllies
- locked_items: LockedItems
- excluded_items: ExcludedItems
- excluded_missions: ExcludedMissions
- exclude_very_hard_missions: ExcludeVeryHardMissions
- nco_items: NovaCovertOpsItems
- bw_items: BroodWarItems
- ext_items: ExtendedItems
- vanilla_locations: VanillaLocations
- extra_locations: ExtraLocations
- challenge_locations: ChallengeLocations
- mastery_locations: MasteryLocations
- minerals_per_item: MineralsPerItem
- vespene_per_item: VespenePerItem
- starting_supply_per_item: StartingSupplyPerItem
-
-
-def get_option_value(world: World, name: str) -> Union[int, FrozenSet]:
- if world is None:
- field: Field = [class_field for class_field in fields(Starcraft2Options) if class_field.name == name][0]
- return field.type.default
-
- player_option = getattr(world.options, name)
-
- return player_option.value
-
-
-def get_enabled_campaigns(world: World) -> Set[SC2Campaign]:
- enabled_campaigns = set()
- if get_option_value(world, "enable_wol_missions"):
- enabled_campaigns.add(SC2Campaign.WOL)
- if get_option_value(world, "enable_prophecy_missions"):
- enabled_campaigns.add(SC2Campaign.PROPHECY)
- if get_option_value(world, "enable_hots_missions"):
- enabled_campaigns.add(SC2Campaign.HOTS)
- if get_option_value(world, "enable_lotv_prologue_missions"):
- enabled_campaigns.add(SC2Campaign.PROLOGUE)
- if get_option_value(world, "enable_lotv_missions"):
- enabled_campaigns.add(SC2Campaign.LOTV)
- if get_option_value(world, "enable_epilogue_missions"):
- enabled_campaigns.add(SC2Campaign.EPILOGUE)
- if get_option_value(world, "enable_nco_missions"):
- enabled_campaigns.add(SC2Campaign.NCO)
- return enabled_campaigns
-
-
-def get_disabled_campaigns(world: World) -> Set[SC2Campaign]:
- all_campaigns = set(SC2Campaign)
- enabled_campaigns = get_enabled_campaigns(world)
- disabled_campaigns = all_campaigns.difference(enabled_campaigns)
- disabled_campaigns.remove(SC2Campaign.GLOBAL)
- return disabled_campaigns
-
-
-def get_excluded_missions(world: World) -> Set[SC2Mission]:
- mission_order_type = get_option_value(world, "mission_order")
- excluded_mission_names = get_option_value(world, "excluded_missions")
- shuffle_no_build = get_option_value(world, "shuffle_no_build")
- disabled_campaigns = get_disabled_campaigns(world)
-
- excluded_missions: Set[SC2Mission] = set([lookup_name_to_mission[name] for name in excluded_mission_names])
-
- # Excluding Very Hard missions depending on options
- if (get_option_value(world, "exclude_very_hard_missions") == ExcludeVeryHardMissions.option_true
- ) or (
- get_option_value(world, "exclude_very_hard_missions") == ExcludeVeryHardMissions.option_default
- and (
- mission_order_type not in [MissionOrder.option_vanilla_shuffled, MissionOrder.option_grid]
- or (
- mission_order_type == MissionOrder.option_grid
- and get_option_value(world, "maximum_campaign_size") < 20
- )
- )
- ):
- excluded_missions = excluded_missions.union(
- [mission for mission in SC2Mission if
- mission.pool == MissionPools.VERY_HARD and mission.campaign != SC2Campaign.EPILOGUE]
- )
- # Omitting No-Build missions if not shuffling no-build
- if not shuffle_no_build:
- excluded_missions = excluded_missions.union(get_no_build_missions())
- # Omitting missions not in enabled campaigns
- for campaign in disabled_campaigns:
- excluded_missions = excluded_missions.union(campaign_mission_table[campaign])
-
- return excluded_missions
-
-
-campaign_depending_orders = [
- MissionOrder.option_vanilla,
- MissionOrder.option_vanilla_shuffled,
- MissionOrder.option_mini_campaign
-]
-
-kerrigan_unit_available = [
- KerriganPresence.option_vanilla,
-]
\ No newline at end of file
diff --git a/worlds/sc2/PoolFilter.py b/worlds/sc2/PoolFilter.py
deleted file mode 100644
index f5f6faa9..00000000
--- a/worlds/sc2/PoolFilter.py
+++ /dev/null
@@ -1,661 +0,0 @@
-from typing import Callable, Dict, List, Set, Union, Tuple, Optional
-from BaseClasses import Item, Location
-from .Items import get_full_item_list, spider_mine_sources, second_pass_placeable_items, progressive_if_nco, \
- progressive_if_ext, spear_of_adun_calldowns, spear_of_adun_castable_passives, nova_equipment
-from .MissionTables import mission_orders, MissionInfo, MissionPools, \
- get_campaign_goal_priority, campaign_final_mission_locations, campaign_alt_final_mission_locations, \
- SC2Campaign, SC2Race, SC2CampaignGoalPriority, SC2Mission
-from .Options import get_option_value, MissionOrder, \
- get_enabled_campaigns, get_disabled_campaigns, RequiredTactics, kerrigan_unit_available, GrantStoryTech, \
- TakeOverAIAllies, SpearOfAdunPresence, SpearOfAdunAutonomouslyCastAbilityPresence, campaign_depending_orders, \
- ShuffleCampaigns, get_excluded_missions, ShuffleNoBuild, ExtraLocations, GrantStoryLevels
-from . import ItemNames
-from worlds.AutoWorld import World
-
-# Items with associated upgrades
-UPGRADABLE_ITEMS = {item.parent_item for item in get_full_item_list().values() if item.parent_item}
-
-BARRACKS_UNITS = {
- ItemNames.MARINE, ItemNames.MEDIC, ItemNames.FIREBAT, ItemNames.MARAUDER,
- ItemNames.REAPER, ItemNames.GHOST, ItemNames.SPECTRE, ItemNames.HERC,
-}
-FACTORY_UNITS = {
- ItemNames.HELLION, ItemNames.VULTURE, ItemNames.GOLIATH, ItemNames.DIAMONDBACK,
- ItemNames.SIEGE_TANK, ItemNames.THOR, ItemNames.PREDATOR, ItemNames.WIDOW_MINE,
- ItemNames.CYCLONE, ItemNames.WARHOUND,
-}
-STARPORT_UNITS = {
- ItemNames.MEDIVAC, ItemNames.WRAITH, ItemNames.VIKING, ItemNames.BANSHEE,
- ItemNames.BATTLECRUISER, ItemNames.HERCULES, ItemNames.SCIENCE_VESSEL, ItemNames.RAVEN,
- ItemNames.LIBERATOR, ItemNames.VALKYRIE,
-}
-
-
-def filter_missions(world: World) -> Dict[MissionPools, List[SC2Mission]]:
-
- """
- Returns a semi-randomly pruned tuple of no-build, easy, medium, and hard mission sets
- """
- world: World = world
- mission_order_type = get_option_value(world, "mission_order")
- shuffle_no_build = get_option_value(world, "shuffle_no_build")
- enabled_campaigns = get_enabled_campaigns(world)
- grant_story_tech = get_option_value(world, "grant_story_tech") == GrantStoryTech.option_true
- grant_story_levels = get_option_value(world, "grant_story_levels") != GrantStoryLevels.option_disabled
- extra_locations = get_option_value(world, "extra_locations")
- excluded_missions: Set[SC2Mission] = get_excluded_missions(world)
- mission_pools: Dict[MissionPools, List[SC2Mission]] = {}
- for mission in SC2Mission:
- if not mission_pools.get(mission.pool):
- mission_pools[mission.pool] = list()
- mission_pools[mission.pool].append(mission)
- # A bit of safeguard:
- for mission_pool in MissionPools:
- if not mission_pools.get(mission_pool):
- mission_pools[mission_pool] = []
-
- if mission_order_type == MissionOrder.option_vanilla:
- # Vanilla uses the entire mission pool
- goal_priorities: Dict[SC2Campaign, SC2CampaignGoalPriority] = {campaign: get_campaign_goal_priority(campaign) for campaign in enabled_campaigns}
- goal_level = max(goal_priorities.values())
- candidate_campaigns: List[SC2Campaign] = [campaign for campaign, goal_priority in goal_priorities.items() if goal_priority == goal_level]
- candidate_campaigns.sort(key=lambda it: it.id)
- goal_campaign = world.random.choice(candidate_campaigns)
- if campaign_final_mission_locations[goal_campaign] is not None:
- mission_pools[MissionPools.FINAL] = [campaign_final_mission_locations[goal_campaign].mission]
- else:
- mission_pools[MissionPools.FINAL] = [list(campaign_alt_final_mission_locations[goal_campaign].keys())[0]]
- remove_final_mission_from_other_pools(mission_pools)
- return mission_pools
-
- # Finding the goal map
- goal_mission: Optional[SC2Mission] = None
- if mission_order_type in campaign_depending_orders:
- # Prefer long campaigns over shorter ones and harder missions over easier ones
- goal_priorities = {campaign: get_campaign_goal_priority(campaign, excluded_missions) for campaign in enabled_campaigns}
- goal_level = max(goal_priorities.values())
- candidate_campaigns: List[SC2Campaign] = [campaign for campaign, goal_priority in goal_priorities.items() if goal_priority == goal_level]
- candidate_campaigns.sort(key=lambda it: it.id)
-
- goal_campaign = world.random.choice(candidate_campaigns)
- primary_goal = campaign_final_mission_locations[goal_campaign]
- if primary_goal is None or primary_goal.mission in excluded_missions:
- # No primary goal or its mission is excluded
- candidate_missions = list(campaign_alt_final_mission_locations[goal_campaign].keys())
- candidate_missions = [mission for mission in candidate_missions if mission not in excluded_missions]
- if len(candidate_missions) == 0:
- raise Exception("There are no valid goal missions. Please exclude fewer missions.")
- goal_mission = world.random.choice(candidate_missions)
- else:
- goal_mission = primary_goal.mission
- else:
- # Find one of the missions with the hardest difficulty
- available_missions: List[SC2Mission] = \
- [mission for mission in SC2Mission
- if (mission not in excluded_missions and mission.campaign in enabled_campaigns)]
- available_missions.sort(key=lambda it: it.id)
- # Loop over pools, from hardest to easiest
- for mission_pool in range(MissionPools.VERY_HARD, MissionPools.STARTER - 1, -1):
- pool_missions: List[SC2Mission] = [mission for mission in available_missions if mission.pool == mission_pool]
- if pool_missions:
- goal_mission = world.random.choice(pool_missions)
- break
- if goal_mission is None:
- raise Exception("There are no valid goal missions. Please exclude fewer missions.")
-
- # Excluding missions
- for difficulty, mission_pool in mission_pools.items():
- mission_pools[difficulty] = [mission for mission in mission_pool if mission not in excluded_missions]
- mission_pools[MissionPools.FINAL] = [goal_mission]
-
- # Mission pool changes
- adv_tactics = get_option_value(world, "required_tactics") != RequiredTactics.option_standard
-
- def move_mission(mission: SC2Mission, current_pool, new_pool):
- if mission in mission_pools[current_pool]:
- mission_pools[current_pool].remove(mission)
- mission_pools[new_pool].append(mission)
- # WoL
- if shuffle_no_build == ShuffleNoBuild.option_false or adv_tactics:
- # Replacing No Build missions with Easy missions
- # WoL
- move_mission(SC2Mission.ZERO_HOUR, MissionPools.EASY, MissionPools.STARTER)
- move_mission(SC2Mission.EVACUATION, MissionPools.EASY, MissionPools.STARTER)
- move_mission(SC2Mission.DEVILS_PLAYGROUND, MissionPools.EASY, MissionPools.STARTER)
- # LotV
- move_mission(SC2Mission.THE_GROWING_SHADOW, MissionPools.EASY, MissionPools.STARTER)
- move_mission(SC2Mission.THE_SPEAR_OF_ADUN, MissionPools.EASY, MissionPools.STARTER)
- if extra_locations == ExtraLocations.option_enabled:
- move_mission(SC2Mission.SKY_SHIELD, MissionPools.EASY, MissionPools.STARTER)
- # Pushing this to Easy
- move_mission(SC2Mission.THE_GREAT_TRAIN_ROBBERY, MissionPools.MEDIUM, MissionPools.EASY)
- if shuffle_no_build == ShuffleNoBuild.option_false:
- # Pushing Outbreak to Normal, as it cannot be placed as the second mission on Build-Only
- move_mission(SC2Mission.OUTBREAK, MissionPools.EASY, MissionPools.MEDIUM)
- # Pushing extra Normal missions to Easy
- move_mission(SC2Mission.ECHOES_OF_THE_FUTURE, MissionPools.MEDIUM, MissionPools.EASY)
- move_mission(SC2Mission.CUTTHROAT, MissionPools.MEDIUM, MissionPools.EASY)
- # Additional changes on Advanced Tactics
- if adv_tactics:
- # WoL
- move_mission(SC2Mission.THE_GREAT_TRAIN_ROBBERY, MissionPools.EASY, MissionPools.STARTER)
- move_mission(SC2Mission.SMASH_AND_GRAB, MissionPools.EASY, MissionPools.STARTER)
- move_mission(SC2Mission.THE_MOEBIUS_FACTOR, MissionPools.MEDIUM, MissionPools.EASY)
- move_mission(SC2Mission.WELCOME_TO_THE_JUNGLE, MissionPools.MEDIUM, MissionPools.EASY)
- move_mission(SC2Mission.ENGINE_OF_DESTRUCTION, MissionPools.HARD, MissionPools.MEDIUM)
- # LotV
- move_mission(SC2Mission.AMON_S_REACH, MissionPools.EASY, MissionPools.STARTER)
- # Prophecy needs to be adjusted on tiny grid
- if enabled_campaigns == {SC2Campaign.PROPHECY} and mission_order_type == MissionOrder.option_tiny_grid:
- move_mission(SC2Mission.A_SINISTER_TURN, MissionPools.MEDIUM, MissionPools.EASY)
- # Prologue's only valid starter is the goal mission
- if enabled_campaigns == {SC2Campaign.PROLOGUE} \
- or mission_order_type in campaign_depending_orders \
- and get_option_value(world, "shuffle_campaigns") == ShuffleCampaigns.option_false:
- move_mission(SC2Mission.DARK_WHISPERS, MissionPools.EASY, MissionPools.STARTER)
- # HotS
- kerriganless = get_option_value(world, "kerrigan_presence") not in kerrigan_unit_available \
- or SC2Campaign.HOTS not in enabled_campaigns
- if adv_tactics:
- # Medium -> Easy
- for mission in (SC2Mission.FIRE_IN_THE_SKY, SC2Mission.WAKING_THE_ANCIENT, SC2Mission.CONVICTION):
- move_mission(mission, MissionPools.MEDIUM, MissionPools.EASY)
- # Hard -> Medium
- move_mission(SC2Mission.PHANTOMS_OF_THE_VOID, MissionPools.HARD, MissionPools.MEDIUM)
- if not kerriganless:
- # Additional starter mission assuming player starts with minimal anti-air
- move_mission(SC2Mission.WAKING_THE_ANCIENT, MissionPools.EASY, MissionPools.STARTER)
- if grant_story_tech:
- # Additional starter mission if player is granted story tech
- move_mission(SC2Mission.ENEMY_WITHIN, MissionPools.EASY, MissionPools.STARTER)
- move_mission(SC2Mission.TEMPLAR_S_RETURN, MissionPools.EASY, MissionPools.STARTER)
- move_mission(SC2Mission.THE_ESCAPE, MissionPools.MEDIUM, MissionPools.STARTER)
- move_mission(SC2Mission.IN_THE_ENEMY_S_SHADOW, MissionPools.MEDIUM, MissionPools.STARTER)
- if (grant_story_tech and grant_story_levels) or kerriganless:
- # The player has, all the stuff he needs, provided under these settings
- move_mission(SC2Mission.SUPREME, MissionPools.MEDIUM, MissionPools.STARTER)
- move_mission(SC2Mission.THE_INFINITE_CYCLE, MissionPools.HARD, MissionPools.STARTER)
- if get_option_value(world, "take_over_ai_allies") == TakeOverAIAllies.option_true:
- move_mission(SC2Mission.HARBINGER_OF_OBLIVION, MissionPools.MEDIUM, MissionPools.STARTER)
- if len(mission_pools[MissionPools.STARTER]) < 2 and not kerriganless or adv_tactics:
- # Conditionally moving Easy missions to Starter
- move_mission(SC2Mission.HARVEST_OF_SCREAMS, MissionPools.EASY, MissionPools.STARTER)
- move_mission(SC2Mission.DOMINATION, MissionPools.EASY, MissionPools.STARTER)
- if len(mission_pools[MissionPools.STARTER]) < 2:
- move_mission(SC2Mission.TEMPLAR_S_RETURN, MissionPools.EASY, MissionPools.STARTER)
- if len(mission_pools[MissionPools.STARTER]) + len(mission_pools[MissionPools.EASY]) < 2:
- # Flashpoint needs just a few items at start but competent comp at the end
- move_mission(SC2Mission.FLASHPOINT, MissionPools.HARD, MissionPools.EASY)
-
- remove_final_mission_from_other_pools(mission_pools)
- return mission_pools
-
-
-def remove_final_mission_from_other_pools(mission_pools: Dict[MissionPools, List[SC2Mission]]):
- final_missions = mission_pools[MissionPools.FINAL]
- for pool, missions in mission_pools.items():
- if pool == MissionPools.FINAL:
- continue
- for final_mission in final_missions:
- while final_mission in missions:
- missions.remove(final_mission)
-
-
-def get_item_upgrades(inventory: List[Item], parent_item: Union[Item, str]) -> List[Item]:
- item_name = parent_item.name if isinstance(parent_item, Item) else parent_item
- return [
- inv_item for inv_item in inventory
- if get_full_item_list()[inv_item.name].parent_item == item_name
- ]
-
-
-def get_item_quantity(item: Item, world: World):
- if (not get_option_value(world, "nco_items")) \
- and SC2Campaign.NCO in get_disabled_campaigns(world) \
- and item.name in progressive_if_nco:
- return 1
- if (not get_option_value(world, "ext_items")) \
- and item.name in progressive_if_ext:
- return 1
- return get_full_item_list()[item.name].quantity
-
-
-def copy_item(item: Item):
- return Item(item.name, item.classification, item.code, item.player)
-
-
-def num_missions(world: World) -> int:
- mission_order_type = get_option_value(world, "mission_order")
- if mission_order_type != MissionOrder.option_grid:
- mission_order = mission_orders[mission_order_type]()
- misssions = [mission for campaign in mission_order for mission in mission_order[campaign]]
- return len(misssions) - 1 # Menu
- else:
- mission_pools = filter_missions(world)
- return sum(len(pool) for _, pool in mission_pools.items())
-
-
-class ValidInventory:
-
- def has(self, item: str, player: int):
- return item in self.logical_inventory
-
- def has_any(self, items: Set[str], player: int):
- return any(item in self.logical_inventory for item in items)
-
- def has_all(self, items: Set[str], player: int):
- return all(item in self.logical_inventory for item in items)
-
- def has_group(self, item_group: str, player: int, count: int = 1):
- return False # Deliberately fails here, as item pooling is not aware about mission layout
-
- def count_group(self, item_name_group: str, player: int) -> int:
- return 0 # For item filtering assume no missions are beaten
-
- def count(self, item: str, player: int) -> int:
- return len([inventory_item for inventory_item in self.logical_inventory if inventory_item == item])
-
- def has_units_per_structure(self) -> bool:
- return len(BARRACKS_UNITS.intersection(self.logical_inventory)) > self.min_units_per_structure and \
- len(FACTORY_UNITS.intersection(self.logical_inventory)) > self.min_units_per_structure and \
- len(STARPORT_UNITS.intersection(self.logical_inventory)) > self.min_units_per_structure
-
- def generate_reduced_inventory(self, inventory_size: int, mission_requirements: List[Tuple[str, Callable]]) -> List[Item]:
- """Attempts to generate a reduced inventory that can fulfill the mission requirements."""
- inventory: List[Item] = list(self.item_pool)
- locked_items: List[Item] = list(self.locked_items)
- item_list = get_full_item_list()
- self.logical_inventory = [
- item.name for item in inventory + locked_items + self.existing_items
- if item_list[item.name].is_important_for_filtering() # Track all Progression items and those with complex rules for filtering
- ]
- requirements = mission_requirements
- parent_items = self.item_children.keys()
- parent_lookup = {child: parent for parent, children in self.item_children.items() for child in children}
- minimum_upgrades = get_option_value(self.world, "min_number_of_upgrades")
-
- def attempt_removal(item: Item) -> bool:
- inventory.remove(item)
- # Only run logic checks when removing logic items
- if item.name in self.logical_inventory:
- self.logical_inventory.remove(item.name)
- if not all(requirement(self) for (_, requirement) in mission_requirements):
- # If item cannot be removed, lock or revert
- self.logical_inventory.append(item.name)
- for _ in range(get_item_quantity(item, self.world)):
- locked_items.append(copy_item(item))
- return False
- return True
-
- # Limit the maximum number of upgrades
- maxNbUpgrade = get_option_value(self.world, "max_number_of_upgrades")
- if maxNbUpgrade != -1:
- unit_avail_upgrades = {}
- # Needed to take into account locked/existing items
- unit_nb_upgrades = {}
- for item in inventory:
- cItem = item_list[item.name]
- if item.name in UPGRADABLE_ITEMS and item.name not in unit_avail_upgrades:
- unit_avail_upgrades[item.name] = []
- unit_nb_upgrades[item.name] = 0
- elif cItem.parent_item is not None:
- if cItem.parent_item not in unit_avail_upgrades:
- unit_avail_upgrades[cItem.parent_item] = [item]
- unit_nb_upgrades[cItem.parent_item] = 1
- else:
- unit_avail_upgrades[cItem.parent_item].append(item)
- unit_nb_upgrades[cItem.parent_item] += 1
- # For those two categories, we count them but dont include them in removal
- for item in locked_items + self.existing_items:
- cItem = item_list[item.name]
- if item.name in UPGRADABLE_ITEMS and item.name not in unit_avail_upgrades:
- unit_avail_upgrades[item.name] = []
- unit_nb_upgrades[item.name] = 0
- elif cItem.parent_item is not None:
- if cItem.parent_item not in unit_avail_upgrades:
- unit_nb_upgrades[cItem.parent_item] = 1
- else:
- unit_nb_upgrades[cItem.parent_item] += 1
- # Making sure that the upgrades being removed is random
- shuffled_unit_upgrade_list = list(unit_avail_upgrades.keys())
- self.world.random.shuffle(shuffled_unit_upgrade_list)
- for unit in shuffled_unit_upgrade_list:
- while (unit_nb_upgrades[unit] > maxNbUpgrade) \
- and (len(unit_avail_upgrades[unit]) > 0):
- itemCandidate = self.world.random.choice(unit_avail_upgrades[unit])
- success = attempt_removal(itemCandidate)
- # Whatever it succeed to remove the iventory or it fails and thus
- # lock it, the upgrade is no longer available for removal
- unit_avail_upgrades[unit].remove(itemCandidate)
- if success:
- unit_nb_upgrades[unit] -= 1
-
- # Locking minimum upgrades for items that have already been locked/placed when minimum required
- if minimum_upgrades > 0:
- known_items = self.existing_items + locked_items
- known_parents = [item for item in known_items if item in parent_items]
- for parent in known_parents:
- child_items = self.item_children[parent]
- removable_upgrades = [item for item in inventory if item in child_items]
- locked_upgrade_count = sum(1 if item in child_items else 0 for item in known_items)
- self.world.random.shuffle(removable_upgrades)
- while len(removable_upgrades) > 0 and locked_upgrade_count < minimum_upgrades:
- item_to_lock = removable_upgrades.pop()
- inventory.remove(item_to_lock)
- locked_items.append(copy_item(item_to_lock))
- locked_upgrade_count += 1
-
- if self.min_units_per_structure > 0 and self.has_units_per_structure():
- requirements.append(("Minimum units per structure", lambda state: state.has_units_per_structure()))
-
- # Determining if the full-size inventory can complete campaign
- failed_locations: List[str] = [location for (location, requirement) in requirements if not requirement(self)]
- if len(failed_locations) > 0:
- raise Exception(f"Too many items excluded - couldn't satisfy access rules for the following locations:\n{failed_locations}")
-
- # Optionally locking generic items
- generic_items = [item for item in inventory if item.name in second_pass_placeable_items]
- reserved_generic_percent = get_option_value(self.world, "ensure_generic_items") / 100
- reserved_generic_amount = int(len(generic_items) * reserved_generic_percent)
- removable_generic_items = []
- self.world.random.shuffle(generic_items)
- for item in generic_items[:reserved_generic_amount]:
- locked_items.append(copy_item(item))
- inventory.remove(item)
- if item.name not in self.logical_inventory and item.name not in self.locked_items:
- removable_generic_items.append(item)
-
- # Main cull process
- unused_items: List[str] = [] # Reusable items for the second pass
- while len(inventory) + len(locked_items) > inventory_size:
- if len(inventory) == 0:
- # There are more items than locations and all of them are already locked due to YAML or logic.
- # First, drop non-logic generic items to free up space
- while len(removable_generic_items) > 0 and len(locked_items) > inventory_size:
- removed_item = removable_generic_items.pop()
- locked_items.remove(removed_item)
- # If there still isn't enough space, push locked items into start inventory
- self.world.random.shuffle(locked_items)
- while len(locked_items) > inventory_size:
- item: Item = locked_items.pop()
- self.multiworld.push_precollected(item)
- break
- # Select random item from removable items
- item = self.world.random.choice(inventory)
- # Do not remove item if it would drop upgrades below minimum
- if minimum_upgrades > 0:
- parent_item = parent_lookup.get(item, None)
- if parent_item:
- count = sum(1 if item in self.item_children[parent_item] else 0 for item in inventory + locked_items)
- if count <= minimum_upgrades:
- if parent_item in inventory:
- # Attempt to remove parent instead, if possible
- item = parent_item
- else:
- # Lock remaining upgrades
- for item in self.item_children[parent_item]:
- if item in inventory:
- inventory.remove(item)
- locked_items.append(copy_item(item))
- continue
-
- # Drop child items when removing a parent
- if item in parent_items:
- items_to_remove = [item for item in self.item_children[item] if item in inventory]
- success = attempt_removal(item)
- if success:
- while len(items_to_remove) > 0:
- item_to_remove = items_to_remove.pop()
- if item_to_remove not in inventory:
- continue
- attempt_removal(item_to_remove)
- else:
- # Unimportant upgrades may be added again in the second pass
- if attempt_removal(item):
- unused_items.append(item.name)
-
- pool_items: List[str] = [item.name for item in (inventory + locked_items + self.existing_items)]
- unused_items = [
- unused_item for unused_item in unused_items
- if item_list[unused_item].parent_item is None
- or item_list[unused_item].parent_item in pool_items
- ]
-
- # Removing extra dependencies
- # WoL
- logical_inventory_set = set(self.logical_inventory)
- if not spider_mine_sources & logical_inventory_set:
- inventory = [item for item in inventory if not item.name.endswith("(Spider Mine)")]
- unused_items = [item_name for item_name in unused_items if not item_name.endswith("(Spider Mine)")]
- if not BARRACKS_UNITS & logical_inventory_set:
- inventory = [
- item for item in inventory
- if not (item.name.startswith(ItemNames.TERRAN_INFANTRY_UPGRADE_PREFIX)
- or item.name == ItemNames.ORBITAL_STRIKE)]
- unused_items = [
- item_name for item_name in unused_items
- if not (item_name.startswith(
- ItemNames.TERRAN_INFANTRY_UPGRADE_PREFIX)
- or item_name == ItemNames.ORBITAL_STRIKE)]
- if not FACTORY_UNITS & logical_inventory_set:
- inventory = [item for item in inventory if not item.name.startswith(ItemNames.TERRAN_VEHICLE_UPGRADE_PREFIX)]
- unused_items = [item_name for item_name in unused_items if not item_name.startswith(ItemNames.TERRAN_VEHICLE_UPGRADE_PREFIX)]
- if not STARPORT_UNITS & logical_inventory_set:
- inventory = [item for item in inventory if not item.name.startswith(ItemNames.TERRAN_SHIP_UPGRADE_PREFIX)]
- unused_items = [item_name for item_name in unused_items if not item_name.startswith(ItemNames.TERRAN_SHIP_UPGRADE_PREFIX)]
- # HotS
- # Baneling without sources => remove Baneling and upgrades
- if (ItemNames.ZERGLING_BANELING_ASPECT in self.logical_inventory
- and ItemNames.ZERGLING not in self.logical_inventory
- and ItemNames.KERRIGAN_SPAWN_BANELINGS not in self.logical_inventory
- ):
- inventory = [item for item in inventory if item.name != ItemNames.ZERGLING_BANELING_ASPECT]
- inventory = [item for item in inventory if item_list[item.name].parent_item != ItemNames.ZERGLING_BANELING_ASPECT]
- unused_items = [item_name for item_name in unused_items if item_name != ItemNames.ZERGLING_BANELING_ASPECT]
- unused_items = [item_name for item_name in unused_items if item_list[item_name].parent_item != ItemNames.ZERGLING_BANELING_ASPECT]
- # Spawn Banelings without Zergling => remove Baneling unit, keep upgrades except macro ones
- if (ItemNames.ZERGLING_BANELING_ASPECT in self.logical_inventory
- and ItemNames.ZERGLING not in self.logical_inventory
- and ItemNames.KERRIGAN_SPAWN_BANELINGS in self.logical_inventory
- ):
- inventory = [item for item in inventory if item.name != ItemNames.ZERGLING_BANELING_ASPECT]
- inventory = [item for item in inventory if item.name != ItemNames.BANELING_RAPID_METAMORPH]
- unused_items = [item_name for item_name in unused_items if item_name != ItemNames.ZERGLING_BANELING_ASPECT]
- unused_items = [item_name for item_name in unused_items if item_name != ItemNames.BANELING_RAPID_METAMORPH]
- if not {ItemNames.MUTALISK, ItemNames.CORRUPTOR, ItemNames.SCOURGE} & logical_inventory_set:
- inventory = [item for item in inventory if not item.name.startswith(ItemNames.ZERG_FLYER_UPGRADE_PREFIX)]
- locked_items = [item for item in locked_items if not item.name.startswith(ItemNames.ZERG_FLYER_UPGRADE_PREFIX)]
- unused_items = [item_name for item_name in unused_items if not item_name.startswith(ItemNames.ZERG_FLYER_UPGRADE_PREFIX)]
- # T3 items removal rules - remove morph and its upgrades if the basic unit isn't in
- if not {ItemNames.MUTALISK, ItemNames.CORRUPTOR} & logical_inventory_set:
- inventory = [item for item in inventory if not item.name.endswith("(Mutalisk/Corruptor)")]
- inventory = [item for item in inventory if item_list[item.name].parent_item != ItemNames.MUTALISK_CORRUPTOR_GUARDIAN_ASPECT]
- inventory = [item for item in inventory if item_list[item.name].parent_item != ItemNames.MUTALISK_CORRUPTOR_DEVOURER_ASPECT]
- inventory = [item for item in inventory if item_list[item.name].parent_item != ItemNames.MUTALISK_CORRUPTOR_BROOD_LORD_ASPECT]
- inventory = [item for item in inventory if item_list[item.name].parent_item != ItemNames.MUTALISK_CORRUPTOR_VIPER_ASPECT]
- unused_items = [item_name for item_name in unused_items if not item_name.endswith("(Mutalisk/Corruptor)")]
- unused_items = [item_name for item_name in unused_items if item_list[item_name].parent_item != ItemNames.MUTALISK_CORRUPTOR_GUARDIAN_ASPECT]
- unused_items = [item_name for item_name in unused_items if item_list[item_name].parent_item != ItemNames.MUTALISK_CORRUPTOR_DEVOURER_ASPECT]
- unused_items = [item_name for item_name in unused_items if item_list[item_name].parent_item != ItemNames.MUTALISK_CORRUPTOR_BROOD_LORD_ASPECT]
- unused_items = [item_name for item_name in unused_items if item_list[item_name].parent_item != ItemNames.MUTALISK_CORRUPTOR_VIPER_ASPECT]
- if ItemNames.ROACH not in logical_inventory_set:
- inventory = [item for item in inventory if item.name != ItemNames.ROACH_RAVAGER_ASPECT]
- inventory = [item for item in inventory if item_list[item.name].parent_item != ItemNames.ROACH_RAVAGER_ASPECT]
- unused_items = [item_name for item_name in unused_items if item_name != ItemNames.ROACH_RAVAGER_ASPECT]
- unused_items = [item_name for item_name in unused_items if item_list[item_name].parent_item != ItemNames.ROACH_RAVAGER_ASPECT]
- if ItemNames.HYDRALISK not in logical_inventory_set:
- inventory = [item for item in inventory if not item.name.endswith("(Hydralisk)")]
- inventory = [item for item in inventory if item_list[item.name].parent_item != ItemNames.HYDRALISK_LURKER_ASPECT]
- inventory = [item for item in inventory if item_list[item.name].parent_item != ItemNames.HYDRALISK_IMPALER_ASPECT]
- unused_items = [item_name for item_name in unused_items if not item_name.endswith("(Hydralisk)")]
- unused_items = [item_name for item_name in unused_items if item_list[item_name].parent_item != ItemNames.HYDRALISK_LURKER_ASPECT]
- unused_items = [item_name for item_name in unused_items if item_list[item_name].parent_item != ItemNames.HYDRALISK_IMPALER_ASPECT]
- # LotV
- # Shared unit upgrades between several units
- if not {ItemNames.STALKER, ItemNames.INSTIGATOR, ItemNames.SLAYER} & logical_inventory_set:
- inventory = [item for item in inventory if not item.name.endswith("(Stalker/Instigator/Slayer)")]
- unused_items = [item_name for item_name in unused_items if not item_name.endswith("(Stalker/Instigator/Slayer)")]
- if not {ItemNames.PHOENIX, ItemNames.MIRAGE} & logical_inventory_set:
- inventory = [item for item in inventory if not item.name.endswith("(Phoenix/Mirage)")]
- unused_items = [item_name for item_name in unused_items if not item_name.endswith("(Phoenix/Mirage)")]
- if not {ItemNames.VOID_RAY, ItemNames.DESTROYER} & logical_inventory_set:
- inventory = [item for item in inventory if not item.name.endswith("(Void Ray/Destroyer)")]
- unused_items = [item_name for item_name in unused_items if not item_name.endswith("(Void Ray/Destroyer)")]
- if not {ItemNames.IMMORTAL, ItemNames.ANNIHILATOR} & logical_inventory_set:
- inventory = [item for item in inventory if not item.name.endswith("(Immortal/Annihilator)")]
- unused_items = [item_name for item_name in unused_items if not item_name.endswith("(Immortal/Annihilator)")]
- if not {ItemNames.DARK_TEMPLAR, ItemNames.AVENGER, ItemNames.BLOOD_HUNTER} & logical_inventory_set:
- inventory = [item for item in inventory if not item.name.endswith("(Dark Templar/Avenger/Blood Hunter)")]
- unused_items = [item_name for item_name in unused_items if not item_name.endswith("(Dark Templar/Avenger/Blood Hunter)")]
- if not {ItemNames.HIGH_TEMPLAR, ItemNames.SIGNIFIER, ItemNames.ASCENDANT, ItemNames.DARK_TEMPLAR} & logical_inventory_set:
- inventory = [item for item in inventory if not item.name.endswith("(Archon)")]
- unused_items = [item_name for item_name in unused_items if not item_name.endswith("(Archon)")]
- logical_inventory_set.difference_update([item_name for item_name in logical_inventory_set if item_name.endswith("(Archon)")])
- if not {ItemNames.HIGH_TEMPLAR, ItemNames.SIGNIFIER, ItemNames.ARCHON_HIGH_ARCHON} & logical_inventory_set:
- inventory = [item for item in inventory if not item.name.endswith("(High Templar/Signifier)")]
- unused_items = [item_name for item_name in unused_items if not item_name.endswith("(High Templar/Signifier)")]
- if ItemNames.SUPPLICANT not in logical_inventory_set:
- inventory = [item for item in inventory if item.name != ItemNames.ASCENDANT_POWER_OVERWHELMING]
- unused_items = [item_name for item_name in unused_items if item_name != ItemNames.ASCENDANT_POWER_OVERWHELMING]
- if not {ItemNames.DARK_ARCHON, ItemNames.DARK_TEMPLAR_DARK_ARCHON_MELD} & logical_inventory_set:
- inventory = [item for item in inventory if not item.name.endswith("(Dark Archon)")]
- unused_items = [item_name for item_name in unused_items if not item_name.endswith("(Dark Archon)")]
- if not {ItemNames.SENTRY, ItemNames.ENERGIZER, ItemNames.HAVOC} & logical_inventory_set:
- inventory = [item for item in inventory if not item.name.endswith("(Sentry/Energizer/Havoc)")]
- unused_items = [item_name for item_name in unused_items if not item_name.endswith("(Sentry/Energizer/Havoc)")]
- if not {ItemNames.SENTRY, ItemNames.ENERGIZER, ItemNames.HAVOC, ItemNames.SHIELD_BATTERY} & logical_inventory_set:
- inventory = [item for item in inventory if not item.name.endswith("(Sentry/Energizer/Havoc/Shield Battery)")]
- unused_items = [item_name for item_name in unused_items if not item_name.endswith("(Sentry/Energizer/Havoc/Shield Battery)")]
- if not {ItemNames.ZEALOT, ItemNames.CENTURION, ItemNames.SENTINEL} & logical_inventory_set:
- inventory = [item for item in inventory if not item.name.endswith("(Zealot/Sentinel/Centurion)")]
- unused_items = [item_name for item_name in unused_items if not item_name.endswith("(Zealot/Sentinel/Centurion)")]
- # Static defense upgrades only if static defense present
- if not {ItemNames.PHOTON_CANNON, ItemNames.KHAYDARIN_MONOLITH, ItemNames.NEXUS_OVERCHARGE, ItemNames.SHIELD_BATTERY} & logical_inventory_set:
- inventory = [item for item in inventory if item.name != ItemNames.ENHANCED_TARGETING]
- unused_items = [item_name for item_name in unused_items if item_name != ItemNames.ENHANCED_TARGETING]
- if not {ItemNames.PHOTON_CANNON, ItemNames.KHAYDARIN_MONOLITH, ItemNames.NEXUS_OVERCHARGE} & logical_inventory_set:
- inventory = [item for item in inventory if item.name != ItemNames.OPTIMIZED_ORDNANCE]
- unused_items = [item_name for item_name in unused_items if item_name != ItemNames.OPTIMIZED_ORDNANCE]
-
- # Cull finished, adding locked items back into inventory
- inventory += locked_items
-
- # Replacing empty space with generically useful items
- replacement_items = [item for item in self.item_pool
- if (item not in inventory
- and item not in self.locked_items
- and (
- item.name in second_pass_placeable_items
- or item.name in unused_items))]
- self.world.random.shuffle(replacement_items)
- while len(inventory) < inventory_size and len(replacement_items) > 0:
- item = replacement_items.pop()
- inventory.append(item)
-
- return inventory
-
- def __init__(self, world: World ,
- item_pool: List[Item], existing_items: List[Item], locked_items: List[Item],
- used_races: Set[SC2Race], nova_equipment_used: bool):
- self.multiworld = world.multiworld
- self.player = world.player
- self.world: World = world
- self.logical_inventory = list()
- self.locked_items = locked_items[:]
- self.existing_items = existing_items
- soa_presence = get_option_value(world, "spear_of_adun_presence")
- soa_autocast_presence = get_option_value(world, "spear_of_adun_autonomously_cast_ability_presence")
- # Initial filter of item pool
- self.item_pool = []
- item_quantities: dict[str, int] = dict()
- # Inventory restrictiveness based on number of missions with checks
- mission_count = num_missions(world)
- self.min_units_per_structure = int(mission_count / 7)
- min_upgrades = 1 if mission_count < 10 else 2
- for item in item_pool:
- item_info = get_full_item_list()[item.name]
- if item_info.race != SC2Race.ANY and item_info.race not in used_races:
- if soa_presence == SpearOfAdunPresence.option_everywhere \
- and item.name in spear_of_adun_calldowns:
- # Add SoA powers regardless of used races as it's present everywhere
- self.item_pool.append(item)
- if soa_autocast_presence == SpearOfAdunAutonomouslyCastAbilityPresence.option_everywhere \
- and item.name in spear_of_adun_castable_passives:
- self.item_pool.append(item)
- # Drop any item belonging to a race not used in the campaign
- continue
- if item.name in nova_equipment and not nova_equipment_used:
- # Drop Nova equipment if there's no NCO mission generated
- continue
- if item_info.type == "Upgrade":
- # Locking upgrades based on mission duration
- if item.name not in item_quantities:
- item_quantities[item.name] = 0
- item_quantities[item.name] += 1
- if item_quantities[item.name] <= min_upgrades:
- self.locked_items.append(item)
- else:
- self.item_pool.append(item)
- elif item_info.type == "Goal":
- self.locked_items.append(item)
- else:
- self.item_pool.append(item)
- self.item_children: Dict[Item, List[Item]] = dict()
- for item in self.item_pool + locked_items + existing_items:
- if item.name in UPGRADABLE_ITEMS:
- self.item_children[item] = get_item_upgrades(self.item_pool, item)
-
-
-def filter_items(world: World, mission_req_table: Dict[SC2Campaign, Dict[str, MissionInfo]], location_cache: List[Location],
- item_pool: List[Item], existing_items: List[Item], locked_items: List[Item]) -> List[Item]:
- """
- Returns a semi-randomly pruned set of items based on number of available locations.
- The returned inventory must be capable of logically accessing every location in the world.
- """
- open_locations = [location for location in location_cache if location.item is None]
- inventory_size = len(open_locations)
- used_races = get_used_races(mission_req_table, world)
- nova_equipment_used = is_nova_equipment_used(mission_req_table)
- mission_requirements = [(location.name, location.access_rule) for location in location_cache]
- valid_inventory = ValidInventory(world, item_pool, existing_items, locked_items, used_races, nova_equipment_used)
-
- valid_items = valid_inventory.generate_reduced_inventory(inventory_size, mission_requirements)
- return valid_items
-
-
-def get_used_races(mission_req_table: Dict[SC2Campaign, Dict[str, MissionInfo]], world: World) -> Set[SC2Race]:
- grant_story_tech = get_option_value(world, "grant_story_tech")
- take_over_ai_allies = get_option_value(world, "take_over_ai_allies")
- kerrigan_presence = get_option_value(world, "kerrigan_presence") in kerrigan_unit_available \
- and SC2Campaign.HOTS in get_enabled_campaigns(world)
- missions = missions_in_mission_table(mission_req_table)
-
- # By missions
- races = set([mission.race for mission in missions])
-
- # Conditionally logic-less no-builds (They're set to SC2Race.ANY):
- if grant_story_tech == GrantStoryTech.option_false:
- if SC2Mission.ENEMY_WITHIN in missions:
- # Zerg units need to be unlocked
- races.add(SC2Race.ZERG)
- if kerrigan_presence \
- and not missions.isdisjoint({SC2Mission.BACK_IN_THE_SADDLE, SC2Mission.SUPREME, SC2Mission.CONVICTION, SC2Mission.THE_INFINITE_CYCLE}):
- # You need some Kerrigan abilities (they're granted if Kerriganless or story tech granted)
- races.add(SC2Race.ZERG)
-
- # If you take over the AI Ally, you need to have its race stuff
- if take_over_ai_allies == TakeOverAIAllies.option_true \
- and not missions.isdisjoint({SC2Mission.THE_RECKONING}):
- # Jimmy in The Reckoning
- races.add(SC2Race.TERRAN)
-
- return races
-
-def is_nova_equipment_used(mission_req_table: Dict[SC2Campaign, Dict[str, MissionInfo]]) -> bool:
- missions = missions_in_mission_table(mission_req_table)
- return any([mission.campaign == SC2Campaign.NCO for mission in missions])
-
-
-def missions_in_mission_table(mission_req_table: Dict[SC2Campaign, Dict[str, MissionInfo]]) -> Set[SC2Mission]:
- return set([mission.mission for campaign_missions in mission_req_table.values() for mission in
- campaign_missions.values()])
diff --git a/worlds/sc2/Regions.py b/worlds/sc2/Regions.py
deleted file mode 100644
index 273bc4a5..00000000
--- a/worlds/sc2/Regions.py
+++ /dev/null
@@ -1,691 +0,0 @@
-from typing import List, Dict, Tuple, Optional, Callable, NamedTuple, Union
-import math
-
-from BaseClasses import MultiWorld, Region, Entrance, Location, CollectionState
-from .Locations import LocationData
-from .Options import get_option_value, MissionOrder, get_enabled_campaigns, campaign_depending_orders, \
- GridTwoStartPositions
-from .MissionTables import MissionInfo, mission_orders, vanilla_mission_req_table, \
- MissionPools, SC2Campaign, get_goal_location, SC2Mission, MissionConnection
-from .PoolFilter import filter_missions
-from worlds.AutoWorld import World
-
-
-class SC2MissionSlot(NamedTuple):
- campaign: SC2Campaign
- slot: Union[MissionPools, SC2Mission, None]
-
-
-def create_regions(
- world: World, locations: Tuple[LocationData, ...], location_cache: List[Location]
-) -> Tuple[Dict[SC2Campaign, Dict[str, MissionInfo]], int, str]:
- """
- Creates region connections by calling the multiworld's `connect()` methods
- Returns a 3-tuple containing:
- * dict[SC2Campaign, Dict[str, MissionInfo]] mapping a campaign and mission name to its data
- * int The number of missions in the world
- * str The name of the goal location
- """
- mission_order_type: int = get_option_value(world, "mission_order")
-
- if mission_order_type == MissionOrder.option_vanilla:
- return create_vanilla_regions(world, locations, location_cache)
- elif mission_order_type == MissionOrder.option_grid:
- return create_grid_regions(world, locations, location_cache)
- else:
- return create_structured_regions(world, locations, location_cache, mission_order_type)
-
-def create_vanilla_regions(
- world: World,
- locations: Tuple[LocationData, ...],
- location_cache: List[Location],
-) -> Tuple[Dict[SC2Campaign, Dict[str, MissionInfo]], int, str]:
- locations_per_region = get_locations_per_region(locations)
- regions = [create_region(world, locations_per_region, location_cache, "Menu")]
-
- mission_pools: Dict[MissionPools, List[SC2Mission]] = filter_missions(world)
- final_mission = mission_pools[MissionPools.FINAL][0]
-
- enabled_campaigns = get_enabled_campaigns(world)
- names: Dict[str, int] = {}
-
- # Generating all regions and locations for each enabled campaign
- for campaign in sorted(enabled_campaigns):
- for region_name in vanilla_mission_req_table[campaign].keys():
- regions.append(create_region(world, locations_per_region, location_cache, region_name))
- world.multiworld.regions += regions
- vanilla_mission_reqs = {campaign: missions for campaign, missions in vanilla_mission_req_table.items() if campaign in enabled_campaigns}
-
- def wol_cleared_missions(state: CollectionState, mission_count: int) -> bool:
- return state.has_group("WoL Missions", world.player, mission_count)
-
- player: int = world.player
- if SC2Campaign.WOL in enabled_campaigns:
- connect(world, names, 'Menu', 'Liberation Day')
- connect(world, names, 'Liberation Day', 'The Outlaws',
- lambda state: state.has("Beat Liberation Day", player))
- connect(world, names, 'The Outlaws', 'Zero Hour',
- lambda state: state.has("Beat The Outlaws", player))
- connect(world, names, 'Zero Hour', 'Evacuation',
- lambda state: state.has("Beat Zero Hour", player))
- connect(world, names, 'Evacuation', 'Outbreak',
- lambda state: state.has("Beat Evacuation", player))
- connect(world, names, "Outbreak", "Safe Haven",
- lambda state: wol_cleared_missions(state, 7) and state.has("Beat Outbreak", player))
- connect(world, names, "Outbreak", "Haven's Fall",
- lambda state: wol_cleared_missions(state, 7) and state.has("Beat Outbreak", player))
- connect(world, names, 'Zero Hour', 'Smash and Grab',
- lambda state: state.has("Beat Zero Hour", player))
- connect(world, names, 'Smash and Grab', 'The Dig',
- lambda state: wol_cleared_missions(state, 8) and state.has("Beat Smash and Grab", player))
- connect(world, names, 'The Dig', 'The Moebius Factor',
- lambda state: wol_cleared_missions(state, 11) and state.has("Beat The Dig", player))
- connect(world, names, 'The Moebius Factor', 'Supernova',
- lambda state: wol_cleared_missions(state, 14) and state.has("Beat The Moebius Factor", player))
- connect(world, names, 'Supernova', 'Maw of the Void',
- lambda state: state.has("Beat Supernova", player))
- connect(world, names, 'Zero Hour', "Devil's Playground",
- lambda state: wol_cleared_missions(state, 4) and state.has("Beat Zero Hour", player))
- connect(world, names, "Devil's Playground", 'Welcome to the Jungle',
- lambda state: state.has("Beat Devil's Playground", player))
- connect(world, names, "Welcome to the Jungle", 'Breakout',
- lambda state: wol_cleared_missions(state, 8) and state.has("Beat Welcome to the Jungle", player))
- connect(world, names, "Welcome to the Jungle", 'Ghost of a Chance',
- lambda state: wol_cleared_missions(state, 8) and state.has("Beat Welcome to the Jungle", player))
- connect(world, names, "Zero Hour", 'The Great Train Robbery',
- lambda state: wol_cleared_missions(state, 6) and state.has("Beat Zero Hour", player))
- connect(world, names, 'The Great Train Robbery', 'Cutthroat',
- lambda state: state.has("Beat The Great Train Robbery", player))
- connect(world, names, 'Cutthroat', 'Engine of Destruction',
- lambda state: state.has("Beat Cutthroat", player))
- connect(world, names, 'Engine of Destruction', 'Media Blitz',
- lambda state: state.has("Beat Engine of Destruction", player))
- connect(world, names, 'Media Blitz', 'Piercing the Shroud',
- lambda state: state.has("Beat Media Blitz", player))
- connect(world, names, 'Maw of the Void', 'Gates of Hell',
- lambda state: state.has("Beat Maw of the Void", player))
- connect(world, names, 'Gates of Hell', 'Belly of the Beast',
- lambda state: state.has("Beat Gates of Hell", player))
- connect(world, names, 'Gates of Hell', 'Shatter the Sky',
- lambda state: state.has("Beat Gates of Hell", player))
- connect(world, names, 'Gates of Hell', 'All-In',
- lambda state: state.has('Beat Gates of Hell', player) and (
- state.has('Beat Shatter the Sky', player) or state.has('Beat Belly of the Beast', player)))
-
- if SC2Campaign.PROPHECY in enabled_campaigns:
- if SC2Campaign.WOL in enabled_campaigns:
- connect(world, names, 'The Dig', 'Whispers of Doom',
- lambda state: state.has("Beat The Dig", player)),
- else:
- vanilla_mission_reqs[SC2Campaign.PROPHECY] = vanilla_mission_reqs[SC2Campaign.PROPHECY].copy()
- vanilla_mission_reqs[SC2Campaign.PROPHECY][SC2Mission.WHISPERS_OF_DOOM.mission_name] = MissionInfo(
- SC2Mission.WHISPERS_OF_DOOM, [], SC2Mission.WHISPERS_OF_DOOM.area)
- connect(world, names, 'Menu', 'Whispers of Doom'),
- connect(world, names, 'Whispers of Doom', 'A Sinister Turn',
- lambda state: state.has("Beat Whispers of Doom", player))
- connect(world, names, 'A Sinister Turn', 'Echoes of the Future',
- lambda state: state.has("Beat A Sinister Turn", player))
- connect(world, names, 'Echoes of the Future', 'In Utter Darkness',
- lambda state: state.has("Beat Echoes of the Future", player))
-
- if SC2Campaign.HOTS in enabled_campaigns:
- connect(world, names, 'Menu', 'Lab Rat'),
- connect(world, names, 'Lab Rat', 'Back in the Saddle',
- lambda state: state.has("Beat Lab Rat", player)),
- connect(world, names, 'Back in the Saddle', 'Rendezvous',
- lambda state: state.has("Beat Back in the Saddle", player)),
- connect(world, names, 'Rendezvous', 'Harvest of Screams',
- lambda state: state.has("Beat Rendezvous", player)),
- connect(world, names, 'Harvest of Screams', 'Shoot the Messenger',
- lambda state: state.has("Beat Harvest of Screams", player)),
- connect(world, names, 'Shoot the Messenger', 'Enemy Within',
- lambda state: state.has("Beat Shoot the Messenger", player)),
- connect(world, names, 'Rendezvous', 'Domination',
- lambda state: state.has("Beat Rendezvous", player)),
- connect(world, names, 'Domination', 'Fire in the Sky',
- lambda state: state.has("Beat Domination", player)),
- connect(world, names, 'Fire in the Sky', 'Old Soldiers',
- lambda state: state.has("Beat Fire in the Sky", player)),
- connect(world, names, 'Old Soldiers', 'Waking the Ancient',
- lambda state: state.has("Beat Old Soldiers", player)),
- connect(world, names, 'Enemy Within', 'Waking the Ancient',
- lambda state: state.has("Beat Enemy Within", player)),
- connect(world, names, 'Waking the Ancient', 'The Crucible',
- lambda state: state.has("Beat Waking the Ancient", player)),
- connect(world, names, 'The Crucible', 'Supreme',
- lambda state: state.has("Beat The Crucible", player)),
- connect(world, names, 'Supreme', 'Infested',
- lambda state: state.has("Beat Supreme", player) and
- state.has("Beat Old Soldiers", player) and
- state.has("Beat Enemy Within", player)),
- connect(world, names, 'Infested', 'Hand of Darkness',
- lambda state: state.has("Beat Infested", player)),
- connect(world, names, 'Hand of Darkness', 'Phantoms of the Void',
- lambda state: state.has("Beat Hand of Darkness", player)),
- connect(world, names, 'Supreme', 'With Friends Like These',
- lambda state: state.has("Beat Supreme", player) and
- state.has("Beat Old Soldiers", player) and
- state.has("Beat Enemy Within", player)),
- connect(world, names, 'With Friends Like These', 'Conviction',
- lambda state: state.has("Beat With Friends Like These", player)),
- connect(world, names, 'Conviction', 'Planetfall',
- lambda state: state.has("Beat Conviction", player) and
- state.has("Beat Phantoms of the Void", player)),
- connect(world, names, 'Planetfall', 'Death From Above',
- lambda state: state.has("Beat Planetfall", player)),
- connect(world, names, 'Death From Above', 'The Reckoning',
- lambda state: state.has("Beat Death From Above", player)),
-
- if SC2Campaign.PROLOGUE in enabled_campaigns:
- connect(world, names, "Menu", "Dark Whispers")
- connect(world, names, "Dark Whispers", "Ghosts in the Fog",
- lambda state: state.has("Beat Dark Whispers", player))
- connect(world, names, "Ghosts in the Fog", "Evil Awoken",
- lambda state: state.has("Beat Ghosts in the Fog", player))
-
- if SC2Campaign.LOTV in enabled_campaigns:
- connect(world, names, "Menu", "For Aiur!")
- connect(world, names, "For Aiur!", "The Growing Shadow",
- lambda state: state.has("Beat For Aiur!", player)),
- connect(world, names, "The Growing Shadow", "The Spear of Adun",
- lambda state: state.has("Beat The Growing Shadow", player)),
- connect(world, names, "The Spear of Adun", "Sky Shield",
- lambda state: state.has("Beat The Spear of Adun", player)),
- connect(world, names, "Sky Shield", "Brothers in Arms",
- lambda state: state.has("Beat Sky Shield", player)),
- connect(world, names, "Brothers in Arms", "Forbidden Weapon",
- lambda state: state.has("Beat Brothers in Arms", player)),
- connect(world, names, "The Spear of Adun", "Amon's Reach",
- lambda state: state.has("Beat The Spear of Adun", player)),
- connect(world, names, "Amon's Reach", "Last Stand",
- lambda state: state.has("Beat Amon's Reach", player)),
- connect(world, names, "Last Stand", "Forbidden Weapon",
- lambda state: state.has("Beat Last Stand", player)),
- connect(world, names, "Forbidden Weapon", "Temple of Unification",
- lambda state: state.has("Beat Brothers in Arms", player)
- and state.has("Beat Last Stand", player)
- and state.has("Beat Forbidden Weapon", player)),
- connect(world, names, "Temple of Unification", "The Infinite Cycle",
- lambda state: state.has("Beat Temple of Unification", player)),
- connect(world, names, "The Infinite Cycle", "Harbinger of Oblivion",
- lambda state: state.has("Beat The Infinite Cycle", player)),
- connect(world, names, "Harbinger of Oblivion", "Unsealing the Past",
- lambda state: state.has("Beat Harbinger of Oblivion", player)),
- connect(world, names, "Unsealing the Past", "Purification",
- lambda state: state.has("Beat Unsealing the Past", player)),
- connect(world, names, "Purification", "Templar's Charge",
- lambda state: state.has("Beat Purification", player)),
- connect(world, names, "Harbinger of Oblivion", "Steps of the Rite",
- lambda state: state.has("Beat Harbinger of Oblivion", player)),
- connect(world, names, "Steps of the Rite", "Rak'Shir",
- lambda state: state.has("Beat Steps of the Rite", player)),
- connect(world, names, "Rak'Shir", "Templar's Charge",
- lambda state: state.has("Beat Rak'Shir", player)),
- connect(world, names, "Templar's Charge", "Templar's Return",
- lambda state: state.has("Beat Purification", player)
- and state.has("Beat Rak'Shir", player)
- and state.has("Beat Templar's Charge", player)),
- connect(world, names, "Templar's Return", "The Host",
- lambda state: state.has("Beat Templar's Return", player)),
- connect(world, names, "The Host", "Salvation",
- lambda state: state.has("Beat The Host", player)),
-
- if SC2Campaign.EPILOGUE in enabled_campaigns:
- # TODO: Make this aware about excluded campaigns
- connect(world, names, "Salvation", "Into the Void",
- lambda state: state.has("Beat Salvation", player)
- and state.has("Beat The Reckoning", player)
- and state.has("Beat All-In", player)),
- connect(world, names, "Into the Void", "The Essence of Eternity",
- lambda state: state.has("Beat Into the Void", player)),
- connect(world, names, "The Essence of Eternity", "Amon's Fall",
- lambda state: state.has("Beat The Essence of Eternity", player)),
-
- if SC2Campaign.NCO in enabled_campaigns:
- connect(world, names, "Menu", "The Escape")
- connect(world, names, "The Escape", "Sudden Strike",
- lambda state: state.has("Beat The Escape", player))
- connect(world, names, "Sudden Strike", "Enemy Intelligence",
- lambda state: state.has("Beat Sudden Strike", player))
- connect(world, names, "Enemy Intelligence", "Trouble In Paradise",
- lambda state: state.has("Beat Enemy Intelligence", player))
- connect(world, names, "Trouble In Paradise", "Night Terrors",
- lambda state: state.has("Beat Trouble In Paradise", player))
- connect(world, names, "Night Terrors", "Flashpoint",
- lambda state: state.has("Beat Night Terrors", player))
- connect(world, names, "Flashpoint", "In the Enemy's Shadow",
- lambda state: state.has("Beat Flashpoint", player))
- connect(world, names, "In the Enemy's Shadow", "Dark Skies",
- lambda state: state.has("Beat In the Enemy's Shadow", player))
- connect(world, names, "Dark Skies", "End Game",
- lambda state: state.has("Beat Dark Skies", player))
-
- goal_location = get_goal_location(final_mission)
- assert goal_location, f"Unable to find a goal location for mission {final_mission}"
- setup_final_location(goal_location, location_cache)
-
- return (vanilla_mission_reqs, final_mission.id, goal_location)
-
-
-def create_grid_regions(
- world: World,
- locations: Tuple[LocationData, ...],
- location_cache: List[Location],
-) -> Tuple[Dict[SC2Campaign, Dict[str, MissionInfo]], int, str]:
- locations_per_region = get_locations_per_region(locations)
-
- mission_pools = filter_missions(world)
- final_mission = mission_pools[MissionPools.FINAL][0]
-
- mission_pool = [mission for mission_pool in mission_pools.values() for mission in mission_pool]
-
- num_missions = min(len(mission_pool), get_option_value(world, "maximum_campaign_size"))
- remove_top_left: bool = get_option_value(world, "grid_two_start_positions") == GridTwoStartPositions.option_true
-
- regions = [create_region(world, locations_per_region, location_cache, "Menu")]
- names: Dict[str, int] = {}
- missions: Dict[Tuple[int, int], SC2Mission] = {}
-
- grid_size_x, grid_size_y, num_corners_to_remove = get_grid_dimensions(num_missions + remove_top_left)
- # pick missions in order along concentric diagonals
- # each diagonal will have the same difficulty
- # this keeps long sides from possibly stealing lower-difficulty missions from future columns
- num_diagonals = grid_size_x + grid_size_y - 1
- diagonal_difficulty = MissionPools.STARTER
- missions_to_add = mission_pools[MissionPools.STARTER]
- for diagonal in range(num_diagonals):
- if diagonal == num_diagonals - 1:
- diagonal_difficulty = MissionPools.FINAL
- grid_coords = (grid_size_x-1, grid_size_y-1)
- missions[grid_coords] = final_mission
- break
- if diagonal == 0 and remove_top_left:
- continue
- diagonal_length = min(diagonal + 1, num_diagonals - diagonal, grid_size_x, grid_size_y)
- if len(missions_to_add) < diagonal_length:
- raise Exception(f"There are not enough {diagonal_difficulty.name} missions to fill the campaign. Please exclude fewer missions.")
- for i in range(diagonal_length):
- # (0,0) + (0,1)*diagonal + (1,-1)*i + (1,-1)*max(diagonal - grid_size_y + 1, 0)
- grid_coords = (i + max(diagonal - grid_size_y + 1, 0), diagonal - i - max(diagonal - grid_size_y + 1, 0))
- if grid_coords == (grid_size_x - 1, 0) and num_corners_to_remove >= 2:
- pass
- elif grid_coords == (0, grid_size_y - 1) and num_corners_to_remove >= 1:
- pass
- else:
- mission_index = world.random.randint(0, len(missions_to_add) - 1)
- missions[grid_coords] = missions_to_add.pop(mission_index)
-
- if diagonal_difficulty < MissionPools.VERY_HARD:
- diagonal_difficulty = MissionPools(diagonal_difficulty.value + 1)
- missions_to_add.extend(mission_pools[diagonal_difficulty])
-
- # Generating regions and locations from selected missions
- for x in range(grid_size_x):
- for y in range(grid_size_y):
- if missions.get((x, y)):
- regions.append(create_region(world, locations_per_region, location_cache, missions[(x, y)].mission_name))
- world.multiworld.regions += regions
-
- # This pattern is horrifying, why are we using the dict as an ordered dict???
- slot_map: Dict[Tuple[int, int], int] = {}
- for index, coords in enumerate(missions):
- slot_map[coords] = index + 1
-
- mission_req_table: Dict[str, MissionInfo] = {}
- for coords, mission in missions.items():
- prepend_vertical = 0
- if not mission:
- continue
- connections: List[MissionConnection] = []
- if coords == (0, 0) or (remove_top_left and sum(coords) == 1):
- # Connect to the "Menu" starting region
- connect(world, names, "Menu", mission.mission_name)
- else:
- for dx, dy in ((-1, 0), (1, 0), (0, -1), (0, 1)):
- connected_coords = (coords[0] + dx, coords[1] + dy)
- if connected_coords in missions:
- # connections.append(missions[connected_coords])
- connections.append(MissionConnection(slot_map[connected_coords]))
- connect(world, names, missions[connected_coords].mission_name, mission.mission_name,
- make_grid_connect_rule(missions, connected_coords, world.player),
- )
- if coords[1] == 1 and not missions.get((coords[0], 0)):
- prepend_vertical = 1
- mission_req_table[mission.mission_name] = MissionInfo(
- mission,
- connections,
- category=f'_{coords[0] + 1}',
- or_requirements=True,
- ui_vertical_padding=prepend_vertical,
- )
-
- final_mission_id = final_mission.id
- # Changing the completion condition for alternate final missions into an event
- final_location = get_goal_location(final_mission)
- setup_final_location(final_location, location_cache)
-
- return {SC2Campaign.GLOBAL: mission_req_table}, final_mission_id, final_location
-
-
-def make_grid_connect_rule(
- missions: Dict[Tuple[int, int], SC2Mission],
- connected_coords: Tuple[int, int],
- player: int
-) -> Callable[[CollectionState], bool]:
- return lambda state: state.has(f"Beat {missions[connected_coords].mission_name}", player)
-
-
-def create_structured_regions(
- world: World,
- locations: Tuple[LocationData, ...],
- location_cache: List[Location],
- mission_order_type: int,
-) -> Tuple[Dict[SC2Campaign, Dict[str, MissionInfo]], int, str]:
- locations_per_region = get_locations_per_region(locations)
-
- mission_order = mission_orders[mission_order_type]()
- enabled_campaigns = get_enabled_campaigns(world)
- shuffle_campaigns = get_option_value(world, "shuffle_campaigns")
-
- mission_pools: Dict[MissionPools, List[SC2Mission]] = filter_missions(world)
- final_mission = mission_pools[MissionPools.FINAL][0]
-
- regions = [create_region(world, locations_per_region, location_cache, "Menu")]
-
- names: Dict[str, int] = {}
-
- mission_slots: List[SC2MissionSlot] = []
- mission_pool = [mission for mission_pool in mission_pools.values() for mission in mission_pool]
-
- if mission_order_type in campaign_depending_orders:
- # Do slot removal per campaign
- for campaign in enabled_campaigns:
- campaign_mission_pool = [mission for mission in mission_pool if mission.campaign == campaign]
- campaign_mission_pool_size = len(campaign_mission_pool)
-
- removals = len(mission_order[campaign]) - campaign_mission_pool_size
-
- for mission in mission_order[campaign]:
- # Removing extra missions if mission pool is too small
- if 0 < mission.removal_priority <= removals:
- mission_slots.append(SC2MissionSlot(campaign, None))
- elif mission.type == MissionPools.FINAL:
- if campaign == final_mission.campaign:
- # Campaign is elected to be goal
- mission_slots.append(SC2MissionSlot(campaign, final_mission))
- else:
- # Not the goal, find the most difficult mission in the pool and set the difficulty
- campaign_difficulty = max(mission.pool for mission in campaign_mission_pool)
- mission_slots.append(SC2MissionSlot(campaign, campaign_difficulty))
- else:
- mission_slots.append(SC2MissionSlot(campaign, mission.type))
- else:
- order = mission_order[SC2Campaign.GLOBAL]
- # Determining if missions must be removed
- mission_pool_size = sum(len(mission_pool) for mission_pool in mission_pools.values())
- removals = len(order) - mission_pool_size
-
- # Initial fill out of mission list and marking All-In mission
- for mission in order:
- # Removing extra missions if mission pool is too small
- if 0 < mission.removal_priority <= removals:
- mission_slots.append(SC2MissionSlot(SC2Campaign.GLOBAL, None))
- elif mission.type == MissionPools.FINAL:
- mission_slots.append(SC2MissionSlot(SC2Campaign.GLOBAL, final_mission))
- else:
- mission_slots.append(SC2MissionSlot(SC2Campaign.GLOBAL, mission.type))
-
- no_build_slots = []
- easy_slots = []
- medium_slots = []
- hard_slots = []
- very_hard_slots = []
-
- # Search through missions to find slots needed to fill
- for i in range(len(mission_slots)):
- mission_slot = mission_slots[i]
- if mission_slot is None:
- continue
- if isinstance(mission_slot, SC2MissionSlot):
- if mission_slot.slot is None:
- continue
- if mission_slot.slot == MissionPools.STARTER:
- no_build_slots.append(i)
- elif mission_slot.slot == MissionPools.EASY:
- easy_slots.append(i)
- elif mission_slot.slot == MissionPools.MEDIUM:
- medium_slots.append(i)
- elif mission_slot.slot == MissionPools.HARD:
- hard_slots.append(i)
- elif mission_slot.slot == MissionPools.VERY_HARD:
- very_hard_slots.append(i)
-
- def pick_mission(slot):
- if shuffle_campaigns or mission_order_type not in campaign_depending_orders:
- # Pick a mission from any campaign
- filler = world.random.randint(0, len(missions_to_add) - 1)
- mission = missions_to_add.pop(filler)
- slot_campaign = mission_slots[slot].campaign
- mission_slots[slot] = SC2MissionSlot(slot_campaign, mission)
- else:
- # Pick a mission from required campaign
- slot_campaign = mission_slots[slot].campaign
- campaign_mission_candidates = [mission for mission in missions_to_add if mission.campaign == slot_campaign]
- mission = world.random.choice(campaign_mission_candidates)
- missions_to_add.remove(mission)
- mission_slots[slot] = SC2MissionSlot(slot_campaign, mission)
-
- # Add no_build missions to the pool and fill in no_build slots
- missions_to_add: List[SC2Mission] = mission_pools[MissionPools.STARTER]
- if len(no_build_slots) > len(missions_to_add):
- raise Exception("There are no valid No-Build missions. Please exclude fewer missions.")
- for slot in no_build_slots:
- pick_mission(slot)
-
- # Add easy missions into pool and fill in easy slots
- missions_to_add = missions_to_add + mission_pools[MissionPools.EASY]
- if len(easy_slots) > len(missions_to_add):
- raise Exception("There are not enough Easy missions to fill the campaign. Please exclude fewer missions.")
- for slot in easy_slots:
- pick_mission(slot)
-
- # Add medium missions into pool and fill in medium slots
- missions_to_add = missions_to_add + mission_pools[MissionPools.MEDIUM]
- if len(medium_slots) > len(missions_to_add):
- raise Exception("There are not enough Easy and Medium missions to fill the campaign. Please exclude fewer missions.")
- for slot in medium_slots:
- pick_mission(slot)
-
- # Add hard missions into pool and fill in hard slots
- missions_to_add = missions_to_add + mission_pools[MissionPools.HARD]
- if len(hard_slots) > len(missions_to_add):
- raise Exception("There are not enough missions to fill the campaign. Please exclude fewer missions.")
- for slot in hard_slots:
- pick_mission(slot)
-
- # Add very hard missions into pool and fill in very hard slots
- missions_to_add = missions_to_add + mission_pools[MissionPools.VERY_HARD]
- if len(very_hard_slots) > len(missions_to_add):
- raise Exception("There are not enough missions to fill the campaign. Please exclude fewer missions.")
- for slot in very_hard_slots:
- pick_mission(slot)
-
- # Generating regions and locations from selected missions
- for mission_slot in mission_slots:
- if isinstance(mission_slot.slot, SC2Mission):
- regions.append(create_region(world, locations_per_region, location_cache, mission_slot.slot.mission_name))
- world.multiworld.regions += regions
-
- campaigns: List[SC2Campaign]
- if mission_order_type in campaign_depending_orders:
- campaigns = list(enabled_campaigns)
- else:
- campaigns = [SC2Campaign.GLOBAL]
-
- mission_req_table: Dict[SC2Campaign, Dict[str, MissionInfo]] = {}
- campaign_mission_slots: Dict[SC2Campaign, List[SC2MissionSlot]] = \
- {
- campaign: [mission_slot for mission_slot in mission_slots if campaign == mission_slot.campaign]
- for campaign in campaigns
- }
-
- slot_map: Dict[SC2Campaign, List[int]] = dict()
-
- for campaign in campaigns:
- mission_req_table.update({campaign: dict()})
-
- # Mapping original mission slots to shifted mission slots when missions are removed
- slot_map[campaign] = []
- slot_offset = 0
- for position, mission in enumerate(campaign_mission_slots[campaign]):
- slot_map[campaign].append(position - slot_offset + 1)
- if mission is None or mission.slot is None:
- slot_offset += 1
-
- def build_connection_rule(mission_names: List[str], missions_req: int) -> Callable:
- player = world.player
- if len(mission_names) > 1:
- return lambda state: state.has_all({f"Beat {name}" for name in mission_names}, player) \
- and state.has_group("Missions", player, missions_req)
- else:
- return lambda state: state.has(f"Beat {mission_names[0]}", player) \
- and state.has_group("Missions", player, missions_req)
-
- for campaign in campaigns:
- # Loop through missions to create requirements table and connect regions
- for i, mission in enumerate(campaign_mission_slots[campaign]):
- if mission is None or mission.slot is None:
- continue
- connections: List[MissionConnection] = []
- all_connections: List[SC2MissionSlot] = []
- connection: MissionConnection
- for connection in mission_order[campaign][i].connect_to:
- if connection.connect_to == -1:
- continue
- # If mission normally connects to an excluded campaign, connect to menu instead
- if connection.campaign not in campaign_mission_slots:
- connection.connect_to = -1
- continue
- while campaign_mission_slots[connection.campaign][connection.connect_to].slot is None:
- connection.connect_to -= 1
- all_connections.append(campaign_mission_slots[connection.campaign][connection.connect_to])
- for connection in mission_order[campaign][i].connect_to:
- if connection.connect_to == -1:
- connect(world, names, "Menu", mission.slot.mission_name)
- else:
- required_mission = campaign_mission_slots[connection.campaign][connection.connect_to]
- if ((required_mission is None or required_mission.slot is None)
- and not mission_order[campaign][i].completion_critical): # Drop non-critical null slots
- continue
- while required_mission is None or required_mission.slot is None: # Substituting null slot with prior slot
- connection.connect_to -= 1
- required_mission = campaign_mission_slots[connection.campaign][connection.connect_to]
- required_missions = [required_mission] if mission_order[campaign][i].or_requirements else all_connections
- if isinstance(required_mission.slot, SC2Mission):
- required_mission_name = required_mission.slot.mission_name
- required_missions_names = [mission.slot.mission_name for mission in required_missions]
- connect(world, names, required_mission_name, mission.slot.mission_name,
- build_connection_rule(required_missions_names, mission_order[campaign][i].number))
- connections.append(MissionConnection(slot_map[connection.campaign][connection.connect_to], connection.campaign))
-
- mission_req_table[campaign].update({mission.slot.mission_name: MissionInfo(
- mission.slot, connections, mission_order[campaign][i].category,
- number=mission_order[campaign][i].number,
- completion_critical=mission_order[campaign][i].completion_critical,
- or_requirements=mission_order[campaign][i].or_requirements)})
-
- final_mission_id = final_mission.id
- # Changing the completion condition for alternate final missions into an event
- final_location = get_goal_location(final_mission)
- setup_final_location(final_location, location_cache)
-
- return mission_req_table, final_mission_id, final_location
-
-
-def setup_final_location(final_location, location_cache):
- # Final location should be near the end of the cache
- for i in range(len(location_cache) - 1, -1, -1):
- if location_cache[i].name == final_location:
- location_cache[i].address = None
- break
-
-
-def create_location(player: int, location_data: LocationData, region: Region,
- location_cache: List[Location]) -> Location:
- location = Location(player, location_data.name, location_data.code, region)
- location.access_rule = location_data.rule
-
- location_cache.append(location)
-
- return location
-
-
-def create_region(world: World, locations_per_region: Dict[str, List[LocationData]],
- location_cache: List[Location], name: str) -> Region:
- region = Region(name, world.player, world.multiworld)
-
- if name in locations_per_region:
- for location_data in locations_per_region[name]:
- location = create_location(world.player, location_data, region, location_cache)
- region.locations.append(location)
-
- return region
-
-
-def connect(world: World, used_names: Dict[str, int], source: str, target: str,
- rule: Optional[Callable] = None):
- source_region = world.get_region(source)
- target_region = world.get_region(target)
-
- if target not in used_names:
- used_names[target] = 1
- name = target
- else:
- used_names[target] += 1
- name = target + (' ' * used_names[target])
-
- connection = Entrance(world.player, name, source_region)
-
- if rule:
- connection.access_rule = rule
-
- source_region.exits.append(connection)
- connection.connect(target_region)
-
-
-def get_locations_per_region(locations: Tuple[LocationData, ...]) -> Dict[str, List[LocationData]]:
- per_region: Dict[str, List[LocationData]] = {}
-
- for location in locations:
- per_region.setdefault(location.region, []).append(location)
-
- return per_region
-
-
-def get_factors(number: int) -> Tuple[int, int]:
- """
- Simple factorization into pairs of numbers (x, y) using a sieve method.
- Returns the factorization that is most square, i.e. where x + y is minimized.
- Factor order is such that x <= y.
- """
- assert number > 0
- for divisor in range(math.floor(math.sqrt(number)), 1, -1):
- quotient = number // divisor
- if quotient * divisor == number:
- return divisor, quotient
- return 1, number
-
-
-def get_grid_dimensions(size: int) -> Tuple[int, int, int]:
- """
- Get the dimensions of a grid mission order from the number of missions, int the format (x, y, error).
- * Error will always be 0, 1, or 2, so the missions can be removed from the corners that aren't the start or end.
- * Dimensions are chosen such that x <= y, as buttons in the UI are wider than they are tall.
- * Dimensions are chosen to be maximally square. That is, x + y + error is minimized.
- * If multiple options of the same rating are possible, the one with the larger error is chosen,
- as it will appear more square. Compare 3x11 to 5x7-2 for an example of this.
- """
- dimension_candidates: List[Tuple[int, int, int]] = [(*get_factors(size + x), x) for x in (2, 1, 0)]
- best_dimension = min(dimension_candidates, key=sum)
- return best_dimension
-
diff --git a/worlds/sc2/Rules.py b/worlds/sc2/Rules.py
deleted file mode 100644
index 8b9097ea..00000000
--- a/worlds/sc2/Rules.py
+++ /dev/null
@@ -1,952 +0,0 @@
-from typing import Set
-
-from BaseClasses import CollectionState
-from .Options import get_option_value, RequiredTactics, kerrigan_unit_available, AllInMap, \
- GrantStoryTech, GrantStoryLevels, TakeOverAIAllies, SpearOfAdunAutonomouslyCastAbilityPresence, \
- get_enabled_campaigns, MissionOrder
-from .Items import get_basic_units, defense_ratings, zerg_defense_ratings, kerrigan_actives, air_defense_ratings, \
- kerrigan_levels, get_full_item_list
-from .MissionTables import SC2Race, SC2Campaign
-from . import ItemNames
-from worlds.AutoWorld import World
-
-
-class SC2Logic:
-
- def lock_any_item(self, state: CollectionState, items: Set[str]) -> bool:
- """
- Guarantees that at least one of these items will remain in the world. Doesn't affect placement.
- Needed for cases when the dynamic pool filtering could remove all the item prerequisites
- :param state:
- :param items:
- :return:
- """
- return self.is_item_placement(state) \
- or state.has_any(items, self.player)
-
- def is_item_placement(self, state):
- """
- Tells if it's item placement or item pool filter
- :param state:
- :return: True for item placement, False for pool filter
- """
- # has_group with count = 0 is always true for item placement and always false for SC2 item filtering
- return state.has_group("Missions", self.player, 0)
-
- # WoL
- def terran_common_unit(self, state: CollectionState) -> bool:
- return state.has_any(self.basic_terran_units, self.player)
-
- def terran_early_tech(self, state: CollectionState):
- """
- Basic combat unit that can be deployed quickly from mission start
- :param state
- :return:
- """
- return (
- state.has_any({ItemNames.MARINE, ItemNames.FIREBAT, ItemNames.MARAUDER, ItemNames.REAPER, ItemNames.HELLION}, self.player)
- or (self.advanced_tactics and state.has_any({ItemNames.GOLIATH, ItemNames.DIAMONDBACK, ItemNames.VIKING, ItemNames.BANSHEE}, self.player))
- )
-
- def terran_air(self, state: CollectionState) -> bool:
- """
- Air units or drops on advanced tactics
- :param state:
- :return:
- """
- return (state.has_any({ItemNames.VIKING, ItemNames.WRAITH, ItemNames.BANSHEE, ItemNames.BATTLECRUISER}, self.player) or self.advanced_tactics
- and state.has_any({ItemNames.HERCULES, ItemNames.MEDIVAC}, self.player) and self.terran_common_unit(state)
- )
-
- def terran_air_anti_air(self, state: CollectionState) -> bool:
- """
- Air-to-air
- :param state:
- :return:
- """
- return (
- state.has(ItemNames.VIKING, self.player)
- or state.has_all({ItemNames.WRAITH, ItemNames.WRAITH_ADVANCED_LASER_TECHNOLOGY}, self.player)
- or state.has_all({ItemNames.BATTLECRUISER, ItemNames.BATTLECRUISER_ATX_LASER_BATTERY}, self.player)
- or self.advanced_tactics and state.has_any({ItemNames.WRAITH, ItemNames.VALKYRIE, ItemNames.BATTLECRUISER}, self.player)
- )
-
- def terran_competent_ground_to_air(self, state: CollectionState) -> bool:
- """
- Ground-to-air
- :param state:
- :return:
- """
- return (
- state.has(ItemNames.GOLIATH, self.player)
- or state.has(ItemNames.MARINE, self.player) and self.terran_bio_heal(state)
- or self.advanced_tactics and state.has(ItemNames.CYCLONE, self.player)
- )
-
- def terran_competent_anti_air(self, state: CollectionState) -> bool:
- """
- Good AA unit
- :param state:
- :return:
- """
- return (
- self.terran_competent_ground_to_air(state)
- or self.terran_air_anti_air(state)
- )
-
- def welcome_to_the_jungle_requirement(self, state: CollectionState) -> bool:
- """
- Welcome to the Jungle requirements - able to deal with Scouts, Void Rays, Zealots and Stalkers
- :param state:
- :return:
- """
- return (
- self.terran_common_unit(state)
- and self.terran_competent_ground_to_air(state)
- ) or (
- self.advanced_tactics
- and state.has_any({ItemNames.MARINE, ItemNames.VULTURE}, self.player)
- and self.terran_air_anti_air(state)
- )
-
- def terran_basic_anti_air(self, state: CollectionState) -> bool:
- """
- Basic AA to deal with few air units
- :param state:
- :return:
- """
- return (
- state.has_any({
- ItemNames.MISSILE_TURRET, ItemNames.THOR, ItemNames.WAR_PIGS, ItemNames.SPARTAN_COMPANY,
- ItemNames.HELS_ANGELS, ItemNames.BATTLECRUISER, ItemNames.MARINE, ItemNames.WRAITH,
- ItemNames.VALKYRIE, ItemNames.CYCLONE, ItemNames.WINGED_NIGHTMARES, ItemNames.BRYNHILDS
- }, self.player)
- or self.terran_competent_anti_air(state)
- or self.advanced_tactics and state.has_any({ItemNames.GHOST, ItemNames.SPECTRE, ItemNames.WIDOW_MINE, ItemNames.LIBERATOR}, self.player)
- )
-
- def terran_defense_rating(self, state: CollectionState, zerg_enemy: bool, air_enemy: bool = True) -> int:
- """
- Ability to handle defensive missions
- :param state:
- :param zerg_enemy:
- :param air_enemy:
- :return:
- """
- defense_score = sum((defense_ratings[item] for item in defense_ratings if state.has(item, self.player)))
- # Manned Bunker
- if state.has_any({ItemNames.MARINE, ItemNames.MARAUDER}, self.player) and state.has(ItemNames.BUNKER, self.player):
- defense_score += 3
- elif zerg_enemy and state.has(ItemNames.FIREBAT, self.player) and state.has(ItemNames.BUNKER, self.player):
- defense_score += 2
- # Siege Tank upgrades
- if state.has_all({ItemNames.SIEGE_TANK, ItemNames.SIEGE_TANK_MAELSTROM_ROUNDS}, self.player):
- defense_score += 2
- if state.has_all({ItemNames.SIEGE_TANK, ItemNames.SIEGE_TANK_GRADUATING_RANGE}, self.player):
- defense_score += 1
- # Widow Mine upgrade
- if state.has_all({ItemNames.WIDOW_MINE, ItemNames.WIDOW_MINE_CONCEALMENT}, self.player):
- defense_score += 1
- # Viking with splash
- if state.has_all({ItemNames.VIKING, ItemNames.VIKING_SHREDDER_ROUNDS}, self.player):
- defense_score += 2
-
- # General enemy-based rules
- if zerg_enemy:
- defense_score += sum((zerg_defense_ratings[item] for item in zerg_defense_ratings if state.has(item, self.player)))
- if air_enemy:
- defense_score += sum((air_defense_ratings[item] for item in air_defense_ratings if state.has(item, self.player)))
- if air_enemy and zerg_enemy and state.has(ItemNames.VALKYRIE, self.player):
- # Valkyries shred mass Mutas, most common air enemy that's massed in these cases
- defense_score += 2
- # Advanced Tactics bumps defense rating requirements down by 2
- if self.advanced_tactics:
- defense_score += 2
- return defense_score
-
- def terran_competent_comp(self, state: CollectionState) -> bool:
- """
- Ability to deal with most of hard missions
- :param state:
- :return:
- """
- return (
- (
- (state.has_any({ItemNames.MARINE, ItemNames.MARAUDER}, self.player) and self.terran_bio_heal(state))
- or state.has_any({ItemNames.THOR, ItemNames.BANSHEE, ItemNames.SIEGE_TANK}, self.player)
- or state.has_all({ItemNames.LIBERATOR, ItemNames.LIBERATOR_RAID_ARTILLERY}, self.player)
- )
- and self.terran_competent_anti_air(state)
- ) or (
- state.has(ItemNames.BATTLECRUISER, self.player) and self.terran_common_unit(state)
- )
-
- def great_train_robbery_train_stopper(self, state: CollectionState) -> bool:
- """
- Ability to deal with trains (moving target with a lot of HP)
- :param state:
- :return:
- """
- return (
- state.has_any({ItemNames.SIEGE_TANK, ItemNames.DIAMONDBACK, ItemNames.MARAUDER, ItemNames.CYCLONE, ItemNames.BANSHEE}, self.player)
- or self.advanced_tactics
- and (
- state.has_all({ItemNames.REAPER, ItemNames.REAPER_G4_CLUSTERBOMB}, self.player)
- or state.has_all({ItemNames.SPECTRE, ItemNames.SPECTRE_PSIONIC_LASH}, self.player)
- or state.has_any({ItemNames.VULTURE, ItemNames.LIBERATOR}, self.player)
- )
- )
-
- def terran_can_rescue(self, state) -> bool:
- """
- Rescuing in The Moebius Factor
- :param state:
- :return:
- """
- return state.has_any({ItemNames.MEDIVAC, ItemNames.HERCULES, ItemNames.RAVEN, ItemNames.VIKING}, self.player) or self.advanced_tactics
-
- def terran_beats_protoss_deathball(self, state: CollectionState) -> bool:
- """
- Ability to deal with Immortals, Colossi with some air support
- :param state:
- :return:
- """
- return (
- (
- state.has_any({ItemNames.BANSHEE, ItemNames.BATTLECRUISER}, self.player)
- or state.has_all({ItemNames.LIBERATOR, ItemNames.LIBERATOR_RAID_ARTILLERY}, self.player)
- ) and self.terran_competent_anti_air(state)
- or self.terran_competent_comp(state) and self.terran_air_anti_air(state)
- )
-
- def marine_medic_upgrade(self, state: CollectionState) -> bool:
- """
- Infantry upgrade to infantry-only no-build segments
- :param state:
- :return:
- """
- return state.has_any({
- ItemNames.MARINE_COMBAT_SHIELD, ItemNames.MARINE_MAGRAIL_MUNITIONS, ItemNames.MEDIC_STABILIZER_MEDPACKS
- }, self.player) \
- or (state.count(ItemNames.MARINE_PROGRESSIVE_STIMPACK, self.player) >= 2
- and state.has_group("Missions", self.player, 1))
-
- def terran_survives_rip_field(self, state: CollectionState) -> bool:
- """
- Ability to deal with large areas with environment damage
- :param state:
- :return:
- """
- return (state.has(ItemNames.BATTLECRUISER, self.player)
- or self.terran_air(state) and self.terran_competent_anti_air(state) and self.terran_sustainable_mech_heal(state))
-
- def terran_sustainable_mech_heal(self, state: CollectionState) -> bool:
- """
- Can heal mech units without spending resources
- :param state:
- :return:
- """
- return state.has(ItemNames.SCIENCE_VESSEL, self.player) \
- or state.has_all({ItemNames.MEDIC, ItemNames.MEDIC_ADAPTIVE_MEDPACKS}, self.player) \
- or state.count(ItemNames.PROGRESSIVE_REGENERATIVE_BIO_STEEL, self.player) >= 3 \
- or (self.advanced_tactics
- and (
- state.has_all({ItemNames.RAVEN, ItemNames.RAVEN_BIO_MECHANICAL_REPAIR_DRONE}, self.player)
- or state.count(ItemNames.PROGRESSIVE_REGENERATIVE_BIO_STEEL, self.player) >= 2)
- )
-
- def terran_bio_heal(self, state: CollectionState) -> bool:
- """
- Ability to heal bio units
- :param state:
- :return:
- """
- return state.has_any({ItemNames.MEDIC, ItemNames.MEDIVAC}, self.player) \
- or self.advanced_tactics and state.has_all({ItemNames.RAVEN, ItemNames.RAVEN_BIO_MECHANICAL_REPAIR_DRONE}, self.player)
-
- def terran_base_trasher(self, state: CollectionState) -> bool:
- """
- Can attack heavily defended bases
- :param state:
- :return:
- """
- return state.has(ItemNames.SIEGE_TANK, self.player) \
- or state.has_all({ItemNames.BATTLECRUISER, ItemNames.BATTLECRUISER_ATX_LASER_BATTERY}, self.player) \
- or state.has_all({ItemNames.LIBERATOR, ItemNames.LIBERATOR_RAID_ARTILLERY}, self.player) \
- or (self.advanced_tactics
- and ((state.has_all({ItemNames.RAVEN, ItemNames.RAVEN_HUNTER_SEEKER_WEAPON}, self.player)
- or self.can_nuke(state))
- and (
- state.has_all({ItemNames.VIKING, ItemNames.VIKING_SHREDDER_ROUNDS}, self.player)
- or state.has_all({ItemNames.BANSHEE, ItemNames.BANSHEE_SHOCKWAVE_MISSILE_BATTERY}, self.player))
- )
- )
-
- def terran_mobile_detector(self, state: CollectionState) -> bool:
- return state.has_any({ItemNames.RAVEN, ItemNames.SCIENCE_VESSEL, ItemNames.PROGRESSIVE_ORBITAL_COMMAND}, self.player)
-
- def can_nuke(self, state: CollectionState) -> bool:
- """
- Ability to launch nukes
- :param state:
- :return:
- """
- return (self.advanced_tactics
- and (state.has_any({ItemNames.GHOST, ItemNames.SPECTRE}, self.player)
- or state.has_all({ItemNames.THOR, ItemNames.THOR_BUTTON_WITH_A_SKULL_ON_IT}, self.player)))
-
- def terran_respond_to_colony_infestations(self, state: CollectionState) -> bool:
- """
- Can deal quickly with Brood Lords and Mutas in Haven's Fall and being able to progress the mission
- :param state:
- :return:
- """
- return (
- self.terran_common_unit(state)
- and self.terran_competent_anti_air(state)
- and (
- self.terran_air_anti_air(state)
- or state.has_any({ItemNames.BATTLECRUISER, ItemNames.VALKYRIE}, self.player)
- )
- and self.terran_defense_rating(state, True) >= 3
- )
-
- def engine_of_destruction_requirement(self, state: CollectionState):
- return self.marine_medic_upgrade(state) \
- and (
- self.terran_competent_anti_air(state)
- and self.terran_common_unit(state) or state.has(ItemNames.WRAITH, self.player)
- )
-
- def all_in_requirement(self, state: CollectionState):
- """
- All-in
- :param state:
- :return:
- """
- beats_kerrigan = state.has_any({ItemNames.MARINE, ItemNames.BANSHEE, ItemNames.GHOST}, self.player) or self.advanced_tactics
- if get_option_value(self.world, 'all_in_map') == AllInMap.option_ground:
- # Ground
- defense_rating = self.terran_defense_rating(state, True, False)
- if state.has_any({ItemNames.BATTLECRUISER, ItemNames.BANSHEE}, self.player):
- defense_rating += 2
- return defense_rating >= 13 and beats_kerrigan
- else:
- # Air
- defense_rating = self.terran_defense_rating(state, True, True)
- return defense_rating >= 9 and beats_kerrigan \
- and state.has_any({ItemNames.VIKING, ItemNames.BATTLECRUISER, ItemNames.VALKYRIE}, self.player) \
- and state.has_any({ItemNames.HIVE_MIND_EMULATOR, ItemNames.PSI_DISRUPTER, ItemNames.MISSILE_TURRET}, self.player)
-
- # HotS
- def zerg_common_unit(self, state: CollectionState) -> bool:
- return state.has_any(self.basic_zerg_units, self.player)
-
- def zerg_competent_anti_air(self, state: CollectionState) -> bool:
- return state.has_any({ItemNames.HYDRALISK, ItemNames.MUTALISK, ItemNames.CORRUPTOR, ItemNames.BROOD_QUEEN}, self.player) \
- or state.has_all({ItemNames.SWARM_HOST, ItemNames.SWARM_HOST_PRESSURIZED_GLANDS}, self.player) \
- or state.has_all({ItemNames.SCOURGE, ItemNames.SCOURGE_RESOURCE_EFFICIENCY}, self.player) \
- or (self.advanced_tactics and state.has(ItemNames.INFESTOR, self.player))
-
- def zerg_basic_anti_air(self, state: CollectionState) -> bool:
- return self.zerg_competent_anti_air(state) or self.kerrigan_unit_available in kerrigan_unit_available or \
- state.has_any({ItemNames.SWARM_QUEEN, ItemNames.SCOURGE}, self.player) or (self.advanced_tactics and state.has(ItemNames.SPORE_CRAWLER, self.player))
-
- def morph_brood_lord(self, state: CollectionState) -> bool:
- return state.has_any({ItemNames.MUTALISK, ItemNames.CORRUPTOR}, self.player) \
- and state.has(ItemNames.MUTALISK_CORRUPTOR_BROOD_LORD_ASPECT, self.player)
-
- def morph_viper(self, state: CollectionState) -> bool:
- return state.has_any({ItemNames.MUTALISK, ItemNames.CORRUPTOR}, self.player) \
- and state.has(ItemNames.MUTALISK_CORRUPTOR_VIPER_ASPECT, self.player)
-
- def morph_impaler_or_lurker(self, state: CollectionState) -> bool:
- return state.has(ItemNames.HYDRALISK, self.player) and state.has_any({ItemNames.HYDRALISK_IMPALER_ASPECT, ItemNames.HYDRALISK_LURKER_ASPECT}, self.player)
-
- def zerg_competent_comp(self, state: CollectionState) -> bool:
- advanced = self.advanced_tactics
- core_unit = state.has_any({ItemNames.ROACH, ItemNames.ABERRATION, ItemNames.ZERGLING}, self.player)
- support_unit = state.has_any({ItemNames.SWARM_QUEEN, ItemNames.HYDRALISK}, self.player) \
- or self.morph_brood_lord(state) \
- or advanced and (state.has_any({ItemNames.INFESTOR, ItemNames.DEFILER}, self.player) or self.morph_viper(state))
- if core_unit and support_unit:
- return True
- vespene_unit = state.has_any({ItemNames.ULTRALISK, ItemNames.ABERRATION}, self.player) \
- or advanced and self.morph_viper(state)
- return vespene_unit and state.has_any({ItemNames.ZERGLING, ItemNames.SWARM_QUEEN}, self.player)
-
- def spread_creep(self, state: CollectionState) -> bool:
- return self.advanced_tactics or state.has(ItemNames.SWARM_QUEEN, self.player)
-
- def zerg_competent_defense(self, state: CollectionState) -> bool:
- return (
- self.zerg_common_unit(state)
- and (
- (
- state.has(ItemNames.SWARM_HOST, self.player)
- or self.morph_brood_lord(state)
- or self.morph_impaler_or_lurker(state)
- ) or (
- self.advanced_tactics
- and (self.morph_viper(state)
- or state.has(ItemNames.SPINE_CRAWLER, self.player))
- )
- )
- )
-
- def basic_kerrigan(self, state: CollectionState) -> bool:
- # One active ability that can be used to defeat enemies directly on Standard
- if not self.advanced_tactics and \
- not state.has_any({ItemNames.KERRIGAN_KINETIC_BLAST, ItemNames.KERRIGAN_LEAPING_STRIKE,
- ItemNames.KERRIGAN_CRUSHING_GRIP, ItemNames.KERRIGAN_PSIONIC_SHIFT,
- ItemNames.KERRIGAN_SPAWN_BANELINGS}, self.player):
- return False
- # Two non-ultimate abilities
- count = 0
- for item in (ItemNames.KERRIGAN_KINETIC_BLAST, ItemNames.KERRIGAN_LEAPING_STRIKE, ItemNames.KERRIGAN_HEROIC_FORTITUDE,
- ItemNames.KERRIGAN_CHAIN_REACTION, ItemNames.KERRIGAN_CRUSHING_GRIP, ItemNames.KERRIGAN_PSIONIC_SHIFT,
- ItemNames.KERRIGAN_SPAWN_BANELINGS, ItemNames.KERRIGAN_INFEST_BROODLINGS, ItemNames.KERRIGAN_FURY):
- if state.has(item, self.player):
- count += 1
- if count >= 2:
- return True
- return False
-
- def two_kerrigan_actives(self, state: CollectionState) -> bool:
- count = 0
- for i in range(7):
- if state.has_any(kerrigan_actives[i], self.player):
- count += 1
- return count >= 2
-
- def zerg_pass_vents(self, state: CollectionState) -> bool:
- return self.story_tech_granted \
- or state.has_any({ItemNames.ZERGLING, ItemNames.HYDRALISK, ItemNames.ROACH}, self.player) \
- or (self.advanced_tactics and state.has(ItemNames.INFESTOR, self.player))
-
- def supreme_requirement(self, state: CollectionState) -> bool:
- return self.story_tech_granted \
- or not self.kerrigan_unit_available \
- or (
- state.has_all({ItemNames.KERRIGAN_LEAPING_STRIKE, ItemNames.KERRIGAN_MEND}, self.player)
- and self.kerrigan_levels(state, 35)
- )
-
- def kerrigan_levels(self, state: CollectionState, target: int) -> bool:
- if self.story_levels_granted or not self.kerrigan_unit_available:
- return True # Levels are granted
- if self.kerrigan_levels_per_mission_completed > 0 \
- and self.kerrigan_levels_per_mission_completed_cap > 0 \
- and not self.is_item_placement(state):
- # Levels can be granted from mission completion.
- # Item pool filtering isn't aware of missions beaten. Assume that missions beaten will fulfill this rule.
- return True
- # Levels from missions beaten
- levels = self.kerrigan_levels_per_mission_completed * state.count_group("Missions", self.player)
- if self.kerrigan_levels_per_mission_completed_cap != -1:
- levels = min(levels, self.kerrigan_levels_per_mission_completed_cap)
- # Levels from items
- for kerrigan_level_item in kerrigan_levels:
- level_amount = get_full_item_list()[kerrigan_level_item].number
- item_count = state.count(kerrigan_level_item, self.player)
- levels += item_count * level_amount
- # Total level cap
- if self.kerrigan_total_level_cap != -1:
- levels = min(levels, self.kerrigan_total_level_cap)
-
- return levels >= target
-
-
- def the_reckoning_requirement(self, state: CollectionState) -> bool:
- if self.take_over_ai_allies:
- return self.terran_competent_comp(state) \
- and self.zerg_competent_comp(state) \
- and (self.zerg_competent_anti_air(state)
- or self.terran_competent_anti_air(state))
- else:
- return self.zerg_competent_comp(state) \
- and self.zerg_competent_anti_air(state)
-
- # LotV
-
- def protoss_common_unit(self, state: CollectionState) -> bool:
- return state.has_any(self.basic_protoss_units, self.player)
-
- def protoss_basic_anti_air(self, state: CollectionState) -> bool:
- return self.protoss_competent_anti_air(state) \
- or state.has_any({ItemNames.PHOENIX, ItemNames.MIRAGE, ItemNames.CORSAIR, ItemNames.CARRIER, ItemNames.SCOUT,
- ItemNames.DARK_ARCHON, ItemNames.WRATHWALKER, ItemNames.MOTHERSHIP}, self.player) \
- or state.has_all({ItemNames.WARP_PRISM, ItemNames.WARP_PRISM_PHASE_BLASTER}, self.player) \
- or self.advanced_tactics and state.has_any(
- {ItemNames.HIGH_TEMPLAR, ItemNames.SIGNIFIER, ItemNames.ASCENDANT, ItemNames.DARK_TEMPLAR,
- ItemNames.SENTRY, ItemNames.ENERGIZER}, self.player)
-
- def protoss_anti_armor_anti_air(self, state: CollectionState) -> bool:
- return self.protoss_competent_anti_air(state) \
- or state.has_any({ItemNames.SCOUT, ItemNames.WRATHWALKER}, self.player) \
- or (state.has_any({ItemNames.IMMORTAL, ItemNames.ANNIHILATOR}, self.player)
- and state.has(ItemNames.IMMORTAL_ANNIHILATOR_ADVANCED_TARGETING_MECHANICS, self.player))
-
- def protoss_anti_light_anti_air(self, state: CollectionState) -> bool:
- return self.protoss_competent_anti_air(state) \
- or state.has_any({ItemNames.PHOENIX, ItemNames.MIRAGE, ItemNames.CORSAIR, ItemNames.CARRIER}, self.player)
-
- def protoss_competent_anti_air(self, state: CollectionState) -> bool:
- return state.has_any(
- {ItemNames.STALKER, ItemNames.SLAYER, ItemNames.INSTIGATOR, ItemNames.DRAGOON, ItemNames.ADEPT,
- ItemNames.VOID_RAY, ItemNames.DESTROYER, ItemNames.TEMPEST}, self.player) \
- or (state.has_any({ItemNames.PHOENIX, ItemNames.MIRAGE, ItemNames.CORSAIR, ItemNames.CARRIER}, self.player)
- and state.has_any({ItemNames.SCOUT, ItemNames.WRATHWALKER}, self.player)) \
- or (self.advanced_tactics
- and state.has_any({ItemNames.IMMORTAL, ItemNames.ANNIHILATOR}, self.player)
- and state.has(ItemNames.IMMORTAL_ANNIHILATOR_ADVANCED_TARGETING_MECHANICS, self.player))
-
- def protoss_has_blink(self, state: CollectionState) -> bool:
- return state.has_any({ItemNames.STALKER, ItemNames.INSTIGATOR, ItemNames.SLAYER}, self.player) \
- or (
- state.has(ItemNames.DARK_TEMPLAR_AVENGER_BLOOD_HUNTER_BLINK, self.player)
- and state.has_any({ItemNames.DARK_TEMPLAR, ItemNames.BLOOD_HUNTER, ItemNames.AVENGER}, self.player)
- )
-
- def protoss_can_attack_behind_chasm(self, state: CollectionState) -> bool:
- return state.has_any(
- {ItemNames.SCOUT, ItemNames.TEMPEST,
- ItemNames.CARRIER, ItemNames.VOID_RAY, ItemNames.DESTROYER, ItemNames.MOTHERSHIP}, self.player) \
- or self.protoss_has_blink(state) \
- or (state.has(ItemNames.WARP_PRISM, self.player)
- and (self.protoss_common_unit(state) or state.has(ItemNames.WARP_PRISM_PHASE_BLASTER, self.player))) \
- or (self.advanced_tactics
- and state.has_any({ItemNames.ORACLE, ItemNames.ARBITER}, self.player))
-
- def protoss_fleet(self, state: CollectionState) -> bool:
- return state.has_any({ItemNames.CARRIER, ItemNames.TEMPEST, ItemNames.VOID_RAY, ItemNames.DESTROYER}, self.player)
-
- def templars_return_requirement(self, state: CollectionState) -> bool:
- return self.story_tech_granted \
- or (
- state.has_any({ItemNames.IMMORTAL, ItemNames.ANNIHILATOR}, self.player)
- and state.has_any({ItemNames.COLOSSUS, ItemNames.VANGUARD, ItemNames.REAVER, ItemNames.DARK_TEMPLAR}, self.player)
- and state.has_any({ItemNames.SENTRY, ItemNames.HIGH_TEMPLAR}, self.player)
- )
-
- def brothers_in_arms_requirement(self, state: CollectionState) -> bool:
- return (
- self.protoss_common_unit(state)
- and self.protoss_anti_armor_anti_air(state)
- and self.protoss_hybrid_counter(state)
- ) or (
- self.take_over_ai_allies
- and (
- self.terran_common_unit(state)
- or self.protoss_common_unit(state)
- )
- and (
- self.terran_competent_anti_air(state)
- or self.protoss_anti_armor_anti_air(state)
- )
- and (
- self.protoss_hybrid_counter(state)
- or state.has_any({ItemNames.BATTLECRUISER, ItemNames.LIBERATOR, ItemNames.SIEGE_TANK}, self.player)
- or state.has_all({ItemNames.SPECTRE, ItemNames.SPECTRE_PSIONIC_LASH}, self.player)
- or (state.has(ItemNames.IMMORTAL, self.player)
- and state.has_any({ItemNames.MARINE, ItemNames.MARAUDER}, self.player)
- and self.terran_bio_heal(state))
- )
- )
-
- def protoss_hybrid_counter(self, state: CollectionState) -> bool:
- """
- Ground Hybrids
- """
- return state.has_any(
- {ItemNames.ANNIHILATOR, ItemNames.ASCENDANT, ItemNames.TEMPEST, ItemNames.CARRIER, ItemNames.VOID_RAY,
- ItemNames.WRATHWALKER, ItemNames.VANGUARD}, self.player) \
- or (state.has(ItemNames.IMMORTAL, self.player) or self.advanced_tactics) and state.has_any(
- {ItemNames.STALKER, ItemNames.DRAGOON, ItemNames.ADEPT, ItemNames.INSTIGATOR, ItemNames.SLAYER}, self.player)
-
- def the_infinite_cycle_requirement(self, state: CollectionState) -> bool:
- return self.story_tech_granted \
- or not self.kerrigan_unit_available \
- or (
- self.two_kerrigan_actives(state)
- and self.basic_kerrigan(state)
- and self.kerrigan_levels(state, 70)
- )
-
- def protoss_basic_splash(self, state: CollectionState) -> bool:
- return state.has_any(
- {ItemNames.ZEALOT, ItemNames.COLOSSUS, ItemNames.VANGUARD, ItemNames.HIGH_TEMPLAR, ItemNames.SIGNIFIER,
- ItemNames.DARK_TEMPLAR, ItemNames.REAVER, ItemNames.ASCENDANT}, self.player)
-
- def protoss_static_defense(self, state: CollectionState) -> bool:
- return state.has_any({ItemNames.PHOTON_CANNON, ItemNames.KHAYDARIN_MONOLITH}, self.player)
-
- def last_stand_requirement(self, state: CollectionState) -> bool:
- return self.protoss_common_unit(state) \
- and self.protoss_competent_anti_air(state) \
- and self.protoss_static_defense(state) \
- and (
- self.advanced_tactics
- or self.protoss_basic_splash(state)
- )
-
- def harbinger_of_oblivion_requirement(self, state: CollectionState) -> bool:
- return self.protoss_anti_armor_anti_air(state) and (
- self.take_over_ai_allies
- or (
- self.protoss_common_unit(state)
- and self.protoss_hybrid_counter(state)
- )
- )
-
- def protoss_competent_comp(self, state: CollectionState) -> bool:
- return self.protoss_common_unit(state) \
- and self.protoss_competent_anti_air(state) \
- and self.protoss_hybrid_counter(state) \
- and self.protoss_basic_splash(state)
-
- def protoss_stalker_upgrade(self, state: CollectionState) -> bool:
- return (
- state.has_any(
- {
- ItemNames.STALKER_INSTIGATOR_SLAYER_DISINTEGRATING_PARTICLES,
- ItemNames.STALKER_INSTIGATOR_SLAYER_PARTICLE_REFLECTION
- }, self.player)
- and self.lock_any_item(state, {ItemNames.STALKER, ItemNames.INSTIGATOR, ItemNames.SLAYER})
- )
-
- def steps_of_the_rite_requirement(self, state: CollectionState) -> bool:
- return self.protoss_competent_comp(state) \
- or (
- self.protoss_common_unit(state)
- and self.protoss_competent_anti_air(state)
- and self.protoss_static_defense(state)
- )
-
- def protoss_heal(self, state: CollectionState) -> bool:
- return state.has_any({ItemNames.CARRIER, ItemNames.SENTRY, ItemNames.SHIELD_BATTERY, ItemNames.RECONSTRUCTION_BEAM}, self.player)
-
- def templars_charge_requirement(self, state: CollectionState) -> bool:
- return self.protoss_heal(state) \
- and self.protoss_anti_armor_anti_air(state) \
- and (
- self.protoss_fleet(state)
- or (self.advanced_tactics
- and self.protoss_competent_comp(state)
- )
- )
-
- def the_host_requirement(self, state: CollectionState) -> bool:
- return (self.protoss_fleet(state)
- and self.protoss_static_defense(state)
- ) or (
- self.protoss_competent_comp(state)
- and state.has(ItemNames.SOA_TIME_STOP, self.player)
- )
-
- def salvation_requirement(self, state: CollectionState) -> bool:
- return [
- self.protoss_competent_comp(state),
- self.protoss_fleet(state),
- self.protoss_static_defense(state)
- ].count(True) >= 2
-
- def into_the_void_requirement(self, state: CollectionState) -> bool:
- return self.protoss_competent_comp(state) \
- or (
- self.take_over_ai_allies
- and (
- state.has(ItemNames.BATTLECRUISER, self.player)
- or (
- state.has(ItemNames.ULTRALISK, self.player)
- and self.protoss_competent_anti_air(state)
- )
- )
- )
-
- def essence_of_eternity_requirement(self, state: CollectionState) -> bool:
- defense_score = self.terran_defense_rating(state, False, True)
- if self.take_over_ai_allies and self.protoss_static_defense(state):
- defense_score += 2
- return defense_score >= 10 \
- and (
- self.terran_competent_anti_air(state)
- or self.take_over_ai_allies
- and self.protoss_competent_anti_air(state)
- ) \
- and (
- state.has(ItemNames.BATTLECRUISER, self.player)
- or (state.has(ItemNames.BANSHEE, self.player) and state.has_any({ItemNames.VIKING, ItemNames.VALKYRIE},
- self.player))
- or self.take_over_ai_allies and self.protoss_fleet(state)
- ) \
- and state.has_any({ItemNames.SIEGE_TANK, ItemNames.LIBERATOR}, self.player)
-
- def amons_fall_requirement(self, state: CollectionState) -> bool:
- if self.take_over_ai_allies:
- return (
- (
- state.has_any({ItemNames.BATTLECRUISER, ItemNames.CARRIER}, self.player)
- )
- or (state.has(ItemNames.ULTRALISK, self.player)
- and self.protoss_competent_anti_air(state)
- and (
- state.has_any({ItemNames.LIBERATOR, ItemNames.BANSHEE, ItemNames.VALKYRIE, ItemNames.VIKING}, self.player)
- or state.has_all({ItemNames.WRAITH, ItemNames.WRAITH_ADVANCED_LASER_TECHNOLOGY}, self.player)
- or self.protoss_fleet(state)
- )
- and (self.terran_sustainable_mech_heal(state)
- or (self.spear_of_adun_autonomously_cast_presence == SpearOfAdunAutonomouslyCastAbilityPresence.option_everywhere
- and state.has(ItemNames.RECONSTRUCTION_BEAM, self.player))
- )
- )
- ) \
- and self.terran_competent_anti_air(state) \
- and self.protoss_competent_comp(state) \
- and self.zerg_competent_comp(state)
- else:
- return state.has(ItemNames.MUTALISK, self.player) and self.zerg_competent_comp(state)
-
- def nova_any_weapon(self, state: CollectionState) -> bool:
- return state.has_any(
- {ItemNames.NOVA_C20A_CANISTER_RIFLE, ItemNames.NOVA_HELLFIRE_SHOTGUN, ItemNames.NOVA_PLASMA_RIFLE,
- ItemNames.NOVA_MONOMOLECULAR_BLADE, ItemNames.NOVA_BLAZEFIRE_GUNBLADE}, self.player)
-
- def nova_ranged_weapon(self, state: CollectionState) -> bool:
- return state.has_any(
- {ItemNames.NOVA_C20A_CANISTER_RIFLE, ItemNames.NOVA_HELLFIRE_SHOTGUN, ItemNames.NOVA_PLASMA_RIFLE},
- self.player)
-
- def nova_splash(self, state: CollectionState) -> bool:
- return state.has_any({
- ItemNames.NOVA_HELLFIRE_SHOTGUN, ItemNames.NOVA_BLAZEFIRE_GUNBLADE, ItemNames.NOVA_PULSE_GRENADES
- }, self.player) \
- or self.advanced_tactics and state.has_any(
- {ItemNames.NOVA_PLASMA_RIFLE, ItemNames.NOVA_MONOMOLECULAR_BLADE}, self.player)
-
- def nova_dash(self, state: CollectionState) -> bool:
- return state.has_any({ItemNames.NOVA_MONOMOLECULAR_BLADE, ItemNames.NOVA_BLINK}, self.player)
-
- def nova_full_stealth(self, state: CollectionState) -> bool:
- return state.count(ItemNames.NOVA_PROGRESSIVE_STEALTH_SUIT_MODULE, self.player) >= 2
-
- def nova_heal(self, state: CollectionState) -> bool:
- return state.has_any({ItemNames.NOVA_ARMORED_SUIT_MODULE, ItemNames.NOVA_STIM_INFUSION}, self.player)
-
- def nova_escape_assist(self, state: CollectionState) -> bool:
- return state.has_any({ItemNames.NOVA_BLINK, ItemNames.NOVA_HOLO_DECOY, ItemNames.NOVA_IONIC_FORCE_FIELD}, self.player)
-
- def the_escape_stuff_granted(self) -> bool:
- """
- The NCO first mission requires having too much stuff first before actually able to do anything
- :return:
- """
- return self.story_tech_granted \
- or (self.mission_order == MissionOrder.option_vanilla and self.enabled_campaigns == {SC2Campaign.NCO})
-
- def the_escape_first_stage_requirement(self, state: CollectionState) -> bool:
- return self.the_escape_stuff_granted() \
- or (self.nova_ranged_weapon(state) and (self.nova_full_stealth(state) or self.nova_heal(state)))
-
- def the_escape_requirement(self, state: CollectionState) -> bool:
- return self.the_escape_first_stage_requirement(state) \
- and (self.the_escape_stuff_granted() or self.nova_splash(state))
-
- def terran_cliffjumper(self, state: CollectionState) -> bool:
- return state.has(ItemNames.REAPER, self.player) \
- or state.has_all({ItemNames.GOLIATH, ItemNames.GOLIATH_JUMP_JETS}, self.player) \
- or state.has_all({ItemNames.SIEGE_TANK, ItemNames.SIEGE_TANK_JUMP_JETS}, self.player)
-
- def terran_able_to_snipe_defiler(self, state: CollectionState) -> bool:
- return state.has_all({ItemNames.NOVA_JUMP_SUIT_MODULE, ItemNames.NOVA_C20A_CANISTER_RIFLE}, self.player) \
- or state.has_all({ItemNames.SIEGE_TANK, ItemNames.SIEGE_TANK_MAELSTROM_ROUNDS, ItemNames.SIEGE_TANK_JUMP_JETS}, self.player)
-
- def sudden_strike_requirement(self, state: CollectionState) -> bool:
- return self.sudden_strike_can_reach_objectives(state) \
- and self.terran_able_to_snipe_defiler(state) \
- and state.has_any({ItemNames.SIEGE_TANK, ItemNames.VULTURE}, self.player) \
- and self.nova_splash(state) \
- and (self.terran_defense_rating(state, True, False) >= 2
- or state.has(ItemNames.NOVA_JUMP_SUIT_MODULE, self.player))
-
- def sudden_strike_can_reach_objectives(self, state: CollectionState) -> bool:
- return self.terran_cliffjumper(state) \
- or state.has_any({ItemNames.BANSHEE, ItemNames.VIKING}, self.player) \
- or (
- self.advanced_tactics
- and state.has(ItemNames.MEDIVAC, self.player)
- and state.has_any({ItemNames.MARINE, ItemNames.MARAUDER, ItemNames.VULTURE, ItemNames.HELLION,
- ItemNames.GOLIATH}, self.player)
- )
-
- def enemy_intelligence_garrisonable_unit(self, state: CollectionState) -> bool:
- """
- Has unit usable as a Garrison in Enemy Intelligence
- :param state:
- :return:
- """
- return state.has_any(
- {ItemNames.MARINE, ItemNames.REAPER, ItemNames.MARAUDER, ItemNames.GHOST, ItemNames.SPECTRE,
- ItemNames.HELLION, ItemNames.GOLIATH, ItemNames.WARHOUND, ItemNames.DIAMONDBACK, ItemNames.VIKING},
- self.player)
-
- def enemy_intelligence_cliff_garrison(self, state: CollectionState) -> bool:
- return state.has_any({ItemNames.REAPER, ItemNames.VIKING, ItemNames.MEDIVAC, ItemNames.HERCULES}, self.player) \
- or state.has_all({ItemNames.GOLIATH, ItemNames.GOLIATH_JUMP_JETS}, self.player) \
- or self.advanced_tactics and state.has_any({ItemNames.HELS_ANGELS, ItemNames.BRYNHILDS}, self.player)
-
- def enemy_intelligence_first_stage_requirement(self, state: CollectionState) -> bool:
- return self.enemy_intelligence_garrisonable_unit(state) \
- and (self.terran_competent_comp(state)
- or (
- self.terran_common_unit(state)
- and self.terran_competent_anti_air(state)
- and state.has(ItemNames.NOVA_NUKE, self.player)
- )
- ) \
- and self.terran_defense_rating(state, True, True) >= 5
-
- def enemy_intelligence_second_stage_requirement(self, state: CollectionState) -> bool:
- return self.enemy_intelligence_first_stage_requirement(state) \
- and self.enemy_intelligence_cliff_garrison(state) \
- and (
- self.story_tech_granted
- or (
- self.nova_any_weapon(state)
- and (
- self.nova_full_stealth(state)
- or (self.nova_heal(state)
- and self.nova_splash(state)
- and self.nova_ranged_weapon(state))
- )
- )
- )
-
- def enemy_intelligence_third_stage_requirement(self, state: CollectionState) -> bool:
- return self.enemy_intelligence_second_stage_requirement(state) \
- and (
- self.story_tech_granted
- or (
- state.has(ItemNames.NOVA_PROGRESSIVE_STEALTH_SUIT_MODULE, self.player)
- and self.nova_dash(state)
- )
- )
-
- def trouble_in_paradise_requirement(self, state: CollectionState) -> bool:
- return self.nova_any_weapon(state) \
- and self.nova_splash(state) \
- and self.terran_beats_protoss_deathball(state) \
- and self.terran_defense_rating(state, True, True) >= 7
-
- def night_terrors_requirement(self, state: CollectionState) -> bool:
- return self.terran_common_unit(state) \
- and self.terran_competent_anti_air(state) \
- and (
- # These can handle the waves of infested, even volatile ones
- state.has(ItemNames.SIEGE_TANK, self.player)
- or state.has_all({ItemNames.VIKING, ItemNames.VIKING_SHREDDER_ROUNDS}, self.player)
- or (
- (
- # Regular infesteds
- state.has(ItemNames.FIREBAT, self.player)
- or state.has_all({ItemNames.HELLION, ItemNames.HELLION_HELLBAT_ASPECT}, self.player)
- or (
- self.advanced_tactics
- and state.has_any({ItemNames.PERDITION_TURRET, ItemNames.PLANETARY_FORTRESS}, self.player)
- )
- )
- and self.terran_bio_heal(state)
- and (
- # Volatile infesteds
- state.has(ItemNames.LIBERATOR, self.player)
- or (
- self.advanced_tactics
- and state.has_any({ItemNames.HERC, ItemNames.VULTURE}, self.player)
- )
- )
- )
- )
-
- def flashpoint_far_requirement(self, state: CollectionState) -> bool:
- return self.terran_competent_comp(state) \
- and self.terran_mobile_detector(state) \
- and self.terran_defense_rating(state, True, False) >= 6
-
- def enemy_shadow_tripwires_tool(self, state: CollectionState) -> bool:
- return state.has_any({ItemNames.NOVA_FLASHBANG_GRENADES, ItemNames.NOVA_BLINK, ItemNames.NOVA_DOMINATION},
- self.player)
-
- def enemy_shadow_door_unlocks_tool(self, state: CollectionState) -> bool:
- return state.has_any({ItemNames.NOVA_DOMINATION, ItemNames.NOVA_BLINK, ItemNames.NOVA_JUMP_SUIT_MODULE},
- self.player)
-
- def enemy_shadow_domination(self, state: CollectionState) -> bool:
- return self.story_tech_granted \
- or (self.nova_ranged_weapon(state)
- and (self.nova_full_stealth(state)
- or state.has(ItemNames.NOVA_JUMP_SUIT_MODULE, self.player)
- or (self.nova_heal(state) and self.nova_splash(state))
- )
- )
-
- def enemy_shadow_first_stage(self, state: CollectionState) -> bool:
- return self.enemy_shadow_domination(state) \
- and (self.story_tech_granted
- or ((self.nova_full_stealth(state) and self.enemy_shadow_tripwires_tool(state))
- or (self.nova_heal(state) and self.nova_splash(state))
- )
- )
-
- def enemy_shadow_second_stage(self, state: CollectionState) -> bool:
- return self.enemy_shadow_first_stage(state) \
- and (self.story_tech_granted
- or self.nova_splash(state)
- or self.nova_heal(state)
- or self.nova_escape_assist(state)
- )
-
- def enemy_shadow_door_controls(self, state: CollectionState) -> bool:
- return self.enemy_shadow_second_stage(state) \
- and (self.story_tech_granted or self.enemy_shadow_door_unlocks_tool(state))
-
- def enemy_shadow_victory(self, state: CollectionState) -> bool:
- return self.enemy_shadow_door_controls(state) \
- and (self.story_tech_granted or self.nova_heal(state))
-
- def dark_skies_requirement(self, state: CollectionState) -> bool:
- return self.terran_common_unit(state) \
- and self.terran_beats_protoss_deathball(state) \
- and self.terran_defense_rating(state, False, True) >= 8
-
- def end_game_requirement(self, state: CollectionState) -> bool:
- return self.terran_competent_comp(state) \
- and self.terran_mobile_detector(state) \
- and (
- state.has_any({ItemNames.BATTLECRUISER, ItemNames.LIBERATOR, ItemNames.BANSHEE}, self.player)
- or state.has_all({ItemNames.WRAITH, ItemNames.WRAITH_ADVANCED_LASER_TECHNOLOGY}, self.player)
- ) \
- and (state.has_any({ItemNames.BATTLECRUISER, ItemNames.VIKING, ItemNames.LIBERATOR}, self.player)
- or (self.advanced_tactics
- and state.has_all({ItemNames.RAVEN, ItemNames.RAVEN_HUNTER_SEEKER_WEAPON}, self.player)
- )
- )
-
- def __init__(self, world: World):
- self.world: World = world
- self.player = None if world is None else world.player
- self.logic_level = get_option_value(world, 'required_tactics')
- self.advanced_tactics = self.logic_level != RequiredTactics.option_standard
- self.take_over_ai_allies = get_option_value(world, "take_over_ai_allies") == TakeOverAIAllies.option_true
- self.kerrigan_unit_available = get_option_value(world, 'kerrigan_presence') in kerrigan_unit_available \
- and SC2Campaign.HOTS in get_enabled_campaigns(world)
- self.kerrigan_levels_per_mission_completed = get_option_value(world, "kerrigan_levels_per_mission_completed")
- self.kerrigan_levels_per_mission_completed_cap = get_option_value(world, "kerrigan_levels_per_mission_completed_cap")
- self.kerrigan_total_level_cap = get_option_value(world, "kerrigan_total_level_cap")
- self.story_tech_granted = get_option_value(world, "grant_story_tech") == GrantStoryTech.option_true
- self.story_levels_granted = get_option_value(world, "grant_story_levels") != GrantStoryLevels.option_disabled
- self.basic_terran_units = get_basic_units(world, SC2Race.TERRAN)
- self.basic_zerg_units = get_basic_units(world, SC2Race.ZERG)
- self.basic_protoss_units = get_basic_units(world, SC2Race.PROTOSS)
- self.spear_of_adun_autonomously_cast_presence = get_option_value(world, "spear_of_adun_autonomously_cast_ability_presence")
- self.enabled_campaigns = get_enabled_campaigns(world)
- self.mission_order = get_option_value(world, "mission_order")
diff --git a/worlds/sc2/Starcraft2.kv b/worlds/sc2/Starcraft2.kv
deleted file mode 100644
index 6b112c2f..00000000
--- a/worlds/sc2/Starcraft2.kv
+++ /dev/null
@@ -1,28 +0,0 @@
-
- scroll_type: ["content", "bars"]
- bar_width: dp(12)
- effect_cls: "ScrollEffect"
-
-
- cols: 1
- size_hint_y: None
- height: self.minimum_height + 15
- padding: [5,0,dp(12),0]
-
-:
- cols: 1
-
-:
- rows: 1
-
-:
- cols: 1
- spacing: [0,5]
-
-:
- text_size: self.size
- markup: True
- halign: 'center'
- valign: 'middle'
- padding: [5,0,5,0]
- outline_width: 1
diff --git a/worlds/sc2/__init__.py b/worlds/sc2/__init__.py
index f11059a5..0201ebf6 100644
--- a/worlds/sc2/__init__.py
+++ b/worlds/sc2/__init__.py
@@ -1,25 +1,49 @@
-import typing
from dataclasses import fields
+import logging
-from typing import List, Set, Iterable, Sequence, Dict, Callable, Union
+from typing import *
from math import floor, ceil
-from BaseClasses import Item, MultiWorld, Location, Tutorial, ItemClassification
+from BaseClasses import Item, MultiWorld, Location, Tutorial, ItemClassification, CollectionState
+from Options import Accessibility, OptionError
from worlds.AutoWorld import WebWorld, World
-from . import ItemNames
-from .Items import StarcraftItem, filler_items, get_item_table, get_full_item_list, \
- get_basic_units, ItemData, upgrade_included_names, progressive_if_nco, kerrigan_actives, kerrigan_passives, \
- kerrigan_only_passives, progressive_if_ext, not_balanced_starting_units, spear_of_adun_calldowns, \
- spear_of_adun_castable_passives, nova_equipment
-from .ItemGroups import item_name_groups
-from .Locations import get_locations, LocationType, get_location_types, get_plando_locations
-from .Regions import create_regions
-from .Options import get_option_value, LocationInclusion, KerriganLevelItemDistribution, \
- KerriganPresence, KerriganPrimalStatus, RequiredTactics, kerrigan_unit_available, StarterUnit, SpearOfAdunPresence, \
- get_enabled_campaigns, SpearOfAdunAutonomouslyCastAbilityPresence, Starcraft2Options
-from .PoolFilter import filter_items, get_item_upgrades, UPGRADABLE_ITEMS, missions_in_mission_table, get_used_races
-from .MissionTables import MissionInfo, SC2Campaign, lookup_name_to_mission, SC2Mission, \
- SC2Race
+from . import location_groups
+from .item.item_groups import unreleased_items, war_council_upgrades
+from .item.item_tables import (
+ get_full_item_list,
+ not_balanced_starting_units, WEAPON_ARMOR_UPGRADE_MAX_LEVEL,
+)
+from .item import FilterItem, ItemFilterFlags, StarcraftItem, item_groups, item_names, item_tables, item_parents, \
+ ZergItemType, ProtossItemType, ItemData
+from .locations import (
+ get_locations, DEFAULT_LOCATION_LIST, get_location_types, get_location_flags,
+ get_plando_locations, LocationType, lookup_location_id_to_type
+)
+from .mission_order.layout_types import Gauntlet
+from .options import (
+ get_option_value, LocationInclusion, KerriganLevelItemDistribution,
+ KerriganPresence, KerriganPrimalStatus, kerrigan_unit_available, StarterUnit, SpearOfAdunPresence,
+ get_enabled_campaigns, SpearOfAdunPassiveAbilityPresence, Starcraft2Options,
+ GrantStoryTech, GenericUpgradeResearch, RequiredTactics,
+ upgrade_included_names, EnableVoidTrade, FillerItemsDistribution, MissionOrderScouting, option_groups,
+ NovaGhostOfAChanceVariant, MissionOrder, VanillaItemsOnly, ExcludeOverpoweredItems,
+ is_mission_in_soa_presence,
+)
+from .rules import get_basic_units, SC2Logic
+from . import settings
+from .pool_filter import filter_items
+from .mission_tables import SC2Campaign, SC2Mission, SC2Race, MissionFlag
+from .regions import create_mission_order
+from .mission_order import SC2MissionOrder
+from worlds.LauncherComponents import components, Component, launch as launch_component
+logger = logging.getLogger("Starcraft 2")
+VICTORY_MODULO = 100
+
+def launch_client(*args: str):
+ from .client import launch
+ launch_component(launch, name="Starcraft 2 Client", args=args)
+
+components.append(Component('Starcraft 2 Client', func=launch_client, game_name='Starcraft 2', supports_uri=True))
class Starcraft2WebWorld(WebWorld):
setup_en = Tutorial(
@@ -40,8 +64,18 @@ class Starcraft2WebWorld(WebWorld):
["Neocerber"]
)
- tutorials = [setup_en, setup_fr]
+ custom_mission_orders_en = Tutorial(
+ "Custom Mission Order Usage Guide",
+ "Documentation for the custom_mission_order YAML option",
+ "English",
+ "custom_mission_orders_en.md",
+ "custom_mission_orders/en",
+ ["Salzkorn"]
+ )
+
+ tutorials = [setup_en, setup_fr, custom_mission_orders_en]
game_info_languages = ["en", "fr"]
+ option_groups = option_groups
class SC2World(World):
@@ -52,90 +86,279 @@ class SC2World(World):
game = "Starcraft 2"
web = Starcraft2WebWorld()
+ settings: ClassVar[settings.Starcraft2Settings]
item_name_to_id = {name: data.code for name, data in get_full_item_list().items()}
- location_name_to_id = {location.name: location.code for location in get_locations(None)}
+ location_name_to_id = {location.name: location.code for location in DEFAULT_LOCATION_LIST}
options_dataclass = Starcraft2Options
options: Starcraft2Options
- item_name_groups = item_name_groups
- locked_locations: typing.List[str]
- location_cache: typing.List[Location]
- mission_req_table: Dict[SC2Campaign, Dict[str, MissionInfo]] = {}
- final_mission_id: int
- victory_item: str
- required_client_version = 0, 4, 5
+ item_name_groups = item_groups.item_name_groups # type: ignore
+ location_name_groups = location_groups.get_location_groups()
+ locked_locations: List[str]
+ """Locations locked to contain specific items, such as victory events or forced resources"""
+ location_cache: List[Location]
+ final_missions: List[int]
+ required_client_version = 0, 6, 4
+ custom_mission_order: SC2MissionOrder
+ logic: Optional['SC2Logic']
+ filler_items_distribution: Dict[str, int]
def __init__(self, multiworld: MultiWorld, player: int):
super(SC2World, self).__init__(multiworld, player)
self.location_cache = []
self.locked_locations = []
+ self.filler_items_distribution = FillerItemsDistribution.default
+ self.logic = None
- def create_item(self, name: str) -> Item:
+ def create_item(self, name: str) -> StarcraftItem:
data = get_full_item_list()[name]
return StarcraftItem(name, data.classification, data.code, self.player)
def create_regions(self):
- self.mission_req_table, self.final_mission_id, self.victory_item = create_regions(
+ self.logic = SC2Logic(self)
+ self.custom_mission_order = create_mission_order(
self, get_locations(self), self.location_cache
)
+ self.logic.nova_used = (
+ MissionFlag.Nova in self.custom_mission_order.get_used_flags()
+ or (
+ MissionFlag.WoLNova in self.custom_mission_order.get_used_flags()
+ and self.options.nova_ghost_of_a_chance_variant == NovaGhostOfAChanceVariant.option_nco
+ )
+ )
+
+ def create_items(self) -> None:
+ # Starcraft 2-specific item setup:
+ # * Filter item pool based on player options
+ # * Plando starter units
+ # * Start-inventory units if necessary for logic
+ # * Plando filler items based on location exclusions
+ # * If the item pool is less than the location count, add some filler items
- def create_items(self):
setup_events(self.player, self.locked_locations, self.location_cache)
+ set_up_filler_items_distribution(self)
- excluded_items = get_excluded_items(self)
+ item_list: List[FilterItem] = create_and_flag_explicit_item_locks_and_excludes(self)
+ flag_excludes_by_faction_presence(self, item_list)
+ flag_mission_based_item_excludes(self, item_list)
+ flag_allowed_orphan_items(self, item_list)
+ flag_start_inventory(self, item_list)
+ flag_unused_upgrade_types(self, item_list)
+ flag_unreleased_items(item_list)
+ flag_user_excluded_item_sets(self, item_list)
+ flag_war_council_items(self, item_list)
+ flag_and_add_resource_locations(self, item_list)
+ flag_mission_order_required_items(self, item_list)
+ pruned_items: List[StarcraftItem] = prune_item_pool(self, item_list)
- starter_items = assign_starter_items(self, excluded_items, self.locked_locations, self.location_cache)
+ start_inventory = [item for item in pruned_items if ItemFilterFlags.StartInventory in item.filter_flags]
+ pool = [item for item in pruned_items if ItemFilterFlags.StartInventory not in item.filter_flags]
- fill_resource_locations(self, self.locked_locations, self.location_cache)
+ # Tell the logic which unit classes are used for required W/A upgrades
+ used_item_names: Set[str] = {item.name for item in pruned_items}
+ used_item_names = used_item_names.union(item.name for item in self.multiworld.itempool if item.player == self.player)
+ assert self.logic is not None
+ if used_item_names.isdisjoint(item_groups.barracks_wa_group):
+ self.logic.has_barracks_unit = False
+ if used_item_names.isdisjoint(item_groups.factory_wa_group):
+ self.logic.has_factory_unit = False
+ if used_item_names.isdisjoint(item_groups.starport_wa_group):
+ self.logic.has_starport_unit = False
+ if used_item_names.isdisjoint(item_groups.zerg_melee_wa):
+ self.logic.has_zerg_melee_unit = False
+ if used_item_names.isdisjoint(item_groups.zerg_ranged_wa):
+ self.logic.has_zerg_ranged_unit = False
+ if used_item_names.isdisjoint(item_groups.zerg_air_units):
+ self.logic.has_zerg_air_unit = False
+ if used_item_names.isdisjoint(item_groups.protoss_ground_wa):
+ self.logic.has_protoss_ground_unit = False
+ if used_item_names.isdisjoint(item_groups.protoss_air_wa):
+ self.logic.has_protoss_air_unit = False
- pool = get_item_pool(self, self.mission_req_table, starter_items, excluded_items, self.location_cache)
+ pad_item_pool_with_filler(self, len(self.location_cache) - len(self.locked_locations) - len(pool), pool)
- fill_item_pool_with_dummy_items(self, self.locked_locations, self.location_cache, pool)
+ push_precollected_items_to_multiworld(self, start_inventory)
self.multiworld.itempool += pool
- def set_rules(self):
- self.multiworld.completion_condition[self.player] = lambda state: state.has(self.victory_item, self.player)
+ def set_rules(self) -> None:
+ if self.options.required_tactics == RequiredTactics.option_no_logic:
+ # Forcing completed goal and minimal accessibility on no logic
+ self.options.accessibility.value = Accessibility.option_minimal
+ required_items = self.custom_mission_order.get_items_to_lock()
+ self.multiworld.completion_condition[self.player] = lambda state, required_items=required_items: all( # type: ignore
+ state.has(item, self.player, amount) for (item, amount) in required_items.items()
+ )
+ else:
+ self.multiworld.completion_condition[self.player] = self.custom_mission_order.get_completion_condition(self.player)
def get_filler_item_name(self) -> str:
- return self.random.choice(filler_items)
+ # Assume `self.filler_items_distribution` is validated and has at least one non-zero entry
+ return self.random.choices(tuple(self.filler_items_distribution), weights=self.filler_items_distribution.values())[0] # type: ignore
- def fill_slot_data(self):
- slot_data = {}
+ def fill_slot_data(self) -> Mapping[str, Any]:
+ slot_data: Dict[str, Any] = {}
for option_name in [field.name for field in fields(Starcraft2Options)]:
option = get_option_value(self, option_name)
if type(option) in {str, int}:
slot_data[option_name] = int(option)
- slot_req_table = {}
-
- # Serialize data
- for campaign in self.mission_req_table:
- slot_req_table[campaign.id] = {}
- for mission in self.mission_req_table[campaign]:
- slot_req_table[campaign.id][mission] = self.mission_req_table[campaign][mission]._asdict()
- # Replace mission objects with mission IDs
- slot_req_table[campaign.id][mission]["mission"] = slot_req_table[campaign.id][mission]["mission"].id
-
- for index in range(len(slot_req_table[campaign.id][mission]["required_world"])):
- # TODO this is a band-aid, sometimes the mission_req_table already contains dicts
- # as far as I can tell it's related to having multiple vanilla mission orders
- if not isinstance(slot_req_table[campaign.id][mission]["required_world"][index], dict):
- slot_req_table[campaign.id][mission]["required_world"][index] = slot_req_table[campaign.id][mission]["required_world"][index]._asdict()
enabled_campaigns = get_enabled_campaigns(self)
slot_data["plando_locations"] = get_plando_locations(self)
- slot_data["nova_covert_ops_only"] = (enabled_campaigns == {SC2Campaign.NCO})
- slot_data["mission_req"] = slot_req_table
- slot_data["final_mission"] = self.final_mission_id
- slot_data["version"] = 3
+ slot_data["use_nova_nco_fallback"] = (
+ enabled_campaigns == {SC2Campaign.NCO}
+ and self.options.mission_order == MissionOrder.option_vanilla
+ )
+ if (self.options.nova_ghost_of_a_chance_variant == NovaGhostOfAChanceVariant.option_nco
+ or (
+ self.options.nova_ghost_of_a_chance_variant == NovaGhostOfAChanceVariant.option_auto
+ and MissionFlag.Nova in self.custom_mission_order.get_used_flags().keys()
+ )
+ ):
+ slot_data["use_nova_wol_fallback"] = False
+ else:
+ slot_data["use_nova_wol_fallback"] = True
+ slot_data["final_mission_ids"] = self.custom_mission_order.get_final_mission_ids()
+ slot_data["custom_mission_order"] = self.custom_mission_order.get_slot_data()
+ slot_data["version"] = 4
if SC2Campaign.HOTS not in enabled_campaigns:
slot_data["kerrigan_presence"] = KerriganPresence.option_not_present
+
+ if self.options.mission_order_scouting != MissionOrderScouting.option_none:
+ mission_item_classification: Dict[str, int] = {}
+ for location in self.multiworld.get_locations(self.player):
+ # Event do not hold items
+ if not location.is_event:
+ assert location.address is not None
+ assert location.item is not None
+ if lookup_location_id_to_type[location.address] == LocationType.VICTORY_CACHE:
+ # Ensure that if there are multiple items given for finishing a mission and that at least
+ # one is progressive, the flag kept is progressive.
+ location_name = self.location_id_to_name[(location.address // VICTORY_MODULO) * VICTORY_MODULO]
+ old_classification = mission_item_classification.get(location_name, 0)
+ mission_item_classification[location_name] = old_classification | location.item.classification.as_flag()
+ else:
+ mission_item_classification[location.name] = location.item.classification.as_flag()
+ slot_data["mission_item_classification"] = mission_item_classification
+
+ # Disable trade if there is no trade partner
+ traders = [
+ world
+ for world in self.multiworld.worlds.values()
+ if world.game == self.game and world.options.enable_void_trade == EnableVoidTrade.option_true # type: ignore
+ ]
+ if len(traders) < 2:
+ slot_data["enable_void_trade"] = EnableVoidTrade.option_false
+
return slot_data
+ def pre_fill(self) -> None:
+ assert self.logic is not None
+ self.logic.total_mission_count = self.custom_mission_order.get_mission_count()
+ if (
+ self.options.generic_upgrade_missions > 0
+ and self.options.required_tactics != RequiredTactics.option_no_logic
+ ):
+ # Attempt to resolve a situation when the option is too high for the mission order rolled
+ weapon_armor_item_names = [
+ item_names.PROGRESSIVE_TERRAN_WEAPON_ARMOR_UPGRADE,
+ item_names.PROGRESSIVE_ZERG_WEAPON_ARMOR_UPGRADE,
+ item_names.PROGRESSIVE_PROTOSS_WEAPON_ARMOR_UPGRADE
+ ]
+ def state_with_kerrigan_levels() -> CollectionState:
+ state: CollectionState = self.multiworld.get_all_state(False)
+ # Ignore dead ends caused by Kerrigan -> solve those in the next stage
+ state.collect(self.create_item(item_names.KERRIGAN_LEVELS_70))
+ state.update_reachable_regions(self.player)
+ return state
-def setup_events(player: int, locked_locations: typing.List[str], location_cache: typing.List[Location]):
+ self._fill_needed_items(state_with_kerrigan_levels, weapon_armor_item_names, WEAPON_ARMOR_UPGRADE_MAX_LEVEL)
+ if (
+ self.options.kerrigan_levels_per_mission_completed > 0
+ and self.options.required_tactics != RequiredTactics.option_no_logic
+ ):
+ # Attempt to solve being locked by Kerrigan level requirements
+ self._fill_needed_items(lambda: self.multiworld.get_all_state(False), [item_names.KERRIGAN_LEVELS_1], 70)
+
+
+ def _fill_needed_items(self, all_state_getter: Callable[[],CollectionState], items_to_use: List[str], max_attempts: int) -> None:
+ """
+ Helper for pre-fill, seeks if the world is actually solvable and inserts items to start inventory if necessary.
+ :param all_state_getter:
+ :param items_to_use:
+ :param max_attempts:
+ :return:
+ """
+ for attempt in range(0, max_attempts):
+ all_state: CollectionState = all_state_getter()
+ location_failed = False
+ for location in self.location_cache:
+ if not (all_state.can_reach_location(location.name, self.player)
+ and all_state.can_reach_region(location.parent_region.name, self.player)):
+ location_failed = True
+ break
+ if location_failed:
+ for item_name in items_to_use:
+ item = self.multiworld.create_item(item_name, self.player)
+ self.multiworld.push_precollected(item)
+ else:
+ return
+
+
+ def extend_hint_information(self, hint_data: Dict[int, Dict[int, str]]) -> None:
+ """
+ Generate information to hint where each mission is actually located in the mission order
+ :param hint_data:
+ """
+ hint_data[self.player] = {}
+ for campaign in self.custom_mission_order.mission_order_node.campaigns:
+ for layout in campaign.layouts:
+ columns = layout.layout_type.get_visual_layout()
+ is_single_row_layout = max([len(column) for column in columns]) == 1
+ for column_index, column in enumerate(columns):
+ for row_index, layout_mission in enumerate(column):
+ slot = layout.missions[layout_mission]
+ if hasattr(slot, "mission") and slot.mission is not None:
+ mission = slot.mission
+ campaign_name = campaign.get_visual_name()
+ layout_name = layout.get_visual_name()
+ if isinstance(layout.layout_type, Gauntlet):
+ # Linearize Gauntlet
+ column_name = str(
+ layout_mission + 1
+ if layout_mission >= 0
+ else layout.layout_type.size + layout_mission + 1
+ )
+ row_name = ""
+ else:
+ column_name = "" if len(columns) == 1 else _get_column_display(column_index, is_single_row_layout)
+ row_name = "" if is_single_row_layout else str(1 + row_index)
+ mission_position_name: str = campaign_name + " " + layout_name + " " + column_name + row_name
+ mission_position_name = mission_position_name.strip().replace(" ", " ")
+ if mission_position_name != "":
+ for location in self.get_region(mission.mission_name).get_locations():
+ if location.address is not None:
+ hint_data[self.player][location.address] = mission_position_name
+
+
+def _get_column_display(index: int, single_row_layout: bool) -> str:
+ """
+ Helper function to display column name
+ :param index:
+ :param single_row_layout:
+ :return:
+ """
+ if single_row_layout:
+ return str(index + 1)
+ else:
+ # Convert column name to a letter, from Z continue with AA and so on
+ f: Callable[[int], str] = lambda x: "" if x == 0 else f((x - 1) // 26) + chr((x - 1) % 26 + ord("A"))
+ return f(index + 1)
+
+
+def setup_events(player: int, locked_locations: List[str], location_cache: List[Location]) -> None:
for location in location_cache:
if location.address is None:
item = Item(location.name, ItemClassification.progression, None, player)
@@ -145,319 +368,661 @@ def setup_events(player: int, locked_locations: typing.List[str], location_cache
location.place_locked_item(item)
-def get_excluded_items(world: World) -> Set[str]:
- excluded_items: Set[str] = set(get_option_value(world, 'excluded_items'))
- for item in world.multiworld.precollected_items[world.player]:
- excluded_items.add(item.name)
- locked_items: Set[str] = set(get_option_value(world, 'locked_items'))
- # Starter items are also excluded items
- starter_items: Set[str] = set(get_option_value(world, 'start_inventory'))
- item_table = get_full_item_list()
- soa_presence = get_option_value(world, "spear_of_adun_presence")
- soa_autocast_presence = get_option_value(world, "spear_of_adun_autonomously_cast_ability_presence")
- enabled_campaigns = get_enabled_campaigns(world)
+def create_and_flag_explicit_item_locks_and_excludes(world: SC2World) -> List[FilterItem]:
+ """
+ Handles `excluded_items`, `locked_items`, and `start_inventory`
+ Returns a list of all possible non-filler items that can be added, with an accompanying flags bitfield.
+ """
+ excluded_items = world.options.excluded_items
+ unexcluded_items = world.options.unexcluded_items
+ locked_items = world.options.locked_items
+ start_inventory = world.options.start_inventory
+ key_items = world.custom_mission_order.get_items_to_lock()
- # Ensure no item is both guaranteed and excluded
- invalid_items = excluded_items.intersection(locked_items)
- invalid_count = len(invalid_items)
- # Don't count starter items that can appear multiple times
- invalid_count -= len([item for item in starter_items.intersection(locked_items) if item_table[item].quantity != 1])
- if invalid_count > 0:
- raise Exception(f"{invalid_count} item{'s are' if invalid_count > 1 else ' is'} both locked and excluded from generation. Please adjust your excluded items and locked items.")
+ def resolve_count(count: Optional[int], max_count: int) -> int:
+ if count == 0:
+ return max_count
+ if count is None:
+ return 0
+ if max_count == 0:
+ return count
+ return min(count, max_count)
+
+ auto_excludes = {item_name: 1 for item_name in item_groups.legacy_items}
+ if world.options.exclude_overpowered_items.value == ExcludeOverpoweredItems.option_true:
+ for item_name in item_groups.overpowered_items:
+ auto_excludes[item_name] = 1
- def smart_exclude(item_choices: Set[str], choices_to_keep: int):
- expected_choices = len(item_choices)
- if expected_choices == 0:
- return
- item_choices = set(item_choices)
- starter_choices = item_choices.intersection(starter_items)
- excluded_choices = item_choices.intersection(excluded_items)
- item_choices.difference_update(excluded_choices)
- item_choices.difference_update(locked_items)
- candidates = sorted(item_choices)
- exclude_amount = min(expected_choices - choices_to_keep - len(excluded_choices) + len(starter_choices), len(candidates))
- if exclude_amount > 0:
- excluded_items.update(world.random.sample(candidates, exclude_amount))
+ result: List[FilterItem] = []
+ for item_name, item_data in item_tables.item_table.items():
+ max_count = item_data.quantity
+ auto_excluded_count = auto_excludes.get(item_name)
+ excluded_count = excluded_items.get(item_name, auto_excluded_count)
+ unexcluded_count = unexcluded_items.get(item_name)
+ locked_count = locked_items.get(item_name)
+ start_count: Optional[int] = start_inventory.get(item_name)
+ key_count = key_items.get(item_name, 0)
+ # specifying 0 in the yaml means exclude / lock all
+ # start_inventory doesn't allow specifying 0
+ # not specifying means don't exclude/lock/start
+ excluded_count = resolve_count(excluded_count, max_count)
+ unexcluded_count = resolve_count(unexcluded_count, max_count)
+ locked_count = resolve_count(locked_count, max_count)
+ start_count = resolve_count(start_count, max_count)
- # Nova gear exclusion if NCO not in campaigns
- if SC2Campaign.NCO not in enabled_campaigns:
- excluded_items = excluded_items.union(nova_equipment)
+ excluded_count = max(0, excluded_count - unexcluded_count)
- kerrigan_presence = get_option_value(world, "kerrigan_presence")
- # Exclude Primal Form item if option is not set or Kerrigan is unavailable
- if get_option_value(world, "kerrigan_primal_status") != KerriganPrimalStatus.option_item or \
- (kerrigan_presence in {KerriganPresence.option_not_present, KerriganPresence.option_not_present_and_no_passives}):
- excluded_items.add(ItemNames.KERRIGAN_PRIMAL_FORM)
+ # Priority: start_inventory >> locked_items >> excluded_items >> unspecified
+ if max_count == 0:
+ if excluded_count:
+ logger.warning(f"Item {item_name} was listed as excluded, but as a filler item, it cannot be explicitly excluded.")
+ excluded_count = 0
+ max_count = start_count + locked_count
+ elif start_count > max_count:
+ logger.warning(f"Item {item_name} had start amount greater than maximum amount ({start_count} > {max_count}). Capping start amount to max.")
+ start_count = max_count
+ locked_count = 0
+ excluded_count = 0
+ elif locked_count + start_count > max_count:
+ logger.warning(f"Item {item_name} had locked + start amount greater than maximum amount "
+ f"({locked_count} + {start_count} > {max_count}). Capping locked amount to max - start.")
+ locked_count = max_count - start_count
+ excluded_count = 0
+ elif excluded_count + locked_count + start_count > max_count:
+ logger.warning(f"Item {item_name} had excluded + locked + start amounts greater than maximum amount "
+ f"({excluded_count} + {locked_count} + {start_count} > {max_count}). Decreasing excluded amount.")
+ excluded_count = max_count - start_count - locked_count
+ # Make sure the final count creates enough items to satisfy key requirements
+ final_count = max(max_count, key_count)
+ for index in range(final_count):
+ result.append(FilterItem(item_name, item_data, index))
+ if index < start_count:
+ result[-1].flags |= ItemFilterFlags.StartInventory
+ if index < locked_count + start_count:
+ result[-1].flags |= ItemFilterFlags.Locked
+ if item_name in world.options.non_local_items:
+ result[-1].flags |= ItemFilterFlags.NonLocal
+ if index >= max(max_count - excluded_count, key_count):
+ result[-1].flags |= ItemFilterFlags.UserExcluded
+ return result
- # no Kerrigan & remove all passives => remove all abilities
- if kerrigan_presence == KerriganPresence.option_not_present_and_no_passives:
- for tier in range(7):
- smart_exclude(kerrigan_actives[tier].union(kerrigan_passives[tier]), 0)
+
+def flag_excludes_by_faction_presence(world: SC2World, item_list: List[FilterItem]) -> None:
+ """Excludes items based on if their faction has a mission present where they can be used"""
+ missions = get_all_missions(world.custom_mission_order)
+ if world.options.take_over_ai_allies.value:
+ terran_missions = [mission for mission in missions if (MissionFlag.Terran|MissionFlag.AiTerranAlly) & mission.flags]
+ zerg_missions = [mission for mission in missions if (MissionFlag.Zerg|MissionFlag.AiZergAlly) & mission.flags]
+ protoss_missions = [mission for mission in missions if (MissionFlag.Protoss|MissionFlag.AiProtossAlly) & mission.flags]
else:
- # no Kerrigan, but keep non-Kerrigan passives
- if kerrigan_presence == KerriganPresence.option_not_present:
- smart_exclude(kerrigan_only_passives, 0)
- for tier in range(7):
- smart_exclude(kerrigan_actives[tier], 0)
+ terran_missions = [mission for mission in missions if MissionFlag.Terran in mission.flags]
+ zerg_missions = [mission for mission in missions if MissionFlag.Zerg in mission.flags]
+ protoss_missions = [mission for mission in missions if MissionFlag.Protoss in mission.flags]
+ terran_build_missions = [mission for mission in terran_missions if MissionFlag.NoBuild not in mission.flags]
+ zerg_build_missions = [mission for mission in zerg_missions if MissionFlag.NoBuild not in mission.flags]
+ protoss_build_missions = [mission for mission in protoss_missions if MissionFlag.NoBuild not in mission.flags]
+ auto_upgrades_in_nobuilds = (
+ world.options.generic_upgrade_research.value
+ in (GenericUpgradeResearch.option_always_auto, GenericUpgradeResearch.option_auto_in_no_build)
+ )
- # SOA exclusion, other cases are handled by generic race logic
- if (soa_presence == SpearOfAdunPresence.option_lotv_protoss and SC2Campaign.LOTV not in enabled_campaigns) \
- or soa_presence == SpearOfAdunPresence.option_not_present:
- excluded_items.update(spear_of_adun_calldowns)
- if (soa_autocast_presence == SpearOfAdunAutonomouslyCastAbilityPresence.option_lotv_protoss \
- and SC2Campaign.LOTV not in enabled_campaigns) \
- or soa_autocast_presence == SpearOfAdunAutonomouslyCastAbilityPresence.option_not_present:
- excluded_items.update(spear_of_adun_castable_passives)
+ for item in item_list:
+ # Catch-all for all of a faction's items
+ if not terran_missions and item.data.race == SC2Race.TERRAN:
+ if item.name not in item_groups.nova_equipment:
+ item.flags |= ItemFilterFlags.FilterExcluded
+ continue
+ if not zerg_missions and item.data.race == SC2Race.ZERG:
+ if item.data.type != item_tables.ZergItemType.Ability \
+ and item.data.type != ZergItemType.Level:
+ item.flags |= ItemFilterFlags.FilterExcluded
+ continue
+ if not protoss_missions and item.data.race == SC2Race.PROTOSS:
+ if item.name not in item_groups.soa_items:
+ item.flags |= ItemFilterFlags.FilterExcluded
+ continue
- return excluded_items
+ # Faction units
+ if (not terran_build_missions
+ and item.data.type in (item_tables.TerranItemType.Unit, item_tables.TerranItemType.Building, item_tables.TerranItemType.Mercenary)
+ ):
+ item.flags |= ItemFilterFlags.FilterExcluded
+ if (not zerg_build_missions
+ and item.data.type in (item_tables.ZergItemType.Unit, item_tables.ZergItemType.Mercenary, item_tables.ZergItemType.Evolution_Pit)
+ ):
+ if (SC2Mission.ENEMY_WITHIN not in missions
+ or world.options.grant_story_tech.value == GrantStoryTech.option_grant
+ or item.name not in (item_names.ZERGLING, item_names.ROACH, item_names.HYDRALISK, item_names.INFESTOR)
+ ):
+ item.flags |= ItemFilterFlags.FilterExcluded
+ if (not protoss_build_missions
+ and item.data.type in (
+ item_tables.ProtossItemType.Unit,
+ item_tables.ProtossItemType.Unit_2,
+ item_tables.ProtossItemType.Building,
+ )
+ ):
+ # Note(mm): This doesn't exclude things like automated assimilators or warp gate improvements
+ # because that item type is mixed in with e.g. Reconstruction Beam and Overwatch
+ if (SC2Mission.TEMPLAR_S_RETURN not in missions
+ or world.options.grant_story_tech.value == GrantStoryTech.option_grant
+ or item.name not in (
+ item_names.IMMORTAL, item_names.ANNIHILATOR,
+ item_names.COLOSSUS, item_names.VANGUARD, item_names.REAVER, item_names.DARK_TEMPLAR,
+ item_names.SENTRY, item_names.HIGH_TEMPLAR,
+ )
+ ):
+ item.flags |= ItemFilterFlags.FilterExcluded
+
+ # Faction +attack/armour upgrades
+ if (item.data.type == item_tables.TerranItemType.Upgrade
+ and not terran_build_missions
+ and not auto_upgrades_in_nobuilds
+ ):
+ item.flags |= ItemFilterFlags.FilterExcluded
+ if (item.data.type == item_tables.ZergItemType.Upgrade
+ and not zerg_build_missions
+ and not auto_upgrades_in_nobuilds
+ ):
+ item.flags |= ItemFilterFlags.FilterExcluded
+ if (item.data.type == item_tables.ProtossItemType.Upgrade
+ and not protoss_build_missions
+ and not auto_upgrades_in_nobuilds
+ ):
+ item.flags |= ItemFilterFlags.FilterExcluded
-def assign_starter_items(world: World, excluded_items: Set[str], locked_locations: List[str], location_cache: typing.List[Location]) -> List[Item]:
- starter_items: List[Item] = []
- non_local_items = get_option_value(world, "non_local_items")
- starter_unit = get_option_value(world, "starter_unit")
- enabled_campaigns = get_enabled_campaigns(world)
- first_mission = get_first_mission(world.mission_req_table)
- # Ensuring that first mission is completable
+def flag_mission_based_item_excludes(world: SC2World, item_list: List[FilterItem]) -> None:
+ """
+ Excludes items based on mission / campaign presence: Nova Gear, Kerrigan abilities, SOA
+ """
+ missions = get_all_missions(world.custom_mission_order)
+
+ kerrigan_missions = [mission for mission in missions if MissionFlag.Kerrigan in mission.flags]
+ kerrigan_build_missions = [mission for mission in kerrigan_missions if MissionFlag.NoBuild not in mission.flags]
+ nova_missions = [
+ mission for mission in missions
+ if MissionFlag.Nova in mission.flags
+ or (
+ world.options.nova_ghost_of_a_chance_variant == NovaGhostOfAChanceVariant.option_nco
+ and MissionFlag.WoLNova in mission.flags
+ )
+ ]
+
+ kerrigan_is_present = (
+ len(kerrigan_missions) > 0
+ and world.options.kerrigan_presence in kerrigan_unit_available
+ and SC2Campaign.HOTS in get_enabled_campaigns(world) # TODO: Kerrigan available all Zerg/Everywhere
+ )
+
+ # TvX build missions -- check flags
+ if world.options.take_over_ai_allies:
+ terran_build_missions = [mission for mission in missions if (
+ (MissionFlag.Terran in mission.flags or MissionFlag.AiTerranAlly in mission.flags)
+ and MissionFlag.NoBuild not in mission.flags
+ )]
+ else:
+ terran_build_missions = [mission for mission in missions if (
+ MissionFlag.Terran in mission.flags
+ and MissionFlag.NoBuild not in mission.flags
+ )]
+ tvz_build_missions = [mission for mission in terran_build_missions if MissionFlag.VsZerg in mission.flags]
+ tvp_build_missions = [mission for mission in terran_build_missions if MissionFlag.VsProtoss in mission.flags]
+ tvt_build_missions = [mission for mission in terran_build_missions if MissionFlag.VsTerran in mission.flags]
+
+ # Check if SOA actives should be present
+ if world.options.spear_of_adun_presence != SpearOfAdunPresence.option_not_present:
+ soa_missions = missions
+ soa_missions = [
+ m for m in soa_missions
+ if is_mission_in_soa_presence(world.options.spear_of_adun_presence.value, m)
+ ]
+ if not world.options.spear_of_adun_present_in_no_build:
+ soa_missions = [m for m in soa_missions if MissionFlag.NoBuild not in m.flags]
+ soa_presence = len(soa_missions) > 0
+ else:
+ soa_presence = False
+
+ # Check if SOA passives should be present
+ if world.options.spear_of_adun_passive_ability_presence != SpearOfAdunPassiveAbilityPresence.option_not_present:
+ soa_missions = missions
+ soa_missions = [
+ m for m in soa_missions
+ if is_mission_in_soa_presence(
+ world.options.spear_of_adun_passive_ability_presence.value,
+ m,
+ SpearOfAdunPassiveAbilityPresence
+ )
+ ]
+ if not world.options.spear_of_adun_passive_present_in_no_build:
+ soa_missions = [m for m in soa_missions if MissionFlag.NoBuild not in m.flags]
+ soa_passive_presence = len(soa_missions) > 0
+ else:
+ soa_passive_presence = False
+
+ remove_kerrigan_abils = (
+ # TODO: Kerrigan presence Zerg/Everywhere
+ not kerrigan_is_present
+ or (world.options.grant_story_tech.value == GrantStoryTech.option_grant and not kerrigan_build_missions)
+ or (
+ world.options.grant_story_tech.value == GrantStoryTech.option_allow_substitutes
+ and len(kerrigan_missions) == 1
+ and kerrigan_missions[0] == SC2Mission.SUPREME
+ )
+ )
+
+ for item in item_list:
+ # Filter Nova equipment if you never get Nova
+ if not nova_missions and (item.name in item_groups.nova_equipment):
+ item.flags |= ItemFilterFlags.FilterExcluded
+
+ # Todo(mm): How should no-build only / grant_story_tech affect excluding Kerrigan items?
+ # Exclude Primal form based on Kerrigan presence or primal form option
+ if (item.data.type == item_tables.ZergItemType.Primal_Form
+ and ((not kerrigan_is_present) or world.options.kerrigan_primal_status != KerriganPrimalStatus.option_item)
+ ):
+ item.flags |= ItemFilterFlags.FilterExcluded
+
+ # Remove Kerrigan abilities if there's no kerrigan
+ if item.data.type == item_tables.ZergItemType.Ability and remove_kerrigan_abils:
+ item.flags |= ItemFilterFlags.FilterExcluded
+
+ # Remove Spear of Adun if it's off
+ if item.name in item_tables.spear_of_adun_calldowns and not soa_presence:
+ item.flags |= ItemFilterFlags.FilterExcluded
+
+ # Remove Spear of Adun passives
+ if item.name in item_tables.spear_of_adun_castable_passives and not soa_passive_presence:
+ item.flags |= ItemFilterFlags.FilterExcluded
+
+ # Remove matchup-specific items if you don't play that matchup
+ if (item.name in (item_names.HIVE_MIND_EMULATOR, item_names.PSI_DISRUPTER)
+ and not tvz_build_missions
+ ):
+ item.flags |= ItemFilterFlags.FilterExcluded
+ if (item.name in (item_names.PSI_INDOCTRINATOR, item_names.SONIC_DISRUPTER)
+ and not tvt_build_missions
+ ):
+ item.flags |= ItemFilterFlags.FilterExcluded
+ if (item.name in (item_names.PSI_SCREEN, item_names.ARGUS_AMPLIFIER)
+ and not tvp_build_missions
+ ):
+ item.flags |= ItemFilterFlags.FilterExcluded
+ return
+
+
+def flag_allowed_orphan_items(world: SC2World, item_list: List[FilterItem]) -> None:
+ """Adds the `Allowed_Orphan` flag to items that shouldn't be filtered with their parents, like combat shield"""
+ missions = get_all_missions(world.custom_mission_order)
+ terran_nobuild_missions = any((MissionFlag.Terran|MissionFlag.NoBuild) in mission.flags and mission.campaign != SC2Campaign.NCO for mission in missions)
+ if terran_nobuild_missions:
+ for item in item_list:
+ if item.name in (
+ item_names.MARINE_COMBAT_SHIELD, item_names.MARINE_PROGRESSIVE_STIMPACK, item_names.MARINE_MAGRAIL_MUNITIONS,
+ item_names.MEDIC_STABILIZER_MEDPACKS, item_names.MEDIC_NANO_PROJECTOR, item_names.MARINE_LASER_TARGETING_SYSTEM,
+ ):
+ item.flags |= ItemFilterFlags.AllowedOrphan
+ # These rules only trigger on Standard tactics
+ if SC2Mission.BELLY_OF_THE_BEAST in missions and world.options.required_tactics == RequiredTactics.option_standard:
+ for item in item_list:
+ if item.name in (item_names.FIREBAT_NANO_PROJECTORS, item_names.FIREBAT_NANO_PROJECTORS, item_names.FIREBAT_PROGRESSIVE_STIMPACK):
+ item.flags |= ItemFilterFlags.AllowedOrphan
+ if SC2Mission.EVIL_AWOKEN in missions and world.options.required_tactics == RequiredTactics.option_standard:
+ for item in item_list:
+ if item.name in (item_names.STALKER_PHASE_REACTOR, item_names.STALKER_INSTIGATOR_SLAYER_DISINTEGRATING_PARTICLES, item_names.STALKER_INSTIGATOR_SLAYER_PARTICLE_REFLECTION):
+ item.flags |= ItemFilterFlags.AllowedOrphan
+
+
+def flag_start_inventory(world: SC2World, item_list: List[FilterItem]) -> None:
+ """Adds items to start_inventory based on first mission logic and options like `starter_unit` and `start_primary_abilities`"""
+ potential_starters = world.custom_mission_order.get_starting_missions()
+ starter_mission_names = [mission.mission_name for mission in potential_starters]
+ starter_unit = int(world.options.starter_unit)
+
+ # If starter_unit is off and the first mission doesn't have a no-logic location, force starter_unit on
if starter_unit == StarterUnit.option_off:
- starter_mission_locations = [location.name for location in location_cache
- if location.parent_region.name == first_mission
- and location.access_rule == Location.access_rule]
+ start_collection_state = CollectionState(world.multiworld)
+ starter_mission_locations = [location.name for location in world.location_cache
+ if location.parent_region
+ and location.parent_region.name in starter_mission_names
+ and location.access_rule(start_collection_state)]
if not starter_mission_locations:
# Force early unit if first mission is impossible without one
starter_unit = StarterUnit.option_any_starter_unit
if starter_unit != StarterUnit.option_off:
- first_race = lookup_name_to_mission[first_mission].race
+ flag_start_unit(world, item_list, starter_unit)
- if first_race == SC2Race.ANY:
- # If the first mission is a logic-less no-build
- mission_req_table: Dict[SC2Campaign, Dict[str, MissionInfo]] = world.mission_req_table
- races = get_used_races(mission_req_table, world)
- races.remove(SC2Race.ANY)
- if lookup_name_to_mission[first_mission].race in races:
- # The campaign's race is in (At least one mission that's not logic-less no-build exists)
- first_race = lookup_name_to_mission[first_mission].campaign.race
- elif len(races) > 0:
- # The campaign only has logic-less no-build missions. Find any other valid race
- first_race = world.random.choice(list(races))
-
- if first_race != SC2Race.ANY:
- # The race of the early unit has been chosen
- basic_units = get_basic_units(world, first_race)
- if starter_unit == StarterUnit.option_balanced:
- basic_units = basic_units.difference(not_balanced_starting_units)
- if first_mission == SC2Mission.DARK_WHISPERS.mission_name:
- # Special case - you don't have a logicless location but need an AA
- basic_units = basic_units.difference(
- {ItemNames.ZEALOT, ItemNames.CENTURION, ItemNames.SENTINEL, ItemNames.BLOOD_HUNTER,
- ItemNames.AVENGER, ItemNames.IMMORTAL, ItemNames.ANNIHILATOR, ItemNames.VANGUARD})
- if first_mission == SC2Mission.SUDDEN_STRIKE.mission_name:
- # Special case - cliffjumpers
- basic_units = {ItemNames.REAPER, ItemNames.GOLIATH, ItemNames.SIEGE_TANK, ItemNames.VIKING, ItemNames.BANSHEE}
- local_basic_unit = sorted(item for item in basic_units if item not in non_local_items and item not in excluded_items)
- if not local_basic_unit:
- # Drop non_local_items constraint
- local_basic_unit = sorted(item for item in basic_units if item not in excluded_items)
- if not local_basic_unit:
- raise Exception("Early Unit: At least one basic unit must be included")
-
- unit: Item = add_starter_item(world, excluded_items, local_basic_unit)
- starter_items.append(unit)
-
- # NCO-only specific rules
- if first_mission == SC2Mission.SUDDEN_STRIKE.mission_name:
- support_item: Union[str, None] = None
- if unit.name == ItemNames.REAPER:
- support_item = ItemNames.REAPER_SPIDER_MINES
- elif unit.name == ItemNames.GOLIATH:
- support_item = ItemNames.GOLIATH_JUMP_JETS
- elif unit.name == ItemNames.SIEGE_TANK:
- support_item = ItemNames.SIEGE_TANK_JUMP_JETS
- elif unit.name == ItemNames.VIKING:
- support_item = ItemNames.VIKING_SMART_SERVOS
- if support_item is not None:
- starter_items.append(add_starter_item(world, excluded_items, [support_item]))
- starter_items.append(add_starter_item(world, excluded_items, [ItemNames.NOVA_JUMP_SUIT_MODULE]))
- starter_items.append(
- add_starter_item(world, excluded_items,
- [
- ItemNames.NOVA_HELLFIRE_SHOTGUN,
- ItemNames.NOVA_PLASMA_RIFLE,
- ItemNames.NOVA_PULSE_GRENADES
- ]))
- if enabled_campaigns == {SC2Campaign.NCO}:
- starter_items.append(add_starter_item(world, excluded_items, [ItemNames.LIBERATOR_RAID_ARTILLERY]))
-
- starter_abilities = get_option_value(world, 'start_primary_abilities')
- assert isinstance(starter_abilities, int)
- if starter_abilities:
- ability_count = starter_abilities
- ability_tiers = [0, 1, 3]
- world.random.shuffle(ability_tiers)
- if ability_count > 3:
- ability_tiers.append(6)
- for tier in ability_tiers:
- abilities = kerrigan_actives[tier].union(kerrigan_passives[tier]).difference(excluded_items, non_local_items)
- if not abilities:
- abilities = kerrigan_actives[tier].union(kerrigan_passives[tier]).difference(excluded_items)
- if abilities:
- ability_count -= 1
- starter_items.append(add_starter_item(world, excluded_items, list(abilities)))
- if ability_count == 0:
- break
-
- return starter_items
+ flag_start_abilities(world, item_list)
-def get_first_mission(mission_req_table: Dict[SC2Campaign, Dict[str, MissionInfo]]) -> str:
- # The first world should also be the starting world
- campaigns = mission_req_table.keys()
- lowest_id = min([campaign.id for campaign in campaigns])
- first_campaign = [campaign for campaign in campaigns if campaign.id == lowest_id][0]
- first_mission = list(mission_req_table[first_campaign])[0]
- return first_mission
+def flag_start_unit(world: SC2World, item_list: List[FilterItem], starter_unit: int) -> None:
+ first_mission = get_random_first_mission(world, world.custom_mission_order)
+ first_race = first_mission.race
+
+ if first_race == SC2Race.ANY:
+ # If the first mission is a logic-less no-build
+ missions = get_all_missions(world.custom_mission_order)
+ build_missions = [mission for mission in missions if MissionFlag.NoBuild not in mission.flags]
+ races = {mission.race for mission in build_missions if mission.race != SC2Race.ANY}
+ if races:
+ first_race = world.random.choice(list(races))
+
+ if first_race != SC2Race.ANY:
+ possible_starter_items = {
+ item.name: item for item in item_list if (ItemFilterFlags.Plando|ItemFilterFlags.UserExcluded|ItemFilterFlags.FilterExcluded) & item.flags == 0
+ }
+
+ # The race of the early unit has been chosen
+ basic_units = get_basic_units(world.options.required_tactics.value, first_race)
+ if starter_unit == StarterUnit.option_balanced:
+ basic_units = basic_units.difference(not_balanced_starting_units)
+ if first_mission == SC2Mission.DARK_WHISPERS:
+ # Special case - you don't have a logicless location but need an AA
+ basic_units = basic_units.difference(
+ {item_names.ZEALOT, item_names.CENTURION, item_names.SENTINEL, item_names.BLOOD_HUNTER,
+ item_names.AVENGER, item_names.IMMORTAL, item_names.ANNIHILATOR, item_names.VANGUARD})
+ if first_mission == SC2Mission.SUDDEN_STRIKE:
+ # Special case - cliffjumpers
+ basic_units = {item_names.REAPER, item_names.GOLIATH, item_names.SIEGE_TANK, item_names.VIKING, item_names.BANSHEE}
+ basic_unit_options = [
+ item for item in possible_starter_items.values()
+ if item.name in basic_units
+ and ItemFilterFlags.StartInventory not in item.flags
+ ]
+
+ # For Sudden Strike, starter units need an upgrade to help them get around
+ nco_support_items = {
+ item_names.REAPER: item_names.REAPER_SPIDER_MINES,
+ item_names.GOLIATH: item_names.GOLIATH_JUMP_JETS,
+ item_names.SIEGE_TANK: item_names.SIEGE_TANK_JUMP_JETS,
+ item_names.VIKING: item_names.VIKING_SMART_SERVOS,
+ }
+ if first_mission == SC2Mission.SUDDEN_STRIKE:
+ basic_unit_options = [
+ item for item in basic_unit_options
+ if item.name not in nco_support_items
+ or nco_support_items[item.name] in possible_starter_items
+ and ((ItemFilterFlags.Plando|ItemFilterFlags.UserExcluded|ItemFilterFlags.FilterExcluded) & possible_starter_items[nco_support_items[item.name]].flags) == 0
+ ]
+ if not basic_unit_options:
+ raise OptionError("Early Unit: At least one basic unit must be included")
+ local_basic_unit = [item for item in basic_unit_options if ItemFilterFlags.NonLocal not in item.flags]
+ if local_basic_unit:
+ basic_unit_options = local_basic_unit
+
+ unit = world.random.choice(basic_unit_options)
+ unit.flags |= ItemFilterFlags.StartInventory
+
+ # NCO-only specific rules
+ if first_mission == SC2Mission.SUDDEN_STRIKE:
+ if unit.name in nco_support_items:
+ support_item = possible_starter_items[nco_support_items[unit.name]]
+ support_item.flags |= ItemFilterFlags.StartInventory
+ if item_names.NOVA_JUMP_SUIT_MODULE in possible_starter_items:
+ possible_starter_items[item_names.NOVA_JUMP_SUIT_MODULE].flags |= ItemFilterFlags.StartInventory
+ if MissionFlag.Nova in first_mission.flags:
+ possible_starter_weapons = (
+ item_names.NOVA_HELLFIRE_SHOTGUN,
+ item_names.NOVA_PLASMA_RIFLE,
+ item_names.NOVA_PULSE_GRENADES,
+ )
+ starter_weapon_options = [item for item in possible_starter_items.values() if item.name in possible_starter_weapons]
+ starter_weapon = world.random.choice(starter_weapon_options)
+ starter_weapon.flags |= ItemFilterFlags.StartInventory
-def add_starter_item(world: World, excluded_items: Set[str], item_list: Sequence[str]) -> Item:
-
- item_name = world.random.choice(sorted(item_list))
-
- excluded_items.add(item_name)
-
- item = create_item_with_correct_settings(world.player, item_name)
-
- world.multiworld.push_precollected(item)
-
- return item
+def flag_start_abilities(world: SC2World, item_list: List[FilterItem]) -> None:
+ starter_abilities = world.options.start_primary_abilities
+ if not starter_abilities:
+ return
+ assert starter_abilities <= 4
+ ability_count = int(starter_abilities)
+ available_abilities = item_groups.kerrigan_non_ulimates
+ for i in range(ability_count):
+ potential_starter_abilities = [
+ item for item in item_list
+ if item.name in available_abilities
+ and (ItemFilterFlags.UserExcluded|ItemFilterFlags.StartInventory|ItemFilterFlags.Plando) & item.flags == 0
+ ]
+ if len(potential_starter_abilities) == 0 or i >= 3:
+ # Avoid picking an ultimate unless 4 starter abilities were asked for.
+ # Without this check, it would be possible to pick an ultimate if a previous tier failed
+ # to pick due to exclusions
+ available_abilities = item_groups.kerrigan_abilities
+ potential_starter_abilities = [
+ item for item in item_list
+ if item.name in available_abilities
+ and (ItemFilterFlags.UserExcluded|ItemFilterFlags.StartInventory|ItemFilterFlags.Plando) & item.flags == 0
+ ]
+ # Try to avoid giving non-local items unless there is no alternative
+ abilities = [item for item in potential_starter_abilities if ItemFilterFlags.NonLocal not in item.flags]
+ if not abilities:
+ abilities = potential_starter_abilities
+ if abilities:
+ ability = world.random.choice(abilities)
+ ability.flags |= ItemFilterFlags.StartInventory
-def get_item_pool(world: World, mission_req_table: Dict[SC2Campaign, Dict[str, MissionInfo]],
- starter_items: List[Item], excluded_items: Set[str], location_cache: List[Location]) -> List[Item]:
- pool: List[Item] = []
-
- # For the future: goal items like Artifact Shards go here
- locked_items = []
-
- # YAML items
- yaml_locked_items = get_option_value(world, 'locked_items')
- assert not isinstance(yaml_locked_items, int)
-
- # Adjust generic upgrade availability based on options
- include_upgrades = get_option_value(world, 'generic_upgrade_missions') == 0
- upgrade_items = get_option_value(world, 'generic_upgrade_items')
- assert isinstance(upgrade_items, int)
-
- # Include items from outside main campaigns
- item_sets = {'wol', 'hots', 'lotv'}
- if get_option_value(world, 'nco_items') \
- or SC2Campaign.NCO in get_enabled_campaigns(world):
- item_sets.add('nco')
- if get_option_value(world, 'bw_items'):
- item_sets.add('bw')
- if get_option_value(world, 'ext_items'):
- item_sets.add('ext')
-
- def allowed_quantity(name: str, data: ItemData) -> int:
- if name in excluded_items \
- or data.type == "Upgrade" and (not include_upgrades or name not in upgrade_included_names[upgrade_items]) \
- or not data.origin.intersection(item_sets):
- return 0
- elif name in progressive_if_nco and 'nco' not in item_sets:
- return 1
- elif name in progressive_if_ext and 'ext' not in item_sets:
- return 1
- else:
- return data.quantity
-
- for name, data in get_item_table().items():
- for _ in range(allowed_quantity(name, data)):
- item = create_item_with_correct_settings(world.player, name)
- if name in yaml_locked_items:
- locked_items.append(item)
+def flag_unused_upgrade_types(world: SC2World, item_list: List[FilterItem]) -> None:
+ """Excludes +armour/attack upgrades based on generic upgrade strategy.
+ Caps upgrade items based on `max_upgrade_level`."""
+ include_upgrades = world.options.generic_upgrade_missions == 0
+ upgrade_items = world.options.generic_upgrade_items.value
+ upgrade_included_counts: Dict[str, int] = {}
+ for item in item_list:
+ if item.data.type in item_tables.upgrade_item_types:
+ if not include_upgrades or (item.name not in upgrade_included_names[upgrade_items]):
+ item.flags |= ItemFilterFlags.Removed
else:
- pool.append(item)
+ included = upgrade_included_counts.get(item.name, 0)
+ if (
+ included >= world.options.max_upgrade_level
+ and not (ItemFilterFlags.Locked|ItemFilterFlags.StartInventory) & item.flags
+ ):
+ item.flags |= ItemFilterFlags.FilterExcluded
+ elif ItemFilterFlags.UserExcluded not in item.flags:
+ upgrade_included_counts[item.name] = included + 1
- existing_items = starter_items + [item for item in world.multiworld.precollected_items[world.player] if item not in starter_items]
- existing_names = [item.name for item in existing_items]
-
- # Check the parent item integrity, exclude items
- pool[:] = [item for item in pool if pool_contains_parent(item, pool + locked_items + existing_items)]
-
- # Removing upgrades for excluded items
- for item_name in excluded_items:
- if item_name in existing_names:
- continue
- invalid_upgrades = get_item_upgrades(pool, item_name)
- for invalid_upgrade in invalid_upgrades:
- pool.remove(invalid_upgrade)
-
- fill_pool_with_kerrigan_levels(world, pool)
- filtered_pool = filter_items(world, mission_req_table, location_cache, pool, existing_items, locked_items)
- return filtered_pool
+def flag_unreleased_items(item_list: List[FilterItem]) -> None:
+ """Remove all unreleased items unless they're explicitly locked"""
+ for item in item_list:
+ if (item.name in unreleased_items
+ and not (ItemFilterFlags.Locked|ItemFilterFlags.StartInventory) & item.flags):
+ item.flags |= ItemFilterFlags.Removed
-def fill_item_pool_with_dummy_items(self: SC2World, locked_locations: List[str],
- location_cache: List[Location], pool: List[Item]):
- for _ in range(len(location_cache) - len(locked_locations) - len(pool)):
- item = create_item_with_correct_settings(self.player, self.get_filler_item_name())
- pool.append(item)
+def flag_user_excluded_item_sets(world: SC2World, item_list: List[FilterItem]) -> None:
+ """Excludes items based on item set options (`only_vanilla_items`)"""
+ vanilla_nonprogressive_count = {
+ item_name: 0 for item_name in item_groups.terran_original_progressive_upgrades
+ }
+ if world.options.vanilla_items_only.value == VanillaItemsOnly.option_true:
+ vanilla_items = item_groups.vanilla_items + item_groups.nova_equipment
+ for item in item_list:
+ if ItemFilterFlags.UserExcluded in item.flags:
+ continue
+ if item.name not in vanilla_items:
+ item.flags |= ItemFilterFlags.UserExcluded
+ if item.name in item_groups.terran_original_progressive_upgrades:
+ if vanilla_nonprogressive_count[item.name]:
+ item.flags |= ItemFilterFlags.UserExcluded
+ vanilla_nonprogressive_count[item.name] += 1
+
+ excluded_count: Dict[str, int] = dict()
-def create_item_with_correct_settings(player: int, name: str) -> Item:
- data = get_full_item_list()[name]
+def flag_war_council_items(world: SC2World, item_list: List[FilterItem]) -> None:
+ """Excludes / start-inventories items based on `nerf_unit_baselines` option.
+ Will skip items that are excluded by other sources."""
+ if world.options.war_council_nerfs:
+ return
- item = Item(name, data.classification, data.code, player)
-
- return item
+ flagged_item_names = []
+ for item in item_list:
+ if (
+ item.name in war_council_upgrades
+ and not ItemFilterFlags.Excluded & item.flags
+ and item.name not in flagged_item_names
+ ):
+ flagged_item_names.append(item.name)
+ item.flags |= ItemFilterFlags.StartInventory
-def pool_contains_parent(item: Item, pool: Iterable[Item]):
- item_data = get_full_item_list().get(item.name)
- if item_data.parent_item is None:
- # The item has not associated parent, the item is valid
- return True
- parent_item = item_data.parent_item
- # Check if the pool contains the parent item
- return parent_item in [pool_item.name for pool_item in pool]
-
-
-def fill_resource_locations(world: World, locked_locations: List[str], location_cache: List[Location]):
+def flag_and_add_resource_locations(world: SC2World, item_list: List[FilterItem]) -> None:
"""
Filters the locations in the world using a trash or Nothing item
- :param multiworld:
- :param player:
- :param locked_locations:
- :param location_cache:
- :return:
+ :param world: The sc2 world object
+ :param item_list: The current list of items to append to
"""
- open_locations = [location for location in location_cache if location.item is None]
+ open_locations = [location for location in world.location_cache if location.item is None]
plando_locations = get_plando_locations(world)
- resource_location_types = get_location_types(world, LocationInclusion.option_resources)
- location_data = {sc2_location.name: sc2_location for sc2_location in get_locations(world)}
+ filler_location_types = get_location_types(world, LocationInclusion.option_filler)
+ filler_location_flags = get_location_flags(world, LocationInclusion.option_filler)
+ location_data = {sc2_location.name: sc2_location for sc2_location in DEFAULT_LOCATION_LIST}
for location in open_locations:
# Go through the locations that aren't locked yet (early unit, etc)
if location.name not in plando_locations:
# The location is not plando'd
sc2_location = location_data[location.name]
- if sc2_location.type in resource_location_types:
- item_name = world.random.choice(filler_items)
+ if (sc2_location.type in filler_location_types
+ or (sc2_location.flags & filler_location_flags)
+ ):
+ item_name = world.get_filler_item_name()
item = create_item_with_correct_settings(world.player, item_name)
+ if item.classification & ItemClassification.progression:
+ # Scouting shall show Filler (or a trap)
+ item.classification = ItemClassification.filler
location.place_locked_item(item)
- locked_locations.append(location.name)
+ world.locked_locations.append(location.name)
-def place_exclusion_item(item_name, location, locked_locations, player):
- item = create_item_with_correct_settings(player, item_name)
- location.place_locked_item(item)
- locked_locations.append(location.name)
+def flag_mission_order_required_items(world: SC2World, item_list: List[FilterItem]) -> None:
+ """Marks items that are necessary for item rules in the mission order and forces them to be progression."""
+ locks_required = world.custom_mission_order.get_items_to_lock()
+ locks_done = {item: 0 for item in locks_required}
+ for item in item_list:
+ if item.name in locks_required and locks_done[item.name] < locks_required[item.name]:
+ item.flags |= ItemFilterFlags.Locked
+ item.flags |= ItemFilterFlags.ForceProgression
+ locks_done[item.name] += 1
-def fill_pool_with_kerrigan_levels(world: World, item_pool: List[Item]):
- total_levels = get_option_value(world, "kerrigan_level_item_sum")
- if get_option_value(world, "kerrigan_presence") not in kerrigan_unit_available \
- or total_levels == 0 \
- or SC2Campaign.HOTS not in get_enabled_campaigns(world):
+def prune_item_pool(world: SC2World, item_list: List[FilterItem]) -> List[StarcraftItem]:
+ """Prunes the item pool size to be less than the number of available locations"""
+
+ item_list = [
+ item for item in item_list
+ if (ItemFilterFlags.Removed not in item.flags)
+ and (ItemFilterFlags.Unexcludable & item.flags or ItemFilterFlags.FilterExcluded not in item.flags)
+ ]
+ num_items = len(item_list)
+ last_num_items = -1
+ while num_items != last_num_items:
+ # Remove orphan items until there are no more being removed
+ item_name_list = [item.name for item in item_list]
+ item_list = [item for item in item_list
+ if (ItemFilterFlags.Unexcludable|ItemFilterFlags.AllowedOrphan) & item.flags
+ or item_list_contains_parent(world, item.data, item_name_list)]
+ last_num_items = num_items
+ num_items = len(item_list)
+
+ pool: List[StarcraftItem] = []
+ for item in item_list:
+ ap_item = create_item_with_correct_settings(world.player, item.name, item.flags)
+ if ItemFilterFlags.ForceProgression in item.flags:
+ ap_item.classification = ItemClassification.progression
+ pool.append(ap_item)
+
+ fill_pool_with_kerrigan_levels(world, pool)
+ filtered_pool = filter_items(world, world.location_cache, pool)
+ return filtered_pool
+
+
+def item_list_contains_parent(world: SC2World, item_data: ItemData, item_name_list: List[str]) -> bool:
+ if item_data.parent is None:
+ # The item has no associated parent, the item is valid
+ return True
+ return item_parents.parent_present[item_data.parent](item_name_list, world.options)
+
+
+def pad_item_pool_with_filler(world: SC2World, num_items: int, pool: List[StarcraftItem]):
+ for _ in range(num_items):
+ item = create_item_with_correct_settings(world.player, world.get_filler_item_name())
+ pool.append(item)
+
+
+def set_up_filler_items_distribution(world: SC2World) -> None:
+ world.filler_items_distribution = world.options.filler_items_distribution.value.copy()
+
+ prune_fillers(world)
+ if sum(world.filler_items_distribution.values()) == 0:
+ world.filler_items_distribution = FillerItemsDistribution.default.copy()
+ prune_fillers(world)
+
+
+def prune_fillers(world):
+ mission_flags = world.custom_mission_order.get_used_flags()
+ include_protoss = (
+ MissionFlag.Protoss in mission_flags
+ or (world.options.take_over_ai_allies and (MissionFlag.AiProtossAlly in mission_flags))
+ )
+ include_kerrigan = (
+ MissionFlag.Kerrigan in mission_flags
+ and world.options.kerrigan_presence in kerrigan_unit_available
+ )
+ generic_upgrade_research = world.options.generic_upgrade_research
+ if not include_protoss:
+ world.filler_items_distribution.pop(item_names.SHIELD_REGENERATION, 0)
+ if not include_kerrigan:
+ world.filler_items_distribution.pop(item_names.KERRIGAN_LEVELS_1, 0)
+ if (generic_upgrade_research in
+ [
+ GenericUpgradeResearch.option_always_auto,
+ GenericUpgradeResearch.option_auto_in_build
+ ]
+ ):
+ world.filler_items_distribution.pop(item_names.UPGRADE_RESEARCH_SPEED, 0)
+ world.filler_items_distribution.pop(item_names.UPGRADE_RESEARCH_COST, 0)
+
+
+def get_random_first_mission(world: SC2World, mission_order: SC2MissionOrder) -> SC2Mission:
+ # Pick an arbitrary lowest-difficulty starer mission
+ starting_missions = mission_order.get_starting_missions()
+ mission_difficulties = [
+ (mission_order.mission_pools.get_modified_mission_difficulty(mission), mission)
+ for mission in starting_missions
+ ]
+ mission_difficulties.sort(key = lambda difficulty_mission_tuple: difficulty_mission_tuple[0])
+ (lowest_difficulty, _) = mission_difficulties[0]
+ first_mission_candidates = [mission for (difficulty, mission) in mission_difficulties if difficulty == lowest_difficulty]
+ return world.random.choice(first_mission_candidates)
+
+
+def get_all_missions(mission_order: SC2MissionOrder) -> List[SC2Mission]:
+ return mission_order.get_used_missions()
+
+
+def create_item_with_correct_settings(player: int, name: str, filter_flags: ItemFilterFlags = ItemFilterFlags.Available) -> StarcraftItem:
+ data = item_tables.item_table[name]
+
+ item = StarcraftItem(name, data.classification, data.code, player, filter_flags)
+ if ItemFilterFlags.ForceProgression & filter_flags:
+ item.classification = ItemClassification.progression
+
+ return item
+
+
+def fill_pool_with_kerrigan_levels(world: SC2World, item_pool: List[StarcraftItem]):
+ total_levels = world.options.kerrigan_level_item_sum.value
+ missions = get_all_missions(world.custom_mission_order)
+ kerrigan_missions = [mission for mission in missions if MissionFlag.Kerrigan in mission.flags]
+ kerrigan_build_missions = [mission for mission in kerrigan_missions if MissionFlag.NoBuild not in mission.flags]
+ if (world.options.kerrigan_presence.value not in kerrigan_unit_available
+ or total_levels == 0
+ or not kerrigan_missions
+ or (world.options.grant_story_levels and not kerrigan_build_missions)
+ ):
return
def add_kerrigan_level_items(level_amount: int, item_amount: int):
@@ -468,7 +1033,7 @@ def fill_pool_with_kerrigan_levels(world: World, item_pool: List[Item]):
item_pool.append(create_item_with_correct_settings(world.player, name))
sizes = [70, 35, 14, 10, 7, 5, 2, 1]
- option = get_option_value(world, "kerrigan_level_item_distribution")
+ option = world.options.kerrigan_level_item_distribution.value
assert isinstance(option, int)
assert isinstance(total_levels, int)
@@ -489,3 +1054,17 @@ def fill_pool_with_kerrigan_levels(world: World, item_pool: List[Item]):
else:
round_func = ceil
add_kerrigan_level_items(size, round_func(float(total_levels) / size))
+
+
+def push_precollected_items_to_multiworld(world: SC2World, item_list: List[StarcraftItem]) -> None:
+ # Clear the pre-collected items, as AP will try to do this for us,
+ # and we want to be able to filer out precollected items in the case of upgrade packages.
+ auto_precollected_items = world.multiworld.precollected_items[world.player].copy()
+ world.multiworld.precollected_items[world.player].clear()
+ for item in auto_precollected_items:
+ world.multiworld.state.remove(item)
+
+ for item in item_list:
+ if ItemFilterFlags.StartInventory not in item.filter_flags:
+ continue
+ world.multiworld.push_precollected(create_item_with_correct_settings(world.player, item.name, item.filter_flags))
diff --git a/worlds/sc2/client.py b/worlds/sc2/client.py
new file mode 100644
index 00000000..d64d44ae
--- /dev/null
+++ b/worlds/sc2/client.py
@@ -0,0 +1,2352 @@
+from __future__ import annotations
+
+import asyncio
+import collections
+import copy
+import ctypes
+import enum
+import functools
+import inspect
+import logging
+import multiprocessing
+import os.path
+import re
+import sys
+import tempfile
+import typing
+import queue
+import zipfile
+import io
+import random
+import concurrent.futures
+import time
+import uuid
+from pathlib import Path
+
+# CommonClient import first to trigger ModuleUpdater
+from CommonClient import CommonContext, server_loop, ClientCommandProcessor, gui_enabled, get_base_parser
+from Utils import init_logging, is_windows, async_start
+from .item import item_names, item_parents, race_to_item_type
+from .item.item_annotations import ITEM_NAME_ANNOTATIONS
+from .item.item_groups import item_name_groups, unlisted_item_name_groups, ItemGroupNames
+from . import options, VICTORY_MODULO
+from .options import (
+ MissionOrder, KerriganPrimalStatus, kerrigan_unit_available, KerriganPresence, EnableMorphling, GameDifficulty,
+ GameSpeed, GenericUpgradeItems, GenericUpgradeResearch, ColorChoice, GenericUpgradeMissions, MaxUpgradeLevel,
+ LocationInclusion, ExtraLocations, MasteryLocations, SpeedrunLocations, PreventativeLocations, ChallengeLocations,
+ VanillaLocations,
+ DisableForcedCamera, SkipCutscenes, GrantStoryTech, GrantStoryLevels, TakeOverAIAllies, RequiredTactics,
+ SpearOfAdunPresence, SpearOfAdunPresentInNoBuild, SpearOfAdunPassiveAbilityPresence,
+ SpearOfAdunPassivesPresentInNoBuild, EnableVoidTrade, VoidTradeAgeLimit, void_trade_age_limits_ms, VoidTradeWorkers,
+ DifficultyDamageModifier, MissionOrderScouting, GenericUpgradeResearchSpeedup, MercenaryHighlanders, WarCouncilNerfs,
+ is_mission_in_soa_presence,
+)
+from .mission_order.slot_data import CampaignSlotData, LayoutSlotData, MissionSlotData, MissionOrderObjectSlotData
+from .mission_order.entry_rules import SubRuleRuleData, CountMissionsRuleData, MissionEntryRules
+from .mission_tables import MissionFlag
+from .transfer_data import normalized_unit_types, worker_units
+from . import SC2World
+
+
+if __name__ == "__main__":
+ init_logging("SC2Client", exception_logger="Client")
+
+logger = logging.getLogger("Client")
+sc2_logger = logging.getLogger("Starcraft2")
+
+import nest_asyncio
+from worlds._sc2common import bot
+from worlds._sc2common.bot.data import Race
+from worlds._sc2common.bot.main import run_game
+from worlds._sc2common.bot.player import Bot
+from .item.item_tables import (
+ lookup_id_to_name, get_full_item_list, ItemData,
+ ZergItemType, upgrade_bundles,
+ WEAPON_ARMOR_UPGRADE_MAX_LEVEL,
+)
+from .locations import SC2WOL_LOC_ID_OFFSET, LocationType, LocationFlag, SC2HOTS_LOC_ID_OFFSET, VICTORY_CACHE_OFFSET
+from .mission_tables import (
+ lookup_id_to_mission, SC2Campaign, MissionInfo,
+ lookup_id_to_campaign, SC2Mission, campaign_mission_table, SC2Race
+)
+
+import colorama
+from .options import Option, upgrade_included_names
+from NetUtils import ClientStatus, NetworkItem, JSONtoTextParser, JSONMessagePart, add_json_item, add_json_location, add_json_text, JSONTypes
+from MultiServer import mark_raw
+
+pool = concurrent.futures.ThreadPoolExecutor(1)
+loop = asyncio.get_event_loop_policy().new_event_loop()
+nest_asyncio.apply(loop)
+MAX_BONUS: int = 28
+
+# GitHub repo where the Map/mod data is hosted for /download_data command
+DATA_REPO_OWNER = "Ziktofel"
+DATA_REPO_NAME = "Archipelago-SC2-data"
+DATA_API_VERSION = "API4"
+
+# Bot controller
+CONTROLLER_HEALTH: int = 38281
+CONTROLLER2_HEALTH: int = 38282
+
+# Void Trade
+TRADE_UNIT = "AP_TradeStructure" # ID of the unit
+TRADE_SEND_BUTTON = "AP_TradeStructureDummySend" # ID of the button
+TRADE_RECEIVE_1_BUTTON = "AP_TradeStructureDummyReceive" # ID of the button
+TRADE_RECEIVE_5_BUTTON = "AP_TradeStructureDummyReceive5" # ID of the button
+TRADE_DATASTORAGE_TEAM = "SC2_VoidTrade_" # + Team
+TRADE_DATASTORAGE_SLOT = "slot_" # + Slot
+TRADE_DATASTORAGE_LOCK = "_lock"
+TRADE_LOCK_TIME = 5 # Time in seconds that the DataStorage may be considered safe to edit
+TRADE_LOCK_WAIT_LIMIT = 540000 / 1.4 # Time in ms that the client may spend trying to get a lock (540000 = 9 minutes, 1.4 is 'faster' game speed's time scale)
+
+# Games
+STARCRAFT2 = "Starcraft 2"
+STARCRAFT2_WOL = "Starcraft 2 Wings of Liberty"
+
+
+# Data version file path.
+# This file is used to tell if the downloaded data are outdated
+# Associated with /download_data command
+def get_metadata_file() -> str:
+ return os.environ["SC2PATH"] + os.sep + "ArchipelagoSC2Metadata.txt"
+
+
+def _remap_color_option(slot_data_version: int, color: int) -> int:
+ """Remap colour options for backwards compatibility with older slot data"""
+ if slot_data_version < 4 and color == ColorChoice.option_mengsk:
+ return ColorChoice.option_default
+ return color
+
+
+class ConfigurableOptionType(enum.Enum):
+ INTEGER = enum.auto()
+ ENUM = enum.auto()
+
+class ConfigurableOptionInfo(typing.NamedTuple):
+ name: str
+ variable_name: str
+ option_class: typing.Type[Option]
+ option_type: ConfigurableOptionType = ConfigurableOptionType.ENUM
+ can_break_logic: bool = False
+
+
+class ColouredMessage:
+ def __init__(self, text: str = '', *, keep_markup: bool = False) -> None:
+ self.parts: typing.List[dict] = []
+ if text:
+ self(text, keep_markup=keep_markup)
+ def __call__(self, text: str, *, keep_markup: bool = False) -> 'ColouredMessage':
+ add_json_text(self.parts, text, keep_markup=keep_markup)
+ return self
+ def coloured(self, text: str, colour: str, *, keep_markup: bool = False) -> 'ColouredMessage':
+ add_json_text(self.parts, text, type="color", color=colour, keep_markup=keep_markup)
+ return self
+ def location(self, location_id: int, player_id: int) -> 'ColouredMessage':
+ add_json_location(self.parts, location_id, player_id)
+ return self
+ def item(self, item_id: int, player_id: int, flags: int = 0) -> 'ColouredMessage':
+ add_json_item(self.parts, item_id, player_id, flags)
+ return self
+ def player(self, player_id: int) -> 'ColouredMessage':
+ add_json_text(self.parts, str(player_id), type=JSONTypes.player_id)
+ return self
+ def send(self, ctx: SC2Context) -> None:
+ ctx.on_print_json({"data": self.parts, "cmd": "PrintJSON"})
+
+
+class StarcraftClientProcessor(ClientCommandProcessor):
+ ctx: SC2Context
+
+ def formatted_print(self, text: str) -> None:
+ """Prints with kivy formatting to the GUI, and also prints to command-line and to all logs"""
+ # Note(mm): Bold/underline can help readability, but unfortunately the CommonClient does not filter bold tags from command-line output.
+ # Regardless, using `on_print_json` to get formatted text in the GUI and output in the command-line and in the logs,
+ # without having to branch code from CommonClient
+ self.ctx.on_print_json({"data": [{"text": text, "keep_markup": True}]})
+
+ def _cmd_difficulty(self, difficulty: str = "") -> bool:
+ """Overrides the current difficulty set for the world. Takes the argument casual, normal, hard, or brutal"""
+ arguments = difficulty.split()
+ num_arguments = len(arguments)
+
+ if num_arguments > 0:
+ difficulty_choice = arguments[0].lower()
+ if difficulty_choice == "casual":
+ self.ctx.difficulty_override = 0
+ elif difficulty_choice == "normal":
+ self.ctx.difficulty_override = 1
+ elif difficulty_choice == "hard":
+ self.ctx.difficulty_override = 2
+ elif difficulty_choice == "brutal":
+ self.ctx.difficulty_override = 3
+ else:
+ self.output("Unable to parse difficulty '" + arguments[0] + "'")
+ return False
+
+ self.output("Difficulty set to " + arguments[0])
+ return True
+
+ else:
+ if self.ctx.difficulty == -1:
+ self.output("Please connect to a seed before checking difficulty.")
+ else:
+ current_difficulty = self.ctx.difficulty
+ if self.ctx.difficulty_override >= 0:
+ current_difficulty = self.ctx.difficulty_override
+ self.output("Current difficulty: " + ["Casual", "Normal", "Hard", "Brutal"][current_difficulty])
+ self.output("To change the difficulty, add the name of the difficulty after the command.")
+ return False
+
+
+ def _cmd_game_speed(self, game_speed: str = "") -> bool:
+ """Overrides the current game speed for the world.
+ Takes the arguments default, slower, slow, normal, fast, faster"""
+ arguments = game_speed.split()
+ num_arguments = len(arguments)
+
+ if num_arguments > 0:
+ speed_choice = arguments[0].lower()
+ if speed_choice == "default":
+ self.ctx.game_speed_override = 0
+ elif speed_choice == "slower":
+ self.ctx.game_speed_override = 1
+ elif speed_choice == "slow":
+ self.ctx.game_speed_override = 2
+ elif speed_choice == "normal":
+ self.ctx.game_speed_override = 3
+ elif speed_choice == "fast":
+ self.ctx.game_speed_override = 4
+ elif speed_choice == "faster":
+ self.ctx.game_speed_override = 5
+ else:
+ self.output("Unable to parse game speed '" + arguments[0] + "'")
+ return False
+
+ self.output("Game speed set to " + arguments[0])
+ return True
+
+ else:
+ if self.ctx.game_speed == -1:
+ self.output("Please connect to a seed before checking game speed.")
+ else:
+ current_speed = self.ctx.game_speed
+ if self.ctx.game_speed_override >= 0:
+ current_speed = self.ctx.game_speed_override
+ self.output("Current game speed: "
+ + ["Default", "Slower", "Slow", "Normal", "Fast", "Faster"][current_speed])
+ self.output("To change the game speed, add the name of the speed after the command,"
+ " or Default to select based on difficulty.")
+ return False
+
+ @mark_raw
+ def _cmd_received(self, filter_search: str = "") -> bool:
+ """List received items.
+ Pass in a parameter to filter the search by partial item name or exact item group.
+ Use '/received recent ' to list the last 'number' items received (default 20)."""
+ if self.ctx.slot is None:
+ self.formatted_print("Connect to a slot to view what items are received.")
+ return True
+ if filter_search.casefold().startswith('recent'):
+ return self._received_recent(filter_search[len('recent'):].strip())
+ # Groups must be matched case-sensitively, so we properly capitalize the search term
+ # eg. "Spear of Adun" over "Spear Of Adun" or "spear of adun"
+ # This fails a lot of item name matches, but those should be found by partial name match
+ group_filter = ''
+ for group_name in item_name_groups:
+ if group_name in unlisted_item_name_groups:
+ continue
+ if filter_search.casefold() == group_name.casefold():
+ group_filter = group_name
+ break
+
+ def item_matches_filter(item_name: str) -> bool:
+ # The filter can be an exact group name or a partial item name
+ # Partial item name can be matched case-insensitively
+ if filter_search.casefold() in item_name.casefold():
+ return True
+ # The search term should already be formatted as a group name
+ if group_filter and item_name in item_name_groups[group_filter]:
+ return True
+ return False
+
+ items = get_full_item_list()
+ categorized_items: typing.Dict[SC2Race, typing.List[typing.Union[int, str]]] = {}
+ parent_to_child: typing.Dict[typing.Union[int, str], typing.List[int]] = {}
+ items_received: typing.Dict[int, typing.List[NetworkItem]] = {}
+ for item in self.ctx.items_received:
+ items_received.setdefault(item.item, []).append(item)
+ items_received_set = set(items_received)
+ for item_data in items.values():
+ if item_data.parent:
+ parent_rule = item_parents.parent_present[item_data.parent]
+ if parent_rule.constraint_group is not None and parent_rule.constraint_group in items:
+ parent_to_child.setdefault(items[parent_rule.constraint_group].code, []).append(item_data.code)
+ continue
+ race = items[parent_rule.parent_items()[0]].race
+ categorized_items.setdefault(race, [])
+ if parent_rule.display_string not in categorized_items[race]:
+ categorized_items[race].append(parent_rule.display_string)
+ parent_to_child.setdefault(parent_rule.display_string, []).append(item_data.code)
+ else:
+ categorized_items.setdefault(item_data.race, []).append(item_data.code)
+
+ def display_info(element: typing.Union[SC2Race, str, int]) -> tuple:
+ """Return (should display, name, type, children, sum(obtained), sum(matching filter))"""
+ have_item = isinstance(element, int) and element in items_received_set
+ if isinstance(element, SC2Race):
+ children: typing.Sequence[typing.Union[str, int]] = categorized_items[faction]
+ name = element.name
+ elif isinstance(element, int):
+ children = parent_to_child.get(element, [])
+ name = self.ctx.item_names.lookup_in_game(element)
+ else:
+ assert isinstance(element, str)
+ children = parent_to_child[element]
+ name = element
+ matches_filter = item_matches_filter(name)
+ child_states = [display_info(child) for child in children]
+ return (
+ (have_item and matches_filter) or any(child_state[0] for child_state in child_states),
+ name,
+ element,
+ child_states,
+ sum(child_state[4] for child_state in child_states) + have_item,
+ sum(child_state[5] for child_state in child_states) + (have_item and matches_filter),
+ )
+
+ def display_tree(
+ should_display: bool, name: str, element: typing.Union[SC2Race, str, int], child_states: tuple, indent: int = 0
+ ) -> None:
+ if not should_display:
+ return
+ assert self.ctx.slot is not None
+ indent_str = " " * indent
+ if isinstance(element, SC2Race):
+ self.formatted_print(f" [u]{name}[/u] ")
+ for child in child_states:
+ display_tree(*child[:4])
+ elif isinstance(element, str):
+ ColouredMessage(indent_str)("- ").coloured(name, "white").send(self.ctx)
+ for child in child_states:
+ display_tree(*child[:4], indent=indent+2)
+ elif isinstance(element, int):
+ items = items_received.get(element, [])
+ if not items:
+ ColouredMessage(indent_str)("- ").coloured(name, "red")(" - not obtained").send(self.ctx)
+ for item in items:
+ (ColouredMessage(indent_str)('- ')
+ .item(item.item, self.ctx.slot, flags=item.flags)
+ (" from ").location(item.location, item.player)
+ (" by ").player(item.player)
+ ).send(self.ctx)
+ for child in child_states:
+ display_tree(*child[:4], indent=indent+2)
+ non_matching_descendents = sum(child[5] - child[4] for child in children)
+ if non_matching_descendents > 0:
+ self.formatted_print(f"{indent_str} + {non_matching_descendents} child items that don't match the filter")
+
+
+ item_types_obtained = 0
+ items_obtained_matching_filter = 0
+ for faction in SC2Race:
+ should_display, name, element, children, faction_items_obtained, faction_items_matching_filter = display_info(faction)
+ item_types_obtained += faction_items_obtained
+ items_obtained_matching_filter += faction_items_matching_filter
+ display_tree(should_display, name, element, children)
+ if filter_search == "":
+ self.formatted_print(f"[b]Obtained: {len(self.ctx.items_received)} items ({item_types_obtained} types)[/b]")
+ else:
+ self.formatted_print(f"[b]Filter \"{filter_search}\" found {items_obtained_matching_filter} out of {item_types_obtained} obtained item types[/b]")
+ return True
+
+ def _received_recent(self, amount: str) -> bool:
+ assert self.ctx.slot is not None
+ try:
+ display_amount = int(amount)
+ except ValueError:
+ display_amount = 20
+ display_amount = min(display_amount, len(self.ctx.items_received))
+ self.formatted_print(f"Last {display_amount} of {len(self.ctx.items_received)} items received (most recent last):")
+ for item in self.ctx.items_received[-display_amount:]:
+ (
+ ColouredMessage()
+ .item(item.item, self.ctx.slot, item.flags)
+ (" from ").location(item.location, item.player)
+ (" by ").player(item.player)
+ ).send(self.ctx)
+ return True
+
+ def _cmd_option(self, option_name: str = "", option_value: str = "") -> None:
+ """Sets a Starcraft game option that can be changed after generation. Use "/option list" to see all options."""
+
+ LOGIC_WARNING = " *Note changing this may result in logically unbeatable games*\n"
+
+ configurable_options = (
+ ConfigurableOptionInfo('speed', 'game_speed', options.GameSpeed),
+ ConfigurableOptionInfo('kerrigan_presence', 'kerrigan_presence', options.KerriganPresence, can_break_logic=True),
+ ConfigurableOptionInfo('kerrigan_level_cap', 'kerrigan_total_level_cap', options.KerriganTotalLevelCap, ConfigurableOptionType.INTEGER, can_break_logic=True),
+ ConfigurableOptionInfo('kerrigan_mission_level_cap', 'kerrigan_levels_per_mission_completed_cap', options.KerriganLevelsPerMissionCompletedCap, ConfigurableOptionType.INTEGER),
+ ConfigurableOptionInfo('kerrigan_levels_per_mission', 'kerrigan_levels_per_mission_completed', options.KerriganLevelsPerMissionCompleted, ConfigurableOptionType.INTEGER),
+ ConfigurableOptionInfo('grant_story_levels', 'grant_story_levels', options.GrantStoryLevels, can_break_logic=True),
+ ConfigurableOptionInfo('grant_story_tech', 'grant_story_tech', options.GrantStoryTech, can_break_logic=True),
+ ConfigurableOptionInfo('control_ally', 'take_over_ai_allies', options.TakeOverAIAllies, can_break_logic=True),
+ ConfigurableOptionInfo('soa_presence', 'spear_of_adun_presence', options.SpearOfAdunPresence, can_break_logic=True),
+ ConfigurableOptionInfo('soa_in_nobuilds', 'spear_of_adun_present_in_no_build', options.SpearOfAdunPresentInNoBuild, can_break_logic=True),
+ # Note(mm): Technically SOA passive presence is in the logic for Amon's Fall if Takeover AI Allies is true,
+ # but that's edge case enough I don't think we should warn about it.
+ ConfigurableOptionInfo('soa_passive_presence', 'spear_of_adun_passive_ability_presence', options.SpearOfAdunPassiveAbilityPresence),
+ ConfigurableOptionInfo('soa_passives_in_nobuilds', 'spear_of_adun_passive_present_in_no_build', options.SpearOfAdunPassivesPresentInNoBuild),
+ ConfigurableOptionInfo('max_upgrade_level', 'max_upgrade_level', options.MaxUpgradeLevel, ConfigurableOptionType.INTEGER),
+ ConfigurableOptionInfo('generic_upgrade_research', 'generic_upgrade_research', options.GenericUpgradeResearch),
+ ConfigurableOptionInfo('generic_upgrade_research_speedup', 'generic_upgrade_research_speedup', options.GenericUpgradeResearchSpeedup),
+ ConfigurableOptionInfo('minerals_per_item', 'minerals_per_item', options.MineralsPerItem, ConfigurableOptionType.INTEGER),
+ ConfigurableOptionInfo('gas_per_item', 'vespene_per_item', options.VespenePerItem, ConfigurableOptionType.INTEGER),
+ ConfigurableOptionInfo('supply_per_item', 'starting_supply_per_item', options.StartingSupplyPerItem, ConfigurableOptionType.INTEGER),
+ ConfigurableOptionInfo('max_supply_per_item', 'maximum_supply_per_item', options.MaximumSupplyPerItem, ConfigurableOptionType.INTEGER),
+ ConfigurableOptionInfo('reduced_supply_per_item', 'maximum_supply_reduction_per_item', options.MaximumSupplyReductionPerItem, ConfigurableOptionType.INTEGER),
+ ConfigurableOptionInfo('lowest_max_supply', 'lowest_maximum_supply', options.LowestMaximumSupply, ConfigurableOptionType.INTEGER),
+ ConfigurableOptionInfo('research_cost_per_item', 'research_cost_reduction_per_item', options.ResearchCostReductionPerItem, ConfigurableOptionType.INTEGER),
+ ConfigurableOptionInfo('no_forced_camera', 'disable_forced_camera', options.DisableForcedCamera),
+ ConfigurableOptionInfo('skip_cutscenes', 'skip_cutscenes', options.SkipCutscenes),
+ ConfigurableOptionInfo('enable_morphling', 'enable_morphling', options.EnableMorphling, can_break_logic=True),
+ ConfigurableOptionInfo('difficulty_damage_modifier', 'difficulty_damage_modifier', options.DifficultyDamageModifier),
+ ConfigurableOptionInfo('void_trade_age_limit', 'trade_age_limit', options.VoidTradeAgeLimit),
+ ConfigurableOptionInfo('void_trade_workers', 'trade_workers_allowed', options.VoidTradeWorkers),
+ ConfigurableOptionInfo('mercenary_highlanders', 'mercenary_highlanders', options.MercenaryHighlanders),
+ )
+
+ WARNING_COLOUR = "salmon"
+ CMD_COLOUR = "slateblue"
+ boolean_option_map = {
+ 'y': 'true', 'yes': 'true', 'n': 'false', 'no': 'false', 'true': 'true', 'false': 'false',
+ }
+
+ help_message = ColouredMessage(inspect.cleandoc("""
+ Options
+ --------------------
+ """))('\n')
+ for option in configurable_options:
+ option_help_text = inspect.cleandoc(option.option_class.__doc__ or "No description provided.").split('\n', 1)[0]
+ help_message.coloured(option.name, CMD_COLOUR)(": " + " | ".join(option.option_class.options)
+ + f" -- {option_help_text}\n")
+ if option.can_break_logic:
+ help_message.coloured(LOGIC_WARNING, WARNING_COLOUR)
+ help_message("--------------------\nEnter an option without arguments to see its current value.\n")
+
+ if not option_name or option_name == 'list' or option_name == 'help':
+ help_message.send(self.ctx)
+ return
+ for option in configurable_options:
+ if option_name == option.name:
+ option_value = boolean_option_map.get(option_value.lower(), option_value)
+ if not option_value:
+ pass
+ elif option.option_type == ConfigurableOptionType.ENUM and option_value in option.option_class.options:
+ self.ctx.__dict__[option.variable_name] = option.option_class.options[option_value]
+ elif option.option_type == ConfigurableOptionType.INTEGER:
+ try:
+ self.ctx.__dict__[option.variable_name] = int(option_value, base=0)
+ except:
+ self.output(f"{option_value} is not a valid integer")
+ else:
+ self.output(f"Unknown option value '{option_value}'")
+ ColouredMessage(f"{option.name} is '{option.option_class.get_option_name(self.ctx.__dict__[option.variable_name])}'").send(self.ctx)
+ break
+ else:
+ self.output(f"Unknown option '{option_name}'")
+ help_message.send(self.ctx)
+
+ def _cmd_color(self, faction: str = "", color: str = "") -> None:
+ """Changes the player color for a given faction."""
+ player_colors = [
+ "White", "Red", "Blue", "Teal",
+ "Purple", "Yellow", "Orange", "Green",
+ "LightPink", "Violet", "LightGrey", "DarkGreen",
+ "Brown", "LightGreen", "DarkGrey", "Pink",
+ "Rainbow", "Mengsk", "BrightLime", "Arcane", "Ember", "HotPink",
+ "Random", "Default"
+ ]
+ var_names = {
+ 'raynor': 'player_color_raynor',
+ 'kerrigan': 'player_color_zerg',
+ 'primal': 'player_color_zerg_primal',
+ 'protoss': 'player_color_protoss',
+ 'nova': 'player_color_nova',
+ }
+ faction = faction.lower()
+ if not faction:
+ for faction_name, key in var_names.items():
+ self.output(f"Current player color for {faction_name}: {player_colors[self.ctx.__dict__[key]]}")
+ self.output("To change your color, add the faction name and color after the command.")
+ self.output("Available factions: " + ', '.join(var_names))
+ self.output("Available colors: " + ', '.join(player_colors))
+ return
+ elif faction not in var_names:
+ self.output(f"Unknown faction '{faction}'.")
+ self.output("Available factions: " + ', '.join(var_names))
+ return
+ match_colors = [player_color.lower() for player_color in player_colors]
+ if not color:
+ self.output(f"Current player color for {faction}: {player_colors[self.ctx.__dict__[var_names[faction]]]}")
+ self.output("To change this faction's colors, add the name of the color after the command.")
+ self.output("Available colors: " + ', '.join(player_colors))
+ else:
+ if color.lower() not in match_colors:
+ self.output(color + " is not a valid color. Available colors: " + ', '.join(player_colors))
+ return
+ if color.lower() == "random":
+ color = random.choice(player_colors[:-2])
+ self.ctx.__dict__[var_names[faction]] = match_colors.index(color.lower())
+ self.ctx.pending_color_update = True
+ self.output(f"Color for {faction} set to " + player_colors[self.ctx.__dict__[var_names[faction]]])
+
+ def _cmd_windowed_mode(self, value="") -> None:
+ """Controls whether sc2 will launch in Windowed mode. Persists across sessions."""
+ if not value:
+ sc2_logger.info("Use `/windowed_mode [true|false]` to set the windowed mode")
+ elif value.casefold() in ('t', 'true', 'yes', 'y'):
+ SC2World.settings.game_windowed_mode = True
+ force_settings_save_on_close()
+ else:
+ SC2World.settings.game_windowed_mode = False
+ force_settings_save_on_close()
+ sc2_logger.info(f"Windowed mode is: {SC2World.settings.game_windowed_mode}")
+
+ def _cmd_disable_mission_check(self) -> bool:
+ """Disables the check to see if a mission is available to play. Meant for co-op runs where one player can play
+ the next mission in a chain the other player is doing."""
+ self.ctx.missions_unlocked = True
+ sc2_logger.info("Mission check has been disabled")
+ return True
+
+ @mark_raw
+ def _cmd_set_path(self, path: str = '') -> bool:
+ """Manually set the SC2 install directory (if the automatic detection fails)."""
+ if path:
+ os.environ["SC2PATH"] = path
+ is_mod_installed_correctly()
+ return True
+ else:
+ sc2_logger.warning("When using set_path, you must type the path to your SC2 install directory.")
+ return False
+
+ def _cmd_download_data(self) -> bool:
+ """Download the most recent release of the necessary files for playing SC2 with
+ Archipelago. Will overwrite existing files."""
+ pool.submit(self._download_data, self.ctx)
+ return True
+
+ @staticmethod
+ def _download_data(ctx: SC2Context) -> bool:
+ if "SC2PATH" not in os.environ:
+ check_game_install_path()
+
+ if os.path.exists(get_metadata_file()):
+ with open(get_metadata_file(), "r") as f:
+ metadata = f.read()
+ else:
+ metadata = None
+
+ tempzip, metadata = download_latest_release_zip(
+ DATA_REPO_OWNER, DATA_REPO_NAME, DATA_API_VERSION, metadata=metadata, force_download=True)
+
+ if tempzip:
+ try:
+ zipfile.ZipFile(tempzip).extractall(path=os.environ["SC2PATH"])
+ sc2_logger.info("Download complete. Package installed.")
+ if metadata is not None:
+ with open(get_metadata_file(), "w") as f:
+ f.write(metadata)
+ finally:
+ os.remove(tempzip)
+ else:
+ sc2_logger.warning("Download aborted/failed. Read the log for more information.")
+ return False
+ ctx.data_out_of_date = False
+ return True
+
+
+class SC2JSONtoTextParser(JSONtoTextParser):
+ def __init__(self, ctx: SC2Context) -> None:
+ self.handlers = {
+ "ItemSend": self._handle_color,
+ "ItemCheat": self._handle_color,
+ "Hint": self._handle_color,
+ }
+ super().__init__(ctx)
+
+ def _handle_color(self, node: JSONMessagePart) -> str:
+ codes = node["color"].split(";")
+ buffer = "".join(self.color_code(code) for code in codes if code in self.color_codes)
+ return buffer + self._handle_text(node) + ''
+
+ def _handle_item_name(self, node: JSONMessagePart) -> str:
+ if self.ctx.slot_info[node["player"]].game == STARCRAFT2:
+ annotation = ITEM_NAME_ANNOTATIONS.get(node["text"])
+ if annotation is not None:
+ node["text"] += f" {annotation}"
+ return super()._handle_item_name(node)
+
+ def color_code(self, code: str) -> str:
+ return ''
+
+
+class SC2Context(CommonContext):
+ command_processor = StarcraftClientProcessor
+ game = STARCRAFT2
+ items_handling = 0b111
+
+ def __init__(self, *args, **kwargs) -> None:
+ super(SC2Context, self).__init__(*args, **kwargs)
+ self.raw_text_parser = SC2JSONtoTextParser(self)
+
+ self.data_out_of_date: bool = False
+ self.difficulty = -1
+ self.game_speed = -1
+ self.disable_forced_camera = 0
+ self.skip_cutscenes = 0
+ self.all_in_choice = 0
+ self.mission_order = 0
+ self.player_color_raynor = ColorChoice.option_blue
+ self.player_color_zerg = ColorChoice.option_orange
+ self.player_color_zerg_primal = ColorChoice.option_purple
+ self.player_color_protoss = ColorChoice.option_blue
+ self.player_color_nova = ColorChoice.option_dark_grey
+ self.pending_color_update = False
+ self.kerrigan_presence: int = KerriganPresence.default
+ self.kerrigan_primal_status = 0
+ self.enable_morphling = EnableMorphling.default
+ self.custom_mission_order: typing.List[CampaignSlotData] = []
+ self.mission_id_to_entry_rules: typing.Dict[int, MissionEntryRules]
+ self.final_mission_ids: typing.List[int] = [29]
+ self.final_locations: typing.List[int] = []
+ self.announcements: queue.Queue = queue.Queue()
+ self.sc2_run_task: typing.Optional[asyncio.Task] = None
+ self.missions_unlocked: bool = False # allow launching missions ignoring requirements
+ self.max_upgrade_level: int = MaxUpgradeLevel.default
+ self.generic_upgrade_missions = 0
+ self.generic_upgrade_research = 0
+ self.generic_upgrade_research_speedup: int = GenericUpgradeResearchSpeedup.default
+ self.generic_upgrade_items = 0
+ self.location_inclusions: typing.Dict[LocationType, int] = {}
+ self.location_inclusions_by_flag: typing.Dict[LocationFlag, int] = {}
+ self.plando_locations: typing.List[str] = []
+ self.difficulty_override = -1
+ self.game_speed_override = -1
+ self.mission_id_to_location_ids: typing.Dict[int, typing.List[int]] = {}
+ self.last_bot: typing.Optional[ArchipelagoBot] = None
+ self.slot_data_version = 2
+ self.required_tactics: int = RequiredTactics.default
+ self.grant_story_tech: int = GrantStoryTech.default
+ self.grant_story_levels: int = GrantStoryLevels.default
+ self.take_over_ai_allies: int = TakeOverAIAllies.default
+ self.spear_of_adun_presence = SpearOfAdunPresence.option_not_present
+ self.spear_of_adun_present_in_no_build = SpearOfAdunPresentInNoBuild.option_false
+ self.spear_of_adun_passive_ability_presence = SpearOfAdunPassiveAbilityPresence.option_not_present
+ self.spear_of_adun_passive_present_in_no_build = SpearOfAdunPassivesPresentInNoBuild.option_false
+ self.minerals_per_item: int = 15 # For backwards compat with games generated pre-0.4.5
+ self.vespene_per_item: int = 15 # For backwards compat with games generated pre-0.4.5
+ self.starting_supply_per_item: int = 2 # For backwards compat with games generated pre-0.4.5
+ self.maximum_supply_per_item: int = 2
+ self.maximum_supply_reduction_per_item: int = options.MaximumSupplyReductionPerItem.default
+ self.lowest_maximum_supply: int = options.LowestMaximumSupply.default
+ self.research_cost_reduction_per_item: int = options.ResearchCostReductionPerItem.default
+ self.use_nova_wol_fallback: bool = False
+ self.use_nova_nco_fallback: bool = False
+ self.mercenary_highlanders: bool = False
+ self.kerrigan_levels_per_mission_completed = 0
+ self.trade_enabled: int = EnableVoidTrade.default
+ self.trade_age_limit: int = VoidTradeAgeLimit.default
+ self.trade_workers_allowed: int = VoidTradeWorkers.default
+ self.trade_underway: bool = False
+ self.trade_latest_reply: typing.Optional[dict] = None
+ self.trade_reply_event = asyncio.Event()
+ self.trade_lock_wait: int = 0
+ self.trade_lock_start: typing.Optional[float] = None
+ self.trade_response: typing.Optional[str] = None
+ self.difficulty_damage_modifier: int = DifficultyDamageModifier.default
+ self.mission_order_scouting = MissionOrderScouting.option_none
+ self.mission_item_classification: typing.Optional[typing.Dict[str, int]] = None
+ self.war_council_nerfs: bool = False
+
+ async def server_auth(self, password_requested: bool = False) -> None:
+ self.game = STARCRAFT2
+ if password_requested and not self.password:
+ await super(SC2Context, self).server_auth(password_requested)
+ await self.get_username()
+ await self.send_connect()
+ if self.ui:
+ self.ui.first_check = True
+
+ def is_legacy_game(self):
+ return self.game == STARCRAFT2_WOL
+
+ def event_invalid_game(self):
+ if self.is_legacy_game():
+ self.game = STARCRAFT2
+ super().event_invalid_game()
+ else:
+ self.game = STARCRAFT2_WOL
+ async_start(self.send_connect())
+
+ def trade_storage_team(self) -> str:
+ return f"{TRADE_DATASTORAGE_TEAM}{self.team}"
+
+ def trade_storage_slot(self) -> str:
+ return f"{TRADE_DATASTORAGE_SLOT}{self.slot}"
+
+ def _apply_host_settings_to_options(self) -> None:
+ if str(SC2World.settings.game_difficulty).casefold() == 'casual':
+ self.difficulty = GameDifficulty.option_casual
+ elif str(SC2World.settings.game_difficulty).casefold() == 'normal':
+ self.difficulty = GameDifficulty.option_normal
+ elif str(SC2World.settings.game_difficulty).casefold() == 'hard':
+ self.difficulty = GameDifficulty.option_hard
+ elif str(SC2World.settings.game_difficulty).casefold() == 'brutal':
+ self.difficulty = GameDifficulty.option_brutal
+
+ if str(SC2World.settings.game_speed).casefold() == 'slower':
+ self.game_speed = GameSpeed.option_slower
+ elif str(SC2World.settings.game_speed).casefold() == 'slow':
+ self.game_speed = GameSpeed.option_slow
+ elif str(SC2World.settings.game_speed).casefold() == 'normal':
+ self.game_speed = GameSpeed.option_normal
+ elif str(SC2World.settings.game_speed).casefold() == 'fast':
+ self.game_speed = GameSpeed.option_fast
+ elif str(SC2World.settings.game_speed).casefold() == 'faster':
+ self.game_speed = GameSpeed.option_faster
+
+ if str(SC2World.settings.disable_forced_camera).casefold() == 'true':
+ self.disable_forced_camera = DisableForcedCamera.option_true
+ elif str(SC2World.settings.disable_forced_camera).casefold() == 'false':
+ self.disable_forced_camera = DisableForcedCamera.option_false
+
+ if str(SC2World.settings.skip_cutscenes).casefold() == 'true':
+ self.skip_cutscenes = SkipCutscenes.option_true
+ elif str(SC2World.settings.skip_cutscenes).casefold() == 'false':
+ self.skip_cutscenes = SkipCutscenes.option_false
+
+ def on_package(self, cmd: str, args: dict) -> None:
+ if cmd == "Connected":
+ # Set up the trade storage
+ async_start(self.send_msgs([
+ { # We want to know about other clients' Set commands for locking
+ "cmd": "SetNotify",
+ "keys": [self.trade_storage_team()],
+ },
+ {
+ "cmd": "Set",
+ "key": self.trade_storage_team(),
+ "default": { TRADE_DATASTORAGE_LOCK: 0 },
+ "operations": [{"operation": "default", "value": None}] # value is ignored
+ }
+ ]))
+
+ self.difficulty = args["slot_data"]["game_difficulty"]
+ self.game_speed = args["slot_data"].get("game_speed", GameSpeed.option_default)
+ self.disable_forced_camera = args["slot_data"].get("disable_forced_camera", DisableForcedCamera.default)
+ self.skip_cutscenes = args["slot_data"].get("skip_cutscenes", SkipCutscenes.default)
+ self.all_in_choice = args["slot_data"]["all_in_map"]
+ self.slot_data_version = args["slot_data"].get("version", 2)
+
+ self._apply_host_settings_to_options()
+
+ if self.slot_data_version < 4:
+ # Maintaining backwards compatibility with older slot data
+ slot_req_table: dict = args["slot_data"]["mission_req"]
+
+ first_item = list(slot_req_table.keys())[0]
+ if first_item in [str(campaign.id) for campaign in SC2Campaign]:
+ # Multi-campaign
+ mission_req_table = {}
+ for campaign_id in slot_req_table:
+ campaign = lookup_id_to_campaign[int(campaign_id)]
+ mission_req_table[campaign] = {
+ mission: self.parse_mission_info(mission_info)
+ for mission, mission_info in slot_req_table[campaign_id].items()
+ }
+ else:
+ # Old format
+ mission_req_table = {SC2Campaign.GLOBAL: {
+ mission: self.parse_mission_info(mission_info)
+ for mission, mission_info in slot_req_table.items()
+ }
+ }
+
+ self.custom_mission_order = self.parse_mission_req_table(mission_req_table)
+
+ if self.slot_data_version >= 4:
+ self.custom_mission_order = [
+ CampaignSlotData(
+ **{field:value for field, value in campaign_data.items() if field not in ["layouts", "entry_rule"]},
+ entry_rule = SubRuleRuleData.parse_from_dict(campaign_data["entry_rule"]),
+ layouts = [
+ LayoutSlotData(
+ **{field:value for field, value in layout_data.items() if field not in ["missions", "entry_rule"]},
+ entry_rule = SubRuleRuleData.parse_from_dict(layout_data["entry_rule"]),
+ missions = [
+ [
+ MissionSlotData(
+ **{field:value for field, value in mission_data.items() if field != "entry_rule"},
+ entry_rule = SubRuleRuleData.parse_from_dict(mission_data["entry_rule"])
+ ) for mission_data in column
+ ] for column in layout_data["missions"]
+ ]
+ ) for layout_data in campaign_data["layouts"]
+ ]
+ ) for campaign_data in args["slot_data"]["custom_mission_order"]
+ ]
+ self.mission_id_to_entry_rules = {
+ mission.mission_id: MissionEntryRules(mission.entry_rule, layout.entry_rule, campaign.entry_rule)
+ for campaign in self.custom_mission_order for layout in campaign.layouts
+ for column in layout.missions for mission in column
+ }
+
+ self.mission_order = args["slot_data"].get("mission_order", MissionOrder.option_vanilla)
+ if self.slot_data_version < 4:
+ self.final_mission_ids = [args["slot_data"].get("final_mission", SC2Mission.ALL_IN.id)]
+ else:
+ self.final_mission_ids = args["slot_data"].get("final_mission_ids", [SC2Mission.ALL_IN.id])
+ self.final_locations = [get_location_id(mission_id, 0) for mission_id in self.final_mission_ids]
+
+ self.player_color_raynor = _remap_color_option(
+ self.slot_data_version,
+ args["slot_data"].get("player_color_terran_raynor", ColorChoice.option_blue)
+ )
+ self.player_color_zerg = _remap_color_option(
+ self.slot_data_version,
+ args["slot_data"].get("player_color_zerg", ColorChoice.option_orange)
+ )
+ self.player_color_zerg_primal = _remap_color_option(
+ self.slot_data_version,
+ args["slot_data"].get("player_color_zerg_primal", ColorChoice.option_purple)
+ )
+ self.player_color_protoss = _remap_color_option(
+ self.slot_data_version,
+ args["slot_data"].get("player_color_protoss", ColorChoice.option_blue)
+ )
+ self.player_color_nova = _remap_color_option(
+ self.slot_data_version,
+ args["slot_data"].get("player_color_nova", ColorChoice.option_dark_grey)
+ )
+ self.war_council_nerfs = args["slot_data"].get("war_council_nerfs", WarCouncilNerfs.option_false)
+ self.mercenary_highlanders = args["slot_data"].get("mercenary_highlanders", MercenaryHighlanders.option_false)
+ self.generic_upgrade_missions = args["slot_data"].get("generic_upgrade_missions", GenericUpgradeMissions.default)
+ self.max_upgrade_level = args["slot_data"].get("max_upgrade_level", MaxUpgradeLevel.default)
+ self.generic_upgrade_items = args["slot_data"].get("generic_upgrade_items", GenericUpgradeItems.option_individual_items)
+ self.generic_upgrade_research = args["slot_data"].get("generic_upgrade_research", GenericUpgradeResearch.option_vanilla)
+ self.generic_upgrade_research_speedup = args["slot_data"].get("generic_upgrade_research_speedup", GenericUpgradeResearchSpeedup.default)
+ self.kerrigan_presence = args["slot_data"].get("kerrigan_presence", KerriganPresence.option_vanilla)
+ self.kerrigan_primal_status = args["slot_data"].get("kerrigan_primal_status", KerriganPrimalStatus.option_vanilla)
+ self.kerrigan_levels_per_mission_completed = args["slot_data"].get("kerrigan_levels_per_mission_completed", 0)
+ self.kerrigan_levels_per_mission_completed_cap = args["slot_data"].get("kerrigan_levels_per_mission_completed_cap", -1)
+ self.kerrigan_total_level_cap = args["slot_data"].get("kerrigan_total_level_cap", -1)
+ self.enable_morphling = args["slot_data"].get("enable_morphling", EnableMorphling.option_false)
+ self.grant_story_tech = args["slot_data"].get("grant_story_tech", GrantStoryTech.option_no_grant)
+ self.grant_story_levels = args["slot_data"].get("grant_story_levels", GrantStoryLevels.option_additive)
+ self.required_tactics = args["slot_data"].get("required_tactics", RequiredTactics.option_standard)
+ self.take_over_ai_allies = args["slot_data"].get("take_over_ai_allies", TakeOverAIAllies.option_false)
+ self.spear_of_adun_presence = args["slot_data"].get("spear_of_adun_presence", SpearOfAdunPresence.option_not_present)
+ self.spear_of_adun_present_in_no_build = args["slot_data"].get("spear_of_adun_present_in_no_build", SpearOfAdunPresentInNoBuild.option_false)
+ if self.slot_data_version < 4:
+ self.spear_of_adun_passive_ability_presence = args["slot_data"].get("spear_of_adun_autonomously_cast_ability_presence", SpearOfAdunPassiveAbilityPresence.option_not_present)
+ self.spear_of_adun_passive_present_in_no_build = args["slot_data"].get("spear_of_adun_autonomously_cast_present_in_no_build", SpearOfAdunPassivesPresentInNoBuild.option_false)
+ else:
+ self.spear_of_adun_passive_ability_presence = args["slot_data"].get("spear_of_adun_passive_ability_presence", SpearOfAdunPassiveAbilityPresence.option_not_present)
+ self.spear_of_adun_passive_present_in_no_build = args["slot_data"].get("spear_of_adun_passive_present_in_no_build", SpearOfAdunPassivesPresentInNoBuild.option_false)
+ self.minerals_per_item = args["slot_data"].get("minerals_per_item", 15)
+ self.vespene_per_item = args["slot_data"].get("vespene_per_item", 15)
+ self.starting_supply_per_item = args["slot_data"].get("starting_supply_per_item", 2)
+ self.maximum_supply_per_item = args["slot_data"].get("maximum_supply_per_item", options.MaximumSupplyPerItem.default)
+ self.maximum_supply_reduction_per_item = args["slot_data"].get("maximum_supply_reduction_per_item", options.MaximumSupplyReductionPerItem.default)
+ self.lowest_maximum_supply = args["slot_data"].get("lowest_maximum_supply", options.LowestMaximumSupply.default)
+ self.research_cost_reduction_per_item = args["slot_data"].get("research_cost_reduction_per_item", options.ResearchCostReductionPerItem.default)
+ self.use_nova_wol_fallback = args["slot_data"].get("use_nova_wol_fallback", True)
+ if self.slot_data_version < 4:
+ self.use_nova_nco_fallback = args["slot_data"].get("nova_covert_ops_only", False) and self.mission_order == MissionOrder.option_vanilla
+ else:
+ self.use_nova_nco_fallback = args["slot_data"].get("use_nova_nco_fallback", False)
+ self.trade_enabled = args["slot_data"].get("enable_void_trade", EnableVoidTrade.option_false)
+ self.trade_age_limit = args["slot_data"].get("void_trade_age_limit", VoidTradeAgeLimit.default)
+ self.trade_workers_allowed = args["slot_data"].get("void_trade_workers", VoidTradeWorkers.default)
+ self.difficulty_damage_modifier = args["slot_data"].get("difficulty_damage_modifier", DifficultyDamageModifier.option_true)
+ self.mission_order_scouting = args["slot_data"].get("mission_order_scouting", MissionOrderScouting.option_none)
+ self.mission_item_classification = args["slot_data"].get("mission_item_classification")
+
+ if self.required_tactics == RequiredTactics.option_no_logic:
+ # Locking Grant Story Tech/Levels if no logic
+ self.grant_story_tech = GrantStoryTech.option_grant
+ self.grant_story_levels = GrantStoryLevels.option_minimum
+
+ self.location_inclusions = {
+ LocationType.VICTORY: LocationInclusion.option_enabled, # Victory checks are always enabled
+ LocationType.VICTORY_CACHE: LocationInclusion.option_enabled, # Victory checks are always enabled
+ LocationType.VANILLA: args["slot_data"].get("vanilla_locations", VanillaLocations.default),
+ LocationType.EXTRA: args["slot_data"].get("extra_locations", ExtraLocations.default),
+ LocationType.CHALLENGE: args["slot_data"].get("challenge_locations", ChallengeLocations.default),
+ LocationType.MASTERY: args["slot_data"].get("mastery_locations", MasteryLocations.default),
+ }
+ self.location_inclusions_by_flag = {
+ LocationFlag.SPEEDRUN: args["slot_data"].get("speedrun_locations", SpeedrunLocations.default),
+ LocationFlag.PREVENTATIVE: args["slot_data"].get("preventative_locations", PreventativeLocations.default),
+ }
+ self.plando_locations = args["slot_data"].get("plando_locations", [])
+
+ self.build_location_to_mission_mapping()
+
+ # Looks for the required maps and mods for SC2. Runs check_game_install_path.
+ maps_present = is_mod_installed_correctly()
+ if os.path.exists(get_metadata_file()):
+ with open(get_metadata_file(), "r") as f:
+ current_ver = f.read()
+ sc2_logger.debug(f"Current version: {current_ver}")
+ if is_mod_update_available(DATA_REPO_OWNER, DATA_REPO_NAME, DATA_API_VERSION, current_ver):
+ (
+ ColouredMessage().coloured("NOTICE: Update for required files found. ", colour="red")
+ ("Run ").coloured("/download_data", colour="slateblue")
+ (" to install.")
+ ).send(self)
+ self.data_out_of_date = True
+ elif maps_present:
+ (
+ ColouredMessage()
+ .coloured("NOTICE: Your map files may be outdated (version number not found). ", colour="red")
+ ("Run ").coloured("/download_data", colour="slateblue")
+ (" to install.")
+ ).send(self)
+ self.data_out_of_date = True
+
+ ColouredMessage("[b]Check the Launcher tab to start playing.[/b]", keep_markup=True).send(self)
+
+ elif cmd == "SetReply":
+ # Currently can only be Void Trade reply
+ self.trade_latest_reply = args
+ self.trade_reply_event.set()
+
+ @staticmethod
+ def parse_mission_info(mission_info: dict[str, typing.Any]) -> MissionInfo:
+ if mission_info.get("id") is not None:
+ mission_info["mission"] = lookup_id_to_mission[mission_info["id"]]
+ elif isinstance(mission_info["mission"], int):
+ mission_info["mission"] = lookup_id_to_mission[mission_info["mission"]]
+
+ return MissionInfo(
+ **{field: value for field, value in mission_info.items() if field in MissionInfo._fields}
+ )
+
+ @staticmethod
+ def parse_mission_req_table(mission_req_table: typing.Dict[SC2Campaign, typing.Dict[typing.Any, MissionInfo]]) -> typing.List[CampaignSlotData]:
+ campaigns: typing.List[typing.Tuple[int, CampaignSlotData]] = []
+ rolling_rule_id = 0
+ for (campaign, campaign_data) in mission_req_table.items():
+ if campaign.campaign_name == "Global":
+ campaign_name = ""
+ else:
+ campaign_name = campaign.campaign_name
+
+ categories: typing.Dict[str, typing.List[MissionSlotData]] = {}
+ for mission in campaign_data.values():
+ if mission.category not in categories:
+ categories[mission.category] = []
+ mission_id = mission.mission.id
+ sub_rules: typing.List[CountMissionsRuleData] = []
+ missions: typing.List[int]
+ if mission.number:
+ amount = mission.number
+ missions = [
+ mission.mission.id
+ for mission in mission_req_table[campaign].values()
+ ]
+ sub_rules.append(CountMissionsRuleData(missions, amount, [campaign_name]))
+ prev_missions: typing.List[int] = []
+ if len(mission.required_world) > 0:
+ missions = []
+ for connection in mission.required_world:
+ if isinstance(connection, dict):
+ required_campaign = {}
+ for camp, camp_data in mission_req_table.items():
+ if camp.id == connection["campaign"]:
+ required_campaign = camp_data
+ break
+ required_mission_id = connection["connect_to"]
+ else:
+ required_campaign = mission_req_table[connection.campaign]
+ required_mission_id = connection.connect_to
+ required_mission = list(required_campaign.values())[required_mission_id - 1]
+ missions.append(required_mission.mission.id)
+ if required_mission.category == mission.category:
+ prev_missions.append(required_mission.mission.id)
+ if mission.or_requirements:
+ amount = 1
+ else:
+ amount = len(missions)
+ sub_rules.append(CountMissionsRuleData(missions, amount, missions))
+ entry_rule = SubRuleRuleData(rolling_rule_id, sub_rules, len(sub_rules))
+ rolling_rule_id += 1
+ categories[mission.category].append(MissionSlotData.legacy(mission_id, prev_missions, entry_rule))
+
+ layouts: typing.List[LayoutSlotData] = []
+ for (layout, mission_slots) in categories.items():
+ if layout.startswith("_"):
+ layout_name = ""
+ else:
+ layout_name = layout
+ layouts.append(LayoutSlotData.legacy(layout_name, [mission_slots]))
+ campaigns.append((campaign.id, CampaignSlotData.legacy(campaign_name, layouts)))
+ return [data for (_, data) in sorted(campaigns)]
+
+
+ def on_print_json(self, args: dict) -> None:
+ # goes to this world
+ if "receiving" in args and self.slot_concerns_self(args["receiving"]):
+ relevant = True
+ # found in this world
+ elif "item" in args and self.slot_concerns_self(args["item"].player):
+ relevant = True
+ # not related
+ else:
+ relevant = False
+
+ if relevant:
+ self.announcements.put(self.raw_text_parser(copy.deepcopy(args["data"])))
+
+ super(SC2Context, self).on_print_json(args)
+
+ def run_gui(self) -> None:
+ from .client_gui import start_gui
+ start_gui(self)
+
+ async def shutdown(self) -> None:
+ await super(SC2Context, self).shutdown()
+ if self.last_bot:
+ self.last_bot.want_close = True
+ # If the client is not set up yet, the game is not done loading and must be force-closed
+ if not hasattr(self.last_bot, "client"):
+ bot.sc2process.kill_switch.kill_all()
+ if self.sc2_run_task:
+ self.sc2_run_task.cancel()
+
+ async def disconnect(self, allow_autoreconnect: bool = False):
+ self.finished_game = False
+ await super(SC2Context, self).disconnect(allow_autoreconnect=allow_autoreconnect)
+
+ def play_mission(self, mission_id: int) -> bool:
+ if self.missions_unlocked or is_mission_available(self, mission_id):
+ if self.sc2_run_task:
+ if not self.sc2_run_task.done():
+ sc2_logger.warning("Starcraft 2 Client is still running!")
+ self.sc2_run_task.cancel() # doesn't actually close the game, just stops the python task
+ if self.slot is None:
+ sc2_logger.warning("Launching Mission without Archipelago authentication, "
+ "checks will not be registered to server.")
+ self.sc2_run_task = asyncio.create_task(starcraft_launch(self, mission_id),
+ name="Starcraft 2 Launch")
+ return True
+ else:
+ sc2_logger.info(f"{lookup_id_to_mission[mission_id].mission_name} is not currently unlocked.")
+ return False
+
+ def build_location_to_mission_mapping(self) -> None:
+ mission_id_to_location_ids: typing.Dict[int, typing.Set[int]] = {
+ mission.mission_id: set()
+ for campaign in self.custom_mission_order for layout in campaign.layouts
+ for column in layout.missions for mission in column
+ }
+
+ for loc in self.server_locations:
+ offset = (
+ SC2WOL_LOC_ID_OFFSET
+ if loc < SC2HOTS_LOC_ID_OFFSET
+ else (SC2HOTS_LOC_ID_OFFSET - SC2Mission.ALL_IN.id * VICTORY_MODULO)
+ )
+ mission_id, objective = divmod(loc - offset, VICTORY_MODULO)
+ mission_id_to_location_ids[mission_id].add(objective)
+ self.mission_id_to_location_ids = {
+ mission_id: sorted(objectives)
+ for mission_id, objectives in mission_id_to_location_ids.items()
+ }
+
+ def locations_for_mission(self, mission: SC2Mission) -> typing.Iterable[int]:
+ mission_id: int = mission.id
+ objectives = self.mission_id_to_location_ids[mission_id]
+ for objective in objectives:
+ yield get_location_id(mission_id, objective)
+
+ def locations_for_mission_id(self, mission_id: int) -> typing.Iterable[int]:
+ objectives = self.mission_id_to_location_ids[mission_id]
+ for objective in objectives:
+ yield get_location_id(mission_id, objective)
+
+ def uncollected_locations_in_mission(self, mission: SC2Mission) -> typing.Iterable[int]:
+ for location_id in self.locations_for_mission(mission):
+ if location_id in self.missing_locations:
+ yield location_id
+
+ def is_mission_completed(self, mission_id: int) -> bool:
+ return get_location_id(mission_id, 0) in self.checked_locations
+
+
+ async def trade_acquire_storage(self, keep_trying: bool = False) -> typing.Optional[dict]:
+ # This function was largely taken from the Pokemon Emerald client
+ """
+ Acquires a lock on the Void Trade DataStorage.
+ Locking the key means you have exclusive access
+ to modifying the value until you unlock it or the key expires (5 seconds).
+
+ If `keep_trying` is `True`, it will keep trying to acquire the lock
+ until successful. Otherwise it will return `None` if it fails to
+ acquire the lock.
+ """
+ while not self.exit_event.is_set() and self.last_bot and self.last_bot.game_running:
+ lock = int(time.time_ns() / 1000000000) # in seconds
+
+ # Make sure we're not past the waiting limit
+ # SC2 needs to be notified within 10 minutes of game time (training time of the dummy units)
+ if self.trade_lock_start is not None:
+ if self.last_bot.time - self.trade_lock_start >= TRADE_LOCK_WAIT_LIMIT:
+ self.trade_lock_wait = 0
+ self.trade_lock_start = None
+ return None
+ elif keep_trying:
+ self.trade_lock_start = self.last_bot.time
+
+ message_uuid = str(uuid.uuid4())
+ await self.send_msgs([{
+ "cmd": "Set",
+ "key": self.trade_storage_team(),
+ "default": { TRADE_DATASTORAGE_LOCK: 0 },
+ "want_reply": True,
+ "operations": [{ "operation": "update", "value": { TRADE_DATASTORAGE_LOCK: lock } }],
+ "uuid": message_uuid,
+ }])
+
+ self.trade_reply_event.clear()
+ try:
+ await asyncio.wait_for(self.trade_reply_event.wait(), 5)
+ except asyncio.TimeoutError:
+ if not keep_trying:
+ return None
+ continue
+
+ assert self.trade_latest_reply is not None
+ reply = copy.deepcopy(self.trade_latest_reply)
+
+ # Make sure the most recently received update was triggered by our lock attempt
+ if reply.get("uuid", None) != message_uuid:
+ if not keep_trying:
+ return None
+ await asyncio.sleep(TRADE_LOCK_TIME)
+ continue
+
+ # Make sure the current value of the lock is what we set it to
+ # (I think this should theoretically never run)
+ if reply["value"][TRADE_DATASTORAGE_LOCK] != lock:
+ if not keep_trying:
+ return None
+ await asyncio.sleep(TRADE_LOCK_TIME)
+ continue
+
+ # Make sure that the lock value we replaced is at least 5 seconds old
+ # If it was unlocked before our change, its value was 0 and it will look decades old
+ if lock - reply["original_value"][TRADE_DATASTORAGE_LOCK] < TRADE_LOCK_TIME:
+ if not keep_trying:
+ return None
+
+ # Multiple clients trying to lock the key may get stuck in a loop of checking the lock
+ # by trying to set it, which will extend its expiration. So if we see that the lock was
+ # too new when we replaced it, we should wait for increasingly longer periods so that
+ # eventually the lock will expire and a client will acquire it.
+ self.trade_lock_wait += TRADE_LOCK_TIME
+ self.trade_lock_wait += random.randrange(100, 500) / 1000
+
+ await asyncio.sleep(self.trade_lock_wait)
+ continue
+
+ # We have the lock, reset the waiting period and return
+ self.trade_lock_wait = 0
+ self.trade_lock_start = None
+ return reply
+ return None
+
+
+ async def trade_receive(self, amount: int = 1):
+ """
+ Tries to pop `amount` units out of the trade storage.
+ """
+ reply = await self.trade_acquire_storage(True)
+
+ if reply is None:
+ self.trade_response = "?TradeFail Void Trade failed: Could not communicate with server. Trade cost refunded."
+ return None
+
+ # Find available units
+ # Ignore units we sent ourselves
+ allowed_slots: typing.List[str] = [
+ slot for slot in reply["value"]
+ if slot != TRADE_DATASTORAGE_LOCK \
+ and slot != self.trade_storage_slot()
+ ]
+ # Filter out trades that are too old
+ if self.trade_age_limit != VoidTradeAgeLimit.option_disabled:
+ trade_time = reply["value"][TRADE_DATASTORAGE_LOCK]
+ allowed_age = void_trade_age_limits_ms[self.trade_age_limit]
+ is_young_enough = lambda send_time: trade_time - send_time <= allowed_age
+ else:
+ is_young_enough = lambda _: True
+ # Filter out banned units
+ if self.trade_workers_allowed == VoidTradeWorkers.option_false:
+ is_unit_allowed = lambda unit: unit not in worker_units
+ else:
+ is_unit_allowed = lambda _: True
+
+ available_units: typing.List[typing.Tuple[str, str, int]] = []
+ available_counts: typing.List[int] = []
+ for slot in allowed_slots:
+ for (send_time, units) in reply["value"][slot].items():
+ if is_young_enough(int(send_time)):
+ for (unit, count) in units.items():
+ if is_unit_allowed(str(unit)):
+ available_units.append((unit, slot, send_time))
+ available_counts.append(count)
+
+ # Pick units to receive
+ # If there's not enough units in total, just pick as many as possible
+ # SC2 should handle the refund
+ available = sum(available_counts)
+ refunds = 0
+ if available < amount:
+ refunds = amount - available
+ amount = available
+ if available == 0:
+ # random.sample crashes if counts is an empty list
+ units = []
+ else:
+ units = random.sample(available_units, amount, counts = available_counts)
+
+ # Build response data
+ unit_counts: typing.Dict[str, int] = {}
+ slots_to_update: typing.Dict[str, typing.Dict[int, typing.Dict[str, int]]] = {}
+ for (unit, slot, send_time) in units:
+ unit_counts[unit] = unit_counts.get(unit, 0) + 1
+ if slot not in slots_to_update:
+ slots_to_update[slot] = copy.deepcopy(reply["value"][slot])
+ slots_to_update[slot][send_time][unit] -= 1
+ # Clean up units that were removed completely
+ if slots_to_update[slot][send_time][unit] == 0:
+ slots_to_update[slot][send_time].pop(unit)
+ # Clean up trades that were completely exhausted
+ if len(slots_to_update[slot][send_time]) == 0:
+ slots_to_update[slot].pop(send_time)
+
+ await self.send_msgs([
+ { # Update server storage
+ "cmd": "Set",
+ "key": self.trade_storage_team(),
+ "operations": [{ "operation": "update", "value": slots_to_update }]
+ },
+ { # Release the lock
+ "cmd": "Set",
+ "key": self.trade_storage_team(),
+ "operations": [{ "operation": "update", "value": { TRADE_DATASTORAGE_LOCK: 0 } }]
+ }
+ ])
+
+ # Give units to bot
+ self.trade_response = f"?Trade {refunds} " + " ".join(f"{unit} {count}" for (unit, count) in unit_counts.items())
+
+
+ async def trade_send(self, units: typing.List[str]):
+ """
+ Tries to upload `units` to the trade DataStorage.
+ """
+ reply = await self.trade_acquire_storage(True)
+
+ if reply is None:
+ self.trade_response = "?TradeFail Void Trade failed: Could not communicate with server. Your units remain."
+ return None
+
+ # Create a storage entry for the time the trade was confirmed
+ trade_time = reply["value"][TRADE_DATASTORAGE_LOCK]
+ storage_entry = {}
+ for unit in units:
+ storage_entry[unit] = storage_entry.get(unit, 0) + 1
+
+ # Update the storage with the new units
+ data: typing.Dict[int, typing.Dict[str, int]] = copy.deepcopy(reply["value"].get(self.trade_storage_slot(), {}))
+ data[trade_time] = storage_entry
+
+ await self.send_msgs([
+ { # Send the updated data
+ "cmd": "Set",
+ "key": self.trade_storage_team(),
+ "operations": [{ "operation": "update", "value": { self.trade_storage_slot(): data } }]
+ },
+ { # Release the lock
+ "cmd": "Set",
+ "key": self.trade_storage_team(),
+ "operations": [{ "operation": "update", "value": { TRADE_DATASTORAGE_LOCK: 0 } }]
+ }
+ ])
+
+ # Notify the game
+ self.trade_response = "?TradeSuccess Void Trade successful: Units sent!"
+
+
+class CompatItemHolder(typing.NamedTuple):
+ name: str
+ quantity: int = 1
+
+
+def parse_uri(uri: str) -> str:
+ if "://" in uri:
+ uri = uri.split("://", 1)[1]
+ return uri.split('?', 1)[0]
+
+
+async def main():
+ multiprocessing.freeze_support()
+ parser = get_base_parser()
+ parser.add_argument('--name', default=None, help="Slot Name to connect as.")
+ args, uri = parser.parse_known_args()
+
+ if uri and uri[0].startswith('archipelago://'):
+ args.connect = parse_uri(' '.join(uri))
+
+ ctx = SC2Context(args.connect, args.password)
+ ctx.auth = args.name
+ if ctx.server_task is None:
+ ctx.server_task = asyncio.create_task(server_loop(ctx), name="ServerLoop")
+
+ if gui_enabled:
+ ctx.run_gui()
+ ctx.run_cli()
+
+ await ctx.exit_event.wait()
+
+ await ctx.shutdown()
+
+# These items must be given to the player if the game is generated on older versions
+API2_TO_API3_COMPAT_ITEMS: typing.Set[CompatItemHolder] = {
+ CompatItemHolder(item_names.PHOTON_CANNON),
+ CompatItemHolder(item_names.OBSERVER),
+ CompatItemHolder(item_names.WARP_HARMONIZATION),
+ CompatItemHolder(item_names.PROGRESSIVE_PROTOSS_WEAPON_ARMOR_UPGRADE, 3)
+}
+API3_TO_API4_COMPAT_ITEMS: typing.Set[CompatItemHolder] = {
+ # War Council
+ CompatItemHolder(item_names.ZEALOT_WHIRLWIND),
+ CompatItemHolder(item_names.CENTURION_RESOURCE_EFFICIENCY),
+ CompatItemHolder(item_names.SENTINEL_RESOURCE_EFFICIENCY),
+ CompatItemHolder(item_names.STALKER_PHASE_REACTOR),
+ CompatItemHolder(item_names.DRAGOON_PHALANX_SUIT),
+ CompatItemHolder(item_names.INSTIGATOR_MODERNIZED_SERVOS),
+ CompatItemHolder(item_names.ADEPT_DISRUPTIVE_TRANSFER),
+ CompatItemHolder(item_names.SLAYER_PHASE_BLINK),
+ CompatItemHolder(item_names.AVENGER_KRYHAS_CLOAK),
+ CompatItemHolder(item_names.DARK_TEMPLAR_LESSER_SHADOW_FURY),
+ CompatItemHolder(item_names.DARK_TEMPLAR_GREATER_SHADOW_FURY),
+ CompatItemHolder(item_names.BLOOD_HUNTER_BRUTAL_EFFICIENCY),
+ CompatItemHolder(item_names.SENTRY_DOUBLE_SHIELD_RECHARGE),
+ CompatItemHolder(item_names.ENERGIZER_MOBILE_CHRONO_BEAM),
+ CompatItemHolder(item_names.HAVOC_ENDURING_SIGHT),
+ CompatItemHolder(item_names.HIGH_TEMPLAR_PLASMA_SURGE),
+ CompatItemHolder(item_names.SIGNIFIER_FEEDBACK),
+ CompatItemHolder(item_names.ASCENDANT_BREATH_OF_CREATION),
+ CompatItemHolder(item_names.DARK_ARCHON_INDOMITABLE_WILL),
+ CompatItemHolder(item_names.IMMORTAL_IMPROVED_BARRIER),
+ CompatItemHolder(item_names.VANGUARD_RAPIDFIRE_CANNON),
+ CompatItemHolder(item_names.VANGUARD_FUSION_MORTARS),
+ CompatItemHolder(item_names.ANNIHILATOR_TWILIGHT_CHASSIS),
+ CompatItemHolder(item_names.COLOSSUS_FIRE_LANCE),
+ CompatItemHolder(item_names.WRATHWALKER_AERIAL_TRACKING),
+ CompatItemHolder(item_names.REAVER_KHALAI_REPLICATORS),
+ CompatItemHolder(item_names.PHOENIX_DOUBLE_GRAVITON_BEAM),
+ CompatItemHolder(item_names.CORSAIR_NETWORK_DISRUPTION),
+ CompatItemHolder(item_names.MIRAGE_GRAVITON_BEAM),
+ CompatItemHolder(item_names.VOID_RAY_PRISMATIC_RANGE),
+ CompatItemHolder(item_names.CARRIER_REPAIR_DRONES),
+ CompatItemHolder(item_names.TEMPEST_DISINTEGRATION),
+ CompatItemHolder(item_names.ARBITER_VESSEL_OF_THE_CONCLAVE),
+ CompatItemHolder(item_names.MOTHERSHIP_INTEGRATED_POWER),
+ # Other items
+ CompatItemHolder(item_names.ASCENDANT_ARCHON_MERGE),
+ CompatItemHolder(item_names.DARK_TEMPLAR_ARCHON_MERGE),
+ CompatItemHolder(item_names.SPORE_CRAWLER_BIO_BONUS),
+}
+
+def compat_item_to_network_items(compat_item: CompatItemHolder) -> typing.List[NetworkItem]:
+ item_id = get_full_item_list()[compat_item.name].code
+ network_item = NetworkItem(item_id, 0, 0, 0)
+ return compat_item.quantity * [network_item]
+
+
+def calculate_items(ctx: SC2Context) -> typing.Dict[SC2Race, typing.List[int]]:
+ items = ctx.items_received.copy()
+ item_list = get_full_item_list()
+ def create_network_item(item_name: str) -> NetworkItem:
+ return NetworkItem(item_list[item_name].code, 0, 0, 0)
+
+ # Items unlocked in earlier generator versions by default (Prophecy defaults, war council, rebalances)
+ if ctx.slot_data_version < 3:
+ for compat_item in API2_TO_API3_COMPAT_ITEMS:
+ items.extend(compat_item_to_network_items(compat_item))
+ if ctx.slot_data_version < 4:
+ for compat_item in API3_TO_API4_COMPAT_ITEMS:
+ items.extend(compat_item_to_network_items(compat_item))
+ received_item_ids = set(item.item for item in ctx.items_received)
+ if item_list[item_names.GHOST_RESOURCE_EFFICIENCY].code in received_item_ids:
+ items.append(create_network_item(item_names.GHOST_BARGAIN_BIN_PRICES))
+ if item_list[item_names.SPECTRE_RESOURCE_EFFICIENCY].code in received_item_ids:
+ items.append(create_network_item(item_names.SPECTRE_BARGAIN_BIN_PRICES))
+ if item_list[item_names.ROGUE_FORCES].code in received_item_ids:
+ items.append(create_network_item(item_names.UNRESTRICTED_MUTATION))
+ if item_list[item_names.SCOUT_RESOURCE_EFFICIENCY].code in received_item_ids:
+ items.append(create_network_item(item_names.SCOUT_SUPPLY_EFFICIENCY))
+ if item_list[item_names.REAVER_RESOURCE_EFFICIENCY].code in received_item_ids:
+ items.append(create_network_item(item_names.REAVER_BARGAIN_BIN_PRICES))
+
+ # API < 4 Orbital Command Count (Deprecated item)
+ orbital_command_count: int = 0
+
+ network_item: NetworkItem
+ accumulators: typing.Dict[SC2Race, typing.List[int]] = {
+ race: [0 for element in item_type_enum_class if element.flag_word >= 0]
+ for race, item_type_enum_class in race_to_item_type.items()
+ }
+
+ # Protoss Shield grouped item specific logic
+ shields_from_ground_upgrade: int = 0
+ shields_from_air_upgrade: int = 0
+
+ for network_item in items:
+ name = lookup_id_to_name.get(network_item.item)
+ if name is None:
+ continue
+ item_data: ItemData = item_list[name]
+
+ if item_data.type.flag_word < 0:
+ continue
+
+ # exists exactly once
+ if item_data.quantity == 1 or name in item_name_groups[ItemGroupNames.UNRELEASED_ITEMS]:
+ accumulators[item_data.race][item_data.type.flag_word] |= 1 << item_data.number
+
+ # exists multiple times
+ elif item_data.quantity > 1:
+ flaggroup = item_data.type.flag_word
+
+ # Generic upgrades apply only to Weapon / Armor upgrades
+ if item_data.number >= 0:
+ accumulators[item_data.race][flaggroup] += 1 << item_data.number
+ else:
+ if name == item_names.PROGRESSIVE_PROTOSS_GROUND_UPGRADE:
+ shields_from_ground_upgrade += 1
+ if name == item_names.PROGRESSIVE_PROTOSS_AIR_UPGRADE:
+ shields_from_air_upgrade += 1
+ for bundled_number in get_bundle_upgrade_member_numbers(name):
+ accumulators[item_data.race][flaggroup] += 1 << bundled_number
+
+ # Regen bio-steel nerf with API3 - undo for older games
+ if ctx.slot_data_version < 3 and name == item_names.PROGRESSIVE_REGENERATIVE_BIO_STEEL:
+ current_level = (accumulators[item_data.race][flaggroup] >> item_data.number) % 4
+ if current_level == 2:
+ # Switch from level 2 to level 3 for compatibility
+ accumulators[item_data.race][flaggroup] += 1 << item_data.number
+ # sum
+ # Fillers, deprecated items
+ else:
+ if name == item_names.PROGRESSIVE_ORBITAL_COMMAND:
+ orbital_command_count += 1
+ elif item_data.type == ZergItemType.Level:
+ accumulators[item_data.race][item_data.type.flag_word] += item_data.number
+ elif name == item_names.STARTING_MINERALS:
+ accumulators[item_data.race][item_data.type.flag_word] += ctx.minerals_per_item
+ elif name == item_names.STARTING_VESPENE:
+ accumulators[item_data.race][item_data.type.flag_word] += ctx.vespene_per_item
+ elif name == item_names.STARTING_SUPPLY:
+ accumulators[item_data.race][item_data.type.flag_word] += ctx.starting_supply_per_item
+ elif name == item_names.UPGRADE_RESEARCH_COST:
+ accumulators[item_data.race][item_data.type.flag_word] += ctx.research_cost_reduction_per_item
+ else:
+ accumulators[item_data.race][item_data.type.flag_word] += 1
+
+ # Fix Shields from generic upgrades by unit class (Maximum of ground/air upgrades)
+ if shields_from_ground_upgrade > 0 or shields_from_air_upgrade > 0:
+ shield_upgrade_level = max(shields_from_ground_upgrade, shields_from_air_upgrade)
+ shield_upgrade_item = item_list[item_names.PROGRESSIVE_PROTOSS_SHIELDS]
+ for _ in range(0, shield_upgrade_level):
+ accumulators[shield_upgrade_item.race][shield_upgrade_item.type.flag_word] += 1 << shield_upgrade_item.number
+
+ # Deprecated Orbital Command handling (Backwards compatibility):
+ if orbital_command_count > 0:
+ orbital_command_replacement_items: typing.List[str] = [
+ item_names.COMMAND_CENTER_SCANNER_SWEEP,
+ item_names.COMMAND_CENTER_MULE,
+ item_names.COMMAND_CENTER_EXTRA_SUPPLIES,
+ item_names.PLANETARY_FORTRESS_ORBITAL_MODULE
+ ]
+ replacement_item_ids = [get_full_item_list()[item_name].code for item_name in orbital_command_replacement_items]
+ if sum(item_id in replacement_item_ids for item_id in items) > 0:
+ logger.warning(inspect.cleandoc("""
+ Both old Orbital Command and its replacements are present in the world. Skipping compatibility handling.
+ """))
+ else:
+ # None of replacement items are present
+ # L1: MULE and Scanner Sweep
+ scanner_sweep_data = get_full_item_list()[item_names.COMMAND_CENTER_SCANNER_SWEEP]
+ mule_data = get_full_item_list()[item_names.COMMAND_CENTER_MULE]
+ accumulators[scanner_sweep_data.race][scanner_sweep_data.type.flag_word] += 1 << scanner_sweep_data.number
+ accumulators[mule_data.race][mule_data.type.flag_word] += 1 << mule_data.number
+ if orbital_command_count >= 2:
+ # L2 MULE and Scanner Sweep usable even in Planetary Fortress Mode
+ planetary_orbital_module_data = get_full_item_list()[item_names.PLANETARY_FORTRESS_ORBITAL_MODULE]
+ accumulators[planetary_orbital_module_data.race][planetary_orbital_module_data.type.flag_word] += \
+ 1 << planetary_orbital_module_data.number
+
+ # Upgrades from completed missions
+ if ctx.generic_upgrade_missions > 0:
+ total_missions = sum(len(column) for campaign in ctx.custom_mission_order for layout in campaign.layouts for column in layout.missions)
+ num_missions = int((ctx.generic_upgrade_missions / 100) * total_missions)
+ completed = len([mission_id for mission_id in ctx.mission_id_to_location_ids if ctx.is_mission_completed(mission_id)])
+ upgrade_count = min(completed // num_missions, ctx.max_upgrade_level) if num_missions > 0 else ctx.max_upgrade_level
+ upgrade_count = min(upgrade_count, WEAPON_ARMOR_UPGRADE_MAX_LEVEL)
+
+ # Equivalent to "Progressive Weapon/Armor Upgrade" item
+ global_upgrades: typing.Set[str] = upgrade_included_names[GenericUpgradeItems.option_bundle_all]
+ for global_upgrade in global_upgrades:
+ race = get_full_item_list()[global_upgrade].race
+ upgrade_flaggroup = race_to_item_type[race]["Upgrade"].flag_word
+ for bundled_number in get_bundle_upgrade_member_numbers(global_upgrade):
+ accumulators[race][upgrade_flaggroup] += upgrade_count << bundled_number
+
+ return accumulators
+
+
+def get_bundle_upgrade_member_numbers(bundled_item: str) -> typing.List[int]:
+ upgrade_elements: typing.List[str] = upgrade_bundles[bundled_item]
+ if bundled_item in (item_names.PROGRESSIVE_PROTOSS_GROUND_UPGRADE, item_names.PROGRESSIVE_PROTOSS_AIR_UPGRADE):
+ # Shields are handled as a maximum of those two
+ upgrade_elements = [item_name for item_name in upgrade_elements if item_name != item_names.PROGRESSIVE_PROTOSS_SHIELDS]
+ return [get_full_item_list()[item_name].number for item_name in upgrade_elements]
+
+
+def calc_difficulty(difficulty: int):
+ if difficulty == 0:
+ return 'C'
+ elif difficulty == 1:
+ return 'N'
+ elif difficulty == 2:
+ return 'H'
+ elif difficulty == 3:
+ return 'B'
+
+ return 'X'
+
+
+def get_kerrigan_level(ctx: SC2Context, items: typing.Dict[SC2Race, typing.List[int]], missions_beaten: int) -> int:
+ item_value = items[SC2Race.ZERG][ZergItemType.Level.flag_word]
+ mission_value = missions_beaten * ctx.kerrigan_levels_per_mission_completed
+ if ctx.kerrigan_levels_per_mission_completed_cap != -1:
+ mission_value = min(mission_value, ctx.kerrigan_levels_per_mission_completed_cap)
+ total_value = item_value + mission_value
+ if ctx.kerrigan_total_level_cap != -1:
+ total_value = min(total_value, ctx.kerrigan_total_level_cap)
+ return total_value
+
+
+def calculate_kerrigan_options(ctx: SC2Context) -> int:
+ result = 0
+
+ # Bits 0, 1
+ # Kerrigan unit available
+ if ctx.kerrigan_presence in kerrigan_unit_available:
+ result |= 1 << 0
+
+ # Bit 2
+ # Kerrigan primal status by map
+ if ctx.kerrigan_primal_status == KerriganPrimalStatus.option_vanilla:
+ result |= 1 << 2
+
+ return result
+
+
+def caclulate_soa_options(ctx: SC2Context, mission: SC2Mission) -> int:
+ """
+ Pack SOA options into a single integer with bitflags.
+ 0b000011 = SOA presence
+ 0b000100 = SOA in no-builds
+ 0b011000 = Passives presence
+ 0b100000 = PAssives in no-builds
+ """
+ result = 0
+
+ # Bits 0, 1
+ # SoA Calldowns available
+ soa_presence_value = 0
+ if is_mission_in_soa_presence(ctx.spear_of_adun_presence, mission):
+ soa_presence_value = 3
+ result |= soa_presence_value << 0
+
+ # Bit 2
+ # SoA Calldowns for no-builds
+ if ctx.spear_of_adun_present_in_no_build == SpearOfAdunPresentInNoBuild.option_true:
+ result |= 1 << 2
+
+ # Bits 3,4
+ # Autocasts
+ soa_autocasts_presence_value = 0
+ if is_mission_in_soa_presence(ctx.spear_of_adun_passive_ability_presence, mission, SpearOfAdunPassiveAbilityPresence):
+ soa_autocasts_presence_value = 3
+ # Guardian Shell breaks without SoA on version 4+, but can be generated without SoA on version 3
+ if ctx.slot_data_version < 4 and MissionFlag.Protoss in mission.flags:
+ soa_autocasts_presence_value = 3
+ result |= soa_autocasts_presence_value << 3
+
+ # Bit 5
+ # Autocasts in no-builds
+ if ctx.spear_of_adun_passive_present_in_no_build == SpearOfAdunPassivesPresentInNoBuild.option_true:
+ result |= 1 << 5
+
+ return result
+
+def calculate_generic_upgrade_options(ctx: SC2Context) -> int:
+ result = 0
+
+ # Bits 0,1
+ # Research mode
+ research_mode_value = 0
+ if ctx.generic_upgrade_research == GenericUpgradeResearch.option_vanilla:
+ research_mode_value = 0
+ elif ctx.generic_upgrade_research == GenericUpgradeResearch.option_auto_in_no_build:
+ research_mode_value = 1
+ elif ctx.generic_upgrade_research == GenericUpgradeResearch.option_auto_in_build:
+ research_mode_value = 2
+ elif ctx.generic_upgrade_research == GenericUpgradeResearch.option_always_auto:
+ research_mode_value = 3
+ result |= research_mode_value << 0
+
+ # Bit 2
+ # Speedup
+ if ctx.generic_upgrade_research_speedup == GenericUpgradeResearchSpeedup.option_true:
+ result |= 1 << 2
+
+ return result
+
+def calculate_trade_options(ctx: SC2Context) -> int:
+ result = 0
+
+ # Bit 0
+ # Trade enabled
+ if ctx.trade_enabled:
+ result |= 1 << 0
+
+ # Bit 1
+ # Workers allowed
+ if ctx.trade_workers_allowed == VoidTradeWorkers.option_true:
+ result |= 1 << 1
+
+ return result
+
+def kerrigan_primal(ctx: SC2Context, kerrigan_level: int) -> bool:
+ if ctx.kerrigan_primal_status == KerriganPrimalStatus.option_always_zerg:
+ return True
+ elif ctx.kerrigan_primal_status == KerriganPrimalStatus.option_always_human:
+ return False
+ elif ctx.kerrigan_primal_status == KerriganPrimalStatus.option_level_35:
+ return kerrigan_level >= 35
+ elif ctx.kerrigan_primal_status == KerriganPrimalStatus.option_half_completion:
+ total_missions = len(ctx.mission_id_to_location_ids)
+ completed = sum(ctx.is_mission_completed(mission_id)
+ for mission_id in ctx.mission_id_to_location_ids)
+ return completed >= (total_missions / 2)
+ elif ctx.kerrigan_primal_status == KerriganPrimalStatus.option_item:
+ codes = [item.item for item in ctx.items_received]
+ return get_full_item_list()[item_names.KERRIGAN_PRIMAL_FORM].code in codes
+ return False
+
+
+def get_mission_variant(mission_id: int) -> int:
+ mission_flags = lookup_id_to_mission[mission_id].flags
+ if MissionFlag.RaceSwap not in mission_flags:
+ return 0
+ if MissionFlag.Terran in mission_flags:
+ return 1
+ elif MissionFlag.Zerg in mission_flags:
+ return 2
+ elif MissionFlag.Protoss in mission_flags:
+ return 3
+ return 0
+
+
+def get_item_flag_word(item_name: str) -> int:
+ return get_full_item_list()[item_name].type.flag_word
+
+
+async def starcraft_launch(ctx: SC2Context, mission_id: int):
+ sc2_logger.info(f"Launching {lookup_id_to_mission[mission_id].mission_name}. If game does not launch check log file for errors.")
+
+ with DllDirectory(None):
+ run_game(
+ bot.maps.get(lookup_id_to_mission[mission_id].map_file),
+ [Bot(Race.Terran, ArchipelagoBot(ctx, mission_id), name="Archipelago", fullscreen=not SC2World.settings.game_windowed_mode)],
+ realtime=True,
+ )
+
+
+class ArchipelagoBot(bot.bot_ai.BotAI):
+ __slots__ = [
+ 'game_running',
+ 'mission_completed',
+ 'boni',
+ 'setup_done',
+ 'ctx',
+ 'mission_id',
+ 'want_close',
+ 'can_read_game',
+ 'last_received_update',
+ 'last_trade_cargo',
+ 'last_supply_used'
+ ]
+ ctx: SC2Context
+ # defined in bot_ai_internal.py; seems to be mis-annotated as a float and later re-annotated as an int
+ supply_used: int
+
+ def __init__(self, ctx: SC2Context, mission_id: int):
+ self.game_running = False
+ self.mission_completed = False
+ self.want_close = False
+ self.can_read_game = False
+ self.last_received_update: int = 0
+ self.last_trade_cargo: set = set()
+ self.last_supply_used: int = 0
+ self.trade_reply_cooldown: int = 0
+ self.setup_done = False
+ self.ctx = ctx
+ self.ctx.last_bot = self
+ self.mission_id = mission_id
+ self.boni = [False for _ in range(MAX_BONUS)]
+
+ super(ArchipelagoBot, self).__init__()
+
+ async def on_step(self, iteration: int):
+ if self.want_close:
+ self.want_close = False
+ await self._client.leave()
+ return
+ game_state = 0
+ if not self.setup_done:
+ self.setup_done = True
+ mission = lookup_id_to_mission[self.mission_id]
+ start_items = calculate_items(self.ctx)
+ missions_beaten = self.missions_beaten_count()
+ kerrigan_level = get_kerrigan_level(self.ctx, start_items, missions_beaten)
+ kerrigan_options = calculate_kerrigan_options(self.ctx)
+ soa_options = caclulate_soa_options(self.ctx, mission)
+ generic_upgrade_options = calculate_generic_upgrade_options(self.ctx)
+ trade_options = calculate_trade_options(self.ctx)
+ mission_variant = get_mission_variant(self.mission_id) # 0/1/2/3 for unchanged/Terran/Zerg/Protoss
+ nova_fallback: bool
+ if MissionFlag.Nova in mission.flags:
+ nova_fallback = self.ctx.use_nova_nco_fallback
+ elif MissionFlag.WoLNova in mission.flags:
+ nova_fallback = self.ctx.use_nova_wol_fallback
+ else:
+ nova_fallback = False
+ uncollected_objectives: typing.List[int] = self.get_uncollected_objectives()
+ if self.ctx.difficulty_override >= 0:
+ difficulty = calc_difficulty(self.ctx.difficulty_override)
+ else:
+ difficulty = calc_difficulty(self.ctx.difficulty)
+ if self.ctx.game_speed_override >= 0:
+ game_speed = self.ctx.game_speed_override
+ else:
+ game_speed = self.ctx.game_speed
+ await self.chat_send(
+ "?SetOptions"
+ f" {difficulty}"
+ f" {generic_upgrade_options}"
+ f" {self.ctx.all_in_choice}"
+ f" {game_speed}"
+ f" {self.ctx.disable_forced_camera}"
+ f" {self.ctx.skip_cutscenes}"
+ f" {kerrigan_options}"
+ f" {self.ctx.grant_story_tech}"
+ f" {self.ctx.take_over_ai_allies}"
+ f" {soa_options}"
+ f" {self.ctx.mission_order}"
+ f" {int(nova_fallback)}"
+ f" {self.ctx.grant_story_levels}"
+ f" {self.ctx.enable_morphling}"
+ f" {mission_variant}"
+ f" {trade_options}"
+ f" {self.ctx.difficulty_damage_modifier}"
+ f" {self.ctx.mercenary_highlanders}" # TODO: Possibly rework it into unit options in the next cycle
+ f" {self.ctx.war_council_nerfs}"
+ )
+ await self.update_resources(start_items)
+ await self.update_terran_tech(start_items)
+ await self.update_zerg_tech(start_items, kerrigan_level)
+ await self.update_protoss_tech(start_items)
+ await self.update_misc_tech(start_items)
+ await self.update_colors()
+ if uncollected_objectives:
+ await self.chat_send("?UncollectedLocations {}".format(
+ functools.reduce(lambda a, b: a + " " + b, [str(x) for x in uncollected_objectives])
+ ))
+ await self.chat_send("?LoadFinished")
+ self.last_received_update = len(self.ctx.items_received)
+
+ else:
+ if self.ctx.pending_color_update:
+ await self.update_colors()
+
+ if not self.ctx.announcements.empty():
+ message = self.ctx.announcements.get(timeout=1)
+ await self.chat_send("?SendMessage " + message)
+ self.ctx.announcements.task_done()
+
+ # Archipelago reads the health
+ controller1_state = 0
+ controller2_state = 0
+ for unit in self.all_own_units():
+ if unit.health_max == CONTROLLER_HEALTH:
+ controller1_state = int(CONTROLLER_HEALTH - unit.health)
+ self.can_read_game = True
+ elif unit.health_max == CONTROLLER2_HEALTH:
+ controller2_state = int(CONTROLLER2_HEALTH - unit.health)
+ self.can_read_game = True
+ elif unit.name == TRADE_UNIT:
+ # Handle Void Trade requests
+ # Check for orders (for buildings this is usually research or training)
+ if not unit.is_idle and not self.ctx.trade_underway:
+ button = unit.orders[0].ability.button_name
+ if button == TRADE_SEND_BUTTON and len(self.last_trade_cargo) > 0:
+ units_to_send: typing.List[str] = []
+ non_ap_units: typing.Set[str] = set()
+ for passenger in self.last_trade_cargo:
+ # Alternatively passenger._type_data.name but passenger.name seems to always match
+ unit_name = passenger.name
+ if unit_name.startswith("AP_"):
+ units_to_send.append(normalized_unit_types.get(unit_name, unit_name))
+ else:
+ non_ap_units.add(unit_name)
+ if len(non_ap_units) > 0:
+ sc2_logger.info(f"Void Trade tried to send non-AP units: {', '.join(non_ap_units)}")
+ self.ctx.trade_response = "?TradeFail Void Trade rejected: Trade contains invalid units."
+ self.ctx.trade_underway = True
+ else:
+ self.ctx.trade_response = None
+ self.ctx.trade_underway = True
+ async_start(self.ctx.trade_send(units_to_send))
+ elif button == TRADE_RECEIVE_1_BUTTON:
+ self.ctx.trade_underway = True
+ if self.supply_used != self.last_supply_used:
+ self.ctx.trade_response = None
+ async_start(self.ctx.trade_receive(1))
+ else:
+ self.ctx.trade_response = "?TradeFail Void Trade rejected: Not enough supply."
+ elif button == TRADE_RECEIVE_5_BUTTON:
+ self.ctx.trade_underway = True
+ if self.supply_used != self.last_supply_used:
+ self.ctx.trade_response = None
+ async_start(self.ctx.trade_receive(5))
+ else:
+ self.ctx.trade_response = "?TradeFail Void Trade rejected: Not enough supply."
+ elif not unit.is_idle and self.trade_reply_cooldown > 0:
+ self.trade_reply_cooldown -= 1
+ elif unit.is_idle and self.trade_reply_cooldown > 0:
+ self.trade_reply_cooldown = 0
+ self.ctx.trade_response = None
+ self.ctx.trade_underway = False
+ else:
+ # The API returns no passengers for researching/training buildings,
+ # so we need to buffer the passengers each frame
+ self.last_trade_cargo = unit.passengers
+ # SC2 has no good means of detecting when a unit is queued while supply capped,
+ # so a supply buffer here is the best we can do
+ self.last_supply_used = self.supply_used
+ game_state = controller1_state + (controller2_state << 15)
+
+ if iteration == 160 and not game_state & 1:
+ await self.chat_send("?SendMessage Warning: Archipelago unable to connect or has lost connection to " +
+ "Starcraft 2 (This is likely a map issue)")
+
+ if self.last_received_update < len(self.ctx.items_received):
+ current_items = calculate_items(self.ctx)
+ missions_beaten = self.missions_beaten_count()
+ kerrigan_level = get_kerrigan_level(self.ctx, current_items, missions_beaten)
+ await self.update_resources(current_items)
+ await self.update_terran_tech(current_items)
+ await self.update_zerg_tech(current_items, kerrigan_level)
+ await self.update_protoss_tech(current_items)
+ await self.update_misc_tech(current_items)
+ self.last_received_update = len(self.ctx.items_received)
+
+ if game_state & 1:
+ if not self.game_running:
+ print("Archipelago Connected")
+ self.game_running = True
+
+ if self.can_read_game:
+ if game_state & (1 << 1) and not self.mission_completed:
+ victory_locations = [get_location_id(self.mission_id, 0)]
+ send_victory = (
+ self.mission_id in self.ctx.final_mission_ids and
+ len(self.ctx.final_locations) == len(self.ctx.checked_locations.union(victory_locations).intersection(self.ctx.final_locations))
+ )
+
+ # Old slots don't have locations on goal
+ if not send_victory or self.ctx.slot_data_version >= 4:
+ sc2_logger.info("Mission Completed")
+ location_ids = self.ctx.mission_id_to_location_ids[self.mission_id]
+ victory_locations += sorted([
+ get_location_id(self.mission_id, location_id)
+ for location_id in location_ids
+ if (location_id % VICTORY_MODULO) >= VICTORY_CACHE_OFFSET
+ ])
+ await self.ctx.send_msgs(
+ [{"cmd": 'LocationChecks',
+ "locations": victory_locations}])
+ self.mission_completed = True
+
+ if send_victory:
+ print("Game Complete")
+ await self.ctx.send_msgs([{"cmd": 'StatusUpdate', "status": ClientStatus.CLIENT_GOAL}])
+ self.mission_completed = True
+ self.ctx.finished_game = True
+
+ for x, completed in enumerate(self.boni):
+ if not completed and game_state & (1 << (x + 2)):
+ await self.ctx.send_msgs(
+ [{"cmd": 'LocationChecks',
+ "locations": [get_location_id(self.mission_id, x + 1)]}])
+ self.boni[x] = True
+
+ # Send Void Trade results
+ if self.ctx.trade_response is not None and self.trade_reply_cooldown == 0:
+ await self.chat_send(self.ctx.trade_response)
+ # Wait an arbitrary amount of frames before trying again
+ self.trade_reply_cooldown = 60
+ else:
+ await self.chat_send("?SendMessage LostConnection - Lost connection to game.")
+
+ def get_uncollected_objectives(self) -> typing.List[int]:
+ result = [
+ location % VICTORY_MODULO
+ for location in self.ctx.uncollected_locations_in_mission(lookup_id_to_mission[self.mission_id])
+ if (location % VICTORY_MODULO) < VICTORY_CACHE_OFFSET
+ ]
+ return result
+
+ def missions_beaten_count(self) -> int:
+ return len([location for location in self.ctx.checked_locations if location % VICTORY_MODULO == 0])
+
+ async def update_colors(self):
+ await self.chat_send("?SetColor rr " + str(self.ctx.player_color_raynor))
+ await self.chat_send("?SetColor ks " + str(self.ctx.player_color_zerg))
+ await self.chat_send("?SetColor pz " + str(self.ctx.player_color_zerg_primal))
+ await self.chat_send("?SetColor da " + str(self.ctx.player_color_protoss))
+ await self.chat_send("?SetColor nova " + str(self.ctx.player_color_nova))
+ self.ctx.pending_color_update = False
+
+ async def update_resources(self, current_items: typing.Dict[SC2Race, typing.List[int]]):
+ DEFAULT_MAX_SUPPLY = 200
+ max_supply_amount = max(
+ DEFAULT_MAX_SUPPLY
+ + (
+ current_items[SC2Race.ANY][get_item_flag_word(item_names.MAX_SUPPLY)]
+ * self.ctx.maximum_supply_per_item
+ )
+ - (
+ current_items[SC2Race.ANY][get_item_flag_word(item_names.REDUCED_MAX_SUPPLY)]
+ * self.ctx.maximum_supply_reduction_per_item
+ ),
+ self.ctx.lowest_maximum_supply,
+ )
+ await self.chat_send("?GiveResources {} {} {} {}".format(
+ current_items[SC2Race.ANY][get_item_flag_word(item_names.STARTING_MINERALS)],
+ current_items[SC2Race.ANY][get_item_flag_word(item_names.STARTING_VESPENE)],
+ current_items[SC2Race.ANY][get_item_flag_word(item_names.STARTING_SUPPLY)],
+ max_supply_amount - DEFAULT_MAX_SUPPLY,
+ ))
+
+ async def update_terran_tech(self, current_items: typing.Dict[SC2Race, typing.List[int]]):
+ terran_items = current_items[SC2Race.TERRAN]
+ await self.chat_send("?GiveTerranTech " + " ".join(map(str, terran_items)))
+
+ async def update_zerg_tech(self, current_items: typing.Dict[SC2Race, typing.List[int]], kerrigan_level: int):
+ zerg_items = current_items[SC2Race.ZERG]
+ zerg_items = [value for index, value in enumerate(zerg_items) if index not in [ZergItemType.Level.flag_word, ZergItemType.Primal_Form.flag_word]]
+ kerrigan_primal_by_items = kerrigan_primal(self.ctx, kerrigan_level)
+ kerrigan_primal_bot_value = 1 if kerrigan_primal_by_items else 0
+ await self.chat_send(f"?GiveZergTech {kerrigan_level} {kerrigan_primal_bot_value} " + ' '.join(map(str, zerg_items)))
+
+ async def update_protoss_tech(self, current_items: typing.Dict[SC2Race, typing.List[int]]):
+ protoss_items = current_items[SC2Race.PROTOSS]
+ await self.chat_send("?GiveProtossTech " + " ".join(map(str, protoss_items)))
+
+ async def update_misc_tech(self, current_items: typing.Dict[SC2Race, typing.List[int]]):
+ await self.chat_send("?GiveMiscTech {} {} {}".format(
+ current_items[SC2Race.ANY][get_item_flag_word(item_names.BUILDING_CONSTRUCTION_SPEED)],
+ current_items[SC2Race.ANY][get_item_flag_word(item_names.UPGRADE_RESEARCH_SPEED)],
+ current_items[SC2Race.ANY][get_item_flag_word(item_names.UPGRADE_RESEARCH_COST)],
+ ))
+
+def calc_unfinished_nodes(
+ ctx: SC2Context
+) -> typing.Tuple[typing.List[int], typing.Dict[int, typing.List[int]], typing.List[int], typing.Set[int]]:
+ unfinished_missions: typing.Set[int] = set()
+
+ available_missions, available_layouts, available_campaigns = calc_available_nodes(ctx)
+
+ for mission_id in available_missions:
+ objectives = set(ctx.locations_for_mission_id(mission_id))
+ if objectives:
+ objectives_completed = ctx.checked_locations & objectives
+ if len(objectives_completed) < len(objectives):
+ unfinished_missions.add(mission_id)
+
+ return available_missions, available_layouts, available_campaigns, unfinished_missions
+
+def is_mission_available(ctx: SC2Context, mission_id_to_check: int) -> bool:
+ available_missions, _, _ = calc_available_nodes(ctx)
+
+ return mission_id_to_check in available_missions
+
+def calc_available_nodes(ctx: SC2Context) -> typing.Tuple[typing.List[int], typing.Dict[int, typing.List[int]], typing.List[int]]:
+ beaten_missions: typing.Set[int] = {mission_id for mission_id in ctx.mission_id_to_entry_rules if ctx.is_mission_completed(mission_id)}
+ received_items = compute_received_items(ctx)
+
+ mission_order_objects: typing.List[MissionOrderObjectSlotData] = []
+ parent_objects: typing.List[typing.List[MissionOrderObjectSlotData]] = []
+ for campaign in ctx.custom_mission_order:
+ mission_order_objects.append(campaign)
+ parent_objects.append([])
+ for layout in campaign.layouts:
+ mission_order_objects.append(layout)
+ parent_objects.append([campaign])
+ for column in layout.missions:
+ for mission in column:
+ if mission.mission_id == -1:
+ continue
+ mission_order_objects.append(mission)
+ parent_objects.append([campaign, layout])
+
+ candidate_accessible_objects: typing.List[MissionOrderObjectSlotData] = [
+ mission_order_object for mission_order_object in mission_order_objects
+ if mission_order_object.entry_rule.is_accessible(beaten_missions, received_items)
+ ]
+
+ accessible_objects: typing.List[MissionOrderObjectSlotData] = []
+
+ while len(candidate_accessible_objects) > 0:
+ accessible_missions: typing.List[MissionSlotData] = [mission_order_object for mission_order_object in accessible_objects if isinstance(mission_order_object, MissionSlotData)]
+ beaten_accessible_missions: typing.Set[int] = {mission.mission_id for mission in accessible_missions if mission.mission_id in beaten_missions}
+ accessible_objects_to_add: typing.List[MissionOrderObjectSlotData] = []
+ for mission_order_object in candidate_accessible_objects:
+ if (
+ mission_order_object.entry_rule.is_accessible(beaten_accessible_missions, received_items)
+ and all([
+ parent_object.entry_rule.is_accessible(beaten_accessible_missions, received_items)
+ for parent_object in parent_objects[mission_order_objects.index(mission_order_object)]
+ ])
+ ):
+ accessible_objects_to_add.append(mission_order_object)
+ if len(accessible_objects_to_add) > 0:
+ accessible_objects.extend(accessible_objects_to_add)
+ candidate_accessible_objects = [
+ mission_order_object for mission_order_object in candidate_accessible_objects
+ if mission_order_object not in accessible_objects_to_add
+ ]
+ else:
+ break
+
+ accessible_missions: typing.List[MissionSlotData] = [mission_order_object for mission_order_object in accessible_objects if isinstance(mission_order_object, MissionSlotData)]
+ beaten_accessible_missions: typing.Set[int] = {mission.mission_id for mission in accessible_missions if mission.mission_id in beaten_missions}
+ for mission_order_object in mission_order_objects:
+ # re-generate tooltip accessibility
+ for sub_rule in mission_order_object.entry_rule.sub_rules:
+ sub_rule.was_accessible = False
+ mission_order_object.entry_rule.is_accessible(beaten_accessible_missions, received_items)
+
+ available_missions: typing.List[int] = [
+ mission_order_object.mission_id for mission_order_object in accessible_objects
+ if isinstance(mission_order_object, MissionSlotData)
+ ]
+ available_campaign_objects: typing.List[CampaignSlotData] = [
+ mission_order_object for mission_order_object in accessible_objects
+ if isinstance(mission_order_object, CampaignSlotData)
+ ]
+ available_campaigns: typing.List[int] = [
+ campaign_idx for campaign_idx, campaign in enumerate(ctx.custom_mission_order)
+ if campaign in available_campaign_objects
+ ]
+ available_layout_objects: typing.List[LayoutSlotData] = [
+ mission_order_object for mission_order_object in accessible_objects
+ if isinstance(mission_order_object, LayoutSlotData)
+ ]
+ available_layouts: typing.Dict[int, typing.List[int]] = {
+ campaign_idx: [
+ layout_idx for layout_idx, layout in enumerate(campaign.layouts) if layout in available_layout_objects
+ ]
+ for campaign_idx, campaign in enumerate(ctx.custom_mission_order)
+ }
+
+ return available_missions, available_layouts, available_campaigns
+
+def compute_received_items(ctx: SC2Context) -> typing.Counter[int]:
+ received_items: typing.Counter[int] = collections.Counter()
+ for network_item in ctx.items_received:
+ received_items[network_item.item] += 1
+ return received_items
+
+def check_game_install_path() -> bool:
+ # First thing: go to the default location for ExecuteInfo.
+ # An exception for Windows is included because it's very difficult to find ~\Documents if the user moved it.
+ if is_windows:
+ # The next five lines of utterly inscrutable code are brought to you by copy-paste from Stack Overflow.
+ # https://stackoverflow.com/questions/6227590/finding-the-users-my-documents-path/30924555#
+ import ctypes.wintypes
+ CSIDL_PERSONAL = 5 # My Documents
+ SHGFP_TYPE_CURRENT = 0 # Get current, not default value
+
+ buf = ctypes.create_unicode_buffer(ctypes.wintypes.MAX_PATH)
+ ctypes.windll.shell32.SHGetFolderPathW(None, CSIDL_PERSONAL, None, SHGFP_TYPE_CURRENT, buf)
+ documentspath: str = buf.value
+ einfo = str(documentspath / Path("StarCraft II\\ExecuteInfo.txt"))
+ else:
+ einfo = str(bot.paths.get_home() / Path(bot.paths.USERPATH[bot.paths.PF]))
+
+ # Check if the file exists.
+ if os.path.isfile(einfo):
+
+ # Open the file and read it, picking out the latest executable's path.
+ with open(einfo) as f:
+ content = f.read()
+ if content:
+ search_result = re.search(r" = (.*)Versions", content)
+ if not search_result:
+ sc2_logger.warning(f"Found {einfo}, but it was empty. Run SC2 through the Blizzard launcher, "
+ "then try again.")
+ return False
+ base = search_result.group(1)
+
+ if os.path.exists(base):
+ executable = bot.paths.latest_executeble(Path(base).expanduser() / "Versions")
+
+ # Finally, check the path for an actual executable.
+ # If we find one, great. Set up the SC2PATH.
+ if os.path.isfile(executable):
+ sc2_logger.info(f"Found an SC2 install at {base}!")
+ sc2_logger.debug(f"Latest executable at {executable}.")
+ os.environ["SC2PATH"] = base
+ sc2_logger.debug(f"SC2PATH set to {base}.")
+ return True
+ else:
+ sc2_logger.warning(f"We may have found an SC2 install at {base}, but couldn't find {executable}.")
+ else:
+ sc2_logger.warning(f"{einfo} pointed to {base}, but we could not find an SC2 install there.")
+ else:
+ sc2_logger.warning(f"Couldn't find {einfo}. Run SC2 through the Blizzard launcher, then try again. "
+ f"If that fails, please run /set_path with your SC2 install directory.")
+ return False
+
+
+def is_mod_installed_correctly() -> bool:
+ """Searches for all required files."""
+ if "SC2PATH" not in os.environ:
+ check_game_install_path()
+ sc2_path: str = os.environ["SC2PATH"]
+ mapdir = sc2_path / Path('Maps/ArchipelagoCampaign')
+ mods = ["ArchipelagoCore", "ArchipelagoPlayer", "ArchipelagoPlayerSuper", "ArchipelagoPatches",
+ "ArchipelagoTriggers", "ArchipelagoPlayerWoL", "ArchipelagoPlayerHotS",
+ "ArchipelagoPlayerLotV", "ArchipelagoPlayerLotVPrologue", "ArchipelagoPlayerNCO"]
+ modfiles = [sc2_path / Path("Mods/" + mod + ".SC2Mod") for mod in mods]
+ wol_required_maps: typing.List[str] = ["WoL" + os.sep + mission.map_file + ".SC2Map" for mission in SC2Mission
+ if mission.campaign in (SC2Campaign.WOL, SC2Campaign.PROPHECY)]
+ hots_required_maps: typing.List[str] = ["HotS" + os.sep + mission.map_file + ".SC2Map" for mission in campaign_mission_table[SC2Campaign.HOTS]]
+ lotv_required_maps: typing.List[str] = ["LotV" + os.sep + mission.map_file + ".SC2Map" for mission in SC2Mission
+ if mission.campaign in (SC2Campaign.LOTV, SC2Campaign.PROLOGUE, SC2Campaign.EPILOGUE)]
+ nco_required_maps: typing.List[str] = ["NCO" + os.sep + mission.map_file + ".SC2Map" for mission in campaign_mission_table[SC2Campaign.NCO]]
+ required_maps = wol_required_maps + hots_required_maps + lotv_required_maps + nco_required_maps
+ needs_files = False
+
+ # Check for maps.
+ missing_maps: typing.List[str] = []
+ for mapfile in required_maps:
+ if not os.path.isfile(mapdir / mapfile):
+ missing_maps.append(mapfile)
+ if len(missing_maps) >= 19:
+ sc2_logger.warning(f"All map files missing from {mapdir}.")
+ needs_files = True
+ elif len(missing_maps) > 0:
+ for map in missing_maps:
+ sc2_logger.debug(f"Missing {map} from {mapdir}.")
+ sc2_logger.warning(f"Missing {len(missing_maps)} map files.")
+ needs_files = True
+ else: # Must be no maps missing
+ sc2_logger.debug(f"All maps found in {mapdir}.")
+
+ # Check for mods.
+ for modfile in modfiles:
+ if os.path.isfile(modfile) or os.path.isdir(modfile):
+ sc2_logger.debug(f"Archipelago mod found at {modfile}.")
+ else:
+ sc2_logger.warning(f"Archipelago mod could not be found at {modfile}.")
+ needs_files = True
+
+ # Final verdict.
+ if needs_files:
+ sc2_logger.warning("Required files are missing. Run /download_data to acquire them.")
+ return False
+ else:
+ sc2_logger.debug("All map/mod files are properly installed.")
+ return True
+
+
+class DllDirectory:
+ # Credit to Black Sliver for this code.
+ # More info: https://docs.microsoft.com/en-us/windows/win32/api/winbase/nf-winbase-setdlldirectoryw
+ _old: typing.Optional[str] = None
+ _new: typing.Optional[str] = None
+
+ def __init__(self, new: typing.Optional[str]):
+ self._new = new
+
+ def __enter__(self):
+ old = self.get()
+ if self.set(self._new):
+ self._old = old
+
+ def __exit__(self, *args):
+ if self._old is not None:
+ self.set(self._old)
+
+ @staticmethod
+ def get() -> typing.Optional[str]:
+ if sys.platform == "win32":
+ n = ctypes.windll.kernel32.GetDllDirectoryW(0, None)
+ buf = ctypes.create_unicode_buffer(n)
+ ctypes.windll.kernel32.GetDllDirectoryW(n, buf)
+ return buf.value
+ # NOTE: other OS may support os.environ["LD_LIBRARY_PATH"], but this fix is windows-specific
+ return None
+
+ @staticmethod
+ def set(s: typing.Optional[str]) -> bool:
+ if sys.platform == "win32":
+ return ctypes.windll.kernel32.SetDllDirectoryW(s) != 0
+ # NOTE: other OS may support os.environ["LD_LIBRARY_PATH"], but this fix is windows-specific
+ return False
+
+
+def download_latest_release_zip(
+ owner: str,
+ repo: str,
+ api_version: str,
+ metadata: typing.Optional[str] = None,
+ force_download=False
+) -> typing.Tuple[str, typing.Optional[str]]:
+ """Downloads the latest release of a GitHub repo to the current directory as a .zip file."""
+ import requests
+
+ headers = {"Accept": 'application/vnd.github.v3+json'}
+ url = f"https://api.github.com/repos/{owner}/{repo}/releases/tags/{api_version}"
+
+ try:
+ r1 = requests.get(url, headers=headers)
+ if r1.status_code == 200:
+ latest_metadata = r1.json()
+ cleanup_downloaded_metadata(latest_metadata)
+ latest_metadata = str(latest_metadata)
+ # sc2_logger.info(f"Latest version: {latest_metadata}.")
+ else:
+ sc2_logger.warning(f"Status code: {r1.status_code}")
+ sc2_logger.warning("Failed to reach GitHub. Could not find download link.")
+ sc2_logger.warning(f"text: {r1.text}")
+ return "", metadata
+
+ if (force_download is False) and (metadata == latest_metadata):
+ sc2_logger.info("Latest version already installed.")
+ return "", metadata
+
+ sc2_logger.info(f"Attempting to download latest version of API version {api_version} of {repo}.")
+ download_url = r1.json()["assets"][0]["browser_download_url"]
+
+ r2 = requests.get(download_url, headers=headers)
+ if r2.status_code == 200 and zipfile.is_zipfile(io.BytesIO(r2.content)):
+ tempdir = tempfile.gettempdir()
+ file = tempdir + os.sep + f"{repo}.zip"
+ with open(file, "wb") as fh:
+ fh.write(r2.content)
+ sc2_logger.info(f"Successfully downloaded {repo}.zip. Installing...")
+ return file, latest_metadata
+ else:
+ sc2_logger.warning(f"Status code: {r2.status_code}")
+ sc2_logger.warning("Download failed.")
+ sc2_logger.warning(f"text: {r2.text}")
+ return "", metadata
+ except requests.ConnectionError:
+ sc2_logger.warning("Failed to reach GitHub. Could not find download link.")
+ return "", metadata
+
+
+def cleanup_downloaded_metadata(medatada_json: dict) -> None:
+ for asset in medatada_json['assets']:
+ del asset['download_count']
+
+
+def is_mod_update_available(owner: str, repo: str, api_version: str, metadata: str) -> bool:
+ import requests
+
+ headers = {"Accept": 'application/vnd.github.v3+json'}
+ url = f"https://api.github.com/repos/{owner}/{repo}/releases/tags/{api_version}"
+
+ try:
+ r1 = requests.get(url, headers=headers)
+ if r1.status_code == 200:
+ latest_metadata = r1.json()
+ cleanup_downloaded_metadata(latest_metadata)
+ latest_metadata = str(latest_metadata)
+ if metadata != latest_metadata:
+ return True
+ else:
+ return False
+
+ else:
+ sc2_logger.warning("Failed to reach GitHub while checking for updates.")
+ sc2_logger.warning(f"Status code: {r1.status_code}")
+ sc2_logger.warning(f"text: {r1.text}")
+ return False
+ except requests.ConnectionError:
+ sc2_logger.warning("Failed to reach GitHub while checking for updates.")
+ return False
+
+
+def get_location_offset(mission_id: int) -> int:
+ return SC2WOL_LOC_ID_OFFSET if mission_id <= SC2Mission.ALL_IN.id \
+ else (SC2HOTS_LOC_ID_OFFSET - SC2Mission.ALL_IN.id * VICTORY_MODULO)
+
+def get_location_id(mission_id: int, objective_id: int) -> int:
+ return get_location_offset(mission_id) + mission_id * VICTORY_MODULO + objective_id
+
+
+_has_forced_save = False
+def force_settings_save_on_close() -> None:
+ """
+ Settings has an existing auto-save feature, but it only triggers if a new key was introduced.
+ Force it to mark things as changed by introducing a new key and then cleaning up.
+ """
+ global _has_forced_save
+ if _has_forced_save:
+ return
+ SC2World.settings.update({'invalid_attribute': True})
+ del SC2World.settings.invalid_attribute
+ _has_forced_save = True
+
+
+def launch():
+ colorama.just_fix_windows_console()
+ asyncio.run(main())
+ colorama.deinit()
diff --git a/worlds/sc2/client_gui.py b/worlds/sc2/client_gui.py
new file mode 100644
index 00000000..6b2abcd9
--- /dev/null
+++ b/worlds/sc2/client_gui.py
@@ -0,0 +1,655 @@
+from typing import *
+import asyncio
+import logging
+
+from BaseClasses import ItemClassification
+from NetUtils import JSONMessagePart
+from kvui import GameManager, HoverBehavior, ServerToolTip, KivyJSONtoTextParser, LogtoUI
+from kivy.app import App
+from kivy.clock import Clock
+from kivy.core.clipboard import Clipboard
+from kivy.uix.gridlayout import GridLayout
+from kivy.lang import Builder
+from kivy.metrics import dp
+from kivy.uix.label import Label
+from kivy.uix.button import Button
+from kivymd.uix.menu import MDDropdownMenu
+from kivymd.uix.tooltip import MDTooltip
+from kivy.uix.scrollview import ScrollView
+from kivy.properties import StringProperty, BooleanProperty, NumericProperty
+
+from .client import SC2Context, calc_unfinished_nodes, is_mission_available, compute_received_items, STARCRAFT2
+from .item.item_descriptions import item_descriptions
+from .item.item_annotations import ITEM_NAME_ANNOTATIONS
+from .mission_order.entry_rules import RuleData, SubRuleRuleData, ItemRuleData
+from .mission_tables import lookup_id_to_mission, campaign_race_exceptions, \
+ SC2Mission, SC2Race
+from .locations import LocationType, lookup_location_id_to_type, lookup_location_id_to_flags
+from .options import LocationInclusion, MissionOrderScouting
+from . import SC2World
+
+
+class HoverableButton(HoverBehavior, Button):
+ pass
+
+
+class MissionButton(HoverableButton, MDTooltip):
+ tooltip_text = StringProperty("Test")
+ mission_id = NumericProperty(-1)
+ is_exit = BooleanProperty(False)
+ is_goal = BooleanProperty(False)
+ showing_tooltip = BooleanProperty(False)
+
+ def __init__(self, *args, **kwargs):
+ super(HoverableButton, self).__init__(**kwargs)
+ self._tooltip = ServerToolTip(text=self.text, markup=True)
+ self._tooltip.padding = [5, 2, 5, 2]
+
+ def on_enter(self):
+ self._tooltip.text = self.tooltip_text
+
+ if self.tooltip_text != "":
+ self.display_tooltip()
+
+ def on_leave(self):
+ self.remove_tooltip()
+
+ def display_tooltip(self, *args):
+ self.showing_tooltip = True
+ return super().display_tooltip(*args)
+
+ def remove_tooltip(self, *args):
+ self.showing_tooltip = False
+ return super().remove_tooltip(*args)
+
+ @property
+ def ctx(self) -> SC2Context:
+ return App.get_running_app().ctx
+
+class CampaignScroll(ScrollView):
+ border_on = BooleanProperty(False)
+
+class MultiCampaignLayout(GridLayout):
+ pass
+
+class DownloadDataWarningMessage(Label):
+ pass
+
+class CampaignLayout(GridLayout):
+ pass
+
+class RegionLayout(GridLayout):
+ pass
+
+class ColumnLayout(GridLayout):
+ pass
+
+class MissionLayout(GridLayout):
+ pass
+
+class MissionCategory(GridLayout):
+ pass
+
+
+class SC2JSONtoKivyParser(KivyJSONtoTextParser):
+ def _handle_item_name(self, node: JSONMessagePart):
+ item_name = node["text"]
+ if self.ctx.slot_info[node["player"]].game != STARCRAFT2 or item_name not in item_descriptions:
+ return super()._handle_item_name(node)
+
+ flags = node.get("flags", 0)
+ item_types = []
+ if flags & ItemClassification.progression:
+ item_types.append("progression")
+ if flags & ItemClassification.useful:
+ item_types.append("useful")
+ if flags & ItemClassification.trap:
+ item_types.append("trap")
+ if not item_types:
+ item_types.append("normal")
+
+ # TODO: Some descriptions are too long and get cut off. Is there a general solution or does someone need to manually check every description?
+ desc = item_descriptions[item_name].replace(". \n", ". ").replace(". ", ". ").replace("\n", " ")
+ annotation = ITEM_NAME_ANNOTATIONS.get(item_name)
+ if annotation is not None:
+ desc = f"{annotation} {desc}"
+ ref = "Item Class: " + ", ".join(item_types) + "
" + desc
+ node.setdefault("refs", []).append(ref)
+ return super(KivyJSONtoTextParser, self)._handle_item_name(node)
+
+ def _handle_text(self, node: JSONMessagePart):
+ if node.get("keep_markup", False):
+ for ref in node.get("refs", []):
+ node["text"] = f"[ref={self.ref_count}|{ref}]{node['text']}[/ref]"
+ self.ref_count += 1
+ return super(KivyJSONtoTextParser, self)._handle_text(node)
+ else:
+ return super()._handle_text(node)
+
+
+class SC2Manager(GameManager):
+ base_title = "Archipelago Starcraft 2 Client"
+
+ campaign_panel: Optional[MultiCampaignLayout] = None
+ campaign_scroll_panel: Optional[CampaignScroll] = None
+ last_checked_locations: Set[int] = set()
+ last_items_received: List[int] = []
+ last_shown_tooltip: int = -1
+ last_data_out_of_date = False
+ mission_buttons: List[MissionButton] = []
+ launching: Union[bool, int] = False # if int -> mission ID
+ refresh_from_launching = True
+ first_check = True
+ first_mission = ""
+ button_colors: Dict[SC2Race, Tuple[float, float, float]] = {}
+ ctx: SC2Context
+
+ def __init__(self, ctx: SC2Context) -> None:
+ super().__init__(ctx)
+ self.json_to_kivy_parser = SC2JSONtoKivyParser(ctx)
+ self.minimized = False
+
+ def on_start(self) -> None:
+ from . import gui_config
+ warnings, window_width, window_height = gui_config.get_window_defaults()
+ from kivy.core.window import Window
+ original_size_x, original_size_y = Window.size
+ Window.size = window_width, window_height
+ Window.left -= max((window_width - original_size_x) // 2, 0)
+ Window.top -= max((window_height - original_size_y) // 2, 0)
+ # Add the logging handler manually here instead of using `logging_pairs` to avoid adding 2 unnecessary tabs
+ logging.getLogger("Starcraft2").addHandler(LogtoUI(self.log_panels["All"].on_log))
+ for startup_warning in warnings:
+ logging.getLogger("Starcraft2").warning(f"Startup WARNING: {startup_warning}")
+ for race in (SC2Race.TERRAN, SC2Race.PROTOSS, SC2Race.ZERG):
+ errors, color = gui_config.get_button_color(race.name)
+ self.button_colors[race] = color
+ for error in errors:
+ logging.getLogger("Starcraft2").warning(f"{race.name.title()} button color setting: {error}")
+
+ def clear_tooltip(self) -> None:
+ for button in self.mission_buttons:
+ button.remove_tooltip()
+
+ def shown_tooltip(self) -> int:
+ for button in self.mission_buttons:
+ if button.showing_tooltip:
+ return button.mission_id
+ return -1
+
+ def build(self):
+ container = super().build()
+
+ panel = self.add_client_tab("Starcraft 2 Launcher", CampaignScroll())
+ self.campaign_scroll_panel = panel.content
+ self.campaign_panel = MultiCampaignLayout()
+ panel.content.add_widget(self.campaign_panel)
+
+ Clock.schedule_interval(self.build_mission_table, 0.5)
+
+ return container
+
+ def build_mission_table(self, dt) -> None:
+ if self.launching:
+ assert self.campaign_panel is not None
+ self.refresh_from_launching = False
+
+ self.campaign_panel.clear_widgets()
+ self.campaign_panel.add_widget(Label(
+ text="Launching Mission: " + lookup_id_to_mission[self.launching].mission_name
+ ))
+ if self.ctx.ui:
+ self.ctx.ui.clear_tooltip()
+ return
+
+ sorted_items_received = sorted([item.item for item in self.ctx.items_received])
+ shown_tooltip = self.shown_tooltip()
+ hovering_tooltip = (
+ self.last_shown_tooltip != -1
+ and self.last_shown_tooltip == shown_tooltip
+ )
+ data_changed = (
+ self.last_checked_locations != self.ctx.checked_locations
+ or self.last_items_received != sorted_items_received
+ )
+ needs_redraw = (
+ data_changed
+ and not hovering_tooltip
+ or not self.refresh_from_launching
+ or self.last_data_out_of_date != self.ctx.data_out_of_date
+ or self.first_check
+ )
+ self.last_shown_tooltip = shown_tooltip
+ if not needs_redraw:
+ return
+
+ assert self.campaign_panel is not None
+ self.refresh_from_launching = True
+
+ self.clear_tooltip()
+ self.campaign_panel.clear_widgets()
+ if self.ctx.data_out_of_date:
+ self.campaign_panel.add_widget(Label(text="", padding=[0, 5, 0, 5]))
+ warning_label = DownloadDataWarningMessage(
+ text="Map/Mod data is out of date. Run /download_data in the client",
+ padding=[0, 25, 0, 25],
+ )
+ self.campaign_scroll_panel.border_on = True
+ self.campaign_panel.add_widget(warning_label)
+ else:
+ self.campaign_scroll_panel.border_on = False
+ self.last_data_out_of_date = self.ctx.data_out_of_date
+ if len(self.ctx.custom_mission_order) == 0:
+ self.campaign_panel.add_widget(Label(text="Connect to a world to see a mission layout here."))
+ return
+
+ self.last_checked_locations = self.ctx.checked_locations.copy()
+ self.last_items_received = sorted_items_received
+ self.first_check = False
+
+ self.mission_buttons = []
+
+ available_missions, available_layouts, available_campaigns, unfinished_missions = calc_unfinished_nodes(self.ctx)
+
+ # The MultiCampaignLayout widget needs a default height of 15 (set in the .kv) to display the above Labels correctly
+ multi_campaign_layout_height = 15
+
+ # Fetching IDs of all the locations with hints
+ self.hints_to_highlight = []
+ hints = self.ctx.stored_data.get(f"_read_hints_{self.ctx.team}_{self.ctx.slot}")
+ if hints:
+ for hint in hints:
+ if hint['finding_player'] == self.ctx.slot and not hint['found']:
+ self.hints_to_highlight.append(hint['location'])
+
+ MISSION_BUTTON_HEIGHT = 50
+ MISSION_BUTTON_PADDING = 6
+ for campaign_idx, campaign in enumerate(self.ctx.custom_mission_order):
+ longest_column = max(len(col) for layout in campaign.layouts for col in layout.missions)
+ if longest_column == 1:
+ campaign_layout_height = 115
+ else:
+ campaign_layout_height = (longest_column + 2) * (MISSION_BUTTON_HEIGHT + MISSION_BUTTON_PADDING)
+ multi_campaign_layout_height += campaign_layout_height
+ campaign_layout = CampaignLayout(size_hint_y=None, height=campaign_layout_height)
+ campaign_layout.add_widget(
+ Label(text=campaign.name, size_hint_y=None, height=25, outline_width=1)
+ )
+ mission_layout = MissionLayout(padding=[10,0,10,0])
+ for layout_idx, layout in enumerate(campaign.layouts):
+ layout_panel = RegionLayout()
+ layout_panel.add_widget(
+ Label(text=layout.name, size_hint_y=None, height=25, outline_width=1))
+ column_panel = ColumnLayout()
+
+ for column in layout.missions:
+ category_panel = MissionCategory(padding=[3,MISSION_BUTTON_PADDING,3,MISSION_BUTTON_PADDING])
+
+ for mission in column:
+ mission_id = mission.mission_id
+
+ # Empty mission slots
+ if mission_id == -1:
+ column_spacer = Label(text='', size_hint_y=None, height=MISSION_BUTTON_HEIGHT)
+ category_panel.add_widget(column_spacer)
+ continue
+
+ mission_obj = lookup_id_to_mission[mission_id]
+ mission_finished = self.ctx.is_mission_completed(mission_id)
+ is_layout_exit = mission_id in layout.exits and not mission_finished
+ is_campaign_exit = mission_id in campaign.exits and not mission_finished
+
+ text, tooltip = self.mission_text(
+ self.ctx, mission_id, mission_obj,
+ layout_idx, is_layout_exit, layout.name,
+ campaign_idx, is_campaign_exit, campaign.name,
+ available_missions, available_layouts, available_campaigns, unfinished_missions
+ )
+
+ mission_button = MissionButton(text=text, size_hint_y=None, height=MISSION_BUTTON_HEIGHT)
+
+ mission_button.mission_id = mission_id
+
+ if mission_id in self.ctx.final_mission_ids:
+ mission_button.is_goal = True
+ if is_layout_exit or is_campaign_exit:
+ mission_button.is_exit = True
+
+ mission_race = mission_obj.race
+ if mission_race == SC2Race.ANY:
+ mission_race = mission_obj.campaign.race
+ race = campaign_race_exceptions.get(mission_obj, mission_race)
+ if race in self.button_colors:
+ mission_button.background_color = self.button_colors[race]
+ mission_button.tooltip_text = tooltip
+ mission_button.bind(on_press=self.mission_callback)
+ self.mission_buttons.append(mission_button)
+ category_panel.add_widget(mission_button)
+
+ # layout_panel.add_widget(Label(text=""))
+ column_panel.add_widget(category_panel)
+ layout_panel.add_widget(column_panel)
+ mission_layout.add_widget(layout_panel)
+ campaign_layout.add_widget(mission_layout)
+ self.campaign_panel.add_widget(campaign_layout)
+ self.campaign_panel.height = multi_campaign_layout_height
+
+ # For some reason the AP HoverBehavior won't send an enter event if a button spawns under the cursor,
+ # so manually send an enter event if a button is hovered immediately
+ for button in self.mission_buttons:
+ if button.hovered:
+ button.dispatch("on_enter")
+ break
+
+ def mission_text(
+ self, ctx: SC2Context, mission_id: int, mission_obj: SC2Mission,
+ layout_id: int, is_layout_exit: bool, layout_name: str, campaign_id: int, is_campaign_exit: bool, campaign_name: str,
+ available_missions: List[int], available_layouts: Dict[int, List[int]], available_campaigns: List[int],
+ unfinished_missions: List[int]
+ ) -> Tuple[str, str]:
+ COLOR_MISSION_IMPORTANT = "6495ED" # blue
+ COLOR_MISSION_UNIMPORTANT = "A0BEF4" # lighter blue
+ COLOR_MISSION_CLEARED = "FFFFFF" # white
+ COLOR_MISSION_LOCKED = "A9A9A9" # gray
+ COLOR_PARENT_LOCKED = "848484" # darker gray
+ COLOR_MISSION_FINAL = "FFBC95" # orange
+ COLOR_MISSION_FINAL_LOCKED = "D0C0BE" # gray + orange
+ COLOR_FINAL_PARENT_LOCKED = "D0C0BE" # gray + orange
+ COLOR_FINAL_MISSION_REMINDER = "FF5151" # light red
+ COLOR_VICTORY_LOCATION = "FFC156" # gold
+ COLOR_TOOLTIP_DONE = "51FF51" # light green
+ COLOR_TOOLTIP_NOT_DONE = "FF5151" # light red
+
+ text = mission_obj.mission_name
+ tooltip: str = ""
+ remaining_locations, plando_locations, remaining_count = self.sort_unfinished_locations(mission_id)
+ campaign_locked = campaign_id not in available_campaigns
+ layout_locked = layout_id not in available_layouts[campaign_id]
+
+ # Map has uncollected locations
+ if mission_id in unfinished_missions:
+ if self.any_valuable_locations(remaining_locations):
+ text = f"[color={COLOR_MISSION_IMPORTANT}]{text}[/color]"
+ else:
+ text = f"[color={COLOR_MISSION_UNIMPORTANT}]{text}[/color]"
+ elif mission_id in available_missions:
+ text = f"[color={COLOR_MISSION_CLEARED}]{text}[/color]"
+ # Map requirements not met
+ else:
+ mission_rule, layout_rule, campaign_rule = ctx.mission_id_to_entry_rules[mission_id]
+ mission_has_rule = mission_rule.amount > 0
+ layout_has_rule = layout_rule.amount > 0
+ extra_reqs = False
+ if campaign_locked:
+ text = f"[color={COLOR_PARENT_LOCKED}]{text}[/color]"
+ tooltip += "To unlock this campaign, "
+ shown_rule = campaign_rule
+ extra_reqs = layout_has_rule or mission_has_rule
+ elif layout_locked:
+ text = f"[color={COLOR_PARENT_LOCKED}]{text}[/color]"
+ tooltip += "To unlock this questline, "
+ shown_rule = layout_rule
+ extra_reqs = mission_has_rule
+ else:
+ text = f"[color={COLOR_MISSION_LOCKED}]{text}[/color]"
+ tooltip += "To unlock this mission, "
+ shown_rule = mission_rule
+ rule_tooltip = shown_rule.tooltip(0, lookup_id_to_mission, COLOR_TOOLTIP_DONE, COLOR_TOOLTIP_NOT_DONE)
+ tooltip += rule_tooltip.replace(rule_tooltip[0], rule_tooltip[0].lower(), 1)
+ extra_word = "are"
+ if shown_rule.shows_single_rule():
+ extra_word = "is"
+ tooltip += "."
+ if extra_reqs:
+ tooltip += f"\nThis mission has additional requirements\nthat will be shown once the above {extra_word} met."
+
+ # Mark exit missions
+ exit_for: str = ""
+ if is_layout_exit:
+ exit_for += layout_name if layout_name else "this questline"
+ if is_campaign_exit:
+ if exit_for:
+ exit_for += " and "
+ exit_for += campaign_name if campaign_name else "this campaign"
+ if exit_for:
+ if tooltip:
+ tooltip += "\n\n"
+ tooltip += f"Required to beat {exit_for}"
+
+ # Mark goal missions
+ if mission_id in self.ctx.final_mission_ids:
+ if mission_id in available_missions:
+ text = f"[color={COLOR_MISSION_FINAL}]{mission_obj.mission_name}[/color]"
+ elif campaign_locked or layout_locked:
+ text = f"[color={COLOR_FINAL_PARENT_LOCKED}]{mission_obj.mission_name}[/color]"
+ else:
+ text = f"[color={COLOR_MISSION_FINAL_LOCKED}]{mission_obj.mission_name}[/color]"
+ if tooltip and not exit_for:
+ tooltip += "\n\n"
+ elif exit_for:
+ tooltip += "\n"
+ if any(location_type == LocationType.VICTORY for (location_type, _, _) in remaining_locations):
+ tooltip += f"[color={COLOR_FINAL_MISSION_REMINDER}]Required to beat the world[/color]"
+ else:
+ tooltip += "This goal mission is already beaten.\nBeat the remaining goal missions to beat the world."
+
+ # Populate remaining location list
+ if remaining_count > 0:
+ if tooltip:
+ tooltip += "\n\n"
+ tooltip += f"[b][color={COLOR_MISSION_IMPORTANT}]Uncollected locations[/color][/b]"
+ last_location_type = LocationType.VICTORY
+ victory_printed = False
+
+ if self.ctx.mission_order_scouting != MissionOrderScouting.option_none:
+ mission_available = mission_id in available_missions
+
+ scoutable = self.is_scoutable(remaining_locations, mission_available, layout_locked, campaign_locked)
+ else:
+ scoutable = False
+
+ for location_type, location_name, _ in remaining_locations:
+ if location_type in (LocationType.VICTORY, LocationType.VICTORY_CACHE) and victory_printed:
+ continue
+ if location_type != last_location_type:
+ tooltip += f"\n[color={COLOR_MISSION_IMPORTANT}]{self.get_location_type_title(location_type)}:[/color]"
+ last_location_type = location_type
+ if location_type == LocationType.VICTORY:
+ victory_count = len([loc for loc in remaining_locations if loc[0] in (LocationType.VICTORY, LocationType.VICTORY_CACHE)])
+ victory_loc = location_name.replace(":", f":[color={COLOR_VICTORY_LOCATION}]")
+ if victory_count > 1:
+ victory_loc += f' ({victory_count})'
+ tooltip += f"\n- {victory_loc}[/color]"
+ victory_printed = True
+ else:
+ tooltip += f"\n- {location_name}"
+ if scoutable:
+ tooltip += self.handle_scout_display(location_name)
+ if len(plando_locations) > 0:
+ tooltip += "\n[b]Plando:[/b]\n- "
+ tooltip += "\n- ".join(plando_locations)
+
+ tooltip = f"[b]{text}[/b]\n" + tooltip
+
+ #If the mission has any hints pointing to a check, add asterisks around the mission name
+ if any(tuple(x in self.hints_to_highlight for x in self.ctx.locations_for_mission_id(mission_id))):
+ text = "* " + text + " *"
+
+ return text, tooltip
+
+
+ def mission_callback(self, button: MissionButton) -> None:
+ if button.last_touch.button == 'right':
+ self.open_mission_menu(button)
+ return
+ if not self.launching:
+ mission_id: int = button.mission_id
+ if self.ctx.play_mission(mission_id):
+ self.launching = mission_id
+ Clock.schedule_once(self.finish_launching, 10)
+
+ def open_mission_menu(self, button: MissionButton) -> None:
+ # Will be assigned later, used to close menu in callbacks
+ menu = None
+ mission_id = button.mission_id
+
+ def copy_mission_name():
+ Clipboard.copy(lookup_id_to_mission[mission_id].mission_name)
+ menu.dismiss()
+
+ menu_items = [
+ {
+ "text": "Copy Mission Name",
+ "on_release": copy_mission_name,
+ }
+ ]
+ width_override = None
+
+ hinted_item_ids = Counter()
+ hints = self.ctx.stored_data.get(f"_read_hints_{self.ctx.team}_{self.ctx.slot}")
+ if hints:
+ for hint in hints:
+ if hint['receiving_player'] == self.ctx.slot and not hint['found']:
+ hinted_item_ids[hint['item']] += 1
+
+ if not self.ctx.is_mission_completed(mission_id) and not is_mission_available(self.ctx, mission_id):
+ # Uncompleted and inaccessible missions can have items hinted if they're needed
+ # The inaccessible restriction is to ensure users don't waste hints on missions that they can already access
+ items_needed = self.resolve_items_needed(mission_id)
+ received_items = compute_received_items(self.ctx)
+ for item_id, amount in items_needed.items():
+ # If we have already received or hinted enough of this item, skip it
+ if received_items[item_id] + hinted_item_ids[item_id] >= amount:
+ continue
+ if width_override is None:
+ width_override = dp(500)
+ item_name = self.ctx.item_names.lookup_in_game(item_id)
+ label_text = f"Hint Required Item: {item_name}"
+
+ def hint_and_close():
+ self.ctx.command_processor(self.ctx)(f"!hint {item_name}")
+ menu.dismiss()
+
+ menu_items.append({
+ "text": label_text,
+ "on_release": hint_and_close,
+ })
+
+ menu = MDDropdownMenu(
+ caller=button,
+ items=menu_items,
+ **({"width": width_override} if width_override else {}),
+ )
+ menu.open()
+
+ def resolve_items_needed(self, mission_id: int) -> Counter[int]:
+ def resolve_rule_to_items(rule: RuleData) -> Counter[int]:
+ if isinstance(rule, SubRuleRuleData):
+ all_items = Counter()
+ for sub_rule in rule.sub_rules:
+ # Take max of each item across all sub-rules
+ all_items |= resolve_rule_to_items(sub_rule)
+ return all_items
+ elif isinstance(rule, ItemRuleData):
+ return Counter(rule.item_ids)
+ else:
+ return Counter()
+
+ rules = self.ctx.mission_id_to_entry_rules[mission_id]
+ # Take max value of each item across all rules using '|'
+ return (resolve_rule_to_items(rules.mission_rule) |
+ resolve_rule_to_items(rules.layout_rule) |
+ resolve_rule_to_items(rules.campaign_rule))
+
+ def finish_launching(self, dt):
+ self.launching = False
+
+ def sort_unfinished_locations(self, mission_id: int) -> Tuple[List[Tuple[LocationType, str, int]], List[str], int]:
+ locations: List[Tuple[LocationType, str, int]] = []
+ location_name_to_index: Dict[str, int] = {}
+ for loc in self.ctx.locations_for_mission_id(mission_id):
+ if loc in self.ctx.missing_locations:
+ location_name = self.ctx.location_names.lookup_in_game(loc)
+ location_name_to_index[location_name] = len(locations)
+ locations.append((
+ lookup_location_id_to_type[loc],
+ location_name,
+ loc,
+ ))
+ count = len(locations)
+
+ plando_locations = []
+ elements_to_remove: Set[Tuple[LocationType, str, int]] = set()
+ for plando_loc_name in self.ctx.plando_locations:
+ if plando_loc_name in location_name_to_index:
+ elements_to_remove.add(locations[location_name_to_index[plando_loc_name]])
+ plando_locations.append(plando_loc_name)
+ for element in elements_to_remove:
+ locations.remove(element)
+
+ return sorted(locations), plando_locations, count
+
+ def any_valuable_locations(self, locations: List[Tuple[LocationType, str, int]]) -> bool:
+ for location_type, _, location_id in locations:
+ if (self.ctx.location_inclusions[location_type] == LocationInclusion.option_enabled
+ and all(
+ self.ctx.location_inclusions_by_flag[flag] == LocationInclusion.option_enabled
+ for flag in lookup_location_id_to_flags[location_id].values()
+ )
+ ):
+ return True
+ return False
+
+ def get_location_type_title(self, location_type: LocationType) -> str:
+ title = location_type.name.title().replace("_", " ")
+ if self.ctx.location_inclusions[location_type] == LocationInclusion.option_disabled:
+ title += " (Nothing)"
+ elif self.ctx.location_inclusions[location_type] == LocationInclusion.option_filler:
+ title += " (Filler)"
+ else:
+ title += ""
+ return title
+
+ def is_scoutable(self, remaining_locations, mission_available: bool, layout_locked: bool, campaign_locked: bool) -> bool:
+ if self.ctx.mission_order_scouting == MissionOrderScouting.option_all:
+ return True
+ elif self.ctx.mission_order_scouting == MissionOrderScouting.option_campaign and not campaign_locked:
+ return True
+ elif self.ctx.mission_order_scouting == MissionOrderScouting.option_layout and not layout_locked:
+ return True
+ elif self.ctx.mission_order_scouting == MissionOrderScouting.option_available and mission_available:
+ return True
+ elif self.ctx.mission_order_scouting == MissionOrderScouting.option_completed and len([loc for loc in remaining_locations if loc[0] in (LocationType.VICTORY, LocationType.VICTORY_CACHE)]) == 0:
+ # Assuming that when a mission is completed, all victory location are removed
+ return True
+ else:
+ return False
+
+ def handle_scout_display(self, location_name: str) -> str:
+ if self.ctx.mission_item_classification is None:
+ return ""
+ # Only one information is provided for the victory locations of a mission
+ if " Cache (" in location_name:
+ location_name = location_name.split(" Cache")[0]
+ item_classification_key = self.ctx.mission_item_classification[location_name]
+ if ((ItemClassification.progression & item_classification_key)
+ and (ItemClassification.useful & item_classification_key)
+ ):
+ # Uncommon, but some games do this to show off that an item is super-important
+ # This can also happen on a victory display if the cache holds both progression and useful
+ return " [color=AF99EF](Useful+Progression)[/color]"
+ if ItemClassification.progression & item_classification_key:
+ return " [color=AF99EF](Progression)[/color]"
+ if ItemClassification.useful & item_classification_key:
+ return " [color=6D8BE8](Useful)[/color]"
+ if SC2World.settings.show_traps and ItemClassification.trap & item_classification_key:
+ return " [color=FA8072](Trap)[/color]"
+ return " [color=00EEEE](Filler)[/color]"
+
+
+def start_gui(context: SC2Context):
+ context.ui = SC2Manager(context)
+ context.ui_task = asyncio.create_task(context.ui.async_run(), name="UI")
+ import pkgutil
+ data = pkgutil.get_data(SC2World.__module__, "starcraft2.kv").decode()
+ Builder.load_string(data)
diff --git a/worlds/sc2/docs/contributors.md b/worlds/sc2/docs/contributors.md
index 5b62466d..b1e7e655 100644
--- a/worlds/sc2/docs/contributors.md
+++ b/worlds/sc2/docs/contributors.md
@@ -1,19 +1,66 @@
# Contributors
-Contibutors are listed with preferred or Discord names first, with github usernames prepended with an `@`
+Contributors are listed with preferred or Discord names first, with GitHub usernames prepended with an `@`.
+Within an update, contributors for earlier sections are not repeated for their contributions in later sections;
+code contributors also reported bugs and participated in beta testing.
-## Update 2024.0
+## Update 2025
### Code Changes
* Ziktofel (@Ziktofel)
* Salzkorn (@Salzkorn)
* EnvyDragon (@EnvyDragon)
-* Phanerus (@MatthewMarinets)
+* Phaneros (@MatthewMarinets)
+* Magnemania (@Magnemania)
+* Bones (@itsjustbones)
+* Gemster (@Gemster312)
+* SirChuckOfTheChuckles (@SirChuckOfTheChuckles)
+* Snarky (@Snarky)
+* MindHawk (@MindHawk)
+* Cristall (@Cristall)
+* WaikinDN (@WaikinDN)
+* blorp77 (@blorp77)
+* Dikhovinka (@AYaroslavskiy91)
+* Subsourian (@Subsourian)
+
+### Additional Assets
+* Alice Voltaire
+
+### Voice Acting
+@-handles in this section are social media contacts rather than specifically GitHub in this section.
+
+* Subsourian (@Subsourian) - Signifier, Slayer
+* GiantGrantGames (@GiantGrantGames) - Trireme
+* Phaneros (@MatthewMarinets)- Skirmisher
+* Durygathn - Dawnbringer
+* 7thAce (@7thAce) - Pulsar
+* Panicmoon (@panicmoon.bsky.social) - Skylord
+* JayborinoPlays (@Jayborino) - Oppressor
+
+## Maintenance of 2024 release
+* Ziktofel (@Ziktofel)
+* Phaneros (@MatthewMarinets)
+* Salzkorn (@Salzkorn)
+* neocerber (@neocerber)
+* Alchav (@Alchav)
+* Berserker (@Berserker66)
+* Exempt-Medic (@Exempt-Medic)
+
+And many members of the greater Archipelago community for core changes that affected the StarCraft 2 apworld.
+
+## Update 2024
+### Code Changes
+* Ziktofel (@Ziktofel)
+* Salzkorn (@Salzkorn)
+* EnvyDragon (@EnvyDragon)
+* Phaneros (@MatthewMarinets)
* Madi Sylveon (@MadiMadsen)
* Magnemania (@Magnemania)
* Subsourian (@Subsourian)
+* neocerber (@neocerber)
* Hopop (@hopop201)
* Alice Voltaire (@AliceVoltaire)
* Genderdruid (@ArchonofFail)
* CrazedCollie (@FoxOfWar)
+* Bones (@itsjustbones)
### Additional Beta testing and bug reports
* Varcklen (@Varcklen)
diff --git a/worlds/sc2/docs/custom_mission_orders_en.md b/worlds/sc2/docs/custom_mission_orders_en.md
new file mode 100644
index 00000000..6aba753b
--- /dev/null
+++ b/worlds/sc2/docs/custom_mission_orders_en.md
@@ -0,0 +1,1092 @@
+# Custom Mission Orders for Starcraft 2
+
+
+ Table of Contents
+
+- [Custom Mission Orders for Starcraft 2](#custom-mission-orders-for-starcraft-2)
+ - [What is this?](#what-is-this)
+ - [Basic structure](#basic-structure)
+ - [Interactions with other YAML options](#interactions-with-other-yaml-options)
+ - [Instructions for building a mission order](#instructions-for-building-a-mission-order)
+ - [Shared options](#shared-options)
+ - [Display Name](#display-name)
+ - [Unique name](#unique-name)
+ - [Goal](#goal)
+ - [Exit](#exit)
+ - [Entry rules](#entry-rules)
+ - [Unique progression track](#unique-progression-track)
+ - [Difficulty](#difficulty)
+ - [Mission Pool](#mission-pool)
+ - [Campaign Options](#campaign-options)
+ - [Preset](#preset)
+ - [Campaign Presets](#campaign-presets)
+ - [Static Presets](#static-presets)
+ - [Preset Options](#preset-options)
+ - [Missions](#missions)
+ - [Shuffle Raceswaps](#shuffle-raceswaps)
+ - [Keys](#keys)
+ - [Golden Path](#golden-path)
+ - [Layout Options](#layout-options)
+ - [Type](#type)
+ - [Size](#size)
+ - [Missions](#missions-1)
+ - [Mission Slot Options](#mission-slot-options)
+ - [Entrance](#entrance)
+ - [Empty](#empty)
+ - [Next](#next)
+ - [Victory Cache](#victory-cache)
+ - [Layout Types](#layout-types)
+ - [Column](#column)
+ - [Grid](#grid)
+ - [Grid Index Functions](#grid-index-functions)
+ - [point(x, y)](#pointx-y)
+ - [rect(x, y, width, height)](#rectx-y-width-height)
+ - [Canvas](#canvas)
+ - [Canvas Index Functions](#canvas-index-functions)
+ - [group(character)](#groupcharacter)
+ - [Hopscotch](#hopscotch)
+ - [Hopscotch Index Functions](#hopscotch-index-functions)
+ - [top](#top)
+ - [bottom](#bottom)
+ - [middle](#middle)
+ - [corner(index)](#cornerindex)
+ - [Gauntlet](#gauntlet)
+ - [Blitz](#blitz)
+ - [Blitz Index Functions](#blitz-index-functions)
+ - [row(height)](#rowheight)
+
+
+## What is this?
+
+This is usage documentation for the `custom_mission_order` YAML option for Starcraft 2. You can enable Custom Mission Orders by setting `mission_order: custom` in your YAML.
+
+You will need to know how to write a YAML before engaging with this feature, and should read the [Archipelago YAML documentation](https://archipelago.gg/tutorial/Archipelago/advanced_settings/en) before continuing here.
+
+Every example in this document should be valid to generate.
+
+## Basic structure
+
+Custom Mission Orders consist of three kinds of structures:
+- The mission order itself contains campaigns (like Wings of Liberty)
+- Campaigns contain layouts (like Mar Sara)
+- Layouts contain mission slots (like Liberation Day)
+
+As a note, layouts are also called questlines in the UI. Layouts and questlines refer to the same thing, though this document will only use layouts.
+
+To illustrate, the following is what the default custom mission order currently looks like. If you're not sure what some options mean, they will be explained in more depth later.
+```yaml
+ custom_mission_order:
+ # This is a campaign, defined by its name
+ Default Campaign:
+ # The campaign's name as displayed in the client
+ display_name: "null"
+ # Whether this campaign must have a unique name in the client
+ unique_name: false
+ # Conditions that must be fulfilled to access this campaign
+ entry_rules: []
+ # Whether beating this campaign is part of the world's goal
+ goal: true
+ # The lowest difficulty of missions in this campaign
+ min_difficulty: relative
+ # The highest difficulty of missions in this campaign
+ max_difficulty: relative
+ # This is a special layout that defines defaults
+ # for other layouts in the campaign
+ global:
+ # The layout's name as displayed in the client
+ display_name: "null"
+ # Whether this layout must have a unique name in the client
+ unique_name: false
+ # Whether beating this layout is part of the world's goal
+ goal: false
+ # Whether this layout must be beaten to beat the campaign
+ exit: false
+ # Conditions that must be fulfilled to access this layout
+ entry_rules: []
+ # Which missions are allowed to appear in this layout
+ mission_pool:
+ - all missions
+ # The lowest difficulty of missions in this layout
+ min_difficulty: relative
+ # The highest difficulty of missions in this layout
+ max_difficulty: relative
+ # Used for overwriting default options of mission slots,
+ # which are set by the layout type (see Default Layout)
+ missions: []
+ # This is a regular layout, defined by its name
+ Default Layout:
+ # This defines how missions in the layout are organized,
+ # as well as how they connect to one another
+ type: grid
+ # How many total missions should appear in this layout
+ size: 9
+```
+This default option also defines default values (though you won't get the Default Campaign and Default Layout), so you can omit the options you don't want to change in your own YAML.
+
+Notably however, layouts are required to have both a `type` and a `size`, but neither have defaults. You must define both of them for every layout, either through your own `global` layout, or in the options of every individual layout.
+
+If you want multiple campaigns or layouts, it would look like this:
+```yaml
+ custom_mission_order:
+ My first campaign!:
+ # Campaign options here
+ global: # Can be omitted if the above defaults work for you
+ # Makes all the other layouts only have Terran missions
+ mission_pool:
+ - terran missions
+ # Other layout options here
+ My first layout:
+ # Defining at least type and size of a layout is mandatory
+ type: column
+ size: 3
+ # Other layout options here
+ my second layout:
+ type: grid
+ size: 4
+ layout number 3:
+ type: column
+ size: 3
+ # etc.
+ Second campaign:
+ the other first layout:
+ type: grid
+ size: 10
+ # etc.
+```
+If you don't want to have a campaign container for your layouts, you can also forego the campaign layer like this:
+```yaml
+ custom_mission_order:
+ Example campaign-level layout:
+ # Make sure to always declare these two, like with regular layouts
+ type: column
+ size: 3
+
+ # Regular campaigns and campaign-less layouts
+ # can be mixed however you want
+ Some Campaign:
+ Some Layout:
+ type: column
+ size: 3
+```
+It is also possible to access mission slots by their index, which is defined by the type of the layout they are in. The below shows an example of how to access a mission slot, as well as the defaults for their options.
+
+However, keep in mind that layout types will set their own options for specific slots, overwriting the below defaults, and using this option in turn overwrites the values set by layout types. As before, the options are explained in more depth later.
+```yaml
+ custom_mission_order:
+ My Campaign:
+ My Layout:
+ type: column
+ size: 5
+ missions:
+ # 0 is often the layout's starting mission
+ # Any index between 0 and (size - 1) is accessible
+ - index: 0
+ # Whether this mission is part of the world's goal
+ goal: false
+ # Whether this mission is accessible as soon as the
+ # layout is accessible
+ entrance: false
+ # Whether this mission is required to beat the layout
+ exit: false
+ # Whether this slot contains a mission at all
+ empty: false
+ # Conditions that must be fulfilled to access this mission
+ entry_rules: []
+ # Which missions in the layout are unlocked by this mission
+ # This is normally set by the layout's type
+ next: []
+ # Which missions are allowed to appear in this slot
+ # If not defined, the slot inherits the layout's pool
+ mission_pool:
+ - all missions
+ # Which specific difficulty this mission should have
+ difficulty: relative
+```
+## Interactions with other YAML options
+
+Custom Mission Orders respect all the options that change which missions can appear as if the options' relevant missions had been excluded. For example, `selected_races: protoss` is equivalent to excluding all Zerg and Terran missions, and `enabled_campaigns: ["Wings of Liberty"]` is equivalent to excluding all but WoL missions.
+
+This means that if you want total control over available missions in your mission order via `mission_pool`s, you should enable all races and campaigns and leave your `excluded_missions` list empty, but you can also use these options to get rid of particular missions you never want and can then ignore those missions in your `mission_pool`s.
+
+There are, however, several options that are ignored by Custom Mission Orders:
+- `mission_order`, because it has to be `custom` for your Custom Mission Order to apply
+- `maximum_campaign_size`, because you determine the size of the mission order via layout `size` attributes
+- `two_start_positions`, which you can instead determine in individual layouts of the appropriate `type`s (see Grid and Hopscotch sections below)
+- `key_mode`, which you can still specify for presets (see Campaign Presets section), and can otherwise manually set up using Item entry rules
+
+## Instructions for building a mission order
+
+Normally when you play a Starcraft 2 world, you have a table of missions in the Archipelago SC2 Client, and hovering over a mission tells you what missions are required to access it. This is still true for custom mission orders, but you now have control over the way missions are visually organized, as well as their access requirements.
+
+This section is meant to offer some guidance when making your own mission order for the first time.
+
+To begin making your own mission order, think about how you visually want your missions laid out. This should inform the layout `type`s you want to use, and give you some idea about the overall structure of your mission order.
+
+For example, if you want to make a custom campaign like the vanilla ones, you will want a lot of layouts of [`type: column`](#column). If you want a Hopscotch layout with certain missions or races, a single layout with [`type: hopscotch`](#hopscotch) will suffice. If you want to play through a funny shape, you will want to draw with a [`type: canvas`](#canvas). If you just want to make a minor change to a vanilla campaign, you will want to start with a [`preset` campaign](#preset).
+
+The natural flow of a mission order is defined by the types of its layouts. It makes sense for a mission to unlock its neighbors, it makes sense for a Hopscotch layout to wrap around the sides, and it makes sense for a Column's final mission to be at the bottom. Layout types create their flow by setting [`next`](#next), [`entrance`](#entrance), [`exit`](#exit), and [`entry_rules`](#entry-rules) on missions. More on these in a little bit.
+
+Layout types dictate their own visual structure, and will only rarely make mission slots with `empty: true`. If you want a certain shape that's not exactly like an existing type, you can pick a type with more slots than you want and remove the extras by setting `empty: true` on them.
+
+With the basic setup in place, you should decide on what the goal of your mission order is. By default every campaign has `goal: true`, meaning all campaigns must be beaten to complete the world. You can additionally set `goal: true` on layouts and mission slots to require them to be beaten as well. If you set `goal: false` on everything, the mission order will default to setting the last campaign (lowest in your YAML) as the goal.
+
+After deciding on a goal, you can complicate your way towards it. At the start of a world, the only accessible missions in the mission order are all the missions marked `entrance: true`. When you beat one of these missions, it unlocks all the missions in the beaten mission's `next` list. This process repeats until all the missions are accessible.
+
+If this behavior isn't enough for your planned mission order, you can interrupt the natural flow of layout types using `entry_rules` in combination with `exit`.
+
+When this document refers to "beating" something, it means the following:
+- A mission is beaten if it is accessible and its victory location is checked.
+- Beating a layout means beating all the missions in the layout with `exit: true`
+- Beating a campaign means beating all the layouts in the campaign with `exit: true`
+
+Note victory checks may be claimed by someone else running `!collect` in a multiworld and receiving an item on a victory check. Collecting victory cache checks do not count, only victory checks.
+
+Layouts will have their default exit missions set by the layout type. If you don't want to use this default, you will have to manually set `exit: false` on the default exits. Campaigns default to using the last layout in them (the lowest in your YAML) as their exit, but only if you don't manually set `exit: true` on a layout.
+
+Using `entry_rules`, you can make a mission require beating things other than those missions whose `next` points to it, and you can make layouts and campaigns not available from the start.
+
+Note that `entry_rules` are an addition to the `next` behavior. If you want a mission to completely ignore the natural flow and only use your `entry_rules`, simply set `entrance: true` on it.
+
+Please see the [`entry_rules`](#entry-rules) section below for available rules and examples.
+
+With your playthrough sufficiently complicated, it only remains to add flavor to your mission order by changing [`mission_pool`](#mission-pool) and [`difficulty`](#difficulty) options as you like them. These options are also explained below.
+
+To summarize:
+- Start by setting up campaigns and layouts with appropriate layout `type`s and `size`s
+- Decide the mission order's `goal`s
+- Customize access requirements as desired:
+ - Use `entrance`, `next`, and `empty` on mission slots to change the unlocking order of missions within a layout
+ - Use `entry_rules` in combination with `exit` to add additional restrictions to missions, layouts, and campaigns
+- Use the `mission_pool` and `difficulty` options to add flavor
+- Finally, generate and have fun!
+
+## Shared options
+
+These are the options that are shared between at least two of campaigns, layouts and missions. All the options below are listed with their defaults.
+
+---
+### Display Name
+```yaml
+# For campaigns and layouts
+display_name: "null"
+```
+As shown in the examples, every campaign and layout is defined with a name in your YAML. This name is used to find campaigns and layouts within the mission order (see `entry_rules` section), and by default (meaning with `display_name: "null"`) it is also shown in the client.
+
+This option changes the name shown in the client without affecting the definition name.
+
+There are two special use cases for this option:
+```yaml
+# This means the campaign or layout
+# will not have a title in the client
+display_name: ""
+```
+```yaml
+# This will randomly pick a name from the given list of options
+display_name:
+ - My First Choice
+ - My Second Choice
+ - My Third Choice
+```
+
+---
+### Unique name
+```yaml
+# For campaigns and layouts
+unique_name: false
+```
+This option prevents names from showing up multiple times in the client. It is recommended to be used in combination with lists of `display_name`s to prevent the generator from picking duplicate names.
+
+---
+### Goal
+```yaml
+# For campaigns
+goal: true
+```
+```yaml
+# For layouts and missions
+goal: false
+```
+This determines whether the campaign, layout or mission is required to beat the world. If you turn this off for everything, the last defined campaign (meaning the lowest one in your YAML) is chosen by default.
+
+---
+### Exit
+```yaml
+# For layouts and missions
+exit: false
+```
+This determines whether beating the mission is required to beat its parent layout, and whether beating the layout is required to beat its parent campaign.
+
+---
+### Entry rules
+```yaml
+# For campaigns, layouts, and missions
+entry_rules: []
+```
+This defines access restrictions for parts of the mission order.
+
+These are the available rules:
+```yaml
+entry_rules:
+ # Beat these things ("Beat rule")
+ - scope: []
+ # Beat X amount of missions from these things ("Count rule")
+ - scope: []
+ amount: -1
+ # Find these items ("Item rule")
+ - items: {}
+ # Fulfill X amount of other conditions ("Subrule rule")
+ - rules: []
+ amount: -1
+```
+Note that Item rules take both a name and amount for each item (see the example below). In general this rule treats items like the `locked_items` option, including that it will override `excluded_items`, but as a notable difference all items required for Item rules are marked as progression. If multiple Item rules require the same item, the largest required amount will be locked, **not** the sum of all amounts.
+
+Additionally, Item rules accept a special item:
+```yaml
+entry_rules:
+ - items:
+ Key: 1
+```
+This is a generic item that is converted to a key item for the specific scope it is under. Missions get Mission Keys, layouts get Questline Keys, and campaigns get Campaign Keys. If you want to know which specific key is created (for example to tie multiple unlocks to the same key), you can generate a test game and check in the client.
+
+You can also use one of the following key items for this purpose:
+
+ Custom keys
+
+ - `Terran Key`
+ - `Zerg Key`
+ - `Protoss Key`
+ - `Raynor Key`
+ - `Tychus Key`
+ - `Swann Key`
+ - `Stetmann Key`
+ - `Hanson Key`
+ - `Nova Key`
+ - `Tosh Key`
+ - `Valerian Key`
+ - `Warfield Key`
+ - `Mengsk Key`
+ - `Han Key`
+ - `Horner Key`
+ - `Kerrigan Key`
+ - `Zagara Key`
+ - `Abathur Key`
+ - `Yagdra Key`
+ - `Kraith Key`
+ - `Slivan Key`
+ - `Zurvan Key`
+ - `Brakk Key`
+ - `Stukov Key`
+ - `Dehaka Key`
+ - `Niadra Key`
+ - `Izsha Key`
+ - `Artanis Key`
+ - `Zeratul Key`
+ - `Tassadar Key`
+ - `Karax Key`
+ - `Vorazun Key`
+ - `Alarak Key`
+ - `Fenix Key`
+ - `Urun Key`
+ - `Mohandar Key`
+ - `Selendis Key`
+ - `Rohana Key`
+ - `Reigel Key`
+ - `Davis Key`
+ - `Ji'nara Key`
+
+
+
+These keys will never be used by the generator unless you specify them yourself.
+
+There is also a special type of key:
+```yaml
+entry_rules:
+ - items:
+ # These two forms are equivalent
+ Progressive Key: 5
+ Progressive Key 5: 1
+```
+Progressive keys come in two forms: `Progressive Key: