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.
Resolves #734.
Checklist
Description
This replaces #733 as a proper fix for shuffled item mode. We use a more standard approach of swapping locations rather than types so that indices match up with OG and so to prevent TRR NG+ changing the wrong things.
This change also means triggers under keys will be shifted and so it means it's more consistent with normal item rando. That itself fixes a potential softlock in Catacombs - consider picking up whatever is in the mask's place at the start, which triggers the flipmap, but then dropping down into the drained pool without picking up the mask.
The option for allowing keys under enemies is available too, and when it's off, if there isn't a suitable location for a key it won't be moved. We do this rather than moving the key to the enemy's position and nudging the enemy off it, because that relies on the player knowing the spawn points and still having to kill the enemy most likely. One instance (at least) where this isn't the case is the yellow key in Rig - there are only 2 potential locations for it, both under an enemy, so in that case we do nudge the enemy and leave the key in the original spot. If allow-enemy-keys is enabled, it will end up under the other enemy.