Debian Codegraph @

data/storyline/act1/dialogs/Francis.lua

raw
1 ---------------------------------------------------------------------
2 -- This file is part of Freedroid
3 --
4 -- Freedroid is free software; you can redistribute it and/or modify
5 -- it under the terms of the GNU General Public License as published by
6 -- the Free Software Foundation; either version 2 of the License, or
7 -- (at your option) any later version.
8 --
9 -- Freedroid is distributed in the hope that it will be useful,
10 -- but WITHOUT ANY WARRANTY; without even the implied warranty of
11 -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 -- GNU General Public License for more details.
13 --
14 -- You should have received a copy of the GNU General Public License
15 -- along with Freedroid; see the file COPYING. If not, write to the
16 -- Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston,
17 -- MA 02111-1307 USA
18 ----------------------------------------------------------------------
19 --[[WIKI
20 PERSONALITY = { "Weak", "Aged", "Friendly", "Honest" },
21 MARKERS = { NPCID1 = "Spencer", QUESTID1 = "Deliverance", NPCID2 = "Chandra" },
22 PURPOSE = "$$NAME$$ is the first character encountered in the game. He gives a summary explanation of what is going on in the
23 world, and is able to direct the player to the mining community.",
24 BACKSTORY = "$$NAME$$ is the Doctor in charge of the Cryonic Facility near the town. $$NAME$$ is quite old and his heart is weak; he could
25 easily suffer a fatal heart attack. He escaped to the town when the Great Assault began. He has agreed to be the keeper of the Cryo
26 Stasis Laboratory. When he discovered that there was a Linarian being held in stasis, he took it upon himself to resuscitate that
27 Linarian in hopes of bringing an end to the war.",
28 RELATIONSHIP = {
29 {
30 actor = "$$NPCID1$$",
31 text = "$$NAME$$ disagrees with $$NPCID1$$ about disposing of people in cryonic stasis. Initially he refused the task, but $$NPCID1$$
32 threatened to reveal a secret from $$NAME$$\'s past and forced him to accept. $$NAME$$ must send $$NPCID1$$ a list of all people in
33 the Cryonic Facility. Not wanting to confront $$NPCID1$$ again, $$NAME$$ passes the delivery on to Tux in the $$QUESTID1$$ quest."
34 },
35 {
36 actor = "$$NPCID2$$",
37 text = "$$NAME$$ and $$NPCID2$$ know each other. $$NAME$$ sends Tux to talk to him about Linarians."
38 },
39 }
40 WIKI]]--
41
42 local Npc = FDrpg.get_npc()
43 local Tux = FDrpg.get_tux()
44
45 return {
46 FirstTime = function()
47 Francis_help = 150
48 end,
49
50 EveryTime = function()
51 if (not Francis_bot_attack) then
52 if (InvaderBot_hacked or InvaderBot:is_dead()) then
53 next("node6")
54 else
55 Npc:says(_"HELP! We're under attack!","NO_WAIT")
56 Npc:says(_"[b](The old man is clearly distressed and frightened.)[/b]")
57 show("node0")
58 end
59 Francis_bot_attack = true
60 Npc:set_rush_tux(false)
61 elseif (not InvaderBot_hacked and not InvaderBot:is_dead()) then
62 Npc:says(_"Have you neutralized the threat yet?")
63 if (not Francis_tux_liar) then
64 show("node1", "node2")
65 else
66 show("node1", "node3")
67 end
68 elseif (not Francis_invaderbot_neutralized) then
69 Npc:says(_"Have you neutralized the threat yet?")
70 show("node5")
71 else
72 if (not Tux:has_quest("Deliverance")) and
73 (not (Francis_refused_deliverance)) then
74 show("node90")
75 --; TRANSLATORS: %s =Tux:get_player_name()
76 Npc:says(_"Welcome back %s.", Tux:get_player_name())
77 else
78 show("node99")
79 --; TRANSLATORS: %s =Tux:get_player_name()
80 Npc:says(_"It's good to see you again, %s.", Tux:get_player_name())
81 end
82
83 if (Francis_tux_dismissed) then
84 show("node21", "node22")
85 end
86
87 if (cryo_614_lock_gate) and
88 (not cryo_outergate_code) then
89 show("node30")
90 end
91
92 if (tux_has_joined_guard) and
93 (not Francis_guard_response) then
94 Francis_guard_response = true
95 Tux:says(_"I joined the Red Guard.")
96 Npc:says(_"Oh...")
97 Npc:says(_"Well. Congratulations are in order, I suppose.")
98 Tux:says(_"...")
99 end
100
101 if (HF_FirmwareUpdateServer_uploaded_faulty_firmware_update) and
102 (not Francis_hf_response) then
103 Francis_hf_response = true
104 Tux:says(_"All droids are dead. Mission complete!")
105 Npc:says(_"Now, that's quite a deed. Congratulations.")
106 Npc:says(_"I can finally sleep with one worry less, I suppose.")
107 Tux:says(_"...")
108 if (Tux:has_quest("Deliverance")) then
109 Tux:says(_"The data cube still worries you, am I right?")
110 Npc:says(_"...Yes.")
111 end
112 end
113 end
114
115 -- in case Francis gets stuck at FrancisSafe:
116 if (InvaderBot_hacked or InvaderBot:is_dead()) and
117 (Francis_invaderbot_neutralized) and
118 (not Francis_movement_free) then -- this way we prevent him from walking to the label whenever we talk to him again which may look strange
119 Npc:set_destination("InvaderBot-Alive-Check-W")
120 Francis_movement_free = true
121 end
122 end,
123
124 {
125 id = "node0",
126 text = _"Uhh... Where... Uh... Who am I? Oh, my head...",
127 code = function()
128 Npc:says(_"You have been in stasis for quite some time, but you must hurry! There's no time to explain... There's a bot in the next room. You must neutralize it quickly!")
129 Npc:set_destination("FrancisSafe")
130 hide("node0")
131 end_dialog()
132 end,
133 },
134 {
135 id = "node1",
136 text = _"No, not yet.",
137 code = function()
138 Npc:says(_"Hurry! There's no time...")
139 Npc:set_destination("FrancisSafe")
140 hide("node1", "node2", "node3")
141 end_dialog()
142 end,
143 },
144 {
145 id = "node2",
146 text = _"(Lie) Yes, the bot has been defeated.",
147 code = function()
148 Francis_help = Francis_help - 30
149 Npc:says(_"Oh, many thanks to ...")
150 Npc:says(_"You lie! You shouldn't toy with an old man with a weak heart! I can hear its servos whirring away... heading this way to kill us both! Please, you must help...")
151 Francis_tux_liar = true
152 Npc:set_destination("FrancisSafe")
153 hide("node1", "node2")
154 end_dialog()
155 end,
156 },
157 {
158 id = "node3",
159 text = _"(Lie) Yes, the bot has been defeated.",
160 code = function()
161 Npc:says(_"[b](sigh)[/b] Thank you, Linarian. You are truly...")
162 Npc:says(_"[b](In the other room, you hear the faint whirring of servos. The horror in the old man's eyes tell you that he too has heard it.)[/b]")
163 Npc:says(_"...a monster! You are not a Linarian like the legends spoke of! The cryo-stasis has corrupted your soul! AGGGG!!!")
164 Npc:says(_"[b](The old man grips his chest and collapses in what appears to have been a fatal heart attack.)[/b]")
165 InvaderBot:teleport("NewTuxStartGameSquare")
166 InvaderBot:set_faction("ms")
167 Tux:add_quest("Deliverance", _"The mysterious old man died from a heart attack caused by fear. He had a small data cube on his body. I wonder what's on it...?")
168 Tux:add_item("Data cube")
169 Npc:drop_dead()
170 hide("node1", "node3")
171 end_dialog()
172 end,
173 },
174 {
175 id = "node5",
176 text = _"Yes, the bot has been defeated.",
177 code = function()
178 Npc:says(_"Thank heavens! Perhaps the legends are true after all...")
179 Npc:says(_"Now that we are safe, I'd be happy to answer some of your questions. But we cannot take too long, you will need to head to the town as soon as possible.")
180 Francis_invaderbot_neutralized = true
181 Npc:set_destination("FrancisStart")
182 hide("node5") show("node10", "node90")
183 end,
184 },
185 {
186 id = "node6",
187 code = function()
188 Npc:says(_"Thank heavens! You have protected us from this bot.")
189 Npc:says(_"You have been in stasis for quite some time, but you still can defend yourself. Perhaps the legends are true after all...")
190 Npc:says(_"Now that we are safe, I'd be happy to answer some of your questions. But we cannot take too long, you will need to head to the town as soon as possible.")
191 Francis_invaderbot_neutralized = true
192 Npc:set_destination("FrancisStart")
193 hide("node6") show("node10", "node90")
194 end,
195 },
196 {
197 id = "node10",
198 text = _"I feel terrible... Was I asleep? I remember nightmares. A meteor shower... Fire... Death... It was awful.",
199 code = function()
200 Npc:says(_"Unfortunately, for a case like yours, that is normal. According to your records, you were in stasis sleep for over 70 years.")
201 Npc:says(_"Stasis is not too kind on the mind. It is not uncommon for strange dreams and nightmares to plague people who have been under stasis that long.")
202 hide("node10") show("node11", "node15")
203 end,
204 },
205 {
206 id = "node11",
207 text = _"Who am I?",
208 code = function()
209 Npc:says(_"So you really can't remember, eh?")
210 Npc:says(_"Long stasis sleep can cause neurological damage and impact the memory. Looks like that is what happened here.")
211 --; TRANSLATORS: %s = Tux:get_player_name()
212 Npc:says(_"If the computer is not lying, then your name is %s.", Tux:get_player_name())
213 Npc:says(_"I'm just glad that we realized that you were a legendary Linarian and started the thawing process when we did.")
214 hide("node11") show("node12")
215 end,
216 },
217 {
218 id = "node12",
219 text = _"Linarians? Legends? What are you talking about?",
220 code = function()
221 Npc:says(_"Wow, this is the worst case of cryo-neural damage I have ever seen.")
222 Npc:says(_"The Red Guard had me thaw you out because you are a Linarian. I don't know much about your kind, but I do know that you have a strange affinity for computers, almost magical powers.")
223 Npc:says(_"Chandra in the nearby town center probably has even more information.")
224 Npc:says(_"Look in the chest in the next room for some spare gear I managed to gather for you. It's not much, but it should help you make it to town in one piece.")
225 linarian_chandra = true
226 Francis_tux_dismissed = true
227 hide("node12") show("node20", "node21")
228 end,
229 },
230 {
231 id = "node15",
232 text = _"Who are you? What is going on?",
233 code = function()
234 Npc:says(_"My name is Dr. Francis Spark. I am... uh... the keeper of this cryonic facility.")
235 Npc:set_name("Dr. Francis - Cryonicist")
236 Npc:says(_"Currently, there is a war raging all around the globe. One day, our once loyal bots rebelled against us and began trying to wipe us out. The beginning of this war has been dubbed 'The Great Assault.'")
237 Npc:says(_"Our other devices started playing up too, so we had to switch back to terminals. Older technology seemed to be unharmed.")
238 Npc:says(_"And it looks like humans are losing the war. Our town isn't doing so well at this point either. But there is still hope, since you were discovered here.")
239 hide("node15") show("node16", "node17")
240 end,
241 },
242 {
243 id = "node16",
244 text = _"How did the war start?",
245 code = function()
246 Npc:says(_"Unfortunately, I'm not the best source of information for that. All I know is that one day the bots went crazy. Maybe someone else in town knows more.")
247 hide("node16")
248 end,
249 },
250 {
251 id = "node17",
252 text = _"Keeper? You don't sound so sure... What is the deal with this place?",
253 code = function()
254 Npc:says(_"I'm sorry, but you probably need to start travelling to the town. The Red Guard are not known to be the most patient.")
255 Npc:says(_"They were the ones who wanted me to thaw you out, after all. You'd better get going.")
256 Francis_tux_dismissed = true
257 hide("node17") show("node20", "node21")
258 end,
259 },
260 {
261 id = "node20",
262 text = _"Tell me more about the town you mentioned.",
263 code = function()
264 Npc:says(_"It is a small mining community of perhaps 500 inhabitants...")
265 Npc:says(_"I guess it was a stroke of luck that the town has not been completely destroyed by the bots.")
266 Npc:says(_"Oddly enough, the rusty old bots that the town uses for security were not affected by whatever caused the other bots to go crazy.")
267 Npc:says(_"Right now the town is 'protected' by the Red Guard, a bunch of opportunistic roughnecks. It's not exactly a secret that I don't agree with their methods.")
268 Npc:says(_"However, I must admit that being oppressed is a much better alternative to being eviscerated alive.")
269 hide("node20")
270 end,
271 },
272 {
273 id = "node21",
274 text = _"Can you tell me how to get to town?",
275 code = function()
276 Npc:says(_"Sure. You just need to follow the road outside to the east. After the bridge, turn right and continue to follow the road and you will soon be outside of the town main gate.")
277 Npc:says(_"If you run across too many bots, you can try to circle around them. But avoid getting too far off the road, so you don't get lost. It's very dangerous out there.")
278 Npc:says(_"Once in town you will be able to purchase or trade a few more items for protection at Ms. Stone's shop just inside the town gate.")
279 hide("node21") show("node22")
280 end,
281 },
282 {
283 id = "node22",
284 text = _"How do I get out from here?",
285 code = function()
286 Npc:says(_"Oh, just take the small door and corridor out to the waiting room. And from there you can get out through the customer entrance.")
287 Npc:says(_"I keep the back entrance, close to my sleeping quarters, locked at all times. Better safe than sorry.")
288 hide("node22")
289 end,
290 },
291 {
292 id = "node30",
293 text = _"The 614 bot said he might lock the outside gate!",
294 code = function()
295 cryo_outergate_code = true
296 Npc:says(_"Oh. You'll need to put the cryonic terminals into admin mode to access the gate controls.")
297 Tux:says(_"How do I do that?")
298 Npc:says(_"You press star-pound-zero-six-pound and then enter the free-speech number.")
299 Npc:says(_"It is kind of long, so I'll write it down for you.")
300 Npc:says(_"If the 614 bot locks the gate, it is for a good reason. Lock the gate behind you!")
301 hide("node30")
302 end,
303 },
304 {
305 id = "node90",
306 text = _"Thanks for the help. I'll be going now.",
307 code = function()
308 Npc:says(_"I am glad I could help you. You should be careful around here. Best head straight for our town.")
309 Npc:says(_"Oh, I almost forgot... Could you take this data cube and give it to Spencer once you get to town?")
310 Tux:says(_"Spencer?")
311 Npc:says(_"Yes. He's the leader of the Red Guard.")
312 hide("node90") show("node91", "node92", "node93")
313 push_topic("Deliver the cube")
314 end,
315 },
316 {
317 id = "node91",
318 text = _"What is stored in the cube?",
319 topic = "Deliver the cube",
320 code = function()
321 Npc:says(_"It's almost nothing... nothing important... if I know nothing about purposes.")
322 Npc:says(_"Spencer wanted me to list all people in cryonic stasis. We had an argument about it, but in the end I gave in. Maybe it's needed. I couldn't avoid it.")
323 Npc:says(_"I'm not a bad person, but I don't like these types of decisions. Lose-lose decisions are especially difficult. But, I suppose, it's like that for everybody.")
324 Npc:says(_"Bring your questions to Spencer. I'd rather not discuss it anymore, it is too troubling, especially since I'm complicit in whatever happens.")
325 hide("node91")
326 end,
327 },
328 {
329 id = "node92",
330 text = _"All right, I'll deliver the cube.",
331 topic = "Deliver the cube",
332 code = function()
333 Npc:says(_"Thank you.")
334 Npc:says(_"You can ask one of the guards in town, they'll know where to find Spencer.")
335 Tux:add_item("Data cube", 1)
336 Tux:add_quest("Deliverance", _"Francis asked me to deliver a data cube for him. When I reach the town, I'm supposed to give it to Spencer, who's in charge of the Red Guard ruling the nearby town. Of course, my first job is to survive the trip there...")
337 hide("node91", "node92", "node93", "node94")
338 next("node98")
339 end,
340 },
341 {
342 id = "node93",
343 text = _"Deliver that cube yourself.",
344 topic = "Deliver the cube",
345 code = function()
346 Francis_help = Francis_help - 10
347 Npc:says(_"Oh, I would, believe me. I'm quite capable of running my own errands, even with the mass of bots out there.")
348 Npc:says(_"But... The prospect of facing that... That man again... I just can't bear it.")
349 --; TRANSLATORS: %s =Tux:get_player_name()
350 Npc:says(_"Please, %s, will you do me this favor?", Tux:get_player_name())
351 hide("node93") show("node94")
352 end,
353 },
354 {
355 id = "node94",
356 text = _"No, I don't want to deliver your stupid cube.",
357 topic = "Deliver the cube",
358 code = function()
359 Francis_help = Francis_help - 60
360 Francis_refused_deliverance = true
361 Npc:says(_"... All right.")
362 Npc:says(_"I can't force you to do it if you don't want to.")
363 Npc:says(_"I suppose I'll just have to go to Spencer myself.")
364 Npc:says(_"Anyway, I am glad I could help you. You should be careful around here. Best head straight for our town.")
365 hide("node91", "node92", "node94")
366 next("node98")
367 end,
368 },
369 {
370 id = "node98",
371 code = function()
372 if (Francis_help > 0) then
373 Npc:says(_"Oh... I almost forgot... This is a small help but I hope it will make your life a little easier.")
374 Tux:add_gold(Francis_help)
375 end
376 Npc:says(_"Remember not to veer too far off the path, or your quest could be over before it begins.")
377 end_dialog()
378 end,
379 },
380 {
381 id = "node99",
382 text = _"Thanks for the help. I'll be going now.",
383 code = function()
384 if (not HF_FirmwareUpdateServer_uploaded_faulty_firmware_update) then
385 Npc:says(_"I am glad I could help you. You should be careful around here. Best head straight for our town.")
386 Npc:says(_"Remember not to veer too far off the path, or your quest could be over before it begins.")
387 else
388 Npc:says(_"Safe travels, linarian.")
389 end
390 end_dialog()
391 end,
392 },
393 }