Make hog invulnerable after winning SpeedShoppa or TargetPractice mission
authorWuzzy <Wuzzy2@mail.ru>
Mon, 19 Feb 2018 13:46:40 +0100
changeset 13034 fe9c12209f15
parent 13033 a823de31240e
child 13035 958c6ff056de
Make hog invulnerable after winning SpeedShoppa or TargetPractice mission
ChangeLog.txt
share/hedgewars/Data/Scripts/SpeedShoppa.lua
share/hedgewars/Data/Scripts/TargetPractice.lua
--- a/ChangeLog.txt	Mon Feb 19 11:18:13 2018 +0100
+++ b/ChangeLog.txt	Mon Feb 19 13:46:40 2018 +0100
@@ -40,6 +40,7 @@
  + Battalion (King Mode): Kings always wear crowns and non-kings don't, regardless of settings
  + Battalion (King Mode): If the king dies, the hogs die normally instead of disappearing
  + Space Invasion: Add a default Space Invasion game scheme
+ + HedgeEditor: Show cursor coordinates in top left corner
  * Battalion: Some texts in the mission panel were wrong and misleading
  * Construction Mode: Remove drill strike if added by weapon scheme (it's broken)
 
--- a/share/hedgewars/Data/Scripts/SpeedShoppa.lua	Mon Feb 19 11:18:13 2018 +0100
+++ b/share/hedgewars/Data/Scripts/SpeedShoppa.lua	Mon Feb 19 13:46:40 2018 +0100
@@ -162,6 +162,7 @@
 		if not gameEnded then
 			if cratesCollected == #crates then
 				PlaySound(sndVictory, playerHog)
+				SetEffect(playerHog, heInvulnerable, 1)
 				SetState(playerHog, bor(GetState(playerHog), gstWinner))
 				SetState(playerHog, band(GetState(playerHog), bnot(gstHHDriven)))
 				AddCaption(loc("Challenge completed!"))
--- a/share/hedgewars/Data/Scripts/TargetPractice.lua	Mon Feb 19 11:18:13 2018 +0100
+++ b/share/hedgewars/Data/Scripts/TargetPractice.lua	Mon Feb 19 13:46:40 2018 +0100
@@ -213,6 +213,7 @@
 					AddCaption(loc("You have destroyed all targets!"), 0xFFFFFFFF, capgrpGameState)
 					ShowMission(params.missionTitle, loc("Aiming practice"), loc("Congratulations! You have destroyed all targets within the time."), 0, 0)
 					PlaySound(sndVictory, player)
+					SetEffect(player, heInvulnerable, 1)
 					SetState(player, bor(GetState(player), gstWinner))
 					time_goal = TurnTimeLeft
 					-- Disable control