From dd6d3cca97318b6fb3e152c5c450c7fc2a588cdd Mon Sep 17 00:00:00 2001 From: Ziktofel Date: Thu, 7 Nov 2024 17:46:34 +0100 Subject: [PATCH] Add Waking the Ancient race swaps --- worlds/sc2/locations.py | 112 ++++++++++++++++++++++++++++++++--- worlds/sc2/mission_tables.py | 5 +- worlds/sc2/options.py | 2 +- 3 files changed, 109 insertions(+), 10 deletions(-) diff --git a/worlds/sc2/locations.py b/worlds/sc2/locations.py index 807971554cd1..9be264ccdd7e 100644 --- a/worlds/sc2/locations.py +++ b/worlds/sc2/locations.py @@ -1240,7 +1240,7 @@ def get_locations(world: Optional['SC2World']) -> Tuple[LocationData, ...]: logic.zerg_competent_comp_basic_aa ), make_location_data(SC2Mission.WAKING_THE_ANCIENT.mission_name, "Victory", SC2HOTS_LOC_ID_OFFSET + 1000, LocationType.VICTORY, - logic.zerg_competent_comp_basic_aa + logic.zerg_competent_comp_competent_aa ), make_location_data(SC2Mission.WAKING_THE_ANCIENT.mission_name, "Center Essence Pool", SC2HOTS_LOC_ID_OFFSET + 1001, LocationType.VANILLA), make_location_data(SC2Mission.WAKING_THE_ANCIENT.mission_name, "East Essence Pool", SC2HOTS_LOC_ID_OFFSET + 1002, LocationType.VANILLA, @@ -1258,22 +1258,22 @@ def get_locations(world: Optional['SC2World']) -> Tuple[LocationData, ...]: or logic.zerg_competent_anti_air(state))) ), make_location_data(SC2Mission.WAKING_THE_ANCIENT.mission_name, "Finish Feeding", SC2HOTS_LOC_ID_OFFSET + 1004, LocationType.EXTRA, - logic.zerg_common_unit_competent_aa + logic.zerg_competent_comp_competent_aa ), make_location_data(SC2Mission.WAKING_THE_ANCIENT.mission_name, "South Proxy Primal Hive", SC2HOTS_LOC_ID_OFFSET + 1005, LocationType.CHALLENGE, - logic.zerg_common_unit_competent_aa + logic.zerg_competent_comp_competent_aa ), make_location_data(SC2Mission.WAKING_THE_ANCIENT.mission_name, "East Proxy Primal Hive", SC2HOTS_LOC_ID_OFFSET + 1006, LocationType.CHALLENGE, - logic.zerg_common_unit_competent_aa + logic.zerg_competent_comp_competent_aa ), make_location_data(SC2Mission.WAKING_THE_ANCIENT.mission_name, "South Main Primal Hive", SC2HOTS_LOC_ID_OFFSET + 1007, LocationType.CHALLENGE, - logic.zerg_common_unit_competent_aa + logic.zerg_competent_comp_competent_aa ), make_location_data(SC2Mission.WAKING_THE_ANCIENT.mission_name, "East Main Primal Hive", SC2HOTS_LOC_ID_OFFSET + 1008, LocationType.CHALLENGE, - logic.zerg_common_unit_competent_aa + logic.zerg_competent_comp_competent_aa ), make_location_data(SC2Mission.WAKING_THE_ANCIENT.mission_name, "Flawless", SC2HOTS_LOC_ID_OFFSET + 1009, LocationType.CHALLENGE, - logic.zerg_common_unit_competent_aa, + logic.zerg_competent_comp_competent_aa, flags=LocationFlag.PREVENTATIVE, ), make_location_data(SC2Mission.THE_CRUCIBLE.mission_name, "Victory", SC2HOTS_LOC_ID_OFFSET + 1100, LocationType.VICTORY, @@ -3733,6 +3733,104 @@ def get_locations(world: Optional['SC2World']) -> Tuple[LocationData, ...]: make_location_data(SC2Mission.OLD_SOLDIERS_P.mission_name, "Rich Mineral Expansion", SC2_RACESWAP_LOC_ID_OFFSET + 7607, LocationType.EXTRA, logic.protoss_competent_comp ), + make_location_data(SC2Mission.WAKING_THE_ANCIENT_T.mission_name, "Victory", SC2_RACESWAP_LOC_ID_OFFSET + 7700,LocationType.VICTORY, + lambda state: ( + logic.terran_competent_comp(state) + and logic.terran_common_unit(state) + and logic.terran_competent_anti_air(state) + ) + ), + make_location_data(SC2Mission.WAKING_THE_ANCIENT_T.mission_name, "Center Essence Pool", SC2_RACESWAP_LOC_ID_OFFSET + 7701, LocationType.VANILLA), + make_location_data(SC2Mission.WAKING_THE_ANCIENT_T.mission_name, "East Essence Pool", SC2_RACESWAP_LOC_ID_OFFSET + 7702, 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))) + ), + make_location_data(SC2Mission.WAKING_THE_ANCIENT_T.mission_name, "South Essence Pool", SC2_RACESWAP_LOC_ID_OFFSET + 7703, 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))) + ), + make_location_data(SC2Mission.WAKING_THE_ANCIENT_T.mission_name, "Finish Feeding", SC2_RACESWAP_LOC_ID_OFFSET + 7704, LocationType.EXTRA, + lambda state: ( + logic.terran_competent_comp(state) + and logic.terran_common_unit(state) + and logic.terran_competent_anti_air(state) + ) + ), + make_location_data(SC2Mission.WAKING_THE_ANCIENT_T.mission_name, "South Proxy Primal Hive", SC2_RACESWAP_LOC_ID_OFFSET + 7705, LocationType.CHALLENGE, + lambda state: ( + logic.terran_competent_comp(state) + and logic.terran_common_unit(state) + and logic.terran_competent_anti_air(state) + ) + ), + make_location_data(SC2Mission.WAKING_THE_ANCIENT_T.mission_name, "East Proxy Primal Hive", SC2_RACESWAP_LOC_ID_OFFSET + 7706, LocationType.CHALLENGE, + lambda state: ( + logic.terran_competent_comp(state) + and logic.terran_common_unit(state) + and logic.terran_competent_anti_air(state) + ) + ), + make_location_data(SC2Mission.WAKING_THE_ANCIENT_T.mission_name, "South Main Primal Hive", SC2_RACESWAP_LOC_ID_OFFSET + 7707, LocationType.CHALLENGE, + lambda state: ( + logic.terran_competent_comp(state) + and logic.terran_common_unit(state) + and logic.terran_competent_anti_air(state) + ) + ), + make_location_data(SC2Mission.WAKING_THE_ANCIENT_T.mission_name, "East Main Primal Hive", SC2_RACESWAP_LOC_ID_OFFSET + 7708, LocationType.CHALLENGE, + lambda state: ( + logic.terran_competent_comp(state) + and logic.terran_common_unit(state) + and logic.terran_competent_anti_air(state) + ) + ), + make_location_data(SC2Mission.WAKING_THE_ANCIENT_T.mission_name, "Flawless", SC2_RACESWAP_LOC_ID_OFFSET + 7709, LocationType.CHALLENGE, + lambda state: ( + logic.terran_competent_comp(state) + and logic.terran_common_unit(state) + and logic.terran_competent_anti_air(state) + ), + flags=LocationFlag.PREVENTATIVE, + ), + make_location_data(SC2Mission.WAKING_THE_ANCIENT_P.mission_name, "Victory", SC2_RACESWAP_LOC_ID_OFFSET + 7800, LocationType.VICTORY, + logic.protoss_competent_comp + ), + make_location_data(SC2Mission.WAKING_THE_ANCIENT_P.mission_name, "Center Essence Pool", SC2_RACESWAP_LOC_ID_OFFSET + 7801, LocationType.VANILLA), + make_location_data(SC2Mission.WAKING_THE_ANCIENT_P.mission_name, "East Essence Pool", SC2_RACESWAP_LOC_ID_OFFSET + 7802, LocationType.VANILLA, + lambda state: ( + logic.protoss_common_unit(state) + and logic.protoss_anti_light_anti_air(state)) + ), + make_location_data(SC2Mission.WAKING_THE_ANCIENT_P.mission_name, "South Essence Pool", SC2_RACESWAP_LOC_ID_OFFSET + 7803, LocationType.VANILLA, + lambda state: ( + logic.protoss_common_unit(state) + and logic.protoss_anti_light_anti_air(state)) + ), + make_location_data(SC2Mission.WAKING_THE_ANCIENT_P.mission_name, "Finish Feeding", SC2_RACESWAP_LOC_ID_OFFSET + 7804, LocationType.EXTRA, + logic.protoss_competent_comp + ), + make_location_data(SC2Mission.WAKING_THE_ANCIENT_P.mission_name, "South Proxy Primal Hive", SC2_RACESWAP_LOC_ID_OFFSET + 7805, LocationType.CHALLENGE, + logic.protoss_competent_comp + ), + make_location_data(SC2Mission.WAKING_THE_ANCIENT_P.mission_name, "East Proxy Primal Hive", SC2_RACESWAP_LOC_ID_OFFSET + 7806, LocationType.CHALLENGE, + logic.protoss_competent_comp + ), + make_location_data(SC2Mission.WAKING_THE_ANCIENT_P.mission_name, "South Main Primal Hive", SC2_RACESWAP_LOC_ID_OFFSET + 7807, LocationType.CHALLENGE, + logic.protoss_competent_comp + ), + make_location_data(SC2Mission.WAKING_THE_ANCIENT_P.mission_name, "East Main Primal Hive", SC2_RACESWAP_LOC_ID_OFFSET + 7808, LocationType.CHALLENGE, + logic.protoss_competent_comp + ), + make_location_data(SC2Mission.WAKING_THE_ANCIENT_P.mission_name, "Flawless", SC2_RACESWAP_LOC_ID_OFFSET + 7809, LocationType.CHALLENGE, + logic.protoss_competent_comp, + flags=LocationFlag.PREVENTATIVE, + ), ] beat_events = [] diff --git a/worlds/sc2/mission_tables.py b/worlds/sc2/mission_tables.py index edb52fd6492f..0e94d4e21ddd 100644 --- a/worlds/sc2/mission_tables.py +++ b/worlds/sc2/mission_tables.py @@ -142,7 +142,7 @@ def __init__(self, mission_id: int, name: str, campaign: SC2Campaign, area: str, DOMINATION = 36, "Domination (Zerg)", SC2Campaign.HOTS, "Char", SC2Race.ZERG, MissionPools.EASY, "ap_domination", MissionFlag.Zerg|MissionFlag.Kerrigan|MissionFlag.Countdown|MissionFlag.VsZerg|MissionFlag.HasRaceSwap FIRE_IN_THE_SKY = 37, "Fire in the Sky (Zerg)", SC2Campaign.HOTS, "Char", SC2Race.ZERG, MissionPools.MEDIUM, "ap_fire_in_the_sky", MissionFlag.Zerg|MissionFlag.Kerrigan|MissionFlag.Countdown|MissionFlag.VsTerran|MissionFlag.HasRaceSwap OLD_SOLDIERS = 38, "Old Soldiers (Zerg)", SC2Campaign.HOTS, "Char", SC2Race.ZERG, MissionPools.MEDIUM, "ap_old_soldiers", MissionFlag.Zerg|MissionFlag.Kerrigan|MissionFlag.VsTerran|MissionFlag.HasRaceSwap - WAKING_THE_ANCIENT = 39, "Waking the Ancient", SC2Campaign.HOTS, "Zerus", SC2Race.ZERG, MissionPools.MEDIUM, "ap_waking_the_ancient", MissionFlag.Zerg|MissionFlag.Kerrigan|MissionFlag.VsZerg + WAKING_THE_ANCIENT = 39, "Waking the Ancient (Zerg)", SC2Campaign.HOTS, "Zerus", SC2Race.ZERG, MissionPools.MEDIUM, "ap_waking_the_ancient", MissionFlag.Zerg|MissionFlag.Kerrigan|MissionFlag.VsZerg|MissionFlag.HasRaceSwap THE_CRUCIBLE = 40, "The Crucible", SC2Campaign.HOTS, "Zerus", SC2Race.ZERG, MissionPools.MEDIUM, "ap_the_crucible", MissionFlag.Zerg|MissionFlag.TimedDefense|MissionFlag.VsZerg SUPREME = 41, "Supreme", SC2Campaign.HOTS, "Zerus", SC2Race.ANY, MissionPools.MEDIUM, "ap_supreme", MissionFlag.Zerg|MissionFlag.Kerrigan|MissionFlag.NoBuild|MissionFlag.VsZerg INFESTED = 42, "Infested", SC2Campaign.HOTS, "Skygeirr Station", SC2Race.ZERG, MissionPools.MEDIUM, "ap_infested", MissionFlag.Zerg|MissionFlag.Kerrigan|MissionFlag.VsTerran @@ -257,7 +257,8 @@ def __init__(self, mission_id: int, name: str, campaign: SC2Campaign, area: str, FIRE_IN_THE_SKY_P = 157, "Fire in the Sky (Protoss)", SC2Campaign.HOTS, "Char", SC2Race.PROTOSS, MissionPools.MEDIUM, "ap_fire_in_the_sky", MissionFlag.Protoss|MissionFlag.Countdown|MissionFlag.VsTerran|MissionFlag.RaceSwap OLD_SOLDIERS_T = 158, "Old Soldiers (Terran)", SC2Campaign.HOTS, "Char", SC2Race.TERRAN, MissionPools.MEDIUM, "ap_old_soldiers", MissionFlag.Terran|MissionFlag.VsTerran|MissionFlag.RaceSwap OLD_SOLDIERS_P = 159, "Old Soldiers (Protoss)", SC2Campaign.HOTS, "Char", SC2Race.PROTOSS, MissionPools.MEDIUM, "ap_old_soldiers", MissionFlag.Protoss|MissionFlag.VsTerran|MissionFlag.RaceSwap - # 160/161 - Waking the Ancient + WAKING_THE_ANCIENT_T = 160, "Waking the Ancient (Terran)", SC2Campaign.HOTS, "Zerus", SC2Race.TERRAN, MissionPools.MEDIUM, "ap_waking_the_ancient", MissionFlag.Terran|MissionFlag.VsZerg|MissionFlag.RaceSwap + WAKING_THE_ANCIENT_P = 161, "Waking the Ancient (Protoss)", SC2Campaign.HOTS, "Zerus", SC2Race.PROTOSS, MissionPools.MEDIUM, "ap_waking_the_ancient", MissionFlag.Protoss|MissionFlag.VsZerg|MissionFlag.RaceSwap # 162/163 - The Crucible # 164/165 - Supreme # 166/167 - Infested diff --git a/worlds/sc2/options.py b/worlds/sc2/options.py index 9c2189b02e79..e2e535722c31 100644 --- a/worlds/sc2/options.py +++ b/worlds/sc2/options.py @@ -150,7 +150,7 @@ class MaximumCampaignSize(Range): """ display_name = "Maximum Campaign Size" range_start = 1 - range_end = 127 + range_end = 129 default = 83