author | Periklis Ntanasis <pntanasis@gmail.com> |
Fri, 16 Aug 2013 21:56:06 +0300 | |
branch | spacecampaign |
changeset 9536 | 7456b28a3421 |
parent 9534 | 662edfec06be |
child 9538 | 51596e01c5df |
permissions | -rw-r--r-- |
9527 | 1 |
------------------- ABOUT ---------------------- |
2 |
-- |
|
3 |
-- In this adventure hero gets the lost part with |
|
4 |
-- the help of the green bananas hogs. |
|
5 |
||
6 |
HedgewarsScriptLoad("/Scripts/Locale.lua") |
|
7 |
HedgewarsScriptLoad("/Scripts/Animate.lua") |
|
8 |
||
9 |
----------------- VARIABLES -------------------- |
|
10 |
-- globals |
|
11 |
local campaignName = loc("A Space Adventure") |
|
9529 | 12 |
local missionName = loc("Fruit planet, Searching the Device!") |
9527 | 13 |
local inBattle = false |
9529 | 14 |
local tookPartInBattle = false |
9536
7456b28a3421
this seems to work fine for the escape scenario
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9534
diff
changeset
|
15 |
local firstRoundAfterBattle = false |
7456b28a3421
this seems to work fine for the escape scenario
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9534
diff
changeset
|
16 |
local previousHog = -1 |
9527 | 17 |
-- dialogs |
18 |
local dialog01 = {} |
|
19 |
local dialog02 = {} |
|
20 |
local dialog03 = {} |
|
9534
662edfec06be
many dialogs and events
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9532
diff
changeset
|
21 |
local dialog04 = {} |
9527 | 22 |
-- mission objectives |
23 |
local goals = { |
|
9529 | 24 |
[dialog01] = {missionName, loc("Getting the Device"), loc("With the help of the other hogs search for the device").."|"..loc("Hog Solo has to reach the last crates"), 1, 4000}, |
9534
662edfec06be
many dialogs and events
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9532
diff
changeset
|
25 |
[dialog02] = {missionName, loc("Getting the Device"), loc("Explore the tunnel with the other hogs and search for the device").."|"..loc("Hog Solo has to reach the last crates"), 1, 4000}, |
662edfec06be
many dialogs and events
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9532
diff
changeset
|
26 |
[dialog03] = {missionName, loc("Return to the Surface"), loc("Go to the surface!").."|"..loc("Attack Captain Lime before he attacks back"), 1, 4000}, |
662edfec06be
many dialogs and events
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9532
diff
changeset
|
27 |
[dialog04] = {missionName, loc("Return to the Surface"), loc("Go to the surface!").."|"..loc("Attack the assasins before they attack back"), 1, 4000}, |
9527 | 28 |
} |
29 |
-- crates types=[0:ammo,1:utility,2:health] |
|
30 |
local crates = { |
|
31 |
{type = 0, name = amDEagle, x = 1680, y = 1650}, |
|
32 |
{type = 0, name = amGirder, x = 1680, y = 1160}, |
|
33 |
{type = 0, name = amRope, x = 1400, y = 1870}, |
|
34 |
} |
|
9534
662edfec06be
many dialogs and events
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9532
diff
changeset
|
35 |
local weaponCrate = { x = 1360, y = 1870} |
9527 | 36 |
-- hogs |
37 |
local hero = {} |
|
38 |
local green1 = {} |
|
39 |
local green2 = {} |
|
40 |
local green3 = {} |
|
41 |
-- teams |
|
42 |
local teamA = {} |
|
43 |
local teamB = {} |
|
44 |
local teamC = {} |
|
45 |
local teamD = {} |
|
46 |
-- hedgehogs values |
|
47 |
hero.name = "Hog Solo" |
|
48 |
hero.x = 1200 |
|
49 |
hero.y = 820 |
|
50 |
hero.dead = false |
|
51 |
green1.name = "Captain Lime" |
|
52 |
green1.x = 1050 |
|
53 |
green1.y = 820 |
|
54 |
green2.name = "Mister Pear" |
|
55 |
green2.x = 1350 |
|
56 |
green2.y = 820 |
|
57 |
green3.name = "Lady Mango" |
|
58 |
green3.x = 1450 |
|
59 |
green3.y = 820 |
|
60 |
local redHedgehogs = { |
|
61 |
{ name = "Poisonous Apple" }, |
|
62 |
{ name = "Dark Strawberry" }, |
|
63 |
{ name = "Watermelon Heart" }, |
|
64 |
{ name = "Deadly Grape" } |
|
65 |
} |
|
66 |
teamA.name = loc("Hog Solo and GB") |
|
67 |
teamA.color = tonumber("38D61C",16) -- green |
|
68 |
teamB.name = loc("Captain Lime") |
|
69 |
teamB.color = tonumber("38D61C",16) -- green |
|
70 |
teamC.name = loc("Fruit Assasins") |
|
71 |
teamC.color = tonumber("FF0000",16) -- red |
|
72 |
||
73 |
function onGameInit() |
|
74 |
Seed = 1 |
|
75 |
TurnTime = 20000 |
|
76 |
CaseFreq = 0 |
|
77 |
MinesNum = 0 |
|
78 |
MinesTime = 1 |
|
79 |
Explosives = 0 |
|
80 |
Delay = 3 |
|
81 |
SuddenDeathTurns = 100 |
|
82 |
HealthCaseAmount = 50 |
|
83 |
Map = "fruit02_map" |
|
84 |
Theme = "Fruit" |
|
85 |
||
86 |
-- Hog Solo and Green Bananas |
|
87 |
AddTeam(teamA.name, teamA.color, "Bone", "Island", "HillBilly", "cm_birdy") |
|
88 |
hero.gear = AddHog(hero.name, 0, 100, "war_desertgrenadier1") |
|
89 |
AnimSetGearPosition(hero.gear, hero.x, hero.y) |
|
90 |
HogTurnLeft(hero.gear, true) |
|
91 |
green2.gear = AddHog(green2.name, 0, 100, "war_desertgrenadier1") |
|
92 |
AnimSetGearPosition(green2.gear, green2.x, green2.y) |
|
93 |
HogTurnLeft(green2.gear, true) |
|
94 |
green3.gear = AddHog(green3.name, 0, 100, "war_desertgrenadier1") |
|
95 |
AnimSetGearPosition(green3.gear, green3.x, green3.y) |
|
96 |
HogTurnLeft(green3.gear, true) |
|
97 |
-- Captain Lime |
|
98 |
AddTeam(teamB.name, teamB.color, "Bone", "Island", "HillBilly", "cm_birdy") |
|
99 |
green1.gear = AddHog(green1.name, 0, 100, "war_desertgrenadier1") |
|
100 |
AnimSetGearPosition(green1.gear, green1.x, green1.y) |
|
101 |
-- Fruit Assasins |
|
102 |
AddTeam(teamC.name, teamC.color, "Bone", "Island", "HillBilly", "cm_birdy") |
|
103 |
for i=1,table.getn(redHedgehogs) do |
|
104 |
redHedgehogs[i].gear = AddHog(redHedgehogs[i].name, 0, 100, "war_desertgrenadier1") |
|
105 |
AnimSetGearPosition(redHedgehogs[i].gear, 2010 + 50*i, 630) |
|
106 |
end |
|
107 |
||
108 |
AnimInit() |
|
9529 | 109 |
AnimationSetup() |
9527 | 110 |
end |
111 |
||
112 |
function onGameStart() |
|
113 |
AnimWait(hero.gear, 3000) |
|
114 |
FollowGear(hero.gear) |
|
115 |
||
9529 | 116 |
if GetCampaignVar(Fruit01JoinedBattle) and GetCampaignVar(Fruit01JoinedBattle) == "true" then |
117 |
tookPartInBattle = true |
|
118 |
end |
|
119 |
||
9527 | 120 |
AddEvent(onHeroDeath, {hero.gear}, heroDeath, {hero.gear}, 0) |
9534
662edfec06be
many dialogs and events
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9532
diff
changeset
|
121 |
AddEvent(onDeviceCrates, {hero.gear}, deviceCrates, {hero.gear}, 0) |
9527 | 122 |
|
123 |
-- Hog Solo and GB weapons |
|
124 |
AddAmmo(hero.gear, amFirePunch, 3) |
|
125 |
AddAmmo(hero.gear, amSwitch, 100) |
|
9534
662edfec06be
many dialogs and events
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9532
diff
changeset
|
126 |
AddAmmo(hero.gear, amTeleport, 100) |
9527 | 127 |
-- Assasins weapons |
128 |
AddAmmo(redHedgehogs[1].gear, amBazooka, 6) |
|
129 |
AddAmmo(redHedgehogs[1].gear, amGrenade, 6) |
|
130 |
for i=1,table.getn(redHedgehogs) do |
|
131 |
HideHog(redHedgehogs[i].gear) |
|
132 |
end |
|
133 |
||
134 |
-- place crates |
|
135 |
for i=1,table.getn(crates) do |
|
136 |
SpawnAmmoCrate(crates[i].x, crates[i].y, crates[i].name) |
|
137 |
end |
|
9534
662edfec06be
many dialogs and events
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9532
diff
changeset
|
138 |
if tookPartInBattle then |
662edfec06be
many dialogs and events
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9532
diff
changeset
|
139 |
SpawnAmmoCrate(weaponCrate.x, weaponCrate.y, amWatermelon) |
662edfec06be
many dialogs and events
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9532
diff
changeset
|
140 |
else |
662edfec06be
many dialogs and events
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9532
diff
changeset
|
141 |
SpawnAmmoCrate(weaponCrate.x, weaponCrate.y, amSniperRifle) |
662edfec06be
many dialogs and events
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9532
diff
changeset
|
142 |
end |
9527 | 143 |
|
144 |
-- explosives |
|
145 |
-- I wanted to use FindPlace but doesn't accept height values... |
|
146 |
local x1 = 950 |
|
147 |
local x2 = 1305 |
|
148 |
local y1 = 1210 |
|
149 |
local y2 = 1620 |
|
150 |
while true do |
|
151 |
if y2<y1 then |
|
152 |
break |
|
153 |
end |
|
154 |
if x2<x1 then |
|
155 |
x2 = 1305 |
|
156 |
y2 = y2 -60 |
|
157 |
end |
|
158 |
if not TestRectForObstacle(x2+25, y2+25, x2-25, y2-25, true) then |
|
159 |
AddGear(x2, y2, gtExplosives, 0, 0, 0, 0) |
|
160 |
end |
|
161 |
x2 = x2 - 30 |
|
162 |
end |
|
163 |
AddGear(3128, 1680, gtExplosives, 0, 0, 0, 0) |
|
164 |
--mines |
|
165 |
AddGear(3135, 1680, gtMine, 0, 0, 0, 0) |
|
166 |
AddGear(3145, 1680, gtMine, 0, 0, 0, 0) |
|
167 |
AddGear(3155, 1680, gtMine, 0, 0, 0, 0) |
|
168 |
AddGear(3165, 1680, gtMine, 0, 0, 0, 0) |
|
169 |
AddGear(3175, 1680, gtMine, 0, 0, 0, 0) |
|
170 |
AddGear(3115, 1680, gtMine, 0, 0, 0, 0) |
|
171 |
AddGear(3105, 1680, gtMine, 0, 0, 0, 0) |
|
172 |
AddGear(3095, 1680, gtMine, 0, 0, 0, 0) |
|
173 |
AddGear(3085, 1680, gtMine, 0, 0, 0, 0) |
|
174 |
AddGear(3075, 1680, gtMine, 0, 0, 0, 0) |
|
175 |
||
9529 | 176 |
if tookPartInBattle then |
177 |
AddAnim(dialog01) |
|
178 |
else |
|
179 |
AddAnim(dialog02) |
|
180 |
end |
|
181 |
||
9527 | 182 |
SendHealthStatsOff() |
183 |
end |
|
184 |
||
185 |
function onNewTurn() |
|
9536
7456b28a3421
this seems to work fine for the escape scenario
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9534
diff
changeset
|
186 |
WriteLnToConsole("TURNS "..TotalRounds.." and hog: "..CurrentHedgehog.." PREVIOUS: "..previousHog) |
9534
662edfec06be
many dialogs and events
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9532
diff
changeset
|
187 |
if not inBattle and CurrentHedgehog == green1.gear then |
9536
7456b28a3421
this seems to work fine for the escape scenario
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9534
diff
changeset
|
188 |
WriteLnToConsole("1") |
9527 | 189 |
TurnTimeLeft = 0 |
9534
662edfec06be
many dialogs and events
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9532
diff
changeset
|
190 |
elseif CurrentHedgehog == green2.gear or CurrentHedgehog == green3.gear then |
9536
7456b28a3421
this seems to work fine for the escape scenario
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9534
diff
changeset
|
191 |
WriteLnToConsole("2") |
9534
662edfec06be
many dialogs and events
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9532
diff
changeset
|
192 |
TurnTimeLeft = 0 |
9536
7456b28a3421
this seems to work fine for the escape scenario
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9534
diff
changeset
|
193 |
elseif inBattle then |
7456b28a3421
this seems to work fine for the escape scenario
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9534
diff
changeset
|
194 |
if CurrentHedgehog == green1.gear and previousHog ~= hero.gear then |
7456b28a3421
this seems to work fine for the escape scenario
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9534
diff
changeset
|
195 |
WriteLnToConsole("IIIIIIIIFFFFFFFFFF") |
7456b28a3421
this seems to work fine for the escape scenario
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9534
diff
changeset
|
196 |
TurnTimeLeft = 0 |
7456b28a3421
this seems to work fine for the escape scenario
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9534
diff
changeset
|
197 |
return |
9534
662edfec06be
many dialogs and events
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9532
diff
changeset
|
198 |
end |
662edfec06be
many dialogs and events
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9532
diff
changeset
|
199 |
WriteLnToConsole("IN BATTLE") |
662edfec06be
many dialogs and events
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9532
diff
changeset
|
200 |
TurnTimeLeft = 20000 |
9527 | 201 |
elseif not inBattle then |
9536
7456b28a3421
this seems to work fine for the escape scenario
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9534
diff
changeset
|
202 |
WriteLnToConsole("4") |
9527 | 203 |
TurnTimeLeft = -1 |
9536
7456b28a3421
this seems to work fine for the escape scenario
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9534
diff
changeset
|
204 |
else |
7456b28a3421
this seems to work fine for the escape scenario
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9534
diff
changeset
|
205 |
WriteLnToConsole("6") |
7456b28a3421
this seems to work fine for the escape scenario
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9534
diff
changeset
|
206 |
TurnTimeLeft = 0 |
9527 | 207 |
end |
9536
7456b28a3421
this seems to work fine for the escape scenario
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9534
diff
changeset
|
208 |
previousHog = CurrentHedgehog |
7456b28a3421
this seems to work fine for the escape scenario
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9534
diff
changeset
|
209 |
WriteLnToConsole("5") |
9527 | 210 |
end |
211 |
||
212 |
function onGameTick() |
|
213 |
AnimUnWait() |
|
214 |
if ShowAnimation() == false then |
|
215 |
return |
|
216 |
end |
|
217 |
ExecuteAfterAnimations() |
|
218 |
CheckEvents() |
|
219 |
end |
|
220 |
||
221 |
function onGearDelete(gear) |
|
222 |
if gear == hero.gear then |
|
223 |
hero.dead = true |
|
224 |
end |
|
225 |
end |
|
226 |
||
227 |
function onAmmoStoreInit() |
|
228 |
SetAmmo(amDEagle, 0, 0, 0, 6) |
|
229 |
SetAmmo(amGirder, 0, 0, 0, 3) |
|
230 |
SetAmmo(amRope, 0, 0, 0, 1) |
|
231 |
SetAmmo(amWatermelon, 0, 0, 0, 1) |
|
9534
662edfec06be
many dialogs and events
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9532
diff
changeset
|
232 |
SetAmmo(amSniperRifle, 0, 0, 0, 1) |
9527 | 233 |
end |
234 |
||
235 |
function onPrecise() |
|
236 |
if GameTime > 3000 then |
|
237 |
SetAnimSkip(true) |
|
238 |
end |
|
239 |
end |
|
240 |
||
241 |
-------------- EVENTS ------------------ |
|
242 |
||
243 |
function onHeroDeath(gear) |
|
244 |
if hero.dead then |
|
245 |
return true |
|
246 |
end |
|
247 |
return false |
|
248 |
end |
|
249 |
||
9532 | 250 |
function onDeviceCrates(gear) |
251 |
if not hero.dead and GetY(hero.gear)>1850 and GetX(hero.gear)>1340 then |
|
252 |
return true |
|
253 |
end |
|
254 |
return false |
|
255 |
end |
|
256 |
||
9534
662edfec06be
many dialogs and events
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9532
diff
changeset
|
257 |
function onSurface(gear) |
662edfec06be
many dialogs and events
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9532
diff
changeset
|
258 |
if not hero.dead and GetY(hero.gear)<850 and StoppedGear(hero.gear) then |
662edfec06be
many dialogs and events
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9532
diff
changeset
|
259 |
return true |
662edfec06be
many dialogs and events
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9532
diff
changeset
|
260 |
end |
662edfec06be
many dialogs and events
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9532
diff
changeset
|
261 |
return false |
662edfec06be
many dialogs and events
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9532
diff
changeset
|
262 |
end |
662edfec06be
many dialogs and events
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9532
diff
changeset
|
263 |
|
9527 | 264 |
-------------- ACTIONS ------------------ |
265 |
||
266 |
function heroDeath(gear) |
|
267 |
EndGame() |
|
268 |
end |
|
269 |
||
9532 | 270 |
function deviceCrates(gear) |
9534
662edfec06be
many dialogs and events
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9532
diff
changeset
|
271 |
TurnTimeLeft = 0 |
9532 | 272 |
if not tookPartInBattle then |
273 |
AddAnim(dialog03) |
|
274 |
else |
|
9534
662edfec06be
many dialogs and events
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9532
diff
changeset
|
275 |
for i=1,table.getn(redHedgehogs) do |
662edfec06be
many dialogs and events
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9532
diff
changeset
|
276 |
RestoreHog(redHedgehogs[i].gear) |
662edfec06be
many dialogs and events
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9532
diff
changeset
|
277 |
end |
662edfec06be
many dialogs and events
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9532
diff
changeset
|
278 |
AddAnim(dialog04) |
9532 | 279 |
end |
9534
662edfec06be
many dialogs and events
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9532
diff
changeset
|
280 |
AddAmmo(hero.gear, amSwitch, 0) |
662edfec06be
many dialogs and events
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9532
diff
changeset
|
281 |
AddEvent(onSurface, {hero.gear}, surface, {hero.gear}, 0) |
662edfec06be
many dialogs and events
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9532
diff
changeset
|
282 |
end |
662edfec06be
many dialogs and events
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9532
diff
changeset
|
283 |
|
662edfec06be
many dialogs and events
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9532
diff
changeset
|
284 |
function surface(gear) |
662edfec06be
many dialogs and events
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9532
diff
changeset
|
285 |
-- TODO: after going to the surface first round must be played by the player |
9536
7456b28a3421
this seems to work fine for the escape scenario
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9534
diff
changeset
|
286 |
WriteLnToConsole("surface first round") |
7456b28a3421
this seems to work fine for the escape scenario
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9534
diff
changeset
|
287 |
previousHog = -1 |
7456b28a3421
this seems to work fine for the escape scenario
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9534
diff
changeset
|
288 |
if firstRoundAfterBattle then |
7456b28a3421
this seems to work fine for the escape scenario
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9534
diff
changeset
|
289 |
WriteLnToConsole("TRUE IT IS!") |
7456b28a3421
this seems to work fine for the escape scenario
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9534
diff
changeset
|
290 |
end |
7456b28a3421
this seems to work fine for the escape scenario
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9534
diff
changeset
|
291 |
WriteLnToConsole("surface in battle") |
9534
662edfec06be
many dialogs and events
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9532
diff
changeset
|
292 |
inBattle = true |
9532 | 293 |
end |
294 |
||
9527 | 295 |
-------------- ANIMATIONS ------------------ |
296 |
||
297 |
function Skipanim(anim) |
|
298 |
if goals[anim] ~= nil then |
|
299 |
ShowMission(unpack(goals[anim])) |
|
300 |
end |
|
9534
662edfec06be
many dialogs and events
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9532
diff
changeset
|
301 |
TurnTimeLeft = 0 |
9527 | 302 |
end |
303 |
||
304 |
function AnimationSetup() |
|
9529 | 305 |
-- DIALOG 01 - Start, Captain Lime helps Hog Solo because he took part in the battle |
9527 | 306 |
AddSkipFunction(dialog01, Skipanim, {dialog01}) |
307 |
table.insert(dialog01, {func = AnimWait, args = {hero.gear, 3000}}) |
|
9529 | 308 |
table.insert(dialog01, {func = AnimCaption, args = {hero.gear, loc("Somewhere else in the planet of fruits Captain Lime helps Hog Solo..."), 5000}}) |
309 |
table.insert(dialog01, {func = AnimSay, args = {green1.gear, loc("You fought bravely and you helped us win this battle!"), SAY_SAY, 5000}}) |
|
310 |
table.insert(dialog01, {func = AnimSay, args = {green1.gear, loc("So, as promised I have brought you where I think that the device you are looking is hidden."), SAY_SAY, 7000}}) |
|
311 |
table.insert(dialog01, {func = AnimSay, args = {green1.gear, loc("I know that your resources are low due to the battle but I'll send with you two of my best hogs to assist you."), SAY_SAY, 7000}}) |
|
312 |
table.insert(dialog01, {func = AnimSay, args = {green1.gear, loc("Good luck!"), SAY_SAY, 2000}}) |
|
9527 | 313 |
table.insert(dialog01, {func = AnimWait, args = {hero.gear, 500}}) |
314 |
table.insert(dialog01, {func = AnimSwitchHog, args = {hero.gear}}) |
|
9529 | 315 |
-- DIALOG02 - Start, Hog Solo escaped from the previous battle |
316 |
AddSkipFunction(dialog02, Skipanim, {dialog02}) |
|
317 |
table.insert(dialog02, {func = AnimWait, args = {hero.gear, 3000}}) |
|
318 |
table.insert(dialog02, {func = AnimCaption, args = {hero.gear, loc("Somewhere else in the planet of fruits Hog Solo gets closer to the device..."), 5000}}) |
|
319 |
table.insert(dialog02, {func = AnimSay, args = {green1.gear, loc("You are the one who fled! So, you are alive..."), SAY_SAY, 4000}}) |
|
320 |
table.insert(dialog02, {func = AnimSay, args = {green1.gear, loc("I'm still low on hogs. If you are not afraid I could use a set of extra hands"), SAY_SAY, 4000}}) |
|
321 |
table.insert(dialog02, {func = AnimWait, args = {hero.gear, 8000}}) |
|
322 |
table.insert(dialog02, {func = AnimSay, args = {hero.gear, loc("I am sorry but I was looking for a device that may be hidden somewhere around here"), SAY_SAY, 4500}}) |
|
323 |
table.insert(dialog02, {func = AnimWait, args = {green1.gear, 12500}}) |
|
324 |
table.insert(dialog02, {func = AnimSay, args = {green1.gear, loc("Many long forgotten things can be found in the same tunnels that we are about to search!"), SAY_SAY, 7000}}) |
|
325 |
table.insert(dialog02, {func = AnimSay, args = {green1.gear, loc("If you help us you can keep the device if you find it but we'll keep everything else"), SAY_SAY, 7000}}) |
|
326 |
table.insert(dialog02, {func = AnimSay, args = {green1.gear, loc("What do you say? Are you in?"), SAY_SAY, 3000}}) |
|
327 |
table.insert(dialog02, {func = AnimWait, args = {hero.gear, 1800}}) |
|
328 |
table.insert(dialog02, {func = AnimSay, args = {hero.gear, loc("Ok then!"), SAY_SAY, 2000}}) |
|
329 |
table.insert(dialog02, {func = AnimSwitchHog, args = {hero.gear}}) |
|
9532 | 330 |
-- DIALOG03 - At crates, hero learns that Captain Lime is bad |
331 |
AddSkipFunction(dialog03, Skipanim, {dialog03}) |
|
9534
662edfec06be
many dialogs and events
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9532
diff
changeset
|
332 |
table.insert(dialog03, {func = AnimWait, args = {hero.gear, 4000}}) |
662edfec06be
many dialogs and events
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9532
diff
changeset
|
333 |
table.insert(dialog03, {func = FollowGear, args = {hero.gear}}) |
9532 | 334 |
table.insert(dialog03, {func = AnimSay, args = {hero.gear, loc("Hoo Ray! I've found it, now I have to get back to Captain Lime!"), SAY_SAY, 4000}}) |
335 |
table.insert(dialog03, {func = AnimWait, args = {green1.gear, 4000}}) |
|
9534
662edfec06be
many dialogs and events
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9532
diff
changeset
|
336 |
table.insert(dialog03, {func = AnimSay, args = {green1.gear, loc("This Hog Solo is so naive! I am gonna shoot him when he returns and keep his device for me!"), SAY_THINK, 4000}}) |
662edfec06be
many dialogs and events
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9532
diff
changeset
|
337 |
table.insert(dialog03, {func = goToThesurface, args = {hero.gear}}) |
662edfec06be
many dialogs and events
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9532
diff
changeset
|
338 |
-- DIALOG04 - At crates, hero learns about the assasins ambush |
662edfec06be
many dialogs and events
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9532
diff
changeset
|
339 |
AddSkipFunction(dialog04, Skipanim, {dialog04}) |
662edfec06be
many dialogs and events
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9532
diff
changeset
|
340 |
table.insert(dialog04, {func = AnimWait, args = {hero.gear, 4000}}) |
662edfec06be
many dialogs and events
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9532
diff
changeset
|
341 |
table.insert(dialog04, {func = FollowGear, args = {hero.gear}}) |
662edfec06be
many dialogs and events
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9532
diff
changeset
|
342 |
table.insert(dialog04, {func = AnimSay, args = {hero.gear, loc("Hoo Ray! I've found it, now I have to get back to Captain Lime!"), SAY_SAY, 4000}}) |
662edfec06be
many dialogs and events
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9532
diff
changeset
|
343 |
table.insert(dialog04, {func = AnimWait, args = {redHedgehogs[1].gear, 4000}}) |
662edfec06be
many dialogs and events
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9532
diff
changeset
|
344 |
table.insert(dialog04, {func = AnimSay, args = {redHedgehogs[1].gear, loc("We have spotted the enemy! We'll attack when the enemies start gathering!"), SAY_THINK, 4000}}) |
662edfec06be
many dialogs and events
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9532
diff
changeset
|
345 |
table.insert(dialog04, {func = goToThesurface, args = {hero.gear}}) |
9527 | 346 |
end |
347 |
||
348 |
------------- OTHER FUNCTIONS --------------- |
|
349 |
||
9534
662edfec06be
many dialogs and events
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9532
diff
changeset
|
350 |
function goToThesurface() |
662edfec06be
many dialogs and events
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9532
diff
changeset
|
351 |
TurnTimeLeft = 0 |
662edfec06be
many dialogs and events
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9532
diff
changeset
|
352 |
end |