-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGoldExample.html
53 lines (36 loc) · 1.84 KB
/
GoldExample.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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
<!--Adding gold-->
<!--Example 1: adding gold-->
<h1>Gold!</h1>
(set: $gold to $gold +5)
You found 5 gold coins!
<!--Example 2: setting the players gold to a certain ammount-->
<h1>Gold!</h1>
(set: $gold to 10)
"You can only come in here if you have exactly 10 gold on you," The guard says.
"That seems arbitrary," you tell her.
"The guy doing this code was stuck for a better example, but I'm sure someone can think of a more creative use for it."
<!--Example 3: the player finding gold-->
<h1>Search the cave</h1>
The cave is dark but we're not doing lighting up an area if/else item query right now.
You want treasure do you...
[Check the shiny new chest?]<1b|
<!--To change the gold statistic you must go to a new passage as it is a static value.-->
(click:?1b)(goto: "Gold")
<!--The passage where the player gets more gold. Still working on a way to send the player back to the prior passage without them getting gold each time.
You could simply make a new passage the player is directed to that tells them 'you don't find anymore gold in the chest'.
You will need to tag this donotshowinventory and donotshowquest for now to stop duplicate gold addtion if player checks their inventory from this passage.-->
<h1>Gold</h1>
{(set:$gold to $gold +5)}
The chest is full of gold! nice.
<!--Taking gold-->
<!--Example 1: Remove gold if the player has over a certain ammount.
ditto like above for tags donotshowinventory and donotshowquest.
So the player won't keep loosing gold if they check those from this passage-->
<h1>Lost gold</h1>
(If: $gold is >=5)[(set: $gold to $gold -5)Oh no you trip and loose 5 gold!]
(else:)[You stumble but don't loose anything]
<!--Example 2: Taking all of the players gold
Don't think you need those tags but for consistency and peace of mind I'd add them.-->
<h1>Lost gold</h1>
Oh no you lost all your gold!
(set: $gold to 0)