Your browser lacks required capabilities. Please upgrade it or switch to another to continue.
Loading…
/* Start
Runs every time a new session is started.
Session-specific variables are set here.
The opening screen of the game is described here.
*/
/* Set the compass direction. */
<<set $Compass to either(setup.Compass)>>
/* Display text. */
<div class="title">
Landscape Generator<br>
[[Start Travelling|TravelScreen]]
</div>/* TravelScreen
Describes your travels across the mountains.
Mountain-specific temporary variables are set here. These are declared with the "_" character rather than the "$" character.
*/
/* Set the distance travelled. */
<<set _distance to random(1,500)>>
/* Set the local colour. */
<<set _colour to either(setup.Colour)>>
/* Set the local gem. */
<<set _gem to either(setup.Gem)>>
/* Set the local stone. */
<<set _stone to either(setup.Stone)>>
/* Set the mountain name. */
<<set _name1 to either(setup.MountainA)>>
<<set _name2 to either(setup.MountainN)>>
<<set _mountain to String.format("{0}{1}", _name1, _name2)>>
/* Set the mountain feature. */
<<set _feature to either(setup.Feature)>>
/* Set the tree that grows there. */
<<set _density to either(setup.Density)>>
<<set _tree to either(setup.Tree)>>
/* Set the beast that lives there. */
<<set _beast to either(setup.Beast)>>
<<set _body to either(_beast.body)>>
<<set _power to either(_beast.power)>>
<<set _parts to random(1,8)>>
/* Display the text. */
<div class="text">
Travelling _distance leagues $Compass, you come to Mount _mountain.<br>
<br>
There are _density _tree here.<br>
<br>
There _feature here.<br>
<br>
If you search, you will find _gem here.<br>
<br>
There is a beast that lives here that looks like a _beast.species with _parts _body. It is _colour. If you consume it, you will become _power.<br>
<br>
</div>
<div class="center">
[[Continue On.|TravelScreen]]<br>
[[Return Home.|Start]]
</div>/* WL_Beast
"Included" in relevant passages.
Lists of beasts that can inhabit the mountains are here.
Beast descriptions are "datamaps" which link together a species name, its body parts, and its "powers."
You can see how this could also be used for trees, plants, flowers, etc, e.g. in a type of "wort" with "five stems" that can make you "long-lived".
*/
/* Beast information. */
<<set $WL_Beast to [
{species: "cat",
body: ["heads", "eyes", "legs", "tails"],
power: ["agile", "silent", "long-lived"],
},
{species: "toad",
body: ["heads", "eyes", "legs"],
power: ["patient", "subtle"],
},
]>>/* WL_Terrain
"Included" in relevant passages.
Terrain and geographical wordlists are set here. */
/* Stone. */
<<set $WL_Stone to [
"limestone",
"granite",
]>>
/* Gems. */
<<set $WL_Gem to [
"jade",
"opal",
]>>/* Plural Widget */
<<widget "pl">>
<<if _parts gt 0>>
s
<</if>>
<</widget>>