Debian Codegraph @

data/storyline/act2/dialogs/Fred.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 = { "Pushy", "Obsessed" },
21 MARKERS = { NPCID1 = "Yadda" },
22 PURPOSE = "$$NAME$$ is an Act 2 NPC. He is isolated with a C-64 glitch south of R&R Resorts. He crafts add-ons and also introduces the Barrett M82.",
23 BACKSTORY = "Follower of $$NPCID1$$ which was included on the sole purpose of crafting addons."
24 WIKI]]--
25
26 local Npc = FDrpg.get_npc()
27 local Tux = FDrpg.get_tux()
28
29 return {
30 FirstTime = function()
31 show("node0")
32 end,
33
34 EveryTime = function()
35 show("node99")
36 if (Tux:has_item_equipped("Barrett M82 Sniper Rifle") and
37 not Fred_Barrett) then
38 show("barrett_help")
39 --[[ This could be useful if people complain about not finishing Reapers I quest.
40 elseif (not Fred_Barret) then
41 Npc:says_random(_"Sniper Rifles are cool.",
42 _"Defeating robots is easy with Sniper Rifles.",
43 _"Bah-bah-bah rifler.", -- From Doctor Who “bah-bah-bah-biker”
44 _"What's better than grenades? Sniper rifles.",
45 _"Where could I increase my Sniper Rifles collection?")
46 ]]--
47 end
48
49 end,
50
51 {
52 id = "node0",
53 text = _"Uhm... Hello?",
54 code = function()
55 Npc:says(_"Hello, I'm Fred. I make addons and grenades. I can craft some for you.")
56 Tux:says(_"I would like to take a look at them later, thanks.")
57 hide("node0") show("addoncraft", "addonequip", "buy", "barrett")
58
59 end,
60 },
61 {
62 id = "addoncraft",
63 text = _"Could you craft some add-ons for me?",
64 code = function()
65 Npc:says(_"Of course I can craft add-ons for my best customer.")
66 Tux:says(_"If not the only.")
67 craft_addons()
68 end,
69 },
70 {
71 id = "addonequip",
72 text = _"Can you assemble add-ons on my equipment?",
73 code = function()
74 Npc:says(_"Of course I can assemble add-ons for my best customer.")
75 Tux:says(_"If not the only.")
76 upgrade_items()
77 end,
78 },
79 {
80 id = "buy",
81 text = _"I want a grenade.",
82 code = function()
83 Npc:says_random(_"Sure, please take a look.",
84 _"They're not impressive, but they get the work done!",
85 _"You won't regret them.",
86 _"VMX for humans, EMP for droids. Remember this rule.",
87 _"Nice shopping!")
88 trade_with("Fred")
89 end,
90 },
91 {
92 id = "barrett",
93 text = _"Do you know where to find a weapon for the .50 BMG Ammo?",
94 code = function()
95 Npc:says(_"A weapon for the .50 Browning Machine Gun Ammo. Only the Barrett M82 Sniper Rifle uses that junk. I mean, they don't even stack, you need a slot on inventory for each ammo.")
96 Tux:says(_"So, if I was interested in such a gun... do you know where I could get one?")
97 Npc:says(_"I have one, but I won't give it to you. You see, the Barrett is powerful enough to stop a truck, literally, and the likelihood of even a battle droid surviving more than 2 hits by this weapon is quite slim.")
98 Npc:says(_"So unless you're in the military or something, I won't be giving, trading, nor selling it for you.")
99 Tux:says(_"I have many circuits, you know.")
100 Npc:says(_"And I have a Barrett M82. I bet a few direct hits from this gun, and you'll be history.")
101 Tux:says(_"...You've got a point there.")
102 hide("barrett")
103 end,
104 },
105 {
106 id = "barrett_help",
107 text = _"Look at this! I have a Barrett.",
108 code = function()
109 Npc:says(_"Ah, so you've got a Barrett too. Nice.")
110 Npc:says(_"That is a sniper rifle. It should kill bots in one shoot from afar.")
111 Npc:says(_"If you ever find a droid with subsonic sensor, this is the weapon you should use.")
112 Tux:says(_"Why?")
113 Npc:says(_"Subsonic droids won't attack until you attack them. They are powerful, fast, and have lots of armor.")
114 Npc:says(_"Plasma would be too slow, and laser too weak, so you really should use sniper rifles there.")
115 Tux:says(_"...I do not think I'll ever meet such a droid, but thanks for the warning.")
116 Tux:add_item(".50 BMG (12.7x99mm) Ammunition", 5)
117 Npc:says(_"Here is some spare ammo. Use it wisely.")
118 Tux:end_quest("The Reapers Of MegaSys I", _"Glitch was defeated, and I obtained one of the most powerful weapon in sheer damage terms. Man, either I am THAT good, or I cheat.")
119 Fred_Barrett = true
120 hide("barrett_help")
121 end,
122 },
123 {
124 id = "node99",
125 text = _"I'll leave this strange man to his... evil doings.",
126 code = function()
127 Npc:says_random(_"...",
128 _"You joke now, but a bot soon will teach you to be more serious.",
129 _"Evildoer? You don't even know me.",
130 _"...But it's you who is killing bots left and right...",
131 _"Having survived the Great Assault doesn't make me an evildoer.")
132 end_dialog()
133 end,
134 },
135 }