mirror of
https://github.com/Oreolek/gamebookformat.git
synced 2024-06-17 07:30:43 +03:00
ff
This commit is contained in:
parent
9cb51eddae
commit
d886b26210
|
@ -5,7 +5,8 @@ Turn to [[tjunction]].
|
|||
|
||||
* tjunction
|
||||
You have reached a t-junction.
|
||||
Here you find a [found]key[/found]. You can go west to [[door]], or
|
||||
Here you find a [found]key[/found] and a [found]stick[/found].
|
||||
You can go west to [[door]], or
|
||||
east to [[curse]].
|
||||
|
||||
* door
|
||||
|
@ -26,7 +27,14 @@ Turn to [[inside]].
|
|||
|
||||
* curse
|
||||
There is a [found]cursed bracelet[/found] here. You can go on to
|
||||
[[portal]] or go back to [[tjunction]].
|
||||
[[portal]] or go back to [[tjunction]]. You can also drop the
|
||||
stick for no particular reason, see [[drop_stick]].
|
||||
|
||||
* drop_stick
|
||||
OK [drop]stick[/drop] dropped. Turn back to [[tjunction]] to confirm
|
||||
stick can not be picked up again even if the text says it is there
|
||||
(books work that way, although ideally this dynamic version should
|
||||
provide some hints that it is no longer there).
|
||||
|
||||
* portal
|
||||
A magic portal ahead will only allow you to pass if you did not pick up the
|
||||
|
|
|
@ -13,7 +13,8 @@
|
|||
'codewords' : {},
|
||||
|
||||
'take' : function(item) {
|
||||
if (this.inventory.indexOf(item) === -1) {
|
||||
if (this.inventory.indexOf(item) === -1
|
||||
&& !(item in gamebook.droppedItems)) {
|
||||
this.inventory.push(item);
|
||||
this.inventory.sort();
|
||||
gamebook.updateInventory();
|
||||
|
@ -24,6 +25,7 @@
|
|||
var i = this.inventory.indexOf(item);
|
||||
if (i >= 0) {
|
||||
this.inventory.splice(i, 1);
|
||||
gamebook.droppedItems[item] = true;
|
||||
gamebook.updateInventory();
|
||||
}
|
||||
},
|
||||
|
@ -48,6 +50,8 @@
|
|||
|
||||
'autoRun' : {},
|
||||
|
||||
'droppedItems' : {},
|
||||
|
||||
'addAutoRun' : function(nr, f) {
|
||||
if (nr in this.autoRun) {
|
||||
this.autoRun[nr].push(f);
|
||||
|
|
1
templates/html/hasnot.html
Normal file
1
templates/html/hasnot.html
Normal file
|
@ -0,0 +1 @@
|
|||
<span class="hasnotcodeword" data-has="%(inner)s">%(inner)s</span>
|
1
templates/html/notcarries.html
Normal file
1
templates/html/notcarries.html
Normal file
|
@ -0,0 +1 @@
|
|||
<span class="itemnotcarried" data-carried="%(inner)s">%(inner)s</span>
|
4
todo.org
4
todo.org
|
@ -1,4 +1,4 @@
|
|||
* TODO [20/47] [42%]
|
||||
* TODO [21/47] [44%]
|
||||
- [X] Debug output
|
||||
- [X] DOT output
|
||||
- [X] LaTeX output
|
||||
|
@ -21,7 +21,7 @@
|
|||
- [X] Remove item from inventory (forced by instructions)
|
||||
- [X] Enable link if not having an item
|
||||
- [X] Enable link if not having a codeword
|
||||
- [ ] Make sure dropped items can not be picked up again
|
||||
- [X] Make sure dropped items can not be picked up again
|
||||
- [ ] Make inventory and codewords generic
|
||||
They are the same, sort of, and it might be good to be able to
|
||||
add other similar entities as well, like skills or spells or whatever.
|
||||
|
|
Loading…
Reference in a new issue