fix: static key logic left Turtle Rock unrelaxed in standard mode - #8
Merged
Merged
Conversation
set_turtle_rock_rules probes which Turtle Rock entrance is reachable to
decide how far its key doors can be relaxed. It built that state with
get_all_state(keys=False), which excludes every dungeon key -- including
Small Key (Escape). In standard mode the sewers cannot be left without
that key, so all four probes returned False, the if/elif chain fell
through with no branch taken, and Turtle Rock kept the raw DOOR_RULES
numbers. Those assume a relaxation that never happened: TR Hub NW demands
4 chest keys and the dungeon holds exactly 4, so the first door needs all
of them and the fill has nowhere to put the last key.
Standard mode could not generate a seed with in-dungeon keys under
--key_logic_algorithm static: 0 of 20 seeds succeeded, every one failing
with "No more spots to place Small Key (Turtle Rock)".
Use keys=True. The next line already zeroes this dungeon's own keys,
which is what the comment describes and what keeps its key doors shut.
standard 0/20 -> 20/20 seeds
open 20/20 -> 20/20 seeds, branch selection unchanged (front)
test/ 215 failed / 84 passed / 2621 subtests, identical before and
after; the failures are pre-existing owg and inverted_owg
Open seeds shift because the sweep order changes, but only junk items
move -- no progression placement changed in the five seeds compared.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
Standard mode could not generate a seed with in-dungeon keys under
--key_logic_algorithm static:0 of 20 seeds succeeded, every one failing with
No more spots to place Small Key (Turtle Rock).set_turtle_rock_rulesprobes which Turtle Rock entrance is reachable in order to decide how farTR's key doors can be relaxed. It built that probe state with
get_all_state(keys=False), whichexcludes every dungeon key — including
Small Key (Escape). In standard mode the sewers cannot beleft without that key, so all four probes returned False, the if/elif chain fell through with no
branch taken, and Turtle Rock kept the raw
DOOR_RULESnumbers. Those numbers assume a relaxationthat never happened: TR Hub NW demands 4 chest keys and the dungeon holds exactly 4, so the first
door needs all of them and the fill has nowhere to put the last key.
What
get_all_state(keys=False)→get_all_state(keys=True)inset_turtle_rock_rules. The verynext line already zeroes this dungeon's own keys, which is what the existing comment describes
and what keeps TR's key doors shut. Other dungeons' keys were never meant to be excluded.
Acceptance
Open seeds shift because the sweep order changes, but only junk items move — no progression
placement changed across the five seeds compared.
Not in this PR
No change to door rando's own key logic, to
DOOR_RULES, or to the other three dungeons withentrance-dependent relaxation. Only the probe state is corrected.
🤖 Generated with Claude Code