merge
Disable SuddenDeath on Missions
Fix hats for Missions
Add achievement "Lively Lifeguard" for "That Sinking Feeling"
--- a/hedgewars/HHHandlers.inc Fri Sep 09 03:22:08 2011 +0200
+++ b/hedgewars/HHHandlers.inc Fri Sep 09 03:57:45 2011 +0200
@@ -1012,7 +1012,7 @@
////////////////////////////////////////////////////////////////////////////////
procedure doStepHedgehogFree(Gear: PGear);
-var prevState: Longword;
+var prevState,i: Longword;
begin
prevState:= Gear^.State;
@@ -1050,6 +1050,19 @@
begin
Gear^.State:= Gear^.State or gstHHGone;
Gear^.doStep:= @doStepHedgehogGone;
+
+ with Gear^.Hedgehog^.Team^ do
+ for i:= 0 to cMaxHHIndex do
+ if Hedgehogs[i].GearHidden <> nil then
+ begin
+ RestoreHog(@Hedgehogs[i]);
+ if Hedgehogs[i].Gear <> nil then
+ begin
+ Hedgehogs[i].Gear^.State:= Gear^.State or gstHHGone;
+ Hedgehogs[i].Gear^.doStep:= @doStepHedgehogGone
+ end
+ end;
+
// Gone message
AddCaption(Format(GetEventString(eidGone), Gear^.Hedgehog^.Name), cWhiteColor, capgrpMessage);
end
--- a/hedgewars/uTeams.pas Fri Sep 09 03:22:08 2011 +0200
+++ b/hedgewars/uTeams.pas Fri Sep 09 03:57:45 2011 +0200
@@ -529,9 +529,6 @@
with TeamsArray[t]^ do
begin
AddChatString('** '+ TeamName + ' is gone');
- for i:= 0 to cMaxHHIndex do
- if Hedgehogs[i].GearHidden <> nil then
- RestoreHog(@Hedgehogs[i]);
hasGone:= true
end;
--- a/share/hedgewars/Data/Missions/Training/User_Mission_-_Bamboo_Thicket.lua Fri Sep 09 03:22:08 2011 +0200
+++ b/share/hedgewars/Data/Missions/Training/User_Mission_-_Bamboo_Thicket.lua Fri Sep 09 03:57:45 2011 +0200
@@ -18,12 +18,13 @@
Explosives = 0
Map = "Bamboo"
Theme = "Bamboo"
+ SuddenDeathTurns = 99999
AddTeam(loc("Pathetic Resistance"), 14483456, "Simple", "Island", "Default")
player = AddHog("Ikeda", 0, 10, "StrawHat")
AddTeam(loc("Cybernetic Empire"), 1175851, "Simple", "Island", "Default")
- enemy = AddHog(loc("Unit 835"), 1, 10, "cyborg")
+ enemy = AddHog(loc("Unit 835"), 1, 10, "cyborg1")
SetGearPosition(player,1166,1680)
SetGearPosition(enemy,2848,1443)
--- a/share/hedgewars/Data/Missions/Training/User_Mission_-_Dangerous_Ducklings.lua Fri Sep 09 03:22:08 2011 +0200
+++ b/share/hedgewars/Data/Missions/Training/User_Mission_-_Dangerous_Ducklings.lua Fri Sep 09 03:57:45 2011 +0200
@@ -28,13 +28,14 @@
Delay = 0 -- The delay between each round
Map = "Bath" -- The map to be played
Theme = "Bath" -- The theme to be used
+ SuddenDeathTurns = 99999
AddTeam(loc("Bloody Rookies"), 14483456, "Simple", "Island", "Default")
player = AddHog(loc("Hunter"), 0, 1, "NoHat")
--AddTeam("Instructors", 14483456, "Simple", "Island", "Default")
- instructor = AddHog(loc("Instructor"), 1, 1, "Vega")
+ instructor = AddHog(loc("Instructor"), 1, 1, "sf_vega")
AddTeam("Blue Team", 29439, "Simple", "Island", "Default")
enemy = AddHog("Filthy Blue", 1, 100, "Skull")
--- a/share/hedgewars/Data/Missions/Training/User_Mission_-_Diver.lua Fri Sep 09 03:22:08 2011 +0200
+++ b/share/hedgewars/Data/Missions/Training/User_Mission_-_Diver.lua Fri Sep 09 03:57:45 2011 +0200
@@ -20,6 +20,7 @@
Delay = 10 -- The delay between each round
Map = "Hydrant" -- The map to be played
Theme = "City" -- The theme to be used
+ SuddenDeathTurns = 99999
AddTeam(loc("Bloody Rookies"), 14483456, "Simple", "Island", "Default")
player = AddHog(loc("Hunter"), 0, 1, "NoHat")
--- a/share/hedgewars/Data/Missions/Training/User_Mission_-_Newton_and_the_Hammock.lua Fri Sep 09 03:22:08 2011 +0200
+++ b/share/hedgewars/Data/Missions/Training/User_Mission_-_Newton_and_the_Hammock.lua Fri Sep 09 03:57:45 2011 +0200
@@ -25,7 +25,7 @@
player = AddHog("Ikeda", 0, 48, "StrawHat")
AddTeam(loc("Cybernetic Empire"), 1175851, "Simple", "Island", "Default")
- enemy = AddHog(loc("Unit") .. " 811", 1, 100, "cyborg")
+ enemy = AddHog(loc("Unit") .. " 811", 1, 100, "cyborg1")
SetGearPosition(player, 1454, 1540)
SetGearPosition(enemy, 2488, 1960)
--- a/share/hedgewars/Data/Missions/Training/User_Mission_-_Spooky_Tree.lua Fri Sep 09 03:22:08 2011 +0200
+++ b/share/hedgewars/Data/Missions/Training/User_Mission_-_Spooky_Tree.lua Fri Sep 09 03:57:45 2011 +0200
@@ -26,6 +26,7 @@
Delay = 10 -- The delay between each round
Map = "Tree" -- The map to be played
Theme = "Halloween" -- The theme to be used
+ SuddenDeathTurns = 99999
AddTeam(loc("Bloody Rookies"), 14483456, "Simple", "Island", "Default")
player = AddHog(loc("Hunter"), 0, 1, "NoHat")
--- a/share/hedgewars/Data/Missions/Training/User_Mission_-_Teamwork.lua Fri Sep 09 03:22:08 2011 +0200
+++ b/share/hedgewars/Data/Missions/Training/User_Mission_-_Teamwork.lua Fri Sep 09 03:57:45 2011 +0200
@@ -12,7 +12,6 @@
-- Things we don't modify here will use their default values.
Seed = 0 -- The base number for the random number generator
GameFlags = gfDisableWind-- Game settings and rules
- SuddenDeathTurns = 9999
TurnTime = 30000 -- The time the player has to move each round (in ms)
CaseFreq = 0 -- The frequency of crate drops
MinesNum = 0 -- The number of mines being placed
@@ -21,6 +20,7 @@
Delay = 10 -- The delay between each round
Map = "Mushrooms" -- The map to be played
Theme = "Nature" -- The theme to be used
+ SuddenDeathTurns = 99999
AddTeam(loc("Feeble Resistance"), 14483456, "Simple", "Island", "Default")
player = AddHog(string.format(loc("Pathetic Hog #%d"), 1), 0, 50, "NoHat")
@@ -28,7 +28,7 @@
--AddTeam("Toxic Team", 1175851, "Simple", "Island", "Robot","cm_binary")
AddTeam(loc("Cybernetic Empire"), 1175851, "Simple", "Island", "Robot", "cm_binary")
- enemy = AddHog(loc("Unit 3378"), 5, 30, "cyborg")
+ enemy = AddHog(loc("Unit 3378"), 5, 30, "cyborg1")
SetGearPosition(player, 2427, 1259)
SetGearPosition(p2, 2293, 1263)
--- 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