From ec50af9685bb90e73959e496c09a22c22b46e183 Mon Sep 17 00:00:00 2001 From: BuffYoda21 Date: Thu, 15 Jan 2026 20:00:02 -0600 Subject: [PATCH] GLYPHS: completely reworked logic to be more scalable --- worlds/glyphs/Items.py | 81 +++++++----- worlds/glyphs/Locations.py | 118 +++++++++--------- worlds/glyphs/Macros.py | 11 +- worlds/glyphs/Options.py | 25 ++-- worlds/glyphs/Regions.py | 98 +++++++++------ worlds/glyphs/Rules.py | 244 ++++++++++++++++++++----------------- 6 files changed, 334 insertions(+), 243 deletions(-) diff --git a/worlds/glyphs/Items.py b/worlds/glyphs/Items.py index 59eea92b2859..1c94816a7d14 100644 --- a/worlds/glyphs/Items.py +++ b/worlds/glyphs/Items.py @@ -219,35 +219,60 @@ def create_junk_items(world: "GlyphsWorld", count: int) -> List[Item]: "Epilogue Ending": ItemData(2006, ItemClassification.progression_skip_balancing, True), } +# reference map here: https://docs.google.com/drawings/d/11DQQVcq0GAYjFShZs-McEZkcpY2-PP28NdRyncZrORw/edit?usp=sharing +# note: regions listed here are only for generation, vanilla region names will be listed for the user glyphs_regions = { - "Menu": ItemData(3000, ItemClassification.progression, True), # using this as starting chapter to allow randomized starting spawns - "Region 1 - Central": ItemData(3001, ItemClassification.progression, True), - "Region 1 - Left": ItemData(3002, ItemClassification.progression, True), - "Region 1 - Upper Left": ItemData(3003, ItemClassification.progression, True), - "Region 1 - Upper Right": ItemData(3004, ItemClassification.progression, True), - "Region 2 - Left": ItemData(3005, ItemClassification.progression, True), - "Region 2 - Central": ItemData(3006, ItemClassification.progression, True), - "Region 2 - Sector 1": ItemData(3007, ItemClassification.progression, True), - "Region 2 - Sector 2": ItemData(3008, ItemClassification.progression, True), - "Region 2 - Sector 4": ItemData(3009, ItemClassification.progression, True), - "Region 2 - Sector 4 End": ItemData(3010, ItemClassification.progression, True), - "Region 2 - Lower": ItemData(3011, ItemClassification.progression, True), - "Region 2 - Serpent Upper": ItemData(3012, ItemClassification.progression, True), - "Region 2 - Serpent Lower": ItemData(3013, ItemClassification.progression, True), - "Region 2 - Shadow Chase": ItemData(3014, ItemClassification.progression, True), - "Region 3": ItemData(3015, ItemClassification.progression, True), - "Region 4 - Entrance": ItemData(3016, ItemClassification.progression, True), - "Region 4 - Upper": ItemData(3017, ItemClassification.progression, True), - "Region 4 - Central": ItemData(3018, ItemClassification.progression, True), - "Region 4 - Lower": ItemData(3019, ItemClassification.progression, True), - "Collapse": ItemData(3020, ItemClassification.progression, True), - "Smile Shop": ItemData(3021, ItemClassification.progression, True), - "Dark Region": ItemData(3022, ItemClassification.progression, True), - "The Between": ItemData(3023, ItemClassification.progression, True), - "Act 1": ItemData(3024, ItemClassification.progression, True), - "Act 2": ItemData(3025, ItemClassification.progression, True), - "Act 3": ItemData(3026, ItemClassification.progression, True), - "Epilogue": ItemData(3027, ItemClassification.progression, True), + "Menu": ItemData(3000, ItemClassification.progression, True), # used for both the main menu and map screen for warps and outer void act selection + "Region 1A": ItemData(3001, ItemClassification.progression, True), + "Region 1B": ItemData(3002, ItemClassification.progression, True), + "Region 1C": ItemData(3003, ItemClassification.progression, True), + "Region 1D": ItemData(3004, ItemClassification.progression, True), + "Region 1E": ItemData(3005, ItemClassification.progression, True), + "Region 1F": ItemData(3006, ItemClassification.progression, True), + "Region 2A": ItemData(3007, ItemClassification.progression, True), + "Region 2B": ItemData(3008, ItemClassification.progression, True), + "Region 2C": ItemData(3009, ItemClassification.progression, True), + "Region 2D": ItemData(3010, ItemClassification.progression, True), + "Region 2E": ItemData(3011, ItemClassification.progression, True), + "Region 2F": ItemData(3012, ItemClassification.progression, True), + "Region 2G": ItemData(3013, ItemClassification.progression, True), + "Region 2H": ItemData(3014, ItemClassification.progression, True), + "Region 2I": ItemData(3015, ItemClassification.progression, True), + "Region 2J": ItemData(3016, ItemClassification.progression, True), + "Region 2K": ItemData(3017, ItemClassification.progression, True), + "Region 2L": ItemData(3018, ItemClassification.progression, True), + "Region 2M": ItemData(3019, ItemClassification.progression, True), + "Region 2N": ItemData(3020, ItemClassification.progression, True), + "Region 2O": ItemData(3021, ItemClassification.progression, True), + "Region 2P": ItemData(3022, ItemClassification.progression, True), + "Region 2Q": ItemData(3023, ItemClassification.progression, True), + "Region 3A": ItemData(3024, ItemClassification.progression, True), + "Region 3B": ItemData(3025, ItemClassification.progression, True), + "Region 3C": ItemData(3026, ItemClassification.progression, True), + "Region 3D": ItemData(3027, ItemClassification.progression, True), + "Region 3F": ItemData(3028, ItemClassification.progression, True), + "Region 3G": ItemData(3029, ItemClassification.progression, True), + "Region 3H": ItemData(3030, ItemClassification.progression, True), + "Region 3I": ItemData(3031, ItemClassification.progression, True), + "Region 4A": ItemData(3032, ItemClassification.progression, True), + "Region 4B": ItemData(3033, ItemClassification.progression, True), + "Region 4C": ItemData(3034, ItemClassification.progression, True), + "Region 4D": ItemData(3035, ItemClassification.progression, True), + "Region 4E": ItemData(3036, ItemClassification.progression, True), + "Region 4F": ItemData(3037, ItemClassification.progression, True), + "Region 4G": ItemData(3038, ItemClassification.progression, True), + "Region 4H": ItemData(3039, ItemClassification.progression, True), + "Region 4I": ItemData(3040, ItemClassification.progression, True), + "Region 4J": ItemData(3041, ItemClassification.progression, True), + "Collapse": ItemData(3042, ItemClassification.progression, True), + "Smile Shop": ItemData(3043, ItemClassification.progression, True), + "Dark Region A": ItemData(3044, ItemClassification.progression, True), + "Dark Region B": ItemData(3045, ItemClassification.progression, True), + "The Between": ItemData(3046, ItemClassification.progression, True), + "Act 1": ItemData(3047, ItemClassification.progression, True), + "Act 2": ItemData(3048, ItemClassification.progression, True), + "Act 3": ItemData(3049, ItemClassification.progression, True), + "Epilogue": ItemData(3050, ItemClassification.progression, True), } item_table = { diff --git a/worlds/glyphs/Locations.py b/worlds/glyphs/Locations.py index d998a63507c3..00e99bde1ef2 100644 --- a/worlds/glyphs/Locations.py +++ b/worlds/glyphs/Locations.py @@ -25,73 +25,73 @@ def is_valid_location(world: "GlyphsWorld", name) -> bool: glyphs_locations = { # Region 1 - "(R1) Starting Item": LocData(1, "Region 1 - Upper Left"), - "(R1) Sword Pedestal": LocData(2, "Region 1 - Central"), - "(R1) Runic Construct Reward": LocData(3, "Region 1 - Central"), - "(R1) Map Pedestal": LocData(4, "Region 1 - Left"), - "(R1) Silver Shard Puzzle 1 - Map": LocData(5, "Region 1 - Left"), - "(R1) Silver Shard Puzzle 2 - Grapple": LocData(6, "Region 1 - Upper Right"), - "(R1) Silver Shard Puzzle 3 - Spike Tunnel": LocData(7, "Region 1 - Upper Right"), - "(R1) Smile Token Puzzle 1 - Hidden Bounce Pad": LocData(8, "Region 1 - Central"), - "(R1) Smile Token Puzzle 9 - Moving Platforms": LocData(9, "Region 1 - Left"), - "(R1) Color Cypher Room Pickup": LocData(10, "Region 1 - Upper Right"), - "(R1) Master Puzzle 2 - Silence": LocData(11, "Region 1 - Central"), + "(R1) Starting Item": LocData(1, "Region 1A"), + "(R1) Sword Pedestal": LocData(2, "Region 1D"), + "(R1) Runic Construct Reward": LocData(3, "Region 1E"), + "(R1) Map Pedestal": LocData(4, "Region 1B"), + "(R1) Silver Shard Puzzle 1 - Map": LocData(5, "Region 1B"), + "(R1) Silver Shard Puzzle 2 - Grapple": LocData(6, "Region 1F"), + "(R1) Silver Shard Puzzle 3 - Spike Tunnel": LocData(7, "Region 2A"), # this location was lumped in to part of region 2 for logical reasons + "(R1) Smile Token Puzzle 1 - Hidden Bounce Pad": LocData(8, "Region 1D"), + "(R1) Smile Token Puzzle 9 - Moving Platforms": LocData(9, "Region 1B"), + "(R1) Color Cypher Room Pickup": LocData(10, "Region 1F"), + "(R1) Master Puzzle 2 - Silence": LocData(11, "Region 1D"), # Region 2 - "(R2S1) Silver Shard Puzzle 4 - Save Button": LocData(12, "Region 2 - Sector 1"), - "(R2) Silver Shard Puzzle 5 - Respawn": LocData(13, "Region 2 - Central"), - "(R2) Silver Shard Puzzle 6 - Invisible": LocData(14, "Region 2 - Central"), - "(R2S2) Silver Shard Puzzle 7 - Timed": LocData(15, "Region 2 - Sector 2"), - "(R2) Silver Shard Puzzle 8 - Avoid Respawn": LocData(16, "Region 2 - Lower"), - "(R2) Silver Shard Puzzle 9 - Color Dash Puzzle": LocData(17, "Region 2 - Lower"), - "(R2) Silver Shard Puzzle 15 - Escape Serpent": LocData(18, "Region 2 - Serpent Upper"), - "(R2S2) Smile Token Puzzle 3 - Car Hall": LocData(19, "Region 2 - Sector 2"), - "(R2) Smile Token Puzzle 6 - Above Serpent": LocData(20, "Region 2 - Serpent Upper"), - "(R2S1) Smile Token Puzzle 8 - Erosion": LocData(21, "Region 2 - Sector 1"), - "(R2S2) Smile Token Puzzle 10 - Chaos": LocData(22, "Region 2 - Shadow Chase"), - "(R2) Gilded Serpent Reward": LocData(23, "Region 2 - Serpent Lower"), - "(R2S1) Cameo Room Pickup": LocData(24, "Region 2 - Sector 1"), - "(R2S2) Car Hall Pickup": LocData(25, "Region 2 - Sector 2"), - "(R2S1) Near Shooters Pickup": LocData(26, "Region 2 - Sector 1"), - "(R2S3) Collapsed Tunnel Pickup": LocData(27, "Region 2 - Sector 4"), - "(R2) Nest Room Pickup": LocData(28, "Region 2 - Left"), - "(R2) Serpent Boss Room Pickup": LocData(29, "Region 2 - Serpent Lower"), - "(R2) Shadow Chase Reward": LocData(30, "Region 2 - Shadow Chase"), - "(R2S4) Water Room Pickup": LocData(31, "Region 2 - Sector 4 End"), - "(R2) George Reward 1": LocData(32, "Region 2 - Left"), - "(R2) George Reward 2": LocData(33, "Region 2 - Left"), - "(R2S2) Shadow Chase Pickup": LocData(34, "Region 2 - Shadow Chase"), - "(R2S2) Master Puzzle 1 - Map": LocData(35, "Region 2 - Sector 2"), + "(R2S1) Silver Shard Puzzle 4 - Save Button": LocData(12, "Region 2C"), + "(R2) Silver Shard Puzzle 5 - Respawn": LocData(13, "Region 2E"), + "(R2) Silver Shard Puzzle 6 - Invisible": LocData(14, "Region 2B"), + "(R2S2) Silver Shard Puzzle 7 - Timed": LocData(15, "Region 2G"), + "(R2) Silver Shard Puzzle 8 - Avoid Respawn": LocData(16, "Region 2P"), + "(R2) Silver Shard Puzzle 9 - Color Dash Puzzle": LocData(17, "Region 2Q"), + "(R2) Silver Shard Puzzle 15 - Escape Serpent": LocData(18, "Region 2N"), + "(R2S2) Smile Token Puzzle 3 - Car Hall": LocData(19, "Region 2H"), + "(R2) Smile Token Puzzle 6 - Above Serpent": LocData(20, "Region 2N"), + "(R2S1) Smile Token Puzzle 8 - Erosion": LocData(21, "Region 2E"), + "(R2S2) Smile Token Puzzle 10 - Chaos": LocData(22, "Region 2K"), + "(R2) Gilded Serpent Reward": LocData(23, "Region 2P"), + "(R2S1) Cameo Room Pickup": LocData(24, "Region 2E"), + "(R2S2) Car Hall Pickup": LocData(25, "Region 2H"), + "(R2S1) Near Shooters Pickup": LocData(26, "Region 2E"), + "(R2S3) Collapsed Tunnel Pickup": LocData(27, "Region 2L"), + "(R2) Nest Room Pickup": LocData(28, "Region 2B"), + "(R2) Serpent Boss Room Pickup": LocData(29, "Region 2O"), + "(R2) Shadow Chase Reward": LocData(30, "Region 2K"), + "(R2S4) Water Room Pickup": LocData(31, "Region 2M"), + "(R2) George Reward 1": LocData(32, "Region 2B"), + "(R2) George Reward 2": LocData(33, "Region 2B"), + "(R2S2) Shadow Chase Pickup": LocData(34, "Region 2K"), + "(R2S2) Master Puzzle 1 - Map": LocData(35, "Region 2G"), # Region 3 - "(R3) Green Stone Trial": LocData(36, "Region 3"), - "(R3) Blue Stone Trial": LocData(37, "Region 3"), - "(R3) Red Stone Trial": LocData(38, "Region 3"), - "(R3) Silver Shard Puzzle 10 - Mirror": LocData(39, "Region 3"), - "(R3) Silver Shard Puzzle 11 - No Dash": LocData(40, "Region 3"), - "(R3) Silver Shard Puzzle 12 - QR": LocData(41, "Region 3"), - "(R3) Silver Shard Puzzle 13 - Black Button": LocData(42, "Region 3"), - "(R3) Silver Shard Puzzle 14 - Grapple": LocData(43, "Region 3"), - "(R3) Smile Token Puzzle 2 - Wizard": LocData(44, "Region 3"), - "(R3) Smile Token Puzzle 7 - No Dash": LocData(45, "Region 3"), - "(R3) Wizard Reward": LocData(46, "Region 3"), - "(R3) Room Below Wizard Pickup": LocData(47, "Region 3"), - "(R3) Master Puzzle 3 - Counters": LocData(48, "Region 3"), + "(R3) Green Stone Trial": LocData(36, "Region 3D"), + "(R3) Blue Stone Trial": LocData(37, "Region 3I"), + "(R3) Red Stone Trial": LocData(38, "Region 3F"), + "(R3) Silver Shard Puzzle 10 - Mirror": LocData(39, "Region 3A"), + "(R3) Silver Shard Puzzle 11 - No Dash": LocData(40, "Region 3B"), + "(R3) Silver Shard Puzzle 12 - QR": LocData(41, "Region 3E"), + "(R3) Silver Shard Puzzle 13 - Black Button": LocData(42, "Region 3E"), + "(R3) Silver Shard Puzzle 14 - Grapple": LocData(43, "Region 3I"), + "(R3) Smile Token Puzzle 2 - Wizard": LocData(44, "Region 3E"), + "(R3) Smile Token Puzzle 7 - No Dash": LocData(45, "Region 3G"), + "(R3) Wizard Reward": LocData(46, "Region 3E"), + "(R3) Room Below Wizard Pickup": LocData(47, "Region 3E"), + "(R3) Master Puzzle 3 - Counters": LocData(48, "Region 3F"), # Region 4 - "(R4) Spearman Reward": LocData(49, "Region 4 - Upper"), - "(R4) Multiparry Gold Shard Puzzle": LocData(50, "Region 4 - Central"), - "(R4) Platforming Gold Shard Room": LocData(51, "Region 4 - Central"), - "(R4) Flower Puzzle Reward": LocData(52, "Region 4 - Central"), - "(R4) Smile Token Puzzle 4 - Multiparry": LocData(53, "Region 4 - Central"), - "(R4) Smile Token Puzzle 5 - Entrance": LocData(54, "Region 4 - Entrance"), - "(R4) Rosetta Stone Pickup": LocData(55, "Region 4 - Central"), - "(R4) Long Parry Platforming Room Pickup": LocData(56, "Region 4 - Lower"), + "(R4) Spearman Reward": LocData(49, "Region 4C"), + "(R4) Multiparry Gold Shard Puzzle": LocData(50, "Region 4D"), + "(R4) Platforming Gold Shard Room": LocData(51, "Region 4D"), + "(R4) Flower Puzzle Reward": LocData(52, "Region 4E"), + "(R4) Smile Token Puzzle 4 - Multiparry": LocData(53, "Region 4D"), + "(R4) Smile Token Puzzle 5 - Entrance": LocData(54, "Region 4A"), + "(R4) Rosetta Stone Pickup": LocData(55, "Region 4D"), + "(R4) Long Parry Platforming Room Pickup": LocData(56, "Region 4G"), # Dark Region - "(Dark) Secret Room Pickup": LocData(57, "Dark Region"), - "(Dark) Large Room Pickup in the Corner": LocData(58, "Dark Region"), - "(Dark) Null Reward": LocData(59, "Dark Region"), + "(Dark) Secret Room Pickup": LocData(57, "Dark Region A"), + "(Dark) Large Room Pickup in the Corner": LocData(58, "Dark Region A"), + "(Dark) Null Reward": LocData(59, "Dark Region A"), # Smile Shop "(Smile) Shop Item 1": LocData(60, "Smile Shop"), diff --git a/worlds/glyphs/Macros.py b/worlds/glyphs/Macros.py index 5f5e54942dd3..9ae72d129305 100644 --- a/worlds/glyphs/Macros.py +++ b/worlds/glyphs/Macros.py @@ -16,6 +16,12 @@ def can_dash(state: CollectionState, player: int) -> bool: def can_dash_attack(state: CollectionState, player: int) -> bool: return state.has("Progressive Dash Orb", player, 2) +def can_wall_jump(state: CollectionState, player: int, world: "GlyphsWorld") -> bool: + return can_dash(state, player) and world.options.LogicalWallJumps.value + +def can_chain_wall_jumps(state: CollectionState, player: int, world: "GlyphsWorld") -> bool: + return can_wall_jump(state, player, world) and world.options.LogicalWallJumpChains.value + def can_press_green_buttons(state: CollectionState, player: int) -> bool: return state.has("Progressive Sword", player, 1) or state.has("Progressive Dash Orb", player, 2) @@ -111,8 +117,11 @@ def act_3_available(state: CollectionState, player: int) -> bool: def void_gate_open(state: CollectionState, player: int) -> bool: return state.has("Void Gate Shard", player, 7) +def can_start_flower_puzzle(state: CollectionState, player: int) -> bool: + return state.can_reach_region("Region 1E", player) and can_dash(state, player) + def can_solve_flower_puzzle(state: CollectionState, player: int) -> bool: - return defeated_gilded_serpent(state, player) and can_dash(state, player) and can_press_green_buttons(state, player) and has_grapple(state, player) + return can_start_flower_puzzle(state, player) and defeated_gilded_serpent(state, player) and can_dash(state, player) and can_press_green_buttons(state, player) and has_grapple(state, player) def can_access_all_silver_shards(state: CollectionState, player: int) -> bool: return ( diff --git a/worlds/glyphs/Options.py b/worlds/glyphs/Options.py index 03e4ce0a743c..5d6a1bb7b5aa 100644 --- a/worlds/glyphs/Options.py +++ b/worlds/glyphs/Options.py @@ -185,7 +185,6 @@ class DashPuzzlesSolved(Toggle): # """ # display_name = "Multiplayer Cheeses in Logic" -# Lol this is only used in one location class LogicalWallJumps(Toggle): """ Considers skips utilizing wall jumps in logic. @@ -193,12 +192,19 @@ class LogicalWallJumps(Toggle): display_name = "Wall Jumps in Logic" default = False -#class LogicalWallJumpChains(Toggle): -# """ -# Considers skips that require multiple consecutive wall jumps in logic. -# Does nothing if "Wall Jumps in Logic" is not enabled. -# """ -# display_name = "Wall Jump Chains in Logic" +class LogicalWallJumpChains(Toggle): + """ + Considers skips that require multiple consecutive wall jumps (2-3) in logic. + Does nothing if "Wall Jumps in Logic" is not enabled. + """ + display_name = "Wall Jump Chains in Logic" + +class FlowerPuzzleSkips(Toggle): + """ + Considers skips utilizing the flower puzzle in logic. + """ + display_name = "Flower Puzzle in Logic" + default = False @@ -306,7 +312,8 @@ class GlyphsOptions(PerGameCommonOptions): # BulletCombat: BulletCombat DashPuzzlesSolved: DashPuzzlesSolved LogicalWallJumps: LogicalWallJumps - # LogicalWallJumpChains: LogicalWallJumpChains + LogicalWallJumpChains: LogicalWallJumpChains + FlowerPuzzleSkips: FlowerPuzzleSkips # Open Settings WizardRequirements: WizardRequirements @@ -320,6 +327,6 @@ class GlyphsOptions(PerGameCommonOptions): glyphs_option_groups: Dict[str, List[Any]] = { "Game Options": [Goal, StartingSword, StartingDash, DeathLink], "Randomization Options": [RandomShopPrices, EnableTraps, TrapTypes, HatShuffle], - "Logical Options": [SwordlessCombat, DashPuzzlesSolved, LogicalWallJumps], + "Logical Options": [SwordlessCombat, DashPuzzlesSolved, LogicalWallJumps, LogicalWallJumpChains, FlowerPuzzleSkips], "Open Settings": [WizardRequirements, WraithRequirements, WraithSilverCount, WraithGoldCount, WraithSmileCount, WraithRuneCount, WraithGlyphstoneCount], } \ No newline at end of file diff --git a/worlds/glyphs/Regions.py b/worlds/glyphs/Regions.py index c94c18f8e0a7..4c7ef592ab57 100644 --- a/worlds/glyphs/Regions.py +++ b/worlds/glyphs/Regions.py @@ -8,28 +8,52 @@ def create_regions(world: "GlyphsWorld"): create_region(world, "Menu") - create_region(world, "Region 1 - Upper Left") - create_region(world, "Region 1 - Central") - create_region(world, "Region 1 - Left") - create_region(world, "Region 1 - Upper Right") - create_region(world, "Region 2 - Left") - create_region(world, "Region 2 - Central") - create_region(world, "Region 2 - Sector 1") - create_region(world, "Region 2 - Sector 2") - create_region(world, "Region 2 - Sector 4") - create_region(world, "Region 2 - Sector 4 End") - create_region(world, "Region 2 - Serpent Upper") - create_region(world, "Region 2 - Serpent Lower") - create_region(world, "Region 2 - Lower") - create_region(world, "Region 2 - Shadow Chase") - create_region(world, "Region 3") - create_region(world, "Region 4 - Entrance") - create_region(world, "Region 4 - Upper") - create_region(world, "Region 4 - Central") - create_region(world, "Region 4 - Lower") + create_region(world, "Region 1A") + create_region(world, "Region 1B") + create_region(world, "Region 1C") + create_region(world, "Region 1D") + create_region(world, "Region 1E") + create_region(world, "Region 1F") + create_region(world, "Region 2A") + create_region(world, "Region 2B") + create_region(world, "Region 2C") + create_region(world, "Region 2D") + create_region(world, "Region 2E") + create_region(world, "Region 2F") + create_region(world, "Region 2G") + create_region(world, "Region 2H") + create_region(world, "Region 2I") + create_region(world, "Region 2J") + create_region(world, "Region 2K") + create_region(world, "Region 2L") + create_region(world, "Region 2M") + create_region(world, "Region 2N") + create_region(world, "Region 2O") + create_region(world, "Region 2P") + create_region(world, "Region 2Q") + create_region(world, "Region 3A") + create_region(world, "Region 3B") + create_region(world, "Region 3C") + create_region(world, "Region 3D") + create_region(world, "Region 3E") + create_region(world, "Region 3F") + create_region(world, "Region 3G") + create_region(world, "Region 3H") + create_region(world, "Region 3I") + create_region(world, "Region 4A") + create_region(world, "Region 4B") + create_region(world, "Region 4C") + create_region(world, "Region 4D") + create_region(world, "Region 4E") + create_region(world, "Region 4F") + create_region(world, "Region 4G") + create_region(world, "Region 4H") + create_region(world, "Region 4I") + create_region(world, "Region 4J") create_region(world, "Collapse") create_region(world, "Smile Shop") - create_region(world, "Dark Region") + create_region(world, "Dark Region A") + create_region(world, "Dark Region B") create_region(world, "The Between") create_region(world, "Act 1") create_region(world, "Act 2") @@ -37,25 +61,25 @@ def create_regions(world: "GlyphsWorld"): create_region(world, "Epilogue") event_locations = { - "Defeat Runic Construct": "Region 1 - Central", - "Stalker Sigil 1": "Region 1 - Central", - "Serpent Lock 1": "Region 2 - Sector 1", - "Serpent Lock 2": "Region 2 - Sector 2", - "Serpent Lock 3": "Region 2 - Sector 4 End", - "Defeat Gilded Serpent": "Region 2 - Serpent Upper", - "Stalker Sigil 2": "Region 2 - Serpent Lower", - "Stalker Sigil 3": "Region 2 - Sector 4", - "Solve Flower Puzzle": "Region 2 - Sector 4 End", - "Collapse Unlock": "Region 3", - "Wizard True Defeat": "Region 3", - "Defeat Spearman": "Region 4 - Entrance", - "Good Ending": "Region 4 - Lower", - "Last Fracture": "Region 4 - Lower", + "Defeat Runic Construct": "Region 1E", + "Stalker Sigil 1": "Region 1E", + "Serpent Lock 1": "Region 2E", + "Serpent Lock 2": "Region 2H", + "Serpent Lock 3": "Region 2M", + "Defeat Gilded Serpent": "Region 2N", + "Stalker Sigil 2": "Region 2O", + "Stalker Sigil 3": "Region 2L", + "Solve Flower Puzzle": "Region 2M", + "Collapse Unlock": "Region 3E", + "Wizard True Defeat": "Region 3E", + "Defeat Spearman": "Region 4B", + "Good Ending": "Region 4I", + "Last Fracture": "Region 4I", "False Ending": "Collapse", "Smilemask Ending": "Smile Shop", - "Defeat Null": "Dark Region", - "Clarity": "Dark Region", - "Perfect Clarity": "Dark Region", + "Defeat Null": "Dark Region A", + "Clarity": "Dark Region B", + "Perfect Clarity": "Dark Region B", "Omnipotence Ending": "Act 1", "Clear Act 1": "Act 1", "Clear Act 2": "Act 2", diff --git a/worlds/glyphs/Rules.py b/worlds/glyphs/Rules.py index 3800addc97f7..579d6a0e679f 100644 --- a/worlds/glyphs/Rules.py +++ b/worlds/glyphs/Rules.py @@ -12,52 +12,78 @@ def connect_entrances(world: "GlyphsWorld"): state = CollectionState(world.multiworld) # Region Access - # ----------------------------from--------------------------to--------------------------------conditions-------------------------------- - connect_areas(world, "Menu", "Region 1 - Upper Left") - connect_areas(world, "Region 1 - Upper Left", "Region 1 - Upper Right", lambda state: can_dash(state, player)) - connect_areas(world, "Region 1 - Upper Right", "Region 1 - Upper Left", lambda state: can_dash(state, player)) - connect_areas(world, "Region 1 - Upper Left", "Region 1 - Central", lambda state: True) - connect_areas(world, "Region 1 - Upper Right", "Region 1 - Central", lambda state: True) - connect_areas(world, "Region 1 - Central", "Region 1 - Upper Right", lambda state: can_dash(state, player) and defeated_runic_construct(state, player)) - connect_areas(world, "Region 1 - Central", "Region 1 - Left", lambda state: can_dash(state, player) and defeated_runic_construct(state, player)) - connect_areas(world, "Region 1 - Left", "Region 1 - Central", lambda state: can_dash(state, player)) - connect_areas(world, "Region 1 - Upper Right", "Region 2 - Left", lambda state: can_dash(state, player)) - connect_areas(world, "Region 2 - Left", "Region 2 - Central", lambda state: can_dash(state, player)) - connect_areas(world, "Region 2 - Central", "Region 2 - Left", lambda state: can_dash(state, player)) - connect_areas(world, "Region 2 - Central", "Region 2 - Sector 1", lambda state: can_dash(state, player)) - connect_areas(world, "Region 2 - Sector 1", "Region 2 - Central", lambda state: True) - connect_areas(world, "Region 2 - Central", "Region 2 - Sector 2", lambda state: can_dash(state, player) and can_press_green_buttons(state, player)) - connect_areas(world, "Region 2 - Sector 1", "Region 2 - Sector 2", lambda state: can_dash(state, player) and can_press_green_buttons(state, player)) - connect_areas(world, "Region 2 - Central", "Region 2 - Sector 4", lambda state: True) - connect_areas(world, "Region 2 - Sector 4", "Region 2 - Sector 4 End", lambda state: can_dash(state, player)) - connect_areas(world, "Region 1 - Central", "Region 2 - Sector 4 End", lambda state: can_solve_flower_puzzle(state, player)) - connect_areas(world, "Region 2 - Central", "Region 2 - Serpent Upper", lambda state: can_dash(state, player) and can_press_green_buttons(state, player)) - connect_areas(world, "Region 2 - Sector 2", "Region 2 - Serpent Upper", lambda state: can_dash(state, player) and can_press_green_buttons(state, player)) - connect_areas(world, "Region 2 - Serpent Upper", "Region 2 - Serpent Lower", lambda state: can_dash(state, player) and can_press_green_buttons(state, player)) - connect_areas(world, "Region 2 - Serpent Lower", "Region 2 - Lower", lambda state: defeated_gilded_serpent(state, player) and has_grapple(state, player)) - connect_areas(world, "Region 2 - Sector 4", "Region 2 - Shadow Chase", lambda state: can_dash(state, player) and can_press_green_buttons(state, player) and shadow_chase_open(state, player)) - connect_areas(world, "Region 2 - Lower", "Region 3", lambda state: True) - connect_areas(world, "Region 2 - Central", "Region 4 - Entrance", lambda state: wizard_true_defeat(state, player)) - connect_areas(world, "Region 2 - Sector 4", "Region 4 - Entrance", lambda state: wizard_true_defeat(state, player)) - connect_areas(world, "Region 4 - Entrance", "Region 2 - Sector 4", lambda state: wizard_true_defeat(state, player)) - connect_areas(world, "Region 4 - Entrance", "Region 4 - Upper", lambda state: can_dash_attack(state, player) and defeated_spearman(state, player)) - connect_areas(world, "Region 4 - Upper", "Region 4 - Central", lambda state: can_dash_attack(state, player) and can_parry(state, player)) - connect_areas(world, "Region 4 - Central", "Region 4 - Lower", lambda state: can_dash(state, player) and can_parry(state, player) and can_press_green_buttons(state, player)) - connect_areas(world, "Region 3", "Region 4 - Lower", lambda state: can_solve_flower_puzzle(state, player)) - connect_areas(world, "Region 3", "Collapse", lambda state: collapse_available(state, player)) - connect_areas(world, "Region 2 - Sector 2", "Smile Shop", lambda state: can_dash(state, player) and can_press_green_buttons(state, player)) - connect_areas(world, "Smile Shop", "Region 1 - Central", lambda state: True) - connect_areas(world, "Region 2 - Lower", "Dark Region", lambda state: can_dash(state, player)) - connect_areas(world, "Dark Region", "Region 3", lambda state: True) - connect_areas(world, "Region 2 - Left", "The Between", lambda state: can_dash(state, player)) - connect_areas(world, "The Between", "Region 2 - Left", lambda state: True) - connect_areas(world, "The Between", "Smile Shop", lambda state: can_dash(state, player)) - connect_areas(world, "Menu", "Act 1", lambda state: act_1_available(state, player)) - connect_areas(world, "Menu", "Act 2", lambda state: act_2_available(state, player)) - connect_areas(world, "Menu", "Act 3", lambda state: act_3_available(state, player)) - connect_areas(world, "Act 1", "Act 2", lambda state: void_gate_open(state, player) and can_dash_attack(state, player)) - connect_areas(world, "Act 2", "Act 3", lambda state: can_fight(state, player, world) and can_dash_attack(state, player)) - connect_areas(world, "Act 1", "Epilogue", lambda state: can_dash(state, player) and state.has("Shroud", player)) + # ----------------------from----------------to---------------------------------------------conditions-------------------------------- + connect_areas(world, "Menu", "Region 1A", lambda state: True) + connect_areas(world, "Region 1A", "Region 1C", lambda state: True) + connect_areas(world, "Region 1A", "Region 1F", lambda state: can_dash(state, player)) + connect_areas(world, "Region 1B", "Region 1C", lambda state: can_dash(state, player)) + connect_areas(world, "Region 1B", "Region 1E", lambda state: defeated_runic_construct(state, player) and can_wall_jump(state, player, world)) + connect_areas(world, "Region 1C", "Region 1B", lambda state: can_wall_jump(state, player, world)) + connect_areas(world, "Region 1C", "Region 1D", lambda state: True) + connect_areas(world, "Region 1C", "Region 1F", lambda state: can_start_flower_puzzle(state, player) and world.options.FlowerPuzzleSkips.value) + connect_areas(world, "Region 1D", "Region 1B", lambda state: can_start_flower_puzzle(state, player) and world.options.FlowerPuzzleSkips.value) + connect_areas(world, "Region 1D", "Region 1E", lambda state: True) + connect_areas(world, "Region 1E", "Region 1B", lambda state: defeated_runic_construct(state, player) and can_dash(state, player)) + connect_areas(world, "Region 1E", "Region 1D", lambda state: can_dash(state, player)) + connect_areas(world, "Region 1F", "Region 1A", lambda state: can_dash(state, player)) + connect_areas(world, "Region 1F", "Region 1C", lambda state: True) + connect_areas(world, "Region 1F", "Region 2A", lambda state: can_dash(state, player)) + connect_areas(world, "Region 2A", "Region 1F", lambda state: True) + connect_areas(world, "Region 2A", "Region 2B", lambda state: can_dash(state, player)) + connect_areas(world, "Region 2B", "Region 2E", lambda state: can_dash(state, player)) + connect_areas(world, "Region 2B", "Region 2L", lambda state: True) + connect_areas(world, "Region 2B", "Region 2N", lambda state: serpent_door_open(state, player)) + connect_areas(world, "Region 2B", "The Between", lambda state: can_dash(state, player)) + connect_areas(world, "Region 2C", "Region 2D", lambda state: True) + connect_areas(world, "Region 2D", "Region 2C", lambda state: True) # needs to change when save button sanity is implemented + # connect_areas(world, "Region 2E", "Region 2B", lambda state: True) # this actually doesnt work since the path is blocked off from this angle if you havn't visited the region before + connect_areas(world, "Region 2E", "Region 2D", lambda state: can_dash(state, player) and can_press_green_buttons(state, player)) + connect_areas(world, "Region 2E", "Region 2G", lambda state: can_dash(state, player) and can_press_green_buttons(state, player)) + connect_areas(world, "Region 2F", "Region 2E", lambda state: True) + connect_areas(world, "Region 2F", "Smile Shop", lambda state: True) + connect_areas(world, "Region 2G", "Region 2F", lambda state: True) + connect_areas(world, "Region 2G", "Region 2I", lambda state: can_dash(state, player) and can_press_green_buttons(state, player)) + connect_areas(world, "Region 2G", "Region 2O", lambda state: can_start_flower_puzzle(state, player) and world.options.FlowerPuzzleSkips.value and can_press_green_buttons(state, player)) + connect_areas(world, "Region 2I", "Region 2H", lambda state: can_dash(state, player) and can_press_green_buttons(state, player)) + connect_areas(world, "Region 2I", "Region 2J", lambda state: can_dash(state, player) and can_press_green_buttons(state, player) or can_wall_jump(state, player, world)) + connect_areas(world, "Region 2J", "Region 2I", lambda state: can_chain_wall_jumps(state, player, world)) + connect_areas(world, "Region 2J", "Region 2K", lambda state: shadow_chase_open(state, player)) + connect_areas(world, "Region 2L", "Region 2M", lambda state: can_dash(state, player)) + connect_areas(world, "Region 2L", "Region 4A", lambda state: wizard_true_defeat(state, player)) + connect_areas(world, "Region 2N", "Region 2O", lambda state: defeated_gilded_serpent(state, player) and can_press_green_buttons(state, player) and can_dash(state, player)) + connect_areas(world, "Region 2O", "Region 2P", lambda state: defeated_gilded_serpent(state, player)) + connect_areas(world, "Region 2P", "Region 2O", lambda state: defeated_gilded_serpent(state, player) and can_dash(state, player)) + connect_areas(world, "Region 2P", "Region 2Q", lambda state: has_grapple(state, player)) + connect_areas(world, "Region 2Q", "Region 3A", lambda state: True) + connect_areas(world, "Region 2Q", "Dark Region A", lambda state: can_dash(state, player)) + connect_areas(world, "Region 3A", "Region 2M", lambda state: can_solve_flower_puzzle(state, player) and world.options.FlowerPuzzleSkips.value) + connect_areas(world, "Region 3A", "Region 3B", lambda state: can_dash(state, player) and has_grapple(state, player) and can_press_green_buttons(state, player)) + connect_areas(world, "Region 3A", "Region 3E", lambda state: can_dash(state, player)) + connect_areas(world, "Region 3A", "Region 3G", lambda state: can_dash(state, player) and has_grapple(state, player)) + connect_areas(world, "Region 3A", "Region 4F", lambda state: can_solve_flower_puzzle(state, player) and world.options.FlowerPuzzleSkips.value) + connect_areas(world, "Region 3B", "Region 3C", lambda state: can_dash(state, player)) + connect_areas(world, "Region 3C", "Region 3D", lambda state: can_dash(state, player) and has_grapple(state, player) and can_press_green_buttons(state, player)) + connect_areas(world, "Region 3E", "Region 3F", lambda state: can_dash(state, player) and has_grapple(state, player)) + connect_areas(world, "Region 3E", "Collapse", lambda state: collapse_available(state, player)) + connect_areas(world, "Region 3G", "Region 3H", lambda state: can_dash(state, player) and has_grapple(state, player) and can_press_green_buttons(state, player)) + connect_areas(world, "Region 3H", "Region 3I", lambda state: can_dash(state, player) and has_grapple(state, player) and can_press_green_buttons(state, player)) + connect_areas(world, "Region 4A", "Region 4B", lambda state: can_dash_attack(state, player)) + connect_areas(world, "Region 4B", "Region 4C", lambda state: defeated_spearman(state, player)) + connect_areas(world, "Region 4C", "Region 4D", lambda state: can_dash_attack(state, player) and has_grapple(state, player) and can_parry(state, player)) + connect_areas(world, "Region 4D", "Region 4E", lambda state: can_dash(state, player)) + connect_areas(world, "Region 4D", "Region 4G", lambda state: can_dash(state, player) and has_grapple(state, player) and can_parry(state, player) and can_press_green_buttons(state, player)) + connect_areas(world, "Region 4G", "Region 4F", lambda state: True) + connect_areas(world, "Region 4G", "Region 4H", lambda state: can_dash(state, player) and has_grapple(state, player) and can_parry(state, player) and can_press_green_buttons(state, player)) + connect_areas(world, "Region 4H", "Region 4I", lambda state: can_dash(state, player) and has_grapple(state, player) and can_parry(state, player)) + connect_areas(world, "Region 4I", "Region 4J", lambda state: can_dash(state, player)) + connect_areas(world, "Smile Shop", "Region 1C", lambda state: True) + connect_areas(world, "Dark Region A", "Dark Region B", lambda state: defeated_null(state, player)) + connect_areas(world, "The Between", "Region 2B", lambda state: can_dash(state, player)) + connect_areas(world, "The Between", "Smile Shop", lambda state: can_wall_jump(state, player, world)) + connect_areas(world, "Menu", "Act 1", lambda state: act_1_available(state, player)) + connect_areas(world, "Menu", "Act 2", lambda state: act_2_available(state, player)) + connect_areas(world, "Menu", "Act 3", lambda state: act_3_available(state, player)) + connect_areas(world, "Act 1", "Epilogue", lambda state: can_dash(state, player) and state.has("Shroud", player)) def set_rules(world: "GlyphsWorld"): @@ -73,27 +99,27 @@ def set_rules(world: "GlyphsWorld"): set_rule_from_string(world, "Defeat Runic Construct", lambda state: can_fight(state, player, world)) set_rule_from_string(world, "Stalker Sigil 1", lambda state: stalker_sigils_present(state, player)) set_rule_from_string(world, "Serpent Lock 1", lambda state: can_dash(state, player)) - set_rule_from_string(world, "Serpent Lock 2", lambda state: can_dash(state, player) and can_press_green_buttons(state, player)) + set_rule_from_string(world, "Serpent Lock 2", lambda state: can_dash(state, player)) set_rule_from_string(world, "Serpent Lock 3", lambda state: True) - set_rule_from_string(world, "Defeat Gilded Serpent", lambda state: can_dash(state, player) and serpent_door_open(state, player) and can_fight(state, player, world)) - set_rule_from_string(world, "Stalker Sigil 2", lambda state: stalker_sigils_present(state, player) and can_dash(state, player) and can_press_green_buttons(state, player)) + set_rule_from_string(world, "Defeat Gilded Serpent", lambda state: can_dash(state, player) and can_fight(state, player, world)) + set_rule_from_string(world, "Stalker Sigil 2", lambda state: stalker_sigils_present(state, player)) set_rule_from_string(world, "Stalker Sigil 3", lambda state: stalker_sigils_present(state, player)) - set_rule_from_string(world, "Solve Flower Puzzle", lambda state: can_dash(state, player) and can_press_green_buttons(state, player) and has_grapple(state, player) and defeated_gilded_serpent(state, player)) - set_rule_from_string(world, "Collapse Unlock", lambda state: can_dash(state, player) and wizard_fight_available(state, player, world) and can_fight(state, player, world)) - set_rule_from_string(world, "Wizard True Defeat", lambda state: can_dash_attack(state, player) and wizard_fight_available(state, player, world) and can_fight(state, player, world)) - set_rule_from_string(world, "Defeat Spearman", lambda state: can_dash_attack(state, player) and can_press_green_buttons(state, player) and has_grapple(state, player) and defeated_gilded_serpent(state, player)) - set_rule_from_string(world, "Good Ending", lambda state: can_fight(state, player, world) and can_dash_attack(state, player) and can_parry(state, player) and has_grapple(state, player) and wraith_fight_available(state, player, world) and state.has("Gold Shard", player, 3)) + set_rule_from_string(world, "Solve Flower Puzzle", lambda state: can_solve_flower_puzzle(state, player)) + set_rule_from_string(world, "Collapse Unlock", lambda state: can_dash(state, player) and wizard_fight_available(state, player, world) and can_fight(state, player, world) and has_grapple(state, player)) + set_rule_from_string(world, "Wizard True Defeat", lambda state: can_dash_attack(state, player) and wizard_fight_available(state, player, world) and can_fight(state, player, world) and has_grapple(state, player)) + set_rule_from_string(world, "Defeat Spearman", lambda state: can_dash_attack(state, player) and can_fight(state, player, world)) + set_rule_from_string(world, "Good Ending", lambda state: can_fight(state, player, world) and can_dash_attack(state, player) and can_parry(state, player) and wraith_fight_available(state, player, world) and state.has("Gold Shard", player, 3)) set_rule_from_string(world, "Last Fracture", lambda state: has_clarity(state, player) and wraith_fight_available(state, player, world) and state.has("Good Ending", player)) - set_rule_from_string(world, "False Ending", lambda state: can_dash(state, player) and has_grapple(state, player)) + set_rule_from_string(world, "False Ending", lambda state: can_dash(state, player) and has_grapple(state, player) and state.can_reach_region("Region 2B", player)) # need to check for this specific region because if one specific screen has not been reached then the collapse is impossiblee set_rule_from_string(world, "Smilemask Ending", lambda state: state.has("Smile Token", player, 10)) set_rule_from_string(world, "Defeat Null", lambda state: can_dash_attack(state, player) and has_grapple(state, player) and has_sword(state, player)) - set_rule_from_string(world, "Clarity", lambda state: defeated_null(state, player) and state.has("Rune Cube", player, 3)) - set_rule_from_string(world, "Perfect Clarity", lambda state: defeated_null(state, player) and state.has("Rune Cube", player, 3) and (state.has("Shroud", player) or state.has("Progressive Essence of George", player, 1))) + set_rule_from_string(world, "Clarity", lambda state: state.has("Rune Cube", player, 3)) + set_rule_from_string(world, "Perfect Clarity", lambda state: state.has("Rune Cube", player, 3) and (state.has("Shroud", player) or state.has("Progressive Essence of George", player))) set_rule_from_string(world, "Omnipotence Ending", lambda state: can_dash(state, player) and void_gate_open(state, player)) - set_rule_from_string(world, "Clear Act 1", lambda state: void_gate_open(state, player) and can_dash_attack(state, player) and has_grapple(state, player) and state.has("Shroud", player)) - set_rule_from_string(world, "Clear Act 2", lambda state: has_sword(state, player) and can_dash_attack(state, player) and (state.has("Shroud", player) or state.has("Progressive Essence of George", player, 1)) and has_grapple(state, player) and can_parry(state, player) and state.has("Gold Shard", player, 1)) - set_rule_from_string(world, "True Ending", lambda state: can_fight(state, player, world) and can_parry(state, player) and (state.has("Shroud", player) or state.has("Progressive Essence of George", player, 1)) and state.has("Gold Shard", player, 3)) - set_rule_from_string(world, "Epilogue Ending", lambda state: can_dash(state, player) and has_grapple(state, player) and state.has("Shroud", player) and state.has("Progressive Essence of George", player, 1)) + set_rule_from_string(world, "Clear Act 1", lambda state: void_gate_open(state, player) and can_dash_attack(state, player) and has_grapple(state, player) and state.has("Shroud", player)) + set_rule_from_string(world, "Clear Act 2", lambda state: has_sword(state, player) and can_dash_attack(state, player) and (state.has("Shroud", player) or state.has("Progressive Essence of George", player, 1)) and has_grapple(state, player) and can_parry(state, player) and state.has("Gold Shard", player, 1)) + set_rule_from_string(world, "True Ending", lambda state: can_fight(state, player, world) and can_parry(state, player) and (state.has("Shroud", player) or state.has("Progressive Essence of George", player, 1)) and state.has("Gold Shard", player, 3)) + set_rule_from_string(world, "Epilogue Ending", lambda state: can_dash(state, player) and has_grapple(state, player) and state.has("Shroud", player) and state.has("Progressive Essence of George", player, 1)) # Region 1 set_rule_from_string(world, "(R1) Starting Item", lambda state: True) @@ -101,70 +127,70 @@ def set_rules(world: "GlyphsWorld"): set_rule_from_string(world, "(R1) Runic Construct Reward", lambda state: defeated_runic_construct(state, player)) set_rule_from_string(world, "(R1) Map Pedestal", lambda state: can_dash(state, player)) set_rule_from_string(world, "(R1) Silver Shard Puzzle 1 - Map", lambda state: can_dash(state, player)) - set_rule_from_string(world, "(R1) Silver Shard Puzzle 2 - Grapple", lambda state: can_dash(state, player) and has_grapple(state, player)) + set_rule_from_string(world, "(R1) Silver Shard Puzzle 2 - Grapple", lambda state: can_dash(state, player) and has_grapple(state, player)) set_rule_from_string(world, "(R1) Silver Shard Puzzle 3 - Spike Tunnel", lambda state: can_dash(state, player)) - set_rule_from_string(world, "(R1) Smile Token Puzzle 1 - Hidden Bounce Pad", lambda state: can_dash(state, player) and has_grapple(state, player)) + set_rule_from_string(world, "(R1) Smile Token Puzzle 1 - Hidden Bounce Pad", lambda state: can_dash(state, player) and has_grapple(state, player)) set_rule_from_string(world, "(R1) Smile Token Puzzle 9 - Moving Platforms", lambda state: can_dash(state, player)) set_rule_from_string(world, "(R1) Color Cypher Room Pickup", lambda state: can_dash(state, player)) - set_rule_from_string(world, "(R1) Master Puzzle 2 - Silence", lambda state: can_dash(state, player) and has_grapple(state, player)) + set_rule_from_string(world, "(R1) Master Puzzle 2 - Silence", lambda state: can_dash(state, player) and has_grapple(state, player)) # Region 2 - set_rule_from_string(world, "(R2S1) Silver Shard Puzzle 4 - Save Button", lambda state: can_dash(state, player) and can_press_green_buttons(state, player)) - set_rule_from_string(world, "(R2) Silver Shard Puzzle 5 - Respawn", lambda state: can_dash(state, player)) - set_rule_from_string(world, "(R2) Silver Shard Puzzle 6 - Invisible", lambda state: can_dash(state, player) and can_press_green_buttons(state, player)) - set_rule_from_string(world, "(R2S2) Silver Shard Puzzle 7 - Timed", lambda state: can_dash(state, player) and can_press_green_buttons(state, player)) - set_rule_from_string(world, "(R2) Silver Shard Puzzle 8 - Avoid Respawn", lambda state: can_dash(state, player)) - set_rule_from_string(world, "(R2) Silver Shard Puzzle 9 - Color Dash Puzzle", lambda state: can_dash(state, player) and (options.DashPuzzlesSolved.value or state.can_reach_location("(R1) Color Cypher Room Pickup", player))) - set_rule_from_string(world, "(R2) Silver Shard Puzzle 15 - Escape Serpent", lambda state: can_dash(state, player) and can_press_green_buttons(state, player) and (defeated_gilded_serpent(state, player) or can_fight(state, player, world))) + set_rule_from_string(world, "(R2S1) Silver Shard Puzzle 4 - Save Button", lambda state: True) + set_rule_from_string(world, "(R2) Silver Shard Puzzle 5 - Respawn", lambda state: can_dash(state, player) and state.can_reach_region("Region 2B", player)) # change this to being able to access certain save buttons one save button sanity is implemented + set_rule_from_string(world, "(R2) Silver Shard Puzzle 6 - Invisible", lambda state: can_dash(state, player) and can_press_green_buttons(state, player)) + set_rule_from_string(world, "(R2S2) Silver Shard Puzzle 7 - Timed", lambda state: can_dash(state, player) and can_press_green_buttons(state, player)) + set_rule_from_string(world, "(R2) Silver Shard Puzzle 8 - Avoid Respawn", lambda state: can_dash(state, player) and has_grapple(state, player)) + set_rule_from_string(world, "(R2) Silver Shard Puzzle 9 - Color Dash Puzzle", lambda state: can_dash(state, player) and (options.DashPuzzlesSolved.value or state.can_reach_location("(R1) Color Cypher Room Pickup", player))) + set_rule_from_string(world, "(R2) Silver Shard Puzzle 15 - Escape Serpent", lambda state: can_dash(state, player) and can_press_green_buttons(state, player) and (defeated_gilded_serpent(state, player) or can_fight(state, player, world))) set_rule_from_string(world, "(R2S2) Smile Token Puzzle 3 - Car Hall", lambda state: can_dash(state, player)) - set_rule_from_string(world, "(R2) Smile Token Puzzle 6 - Above Serpent", lambda state: can_dash(state, player) and defeated_gilded_serpent(state, player)) + set_rule_from_string(world, "(R2) Smile Token Puzzle 6 - Above Serpent", lambda state: can_dash(state, player) and defeated_gilded_serpent(state, player)) set_rule_from_string(world, "(R2S1) Smile Token Puzzle 8 - Erosion", lambda state: can_dash(state, player)) - set_rule_from_string(world, "(R2S2) Smile Token Puzzle 10 - Chaos", lambda state: can_dash_attack(state, player) and can_parry(state, player) and has_grapple(state, player)) - set_rule_from_string(world, "(R2) Gilded Serpent Reward", lambda state: defeated_gilded_serpent(state, player)) + set_rule_from_string(world, "(R2S2) Smile Token Puzzle 10 - Chaos", lambda state: can_dash_attack(state, player) and can_parry(state, player) and has_grapple(state, player)) + set_rule_from_string(world, "(R2) Gilded Serpent Reward", lambda state: True) set_rule_from_string(world, "(R2S1) Cameo Room Pickup", lambda state: can_dash(state, player)) set_rule_from_string(world, "(R2S2) Car Hall Pickup", lambda state: can_dash(state, player)) set_rule_from_string(world, "(R2S1) Near Shooters Pickup", lambda state: can_dash(state, player)) set_rule_from_string(world, "(R2S3) Collapsed Tunnel Pickup", lambda state: True) set_rule_from_string(world, "(R2) Nest Room Pickup", lambda state: can_dash(state, player)) - set_rule_from_string(world, "(R2) Serpent Boss Room Pickup", lambda state: can_dash(state, player) and (options.LogicalWallJumps.value or (state.can_reach_region("Region 2 - Serpent Upper", player) and can_press_green_buttons(state, player) and defeated_gilded_serpent(state, player)))) - set_rule_from_string(world, "(R2) Shadow Chase Reward", lambda state: can_dash(state, player) and has_grapple(state, player) and can_press_green_buttons(state, player)) + set_rule_from_string(world, "(R2) Serpent Boss Room Pickup", lambda state: can_dash(state, player) and (options.LogicalWallJumps.value or (state.can_reach_region("Region 2N", player) and can_press_green_buttons(state, player) and defeated_gilded_serpent(state, player)))) + set_rule_from_string(world, "(R2) Shadow Chase Reward", lambda state: can_dash(state, player) and has_grapple(state, player) and can_press_green_buttons(state, player)) set_rule_from_string(world, "(R2S4) Water Room Pickup", lambda state: can_solve_flower_puzzle(state, player)) - set_rule_from_string(world, "(R2) George Reward 1", lambda state: can_dash(state, player) and state.has("Seeds", player, 10)) - set_rule_from_string(world, "(R2) George Reward 2", lambda state: can_dash(state, player) and state.has("Seeds", player, 10)) - set_rule_from_string(world, "(R2S2) Shadow Chase Pickup", lambda state: can_dash(state, player) and has_grapple(state, player) and can_press_green_buttons(state, player)) - set_rule_from_string(world, "(R2S2) Master Puzzle 1 - Map", lambda state: can_dash(state, player) and state.has("Silver Shard", player, 15) and (options.DashPuzzlesSolved.value or can_access_all_silver_shards(state, player))) + set_rule_from_string(world, "(R2) George Reward 1", lambda state: can_dash(state, player) and state.has("Seeds", player, 10)) + set_rule_from_string(world, "(R2) George Reward 2", lambda state: can_dash(state, player) and state.has("Seeds", player, 10)) + set_rule_from_string(world, "(R2S2) Shadow Chase Pickup", lambda state: can_dash(state, player) and has_grapple(state, player) and can_press_green_buttons(state, player)) + set_rule_from_string(world, "(R2S2) Master Puzzle 1 - Map", lambda state: can_dash(state, player) and state.has("Silver Shard", player, 15) and (options.DashPuzzlesSolved.value or can_access_all_silver_shards(state, player))) # Region 3 - set_rule_from_string(world, "(R3) Green Stone Trial", lambda state: can_dash(state, player) and has_grapple(state, player) and can_press_green_buttons(state, player)) - set_rule_from_string(world, "(R3) Blue Stone Trial", lambda state: can_dash(state, player) and has_grapple(state, player) and can_press_green_buttons(state, player)) - set_rule_from_string(world, "(R3) Red Stone Trial", lambda state: can_dash(state, player) and has_grapple(state, player) and can_fight(state, player, world)) - set_rule_from_string(world, "(R3) Silver Shard Puzzle 10 - Mirror", lambda state: can_dash(state, player) and has_grapple(state, player) and can_press_green_buttons(state, player)) - set_rule_from_string(world, "(R3) Silver Shard Puzzle 11 - No Dash", lambda state: can_dash(state, player) and has_grapple(state, player) and can_press_green_buttons(state, player)) + set_rule_from_string(world, "(R3) Green Stone Trial", lambda state: can_dash(state, player) and has_grapple(state, player) and can_press_green_buttons(state, player)) + set_rule_from_string(world, "(R3) Blue Stone Trial", lambda state: can_dash(state, player) and has_grapple(state, player) and can_press_green_buttons(state, player)) + set_rule_from_string(world, "(R3) Red Stone Trial", lambda state: can_fight(state, player, world) and (can_dash(state, player) or has_grapple(state, player))) + set_rule_from_string(world, "(R3) Silver Shard Puzzle 10 - Mirror", lambda state: can_dash(state, player) and has_grapple(state, player) and can_press_green_buttons(state, player)) + set_rule_from_string(world, "(R3) Silver Shard Puzzle 11 - No Dash", lambda state: can_dash(state, player)) set_rule_from_string(world, "(R3) Silver Shard Puzzle 12 - QR", lambda state: can_dash(state, player)) - set_rule_from_string(world, "(R3) Silver Shard Puzzle 13 - Black Button", lambda state: can_dash(state, player) and has_grapple(state, player)) - set_rule_from_string(world, "(R3) Silver Shard Puzzle 14 - Grapple", lambda state: can_dash(state, player) and has_grapple(state, player) and can_press_green_buttons(state, player)) - set_rule_from_string(world, "(R3) Smile Token Puzzle 2 - Wizard", lambda state: can_dash(state, player) and has_grapple(state, player)) - set_rule_from_string(world, "(R3) Smile Token Puzzle 7 - No Dash", lambda state: can_dash(state, player) and has_grapple(state, player) and can_press_green_buttons(state, player)) - set_rule_from_string(world, "(R3) Wizard Reward", lambda state: can_dash_attack(state, player) and wizard_fight_available(state, player, world) and can_fight(state, player, world)) - set_rule_from_string(world, "(R3) Room Below Wizard Pickup", lambda state: can_dash(state, player)) - set_rule_from_string(world, "(R3) Master Puzzle 3 - Counters", lambda state: can_dash_attack(state, player) and has_grapple(state, player) and has_sword(state, player)) + set_rule_from_string(world, "(R3) Silver Shard Puzzle 13 - Black Button", lambda state: can_dash(state, player) and has_grapple(state, player)) + set_rule_from_string(world, "(R3) Silver Shard Puzzle 14 - Grapple", lambda state: can_dash(state, player) and has_grapple(state, player)) + set_rule_from_string(world, "(R3) Smile Token Puzzle 2 - Wizard", lambda state: can_dash(state, player) and has_grapple(state, player)) + set_rule_from_string(world, "(R3) Smile Token Puzzle 7 - No Dash", lambda state: can_dash(state, player) and has_grapple(state, player) and can_press_green_buttons(state, player)) + set_rule_from_string(world, "(R3) Wizard Reward", lambda state: collapse_available(state, player) and can_dash(state, player)) + set_rule_from_string(world, "(R3) Room Below Wizard Pickup", lambda state: can_dash(state, player) and has_grapple(state, player)) + set_rule_from_string(world, "(R3) Master Puzzle 3 - Counters", lambda state: can_dash_attack(state, player) and has_grapple(state, player) and has_sword(state, player)) # Region 4 - set_rule_from_string(world, "(R4) Spearman Reward", lambda state: can_dash_attack(state, player) and has_grapple(state, player) and can_fight(state, player, world)) - set_rule_from_string(world, "(R4) Multiparry Gold Shard Puzzle", lambda state: can_dash(state, player) and has_grapple(state, player) and can_parry(state, player)) - set_rule_from_string(world, "(R4) Platforming Gold Shard Room", lambda state: can_dash(state, player) and has_grapple(state, player) and can_parry(state, player) and has_sword(state, player)) + set_rule_from_string(world, "(R4) Spearman Reward", lambda state: True) + set_rule_from_string(world, "(R4) Multiparry Gold Shard Puzzle", lambda state: can_dash(state, player) and has_grapple(state, player) and can_parry(state, player)) + set_rule_from_string(world, "(R4) Platforming Gold Shard Room", lambda state: can_dash(state, player) and has_grapple(state, player) and can_parry(state, player) and has_sword(state, player)) set_rule_from_string(world, "(R4) Flower Puzzle Reward", lambda state: can_solve_flower_puzzle(state, player)) - set_rule_from_string(world, "(R4) Smile Token Puzzle 4 - Multiparry", lambda state: can_dash(state, player) and has_grapple(state, player) and can_parry(state, player)) + set_rule_from_string(world, "(R4) Smile Token Puzzle 4 - Multiparry", lambda state: can_dash(state, player) and has_grapple(state, player) and can_parry(state, player)) set_rule_from_string(world, "(R4) Smile Token Puzzle 5 - Entrance", lambda state: can_dash(state, player)) set_rule_from_string(world, "(R4) Rosetta Stone Pickup", lambda state: can_dash(state, player)) - set_rule_from_string(world, "(R4) Long Parry Platforming Room Pickup", lambda state: can_dash(state, player) and has_grapple(state, player) and can_parry(state, player) and can_press_green_buttons(state, player)) + set_rule_from_string(world, "(R4) Long Parry Platforming Room Pickup", lambda state: can_dash(state, player) and has_grapple(state, player) and can_parry(state, player) and can_press_green_buttons(state, player)) # Collapse - set_rule_from_string(world, "(Esc) Escape the Escape Sequence", lambda state: can_dash(state, player) and has_grapple(state, player)) + set_rule_from_string(world, "(Esc) Escape the Escape Sequence", lambda state: can_dash(state, player) and has_grapple(state, player) and state.can_reach_region("Region 2B", player)) # Smile Shop @@ -178,16 +204,16 @@ def set_rules(world: "GlyphsWorld"): # Dark Region set_rule_from_string(world, "(Dark) Secret Room Pickup", lambda state: can_dash_attack(state, player) and has_grapple(state, player) and has_sword(state, player)) set_rule_from_string(world, "(Dark) Large Room Pickup in the Corner", lambda state: can_dash_attack(state, player) and has_grapple(state, player) and has_sword(state, player)) - set_rule_from_string(world, "(Dark) Null Reward", lambda state: can_dash_attack(state, player) and has_grapple(state, player) and has_sword(state, player)) + set_rule_from_string(world, "(Dark) Null Reward", lambda state: defeated_null(state, player)) # The Between - set_rule_from_string(world, "(Between) Construct Reward", lambda state: can_fight(state, player, world) and can_dash_attack(state, player) and has_grapple(state, player) and can_parry(state, player)) - set_rule_from_string(world, "(Between) Serpent Reward", lambda state: state.has("Progressive Sword", player, 2) and state.has("Progressive Dash Orb", player, 3) and has_grapple(state, player) and can_parry(state, player) and (state.has("Progressive Essence of George", player, 1) or state.has("Shroud", player)) and state.has("Silver Shard", player, 9)) - set_rule_from_string(world, "(Between) Wizard Reward", lambda state: state.has("Progressive Sword", player, 2) and state.has("Progressive Dash Orb", player, 3) and has_grapple(state, player) and can_parry(state, player) and state.has("Progressive Essence of George", player, 1) and state.has("Shroud", player) and state.has("Silver Shard", player, 15) and state.has("Gold Shard", player, 1)) - set_rule_from_string(world, "(Between) Hot Spring Item", lambda state: state.has("Progressive Sword", player, 2) and state.has("Progressive Dash Orb", player, 3) and has_grapple(state, player) and can_parry(state, player) and state.has("Progressive Essence of George", player, 1) and state.has("Shroud", player) and state.has("Silver Shard", player, 15) and state.has("Gold Shard", player, 1)) - set_rule_from_string(world, "(Between) Between Reward 1", lambda state: state.has("Progressive Sword", player, 2) and state.has("Progressive Dash Orb", player, 3) and has_grapple(state, player) and state.has("Progressive Parry", player, 2) and state.has("Progressive Essence of George", player, 1) and state.has("Shroud", player) and state.has("Silver Shard", player, 15) and state.has("Gold Shard", player, 1)) - set_rule_from_string(world, "(Between) Between Reward 2", lambda state: state.has("Progressive Sword", player, 2) and state.has("Progressive Dash Orb", player, 3) and has_grapple(state, player) and state.has("Progressive Parry", player, 2) and state.has("Progressive Essence of George", player, 1) and state.has("Shroud", player) and state.has("Silver Shard", player, 15) and state.has("Gold Shard", player, 1)) + set_rule_from_string(world, "(Between) Construct Reward", lambda state: can_fight(state, player, world) and can_dash_attack(state, player) and has_grapple(state, player) and can_parry(state, player)) + set_rule_from_string(world, "(Between) Serpent Reward", lambda state: state.has("Progressive Sword", player, 2) and state.has("Progressive Dash Orb", player, 3) and has_grapple(state, player) and can_parry(state, player) and (state.has("Progressive Essence of George", player, 1) or state.has("Shroud", player)) and state.has("Silver Shard", player, 9)) + set_rule_from_string(world, "(Between) Wizard Reward", lambda state: state.has("Progressive Sword", player, 2) and state.has("Progressive Dash Orb", player, 3) and has_grapple(state, player) and can_parry(state, player) and state.has("Progressive Essence of George", player, 1) and state.has("Shroud", player) and state.has("Silver Shard", player, 15) and state.has("Gold Shard", player, 1)) + set_rule_from_string(world, "(Between) Hot Spring Item", lambda state: state.has("Progressive Sword", player, 2) and state.has("Progressive Dash Orb", player, 3) and has_grapple(state, player) and can_parry(state, player) and state.has("Progressive Essence of George", player, 1) and state.has("Shroud", player) and state.has("Silver Shard", player, 15) and state.has("Gold Shard", player, 1)) + set_rule_from_string(world, "(Between) Between Reward 1", lambda state: state.has("Progressive Sword", player, 2) and state.has("Progressive Dash Orb", player, 3) and has_grapple(state, player) and state.has("Progressive Parry", player, 2) and state.has("Progressive Essence of George", player, 1) and state.has("Shroud", player) and state.has("Silver Shard", player, 15) and state.has("Gold Shard", player, 1)) + set_rule_from_string(world, "(Between) Between Reward 2", lambda state: state.has("Progressive Sword", player, 2) and state.has("Progressive Dash Orb", player, 3) and has_grapple(state, player) and state.has("Progressive Parry", player, 2) and state.has("Progressive Essence of George", player, 1) and state.has("Shroud", player) and state.has("Silver Shard", player, 15) and state.has("Gold Shard", player, 1)) # Act 1 @@ -205,10 +231,10 @@ def set_rules(world: "GlyphsWorld"): # Act 2 set_rule_from_string(world, "(Void 2) Free Item", lambda state: True) set_rule_from_string(world, "(Void 2) Boss Rush Heal 1", lambda state: can_fight(state, player, world)) - set_rule_from_string(world, "(Void 2) Boss Rush Heal 2", lambda state: has_sword(state, player) and can_dash_attack(state, player) and (state.has("Shroud", player) or state.has("Progressive Essence of George", player, 1))) - set_rule_from_string(world, "(Void 2) Boss Rush Heal 3", lambda state: has_sword(state, player) and can_dash_attack(state, player) and (state.has("Shroud", player) or state.has("Progressive Essence of George", player, 1))) - set_rule_from_string(world, "(Void 2) Boss Rush Heal 4", lambda state: has_sword(state, player) and can_dash_attack(state, player) and (state.has("Shroud", player) or state.has("Progressive Essence of George", player, 1)) and has_grapple(state, player)) - set_rule_from_string(world, "(Void 2) Pink Bow Pickup", lambda state: can_dash(state, player) or has_grapple(state, player)) + set_rule_from_string(world, "(Void 2) Boss Rush Heal 2", lambda state: has_sword(state, player) and can_dash_attack(state, player) and (state.has("Shroud", player) or state.has("Progressive Essence of George", player, 1))) + set_rule_from_string(world, "(Void 2) Boss Rush Heal 3", lambda state: has_sword(state, player) and can_dash_attack(state, player) and (state.has("Shroud", player) or state.has("Progressive Essence of George", player, 1))) + set_rule_from_string(world, "(Void 2) Boss Rush Heal 4", lambda state: has_sword(state, player) and can_dash_attack(state, player) and (state.has("Shroud", player) or state.has("Progressive Essence of George", player, 1)) and has_grapple(state, player)) + set_rule_from_string(world, "(Void 2) Pink Bow Pickup", lambda state: True) # Act 3 set_rule_from_string(world, "(Void 3) Preminition Reward", lambda state: True)