Debian Codegraph @

data/storyline/act1/dialogs/Lukas.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", "Helpful" },
21 PURPOSE = "$$NAME$$ will sell Tux more capable weapons and armor after Tux has joined the Red Guard.",
22 BACKSTORY = "$$NAME$$ is the Red Guard\'s Quartermaster/Storesman",
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 end,
32
33 EveryTime = function()
34 if (HF_FirmwareUpdateServer_uploaded_faulty_firmware_update) then
35 Npc:says(_"Hey, if it isn't our hero! Do you need ammo? A new gun, maybe? Or armor, yes, you definitely should get a new one!", "NO_WAIT")
36 end
37 show("node99")
38 end,
39
40 {
41 id = "node0",
42 text = _"Hi! I'm new here.",
43 code = function()
44 Npc:says(_"A newcomer! Great! We can always use more people. Welcome to the Red Guard! I'm Lukas. I'm in charge of our little armory here.")
45 hide("node0") show("node1", "node2", "node3")
46 end,
47 },
48 {
49 id = "node1",
50 text = _"Spencer said you'd be able to provide me with better armor and equipment.",
51 code = function()
52 Npc:says(_"Of course. As a member of the Guard, you're entitled to wear one of our suits of armor.")
53 Npc:says(_"There are two kinds or armor, a heavy Red Guard robe and a light version of the same thing, though we also trade guns.")
54 Npc:says_random(_"Now, what will it be?",
55 _"So, what do you want to buy?")
56 trade_with("Lukas")
57 show("node4")
58 end,
59 },
60 {
61 id = "node2",
62 text = _"I am interested in buying ammo.",
63 code = function()
64 Npc:says(_"Of course. Because ammo is always at high demand, we sell them separately.")
65 Npc:says_random(_"Now, what will it be?",
66 _"So, what do you want to buy?")
67 trade_with("Benjamin") -- Not sure if this usage was intended when trade_with() was implemented
68 show("node4")
69 end,
70 },
71 {
72 id = "node3",
73 text = _"What do you do all day here at the armory?",
74 code = function()
75 Npc:says(_"Oh, there's always something to do. Don't worry. I'm pretty occupied keeping the place in order.")
76 hide("node3")
77 end,
78 },
79 {
80 id = "node4",
81 text = _"I'd like to buy an exterminator.",
82 code = function()
83 Npc:says(_"Haha, good one.")
84 if (Tux:has_item_equipped("The Super Exterminator!!!") or
85 Tux:has_item_equipped("Exterminator")) then
86 Npc:says(_"You are already using one. It is on your hands!")
87 Npc:says(_"Stop trying to make a fool of me.")
88 else
89 Npc:says(_"Sorry, they are not for sale.")
90 Tux:says(_"I'll get one for free?")
91 if (not HF_FirmwareUpdateServer_uploaded_faulty_firmware_update) then
92 Npc:says(_"You are the funniest Linarian I've ever seen.")
93 Npc:says(_"If the only one.")
94 Npc:says(_"Now go, kill some bots.")
95 else
96 Npc:says(_"Why would you need one, anyway? The bots are all dead.")
97 Npc:says(_"While I agree you deserve one, only Spencer can authorize that. Sorry.")
98 end
99 end
100 hide("node4")
101 end,
102 },
103 {
104 id = "node99",
105 text = _"See you later!",
106 code = function()
107 end_dialog()
108 end,
109 },
110 }