Handle own dungeon item placement with Boss room shuffle #667
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.
When dungeon items are set to "Own Dungeon", we grab the list of locations directly from the dungeon definition.
This was not accounting for Boss room shuffle, so for example if Water Temple had Bongo Bongo inside, it could be possible for Bongo to have the Shadow Temple boss key, meaning you would have to clear a different temple just to be able to clear Shadow. This "breaks" the definition of "Own Dungeon".
To address this, I have split the dungeon location definitions to move the boss room locations outside of the shared location list and into a separate list
bossRoomLocations
. (This wasn't needed directly for the fix, but I think can be useful in the future)Then in
RandomizeOwnDungeon
during the fill process, rather than getting the dungeon item list from the dungeon definition itself viaGetDungeonLocations
, I am filtering all locations and comparing the locations parent region hint key with the dungeons hint key. This will grab all the locations that are "connected" to that dungeon, similar to how hints are done for interior regions.This approach is similar to what N64 rando does here: https://github.com/OoTRandomizer/OoT-Randomizer/blob/ae1a3908ccfc37af88297eac6383b74217f6b519/Fill.py#L291-L297