Skip to content

Commit

Permalink
Add race swaps to The Crucible
Browse files Browse the repository at this point in the history
  • Loading branch information
Ziktofel committed Nov 7, 2024
1 parent dd6d3cc commit a029217
Show file tree
Hide file tree
Showing 3 changed files with 60 additions and 3 deletions.
56 changes: 56 additions & 0 deletions worlds/sc2/locations.py
Original file line number Diff line number Diff line change
Expand Up @@ -3831,6 +3831,62 @@ def get_locations(world: Optional['SC2World']) -> Tuple[LocationData, ...]:
logic.protoss_competent_comp,
flags=LocationFlag.PREVENTATIVE,
),
make_location_data(SC2Mission.THE_CRUCIBLE_T.mission_name, "Victory", SC2_RACESWAP_LOC_ID_OFFSET + 7900, LocationType.VICTORY,
lambda state: (
logic.terran_common_unit(state)
and logic.terran_defense_rating(state, True, True) >= 7
and logic.terran_competent_anti_air(state))
),
make_location_data(SC2Mission.THE_CRUCIBLE_T.mission_name, "Tyrannozor", SC2_RACESWAP_LOC_ID_OFFSET + 7901, LocationType.VANILLA,
lambda state: (
logic.terran_common_unit(state)
and logic.terran_defense_rating(state, True, True) >= 7
and logic.terran_competent_anti_air(state))
),
make_location_data(SC2Mission.THE_CRUCIBLE_T.mission_name, "Reach the Pool", SC2_RACESWAP_LOC_ID_OFFSET + 7902, LocationType.VANILLA),
make_location_data(SC2Mission.THE_CRUCIBLE_T.mission_name, "15 Minutes Remaining", SC2_RACESWAP_LOC_ID_OFFSET + 7903, LocationType.EXTRA,
lambda state: (
logic.terran_common_unit(state)
and logic.terran_defense_rating(state, True, True) >= 7
and logic.terran_competent_anti_air(state))
),
make_location_data(SC2Mission.THE_CRUCIBLE_T.mission_name, "5 Minutes Remaining", SC2_RACESWAP_LOC_ID_OFFSET + 7904, LocationType.EXTRA,
lambda state: (
logic.terran_common_unit(state)
and logic.terran_defense_rating(state, True, True) >= 7
and logic.terran_competent_anti_air(state))
),
make_location_data(SC2Mission.THE_CRUCIBLE_T.mission_name, "Pincer Attack", SC2_RACESWAP_LOC_ID_OFFSET + 7905, LocationType.EXTRA,
lambda state: (
logic.terran_common_unit(state)
and logic.terran_defense_rating(state, True, True) >= 7
and logic.terran_competent_anti_air(state))
),
make_location_data(SC2Mission.THE_CRUCIBLE_T.mission_name, "Yagdra Claims Brakk's Pack", SC2_RACESWAP_LOC_ID_OFFSET + 7906, LocationType.EXTRA,
lambda state: (
logic.terran_common_unit(state)
and logic.terran_defense_rating(state, True, True) >= 7
and logic.terran_competent_anti_air(state))
),
make_location_data(SC2Mission.THE_CRUCIBLE_P.mission_name, "Victory", SC2_RACESWAP_LOC_ID_OFFSET + 8000, LocationType.VICTORY,
logic.protoss_competent_comp
),
make_location_data(SC2Mission.THE_CRUCIBLE_P.mission_name, "Tyrannozor", SC2_RACESWAP_LOC_ID_OFFSET + 8001, LocationType.VANILLA,
logic.protoss_competent_comp
),
make_location_data(SC2Mission.THE_CRUCIBLE_P.mission_name, "Reach the Pool", SC2_RACESWAP_LOC_ID_OFFSET + 8002, LocationType.VANILLA),
make_location_data(SC2Mission.THE_CRUCIBLE_P.mission_name, "15 Minutes Remaining", SC2_RACESWAP_LOC_ID_OFFSET + 8003, LocationType.EXTRA,
logic.protoss_competent_comp
),
make_location_data(SC2Mission.THE_CRUCIBLE_P.mission_name, "5 Minutes Remaining", SC2_RACESWAP_LOC_ID_OFFSET + 8004, LocationType.EXTRA,
logic.protoss_competent_comp
),
make_location_data(SC2Mission.THE_CRUCIBLE_P.mission_name, "Pincer Attack", SC2_RACESWAP_LOC_ID_OFFSET + 8005, LocationType.EXTRA,
logic.protoss_competent_comp
),
make_location_data(SC2Mission.THE_CRUCIBLE_P.mission_name, "Yagdra Claims Brakk's Pack", SC2_RACESWAP_LOC_ID_OFFSET + 8006, LocationType.EXTRA,
logic.protoss_competent_comp
),
]

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 @@ -143,7 +143,7 @@ def __init__(self, mission_id: int, name: str, campaign: SC2Campaign, area: str,
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 (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
THE_CRUCIBLE = 40, "The Crucible (Zerg)", SC2Campaign.HOTS, "Zerus", SC2Race.ZERG, MissionPools.MEDIUM, "ap_the_crucible", MissionFlag.Zerg|MissionFlag.TimedDefense|MissionFlag.VsZerg|MissionFlag.HasRaceSwap
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
HAND_OF_DARKNESS = 43, "Hand of Darkness", SC2Campaign.HOTS, "Skygeirr Station", SC2Race.ZERG, MissionPools.HARD, "ap_hand_of_darkness", MissionFlag.Zerg|MissionFlag.Kerrigan|MissionFlag.Countdown|MissionFlag.VsTerran
Expand Down Expand Up @@ -259,7 +259,8 @@ def __init__(self, mission_id: int, name: str, campaign: SC2Campaign, area: str,
OLD_SOLDIERS_P = 159, "Old Soldiers (Protoss)", SC2Campaign.HOTS, "Char", SC2Race.PROTOSS, MissionPools.MEDIUM, "ap_old_soldiers", MissionFlag.Protoss|MissionFlag.VsTerran|MissionFlag.RaceSwap
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
THE_CRUCIBLE_T = 162, "The Crucible (Terran)", SC2Campaign.HOTS, "Zerus", SC2Race.TERRAN, MissionPools.MEDIUM, "ap_the_crucible", MissionFlag.Terran|MissionFlag.TimedDefense|MissionFlag.VsZerg|MissionFlag.RaceSwap
THE_CRUCIBLE_P = 163, "The Crucible (Protoss)", SC2Campaign.HOTS, "Zerus", SC2Race.PROTOSS, MissionPools.MEDIUM, "ap_the_crucible", MissionFlag.Protoss|MissionFlag.TimedDefense|MissionFlag.VsZerg|MissionFlag.RaceSwap
# 164/165 - Supreme
# 166/167 - Infested
# 168/169 - Hand of Darkness
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 = 129
range_end = 131
default = 83


Expand Down

0 comments on commit a029217

Please sign in to comment.