1
0
Fork 0
mirror of https://github.com/Oreolek/gamebookformat.git synced 2024-06-16 23:20:44 +03:00

Removed counter names from html and default templates.

It didn't work for writing some things, even though often correct.
This commit is contained in:
Pelle Nilsson 2013-06-23 23:58:48 +02:00
parent 1a6c6d3d15
commit 17257b7970
19 changed files with 53 additions and 57 deletions

View file

@ -5,25 +5,26 @@ This example gamebook shows how to use counters.
This is where the gamebook starts.
We have counters for [count life]Life Points[/count] and for
[count gold]Gold[/count]. You start the adventure with
[set life]10[/set] and [set gold]12[/set].
You can never have less than [min gold]0[/min]. FIXME need to
[set life]10[/set] Life Points and [set gold]12[/set] Gold.
You can never have less than [min gold]0[/min] Gold. FIXME need to
figure out best syntax for death when life points go below 1.
Go to [[getgold]] to get more Gold or [[dangerous]] to lose some Life Points.
* getgold
Congratulations, you found [inc gold]2[/gold].
If you have less than [lessthan life]1[/lessthan], turn to [[auto death]].
Congratulations, you found [inc gold]2[/gold] Gold.
If you have less than [lessthan life]1[/lessthan] Life Points,
turn to [[auto death]].
You can go to [[dangerous]] to lose some life or to [[losegold]] to drop
some gold. If you have at least [atleast gold]16[/atleast] you
some gold. If you have at least [atleast gold]16[/atleast] Gold you
can turn to [[hurrah]]. If you have even more than
[morethan gold]16[/morethan] you can turn to [[rich]].
[morethan gold]16[/morethan] Gold you can turn to [[rich]].
* dangerous
You lose [dec life]1[/dec].
You lose [dec life]1[/dec] Life Points.
You can go to [[getgold]] to get some Gold.
* losegold
You drop [dec gold]5[/dec]. It should not be possible to
You drop [dec gold]5[/dec] Gold. It should not be possible to
go below 0. Then go on to get gold at [[getgold]] or lose life at [[dangerous]].
* rich

View file

@ -6,11 +6,11 @@ Introduction
Turn to 1 to begin.
1 (start) - This is where the gamebook starts. We have counters for [COUNT life]Life Points[/COUNT] and for [COUNT gold]Gold[/COUNT]. You start the adventure with [SET life]10[/SET] and [SET gold]12[/SET]. You can never have less than [MIN gold]0[/MIN]. FIXME need to figure out best syntax for death when life points go below 1. Go to 7 to get more Gold or 6 to lose some Life Points.
1 (start) - This is where the gamebook starts. We have counters for [COUNT life]Life Points[/COUNT] and for [COUNT gold]Gold[/COUNT]. You start the adventure with [SET life]10[/SET] Life Points and [SET gold]12[/SET] Gold. You can never have less than [MIN gold]0[/MIN] Gold. FIXME need to figure out best syntax for death when life points go below 1. Go to 7 to get more Gold or 6 to lose some Life Points.
2 (death) - Less than 1 Life Point means the adventure ends now.
3 (hurrah) - You have at least 16 gold. Go back to get some more at 7.
4 (rich) - You have more than 16 Gold. How nice. Go back to get some more at 7.
5 (losegold) - You drop [DEC gold]5[/DEC]. It should not be possible to go below 0. Then go on to get gold at 7 or lose life at 6.
6 (dangerous) - You lose [DEC life]1[/DEC]. You can go to 7 to get some Gold.
7 (getgold) - Congratulations, you found [INC gold]2[/INC]. If you have less than 1, turn to ((automatic))2. You can go to 6 to lose some life or to 5 to drop some gold. If you have at least 16 you can turn to 3. If you have even more than 16 you can turn to 4.
5 (losegold) - You drop [DEC gold]5[/DEC] Gold. It should not be possible to go below 0. Then go on to get gold at 7 or lose life at 6.
6 (dangerous) - You lose [DEC life]1[/DEC] Life Points. You can go to 7 to get some Gold.
7 (getgold) - Congratulations, you found [INC gold]2[/INC] Gold. If you have less than 1 Life Points, turn to ((automatic))2. You can go to 6 to lose some life or to 5 to drop some gold. If you have at least 16 Gold you can turn to 3. If you have even more than 16 Gold you can turn to 4.
END DEBUG OUTPUT

View file

@ -44,10 +44,10 @@
This is where the gamebook starts. We have counters for <span class="count counterChange" data-type="life"
data-name="Life Points">Life Points</span> and for <span class="count counterChange" data-type="gold"
data-name="Gold">Gold</span>. You start the adventure with <span class="set counterChange" data-type="life"
data-amount="10">10 Life Points</span> and <span class="set counterChange" data-type="gold"
data-amount="12">12 Gold</span>. You can never have less than <span class="min counterChange" data-type="gold"
data-limit="0">0 Gold</span>
. FIXME need to figure out best syntax for death when life points go below 1. Go to <a class="sectionref enabledlink" data-ref="7"
data-amount="10">10</span> Life Points and <span class="set counterChange" data-type="gold"
data-amount="12">12</span> Gold. You can never have less than <span class="min counterChange" data-type="gold"
data-limit="0">0</span>
Gold. FIXME need to figure out best syntax for death when life points go below 1. Go to <a class="sectionref enabledlink" data-ref="7"
href="#section7">7</a> to get more Gold or <a class="sectionref enabledlink" data-ref="6"
href="#section6">6</a> to lose some Life Points.
</div>
@ -92,7 +92,7 @@ if (this.gamebook) {
<div class="sectionnumber" id="para5">5</div>
<div class="sectiontext">
You drop <span class="dec counterChange" data-type="gold"
data-amount="5">5 Gold</span>. It should not be possible to go below 0. Then go on to get gold at <a class="sectionref enabledlink" data-ref="7"
data-amount="5">5</span> Gold. It should not be possible to go below 0. Then go on to get gold at <a class="sectionref enabledlink" data-ref="7"
href="#section7">7</a> or lose life at <a class="sectionref enabledlink" data-ref="6"
href="#section6">6</a>.
</div>
@ -105,7 +105,7 @@ if (this.gamebook) {
<div class="sectionnumber" id="para6">6</div>
<div class="sectiontext">
You lose <span class="dec counterChange" data-type="life"
data-amount="1">1 Life Points</span>. You can go to <a class="sectionref enabledlink" data-ref="7"
data-amount="1">1</span> Life Points. You can go to <a class="sectionref enabledlink" data-ref="7"
href="#section7">7</a> to get some Gold.
</div>
</div>
@ -117,14 +117,14 @@ if (this.gamebook) {
<div class="sectionnumber" id="para7">7</div>
<div class="sectiontext">
Congratulations, you found <span class="inc counterChange" data-type="gold"
data-amount="2">2 Gold</span>. If you have less than <span class="lessthan" data-type="life" data-amount="1"
>1 Life Points</span>, turn to <span class="auto"></span><a class="sectionref enabledlink" data-ref="2"
data-amount="2">2</span> Gold. If you have less than <span class="lessthan" data-type="life" data-amount="1"
>1</span> Life Points, turn to <span class="auto"></span><a class="sectionref enabledlink" data-ref="2"
href="#section2">2</a>. You can go to <a class="sectionref enabledlink" data-ref="6"
href="#section6">6</a> to lose some life or to <a class="sectionref enabledlink" data-ref="5"
href="#section5">5</a> to drop some gold. If you have at least <span class="atleast" data-type="gold" data-amount="16"
>16 Gold</span> you can turn to <a class="sectionref enabledlink" data-ref="3"
>16</span> Gold you can turn to <a class="sectionref enabledlink" data-ref="3"
href="#section3">3</a>. If you have even more than <span class="morethan" data-type="gold" data-amount="16"
>16 Gold</span> you can turn to <a class="sectionref enabledlink" data-ref="4"
>16</span> Gold you can turn to <a class="sectionref enabledlink" data-ref="4"
href="#section4">4</a>.
</div>
</div>

View file

@ -23,9 +23,9 @@
\b \qc 1
\b0\
\ql This is where the gamebook starts. We have counters for Life Points and for Gold. You start the adventure with 10 Life Points
and 12 Gold
. You can never have less than 0 Gold
. FIXME need to figure out best syntax for death when life points go below 1. Go to \b 7
Life Points and 12 Gold
Gold. You can never have less than 0 Gold
Gold. FIXME need to figure out best syntax for death when life points go below 1. Go to \b 7
\b0
to get more Gold or \b 6
\b0
@ -54,7 +54,7 @@
\b \qc 5
\b0\
\ql You drop 5 Gold
. It should not be possible to go below 0. Then go on to get gold at \b 7
Gold. It should not be possible to go below 0. Then go on to get gold at \b 7
\b0
or lose life at \b 6
\b0
@ -64,7 +64,7 @@
\b \qc 6
\b0\
\ql You lose 1 Life Points
. You can go to \b 7
Life Points. You can go to \b 7
\b0
to get some Gold. \
\
@ -72,15 +72,15 @@
\b \qc 7
\b0\
\ql Congratulations, you found 2 Gold
. If you have less than 1, turn to \b 2
Gold. If you have less than 1 Life Points, turn to \b 2
\b0
. You can go to \b 6
\b0
to lose some life or to \b 5
\b0
to drop some gold. If you have at least 16 you can turn to \b 3
to drop some gold. If you have at least 16 Gold you can turn to \b 3
\b0
. If you have even more than 16 you can turn to \b 4
. If you have even more than 16 Gold you can turn to \b 4
\b0
. \
\

View file

@ -49,9 +49,9 @@ Turn to 1 to begin.
\noindent
This is where the gamebook starts. We have counters for Life Points and for Gold. You start the adventure with 10 Life Points
and 12 Gold
. You can never have less than 0 Gold
. FIXME need to figure out best syntax for death when life points go below 1. Go to \textbf{\autoref{section7}} to get more Gold or \textbf{\autoref{section6}} to lose some Life Points.
Life Points and 12 Gold
Gold. You can never have less than 0 Gold
Gold. FIXME need to figure out best syntax for death when life points go below 1. Go to \textbf{\autoref{section7}} to get more Gold or \textbf{\autoref{section6}} to lose some Life Points.
\vspace{1em}
\phantomsection
\refstepcounter{sectionnr}
@ -84,7 +84,7 @@ Turn to 1 to begin.
\noindent
You drop 5 Gold
. It should not be possible to go below 0. Then go on to get gold at \textbf{\autoref{section7}} or lose life at \textbf{\autoref{section6}}.
Gold. It should not be possible to go below 0. Then go on to get gold at \textbf{\autoref{section7}} or lose life at \textbf{\autoref{section6}}.
\vspace{1em}
\phantomsection
\refstepcounter{sectionnr}
@ -93,7 +93,7 @@ Turn to 1 to begin.
\noindent
You lose 1 Life Points
. You can go to \textbf{\autoref{section7}} to get some Gold.
Life Points. You can go to \textbf{\autoref{section7}} to get some Gold.
\vspace{1em}
\phantomsection
\refstepcounter{sectionnr}
@ -102,6 +102,6 @@ Turn to 1 to begin.
\noindent
Congratulations, you found 2 Gold
. If you have less than 1, turn to \textbf{\autoref{section2}}. You can go to \textbf{\autoref{section6}} to lose some life or to \textbf{\autoref{section5}} to drop some gold. If you have at least 16 you can turn to \textbf{\autoref{section3}}. If you have even more than 16 you can turn to \textbf{\autoref{section4}}.
Gold. If you have less than 1 Life Points, turn to \textbf{\autoref{section2}}. You can go to \textbf{\autoref{section6}} to lose some life or to \textbf{\autoref{section5}} to drop some gold. If you have at least 16 Gold you can turn to \textbf{\autoref{section3}}. If you have even more than 16 Gold you can turn to \textbf{\autoref{section4}}.
\vspace{1em}
\end{document}

View file

@ -8,9 +8,9 @@ Introduction
Turn to 1 to begin.
1
This is where the gamebook starts. We have counters for Life Points and for Gold. You start the adventure with 10 Life Points
and 12 Gold
. You can never have less than 0 Gold
. FIXME need to figure out best syntax for death when life points go below 1. Go to 7 to get more Gold or 6 to lose some Life Points.
Life Points and 12 Gold
Gold. You can never have less than 0 Gold
Gold. FIXME need to figure out best syntax for death when life points go below 1. Go to 7 to get more Gold or 6 to lose some Life Points.
2
Less than 1 Life Point means the adventure ends now.
@ -23,13 +23,13 @@ Turn to 1 to begin.
5
You drop 5 Gold
. It should not be possible to go below 0. Then go on to get gold at 7 or lose life at 6.
Gold. It should not be possible to go below 0. Then go on to get gold at 7 or lose life at 6.
6
You lose 1 Life Points
. You can go to 7 to get some Gold.
Life Points. You can go to 7 to get some Gold.
7
Congratulations, you found 2 Gold
. If you have less than 1, turn to 2. You can go to 6 to lose some life or to 5 to drop some gold. If you have at least 16 you can turn to 3. If you have even more than 16 you can turn to 4.
Gold. If you have less than 1 Life Points, turn to 2. You can go to 6 to lose some life or to 5 to drop some gold. If you have at least 16 Gold you can turn to 3. If you have even more than 16 Gold you can turn to 4.

View file

@ -1 +0,0 @@
%(inner)s %(counter)s

View file

@ -1 +0,0 @@
%(inner)s %(counter)s

View file

@ -1 +0,0 @@
%(inner)s %(counter)s

View file

@ -1 +0,0 @@
%(inner)s %(counter)s

View file

@ -1 +0,0 @@
%(inner)s %(counter)s

View file

@ -1,2 +1,2 @@
<span class="atleast" data-type="%(arg1)s" data-amount="%(inner)s"
>%(inner)s %(counter)s</span>
>%(inner)s</span>

View file

@ -1,2 +1,2 @@
<span class="dec counterChange" data-type="%(arg1)s"
data-amount="%(inner)s">%(inner)s %(counter)s</span>
data-amount="%(inner)s">%(inner)s</span>

View file

@ -1,2 +1,2 @@
<span class="inc counterChange" data-type="%(arg1)s"
data-amount="%(inner)s">%(inner)s %(counter)s</span>
data-amount="%(inner)s">%(inner)s</span>

View file

@ -1,2 +1,2 @@
<span class="lessthan" data-type="%(arg1)s" data-amount="%(inner)s"
>%(inner)s %(counter)s</span>
>%(inner)s</span>

View file

@ -1,2 +1,2 @@
<span class="min counterChange" data-type="%(arg1)s"
data-limit="%(inner)s">%(inner)s %(counter)s</span>
data-limit="%(inner)s">%(inner)s</span>

View file

@ -1,2 +1,2 @@
<span class="morethan" data-type="%(arg1)s" data-amount="%(inner)s"
>%(inner)s %(counter)s</span>
>%(inner)s</span>

View file

@ -1,2 +1,2 @@
<span class="set counterChange" data-type="%(arg1)s"
data-amount="%(inner)s">%(inner)s %(counter)s</span>
data-amount="%(inner)s">%(inner)s</span>

View file

@ -1,4 +1,4 @@
* TODO [49/72] [68%]
* TODO [51/75] [68%]
- [X] Debug output
- [X] DOT output
- [X] LaTeX output
@ -61,8 +61,8 @@
- [X] Counters check
- [X] Make sure HTML output works with javascript disabled
and in inferior browsers
- [ ] Make sure counters start at 0 (not 1).
- [ ] Remove the counter names from counter-tags output (and templates).
- [X] Make sure counters start at 0 (not 1).
- [X] Remove the counter names from counter-tags output (and templates).
- [ ] Buy (optionally decrease a counter to add something to a collection)
buy tag to specify what can be bought, eg [buy item]sword[/buy]
followed by cost tag to specify what it will cost, eg [cost gold]3[/cost]