fenhl / OoT-Randomizer

A randomizer for Ocarina of Time.
https://ootrandomizer.com/generatorDev?version=devFenhl_
Other
9 stars 2 forks source link

Do not modify dungeon internal savewarps in decoupled boss shuffle #27

Closed mracsys closed 4 months ago

mracsys commented 4 months ago

Handle decoupled entrances when boss shuffle is enabled.

The savewarp updating routine for boss rooms to ensure they point to their connected entrance works by looping through all shuffled entrance pools and filtering for entrances of type ChildBoss or AdultBoss. Without decoupled entrances, this works as expected. With decoupled entrances, there is an extra BossReverse pool containing the boss room exits which have the same type as the main entrances. This led to those entrances being checked for savewarps to modify, which catches the savewarps on the dungeon side of each boss door. These should not be edited.

The fix checks for the primary property of each entrance instead of the parent pool. This handles mixed pools gracefully by filtering out all reverse entrances regardless of type.

Note that I never got the new unit test in this to run (always failed on entrance shuffle before the assert), but I did get seeds to generate outside the test. The setting combination used is very unstable. I tried locking the seed and some of the settings in place to no avail. To verify only the boss room savewarps are changed, print the savewarp name after each reconnection at EntranceShuffle.py#L819.