Grenade Training: Add warm-up sequence, introduce timer in separate mission panel
authorWuzzy <Wuzzy2@mail.ru>
Wed, 28 Mar 2018 14:06:34 +0200
changeset 13290 a3b07219a091
parent 13289 6927e51acaef
child 13291 31615a2e0db1
Grenade Training: Add warm-up sequence, introduce timer in separate mission panel
share/hedgewars/Data/Locale/de.lua
share/hedgewars/Data/Locale/stub.lua
share/hedgewars/Data/Missions/Training/Basic_Training_-_Grenade.lua
--- a/share/hedgewars/Data/Locale/de.lua	Wed Mar 28 01:22:53 2018 +0200
+++ b/share/hedgewars/Data/Locale/de.lua	Wed Mar 28 14:06:34 2018 +0200
@@ -2344,7 +2344,7 @@
 ["Those aliens are destroying the island!"]="Diese Außerirdischen zerstören die Insel!",
 ["Those were scheduled for disposal anyway."] = "Sie waren eh für den Schrottplatz bestimmt.", -- A_Classic_Fairytale:dragon
 ["Throw a baseball at your foes|and send them flying!"] = "Wirf einen Baseball auf deine|Gegner und lass sie fliegen!", -- Knockball
-["Throw some grenades to destroy the targets!"] = "Wirf ein paar Granaten, um die Zielscheiben zu zerstören!", -- Basic_Training_-_Grenade
+["Throw a grenade to destroy the target!"] = "Wirf eine Granate, um die Zielscheibe zu zerstören!", -- Basic_Training_-_Grenade
 ["Thug #%d"] = "Rowdy %d", -- A_Space_Adventure:death01
 ["thug"]="Rowdy",
 ["Timbers"] = "Holz", -- 
@@ -2355,6 +2355,7 @@
 ["Time extended! +%dsec"] = "Zeitbonus! +%ds", -- Space_Invasion
 ["Time extension: %ds"] = "Zeitbonus: %ds", -- Tumbler
 ["Time for a more interesting stunt, but first just collect the next crate!"] = "Zeit für einen interessanteren Stunt, aber sammle zuerst die nächste Kiste auf!", -- Basic_Training_-_Flying_Saucer
+["Timer"] = "Zeitzünder", -- Basic_Training_-_Grenade
 ["Time's up!"]="Die Zeit ist um!",
 ["Time’s up!"]="Die Zeit ist um!",
 ["Time to run!"]="Zeit, zu fliehen!",
@@ -2763,6 +2764,7 @@
 ["You can always trust me!"] = "Du kannst mir immer vertrauen!", -- A_Classic_Fairytale:epil
 ["You can always trust me! I love you!"] = "Du kannst mir immer vertrauen! Ich liebe dich!", -- A_Classic_Fairytale:epil
 ["You can avoid some battles."]="Du kannst einige Kämpfe vermeiden.",
+["You can change the detonation timer of grenades."] = "Du kannst den Zeitzünder von Granaten einstellen.", -- Basic_Training_-_Grenade
 ["You can choose another planet by replaying this mission."]="Du kannst einen anderen Planeten auswählen, indem du diese Mission erneut spielst.",
 ["You can dive with your flying saucer!"] = "Mit deiner fliegenden Untertasse kannst du abtauchen!", -- Basic_Training_-_Flying_Saucer
 ["You can even change your aiming direction in mid-flight if you first hold [Precice] and then press [Up] or [Down]."] = "Du kannst sogar deine Zielrichtung im Flug ändern, wenn du|zuerst [Genaues Zielen] gedrückt hälst, und dann [Hoch] oder [Runter] drückst.", -- Basic_Training_-_Flying_Saucer
--- a/share/hedgewars/Data/Locale/stub.lua	Wed Mar 28 01:22:53 2018 +0200
+++ b/share/hedgewars/Data/Locale/stub.lua	Wed Mar 28 14:06:34 2018 +0200
@@ -2211,7 +2211,7 @@
 --      ["Those aliens are destroying the island!"] = "", -- A_Classic_Fairytale:family
 --      ["Those were scheduled for disposal anyway."] = "", -- A_Classic_Fairytale:dragon
 --      ["Throw a baseball at your foes|and send them flying!"] = "", -- Knockball
---      ["Throw some grenades to destroy the targets!"] = "", -- Basic_Training_-_Grenade
+--      ["Throw a grenade to destroy the target!"] = "", -- Basic_Training_-_Grenade
 --      ["Thug #%d"] = "", -- A_Space_Adventure:death01
 --      ["Timbers"] = "", -- 
 --      ["Time: %.1fs"] = "", -- Racer, TechRacer
@@ -2221,6 +2221,7 @@
 --      ["Time extended! +%dsec"] = "", -- Space_Invasion
 --      ["Time extension: %ds"] = "", -- Tumbler
 --      ["Time for a more interesting stunt, but first just collect the next crate!"] = "", -- Basic_Training_-_Flying_Saucer
+--      ["Timer"] = "", -- Basic_Training_-_Grenade
 --      ["Time's up!"] = "", -- Basic_Training_-_Sniper_Rifle
 --      ["Time’s up!"] = "", -- TargetPractice
 --      ["Time to run!"] = "", -- A_Space_Adventure:fruit01
@@ -2593,6 +2594,7 @@
 --      ["You can always trust me!"] = "", -- A_Classic_Fairytale:epil
 --      ["You can always trust me! I love you!"] = "", -- A_Classic_Fairytale:epil
 --      ["You can avoid some battles."] = "", -- A_Space_Adventure:desert01
+--      ["You can change the detonation timer of grenades."] = "", -- Basic_Training_-_Grenade
 --      ["You can choose another planet by replaying this mission."] = "", -- A_Space_Adventure:cosmos
 --      ["You can dive with your flying saucer!"] = "", -- Basic_Training_-_Flying_Saucer
 --      ["You can even change your aiming direction in mid-flight if you first hold [Precice] and then press [Up] or [Down]."] = "", -- Basic_Training_-_Flying_Saucer
--- a/share/hedgewars/Data/Missions/Training/Basic_Training_-_Grenade.lua	Wed Mar 28 01:22:53 2018 +0200
+++ b/share/hedgewars/Data/Missions/Training/Basic_Training_-_Grenade.lua	Wed Mar 28 14:06:34 2018 +0200
@@ -80,22 +80,25 @@
 local function spawnTargets()
 	-- Warm-up
 	if gamePhase == 0 then
+		AddGear(882, 39, gtTarget, 0, 0, 0, 0)
+	-- Timer
+	elseif gamePhase == 2 then
 		AddGear(233, 97, gtTarget, 0, 0, 0, 0)
 		AddGear(333, 255, gtTarget, 0, 0, 0, 0)
 		AddGear(753, 225, gtTarget, 0, 0, 0, 0)
 	-- No Wind
-	elseif gamePhase == 2 then
+	elseif gamePhase == 3 then
+		AddGear(15, 240, gtTarget, 0, 0, 0, 0)
 		AddGear(61, 9, gtTarget, 0, 0, 0, 0)
-		AddGear(882, 39, gtTarget, 0, 0, 0, 0)
 		AddGear(945, 498, gtTarget, 0, 0, 0, 0)
 	-- Bounciness
-	elseif gamePhase == 3 then
+	elseif gamePhase == 4 then
 		AddGear(323, 960, gtTarget, 0, 0, 0, 0)
 		AddGear(1318, 208, gtTarget, 0, 0, 0, 0)
 		AddGear(1697, 250, gtTarget, 0, 0, 0, 0)
 		AddGear(1852, 100, gtTarget, 0, 0, 0, 0)
 	-- Grand Final
-	elseif gamePhase == 4 then
+	elseif gamePhase == 5 then
 		AddGear(186, 473, gtTarget, 0, 0, 0, 0)
 		AddGear(950, 250, gtTarget, 0, 0, 0, 0)
 		AddGear(1102, 345, gtTarget, 0, 0, 0, 0)
@@ -117,20 +120,24 @@
 		loc("Select weapon: [Left click]"), 2, 5000)
 	elseif gamePhase == 1 then
 		ShowMission(loc("Basic Grenade Training"), loc("Warming Up"),
-		loc("Throw some grenades to destroy the targets!").."|"..
+		loc("Throw a grenade to destroy the target!").."|"..
 		loc("Hold the Attack key pressed for more power.").."|"..
-		loc("Grenades explode after 1 to 5 seconds (you decide).").."|"..
 		loc("Attack: [Space]").."|"..
 		loc("Aim: [Up]/[Down]").."|"..
-		loc("Set detonation timer: [1]-[5]").."|"..
 		loc("Change direction: [Left]/[Right]"), 2, 20000)
 		spawnTargets()
 	elseif gamePhase == 2 then
+		ShowMission(loc("Basic Grenade Training"), loc("Timer"),
+		loc("You can change the detonation timer of grenades.").."|"..
+		loc("Grenades explode after 1 to 5 seconds (you decide).").."|"..
+		loc("Set detonation timer: [1]-[5]"), 2, 15000)
+		spawnTargets()
+	elseif gamePhase == 3 then
 		ShowMission(loc("Basic Grenade Training"), loc("No Wind Influcence"), loc("Unlike bazookas, grenades are not influenced by wind.").."|"..
 		loc("Destroy the targets!"), 2, 6000)
 		SetWind(50)
 		spawnTargets()
-	elseif gamePhase == 3 then
+	elseif gamePhase == 4 then
 		ShowMission(loc("Basic Grenade Training"), loc("Bounciness"),
 		loc("You can set the bounciness of grenades (and grenade-like weapons).").."|"..
 		loc("Grenades with high bounciness bounce a lot and behave chaotic.").."|"..
@@ -139,12 +146,12 @@
 		loc("Set bounciness: [Left Shift] + [1]-[5]"),
 		2, 20000)
 		spawnTargets()
-	elseif gamePhase == 4 then
+	elseif gamePhase == 5 then
 		ShowMission(loc("Basic Grenade Training"), loc("Final Targets"), loc("Good job! Now destroy the final targets to finish the training.").."|"..
 		loc("Precise Aim: [Left Shift] + [Up]/[Down]"),
 		2, 7000)
 		spawnTargets()
-	elseif gamePhase == 5 then
+	elseif gamePhase == 6 then
 		ShowMission(loc("Basic Grenade Training"), loc("Training complete!"), loc("Congratulations!"), 0, 0)
 		SetInputMask(0)
 		AddAmmo(CurrentHedgehog, amGrenade, 0)