Debian Codegraph @

data/storyline/act1/dialogs/Tania.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 = { "Delusional", "Lonely", "Heartbroken", "Intelligent" },
21 MARKERS = {
22 NPCID1 = "Koan",
23 NPCID2 = "SADD",
24 QUESTID1 = "Tania's Escape",
25 ITEMID1 = "Strength Pill",
26 },
27 PURPOSE = "$$NAME$$\'s entrapment is the subject of the quest $$QUESTID1$$. Tux must rush to prevent $$NPCID2$$ from attacking $$NAME$$.",
28 BACKSTORY = "$$NAME$$ is a brilliant biologist who worked in the \'Secret Area\' facility. This facility developed and produced
29 $$ITEMID1$$s. Since The Great Assault, $$NAME$$ has been living locked up in the facility. Initially, $$NAME$$ had a companion,
30 Peter, who, after consuming too many $$ITEMID1$$s, became delusional about his increased abilities and perished in an accident.",
31 RELATIONSHIP = {
32 {
33 actor = "$$NPCID1$$",
34 text = "The relationship between $$NAME$$ and $$NPCID1$$ is unclear. However, $$NAME$$ will respond badly if Tux
35 has killed him."
36 },
37 }
38 WIKI]]--
39
40 local Npc = FDrpg.get_npc()
41 local Tux = FDrpg.get_tux()
42
43 return {
44 FirstTime = function()
45 show("node0")
46 end,
47
48 EveryTime = function()
49 show("end_default")
50 if (Koan_murdered) then
51 Npc:says(_"You just killed him!")
52 Npc:says(_"How could you?")
53 Npc:says(_"You murderer!")
54 npc_faction("crazy", _"Tania - Avenging Koan")
55 end_dialog()
56 end
57
58 if (Tux:has_quest("Tania's Escape")) then
59 hide("node1", "node2", "node3", "node4", "node5", "node6", "node7", "node10", "node11", "node12", "node13", "node14", "node17", "node18", "node19", "end_default")
60 if (not Tania_position) then -- Tania hasn't moved yet - she isn't following Tux.
61 Npc:says_random(_"I long to see the surface.",
62 _"You are the most interesting hallucination yet.")
63 show("end_default")
64 if (not SACD_gunsoff) then --Guns are still on
65 hide("node27")
66 show("node28")
67 elseif (not Tania_guns_off) then --Guns are off, but you haven't told Tania yet
68 hide("node28")
69 show("node27")
70 else --Tania can escape, but you haven't decided to let her follow you yet
71 hide("node27", "node28")
72 show("node40", "node41")
73 end
74 elseif (Tania_position == "underground") then --Tania is following you, but still Underground
75 Npc:says(_"I can't wait to leave this place.")
76 show("end_underground")
77 elseif (Tania_position == "desert") then --in the Western Desert
78 if (not Tania_discussed_surface) then
79 Tania_discussed_surface = true
80 Npc:says(_"It is so very bright and hot out here.") --thirsty dialog
81 show("node45", "node46", "node47")
82 elseif (Npc:get_damage() > 10) then --skip to injury dialog
83 next("node55")
84 else
85 Npc:says_random(_"Are we there yet?",
86 _"How much longer?")
87 end
88 show("end_desert")
89 elseif (Tania_position == "bunker") then --in the Western Desert
90 show("end_desert") --TODO: Tania talks about the bunker and Koan
91 elseif (Tania_position == "town_gate") and npc_dead("Pendragon") and (not Tania_met_Pendragon) then
92 Tux:says(_"We hit town. Welcome to your new home!")
93 Npc:says(_"Thank you so much! I have dreamed to leave this underground hell.")
94 Tux:says(_"You are free to go where you like.")
95 change_obstacle_state("DesertGate-Inner", "opened")
96 Tania:teleport("W-enter-2") --Ensure that Tania is on Level 0!
97 Tania:set_state("patrol")
98 Npc:set_destination("BarPatron-Enter")
99 next("tania_enter_town")
100 -- TODO: Spencer can learn than Tux let Tania enter freely and react to it.
101 elseif (Tania_position == "town_gate") and (not Spencer_Tania_decision) then --at the Town Entrance, waiting for Spencer's OK
102 hide("node45", "node46", "node47", "node49", "node50", "node51", "node52", "node53", "node56", "node57", "node58", "node59", "end_desert")
103 if (not Tania_met_Pendragon) then
104 Tania_met_Pendragon = true
105 Tux:update_quest("Tania's Escape", _"Pendragon just stopped Tania and I at the town gate. Apparently he won't let her in, unless Spencer gives the go-ahead.")
106 Npc:says(_"It is OK. I'll wait here at the gate.")
107 end_dialog()
108 end
109 show("end_towngate")
110 elseif (Tania_position == "town_gate") then --Town Entrance then (if Doc is alive) send her DocMoore's office, else set free (send to Bar)
111 Npc:says(_"What is the news?")
112 Tux:says(_"I talked to Spencer, and he said you are welcome to enter the town.")
113 Npc:says(_"That is great news!")
114 if (Spencer_Tania_decision == "doc_moore") then
115 Tux:says(_"He said you must first get checked out by Doc Moore though.")
116 Npc:set_destination("DocPatient-Enter")
117 else -- (Spencer_Tania_decision == "free") -- DocMoore is Dead!
118 Tux:says(_"He said you are free to go where you like.")
119 Npc:set_destination("BarPatron-Enter")
120 end
121 next("tania_enter_town")
122 elseif (Tania_position == "town") then --"Tania's Escape" was a success!
123 if (Spencer_Tania_decision == "doc_moore") then --send to Bar
124 Spencer_Tania_decision = "doc_moore_free"
125 Npc:heal()
126 Npc:says(_"I have good news: the doctor says I'm healthy!")
127 Npc:says(_"Where should I go?")
128 if (Tux:done_quest("Anything but the army snacks, please!")) then
129 show("node70")
130 else
131 show("node71")
132 end
133 end
134 hide("end_towngate") -- It's possible that this node is still visible, so be sure it's hidden
135 show("end_town")
136 end
137 end
138
139 if (Tania_heal_node8) then
140 show("node8")
141 end
142 end,
143
144 {
145 id = "node0",
146 text = _"Um, hi.",
147 code = function()
148 Npc:says(_"Oh! It happened! I have been waiting for you for 3226 hours!") --@TODO use gametime (hours since game started) instead of 3226 hours ?
149 hide("node0") show("node1", "node3", "node14", "node19")
150 end,
151 },
152 {
153 id = "node1",
154 text = _"You knew I would come?",
155 code = function()
156 Npc:says(_"Of course, my little imaginary friend!")
157 hide("node1") show("node2", "node5")
158 end,
159 },
160 {
161 id = "node2",
162 text = _"Imaginary?! I am as real as you are.",
163 code = function()
164 Npc:says(_"This place is locked. Hermetically sealed and guarded by bots. So you can't possibly be anything more than the product of my imagination.")
165 Tux:says(_"But who are you?")
166 Npc:says(_"A figment of my imagination should know my name: Tania.")
167 Npc:set_name("Tania - lonely scientist")
168 hide("node2") show("node12")
169 end,
170 },
171 {
172 id = "node3",
173 text = _"Where am I?",
174 code = function()
175 Npc:says(_"In a prison, a luxurious prison. I am feeling quite lonely, as you can see. Big room, plenty of food, a waterfall behind the window...")
176 hide("node3") show("node4", "node6")
177 end,
178 },
179 {
180 id = "node4",
181 text = _"All I see through the window are ray emitters. And we are below ground level..",
182 code = function()
183 Npc:says(_"Yes, I know. But I so badly want to see the sun, the trees and the rivers... there definitely is a waterfall behind them!")
184 hide("node4")
185 end,
186 },
187 {
188 id = "node5",
189 text = _"It is dark here.",
190 code = function()
191 Npc:says(_"The main power supply is down, so only the emergency lights work. Peter tried to switch it back on, but he didn't succeed.")
192 hide("node5")
193 end,
194 },
195 {
196 id = "node6",
197 text = _"This place doesn't look like a prison.",
198 code = function()
199 Npc:says(_"In the past it was a secret lab. You heard about those strength pills? They were invented here. Other pills too, but I was working on the strength ones.")
200 hide("node6") show("node7", "node8")
201 end,
202 },
203 {
204 id = "node7",
205 text = _"Can you give me some pills then?",
206 code = function()
207 Npc:says(_"No, Peter ate them all. That killed him.")
208 Npc:says(_"*cries*")
209 Tux:says(_"They say that strength pills are absolutely safe!")
210 Npc:says(_"They are like money. Having money is good, but if you have too much, you can decide that you can do anything.")
211 Npc:says(_"Peter became not very strong, but very-very-very strong. He thought he could make an exit with his bare hands.")
212 Npc:says(_"*cries*")
213 Npc:says(_"If you go further down the corridor, you will find debris and a big stone. That is his grave.")
214 hide("node7") show("node10", "node11")
215 end,
216 },
217 {
218 id = "node8",
219 text = _"So you are a biologist? Could you heal me?",
220 code = function()
221 Npc:says(_"That would be something different from what I've done in the last months at least. Some entertainment.")
222 Npc:says_random(_"Let me take a look at that... it's nothing some nanobots couldn't take care of.... You will be all fixed up in a minute.",
223 _"You are now completely healed. You should take better care of yourself.")
224 Tux:heal()
225 Tania_heal_node8 = true
226 hide("node8")
227 end,
228 },
229 {
230 id = "node10",
231 text = _"You loved him?",
232 code = function()
233 Npc:says(_"I still do.")
234 hide("node10")
235 end,
236 },
237 {
238 id = "node11",
239 text = _"But why not go out through the door?",
240 code = function()
241 Npc:says(_"It is locked and very reliable. Even a tank would not be able to smash it! And if a door was broken, SADDs would attack, that's their program.")
242 hide("node11") show("node18")
243 end,
244 },
245 {
246 id = "node12",
247 text = _"Autoguns have made a hole in the wall. I came through this hole.",
248 code = function()
249 Npc:says(_"Do you mean I can go out to the surface?!")
250 Npc:says(_"Oh god! I - I told Peter that he chose the wrong place, but he was so stubborn!")
251 hide("node12") show("node13")
252 end,
253 },
254 {
255 id = "node13",
256 text = _"Yes, you can get to the surface. But the guns are still on.",
257 code = function()
258 Npc:says(_"All hope is lost! I'm a scientist, not a warrior.")
259 hide("node13") show("node15")
260 end,
261 },
262 {
263 id = "node14",
264 text = _"It is strange to see a girl in such a beautiful dress here.",
265 code = function()
266 Npc:says(_"I'm going to spend all my life here! So forgive me for some little indulgences.")
267 hide("node14")
268 end,
269 },
270 {
271 id = "node15",
272 text = _"Maybe is it possible to disable the guns?",
273 code = function()
274 Npc:says(_"Theoretically yes, but in practice I'm not sure you would be able to do that.")
275 hide("node15") show("node16")
276 end,
277 },
278 {
279 id = "node16",
280 text = _"How can I disable the guns?",
281 code = function()
282 Npc:says(_"Somewhere in a distant part of the lab should be an SACD - Secret Area Control Datacenter. It controls all the defense systems in the base. If you manage to get to it, you would be able to control the base. However, it's very hard to find and get to the SACD.")
283 hide("node16") show("node17")
284 end,
285 },
286 {
287 id = "node17",
288 text = _"I will disable the guns for you.",
289 code = function()
290 Npc:says(_"Thanks... please be careful. You will not be able to access the control center directly, it is behind a triple hermetic door. Try using the service tunnels.")
291 Tux:add_quest("Tania's Escape", _"I have met a girl locked in a secret area. If I manage to disable the autoguns, she will be able to go to the surface and look at the sun again.")
292 Npc:says(_"It's dangerous to go alone! Take this!")
293 if (difficulty("easy")) and
294 (not Tania_mapper_given == true) then
295 Tux:add_item("Source Book of Network Mapper")
296 Tania_mapper_given = true
297 end
298 Tux:add_item("EMP Shockwave Generator", 5)
299 hide("node17")
300 end,
301 },
302 {
303 id = "node18",
304 text = _"Why not just open them? There should be a way of unlocking the base.",
305 code = function()
306 Npc:says(_"To open the door you need to know the password. Only the commander of the area and his deputy knew it. The commander was killed by bots as soon as the assault started, and the deputy was in town, I don't know what happened to him.")
307 hide("node18")
308 end,
309 },
310 {
311 id = "node19",
312 text = _"Carpets, sofa, bookshelves. Where did you get all this?",
313 code = function()
314 Npc:says(_"Peter did all he could to make this room comfortable. The sofa and armchair are from the commander's cabinet, the books are from the lounge...")
315 hide("node19")
316 end,
317 },
318 {
319 id = "node27",
320 text = _"The sentry guns are off. You can go now!",
321 code = function()
322 Npc:says(_"Thanks, thanks a lot! Now I will be able to see the sun, the trees and the rivers... I missed them so much!")
323 Npc:says(_"I hope these books will help you.")
324 display_big_message(_"Tania is now free!")
325 Tux:add_xp(1500)
326 if (difficulty("normal")) and
327 (not Tania_mapper_given == true) then
328 Tux:add_item("Source Book of Network Mapper")
329 Tania_mapper_given = true
330 end
331 Tux:add_item("Source Book of Check system integrity",1)
332 Tux:add_item("Source Book of Sanctuary",1)
333 Tux:update_quest("Tania's Escape", _"Tania is free now, I got some books as a reward.")
334 Tux:says(_"You could always come back with me to the town. There are people there.")
335 Npc:says(_"I'd love to, but you'll have to escort me.")
336 Tania_guns_off = true
337 hide("node27") show("node40", "node41")
338 end,
339 },
340 {
341 id = "node28",
342 text = _"Where can I find that SACD?",
343 code = function()
344 Npc:says(_"To the right from the entrance of the area, there is a hall. In the south part of this hall you will find a triple hermetic door. The control center is behind that door. But it is locked, so you will have to find another way there. The cable collectors may help you.")
345 hide("node28")
346 end,
347 },
348 {
349 id = "node40",
350 text = _"I'm not ready to escort you to the town.",
351 code = function()
352 next("end_default")
353 end,
354 },
355 {
356 id = "node41",
357 text = _"I'm ready to escort you to the town.",
358 code = function()
359 Tania_position = "underground"
360 Tux:update_quest("Tania's Escape", _"I have agreed to escort Tania to the town. Once I'm there, I'll introduce her to Spencer.")
361 Npc:set_state("follow_tux")
362 hide("node8", "node40", "node41") next("end_underground")
363 end,
364 },
365 {
366 id = "node45",
367 text = _"It isn't all like this, the town is very nice.",
368 code = function()
369 hide("node45", "node46", "node47") next("node48")
370 end,
371 },
372 {
373 id = "node46",
374 text = _"I got lost in this desert once.",
375 code = function()
376 hide("node45", "node46", "node47") next("node48")
377 end,
378 },
379 {
380 id = "node47",
381 text = _"It must be hard adjusting to the bright sunlight.",
382 code = function()
383 Npc:says(_"I was underground for so long.")
384 Npc:says(_"It is all so bright on my eyes.")
385 hide("node45", "node46", "node47") next("node48")
386 end,
387 },
388 {
389 id = "node48",
390 code = function()
391 number_of_liquid_items = 0
392 if (Tux:has_item_backpack("Bottled ice")) then
393 number_of_liquid_items = number_of_liquid_items + 1
394 show("node49")
395 end
396 if (Tux:has_item_backpack("Industrial coolant")) then
397 number_of_liquid_items = number_of_liquid_items + 1
398 show("node50")
399 end
400 if (Tux:has_item_backpack("Liquid nitrogen")) then
401 number_of_liquid_items = number_of_liquid_items + 1
402 show("node51")
403 end
404 if (Tux:has_item_backpack("Barf's Energy Drink")) then
405 number_of_liquid_items = number_of_liquid_items + 1
406 show("node52")
407 end
408 if (number_of_liquid_items > 0) then
409 Npc:says(_"I hope we get there soon. I'm very thirsty.")
410 else
411 next("node54")
412 end
413 show("node53")
414 end,
415 },
416 {
417 id = "node49",
418 text = _"Would you like some bottled ice?",
419 code = function()
420 Npc:says(_"Thank you very much.")
421 Npc:says(_"I feel very refreshed!")
422 Npc:heal()
423 Tux:del_item_backpack("Bottled ice")
424 Tux:update_quest("Tania's Escape", _"Tania wasn't prepared for the desert heat. I gave her some bottled ice, and she looked much more healthy.")
425 hide("node49", "node50", "node51", "node52", "node53")
426 end,
427 },
428 {
429 id = "node50",
430 text = _"I have some industrial coolant you could have.",
431 code = function()
432 Npc:says(_"I can't drink this.")
433 if Tux:has_met("Ewald") then
434 Tux:says(_"I've seen the town bartender put it in drinks.")
435 Npc:says(_"I guess I'll give it a try then.")
436 Tux:del_item_backpack("Industrial coolant")
437 Npc:heal()
438 Npc:says(_"I feel very cold, but better.") --TODO: freeze her here
439 Tux:update_quest("Tania's Escape", _"Tania wasn't prepared for the desert heat. I gave her some Industrial coolant. At first, she was hesitant, but she tried it.")
440 hide("node49", "node50", "node52", "node53")
441 else
442 next("node54")
443 end
444 hide("node51")
445 end,
446 },
447 {
448 id = "node51",
449 text = _"Can I offer you some liquid nitrogen?",
450 code = function()
451 Npc:says(_"I can't drink this.")
452 next("node54") hide("node51")
453 end,
454 },
455 {
456 id = "node52",
457 text = _"You could have a bottle of Barf's Energy Drink if you are thirsty?",
458 code = function()
459 Npc:says(_"Thank you very much.")
460 Npc:says(_"I feel very energetic!")
461 Npc:heal()
462 Tux:del_item_backpack("Barf's Energy Drink")
463 Tux:update_quest("Tania's Escape", _"Tania wasn't prepared for the desert heat. I gave her a bottle of Barf's Energy Drink. After downing it in a couple seconds, she looked much more energetic!")
464 hide("node49", "node50", "node51", "node52", "node53")
465 end,
466 },
467 {
468 --THIS WILL BE A LIE
469 id = "node53",
470 text = _"Sorry, I have nothing to offer you.",
471 code = function()
472 Npc:says(_"I feel very ill.")
473 Tux:update_quest("Tania's Escape", _"Tania wasn't prepared for the desert heat, but I decided not to share any of my liquids with her.")
474 Npc:drop_dead()
475 hide("node49", "node50", "node51", "node52", "node53")
476 end,
477 },
478 {
479 id = "node54",
480 code = function()
481 number_of_liquid_items = number_of_liquid_items - 1
482 if (number_of_liquid_items < 1) then
483 if (Npc:get_damage() > 10) then
484 next("node55")
485 else
486 Npc:says(_"I feel a little faint, but I think I will survive.")
487 end
488 hide("node53")
489 end
490 end,
491 },
492 {
493 id = "node55",
494 code = function()
495 injured_level = 0
496 if (Npc:get_damage() > 10) then
497 Npc:says(_"I am injured!")
498 injured_level = 1
499 elseif (Npc:get_damage() > 40) then
500 Npc:says(_"I am badly injured!")
501 injured_level = 2
502 elseif (Npc:get_damage() > 60) then
503 Npc:says(_"I am seriously injured!")
504 injured_level = 3
505 end
506
507 if (Tux:has_item_backpack("Doc-in-a-can")) then
508 show("node59")
509 end
510 if (Tux:has_item_backpack("Antibiotic") and
511 (injured_level < 3)) then
512 show("node58")
513 end
514 if (Tux:has_item_backpack("Diet supplement") and
515 (injured_level < 2)) then
516 show("node57")
517 end
518 show("node56")
519 end,
520 },
521 {
522 id = "node56",
523 text = _"There is nothing I can do about your injuries right now.",
524 code = function()
525 Npc:says(_"I hope we get to the town soon.")
526 hide("node56", "node57", "node58", "node59")
527 end,
528 },
529 {
530 id = "node57",
531 text = _"Here, take this Diet supplement.",
532 code = function()
533 Npc:says(_"I feel better now.")
534 Tux:del_item_backpack("Diet supplement")
535 Npc:heal()
536 hide("node56", "node57", "node58", "node59")
537 end,
538 },
539 {
540 id = "node58",
541 text = _"I'm prescribing you some antibiotics.",
542 code = function()
543 Npc:says(_"I feel much better.")
544 Tux:del_item_backpack("Antibiotic")
545 Npc:heal()
546 hide("node56", "node57", "node58", "node59")
547 end,
548 },
549 {
550 id = "node59",
551 text = _"I have a Doc-in-a-can. It should heal you right up.",
552 code = function()
553 Npc:says(_"I feel fit as new!")
554 Tux:del_item_backpack("Doc-in-a-can")
555 Npc:heal()
556 hide("node56", "node57", "node58", "node59")
557 end,
558 },
559 {
560 id = "tania_enter_town",
561 code = function()
562 Tania_position = "town"
563 Tux:end_quest("Tania's Escape", _"I successfully brought Tania safely to the town. I hope she likes it here.")
564 if (difficulty("hard")) and
565 (not Tania_mapper_given == true) then
566 Npc:says(_"I'm so glad that I am finally here, take this.")
567 Tux:add_item("Source Book of Network Mapper")
568 Tania_mapper_given = true
569 end
570 if (not npc_dead("Pendragon")) then
571 start_chat("Pendragon")
572 end
573 end_dialog()
574 end,
575 },
576 {
577 id = "node70",
578 text = _"I think you would enjoy some of Michelangelo's cooking at the restaurant.",
579 code = function()
580 Npc:set_destination("BarPatron-Enter")
581 Tania_at_Ewalds_Bar = true
582 Npc:says(_"It has been so long since I've had a nice meal.")
583 hide("node70")
584 end,
585 },
586 {
587 id = "node71",
588 text = _"You might try the bar. But stay away from the food. It is horrible.",
589 code = function()
590 Npc:set_destination("BarPatron-Enter")
591 Tania_at_Ewalds_Bar = true
592 Npc:says(_"I really miss good food, especially lemon meringue pie.")
593 Npc:says(_"Oh well.")
594 hide("node71")
595 end,
596 },
597 {
598 --Pre-"Tania's Escape" Quest
599 id = "end_default",
600 text = _"I think I have to go.",
601 code = function()
602 Npc:says_random(_"That's OK. But please, please, come back. I'm so lonely.",
603 _"Please come back again and get me out of here.")
604 hide("end_default") end_dialog()
605 end,
606 },
607 {
608 --"Tania's Escape" Quest (Underground)
609 id = "end_underground",
610 text = _"Follow me to the Surface!",
611 code = function()
612 Npc:says(_"Lead on, my little penguin.")
613 hide("end_underground") end_dialog()
614 end,
615 },
616 {
617 --"Tania's Escape" Quest (Western Desert)
618 id = "end_desert",
619 text = _"Follow me to the Town!",
620 code = function()
621 Npc:says(_"Lead on, my little penguin.")
622 hide("end_desert") end_dialog()
623 end,
624 },
625 {
626 --"Tania's Escape" Quest (Western Town Gate)
627 id = "end_towngate",
628 text = _"Wait here.",
629 code = function()
630 Npc:says(_"OK. But please, come back soon.")
631 hide("end_towngate") end_dialog()
632 end,
633 },
634 {
635 --"Tania's Escape" Quest (Western Town Gate to Doctor's Office)
636 id = "end_town",
637 text = _"See you later.",
638 code = function()
639 Npc:says_random(_"Please stay safe!",
640 _"Thanks again.",
641 _"Please come back again, my little penguin.")
642 hide("end_town") end_dialog()
643 end,
644 },
645 }