share/hedgewars/Data/Scripts/SpeedShoppa.lua
changeset 13034 fe9c12209f15
parent 12224 d62d6f8ebef1
child 13065 a297e06d1607
equal deleted inserted replaced
13033:a823de31240e 13034: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"))