/usr/share/freedroidrpg/dialogs/Mike.lua is in freedroidrpg-data 0.16.1-2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 | ---------------------------------------------------------------------
-- This file is part of Freedroid
--
-- Freedroid is free software; you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation; either version 2 of the License, or
-- (at your option) any later version.
--
-- Freedroid is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-- GNU General Public License for more details.
--
-- You should have received a copy of the GNU General Public License
-- along with Freedroid; see the file COPYING. If not, write to the
-- Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston,
-- MA 02111-1307 USA
----------------------------------------------------------------------
--[[WIKI
PERSONALITY = { "Robotic" },
PURPOSE = "$$NAME$$ controls arena functions in the game.",
BACKSTORY = "$$NAME$$ is the Arena Manager for the Red Guard.",
WIKI]]--
local Npc = FDrpg.get_npc()
local Tux = FDrpg.get_tux()
local tr_rankings = {
novice = _"Novice",
elite = _"Elite",
champion = _"Champion",
}
local function start_arena(level)
arena_current_level = level
arena_next_wave = 1
next("arena_start")
end
return {
EveryTime = function()
if (not has_met("Mike")) then
Tux:says(_"Euh...hello?")
Npc:says(_"Salutation: Welcome to the arena.")
Npc:says(_"Presentation: The robot is M.I.K.E.", "NO_WAIT")
Npc:says(_"Modern Interactive Kombat Executive.")
Npc:says(_"Tasks: Multiple assignments have been programmed.")
Npc:says(_"Suggestion: The arena enrollment program is open.")
show("arena_enroll")
else
if (arena_current_level ~= nil) then
if (arena_won) then
Npc:says(_"You have won the arena.")
if (not done_quest("Novice Arena")) then
--change_obstacle_state("NoviceArenaExitDoor", "opened")
display_console_message(_"Novice arena cleared!")
display_big_message(_"Level cleared!")
Tux:end_quest("Novice Arena", _"I won the fight in the novice arena.")
end
if (arena_ranking == "novice") then
arena_ranking = "elite"
elseif (arena_ranking == "elite" and arena_current_level == "elite") then
arena_ranking = "champion"
end
show("arena_ready")
elseif (arena_left) then
Npc:says(_"You have left the arena.")
show("arena_ready")
else
Npc:says(_"The arena is already started.")
hide("arena_ready")
end
else
Npc:says_random(_"Hello.", _"Hi.")
local salutations = {
_"Salutations: Welcome to the arena.",
_"Salutations: M.I.K.E. says hello."
}
if (arena_ranking ~= nil) then
table.insert(salutations, _"Salutations: Greeting, Fighter.")
end
Npc:says_random(table.unpack(salutations))
end
end
show("tasks", "end")
hide("sandwich", "sandwich_sudo")
end,
{
id = "arena_enroll",
text = _"I want to fight.",
code = function()
arena_enroll = true,
Npc:says(_"Excellent: New challengers are greatly appreciated.")
Npc:says(_"Registration: Patience, it will take a litte moment.")
Npc:says(_"[b]...Analysis of the bio-signature.[/b]")
Npc:says(_"[b]...Processing the ranking value.[/b]")
Npc:says(_"[b]...Saving personal characteristics.[/b]")
-- TODO: Tux can choose a nickname. This can let's other NPC react to it.
Npc:says(_"[b]...Fighter registered.[/b]")
--; TRANSLATORS: %s = Tux:get_player_name()
Npc:says(_"Compliment: %s is the new challenger.", Tux:get_player_name())
-- TODO: Detect the level of Tux to set a higher ranking.
arena_ranking = "novice"
--; TRANSLATORS: %s is the ranking of Tux in the arena.
Npc:says(_"Information: Your ranking has been established to be '%s'.", tr_rankings[arena_ranking])
Npc:says(_"Planning: Arena matches are freely scheduled.")
Npc:says(_"Advice: Begin fighting when you are ready.")
show("arena_ready") hide("arena_enroll")
end,
},
{
id = "arena_ready",
text = _"I'm ready to fight.",
code = function()
arena_current_level = nil
arena_won = false
arena_left = nil
--; TRANSLATORS: %s is the ranking of Tux in the arena.
Npc:says(_"Information: Your ranking has been established to be '%s'.", tr_rankings[arena_ranking])
if (not arena_info_rank) then
Npc:says(_"Explanation: The arena is divided into three rank levels.")
Npc:says(_"First: Novice - new to the arena and bot-fighting.")
Npc:says(_"Second: Elite - you are a good fighter who already knows the routine.")
Npc:says(_"Third: Champion - nothing can stop you, you seek the harder challenges.")
Npc:says(_"Every time you win, you are raised to the next rank.")
Npc:says(_"Advice: Last rank has the most difficult challenge.")
arena_info_rank = true
end
if (arena_ranking == "champion") then
Npc:says(_"Choice: You can fight at the 'Novice', 'Elite' and 'Champion' rank.")
show("arena_novice", "arena_elite", "arena_champion")
elseif (arena_ranking == "elite") then
Npc:says(_"Choice: You can fight at the 'Novice' and 'Elite' rank.")
show("arena_novice", "arena_elite")
else
Npc:says(_"Beginning: You can only fight at the 'Novice' rank.")
show("arena_novice")
end
push_topic("arena")
show("arena_none")
end,
},
{
id = "arena_novice",
topic = "arena",
text = _"Let's go at 'Novice'.",
code = function()
Npc:says(_"Start Novice Arena")
start_arena("novice")
end,
},
{
id = "arena_elite",
topic = "arena",
text = _"Let's go at 'Elite'.",
code = function()
Npc:says(_"Start Elite Arena")
start_arena("elite")
end,
},
{
id = "arena_champion",
topic = "arena",
text = _"Let's go at 'Champion'.",
code = function()
Npc:says(_"Start Champion Arena")
start_arena("champion")
end,
},
{
id = "arena_none",
topic = "arena",
text = _"None at this moment.",
code = function()
-- TODO: Provide 'Protip' to Tux.
Npc:says(_"Stop")
hide("arena_novice", "arena_elite", "arena_champion")
pop_topic("arena")
end,
},
{
id = "arena_start",
topic = "arena",
code = function()
-- TODO: Display information about arena wave.
-- TODO: Provide 'Protip' to Tux.
change_obstacle_state("Arena-ChangingRoomDoor", "opened")
change_obstacle_state("Arena-RingEntrance", "opened")
pop_topic("arena")
hide("arena_ready", "arena_novice", "arena_elite", "arena_champion")
end_dialog()
end,
},
{
id = "tasks",
text = _"What are your tasks?",
code = function()
Npc:says(_"First: Control of incoming droid.")
Npc:says(_"Second: Prepare the arena installation.")
Npc:says(_"Third: Save and analyse combat data.")
Npc:says(_"Important: Make sandwiches.")
hide("tasks") show("sandwich")
end,
},
{
id = "sandwich",
text = _"Make me a sandwich.",
code = function()
if (tux_has_joined_guard) then
-- TODO: Make ingredient avalaible. :)
Npc:says(_"Problem: Ingredients are not available.")
else
Npc:says(_"Refusal: Only authorized personal can give orders.")
show("sandwich_sudo")
end
hide("sandwich")
end,
},
{
id = "sandwich_sudo",
text = _"sudo make me a sandwich",
code = function()
Npc:says(_"Annoyance: The droid is not a terminal.")
hide("sandwich_sudo")
end,
},
{
id = "end",
text = _"...",
echo_text = false,
code = function()
-- TODO. Make Mike ask Tux to be more polite, and quit with a "good bye".
-- A idea from jesusalva is to allows the traditional linarian salute.
end_dialog()
end,
},
}
|