share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/fruit01.lua
changeset 13660 45b325bb9bb1
parent 13588 141cdfe0f3ca
child 14406 6c21bd8547dd
equal deleted inserted replaced
13659:5b58aa82b5dc 13660:45b325bb9bb1
   493 	sendSimpleTeamRankings({teamC.name, teamA.name, teamD.name, teamB.name})
   493 	sendSimpleTeamRankings({teamC.name, teamA.name, teamD.name, teamB.name})
   494 	EndGame()
   494 	EndGame()
   495 end
   495 end
   496 
   496 
   497 function getNextWave()
   497 function getNextWave()
       
   498 	if GetHogTeamName(CurrentHedgehog) ~= teamC.name then
       
   499 		return
       
   500 	end
   498 	if TotalRounds == 4 then
   501 	if TotalRounds == 4 then
   499 		RestoreHog(yellowArmy[3].gear)
   502 		RestoreHog(yellowArmy[3].gear)
   500 		AnimCaption(hero.gear, loc("Next wave in 3 turns"), 5000)
   503 		AnimCaption(hero.gear, string.format(loc("%s enters the battlefield"), yellowArmy[3].name), 5000)
   501 		if not chooseToBattle and not GetHealth(yellow1.gear) then
   504 		if not chooseToBattle and not GetHealth(yellow1.gear) then
   502 			SetGearPosition(yellowArmy[3].gear, yellow1.x, yellow1.y)
   505 			SetGearPosition(yellowArmy[3].gear, yellow1.x, yellow1.y)
   503 		end
   506 		end
   504 	elseif TotalRounds == 7 then
   507 	elseif TotalRounds == 7 then
   505 		RestoreHog(yellowArmy[4].gear)
   508 		RestoreHog(yellowArmy[4].gear)
   506 		RestoreHog(yellowArmy[5].gear)
   509 		RestoreHog(yellowArmy[5].gear)
   507 		AnimCaption(hero.gear, loc("Last wave in 3 turns"), 5000)
   510 		AnimCaption(hero.gear, string.format(loc("%s and %s enter the battlefield"), yellowArmy[4].name, yellowArmy[5].name), 5000)
   508 		if not chooseToBattle and not GetHealth(yellow1.gear) and not GetHealth(yellowArmy[3].gear) then
   511 		if not chooseToBattle and not GetHealth(yellow1.gear) and not GetHealth(yellowArmy[3].gear) then
   509 			SetGearPosition(yellowArmy[4].gear, yellow1.x, yellow1.y)
   512 			SetGearPosition(yellowArmy[4].gear, yellow1.x, yellow1.y)
   510 		end
   513 		end
   511 	elseif TotalRounds == 10 then
   514 	elseif TotalRounds == 10 then
   512 		RestoreHog(yellowArmy[6].gear)
   515 		RestoreHog(yellowArmy[6].gear)
   513 		RestoreHog(yellowArmy[7].gear)
   516 		RestoreHog(yellowArmy[7].gear)
       
   517 		AnimCaption(hero.gear, string.format(loc("%s and %s enter the battlefield"), yellowArmy[6].name, yellowArmy[7].name), 5000)
   514 		if not chooseToBattle and not GetHealth(yellow1.gear) and not GetHealth(yellowArmy[3].gear)
   518 		if not chooseToBattle and not GetHealth(yellow1.gear) and not GetHealth(yellowArmy[3].gear)
   515 				and not GetHealth(yellowArmy[4].gear) then
   519 				and not GetHealth(yellowArmy[4].gear) then
   516 			SetGearPosition(yellowArmy[6].gear, yellow1.x, yellow1.y)
   520 			SetGearPosition(yellowArmy[6].gear, yellow1.x, yellow1.y)
   517 		end
   521 		end
   518 	end
   522 	end