Reduce skipping craziness in ASA fruit02 a bit
authorWuzzy <Wuzzy2@mail.ru>
Fri, 21 Dec 2018 20:31:21 +0100
changeset 14517 8db03d9bc6e9
parent 14516 ff2c1f25fc03
child 14518 34fd1f32f440
Reduce skipping craziness in ASA fruit02 a bit
share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/fruit02.lua
--- a/share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/fruit02.lua	Fri Dec 21 17:47:54 2018 +0100
+++ b/share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/fruit02.lua	Fri Dec 21 20:31:21 2018 +0100
@@ -249,8 +249,12 @@
 function onNewTurn()
 	if not inBattle and CurrentHedgehog == green1.gear then
 		EndTurn(true)
-	elseif CurrentHedgehog == green2.gear or CurrentHedgehog == green3.gear then
-		EndTurn(true)
+	elseif (not inBattle) and GetHogTeamName(CurrentHedgehog) == teamA.name then
+		if CurrentHedgehog ~= hero.gear then
+			SwitchHog(hero.gear)
+		end
+		SetTurnTimeLeft(MAX_TURN_TIME)
+		wind()
 	elseif inBattle then
 		if CurrentHedgehog == green1.gear and previousHog ~= hero.gear then
 			EndTurn(true)
@@ -264,9 +268,6 @@
 		end
 		SetTurnTimeLeft(20000)
 		wind()
-	elseif not inBattle and CurrentHedgehog == hero.gear then
-		SetTurnTimeLeft(MAX_TURN_TIME)
-		wind()
 	else
 		EndTurn(true)
 	end