-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathAddItems.html
36 lines (25 loc) · 1.77 KB
/
AddItems.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
<!--with the inventory system, you must be careful of adding items more than once if you don't want to.
This is due to the inventory passage being a new passage therefore 'resetting' passages when you return to them.
These examples show ways to add items avoding that.-->
<!--Example 1: simple way to add items to avoid duplication.
You can change the passage text or leave it the same depending on what works best for your story.-->
<h1>Ruby</h1>
(if: $inv contains "Ruby")[You are in a dark room lit with torches. The chest you opened is empty.]
(else:)[(set: $inv to $inv + (a: "Ruby"))
You are in a dark room lit with torches. Inside a chest you find a ruby!]
<!--Example 2: searching a room by clicking named hooks.-->
<!--Make sure either that these are items you won't find multiple times on your adventure,
or your player will be told they've searched somewhere they haven't looked.
Alternatively, reword this passage to say for example 'you see a sword and sheild on a wepons rack but you have these items already' for the else marco.
That way things make sense if the player had these items before this passage or picked them up from this passage and checked their inventry.-->
<h1>Search the room</h1>
[''Check the chest?'']<1a|
[''Check the bookcase'']<1b|
[''Check the weapons rack?'']<1c|
<br>
(if: $inv contains "ruby")[You've searched the chest.]
(else:)[(click:?1a)[(set: $inv to $inv + (a: "ruby")) You find a ruby in the chest!]]
(if: $inv contains "bestiary")[You've searched the bookcase]
(else:)[(click:?1b)[(set: $inv to $inv + (a: "bestiary"))You find a book on the monsters of this land.]]
(if: $inv contains "sword" and "shield")[You've searched the weapons rack]
(else:)[(click:?1c)[(set: $inv to $inv + (a: "sword","shield")) You find a good sword and shield.]]