--- a/share/hedgewars/Data/Missions/Campaign/A Classic Fairytale/dragon.lua Thu Sep 06 15:47:52 2012 +0200
+++ b/share/hedgewars/Data/Missions/Campaign/A Classic Fairytale/dragon.lua Fri Sep 07 12:13:38 2012 +0200
@@ -168,7 +168,6 @@
killedAnim = {}
freshDead = nil
-retry = false
crates = {}
cratesNum = 0
jetCrate = nil
@@ -405,20 +404,6 @@
TurnTimeLeft = 0
end
-function DoRetry()
- AnimSetGearPosition(native, unpack(nativePos))
- for i = 1, cratesNum do
- if gearDead[crates[i]] ~= true then
- DeleteGear(crates[i])
- gearDead[crates[i]] = false
- end
- end
- SetupEvents()
- AddFunction({func = AfterStartAnim, args = {}})
- retry = false
-end
-
-
function CheckGearsDead(gearList)
for i = 1, # gearList do
if gearDead[gearList[i]] ~= true then
@@ -430,7 +415,7 @@
function CheckGearDead(gear)
- return gearDead[gear] and retry == false
+ return gearDead[gear]
end
function EndMission()
@@ -479,6 +464,31 @@
end
HideHedge(cyborg)
jetCrate = SpawnUtilityCrate(3915, 1723, amJetpack)
+
+ SetTimer(AddGear(1071, 1913, gtMine, 0, 0, 0, 0), 5000)
+ SetTimer(AddGear(1098, 1919, gtMine, 0, 0, 0, 0), 5000)
+ SetTimer(AddGear(1136, 1923, gtMine, 0, 0, 0, 0), 5000)
+ SetTimer(AddGear(1170, 1930, gtMine, 0, 0, 0, 0), 5000)
+ SetTimer(AddGear(1203, 1924, gtMine, 0, 0, 0, 0), 5000)
+ SetTimer(AddGear(1228, 1939, gtMine, 0, 0, 0, 0), 5000)
+ SetTimer(AddGear(1264, 1931, gtMine, 0, 0, 0, 0), 5000)
+ SetTimer(AddGear(1309, 1938, gtMine, 0, 0, 0, 0), 5000)
+ SetTimer(AddGear(1352, 1936, gtMine, 0, 0, 0, 0), 5000)
+ SetTimer(AddGear(1386, 1939, gtMine, 0, 0, 0, 0), 5000)
+ SetTimer(AddGear(1432, 1942, gtMine, 0, 0, 0, 0), 5000)
+ SetTimer(AddGear(1483, 1950, gtMine, 0, 0, 0, 0), 5000)
+ SetTimer(AddGear(1530, 1954, gtMine, 0, 0, 0, 0), 5000)
+ SetTimer(AddGear(1579, 1959, gtMine, 0, 0, 0, 0), 5000)
+ SetTimer(AddGear(1000, 1903, gtMine, 0, 0, 0, 0), 5000)
+ SetTimer(AddGear(957, 1903, gtMine, 0, 0, 0, 0), 5000)
+ SetTimer(AddGear(909, 1910, gtMine, 0, 0, 0, 0), 5000)
+ SetTimer(AddGear(889, 1917, gtMine, 0, 0, 0, 0), 5000)
+ ------ STICKY MINE LIST ------
+ tempG = AddGear(1199, 733, gtSMine, 0, 0, 0, 0)
+ tempG = AddGear(1195, 793, gtSMine, 0, 0, 0, 0)
+ tempG = AddGear(1201, 861, gtSMine, 0, 0, 0, 0)
+ tempG = AddGear(682, 878, gtSMine, 0, 0, 0, 0)
+ tempG = AddGear(789, 876, gtSMine, 0, 0, 0, 0)
end
function SetupEvents()
@@ -613,15 +623,16 @@
end
end
end
+ if TotalRounds % 6 == 0 then
+ AddAmmo(CurrentHedgehog, amSniperRifle, 1)
+ AddAmmo(CurrentHedgehog, amDEagle, 1)
+ end
TurnTimeLeft = 30000
elseif GetHogTeamName(CurrentHedgehog) == loc("011101001") then
TurnTimeLeft = 0
else
SetInputMask(0xFFFFFFFF)
AddCaption(loc("Turns until Sudden Death: ") .. SuddenDeathTurns - TotalRounds)
- if retry == true then
- DoRetry()
- end
end
end
@@ -630,10 +641,8 @@
SetAnimSkip(true)
end
if AnimInProgress() == false then
- retry = true
end
end
function onPreciseUp()
- retry = false
end
--- a/share/hedgewars/Data/Missions/Campaign/A Classic Fairytale/family.lua Thu Sep 06 15:47:52 2012 +0200
+++ b/share/hedgewars/Data/Missions/Campaign/A Classic Fairytale/family.lua Fri Sep 07 12:13:38 2012 +0200
@@ -186,7 +186,7 @@
SetGearMessage(natives[1], 0)
AddNewEvent(CheckPrincessFreed, {}, DoPrincessFreed, {}, 0)
TurnTimeLeft = 0
- ShowMission(loc("Family Reunion"), loc("Salvation"), loc("Get your teammates out of their natural prison and save the princess!|Hint: Drilling holes should solve everything.|Hint: All your hedgehogs need to be above the marked height!|Hint: Leaks A Lot needs to get really close to the princess!"), 1, 7000)
+ ShowMission(loc("Family Reunion"), loc("Salvation"), loc("Get your teammates out of their natural prison and save the princess!|Hint: Drilling holes should solve everything.|Hint: It might be a good idea to place a girder before starting to drill. Just saying.|Hint: All your hedgehogs need to be above the marked height!|Hint: Leaks A Lot needs to get really close to the princess!"), 1, 7000)
vCirc = AddVisualGear(0,0,vgtCircle,0,true)
SetVisualGearValues(vCirc, 2625, 1500, 100, 255, 1, 10, 0, 120, 3, 0xff00ffff)
end
@@ -199,8 +199,8 @@
function SetupPlace3()
SpawnUtilityCrate(2086, 1887, amRope, 1)
SpawnUtilityCrate(2147, 728, amBlowTorch, 2)
- SpawnUtilityCrate(2778, 1372, amPickHammer, 2)
- SpawnUtilityCrate(2579, 1886, amPickHammer, 2)
+ SpawnUtilityCrate(2778, 1372, amPickHammer, 3)
+ SpawnUtilityCrate(2579, 1886, amPickHammer, 3)
SpawnUtilityCrate(2622, 1893, amGirder, 1)
SpawnUtilityCrate(2671, 1883, amPortalGun, 3)
SpawnUtilityCrate(2831, 1384, amGirder, 3)
@@ -275,6 +275,9 @@
-----------------------------Events------------------------------------
function CheckPrincessFreed()
+ if GetX(natives[1]) == nil or GetX(natives[2]) == nil or GetX(natives[3]) == nil or GetX(princess) == nil then
+ return false
+ end
return math.abs(GetX(natives[1]) - GetX(princess)) <= 15 and math.abs(GetY(natives[1]) - GetY(princess)) <= 15 and StoppedGear(natives[1])
and GetY(natives[2]) < 1500 and GetY(natives[3]) < 1500 and StoppedGear(natives[2]) and StoppedGear(natives[3])
end
@@ -348,10 +351,16 @@
end
function DoOutOfCluster()
+ if (GetX(natives[1]) == nil) then
+ return
+ end
clusterCrate = SpawnAmmoCrate(GetX(natives[1]) - 50, GetY(natives[1]) - 50, amClusterBomb, 3)
end
function DoOutOfGrenade()
+ if (GetX(natives[1]) == nil) then
+ return
+ end
grenadeCrate2 = SpawnAmmoCrate(GetX(natives[1]) - 50, GetY(natives[1]) - 50, amGrenade, 3)
end
@@ -404,6 +413,9 @@
AddAmmo(cyborgs[1], amDynamite, 100)
AddAmmo(cyborgs[1], amBaseballBat, 100)
AddAmmo(cyborgs[1], amMolotov, 100)
+ AddAmmo(cyborgs[1], amWatermelon, 1)
+ AddAmmo(cyborgs[1], amAirStrike, 2)
+ AddAmmo(cyborgs[1], amDrillStrike, 1)
end
function AddHogs()
@@ -442,6 +454,9 @@
function CondNeedToTurn(hog1, hog2)
xl, xd = GetX(hog1), GetX(hog2)
+ if xl == nil or xd == nil then
+ return
+ end
if xl > xd then
AnimInsertStepNext({func = AnimTurn, args = {hog1, "Left"}})
AnimInsertStepNext({func = AnimTurn, args = {hog2, "Right"}})
--- a/share/hedgewars/Data/Missions/Campaign/A Classic Fairytale/queen.lua Thu Sep 06 15:47:52 2012 +0200
+++ b/share/hedgewars/Data/Missions/Campaign/A Classic Fairytale/queen.lua Fri Sep 07 12:13:38 2012 +0200
@@ -400,12 +400,12 @@
table.insert(startAnim, {func = AnimSay, args = {enemy, "It's a shame, really!", SAY_SHOUT, 4000}})
table.insert(startAnim, {func = AnimSay, args = {enemy, "I regret to end your little odyssey.", SAY_SHOUT, 5000}})
table.insert(startAnim, {func = AnimSay, args = {enemy, "It was fun to watch...", SAY_SHOUT, 3500}})
- table.insert(startAnim, {func = AnimSay, args = {enemy, "The way you handled your little inside conflicts...", SAY_SHOUT, 6500}})
+ table.insert(startAnim, {func = AnimSay, args = {enemy, "The way you handled your little internal conflicts...", SAY_SHOUT, 6500}})
table.insert(startAnim, {func = AnimSay, args = {enemy, "Did you really think that we needed the help of one of you?", SAY_SHOUT, 7500}})
table.insert(startAnim, {func = AnimSay, args = {enemy, "You should have known that we don't rely on meatbags!", SAY_SHOUT, 7500}})
table.insert(startAnim, {func = AnimSay, args = {enemy, "It was fun to watch though...", SAY_SHOUT, 3500}})
if m5Choice == choiceEliminate then
- table.insert(startAnim, {func = AnimSay, args = {enemy, "Heck, you even executed one of you!", SAY_SHOUT, 6000}})
+ table.insert(startAnim, {func = AnimSay, args = {enemy, "Heck, you even executed one of your own!", SAY_SHOUT, 6000}})
end
table.insert(startAnim, {func = AnimSay, args = {natives[1], "It was all a trick?!", SAY_SHOUT, 3000}})
table.insert(startAnim, {func = AnimSay, args = {natives[1], "Some sick game of yours?!", SAY_SHOUT, 4000}})
--- a/share/hedgewars/Data/Missions/Campaign/A Classic Fairytale/shadow.lua Thu Sep 06 15:47:52 2012 +0200
+++ b/share/hedgewars/Data/Missions/Campaign/A Classic Fairytale/shadow.lua Fri Sep 07 12:13:38 2012 +0200
@@ -409,7 +409,7 @@
table.insert(stronglingsAnim, {func = AnimWait, args = {leaks, 700}})
table.insert(stronglingsAnim, {func = AnimTurn, args = {leaks, "Left"}})
table.insert(stronglingsAnim, {func = AnimSay, args = {leaks, loc("We can't defeat them!"), SAY_THINK, 3000}})
- table.insert(stronglingsAnim, {func = AnimSay, args = {leaks, loc("I'll hold them up while you return to the village!"), SAY_SAY, 6000}})
+ table.insert(stronglingsAnim, {func = AnimSay, args = {leaks, loc("I'll hold them off while you return to the village!"), SAY_SAY, 6000}})
table.insert(stronglingsAnim, {func = AnimFollowGear, args = {cyborg}, swh = false})
table.insert(stronglingsAnim, {func = AnimCaption, args = {cyborg, loc("30 minutes later...")}, swh = false})
table.insert(stronglingsAnim, {func = AnimWait, args = {cyborg, 2000}})
--- a/share/hedgewars/Data/Missions/Campaign/A Classic Fairytale/united.lua Thu Sep 06 15:47:52 2012 +0200
+++ b/share/hedgewars/Data/Missions/Campaign/A Classic Fairytale/united.lua Fri Sep 07 12:13:38 2012 +0200
@@ -15,7 +15,7 @@
{1101, 916}, {2854, 1408}, {1974, 486}, {1103, 961}}
HogNames = {loc("Olive"), loc("Brain Stu"), loc("Brainila"), loc("Salivaslurper"),
- loc("Spleenlover"), loc("Tighlicker"), loc("NomNom"), loc("Mindy")}
+ loc("Spleenlover"), loc("Thighlicker"), loc("NomNom"), loc("Mindy")}
natives = {}
-----------------------------Variables---------------------------------