--- a/share/hedgewars/Data/Missions/Training/User_Mission_-_That_Sinking_Feeling.lua Fri Sep 09 03:22:08 2011 +0200
+++ b/share/hedgewars/Data/Missions/Training/User_Mission_-_That_Sinking_Feeling.lua Fri Sep 09 03:57:45 2011 +0200
@@ -10,6 +10,8 @@
local genCounter = 0
local waterCounter = 0
local waterPix = 0
+local frig = 0
+local watGear = nil
-- allow skipping of the intro via hitting precise key
function onPrecise()
@@ -34,19 +36,20 @@
Delay = 10
Map = "Islands"
Theme = "City"
+ SuddenDeathTurns = 1
AddTeam(loc("Nameless Heroes"), 14483456, "Simple", "Island", "Default")
player = AddHog(loc("The Nameless One"), 0, 1, "NoHat")
AddTeam(loc("Hapless Hogs"), 1175851, "Simple", "Island", "Default")
- hh[0] = AddHog(loc("Sinky"), 1, 100, "lemon")
- hh[1] = AddHog(loc("Drowner"), 1, 100, "orange")
- hh[2] = AddHog(loc("Heavy"), 1, 100, "Teapot")
- hh[3] = AddHog(loc("Clumsy"), 1, 100, "SauceBoatSilver")
- hh[4] = AddHog(loc("Silly"), 1, 100, "Ladle")
+ hh[0] = AddHog(loc("Sinky"), 1, 100, "fr_lemon")
+ hh[1] = AddHog(loc("Drowner"), 1, 100, "fr_orange")
+ hh[2] = AddHog(loc("Heavy"), 1, 100, "dish_Teapot")
+ hh[3] = AddHog(loc("Clumsy"), 1, 100, "dish_SauceBoatSilver")
+ hh[4] = AddHog(loc("Silly"), 1, 100, "dish_Ladle")
hh[5] = AddHog(loc("Careless"), 1, 100, "StrawHatEyes")
- hh[6] = AddHog(loc("Sponge"), 1, 100, "Chunli")
- hh[7] = AddHog(loc("Deadweight"), 1, 100, "Teacup")
+ hh[6] = AddHog(loc("Sponge"), 1, 100, "sf_chunli")
+ hh[7] = AddHog(loc("Deadweight"), 1, 100, "dish_Teacup")
SetGearPosition(player, 3992, 733)
SetGearPosition(hh[0], 938, 1369)
@@ -83,15 +86,26 @@
-- intro sequence
if introStage < 100 then
- AddCaption(loc("Press [Precise] to skip intro"))
+ frig = frig + 1
+ if frig == 50 then
+ frig = 0
+ AddCaption(loc("Press [Precise] to skip intro"))
+ if watGear ~= nil then
+ FollowGear(watGear)
+ end
+ end
+
+ --AddCaption(loc("Press [Precise] to skip intro"))
genCounter = genCounter + 1
if introStage == 0 then
- FollowGear(hh[0])
+
+ --FollowGear(hh[0])
if genCounter == 2000 then
+ watGear = hh[0]
HogSay(hh[0], loc("This rain is really something..."), SAY_SAY,2)
elseif genCounter == 5000 then
introStage = 1
@@ -99,10 +113,11 @@
end
elseif introStage == 1 then
-
- FollowGear(hh[1])
+
+ --FollowGear(hh[1])
if genCounter == 2000 then
+ watGear = hh[1]
HogSay(hh[1], loc("Heh, it's not that bad."), SAY_SAY,2)
elseif genCounter == 5000 then
introStage = 2
@@ -111,9 +126,10 @@
elseif introStage == 2 then
- FollowGear(hh[0])
+ --FollowGear(hh[0])
if genCounter == 2000 then
+ watGear = hh[0]
HogSay(hh[0], loc("You'd almost swear the water was rising!"), SAY_SHOUT,2)
elseif genCounter == 6000 then
introStage = 3
@@ -122,9 +138,10 @@
elseif introStage == 3 then
- FollowGear(hh[1])
+ --FollowGear(hh[1])
if genCounter == 2000 then
+ watGear = hh[1]
HogSay(hh[1], loc("Haha, now THAT would be something!"), SAY_SAY,2)
elseif genCounter == 6000 then
introStage = 4
@@ -133,9 +150,10 @@
elseif introStage == 4 then
- FollowGear(hh[0])
+ --FollowGear(hh[0])
if genCounter == 2000 then
+ watGear = hh[0]
HogSay(hh[0], loc("Hahahaha!"), SAY_SHOUT,2)
HogSay(hh[1], loc("Hahahaha!"), SAY_SHOUT,2)
elseif genCounter == 3000 then
@@ -145,9 +163,10 @@
elseif introStage == 5 then
- FollowGear(hh[1])
+ --FollowGear(hh[1])
if genCounter == 2000 then
+ watGear = hh[1]
HogSay(hh[0], loc("..."), SAY_THINK,2)
HogSay(hh[1], loc("..."), SAY_THINK,2)
elseif genCounter == 5000 then
@@ -157,9 +176,10 @@
elseif introStage == 6 then
- FollowGear(hh[0])
+ --FollowGear(hh[0])
if genCounter == 2000 then
+ watGear = hh[0]
HogSay(hh[0], loc("It's a good thing SUDDEN DEATH is 99 turns away..."), SAY_THINK,2)
elseif genCounter == 6000 then
introStage = 7
@@ -194,6 +214,11 @@
SetHealth(player, 0)
TurnTimeLeft = 1
ShowMission(loc("That Sinking Feeling"), loc("MISSION SUCCESS"), loc("You saved") .. " " .. hhCount .. " " .. loc("Hapless Hogs") .."!", 0, 0)
+
+ if hhCount == 8 then
+ AddCaption(loc("Achievement Unlocked") .. ": " .. loc("Lively Lifeguard"),0xffba00ff,capgrpMessage2)
+ end
+
end
end