I want to make a randomizer for the items in the game La-Mulana. However, some arrangements of items would mean that the game cannot be completed. Sometimes there's only one group of items required to pass an obstacle, other times, there are multiple groups of items which can pass an obstacle.
For example, to reach the Chamber of Birth, you need to have the Feather, Grapple Claw, Hermes' Boots, and Plane Model, or have the Isis Pendant and Hermes' Boots, or kill the fifth boss and have the Plane Model. This means that anything that puts the Hermes' Boots and the Plane Model in the Chamber of Birth makes the game impossible to complete.
Effectively, I'm trying to put a list in random order where some items can never be within a range of indices and some items can only be within a range of indices if others are within a second range of indices. Is there a better way of doing this than to reject and re-generate illegal configurations?