From d7590ef541918b4b4fc5754d4cdea16cd7c01213 Mon Sep 17 00:00:00 2001 From: EnvyDragon <138727357+EnvyDragon@users.noreply.github.com> Date: Tue, 19 Nov 2024 22:10:09 -0500 Subject: [PATCH 1/7] SC2: Maw of the Void raceswaps --- worlds/sc2/item/item_tables.py | 6 +-- worlds/sc2/locations.py | 80 ++++++++++++++++++++++++++++++++++ worlds/sc2/mission_tables.py | 5 ++- worlds/sc2/options.py | 2 +- worlds/sc2/rules.py | 35 +++++++++++++++ 5 files changed, 122 insertions(+), 6 deletions(-) diff --git a/worlds/sc2/item/item_tables.py b/worlds/sc2/item/item_tables.py index 7628a98c4662..a8ca5c30a30f 100644 --- a/worlds/sc2/item/item_tables.py +++ b/worlds/sc2/item/item_tables.py @@ -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), @@ -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), @@ -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: diff --git a/worlds/sc2/locations.py b/worlds/sc2/locations.py index 2cd65d5b8c78..785dcce11f4d 100644 --- a/worlds/sc2/locations.py +++ b/worlds/sc2/locations.py @@ -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 diff --git a/worlds/sc2/mission_tables.py b/worlds/sc2/mission_tables.py index 991eb1c870d8..3a0486376b11 100644 --- a/worlds/sc2/mission_tables.py +++ b/worlds/sc2/mission_tables.py @@ -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 @@ -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 diff --git a/worlds/sc2/options.py b/worlds/sc2/options.py index 8dc87447b187..d37b4aaeb0f0 100644 --- a/worlds/sc2/options.py +++ b/worlds/sc2/options.py @@ -152,7 +152,7 @@ class MaximumCampaignSize(Range): """ display_name = "Maximum Campaign Size" range_start = 1 - range_end = 143 + range_end = 145 default = 83 diff --git a/worlds/sc2/rules.py b/worlds/sc2/rules.py index bd4f99e08052..adaacfe499e3 100644 --- a/worlds/sc2/rules.py +++ b/worlds/sc2/rules.py @@ -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 From aea949d3dd9e4ea2e7c0bce7c651107e2eb17d8e Mon Sep 17 00:00:00 2001 From: EnvyDragon <138727357+EnvyDragon@users.noreply.github.com> Date: Tue, 19 Nov 2024 22:43:49 -0500 Subject: [PATCH 2/7] fixing mistakes --- worlds/sc2/locations.py | 56 ++++++++++++++++++++--------------------- worlds/sc2/rules.py | 3 ++- 2 files changed, 30 insertions(+), 29 deletions(-) diff --git a/worlds/sc2/locations.py b/worlds/sc2/locations.py index 785dcce11f4d..068c835b7483 100644 --- a/worlds/sc2/locations.py +++ b/worlds/sc2/locations.py @@ -2783,84 +2783,84 @@ 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, + make_location_data(SC2Mission.MAW_OF_THE_VOID_Z.mission_name, "Victory", SC2_RACESWAP_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, + make_location_data(SC2Mission.MAW_OF_THE_VOID_Z.mission_name, "Landing Zone Cleared", SC2_RACESWAP_LOC_ID_OFFSET + 2301, LocationType.EXTRA), + make_location_data(SC2Mission.MAW_OF_THE_VOID_Z.mission_name, "Expansion Prisoners", SC2_RACESWAP_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, + make_location_data(SC2Mission.MAW_OF_THE_VOID_Z.mission_name, "South Close Prisoners", SC2_RACESWAP_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, + make_location_data(SC2Mission.MAW_OF_THE_VOID_Z.mission_name, "South Far Prisoners", SC2_RACESWAP_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, + make_location_data(SC2Mission.MAW_OF_THE_VOID_Z.mission_name, "North Prisoners", SC2_RACESWAP_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, + make_location_data(SC2Mission.MAW_OF_THE_VOID_Z.mission_name, "Mothership", SC2_RACESWAP_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, + make_location_data(SC2Mission.MAW_OF_THE_VOID_Z.mission_name, "Expansion Rip Field Generator", SC2_RACESWAP_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, + make_location_data(SC2Mission.MAW_OF_THE_VOID_Z.mission_name, "Middle Rip Field Generator", SC2_RACESWAP_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, + make_location_data(SC2Mission.MAW_OF_THE_VOID_Z.mission_name, "Southeast Rip Field Generator", SC2_RACESWAP_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, + make_location_data(SC2Mission.MAW_OF_THE_VOID_Z.mission_name, "Stargate Rip Field Generator", SC2_RACESWAP_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, + make_location_data(SC2Mission.MAW_OF_THE_VOID_Z.mission_name, "Northwest Rip Field Generator", SC2_RACESWAP_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, + make_location_data(SC2Mission.MAW_OF_THE_VOID_Z.mission_name, "West Rip Field Generator", SC2_RACESWAP_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, + make_location_data(SC2Mission.MAW_OF_THE_VOID_Z.mission_name, "Southwest Rip Field Generator", SC2_RACESWAP_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, + make_location_data(SC2Mission.MAW_OF_THE_VOID_P.mission_name, "Victory", SC2_RACESWAP_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, + make_location_data(SC2Mission.MAW_OF_THE_VOID_P.mission_name, "Landing Zone Cleared", SC2_RACESWAP_LOC_ID_OFFSET + 2401, LocationType.EXTRA), + make_location_data(SC2Mission.MAW_OF_THE_VOID_P.mission_name, "Expansion Prisoners", SC2_RACESWAP_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, + make_location_data(SC2Mission.MAW_OF_THE_VOID_P.mission_name, "South Close Prisoners", SC2_RACESWAP_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, + make_location_data(SC2Mission.MAW_OF_THE_VOID_P.mission_name, "South Far Prisoners", SC2_RACESWAP_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, + make_location_data(SC2Mission.MAW_OF_THE_VOID_P.mission_name, "North Prisoners", SC2_RACESWAP_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, + make_location_data(SC2Mission.MAW_OF_THE_VOID_P.mission_name, "Mothership", SC2_RACESWAP_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, + make_location_data(SC2Mission.MAW_OF_THE_VOID_P.mission_name, "Expansion Rip Field Generator", SC2_RACESWAP_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, + make_location_data(SC2Mission.MAW_OF_THE_VOID_P.mission_name, "Middle Rip Field Generator", SC2_RACESWAP_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, + make_location_data(SC2Mission.MAW_OF_THE_VOID_P.mission_name, "Southeast Rip Field Generator", SC2_RACESWAP_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, + make_location_data(SC2Mission.MAW_OF_THE_VOID_P.mission_name, "Stargate Rip Field Generator", SC2_RACESWAP_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, + make_location_data(SC2Mission.MAW_OF_THE_VOID_P.mission_name, "Northwest Rip Field Generator", SC2_RACESWAP_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, + make_location_data(SC2Mission.MAW_OF_THE_VOID_P.mission_name, "West Rip Field Generator", SC2_RACESWAP_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, + make_location_data(SC2Mission.MAW_OF_THE_VOID_P.mission_name, "Southwest Rip Field Generator", SC2_RACESWAP_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, diff --git a/worlds/sc2/rules.py b/worlds/sc2/rules.py index adaacfe499e3..2f7960dfc56c 100644 --- a/worlds/sc2/rules.py +++ b/worlds/sc2/rules.py @@ -510,7 +510,8 @@ def protoss_maw_requirement(self, state: CollectionState) -> bool: """ return ( (state.has(item_names.WARP_PRISM, self.player) - or (self.advanced_tactics(state) and state.has(item_names.ARBITER, self.player))) + or (self.advanced_tactics and state.has(item_names.ARBITER, self.player)) + ) and self.protoss_common_unit_anti_armor_air(state) and self.protoss_fleet(state) ) From f9613e2b5e3468acbfb91981584f33d9aab442cc Mon Sep 17 00:00:00 2001 From: EnvyDragon <138727357+EnvyDragon@users.noreply.github.com> Date: Wed, 20 Nov 2024 22:12:15 -0500 Subject: [PATCH 3/7] adjusting logic --- worlds/sc2/rules.py | 1 - 1 file changed, 1 deletion(-) diff --git a/worlds/sc2/rules.py b/worlds/sc2/rules.py index 2f7960dfc56c..68a361577699 100644 --- a/worlds/sc2/rules.py +++ b/worlds/sc2/rules.py @@ -498,7 +498,6 @@ def zerg_maw_requirement(self, state: CollectionState) -> bool: ) 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) ) From d6d750df5ffd103136e21bd50e26c679b884ae64 Mon Sep 17 00:00:00 2001 From: EnvyDragon <138727357+EnvyDragon@users.noreply.github.com> Date: Wed, 20 Nov 2024 22:15:35 -0500 Subject: [PATCH 4/7] missing bracket --- worlds/sc2/rules.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/worlds/sc2/rules.py b/worlds/sc2/rules.py index 68a361577699..3beb6af1a6ef 100644 --- a/worlds/sc2/rules.py +++ b/worlds/sc2/rules.py @@ -497,7 +497,7 @@ def zerg_maw_requirement(self, state: CollectionState) -> bool: 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_tyrannozor(state)) and self.zerg_competent_comp(state) ) From 8a44d71c5fcb20a297b2ceba78ce1550a6f84ca3 Mon Sep 17 00:00:00 2001 From: EnvyDragon <138727357+EnvyDragon@users.noreply.github.com> Date: Thu, 21 Nov 2024 15:58:44 -0500 Subject: [PATCH 5/7] logic buffs for zerg --- worlds/sc2/rules.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/worlds/sc2/rules.py b/worlds/sc2/rules.py index 3beb6af1a6ef..41d113d72af9 100644 --- a/worlds/sc2/rules.py +++ b/worlds/sc2/rules.py @@ -487,10 +487,12 @@ def zerg_maw_requirement(self, state: CollectionState) -> bool: :return: """ return ( - state.has_all({item_names.NYDUS_WORM, item_names.SWARM_QUEEN}, self.player) + state.has(item_names.SWARM_QUEEN, self.player) + and (state.has(item_names.NYDUS_WORM, self.player) + or (self.advanced_tactics and state.has(item_names.OVERLORD_VENTRAL_SACS, 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) + state.has(item_names.INFESTOR, 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) @@ -498,6 +500,7 @@ def zerg_maw_requirement(self, state: CollectionState) -> bool: ) and (state.has_any({item_names.ABERRATION, item_names.ROACH, item_names.ULTRALISK}, self.player) or self.morph_tyrannozor(state)) + and (state.has_any({item_names.MUTALISK, item_names.CORRUPTOR, item_names.INFESTED_LIBERATOR, item_names.BROOD_QUEEN}, self.player)) and self.zerg_competent_comp(state) ) From 3ab8fa923b133620b6134ebd6da12d4c9b59f8ef Mon Sep 17 00:00:00 2001 From: EnvyDragon <138727357+EnvyDragon@users.noreply.github.com> Date: Thu, 21 Nov 2024 16:07:33 -0500 Subject: [PATCH 6/7] mission count --- worlds/sc2/options.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/worlds/sc2/options.py b/worlds/sc2/options.py index d37b4aaeb0f0..ce0f9c1676ae 100644 --- a/worlds/sc2/options.py +++ b/worlds/sc2/options.py @@ -152,7 +152,7 @@ class MaximumCampaignSize(Range): """ display_name = "Maximum Campaign Size" range_start = 1 - range_end = 145 + range_end = 147 default = 83 From a58631e1c7c7f438ae6b0e90ad45faec036429d4 Mon Sep 17 00:00:00 2001 From: EnvyDragon <138727357+EnvyDragon@users.noreply.github.com> Date: Thu, 21 Nov 2024 16:21:44 -0500 Subject: [PATCH 7/7] screw it, campaign size option --- worlds/sc2/options.py | 2 +- worlds/sc2/test/test_options.py | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/worlds/sc2/options.py b/worlds/sc2/options.py index ce0f9c1676ae..31d9d0362504 100644 --- a/worlds/sc2/options.py +++ b/worlds/sc2/options.py @@ -152,7 +152,7 @@ class MaximumCampaignSize(Range): """ display_name = "Maximum Campaign Size" range_start = 1 - range_end = 147 + range_end = len(SC2Mission) default = 83 diff --git a/worlds/sc2/test/test_options.py b/worlds/sc2/test/test_options.py index fb10f020c084..a2f766d92885 100644 --- a/worlds/sc2/test/test_options.py +++ b/worlds/sc2/test/test_options.py @@ -1,13 +1,11 @@ import unittest from typing import Set, Dict, List -from .. import mission_tables, options +from .. import options from ..item import item_tables class TestOptions(unittest.TestCase): - def test_campaign_size_option_max_matches_number_of_missions(self) -> None: - self.assertEqual(options.MaximumCampaignSize.range_end, len(mission_tables.SC2Mission)) def test_unit_max_upgrades_matching_items(self) -> None: base_items: Set[str] = {