mirror of
https://github.com/Oreolek/gamebookformat.git
synced 2024-06-26 03:41:04 +03:00
ff
This commit is contained in:
parent
9cb51eddae
commit
d886b26210
|
@ -5,7 +5,8 @@ Turn to [[tjunction]].
|
||||||
|
|
||||||
* tjunction
|
* tjunction
|
||||||
You have reached a t-junction.
|
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]].
|
east to [[curse]].
|
||||||
|
|
||||||
* door
|
* door
|
||||||
|
@ -26,7 +27,14 @@ Turn to [[inside]].
|
||||||
|
|
||||||
* curse
|
* curse
|
||||||
There is a [found]cursed bracelet[/found] here. You can go on to
|
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
|
* portal
|
||||||
A magic portal ahead will only allow you to pass if you did not pick up the
|
A magic portal ahead will only allow you to pass if you did not pick up the
|
||||||
|
|
|
@ -13,7 +13,8 @@
|
||||||
'codewords' : {},
|
'codewords' : {},
|
||||||
|
|
||||||
'take' : function(item) {
|
'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.push(item);
|
||||||
this.inventory.sort();
|
this.inventory.sort();
|
||||||
gamebook.updateInventory();
|
gamebook.updateInventory();
|
||||||
|
@ -24,6 +25,7 @@
|
||||||
var i = this.inventory.indexOf(item);
|
var i = this.inventory.indexOf(item);
|
||||||
if (i >= 0) {
|
if (i >= 0) {
|
||||||
this.inventory.splice(i, 1);
|
this.inventory.splice(i, 1);
|
||||||
|
gamebook.droppedItems[item] = true;
|
||||||
gamebook.updateInventory();
|
gamebook.updateInventory();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -48,6 +50,8 @@
|
||||||
|
|
||||||
'autoRun' : {},
|
'autoRun' : {},
|
||||||
|
|
||||||
|
'droppedItems' : {},
|
||||||
|
|
||||||
'addAutoRun' : function(nr, f) {
|
'addAutoRun' : function(nr, f) {
|
||||||
if (nr in this.autoRun) {
|
if (nr in this.autoRun) {
|
||||||
this.autoRun[nr].push(f);
|
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] Debug output
|
||||||
- [X] DOT output
|
- [X] DOT output
|
||||||
- [X] LaTeX output
|
- [X] LaTeX output
|
||||||
|
@ -21,7 +21,7 @@
|
||||||
- [X] Remove item from inventory (forced by instructions)
|
- [X] Remove item from inventory (forced by instructions)
|
||||||
- [X] Enable link if not having an item
|
- [X] Enable link if not having an item
|
||||||
- [X] Enable link if not having a codeword
|
- [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
|
- [ ] Make inventory and codewords generic
|
||||||
They are the same, sort of, and it might be good to be able to
|
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.
|
add other similar entities as well, like skills or spells or whatever.
|
||||||
|
|
Loading…
Reference in a new issue