-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlobby.yaml
115 lines (103 loc) · 2.8 KB
/
lobby.yaml
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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
rooms:
- name: lobby
states:
- name: default
long: You're in the office lobby
actions:
- match: sesame
always:
reply: You shout "sesame" to the room
then:
reply: The door opens
setProps:
- door.state = open
- match: open wardrobe
always:
reply: you open the wardrobe
if:
all:
- clothes.wearing = true
then:
setProps:
- wardrobe.state = openEmpty
else:
setProps:
- wardrobe.state = openFull
- match: close wardrobe
then:
setProps:
- wardrobe.state = closed
# dont use 'get' as that doesn't get replaced
- match: get clothes
if:
all:
- wardrobe.state = openFull
- clothes.wearing = false
then:
reply: You put on the clothes
setProps:
- wardrobe.state = empty
- clothes.wearing = true
else:
reply: You'll have to open the wardrobe first.
- match: take letter
if:
all:
- letter.has = yes
then:
reply: You've read the letter
else:
reply: You read the letter in shock...
take:
- letter
items:
# door
- name: door
state: locked
states:
- name: locked
short: The door is tightly locked
- name: open
short: The door has opened up, time to make a break for it.
- name: wardrobe
called: closet|wr
state: closed
canTake: false
states:
- name: closed
short: The wardrobe is closed
- name: openEmpty
short: The wardrobe is open but there's nothing inside
- name: openFull
short: You see some clothes inside the open wardrobe
# item has other special 'get' handler
- name: letter
called: letter
canTake: true
states:
- name: default
short: A letter with something shocking.
- name: shirt
called: shirt|clothes|cotton shirt
canTake: true
states:
- name: default
short: A spare office shirt, for meetings
- name: wearing
short: you're wearing the nice shirt
- name: soap
called: soap|bar of soap
canTake: true
states:
- name: default
short: time for a good scrubbing! Better follow procedure.
# item you cannot get
- name: table
canTake: false
states:
- name: default
short: A big wooden table
- name: lighter
states:
- name: default
short: this has a custom get action