![]() |
The Reliques of Tolti-AphAn interactive fiction by Graham Nelson (2005) - the Inform 7 source text |
| Home page Contents Previous Next Complete text | Section E(n) - Setting up the labyrinth
To restore the labyrinth to its virgin state: make all labyrinth exits lead to Solid Rock; position the Hedge Archway at <1,1,12>; position LR0 at <1,1,11>; change the printed name of LR0 to "North-East-South Junction"; position LR1 at <1,1,13>; change the printed name of LR1 to "North-East-South Junction"; position the Island in the Deep Pool at <3,6,12>; position Western Shore at <3,5,12>; position Eastern Shore at <3,7,12>; position Northern Shore at <3,6,13>; position Southern Shore at <3,6,11>; repeat with the locale running through labyrinth rooms begin; let the locale shape be the shape of the locale; if the U part of the locale shape is 1, change the minimum level of the locale to 2; now the locale is grovelike; if the open space part of the locale shape is 0, now the locale is ungrovelike; if the N part of the locale shape is 1 and the E part of the locale shape is 1 and the S part of the locale shape is 1 and the W part of the locale shape is 1, now the locale is ungrovelike; if the N part of the locale shape is 0 and the E part of the locale shape is 0 and the S part of the locale shape is 0 and the W part of the locale shape is 0, now the locale is ungrovelike; end repeat. When play begins: calculate how many labyrinth rooms should have each shape; give shape to the shapeless labyrinth rooms; restore the labyrinth to its virgin state. To tidy the labyrinth for a fresh quest: now the branch is almost too high; now Terra Incognita is open; repeat with maze area running through labyrinth rooms begin; if the maze area is not the Hedge Archway begin; change the grid position of the maze area to <0,0,0>; now the maze area is unvisited; repeat with trinket running through things in the maze area begin; if the trinket is not a backdrop and the trinket is not the player, move the trinket to Terra Incognita; if the trinket is a person, restore the health of the trinket; end repeat; end if; end repeat; remove Eurydice from play; restore the labyrinth to its virgin state; if the location is not the Hedge Archway, move the player to the Hedge Archway; decrease the permanent strength of the player by 1; restore the health of the player. |