Debian Codegraph @

data/storyline/act1/dialogs/DocMoore.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 = { "Folksy", "Knowledgeable", "Friendly" },
21 MARKERS = { NPCID1 = "Bender" },
22 PURPOSE = "$$NAME$$ will heal Tux for free and also provides information about medical equipment in the game.",
23 BACKSTORY = "$$NAME$$ provides medical services to the town, but only if injuries are \'Not Self-Inflicted\'.",
24 RELATIONSHIP = {
25 {
26 actor = "$$NPCID1$$",
27 text = "$$NAME$$ refuses to help $$NPCID1$$ for ignoring his medical advice."
28 },
29 }
30 WIKI]]--
31
32 local Npc = FDrpg.get_npc()
33 local Tux = FDrpg.get_tux()
34
35 return {
36 FirstTime = function()
37 if (not HF_FirmwareUpdateServer_uploaded_faulty_firmware_update) then
38 show("node0")
39 else
40 show("DocMoore_post_firmware_update_firsttime")
41 end
42 end,
43
44 EveryTime = function()
45 if (Tux:has_quest("Bender's problem")) and
46 (Tux:has_met("DocMoore")) and
47 (not Tux:done_quest("Bender's problem")) then
48 show("node2")
49 end
50
51 if (Spencer_Tania_decision == "doc_moore") and
52 (not DocMoore_Tania_OK) then
53 DocMoore_Tania_OK = true
54 show("node25")
55 end
56
57 if (Tux:has_item_backpack("Strength Pill")) then show("node50") end
58 if (Tux:has_item_backpack("Dexterity Pill")) then show("node51") end
59 if (Tux:has_item_backpack("Code Pill")) then show("node52") end
60
61 if (Tux:has_item_backpack("Brain Enlargement Pill")) then show("node54") end
62 if (Tux:has_item_backpack("Diet supplement")) then show("node55") end
63 if (Tux:has_item_backpack("Antibiotic")) then show("node56") end
64 if (Tux:has_item_backpack("Doc-in-a-can")) then show("node57") end
65
66 show("node99")
67
68 if (HF_FirmwareUpdateServer_uploaded_faulty_firmware_update) and
69 (Tux:has_met("DocMoore")) and
70 (not DocMoore_post_firmware_update_congrats) then
71 next("DocMoore_post_firmware_update")
72 return -- next() node is executed immediately after EveryTime, would look odd if EveryTime contains Npc:says
73 end
74
75 if (Tux:get_hp_ratio() < 0.1) then
76 Npc:says(_"You look gravely injured.")
77 Npc:says(_"I will help you.")
78 Tux:says(_"I...")
79 Npc:says(_"It's ok, you'll be fine soon.")
80 Npc:says(_"A little spray here...")
81 Npc:says(_"An injection there...", "NO_WAIT")
82 Tux:says(_"OW!")
83 Npc:says(_"Now, swallow this pill.")
84 Tux:says(_"*glup*")
85 Npc:says(_"Ok, you are fixed now.")
86 Tux:says(_"Oh, thank you!")
87 Npc:says(_"Take better care of yourself, Linarian.")
88 Tux:heal()
89 end
90
91 if (Tux:get_hp_ratio() < 0.2) then
92 Npc:says(_"You don't look too good...")
93 Npc:says(_"I can help you if you want.")
94 elseif (Tux:get_hp_ratio() < 0.4) then
95 Npc:says(_"You should take better care of yourself out there.")
96 end
97
98 if (Npc:get_rush_tux()) then
99 Npc:set_rush_tux(false)
100 end
101
102 if (Tux:has_met("DocMoore")) and
103 (Tux:has_item("Rubber duck")) and
104 (not DocMoore_not_seen_rubber_duck_lie) then
105 Npc:says(_"Oh, did you by any chance see a bright yellow item made out of polyvinyl chloride?")
106 show("node42", "node43")
107 end
108
109 if (Bender_go_talk_to_doc) and
110 (not Tux:done_quest("Bender's problem")) then
111 show("DocMoore_post_firmware_update_bender")
112 end
113 end,
114
115 {
116 id = "node0",
117 text = _"Hello!",
118 code = function()
119 Npc:says(_"Hello. I'm Doc Moore. I'm the medic of this town. I don't believe we've met?")
120 --; TRANSLATORS: %s = Tux:get_player_name()
121 Tux:says(_"I'm %s.", Tux:get_player_name())
122 Npc:says(_"Um, what are you? Some kind of overgrown penguin?")
123 Tux:says(_"I'm a Linarian.")
124 Npc:says(_"Oh, I vaguely remember reading something about Linarian biology back in my university days...")
125 Npc:says(_"Wait... did you come from outside of town?")
126 Tux:says(_"Yes, I had to fight my way here through a bunch of bots.")
127 Npc:says(_"Oh my!")
128 Npc:says(_"Well, I should be able to heal you if you get hurt.")
129 if (Tux:has_quest("Bender's problem")) then
130 show("node2")
131 end
132 Npc:set_name("Doc Moore - Medic")
133 hide("node0") show("node1", "node3", "node10")
134 end,
135 },
136 {
137 id = "node1",
138 text = _"Do you also sell medical equipment?",
139 code = function()
140 Npc:says(_"Yes. Here is what I can offer today.")
141 trade_with("DocMoore")
142 hide("node1") show("node40")
143 end,
144 },
145 {
146 id = "node2",
147 text = _"Doc, I took some of those brain enlargement pills...",
148 code = function()
149 if (DocMoore_healed_tux) then
150 Npc:says(_"Sorry, but I already gave you some medical help.")
151 Npc:says(_"To poison yourself again, that's entirely your own business and I'm not responsible.")
152 Npc:says(_"As far as I am concerned, in this town everyone gets everything equally.")
153 show("node20")
154 else
155 Npc:says(_"Oh no, not another one. Those pills are almost pure biological waste.")
156 Npc:says(_"Taking that stuff almost always equals delayed suicide.")
157 Npc:says(_"Now, take this antidote. It should remove the dangerous substances within your body.")
158 Npc:says(_"But remember, I'll only give you this help once, because you didn't know the effects.")
159 Npc:says(_"Should you take that junk again, I won't feel responsible for what happens to you any more.")
160 DocMoore_healed_tux = true
161 Tux:update_quest("Bender's problem", _"The doctor was easily fooled. I have the pills that Bender needs.")
162 Tux:add_item("Brain Enlargement Pills Antidote", 1)
163 end
164 hide("node2")
165 end,
166 },
167 {
168 id = "node3",
169 text = _"Doctor, how can I keep healthy and alive?",
170 code = function()
171 Npc:says(_"Always remember L-I-F-E") -- @TODO: how do we translate this? german "LEBEN" has 5 letters for example..
172 Npc:says(_"L - Look at your health status regularly.")
173 Npc:says(_"I - Ingest cold water if you are overheating.")
174 Npc:says(_"F - Flee if you cannot fight.")
175 Npc:says(_"E - Evacuate to the town if you cannot flee.")
176 hide("node3")
177 end,
178 },
179 {
180 id = "node10",
181 text = _"Can you fix me up?",
182 code = function()
183 Npc:says(_"Sure, as the only doctor of this slowly growing community, I take responsibility for everyone's health.")
184 if (not DocMoore_asked_self_damage) and
185 (not HF_FirmwareUpdateServer_uploaded_faulty_firmware_update) then
186 Npc:says(_"However, self-inflicted damage might be exempted from this rule in some cases...")
187 show("node11")
188 end
189 if (Tux:get_hp_ratio() == 1) then
190 Npc:says(_"You seem to be in excellent health, there is nothing I can do for you right now.")
191 else
192 Npc:says_random(_"There, it's done. You're completely fixed. You can go now.",
193 _"You need to keep better care of yourself. You're completely fixed. You can go now.")
194 Tux:heal()
195 end
196 hide("node0")
197 end,
198 },
199 {
200 id = "node11",
201 text = _"What do you mean, self-inflicted damage?",
202 code = function()
203 if (guard_follow_tux) or
204 (tux_has_joined_guard) then
205 Npc:says(_"Well, you see that Bender character on my doorstep?")
206 else
207 Npc:says(_"Well, you see that idiotic Bender character on my doorstep?")
208 end
209 Tux:says(_"What can you tell me about Bender?")
210 Npc:says(_"Bender asked my advice about some pills he saw advertised in an e-mail. I told him not to buy them.")
211 Npc:says(_"But guess what? He bought and took the stupid pills anyway, and then he came back to me to fix him.")
212 Npc:says(_"If he, or anyone, is going to completely disregard my medical advice, and then think they are going to get my medical supplies, then they are wrong.")
213 Npc:says(_"He won't get anything from me anymore. It would be unfair to the community to waste all the supplies on him, and that's my final word on that.")
214 DocMoore_asked_self_damage = true
215 hide("node11")
216 end,
217 },
218 {
219 id = "node20",
220 text = _"Doc... I really want the antidote.",
221 code = function()
222 Npc:says(_"No! I am not giving it to you. Forget about it.")
223 hide("node20") show("node21", "node30")
224 end,
225 },
226 {
227 id = "node21",
228 text = _"My patience is running out. Give me the antidote. Now.",
229 code = function()
230 Npc:says(_"No! Over my dead body.")
231 hide("node21") show("node22", "node30")
232 end,
233 },
234 {
235 id = "node22",
236 text = _"Your wish is my command!",
237 code = function()
238 Npc:says(_"Huh? What?")
239 Tux:says(_"Humans... You are so interesting. I always wanted to know exactly how much blood you have.")
240 Npc:says(_"Don't do this. Don't do this.")
241 Tux:says(_"Prepare, Doctor. The experiment begins.")
242 Npc:says(_"Don't do this! DON'T DO THIS!")
243 Npc:says(_"AAAAAAAAAAAA!")
244 Tux:says(_"Ugh. Human blood is disgusting. At least four liters. I feel sick.")
245 Npc:says(_" . . .")
246 Tux:says(_"I guess this means I get to inherit all your stuff. I hope you don't mind if I take everything?")
247 Npc:says(_" . . .")
248 Tux:says(_"Good. I am very glad not to hear a disapproval.")
249 Npc:says(_" . . .")
250 killed_docmoore = true
251 Npc:drop_dead()
252 Tux:add_item("Diet supplement",15)
253 Tux:add_item("Diet supplement",15)
254 Tux:add_item("Doc-in-a-can",10)
255 Tux:add_item("Antibiotic",10)
256 Tux:add_item("Laser Scalpel",1)
257 Tux:add_item("Doc-in-a-can",10)
258 Tux:add_item("Antibiotic",10)
259 Tux:add_item("Brain Enlargement Pills Antidote",1)
260 hide("node22", "node10", "node11", "node50", "node51", "node52", "node55", "node56", "node57")
261 end,
262 },
263 {
264 id = "node25",
265 text = _"Is Tania OK?",
266 code = function()
267 Npc:says(_"Haven't you heard of doctor-patient confidentiality?")
268 Tux:says(_"Ummm...")
269 Npc:says(_"No worries. She is fine.")
270 Tania:heal()
271 hide("node25")
272 end,
273 },
274 {
275 id = "node30",
276 text = _"Forget it. Getting the antidote is not worth the effort.",
277 code = function()
278 Npc:says(_"I am not giving it to you, and that won't change.")
279 hide("node21", "node22", "node30")
280 end,
281 },
282 {
283 id = "node40",
284 text = _"May I buy some medical equipment?",
285 code = function()
286 Npc:says(_"Sure. Here is what I can offer today.")
287 trade_with("DocMoore")
288 end,
289 },
290 {
291 id = "node42",
292 text = _"Hmm. I cannot remember.",
293 code = function()
294 Tux:says(_"I'm sorry.")
295 Npc:says(_"No problem. Thanks anyway.")
296 DocMoore_not_seen_rubber_duck_lie = true
297 hide("node42", "node43")
298 end,
299 },
300 {
301 id = "node43",
302 text = _"I think I did.",
303 echo_text = false,
304 code = function()
305 Tux:says(_"Hmm... Yellow, bright, PVC...?")
306 Tux:says(_"I think I did.")
307 Tux:says(_"Do you mean this rubber duck by any chance?")
308 Npc:says(_"Ooh, you found it.")
309 Tux:says(_"Here, take it if it's yours.")
310 Npc:says(_"Thanks.")
311 Npc:says(_"Take this healthy drink as reward.")
312 Tux:says(_"Looks.. erm... interesting...")
313 Tux:says(_"Thank you. I am sure it ... can be quite useful in some situations.")
314 Tux:add_item("Doc-in-a-can", 1)
315 Tux:del_item("Rubber duck")
316 hide("node42", "node43")
317 end,
318 },
319 {
320 id = "node50",
321 text = _"What can you tell me about Strength Pills?",
322 code = function()
323 hide("node50") next("node53")
324 end,
325 },
326 {
327 id = "node51",
328 text = _"What can you tell me about Dexterity Pills?",
329 code = function()
330 hide("node51") next("node53")
331 end,
332 },
333 {
334 id = "node52",
335 text = _"What can you tell me about Code Pills?",
336 code = function()
337 hide("node52") next("node53")
338 end,
339 },
340 {
341 id = "node53",
342 code = function()
343 Npc:says(_"Those pills are only one variant of a fantastic scientific breakthrough that happened shortly before the Great Assault.")
344 Npc:says(_"Three kinds of enhancement pills were developed. One for strength, one for dexterity and one for programming abilities.")
345 Npc:says(_"These pills work on a nanotechnological basis with small machines connecting to your muscle and nerve tissue.")
346 Npc:says(_"The machines connect together and form some inorganic artificial tissue that has been optimized for certain qualities.")
347 Npc:says(_"Since this invention only came about shortly before the Great Assault, these pills are now very rare.")
348 Npc:says(_"But if you should get them, even better, because the effects are permanent, and as far as we can tell, there aren't any side effects!")
349 hide("node53")
350 end,
351 },
352 {
353 id = "node54",
354 text = _"What can you tell me about Brain Pills?",
355 code = function()
356 if (DocMoore_healed_tux) then
357 Npc:says(_"I already warned you about those!")
358 end
359 Npc:says(_"Those pills are almost pure biological waste! They are sold to stupid ignorant gullible people. Never EVER take one.")
360 hide("node54")
361 end,
362 },
363 {
364 id = "node55",
365 text = _"What can you tell me about Diet supplements?",
366 code = function()
367 Npc:says(_"Have you tasted the army snacks that the cook, Michelangelo, has been handing out?")
368 if (Michelangelo_been_asked_for_army_snacks) then
369 Tux:says(_"Yes, those were horrible. They had a nice color though.")
370 Npc:says(_"The dye used to make that color is a known carcinogen.")
371 else
372 Tux:says(_"No, should I?")
373 Npc:says(_"Not if you can avoid it.")
374 end
375 Npc:says(_"Well, unlike the army snacks, the Diet Supplements actually have a slight nutritional benefit.")
376 Npc:says(_"After taking one, your health should improve slightly.")
377 hide("node55")
378 end,
379 },
380 {
381 id = "node56",
382 text = _"What can you tell me about Antibiotics?",
383 code = function()
384 Npc:says(_"Basically it is bottled up poison made by bacteria.")
385 Tux:says(_"And that is good for me?")
386 Npc:says(_"Yep. It kills the bacteria that want to kill you. It improves your health significantly.")
387 hide("node56")
388 end,
389 },
390 {
391 id = "node57",
392 text = _"What is a Doc-in-a-can?",
393 code = function()
394 Npc:says(_"It is a device that releases millions of short-lived nanobots that swarm all over your body inside and out repairing and fixing almost all but the most serious wounds.")
395 Tux:says(_"Wouldn't long-lived nanobots work better?")
396 Npc:says(_"They found that long-lived nanobots evolve self-replication and act like a cancer. A cancer of gray goo that eats everything.")
397 Npc:says(_"Several planets were made uninhabitable before they figured that one out.")
398 hide("node57")
399 end,
400 },
401 {
402 id = "DocMoore_post_firmware_update_firsttime",
403 text = _"Hello!",
404 code = function()
405 next("DocMoore_post_firmware_update")
406 hide("DocMoore_post_firmware_update_firsttime")
407 show("node1", "node3")
408 end,
409 },
410 {
411 id = "DocMoore_post_firmware_update",
412 text = "BUG REPORT ME! DocMoore node DocMoore_post_firmware_update",
413 echo_text = false,
414 code = function()
415 Npc:says(_"Sorry, the doctor is out- oh! It's you! How can i help you?")
416 Npc:says(_"Do you need Antibiotics? No, of course not, you look like you're in need of some radiotherapy!")
417 Tux:says(_"No, I'm fine, thank you...")
418 Npc:says(_"Are you sure? Anything for you! You're a hero!")
419 DocMoore_post_firmware_update_congrats = true
420 show("DocMoore_post_firmware_update_humble", "DocMoore_post_firmware_update_bruised")
421 hide("node2", "node11", "node20", "node21", "node22", "node30", "node10") -- hide nodes related to Bender's quest and "fix me up"
422 end,
423 },
424 { id = "DocMoore_post_firmware_update_bruised",
425 text = _"Well, now that you mentioned it, I am a little bruised.",
426 code = function()
427 Npc:says(_"Well, let's take a look at you...")
428 if (Tux:get_hp_ratio() < 0.3) then
429 Npc:says(_"Yes, I can see - you've been through some harshness.")
430 Npc:says(_"But we can fix that. Under my care, you'll be as good as new! Now take this, put it in your mouth and count to 30.")
431 --; TRANSLATORS: "mrn" = one, "tww" = two, "thow" = three + ow
432 Tux:says(_"Mrn... Tww... ThOW!")
433 Npc:says(_"Just a little shot while you were waiting!")
434 Npc:says(_"Ok, you are fixed now.")
435 Tux:says(_"Oh, thank you!")
436 Tux:heal()
437 else
438 Npc:says(_"Hmm... Yes... And here...")
439 Npc:says(_"I see. Well, a preliminary physical examination doesn't show anything very wrong, but we can't be too sure!")
440 Tux:says(_"What are you doing? Why are you putting on a glove?")
441 Npc:says(_"Calm down, I do this all the time. Now, relax your muscles...")
442 Tux:says(_"Whoa! Whoa- thanks, doc, but I'm feeling much better now! Really!")
443 Npc:says(_"Oh- well, great!")
444 Npc:says(_"Funny, they always say that...")
445 end
446 hide("DocMoore_post_firmware_update_bruised")
447 show("node10")
448 end,
449 },
450 { id = "DocMoore_post_firmware_update_humble",
451 text = _"I only did what I had to do.",
452 code = function()
453 Npc:says(_"And what no one thought could be done!")
454 --; TRANSLATORS: %s = Tux:get_player_name()
455 Npc:says(_"Listen, %s, you saved everyone's lives here - the least I could do as a doctor is to look out for yours.", Tux:get_player_name())
456 hide("DocMoore_post_firmware_update_humble")
457 end,
458 },
459 { id = "DocMoore_post_firmware_update_bender",
460 text = _"Have you heard anything from Bender?",
461 code = function()
462 Npc:says(_"Bender?")
463 Npc:says(_"Oh, him! That fool who took the brain growth pills!")
464 Tux:says(_"Yes. I guess they really should be called brain growth pills. He's still very sick. ")
465 Npc:says(_"But I can't just give him the antidote.")
466 Tux:says(_"Why not?")
467 Npc:says(_"Well, that would be unfair. It would also be unwise, and... And...")
468 Npc:says(_"Oh, darn it, why not indeed! The worst is past us! He can have all the antidote he wants. I'm in such a good mood, I haven't felt so cheerful since my first autopsy back in medical school!")
469 Tux:says(". . .")
470 Npc:says(_"Of course, I mean the celebrations that followed the autopsy. Everyone had passed the exam.")
471 Tux:says(_"Yes. Of course.")
472 Tux:end_quest("Bender's problem", _"It is done - I talked to Doc Moore, and he will happily give Bender the antidote.")
473 hide("DocMoore_post_firmware_update_bender")
474 end,
475 },
476 {
477 id = "node99",
478 text = _"See you later.",
479 code = function()
480 if (not HF_FirmwareUpdateServer_uploaded_faulty_firmware_update) then
481 Npc:says_random(_"See you later.",
482 _"Keep healthy!")
483 else
484 Npc:says_random(_"Take good care of yourself - I'm taking a vacation!",
485 _"It's a wonderful day. Thank you.")
486 end
487 end_dialog()
488 end,
489 },
490 }