Part 7 of 13 in Ghostveil
Giving the rune pools a chapter
Ghostveil's rune pools got five campaign rooms of their own, and the generator only kept a room that stopped working with the water held either way.
The day before, I gave Ghostveil's water a second state (A pool you can drain). A rune pool is a shallow pool with rune stones under the water, and while anything stands on the room's drain plate it drains. Full, Fantasma wades through it and the fire stops at its edge. Drained, it's a pit she can't step into, and the fire runs along the runes at the bottom.
Here's The Drain, the chapter's first room. Fantasma wades into the full pool and back out, then pushes the stone onto the plate: the water runs down the grate, the fire lights the runes along the bottom, and the door at the top right opens.
A piece like that earns a place in the campaign only if the rooms built round it need both of its states. A pool that only ever has to be crossed is water with different art, and one that only ever has to be empty is a pit with a switch. So I gave the rune pools a chapter of five rooms, straight after the water rooms, and had the generator throw away any room that still worked with the pool stuck one way.
The rule
The drain is one function in the rules:
bool drained(PuzzleState s) =>
level.drainPlates.isNotEmpty &&
level.drainPlates.any((p) => isWeighted(s, p));
Here is a state of the room (where Fantasma and every stone stand, and which cells stones have filled), is the set of the room's drain plates, a plate is weighed when anything stands on it, and says whether the pools are drained in that state.
Nothing about the water is stored in the solver's state. is worked out fresh from where things stand, and the cells stones have filled were already part of every state, so the pools cost the search nothing new to remember.
Holding the water still
To ask whether a room needs both states, the generator hands the solver the same room under rules in which the plate does nothing:
class HeldRules extends Rules {
final bool held;
HeldRules(super.level, {required this.held});
@override
bool drained(PuzzleState s) => held;
}
where keeps every pool full whatever stands on the plate, and keeps every pool empty. A room is kept only when
where means the solver finds a way to the door when the pools follow . The room must also fail with any one pool turned into plain water and with the brazier walled up.
Two more tests are asked room by room. One keeps the pools drained for good once they first drain:
@override
bool drained(PuzzleState s) => super.drained(s) || s.filled.contains(_mark);
Here is the state after move , so once the pools have drained at any move they stay drained. The latch is remembered as a made-up filled cell at (1000, 1000), far outside any room, so the solver tells the two kinds of state apart without a field of its own. The other test loses a stone that sinks into a drained pool and leaves its cell as basin, where the real rule turns that cell into floor for good.
Five rooms
Each room's spec also names what its solution has to do, and the generator replays the solution step by step to see that it does. This is the check for wading:
final drained = rules.drained(s);
if (!drained &&
level.runes.contains(s.player) &&
!s.filled.contains(s.player)) {
usedTypes.add(_RuneWaded);
}
The others record the fire on a drained pool's runes, a stone sliding across a full pool, a stone filling a drained cell, and a slide followed later by a fill.
The Drain asks for the wade and the lit runes in a room with a single stone. Crossflow has to have its pool full, then drained, then back, and it is the one room held to the latch test. The first room its seed made had more pieces than that idea needed and they buried it, so I took the next seed's room, one stone, no pits and no ordinary plate. Sunken Stone needs a stone to fill a drained cell. In High Water a stone slides across the full pool and later, with the pool drained, one drops in and fills it; of the first two seeds the second gave the tighter room. Confluence has two pools on one drain.
I ran all five again. Under each rule the table gives the fewest steps the solver finds, or says it found no way out:
| Room | Par | Held full | Held drained | Never fills again | Sunk stones lost |
|---|---|---|---|---|---|
| The Drain | 13 | impossible | impossible | 9 | 13 |
| Crossflow | 8 | impossible | impossible | impossible | 8 |
| Sunken Stone | 20 | impossible | impossible | 8 | impossible |
| High Water | 31 | impossible | impossible | 21 | impossible |
| Confluence | 23 | impossible | impossible | 15 | impossible |
The two held columns are what every room had to pass. The last column picks out the three rooms built round a filled cell, since The Drain and Crossflow still solve in their usual steps when a sunk stone is simply lost.
The latch column says more than the one room it was asked of. Only Crossflow becomes impossible when the pools stay drained, but in the other four a pool that never comes back opens a shorter way: The Drain falls from 13 steps to 9, and Sunken Stone from 20 to 8. So the water coming back closes a short cut in every room of the chapter, including the four where the refill was never the room's main idea.
The chapter sits between the water rooms and the saw rooms, which makes the campaign 34 rooms with a total par of 743. Deep Descent, the six-room seeded run, got a rune pool kind of its own as well: six rooms from the same generator under the same tests, and a run may put one fourth or fifth. All six fail with the water held either way.
What none of this shows is whether the rooms read. The solver proves the pools are needed both ways under the rules as written. Whether someone meeting The Drain for the first time sees the empty basin as a drop, or links the plate on the floor with the grate in the pool, only shows when people play it.
The tiles, rune stones and Fantasma are from SnowHex's Dungeon Gathering. The rooms, the rules and the moving water are Ghostveil's.