aspiwack / randomizer-engine

generic, declarative randomizer engine which draws shuffles uniformely
6 stars 0 forks source link

Require multiple keys to open a door isn't sufficient for key logic #20

Open aspiwack opened 5 years ago

aspiwack commented 5 years ago

Let's imagine a dungeon. You have one chest available in the front. It's necessarily a key. But then you have two doors.

If you say that the doors are accessible with a single key, then a player may take “the wrong door”, and lock all the keys in the dungeon behind the other door, that they can't open. The current engine considers this as correct.

If, on the other hand, you require two keys to open the door, then, well, there is never a solution. So there is 0 valid shuffles.

Instead, we need to be able to take into account that some keys can be locked behind doors, and that, in fact, when multiple doors are available in parallel, it may be necessary that these doors have keys behind them, in order to be able to open the other doors.

This problem shows up in full in Palace of Darkness, in Alttpr: it has a lot of parallel doors.

aspiwack commented 5 years ago

My current thoughts are as follows:

An alternative would be to introduce some conjunctions in a smart way where they matter.

The benefit of these approaches is clear: key logic becomes very easy as each door simply consume one key.