| 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 = { "Exhausted", "Haunted", "Trapped" }, |
| 21 |
BACKSTORY = "$$NAME$$ is a mine worker and former member of the Red Guard. He is haunted by the loss of comrades at Hell Fortress." |
| 22 |
WIKI]]-- |
| 23 |
|
| 24 |
local Npc = FDrpg.get_npc() |
| 25 |
local Tux = FDrpg.get_tux() |
| 26 |
|
| 27 |
return { |
| 28 |
FirstTime = function() |
| 29 |
show("node0") |
| 30 |
Bruce_helmet_sell = -1 |
| 31 |
-- -1: deal not initiated |
| 32 |
-- 0, 20, 100: sell prices |
| 33 |
-- -1000: deal failed (the "lost" case is handled separately) |
| 34 |
end, |
| 35 |
|
| 36 |
EveryTime = function() |
| 37 |
if (HF_FirmwareUpdateServer_uploaded_faulty_firmware_update) then |
| 38 |
Npc:says(_"I was finally allowed to rest. Please don't bother me.") |
| 39 |
end_dialog() |
| 40 |
end |
| 41 |
if (tux_has_joined_guard) then |
| 42 |
Npc:says(_"I am tired.") |
| 43 |
Npc:says(_"Go away.") |
| 44 |
end_dialog() |
| 45 |
elseif (Bruce_wants_helmet) then |
| 46 |
next("node30") |
| 47 |
push_topic("Bruce wants Dixon's helmet") |
| 48 |
else |
| 49 |
if (not Bruce_hurt) and |
| 50 |
(Tux:has_item_equipped("Dixon's Helmet")) then |
| 51 |
if (Bruce_Dixons_helmet_lost) then |
| 52 |
Npc:says(_"So, you've 'lost' the helmet, heh?") |
| 53 |
Npc:says(_"Then, what's that on your head?") |
| 54 |
Npc:says(_"Leave me alone!") |
| 55 |
Bruce_hurt = true |
| 56 |
hide("node0", "node1", "node2", "node3", "node4", "node5", "node6", "node7", "node10", "node11", "node12") |
| 57 |
elseif (Bruce_helmet_sell == -1) then |
| 58 |
next("node20") |
| 59 |
push_topic("Bruce wants Dixon's helmet") |
| 60 |
end |
| 61 |
end |
| 62 |
end |
| 63 |
hide("node29") show("node99") |
| 64 |
end, |
| 65 |
|
| 66 |
{ |
| 67 |
id = "node0", |
| 68 |
text = _"Are you all right? You don't look too good.", |
| 69 |
code = function() |
| 70 |
if (guard_follow_tux) then |
| 71 |
Npc:says(_"I don't have time to talk: I'm far too busy working! I'm normally at the mines this time of day but I forgot something and that's...") |
| 72 |
Npc:says(_"That's why I'm here. Now I must get back to the mines.") |
| 73 |
end_dialog() |
| 74 |
else |
| 75 |
Npc:says(_"Good day. I am Bruce.") |
| 76 |
Npc:says(_"I am unwell.") |
| 77 |
Npc:set_name("Bruce - Mine Worker") |
| 78 |
hide("node0") show("node1") |
| 79 |
end |
| 80 |
end, |
| 81 |
}, |
| 82 |
{ |
| 83 |
id = "node1", |
| 84 |
text = _"How is it going?", |
| 85 |
code = function() |
| 86 |
Npc:says(_"I am very tired, but otherwise well.") |
| 87 |
hide("node1") show("node2") |
| 88 |
end, |
| 89 |
}, |
| 90 |
{ |
| 91 |
id = "node2", |
| 92 |
text = _"You don't talk much, eh?", |
| 93 |
code = function() |
| 94 |
Npc:says(_"No, I am just too tired right now. I have been working in the mine for two weeks now.") |
| 95 |
Npc:says(_"I feel totally wiped, so maybe it would be better if you came some other day.") |
| 96 |
hide("node2") show("node3") |
| 97 |
end, |
| 98 |
}, |
| 99 |
{ |
| 100 |
id = "node3", |
| 101 |
text = _"Why do you work so hard in the mine?", |
| 102 |
code = function() |
| 103 |
Npc:says(_"Because I must! The Red Guard makes everyone work up to their limits!") |
| 104 |
Npc:says(_"If you do not work for a full work period, you will be in trouble.") |
| 105 |
Npc:says(_"But I have no choice. I do not want to be a soldier again.") |
| 106 |
hide("node3") show("node4") |
| 107 |
end, |
| 108 |
}, |
| 109 |
{ |
| 110 |
id = "node4", |
| 111 |
text = _"You were a soldier before?", |
| 112 |
code = function() |
| 113 |
Npc:says(_"Yes. I would rather not talk about it.") |
| 114 |
hide("node4") show("node5", "node6") |
| 115 |
end, |
| 116 |
}, |
| 117 |
{ |
| 118 |
id = "node5", |
| 119 |
text = _"I have some bad memories too. I know how hard it can be to talk about them. Keep your stories for yourself.", |
| 120 |
code = function() |
| 121 |
Npc:says(_"Yes. And now I would like to go to sleep. Good night Linarian.") |
| 122 |
hide("node5", "node6", "node7") |
| 123 |
end_dialog() |
| 124 |
end, |
| 125 |
}, |
| 126 |
{ |
| 127 |
id = "node6", |
| 128 |
text = _"I said, I want to know about your life as a soldier.", |
| 129 |
code = function() |
| 130 |
Npc:says(_"And I said that I do not want to talk about it. It hurts too much. Please, stop asking about it and leave me alone.") |
| 131 |
hide("node6") show("node7") |
| 132 |
end, |
| 133 |
}, |
| 134 |
{ |
| 135 |
id = "node7", |
| 136 |
text = _"You don't understand. I wasn't asking. Now, tell me about your life as a soldier, or I will tell the guards you are slacking off.", |
| 137 |
code = function() |
| 138 |
Npc:says(_"No! Please... I will do anything, just don't call the Red Guard! They do not like people who left the service. They do not like me.") |
| 139 |
Npc:says(_"I will tell you everything.") |
| 140 |
Bruce_hurt = true |
| 141 |
hide("node5", "node7") show("node10") |
| 142 |
end, |
| 143 |
}, |
| 144 |
{ |
| 145 |
id = "node10", |
| 146 |
text = _"Good. Start talking. Now.", |
| 147 |
code = function() |
| 148 |
Npc:says(_"Those are pretty painful and distant memories.") |
| 149 |
Npc:says(_"After the Great Assault, I joined the Red Guard. They needed help and were looking for volunteers.") |
| 150 |
Npc:says(_"I served there for a short while, and they even let me use an exterminator. But then after a failed mission, I resigned and never wore a uniform again.") |
| 151 |
hide("node10") show("node11", "node12") |
| 152 |
end, |
| 153 |
}, |
| 154 |
{ |
| 155 |
id = "node11", |
| 156 |
text = _"You mentioned an exterminator. What is it?", |
| 157 |
code = function() |
| 158 |
Npc:says(_"It is the best weapon that the Red Guard has against the bots.") |
| 159 |
Npc:says(_"A direct hit from one of those guns is enough to turn most bots into scrap metal.") |
| 160 |
Npc:says(_"Many of the great victories of the Red Guard are thanks to the exterminator.") |
| 161 |
Npc:says(_"Of course, because of its small clip and terribly long reloading time, equally many deaths can be attributed to it.") |
| 162 |
hide("node11") |
| 163 |
end, |
| 164 |
}, |
| 165 |
{ |
| 166 |
id = "node12", |
| 167 |
text = _"A failed mission?", |
| 168 |
code = function() |
| 169 |
Npc:says(_"There were six of us. Me, Wilbert, Anderson and three others. I do not remember the names anymore. We were team number nine.") |
| 170 |
Npc:says(_"It was a routine scout mission. We saw an interesting building which was not there before, and decided to take a look.") |
| 171 |
Npc:says(_"It was a terrible fortress, many stories high. It had guns everywhere. When we got close the shooting started.") |
| 172 |
Npc:says(_"They were waiting for us. Came in endless swarms. More and more and more. We stood our ground and kept firing, but it was no use. More of them came.") |
| 173 |
Npc:says(_"Our ammunition ran out. They got close. It was the end of team number nine. The Hell Fortress took their lives. I ran. I survived.") |
| 174 |
Npc:says(_"After that I decided that I am not fit to be one of the Red Guard. I resigned and started to work in the mine shortly after.") |
| 175 |
Npc:says(_"I do not want to face the rage of the Hell Fortress ever again. Never again.") |
| 176 |
hide("node12") |
| 177 |
end, |
| 178 |
}, |
| 179 |
{ |
| 180 |
id = "node20", |
| 181 |
topic = "Bruce wants Dixon's helmet", |
| 182 |
code = function() |
| 183 |
Npc:says(_"What do you have there?") |
| 184 |
Tux:says(_"What do you mean?") |
| 185 |
Npc:says(_"That helmet. I could make good use of it, it looks quite solid.") |
| 186 |
Npc:says(_"Can I buy it from you?") |
| 187 |
Bruce_wants_helmet = true |
| 188 |
hide("node20") show("node40", "node45", "node49") |
| 189 |
end, |
| 190 |
}, |
| 191 |
{ |
| 192 |
id = "node29", |
| 193 |
text = _"Let's talk about the helmet.", |
| 194 |
code = function() |
| 195 |
hide("node29") next("node30") |
| 196 |
push_topic("Bruce wants Dixon's helmet") |
| 197 |
end, |
| 198 |
}, |
| 199 |
{ |
| 200 |
id = "node30", |
| 201 |
topic = "Bruce wants Dixon's helmet", |
| 202 |
code = function() |
| 203 |
Npc:says(_"So, what about the helmet now?") |
| 204 |
if (Bruce_helmet_deal) then |
| 205 |
Npc:says(_"I offered you 20 circuits for it.") |
| 206 |
end |
| 207 |
if (Bruce_helmet_sell == 20) then |
| 208 |
Npc:says(_"You agreed.") |
| 209 |
Tux:says(_"Indeed.") |
| 210 |
elseif (Bruce_helmet_sell == 100) then |
| 211 |
Npc:says(_"You suggested 100 circuits as a price.") |
| 212 |
Npc:says(_"That is acceptable to me.") |
| 213 |
Tux:says(_"Excellent.") |
| 214 |
elseif (Bruce_helmet_sell == 0) then |
| 215 |
Npc:says(_"You said you would give me the helmet for free.") |
| 216 |
Tux:says(_"Yes, that's true.") |
| 217 |
end |
| 218 |
if (Tux:has_item_equipped("Dixon's Helmet")) then |
| 219 |
Npc:says(_"Please unequip it, so we can proceed.") |
| 220 |
Npc:says(_"I want to see your face as we talk.") |
| 221 |
end_dialog() |
| 222 |
elseif (Tux:has_item("Dixon's Helmet")) then |
| 223 |
if (Bruce_helmet_sell == 0) then |
| 224 |
Tux:says(_"Here you go.") |
| 225 |
Npc:says(_"Oh, thank you!") |
| 226 |
Npc:says(_"Here, take this Lamp, as a token of my esteem.") |
| 227 |
Tux:says(_"Oh, thank you very much!") |
| 228 |
Npc:says(_"You're welcome.") |
| 229 |
Tux:add_item("Desk Lamp") |
| 230 |
elseif (Bruce_helmet_sell == 20) then |
| 231 |
Npc:says(_"Fine.") |
| 232 |
Npc:says(_"Here are your 20 circuits.") |
| 233 |
Tux:says(_"Here's your new helmet.") |
| 234 |
Npc:says(_"Thank you.") |
| 235 |
Tux:says(_"You're welcome.") |
| 236 |
Tux:add_gold(20) |
| 237 |
elseif (Bruce_helmet_sell == 100) then |
| 238 |
Npc:says(_"Hmm...") |
| 239 |
Npc:says(_"OK.") |
| 240 |
Npc:says(_"Here, take the hundred bucks.") |
| 241 |
Npc:says(_"Now give me that helmet!") |
| 242 |
Tux:says(_"Here, take it.") |
| 243 |
Tux:add_gold(100) |
| 244 |
end |
| 245 |
if (Bruce_helmet_sell > -1) then |
| 246 |
Tux:del_item("Dixon's Helmet") |
| 247 |
Bruce_wants_helmet = false |
| 248 |
pop_topic() -- "Bruce wants Dixon's helmet" |
| 249 |
end |
| 250 |
else |
| 251 |
Npc:says(_"Where is it?") |
| 252 |
Npc:says(_"Did you lose it?") |
| 253 |
Npc:says(_"Come back to me when you have it.") |
| 254 |
show("node47", "node48") |
| 255 |
push_topic("Lost Dixon's Helmet Y/N") |
| 256 |
end |
| 257 |
end, |
| 258 |
}, |
| 259 |
{ |
| 260 |
id = "node40", |
| 261 |
text = _"Yes, sure.", |
| 262 |
topic = "Bruce wants Dixon's helmet", |
| 263 |
code = function() |
| 264 |
Npc:says(_"Good.") |
| 265 |
Npc:says(_"Let's say, 20 circuits?") |
| 266 |
Bruce_helmet_deal = true |
| 267 |
if (Tux:has_item_equipped("Dixon's Helmet")) then |
| 268 |
Npc:says(_"Please take off the helmet, so we can proceed trading.") |
| 269 |
end_dialog() |
| 270 |
end |
| 271 |
hide("node40") show("node41", "node42", "node43", "node44") |
| 272 |
end, |
| 273 |
}, |
| 274 |
{ |
| 275 |
id = "node41", |
| 276 |
text = _"You can have it for free.", |
| 277 |
echo_text = false, |
| 278 |
topic = "Bruce wants Dixon's helmet", |
| 279 |
code = function() |
| 280 |
Tux:says(_"I changed my mind.") |
| 281 |
Tux:says(_"You can have it. For free.") |
| 282 |
Npc:says(_"Oh... Oh my! Thanks!") |
| 283 |
Npc:says(_"Wait, let me go get something first.") |
| 284 |
Tux:says(_"Sure.") |
| 285 |
Bruce_helmet_sell = 0 |
| 286 |
hide("node41", "node42", "node43", "node44", "node45") |
| 287 |
Npc:set_destination("Bruce-move-target-label") |
| 288 |
end_dialog() |
| 289 |
end, |
| 290 |
}, |
| 291 |
{ |
| 292 |
id = "node42", |
| 293 |
text = _"20 circuits? OK.", |
| 294 |
topic = "Bruce wants Dixon's helmet", |
| 295 |
code = function() |
| 296 |
Npc:says(_"Okay.") |
| 297 |
Npc:says(_"Let me quickly go get the money.") --excuse for need to restart the dialog |
| 298 |
Npc:says(_"Talk to me again in a moment.") |
| 299 |
Bruce_helmet_sell = 20 |
| 300 |
hide("node41", "node42", "node43", "node44", "node45") |
| 301 |
Npc:set_destination("Bruce-move-target-label") |
| 302 |
end_dialog() |
| 303 |
end, |
| 304 |
}, |
| 305 |
{ |
| 306 |
id = "node43", |
| 307 |
text = _"20 circuits? I'll sell it for... a hundred.", |
| 308 |
topic = "Bruce wants Dixon's helmet", |
| 309 |
code = function() |
| 310 |
Npc:says(_"Well... okay.") |
| 311 |
Npc:says(_"Let me get the money.") --excuse for need to restart the dialog |
| 312 |
Npc:says(_"Come back to me after that.") |
| 313 |
Bruce_helmet_sell = 100 |
| 314 |
hide("node41", "node42", "node43", "node44", "node45") |
| 315 |
Npc:set_destination("Bruce-move-target-label") |
| 316 |
end_dialog() |
| 317 |
end, |
| 318 |
}, |
| 319 |
{ |
| 320 |
id = "node44", |
| 321 |
text = _"20 circuits? Do you think I'm stupid? I'll sell it for 1000!", |
| 322 |
topic = "Bruce wants Dixon's helmet", |
| 323 |
code = function() |
| 324 |
Npc:says(_"That's way too expensive.") |
| 325 |
Tux:says(_"Fine, I'll keep it then.") |
| 326 |
Npc:says(_"You're the greediest penguin I've ever met.") |
| 327 |
Npc:says(_"Forget about the deal!") |
| 328 |
Bruce_helmet_sell = -1000 |
| 329 |
Bruce_wants_helmet = false |
| 330 |
hide("node41", "node42", "node43", "node44", "node45") |
| 331 |
pop_topic() -- "Bruce wants Dixon's helmet" |
| 332 |
end, |
| 333 |
}, |
| 334 |
{ |
| 335 |
id = "node45", |
| 336 |
text = _"I'm sorry, but I'd like to keep it.", |
| 337 |
topic = "Bruce wants Dixon's helmet", |
| 338 |
code = function() |
| 339 |
Npc:says(_"Bummer!") |
| 340 |
Bruce_helmet_sell = -1000 |
| 341 |
Bruce_wants_helmet = false |
| 342 |
hide("node40", "node41", "node42", "node43", "node44", "node45") |
| 343 |
pop_topic() -- "Bruce wants Dixon's helmet" |
| 344 |
end, |
| 345 |
}, |
| 346 |
{ |
| 347 |
id = "node47", |
| 348 |
text = _"No, it's alright. I have it.", |
| 349 |
topic = "Lost Dixon's Helmet Y/N", |
| 350 |
code = function() |
| 351 |
Npc:says(_"OK, so please fetch it and bring it to me.") |
| 352 |
hide("node47", "node48") |
| 353 |
end_dialog() |
| 354 |
end, |
| 355 |
}, |
| 356 |
{ |
| 357 |
id = "node48", |
| 358 |
text = _"I lost it.", |
| 359 |
topic = "Lost Dixon's Helmet Y/N", |
| 360 |
code = function() |
| 361 |
Npc:says(_"That's too sad!") |
| 362 |
Npc:says(_"So, please leave. I want to take a rest.") |
| 363 |
Bruce_Dixons_helmet_lost = true |
| 364 |
Bruce_wants_helmet = false |
| 365 |
hide("node40", "node41", "node42", "node43", "node44", "node45", "node47", "node48", "node49") |
| 366 |
end_dialog() |
| 367 |
end, |
| 368 |
}, |
| 369 |
{ |
| 370 |
id = "node49", |
| 371 |
text = _"I'll think about that, but right now let's talk about something else.", |
| 372 |
topic = "Bruce wants Dixon's helmet", |
| 373 |
code = function() |
| 374 |
Npc:says(_"OK, but please don't forget the helmet deal!") |
| 375 |
show("node29") |
| 376 |
pop_topic() -- "Bruce wants Dixon's helmet" |
| 377 |
end, |
| 378 |
}, |
| 379 |
{ |
| 380 |
id = "node99", |
| 381 |
text = _"I'll be going then.", |
| 382 |
code = function() |
| 383 |
if (Bruce_hurt) then |
| 384 |
Npc:says(_". . .") |
| 385 |
elseif (Bruce_wants_helmet) then |
| 386 |
Npc:says(_"Hang tight, I'll be right back for that helmet!") |
| 387 |
else |
| 388 |
Npc:says(_"Good. I need sleep.") |
| 389 |
end |
| 390 |
end_dialog() |
| 391 |
end, |
| 392 |
}, |
| 393 |
} |