-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathship.lua
292 lines (261 loc) · 9.53 KB
/
ship.lua
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
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
local hatch = Thing {
x = 127,
y = 2,
label = 'You see the exit hatch.',
image = love.graphics.newImage('images/hatch.png'),
action = function ()
local result = choose('|Look at the hatch.',
'@Go through the hatch..',
'$Talk to the hatch.',
'Nevermind.')
if result == 1 then
say 'You meditate on the word painted\non the hatch. Is it a command?\nA suggestion? A declaration?'
elseif result == 2 then
if tookthenotebook then
if not hasleftshipbefore then
say 'Let\'s go!'
hasleftshipbefore = true
end
rooms.enter(rooms.city)
else
say 'You still need your notebook.'
end
elseif result == 3 then
say 'You ask the hatch whether it considers\z'
.. 'itself to be *between* the walls\z'
.. 'or *in* the walls. The hatch is not amused.'
end
end
}
comm = {
xoff = 37,
yoff = 45,
name = 'You see your computaterm.',
image = love.graphics.newImage('images/commobj.png'),
action = function ()
local result = choose('|Look at the computaterm.',
'@Use the computaterm.',
'$Talk to the computaterm.',
'Nevermind.')
if result == 1 then
say 'This baby\'s a BYTH surplus issue, standard\nweight computaplex with a preinstalled\nParoliware BIOS.'
say 'Long story short, it\'s like a video phone\nand you don\'t know how to make it do\nanything else.'
elseif result == 2 then
say 'The chairman would probably kill you\nif you called him.'
say '...'
local result = choose('@Call the chairman.', 'Back away slowly.')
if result == 1 then
rooms.enter(rooms.call)
end
elseif result == 3 then
say 'The dormant cathode ray emitters\nbehind the glass turn out to be\nexcellent listeners.'
end
end
},
sword = {
xoff = 10,
yoff = 9,
name = 'You see your katana.',
image = love.graphics.newImage('images/sword.png'),
action = function ()
local result = choose('|Look at the katana.',
'@Use the katana.',
'$Talk to the katana.',
'Nevermind.')
if result == 1 then
say 'You got this for Christmas\nafter graduating.'
say 'You\'re sure that it would be\ndeadly if you were trained...'
elseif result == 2 then
say 'You almost go full on samurai\nbefore you remember that your\nPsychic Amp is probably more\npowerful than the sword.'
elseif result == 3 then
say 'You attempt a few phrases you\nheard on an anime. Nevertheless,\nthe spirit within the katana\ndoes not answer you.'
end
end
},
notebook = {
xoff = 29,
yoff = 52,
name = 'You see your notebook.',
image = love.graphics.newImage('images/notebook.png'),
action = function ()
say 'With this notebook, you can note incidents.'
playconfirm()
takenotebook()
end
},
books = {
xoff = 31,
yoff = 57,
name = 'You see a small library of novels.',
image = love.graphics.newImage('images/books.png'),
action = function ()
local result = choose('|Look at the books.',
'@Take the books.',
'$Talk to the books.',
'Nevermind.')
if result == 1 then
say 'You read one of the spines...\n*Valiant Shield*, by R. Sugar.'
elseif result == 2 then
say 'Though the library is small,\nit\'s probably not convenient\nto carry.'
else
say 'You decide to tell the books\na story of your own.\n\'Once upon a time, on a rock\norbiting Earth...\''
end
end
},
manual = {
xoff = 43,
yoff = 32,
name = 'You see a manual.',
image = love.graphics.newImage('images/manual.png'),
action = function ()
say 'Manual of Bythanthian Agents:\nIn honor of the Chairman'
local result = choose('@Read the first paragraph.', 'Put down the manual')
if result == 1 then
say 'Equalize the empire.\nMake examples of outliers.'
say 'By the grace of the\nChairman, you have a weapon.'
say 'The Psychic Amp is your\ntool of justice.'
end
end
}
}
-- load the state of the room
if tookthenotebook then
takenotebook()
end
end
return room
local room = {}
local function takenotebook()
objects.notebook = nil
tookthenotebook = true
end
function room.enter()
-- switch to ship music and backdrop
switchbgmusic(shipmusic)
backdrop = love.graphics.newImage('images/ship.png')
-- define room objects
objects = {
hatch = {
xoff = 127,
yoff = 2,
name = 'You see the exit hatch.',
image = love.graphics.newImage('images/hatch.png'),
action = function ()
local result = choose('|Look at the hatch.',
'@Go through the hatch..',
'$Talk to the hatch.',
'Nevermind.')
if result == 1 then
say 'You meditate on the word painted\non the hatch. Is it a command?\nA suggestion? A declaration?'
elseif result == 2 then
if tookthenotebook then
if not hasleftshipbefore then
say 'Let\'s go!'
hasleftshipbefore = true
end
rooms.enter(rooms.city)
else
say 'You still need your notebook.'
end
elseif result == 3 then
say 'You ask the hatch whether it considers\nitself to be *between* the walls\nor *in* the walls. The hatch is not amused.'
end
end
},
comm = {
xoff = 37,
yoff = 45,
name = 'You see your computaterm.',
image = love.graphics.newImage('images/commobj.png'),
action = function ()
local result = choose('|Look at the computaterm.',
'@Use the computaterm.',
'$Talk to the computaterm.',
'Nevermind.')
if result == 1 then
say 'This baby\'s a BYTH surplus issue, standard\nweight computaplex with a preinstalled\nParoliware BIOS.'
say 'Long story short, it\'s like a video phone\nand you don\'t know how to make it do\nanything else.'
elseif result == 2 then
say 'The chairman would probably kill you\nif you called him.'
say '...'
local result = choose('@Call the chairman.', 'Back away slowly.')
if result == 1 then
rooms.enter(rooms.call)
end
elseif result == 3 then
say 'The dormant cathode ray emitters\nbehind the glass turn out to be\nexcellent listeners.'
end
end
},
sword = {
xoff = 10,
yoff = 9,
name = 'You see your katana.',
image = love.graphics.newImage('images/sword.png'),
action = function ()
local result = choose('|Look at the katana.',
'@Use the katana.',
'$Talk to the katana.',
'Nevermind.')
if result == 1 then
say 'You got this for Christmas\nafter graduating.'
say 'You\'re sure that it would be\ndeadly if you were trained...'
elseif result == 2 then
say 'You almost go full on samurai\nbefore you remember that your\nPsychic Amp is probably more\npowerful than the sword.'
elseif result == 3 then
say 'You attempt a few phrases you\nheard on an anime. Nevertheless,\nthe spirit within the katana\ndoes not answer you.'
end
end
},
notebook = {
xoff = 29,
yoff = 52,
name = 'You see your notebook.',
image = love.graphics.newImage('images/notebook.png'),
action = function ()
say 'With this notebook, you can note incidents.'
playconfirm()
takenotebook()
end
},
books = {
xoff = 31,
yoff = 57,
name = 'You see a small library of novels.',
image = love.graphics.newImage('images/books.png'),
action = function ()
local result = choose('|Look at the books.',
'@Take the books.',
'$Talk to the books.',
'Nevermind.')
if result == 1 then
say 'You read one of the spines...\n*Valiant Shield*, by R. Sugar.'
elseif result == 2 then
say 'Though the library is small,\nit\'s probably not convenient\nto carry.'
else
say 'You decide to tell the books\na story of your own.\n\'Once upon a time, on a rock\norbiting Earth...\''
end
end
},
manual = {
xoff = 43,
yoff = 32,
name = 'You see a manual.',
image = love.graphics.newImage('images/manual.png'),
action = function ()
say 'Manual of Bythanthian Agents:\nIn honor of the Chairman'
local result = choose('@Read the first paragraph.', 'Put down the manual')
if result == 1 then
say 'Equalize the empire.\nMake examples of outliers.'
say 'By the grace of the\nChairman, you have a weapon.'
say 'The Psychic Amp is your\ntool of justice.'
end
end
}
}
-- load the state of the room
if tookthenotebook then
takenotebook()
end
end
return room