Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions worlds/glyphs/Macros.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,13 +142,22 @@ def void_gate_open(state: CollectionState, player: int) -> bool:

# depricated
def can_start_flower_puzzle(state: CollectionState, player: int) -> bool:
"""
If used in an entrance access rule, wrap with `multiworld.register_indirect_condition(world.get_region("Region 1E"), <foo>)`.
"""
return state.can_reach_region("Region 1E", player) and can_dash(state, player)

# depricated
def can_solve_flower_puzzle(state: CollectionState, player: int) -> bool:
"""
If used in an entrance access rule, wrap with `multiworld.register_indirect_condition(world.get_region("Region 1E"), <foo>)`.
"""
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 flower_puzzle_completion(state: CollectionState, player: int, world: "GlyphsWorld") -> int:
"""
If used in an entrance access rule, wrap with `multiworld.register_indirect_condition(world.get_region("Region 1E"), <foo>)`.
"""
completion = 0
wall_jump = can_wall_jump(state, player, world)
if state.can_reach_region("Region 1E", player) and can_dash(state, player) and can_press_buttons(state, player, world, ["R1B 4th Lowest", "R1B 5th Lowest"]) and (wall_jump or can_press_button(state, player, world, "R1B 6th Lowest")):
Expand Down
3 changes: 3 additions & 0 deletions worlds/glyphs/Options.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,9 @@ class RandomShopPrices(Toggle):
class RandomButtonColorPercent(Range):
"""
Percent of buttons to randomize the color of.
IMPORTANT:
This option is known to cause issues with the universal tracker.
By enabling it, you accept that it will not be fully reliable.
"""
display_name = "Random Button Colors Percent"
range_start = 0
Expand Down
16 changes: 12 additions & 4 deletions worlds/glyphs/Rules.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@ def connect_entrances(world: "GlyphsWorld"):
connect_areas(world, "Region 1C", "Region 1B", lambda state: can_wall_jump(state, player, world))
connect_areas(world, "Region 1C", "Region 1D", lambda state: can_press_button(state, player, world, "R1C First") and (can_wall_jump(state, player, world) or can_press_button(state, player, world, "R1C Second")))
connect_areas(world, "Region 1C", "Region 1F", lambda state: False) # with current flower puzzle implementation it makes this check inaccurate but it never actually comes into play
connect_areas(world, "Region 1D", "Region 1B", lambda state: world.options.FlowerPuzzleSkips.value and can_press_button(state, player, world, "R1B Save") and flower_puzzle_completion(state, player, world) >= 1)
world.multiworld.register_indirect_condition(world.get_region("Region 1E"),
connect_areas(world, "Region 1D", "Region 1B", lambda state: world.options.FlowerPuzzleSkips.value and can_press_button(state, player, world, "R1B Save") and flower_puzzle_completion(state, player, world) >= 1)
)
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))
Expand All @@ -44,7 +46,9 @@ def connect_entrances(world: "GlyphsWorld"):
connect_areas(world, "Region 2F", "Smile Shop", lambda state: True)
connect_areas(world, "Region 2G", "Region 2F", lambda state: can_dash(state, player) and can_press_button(state, player, world, "R2G Hidden"))
connect_areas(world, "Region 2G", "Region 2I", lambda state: can_dash(state, player) and can_press_buttons(state, player, world, ["R2G Middle", "R2G Upper Right"]) and (can_parry(state, player) or can_press_buttons(state, player, world, ["R2G Upper Left", "R2G Upper Middle"])))
connect_areas(world, "Region 2G", "Region 2O", lambda state: world.options.FlowerPuzzleSkips.value and flower_puzzle_completion(state, player, world) >= 2)
world.multiworld.register_indirect_condition(world.get_region("Region 1E"),
connect_areas(world, "Region 2G", "Region 2O", lambda state: world.options.FlowerPuzzleSkips.value and flower_puzzle_completion(state, player, world) >= 2)
)
connect_areas(world, "Region 2I", "Region 2H", lambda state: can_dash(state, player) and can_press_buttons(state, player, world, ["R2H Lower", "R2I Lower Left", "R2I Lower Middle", "R2I Upper Left", "R2I Upper Middle", "R2I Right"]))
connect_areas(world, "Region 2I", "Region 2J", lambda state: can_wall_jump(state, player, world) or (can_dash(state, player) and can_press_buttons(state, player, world, ["R2I Lower Left", "R2I Lower Middle", "R2I Right"])))
# connect_areas(world, "Region 2J", "Region 2I", lambda state: can_chain_wall_jumps(state, player, world)) # logically will never be needed without save button sanity
Expand All @@ -57,11 +61,15 @@ def connect_entrances(world: "GlyphsWorld"):
connect_areas(world, "Region 2P", "Region 2Q", lambda state: has_grapple(state, player) and can_press_button(state, player, world, "R2P Left"))
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: world.options.FlowerPuzzleSkips.value and flower_puzzle_completion(state, player, world) == 3)
world.multiworld.register_indirect_condition(world.get_region("Region 1E"),
connect_areas(world, "Region 3A", "Region 2M", lambda state: world.options.FlowerPuzzleSkips.value and flower_puzzle_completion(state, player, world) == 3)
)
connect_areas(world, "Region 3A", "Region 3B", lambda state: can_dash(state, player) and has_grapple(state, player) and can_press_button(state, player, world, "R3A Left"))
connect_areas(world, "Region 3A", "Region 3E", lambda state: can_dash(state, player) and can_press_buttons(state, player, world, ["R3A Middle Upper", "R3A Middle Lower"]))
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: world.options.FlowerPuzzleSkips.value and can_press_button(state, player, world, "R4F Save") and flower_puzzle_completion(state, player, world) == 3)
world.multiworld.register_indirect_condition(world.get_region("Region 1E"),
connect_areas(world, "Region 3A", "Region 4F", lambda state: world.options.FlowerPuzzleSkips.value and can_press_button(state, player, world, "R4F Save") and flower_puzzle_completion(state, player, world) == 3)
)
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_buttons(state, player, world, ["R3C Left", "R3C Middle", "R3C Right", "R3C Gate Right"]))
connect_areas(world, "Region 3E", "Region 3F", lambda state: can_dash(state, player) and has_grapple(state, player) and can_press_buttons(state, player, world, ["R3E Upper", "R3E Lower Room 1", "R3E Lower Room 2", "R3E Lower Room 3"]))
Expand Down
Loading