forked from dave-f/calypso
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcave.inf
191 lines (172 loc) · 5.26 KB
/
cave.inf
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
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
! Calypso part 4 : Cave : Contains ship treasure.
#IfnDef USE_PUNY;
Constant BUTTONS_GROUP = "stone buttons with animal pictures on";
#EndIf;
Object cave "Cave",
with name 'cave',
door_opened false,
description [;
print "Lit up by your magical light, you notice the cave
is rather larger than it looked from the outside. It
is a relatively huge open space, ";
if (self.door_opened)
{
"even more so now that the stone slab has moved, enabling
passage to a small chamber to the north.";
}
else
{
"and the far wall is taken up by a huge stone slab, at the side
of which are five buttons set into the wall.";
}
],
n_to [;
if (self.door_opened)
{
return cave_inner;
}
else
{
"The cave panel blocks your way.";
}
],
s_to rocks,
out_to rocks;
Object -> slab "slab",
with name 'slab',
description "The huge slab stands at the northern end of the
cave and seems to block entrance to an inner room. By
the side of it are 5 buttons.",
has scenery;
[ CheckCaveButtons;
if (button_pelican has on && button_toucan has on &&
button_lion hasnt on && button_zebra has on &&
button_penguin hasnt on)
{
if (cave.door_opened==false)
{
score++;
cave.door_opened = true;
"As you press this button, the huge stone slab
moves to the right slowly, revealing an inner
chamber to the north.";
}
}
rfalse;
];
Class Button
with name 'button' 'buttons//p',
short_name [;
print (string) self.animal_word, " button";
rtrue;
],
plural "buttons",
description [;
print "A picture of a ", (string) self.animal_word,
" is carved into this button. ";
],
#IfnDef USE_PUNY;
list_together BUTTONS_GROUP,
#EndIf;
after [;
SwitchOn, SwitchOff:
return CheckCaveButtons();
],
before [;
Push:
if (self has on)
{
<<SwitchOff self>>;
}
else
{
<<SwitchOn self>>;
}
],
has switchable static;
Button -> button_lion
with name 'lion',
animal_word "lion",
has on;
Button -> button_zebra
with name 'zebra',
animal_word "zebra",
has ~on;
Button -> button_penguin
with name 'penguin',
animal_word "penguin",
has on;
Button -> button_toucan
with name 'toucan',
animal_word "toucan",
has on;
Button -> button_pelican
with name 'pelican',
animal_word "pelican",
has ~on;
! I think you should have to examine earth to see footprints, give
! them ~concealed rather than the disturbed earth.. or rather, give
! both of them it together.
Object cave_inner "Inner cave",
with name 'stone' 'cave',
description "Deeper inside the cave is this small
circular room. Although the light fades somewhat in here
you can still make out you are in a cramped room
with stone walls and moist earth.",
s_to cave,
has light;
Object -> cave_walls "walls",
with name 'wall' 'walls',
description "The walls are stone and cold.",
has scenery pluralname;
Object -> cave_ground "moist earth",
with name 'moist' 'earth' 'soil',
description "The earth is dark and damp.",
before [;
Dig:
"Randomly digging achieves nothing.";
],
after [;
Examine, Search:
if (cave_footprints has concealed)
{
give cave_footprints ~concealed;
give cave_disturbed_earth ~concealed;
move cave_disturbed_earth to real_location;
"You spot some footprints in the ground leading to a disturbed patch of earth.";
}
],
has scenery;
Object -> cave_footprints "footprints",
with name 'foot' 'prints' 'footprints',
description "The footprints look to be reasonably fresh, and
lead to a disturbed patch of earth.",
has scenery pluralname concealed;
! Mulling the door closing, leaving player in dark? Have to get out.. Hmm.
Object cave_disturbed_earth "disturbed earth",
with name 'disturbed' 'patch' 'of' 'earth',
description "A small patch of recently disturbed earth.",
before [;
Dig:
if (second==spade)
{
if (spade.working)
{
score++;
move obsidian_figure to real_location;
"With a clear idea where to dig, you uncover an obsidian figure.";
}
else
{
"The spade is broken and isn't much use.";
}
}
else
{
"You would need to dig with a tool.";
}
],
has concealed scenery;
Object obsidian_figure "obsidian figure",
with name 'obsidian' 'figure' 'figurine',
description "A solid obsidian figure.";