Modified Animate.lua function AnimMove to take highercase direction (e.g. "Left")
Solved a bug in Mission 4 where after the second wave appears, control went to the cannibals
Changed random seed to 1
--- a/share/hedgewars/Data/Missions/Campaign/A Classic Fairytale/first_blood.lua Fri Jul 06 14:45:55 2012 +0300
+++ b/share/hedgewars/Data/Missions/Campaign/A Classic Fairytale/first_blood.lua Fri Jul 06 15:10:36 2012 +0300
@@ -124,7 +124,7 @@
table.insert(onShroomAnim, {func = AnimSay, args = {elderh, loc("I can see you have been training diligently."), SAY_SAY, 4000}, skipFunc = Skipanim, skipArgs = onShroomAnim})
table.insert(onShroomAnim, {func = AnimSay, args = {elderh, loc("The wind whispers that you are ready to become familiar with tools, now..."), SAY_SAY, 4000}})
table.insert(onShroomAnim, {func = AnimSay, args = {elderh, loc("Open that crate and we will continue!"), SAY_SAY, 5000}})
- table.insert(onShroomAnim, {func = AnimMove, args = {elderh, "right", 2700, 0}})
+ table.insert(onShroomAnim, {func = AnimMove, args = {elderh, "Right", 2700, 0}})
table.insert(onShroomAnim, {func = AnimTurn, args = {elderh, "Left"}})
table.insert(onShroomAnim, {func = AnimSay, args = {princess, loc("He moves like an eagle in the sky."), SAY_THINK, 4000}})
table.insert(onShroomAnim, {func = AnimSwitchHog, args = {youngh}})
--- a/share/hedgewars/Data/Missions/Campaign/A Classic Fairytale/journey.lua Fri Jul 06 14:45:55 2012 +0300
+++ b/share/hedgewars/Data/Missions/Campaign/A Classic Fairytale/journey.lua Fri Jul 06 15:10:36 2012 +0300
@@ -408,7 +408,7 @@
function SetupAnimAcceptedDied()
table.insert(startAnimAD, {func = AnimWait, args = {leaks, 3000}})
- table.insert(startAnimAD, {func = AnimTurn, args = {leaks, "left"}})
+ table.insert(startAnimAD, {func = AnimTurn, args = {leaks, "Left"}})
table.insert(startAnimAD, {func = AnimSay, args = {leaks, loc("I need to get to the other side of this island, fast!"), SAY_THINK, 5000}})
table.insert(startAnimAD, {func = AnimSay, args = {leaks, loc("With Dense Cloud on the land of shadows, I'm the village's only hope..."), SAY_THINK, 7000}})
--- a/share/hedgewars/Data/Missions/Campaign/A Classic Fairytale/shadow.lua Fri Jul 06 14:45:55 2012 +0300
+++ b/share/hedgewars/Data/Missions/Campaign/A Classic Fairytale/shadow.lua Fri Jul 06 15:10:36 2012 +0300
@@ -260,7 +260,7 @@
function EmitDenseClouds(anim, dir)
local dif
- if dir == "left" then
+ if dir == "Left" then
dif = 10
else
dif = -10
@@ -313,7 +313,7 @@
table.insert(startDialogue, {func = AnimCaption, args = {leaks, loc("Little did they know that this hunt will mark them forever..."), 4000}})
table.insert(startDialogue, {func = AnimSay, args = {leaks, loc("I have no idea where that mole disappeared...Can you see it?"), SAY_SAY, 9000}})
table.insert(startDialogue, {func = AnimSay, args = {dense, loc("Nope. It was one fast mole, that's for sure."), SAY_SAY, 5000}})
- table.insert(startDialogue, {func = AnimCustomFunction, args = {dense, EmitDenseClouds, {startDialogue, "right"}}})
+ table.insert(startDialogue, {func = AnimCustomFunction, args = {dense, EmitDenseClouds, {startDialogue, "Right"}}})
table.insert(startDialogue, {func = AnimWait, args = {dense, 2000}})
table.insert(startDialogue, {func = AnimSay, args = {leaks, loc("Please, stop releasing your \"smoke signals\"!"), SAY_SAY, 5000}})
table.insert(startDialogue, {func = AnimSay, args = {leaks, loc("You're terrorizing the forest...We won't catch anything like this!"), SAY_SAY, 6000}})
@@ -388,9 +388,9 @@
table.insert(stronglingsAnim, {func = AnimCaption, args = {cyborg, loc("30 minutes later...")}, swh = false})
table.insert(stronglingsAnim, {func = AnimWait, args = {cyborg, 2000}})
table.insert(stronglingsAnim, {func = AnimSetGearPosition, args = {dense, 1420, 1315}})
- table.insert(stronglingsAnim, {func = AnimMove, args = {dense, "left", 1400, 0}})
- table.insert(stronglingsAnim, {func = AnimCustomFunction, args = {dense, EmitDenseClouds, {stronglingsAnim, "left"}}})
- table.insert(stronglingsAnim, {func = AnimMove, args = {dense, "left", 1350, 0}})
+ table.insert(stronglingsAnim, {func = AnimMove, args = {dense, "Left", 1400, 0}})
+ table.insert(stronglingsAnim, {func = AnimCustomFunction, args = {dense, EmitDenseClouds, {stronglingsAnim, "Left"}}})
+ table.insert(stronglingsAnim, {func = AnimMove, args = {dense, "Left", 1350, 0}})
table.insert(stronglingsAnim, {func = AnimOutOfNowhere, args = {cyborg, 1250, 1320}})
table.insert(stronglingsAnim, {func = AnimRemoveState, args = {cyborg, gstInvisible}})
table.insert(stronglingsAnim, {func = AnimGearWait, args = {cyborg, 2000}})
@@ -430,11 +430,11 @@
table.insert(refusedAnim, {func = AnimOutOfNowhere, args = {dense, 2645, 1146}})
table.insert(refusedAnim, {func = AnimOutOfNowhere, args = {ramon, 2218, 1675}})
table.insert(refusedAnim, {func = AnimOutOfNowhere, args = {spiky, 2400, 1675}})
- table.insert(refusedAnim, {func = AnimTurn, args = {spiky, "left"}})
+ table.insert(refusedAnim, {func = AnimTurn, args = {spiky, "Left"}})
table.insert(refusedAnim, {func = AnimWait, args = {cyborg, 1700}})
- table.insert(refusedAnim, {func = AnimTurn, args = {spiky, "right"}})
+ table.insert(refusedAnim, {func = AnimTurn, args = {spiky, "Right"}})
table.insert(refusedAnim, {func = AnimWait, args = {cyborg, 1700}})
- table.insert(refusedAnim, {func = AnimTurn, args = {spiky, "left"}})
+ table.insert(refusedAnim, {func = AnimTurn, args = {spiky, "Left"}})
table.insert(refusedAnim, {func = AnimSay, args = {spiky, loc("Dude, we really need a new shaman..."), SAY_SAY, 4000}})
AddSkipFunction(refusedAnim, SkipRefusedAnim, {})
@@ -518,12 +518,12 @@
for i = 2, 9 do
SetGearPosition(cannibals[i], unpack(cyborgPos))
- AnimTurn(cannibals[i], "left")
+ AnimTurn(cannibals[i], "Left")
cannibalDead[i] = false
end
SetGearPosition(cannibals[1], cannibalPos[1][1], cannibalPos[1][2])
- AnimTurn(cannibals[1], "left")
+ AnimTurn(cannibals[1], "Left")
SetGearPosition(cyborg, cyborgPos[1], cyborgPos[2])
SetGearPosition(ramon, 2218, 1675)
--- a/share/hedgewars/Data/Missions/Campaign/A Classic Fairytale/united.lua Fri Jul 06 14:45:55 2012 +0300
+++ b/share/hedgewars/Data/Missions/Campaign/A Classic Fairytale/united.lua Fri Jul 06 15:10:36 2012 +0300
@@ -79,9 +79,7 @@
end
function AfterWave2Anim()
- SetGearMessage(CurrentHegdgehog, 0)
- SetState(CurrentHedgehog, 0)
- TurnTimeLeft = TurnTime
+ TurnTimeLeft = 0
end
function AfterFinalAnim()
@@ -104,7 +102,7 @@
gearr = natives[i]
if denseDead ~= true and band(GetState(dense), gstDrowning) == 0 then
AnimInsertStepNext({func = AnimSay, args = {dense, loc("I'm so scared!"), SAY_SAY, 3000}})
- AnimInsertStepNext({func = AnimCustomFunction, args = {dense, EmitDenseClouds, {"left"}}})
+ AnimInsertStepNext({func = AnimCustomFunction, args = {dense, EmitDenseClouds, {"Left"}}})
AnimInsertStepNext({func = AnimTurn, args = {dense, "Left"}})
end
AnimInsertStepNext({func = AnimSay, args = {gearr, loc("There's more of them? When did they become so hungry?"), SAY_SHOUT, 8000}})
@@ -112,7 +110,7 @@
function EmitDenseClouds(dir)
local dif
- if dir == "left" then
+ if dir == "Left" then
dif = 10
else
dif = -10
@@ -154,14 +152,14 @@
table.insert(startAnim, {func = AnimWait, args = {leaks, 1000}})
table.insert(startAnim, {func = AnimSay, args = {chief, loc("First aid kits?!"), SAY_SAY, 3000}})
table.insert(startAnim, {func = AnimSay, args = {leaks, loc("I've seen this before. They just appear out of thin air."), SAY_SAY, 7000}})
- table.insert(startAnim, {func = AnimMove, args = {water, "left", 3000, 0}})
+ table.insert(startAnim, {func = AnimMove, args = {water, "Left", 3000, 0}})
table.insert(startAnim, {func = AnimJump, args = {water, "long"}})
- table.insert(startAnim, {func = AnimMove, args = {water, "left", 2655, 0}})
+ table.insert(startAnim, {func = AnimMove, args = {water, "Left", 2655, 0}})
table.insert(startAnim, {func = AnimTurn, args = {water, "Right"}})
table.insert(startAnim, {func = AnimJump, args = {water, "back"}})
table.insert(startAnim, {func = AnimJump, args = {water, "back"}})
table.insert(startAnim, {func = AnimTurn, args = {water, "Left"}})
- table.insert(startAnim, {func = AnimMove, args = {water, "left", 2467, 754}})
+ table.insert(startAnim, {func = AnimMove, args = {water, "Left", 2467, 754}})
table.insert(startAnim, {func = AnimSay, args = {water, loc("Hey guys!"), SAY_SAY, 2500}})
table.insert(startAnim, {func = AnimTurn, args = {chief, "Right"}})
table.insert(startAnim, {func = AnimSay, args = {chief, loc("..."), SAY_THINK, 1500}})
@@ -185,6 +183,7 @@
table.insert(wave2Anim, {func = AnimCustomFunction, args = {leaks, Wave2Reaction, {}}, swh = false})
table.insert(wave2Anim, {func = AnimCustomFunction, args = {leaks, SpawnCrates, {2}}, swh = false})
table.insert(wave2Anim, {func = AnimCustomFunction, args = {leaks, SpawnHealthCrates, {2}}, swh = false})
+ table.insert(wave2Anim, {func = AnimSwitchHog, args = {cannibals[5]}})
AddSkipFunction(wave2Anim, SkipWave2Anim, {})
end
@@ -377,7 +376,7 @@
-----------------------------Main Functions----------------------------
function onGameInit()
- Seed = 0
+ Seed = 1
GameFlags = 0
TurnTime = 60000
CaseFreq = 0