share/hedgewars/Data/Scripts/SpeedShoppa.lua
changeset 13039 fe9c12209f15
parent 12229 d62d6f8ebef1
child 13070 a297e06d1607
equal deleted inserted replaced
13038:a823de31240e 13039:fe9c12209f15
   160 
   160 
   161 	_G.finalize = function()
   161 	_G.finalize = function()
   162 		if not gameEnded then
   162 		if not gameEnded then
   163 			if cratesCollected == #crates then
   163 			if cratesCollected == #crates then
   164 				PlaySound(sndVictory, playerHog)
   164 				PlaySound(sndVictory, playerHog)
       
   165 				SetEffect(playerHog, heInvulnerable, 1)
   165 				SetState(playerHog, bor(GetState(playerHog), gstWinner))
   166 				SetState(playerHog, bor(GetState(playerHog), gstWinner))
   166 				SetState(playerHog, band(GetState(playerHog), bnot(gstHHDriven)))
   167 				SetState(playerHog, band(GetState(playerHog), bnot(gstHHDriven)))
   167 				AddCaption(loc("Challenge completed!"))
   168 				AddCaption(loc("Challenge completed!"))
   168 				SendStat(siGameResult, loc("Challenge completed!"))
   169 				SendStat(siGameResult, loc("Challenge completed!"))
   169 				SendStat(siPointType, loc("milliseconds"))
   170 				SendStat(siPointType, loc("milliseconds"))