Debian Codegraph @

data/storyline/act1/dialogs/InvaderBot.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" },
21 PURPOSE = "$$NAME$$ is the first bot Tux encounters in the game. It starts the first fight during the introduction."
22 WIKI]]--
23
24 local Npc = FDrpg.get_npc()
25 local Tux = FDrpg.get_tux()
26
27 return {
28 EveryTime = function()
29 Npc:says(_"Target Acquired...","NO_WAIT")
30 Npc:says(_"Scanning...")
31 Npc:says(_"Non-Human Lifeform Identified","NO_WAIT")
32 Npc:says(_"Species Identified: Linarian")
33 Npc:says(_"Current Status: Unknown")
34 show("node0", "node1", "node2")
35 end,
36
37 {
38 id = "node0",
39 text = _"Hello there.",
40 code = function()
41 predilect='amicable'
42 next("node99")
43 end,
44 },
45 {
46 id = "node1",
47 text = _"What's up?",
48 code = function()
49 predilect='interrogative'
50 next("node99")
51 end,
52 },
53 {
54 id = "node2",
55 text = _"Die!",
56 code = function()
57 predilect='aggressive'
58 next("node99")
59 end,
60 },
61 {
62 id = "node99",
63 code = function()
64 play_sound("effects/bot_sounds/First_Contact_Sound_3.ogg")
65 Npc:says(_"Uploading Status...")
66 Npc:set_faction("ms")
67 if (predilect == 'amicable') then
68 Npc:says(_"Target attempts to engage discourse. Unacceptable outcomes predicted. Threat identified.")
69 elseif (predilect == 'interrogative') then
70 Npc:says(_"Target is inquisitive. Threat identified.")
71 elseif (predilect == 'aggressive') then
72 Npc:says(_"Target issues verbal threat.","NO_WAIT")
73 end
74 Npc:says(_"Linarian is hostile. Destroy!")
75 end_dialog()
76 end,
77 },
78 }