Fix duplicate/confusing wave messages in ASA fruit01
authorWuzzy <Wuzzy2@mail.ru>
Sat, 11 Aug 2018 23:20:08 +0200
changeset 13655 45b325bb9bb1
parent 13654 5b58aa82b5dc
child 13656 edbe5d80ffbc
Fix duplicate/confusing wave messages in ASA fruit01
share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/fruit01.lua
--- a/share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/fruit01.lua	Sat Aug 11 22:35:23 2018 +0200
+++ b/share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/fruit01.lua	Sat Aug 11 23:20:08 2018 +0200
@@ -495,22 +495,26 @@
 end
 
 function getNextWave()
+	if GetHogTeamName(CurrentHedgehog) ~= teamC.name then
+		return
+	end
 	if TotalRounds == 4 then
 		RestoreHog(yellowArmy[3].gear)
-		AnimCaption(hero.gear, loc("Next wave in 3 turns"), 5000)
+		AnimCaption(hero.gear, string.format(loc("%s enters the battlefield"), yellowArmy[3].name), 5000)
 		if not chooseToBattle and not GetHealth(yellow1.gear) then
 			SetGearPosition(yellowArmy[3].gear, yellow1.x, yellow1.y)
 		end
 	elseif TotalRounds == 7 then
 		RestoreHog(yellowArmy[4].gear)
 		RestoreHog(yellowArmy[5].gear)
-		AnimCaption(hero.gear, loc("Last wave in 3 turns"), 5000)
+		AnimCaption(hero.gear, string.format(loc("%s and %s enter the battlefield"), yellowArmy[4].name, yellowArmy[5].name), 5000)
 		if not chooseToBattle and not GetHealth(yellow1.gear) and not GetHealth(yellowArmy[3].gear) then
 			SetGearPosition(yellowArmy[4].gear, yellow1.x, yellow1.y)
 		end
 	elseif TotalRounds == 10 then
 		RestoreHog(yellowArmy[6].gear)
 		RestoreHog(yellowArmy[7].gear)
+		AnimCaption(hero.gear, string.format(loc("%s and %s enter the battlefield"), yellowArmy[6].name, yellowArmy[7].name), 5000)
 		if not chooseToBattle and not GetHealth(yellow1.gear) and not GetHealth(yellowArmy[3].gear)
 				and not GetHealth(yellowArmy[4].gear) then
 			SetGearPosition(yellowArmy[6].gear, yellow1.x, yellow1.y)