Blue Lacuna — 387 of 467

Aaron A. Reed

Release 4

Book - Dream Infrastructure

Section - General

Dreamlands is a region. [All dream rooms are in Dreamlands.]

Having a Dream is a recurring scene.

Having a Dream begins when

the player is asleep for the first turn.

Having a Dream ends when

yourself is awake.

Table of Dream Stuff

ordernexuspresence
1Dream1Nexusdream1-presence
2Dream2Nexusdream2-presence
3Dream3Nexusdream3-presence
4Dream4Nexusdream4-presence
5Dream5Nexusdream5-presence
6Dream6Nexusdream6-presence
7Dream7Nexusdream7-presence

When Having a Dream begins:

if dreams are being debugged, say "// Dreams: Having a Dream begins.";

print a section break;

strip the player;

if good place to dream begin; [ we're sleeping near a windsigh ]

[figure out which dream to have]

now d_ctr is 0;

now d1_ctr is 0;

let lucky be a random visible windsigh tree;

if lucky is not a thing and location is Saddle, let lucky be tree3;

if lucky is not a thing and location is Treehouse, let lucky be tree2;

if dreams are being debugged, say "// Dreams: good place to dream because near [lucky].";

if the number of contacted windsigh trees is 7 begin; [after the 7th dream, always get the last one (to let you change passwords.)]

now active presence is dream7-presence;

unless pseudo-dream is 1, now pseudo-dream is 0; [If we're touching the tree, wake up immediately; else sleep through the night.]

otherwise if the scene_order of lucky is 0; [Assign the next dream to the sequence.]

let tkr be 0;

repeat with ctr running through windsigh trees begin;

if scene_order of ctr > tkr, now tkr is scene_order of ctr;

end repeat;

now the scene_order of lucky is tkr + 1;

if dreams are being debugged, say "// Dreams: never dreamed under this tree: assigning scene order [tkr + 1].";

otherwise; [Before you've gotten to the 7th dream, remind you to find more trees.]

if dreams are being debugged, say "// Dreams: already dreamed under this tree: summoning dream-presence-rerun.";

now active presence is dream-presence-rerun;

choose row scene_order of lucky in Table of Dream Stuff;

move active presence to nexus entry;

now pseudo-dream is 2; [Will wake up early so we don't miss a night.]

end if;

if dreams are being debugged, say "// Dreams: selecting dream [scene_order of lucky].";

if the number of contacted windsigh trees is 7, choose row 7 in Table of Dream Stuff;

otherwise choose row scene_order of lucky in Table of Dream Stuff;

move player to nexus entry;

if pseudo-dream is not 2, now active presence is presence entry;

otherwise;

move player to GenericDream; [quick message and immediate wake up.][aar]

end if.

To decide whether good place to dream:

if a windsigh tree is enclosed by location or location is Saddle or location is Treehouse, decide yes;

decide no.

A windsigh tree has a number called scene_order. [ Our dreams are given a chronological sequence of settings, regardless of what order trees are found in, and once a setting is assigned to a tree, it stays assigned to it in future dreams. ]

Saved location is a room that varies. Locker is a container. Wardrobe is a container. [ This stores the player's stuff while they're dreaming. ]

To strip the player:

now every thing carried by yourself is in the locker;

now every thing worn by yourself is in the wardrobe;

change saved location to location.

To restore the player:

now every thing carried by yourself is in the location;

now every thing in the locker is carried by yourself;

now every thing in the wardrobe is worn by yourself;

if Tsunami Sequence is happening:

move the player to saved location, without printing a room description;

say "[bold type][location][roman type][line break]";

otherwise:

move the player to saved location.

[pseudo-dream is a number that varies. pseudo-dream is 0.] [Defined in main. After we've powered the mindlink, we can just touch trees instead of having to sleep under them.]

dont_describe_wakeup is a truth state that varies.

When Having a Dream ends:

if dreams are being debugged, say "// Dreams: Scene Having a Dream ends.";

if pseudo-dream is 0 begin; [regular dream.]

print a section break;

if dont_describe_wakeup is false, say "[if notrefreshed is true]You rise to your feet[otherwise]Blinking and yawning, you rise to your feet and stretch. [one of]If it wasn't the most restful night, you at least feel ready to face another day[or]The strange dreams don't seem to fade, but linger hazily in the back of your mind[or]You feel rested, despite the strange dreams[in random order][end if].";

now notrefreshed is false;

otherwise if pseudo-dream is 2; [wake up without passing time; all 7 trees are already contacted, or special Tsunami override.][aar]

unless night and Tsunami Sequence is happening, say "You're awake, but hardly any time seems to have passed[if night]. It's still dark and you're still sleepy[end if].";

otherwise; [1: touching a windsigh.]

say "The vision seems to have passed. You shake yourself off and look around. [one of]The leaves kicked up by the wind are just now settling, as if no time has passed at all[or]Again, it's as if no time has passed[stopping].";

end if;

now pseudo-dream is 0;

let lucky be a random windsigh tree in saved location;

if lucky is not a thing and ( saved location is Atop or saved location is Saddle ) , let lucky be tree3;

if lucky is not a thing and ( saved location is Treehouse or saved location is Big Tree ) , let lucky be tree2;

[ if lucky is not contacted [i.e. we failed to adequately finish this dream] , move active presence to location; [so we'll try again next time.]]

if lucky is a windsigh tree, now lucky is contacted; [ensure this tree gets marked as finished.]

post-conversation processing;

manually reference d1-door;

wake up now;

restore the player;

now escape tracker is 0;

truncate list of remembered stuff to 0 entries.

Rule for asking which do you mean while remembering and location is regionally in Dreamlands: say "It fades away when you try to look too closely.".