share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/fruit01.lua
changeset 12519 d89dabfd07ce
parent 12229 d62d6f8ebef1
child 12543 952afc3d2df2
--- a/share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/fruit01.lua	Mon Sep 25 17:06:35 2017 +0200
+++ b/share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/fruit01.lua	Mon Sep 25 18:02:35 2017 +0200
@@ -200,17 +200,17 @@
 
 function onNewTurn()
 	if not heroPlayedFirstTurn and CurrentHedgehog ~= hero.gear and startBattleCalled then
-		TurnTimeLeft = 0
+		EndTurn(true)
 	elseif not heroPlayedFirstTurn and CurrentHedgehog == hero.gear and startBattleCalled then
 		heroPlayedFirstTurn = true
 	elseif not heroPlayedFirstTurn and CurrentHedgehog == green1.gear then
-		TurnTimeLeft = 0
+		EndTurn(true)
 	else
 		if chooseToBattle then
 			if CurrentHedgehog == green1.gear then
 				TotalRounds = TotalRounds - 2
 				AnimSwitchHog(previousHog)
-				TurnTimeLeft = 0
+				EndTurn(true)
 			end
 			previousHog = CurrentHedgehog
 		end
@@ -353,7 +353,7 @@
 end
 
 function heroSelect(gear)
-	TurnTimeLeft = 0
+	EndTurn(true)
 	FollowGear(hero.gear)
 	if GetX(hero.gear) < hero.x then
 		chooseToBattle = true
@@ -443,7 +443,7 @@
 	DeleteGear(green1.human)
 	green1.gear = green1.bot
 	startBattleCalled = true
-	TurnTimeLeft = 0
+	EndTurn(true)
 end
 
 function gameLost()