Skip to content

Commit

Permalink
Add Waking the Ancient race swaps
Browse files Browse the repository at this point in the history
  • Loading branch information
Ziktofel committed Nov 7, 2024
1 parent 11f0ad9 commit dd6d3cc
Show file tree
Hide file tree
Showing 3 changed files with 109 additions and 10 deletions.
112 changes: 105 additions & 7 deletions worlds/sc2/locations.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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,
Expand Down Expand Up @@ -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 = []
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 @@ -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
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion worlds/sc2/options.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ class MaximumCampaignSize(Range):
"""
display_name = "Maximum Campaign Size"
range_start = 1
range_end = 127
range_end = 129
default = 83


Expand Down

0 comments on commit dd6d3cc

Please sign in to comment.