Clear hog gear message less agressively in ACF3
authorWuzzy <Wuzzy2@mail.ru>
Thu, 17 Jan 2019 00:41:55 +0100
changeset 14627 64be9a8087f2
parent 14626 eb5ed9ead151
child 14628 ea9f0a99b55b
Clear hog gear message less agressively in ACF3
share/hedgewars/Data/Missions/Campaign/A_Classic_Fairytale/journey.lua
--- a/share/hedgewars/Data/Missions/Campaign/A_Classic_Fairytale/journey.lua	Thu Jan 17 00:10:24 2019 +0100
+++ b/share/hedgewars/Data/Missions/Campaign/A_Classic_Fairytale/journey.lua	Thu Jan 17 00:41:55 2019 +0100
@@ -201,7 +201,7 @@
   AddEvent(CheckOnFirstGirder, {}, DoOnFirstGirder, {}, 0)
   AddEvent(CheckTookSniper, {}, DoTookSniper, {}, 0)
   AddEvent(CheckFailedCourse, {}, DoFailedCourse, {}, 0)
-  SetGearMessage(leaks, 0)
+  SetGearMessage(leaks, band(GetGearMessage(leaks), bnot(gmAllStoppable)))
   TurnsLeft = 12
   SetTurnTimeLeft(TurnTime)
   ShowMission(loc("The Journey Back"), loc("Collateral Damage"),
@@ -234,8 +234,8 @@
 
 function AfterEndAnimAlone()
   stage = endStage
+  SetGearMessage(dense, band(GetGearMessage(dense), bnot(gmAllStoppable)))
   AnimSwitchHog(leaks)
-  SetGearMessage(leaks, 0)
   SetTurnTimeLeft(MAX_TURN_TIME)
   ShowMission(loc("The Journey Back"), loc("Collateral Damage II"), loc("Save Fell From Heaven!"), 1, 4000)
   AddEvent(CheckLost, {}, DoLost, {}, 0)
@@ -245,9 +245,8 @@
 
 function AfterEndAnimDuo()
   stage = endStage
+  SetGearMessage(dense, band(GetGearMessage(dense), bnot(gmAllStoppable)))
   AnimSwitchHog(leaks)
-  SetGearMessage(leaks, 0)
-  SetGearMessage(dense, 0)
   SetTurnTimeLeft(MAX_TURN_TIME)
   ShowMission(loc("The Journey Back"), loc("Collateral Damage II"), loc("Save Fell From Heaven!"), 1, 4000)
   AddEvent(CheckLost, {}, DoLost, {}, 0)
@@ -263,7 +262,7 @@
 end
 
 function AfterStartAnim()
-  SetGearMessage(leaks, 0)
+  SetGearMessage(leaks, band(GetGearMessage(leaks), bnot(gmAllStoppable)))
   SetTurnTimeLeft(TurnTime)
   local goal = loc("Get the crate on the other side of the island.")
   local hint = loc("Hint: You might want to stay out of sight and take all the crates ...")
@@ -321,8 +320,8 @@
 function AfterPastFlowerAnim()
   PlaceMinesDuo()
   AddEvent(CheckDensePit, {}, DoDensePit, {}, 0)
-  SetGearMessage(leaks, 0)
-  SetGearMessage(dense, 0)
+  SetGearMessage(dense, band(GetGearMessage(dense), bnot(gmAllStoppable)))
+  SetGearMessage(leaks, band(GetGearMessage(leaks), bnot(gmAllStoppable)))
   EndTurn(true)
   ShowMission(loc("The Journey Back"), loc("The Savior"), 
     loc("Get Dense Cloud out of the pit!") .. "|" ..
@@ -343,8 +342,8 @@
   AddAmmo(cannibals[5], amDEagle, 0)
   HideHedge(cannibals[5])
   AddEvent(CheckTookFire, {}, DoTookFire, {}, 0)
-  SetGearMessage(leaks, 0)
-  SetGearMessage(dense, 0)
+  SetGearMessage(dense, band(GetGearMessage(dense), bnot(gmAllStoppable)))
+  SetGearMessage(leaks, band(GetGearMessage(leaks), bnot(gmAllStoppable)))
   EndTurn(true)
   ShowMission(loc("The Journey Back"), loc("They never learn"),
     loc("Free Dense Cloud and continue the mission!") .. "|" ..