Debian Codegraph @

data/storyline/act2/dialogs/ProgrammingChief.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 = { "Brilliant", "Dumb" },
21 PURPOSE = "$$NAME$$ will help to improve Tux\'s abilities. Will also give Tux some more background on Act2.",
22 BACKSTORY = "$$NAME$$ is part of Act2. It mistakes Tux with Agent Zero, and says a little more than desired, besides calling player as \"master\". It can improve Tux's programming. However, it is required previous knowledge which can be obtained with Sorenson."
23 WIKI]]--
24
25 local Npc = FDrpg.get_npc()
26 local Tux = FDrpg.get_tux()
27
28 return {
29 FirstTime = function()
30 Tux:says(_"Oh noes! It is a 999 bot! Run! Run! Danger!")
31 Npc:says(_"Welcome back, master. I hope your plan in dominating mankind is going as planned.")
32 Tux:says(_"Err, remind me, what were your tasks again?")
33 Npc:says(_"Primary: [b]Control all dangerous humans who are being held captive on RR Resorts.[/b]", "NO_WAIT")
34 Npc:says(_"Secondary: [b]Kill everyone and everything if security threat: HIGH[/b]")
35 Tux:says(_"Ah, uhm, ok.")
36 show("node20", "node21", "node22", "node50")
37 end,
38
39 EveryTime = function()
40 show("node99")
41 end,
42
43 {
44 id = "node20",
45 text = _"What is my name?",
46 code = function()
47 Npc:says(_"Your name is classified information.", "NO_WAIT")
48 Npc:says(_"Please proof your identity.")
49 Tux:says(_"Actually, uhm... I forgot that on my other set of war pants!")
50 Npc:says(_"Aborted.")
51 Tux:says(_"Can you tell me your name, though?")
52 Npc:says(_"I am the manager of this facility.")
53 Npc:set_name(_"999 RR Manager")
54 hide("node20")
55 end,
56 },
57 {
58 id = "node21",
59 text = _"What is this place?",
60 code = function()
61 Npc:says(_"RR Resorts, or the RRR, is the paradise for those who dares to oppose my masters.")
62 Npc:says(_"An efficient way to dispose undesired people, without causing too much ruckus.")
63 Tux:says(_"Undesired... people? Is that even ethical?")
64 Npc:says(_"I do not know what \"ethical\" means.")
65 Tux:says(_"Ah, okay. Do not worry with such big details.")
66 Tux:update_quest("Where Am I?", _"I found RR Resorts, where \"undesired individuals\" are kept frozen. I probably should seek a way to unfreeze them.")
67 hide("node21")
68 end,
69 },
70 {
71 id = "node22",
72 text = _"What is the current security threat level?",
73 code = function()
74 Npc:says(_"Threat Degree Analysis: [b]NO THREAT DETECTED[/b]", "NO_WAIT")
75 Npc:says(_"Currently, all hostilities are dead or cryonized.")
76 Tux:says(_"What about bots?")
77 Npc:says(_"Sorry, I do not understand this question.")
78 Tux:says(_"Nevermind that.")
79 hide("node22")
80 end,
81 },
82 {
83 id = "node50",
84 text = _"You're very intelligent for a bot.",
85 code = function()
86 Npc:says(_"I am a 999 equipped with a Primode brain. I also know a lot about programming.")
87 Tux:says(_"Cool! Can you teach me?")
88 if (Tux:get_skill("programming") < 4) then
89 Npc:says(_"Sorry, I cannot. I overestimated your coding skills previously.")
90 Npc:says(_"You must practice a little more, master. I will not bother you with this again.")
91 hide("node50")
92 else
93 Npc:says(_"Naturally, I can remind you about coding.")
94 Npc:says(_"However, you'll need 5,000 circuits and two training points. A short maintenance routine must be conducted afterwards.")
95 hide("node50") show("node60")
96 end
97 end,
98 },
99 {
100 id = "node60",
101 text = _"Sure. Teach me more programming than I actually know. (costs 5000 valuable circuits, 2 training points)",
102 code = function()
103 if (Tux:train_skill(5000, 2, "programming")) then -- Not much AP because Tux probably is a high-level linarian by now.
104 Tux:heat(110) -- Ping-pong is the hardest game ever made. It only loses to Nethack.
105 Npc:says(_"Let us begin then.")
106 Npc:says(_"Come closer...")
107 Npc:says(_"Do you see this screen?")
108 Tux:says(_"Yes. I see a ball going up and down, hitting two moving walls.")
109 Npc:says(_"This is called ping-pong. It's an... interesting game.")
110 Tux:says(_"Seems simple.")
111 Npc:says(_"Maybe. It's much more complex than you think. It's not the code I'm talking about, or even the ball going up and down. The important is not the program on itself. It's the art of programming.")
112 Npc:says(_"Once you understand how the bytes flows, how they sum and they bitwise, you'll become a true master at programming.")
113 Tux:says(_"What should I do?")
114 Npc:says(_"Look at source code, and replicate the ping pong, but not with this simple, built-in, example AI. Try to do a sentient ping pong field, with air friction, gravity, virtual reality, these sort of things.")
115 Npc:says(_"It would be desirable to consider the solar effect over tachyon particles and the E-particle emission on field due to friction with two antigrav rackets, but do not worry too much with that.") -- Are tachyons the way to contact Linarius?
116 Tux:says(_"Yes sir! Will be done sir!")
117 Npc:says(_"[b]...some time later...[/b]")
118 Npc:says(_"Very good. The E-particle emission is a little off, but this can be forgiven.")
119 Npc:says(_"You're good to go.")
120 Npc:says(_"By the way, you've learned very fast the exponential overflow from E-particles. Have you sold your soul by any chance, master?")
121 Npc:says(_"This is enough training for today.")
122 hide("node60")
123 else
124 if (Tux:get_gold() >= 5000) then
125 Npc:says(_"You don't have enough experience. I can't teach you anything more right now.")
126 Npc:says(_"I'm afraid there is nothing I can do for you right now, master.")
127 else
128 Npc:says(_"Sorry, training you could damage my own circuits and I may need replacements parts.")
129 Npc:says(_"After all, don't you know the Third Law of Robotics? \"A robot must protect its own existence.\"")
130 Tux:says(_"...Now I'm really curious about what you bots believe to be the first and second laws of robotics...")
131 end
132 end
133 end,
134 },
135 {
136 id = "node99",
137 text = _"I'll inspect this fine resort of yours. Please excuse me.",
138 code = function()
139 Npc:says(_"Have a nice visit, master. If you need a full report, just contact me.")
140 end_dialog()
141 end,
142 },
143 }