share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/ice01.lua
changeset 14488 7bb7e5e54f70
parent 14401 6c21bd8547dd
child 14612 bd15c8551318
equal deleted inserted replaced
14487:d72fb761aa59 14488:7bb7e5e54f70
   108 			heroHealth = 100
   108 			heroHealth = 100
   109 		end
   109 		end
   110 		SaveCampaignVar("HeroHealth", heroHealth)
   110 		SaveCampaignVar("HeroHealth", heroHealth)
   111 	end
   111 	end
   112 
   112 
   113 	-- Hog Solo
   113 	-- Hero
   114 	AddTeam(teamC.name, teamC.color, "Simple", "Island", "Default", "hedgewars")
   114 	teamC.name = AddMissionTeam(teamC.color)
   115 	hero.gear = AddHog(hero.name, 0, heroHealth, "war_desertgrenadier1")
   115 	hero.gear = AddMissionHog(heroHealth)
       
   116 	hero.name = GetHogName(hero.gear)
   116 	AnimSetGearPosition(hero.gear, hero.x, hero.y)
   117 	AnimSetGearPosition(hero.gear, hero.x, hero.y)
   117 	HogTurnLeft(hero.gear, true)
   118 	HogTurnLeft(hero.gear, true)
   118 	-- Ally
   119 	-- Ally
   119 	AddTeam(teamA.name, teamA.color, "heart", "Island", "Default", "cm_face")
   120 	teamA.name = AddTeam(teamA.name, teamA.color, "heart", "Island", "Default", "cm_face")
   120 	ally.gear = AddHog(ally.name, 0, 100, "war_airwarden02")
   121 	ally.gear = AddHog(ally.name, 0, 100, "war_airwarden02")
   121 	AnimSetGearPosition(ally.gear, ally.x, ally.y)
   122 	AnimSetGearPosition(ally.gear, ally.x, ally.y)
   122 	-- Frozen Bandits
   123 	-- Frozen Bandits
   123 	AddTeam(teamB.name, teamB.color, "plant2", "Island", "Default", "cm_pirate")
   124 	teamB.name = AddTeam(teamB.name, teamB.color, "plant2", "Island", "Default", "cm_pirate")
   124 	bandit1.gear = AddHog(bandit1.name, 1, 120, "Santa")
   125 	bandit1.gear = AddHog(bandit1.name, 1, 120, "Santa")
   125 	AnimSetGearPosition(bandit1.gear, bandit1.x, bandit1.y)
   126 	AnimSetGearPosition(bandit1.gear, bandit1.x, bandit1.y)
   126 	HogTurnLeft(bandit1.gear, true)
   127 	HogTurnLeft(bandit1.gear, true)
   127 	bandit2.gear = AddHog(bandit2.name, 1, 100, "ushanka")
   128 	bandit2.gear = AddHog(bandit2.name, 1, 100, "ushanka")
   128 	AnimSetGearPosition(bandit2.gear, bandit2.x, bandit2.y)
   129 	AnimSetGearPosition(bandit2.gear, bandit2.x, bandit2.y)
   437 	heroAtAntiFlyArea = false
   438 	heroAtAntiFlyArea = false
   438 	AddAmmo(hero.gear, amJetpack, 99)
   439 	AddAmmo(hero.gear, amJetpack, 99)
   439 end
   440 end
   440 
   441 
   441 function heroDeath(gear)
   442 function heroDeath(gear)
   442 	SendStat(siGameResult, loc("Hog Solo lost, try again!"))
   443 	SendStat(siGameResult, string.format(loc("%s lost, try again!"), hero.name))
   443 	SendStat(siCustomAchievement, loc("To win the game you have to stand next to Thanta."))
   444 	SendStat(siCustomAchievement, loc("To win the game you have to stand next to Thanta."))
   444 	SendStat(siCustomAchievement, loc("Most of the time you'll be able to use the freezer only."))
   445 	SendStat(siCustomAchievement, loc("Most of the time you'll be able to use the freezer only."))
   445 	SendStat(siCustomAchievement, loc("Use the bazooka and the flying saucer to get the freezer."))
   446 	SendStat(siCustomAchievement, loc("Use the bazooka and the flying saucer to get the freezer."))
   446 	sendSimpleTeamRankings({teamB.name, teamC.name, teamA.name})
   447 	sendSimpleTeamRankings({teamB.name, teamC.name, teamA.name})
   447 	EndGame()
   448 	EndGame()
   467 function heroAtIceGun(gear)
   468 function heroAtIceGun(gear)
   468 	iceGunTaken=true
   469 	iceGunTaken=true
   469 end
   470 end
   470 
   471 
   471 function thantaDeath(gear)
   472 function thantaDeath(gear)
   472 	SendStat(siGameResult, loc("Hog Solo lost, try again!"))
   473 	SendStat(siGameResult, string.format(loc("%s lost, try again!"), hero.name))
   473 	SendStat(siCustomAchievement, loc("Noo, Thanta has to stay alive!"))
   474 	SendStat(siCustomAchievement, loc("Noo, Thanta has to stay alive!"))
   474 	SendStat(siCustomAchievement, loc("To win the game you have to go next to Thanta."))
   475 	SendStat(siCustomAchievement, loc("To win the game you have to go next to Thanta."))
   475 	SendStat(siCustomAchievement, loc("Most of the time you'll be able to use the freezer only."))
   476 	SendStat(siCustomAchievement, loc("Most of the time you'll be able to use the freezer only."))
   476 	SendStat(siCustomAchievement, loc("Use the bazooka and the flying saucer to get the freezer."))
   477 	SendStat(siCustomAchievement, loc("Use the bazooka and the flying saucer to get the freezer."))
   477 	sendSimpleTeamRankings({teamB.name, teamC.name, teamA.name})
   478 	sendSimpleTeamRankings({teamB.name, teamC.name, teamA.name})