mirror of
https://github.com/Oreolek/gamebookformat.git
synced 2024-07-02 22:55:09 +03:00
af2a459cc9
Gamebooks are now quite playable in HTML version. Planning to redesign inventory and codewords to be handled the same way, to allow adding other things that behave in a similar way to a gamebook (eg skills or spells). Also some obvious things are missing like being able to check if NOT having an item or codeword, or preventing a player from finding the same item twice (if redirected back to a section where it can be found after dropping it).
34 lines
1.1 KiB
Plaintext
34 lines
1.1 KiB
Plaintext
* 1 start
|
|
Demonstrating how to manage player inventory. You start
|
|
the book carrying a [take]sword[/take] and a [take]shield[/take].
|
|
Turn to [[continue]].
|
|
|
|
* continue
|
|
Here you find a [found]key[/found]. Go on to [[door]].
|
|
|
|
* door
|
|
There is a locked door here.
|
|
If you have a [carries]key[/carries] you can use that to
|
|
open the door, see [[inside]]. Being right before the link
|
|
should be enough for the formatter to figure out that the
|
|
key is required to be allowed to follow the link.
|
|
Else you can try to open with the [carries]sword[/carries],
|
|
if you have it, see [[attempt_break_door_with_sword]].
|
|
Hopefully the magic is good enough to pair
|
|
pre-conditions to links, or more markup must be added later.
|
|
You could also try to go back to pick up the key, see [[continue]].
|
|
|
|
* attempt_break_door_with_sword
|
|
OK. The door is broken, but so is the [drop]sword[/drop].
|
|
Turn to [[inside]].
|
|
|
|
* inside
|
|
There is a rope here that can be cut using a [carries]sword[/carries].
|
|
If you have it and want to do that, see [[cut_rope]].
|
|
Otherwise turn to [[won]].
|
|
|
|
* cut_rope
|
|
OK. That was fun. Turn to [[won]].
|
|
|
|
* won
|
|
Congratulations, you won. |