ASA, moon01: Fix minions sometimes taking double turns
authorWuzzy <almikes@aol.com>
Sat, 30 Sep 2017 00:43:56 +0200
changeset 12601 726b1edfc511
parent 12600 ef780eda6e48
child 12602 a9a7ef966e72
ASA, moon01: Fix minions sometimes taking double turns
share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/moon01.lua
--- a/share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/moon01.lua	Sat Sep 30 00:09:48 2017 +0200
+++ b/share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/moon01.lua	Sat Sep 30 00:43:56 2017 +0200
@@ -240,17 +240,20 @@
 
 function onNewTurn()
 	-- rounds start if hero got his weapons or got near the enemies
-	if not weaponsAcquired and not battleZoneReached and CurrentHedgehog ~= hero.gear then
-		EndTurn(true)
-	elseif weaponsAcquired and not battleZoneReached and CurrentHedgehog ~= hero.gear and afterDialog02 then
-		battleZone(hero.gear)
-	elseif not weaponsAcquired and not battleZoneReached and CurrentHedgehog == hero.gear then
-		TurnTimeLeft = -1
+	if CurrentHedgehog == hero.gear then
+		if not weaponsAcquired and not battleZoneReached then
+			TurnTimeLeft = -1
+		end
+	elseif CurrentHedgehog == minion1.gear or CurrentHedgehog == minion2.gear or CurrentHedgehog == minion3.gear then
+		if not weaponsAcquired and not battleZoneReached then
+			EndTurn(true)
+		elseif weaponsAcquired and not battleZoneReached and afterDialog02 then
+			battleZone(hero.gear)
+		end
 	elseif CurrentHedgehog == paoth1.gear or CurrentHedgehog == paoth2.gear
 		or CurrentHedgehog == paoth3.gear or CurrentHedgehog == paoth4.gear then
 		EndTurn(true)
 	elseif CurrentHedgehog == professor.gear then
-		AnimSwitchHog(hero.gear)
 		EndTurn(true)
 	end
 end