Conversation
Adds key_logic_algorithm 'static': ER's hand-written key rules for the vanilla dungeon layouts, counting chest keys only as its has_key does. Needs vanilla doors and unshuffled key drops and key pots; entrance and overworld shuffle are allowed, and Turtle Rock picks its front, middle, back or big chest case from which portals are reachable. source/dungeon/StaticKeyLogic.py holds the door table, applied at the end of link_doors through KeyDoorShuffle.apply_key_rule_specs, and set_static_key_rules inside set_rules for what a door number cannot carry: open-mode Boomerang and Zelda's chests, the GT randomizer, compass and firesnake chest rules with their big-key-in-room alternatives, the Kholdstare Somaria alternative, and the forbids and always-allows on Desert, Hera, PoD, Thieves, Skull Woods, Turtle Rock and the GT map chest. The door evaluators use has_sm_key_strict when a dungeon's key logic counts chest keys. Door rando's key placement validator still runs on top. Ported from CVW-HMB/ALttPDoorRandomizer DoorDevUnstable (the static parts of PRs 3, 4 and 6). Door rules and the per-chest scenario tables match that branch exactly in open and inverted mode; test/TestBase.py gains a build_vanilla_world for the tests.
CVW-HMB
force-pushed
the
feat/static-key-logic-owr
branch
from
September 10, 2026 19:09
7b39bdb to
d518a82
Compare
Owner
Author
|
Moved to CVW-HMB/ALttPDoorRandomizer-OWR#1; this repo is the DoorDev fork. |
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.
Adds
key_logic_algorithm: static: ER's hand-written key rules for the vanilla dungeon layouts, counting chest keys only as itshas_keydoes. It needs vanilla doors and unshuffled key drops and key pots; entrance shuffle and overworld shuffle are allowed, and Turtle Rock picks the same front / front+middle / back / big chest cases as ER'sset_trock_key_rulesfrom which portals are reachable without its own keys.source/dungeon/StaticKeyLogic.pyholds a door table applied at the end oflink_doorsthroughKeyDoorShuffle.apply_key_rule_specs, plusset_static_key_rulesinsideset_rulesfor the rules a door number cannot carry: open-mode Boomerang and Zelda's chests, the GT randomizer, compass and firesnake chest rules with their big-key-in-room alternatives, the Kholdstare Somaria alternative, and the forbids and always-allows on Desert, Hera, PoD, Thieves, Skull Woods, Turtle Rock and the GT map chest. The door evaluators usehas_sm_key_strictwhen a dungeon's key logic counts chest keys. Door rando's key placement validator still runs on top.Port of the static parts of CVW-HMB/ALttPDoorRandomizer PRs #3, #4 and #6 (DoorDevUnstable) onto codemann8's
OverworldShuffle. Differences from that branch:bigkeyshuffleis a choice here, so the big chest case checks== 'none'; the customizerkey_logicsection and its validation are not included, soapply_key_rule_specscarries only what the static table needs.test/TestBase.pygains abuild_vanilla_worldthat followsMain.mainup toset_rulesfor the tests.Verification against DoorDevUnstable
--shuffle crossed --keyshuffle wild --bigkeyshuffle wild --mapshuffle wild --compassshuffle wild --accessibility locations --key_logic_algorithm static, Skull Woods key preset in the Pinball Room): 60 seeds each, 2001 to 2060: DoorDevUnstable generated 60 of 60, this branch 58 of 60; the two failures (2035, 2054) areCannot beat gameand fail identically under partial, so they are not from this change. No ER small key or big key forbid violated in any generated spoiler.python -m pytest test/TestStaticKeyLogic.py: 9 passed. The pre-existingtest/vanillamodules do not import on this branch (get_dungeon_item_poolmoved out ofDungeons), unchanged here.