88 end |
88 end |
89 end |
89 end |
90 |
90 |
91 function SkipDamageAnim(anim) |
91 function SkipDamageAnim(anim) |
92 SwitchHog(youngh) |
92 SwitchHog(youngh) |
93 SetInputMask(0xFFFFFFFF) |
93 AnimSetInputMask(0xFFFFFFFF) |
94 end |
94 end |
95 |
95 |
96 function SkipOnShroom() |
96 function SkipOnShroom() |
97 Skipanim(onShroomAnim) |
97 Skipanim(onShroomAnim) |
98 AnimSetGearPosition(elderh, 2700, 1278) |
98 AnimSetGearPosition(elderh, 2700, 1278) |
444 AddEvent(CheckTimesUp, {}, DoTimesUp, {}, 1) |
444 AddEvent(CheckTimesUp, {}, DoTimesUp, {}, 1) |
445 -- Remove up the old mole blockade from the parachute challenge |
445 -- Remove up the old mole blockade from the parachute challenge |
446 EraseSprite(rope2GirderX, rope2GirderY, sprAmGirder, 6) |
446 EraseSprite(rope2GirderX, rope2GirderY, sprAmGirder, 6) |
447 end |
447 end |
448 |
448 |
449 function CheckChoice() |
|
450 return difficulty ~= 0 |
|
451 end |
|
452 |
|
453 function DoChoice() |
449 function DoChoice() |
|
450 PlaySound(sndPlaced) |
454 difficultyChoice = false |
451 difficultyChoice = false |
455 SetInputMask(0xFFFFFFFF) |
452 AnimSetInputMask(0xFFFFFFFF) |
456 StartChallenge(120000 + chalTries * 20000) |
453 StartChallenge(120000 + chalTries * 20000) |
457 end |
454 end |
458 |
455 |
459 function CheckCratesColled() |
456 function CheckCratesColled() |
460 return cratesCollected == crateNum[difficulty] |
457 return cratesCollected == crateNum[difficulty] |
576 PutCrate(1) |
573 PutCrate(1) |
577 TurnTimeLeft = time |
574 TurnTimeLeft = time |
578 ShowMission(loc("First Blood"), loc("The Crate Frenzy"), loc("Collect the crates within the time limit!|If you fail, you'll have to try again."), 1, 5000) |
575 ShowMission(loc("First Blood"), loc("The Crate Frenzy"), loc("Collect the crates within the time limit!|If you fail, you'll have to try again."), 1, 5000) |
579 end |
576 end |
580 |
577 |
|
578 function ChoiceDialog() |
|
579 local dstr |
|
580 if difficulty == 2 then |
|
581 dstr = loc("Difficulty: Hard") |
|
582 else |
|
583 dstr = loc("Difficulty: Easy") |
|
584 end |
|
585 ShowMission(loc("First Blood"), loc("The Torment"), |
|
586 loc("Your next task is to collect some crates by using the rope!") .. "|" .. |
|
587 loc("Press [Left] and [Right] to change the difficulty.") .. "| |" .. |
|
588 dstr .. "| |" .. |
|
589 loc("Press [Jump] to begin."), |
|
590 0, 300000) |
|
591 end |
|
592 |
581 function SetChoice() |
593 function SetChoice() |
582 SetInputMask(band(0xFFFFFFFF, bnot(gmAnimate+gmAttack+gmDown+gmHJump+gmLJump+gmSlot+gmSwitch+gmTimer+gmUp+gmWeapon))) |
594 AnimSetInputMask(0) |
583 difficultyChoice = true |
595 difficultyChoice = true |
584 ShowMission(loc("First Blood"), loc("The Torment"), loc("Select difficulty: [Left] - easier or [Right] - harder"), 0, 300000) |
596 ChoiceDialog() |
585 AddEvent(CheckChoice, {}, DoChoice, {}, 0) |
|
586 end |
597 end |
587 |
598 |
588 function SetTime(time) |
599 function SetTime(time) |
589 TurnTimeLeft = time |
600 TurnTimeLeft = time |
590 end |
601 end |