From f08e98388c0154b22c00b8bd1b75c2419c69f8b5 Mon Sep 17 00:00:00 2001 From: EnvyDragon <138727357+EnvyDragon@users.noreply.github.com> Date: Sun, 24 Nov 2024 16:20:31 -0500 Subject: [PATCH] SC2: Easier supernova raceswap logic --- worlds/sc2/locations.py | 40 ++++++++++++++++++++++++++++++---------- 1 file changed, 30 insertions(+), 10 deletions(-) diff --git a/worlds/sc2/locations.py b/worlds/sc2/locations.py index 072520727e3e..250623918a5c 100644 --- a/worlds/sc2/locations.py +++ b/worlds/sc2/locations.py @@ -2784,50 +2784,70 @@ def get_locations(world: Optional['SC2World']) -> Tuple[LocationData, ...]: logic.protoss_competent_comp ), make_location_data(SC2Mission.SUPERNOVA_Z.mission_name, "Victory", SC2_RACESWAP_LOC_ID_OFFSET + 2100, LocationType.VICTORY, - logic.zerg_competent_comp_competent_aa + lambda state: ( + logic.zerg_competent_comp_competent_aa(state) + and (adv_tactics or state.has(item_names.YGGDRASIL, player))) ), make_location_data(SC2Mission.SUPERNOVA_Z.mission_name, "West Relic", SC2_RACESWAP_LOC_ID_OFFSET + 2101, LocationType.VANILLA), make_location_data(SC2Mission.SUPERNOVA_Z.mission_name, "North Relic", SC2_RACESWAP_LOC_ID_OFFSET + 2102, LocationType.VANILLA), make_location_data(SC2Mission.SUPERNOVA_Z.mission_name, "South Relic", SC2_RACESWAP_LOC_ID_OFFSET + 2103, LocationType.VANILLA, - logic.zerg_competent_comp_competent_aa + lambda state: ( + logic.zerg_competent_comp_competent_aa(state) + and (adv_tactics or state.has(item_names.YGGDRASIL, player))) ), make_location_data(SC2Mission.SUPERNOVA_Z.mission_name, "East Relic", SC2_RACESWAP_LOC_ID_OFFSET + 2104, LocationType.VANILLA, - logic.zerg_competent_comp_competent_aa + lambda state: ( + logic.zerg_competent_comp_competent_aa(state) + and (adv_tactics or state.has(item_names.YGGDRASIL, player))) ), make_location_data(SC2Mission.SUPERNOVA_Z.mission_name, "Landing Zone Cleared", SC2_RACESWAP_LOC_ID_OFFSET + 2105, LocationType.EXTRA), make_location_data(SC2Mission.SUPERNOVA_Z.mission_name, "Middle Base", SC2_RACESWAP_LOC_ID_OFFSET + 2106, LocationType.EXTRA, - logic.zerg_competent_comp_competent_aa + lambda state: ( + logic.zerg_competent_comp_competent_aa(state) + and (adv_tactics or state.has(item_names.YGGDRASIL, player))) ), make_location_data(SC2Mission.SUPERNOVA_Z.mission_name, "Southeast Base", SC2_RACESWAP_LOC_ID_OFFSET + 2107, LocationType.EXTRA, - logic.zerg_competent_comp_competent_aa + lambda state: ( + logic.zerg_competent_comp_competent_aa(state) + and (adv_tactics or state.has(item_names.YGGDRASIL, player))) ), make_location_data(SC2Mission.SUPERNOVA_P.mission_name, "Victory", SC2_RACESWAP_LOC_ID_OFFSET + 2200, LocationType.VICTORY, lambda state: ( logic.protoss_competent_comp(state) - and (adv_tactics or state.has(item_names.PROGRESSIVE_WARP_RELOCATE, player))) + and ( + state.count(item_names.PROGRESSIVE_WARP_RELOCATE, player) >= 2 + or (adv_tactics and state.has(item_names.PROGRESSIVE_WARP_RELOCATE, player)))) ), make_location_data(SC2Mission.SUPERNOVA_P.mission_name, "West Relic", SC2_RACESWAP_LOC_ID_OFFSET + 2201, LocationType.VANILLA), make_location_data(SC2Mission.SUPERNOVA_P.mission_name, "North Relic", SC2_RACESWAP_LOC_ID_OFFSET + 2202, LocationType.VANILLA), make_location_data(SC2Mission.SUPERNOVA_P.mission_name, "South Relic", SC2_RACESWAP_LOC_ID_OFFSET + 2203, LocationType.VANILLA, lambda state: ( logic.protoss_competent_comp(state) - and (adv_tactics or state.has(item_names.PROGRESSIVE_WARP_RELOCATE, player))) + and ( + state.count(item_names.PROGRESSIVE_WARP_RELOCATE, player) >= 2 + or (adv_tactics and state.has(item_names.PROGRESSIVE_WARP_RELOCATE, player)))) ), make_location_data(SC2Mission.SUPERNOVA_P.mission_name, "East Relic", SC2_RACESWAP_LOC_ID_OFFSET + 2204, LocationType.VANILLA, lambda state: ( logic.protoss_competent_comp(state) - and (adv_tactics or state.has(item_names.PROGRESSIVE_WARP_RELOCATE, player))) + and ( + state.count(item_names.PROGRESSIVE_WARP_RELOCATE, player) >= 2 + or (adv_tactics and state.has(item_names.PROGRESSIVE_WARP_RELOCATE, player)))) ), make_location_data(SC2Mission.SUPERNOVA_P.mission_name, "Landing Zone Cleared", SC2_RACESWAP_LOC_ID_OFFSET + 2205, LocationType.EXTRA), make_location_data(SC2Mission.SUPERNOVA_P.mission_name, "Middle Base", SC2_RACESWAP_LOC_ID_OFFSET + 2206, LocationType.EXTRA, lambda state: ( logic.protoss_competent_comp(state) - and (adv_tactics or state.has(item_names.PROGRESSIVE_WARP_RELOCATE, player))) + and ( + state.count(item_names.PROGRESSIVE_WARP_RELOCATE, player) >= 2 + or (adv_tactics and state.has(item_names.PROGRESSIVE_WARP_RELOCATE, player)))) ), make_location_data(SC2Mission.SUPERNOVA_P.mission_name, "Southeast Base", SC2_RACESWAP_LOC_ID_OFFSET + 2207, LocationType.EXTRA, lambda state: ( logic.protoss_competent_comp(state) - and (adv_tactics or state.has(item_names.PROGRESSIVE_WARP_RELOCATE, player))) + and ( + state.count(item_names.PROGRESSIVE_WARP_RELOCATE, player) >= 2 + or (adv_tactics and state.has(item_names.PROGRESSIVE_WARP_RELOCATE, player)))) ), make_location_data(SC2Mission.MAW_OF_THE_VOID_Z.mission_name, "Victory", SC2_RACESWAP_LOC_ID_OFFSET + 2300, LocationType.VICTORY, logic.zerg_maw_requirement