1
0
Fork 0
mirror of https://github.com/Oreolek/gamebookformat.git synced 2024-06-26 03:41:04 +03:00

Allow player to follow a link if not having a specific codeword.

This commit is contained in:
Pelle Nilsson 2013-06-08 20:18:05 +02:00
parent 4d1728cda8
commit 9cb51eddae
2 changed files with 5 additions and 2 deletions

View file

@ -128,6 +128,9 @@
} else if (c.className === 'hascodeword') {
var codeword = c.dataset.has;
enableNextLink = gamebook.player.has(codeword);
} else if (c.className === 'hasnotcodeword') {
var codeword = c.dataset.has;
enableNextLink = !gamebook.player.has(codeword);
}
});
},

View file

@ -1,4 +1,4 @@
* TODO [19/47] [40%]
* TODO [20/47] [42%]
- [X] Debug output
- [X] DOT output
- [X] LaTeX output
@ -20,7 +20,7 @@
- [X] Check if has codeword
- [X] Remove item from inventory (forced by instructions)
- [X] Enable link if not having an item
- [ ] 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
- [ ] Make inventory and codewords generic
They are the same, sort of, and it might be good to be able to