Debian Codegraph @

data/storyline/act1/dialogs/WillGapes.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 = { "Paranoid", "Fearful" },
21 MARKERS = { QUESTID1 = "Propagating a faulty firmware update" },
22 PURPOSE = "$$NAME$$ aids Tux in the $$QUESTID1$$ quest by providing the means for Tux to access the Mega Systems factory.",
23 BACKSTORY = "$$NAME$$ helped start the Mega Systems company and was the chief software architect prior to The Great Assault.
24 $$NAME$$ has been living in an isolated bunker since The Great Assault and is unaware of other survivors. He has insight
25 into how The Great Assault may have started."
26 WIKI]]--
27
28 local Npc = FDrpg.get_npc()
29 local Tux = FDrpg.get_tux()
30
31 return {
32 EveryTime = function()
33 if (not Tux:has_met("WillGapes")) then
34 Npc:says(_"Don't come any closer! Or I'll turn you into scrap metal!")
35 Npc:says(_"Wait... You're not a robot. Who are you? What are you doing here?")
36 show("node1", "node2", "node3")
37 elseif (Tux:has_quest("Gapes Gluttony")) and
38 (not Tux:done_quest("Gapes Gluttony")) then
39 if (Tux:has_item_backpack("Lunch in a Picnic Basket")) then
40 Tux:del_item_backpack("Lunch in a Picnic Basket")
41 show("node9")
42 else
43 Npc:says(_"Have you brought me some food?")
44 Tux:says(_"No, not yet.")
45 Npc:says(_"Hurry... I'm starting to feel weak.")
46 end
47 elseif (WillGapes_generous) and
48 (Tux:get_hp() < 20) then
49 Npc:says(_"Hey, are you all right? It looks like the robots are winning.")
50 Npc:says(_"I found this in the First Aid kit. Maybe it will help.")
51 Tux:add_item("Antibiotic")
52 WillGapes_generous = false
53 else
54 Npc:says(_"I see you're still alive. Maybe the robots won't win after all.")
55 if (HF_FirmwareUpdateServer_uploaded_faulty_firmware_update) then
56 if (not Gapes_Uploaded_firmware) then
57 Tux:says(_"I killed all bots, you can go outside now.")
58 Npc:says(_"It's impossible. The bots are after me! I must stay here!")
59 Tux:says(_"...Okay, but when you feel hungry, do leave and visit the town. You can find food there.")
60 Npc:says(_"*stomach growls*")
61 Npc:says(_"I'm not hungry! I swear!")
62 Gapes_Uploaded_firmware=true
63 else
64 Npc:says(_"*stomach growls*")
65 Npc:says(_"I'm not hungry yet! Nothing will make me leave this little fortress!", "NO_WAIT")
66 end
67 end
68 end
69 show("node99")
70 end,
71
72 {
73 id = "node1",
74 text = _"A friend...",
75 code = function()
76 --; TRANSLATORS: %s = Tux:get_player_name()
77 Tux:says(_"My name is %s, and I'm here to stop the robots!", Tux:get_player_name())
78 Npc:says(_"Stop them!? You can't. It's too late. The robots have killed everyone.")
79 hide("node1", "node2", "node3") show("node4", "node5", "node6")
80 end,
81 },
82 {
83 id = "node2",
84 text = _"I am Luke Skywalker, a Jedi Knight, and I'm here to save you!",
85 code = function()
86 Npc:says(_"Huh? Am I dreaming?")
87 Tux:says(_"Sorry, I've always wanted to say that.")
88 Npc:says(_"Who are you really?")
89 next("node1")
90 end,
91 },
92 {
93 id = "node3",
94 text = _"Your worst nightmare! I'm here to punish you for your crimes against humanity.",
95 code = function()
96 Npc:says(_"Wait, Stop! I'm worth billions of circuits... I'll give you anything. Just don't kill me!")
97 Npc:says(_"Who are you really?")
98 next("node1")
99 end,
100 },
101 {
102 id = "node4",
103 text = _"There are still some alive in the town.",
104 code = function()
105 Npc:says(_"Ha, they won't last long. The robots will destroy them all. It's hopeless!")
106 hide("node4")
107 end,
108 },
109 {
110 id = "node5",
111 text = _"But you're still alive?",
112 code = function()
113 Npc:says(_"Barely, all I've had to eat for the past few months were energy bars from the snack machine.")
114 Npc:says(_"Now all that's left are military rations, and I would rather starve than eat those!")
115 hide("node5") show("node7")
116 end,
117 },
118 {
119 id = "node6",
120 text = _"Who are you?",
121 code = function()
122 Npc:says(_"My name is Will Gapes. I'm the chief software architect for MegaSys. I helped start the company.")
123 Npc:says(_"Without my help this company would still be learning BASIC!")
124 Npc:set_name("Will Gapes - MegaSys CSA")
125 hide("node6") show("node8")
126 end,
127 },
128 {
129 id = "node7",
130 text = _"Maybe I could find you some food?",
131 code = function()
132 Npc:says(_"If you bring me a well-cooked meal, I will tell you about Hell's Fortress.")
133 Npc:says(_"Trust me, you won't survive long in there without my help.")
134 Tux:add_quest("Gapes Gluttony", _"I found a man who is starving. He is willing to tell me about Hell's Fortress if I will bring him some food. I should speak to Michelangelo about this.")
135 hide("node7")
136 end,
137 },
138 {
139 id = "node8",
140 text = _"So these murderous robots are your creation?",
141 code = function()
142 Npc:says(_"NO! It was the company's fault!")
143 Npc:says(_"I told them the upgrade wasn't ready. It hadn't been fully tested.")
144 Npc:says(_"They wouldn't listen to me. They called me a fool! ME!?")
145 Npc:says(_"Now they are all dead. Serves them right too!")
146 hide("node8")
147 end,
148 },
149 {
150 id = "node9",
151 text = _"I've brought you some food.",
152 code = function()
153 Npc:says(_"It's about time! I'm starving.")
154 Npc:says(_"Oh, this is delicious!")
155 Npc:says(_"[b]om nom nom[/b]")
156 Tux:says(_"Um...You're welcome?")
157 Npc:says(_"...")
158 Tux:says(_"Now, how about some information?")
159 Npc:says(_"OK, so what do you want to know?")
160 Tux:end_quest("Gapes Gluttony", _"I brought the full picnic basket to Gapes, and he tore into it like a wild animal. It was a disgusting sight, but thankfully it ended quickly.")
161 Tux:del_item_backpack("Lunch in a Picnic Basket")
162 Tux:add_item("Empty Picnic Basket")
163 WillGapes_generous = true
164 hide("node9") show("node11", "node12")
165 end,
166 },
167 {
168 id = "node11",
169 text = _"Tell me about this upgrade. Is that why all the robots are killing people?",
170 code = function()
171 Npc:says(_"I'm afraid so... It wasn't finished yet.")
172 Npc:says(_"The upgrade was supposed to revolutionize the world, but instead, it seems to have destroyed it.")
173 hide("node11")
174 end,
175 },
176 {
177 id = "node12",
178 text = _"How can I shut down the factory?",
179 code = function()
180 Npc:says(_"You must deactivate the energy supply.")
181 Npc:says(_"But the robots have sealed the doors shut.")
182 hide("node12") show("node13")
183 end,
184 },
185 {
186 id = "node13",
187 text = _"Is there another way to get in?",
188 code = function()
189 Npc:says(_"You might be able to get guest access.")
190 Npc:says(_"It was created to give clearance to the tourists when the factory was first built.")
191 Npc:says(_"Because the program hasn't been used in years, maybe the robots haven't disabled it.")
192 Npc:says(_"But you will have to find some other way into the headquarters. Guests were never given clearance.")
193 Npc:says(_"However, owners are.")
194 Npc:says(_"I guess that is all this otherwise worthless piece of paper is useful for anymore.")
195 Tux:says(_"Paper?")
196 Npc:says(_"Sheet of cellulose.")
197 Npc:says(_"Here, take it.")
198 Tux:add_item("MS Stock Certificate", 1)
199 Tux:update_quest("Propagating a faulty firmware update", _"Will Gapes gave me his MS Stock Certificate so that I can gain access to the MegaSys Factory.")
200 hide("node13")
201 end,
202 },
203 {
204 id = "node99",
205 text = _"I'll be going then.",
206 code = function()
207 Npc:says(_"Be careful!")
208 end_dialog()
209 end,
210 },
211 }