Skip to content

Commit

Permalink
SC2: devil's playground raceswaps
Browse files Browse the repository at this point in the history
  • Loading branch information
EnvyDragon committed Oct 20, 2024
1 parent 9810844 commit 7ba3f5a
Show file tree
Hide file tree
Showing 4 changed files with 73 additions and 4 deletions.
2 changes: 1 addition & 1 deletion worlds/sc2/items.py
Original file line number Diff line number Diff line change
Expand Up @@ -1668,7 +1668,7 @@ def get_full_item_list():
item_names.DEVOURING_ONES: ItemData(603 + SC2HOTS_ITEM_ID_OFFSET, ZergItemType.Mercenary, 3, SC2Race.ZERG, origin={"ext"}),
item_names.HUNTER_KILLERS: ItemData(604 + SC2HOTS_ITEM_ID_OFFSET, ZergItemType.Mercenary, 4, SC2Race.ZERG, origin={"ext"}),
item_names.TORRASQUE_MERC: ItemData(605 + SC2HOTS_ITEM_ID_OFFSET, ZergItemType.Mercenary, 5, SC2Race.ZERG, origin={"ext"}),
item_names.HUNTERLING: ItemData(606 + SC2HOTS_ITEM_ID_OFFSET, ZergItemType.Mercenary, 6, SC2Race.ZERG, origin={"ext"}),
item_names.HUNTERLING: ItemData(606 + SC2HOTS_ITEM_ID_OFFSET, ZergItemType.Mercenary, 6, SC2Race.ZERG, origin={"ext"}, classification=ItemClassification.progression),

# Misc Upgrades
item_names.OVERLORD_VENTRAL_SACS: ItemData(700 + SC2HOTS_ITEM_ID_OFFSET, ZergItemType.Evolution_Pit, 6, SC2Race.ZERG, origin={"bw"}, classification=ItemClassification.progression),
Expand Down
68 changes: 68 additions & 0 deletions worlds/sc2/locations.py
Original file line number Diff line number Diff line change
Expand Up @@ -2769,6 +2769,74 @@ def get_locations(world: Optional['SC2World']) -> Tuple[LocationData, ...]:
or logic.protoss_competent_anti_air(state)
))
),
make_location_data(SC2Mission.DEVILS_PLAYGROUND_Z.mission_name, "Victory", SC2_RACESWAP_LOC_ID_OFFSET + 2500, LocationType.VICTORY,
lambda state: (
adv_tactics
or logic.zerg_basic_anti_air(state)
and (logic.zerg_common_unit(state) or state.has(item_names.HUNTERLING, player)))
),
make_location_data(SC2Mission.DEVILS_PLAYGROUND_Z.mission_name, "Tosh's Miners", SC2_RACESWAP_LOC_ID_OFFSET + 2501, LocationType.VANILLA),
make_location_data(SC2Mission.DEVILS_PLAYGROUND_Z.mission_name, "Brutalisk", SC2_RACESWAP_LOC_ID_OFFSET + 2502, LocationType.VANILLA,
lambda state: adv_tactics or logic.zerg_common_unit(state) or state.has(item_names.HUNTERLING, player)
),
make_location_data(SC2Mission.DEVILS_PLAYGROUND_Z.mission_name, "North Reinforcements", SC2_RACESWAP_LOC_ID_OFFSET + 2503, LocationType.EXTRA),
make_location_data(SC2Mission.DEVILS_PLAYGROUND_Z.mission_name, "Middle Reinforcements", SC2_RACESWAP_LOC_ID_OFFSET + 2504, LocationType.EXTRA,
lambda state: adv_tactics or logic.zerg_common_unit(state) or state.has(item_names.HUNTERLING, player)
),
make_location_data(SC2Mission.DEVILS_PLAYGROUND_Z.mission_name, "Southwest Reinforcements", SC2_RACESWAP_LOC_ID_OFFSET + 2505, LocationType.EXTRA,
lambda state: adv_tactics or logic.zerg_common_unit(state) or state.has(item_names.HUNTERLING, player)
),
make_location_data(SC2Mission.DEVILS_PLAYGROUND_Z.mission_name, "Southeast Reinforcements", SC2_RACESWAP_LOC_ID_OFFSET + 2506, LocationType.EXTRA,
lambda state: (
adv_tactics
or logic.zerg_basic_anti_air(state)
and (logic.zerg_common_unit(state) or state.has(item_names.HUNTERLING, player)))
),
make_location_data(SC2Mission.DEVILS_PLAYGROUND_Z.mission_name, "East Reinforcements", SC2_RACESWAP_LOC_ID_OFFSET + 2507, LocationType.CHALLENGE,
lambda state: (
logic.zerg_basic_anti_air(state)
and (adv_tactics
or logic.zerg_common_unit(state)
or state.has(item_names.HUNTERLING, player)))
),
make_location_data(SC2Mission.DEVILS_PLAYGROUND_Z.mission_name, "Zerg Cleared", SC2_RACESWAP_LOC_ID_OFFSET + 2508, LocationType.CHALLENGE,
lambda state: (
logic.zerg_competent_anti_air(state)
and logic.zerg_common_unit(state))
),
make_location_data(SC2Mission.DEVILS_PLAYGROUND_P.mission_name, "Victory", SC2_RACESWAP_LOC_ID_OFFSET + 2600, LocationType.VICTORY,
lambda state: (
adv_tactics
or logic.protoss_basic_anti_air(state) and logic.protoss_common_unit(state))
),
make_location_data(SC2Mission.DEVILS_PLAYGROUND_P.mission_name, "Tosh's Miners", SC2_RACESWAP_LOC_ID_OFFSET + 2601, LocationType.VANILLA),
make_location_data(SC2Mission.DEVILS_PLAYGROUND_P.mission_name, "Brutalisk", SC2_RACESWAP_LOC_ID_OFFSET + 2602, LocationType.VANILLA,
lambda state: adv_tactics or logic.protoss_common_unit(state)
),
make_location_data(SC2Mission.DEVILS_PLAYGROUND_P.mission_name, "North Reinforcements", SC2_RACESWAP_LOC_ID_OFFSET + 2603, LocationType.EXTRA),
make_location_data(SC2Mission.DEVILS_PLAYGROUND_P.mission_name, "Middle Reinforcements", SC2_RACESWAP_LOC_ID_OFFSET + 2604, LocationType.EXTRA,
lambda state: adv_tactics or logic.protoss_common_unit(state)
),
make_location_data(SC2Mission.DEVILS_PLAYGROUND_P.mission_name, "Southwest Reinforcements", SC2_RACESWAP_LOC_ID_OFFSET + 2605, LocationType.EXTRA,
lambda state: adv_tactics or logic.protoss_common_unit(state)
),
make_location_data(SC2Mission.DEVILS_PLAYGROUND_P.mission_name, "Southeast Reinforcements", SC2_RACESWAP_LOC_ID_OFFSET + 2606, LocationType.EXTRA,
lambda state: (
adv_tactics
or logic.protoss_basic_anti_air(state)
and logic.protoss_common_unit(state))
),
make_location_data(SC2Mission.DEVILS_PLAYGROUND_P.mission_name, "East Reinforcements", SC2_RACESWAP_LOC_ID_OFFSET + 2607, LocationType.CHALLENGE,
lambda state: (
logic.protoss_basic_anti_air(state)
and (adv_tactics
or logic.protoss_common_unit(state)))
),
make_location_data(SC2Mission.DEVILS_PLAYGROUND_P.mission_name, "Zerg Cleared", SC2_RACESWAP_LOC_ID_OFFSET + 2608, LocationType.CHALLENGE,
lambda state: (
logic.protoss_competent_anti_air(state)
and (logic.protoss_common_unit(state)))
),
make_location_data(SC2Mission.THE_GREAT_TRAIN_ROBBERY_Z.mission_name, "Victory", SC2_RACESWAP_LOC_ID_OFFSET + 3300, LocationType.VICTORY,
lambda state: (
logic.zerg_great_train_robbery_train_stopper(state)
Expand Down
5 changes: 3 additions & 2 deletions worlds/sc2/mission_tables.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ def __init__(self, mission_id: int, name: str, campaign: SC2Campaign, area: str,
THE_MOEBIUS_FACTOR = 10, "The Moebius Factor", SC2Campaign.WOL, "Artifact", SC2Race.TERRAN, MissionPools.MEDIUM, "ap_the_moebius_factor", MissionFlag.Terran|MissionFlag.Countdown|MissionFlag.VsZerg
SUPERNOVA = 11, "Supernova", SC2Campaign.WOL, "Artifact", SC2Race.TERRAN, MissionPools.HARD, "ap_supernova", MissionFlag.Terran|MissionFlag.Countdown|MissionFlag.VsProtoss
MAW_OF_THE_VOID = 12, "Maw of the Void", SC2Campaign.WOL, "Artifact", SC2Race.TERRAN, MissionPools.HARD, "ap_maw_of_the_void", MissionFlag.Terran|MissionFlag.VsProtoss
DEVILS_PLAYGROUND = 13, "Devil's Playground", SC2Campaign.WOL, "Covert", SC2Race.TERRAN, MissionPools.EASY, "ap_devils_playground", MissionFlag.Terran|MissionFlag.VsZerg
DEVILS_PLAYGROUND = 13, "Devil's Playground (Terran)", SC2Campaign.WOL, "Covert", SC2Race.TERRAN, MissionPools.EASY, "ap_devils_playground", MissionFlag.Terran|MissionFlag.VsZerg|MissionFlag.HasRaceSwap
WELCOME_TO_THE_JUNGLE = 14, "Welcome to the Jungle", SC2Campaign.WOL, "Covert", SC2Race.TERRAN, MissionPools.MEDIUM, "ap_welcome_to_the_jungle", MissionFlag.Terran|MissionFlag.VsProtoss
BREAKOUT = 15, "Breakout", SC2Campaign.WOL, "Covert", SC2Race.ANY, MissionPools.STARTER, "ap_breakout", MissionFlag.Terran|MissionFlag.NoBuild|MissionFlag.VsTerran
GHOST_OF_A_CHANCE = 16, "Ghost of a Chance", SC2Campaign.WOL, "Covert", SC2Race.ANY, MissionPools.STARTER, "ap_ghost_of_a_chance", MissionFlag.Terran|MissionFlag.NoBuild|MissionFlag.VsTerran
Expand Down Expand Up @@ -216,7 +216,8 @@ def __init__(self, mission_id: int, name: str, campaign: SC2Campaign, area: str,
# 102/103 - Moebius Factor
# 104/105 - Supernova
# 106/107 - Maw of the Void
# 108/109 - Devil's Playground
DEVILS_PLAYGROUND_Z = 108, "Devil's Playground (Zerg)", SC2Campaign.WOL, "Covert", SC2Race.ZERG, MissionPools.EASY, "ap_devils_playground", MissionFlag.Zerg|MissionFlag.VsZerg|MissionFlag.RaceSwap
DEVILS_PLAYGROUND_P = 109, "Devil's Playground (Protoss)", SC2Campaign.WOL, "Covert", SC2Race.PROTOSS, MissionPools.EASY, "ap_devils_playground", MissionFlag.Protoss|MissionFlag.VsZerg|MissionFlag.RaceSwap
# 110/111 - Welcome to the Jungle
# 112/113 - Breakout
# 114/115 - Ghost of a Chance
Expand Down
2 changes: 1 addition & 1 deletion worlds/sc2/options.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ class MaximumCampaignSize(Range):
"""
display_name = "Maximum Campaign Size"
range_start = 1
range_end = 109
range_end = 111
default = 83


Expand Down

0 comments on commit 7ba3f5a

Please sign in to comment.