From 57c4ec27235ed0590284df7d5a548ddae1ccf46a Mon Sep 17 00:00:00 2001 From: gaithern Date: Fri, 23 Feb 2024 21:45:03 -0600 Subject: [PATCH] Fix sleights option toggled off makes generation fail --- worlds/khrecom/Locations.py | 40 ++++++++++++++++++------------------- worlds/khrecom/Rules.py | 9 ++++----- 2 files changed, 24 insertions(+), 25 deletions(-) diff --git a/worlds/khrecom/Locations.py b/worlds/khrecom/Locations.py index 8cab298c45c7..ddd6386ddefd 100644 --- a/worlds/khrecom/Locations.py +++ b/worlds/khrecom/Locations.py @@ -77,7 +77,7 @@ def get_locations_by_category(category: str) -> Dict[str, KHRECOMLocationData]: "Agrabah Room of Rewards (Enemy Cards Luxord)": KHRECOMLocationData("Days" , 269_0509), #Days Location "Halloween Town Field (Attack Cards Pumpkinhead)": KHRECOMLocationData("Progression", 269_0601), - "06F Exit Hall Larxene I (Magic Cards Thunder)": KHRECOMLocationData("Progression", 269_0602), + "06F Exit Hall Larxene I (Magic Cards Thunder)": KHRECOMLocationData("Progression", 269_0602), "Halloween Town Room of Beginnings": KHRECOMLocationData("Progression", 269_0603), "Halloween Town Room of Guidance": KHRECOMLocationData("Progression", 269_0604), "Halloween Town Room of Truth": KHRECOMLocationData("Progression", 269_0605), @@ -85,7 +85,7 @@ def get_locations_by_category(category: str) -> Dict[str, KHRECOMLocationData]: "Halloween Town Room of Rewards (Attack Cards Bond of Flame)": KHRECOMLocationData("Days" , 269_0607), #Days Location "Atlantica Field (Attack Cards Crabclaw)": KHRECOMLocationData("Progression", 269_0701), - "07F Exit Hall Riku I (Magic Cards Aero)": KHRECOMLocationData("Progression", 269_0702), + "07F Exit Hall Riku I (Magic Cards Aero)": KHRECOMLocationData("Progression", 269_0702), "Atlantica Room of Beginnings": KHRECOMLocationData("Progression", 269_0703), "Atlantica Room of Guidance": KHRECOMLocationData("Progression", 269_0704), "Atlantica Room of Truth": KHRECOMLocationData("Progression", 269_0705), @@ -178,16 +178,16 @@ def get_locations_by_category(category: str) -> Dict[str, KHRECOMLocationData]: "Level 52 (Sleight Ragnarok)": KHRECOMLocationData("Progression", 269_1508), "Castle Oblivion Entrance (Sleight Trinity Limit)": KHRECOMLocationData("Progression", 269_1509), "01F Exit Hall Axel I (Sleight Fira)": KHRECOMLocationData("Progression", 269_1510), - "Starting Checks (Sleight Blizzara)": KHRECOMLocationData("Starting" , 269_1511), + "Starting Checks (Sleight Blizzara)": KHRECOMLocationData("Progression", 269_1511), "06F Exit Hall Larxene I (Sleight Thundara)": KHRECOMLocationData("Progression", 269_1512), - "Starting Checks (Sleight Cura)": KHRECOMLocationData("Starting" , 269_1513), + "Starting Checks (Sleight Cura)": KHRECOMLocationData("Progression", 269_1513), "Agrabah Bounty (Sleight Gravira)": KHRECOMLocationData("Progression", 269_1514), "Wonderland Bounty (Sleight Stopra)": KHRECOMLocationData("Progression", 269_1515), "07F Exit Hall Riku I (Sleight Aerora)": KHRECOMLocationData("Progression", 269_1516), "01F Exit Hall Axel I (Sleight Firaga)": KHRECOMLocationData("Progression", 269_1517), - "Starting Checks (Sleight Blizzaga)": KHRECOMLocationData("Starting" , 269_1518), + "Starting Checks (Sleight Blizzaga)": KHRECOMLocationData("Progression", 269_1518), "06F Exit Hall Larxene I (Sleight Thundaga)": KHRECOMLocationData("Progression", 269_1519), - "Starting Checks (Sleight Curaga)": KHRECOMLocationData("Starting" , 269_1520), + "Starting Checks (Sleight Curaga)": KHRECOMLocationData("Progression", 269_1520), "Agrabah Bounty (Sleight Graviga)": KHRECOMLocationData("Progression", 269_1521), "Wonderland Bounty (Sleight Stopga)": KHRECOMLocationData("Progression", 269_1522), "07F Exit Hall Riku I (Sleight Aeroga)": KHRECOMLocationData("Progression", 269_1523), @@ -232,23 +232,23 @@ def get_locations_by_category(category: str) -> Dict[str, KHRECOMLocationData]: "Olympus Coliseum Room of Truth (Sleight Cross-slash)": KHRECOMLocationData("Progression", 269_1562), "Olympus Coliseum Room of Truth (Sleight Omnislash)": KHRECOMLocationData("Progression", 269_1563), "100 Acre Wood Veggie Panic (Sleight Cross-slash+)": KHRECOMLocationData("Progression", 269_1564), - "Starting Checks (Sleight Magic LV2)": KHRECOMLocationData("Starting" , 269_1565), - "Starting Checks (Sleight Magic LV3)": KHRECOMLocationData("Starting" , 269_1566), + "Starting Checks (Sleight Magic LV2)": KHRECOMLocationData("Progression", 269_1565), + "Starting Checks (Sleight Magic LV3)": KHRECOMLocationData("Progression", 269_1566), "Twilight Town Room of Rewards (Sleight Stardust Blitz)": KHRECOMLocationData("Progression", 269_1567), - "Starting Checks (Sleight Goofy Tornado LV2)": KHRECOMLocationData("Starting" , 269_1568), - "Starting Checks (Sleight Goofy Tornado LV3)": KHRECOMLocationData("Starting" , 269_1569), - "Starting Checks (Sleight Goofy Smash)": KHRECOMLocationData("Starting" , 269_1570), - "Starting Checks (Sleight Wild Crush)": KHRECOMLocationData("Starting" , 269_1571), - "Agrabah Ally (Sleight Sandstorm LV2)": KHRECOMLocationData("Progression", 269_1572), - "Agrabah Ally (Sleight Sandstorm LV3)": KHRECOMLocationData("Progression", 269_1573), + "Starting Checks (Sleight Goofy Tornado LV2)": KHRECOMLocationData("Progression", 269_1568), + "Starting Checks (Sleight Goofy Tornado LV3)": KHRECOMLocationData("Progression", 269_1569), + "Starting Checks (Sleight Goofy Smash)": KHRECOMLocationData("Progression", 269_1570), + "Starting Checks (Sleight Wild Crush)": KHRECOMLocationData("Progression", 269_1571), + "Agrabah Ally (Sleight Sandstorm LV2)": KHRECOMLocationData("Progression", 269_1572), + "Agrabah Ally (Sleight Sandstorm LV3)": KHRECOMLocationData("Progression", 269_1573), "Halloween Town Entrance (Sleight Surprise! LV2)": KHRECOMLocationData("Progression", 269_1574), "Halloween Town Entrance (Sleight Surprise! LV3)": KHRECOMLocationData("Progression", 269_1575), - "Atlantica Ally (Sleight Spiral Wave LV2)": KHRECOMLocationData("Progression", 269_1576), - "Atlantica Ally (Sleight Spiral Wave LV3)": KHRECOMLocationData("Progression", 269_1577), - "Neverland Ally (Sleight Hummingbird LV2)": KHRECOMLocationData("Progression", 269_1578), - "Neverland Ally (Sleight Hummingbird LV3)": KHRECOMLocationData("Progression", 269_1579), - "Hollow Ally (Sleight Furious Volley LV2)": KHRECOMLocationData("Progression", 269_1580), - "Hollow Ally (Sleight Furious Volley LV3)": KHRECOMLocationData("Progression", 269_1581), + "Atlantica Ally (Sleight Spiral Wave LV2)": KHRECOMLocationData("Progression", 269_1576), + "Atlantica Ally (Sleight Spiral Wave LV3)": KHRECOMLocationData("Progression", 269_1577), + "Neverland Ally (Sleight Hummingbird LV2)": KHRECOMLocationData("Progression", 269_1578), + "Neverland Ally (Sleight Hummingbird LV3)": KHRECOMLocationData("Progression", 269_1579), + "Hollow Ally (Sleight Furious Volley LV2)": KHRECOMLocationData("Progression", 269_1580), + "Hollow Ally (Sleight Furious Volley LV3)": KHRECOMLocationData("Progression", 269_1581), "Traverse Town Room of Beginnings (Sleight Lucky Bounty LV2)": KHRECOMLocationData("Progression", 269_1582), "Traverse Town Room of Beginnings (Sleight Lucky Bounty LV3)": KHRECOMLocationData("Progression", 269_1583), diff --git a/worlds/khrecom/Rules.py b/worlds/khrecom/Rules.py index 954ac5af93b0..9e3470259d00 100644 --- a/worlds/khrecom/Rules.py +++ b/worlds/khrecom/Rules.py @@ -49,17 +49,12 @@ def has_item(state: CollectionState, player: int, item) -> bool: def set_rules(multiworld: MultiWorld, player: int, options): #Location rules. - #Keys multiworld.get_location("Traverse Town Room of Rewards (Attack Cards Lionheart)" , player).access_rule = lambda state: has_item(state, player,"Key to Rewards Traverse Town") multiworld.get_location("Olympus Coliseum Room of Rewards (Attack Cards Metal Chocobo)" , player).access_rule = lambda state: has_item(state, player,"Key to Rewards Olympus Coliseum") multiworld.get_location("Hollow Bastion Room of Rewards (Summon Cards Mushu)" , player).access_rule = lambda state: has_item(state, player,"Key to Rewards Hollow Bastion") multiworld.get_location("Destiny Islands Room of Rewards (Item Cards Megalixir)" , player).access_rule = lambda state: has_item(state, player,"Key to Rewards Destiny Islands") multiworld.get_location("06F Exit Hall Larxene I (Magic Cards Thunder)" , player).access_rule = lambda state: has_x_worlds(state, player, 4) - multiworld.get_location("06F Exit Hall Larxene I (Sleight Thundara)" , player).access_rule = lambda state: has_x_worlds(state, player, 4) - multiworld.get_location("06F Exit Hall Larxene I (Sleight Thundaga)" , player).access_rule = lambda state: has_x_worlds(state, player, 4) multiworld.get_location("07F Exit Hall Riku I (Magic Cards Aero)" , player).access_rule = lambda state: has_x_worlds(state, player, 5) - multiworld.get_location("07F Exit Hall Riku I (Sleight Aerora)" , player).access_rule = lambda state: has_x_worlds(state, player, 5) - multiworld.get_location("07F Exit Hall Riku I (Sleight Aeroga)" , player).access_rule = lambda state: has_x_worlds(state, player, 5) #multiworld.get_location("11F Exit Hall Riku III (Item Cards Mega-Potion)" , player).access_rule = lambda state: has_x_worlds(state, player, 6) multiworld.get_location("12F Exit Hall Larxene II (Attack Cards Oblivion)" , player).access_rule = lambda state: has_x_worlds(state, player, 7) multiworld.get_location("12F Exit Hall Larxene II (Enemy Cards Larxene)" , player).access_rule = lambda state: has_x_worlds(state, player, 7) @@ -131,6 +126,10 @@ def set_rules(multiworld: MultiWorld, player: int, options): multiworld.get_location("Wonderland Room of Rewards (Sleight Synchro)" , player).access_rule = lambda state: has_item(state, player, "Key to Rewards Wonderland") multiworld.get_location("08F Exit Hall Riku II (Sleight Magnet Spiral)" , player).access_rule = lambda state: has_x_worlds(state, player, 5) multiworld.get_location("10F Exit Hall Vexen I (Sleight Freeze)" , player).access_rule = lambda state: has_x_worlds(state, player, 6) + multiworld.get_location("06F Exit Hall Larxene I (Sleight Thundara)" , player).access_rule = lambda state: has_x_worlds(state, player, 4) + multiworld.get_location("06F Exit Hall Larxene I (Sleight Thundaga)" , player).access_rule = lambda state: has_x_worlds(state, player, 4) + multiworld.get_location("07F Exit Hall Riku I (Sleight Aerora)" , player).access_rule = lambda state: has_x_worlds(state, player, 5) + multiworld.get_location("07F Exit Hall Riku I (Sleight Aeroga)" , player).access_rule = lambda state: has_x_worlds(state, player, 5) # Region rules. multiworld.get_entrance("Wonderland" , player).access_rule = lambda state: has_item(state, player,"World Card Wonderland")