78 end |
78 end |
79 |
79 |
80 local function spawnTargets() |
80 local function spawnTargets() |
81 -- Warm-up |
81 -- Warm-up |
82 if gamePhase == 0 then |
82 if gamePhase == 0 then |
|
83 AddGear(882, 39, gtTarget, 0, 0, 0, 0) |
|
84 -- Timer |
|
85 elseif gamePhase == 2 then |
83 AddGear(233, 97, gtTarget, 0, 0, 0, 0) |
86 AddGear(233, 97, gtTarget, 0, 0, 0, 0) |
84 AddGear(333, 255, gtTarget, 0, 0, 0, 0) |
87 AddGear(333, 255, gtTarget, 0, 0, 0, 0) |
85 AddGear(753, 225, gtTarget, 0, 0, 0, 0) |
88 AddGear(753, 225, gtTarget, 0, 0, 0, 0) |
86 -- No Wind |
89 -- No Wind |
87 elseif gamePhase == 2 then |
90 elseif gamePhase == 3 then |
|
91 AddGear(15, 240, gtTarget, 0, 0, 0, 0) |
88 AddGear(61, 9, gtTarget, 0, 0, 0, 0) |
92 AddGear(61, 9, gtTarget, 0, 0, 0, 0) |
89 AddGear(882, 39, gtTarget, 0, 0, 0, 0) |
|
90 AddGear(945, 498, gtTarget, 0, 0, 0, 0) |
93 AddGear(945, 498, gtTarget, 0, 0, 0, 0) |
91 -- Bounciness |
94 -- Bounciness |
92 elseif gamePhase == 3 then |
95 elseif gamePhase == 4 then |
93 AddGear(323, 960, gtTarget, 0, 0, 0, 0) |
96 AddGear(323, 960, gtTarget, 0, 0, 0, 0) |
94 AddGear(1318, 208, gtTarget, 0, 0, 0, 0) |
97 AddGear(1318, 208, gtTarget, 0, 0, 0, 0) |
95 AddGear(1697, 250, gtTarget, 0, 0, 0, 0) |
98 AddGear(1697, 250, gtTarget, 0, 0, 0, 0) |
96 AddGear(1852, 100, gtTarget, 0, 0, 0, 0) |
99 AddGear(1852, 100, gtTarget, 0, 0, 0, 0) |
97 -- Grand Final |
100 -- Grand Final |
98 elseif gamePhase == 4 then |
101 elseif gamePhase == 5 then |
99 AddGear(186, 473, gtTarget, 0, 0, 0, 0) |
102 AddGear(186, 473, gtTarget, 0, 0, 0, 0) |
100 AddGear(950, 250, gtTarget, 0, 0, 0, 0) |
103 AddGear(950, 250, gtTarget, 0, 0, 0, 0) |
101 AddGear(1102, 345, gtTarget, 0, 0, 0, 0) |
104 AddGear(1102, 345, gtTarget, 0, 0, 0, 0) |
102 AddGear(1556, 297, gtTarget, 0, 0, 0, 0) |
105 AddGear(1556, 297, gtTarget, 0, 0, 0, 0) |
103 end |
106 end |
115 ShowMission(loc("Basic Grenade Training"), loc("Select Weapon"), loc("To begin with the training, select the grenade from the ammo menu!").."|".. |
118 ShowMission(loc("Basic Grenade Training"), loc("Select Weapon"), loc("To begin with the training, select the grenade from the ammo menu!").."|".. |
116 loc("Open ammo menu: [Right click]").."|".. |
119 loc("Open ammo menu: [Right click]").."|".. |
117 loc("Select weapon: [Left click]"), 2, 5000) |
120 loc("Select weapon: [Left click]"), 2, 5000) |
118 elseif gamePhase == 1 then |
121 elseif gamePhase == 1 then |
119 ShowMission(loc("Basic Grenade Training"), loc("Warming Up"), |
122 ShowMission(loc("Basic Grenade Training"), loc("Warming Up"), |
120 loc("Throw some grenades to destroy the targets!").."|".. |
123 loc("Throw a grenade to destroy the target!").."|".. |
121 loc("Hold the Attack key pressed for more power.").."|".. |
124 loc("Hold the Attack key pressed for more power.").."|".. |
122 loc("Grenades explode after 1 to 5 seconds (you decide).").."|".. |
|
123 loc("Attack: [Space]").."|".. |
125 loc("Attack: [Space]").."|".. |
124 loc("Aim: [Up]/[Down]").."|".. |
126 loc("Aim: [Up]/[Down]").."|".. |
125 loc("Set detonation timer: [1]-[5]").."|".. |
|
126 loc("Change direction: [Left]/[Right]"), 2, 20000) |
127 loc("Change direction: [Left]/[Right]"), 2, 20000) |
127 spawnTargets() |
128 spawnTargets() |
128 elseif gamePhase == 2 then |
129 elseif gamePhase == 2 then |
|
130 ShowMission(loc("Basic Grenade Training"), loc("Timer"), |
|
131 loc("You can change the detonation timer of grenades.").."|".. |
|
132 loc("Grenades explode after 1 to 5 seconds (you decide).").."|".. |
|
133 loc("Set detonation timer: [1]-[5]"), 2, 15000) |
|
134 spawnTargets() |
|
135 elseif gamePhase == 3 then |
129 ShowMission(loc("Basic Grenade Training"), loc("No Wind Influcence"), loc("Unlike bazookas, grenades are not influenced by wind.").."|".. |
136 ShowMission(loc("Basic Grenade Training"), loc("No Wind Influcence"), loc("Unlike bazookas, grenades are not influenced by wind.").."|".. |
130 loc("Destroy the targets!"), 2, 6000) |
137 loc("Destroy the targets!"), 2, 6000) |
131 SetWind(50) |
138 SetWind(50) |
132 spawnTargets() |
139 spawnTargets() |
133 elseif gamePhase == 3 then |
140 elseif gamePhase == 4 then |
134 ShowMission(loc("Basic Grenade Training"), loc("Bounciness"), |
141 ShowMission(loc("Basic Grenade Training"), loc("Bounciness"), |
135 loc("You can set the bounciness of grenades (and grenade-like weapons).").."|".. |
142 loc("You can set the bounciness of grenades (and grenade-like weapons).").."|".. |
136 loc("Grenades with high bounciness bounce a lot and behave chaotic.").."|".. |
143 loc("Grenades with high bounciness bounce a lot and behave chaotic.").."|".. |
137 loc("With low bounciness, it barely bounces at all, but it is much more predictable.").."|".. |
144 loc("With low bounciness, it barely bounces at all, but it is much more predictable.").."|".. |
138 loc("Try out different bounciness levels to reach difficult targets.").."|".. |
145 loc("Try out different bounciness levels to reach difficult targets.").."|".. |
139 loc("Set bounciness: [Left Shift] + [1]-[5]"), |
146 loc("Set bounciness: [Left Shift] + [1]-[5]"), |
140 2, 20000) |
147 2, 20000) |
141 spawnTargets() |
148 spawnTargets() |
142 elseif gamePhase == 4 then |
149 elseif gamePhase == 5 then |
143 ShowMission(loc("Basic Grenade Training"), loc("Final Targets"), loc("Good job! Now destroy the final targets to finish the training.").."|".. |
150 ShowMission(loc("Basic Grenade Training"), loc("Final Targets"), loc("Good job! Now destroy the final targets to finish the training.").."|".. |
144 loc("Precise Aim: [Left Shift] + [Up]/[Down]"), |
151 loc("Precise Aim: [Left Shift] + [Up]/[Down]"), |
145 2, 7000) |
152 2, 7000) |
146 spawnTargets() |
153 spawnTargets() |
147 elseif gamePhase == 5 then |
154 elseif gamePhase == 6 then |
148 ShowMission(loc("Basic Grenade Training"), loc("Training complete!"), loc("Congratulations!"), 0, 0) |
155 ShowMission(loc("Basic Grenade Training"), loc("Training complete!"), loc("Congratulations!"), 0, 0) |
149 SetInputMask(0) |
156 SetInputMask(0) |
150 AddAmmo(CurrentHedgehog, amGrenade, 0) |
157 AddAmmo(CurrentHedgehog, amGrenade, 0) |
151 if shotsFired > maxTargets then |
158 if shotsFired > maxTargets then |
152 flawless = false |
159 flawless = false |