equal
deleted
inserted
replaced
544 return cratesCollected == crateNum[difficulty] |
544 return cratesCollected == crateNum[difficulty] |
545 end |
545 end |
546 |
546 |
547 function DoCratesColled() |
547 function DoCratesColled() |
548 RemoveEventFunc(CheckTimesUp) |
548 RemoveEventFunc(CheckTimesUp) |
549 SetTurnTimeLeft(cMaxTurnTime) |
549 SetTurnTimeLeft(MAX_TURN_TIME) |
550 AddCaption(loc("As the challenge was completed, Leaks A Lot set foot on the ground...")) |
550 AddCaption(loc("As the challenge was completed, Leaks A Lot set foot on the ground...")) |
551 end |
551 end |
552 |
552 |
553 function CheckChallengeWon() |
553 function CheckChallengeWon() |
554 return cratesCollected == crateNum[difficulty] and StoppedGear(youngh) |
554 return cratesCollected == crateNum[difficulty] and StoppedGear(youngh) |
571 |
571 |
572 function DoTimesUp() |
572 function DoTimesUp() |
573 challengeFailed = true |
573 challengeFailed = true |
574 deleteCrate = true |
574 deleteCrate = true |
575 DeleteGear(crates[1]) |
575 DeleteGear(crates[1]) |
576 SetTurnTimeLeft(cMaxTurnTime) |
576 SetTurnTimeLeft(MAX_TURN_TIME) |
577 AddCaption(loc("And so happened that Leaks A Lot failed to complete the challenge! He landed, pressured by shame ...")) |
577 AddCaption(loc("And so happened that Leaks A Lot failed to complete the challenge! He landed, pressured by shame ...")) |
578 AddEvent(CheckChallengeFailed, {}, DoChallengeFailed, {}, 0) |
578 AddEvent(CheckChallengeFailed, {}, DoChallengeFailed, {}, 0) |
579 end |
579 end |
580 |
580 |
581 function CheckChallengeFailed() |
581 function CheckChallengeFailed() |
749 AnimationSetup() |
749 AnimationSetup() |
750 end |
750 end |
751 |
751 |
752 function onGameStart() |
752 function onGameStart() |
753 progress = tonumber(GetCampaignVar("Progress")) |
753 progress = tonumber(GetCampaignVar("Progress")) |
754 SetTurnTimeLeft(cMaxTurnTime) |
754 SetTurnTimeLeft(MAX_TURN_TIME) |
755 FollowGear(youngh) |
755 FollowGear(youngh) |
756 ShowMission(loc("A Classic Fairytale"), loc("First Blood"), loc("Finish your training|Hint: Animations can be skipped with the [Precise] key."), -amSkip, 0) |
756 ShowMission(loc("A Classic Fairytale"), loc("First Blood"), loc("Finish your training|Hint: Animations can be skipped with the [Precise] key."), -amSkip, 0) |
757 HideHog(cannibal) |
757 HideHog(cannibal) |
758 |
758 |
759 AddAnim(startDialogue) |
759 AddAnim(startDialogue) |
844 if CurrentHedgehog == cannibal and cannibalVisible == false then |
844 if CurrentHedgehog == cannibal and cannibalVisible == false then |
845 RestoreHog(cannibal) |
845 RestoreHog(cannibal) |
846 end |
846 end |
847 SwitchHog(youngh) |
847 SwitchHog(youngh) |
848 FollowGear(youngh) |
848 FollowGear(youngh) |
849 SetTurnTimeLeft(cMaxTurnTime) |
849 SetTurnTimeLeft(MAX_TURN_TIME) |
850 end |
850 end |
851 |
851 |
852 function onGearDamage(gear, damage) |
852 function onGearDamage(gear, damage) |
853 if gear == youngh then |
853 if gear == youngh then |
854 youngdamaged = true |
854 youngdamaged = true |