# HG changeset patch # User sheepluva # Date 1386358728 -3600 # Node ID 3b8058b251b8fcc78a6895384fd560565e5bbb51 # Parent 9be28be004d4acc227c978f57359b52a19b3134b some more campaign string tweaks diff -r 9be28be004d4 -r 3b8058b251b8 share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/cosmos.lua --- a/share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/cosmos.lua Fri Dec 06 17:01:40 2013 +0100 +++ b/share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/cosmos.lua Fri Dec 06 20:38:48 2013 +0100 @@ -17,10 +17,10 @@ local saucerAcquired = false local status local checkPointReached = 1 -- 1 is start of the game -local objectives = loc("Go to moon by the flying saucer and complete the main mission").."|".. +local objectives = loc("Go to the moon by using the flying saucer and complete the main mission").."|".. loc("Come back to this mission and visit the other planets to collect the crates").."|".. loc("Visit the Death Planet after completing all the other planets' main missions").."|".. -loc("Come back to this mission after collecting all the parts") +loc("Come back to this mission after collecting all the device parts") -- dialogs local dialog01 = {} local dialog02 = {} @@ -33,12 +33,12 @@ -- mission objectives local goals = { [dialog01] = {missionName, loc("Getting ready"), loc("Go and collect the crate").."|"..loc("Try not to get spotted by the guards!"), 1, 4500}, - [dialog02] = {missionName, loc("The adventure begins!"), loc("Use the saucer and fly to the moon").."|"..loc("Travel carefully as your fuels are limited"), 1, 4500}, + [dialog02] = {missionName, loc("The adventure begins!"), loc("Use the saucer and fly to the moon").."|"..loc("Travel carefully as your fuel is limited"), 1, 4500}, [dialog03] = {missionName, loc("An unexpected event!"), loc("Use the saucer and fly away").."|"..loc("Beware, any damage taken will stay until you complete the moon's main mission"), 1, 7000}, [dialog04] = {missionName, loc("Objectives"), objectives, 1, 7000}, [dialog05] = {missionName, loc("Objectives"), objectives, 1, 7000}, [dialog06] = {missionName, loc("Objectives"), objectives, 1, 7000}, - [dialog07] = {missionName, loc("Searching the stars!"), loc("Use the saucer and fly away").."|"..loc("Visit first the planets of Ice, Desert and Fruit"), 1, 6000}, + [dialog07] = {missionName, loc("Searching the stars!"), loc("Use the saucer and fly away").."|"..loc("Visit the planets of Ice, Desert and Fruit before you proceed to the Death Planet"), 1, 6000}, [dialog08] = {missionName, loc("Saving Hogera"), loc("Fly to the meteorite and detonate the explosives"), 1, 7000} } -- crates @@ -98,11 +98,11 @@ Theme = "Nature" -- I had originally hero in PAoTH team and changed it, may reconsider though -- PAoTH - AddTeam(teamC.name, teamC.color, "Bone", "Island", "HillBilly", "cm_birdy") + AddTeam(teamC.name, teamC.color, "Bone", "Island", "HillBilly", "cm_birdy") hero.gear = AddHog(hero.name, 0, 100, "war_desertgrenadier1") - AnimSetGearPosition(hero.gear, hero.x, hero.y) + AnimSetGearPosition(hero.gear, hero.x, hero.y) HogTurnLeft(hero.gear, true) - AddTeam(teamA.name, teamA.color, "Bone", "Island", "HillBilly", "cm_birdy") + AddTeam(teamA.name, teamA.color, "Bone", "Island", "HillBilly", "cm_birdy") director.gear = AddHog(director.name, 0, 100, "hair_yellow") AnimSetGearPosition(director.gear, director.x, director.y) doctor.gear = AddHog(doctor.name, 0, 100, "Glasses") @@ -144,7 +144,7 @@ AnimSetGearPosition(hero.gear, 3080, 850) end end - + AnimInit() AnimationSetup() end @@ -156,14 +156,14 @@ FollowGear(hero.gear) ShowMission(loc("Spacetrip"), loc("Getting ready"), loc("Help Hog Solo to find all the parts of the anti-gravity device.").. "|"..loc("Travel to all the neighbor planets and collect all the pieces"), -amSkip, 0) - + -- do checkpoint stuff needed after game starts - if checkPointReached == 1 then + if checkPointReached == 1 then AddAnim(dialog01) AddAmmo(hero.gear, amRope, 1) AddAmmo(guard1.gear, amDEagle, 2) AddAmmo(guard2.gear, amDEagle, 2) - SpawnAmmoCrate(saucerX, saucerY, amJetpack) + SpawnAmmoCrate(saucerX, saucerY, amJetpack) -- EVENT HANDLERS AddEvent(onHeroBeforeTreePosition, {hero.gear}, heroBeforeTreePosition, {hero.gear}, 0) AddEvent(onHeroAtSaucerPosition, {hero.gear}, heroAtSaucerPosition, {hero.gear}, 0) @@ -180,7 +180,7 @@ -- Hero has visited a planet, he has plenty of fuels and can change planet AddAmmo(hero.gear, amJetpack, 99) end - + AddEvent(onHeroDeath, {hero.gear}, heroDeath, {hero.gear}, 0) AddEvent(onNoFuelAtLand, {hero.gear}, noFuelAtLand, {hero.gear}, 0) -- always check for landings @@ -189,7 +189,7 @@ end if GetCampaignVar("Planet") ~= "desertPlanet" then AddEvent(onDesertPlanetLanding, {hero.gear}, desertPlanetLanding, {hero.gear}, 0) - end + end if GetCampaignVar("Planet") ~= "fruitPlanet" then AddEvent(onFruitPlanetLanding, {hero.gear}, fruitPlanetLanding, {hero.gear}, 0) end @@ -199,14 +199,14 @@ if GetCampaignVar("Planet") ~= "deathPlanet" then AddEvent(onDeathPlanetLanding, {hero.gear}, deathPlanetLanding, {hero.gear}, 0) end - + if status.death01 and not status.final then AddAnim(dialog08) if GetCampaignVar("Planet") ~= "meteorite" then AddEvent(onMeteoriteLanding, {hero.gear}, meteoriteLanding, {hero.gear}, 0) end end - + SendHealthStatsOff() end @@ -228,7 +228,7 @@ function onPrecise() if GameTime > 3000 then - SetAnimSkip(true) + SetAnimSkip(true) end end @@ -315,7 +315,7 @@ end function onNoFuelAtLand(gear) - if checkPointReached > 1 and GetHealth(hero.gear) and GetY(gear) > 1400 and + if checkPointReached > 1 and GetHealth(hero.gear) and GetY(gear) > 1400 and GetAmmoCount(gear, amJetpack) == 0 and StoppedGear(gear) then return true end @@ -338,7 +338,7 @@ function heroAtSaucerPosition(gear) TurnTimeLeft = 0 - -- save check point + -- save check point SaveCampaignVar("CosmosCheckPoint", "2") checkPointReached = 2 AddAnim(dialog02) @@ -346,7 +346,7 @@ if guard1.turn and GetX(hero.gear) > saucerX-150 then guard1.keepTurning = false AddAnim(dialog03) - end + end end function heroOutOfGuardSight(gear) @@ -383,7 +383,7 @@ function fruitPlanetLanding(gear) if checkPointReached < 5 then AddAnim(dialog06) - else + else AnimCaption(hero.gear,loc("Welcome to the Fruit Planet!")) SaveCampaignVar("Planet", "fruitPlanet") if status.fruit02 then @@ -405,7 +405,7 @@ function desertPlanetLanding(gear) if checkPointReached < 5 then AddAnim(dialog06) - else + else AnimCaption(hero.gear,loc("Welcome to the Desert Planet!")) SaveCampaignVar("Planet", "desertPlanet") SaveCampaignVar("UnlockedMissions", "4") @@ -492,7 +492,7 @@ table.insert(dialog01, {func = AnimWait, args = {doctor.gear, 3000}}) table.insert(dialog01, {func = AnimCaption, args = {hero.gear, loc("Near secret base 17 of PAotH in the rural Hogland..."), 4000}}) table.insert(dialog01, {func = AnimSay, args = {director.gear, loc("So Hog Solo, here we are..."), SAY_SAY, 2000}}) - table.insert(dialog01, {func = AnimSay, args = {director.gear, loc("Behind these trees on the East there is secret base 17"), SAY_SAY, 4000}}) + table.insert(dialog01, {func = AnimSay, args = {director.gear, loc("Behind these trees on the east side there is secret base 17"), SAY_SAY, 4000}}) table.insert(dialog01, {func = AnimSay, args = {director.gear, loc("You have to continue alone from now on."), SAY_SAY, 3000}}) table.insert(dialog01, {func = AnimSay, args = {director.gear, loc("Be careful, the future of Hogera is in your hands!"), SAY_SAY, 7200}}) table.insert(dialog01, {func = AnimSay, args = {doctor.gear, loc("We'll use our communicators to contact you"), SAY_SAY, 2600}}) @@ -509,12 +509,12 @@ table.insert(dialog02, {func = AnimCaption, args = {hero.gear, loc("CheckPoint reached!"), 4000}}) table.insert(dialog02, {func = AnimSay, args = {hero.gear, loc("Got the saucer!"), SAY_SHOUT, 2000}}) table.insert(dialog02, {func = AnimSay, args = {director.gear, loc("Nice!"), SAY_SHOUT, 1000}}) - table.insert(dialog02, {func = AnimSay, args = {director.gear, loc("Now use it and go to the moon PAotH station to get more fuels!"), SAY_SHOUT, 5000}}) + table.insert(dialog02, {func = AnimSay, args = {director.gear, loc("Now use it and go to the moon PAotH station to get more fuel!"), SAY_SHOUT, 5000}}) table.insert(dialog02, {func = AnimGearWait, args = {hero.gear, 500}}) -- DIALOG 03 - Hero got spotted by guard AddSkipFunction(dialog03, Skipanim, {dialog03}) table.insert(dialog03, {func = AnimWait, args = {guard1.gear, 4000}}) - table.insert(dialog03, {func = AnimCaption, args = {guard1.gear, loc("Prepare to flee!"), 4000}}) + table.insert(dialog03, {func = AnimCaption, args = {guard1.gear, loc("Prepare to flee!"), 4000}}) table.insert(dialog03, {func = AnimSay, args = {guard1.gear, loc("Hey").." "..guard2.name.."! "..loc("Look, someone is stealing the saucer!"), SAY_SHOUT, 4000}}) table.insert(dialog03, {func = AnimSay, args = {guard2.gear, loc("I'll get him!"), SAY_SAY, 4000}}) table.insert(dialog03, {func = startCombat, args = {guard1.gear}}) @@ -532,17 +532,17 @@ -- DIALOG 06 - Landing on wrong planet or on earth if not enough fuels AddSkipFunction(dialog06, Skipanim, {dialog06}) table.insert(dialog06, {func = AnimCaption, args = {hero.gear, loc("You have to try again!"), 5000}}) - table.insert(dialog06, {func = AnimSay, args = {hero.gear, loc("Hm... Now I run out of fuels..."), SAY_THINK, 3000}}) + table.insert(dialog06, {func = AnimSay, args = {hero.gear, loc("Hm... Now I ran out of fuel..."), SAY_THINK, 3000}}) table.insert(dialog06, {func = sendStatsOnRetry, args = {hero.gear}}) -- DIALOG 07 - Hero lands on Death Planet but isn't allowed yet to play this map AddSkipFunction(dialog07, Skipanim, {dialog07}) table.insert(dialog07, {func = AnimCaption, args = {hero.gear, loc("This planet seems dangerous!"), 5000}}) - table.insert(dialog07, {func = AnimSay, args = {hero.gear, loc("I am not ready for this planet yet. I should visit it when I have found all the other parts"), SAY_THINK, 4000}}) + table.insert(dialog07, {func = AnimSay, args = {hero.gear, loc("I am not ready for this planet yet. I should visit it when I have found all the other device parts"), SAY_THINK, 4000}}) -- DIALOG 08 - Hero wins death01 AddSkipFunction(dialog08, Skipanim, {dialog08}) table.insert(dialog08, {func = AnimCaption, args = {hero.gear, loc("Under the meteorite shadow..."), 4000}}) table.insert(dialog08, {func = AnimSay, args = {doctor.gear, loc("You did great Hog Solo! However we aren't out of danger yet!"), SAY_SHOUT, 4500}}) - table.insert(dialog08, {func = AnimSay, args = {doctor.gear, loc("The meteorite has come too close and the anti-gravity device isn't powerful enough to get it out of order"), SAY_SHOUT, 5000}}) + table.insert(dialog08, {func = AnimSay, args = {doctor.gear, loc("The meteorite has come too close and the anti-gravity device isn't powerful enough to stop it now"), SAY_SHOUT, 5000}}) table.insert(dialog08, {func = AnimSay, args = {doctor.gear, loc("We need it to get split into at least two parts"), SAY_SHOUT, 3000}}) table.insert(dialog08, {func = AnimSay, args = {doctor.gear, loc("PAotH has sent explosives but unfortunately the trigger mechanism seems to be faulty!"), SAY_SHOUT, 5000}}) table.insert(dialog08, {func = AnimSay, args = {doctor.gear, loc("We need you to go there and detonate them yourself! Good luck!"), SAY_SHOUT, 500}}) @@ -559,17 +559,17 @@ end function sendStats(planet) - SendStat(siGameResult, loc("Hog Solo arrived to "..planet)) + SendStat(siGameResult, loc("Hog Solo arrived at "..planet)) SendStat(siCustomAchievement, loc("Return to the mission menu by pressing the \"Go back\" button")) - SendStat(siCustomAchievement, loc("Choose another planet by replaying the mission")) + SendStat(siCustomAchievement, loc("You can choose another planet by replaying this mission")) SendStat(siPlayerKills,'1',teamC.name) EndGame() end function sendStatsOnRetry() SendStat(siGameResult, loc("You have to travel again")) - SendStat(siCustomAchievement, loc("Your first destination is moon in order to get more fuels")) - SendStat(siCustomAchievement, loc("You have to complete the moon main mission in order to travel to other planets")) + SendStat(siCustomAchievement, loc("Your first destination is the moon in order to get more fuel")) + SendStat(siCustomAchievement, loc("You have to complete the main mission on moon in order to travel to other planets")) SendStat(siCustomAchievement, loc("You have to be careful and not die!")) SendStat(siPlayerKills,'0',teamC.name) EndGame() diff -r 9be28be004d4 -r 3b8058b251b8 share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/death01.lua --- a/share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/death01.lua Fri Dec 06 17:01:40 2013 +0100 +++ b/share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/death01.lua Fri Dec 06 20:38:48 2013 +0100 @@ -99,7 +99,7 @@ SuddenDeathTurns = 100 Map = "death01_map" Theme = "Hell" - + -- Hog Solo AddTeam(teamA.name, teamA.color, "Bone", "Island", "HillBilly", "cm_birdy") hero.gear = AddHog(hero.name, 0, 100, "war_desertgrenadier1") @@ -112,7 +112,7 @@ paoth2.gear = AddHog(paoth2.name, 0, 100, "Glasses") AnimSetGearPosition(paoth2.gear, paoth2.x, paoth2.y) HogTurnLeft(paoth2.gear, true) - -- Professor and Thugs + -- Professor and Thugs AddTeam(teamC.name, teamC.color, "Bone", "Island", "HillBilly", "cm_birdy") professor.human = AddHog(professor.name, 0, 300, "tophats") AnimSetGearPosition(professor.human, hero.x + 70, hero.y) @@ -127,9 +127,9 @@ AnimSetGearPosition(thugs[i].gear, thugs[i].x, thugs[i].y) HogTurnLeft(thugs[i].gear, not thugs[i].turnLeft) end - + initCheckpoint("death01") - + AnimInit() AnimationSetup() end @@ -137,10 +137,10 @@ function onGameStart() AnimWait(hero.gear, 3000) FollowGear(hero.gear) - + AddEvent(onHeroDeath, {hero.gear}, heroDeath, {hero.gear}, 0) AddEvent(onEnemiesDeath, {hero.gear}, enemiesDeath, {hero.gear}, 0) - + -- add crates SpawnAmmoCrate(teleportCrate.x, teleportCrate.y, amTeleport) SpawnAmmoCrate(drillCrate.x, drillCrate.y, amTeleport) @@ -169,7 +169,7 @@ PlaceGirder(3770, 1370, 4) PlaceGirder(3700, 1460, 6) PlaceGirder(3840, 1460, 6) - + -- add ammo -- hero ammo AddAmmo(hero.gear, amRope, 2) @@ -190,10 +190,10 @@ AddAmmo(professor.gear, amSwitch, 100) AddAmmo(professor.gear, amGrenade, 8) AddAmmo(professor.gear, amDEagle, 8) - + HideHog(professor.bot) AddAnim(dialog01) - + SendHealthStatsOff() end @@ -233,7 +233,7 @@ function onPrecise() if GameTime > 3000 then - SetAnimSkip(true) + SetAnimSkip(true) end end @@ -274,9 +274,9 @@ function enemiesDeath(gear) saveCompletedStatus(6) SendStat(siGameResult, loc("Congratulations, you won!")) - SendStat(siCustomAchievement, loc("You have successfuly eliminated Professor Hogevil")) + SendStat(siCustomAchievement, loc("You have successfully eliminated Professor Hogevil")) SendStat(siCustomAchievement, loc("You have rescued H and Dr.Cornelius")) - SendStat(siCustomAchievement, loc("You have acquired the last part")) + SendStat(siCustomAchievement, loc("You have acquired the last device part")) SendStat(siCustomAchievement, loc("Now go and play the menu mission to complete the campaign")) SendStat(siPlayerKills,'1',teamA.name) SendStat(siPlayerKills,'0',teamC.name) @@ -297,16 +297,16 @@ AddSkipFunction(dialog01, Skipanim, {dialog01}) table.insert(dialog01, {func = AnimWait, args = {hero.gear, 3000}}) table.insert(dialog01, {func = AnimCaption, args = {hero.gear, loc("Somewhere in the uninhabitable Death Planet..."), 5000}}) - table.insert(dialog01, {func = AnimSay, args = {professor.human, loc("Welcome Hog Solo, surpised to see me?"), SAY_SAY, 4000}}) - table.insert(dialog01, {func = AnimSay, args = {professor.human, loc("As you can see I have survived our last encounter and I had time to plot my master plan!"), SAY_SAY, 4000}}) - table.insert(dialog01, {func = AnimSay, args = {professor.human, loc("I've thought that the best way to get the device is to let you collect most of the parts for me!"), SAY_SAY, 4000}}) + table.insert(dialog01, {func = AnimSay, args = {professor.human, loc("Welcome Hog Solo, surprised to see me?"), SAY_SAY, 4000}}) + table.insert(dialog01, {func = AnimSay, args = {professor.human, loc("As you can see I have survived our last encounter and I had time to plot my master plan!"), SAY_SAY, 4000}}) + table.insert(dialog01, {func = AnimSay, args = {professor.human, loc("I've thought that the best way to get the device is to let you collect most of the parts for me!"), SAY_SAY, 4000}}) table.insert(dialog01, {func = AnimSay, args = {professor.human, loc("So, now I got the last part and I have your friends captured..."), SAY_SAY, 4000}}) table.insert(dialog01, {func = AnimSay, args = {professor.human, loc("Will you give me the other parts?"), SAY_SAY, 4000}}) table.insert(dialog01, {func = AnimWait, args = {hero.gear, 3000}}) - table.insert(dialog01, {func = AnimSay, args = {hero.gear, loc("I will never hand you the parts!"), SAY_SAY, 4000}}) + table.insert(dialog01, {func = AnimSay, args = {hero.gear, loc("I will never hand you the parts!"), SAY_SAY, 4000}}) table.insert(dialog01, {func = AnimWait, args = {professor.human, 3000}}) - table.insert(dialog01, {func = AnimSay, args = {professor.human, loc("Then prepare for battle!"), SAY_SAY, 4000}}) - table.insert(dialog01, {func = startBattle, args = {}}) + table.insert(dialog01, {func = AnimSay, args = {professor.human, loc("Then prepare for battle!"), SAY_SAY, 4000}}) + table.insert(dialog01, {func = startBattle, args = {}}) end -------------- OTHER FUNCTIONS ----------------- diff -r 9be28be004d4 -r 3b8058b251b8 share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/death02.lua --- a/share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/death02.lua Fri Dec 06 17:01:40 2013 +0100 +++ b/share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/death02.lua Fri Dec 06 20:38:48 2013 +0100 @@ -12,12 +12,12 @@ local missionName = loc("Killing the specialists") local challengeObjectives = loc("Use your available weapons in order to eliminate the enemies").."|".. loc("Each time you play this missions enemy hogs will play in a random order").."|".. - loc("At the start of the game each enemy hog has only the weapon that he is named of").."|".. - loc("A random hog will inherit the weapons of the deceased hogs").."|".. - loc("If you kill a hog with the weapon your hp will be 100").."|".. - loc("If you injure a hog you'll get 35% of the damage dealt").."|".. - loc("Every time you kill an enemy hog your ammo will get reseted").."|".. - loc("Rope won't get reseted") + loc("At the start of the game each enemy hog has only the weapon that he is named after").."|".. + loc("A random hedgehog will inherit the weapons of his deceased team-mates").."|".. + loc("If you kill a hedgehog with the respective weapon your healh points will be set to 100").."|".. + loc("If you injure a hedgehog you'll get 35% of the damage dealt").."|".. + loc("Every time you kill an enemy hog your ammo will get reset").."|".. + loc("Rope won't get reset") -- dialogs local dialog01 = {} -- mission objectives @@ -63,7 +63,7 @@ Explosives = 0 Map = "death02_map" Theme = "Hell" - + -- Hog Solo AddTeam(teamA.name, teamA.color, "Bone", "Island", "HillBilly", "cm_birdy") hero.gear = AddHog(hero.name, 0, 100, "war_desertgrenadier1") @@ -75,9 +75,9 @@ enemies[i].gear = AddHog(enemies[i].name, 1, 100, "war_desertgrenadier1") AnimSetGearPosition(enemies[i].gear, enemies[i].x, enemies[i].y) end - + initCheckpoint("death02") - + AnimInit() AnimationSetup() end @@ -86,7 +86,7 @@ AnimWait(hero.gear, 3000) FollowGear(hero.gear) ShowMission(missionName, loc("Challenge Objectives"), challengeObjectives, -amSkip, 0) - + AddEvent(onHeroDeath, {hero.gear}, heroDeath, {hero.gear}, 0) AddEvent(onHeroWin, {hero.gear}, heroWin, {hero.gear}, 0) @@ -119,7 +119,7 @@ hero.bazookaAmmo = 0 elseif deadHog.weapon == amGrenade then hero.grenadeAmmo = 0 - end + end local randomHog = math.random(1,table.getn(enemies)) while not GetHealth(enemies[randomHog].gear) do randomHog = math.random(1,table.getn(enemies)) @@ -149,7 +149,7 @@ function onPrecise() if GameTime > 3000 then - SetAnimSkip(true) + SetAnimSkip(true) end end @@ -177,8 +177,8 @@ function heroDeath(gear) SendStat(siGameResult, loc("Hog Solo lost, try again!")) - SendStat(siCustomAchievement, loc("You have to eliminate all the enemies")) - SendStat(siCustomAchievement, loc("Read the Challenge Objectives from within the mission for more details")) + SendStat(siCustomAchievement, loc("You have to eliminate all the enemies")) + SendStat(siCustomAchievement, loc("Read the Challenge Objectives from within the mission for more details")) SendStat(siPlayerKills,'1',teamB.name) SendStat(siPlayerKills,'0',teamA.name) EndGame() @@ -187,8 +187,8 @@ function heroWin(gear) saveBonus(3, 4) SendStat(siGameResult, loc("Congratulations, you won!")) - SendStat(siCustomAchievement, loc("You complete the mission in "..TotalRounds.." rounds")) - SendStat(siCustomAchievement, loc("The next 4 times you'll play the \"The last encounter\" mission you'll get 20 more hit points and a Laser Sight")) + SendStat(siCustomAchievement, loc("You complete the mission in "..TotalRounds.." rounds")) + SendStat(siCustomAchievement, loc("The next 4 times you play the \"The last encounter\" mission you'll get 20 more hit points and a Laser Sight")) SendStat(siPlayerKills,'1',teamA.name) EndGame() end @@ -209,14 +209,14 @@ table.insert(dialog01, {func = AnimCaption, args = {hero.gear, loc("Somewhere in the Planet of Death..."), 3000}}) table.insert(dialog01, {func = AnimCaption, args = {hero.gear, loc("...Hog Solo fights for his life"), 3000}}) table.insert(dialog01, {func = AnimCaption, args = {hero.gear, loc("Each time you play this missions enemy hogs will play in a random order"), 5000}}) - table.insert(dialog01, {func = AnimCaption, args = {hero.gear, loc("At the start of the game each enemy hog has only the weapon that he is named of"), 5000}}) - table.insert(dialog01, {func = AnimCaption, args = {hero.gear, loc("A random hog will inherit the weapons of the deceased hogs"), 5000}}) - table.insert(dialog01, {func = AnimCaption, args = {hero.gear, loc("If you kill a hog with the weapon your hp will be 100"), 5000}}) - table.insert(dialog01, {func = AnimCaption, args = {hero.gear, loc("If you injure a hog you'll get 35% of the damage dealt"), 5000}}) - table.insert(dialog01, {func = AnimCaption, args = {hero.gear, loc("Every time you kill an enemy hog your ammo will get reseted"), 5000}}) - table.insert(dialog01, {func = AnimCaption, args = {hero.gear, loc("Rope won't get reseted"), 2000}}) + table.insert(dialog01, {func = AnimCaption, args = {hero.gear, loc("At the start of the game each enemy hog has only the weapon that he is named after"), 5000}}) + table.insert(dialog01, {func = AnimCaption, args = {hero.gear, loc("A random hedgehog will inherit the weapons of his deceased team-mates"), 5000}}) + table.insert(dialog01, {func = AnimCaption, args = {hero.gear, loc("If you kill a hedgehog with the respective weapon your healh points will be set to 100"), 5000}}) + table.insert(dialog01, {func = AnimCaption, args = {hero.gear, loc("If you injure a hedgehog you'll get 35% of the damage dealt"), 5000}}) + table.insert(dialog01, {func = AnimCaption, args = {hero.gear, loc("Every time you kill an enemy hog your ammo will get reset"), 5000}}) + table.insert(dialog01, {func = AnimCaption, args = {hero.gear, loc("Rope won't get reset"), 2000}}) table.insert(dialog01, {func = AnimWait, args = {hero.gear, 500}}) - table.insert(dialog01, {func = startBattle, args = {hero.gear}}) + table.insert(dialog01, {func = startBattle, args = {hero.gear}}) end ------------ Other Functions ------------------- diff -r 9be28be004d4 -r 3b8058b251b8 share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/desert01.lua --- a/share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/desert01.lua Fri Dec 06 17:01:40 2013 +0100 +++ b/share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/desert01.lua Fri Dec 06 20:38:48 2013 +0100 @@ -24,7 +24,7 @@ local dialog01 = {} -- mission objectives local goals = { - [dialog01] = {missionName, loc("Getting ready"), loc("The part is hidden in one of the crates! Go and get it!"), 1, 4500}, + [dialog01] = {missionName, loc("Getting ready"), loc("The device part is hidden in one of the crates! Go and get it!"), 1, 4500}, } -- crates local btorch1Y = 60 @@ -90,7 +90,7 @@ HealthCaseAmount = 30 Map = "desert01_map" Theme = "Desert" - + -- get the check point checkPointReached = initCheckpoint("desert01") -- get hero health @@ -98,7 +98,7 @@ if checkPointReached > 1 and tonumber(GetCampaignVar("HeroHealth")) then heroHealth = tonumber(GetCampaignVar("HeroHealth")) end - + -- Hog Solo AddTeam(teamC.name, teamC.color, "Bone", "Island", "HillBilly", "cm_birdy") hero.gear = AddHog(hero.name, 0, heroHealth, "war_desertgrenadier1") @@ -113,10 +113,10 @@ smuggler1.gear = AddHog(smuggler1.name, 1, 100, "hair_orange") AnimSetGearPosition(smuggler1.gear, smuggler1.x, smuggler1.y) smuggler2.gear = AddHog(smuggler2.name, 1, 100, "lambda") - AnimSetGearPosition(smuggler2.gear, smuggler2.x, smuggler2.y) + AnimSetGearPosition(smuggler2.gear, smuggler2.x, smuggler2.y) smuggler3.gear = AddHog(smuggler3.name, 1, 100, "beefeater") - AnimSetGearPosition(smuggler3.gear, smuggler3.x, smuggler3.y) - + AnimSetGearPosition(smuggler3.gear, smuggler3.x, smuggler3.y) + if checkPointReached == 1 then -- Start of the game elseif checkPointReached == 2 then @@ -130,15 +130,15 @@ elseif checkPointReached == 5 then AnimSetGearPosition(hero.gear, girderX+40, girderY-30) end - + AnimInit() - AnimationSetup() + AnimationSetup() end function onGameStart() AnimWait(hero.gear, 3000) FollowGear(hero.gear) - + AddEvent(onHeroDeath, {hero.gear}, heroDeath, {hero.gear}, 0) AddEvent(onHeroAtFirstBattle, {hero.gear}, heroAtFirstBattle, {hero.gear}, 1) AddEvent(onHeroFleeFirstBattle, {hero.gear}, heroFleeFirstBattle, {hero.gear}, 1) @@ -146,24 +146,24 @@ AddEvent(onHeroAtThirdBattle, {hero.gear}, heroAtThirdBattle, {hero.gear}, 0) AddEvent(onCheckForWin1, {hero.gear}, checkForWin1, {hero.gear}, 0) AddEvent(onCheckForWin2, {hero.gear}, checkForWin2, {hero.gear}, 0) - + -- smugglers ammo AddAmmo(smuggler1.gear, amBazooka, 2) AddAmmo(smuggler1.gear, amGrenade, 2) - AddAmmo(smuggler1.gear, amDEagle, 2) + AddAmmo(smuggler1.gear, amDEagle, 2) AddAmmo(smuggler3.gear, amRope, 2) - + -- spawn crates SpawnAmmoCrate(btorch2X, btorch2Y, amBlowTorch) SpawnAmmoCrate(btorch3X, btorch3Y, amBlowTorch) SpawnAmmoCrate(rope1X, rope1Y, amRope) SpawnAmmoCrate(rope2X, rope2Y, amRope) SpawnAmmoCrate(rope3X, rope3Y, amRope) - SpawnAmmoCrate(portalX, portalY, amPortalGun) + SpawnAmmoCrate(portalX, portalY, amPortalGun) SpawnAmmoCrate(girderX, girderY, amGirder) - + SpawnHealthCrate(3300, 970) - + -- adding mines - BOOM! AddGear(1280, 460, gtMine, 0, 0, 0, 0) AddGear(270, 460, gtMine, 0, 0, 0, 0) @@ -171,7 +171,7 @@ AddGear(3500, 240, gtMine, 0, 0, 0, 0) AddGear(3410, 670, gtMine, 0, 0, 0, 0) AddGear(3450, 720, gtMine, 0, 0, 0, 0) - + local x = 800 while x < 1630 do AddGear(x, 900, gtMine, 0, 0, 0, 0) @@ -192,8 +192,8 @@ AddGear(x, 470, gtMine, 0, 0, 0, 0) x = x + math.random(8,20) end - - if checkPointReached == 1 then + + if checkPointReached == 1 then AddEvent(onHeroAtCheckpoint2, {hero.gear}, heroAtCheckpoint2, {hero.gear}, 0) AddEvent(onHeroAtCheckpoint3, {hero.gear}, heroAtCheckpoint3, {hero.gear}, 0) -- crates @@ -206,18 +206,18 @@ AddAmmo(hero.gear, amGrenade, 6) AddAmmo(hero.gear, amDEagle, 4) AddAmmo(hero.gear, amRCPlane, tonumber(getBonus(1))) - + AddAnim(dialog01) elseif checkPointReached == 2 or checkPointReached == 3 then - ShowMission(campaignName, missionName, loc("The part is hidden in one of the crates! Go and get it!"), -amSkip, 0) + ShowMission(campaignName, missionName, loc("The device part is hidden in one of the crates! Go and get it!"), -amSkip, 0) loadHeroAmmo() - + secondBattle() elseif checkPointReached == 4 or checkPointReached == 5 then - ShowMission(campaignName, missionName, loc("The part is hidden in one of the crates! Go and get it!"), -amSkip, 0) + ShowMission(campaignName, missionName, loc("The part device is hidden in one of the crates! Go and get it!"), -amSkip, 0) loadHeroAmmo() end - + SendHealthStatsOff() end @@ -252,7 +252,7 @@ function onAmmoStoreInit() SetAmmo(amBlowTorch, 0, 0, 0, 1) SetAmmo(amRope, 0, 0, 0, 1) - SetAmmo(amPortalGun, 0, 0, 0, 1) + SetAmmo(amPortalGun, 0, 0, 0, 1) SetAmmo(amGirder, 0, 0, 0, 3) end @@ -267,7 +267,7 @@ function onPrecise() if GameTime > 3000 then - SetAnimSkip(true) + SetAnimSkip(true) end end @@ -281,7 +281,7 @@ end function onHeroAtFirstBattle(gear) - if not hero.dead and not heroIsInBattle and GetHealth(smuggler1.gear) 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 @@ -289,7 +289,7 @@ end function onHeroFleeFirstBattle(gear) - if not hero.dead and GetHealth(smuggler1.gear) and heroIsInBattle and ongoingBattle == 1 and (GetX(hero.gear) > 1450 + if not hero.dead and GetHealth(smuggler1.gear) and heroIsInBattle and ongoingBattle == 1 and (GetX(hero.gear) > 1450 or (GetY(hero.gear) < GetY(smuggler1.gear)-80 or GetY(hero.gear) > smuggler1.y+300)) then return true end @@ -361,7 +361,7 @@ AnimCaption(hero.gear, loc("A smuggler! Prepare for battle"), 5000) TurnTimeLeft = 0 heroIsInBattle = true - ongoingBattle = 1 + ongoingBattle = 1 AnimSwitchHog(smuggler1.gear) TurnTimeLeft = 0 end @@ -394,7 +394,7 @@ function heroAtThirdBattle(gear) heroIsInBattle = true ongoingBattle = 3 - AnimSay(smuggler3.gear, loc("Who's there?! I'll get you..."), SAY_SHOUT, 5000) + AnimSay(smuggler3.gear, loc("Who's there?! I'll get you..."), SAY_SHOUT, 5000) AnimSwitchHog(smuggler3.gear) TurnTimeLeft = 0 end @@ -409,8 +409,8 @@ if cratesFound == 0 then saveCheckPointLocal("5") end - - checkForWin() + + checkForWin() end -------------- ANIMATIONS ------------------ @@ -430,14 +430,14 @@ AddSkipFunction(dialog01, Skipanim, {dialog01}) table.insert(dialog01, {func = AnimWait, args = {hero.gear, 3000}}) table.insert(dialog01, {func = AnimCaption, args = {hero.gear, loc("In the Planet of Sand, you have to double check your moves..."), 5000}}) - table.insert(dialog01, {func = AnimSay, args = {ally.gear, loc("Finaly you are here..."), SAY_SAY, 2000}}) + table.insert(dialog01, {func = AnimSay, args = {ally.gear, loc("Finally you are here..."), SAY_SAY, 2000}}) table.insert(dialog01, {func = AnimWait, args = {hero.gear, 2000}}) - table.insert(dialog01, {func = AnimSay, args = {hero.gear, loc("Thank you for meeting me in such a short notice!"), SAY_SAY, 3000}}) + table.insert(dialog01, {func = AnimSay, args = {hero.gear, loc("Thank you for meeting me on such a short notice!"), SAY_SAY, 3000}}) table.insert(dialog01, {func = AnimWait, args = {ally.gear, 4000}}) table.insert(dialog01, {func = AnimSay, args = {ally.gear, loc("No problem, I would do anything for H!"), SAY_SAY, 4000}}) table.insert(dialog01, {func = AnimSay, args = {ally.gear, loc("Now listen carefully! Below us there are tunnels that have been created naturally over the years"), SAY_SAY, 4000}}) - table.insert(dialog01, {func = AnimSay, args = {ally.gear, loc("I have heared the local tribes saying that many years ago some PAotH scientists were dumping their waste here"), SAY_SAY, 5000}}) - table.insert(dialog01, {func = AnimSay, args = {ally.gear, loc("H confimed that there isn't such a PAotH activity logged"), SAY_SAY, 4000}}) + table.insert(dialog01, {func = AnimSay, args = {ally.gear, loc("I have heard that the local tribes say that many years ago some PAotH scientists were dumping their waste here"), SAY_SAY, 5000}}) + table.insert(dialog01, {func = AnimSay, args = {ally.gear, loc("H confirmed that there isn't such a PAotH activity logged"), SAY_SAY, 4000}}) table.insert(dialog01, {func = AnimSay, args = {ally.gear, loc("So, I believe that it's a good place to start"), SAY_SAY, 3000}}) table.insert(dialog01, {func = AnimSay, args = {ally.gear, loc("Beware though! Many smugglers come often to explore these tunnels and scavage whatever valuable items they can find"), SAY_SAY, 5000}}) table.insert(dialog01, {func = AnimSay, args = {ally.gear, loc("They won't hesitate to attack you in order to rob you!"), SAY_SAY, 4000}}) @@ -447,7 +447,7 @@ table.insert(dialog01, {func = AnimSay, args = {ally.gear, loc("There is the tunnel entrance"), SAY_SAY, 3000}}) table.insert(dialog01, {func = AnimSay, args = {ally.gear, loc("Good luck!"), SAY_SAY, 3000}}) table.insert(dialog01, {func = AnimWait, args = {hero.gear, 500}}) - table.insert(dialog01, {func = startMission, args = {hero.gear}}) + table.insert(dialog01, {func = startMission, args = {hero.gear}}) end --------------- OTHER FUNCTIONS ------------------ @@ -461,14 +461,14 @@ -- second battle heroIsInBattle = true ongoingBattle = 2 - AnimSay(smuggler2.gear, loc("This is seems like a wealthy hedgehog, nice..."), SAY_THINK, 5000) + AnimSay(smuggler2.gear, loc("This is seems like a wealthy hedgehog, nice..."), SAY_THINK, 5000) AnimSwitchHog(smuggler2.gear) TurnTimeLeft = 0 end function saveCheckPointLocal(cpoint) -- save checkpoint - saveCheckpoint(cpoint) + saveCheckpoint(cpoint) SaveCampaignVar("HeroHealth", GetHealth(hero.gear)) -- bazooka - grenade - rope - parachute - deagle - btorch - construct - portal - rcplane SaveCampaignVar("HeroAmmo", GetAmmoCount(hero.gear, amBazooka)..GetAmmoCount(hero.gear, amGrenade).. @@ -497,7 +497,7 @@ function checkForWin() if cratesFound == 0 then - -- have to look more + -- have to look more AnimSay(hero.gear, loc("Haven't found it yet..."), SAY_THINK, 5000) cratesFound = cratesFound + 1 elseif cratesFound == 1 then diff -r 9be28be004d4 -r 3b8058b251b8 share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/desert02.lua --- a/share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/desert02.lua Fri Dec 06 17:01:40 2013 +0100 +++ b/share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/desert02.lua Fri Dec 06 20:38:48 2013 +0100 @@ -15,7 +15,7 @@ local dialog01 = {} -- mission objectives local goals = { - [dialog01] = {missionName, loc("Getting ready"), loc("Use the rope and get asap to the surface!"), 1, 4500}, + [dialog01] = {missionName, loc("Getting ready"), loc("Use the rope to quickly get to the surface!"), 1, 4500}, } -- health crates healthX = 565 @@ -34,7 +34,7 @@ teamA.color = tonumber("38D61C",16) -- green -- way points local current waypoint = 1 -local waypoints = { +local waypoints = { [1] = {x=1450, y=140}, [2] = {x=990, y=580}, [3] = {x=1650, y=950}, @@ -70,15 +70,15 @@ HealthDecrease = 0 Map = "desert02_map" Theme = "Desert" - + -- Hog Solo AddTeam(teamA.name, teamA.color, "Bone", "Island", "HillBilly", "cm_birdy") hero.gear = AddHog(hero.name, 0, 100, "war_desertgrenadier1") AnimSetGearPosition(hero.gear, hero.x, hero.y) HogTurnLeft(hero.gear, true) - + initCheckpoint("desert02") - + AnimInit() AnimationSetup() end @@ -86,15 +86,15 @@ function onGameStart() AnimWait(hero.gear, 3000) FollowGear(hero.gear) - + 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 @@ -120,7 +120,7 @@ function onPrecise() if GameTime > 3000 then - SetAnimSkip(true) + SetAnimSkip(true) end end @@ -174,7 +174,7 @@ table.insert(dialog01, {func = AnimWait, args = {hero.gear, 3000}}) table.insert(dialog01, {func = AnimCaption, args = {hero.gear, loc("Many meters below the surface..."), 5000}}) table.insert(dialog01, {func = AnimSay, args = {hero.gear, loc("The tunnel is about to get flooded..."), SAY_THINK, 4000}}) - table.insert(dialog01, {func = AnimSay, args = {hero.gear, loc("I have to reach the surface asap..."), SAY_THINK, 4000}}) + table.insert(dialog01, {func = AnimSay, args = {hero.gear, loc("I have to reach the surface as quickly as I can..."), SAY_THINK, 4000}}) table.insert(dialog01, {func = AnimWait, args = {hero.gear, 500}}) table.insert(dialog01, {func = challengeStart, args = {hero.gear}}) end diff -r 9be28be004d4 -r 3b8058b251b8 share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/desert03.lua --- a/share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/desert03.lua Fri Dec 06 17:01:40 2013 +0100 +++ b/share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/desert03.lua Fri Dec 06 20:38:48 2013 +0100 @@ -9,10 +9,10 @@ -- globals local missionName = loc("Precise flying") -local challengeObjectives = loc("Use the rc plane and destroy the all the targets").."|".. - loc("Each time you destroy your level targets you'll get teleported to the next level").."|".. - loc("You'll have only one rc plane at the start of the mission").."|".. - loc("During the game you can get new planes by getting the weapon crates") +local challengeObjectives = loc("Use the RC plane and destroy the all the targets").."|".. + loc("Each time you destroy all the targets on your current level you'll get teleported to the next level").."|".. + loc("You'll have only one RC plane at the start of the mission").."|".. + loc("During the game you can get new RC planes by collecting the weapon crates") local currentTarget = 1 -- dialogs local dialog01 = {} @@ -66,14 +66,14 @@ Explosives = 0 Map = "desert03_map" Theme = "Desert" - + -- Hog Solo AddTeam(teamA.name, teamA.color, "Bone", "Island", "HillBilly", "cm_birdy") hero.gear = AddHog(hero.name, 0, 1, "war_desertgrenadier1") AnimSetGearPosition(hero.gear, hero.x, hero.y) - + initCheckpoint("desert03") - + AnimInit() AnimationSetup() end @@ -89,7 +89,7 @@ -- original crates and targets SpawnAmmoCrate(rcCrates[1].x, rcCrates[1].y, amRCPlane) targets[1].gear = AddGear(targets[1].x, targets[1].y, gtTarget, 0, 0, 0, 0) - + -- hero ammo AddAmmo(hero.gear, amRCPlane, 1) @@ -117,7 +117,7 @@ function onPrecise() if GameTime > 3000 then - SetAnimSkip(true) + SetAnimSkip(true) end end @@ -159,11 +159,11 @@ -- DIALOG 01 - Start, game instructions AddSkipFunction(dialog01, Skipanim, {dialog01}) table.insert(dialog01, {func = AnimWait, args = {hero.gear, 3000}}) - table.insert(dialog01, {func = AnimCaption, args = {hero.gear, loc("In the Desert Planet, Hog Solo found some time to play with his RC plane..."), 3000}}) - table.insert(dialog01, {func = AnimCaption, args = {hero.gear, loc("Each time you destroy your level targets you'll get teleported to the next level"), 5000}}) - table.insert(dialog01, {func = AnimCaption, args = {hero.gear, loc("You'll have only one rc plane at the start of the mission"), 5000}}) - table.insert(dialog01, {func = AnimCaption, args = {hero.gear, loc("During the game you can get new planes by getting the weapon crates"), 5000}}) - table.insert(dialog01, {func = AnimWait, args = {hero.gear, 500}}) + table.insert(dialog01, {func = AnimCaption, args = {hero.gear, loc("On the Desert Planet, Hog Solo found some time to play with his RC plane..."), 3000}}) + table.insert(dialog01, {func = AnimCaption, args = {hero.gear, loc("Each time you destroy all the targets on your current level you'll get teleported to the next level"), 5000}}) + table.insert(dialog01, {func = AnimCaption, args = {hero.gear, loc("You'll have only one RC plane at the start of the mission"), 5000}}) + table.insert(dialog01, {func = AnimCaption, args = {hero.gear, loc("During the game you can get new RC planes by collecting the weapon crates"), 5000}}) + table.insert(dialog01, {func = AnimWait, args = {hero.gear, 500}}) end ----------------- Other Functions ----------------- @@ -184,7 +184,7 @@ setTargets(currentTarget) end elseif currentTarget == 3 then - + else win() end @@ -209,18 +209,18 @@ function win() saveBonus(1, 1) SendStat(siGameResult, loc("Congratulations, you are the best!")) - SendStat(siCustomAchievement, loc("You have destroyed all the targets")) + SendStat(siCustomAchievement, loc("You have destroyed all the targets")) SendStat(siCustomAchievement, loc("You are indeed the best PAotH pilot")) - SendStat(siCustomAchievement, loc("Next you play \"Searching in the dust\" you'll have an RC plane available")) + SendStat(siCustomAchievement, loc("Next time you play \"Searching in the dust\" you'll have an RC plane available")) SendStat(siPlayerKills,'1',teamA.name) EndGame() end function gameOver() SendStat(siGameResult, loc("Hog Solo lost, try again!")) - SendStat(siCustomAchievement, loc("You have to destroy all the targets")) - SendStat(siCustomAchievement, loc("You will fail if you run out of ammo and there are still targets available")) - SendStat(siCustomAchievement, loc("Read the Challenge Objectives from within the mission for more details")) + SendStat(siCustomAchievement, loc("You have to destroy all the targets")) + SendStat(siCustomAchievement, loc("You will fail if you run out of ammo and there are still targets available")) + SendStat(siCustomAchievement, loc("Read the Challenge Objectives from within the mission for more details")) SendStat(siPlayerKills,'0',teamA.name) EndGame() end diff -r 9be28be004d4 -r 3b8058b251b8 share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/final.lua --- a/share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/final.lua Fri Dec 06 17:01:40 2013 +0100 +++ b/share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/final.lua Fri Dec 06 20:38:48 2013 +0100 @@ -41,14 +41,14 @@ HealthCaseAmount = 50 Map = "final_map" Theme = "EarthRise" - + -- Hog Solo AddTeam(teamA.name, teamA.color, "Bone", "Island", "HillBilly", "cm_birdy") hero.gear = AddHog(hero.name, 0, 1, "war_desertgrenadier1") AnimSetGearPosition(hero.gear, hero.x, hero.y) - + initCheckpoint("final") - + AnimInit() end @@ -56,7 +56,7 @@ AnimWait(hero.gear, 3000) FollowGear(hero.gear) ShowMission(missionName, loc("Challenge Objectives"), challengeObjectives, -amSkip, 0) - + -- explosives x = 400 while x < 815 do @@ -70,20 +70,20 @@ AddGear(x, 480, gtMine, 0, 0, 0, 0) x = x + math.random(5,20) end - -- health crate + -- health crate SpawnHealthCrate(900, 5) -- ammo crates SpawnAmmoCrate(930, 1000,amRCPlane) SpawnAmmoCrate(1220, 672,amPickHammer) SpawnAmmoCrate(1220, 672,amGirder) - + -- ammo - AddAmmo(hero.gear, amPortalGun, 1) + AddAmmo(hero.gear, amPortalGun, 1) AddAmmo(hero.gear, amFirePunch, 1) - + AddEvent(onHeroDeath, {hero.gear}, heroDeath, {hero.gear}, 0) AddEvent(onHeroWin, {hero.gear}, heroWin, {hero.gear}, 0) - + SendHealthStatsOff() end diff -r 9be28be004d4 -r 3b8058b251b8 share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/fruit01.lua --- a/share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/fruit01.lua Fri Dec 06 17:01:40 2013 +0100 +++ b/share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/fruit01.lua Fri Dec 06 20:38:48 2013 +0100 @@ -33,8 +33,8 @@ -- mission objectives local goals = { [dialog01] = {missionName, loc("Ready for Battle?"), loc("Walk left if you want to join Captain Lime or right if you want to decline his offer"), 1, 4000}, - [dialog02] = {missionName, loc("Battle Starts Now!"), loc("You have choose to fight! Lead the Green Bananas to battle and eliminate all the enemies"), 1, 4000}, - [dialog03] = {missionName, loc("Time to run!"), loc("You have choose to flee... Unfortunately the only place where you can launch your saucer is in the most left side of the map"), 1, 4000}, + [dialog02] = {missionName, loc("Battle Starts Now!"), loc("You have chosen to fight! Lead the Green Bananas to battle and eliminate all the enemies"), 1, 4000}, + [dialog03] = {missionName, loc("Time to run!"), loc("You have chosen to flee... Unfortunately the only place where you can launch your saucer is the left-most place on the map"), 1, 4000}, } -- crates local crateWMX = 2170 @@ -88,7 +88,7 @@ {name = loc("Naranja Jed"), x = 960 , y = 516, health = 40}, } teamA.name = loc("Hog Solo") -teamA.color = tonumber("38D61C",16) -- green +teamA.color = tonumber("38D61C",16) -- green teamB.name = loc("Green Bananas") teamB.color = tonumber("38D61C",16) -- green teamC.name = loc("Yellow Watermelons") @@ -108,7 +108,7 @@ HealthCaseAmount = 50 Map = "fruit01_map" Theme = "Fruit" - + -- Hog Solo AddTeam(teamA.name, teamA.color, "Bone", "Island", "HillBilly", "cm_birdy") hero.gear = AddHog(hero.name, 0, 100, "war_desertgrenadier1") @@ -145,20 +145,20 @@ yellowArmy[i].gear = AddHog(yellowArmy[i].name, 1, yellowArmy[i].health, yellowHats[math.random(1,4)]) AnimSetGearPosition(yellowArmy[i].gear, yellowArmy[i].x, yellowArmy[i].y) end - + initCheckpoint("fruit01") AnimInit() - AnimationSetup() + AnimationSetup() end function onGameStart() AnimWait(hero.gear, 3000) FollowGear(hero.gear) - + AddEvent(onHeroDeath, {hero.gear}, heroDeath, {hero.gear}, 0) AddEvent(onHeroSelect, {hero.gear}, heroSelect, {hero.gear}, 0) - + -- Green team weapons local greenArmy = { green1, green2 } for i=1,2 do @@ -167,8 +167,8 @@ AddAmmo(greenArmy[i].gear, amBazooka, 10) AddAmmo(greenArmy[i].gear, amGrenade, 7) AddAmmo(greenArmy[i].gear, amFirePunch, 2) - AddAmmo(greenArmy[i].gear, amDrill, 3) - AddAmmo(greenArmy[i].gear, amSwitch, 2) + AddAmmo(greenArmy[i].gear, amDrill, 3) + AddAmmo(greenArmy[i].gear, amSwitch, 2) AddAmmo(greenArmy[i].gear, amSkip, 100) end -- Yellow team weapons @@ -177,21 +177,21 @@ AddAmmo(yellow1.gear, amBazooka, 10) AddAmmo(yellow1.gear, amGrenade, 10) AddAmmo(yellow1.gear, amFirePunch, 5) - AddAmmo(yellow1.gear, amDrill, 3) - AddAmmo(yellow1.gear, amBee, 1) + AddAmmo(yellow1.gear, amDrill, 3) + AddAmmo(yellow1.gear, amBee, 1) AddAmmo(yellow1.gear, amMortar, 3) AddAmmo(yellow1.gear, amDEagle, 4) - AddAmmo(yellow1.gear, amDynamite, 1) + AddAmmo(yellow1.gear, amDynamite, 1) AddAmmo(yellow1.gear, amSwitch, 100) for i=3,7 do HideHog(yellowArmy[i].gear) end HideHog(green1.bot) - + -- crates SpawnHealthCrate(health1X, health1Y) SpawnAmmoCrate(crateWMX, crateWMY, amWatermelon) - + AddAnim(dialog01) SendHealthStatsOff() end @@ -239,7 +239,7 @@ function onPrecise() if GameTime > 3000 then - SetAnimSkip(true) + SetAnimSkip(true) end end @@ -332,7 +332,7 @@ -- add stats saveVariables() SendStat(siGameResult, loc("Green Bananas won!")) - SendStat(siCustomAchievement, loc("You have eliminated all the visible enemy hogs!")) + SendStat(siCustomAchievement, loc("You have eliminated all visible enemy hedgehogs!")) SendStat(siPlayerKills,'1',teamA.name) SendStat(siPlayerKills,'1',teamB.name) SendStat(siPlayerKills,'0',teamC.name) @@ -343,7 +343,7 @@ -- add stats saveVariables() SendStat(siGameResult, loc("Hog Solo escaped successfully!")) - SendStat(siCustomAchievement, loc("You have reached the flying area successfully!")) + SendStat(siCustomAchievement, loc("You have reached the take-off area successfully!")) SendStat(siPlayerKills,'1',teamA.name) SendStat(siPlayerKills,'0',teamB.name) SendStat(siPlayerKills,'0',teamC.name) @@ -354,7 +354,7 @@ TurnTimeLeft = 0 FollowGear(hero.gear) if GetX(hero.gear) < hero.x then - chooseToBattle = true + chooseToBattle = true AddEvent(onGreen1Death, {green1.gear}, green1Death, {green1.gear}, 0) AddEvent(onBattleWin, {hero.gear}, battleWin, {hero.gear}, 0) AddAnim(dialog02) @@ -387,7 +387,7 @@ -- DIALOG 01 - Start, Captain Lime talks explains to Hog Solo AddSkipFunction(dialog01, Skipanim, {dialog01}) table.insert(dialog01, {func = AnimWait, args = {hero.gear, 3000}}) - table.insert(dialog01, {func = AnimCaption, args = {hero.gear, loc("Somewhere in the Planet of Fruits a terrible war is about to begin..."), 5000}}) + table.insert(dialog01, {func = AnimCaption, args = {hero.gear, loc("Somewhere on the Planet of Fruits a terrible war is about to begin..."), 5000}}) table.insert(dialog01, {func = AnimSay, args = {hero.gear, loc("I was told that as the leader of the king's guard, no one knows this world better than you!"), SAY_SAY, 5000}}) table.insert(dialog01, {func = AnimSay, args = {hero.gear, loc("So, I kindly ask for your help"), SAY_SAY, 3000}}) table.insert(dialog01, {func = AnimWait, args = {green1.gear, 2000}}) @@ -400,19 +400,19 @@ table.insert(dialog01, {func = AnimWait, args = {hero.gear, 500}}) table.insert(dialog01, {func = ShowMission, args = {missionName, loc("Ready for Battle?"), loc("Walk left if you want to join Captain Lime or right if you want to decline his offer"), 1, 7000}}) table.insert(dialog01, {func = AnimSwitchHog, args = {hero.gear}}) - -- DIALOG 02 - Hero selects to fight + -- DIALOG 02 - Hero selects to fight AddSkipFunction(dialog02, Skipanim, {dialog02}) table.insert(dialog02, {func = AnimWait, args = {green1.gear, 3000}}) table.insert(dialog02, {func = AnimSay, args = {green1.gear, loc("You choose well Hog Solo!"), SAY_SAY, 3000}}) table.insert(dialog02, {func = AnimSay, args = {green1.gear, loc("I have only 3 hogs available and they are all cadets"), SAY_SAY, 4000}}) - table.insert(dialog02, {func = AnimSay, args = {green1.gear, loc("As more experienced I want you to lead them to the battle"), SAY_SAY, 4000}}) - table.insert(dialog02, {func = AnimSay, args = {green1.gear, loc("I of cource will observe the battle and intervene if necessary"), SAY_SAY, 5000}}) + table.insert(dialog02, {func = AnimSay, args = {green1.gear, loc("As you are more experienced, I want you to lead them to the battle"), SAY_SAY, 4000}}) + table.insert(dialog02, {func = AnimSay, args = {green1.gear, loc("I of course will observe the battle and intervene if necessary"), SAY_SAY, 5000}}) table.insert(dialog02, {func = AnimWait, args = {hero.gear, 4500}}) - table.insert(dialog02, {func = AnimSay, args = {hero.gear, loc("No problem Captain! "), SAY_SAY, 2000}}) + table.insert(dialog02, {func = AnimSay, args = {hero.gear, loc("No problem Captain!"), SAY_SAY, 2000}}) table.insert(dialog02, {func = AnimSay, args = {hero.gear, loc("The enemies aren't many anyway, it is going to be easy!"), SAY_SAY, 1}}) table.insert(dialog02, {func = AnimWait, args = {green1.gear, 9000}}) - table.insert(dialog02, {func = AnimSay, args = {green1.gear, loc("Don't be fool son, they'll be more"), SAY_SAY, 2000}}) - table.insert(dialog02, {func = AnimSay, args = {green1.gear, loc("Try to be smart and eliminate them quickly. This way you might scare the rest!"), SAY_SAY, 5000}}) + table.insert(dialog02, {func = AnimSay, args = {green1.gear, loc("Don't be foolish son, there will be more"), SAY_SAY, 2000}}) + table.insert(dialog02, {func = AnimSay, args = {green1.gear, loc("Try to be smart and eliminate them quickly. This way you might scare off the rest!"), SAY_SAY, 5000}}) table.insert(dialog02, {func = AnimWait, args = {hero.gear, 5000}}) table.insert(dialog02, {func = startBattle, args = {hero.gear}}) -- DIALOG 03 - Hero selects to flee @@ -420,8 +420,8 @@ table.insert(dialog03, {func = AnimWait, args = {green1.gear, 3000}}) table.insert(dialog03, {func = AnimSay, args = {green1.gear, loc("Too bad... Then you should really leave!"), SAY_SAY, 3000}}) table.insert(dialog03, {func = AnimSay, args = {green1.gear, loc("Things are going to get messy around here"), SAY_SAY, 3000}}) - table.insert(dialog03, {func = AnimSay, args = {green1.gear, loc("Also, you should know that the only place that you can fly would be the most left part of the map"), SAY_SAY, 5000}}) - table.insert(dialog03, {func = AnimSay, args = {green1.gear, loc("All the other places are protected by our anti flying weapons"), SAY_SAY, 4000}}) + table.insert(dialog03, {func = AnimSay, args = {green1.gear, loc("Also, you should know that the only place where you can fly is the left-most part of this area"), SAY_SAY, 5000}}) + table.insert(dialog03, {func = AnimSay, args = {green1.gear, loc("All the other places are protected by our flight-inhibiting weapons"), SAY_SAY, 4000}}) table.insert(dialog03, {func = AnimSay, args = {green1.gear, loc("Now go and don't waste more of my time you coward..."), SAY_SAY, 4000}}) table.insert(dialog03, {func = AnimWait, args = {hero.gear, 5000}}) table.insert(dialog03, {func = startBattle, args = {hero.gear}}) @@ -446,18 +446,18 @@ function gameLost() if chooseToBattle then - SendStat(siGameResult, loc("Green Bananas lost, try again!")) + SendStat(siGameResult, loc("The Green Bananas lost, try again!")) SendStat(siCustomAchievement, loc("You have to eliminate all the visible enemies")) SendStat(siCustomAchievement, loc("5 additional enemies will be spawned during the game")) - SendStat(siCustomAchievement, loc("You are controlling all the active ally units")) + SendStat(siCustomAchievement, loc("You are in control of all the active ally units")) SendStat(siCustomAchievement, loc("The ally units share their ammo")) SendStat(siCustomAchievement, loc("Try to keep as many allies alive as possible")) else SendStat(siGameResult, loc("Hog Solo couldn't escape, try again!")) - SendStat(siCustomAchievement, loc("You have to get to the most left land and remove any enemy hog from there")) + SendStat(siCustomAchievement, loc("You have to get to the left-most land and remove any enemy hog from there")) SendStat(siCustomAchievement, loc("You will play every 3 turns")) SendStat(siCustomAchievement, loc("Green hogs won't intenionally hurt you")) - end + end SendStat(siPlayerKills,'1',teamC.name) SendStat(siPlayerKills,'0',teamA.name) SendStat(siPlayerKills,'0',teamB.name) @@ -467,7 +467,7 @@ function getNextWave() if TotalRounds == 4 then RestoreHog(yellowArmy[3].gear) - AnimCaption(hero.gear, loc("Next wave in 3 turns"), 5000) + AnimCaption(hero.gear, loc("Next wave in 3 turns"), 5000) if not chooseToBattle and not GetHealth(yellow1.gear) then SetGearPosition(yellowArmy[3].gear, yellow1.x, yellow1.y) end @@ -481,7 +481,7 @@ elseif TotalRounds == 10 then RestoreHog(yellowArmy[6].gear) RestoreHog(yellowArmy[7].gear) - if not chooseToBattle and not GetHealth(yellow1.gear) and not GetHealth(yellowArmy[3].gear) + if not chooseToBattle and not GetHealth(yellow1.gear) and not GetHealth(yellowArmy[3].gear) and not GetHealth(yellowArmy[4].gear) then SetGearPosition(yellowArmy[6].gear, yellow1.x, yellow1.y) end diff -r 9be28be004d4 -r 3b8058b251b8 share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/fruit02.lua --- a/share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/fruit02.lua Fri Dec 06 17:01:40 2013 +0100 +++ b/share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/fruit02.lua Fri Dec 06 20:38:48 2013 +0100 @@ -22,10 +22,10 @@ local dialog04 = {} -- mission objectives local goals = { - [dialog01] = {missionName, loc("Exploring the tunnel"), loc("With the help of the other hogs search for the device").."|"..loc("Hog Solo has to reach the last crates"), 1, 4000}, - [dialog02] = {missionName, loc("Exploring the tunnel"), loc("Explore the tunnel with the other hogs and search for the device").."|"..loc("Hog Solo has to reach the last crates"), 1, 4000}, + [dialog01] = {missionName, loc("Exploring the tunnel"), loc("Search for the device with the help of the other hedgehogs ").."|"..loc("Hog Solo has to reach the last crates"), 1, 4000}, + [dialog02] = {missionName, loc("Exploring the tunnel"), loc("Explore the tunnel with the other hedgehogs and search for the device").."|"..loc("Hog Solo has to reach the last crates"), 1, 4000}, [dialog03] = {missionName, loc("Return to the Surface"), loc("Go to the surface!").."|"..loc("Attack Captain Lime before he attacks back"), 1, 4000}, - [dialog04] = {missionName, loc("Return to the Surface"), loc("Go to the surface!").."|"..loc("Attack the assasins before they attack back"), 1, 4000}, + [dialog04] = {missionName, loc("Return to the Surface"), loc("Go to the surface!").."|"..loc("Attack the assassins before they attack back"), 1, 4000}, } -- crates local eagleCrate = {name = amDEagle, x = 1680, y = 1650} @@ -81,7 +81,7 @@ SuddenDeathTurns = 200 Map = "fruit02_map" Theme = "Fruit" - + -- load checkpoints, problem getting the campaign variable local health = 100 checkPointReached = initCheckpoint("fruit02") @@ -89,12 +89,12 @@ loadHogsPositions() health = tonumber(GetCampaignVar("HeroHealth")) end - + -- Hog Solo and Green Bananas AddTeam(teamA.name, teamA.color, "Bone", "Island", "HillBilly", "cm_birdy") hero.gear = AddHog(hero.name, 0, health, "war_desertgrenadier1") AnimSetGearPosition(hero.gear, hero.x, hero.y) - HogTurnLeft(hero.gear, true) + HogTurnLeft(hero.gear, true) green2.gear = AddHog(green2.name, 0, 100, "war_britmedic") AnimSetGearPosition(green2.gear, green2.x, green2.y) HogTurnLeft(green2.gear, true) @@ -117,20 +117,20 @@ end AnimInit() - AnimationSetup() + AnimationSetup() end function onGameStart() AnimWait(hero.gear, 3000) FollowGear(hero.gear) - + if GetCampaignVar("Fruit01JoinedBattle") and GetCampaignVar("Fruit01JoinedBattle") == "true" then tookPartInBattle = true end - + AddEvent(onHeroDeath, {hero.gear}, heroDeath, {hero.gear}, 0) AddEvent(onDeviceCrates, {hero.gear}, deviceCrates, {hero.gear}, 0) - + -- Hog Solo and GB weapons AddAmmo(hero.gear, amSwitch, 100) -- Captain Lime weapons @@ -145,7 +145,7 @@ for i=1,table.getn(redHedgehogs) do HideHog(redHedgehogs[i].gear) end - + -- explosives -- I wanted to use FindPlace but doesn't accept height values... local x1 = 950 @@ -166,7 +166,7 @@ x2 = x2 - 25 end AddGear(3128, 1680, gtExplosives, 0, 0, 0, 0) - + --mines AddGear(3135, 1680, gtMine, 0, 0, 0, 0) AddGear(3145, 1680, gtMine, 0, 0, 0, 0) @@ -177,7 +177,7 @@ AddGear(3105, 1680, gtMine, 0, 0, 0, 0) AddGear(3095, 1680, gtMine, 0, 0, 0, 0) AddGear(3085, 1680, gtMine, 0, 0, 0, 0) - AddGear(3075, 1680, gtMine, 0, 0, 0, 0) + AddGear(3075, 1680, gtMine, 0, 0, 0, 0) if checkPointReached == 1 then AddAmmo(hero.gear, amFirePunch, 3) @@ -199,20 +199,20 @@ AddEvent(onCheckPoint3, {hero.gear}, checkPoint3, {hero.gear}, 0) AddEvent(onCheckPoint4, {hero.gear}, checkPoint4, {hero.gear}, 0) elseif checkPointReached == 4 then - AddEvent(onCheckPoint4, {hero.gear}, checkPoint4, {hero.gear}, 0) + AddEvent(onCheckPoint4, {hero.gear}, checkPoint4, {hero.gear}, 0) elseif checkPointReached == 5 then -- EMPTY end if checkPointReached ~= 1 then loadWeapons() end - + -- girders if checkPointReached > 1 then PlaceGirder(1580, 875, 4) PlaceGirder(1800, 875, 4) end - + -- place crates if checkPointReached < 2 then SpawnAmmoCrate(girderCrate.x, girderCrate.y, girderCrate.name) @@ -225,9 +225,9 @@ if tookPartInBattle then SpawnAmmoCrate(weaponCrate.x, weaponCrate.y, amWatermelon) else - SpawnAmmoCrate(weaponCrate.x, weaponCrate.y, amSniperRifle) + SpawnAmmoCrate(weaponCrate.x, weaponCrate.y, amSniperRifle) end - + SendHealthStatsOff() end @@ -309,7 +309,7 @@ function onPrecise() if GameTime > 3000 then - SetAnimSkip(true) + SetAnimSkip(true) end end @@ -356,7 +356,7 @@ function onCheckPoint1(gear) -- before barrel jump - if not hero.dead and GetX(hero.gear) > 2850 and GetX(hero.gear) < 2945 + if not hero.dead and GetX(hero.gear) > 2850 and GetX(hero.gear) < 2945 and GetY(hero.gear) > 808 and GetY(hero.gear) < 852 and not isHeroAtWrongPlace() then return true end @@ -375,7 +375,7 @@ function onCheckPoint3(gear) -- after barrel jump - if ((GetHealth(green2.gear) and GetY(green2.gear) > 1550 and GetX(green2.gear) < 3000 and StoppedGear(green2.gear)) + if ((GetHealth(green2.gear) and GetY(green2.gear) > 1550 and GetX(green2.gear) < 3000 and StoppedGear(green2.gear)) or (GetHealth(green3.gear) and GetY(green3.gear) > 1550 and GetX(green3.gear) < 3000 and StoppedGear(green2.gear))) and not isHeroAtWrongPlace() then return true @@ -385,7 +385,7 @@ function onCheckPoint4(gear) -- hero at crates - if not hero.dead and GetX(hero.gear) > 1288 and GetX(hero.gear) < 1420 + if not hero.dead and GetX(hero.gear) > 1288 and GetX(hero.gear) < 1420 and GetY(hero.gear) > 1840 and not isHeroAtWrongPlace() then return true end @@ -396,14 +396,14 @@ function heroDeath(gear) SendStat(siGameResult, loc("Hog Solo lost, try again!")) - SendStat(siCustomAchievement, loc("To win the game Hog Solo has to get the bottom crates and come back to the surface")) + SendStat(siCustomAchievement, loc("To win the game, Hog Solo has to get the bottom crates and come back to the surface")) SendStat(siCustomAchievement, loc("You can use the other 2 hogs to assist you")) SendStat(siCustomAchievement, loc("Do not destroy the crates")) if tookPartInBattle then - SendStat(siCustomAchievement, loc("You'll have to eliminate the Strawberry Assasins at the end")) + SendStat(siCustomAchievement, loc("You'll have to eliminate the Strawberry Assassins at the end")) else SendStat(siCustomAchievement, loc("You'll have to eliminate Captain Lime at the end")) - SendStat(siCustomAchievement, loc("Don't eliminate Captain Lime before collecting the last crate!")) + SendStat(siCustomAchievement, loc("Don't eliminate Captain Lime before collecting the last crate!")) end SendStat(siPlayerKills,'0',teamA.name) EndGame() @@ -498,17 +498,17 @@ -- DIALOG 01 - Start, Captain Lime helps Hog Solo because he took part in the battle AddSkipFunction(dialog01, Skipanim, {dialog01}) table.insert(dialog01, {func = AnimWait, args = {hero.gear, 3000}}) - table.insert(dialog01, {func = AnimCaption, args = {hero.gear, loc("Somewhere else in the planet of fruits Captain Lime helps Hog Solo..."), 5000}}) + table.insert(dialog01, {func = AnimCaption, args = {hero.gear, loc("Somewhere else on the planet of fruits Captain Lime helps Hog Solo..."), 5000}}) table.insert(dialog01, {func = AnimSay, args = {green1.gear, loc("You fought bravely and you helped us win this battle!"), SAY_SAY, 5000}}) table.insert(dialog01, {func = AnimSay, args = {green1.gear, loc("So, as promised I have brought you where I think that the device you are looking for is hidden."), SAY_SAY, 7000}}) - table.insert(dialog01, {func = AnimSay, args = {green1.gear, loc("I know that your resources are low due to the battle but I'll send with you two of my best hogs to assist you."), SAY_SAY, 7000}}) + table.insert(dialog01, {func = AnimSay, args = {green1.gear, loc("I know that your resources are low due to the battle but I'll send two of my best hogs to assist you."), SAY_SAY, 7000}}) table.insert(dialog01, {func = AnimSay, args = {green1.gear, loc("Good luck!"), SAY_SAY, 2000}}) table.insert(dialog01, {func = AnimWait, args = {hero.gear, 500}}) table.insert(dialog01, {func = AnimSwitchHog, args = {hero.gear}}) -- DIALOG02 - Start, Hog Solo escaped from the previous battle AddSkipFunction(dialog02, Skipanim, {dialog02}) table.insert(dialog02, {func = AnimWait, args = {hero.gear, 3000}}) - table.insert(dialog02, {func = AnimCaption, args = {hero.gear, loc("Somewhere else in the planet of fruits Hog Solo gets closer to the device..."), 5000}}) + table.insert(dialog02, {func = AnimCaption, args = {hero.gear, loc("Somewhere else on the planet of fruits Hog Solo gets closer to the device..."), 5000}}) table.insert(dialog02, {func = AnimSay, args = {green1.gear, loc("You are the one who fled! So, you are alive..."), SAY_SAY, 4000}}) table.insert(dialog02, {func = AnimSay, args = {green1.gear, loc("I'm still low on hogs. If you are not afraid I could use a set of extra hands"), SAY_SAY, 4000}}) table.insert(dialog02, {func = AnimWait, args = {hero.gear, 8000}}) @@ -524,15 +524,15 @@ AddSkipFunction(dialog03, Skipanim, {dialog03}) table.insert(dialog03, {func = AnimWait, args = {hero.gear, 4000}}) table.insert(dialog03, {func = FollowGear, args = {hero.gear}}) - table.insert(dialog03, {func = AnimSay, args = {hero.gear, loc("Hoo Ray! I've found it, now I have to get back to Captain Lime!"), SAY_SAY, 4000}}) + table.insert(dialog03, {func = AnimSay, args = {hero.gear, loc("Hoorah! I've found it, now I have to get back to Captain Lime!"), SAY_SAY, 4000}}) table.insert(dialog03, {func = AnimWait, args = {green1.gear, 4000}}) - table.insert(dialog03, {func = AnimSay, args = {green1.gear, loc("This Hog Solo is so naive! I am gonna shoot him when he returns and keep his device for me!"), SAY_THINK, 4000}}) + table.insert(dialog03, {func = AnimSay, args = {green1.gear, loc("This Hog Solo is so naive! When he returns I'll shoot him and keep that device for myself!"), SAY_THINK, 4000}}) table.insert(dialog03, {func = goToThesurface, args = {hero.gear}}) -- DIALOG04 - At crates, hero learns about the assasins ambush AddSkipFunction(dialog04, Skipanim, {dialog04}) table.insert(dialog04, {func = AnimWait, args = {hero.gear, 4000}}) table.insert(dialog04, {func = FollowGear, args = {hero.gear}}) - table.insert(dialog04, {func = AnimSay, args = {hero.gear, loc("Hoo Ray! I've found it, now I have to get back to Captain Lime!"), SAY_SAY, 4000}}) + table.insert(dialog04, {func = AnimSay, args = {hero.gear, loc("Hoorah! I've found it, now I have to get back to Captain Lime!"), SAY_SAY, 4000}}) table.insert(dialog04, {func = AnimWait, args = {redHedgehogs[1].gear, 4000}}) table.insert(dialog04, {func = AnimSay, args = {redHedgehogs[1].gear, loc("We have spotted the enemy! We'll attack when the enemies start gathering!"), SAY_THINK, 4000}}) table.insert(dialog04, {func = goToThesurface, args = {hero.gear}}) diff -r 9be28be004d4 -r 3b8058b251b8 share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/fruit03.lua --- a/share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/fruit03.lua Fri Dec 06 17:01:40 2013 +0100 +++ b/share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/fruit03.lua Fri Dec 06 20:38:48 2013 +0100 @@ -19,7 +19,7 @@ loc("You'll get an extra Sniper Rifle every time you kill an enemy hog with a limit of max 4 rifles").."|".. loc("You'll get an extra Teleport every time you kill an enemy hog with a limit of max 2 teleports").."|".. loc("The first turn will last 25 sec and every other turn 15 sec").."|".. - loc("If you skip the game your time left will be added to your next turn").."|".. + loc("If you skip a turn then the turn time left will be added to your next turn").."|".. loc("Some parts of the land are indestructible") -- dialogs local dialog01 = {} @@ -79,7 +79,7 @@ Explosives = 0 Map = "fruit03_map" Theme = "Fruit" - + -- Hog Solo AddTeam(teamA.name, teamA.color, "Bone", "Island", "HillBilly", "cm_birdy") hero.gear = AddHog(hero.name, 0, 100, "war_desertgrenadier1") @@ -91,15 +91,15 @@ for i=1,table.getn(enemiesEven) do enemiesEven[i].gear = AddHog(enemiesEven[i].name, 1, 100, hats[math.random(1,table.getn(hats))]) AnimSetGearPosition(enemiesEven[i].gear, enemiesEven[i].x, enemiesEven[i].y) - end + end AddTeam(teamB.name, teamB.color, "Bone", "Island", "HillBilly", "cm_birdy") for i=1,table.getn(enemiesOdd) do enemiesOdd[i].gear = AddHog(enemiesOdd[i].name, 1, 100, hats[math.random(1,table.getn(hats))]) AnimSetGearPosition(enemiesOdd[i].gear, enemiesOdd[i].x, enemiesOdd[i].y) end - + initCheckpoint("fruit03") - + AnimInit() AnimationSetup() end @@ -108,10 +108,10 @@ AnimWait(hero.gear, 3000) FollowGear(hero.gear) ShowMission(missionName, loc("Challenge Objectives"), challengeObjectives, -amSkip, 0) - + AddEvent(onHeroDeath, {hero.gear}, heroDeath, {hero.gear}, 0) AddEvent(onHeroWin, {hero.gear}, heroWin, {hero.gear}, 0) - + --hero ammo AddAmmo(hero.gear, amTeleport, 2) AddAmmo(hero.gear, amSniperRifle, 2) @@ -125,7 +125,7 @@ AddAmmo(enemiesEven[1].gear, amSniperRifle, 100) AddAmmo(enemiesEven[1].gear, amWatermelon, 1) AddAmmo(enemiesEven[1].gear, amGrenade, 5) - + SendHealthStatsOff() AddAnim(dialog01) end @@ -171,7 +171,7 @@ function onPrecise() if GameTime > 3000 then - SetAnimSkip(true) + SetAnimSkip(true) end end @@ -203,8 +203,8 @@ function heroDeath(gear) SendStat(siGameResult, loc("Hog Solo lost, try again!")) - SendStat(siCustomAchievement, loc("You have to eliminate all the enemies")) - SendStat(siCustomAchievement, loc("Read the Challenge Objectives from within the mission for more details")) + SendStat(siCustomAchievement, loc("You have to eliminate all the enemies")) + SendStat(siCustomAchievement, loc("Read the Challenge Objectives from within the mission for more details")) SendStat(siPlayerKills,'1',teamB.name) SendStat(siPlayerKills,'0',teamA.name) EndGame() @@ -213,8 +213,8 @@ function heroWin(gear) saveBonus(2, 1) SendStat(siGameResult, loc("Congratulations, you won!")) - SendStat(siCustomAchievement, loc("You complete the mission in "..TotalRounds.." rounds")) - SendStat(siCustomAchievement, loc("You will gain some extra ammo from the crates the next time you play the \"Getting to the device\" mission")) + SendStat(siCustomAchievement, loc("You complete the mission in "..TotalRounds.." rounds")) + SendStat(siCustomAchievement, loc("You will gain some extra ammo from the crates the next time you play the \"Getting to the device\" mission")) SendStat(siPlayerKills,'1',teamA.name) EndGame() end @@ -243,7 +243,7 @@ table.insert(dialog01, {func = AnimCaption, args = {hero.gear, loc("If you skip the game your time left will be added to your next turn"), 5000}}) table.insert(dialog01, {func = AnimCaption, args = {hero.gear, loc("Some parts of the land are indestructible"), 5000}}) table.insert(dialog01, {func = AnimWait, args = {hero.gear, 500}}) - table.insert(dialog01, {func = startBattle, args = {hero.gear}}) + table.insert(dialog01, {func = startBattle, args = {hero.gear}}) end ------------------ Other Functions ------------------- diff -r 9be28be004d4 -r 3b8058b251b8 share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/ice01.lua --- a/share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/ice01.lua Fri Dec 06 17:01:40 2013 +0100 +++ b/share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/ice01.lua Fri Dec 06 20:38:48 2013 +0100 @@ -90,7 +90,7 @@ Delay = 3 Map = "ice01_map" Theme = "Snow" - + -- get the check point checkPointReached = initCheckpoint("ice01") -- get hero health @@ -98,15 +98,15 @@ if tonumber(GetCampaignVar("HeroHealth")) then heroHealth = tonumber(GetCampaignVar("HeroHealth")) end - + if heroHealth ~= 100 then heroHealth = heroHealth + 5 if heroHealth > 100 then heroHealth = 100 end - SaveCampaignVar("HeroHealth", heroHealth) + SaveCampaignVar("HeroHealth", heroHealth) end - + -- Hog Solo AddTeam(teamC.name, teamC.color, "Bone", "Island", "HillBilly", "cm_birdy") hero.gear = AddHog(hero.name, 0, heroHealth, "war_desertgrenadier1") @@ -119,7 +119,7 @@ -- Frozen Bandits AddTeam(teamB.name, teamB.color, "Bone", "Island", "HillBilly", "cm_birdy") bandit1.gear = AddHog(bandit1.name, 1, 120, "Santa") - AnimSetGearPosition(bandit1.gear, bandit1.x, bandit1.y) + AnimSetGearPosition(bandit1.gear, bandit1.x, bandit1.y) HogTurnLeft(bandit1.gear, true) bandit2.gear = AddHog(bandit2.name, 1, 100, "ushanka") AnimSetGearPosition(bandit2.gear, bandit2.x, bandit2.y) @@ -131,52 +131,52 @@ bandit5.gear = AddHog(bandit5.name, 1, 40, "Sniper") AnimSetGearPosition(bandit5.gear, bandit5.x, bandit5.y) HogTurnLeft(bandit5.gear, true) - + if checkPointReached == 1 then -- Start of the game elseif checkPointReached == 2 then iceGunTaken = true AnimSetGearPosition(hero.gear, 840, 1650) - elseif checkPointReached == 3 then + elseif checkPointReached == 3 then iceGunTaken = true heroAtFinalStep = true heroVisitedAntiFlyArea = true AnimSetGearPosition(hero.gear, 1450, 910) end - + AnimInit() - AnimationSetup() + AnimationSetup() end function onGameStart() AnimWait(hero.gear, 3000) FollowGear(hero.gear) - + -- Add mines AddGear(1612, 940, gtMine, 0, 0, 0, 0) AddGear(1622, 945, gtMine, 0, 0, 0, 0) AddGear(1645, 950, gtMine, 0, 0, 0, 0) AddGear(1655, 960, gtMine, 0, 0, 0, 0) AddGear(1665, 965, gtMine, 0, 0, 0, 0) - + AddGear(1800, 1000, gtMine, 0, 0, 0, 0) AddGear(1810, 1005, gtMine, 0, 0, 0, 0) AddGear(1820, 1010, gtMine, 0, 0, 0, 0) AddGear(1830, 1015, gtMine, 0, 0, 0, 0) AddGear(1840, 1020, gtMine, 0, 0, 0, 0) - + AddGear(1900, 1020, gtMine, 0, 0, 0, 0) AddGear(1910, 1020, gtMine, 0, 0, 0, 0) AddGear(1920, 1020, gtMine, 0, 0, 0, 0) AddGear(1930, 1030, gtMine, 0, 0, 0, 0) AddGear(1940, 1040, gtMine, 0, 0, 0, 0) - + AddGear(2130, 1110, gtMine, 0, 0, 0, 0) AddGear(2140, 1120, gtMine, 0, 0, 0, 0) AddGear(2180, 1120, gtMine, 0, 0, 0, 0) AddGear(2200, 1130, gtMine, 0, 0, 0, 0) AddGear(2210, 1130, gtMine, 0, 0, 0, 0) - + local x=2300 local step=0 while x<3100 do @@ -189,7 +189,7 @@ x = x + math.random(10,30) end end - + AddEvent(onHeroDeath, {hero.gear}, heroDeath, {hero.gear}, 0) AddEvent(onHeroFinalStep, {hero.gear}, heroFinalStep, {hero.gear}, 0) AddEvent(onAntiFlyArea, {hero.gear}, antiFlyArea, {hero.gear}, 1) @@ -197,7 +197,7 @@ AddEvent(onNonAntiFlyArea, {hero.gear}, nonAntiFlyArea, {hero.gear}, 1) AddEvent(onThantaDeath, {bandit1.gear}, thantaDeath, {bandit1.gear}, 0) AddEvent(onHeroWin, {hero.gear}, heroWin, {hero.gear}, 0) - + AddAmmo(hero.gear, amJetpack, 99) AddAmmo(bandit1.gear, amBazooka, 5) AddAmmo(bandit2.gear, amBazooka, 4) @@ -205,7 +205,7 @@ AddAmmo(bandit3.gear, amGrenade, 3) AddAmmo(bandit4.gear, amBazooka, 5) AddAmmo(bandit5.gear, amBazooka, 5) - + if checkPointReached == 1 then AddAmmo(hero.gear, amBazooka, 1) SpawnAmmoCrate(icegunX, icegunY, amIceGun) @@ -219,7 +219,7 @@ AddAmmo(hero.gear, amIceGun, 6) AnimCaption(hero.gear, loc("Go to Thanta and get the device part!"), 5000) end - + SendHealthStatsOff() end @@ -230,7 +230,7 @@ TurnTimeLeft = 0 elseif not heroVisitedAntiFlyArea and CurrentHedgehog == hero.gear then TurnTimeLeft = -1 - elseif not heroAtFinalStep and (CurrentHedgehog == bandit1.gear or CurrentHedgehog == bandit4.gear or CurrentHedgehog == bandit5.gear) then + elseif not heroAtFinalStep and (CurrentHedgehog == bandit1.gear or CurrentHedgehog == bandit4.gear or CurrentHedgehog == bandit5.gear) then AnimSwitchHog(hero.gear) TurnTimeLeft = 0 elseif heroAtFinalStep and (CurrentHedgehog == bandit2.gear or CurrentHedgehog == bandit3.gear) then @@ -291,7 +291,7 @@ end ExecuteAfterAnimations() CheckEvents() - + if GetEffect(bandit1.gear, heFrozen) > 256 and not bandit1.frozen then bandit1.frozen = true SetEffect(bandit1.gear, heFrozen, 9999999999) @@ -323,7 +323,7 @@ function onPrecise() if GameTime > 3000 then - SetAnimSkip(true) + SetAnimSkip(true) end end @@ -404,12 +404,12 @@ function antiFlyArea(gear) heroAtAntiFlyArea = true if not heroVisitedAntiFlyArea then - TurnTimeLeft = 0 + TurnTimeLeft = 0 FollowGear(hero.gear) - AnimSwitchHog(bandit1.gear) + AnimSwitchHog(bandit1.gear) FollowGear(hero.gear) TurnTimeLeft = 0 - end + end AddAmmo(hero.gear, amJetpack, 0) heroVisitedAntiFlyArea = true end @@ -510,13 +510,13 @@ table.insert(dialog02, {func = AnimSay, args = {hero.gear, loc("I just want the strange device you found!"), SAY_SAY, 3000}}) table.insert(dialog02, {func = AnimWait, args = {bandit1.gear, 4000}}) table.insert(dialog02, {func = AnimSay, args = {bandit1.gear, loc("Here! Take it..."), SAY_SAY, 3000}}) - table.insert(dialog02, {func = actionsOnWin, args = {}}) + table.insert(dialog02, {func = actionsOnWin, args = {}}) end -------------- Other Functions ------------------- function actionsOnWin() - saveCompletedStatus(4) + saveCompletedStatus(4) SendStat(siGameResult, loc("Congratulations, you acquired the device part!")) SendStat(siCustomAchievement, loc("At the end of the game your health was ")..GetHealth(hero.gear)) -- maybe add number of tries for each part? diff -r 9be28be004d4 -r 3b8058b251b8 share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/moon02.lua --- a/share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/moon02.lua Fri Dec 06 17:01:40 2013 +0100 +++ b/share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/moon02.lua Fri Dec 06 20:38:48 2013 +0100 @@ -59,7 +59,7 @@ Explosives = 0 Map = "moon02_map" Theme = "Cheese" - + -- Hog Solo AddTeam(teamA.name, teamA.color, "Bone", "Island", "HillBilly", "cm_birdy") hero.gear = AddHog(hero.name, 0, 1, "war_desertgrenadier1") @@ -69,9 +69,9 @@ runner.gear = AddHog(runner.name, 0, 100, "sth_Sonic") AnimSetGearPosition(runner.gear, runner.places[1].x, runner.places[1].y) HogTurnLeft(runner.gear, true) - + initCheckpoint("moon02") - + AnimInit() AnimationSetup() end @@ -80,12 +80,12 @@ AnimWait(hero.gear, 3000) FollowGear(hero.gear) ShowMission(missionName, loc("Challenge Objectives"), challengeObjectives, -amSkip, 0) - + AddEvent(onHeroDeath, {hero.gear}, heroDeath, {hero.gear}, 0) - + AddAmmo(hero.gear, amRope, 1) AddAmmo(hero.gear, amSkip, 1) - + SendHealthStatsOff() hogTurn = runner.gear AddAnim(dialog01) @@ -123,7 +123,7 @@ function onPrecise() if GameTime > 3000 then - SetAnimSkip(true) + SetAnimSkip(true) end end @@ -161,9 +161,9 @@ table.insert(dialog01, {func = AnimSay, args = {runner.gear, loc("So you are interested in Professor Hogevil"), SAY_SAY, 3000}}) table.insert(dialog01, {func = AnimSay, args = {runner.gear, loc("We'll play a game first"), SAY_SAY, 3000}}) table.insert(dialog01, {func = AnimSay, args = {runner.gear, loc("I'll let you know whatever I know about him if you manage to catch me 3 times"), SAY_SAY, 4000}}) - table.insert(dialog01, {func = AnimSay, args = {runner.gear, loc("Let's go!"), SAY_SAY, 2000}}) + table.insert(dialog01, {func = AnimSay, args = {runner.gear, loc("Let's go!"), SAY_SAY, 2000}}) table.insert(dialog01, {func = moveRunner, args = {}}) - -- DIALOG 02 - Hog Solo story + -- DIALOG 02 - Hog Solo story AddSkipFunction(dialog02, Skipanim, {dialog02}) table.insert(dialog02, {func = AnimWait, args = {hero.gear, 3200}}) table.insert(dialog02, {func = AnimCaption, args = {hero.gear, loc("The truth about Professor Hogevil"), 5000}})