equal
deleted
inserted
replaced
162 end |
162 end |
163 |
163 |
164 _G.finalize = function() |
164 _G.finalize = function() |
165 if not gameEnded then |
165 if not gameEnded then |
166 if cratesCollected == #crates then |
166 if cratesCollected == #crates then |
|
167 SaveMissionVar("Won", "true") |
167 PlaySound(sndVictory, playerHog) |
168 PlaySound(sndVictory, playerHog) |
168 SetEffect(playerHog, heInvulnerable, 1) |
169 SetEffect(playerHog, heInvulnerable, 1) |
169 SetState(playerHog, bor(GetState(playerHog), gstWinner)) |
170 SetState(playerHog, bor(GetState(playerHog), gstWinner)) |
170 SetState(playerHog, band(GetState(playerHog), bnot(gstHHDriven))) |
171 SetState(playerHog, band(GetState(playerHog), bnot(gstHHDriven))) |
171 AddCaption(loc("Challenge completed!")) |
172 AddCaption(loc("Challenge completed!")) |