Debian Codegraph @

data/storyline/act1/dialogs/KevinGuard.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 = { "Robotic", "Aggressive" },
21 MARKERS = { NPCID1 = "Kevin" },
22 PURPOSE = "$$NAME$$ defends the main entrance to $$NPCID1$$\'s compound",
23 BACKSTORY = "$$NAME$$ was originally station in the mining town until stolen by $$NPCID1$$.",
24 RELATIONSHIP = {
25 { actor = "$$NPCID1$$", text = "$$NAME$$ is now owned and programmed by $$NPCID1$$." },
26 }
27 WIKI]]--
28
29 local Npc = FDrpg.get_npc()
30 local Tux = FDrpg.get_tux()
31
32 return {
33 EveryTime = function()
34 Npc:set_rush_tux(false)
35 if (Kevin_entering_from_back) then
36 end_dialog()
37 elseif (KevinGuard_door_open) then
38 Tux:says(_"It's me.")
39 change_obstacle_state("KevinsDoor", "opened")
40 Npc:says(_"[b]Identity confirmed. You may pass.[/b]")
41 show("node99")
42 end_dialog()
43 else
44 Npc:says(_"[b]Intruder, lower your weapons and identify yourself or face immediate termination.[/b]")
45 Npc:says(_"[b]Any attempts to enter without authorization will be punished.[/b]")
46 Npc:says(_"[b]I will not let you injure my master.[/b]")
47 hide("node99") show("node2", "node8")
48 end
49 end,
50
51 {
52 id = "node1",
53 text = _"I must talk to your master.",
54 code = function()
55 Npc:says(_"[b]State your reason.[/b]")
56 hide("node1", "node3", "node17") show("node5", "node6", "node7")
57 end,
58 },
59 {
60 id = "node2",
61 text = _"Don't shoot! I come in peace.",
62 code = function()
63 Npc:says(_"[b]State the purpose of your presence here.[/b]")
64 hide("node2", "node8") show("node1", "node3", "node17")
65 end,
66 },
67 {
68 id = "node3",
69 text = _"I saw this building as I was walking by, and I decided to take a look inside.",
70 code = function()
71 Npc:says(_"[b]Your reason is curiosity. Master Kevin likes curious people.[/b]")
72 Npc:set_name("614 - Kevin's Guard")
73 Npc:says(_"[b]You may pass.[/b]")
74 hide("node1", "node3", "node17") show("node4")
75 end,
76 },
77 {
78 id = "node4",
79 text = _"Thank you.",
80 code = function()
81 KevinGuard_door_open = true
82 change_obstacle_state("KevinsDoor", "opened")
83 hide("node4") show("node99")
84 end,
85 },
86 {
87 id = "node5",
88 text = _"Umm... His life is in grave danger. ",
89 code = function()
90 Npc:says(_"[b]Error: Reason invalid.[/b]")
91 hide("node5") show("node12")
92 end,
93 },
94 {
95 id = "node6",
96 text = _"The people from the uhh... town want me to have a word with him. Yeah, that's it.",
97 code = function()
98 Npc:says(_"[b]Error: Reason invalid.[/b]")
99 hide("node6")
100 end,
101 },
102 {
103 id = "node7",
104 text = _"I have some very valuable information. Your master might be interested in it.",
105 code = function()
106 Npc:says(_"[b]Master Kevin will be pleased. You may pass.[/b]")
107 Npc:set_name("614 - Kevin's Guard")
108 Npc:says(_"[b]Door opening sequence initiated.[/b]")
109 hide("node5", "node6", "node7", "node12", "node13", "node14", "node18", "node19", "node99") show("node4")
110 end,
111 },
112 {
113 id = "node8",
114 text = _"Step aside, you stupid tin can!",
115 code = function()
116 Npc:says(_"[b]You shall not pass. Activating disintegrator beam in ten seconds.[/b]")
117 Npc:says(_"[b]Nine.[/b]")
118 Npc:says(_"[b]Eight.[/b]")
119 hide("node2", "node8") show("node9", "node10")
120 end,
121 },
122 {
123 id = "node9",
124 text = _"Wait, that's not what I meant!",
125 code = function()
126 Npc:says(_"[b]Seven.[/b]")
127 Npc:says(_"[b]Six.[/b]")
128 hide("node9", "node10") show("node99")
129 end,
130 },
131 {
132 id = "node10",
133 text = _"I am not afraid of you.",
134 code = function()
135 Npc:says(_"[b]Seven.[/b]")
136 Npc:says(_"[b]Six.[/b]")
137 hide("node9", "node10") show("node11")
138 end,
139 },
140 {
141 id = "node11",
142 text = _"Wait, that's not what I meant!",
143 code = function()
144 Npc:says(_"[b]Five.[/b]")
145 Npc:says(_"[b]Four.[/b]")
146 hide("node11") show("node99")
147 end,
148 },
149 {
150 id = "node12",
151 text = _"Enemies are approaching from every side!",
152 code = function()
153 Npc:says(_"[b]Error: Reason invalid.[/b]")
154 hide("node12") show("node13")
155 end,
156 },
157 {
158 id = "node13",
159 text = _"We are surrounded! They will attack any second now!",
160 code = function()
161 Npc:says(_"[b]Error: Reason invalid.[/b]")
162 hide("node13") show("node14")
163 end,
164 },
165 {
166 id = "node14",
167 text = _"Are you listening to me?",
168 code = function()
169 Npc:says(_"[b]Error: Reason invalid.[/b]")
170 hide("node14") show("node18")
171 end,
172 },
173 {
174 id = "node17",
175 text = _"I do not have to tell you anything, bot.",
176 code = function()
177 Npc:says(_"[b]Engaging aggression circuits. You shall be disintegrated in ten seconds.[/b]")
178 Npc:says(_"[b]Nine.[/b]")
179 Npc:says(_"[b]Eight.[/b]")
180 hide("node1", "node3", "node17") show("node9", "node10")
181 end,
182 },
183 {
184 id = "node18",
185 text = _"I think I just found an error in your programming.",
186 code = function()
187 Npc:says(_"[b]Error: Reason invalid.[/b]")
188 hide("node18") show("node19")
189 end,
190 },
191 {
192 id = "node19",
193 text = _"Thought so.",
194 code = function()
195 Npc:says(_"[b]Error: Reason invalid.[/b]")
196 hide("node19")
197 end,
198 },
199 {
200 id = "node99",
201 text = _"See you later, tin can.",
202 echo_text = false,
203 code = function()
204 Npc:says(_"[b]EOT acknowledged. Connection closed.[/b]")
205 Npc:says(_"[b]Goodbye.[/b]")
206 end_dialog()
207 end,
208 },
209 }