Debian Codegraph @

data/storyline/act1/dialogs/Benjamin.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 = { "Militaristic", "Jovial", "Intelligent" },
21 PURPOSE = "$$NAME$$ helps improve Tux's abilities",
22 BACKSTORY = "$$NAME$$ is the Red Guard\'s weapons expert and armourer."
23 WIKI]]--
24
25 local Npc = FDrpg.get_npc()
26 local Tux = FDrpg.get_tux()
27
28 return {
29 FirstTime = function()
30 show("node0")
31 Benjamin_objective="None"
32 end,
33
34 EveryTime = function()
35 if (Tux:has_met("Benjamin")) then
36 Tux:says_random(_"Hello.",
37 _"Greetings Master Benjamin.")
38 Npc:says_random(_"Well, hello again.",
39 _"Hello hello.",
40 _"Welcome back.")
41 if (Tux:has_item_equipped("The Super Exterminator!!!") or
42 Tux:has_item_equipped("Exterminator")) then
43 Npc:says(_"You are using a fine weapon. I wonder where you found it?")
44 -- After all, if there is something I am sure of, is that Spencer would never give you one.
45 end
46 end
47 show("node99")
48 end,
49
50 {
51 id = "node0",
52 text = _"Hello!",
53 code = function()
54 Npc:says(_"Ah, so you are the new member. Welcome. My name is Benjamin, and I take care of our ranged weaponry here in the citadel.")
55 Npc:set_name("Benjamin - Gunsmith")
56 hide("node0") show("node1", "node20", "node30")
57 end,
58 },
59 {
60 id = "node1",
61 text = _"What are you doing here alone?",
62 code = function()
63 Npc:says(_"I'm experimenting with new designs. I want to redesign the laser pistol.")
64 Npc:says(_"A lot of energy is wasted somewhere during firing, and I have no idea where. If I could find the source of the problem, the gun would become much more powerful.")
65 Npc:says(_"So far all my prototypes have failed. Mostly overheating and jamming. Sometimes I wonder if I am doing something wrong.")
66 hide("node1") show("node3", "node4", "node5")
67 end,
68 },
69 {
70 id = "node3",
71 text = _"Did you think about somehow gathering the excess heat and using it to make the beam stronger?",
72 code = function()
73 Npc:says(_"Hmm... There might be something in that idea. I will think about it.")
74 Benjamin_objective = "damage"
75 hide("node3", "node4", "node5")
76 end,
77 },
78 {
79 id = "node4",
80 text = _"If I were you, I would focus my work on the firing rate.",
81 code = function()
82 Npc:says(_"Hmm... I will think about it. Hmm...")
83 Benjamin_objective = "firing"
84 hide("node3", "node4", "node5")
85 end,
86 },
87 {
88 id = "node5",
89 text = _"You know, laser pistols are not a very promising weapon. I think you should work on something different.",
90 code = function()
91 Npc:says(_"Yeah, maybe you are right. I will think about it.")
92 Benjamin_objective = "plasma"
93 hide("node3", "node4", "node5")
94 end,
95 },
96 {
97 id = "node20",
98 text = _"Can you teach me how to properly use rifles and guns?",
99 code = function()
100 if (Tux:get_skill("ranged") == 0) then
101 Npc:says(_"If anyone in this town knows more about guns than me, then my name's not Benjamin.", "NO_WAIT")
102 Npc:says(_"Of course, I will need compensation for the ammunition spent in the training and for my time.")
103 Npc:says(_"Say... A hundred circuits should be enough for a beginner lesson.")
104 Npc:says(_"Interested?")
105 show("node21")
106 elseif (Tux:get_skill("ranged") == 1) then
107 Npc:says(_"Oh, you are ready for some more training?", "NO_WAIT")
108 Npc:says(_"It will of course cost a bit more money as well as mental focus on your part.")
109 Npc:says(_"It will take you two hundred circuits and double the effort on your part to become a true apprentice.")
110 Npc:says(_"Interested?")
111 show("node22")
112 elseif (Tux:get_skill("ranged") == 2) then
113 Npc:says(_"I see you have taken a liking to guns.", "NO_WAIT")
114 Npc:says(_"But the next step will cost even more money and require the mental focus equalling all your previous training.")
115 Npc:says(_"Interested?")
116 show("node23")
117 elseif (Tux:get_skill("ranged") == 3) then
118 Npc:says(_"To become an expert with firearms, you need ridiculous amounts of training.", "NO_WAIT")
119 Npc:says(_"It will cost you 400 valuable circuits and an awful lot of mental focusing on the task.")
120 Npc:says(_"Interested?")
121 show("node24")
122 elseif (Tux:get_skill("ranged") == 4) then
123 Npc:says(_"Oh, you want to become a real master with shooters, just like me?", "NO_WAIT")
124 Npc:says(_"It will of course cost a fair bit of cold, hard circuits as well. 500, to be precise.")
125 Npc:says(_"Interested?")
126 show("node25")
127 else
128 Npc:says(_"Sorry, there is no human alive that could give you further training.")
129 end
130 hide("node20")
131 end,
132 },
133 {
134 id = "node21",
135 text = _"Sign up for a course in improving my ranged weapons skill. (costs 100 circuits, 3 training points)",
136 echo_text = false,
137 code = function()
138 Tux:says(_"Yes, I'd like some basic training in ranged combat.")
139 cost = 100
140 if Tux:train_skill(cost, 3, "ranged") then
141 Npc:says(_"Suits me well enough, I'm not busy at the moment anyway.")
142 Npc:says(_"Now, the most important thing is that you turn off the auto-aim on your weapon, like this.", "NO_WAIT")
143 Npc:says(_"Otherwise your weapon might 'help' you and shoot somewhere you didn't intend to fire.")
144 Npc:says(_"The next important thing is to remember how to properly fire a shot.", "NO_WAIT")
145 Npc:says(_"Watch your target closely. Pretend you're moving with it. Aim for the head.")
146 Npc:says(_"When you feel completely in sync with your target, then you pull the trigger.", "NO_WAIT")
147 Npc:says(_"Good. You are learning quickly. Try it a few more times.")
148 Npc:says(_"Okay, I think that it is enough for today.")
149 hide("node21") show("node20")
150 else
151 if (Tux:get_gold() < cost ) then next("node27") else next("node28") end
152 end
153 end,
154 },
155 {
156 id = "node22",
157 text = _"Yes, I want even more training. (costs 200 circuits, 6 training points)",
158 echo_text = false,
159 code = function()
160 Tux:says(_"So let's start the second course?")
161 cost = 200
162 if Tux:train_skill(cost, 6, "ranged") then
163 Npc:says(_"Very well.")
164 Npc:says(_"You must remain calm whilst shooting.", "NO_WAIT")
165 Npc:says(_"Try breathing out as you pull the trigger, and squeeze it gently rather than jerking it.")
166 Npc:says(_"That's right. You will find yourself hitting the target much more often now.")
167 hide("node22") show("node20")
168 else
169 if (Tux:get_gold() < cost ) then next("node27") else next("node28") end
170 end
171 end,
172 },
173 {
174 id = "node23",
175 text = _"I'm eager for more training. (costs 300 circuits, 9 training points)",
176 echo_text = false,
177 code = function()
178 Tux:says(_"So can you help me become even better with guns?")
179 cost = 300
180 if Tux:train_skill(cost, 9, "ranged") then
181 Npc:says(_"Of course.")
182 Npc:says(_"Next lesson: hitting a moving target.")
183 Npc:says(_"It's pretty simple really, just watch to see where it is going and then aim slightly ahead if you are using a non-laser gun.")
184 Npc:says(_"It's easy when you know how, especially with bots, because they tend to move in straight lines, not bob and weave like people.")
185 Npc:says(_"I think that it is enough training for now. Next time, firing on the move!")
186 hide("node23") show("node20")
187 else
188 if (Tux:get_gold() < cost ) then next("node27") else next("node28") end
189 end
190 end,
191 },
192 {
193 id = "node24",
194 text = _"Yes, I wish to train some more. (costs 400 circuits, 12 training points)",
195 echo_text = false,
196 code = function()
197 Tux:says(_"I'd like to learn how to be a crack shot.")
198 cost = 400
199 if Tux:train_skill(cost, 12, "ranged") then
200 Npc:says(_"Firing on the move is difficult, but can make survival much more likely!")
201 Npc:says(_"The secret is to keep your weapon steadily but loosely, so that it isn't jarred.")
202 Npc:says(_"Oh yes, and be careful of your footing. You should be looking where you are firing, not where you are stepping.")
203 Npc:says(_"Keep practising and you will get the hang of it eventually.")
204 hide("node24") show("node20")
205 else
206 if (Tux:get_gold() < cost ) then next("node27") else next("node28") end
207 end
208 end,
209 },
210 {
211 id = "node25",
212 text = _"I want to become a master in ranged combat. (costs 500 circuits, 15 training points)",
213 echo_text = false,
214 code = function()
215 Tux:says(_"Teach me how to be at one with my weapon.")
216 cost = 500
217 if Tux:train_skill(cost, 15, "ranged") then
218 Npc:says(_"The ultimate secret to becoming a master in ranged combat is something you should value.")
219 Npc:says(_"I don't tell everyone this, so keep it to yourself, all right?")
220 Npc:says(_"To become a master in ranged combat you need to...")
221 Npc:says(_"...practise. A lot.")
222 Npc:says(_"Go ahead and use my firing range as much as you need.")
223 hide("node25") show("node20")
224 else
225 if (Tux:get_gold() < cost ) then next("node27") else next("node28") end
226 end
227 end,
228 },
229 {
230 id = "node27",
231 code = function()
232 Npc:says_random(_"You need more circuits.",
233 _"Please don't bother me if you can't pay me.",
234 _"I need cash to defray the costs of the ammo used in training.",
235 _"I repeat, you need to bring enough to pay for the practice targets you destroy, and for my time.",
236 _"You don't have enough money! I cannot afford to just give away training for free.",
237 _"Come back when you have enough circuits.",
238 _"So come back when you have something of value.")
239 end,
240 },
241 {
242 id = "node28",
243 code = function()
244 Npc:says_random(_"You are not ready. Go kill some bots and come back.",
245 _"Come back when you are mentally prepared to learn.",
246 _"Come back after some more practice in the field.",
247 _"Only a well prepared mind is open to the ultimate in ranged combat secrets.",
248 _"Waving those circuits in front of me when you are too unfocused to train won't help. I can take your money, but you won't learn anything.",
249 _"I don't think you have enough experience for this. Come back after you see some more action.",
250 _"Come back when you have a real will to learn.",
251 _"You don't have enough experience. Come here after you see some more action.")
252 end,
253 },
254 {
255 id = "node30",
256 text = _"What weapons are available to the members of the Red Guard?",
257 code = function()
258 Npc:says(_"Well, for novice members there are simple laser and plasma pistols. They have their share of problems, but they do the trick nine times out of ten.")
259 Npc:says(_"For bigger bots we have bigger guns. The exterminator is the best weapon that we have. We hand them out only in case of an emergency, or to highly experienced people.")
260 hide("node30") show("node31", "node32", "node33")
261 end,
262 },
263 {
264 id = "node31",
265 text = _"Plasma sounds deadly.",
266 code = function()
267 Npc:says(_"It is!", "NO_WAIT")
268 Npc:says(_"While many people find the ammunition canisters too big, and the bullets too slow, they cannot deny that once plasma hits, it leaves big holes.")
269 Npc:says(_"Plasma is matter, ionized gas to be exact. It also happens to be hot enough to make steel boil.")
270 Npc:says(_"Most of the new recruits hate how hard this weapon is to aim. If bullets were animals, then plasma would be a well fed cow. By the time it arrives at the target, the bot is already a mile away.")
271 Npc:says(_"If you are going to use plasma weapons you need to remember one thing: Don't let the weapon get damaged.")
272 Npc:says(_"Even though our armor is designed to resist high temperatures, once the plasma containment module goes, you will die, along with anything within ten meters of you.")
273 Npc:says(_"Because of all those drawbacks, plasma weapons are not too popular. Quite a pity, they have great potential.")
274 hide("node31")
275 end,
276 },
277 {
278 id = "node32",
279 text = _"Tell me more about laser weapons.",
280 code = function()
281 Npc:says(_"Laser is an acronym for Light Amplification by Stimulated Emission of Radiation.")
282 Npc:says(_"Laser is the technology employed in most of our weaponry. It uses a focused light beam to cause damage.")
283 Npc:says(_"Because the beam is composed out of light, it travels REALLY fast, at the speed of light, so to say. It is also not affected by gravity or wind, which makes aiming easier.")
284 Npc:says(_"However, other than being a good training tool for newbies, that design just fails to deliver.")
285 Npc:says(_"The shots tend to be underpowered, the gun takes a long while to power up for a shot, and it can overheat during intense combat.")
286 Npc:says(_"This is why I am trying to improve it, but so far I have had no success. I'm feeling pretty discouraged about it.")
287 hide("node32")
288 end,
289 },
290 {
291 id = "node33",
292 text = _"I am curious about the exterminator.",
293 code = function()
294 Npc:says(_"Sorry, but that is classified and confidential. I have said too much already.")
295 hide("node33") show("node40")
296 end,
297 },
298 {
299 id = "node40",
300 text = _"I will make it worth your while...",
301 code = function()
302 Npc:says(_"Intriguing.")
303 Npc:says(_"Fifty circuits per bit of information.", "NO_WAIT")
304 Npc:says(_"So... What do you exactly want to know?")
305 hide("node40") show("node41", "node46", "node47", "node51", "node69")
306 end,
307 },
308 {
309 id = "node41",
310 text = _"How many exterminators does the Red Guard have?",
311 code = function()
312 if (Tux:del_gold(50)) then
313 Npc:says(_"It might come as a surprise to you, but we don't have many. A little over twenty, last time I checked.", "NO_WAIT")
314 Npc:says(_"Thankfully, as you can clearly see, it's more than enough to keep all the cursed bots away.")
315 hide("node41") show("node44")
316 else
317 next("node43")
318 end
319 end,
320 },
321 {
322 id = "node43",
323 text = _"Well, I am a bit short on circuits right now...",
324 code = function()
325 Npc:says(_"Linarian, I thought we had an agreement. Fifty per infobit. My silence can be only broken with currency, so if you want to know, you have to pay.", "NO_WAIT")
326 Npc:says(_"This conversation is now over.")
327 end_dialog()
328 end,
329 },
330 {
331 id = "node44",
332 text = _"That is not many. Why there are so few of them right now?",
333 code = function()
334 if (Tux:del_gold(50)) then
335 Npc:says(_"They were a very lucky find.", "NO_WAIT")
336 Npc:says(_"We found a crashed army truck on the Terminal Field. It had six crates inside it, each containing five exterminators.")
337 Npc:says(_"We tried, but we could not replicate the technology, only bullets.", "NO_WAIT")
338 Npc:says(_"A few got damaged in battle, and we failed to recover five after a failed scout mission. We have twenty-two right now.")
339 hide("node44") show("node49")
340 else
341 next("node43")
342 end
343 end,
344 },
345 {
346 id = "node46",
347 text = _"What is the exterminator ammunition made from?",
348 code = function()
349 if (Tux:del_gold(50)) then
350 Npc:says(_"We use radioactive isotopes, whatever type happens to be on hand. Mostly plutonium and uranium, but we are not too picky.")
351 Npc:says(_"When we get low on ammo, we send in a chain gang of criminals and sluggards into mine shaft K-17.")
352 Npc:says(_"That place was closed down ages ago because of high radiation levels, but it's full of good ore from which we make bullets and power our nuclear reactors.")
353 Npc:says(_"We get our fission materials, and they serve their sentence. It was one of the best ideas we have ever had.")
354 hide("node46")
355 else
356 next("node43")
357 end
358 end,
359 },
360 {
361 id = "node47",
362 text = _"Tell me who designed the exterminator.",
363 code = function()
364 Npc:says(_"That answer is on the house. Heh.", "NO_WAIT")
365 Npc:says(_"We do not know, Linarian. We have absolutely no clue.")
366 hide("node47")
367 end,
368 },
369 {
370 id = "node49",
371 text = _"What was the failed mission?",
372 code = function()
373 Npc:says(_"Ugh. That will cost you triple.", "NO_WAIT")
374 Npc:says(_"No. Wait.")
375 Npc:says(_"I changed my mind.", "NO_WAIT")
376 Npc:says(_"Keep your money Linarian. No amount of circuits can make me talk about that accursed day.")
377 hide("node49")
378 end,
379 },
380 {
381 id = "node51",
382 text = _"What makes the exterminator so powerful?",
383 code = function()
384 if (Tux:get_gold(50)) then
385 Npc:says(_"That's a tricky question. Most of the force comes from the miniature nuclear explosions which happen once the bullet hits something.")
386 Npc:says(_"Of course, the high velocity of the impact can cause tremendous devastation by itself.")
387 Npc:says(_"We never bothered with doing much research on that topic. It works, and that is enough for us.")
388 else
389 next("node43")
390 end
391 hide("node51")
392 end,
393 },
394 {
395 id = "node69",
396 text = _"That is all I want to know.",
397 code = function()
398 Npc:says(_"Very well. Oh... This conversation never happened.")
399 hide("node41", "node44", "node46", "node47", "node49", "node51", "node69")
400 end,
401 },
402 {
403 id = "node99",
404 text = _"I will be going then.",
405 code = function()
406 Npc:says(_"See you later!")
407 end_dialog()
408 end,
409 },
410 }