--- a/share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/desert01.lua Thu Aug 08 04:33:45 2013 +0300
+++ b/share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/desert01.lua Thu Aug 08 18:24:40 2013 +0300
@@ -284,7 +284,7 @@
end
function onHeroAtFirstBattle(gear)
- if not hero.dead and not heroIsInBattle and GetX(hero.gear) <= 1450
+ if not hero.dead and not heroIsInBattle and GetHealth(smuggler1.gear) and GetX(hero.gear) <= 1450
and GetY(hero.gear) <= GetY(smuggler1.gear)+5 and GetY(hero.gear) >= GetY(smuggler1.gear)-5 then
return true
end
--- a/share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/desert02.lua Thu Aug 08 04:33:45 2013 +0300
+++ b/share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/desert02.lua Thu Aug 08 18:24:40 2013 +0300
@@ -10,7 +10,6 @@
-- globals
local campaignName = loc("A Space Adventure")
local missionName = loc("Desert planet, Journey down below!")
-local turnCounter = 0
local startChallenge = false
-- dialogs
local dialog01 = {}
@@ -18,6 +17,10 @@
local goals = {
[dialog01] = {missionName, loc("Getting ready"), loc("Use the rope and get asap to the surface!"), 1, 4500},
}
+-- health crates
+healthX = 565
+health1Y = 1400
+health2Y = 850
-- hogs
local hero = {}
-- teams
@@ -57,12 +60,14 @@
TurnTime = 8000
Delay = 2
CaseFreq = 0
+ HealthCaseAmount = 50
MinesNum = 500
MinesTime = 1000
MineDudPercent = 75
Explosives = 0
SuddenDeathTurns = 1
WaterRise = 150
+ HealthDecrease = 0
Map = "desert02_map"
Theme = "Desert"
@@ -73,7 +78,7 @@
HogTurnLeft(hero.gear, true)
AnimInit()
- AnimationSetup()
+ AnimationSetup()
end
function onGameStart()
@@ -83,18 +88,15 @@
AddEvent(onHeroDeath, {hero.gear}, heroDeath, {hero.gear}, 0)
AddEvent(onHeroSafe, {hero.gear}, heroSafe, {hero.gear}, 0)
+ SpawnHealthCrate(healthX, health1Y)
+ SpawnHealthCrate(healthX, health2Y)
+
AddAmmo(hero.gear, amRope, 99)
SendHealthStatsOff()
AddAnim(dialog01)
end
-function onNewTurn()
- if not hero.dead and startChallenge then
- turnCounter = turnCounter + 1
- end
-end
-
function onGameTick()
AnimUnWait()
if ShowAnimation() == false then
@@ -146,7 +148,7 @@
function heroSafe(gear)
SendStat('siGameResult', loc("Congratulations, you escaped!")) --1
SendStat('siCustomAchievement', loc("You have escaped successfully")) --11
- SendStat('siCustomAchievement', loc("Your escape took you "..turnCounter.." turns")) --11
+ SendStat('siCustomAchievement', loc("Your escape took you "..TotalRounds.." turns")) --11
SendStat('siPlayerKills','1',teamA.name)
EndGame()
end
--- a/share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/fruit01.lua Thu Aug 08 04:33:45 2013 +0300
+++ b/share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/fruit01.lua Thu Aug 08 18:24:40 2013 +0300
@@ -42,6 +42,9 @@
green1.name = "Captain Lime"
green1.x = 3600
green1.y = 95
+green2.name = "Mister Pear"
+green3.name = "Lady Mango"
+green4.name = "Green Hog Grape"
yellow1.name = "General Lemon"
yellow1.x = 1300
yellow1.y = 1500
--- a/share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/ice01.lua Thu Aug 08 04:33:45 2013 +0300
+++ b/share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/ice01.lua Thu Aug 08 18:24:40 2013 +0300
@@ -194,7 +194,7 @@
end
end
- AddEvent(onHeroDeath, {hero.gear}, heroDeath, {hero.gear}, 1)
+ AddEvent(onHeroDeath, {hero.gear}, heroDeath, {hero.gear}, 0)
AddEvent(onHeroFinalStep, {hero.gear}, heroFinalStep, {hero.gear}, 0)
AddEvent(onAntiFlyArea, {hero.gear}, antiFlyArea, {hero.gear}, 1)
AddEvent(onNonAntiFlyArea, {hero.gear}, nonAntiFlyArea, {hero.gear}, 1)
@@ -423,8 +423,7 @@
function heroFinalStep(gear)
heroAtFinalStep = true
SaveCampaignVar("Ice01CheckPoint", "3")
- SaveCampaignVar("HeroHealth", GetHealth(hero.gear))
- WriteLnToConsole("Final Step")
+ SaveCampaignVar("HeroHealth", GetHealth(hero.gear))
end
function columnCheckPoint(gear)