Skip to content

Commit

Permalink
SC2: The Dig raceswaps
Browse files Browse the repository at this point in the history
  • Loading branch information
EnvyDragon committed Nov 28, 2024
1 parent e9cf5c3 commit 50ec35d
Show file tree
Hide file tree
Showing 2 changed files with 142 additions and 2 deletions.
139 changes: 139 additions & 0 deletions worlds/sc2/locations.py
Original file line number Diff line number Diff line change
Expand Up @@ -2783,6 +2783,145 @@ def get_locations(world: Optional['SC2World']) -> Tuple[LocationData, ...]:
make_location_data(SC2Mission.SMASH_AND_GRAB_P.mission_name, "Defeat Kerrigan", SC2_RACESWAP_LOC_ID_OFFSET + 1607, LocationType.MASTERY,
logic.protoss_competent_comp
),
make_location_data(SC2Mission.THE_DIG_Z.mission_name, "Victory", SC2_RACESWAP_LOC_ID_OFFSET + 1700, LocationType.VICTORY,
lambda state: (
logic.zerg_basic_kerriganless_anti_air(state)
and logic.zerg_defense_rating(state, False, True) >= 8
and logic.zerg_defense_rating(state, False, False) >= 6
and logic.zerg_common_unit(state))
),
make_location_data(SC2Mission.THE_DIG_Z.mission_name, "Left Relic", SC2_RACESWAP_LOC_ID_OFFSET + 1701, LocationType.VANILLA,
lambda state: (
logic.zerg_defense_rating(state, False, False) >= 6
and logic.zerg_common_unit(state))
),
make_location_data(SC2Mission.THE_DIG_Z.mission_name, "Right Ground Relic", SC2_RACESWAP_LOC_ID_OFFSET + 1702, LocationType.VANILLA,
lambda state: (
logic.zerg_defense_rating(state, False, False) >= 6
and logic.zerg_common_unit(state))
),
make_location_data(SC2Mission.THE_DIG_Z.mission_name, "Right Cliff Relic", SC2_RACESWAP_LOC_ID_OFFSET + 1703, LocationType.VANILLA,
lambda state: (
logic.zerg_defense_rating(state, False, False) >= 6
and logic.zerg_common_unit(state))
),
make_location_data(SC2Mission.THE_DIG_Z.mission_name, "Moebius Base", SC2_RACESWAP_LOC_ID_OFFSET + 1704, LocationType.EXTRA),
make_location_data(SC2Mission.THE_DIG_Z.mission_name, "Door Outer Layer", SC2_RACESWAP_LOC_ID_OFFSET + 1705, LocationType.EXTRA,
lambda state: (
logic.zerg_defense_rating(state, False, False) >= 6
and logic.zerg_common_unit(state))
),
make_location_data(SC2Mission.THE_DIG_Z.mission_name, "Door Thermal Barrier", SC2_RACESWAP_LOC_ID_OFFSET + 1706, LocationType.EXTRA,
lambda state: (
logic.zerg_basic_kerriganless_anti_air(state)
and logic.zerg_defense_rating(state, False, True) >= 8
and logic.zerg_defense_rating(state, False, False) >= 6
and logic.zerg_common_unit(state))
),
make_location_data(SC2Mission.THE_DIG_Z.mission_name, "Cutting Through the Core", SC2_RACESWAP_LOC_ID_OFFSET + 1707, LocationType.EXTRA,
lambda state: (
logic.zerg_basic_kerriganless_anti_air(state)
and logic.zerg_defense_rating(state, False, True) >= 8
and logic.zerg_defense_rating(state, False, False) >= 6
and logic.zerg_common_unit(state))
),
make_location_data(SC2Mission.THE_DIG_Z.mission_name, "Structure Access Imminent", SC2_RACESWAP_LOC_ID_OFFSET + 1708, LocationType.EXTRA,
lambda state: (
logic.zerg_basic_kerriganless_anti_air(state)
and logic.zerg_defense_rating(state, False, True) >= 8
and logic.zerg_defense_rating(state, False, False) >= 6
and logic.zerg_common_unit(state))
),
make_location_data(SC2Mission.THE_DIG_Z.mission_name, "Northwestern Protoss Base", SC2_RACESWAP_LOC_ID_OFFSET + 1709, LocationType.MASTERY,
lambda state: (
logic.zerg_basic_kerriganless_anti_air(state)
and logic.zerg_defense_rating(state, False, True) >= 8
and logic.zerg_defense_rating(state, False, False) >= 6
and logic.zerg_common_unit(state)
and logic.zerg_base_buster(state))
),
make_location_data(SC2Mission.THE_DIG_Z.mission_name, "Northeastern Protoss Base", SC2_RACESWAP_LOC_ID_OFFSET + 1710, LocationType.MASTERY,
lambda state: (
logic.zerg_basic_kerriganless_anti_air(state)
and logic.zerg_defense_rating(state, False, True) >= 8
and logic.zerg_defense_rating(state, False, False) >= 6
and logic.zerg_common_unit(state)
and logic.zerg_base_buster(state))
),
make_location_data(SC2Mission.THE_DIG_Z.mission_name, "Eastern Protoss Base", SC2_RACESWAP_LOC_ID_OFFSET + 1711, LocationType.MASTERY,
lambda state: (
logic.zerg_basic_kerriganless_anti_air(state)
and logic.zerg_defense_rating(state, False, True) >= 8
and logic.zerg_defense_rating(state, False, False) >= 6
and logic.zerg_common_unit(state)
and logic.zerg_base_buster(state))
),
make_location_data(SC2Mission.THE_DIG_P.mission_name, "Victory", SC2_RACESWAP_LOC_ID_OFFSET + 1800, LocationType.VICTORY,
lambda state: (
logic.protoss_basic_anti_air(state)
and logic.protoss_defense_rating(state, False) >= 6
and logic.protoss_common_unit(state))
),
make_location_data(SC2Mission.THE_DIG_P.mission_name, "Left Relic", SC2_RACESWAP_LOC_ID_OFFSET + 1801, LocationType.VANILLA,
lambda state: (
logic.protoss_defense_rating(state, False) >= 6
and logic.protoss_common_unit(state))
),
make_location_data(SC2Mission.THE_DIG_P.mission_name, "Right Ground Relic", SC2_RACESWAP_LOC_ID_OFFSET + 1802, LocationType.VANILLA,
lambda state: (
logic.protoss_defense_rating(state, False) >= 6
and logic.protoss_common_unit(state))
),
make_location_data(SC2Mission.THE_DIG_P.mission_name, "Right Cliff Relic", SC2_RACESWAP_LOC_ID_OFFSET + 1803, LocationType.VANILLA,
lambda state: (
logic.protoss_defense_rating(state, False) >= 6
and logic.protoss_common_unit(state))
),
make_location_data(SC2Mission.THE_DIG_P.mission_name, "Moebius Base", SC2_RACESWAP_LOC_ID_OFFSET + 1804, LocationType.EXTRA),
make_location_data(SC2Mission.THE_DIG_P.mission_name, "Door Outer Layer", SC2_RACESWAP_LOC_ID_OFFSET + 1805, LocationType.EXTRA,
lambda state: (
logic.protoss_defense_rating(state, False) >= 6
and logic.protoss_common_unit(state))
),
make_location_data(SC2Mission.THE_DIG_P.mission_name, "Door Thermal Barrier", SC2_RACESWAP_LOC_ID_OFFSET + 1806, LocationType.EXTRA,
lambda state: (
logic.protoss_basic_anti_air(state)
and logic.protoss_defense_rating(state, False) >= 6
and logic.protoss_common_unit(state))
),
make_location_data(SC2Mission.THE_DIG_P.mission_name, "Cutting Through the Core", SC2_RACESWAP_LOC_ID_OFFSET + 1807, LocationType.EXTRA,
lambda state: (
logic.protoss_basic_anti_air(state)
and logic.protoss_defense_rating(state, False) >= 6
and logic.protoss_common_unit(state))
),
make_location_data(SC2Mission.THE_DIG_P.mission_name, "Structure Access Imminent", SC2_RACESWAP_LOC_ID_OFFSET + 1808, LocationType.EXTRA,
lambda state: (
logic.protoss_basic_anti_air(state)
and logic.protoss_defense_rating(state, False) >= 6
and logic.protoss_common_unit(state))
),
make_location_data(SC2Mission.THE_DIG_P.mission_name, "Northwestern Protoss Base", SC2_RACESWAP_LOC_ID_OFFSET + 1809, LocationType.MASTERY,
lambda state: (
logic.protoss_basic_anti_air(state)
and logic.protoss_defense_rating(state, False) >= 6
and logic.protoss_common_unit(state)
and (logic.protoss_competent_comp(state) or state.has(item_names.OBSERVER, player)))
),
make_location_data(SC2Mission.THE_DIG_P.mission_name, "Northeastern Protoss Base", SC2_RACESWAP_LOC_ID_OFFSET + 1810, LocationType.MASTERY,
lambda state: (
logic.protoss_basic_anti_air(state)
and logic.protoss_defense_rating(state, False) >= 6
and logic.protoss_common_unit(state)
and (logic.protoss_competent_comp(state) or state.has(item_names.OBSERVER, player)))
),
make_location_data(SC2Mission.THE_DIG_P.mission_name, "Eastern Protoss Base", SC2_RACESWAP_LOC_ID_OFFSET + 1811, LocationType.MASTERY,
lambda state: (
logic.protoss_basic_anti_air(state)
and logic.protoss_defense_rating(state, False) >= 6
and logic.protoss_common_unit(state)
and (logic.protoss_competent_comp(state) or state.has(item_names.OBSERVER, player)))
),
make_location_data(SC2Mission.SUPERNOVA_Z.mission_name, "Victory", SC2_RACESWAP_LOC_ID_OFFSET + 2100, LocationType.VICTORY,
lambda state: (
logic.zerg_competent_comp_competent_aa(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 @@ -108,7 +108,7 @@ def __init__(self, mission_id: int, name: str, campaign: SC2Campaign, area: str,
SAFE_HAVEN = 6, "Safe Haven (Terran)", SC2Campaign.WOL, "Colonist", SC2Race.TERRAN, MissionPools.MEDIUM, "ap_safe_haven", MissionFlag.Terran|MissionFlag.Countdown|MissionFlag.VsProtoss|MissionFlag.HasRaceSwap
HAVENS_FALL = 7, "Haven's Fall (Terran)", SC2Campaign.WOL, "Colonist", SC2Race.TERRAN, MissionPools.MEDIUM, "ap_havens_fall", MissionFlag.Terran|MissionFlag.VsZerg|MissionFlag.HasRaceSwap
SMASH_AND_GRAB = 8, "Smash and Grab (Terran)", SC2Campaign.WOL, "Artifact", SC2Race.TERRAN, MissionPools.EASY, "ap_smash_and_grab", MissionFlag.Terran|MissionFlag.Countdown|MissionFlag.VsPZ|MissionFlag.HasRaceSwap
THE_DIG = 9, "The Dig", SC2Campaign.WOL, "Artifact", SC2Race.TERRAN, MissionPools.MEDIUM, "ap_the_dig", MissionFlag.Terran|MissionFlag.TimedDefense|MissionFlag.VsProtoss
THE_DIG = 9, "The Dig (Terran)", SC2Campaign.WOL, "Artifact", SC2Race.TERRAN, MissionPools.MEDIUM, "ap_the_dig", MissionFlag.Terran|MissionFlag.TimedDefense|MissionFlag.VsProtoss|MissionFlag.HasRaceSwap
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 (Terran)", SC2Campaign.WOL, "Artifact", SC2Race.TERRAN, MissionPools.HARD, "ap_supernova", MissionFlag.Terran|MissionFlag.Countdown|MissionFlag.VsProtoss|MissionFlag.HasRaceSwap
MAW_OF_THE_VOID = 12, "Maw of the Void (Terran)", SC2Campaign.WOL, "Artifact", SC2Race.TERRAN, MissionPools.HARD, "ap_maw_of_the_void", MissionFlag.Terran|MissionFlag.VsProtoss|MissionFlag.HasRaceSwap
Expand Down Expand Up @@ -212,7 +212,8 @@ def __init__(self, mission_id: int, name: str, campaign: SC2Campaign, area: str,
HAVENS_FALL_P = 97, "Haven's Fall (Protoss)", SC2Campaign.WOL, "Colonist", SC2Race.PROTOSS, MissionPools.MEDIUM, "ap_havens_fall", MissionFlag.Protoss|MissionFlag.VsZerg|MissionFlag.RaceSwap
SMASH_AND_GRAB_Z = 98, "Smash and Grab (Zerg)", SC2Campaign.WOL, "Artifact", SC2Race.ZERG, MissionPools.MEDIUM, "ap_smash_and_grab", MissionFlag.Zerg|MissionFlag.Countdown|MissionFlag.VsPZ|MissionFlag.RaceSwap
SMASH_AND_GRAB_P = 99, "Smash and Grab (Protoss)", SC2Campaign.WOL, "Artifact", SC2Race.PROTOSS, MissionPools.EASY, "ap_smash_and_grab", MissionFlag.Protoss|MissionFlag.Countdown|MissionFlag.VsPZ|MissionFlag.RaceSwap
# 100/101 - The Dig
THE_DIG_Z = 100, "The Dig (Zerg)", SC2Campaign.WOL, "Artifact", SC2Race.ZERG, MissionPools.MEDIUM, "ap_the_dig", MissionFlag.Zerg|MissionFlag.TimedDefense|MissionFlag.VsProtoss|MissionFlag.RaceSwap
THE_DIG_P = 101, "The Dig (Protoss)", SC2Campaign.WOL, "Artifact", SC2Race.PROTOSS, MissionPools.MEDIUM, "ap_the_dig", MissionFlag.Protoss|MissionFlag.TimedDefense|MissionFlag.VsProtoss|MissionFlag.RaceSwap
# 102/103 - Moebius Factor
SUPERNOVA_Z = 104, "Supernova (Zerg)", SC2Campaign.WOL, "Artifact", SC2Race.ZERG, MissionPools.HARD, "ap_supernova", MissionFlag.Zerg|MissionFlag.Countdown|MissionFlag.VsProtoss|MissionFlag.RaceSwap
SUPERNOVA_P = 105, "Supernova (Protoss)", SC2Campaign.WOL, "Artifact", SC2Race.PROTOSS, MissionPools.HARD, "ap_supernova", MissionFlag.Protoss|MissionFlag.Countdown|MissionFlag.VsProtoss|MissionFlag.RaceSwap
Expand Down

0 comments on commit 50ec35d

Please sign in to comment.