author | Wuzzy <Wuzzy2@mail.ru> |
Fri, 21 Dec 2018 23:17:10 +0100 | |
changeset 14522 | 4e7fbbdca061 |
parent 14509 | 7bb7e5e54f70 |
child 14597 | 2087e50e03e2 |
permissions | -rw-r--r-- |
9611
ef374528a9fb
moon side mission map and most of the logic
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
1 |
------------------- ABOUT ---------------------- |
ef374528a9fb
moon side mission map and most of the logic
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
2 |
-- |
14509
7bb7e5e54f70
Update ASA campaign to use player chosen team identity
Wuzzy <Wuzzy2@mail.ru>
parents:
13742
diff
changeset
|
3 |
-- The hero has to catch the other hog in order |
9614
7fa70d381c75
added custom stats
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9613
diff
changeset
|
4 |
-- to get informations about the origin of Pr. Hogevil |
9611
ef374528a9fb
moon side mission map and most of the logic
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
5 |
|
ef374528a9fb
moon side mission map and most of the logic
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
6 |
HedgewarsScriptLoad("/Scripts/Locale.lua") |
ef374528a9fb
moon side mission map and most of the logic
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
7 |
HedgewarsScriptLoad("/Scripts/Animate.lua") |
ef374528a9fb
moon side mission map and most of the logic
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
8 |
HedgewarsScriptLoad("/Missions/Campaign/A_Space_Adventure/global_functions.lua") |
ef374528a9fb
moon side mission map and most of the logic
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
9 |
|
ef374528a9fb
moon side mission map and most of the logic
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
10 |
----------------- VARIABLES -------------------- |
ef374528a9fb
moon side mission map and most of the logic
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
11 |
-- globals |
9615
86b82816b222
image and description
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9614
diff
changeset
|
12 |
local missionName = loc("Chasing the blue hog") |
9757 | 13 |
local challengeObjectives = loc("Use the rope in order to catch the blue hedgehog").."|".. |
9611
ef374528a9fb
moon side mission map and most of the logic
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
14 |
loc("You have to stand very close to him") |
ef374528a9fb
moon side mission map and most of the logic
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
15 |
local currentPosition = 1 |
ef374528a9fb
moon side mission map and most of the logic
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
16 |
local previousTimeLeft = 0 |
9772
30a9e740ec09
moon02 fixes: bug that didn't called win(), changed map so blue hog not placed on edges, teleport animations, removed amSkip, also error when drow hero and enemy seems fixed
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9758
diff
changeset
|
17 |
local startChallenge = false |
11891
d79621bcb709
Save record time for Chasing the blue hog mission
Wuzzy <almikes@aol.com>
parents:
11692
diff
changeset
|
18 |
local winningTime = nil |
9611
ef374528a9fb
moon side mission map and most of the logic
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
19 |
-- dialogs |
ef374528a9fb
moon side mission map and most of the logic
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
20 |
local dialog01 = {} |
9613
142ba1d08205
cleanup - removed debug prints
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9612
diff
changeset
|
21 |
local dialog02 = {} |
9611
ef374528a9fb
moon side mission map and most of the logic
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
22 |
-- mission objectives |
ef374528a9fb
moon side mission map and most of the logic
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
23 |
local goals = { |
12575
0c5ce463949b
ASA: Improve displaying of mission panels all over the place
Wuzzy <almikes@aol.com>
parents:
12538
diff
changeset
|
24 |
[dialog01] = {missionName, loc("Challenge objectives"), challengeObjectives, 1, 0}, |
9611
ef374528a9fb
moon side mission map and most of the logic
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
25 |
} |
ef374528a9fb
moon side mission map and most of the logic
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
26 |
-- hogs |
ef374528a9fb
moon side mission map and most of the logic
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
27 |
local hero = { |
ef374528a9fb
moon side mission map and most of the logic
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
28 |
name = loc("Hog Solo"), |
ef374528a9fb
moon side mission map and most of the logic
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
29 |
x = 1300, |
ef374528a9fb
moon side mission map and most of the logic
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
30 |
y = 850 |
ef374528a9fb
moon side mission map and most of the logic
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
31 |
} |
ef374528a9fb
moon side mission map and most of the logic
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
32 |
local runner = { |
ef374528a9fb
moon side mission map and most of the logic
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
33 |
name = loc("Crazy Runner"), |
ef374528a9fb
moon side mission map and most of the logic
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
34 |
places = { |
ef374528a9fb
moon side mission map and most of the logic
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
35 |
{x = 1400,y = 850, turnTime = 0}, |
ef374528a9fb
moon side mission map and most of the logic
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
36 |
{x = 3880,y = 33, turnTime = 30000}, |
ef374528a9fb
moon side mission map and most of the logic
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
37 |
{x = 250,y = 1780, turnTime = 25000}, |
ef374528a9fb
moon side mission map and most of the logic
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
38 |
{x = 3850,y = 1940, turnTime = 20000}, |
ef374528a9fb
moon side mission map and most of the logic
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
39 |
} |
ef374528a9fb
moon side mission map and most of the logic
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
40 |
} |
ef374528a9fb
moon side mission map and most of the logic
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
41 |
-- teams |
ef374528a9fb
moon side mission map and most of the logic
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
42 |
local teamA = { |
ef374528a9fb
moon side mission map and most of the logic
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
43 |
name = loc("Hog Solo"), |
13583
141cdfe0f3ca
Switch almost all Lua calls of AddTeam to using default clan colors instead of hardcoded color
Wuzzy <Wuzzy2@mail.ru>
parents:
12587
diff
changeset
|
44 |
color = -6 |
9611
ef374528a9fb
moon side mission map and most of the logic
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
45 |
} |
ef374528a9fb
moon side mission map and most of the logic
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
46 |
local teamB = { |
ef374528a9fb
moon side mission map and most of the logic
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
47 |
name = loc("Crazy Runner"), |
13583
141cdfe0f3ca
Switch almost all Lua calls of AddTeam to using default clan colors instead of hardcoded color
Wuzzy <Wuzzy2@mail.ru>
parents:
12587
diff
changeset
|
48 |
color = -2 |
9611
ef374528a9fb
moon side mission map and most of the logic
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
49 |
} |
ef374528a9fb
moon side mission map and most of the logic
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
50 |
|
ef374528a9fb
moon side mission map and most of the logic
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
51 |
-------------- LuaAPI EVENT HANDLERS ------------------ |
ef374528a9fb
moon side mission map and most of the logic
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
52 |
|
ef374528a9fb
moon side mission map and most of the logic
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
53 |
function onGameInit() |
ef374528a9fb
moon side mission map and most of the logic
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
54 |
GameFlags = gfDisableWind |
ef374528a9fb
moon side mission map and most of the logic
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
55 |
Seed = 1 |
ef374528a9fb
moon side mission map and most of the logic
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
56 |
TurnTime = 25000 |
ef374528a9fb
moon side mission map and most of the logic
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
57 |
CaseFreq = 0 |
ef374528a9fb
moon side mission map and most of the logic
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
58 |
MinesNum = 0 |
ef374528a9fb
moon side mission map and most of the logic
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
59 |
Explosives = 0 |
ef374528a9fb
moon side mission map and most of the logic
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
60 |
Map = "moon02_map" |
ef374528a9fb
moon side mission map and most of the logic
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
61 |
Theme = "Cheese" |
12468
d652c6f5d5f1
Disable Sudden Death for a couple of ASA missions
Wuzzy <almikes@aol.com>
parents:
12467
diff
changeset
|
62 |
-- Disable Sudden Death |
d652c6f5d5f1
Disable Sudden Death for a couple of ASA missions
Wuzzy <almikes@aol.com>
parents:
12467
diff
changeset
|
63 |
WaterRise = 0 |
d652c6f5d5f1
Disable Sudden Death for a couple of ASA missions
Wuzzy <almikes@aol.com>
parents:
12467
diff
changeset
|
64 |
HealthDecrease = 0 |
9758 | 65 |
|
14509
7bb7e5e54f70
Update ASA campaign to use player chosen team identity
Wuzzy <Wuzzy2@mail.ru>
parents:
13742
diff
changeset
|
66 |
-- Hero |
7bb7e5e54f70
Update ASA campaign to use player chosen team identity
Wuzzy <Wuzzy2@mail.ru>
parents:
13742
diff
changeset
|
67 |
teamA.name = AddMissionTeam(teamA.color) |
7bb7e5e54f70
Update ASA campaign to use player chosen team identity
Wuzzy <Wuzzy2@mail.ru>
parents:
13742
diff
changeset
|
68 |
hero.gear = AddMissionHog(1) |
7bb7e5e54f70
Update ASA campaign to use player chosen team identity
Wuzzy <Wuzzy2@mail.ru>
parents:
13742
diff
changeset
|
69 |
hero.name = GetHogName(hero.gear) |
9611
ef374528a9fb
moon side mission map and most of the logic
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
70 |
AnimSetGearPosition(hero.gear, hero.x, hero.y) |
ef374528a9fb
moon side mission map and most of the logic
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
71 |
-- Crazy Runner |
14509
7bb7e5e54f70
Update ASA campaign to use player chosen team identity
Wuzzy <Wuzzy2@mail.ru>
parents:
13742
diff
changeset
|
72 |
teamB.name = AddTeam(teamB.name, teamB.color, "ring", "Island", "Default", "cm_sonic") |
9615
86b82816b222
image and description
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9614
diff
changeset
|
73 |
runner.gear = AddHog(runner.name, 0, 100, "sth_Sonic") |
9611
ef374528a9fb
moon side mission map and most of the logic
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
74 |
AnimSetGearPosition(runner.gear, runner.places[1].x, runner.places[1].y) |
ef374528a9fb
moon side mission map and most of the logic
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
75 |
HogTurnLeft(runner.gear, true) |
9758 | 76 |
|
9611
ef374528a9fb
moon side mission map and most of the logic
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
77 |
initCheckpoint("moon02") |
9758 | 78 |
|
12088
1da37e2ba6fd
Fix A Space Adventure Missions allowing player to walk before 1st animation and screw things up
Wuzzy <almikes@aol.com>
parents:
12049
diff
changeset
|
79 |
AnimInit(true) |
9611
ef374528a9fb
moon side mission map and most of the logic
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
80 |
AnimationSetup() |
ef374528a9fb
moon side mission map and most of the logic
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
81 |
end |
ef374528a9fb
moon side mission map and most of the logic
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
82 |
|
ef374528a9fb
moon side mission map and most of the logic
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
83 |
function onGameStart() |
ef374528a9fb
moon side mission map and most of the logic
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
84 |
AnimWait(hero.gear, 3000) |
ef374528a9fb
moon side mission map and most of the logic
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
85 |
FollowGear(hero.gear) |
9758 | 86 |
|
9611
ef374528a9fb
moon side mission map and most of the logic
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
87 |
AddEvent(onHeroDeath, {hero.gear}, heroDeath, {hero.gear}, 0) |
9758 | 88 |
|
9611
ef374528a9fb
moon side mission map and most of the logic
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
89 |
AddAmmo(hero.gear, amRope, 1) |
9758 | 90 |
|
9611
ef374528a9fb
moon side mission map and most of the logic
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
91 |
SendHealthStatsOff() |
ef374528a9fb
moon side mission map and most of the logic
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
92 |
hogTurn = runner.gear |
ef374528a9fb
moon side mission map and most of the logic
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
93 |
AddAnim(dialog01) |
ef374528a9fb
moon side mission map and most of the logic
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
94 |
end |
ef374528a9fb
moon side mission map and most of the logic
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
95 |
|
12577
e2b5c6e805e8
A Space Adventure: Remove or shorten intro sequences of side missions
Wuzzy <almikes@aol.com>
parents:
12575
diff
changeset
|
96 |
-- Hide mission panel when jumping or shooting rope |
12575
0c5ce463949b
ASA: Improve displaying of mission panels all over the place
Wuzzy <almikes@aol.com>
parents:
12538
diff
changeset
|
97 |
function onGearAdd(gear) |
0c5ce463949b
ASA: Improve displaying of mission panels all over the place
Wuzzy <almikes@aol.com>
parents:
12538
diff
changeset
|
98 |
if GetGearType(gear) == gtRope then |
0c5ce463949b
ASA: Improve displaying of mission panels all over the place
Wuzzy <almikes@aol.com>
parents:
12538
diff
changeset
|
99 |
HideMission() |
0c5ce463949b
ASA: Improve displaying of mission panels all over the place
Wuzzy <almikes@aol.com>
parents:
12538
diff
changeset
|
100 |
end |
0c5ce463949b
ASA: Improve displaying of mission panels all over the place
Wuzzy <almikes@aol.com>
parents:
12538
diff
changeset
|
101 |
end |
0c5ce463949b
ASA: Improve displaying of mission panels all over the place
Wuzzy <almikes@aol.com>
parents:
12538
diff
changeset
|
102 |
|
12577
e2b5c6e805e8
A Space Adventure: Remove or shorten intro sequences of side missions
Wuzzy <almikes@aol.com>
parents:
12575
diff
changeset
|
103 |
function onLJump() |
e2b5c6e805e8
A Space Adventure: Remove or shorten intro sequences of side missions
Wuzzy <almikes@aol.com>
parents:
12575
diff
changeset
|
104 |
if startChallenge then |
e2b5c6e805e8
A Space Adventure: Remove or shorten intro sequences of side missions
Wuzzy <almikes@aol.com>
parents:
12575
diff
changeset
|
105 |
HideMission() |
e2b5c6e805e8
A Space Adventure: Remove or shorten intro sequences of side missions
Wuzzy <almikes@aol.com>
parents:
12575
diff
changeset
|
106 |
end |
e2b5c6e805e8
A Space Adventure: Remove or shorten intro sequences of side missions
Wuzzy <almikes@aol.com>
parents:
12575
diff
changeset
|
107 |
end |
e2b5c6e805e8
A Space Adventure: Remove or shorten intro sequences of side missions
Wuzzy <almikes@aol.com>
parents:
12575
diff
changeset
|
108 |
onHJump = onLJump |
e2b5c6e805e8
A Space Adventure: Remove or shorten intro sequences of side missions
Wuzzy <almikes@aol.com>
parents:
12575
diff
changeset
|
109 |
|
9611
ef374528a9fb
moon side mission map and most of the logic
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
110 |
function onNewTurn() |
9772
30a9e740ec09
moon02 fixes: bug that didn't called win(), changed map so blue hog not placed on edges, teleport animations, removed amSkip, also error when drow hero and enemy seems fixed
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9758
diff
changeset
|
111 |
if startChallenge and currentPosition < 5 then |
9612 | 112 |
if CurrentHedgehog ~= hero.gear then |
12467
de69155f976b
Use new turn ending method in moon02.lua
Wuzzy <almikes@aol.com>
parents:
12088
diff
changeset
|
113 |
EndTurn(true) |
9612 | 114 |
else |
115 |
if GetAmmoCount(hero.gear, amRope) == 0 then |
|
116 |
lose() |
|
117 |
end |
|
10289 | 118 |
SetWeapon(amRope) |
13742
2bb7141496a9
Use SetTurnTimeLeft and SetReadyTimeLeft in all scripts
Wuzzy <Wuzzy2@mail.ru>
parents:
13583
diff
changeset
|
119 |
SetTurnTimeLeft(runner.places[currentPosition].turnTime + previousTimeLeft) |
9612 | 120 |
previousTimeLeft = 0 |
121 |
end |
|
9611
ef374528a9fb
moon side mission map and most of the logic
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
122 |
end |
ef374528a9fb
moon side mission map and most of the logic
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
123 |
end |
ef374528a9fb
moon side mission map and most of the logic
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
124 |
|
ef374528a9fb
moon side mission map and most of the logic
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
125 |
function onGameTick() |
ef374528a9fb
moon side mission map and most of the logic
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
126 |
AnimUnWait() |
ef374528a9fb
moon side mission map and most of the logic
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
127 |
if ShowAnimation() == false then |
ef374528a9fb
moon side mission map and most of the logic
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
128 |
return |
ef374528a9fb
moon side mission map and most of the logic
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
129 |
end |
ef374528a9fb
moon side mission map and most of the logic
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
130 |
ExecuteAfterAnimations() |
ef374528a9fb
moon side mission map and most of the logic
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
131 |
CheckEvents() |
ef374528a9fb
moon side mission map and most of the logic
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
132 |
end |
ef374528a9fb
moon side mission map and most of the logic
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
133 |
|
ef374528a9fb
moon side mission map and most of the logic
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
134 |
function onGameTick20() |
9772
30a9e740ec09
moon02 fixes: bug that didn't called win(), changed map so blue hog not placed on edges, teleport animations, removed amSkip, also error when drow hero and enemy seems fixed
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9758
diff
changeset
|
135 |
if GetHealth(hero.gear) and startChallenge and isHeroNextToRunner() and currentPosition < 5 then |
9611
ef374528a9fb
moon side mission map and most of the logic
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
136 |
moveRunner() |
ef374528a9fb
moon side mission map and most of the logic
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
137 |
end |
ef374528a9fb
moon side mission map and most of the logic
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
138 |
end |
ef374528a9fb
moon side mission map and most of the logic
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
139 |
|
ef374528a9fb
moon side mission map and most of the logic
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
140 |
function onPrecise() |
ef374528a9fb
moon side mission map and most of the logic
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
141 |
if GameTime > 3000 then |
9758 | 142 |
SetAnimSkip(true) |
9611
ef374528a9fb
moon side mission map and most of the logic
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
143 |
end |
ef374528a9fb
moon side mission map and most of the logic
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
144 |
end |
ef374528a9fb
moon side mission map and most of the logic
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
145 |
|
ef374528a9fb
moon side mission map and most of the logic
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
146 |
-------------- EVENTS ------------------ |
ef374528a9fb
moon side mission map and most of the logic
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
147 |
|
ef374528a9fb
moon side mission map and most of the logic
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
148 |
function onHeroDeath(gear) |
ef374528a9fb
moon side mission map and most of the logic
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
149 |
if not GetHealth(hero.gear) then |
ef374528a9fb
moon side mission map and most of the logic
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
150 |
return true |
ef374528a9fb
moon side mission map and most of the logic
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
151 |
end |
ef374528a9fb
moon side mission map and most of the logic
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
152 |
return false |
ef374528a9fb
moon side mission map and most of the logic
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
153 |
end |
ef374528a9fb
moon side mission map and most of the logic
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
154 |
|
ef374528a9fb
moon side mission map and most of the logic
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
155 |
-------------- ACTIONS ------------------ |
ef374528a9fb
moon side mission map and most of the logic
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
156 |
|
ef374528a9fb
moon side mission map and most of the logic
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
157 |
function heroDeath(gear) |
9614
7fa70d381c75
added custom stats
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9613
diff
changeset
|
158 |
lose() |
9611
ef374528a9fb
moon side mission map and most of the logic
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
159 |
end |
ef374528a9fb
moon side mission map and most of the logic
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
160 |
|
ef374528a9fb
moon side mission map and most of the logic
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
161 |
-------------- ANIMATIONS ------------------ |
ef374528a9fb
moon side mission map and most of the logic
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
162 |
|
ef374528a9fb
moon side mission map and most of the logic
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
163 |
function Skipanim(anim) |
ef374528a9fb
moon side mission map and most of the logic
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
164 |
if goals[anim] ~= nil then |
ef374528a9fb
moon side mission map and most of the logic
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
165 |
ShowMission(unpack(goals[anim])) |
12575
0c5ce463949b
ASA: Improve displaying of mission panels all over the place
Wuzzy <almikes@aol.com>
parents:
12538
diff
changeset
|
166 |
end |
0c5ce463949b
ASA: Improve displaying of mission panels all over the place
Wuzzy <almikes@aol.com>
parents:
12538
diff
changeset
|
167 |
if anim == dialog01 then |
9611
ef374528a9fb
moon side mission map and most of the logic
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
168 |
moveRunner() |
9772
30a9e740ec09
moon02 fixes: bug that didn't called win(), changed map so blue hog not placed on edges, teleport animations, removed amSkip, also error when drow hero and enemy seems fixed
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9758
diff
changeset
|
169 |
elseif anim == dialog02 then |
30a9e740ec09
moon02 fixes: bug that didn't called win(), changed map so blue hog not placed on edges, teleport animations, removed amSkip, also error when drow hero and enemy seems fixed
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9758
diff
changeset
|
170 |
win() |
12575
0c5ce463949b
ASA: Improve displaying of mission panels all over the place
Wuzzy <almikes@aol.com>
parents:
12538
diff
changeset
|
171 |
end |
9611
ef374528a9fb
moon side mission map and most of the logic
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
172 |
end |
ef374528a9fb
moon side mission map and most of the logic
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
173 |
|
ef374528a9fb
moon side mission map and most of the logic
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
174 |
function AnimationSetup() |
ef374528a9fb
moon side mission map and most of the logic
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
175 |
-- DIALOG 01 - Start, game instructions |
ef374528a9fb
moon side mission map and most of the logic
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
176 |
AddSkipFunction(dialog01, Skipanim, {dialog01}) |
ef374528a9fb
moon side mission map and most of the logic
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
177 |
table.insert(dialog01, {func = AnimWait, args = {hero.gear, 3200}}) |
11692
68eddcdc9f26
Typo fixes for A Space Adventure campaign
Wuzzy <almikes@aol.com>
parents:
11492
diff
changeset
|
178 |
table.insert(dialog01, {func = AnimCaption, args = {hero.gear, loc("On the other side of the moon ..."), 5000}}) |
68eddcdc9f26
Typo fixes for A Space Adventure campaign
Wuzzy <almikes@aol.com>
parents:
11492
diff
changeset
|
179 |
table.insert(dialog01, {func = AnimSay, args = {runner.gear, loc("So you are interested in Professor Hogevil, huh?"), SAY_SAY, 3000}}) |
68eddcdc9f26
Typo fixes for A Space Adventure campaign
Wuzzy <almikes@aol.com>
parents:
11492
diff
changeset
|
180 |
table.insert(dialog01, {func = AnimSay, args = {runner.gear, loc("We'll play a game first."), SAY_SAY, 3000}}) |
68eddcdc9f26
Typo fixes for A Space Adventure campaign
Wuzzy <almikes@aol.com>
parents:
11492
diff
changeset
|
181 |
table.insert(dialog01, {func = AnimSay, args = {runner.gear, loc("I'll let you know whatever I know about him if you manage to catch me 3 times."), SAY_SAY, 4000}}) |
9758 | 182 |
table.insert(dialog01, {func = AnimSay, args = {runner.gear, loc("Let's go!"), SAY_SAY, 2000}}) |
12575
0c5ce463949b
ASA: Improve displaying of mission panels all over the place
Wuzzy <almikes@aol.com>
parents:
12538
diff
changeset
|
183 |
table.insert(dialog01, {func = ShowMission, args = goals[dialog01]}) |
9613
142ba1d08205
cleanup - removed debug prints
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9612
diff
changeset
|
184 |
table.insert(dialog01, {func = moveRunner, args = {}}) |
14509
7bb7e5e54f70
Update ASA campaign to use player chosen team identity
Wuzzy <Wuzzy2@mail.ru>
parents:
13742
diff
changeset
|
185 |
-- DIALOG 02 - Professor Hogevil story |
9613
142ba1d08205
cleanup - removed debug prints
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9612
diff
changeset
|
186 |
AddSkipFunction(dialog02, Skipanim, {dialog02}) |
142ba1d08205
cleanup - removed debug prints
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9612
diff
changeset
|
187 |
table.insert(dialog02, {func = AnimWait, args = {hero.gear, 3200}}) |
9757 | 188 |
table.insert(dialog02, {func = AnimCaption, args = {hero.gear, loc("The truth about Professor Hogevil"), 5000}}) |
189 |
table.insert(dialog02, {func = AnimSay, args = {runner.gear, loc("Amazing! I was never beaten in a race before!"), SAY_SAY, 4000}}) |
|
11692
68eddcdc9f26
Typo fixes for A Space Adventure campaign
Wuzzy <almikes@aol.com>
parents:
11492
diff
changeset
|
190 |
table.insert(dialog02, {func = AnimSay, args = {runner.gear, loc("So, let me tell you what I know about Professor Hogevil."), SAY_SAY, 4000}}) |
68eddcdc9f26
Typo fixes for A Space Adventure campaign
Wuzzy <almikes@aol.com>
parents:
11492
diff
changeset
|
191 |
table.insert(dialog02, {func = AnimSay, args = {runner.gear, loc("Professor Hogevil, then known as James Hogus, worked for PAotH back in my time."), SAY_SAY, 4000}}) |
68eddcdc9f26
Typo fixes for A Space Adventure campaign
Wuzzy <almikes@aol.com>
parents:
11492
diff
changeset
|
192 |
table.insert(dialog02, {func = AnimSay, args = {runner.gear, loc("He was the lab assistant of Dr. Goodhogan, the inventor of the anti-gravity device."), SAY_SAY, 5000}}) |
68eddcdc9f26
Typo fixes for A Space Adventure campaign
Wuzzy <almikes@aol.com>
parents:
11492
diff
changeset
|
193 |
table.insert(dialog02, {func = AnimSay, args = {runner.gear, loc("During the final testing of the device an accident happened."), SAY_SAY, 5000}}) |
68eddcdc9f26
Typo fixes for A Space Adventure campaign
Wuzzy <almikes@aol.com>
parents:
11492
diff
changeset
|
194 |
table.insert(dialog02, {func = AnimSay, args = {runner.gear, loc("In this accident, Professor Hogevil lost all his spines on his head!"), SAY_SAY, 5000}}) |
68eddcdc9f26
Typo fixes for A Space Adventure campaign
Wuzzy <almikes@aol.com>
parents:
11492
diff
changeset
|
195 |
table.insert(dialog02, {func = AnimSay, args = {runner.gear, loc("That's why he always wears a hat since then."), SAY_SAY, 4000}}) |
68eddcdc9f26
Typo fixes for A Space Adventure campaign
Wuzzy <almikes@aol.com>
parents:
11492
diff
changeset
|
196 |
table.insert(dialog02, {func = AnimSay, args = {runner.gear, loc("After that incident he went underground and started working on his plan to steal the device."), SAY_SAY, 5000}}) |
68eddcdc9f26
Typo fixes for A Space Adventure campaign
Wuzzy <almikes@aol.com>
parents:
11492
diff
changeset
|
197 |
table.insert(dialog02, {func = AnimSay, args = {runner.gear, loc("He is a very tough and very determined hedgehog. I would be extremely careful if I were you."), SAY_SAY, 5000}}) |
9613
142ba1d08205
cleanup - removed debug prints
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9612
diff
changeset
|
198 |
table.insert(dialog02, {func = AnimSay, args = {runner.gear, loc("I should go now, goodbye!"), SAY_SAY, 3000}}) |
142ba1d08205
cleanup - removed debug prints
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9612
diff
changeset
|
199 |
table.insert(dialog02, {func = win, args = {}}) |
9611
ef374528a9fb
moon side mission map and most of the logic
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
200 |
end |
ef374528a9fb
moon side mission map and most of the logic
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
201 |
|
ef374528a9fb
moon side mission map and most of the logic
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
202 |
------------- other functions --------------- |
ef374528a9fb
moon side mission map and most of the logic
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
203 |
|
ef374528a9fb
moon side mission map and most of the logic
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
204 |
function isHeroNextToRunner() |
11492
806da449d355
Fix Lua error spam in "Chasing the blue hog" after drowning both Crazy Runner and Hog Solo
Wuzzy <almikes@aol.com>
parents:
10289
diff
changeset
|
205 |
if GetGearType(hero.gear) == gtHedgehog and GetGearType(runner.gear) == gtHedgehog and |
806da449d355
Fix Lua error spam in "Chasing the blue hog" after drowning both Crazy Runner and Hog Solo
Wuzzy <almikes@aol.com>
parents:
10289
diff
changeset
|
206 |
math.abs(GetX(hero.gear) - GetX(runner.gear)) < 75 and |
9611
ef374528a9fb
moon side mission map and most of the logic
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
207 |
math.abs(GetY(hero.gear) - GetY(runner.gear)) < 75 and StoppedGear(hero.gear) then |
ef374528a9fb
moon side mission map and most of the logic
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
208 |
return true |
ef374528a9fb
moon side mission map and most of the logic
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
209 |
end |
ef374528a9fb
moon side mission map and most of the logic
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
210 |
return false |
ef374528a9fb
moon side mission map and most of the logic
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
211 |
end |
ef374528a9fb
moon side mission map and most of the logic
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
212 |
|
ef374528a9fb
moon side mission map and most of the logic
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
213 |
function moveRunner() |
9772
30a9e740ec09
moon02 fixes: bug that didn't called win(), changed map so blue hog not placed on edges, teleport animations, removed amSkip, also error when drow hero and enemy seems fixed
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9758
diff
changeset
|
214 |
if currentPosition == 4 then |
30a9e740ec09
moon02 fixes: bug that didn't called win(), changed map so blue hog not placed on edges, teleport animations, removed amSkip, also error when drow hero and enemy seems fixed
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9758
diff
changeset
|
215 |
currentPosition = currentPosition + 1 |
9613
142ba1d08205
cleanup - removed debug prints
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9612
diff
changeset
|
216 |
if GetX(hero.gear) > GetX(runner.gear) then |
142ba1d08205
cleanup - removed debug prints
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9612
diff
changeset
|
217 |
HogTurnLeft(runner.gear, false) |
142ba1d08205
cleanup - removed debug prints
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9612
diff
changeset
|
218 |
end |
9772
30a9e740ec09
moon02 fixes: bug that didn't called win(), changed map so blue hog not placed on edges, teleport animations, removed amSkip, also error when drow hero and enemy seems fixed
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9758
diff
changeset
|
219 |
AddAnim(dialog02) |
11891
d79621bcb709
Save record time for Chasing the blue hog mission
Wuzzy <almikes@aol.com>
parents:
11692
diff
changeset
|
220 |
|
d79621bcb709
Save record time for Chasing the blue hog mission
Wuzzy <almikes@aol.com>
parents:
11692
diff
changeset
|
221 |
-- Update time record |
d79621bcb709
Save record time for Chasing the blue hog mission
Wuzzy <almikes@aol.com>
parents:
11692
diff
changeset
|
222 |
local baseTime = 0 |
d79621bcb709
Save record time for Chasing the blue hog mission
Wuzzy <almikes@aol.com>
parents:
11692
diff
changeset
|
223 |
for i=1, #runner.places do |
d79621bcb709
Save record time for Chasing the blue hog mission
Wuzzy <almikes@aol.com>
parents:
11692
diff
changeset
|
224 |
baseTime = baseTime + runner.places[i].turnTime |
d79621bcb709
Save record time for Chasing the blue hog mission
Wuzzy <almikes@aol.com>
parents:
11692
diff
changeset
|
225 |
end |
d79621bcb709
Save record time for Chasing the blue hog mission
Wuzzy <almikes@aol.com>
parents:
11692
diff
changeset
|
226 |
winningTime = baseTime - TurnTimeLeft |
d79621bcb709
Save record time for Chasing the blue hog mission
Wuzzy <almikes@aol.com>
parents:
11692
diff
changeset
|
227 |
SendStat(siCustomAchievement, string.format(loc("You have managed to catch the blue hedgehog in %.3f seconds."), winningTime/1000)) |
d79621bcb709
Save record time for Chasing the blue hog mission
Wuzzy <almikes@aol.com>
parents:
11692
diff
changeset
|
228 |
local record = tonumber(GetCampaignVar("FastestBlueHogCatch")) |
d79621bcb709
Save record time for Chasing the blue hog mission
Wuzzy <almikes@aol.com>
parents:
11692
diff
changeset
|
229 |
if record ~= nil and winningTime >= record then |
d79621bcb709
Save record time for Chasing the blue hog mission
Wuzzy <almikes@aol.com>
parents:
11692
diff
changeset
|
230 |
SendStat(siCustomAchievement, string.format(loc("Your personal best time so far: %.3f seconds"), record/1000)) |
d79621bcb709
Save record time for Chasing the blue hog mission
Wuzzy <almikes@aol.com>
parents:
11692
diff
changeset
|
231 |
end |
d79621bcb709
Save record time for Chasing the blue hog mission
Wuzzy <almikes@aol.com>
parents:
11692
diff
changeset
|
232 |
if record == nil or winningTime < record then |
d79621bcb709
Save record time for Chasing the blue hog mission
Wuzzy <almikes@aol.com>
parents:
11692
diff
changeset
|
233 |
SaveCampaignVar("FastestBlueHogCatch", tostring(winningTime)) |
d79621bcb709
Save record time for Chasing the blue hog mission
Wuzzy <almikes@aol.com>
parents:
11692
diff
changeset
|
234 |
if record ~= nil then |
d79621bcb709
Save record time for Chasing the blue hog mission
Wuzzy <almikes@aol.com>
parents:
11692
diff
changeset
|
235 |
SendStat(siCustomAchievement, loc("This is a new personal best time, congratulations!")) |
d79621bcb709
Save record time for Chasing the blue hog mission
Wuzzy <almikes@aol.com>
parents:
11692
diff
changeset
|
236 |
end |
d79621bcb709
Save record time for Chasing the blue hog mission
Wuzzy <almikes@aol.com>
parents:
11692
diff
changeset
|
237 |
end |
d79621bcb709
Save record time for Chasing the blue hog mission
Wuzzy <almikes@aol.com>
parents:
11692
diff
changeset
|
238 |
|
12467
de69155f976b
Use new turn ending method in moon02.lua
Wuzzy <almikes@aol.com>
parents:
12088
diff
changeset
|
239 |
EndTurn(true) |
9772
30a9e740ec09
moon02 fixes: bug that didn't called win(), changed map so blue hog not placed on edges, teleport animations, removed amSkip, also error when drow hero and enemy seems fixed
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9758
diff
changeset
|
240 |
elseif currentPosition < 4 then |
9613
142ba1d08205
cleanup - removed debug prints
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9612
diff
changeset
|
241 |
if not startChallenge then |
142ba1d08205
cleanup - removed debug prints
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9612
diff
changeset
|
242 |
startChallenge = true |
142ba1d08205
cleanup - removed debug prints
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9612
diff
changeset
|
243 |
end |
142ba1d08205
cleanup - removed debug prints
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9612
diff
changeset
|
244 |
AddAmmo(hero.gear, amRope, 1) |
142ba1d08205
cleanup - removed debug prints
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9612
diff
changeset
|
245 |
if currentPosition ~= 1 then |
142ba1d08205
cleanup - removed debug prints
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9612
diff
changeset
|
246 |
PlaySound(sndVictory) |
142ba1d08205
cleanup - removed debug prints
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9612
diff
changeset
|
247 |
if currentPosition > 1 and currentPosition < 4 then |
11692
68eddcdc9f26
Typo fixes for A Space Adventure campaign
Wuzzy <almikes@aol.com>
parents:
11492
diff
changeset
|
248 |
AnimCaption(hero.gear, loc("Go, get him again!"), 3000) |
68eddcdc9f26
Typo fixes for A Space Adventure campaign
Wuzzy <almikes@aol.com>
parents:
11492
diff
changeset
|
249 |
AnimSay(runner.gear, loc("You got me!"), SAY_SAY, 3000) |
9613
142ba1d08205
cleanup - removed debug prints
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9612
diff
changeset
|
250 |
end |
142ba1d08205
cleanup - removed debug prints
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9612
diff
changeset
|
251 |
previousTimeLeft = TurnTimeLeft |
142ba1d08205
cleanup - removed debug prints
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9612
diff
changeset
|
252 |
end |
142ba1d08205
cleanup - removed debug prints
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9612
diff
changeset
|
253 |
currentPosition = currentPosition + 1 |
9772
30a9e740ec09
moon02 fixes: bug that didn't called win(), changed map so blue hog not placed on edges, teleport animations, removed amSkip, also error when drow hero and enemy seems fixed
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9758
diff
changeset
|
254 |
AddVisualGear(GetX(runner.gear), GetY(runner.gear), vgtExplosion, 0, false) |
9613
142ba1d08205
cleanup - removed debug prints
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9612
diff
changeset
|
255 |
SetGearPosition(runner.gear, runner.places[currentPosition].x, runner.places[currentPosition].y) |
12467
de69155f976b
Use new turn ending method in moon02.lua
Wuzzy <almikes@aol.com>
parents:
12088
diff
changeset
|
256 |
EndTurn(true) |
9612 | 257 |
end |
9611
ef374528a9fb
moon side mission map and most of the logic
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
258 |
end |
9612 | 259 |
|
260 |
function lose() |
|
11692
68eddcdc9f26
Typo fixes for A Space Adventure campaign
Wuzzy <almikes@aol.com>
parents:
11492
diff
changeset
|
261 |
SendStat(siGameResult, loc("Too slow! Try again ...")) |
68eddcdc9f26
Typo fixes for A Space Adventure campaign
Wuzzy <almikes@aol.com>
parents:
11492
diff
changeset
|
262 |
SendStat(siCustomAchievement, loc("You have to catch the other hog 3 times.")) |
68eddcdc9f26
Typo fixes for A Space Adventure campaign
Wuzzy <almikes@aol.com>
parents:
11492
diff
changeset
|
263 |
SendStat(siCustomAchievement, loc("The time that you have left when you reach the blue hedgehog will be added to the next turn.")) |
68eddcdc9f26
Typo fixes for A Space Adventure campaign
Wuzzy <almikes@aol.com>
parents:
11492
diff
changeset
|
264 |
SendStat(siCustomAchievement, loc("Each turn you'll have only one rope to use.")) |
68eddcdc9f26
Typo fixes for A Space Adventure campaign
Wuzzy <almikes@aol.com>
parents:
11492
diff
changeset
|
265 |
SendStat(siCustomAchievement, loc("You'll lose if you die or if your time is up.")) |
12538
952afc3d2df2
Show correct kill counts in all ASA missions (fixes #147)
Wuzzy <almikes@aol.com>
parents:
12515
diff
changeset
|
266 |
sendSimpleTeamRankings({teamB.name, teamA.name}) |
9612 | 267 |
EndGame() |
268 |
end |
|
269 |
||
9613
142ba1d08205
cleanup - removed debug prints
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9612
diff
changeset
|
270 |
function win() |
9642
8a691e0f117a
use consts for TStatInfo enum
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9615
diff
changeset
|
271 |
SendStat(siGameResult, loc("Congratulations, you are the fastest!")) |
11891
d79621bcb709
Save record time for Chasing the blue hog mission
Wuzzy <almikes@aol.com>
parents:
11692
diff
changeset
|
272 |
-- siCustomAchievements were added earlier |
12538
952afc3d2df2
Show correct kill counts in all ASA missions (fixes #147)
Wuzzy <almikes@aol.com>
parents:
12515
diff
changeset
|
273 |
sendSimpleTeamRankings({teamA.name, teamB.name}) |
11952
63988f36debf
Save mission success for A Space Adventure missions
Wuzzy <almikes@aol.com>
parents:
11891
diff
changeset
|
274 |
SaveCampaignVar("Mission13Won", "true") |
11965
72be38f6d0c0
Complete space campaign's spacetrip mission if all main+side missions are completed
Wuzzy <almikes@aol.com>
parents:
11952
diff
changeset
|
275 |
checkAllMissionsCompleted() |
9613
142ba1d08205
cleanup - removed debug prints
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9612
diff
changeset
|
276 |
EndGame() |
9612 | 277 |
end |