Skip to content

Commit

Permalink
SC2: Maw of the Void raceswaps
Browse files Browse the repository at this point in the history
  • Loading branch information
EnvyDragon committed Nov 20, 2024
1 parent a790d43 commit d7590ef
Show file tree
Hide file tree
Showing 5 changed files with 122 additions and 6 deletions.
6 changes: 3 additions & 3 deletions worlds/sc2/item/item_tables.py
Original file line number Diff line number Diff line change
Expand Up @@ -1191,7 +1191,7 @@ def get_full_item_list():
classification=ItemClassification.progression),
item_names.INFESTED_LIBERATOR:
ItemData(23 + SC2HOTS_ITEM_ID_OFFSET, ZergItemType.Unit, 22, SC2Race.ZERG,
classification=ItemClassification.useful),
classification=ItemClassification.progression),
item_names.INFESTED_MISSILE_TURRET:
ItemData(24 + SC2HOTS_ITEM_ID_OFFSET, ZergItemType.Unit, 23, SC2Race.ZERG,
classification=ItemClassification.progression),
Expand Down Expand Up @@ -1274,7 +1274,7 @@ def get_full_item_list():
item_names.HYDRALISK_MUSCULAR_AUGMENTS:
ItemData(229 + SC2HOTS_ITEM_ID_OFFSET, ZergItemType.Mutation_1, 29, SC2Race.ZERG, parent_item=item_names.HYDRALISK),
item_names.HYDRALISK_RESOURCE_EFFICIENCY:
ItemData(230 + SC2HOTS_ITEM_ID_OFFSET, ZergItemType.Mutation_2, 0, SC2Race.ZERG, parent_item=item_names.HYDRALISK),
ItemData(230 + SC2HOTS_ITEM_ID_OFFSET, ZergItemType.Mutation_2, 0, SC2Race.ZERG, parent_item=item_names.HYDRALISK, classification=ItemClassification.progression),
item_names.BANELING_CENTRIFUGAL_HOOKS:
ItemData(231 + SC2HOTS_ITEM_ID_OFFSET, ZergItemType.Mutation_2, 1, SC2Race.ZERG,
parent_item=item_names.ZERGLING_BANELING_ASPECT),
Expand Down Expand Up @@ -1528,7 +1528,7 @@ def get_full_item_list():
ItemData(373 + SC2HOTS_ITEM_ID_OFFSET, ZergItemType.Mutation_5, 0, SC2Race.ZERG, parent_item=item_names.INFESTED_SIEGE_TANK),
item_names.INFESTED_DIAMONDBACK_PROGRESSIVE_FUNGAL_SNARE:
ItemData(374 + SC2HOTS_ITEM_ID_OFFSET, ZergItemType.Progressive, 2, SC2Race.ZERG,
parent_item=item_names.INFESTED_DIAMONDBACK, quantity=2),
parent_item=item_names.INFESTED_DIAMONDBACK, classification=ItemClassification.progression, quantity=2),
item_names.INFESTED_DIAMONDBACK_CONCENTRATED_SPEW:
ItemData(375 + SC2HOTS_ITEM_ID_OFFSET, ZergItemType.Mutation_5, 1, SC2Race.ZERG, parent_item=item_names.INFESTED_DIAMONDBACK),
item_names.FRIGHTFUL_FLESHWELDER_INFESTED_SIEGE_TANK:
Expand Down
80 changes: 80 additions & 0 deletions worlds/sc2/locations.py
Original file line number Diff line number Diff line change
Expand Up @@ -2783,6 +2783,86 @@ 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.MAW_OF_THE_VOID_Z.mission_name, "Victory", SC2WOL_LOC_ID_OFFSET + 2300, LocationType.VICTORY,
logic.zerg_maw_requirement
),
make_location_data(SC2Mission.MAW_OF_THE_VOID_Z.mission_name, "Landing Zone Cleared", SC2WOL_LOC_ID_OFFSET + 2301, LocationType.EXTRA),
make_location_data(SC2Mission.MAW_OF_THE_VOID_Z.mission_name, "Expansion Prisoners", SC2WOL_LOC_ID_OFFSET + 2302, LocationType.VANILLA,
logic.zerg_maw_requirement
),
make_location_data(SC2Mission.MAW_OF_THE_VOID_Z.mission_name, "South Close Prisoners", SC2WOL_LOC_ID_OFFSET + 2303, LocationType.VANILLA,
logic.zerg_maw_requirement
),
make_location_data(SC2Mission.MAW_OF_THE_VOID_Z.mission_name, "South Far Prisoners", SC2WOL_LOC_ID_OFFSET + 2304, LocationType.VANILLA,
logic.zerg_maw_requirement
),
make_location_data(SC2Mission.MAW_OF_THE_VOID_Z.mission_name, "North Prisoners", SC2WOL_LOC_ID_OFFSET + 2305, LocationType.VANILLA,
logic.zerg_maw_requirement
),
make_location_data(SC2Mission.MAW_OF_THE_VOID_Z.mission_name, "Mothership", SC2WOL_LOC_ID_OFFSET + 2306, LocationType.EXTRA,
logic.zerg_maw_requirement
),
make_location_data(SC2Mission.MAW_OF_THE_VOID_Z.mission_name, "Expansion Rip Field Generator", SC2WOL_LOC_ID_OFFSET + 2307, LocationType.EXTRA,
logic.zerg_maw_requirement
),
make_location_data(SC2Mission.MAW_OF_THE_VOID_Z.mission_name, "Middle Rip Field Generator", SC2WOL_LOC_ID_OFFSET + 2308, LocationType.EXTRA,
logic.zerg_maw_requirement
),
make_location_data(SC2Mission.MAW_OF_THE_VOID_Z.mission_name, "Southeast Rip Field Generator", SC2WOL_LOC_ID_OFFSET + 2309, LocationType.EXTRA,
logic.zerg_maw_requirement
),
make_location_data(SC2Mission.MAW_OF_THE_VOID_Z.mission_name, "Stargate Rip Field Generator", SC2WOL_LOC_ID_OFFSET + 2310, LocationType.EXTRA,
logic.zerg_maw_requirement
),
make_location_data(SC2Mission.MAW_OF_THE_VOID_Z.mission_name, "Northwest Rip Field Generator", SC2WOL_LOC_ID_OFFSET + 2311, LocationType.CHALLENGE,
logic.zerg_maw_requirement
),
make_location_data(SC2Mission.MAW_OF_THE_VOID_Z.mission_name, "West Rip Field Generator", SC2WOL_LOC_ID_OFFSET + 2312, LocationType.CHALLENGE,
logic.zerg_maw_requirement
),
make_location_data(SC2Mission.MAW_OF_THE_VOID_Z.mission_name, "Southwest Rip Field Generator", SC2WOL_LOC_ID_OFFSET + 2313, LocationType.CHALLENGE,
logic.zerg_maw_requirement
),
make_location_data(SC2Mission.MAW_OF_THE_VOID_P.mission_name, "Victory", SC2WOL_LOC_ID_OFFSET + 2400, LocationType.VICTORY,
logic.protoss_maw_requirement
),
make_location_data(SC2Mission.MAW_OF_THE_VOID_P.mission_name, "Landing Zone Cleared", SC2WOL_LOC_ID_OFFSET + 2401, LocationType.EXTRA),
make_location_data(SC2Mission.MAW_OF_THE_VOID_P.mission_name, "Expansion Prisoners", SC2WOL_LOC_ID_OFFSET + 2402, LocationType.VANILLA,
lambda state: adv_tactics or logic.protoss_maw_requirement(state)
),
make_location_data(SC2Mission.MAW_OF_THE_VOID_P.mission_name, "South Close Prisoners", SC2WOL_LOC_ID_OFFSET + 2403, LocationType.VANILLA,
lambda state: adv_tactics or logic.protoss_maw_requirement(state)
),
make_location_data(SC2Mission.MAW_OF_THE_VOID_P.mission_name, "South Far Prisoners", SC2WOL_LOC_ID_OFFSET + 2404, LocationType.VANILLA,
logic.protoss_maw_requirement
),
make_location_data(SC2Mission.MAW_OF_THE_VOID_P.mission_name, "North Prisoners", SC2WOL_LOC_ID_OFFSET + 2405, LocationType.VANILLA,
logic.protoss_maw_requirement
),
make_location_data(SC2Mission.MAW_OF_THE_VOID_P.mission_name, "Mothership", SC2WOL_LOC_ID_OFFSET + 2406, LocationType.EXTRA,
logic.protoss_maw_requirement
),
make_location_data(SC2Mission.MAW_OF_THE_VOID_P.mission_name, "Expansion Rip Field Generator", SC2WOL_LOC_ID_OFFSET + 2407, LocationType.EXTRA,
lambda state: adv_tactics or logic.protoss_maw_requirement(state)
),
make_location_data(SC2Mission.MAW_OF_THE_VOID_P.mission_name, "Middle Rip Field Generator", SC2WOL_LOC_ID_OFFSET + 2408, LocationType.EXTRA,
logic.protoss_maw_requirement
),
make_location_data(SC2Mission.MAW_OF_THE_VOID_P.mission_name, "Southeast Rip Field Generator", SC2WOL_LOC_ID_OFFSET + 2409, LocationType.EXTRA,
logic.protoss_maw_requirement
),
make_location_data(SC2Mission.MAW_OF_THE_VOID_P.mission_name, "Stargate Rip Field Generator", SC2WOL_LOC_ID_OFFSET + 2410, LocationType.EXTRA,
logic.protoss_maw_requirement
),
make_location_data(SC2Mission.MAW_OF_THE_VOID_P.mission_name, "Northwest Rip Field Generator", SC2WOL_LOC_ID_OFFSET + 2411, LocationType.CHALLENGE,
logic.protoss_maw_requirement
),
make_location_data(SC2Mission.MAW_OF_THE_VOID_P.mission_name, "West Rip Field Generator", SC2WOL_LOC_ID_OFFSET + 2412, LocationType.CHALLENGE,
logic.protoss_maw_requirement
),
make_location_data(SC2Mission.MAW_OF_THE_VOID_P.mission_name, "Southwest Rip Field Generator", SC2WOL_LOC_ID_OFFSET + 2413, LocationType.CHALLENGE,
logic.protoss_maw_requirement
),
make_location_data(SC2Mission.DEVILS_PLAYGROUND_Z.mission_name, "Victory", SC2_RACESWAP_LOC_ID_OFFSET + 2500, LocationType.VICTORY,
lambda state: (
adv_tactics
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 @@ -111,7 +111,7 @@ def __init__(self, mission_id: int, name: str, campaign: SC2Campaign, area: str,
THE_DIG = 9, "The Dig", SC2Campaign.WOL, "Artifact", SC2Race.TERRAN, MissionPools.MEDIUM, "ap_the_dig", MissionFlag.Terran|MissionFlag.TimedDefense|MissionFlag.VsProtoss
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
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
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 (Terran)", SC2Campaign.WOL, "Covert", SC2Race.TERRAN, MissionPools.MEDIUM, "ap_welcome_to_the_jungle", MissionFlag.Terran|MissionFlag.VsProtoss|MissionFlag.HasRaceSwap
BREAKOUT = 15, "Breakout", SC2Campaign.WOL, "Covert", SC2Race.ANY, MissionPools.STARTER, "ap_breakout", MissionFlag.Terran|MissionFlag.NoBuild|MissionFlag.VsTerran
Expand Down Expand Up @@ -215,7 +215,8 @@ def __init__(self, mission_id: int, name: str, campaign: SC2Campaign, area: str,
# 100/101 - The Dig
# 102/103 - Moebius Factor
# 104/105 - Supernova
# 106/107 - Maw of the Void
MAW_OF_THE_VOID_Z = 106, "Maw of the Void (Zerg)", SC2Campaign.WOL, "Artifact", SC2Race.ZERG, MissionPools.HARD, "ap_maw_of_the_void", MissionFlag.Zerg|MissionFlag.VsProtoss|MissionFlag.RaceSwap
MAW_OF_THE_VOID_P = 107, "Maw of the Void (Protoss)", SC2Campaign.WOL, "Artifact", SC2Race.PROTOSS, MissionPools.MEDIUM, "ap_maw_of_the_void", MissionFlag.Protoss|MissionFlag.VsProtoss|MissionFlag.RaceSwap
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
WELCOME_TO_THE_JUNGLE_Z = 110, "Welcome to the Jungle (Zerg)", SC2Campaign.WOL, "Covert", SC2Race.ZERG, MissionPools.HARD, "ap_welcome_to_the_jungle", MissionFlag.Zerg|MissionFlag.VsProtoss|MissionFlag.RaceSwap
Expand Down
2 changes: 1 addition & 1 deletion worlds/sc2/options.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ class MaximumCampaignSize(Range):
"""
display_name = "Maximum Campaign Size"
range_start = 1
range_end = 143
range_end = 145
default = 83


Expand Down
35 changes: 35 additions & 0 deletions worlds/sc2/rules.py
Original file line number Diff line number Diff line change
Expand Up @@ -480,6 +480,41 @@ def terran_survives_rip_field(self, state: CollectionState) -> bool:
and self.terran_sustainable_mech_heal(state))
)

def zerg_maw_requirement(self, state: CollectionState) -> bool:
"""
Ability to cross defended gaps, deal with skytoss, and avoid costly losses.
:param state:
:return:
"""
return (
state.has_all({item_names.NYDUS_WORM, item_names.SWARM_QUEEN}, self.player)
and (self.morph_brood_lord(state) or self.morph_guardian(state))
and (
state.has_any({item_names.INFESTOR, item_names.CORRUPTOR, item_names.INFESTED_LIBERATOR}, self.player)
or self.morph_tyrannozor(state)
or state.has_all({item_names.SWARM_HOST, item_names.SWARM_HOST_RESOURCE_EFFICIENCY, item_names.SWARM_HOST_PRESSURIZED_GLANDS}, self.player)
or state.has_all({item_names.HYDRALISK, item_names.HYDRALISK_RESOURCE_EFFICIENCY}, self.player)
or state.has_all({item_names.INFESTED_DIAMONDBACK, item_names.INFESTED_DIAMONDBACK_PROGRESSIVE_FUNGAL_SNARE}, self.player)
)
and (state.has_any({item_names.ABERRATION, item_names.ROACH, item_names.ULTRALISK}, self.player)
or self.morph_tyrannozor(state)
or self.morph_igniter(state))
and self.zerg_competent_comp(state)
)

def protoss_maw_requirement(self, state: CollectionState) -> bool:
"""
Ability to cross defended gaps and deal with skytoss.
:param state:
:return:
"""
return (
(state.has(item_names.WARP_PRISM, self.player)
or (self.advanced_tactics(state) and state.has(item_names.ARBITER, self.player)))
and self.protoss_common_unit_anti_armor_air(state)
and self.protoss_fleet(state)
)

def terran_sustainable_mech_heal(self, state: CollectionState) -> bool:
"""
Can heal mech units without spending resources
Expand Down

0 comments on commit d7590ef

Please sign in to comment.