share/hedgewars/Data/Missions/Campaign/A_Classic_Fairytale/journey.lua
author Wuzzy <Wuzzy2@mail.ru>
Mon, 17 Jun 2019 19:20:02 +0200
changeset 15188 9d4a6ab60dec
parent 15089 6f51c75994a4
permissions -rw-r--r--
ACF: Show "Mission succeeded/failed" in stats screen
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
12794
bca911f8e804 Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents: 12554
diff changeset
     1
--[[
bca911f8e804 Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents: 12554
diff changeset
     2
A Classic Fairytale: The Journey Back
bca911f8e804 Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents: 12554
diff changeset
     3
bca911f8e804 Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents: 12554
diff changeset
     4
= SUMMARY =
bca911f8e804 Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents: 12554
diff changeset
     5
This is a very complex and heavily scripted mission with
bca911f8e804 Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents: 12554
diff changeset
     6
2 major gameplay variants and 2 sub-variants each.
bca911f8e804 Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents: 12554
diff changeset
     7
bca911f8e804 Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents: 12554
diff changeset
     8
This mission is mostly about movement and overcoming obstacles,
bca911f8e804 Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents: 12554
diff changeset
     9
and not much about fighting.
bca911f8e804 Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents: 12554
diff changeset
    10
bca911f8e804 Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents: 12554
diff changeset
    11
The player has either 1 or 2 hogs (depending on previous mission)
bca911f8e804 Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents: 12554
diff changeset
    12
and must reach the left coast. The cyborg will show up from time
bca911f8e804 Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents: 12554
diff changeset
    13
to time and constantly annoys the heroes with obstacles and additional
bca911f8e804 Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents: 12554
diff changeset
    14
challenges.
bca911f8e804 Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents: 12554
diff changeset
    15
bca911f8e804 Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents: 12554
diff changeset
    16
The mission's gameplay is affected by whether Dense Cloud survived
bca911f8e804 Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents: 12554
diff changeset
    17
in the previous mission. The mission's dialogues are affected by
bca911f8e804 Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents: 12554
diff changeset
    18
the decision of the player in the previous mission.
bca911f8e804 Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents: 12554
diff changeset
    19
bca911f8e804 Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents: 12554
diff changeset
    20
= GOALS =
bca911f8e804 Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents: 12554
diff changeset
    21
- Collect the crate at the left coast
bca911f8e804 Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents: 12554
diff changeset
    22
- (Need to accomplish various sub-goals before this is possible)
bca911f8e804 Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents: 12554
diff changeset
    23
- Then kill the cyborg
bca911f8e804 Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents: 12554
diff changeset
    24
bca911f8e804 Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents: 12554
diff changeset
    25
= FLOW CHART =
bca911f8e804 Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents: 12554
diff changeset
    26
== Linear events ==
bca911f8e804 Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents: 12554
diff changeset
    27
bca911f8e804 Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents: 12554
diff changeset
    28
Note: This mission's gameplay is significantly affected by the choices of the previous mission (The Shadow Falls).
bca911f8e804 Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents: 12554
diff changeset
    29
There are two major paths, and each of them has two variants.
bca911f8e804 Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents: 12554
diff changeset
    30
bca911f8e804 Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents: 12554
diff changeset
    31
=== PATH ONE (AL) ===
bca911f8e804 Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents: 12554
diff changeset
    32
Condition: Cyborg's offer in ACF2 accepted and Dense Cloud survived.
bca911f8e804 Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents: 12554
diff changeset
    33
bca911f8e804 Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents: 12554
diff changeset
    34
- Mission starts with Dense Cloud and Leaks a Lot
bca911f8e804 Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents: 12554
diff changeset
    35
- Mines time: 5s
bca911f8e804 Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents: 12554
diff changeset
    36
- Cut scene: startAnimAL (initial instructions)
bca911f8e804 Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents: 12554
diff changeset
    37
- Hog moves past flower (via teamwork)
bca911f8e804 Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents: 12554
diff changeset
    38
- Animation: pastFlowerAnimAL
bca911f8e804 Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents: 12554
diff changeset
    39
- Player jumps up the tree
bca911f8e804 Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents: 12554
diff changeset
    40
- Cut scene: outPutAnimAL
bca911f8e804 Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents: 12554
diff changeset
    41
- Cyborg teleports one hog to the pit, while the other hog remains
bca911f8e804 Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents: 12554
diff changeset
    42
- TBS
bca911f8e804 Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents: 12554
diff changeset
    43
- Trapped hog walks out of pit
bca911f8e804 Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents: 12554
diff changeset
    44
- Cut scene: midAnimAL
bca911f8e804 Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents: 12554
diff changeset
    45
- Trapped hog is teleported below bridge (and trapped again)
bca911f8e804 Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents: 12554
diff changeset
    46
- A huge barricade at the bridge is erected, and mines spawn on bridge
bca911f8e804 Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents: 12554
diff changeset
    47
- Now any hog needs to collect the final crate
bca911f8e804 Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents: 12554
diff changeset
    48
- TBS
bca911f8e804 Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents: 12554
diff changeset
    49
- Final crate collected
bca911f8e804 Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents: 12554
diff changeset
    50
- Cut scene: endAnimAL
bca911f8e804 Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents: 12554
diff changeset
    51
- Cyborg and princess apear, player must kill cyborg
bca911f8e804 Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents: 12554
diff changeset
    52
| Cyborg killed
bca911f8e804 Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents: 12554
diff changeset
    53
    - Cut scene: winAnim
bca911f8e804 Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents: 12554
diff changeset
    54
    > Victory
bca911f8e804 Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents: 12554
diff changeset
    55
| Princess killed
bca911f8e804 Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents: 12554
diff changeset
    56
    - Cut scene: endFailAnim
bca911f8e804 Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents: 12554
diff changeset
    57
    > Game over
bca911f8e804 Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents: 12554
diff changeset
    58
bca911f8e804 Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents: 12554
diff changeset
    59
=== PATH TWO (AD) ===
bca911f8e804 Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents: 12554
diff changeset
    60
Condition: Cyborg's offer in ACF2 accepted, but Dense Cloud died afterwards.
bca911f8e804 Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents: 12554
diff changeset
    61
bca911f8e804 Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents: 12554
diff changeset
    62
- Mission starts with Leaks a Lot only
bca911f8e804 Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents: 12554
diff changeset
    63
- Cut scene: startAnimAD (initial instructions)
bca911f8e804 Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents: 12554
diff changeset
    64
- Hog moves past flower (via blowtorch)
bca911f8e804 Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents: 12554
diff changeset
    65
- Animation: pastFlowerAnimAD
bca911f8e804 Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents: 12554
diff changeset
    66
- TBS
bca911f8e804 Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents: 12554
diff changeset
    67
- Hog proceeds all the way to the bridge
bca911f8e804 Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents: 12554
diff changeset
    68
- Cut scene: outPutAnimAD (the “Princess Game”)
bca911f8e804 Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents: 12554
diff changeset
    69
- Hog is teleported to the pit
bca911f8e804 Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents: 12554
diff changeset
    70
- TBS
bca911f8e804 Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents: 12554
diff changeset
    71
- Hog must reach goal crate within a given number of turns
bca911f8e804 Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents: 12554
diff changeset
    72
| Hog reaches goal crate within the turn limit
bca911f8e804 Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents: 12554
diff changeset
    73
    - Cut scene: endAnimAD
bca911f8e804 Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents: 12554
diff changeset
    74
    - Cyborg and princess spawn
bca911f8e804 Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents: 12554
diff changeset
    75
    | Cyborg killed
bca911f8e804 Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents: 12554
diff changeset
    76
        - Cut scene: winAnim
bca911f8e804 Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents: 12554
diff changeset
    77
        > Victory
bca911f8e804 Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents: 12554
diff changeset
    78
    | Princess killed
bca911f8e804 Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents: 12554
diff changeset
    79
        - Cut scene: endFailAnim
bca911f8e804 Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents: 12554
diff changeset
    80
        > Game over
bca911f8e804 Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents: 12554
diff changeset
    81
| Turn limit exceeded
bca911f8e804 Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents: 12554
diff changeset
    82
    - Cut scene: failAnimAD (princess is caged and killed by cyborg)
bca911f8e804 Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents: 12554
diff changeset
    83
    > Game over
bca911f8e804 Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents: 12554
diff changeset
    84
bca911f8e804 Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents: 12554
diff changeset
    85
=== PATH THREE (RL) ===
bca911f8e804 Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents: 12554
diff changeset
    86
Condition: Cyborg's offer in ACF2 rejected.
bca911f8e804 Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents: 12554
diff changeset
    87
bca911f8e804 Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents: 12554
diff changeset
    88
This is almost identical to Path One, only the dialogues differ.
bca911f8e804 Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents: 12554
diff changeset
    89
All AL animations are replaced with RL animations.
bca911f8e804 Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents: 12554
diff changeset
    90
bca911f8e804 Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents: 12554
diff changeset
    91
=== PATH FOUR (attacked) ===
bca911f8e804 Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents: 12554
diff changeset
    92
Condition: Cyborg from ACF2 was attacked.
bca911f8e804 Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents: 12554
diff changeset
    93
bca911f8e804 Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents: 12554
diff changeset
    94
This is almost identical to Path Two, only the dialogues differ.
bca911f8e804 Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents: 12554
diff changeset
    95
Uses startAnim and midAnim from SetupAnimAttacked.
bca911f8e804 Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents: 12554
diff changeset
    96
bca911f8e804 Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents: 12554
diff changeset
    97
bca911f8e804 Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents: 12554
diff changeset
    98
== Non-linear events ==
bca911f8e804 Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents: 12554
diff changeset
    99
- Any of the Natives dies
bca911f8e804 Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents: 12554
diff changeset
   100
   > Game over
bca911f8e804 Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents: 12554
diff changeset
   101
bca911f8e804 Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents: 12554
diff changeset
   102
]]
bca911f8e804 Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents: 12554
diff changeset
   103
8043
da083f8d95e6 We need custom script loading function in lua now
unc0rr
parents: 7524
diff changeset
   104
HedgewarsScriptLoad("/Scripts/Locale.lua")
da083f8d95e6 We need custom script loading function in lua now
unc0rr
parents: 7524
diff changeset
   105
HedgewarsScriptLoad("/Scripts/Animate.lua")
7215
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   106
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   107
--///////////////////////////////CONSTANTS///////////////////////////
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   108
7219
6c7739c6446f Set the choice constants to the correct values (1-3 instead of 0-2).
belphegorr <szabibibi@gmail.com>
parents: 7217
diff changeset
   109
choiceAccepted = 1
6c7739c6446f Set the choice constants to the correct values (1-3 instead of 0-2).
belphegorr <szabibibi@gmail.com>
parents: 7217
diff changeset
   110
choiceRefused = 2
6c7739c6446f Set the choice constants to the correct values (1-3 instead of 0-2).
belphegorr <szabibibi@gmail.com>
parents: 7217
diff changeset
   111
choiceAttacked = 3
7215
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   112
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   113
endStage = 1
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   114
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   115
cannibalNum = 8
7225
e3f2280d9000 Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents: 7219
diff changeset
   116
cannibalNames = {loc("John"), loc("Flesh for Brainz"), loc("Eye Chewer"), loc("Torn Muscle"),
e3f2280d9000 Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents: 7219
diff changeset
   117
                 loc("Nom-Nom"), loc("Vedgies"), loc("Brain Blower"), loc("Gorkij")}
7215
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   118
cannibalPos = {{2471, 1174}, {939, 1019}, {1953, 902}, {3055, 1041},
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   119
               {1121, 729}, {1150, 718}, {1149, 680}, {1161, 773}}
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   120
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   121
startLeaksPosDuo = {3572, 1426}
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   122
startEventXDuo = 3300
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   123
startDensePosDuo = {3454, 1471}
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   124
startCyborgPosDuo = {3202, 1307}
7506
e2632a18bb4c Mission 3: reduced enemy turn time, fixed other HideHog problems
belphegorr <szabibibi@gmail.com>
parents: 7502
diff changeset
   125
midDensePosDuo = {1464, 1410}
7215
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   126
midCyborgPosDuo = {1264, 1390}
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   127
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   128
--///////////////////////////////VARIABLES///////////////////////////
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   129
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   130
m2Choice = 0
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   131
m2DenseDead = 0
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   132
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   133
TurnsLeft = 0
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   134
stage = 0
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   135
14506
f37910a73c19 Refactor ACF missions, store team names in variables
Wuzzy <Wuzzy2@mail.ru>
parents: 14465
diff changeset
   136
nativesTeamName = nil
f37910a73c19 Refactor ACF missions, store team names in variables
Wuzzy <Wuzzy2@mail.ru>
parents: 14465
diff changeset
   137
princessTeamName = nil
f37910a73c19 Refactor ACF missions, store team names in variables
Wuzzy <Wuzzy2@mail.ru>
parents: 14465
diff changeset
   138
cannibalsTeamName = nil
f37910a73c19 Refactor ACF missions, store team names in variables
Wuzzy <Wuzzy2@mail.ru>
parents: 14465
diff changeset
   139
cyborgTeamName = nil
f37910a73c19 Refactor ACF missions, store team names in variables
Wuzzy <Wuzzy2@mail.ru>
parents: 14465
diff changeset
   140
14465
d084fc76c566 ACF3: Fix weapons being disabled in first turn
Wuzzy <Wuzzy2@mail.ru>
parents: 14422
diff changeset
   141
startAnimStarted = false
7215
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   142
blowTaken = false
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   143
gravityTaken = false
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   144
sniperTaken = false
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   145
leaksDead = false
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   146
denseDead = false
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   147
princessDead = false
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   148
cyborgDead = false
12375
3126214d0e7d ACF, mission 3: Fix victory causing a lot of loser message being displayed. Also add EndTurn()
Wuzzy <almikes@aol.com>
parents: 12374
diff changeset
   149
victory = false
7215
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   150
cannibalDead = {}
7502
16c36f62247b Solved issues with HideHog in mission 2 and 3
belphegorr <szabibibi@gmail.com>
parents: 7448
diff changeset
   151
hedgeHidden = {}
7215
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   152
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   153
startAnim = {}
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   154
startAnimAD = {}
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   155
startAnimAL = {}
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   156
startAnimRL = {}
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   157
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   158
pastFlowerAnimAL = {}
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   159
pastFlowerAnimRL = {}
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   160
pastFlowerAnim = {}
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   161
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   162
outPitAnimAL = {}
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   163
outPitAnimRL = {}
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   164
outPitAnim = {}
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   165
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   166
midAnim = {}
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   167
midAnimAD = {}
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   168
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   169
failAnim = {}
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   170
failAnimAD = {}
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   171
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   172
endAnim = {}
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   173
endAnimAD = {}
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   174
endAnimAL = {}
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   175
endAnimRL = {}
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   176
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   177
endFailAnim = {}
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   178
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   179
winAnim = {}
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   180
winAnimAD = {}
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   181
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   182
--/////////////////////////Animation Functions///////////////////////
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   183
function AfterMidFailAnim()
12379
eb11e1bc7547 ACF, mission 3: Fix player not losing properly after killing princess
Wuzzy <almikes@aol.com>
parents: 12378
diff changeset
   184
  EndTurn(true)
7215
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   185
end
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   186
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   187
function AfterMidAnimAlone()
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   188
  SetupCourse()
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   189
  for i = 5, 8 do
7502
16c36f62247b Solved issues with HideHog in mission 2 and 3
belphegorr <szabibibi@gmail.com>
parents: 7448
diff changeset
   190
    RestoreHedge(cannibals[i])
7448
d0521a3a4358 Solved "floating repositionings" in every mission
belphegorr <szabibibi@gmail.com>
parents: 7261
diff changeset
   191
    AnimSetGearPosition(cannibals[i], unpack(cannibalPos[i]))
7215
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   192
  end
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   193
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   194
  AddAmmo(cannibals[5], amDEagle, 0)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   195
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   196
  AddEvent(CheckOnFirstGirder, {}, DoOnFirstGirder, {}, 0)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   197
  AddEvent(CheckTookSniper, {}, DoTookSniper, {}, 0)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   198
  AddEvent(CheckFailedCourse, {}, DoFailedCourse, {}, 0)
14643
64be9a8087f2 Clear hog gear message less agressively in ACF3
Wuzzy <Wuzzy2@mail.ru>
parents: 14633
diff changeset
   199
  SetGearMessage(leaks, band(GetGearMessage(leaks), bnot(gmAllStoppable)))
7215
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   200
  TurnsLeft = 12
13742
2bb7141496a9 Use SetTurnTimeLeft and SetReadyTimeLeft in all scripts
Wuzzy <Wuzzy2@mail.ru>
parents: 13643
diff changeset
   201
  SetTurnTimeLeft(TurnTime)
12380
1eaef4b1b3c1 ACF, mission 3: Standardize mine times. 3s if alone, 5s if playing with 2 hogs
Wuzzy <almikes@aol.com>
parents: 12379
diff changeset
   202
  ShowMission(loc("The Journey Back"), loc("Collateral Damage"),
1eaef4b1b3c1 ACF, mission 3: Standardize mine times. 3s if alone, 5s if playing with 2 hogs
Wuzzy <almikes@aol.com>
parents: 12379
diff changeset
   203
    loc("Save the princess by collecting the crate in under 12 turns!") .. "|" ..
15089
6f51c75994a4 Semi-standardize usage of icons in many mission panels
Wuzzy <Wuzzy2@mail.ru>
parents: 15071
diff changeset
   204
    loc("Mines time: 3 seconds"), 7, 6000)
7215
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   205
  -----------------------///////////////------------
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   206
end
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   207
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   208
function SkipEndAnimAlone()
7502
16c36f62247b Solved issues with HideHog in mission 2 and 3
belphegorr <szabibibi@gmail.com>
parents: 7448
diff changeset
   209
  RestoreHedge(cyborg)
16c36f62247b Solved issues with HideHog in mission 2 and 3
belphegorr <szabibibi@gmail.com>
parents: 7448
diff changeset
   210
  RestoreHedge(princess)
7448
d0521a3a4358 Solved "floating repositionings" in every mission
belphegorr <szabibibi@gmail.com>
parents: 7261
diff changeset
   211
  AnimSetGearPosition(cyborg, 437, 1700)
13474
4ea2c8fa699e ACF3: Tweak princess spawn position
Wuzzy <Wuzzy2@mail.ru>
parents: 13473
diff changeset
   212
  AnimSetGearPosition(princess, 519, 1726)
7215
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   213
end
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   214
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   215
function SkipEndAnimDuo()
7502
16c36f62247b Solved issues with HideHog in mission 2 and 3
belphegorr <szabibibi@gmail.com>
parents: 7448
diff changeset
   216
  RestoreHedge(cyborg)
16c36f62247b Solved issues with HideHog in mission 2 and 3
belphegorr <szabibibi@gmail.com>
parents: 7448
diff changeset
   217
  RestoreHedge(princess)
7215
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   218
  if princessHidden then
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   219
    RestoreHog(princess)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   220
    princessHidden = false
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   221
  end
7448
d0521a3a4358 Solved "floating repositionings" in every mission
belphegorr <szabibibi@gmail.com>
parents: 7261
diff changeset
   222
  AnimSetGearPosition(cyborg, 437, 1700)
13474
4ea2c8fa699e ACF3: Tweak princess spawn position
Wuzzy <Wuzzy2@mail.ru>
parents: 13473
diff changeset
   223
  AnimSetGearPosition(princess, 519, 1726)
7448
d0521a3a4358 Solved "floating repositionings" in every mission
belphegorr <szabibibi@gmail.com>
parents: 7261
diff changeset
   224
  AnimSetGearPosition(leaks, 763, 1760)
d0521a3a4358 Solved "floating repositionings" in every mission
belphegorr <szabibibi@gmail.com>
parents: 7261
diff changeset
   225
  AnimSetGearPosition(dense, 835, 1519)
7215
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   226
  HogTurnLeft(leaks, true)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   227
  HogTurnLeft(dense, true)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   228
end
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   229
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   230
function AfterEndAnimAlone()
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   231
  stage = endStage
14643
64be9a8087f2 Clear hog gear message less agressively in ACF3
Wuzzy <Wuzzy2@mail.ru>
parents: 14633
diff changeset
   232
  SetGearMessage(dense, band(GetGearMessage(dense), bnot(gmAllStoppable)))
14633
bd15c8551318 Make use of passive teams in various campaign missions
Wuzzy <Wuzzy2@mail.ru>
parents: 14508
diff changeset
   233
  AnimSwitchHog(leaks)
13752
110d6c1e817f Lua: Rename globals: NoPointX→NO_CURSOR, cMaxTurnTime→MAX_TURN_TIME, cMaxHogHealth→MAX_HOG_HEALTH
Wuzzy <Wuzzy2@mail.ru>
parents: 13742
diff changeset
   234
  SetTurnTimeLeft(MAX_TURN_TIME)
7225
e3f2280d9000 Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents: 7219
diff changeset
   235
  ShowMission(loc("The Journey Back"), loc("Collateral Damage II"), loc("Save Fell From Heaven!"), 1, 4000)
7215
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   236
  AddEvent(CheckLost, {}, DoLost, {}, 0)
7236
378fc97dae99 Reduced number of crates on the challenge in mission 1, fixed an error with mission 3 (at the end)
belphegorr <szabibibi@gmail.com>
parents: 7228
diff changeset
   237
  AddEvent(CheckWon, {}, DoWon, {}, 0)
7215
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   238
  RemoveEventFunc(CheckFailedCourse)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   239
end
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   240
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   241
function AfterEndAnimDuo()
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   242
  stage = endStage
14643
64be9a8087f2 Clear hog gear message less agressively in ACF3
Wuzzy <Wuzzy2@mail.ru>
parents: 14633
diff changeset
   243
  SetGearMessage(dense, band(GetGearMessage(dense), bnot(gmAllStoppable)))
14633
bd15c8551318 Make use of passive teams in various campaign missions
Wuzzy <Wuzzy2@mail.ru>
parents: 14508
diff changeset
   244
  AnimSwitchHog(leaks)
13752
110d6c1e817f Lua: Rename globals: NoPointX→NO_CURSOR, cMaxTurnTime→MAX_TURN_TIME, cMaxHogHealth→MAX_HOG_HEALTH
Wuzzy <Wuzzy2@mail.ru>
parents: 13742
diff changeset
   245
  SetTurnTimeLeft(MAX_TURN_TIME)
7225
e3f2280d9000 Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents: 7219
diff changeset
   246
  ShowMission(loc("The Journey Back"), loc("Collateral Damage II"), loc("Save Fell From Heaven!"), 1, 4000)
7215
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   247
  AddEvent(CheckLost, {}, DoLost, {}, 0)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   248
  AddEvent(CheckWon, {}, DoWon, {}, 0)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   249
end
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   250
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   251
function SkipMidAnimAlone()
15069
d131ec7be850 ACF3: Clean up start up sequences a bit
Wuzzy <Wuzzy2@mail.ru>
parents: 15050
diff changeset
   252
  AnimSetGearPosition(leaks, 2656, 1845)
7215
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   253
  AnimSwitchHog(leaks)
7502
16c36f62247b Solved issues with HideHog in mission 2 and 3
belphegorr <szabibibi@gmail.com>
parents: 7448
diff changeset
   254
  AnimWait(dense, 1)
16c36f62247b Solved issues with HideHog in mission 2 and 3
belphegorr <szabibibi@gmail.com>
parents: 7448
diff changeset
   255
  AddFunction({func = HideHedge, args = {princess}})
16c36f62247b Solved issues with HideHog in mission 2 and 3
belphegorr <szabibibi@gmail.com>
parents: 7448
diff changeset
   256
  AddFunction({func = HideHedge, args = {cyborg}})
7215
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   257
end
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   258
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   259
function AfterStartAnim()
14643
64be9a8087f2 Clear hog gear message less agressively in ACF3
Wuzzy <Wuzzy2@mail.ru>
parents: 14633
diff changeset
   260
  SetGearMessage(leaks, band(GetGearMessage(leaks), bnot(gmAllStoppable)))
13742
2bb7141496a9 Use SetTurnTimeLeft and SetReadyTimeLeft in all scripts
Wuzzy <Wuzzy2@mail.ru>
parents: 13643
diff changeset
   261
  SetTurnTimeLeft(TurnTime)
12934
bc7138add7eb 2 minor spelling/grammar fixes
Wuzzy <Wuzzy2@mail.ru>
parents: 12933
diff changeset
   262
  local goal = loc("Get the crate on the other side of the island.")
12901
bdf8e80a97b8 Fix some minor formatting and grammar flaws in script strings
Wuzzy <Wuzzy2@mail.ru>
parents: 12797
diff changeset
   263
  local hint = loc("Hint: You might want to stay out of sight and take all the crates ...")
bdf8e80a97b8 Fix some minor formatting and grammar flaws in script strings
Wuzzy <Wuzzy2@mail.ru>
parents: 12797
diff changeset
   264
  local stuck = loc("If you get stuck, use your Desert Eagle or restart the mission!")
7225
e3f2280d9000 Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents: 7219
diff changeset
   265
  local conds = loc("Leaks A Lot must survive!")
7215
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   266
  if m2DenseDead == 0 then
7225
e3f2280d9000 Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents: 7219
diff changeset
   267
    conds = loc("Your hogs must survive!")
7215
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   268
  end
15089
6f51c75994a4 Semi-standardize usage of icons in many mission panels
Wuzzy <Wuzzy2@mail.ru>
parents: 15071
diff changeset
   269
  ShowMission(loc("The Journey Back"), loc("Adventurous"), goal .. "|" .. hint .. "|" .. stuck .. "|" .. conds, 1, 7000)
7215
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   270
end
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   271
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   272
function SkipStartAnim()
15069
d131ec7be850 ACF3: Clean up start up sequences a bit
Wuzzy <Wuzzy2@mail.ru>
parents: 15050
diff changeset
   273
  AnimTurn(leaks, "Left")
7215
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   274
  AnimSwitchHog(leaks)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   275
end
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   276
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   277
function PlaceCratesDuo()
12933
e65aa3c3d4e6 Refactor scripts to use SpawnSupplyCrate (where it makes sense)
Wuzzy <Wuzzy2@mail.ru>
parents: 12905
diff changeset
   278
  SpawnSupplyCrate(3090, 827, amBaseballBat)
15069
d131ec7be850 ACF3: Clean up start up sequences a bit
Wuzzy <Wuzzy2@mail.ru>
parents: 15050
diff changeset
   279
  girderCrate1 = SpawnSupplyCrate(2366, 1814, amGirder)
12933
e65aa3c3d4e6 Refactor scripts to use SpawnSupplyCrate (where it makes sense)
Wuzzy <Wuzzy2@mail.ru>
parents: 12905
diff changeset
   280
  girderCrate2 = SpawnSupplyCrate(2630, 1278, amGirder)
15069
d131ec7be850 ACF3: Clean up start up sequences a bit
Wuzzy <Wuzzy2@mail.ru>
parents: 15050
diff changeset
   281
  SpawnSupplyCrate(2322, 1810, amParachute)
12933
e65aa3c3d4e6 Refactor scripts to use SpawnSupplyCrate (where it makes sense)
Wuzzy <Wuzzy2@mail.ru>
parents: 12905
diff changeset
   282
  SpawnSupplyCrate(3157, 1009, amLowGravity)
e65aa3c3d4e6 Refactor scripts to use SpawnSupplyCrate (where it makes sense)
Wuzzy <Wuzzy2@mail.ru>
parents: 12905
diff changeset
   283
  sniperCrate = SpawnSupplyCrate(784, 1715, amSniperRifle)
7215
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   284
end
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   285
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   286
function PlaceMinesDuo()
12380
1eaef4b1b3c1 ACF, mission 3: Standardize mine times. 3s if alone, 5s if playing with 2 hogs
Wuzzy <almikes@aol.com>
parents: 12379
diff changeset
   287
  AddGear(2920, 1448, gtMine, 0, 0, 0, 0)
1eaef4b1b3c1 ACF, mission 3: Standardize mine times. 3s if alone, 5s if playing with 2 hogs
Wuzzy <almikes@aol.com>
parents: 12379
diff changeset
   288
  AddGear(2985, 1338, gtMine, 0, 0, 0, 0)
1eaef4b1b3c1 ACF, mission 3: Standardize mine times. 3s if alone, 5s if playing with 2 hogs
Wuzzy <almikes@aol.com>
parents: 12379
diff changeset
   289
  AddGear(3005, 1302, gtMine, 0, 0, 0, 0)
1eaef4b1b3c1 ACF, mission 3: Standardize mine times. 3s if alone, 5s if playing with 2 hogs
Wuzzy <almikes@aol.com>
parents: 12379
diff changeset
   290
  AddGear(3030, 1270, gtMine, 0, 0, 0, 0)
1eaef4b1b3c1 ACF, mission 3: Standardize mine times. 3s if alone, 5s if playing with 2 hogs
Wuzzy <almikes@aol.com>
parents: 12379
diff changeset
   291
  AddGear(3046, 1257, gtMine, 0, 0, 0, 0)
1eaef4b1b3c1 ACF, mission 3: Standardize mine times. 3s if alone, 5s if playing with 2 hogs
Wuzzy <almikes@aol.com>
parents: 12379
diff changeset
   292
  AddGear(2954, 1400, gtMine, 0, 0, 0, 0)
1eaef4b1b3c1 ACF, mission 3: Standardize mine times. 3s if alone, 5s if playing with 2 hogs
Wuzzy <almikes@aol.com>
parents: 12379
diff changeset
   293
  AddGear(2967, 1385, gtMine, 0, 0, 0, 0)
1eaef4b1b3c1 ACF, mission 3: Standardize mine times. 3s if alone, 5s if playing with 2 hogs
Wuzzy <almikes@aol.com>
parents: 12379
diff changeset
   294
  AddGear(2849, 1449, gtMine, 0, 0, 0, 0)
1eaef4b1b3c1 ACF, mission 3: Standardize mine times. 3s if alone, 5s if playing with 2 hogs
Wuzzy <almikes@aol.com>
parents: 12379
diff changeset
   295
  AddGear(2811, 1436, gtMine, 0, 0, 0, 0)
1eaef4b1b3c1 ACF, mission 3: Standardize mine times. 3s if alone, 5s if playing with 2 hogs
Wuzzy <almikes@aol.com>
parents: 12379
diff changeset
   296
  AddGear(2773, 1411, gtMine, 0, 0, 0, 0)
1eaef4b1b3c1 ACF, mission 3: Standardize mine times. 3s if alone, 5s if playing with 2 hogs
Wuzzy <almikes@aol.com>
parents: 12379
diff changeset
   297
  AddGear(2732, 1390, gtMine, 0, 0, 0, 0)
1eaef4b1b3c1 ACF, mission 3: Standardize mine times. 3s if alone, 5s if playing with 2 hogs
Wuzzy <almikes@aol.com>
parents: 12379
diff changeset
   298
  AddGear(2700, 1362, gtMine, 0, 0, 0, 0)
1eaef4b1b3c1 ACF, mission 3: Standardize mine times. 3s if alone, 5s if playing with 2 hogs
Wuzzy <almikes@aol.com>
parents: 12379
diff changeset
   299
  AddGear(2642, 1321, gtMine, 0, 0, 0, 0)
1eaef4b1b3c1 ACF, mission 3: Standardize mine times. 3s if alone, 5s if playing with 2 hogs
Wuzzy <almikes@aol.com>
parents: 12379
diff changeset
   300
  AddGear(2172, 1417, gtMine, 0, 0, 0, 0)
1eaef4b1b3c1 ACF, mission 3: Standardize mine times. 3s if alone, 5s if playing with 2 hogs
Wuzzy <almikes@aol.com>
parents: 12379
diff changeset
   301
  AddGear(2190, 1363, gtMine, 0, 0, 0, 0)
1eaef4b1b3c1 ACF, mission 3: Standardize mine times. 3s if alone, 5s if playing with 2 hogs
Wuzzy <almikes@aol.com>
parents: 12379
diff changeset
   302
  AddGear(2219, 1332, gtMine, 0, 0, 0, 0)
1eaef4b1b3c1 ACF, mission 3: Standardize mine times. 3s if alone, 5s if playing with 2 hogs
Wuzzy <almikes@aol.com>
parents: 12379
diff changeset
   303
  AddGear(1201, 1207, gtMine, 0, 0, 0, 0)
1eaef4b1b3c1 ACF, mission 3: Standardize mine times. 3s if alone, 5s if playing with 2 hogs
Wuzzy <almikes@aol.com>
parents: 12379
diff changeset
   304
  AddGear(1247, 1205, gtMine, 0, 0, 0, 0)
1eaef4b1b3c1 ACF, mission 3: Standardize mine times. 3s if alone, 5s if playing with 2 hogs
Wuzzy <almikes@aol.com>
parents: 12379
diff changeset
   305
  AddGear(1295, 1212, gtMine, 0, 0, 0, 0)
1eaef4b1b3c1 ACF, mission 3: Standardize mine times. 3s if alone, 5s if playing with 2 hogs
Wuzzy <almikes@aol.com>
parents: 12379
diff changeset
   306
  AddGear(1356, 1209, gtMine, 0, 0, 0, 0)
1eaef4b1b3c1 ACF, mission 3: Standardize mine times. 3s if alone, 5s if playing with 2 hogs
Wuzzy <almikes@aol.com>
parents: 12379
diff changeset
   307
  AddGear(1416, 1201, gtMine, 0, 0, 0, 0)
1eaef4b1b3c1 ACF, mission 3: Standardize mine times. 3s if alone, 5s if playing with 2 hogs
Wuzzy <almikes@aol.com>
parents: 12379
diff changeset
   308
  AddGear(1466, 1201, gtMine, 0, 0, 0, 0)
1eaef4b1b3c1 ACF, mission 3: Standardize mine times. 3s if alone, 5s if playing with 2 hogs
Wuzzy <almikes@aol.com>
parents: 12379
diff changeset
   309
  AddGear(1678, 1198, gtMine, 0, 0, 0, 0)
1eaef4b1b3c1 ACF, mission 3: Standardize mine times. 3s if alone, 5s if playing with 2 hogs
Wuzzy <almikes@aol.com>
parents: 12379
diff changeset
   310
  AddGear(1738, 1198, gtMine, 0, 0, 0, 0)
1eaef4b1b3c1 ACF, mission 3: Standardize mine times. 3s if alone, 5s if playing with 2 hogs
Wuzzy <almikes@aol.com>
parents: 12379
diff changeset
   311
  AddGear(1796, 1198, gtMine, 0, 0, 0, 0)
1eaef4b1b3c1 ACF, mission 3: Standardize mine times. 3s if alone, 5s if playing with 2 hogs
Wuzzy <almikes@aol.com>
parents: 12379
diff changeset
   312
  AddGear(1637, 1217, gtMine, 0, 0, 0, 0)
1eaef4b1b3c1 ACF, mission 3: Standardize mine times. 3s if alone, 5s if playing with 2 hogs
Wuzzy <almikes@aol.com>
parents: 12379
diff changeset
   313
  AddGear(1519, 1213, gtMine, 0, 0, 0, 0)
7215
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   314
end
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   315
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   316
function AfterPastFlowerAnim()
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   317
  PlaceMinesDuo()
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   318
  AddEvent(CheckDensePit, {}, DoDensePit, {}, 0)
14643
64be9a8087f2 Clear hog gear message less agressively in ACF3
Wuzzy <Wuzzy2@mail.ru>
parents: 14633
diff changeset
   319
  SetGearMessage(dense, band(GetGearMessage(dense), bnot(gmAllStoppable)))
64be9a8087f2 Clear hog gear message less agressively in ACF3
Wuzzy <Wuzzy2@mail.ru>
parents: 14633
diff changeset
   320
  SetGearMessage(leaks, band(GetGearMessage(leaks), bnot(gmAllStoppable)))
14633
bd15c8551318 Make use of passive teams in various campaign missions
Wuzzy <Wuzzy2@mail.ru>
parents: 14508
diff changeset
   321
  EndTurn(true)
12380
1eaef4b1b3c1 ACF, mission 3: Standardize mine times. 3s if alone, 5s if playing with 2 hogs
Wuzzy <almikes@aol.com>
parents: 12379
diff changeset
   322
  ShowMission(loc("The Journey Back"), loc("The Savior"), 
1eaef4b1b3c1 ACF, mission 3: Standardize mine times. 3s if alone, 5s if playing with 2 hogs
Wuzzy <almikes@aol.com>
parents: 12379
diff changeset
   323
    loc("Get Dense Cloud out of the pit!") .. "|" ..
12381
6af2b5406419 ACF, mission 3: Add mission strings to remind the player of the main goal
Wuzzy <almikes@aol.com>
parents: 12380
diff changeset
   324
    loc("Your hogs must survive!") .. "|" ..
15089
6f51c75994a4 Semi-standardize usage of icons in many mission panels
Wuzzy <Wuzzy2@mail.ru>
parents: 15071
diff changeset
   325
    loc("Beware of mines: They explode after 5 seconds."), 10, 5000)
7215
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   326
end
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   327
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   328
function SkipPastFlowerAnim()
15069
d131ec7be850 ACF3: Clean up start up sequences a bit
Wuzzy <Wuzzy2@mail.ru>
parents: 15050
diff changeset
   329
  AnimSetGearPosition(dense, 2656, 1845)
d131ec7be850 ACF3: Clean up start up sequences a bit
Wuzzy <Wuzzy2@mail.ru>
parents: 15050
diff changeset
   330
  AnimTurn(dense, "Left")
d131ec7be850 ACF3: Clean up start up sequences a bit
Wuzzy <Wuzzy2@mail.ru>
parents: 15050
diff changeset
   331
  AnimSwitchHog(leaks)
d131ec7be850 ACF3: Clean up start up sequences a bit
Wuzzy <Wuzzy2@mail.ru>
parents: 15050
diff changeset
   332
  AnimWait(leaks, 1)
7502
16c36f62247b Solved issues with HideHog in mission 2 and 3
belphegorr <szabibibi@gmail.com>
parents: 7448
diff changeset
   333
  AddFunction({func = HideHedge, args = {cyborg}})
7215
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   334
end
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   335
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   336
function AfterOutPitAnim()
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   337
  SetupCourseDuo()
7506
e2632a18bb4c Mission 3: reduced enemy turn time, fixed other HideHog problems
belphegorr <szabibibi@gmail.com>
parents: 7502
diff changeset
   338
  RestoreHedge(cannibals[5])
7215
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   339
  AddAmmo(cannibals[5], amDEagle, 0)
7502
16c36f62247b Solved issues with HideHog in mission 2 and 3
belphegorr <szabibibi@gmail.com>
parents: 7448
diff changeset
   340
  HideHedge(cannibals[5])
14643
64be9a8087f2 Clear hog gear message less agressively in ACF3
Wuzzy <Wuzzy2@mail.ru>
parents: 14633
diff changeset
   341
  SetGearMessage(dense, band(GetGearMessage(dense), bnot(gmAllStoppable)))
64be9a8087f2 Clear hog gear message less agressively in ACF3
Wuzzy <Wuzzy2@mail.ru>
parents: 14633
diff changeset
   342
  SetGearMessage(leaks, band(GetGearMessage(leaks), bnot(gmAllStoppable)))
12375
3126214d0e7d ACF, mission 3: Fix victory causing a lot of loser message being displayed. Also add EndTurn()
Wuzzy <almikes@aol.com>
parents: 12374
diff changeset
   343
  EndTurn(true)
12380
1eaef4b1b3c1 ACF, mission 3: Standardize mine times. 3s if alone, 5s if playing with 2 hogs
Wuzzy <almikes@aol.com>
parents: 12379
diff changeset
   344
  ShowMission(loc("The Journey Back"), loc("They never learn"),
1eaef4b1b3c1 ACF, mission 3: Standardize mine times. 3s if alone, 5s if playing with 2 hogs
Wuzzy <almikes@aol.com>
parents: 12379
diff changeset
   345
    loc("Free Dense Cloud and continue the mission!") .. "|" ..
12381
6af2b5406419 ACF, mission 3: Add mission strings to remind the player of the main goal
Wuzzy <almikes@aol.com>
parents: 12380
diff changeset
   346
    loc("Collect the weapon crate at the left coast!") .. "|" ..
6af2b5406419 ACF, mission 3: Add mission strings to remind the player of the main goal
Wuzzy <almikes@aol.com>
parents: 12380
diff changeset
   347
    loc("Your hogs must survive!") .. "|" ..
12380
1eaef4b1b3c1 ACF, mission 3: Standardize mine times. 3s if alone, 5s if playing with 2 hogs
Wuzzy <almikes@aol.com>
parents: 12379
diff changeset
   348
    loc("Mines time: 5 seconds"), 1, 5000)
7215
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   349
end
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   350
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   351
function SkipOutPitAnim()
7448
d0521a3a4358 Solved "floating repositionings" in every mission
belphegorr <szabibibi@gmail.com>
parents: 7261
diff changeset
   352
  AnimSetGearPosition(dense, unpack(midDensePosDuo))
7215
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   353
  AnimSwitchHog(dense)
7502
16c36f62247b Solved issues with HideHog in mission 2 and 3
belphegorr <szabibibi@gmail.com>
parents: 7448
diff changeset
   354
  AnimWait(dense, 1)
16c36f62247b Solved issues with HideHog in mission 2 and 3
belphegorr <szabibibi@gmail.com>
parents: 7448
diff changeset
   355
  AddFunction({func = HideHedge, args = {cyborg}})
7215
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   356
end
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   357
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   358
function RestoreCyborg(x, y, xx, yy)
7502
16c36f62247b Solved issues with HideHog in mission 2 and 3
belphegorr <szabibibi@gmail.com>
parents: 7448
diff changeset
   359
  RestoreHedge(cyborg)
16c36f62247b Solved issues with HideHog in mission 2 and 3
belphegorr <szabibibi@gmail.com>
parents: 7448
diff changeset
   360
  RestoreHedge(princess)
7215
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   361
  AnimOutOfNowhere(cyborg, x, y)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   362
  AnimOutOfNowhere(princess, xx, yy)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   363
  HogTurnLeft(princess, false)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   364
  return true
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   365
end
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   366
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   367
function RestoreCyborgOnly(x, y)
7502
16c36f62247b Solved issues with HideHog in mission 2 and 3
belphegorr <szabibibi@gmail.com>
parents: 7448
diff changeset
   368
  RestoreHedge(cyborg)
7245
53f73f4ae203 Modified frontend so that updating campaogn progress no longer changes current index of the mission combo box
belphegorr <szabibibi@gmail.com>
parents: 7243
diff changeset
   369
  SetState(cyborg, 0)
7215
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   370
  AnimOutOfNowhere(cyborg, x, y)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   371
  return true
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   372
end
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   373
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   374
function TargetPrincess()
10289
c3a77ff02a23 lua api: SetWeapon(ammoType)
sheepluva
parents: 9308
diff changeset
   375
  SetWeapon(amDEagle)
7215
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   376
  SetGearMessage(cyborg, gmUp)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   377
  return true
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   378
end
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   379
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   380
function HideCyborg()
7502
16c36f62247b Solved issues with HideHog in mission 2 and 3
belphegorr <szabibibi@gmail.com>
parents: 7448
diff changeset
   381
  HideHedge(cyborg)
16c36f62247b Solved issues with HideHog in mission 2 and 3
belphegorr <szabibibi@gmail.com>
parents: 7448
diff changeset
   382
  HideHedge(princess)
7215
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   383
end
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   384
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   385
function HideCyborgOnly()
7502
16c36f62247b Solved issues with HideHog in mission 2 and 3
belphegorr <szabibibi@gmail.com>
parents: 7448
diff changeset
   386
  HideHedge(cyborg)
7215
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   387
end
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   388
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   389
function SetupKillRoom()
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   390
  PlaceGirder(2342, 1814, 2)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   391
  PlaceGirder(2294, 1783, 0)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   392
  PlaceGirder(2245, 1814, 2)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   393
end
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   394
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   395
function SetupCourseDuo()
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   396
  PlaceGirder(1083, 1152, 6)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   397
  PlaceGirder(1087, 1150, 6)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   398
  PlaceGirder(1133, 1155, 0)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   399
  PlaceGirder(1135, 1152, 0)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   400
  PlaceGirder(1135, 1078, 0)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   401
  PlaceGirder(1087, 1016, 2)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   402
  PlaceGirder(1018, 921, 5)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   403
  PlaceGirder(1016, 921, 5)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   404
  PlaceGirder(962, 782, 6)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   405
  PlaceGirder(962, 662, 2)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   406
  PlaceGirder(962, 661, 2)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   407
  PlaceGirder(962, 650, 2)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   408
  PlaceGirder(962, 630, 2)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   409
  PlaceGirder(1033, 649, 0)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   410
  PlaceGirder(952, 650, 0)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   411
15070
6fc8f0a2929d ACF3: Simplify infinite shoryuken crate
Wuzzy <Wuzzy2@mail.ru>
parents: 15069
diff changeset
   412
  SpawnSupplyCrate(1846, 1100, amFirePunch, AMMO_INFINITE)
12933
e65aa3c3d4e6 Refactor scripts to use SpawnSupplyCrate (where it makes sense)
Wuzzy <Wuzzy2@mail.ru>
parents: 12905
diff changeset
   413
  SpawnSupplyCrate(1900, 1100, amPickHammer)
e65aa3c3d4e6 Refactor scripts to use SpawnSupplyCrate (where it makes sense)
Wuzzy <Wuzzy2@mail.ru>
parents: 12905
diff changeset
   414
  SpawnSupplyCrate(950, 674, amDynamite)
e65aa3c3d4e6 Refactor scripts to use SpawnSupplyCrate (where it makes sense)
Wuzzy <Wuzzy2@mail.ru>
parents: 12905
diff changeset
   415
  SpawnSupplyCrate(994, 825, amRope)
e65aa3c3d4e6 Refactor scripts to use SpawnSupplyCrate (where it makes sense)
Wuzzy <Wuzzy2@mail.ru>
parents: 12905
diff changeset
   416
  SpawnSupplyCrate(570, 1357, amLowGravity)
7215
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   417
end
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   418
12543
9fda510f0bc4 ACF, mission 3: Fix broken sequence when princess got caged (failed parcours)
Wuzzy <almikes@aol.com>
parents: 12542
diff changeset
   419
local trackedGears = {}
9fda510f0bc4 ACF, mission 3: Fix broken sequence when princess got caged (failed parcours)
Wuzzy <almikes@aol.com>
parents: 12542
diff changeset
   420
9fda510f0bc4 ACF, mission 3: Fix broken sequence when princess got caged (failed parcours)
Wuzzy <almikes@aol.com>
parents: 12542
diff changeset
   421
-- Remove mines and crates for the princess cage scene.
9fda510f0bc4 ACF, mission 3: Fix broken sequence when princess got caged (failed parcours)
Wuzzy <almikes@aol.com>
parents: 12542
diff changeset
   422
-- Some annoying gears might get in the way for this scene, like a dropped
9fda510f0bc4 ACF, mission 3: Fix broken sequence when princess got caged (failed parcours)
Wuzzy <almikes@aol.com>
parents: 12542
diff changeset
   423
-- mine, or the crate on the leaf.
9fda510f0bc4 ACF, mission 3: Fix broken sequence when princess got caged (failed parcours)
Wuzzy <almikes@aol.com>
parents: 12542
diff changeset
   424
function ClearTrashForPrincessCage()
9fda510f0bc4 ACF, mission 3: Fix broken sequence when princess got caged (failed parcours)
Wuzzy <almikes@aol.com>
parents: 12542
diff changeset
   425
  for gear, _ in pairs(trackedGears) do
9fda510f0bc4 ACF, mission 3: Fix broken sequence when princess got caged (failed parcours)
Wuzzy <almikes@aol.com>
parents: 12542
diff changeset
   426
    if GetY(gear) > 1600 and GetX(gear) > 1800 and GetX(gear) < 2700 then
9fda510f0bc4 ACF, mission 3: Fix broken sequence when princess got caged (failed parcours)
Wuzzy <almikes@aol.com>
parents: 12542
diff changeset
   427
      DeleteGear(gear)
9fda510f0bc4 ACF, mission 3: Fix broken sequence when princess got caged (failed parcours)
Wuzzy <almikes@aol.com>
parents: 12542
diff changeset
   428
    end
9fda510f0bc4 ACF, mission 3: Fix broken sequence when princess got caged (failed parcours)
Wuzzy <almikes@aol.com>
parents: 12542
diff changeset
   429
  end
9fda510f0bc4 ACF, mission 3: Fix broken sequence when princess got caged (failed parcours)
Wuzzy <almikes@aol.com>
parents: 12542
diff changeset
   430
end
9fda510f0bc4 ACF, mission 3: Fix broken sequence when princess got caged (failed parcours)
Wuzzy <almikes@aol.com>
parents: 12542
diff changeset
   431
9fda510f0bc4 ACF, mission 3: Fix broken sequence when princess got caged (failed parcours)
Wuzzy <almikes@aol.com>
parents: 12542
diff changeset
   432
-- Dump mines in princess cage
12905
06791c62c759 ACF3: Explode princess when skipping 12turn course failanim
Wuzzy <Wuzzy2@mail.ru>
parents: 12904
diff changeset
   433
function DumpMines(t)
06791c62c759 ACF3: Explode princess when skipping 12turn course failanim
Wuzzy <Wuzzy2@mail.ru>
parents: 12904
diff changeset
   434
  if not t then
06791c62c759 ACF3: Explode princess when skipping 12turn course failanim
Wuzzy <Wuzzy2@mail.ru>
parents: 12904
diff changeset
   435
    t = 0
06791c62c759 ACF3: Explode princess when skipping 12turn course failanim
Wuzzy <Wuzzy2@mail.ru>
parents: 12904
diff changeset
   436
  end
06791c62c759 ACF3: Explode princess when skipping 12turn course failanim
Wuzzy <Wuzzy2@mail.ru>
parents: 12904
diff changeset
   437
  AddGear(2261, 1835, gtMine, 0, 0, 0, t)
06791c62c759 ACF3: Explode princess when skipping 12turn course failanim
Wuzzy <Wuzzy2@mail.ru>
parents: 12904
diff changeset
   438
  AddGear(2280, 1831, gtMine, 0, 0, 0, t)
06791c62c759 ACF3: Explode princess when skipping 12turn course failanim
Wuzzy <Wuzzy2@mail.ru>
parents: 12904
diff changeset
   439
  AddGear(2272, 1809, gtMine, 0, 0, 0, t)
06791c62c759 ACF3: Explode princess when skipping 12turn course failanim
Wuzzy <Wuzzy2@mail.ru>
parents: 12904
diff changeset
   440
  AddGear(2290, 1815, gtMine, 0, 0, 0, t)
06791c62c759 ACF3: Explode princess when skipping 12turn course failanim
Wuzzy <Wuzzy2@mail.ru>
parents: 12904
diff changeset
   441
  AddGear(2278, 1815, gtMine, 0, 0, 0, t)
06791c62c759 ACF3: Explode princess when skipping 12turn course failanim
Wuzzy <Wuzzy2@mail.ru>
parents: 12904
diff changeset
   442
  AddGear(2307, 1811, gtMine, 0, 0, 0, t)
06791c62c759 ACF3: Explode princess when skipping 12turn course failanim
Wuzzy <Wuzzy2@mail.ru>
parents: 12904
diff changeset
   443
  AddGear(2286, 1820, gtMine, 0, 0, 0, t)
06791c62c759 ACF3: Explode princess when skipping 12turn course failanim
Wuzzy <Wuzzy2@mail.ru>
parents: 12904
diff changeset
   444
  AddGear(2309, 1813, gtMine, 0, 0, 0, t)
06791c62c759 ACF3: Explode princess when skipping 12turn course failanim
Wuzzy <Wuzzy2@mail.ru>
parents: 12904
diff changeset
   445
  AddGear(2303, 1822, gtMine, 0, 0, 0, t)
06791c62c759 ACF3: Explode princess when skipping 12turn course failanim
Wuzzy <Wuzzy2@mail.ru>
parents: 12904
diff changeset
   446
  AddGear(2317, 1827, gtMine, 0, 0, 0, t)
06791c62c759 ACF3: Explode princess when skipping 12turn course failanim
Wuzzy <Wuzzy2@mail.ru>
parents: 12904
diff changeset
   447
  AddGear(2312, 1816, gtMine, 0, 0, 0, t)
06791c62c759 ACF3: Explode princess when skipping 12turn course failanim
Wuzzy <Wuzzy2@mail.ru>
parents: 12904
diff changeset
   448
  AddGear(2316, 1812, gtMine, 0, 0, 0, t)
06791c62c759 ACF3: Explode princess when skipping 12turn course failanim
Wuzzy <Wuzzy2@mail.ru>
parents: 12904
diff changeset
   449
  AddGear(2307, 1802, gtMine, 0, 0, 0, t)
06791c62c759 ACF3: Explode princess when skipping 12turn course failanim
Wuzzy <Wuzzy2@mail.ru>
parents: 12904
diff changeset
   450
  AddGear(2276, 1818, gtMine, 0, 0, 0, t)
06791c62c759 ACF3: Explode princess when skipping 12turn course failanim
Wuzzy <Wuzzy2@mail.ru>
parents: 12904
diff changeset
   451
  AddGear(2284, 1816, gtMine, 0, 0, 0, t)
06791c62c759 ACF3: Explode princess when skipping 12turn course failanim
Wuzzy <Wuzzy2@mail.ru>
parents: 12904
diff changeset
   452
  AddGear(2292, 1811, gtMine, 0, 0, 0, t)
06791c62c759 ACF3: Explode princess when skipping 12turn course failanim
Wuzzy <Wuzzy2@mail.ru>
parents: 12904
diff changeset
   453
  AddGear(2295, 1814, gtMine, 0, 0, 0, t)
06791c62c759 ACF3: Explode princess when skipping 12turn course failanim
Wuzzy <Wuzzy2@mail.ru>
parents: 12904
diff changeset
   454
  AddGear(2306, 1811, gtMine, 0, 0, 0, t)
06791c62c759 ACF3: Explode princess when skipping 12turn course failanim
Wuzzy <Wuzzy2@mail.ru>
parents: 12904
diff changeset
   455
  AddGear(2292, 1815, gtMine, 0, 0, 0, t)
06791c62c759 ACF3: Explode princess when skipping 12turn course failanim
Wuzzy <Wuzzy2@mail.ru>
parents: 12904
diff changeset
   456
  AddGear(2314, 1815, gtMine, 0, 0, 0, t)
06791c62c759 ACF3: Explode princess when skipping 12turn course failanim
Wuzzy <Wuzzy2@mail.ru>
parents: 12904
diff changeset
   457
  AddGear(2286, 1813, gtMine, 0, 0, 0, t)
06791c62c759 ACF3: Explode princess when skipping 12turn course failanim
Wuzzy <Wuzzy2@mail.ru>
parents: 12904
diff changeset
   458
  AddGear(2275, 1813, gtMine, 0, 0, 0, t)
06791c62c759 ACF3: Explode princess when skipping 12turn course failanim
Wuzzy <Wuzzy2@mail.ru>
parents: 12904
diff changeset
   459
  AddGear(2269, 1814, gtMine, 0, 0, 0, t)
06791c62c759 ACF3: Explode princess when skipping 12turn course failanim
Wuzzy <Wuzzy2@mail.ru>
parents: 12904
diff changeset
   460
  AddGear(2273, 1812, gtMine, 0, 0, 0, t)
06791c62c759 ACF3: Explode princess when skipping 12turn course failanim
Wuzzy <Wuzzy2@mail.ru>
parents: 12904
diff changeset
   461
  AddGear(2300, 1808, gtMine, 0, 0, 0, t)
06791c62c759 ACF3: Explode princess when skipping 12turn course failanim
Wuzzy <Wuzzy2@mail.ru>
parents: 12904
diff changeset
   462
  AddGear(2322, 1812, gtMine, 0, 0, 0, t)
06791c62c759 ACF3: Explode princess when skipping 12turn course failanim
Wuzzy <Wuzzy2@mail.ru>
parents: 12904
diff changeset
   463
  AddGear(2323, 1813, gtMine, 0, 0, 0, t)
06791c62c759 ACF3: Explode princess when skipping 12turn course failanim
Wuzzy <Wuzzy2@mail.ru>
parents: 12904
diff changeset
   464
  AddGear(2311, 1811, gtMine, 0, 0, 0, t)
06791c62c759 ACF3: Explode princess when skipping 12turn course failanim
Wuzzy <Wuzzy2@mail.ru>
parents: 12904
diff changeset
   465
  AddGear(2303, 1809, gtMine, 0, 0, 0, t)
06791c62c759 ACF3: Explode princess when skipping 12turn course failanim
Wuzzy <Wuzzy2@mail.ru>
parents: 12904
diff changeset
   466
  AddGear(2287, 1808, gtMine, 0, 0, 0, t)
06791c62c759 ACF3: Explode princess when skipping 12turn course failanim
Wuzzy <Wuzzy2@mail.ru>
parents: 12904
diff changeset
   467
  AddGear(2282, 1808, gtMine, 0, 0, 0, t)
06791c62c759 ACF3: Explode princess when skipping 12turn course failanim
Wuzzy <Wuzzy2@mail.ru>
parents: 12904
diff changeset
   468
  AddGear(2277, 1809, gtMine, 0, 0, 0, t)
06791c62c759 ACF3: Explode princess when skipping 12turn course failanim
Wuzzy <Wuzzy2@mail.ru>
parents: 12904
diff changeset
   469
  AddGear(2296, 1809, gtMine, 0, 0, 0, t)
06791c62c759 ACF3: Explode princess when skipping 12turn course failanim
Wuzzy <Wuzzy2@mail.ru>
parents: 12904
diff changeset
   470
  AddGear(2314, 1818, gtMine, 0, 0, 0, t)
7215
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   471
end
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   472
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   473
function SetupAnimRefusedDied()
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   474
  SetupAnimAcceptedDied()
7225
e3f2280d9000 Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents: 7219
diff changeset
   475
  table.insert(startAnim, {func = AnimSay, args = {leaks, loc("I just wonder where Ramon and Spiky disappeared..."), SAY_THINK, 6000}})
7215
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   476
end
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   477
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   478
function SetupAnimAttacked()
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   479
  SetupAnimAcceptedDied()
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   480
  startAnim = {}
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   481
  table.insert(startAnim, {func = AnimWait, args = {leaks, 3000}})
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   482
  table.insert(startAnim, {func = AnimTurn, args = {leaks, "Left"}})
7225
e3f2280d9000 Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents: 7219
diff changeset
   483
  table.insert(startAnim, {func = AnimSay, args = {leaks, loc("I wonder where Dense Cloud is..."), SAY_THINK, 4000}})
e3f2280d9000 Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents: 7219
diff changeset
   484
  table.insert(startAnim, {func = AnimSay, args = {leaks, loc("He must be in the village already."), SAY_THINK, 4000}})
e3f2280d9000 Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents: 7219
diff changeset
   485
  table.insert(startAnim, {func = AnimSay, args = {leaks, loc("I'd better get going myself."), SAY_THINK, 4000}})
15069
d131ec7be850 ACF3: Clean up start up sequences a bit
Wuzzy <Wuzzy2@mail.ru>
parents: 15050
diff changeset
   486
  AddSkipFunction(startAnim, SkipStartAnim, {})
7215
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   487
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   488
  midAnim = {}
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   489
  table.insert(midAnim, {func = AnimWait, args = {leaks, 500}})
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   490
  table.insert(midAnim, {func = AnimCustomFunction, swh = false, args = {leaks, RestoreCyborg, {1300, 1200, 1390, 1200}}})
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   491
  table.insert(midAnim, {func = AnimSwitchHog, args = {cyborg}})
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   492
  table.insert(midAnim, {func = AnimCustomFunction, args = {cyborg, TargetPrincess, {}}})
7225
e3f2280d9000 Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents: 7219
diff changeset
   493
  table.insert(midAnim, {func = AnimSay, args = {cyborg, loc("Welcome, Leaks A Lot!"), SAY_SAY, 3000}})
e3f2280d9000 Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents: 7219
diff changeset
   494
  table.insert(midAnim, {func = AnimSay, args = {cyborg, loc("I want to play a game..."), SAY_SAY, 3000}})
12903
9e7c1d5eec73 String cleanup: Double/triple exclamation marks
Wuzzy <Wuzzy2@mail.ru>
parents: 12901
diff changeset
   495
  table.insert(midAnim, {func = AnimSay, args = {princess, loc("Help me, please!"), SAY_SHOUT, 3000}})
7225
e3f2280d9000 Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents: 7219
diff changeset
   496
  table.insert(midAnim, {func = AnimSay, args = {cyborg, loc("If you can get that crate fast enough, your beloved \"princess\" may go free."), SAY_SAY, 7000}})
e3f2280d9000 Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents: 7219
diff changeset
   497
  table.insert(midAnim, {func = AnimSay, args = {cyborg, loc("However, if you fail to do so, she dies a most violent death! Muahahaha!"), SAY_SAY, 8000}})
e3f2280d9000 Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents: 7219
diff changeset
   498
  table.insert(midAnim, {func = AnimSay, args = {cyborg, loc("Good luck...or else!"), SAY_SAY, 4000}})
15069
d131ec7be850 ACF3: Clean up start up sequences a bit
Wuzzy <Wuzzy2@mail.ru>
parents: 15050
diff changeset
   499
  table.insert(midAnim, {func = AnimTeleportGear, args = {leaks, 2656, 1845}})
7215
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   500
  table.insert(midAnim, {func = AnimCustomFunction, args = {cyborg, HideCyborg, {}}, swh = false})
7225
e3f2280d9000 Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents: 7219
diff changeset
   501
  table.insert(midAnim, {func = AnimSay, args = {leaks, loc("Hey! This is cheating!"), SAY_SHOUT, 4000}})
7215
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   502
  AddSkipFunction(midAnim, SkipMidAnimAlone, {})
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   503
end
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   504
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   505
function SetupAnimAcceptedDied()
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   506
  table.insert(startAnimAD, {func = AnimWait, args = {leaks, 3000}})
7243
9ae9178c525e Modified Animate.lua function AnimMove to take highercase direction (e.g. "Left")
belphegorr <szabibibi@gmail.com>
parents: 7239
diff changeset
   507
  table.insert(startAnimAD, {func = AnimTurn, args = {leaks, "Left"}})
7225
e3f2280d9000 Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents: 7219
diff changeset
   508
  table.insert(startAnimAD, {func = AnimSay, args = {leaks, loc("I need to get to the other side of this island, fast!"), SAY_THINK, 5000}})
e3f2280d9000 Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents: 7219
diff changeset
   509
  table.insert(startAnimAD, {func = AnimSay, args = {leaks, loc("With Dense Cloud on the land of shadows, I'm the village's only hope..."), SAY_THINK, 7000}})
15069
d131ec7be850 ACF3: Clean up start up sequences a bit
Wuzzy <Wuzzy2@mail.ru>
parents: 15050
diff changeset
   510
  AddSkipFunction(startAnimAD, SkipStartAnim, {})
7215
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   511
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   512
  table.insert(midAnimAD, {func = AnimWait, args = {leaks, 500}})
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   513
  table.insert(midAnimAD, {func = AnimCustomFunction, swh = false, args = {leaks, RestoreCyborg, {1300, 1200, 1390, 1200}}})
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   514
  table.insert(midAnimAD, {func = AnimSwitchHog, args = {cyborg}})
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   515
  table.insert(midAnimAD, {func = AnimCustomFunction, args = {cyborg, TargetPrincess, {}}})
7225
e3f2280d9000 Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents: 7219
diff changeset
   516
  table.insert(midAnimAD, {func = AnimSay, args = {cyborg, loc("Welcome, Leaks A Lot!"), SAY_SAY, 3000}})
e3f2280d9000 Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents: 7219
diff changeset
   517
  table.insert(midAnimAD, {func = AnimSay, args = {cyborg, loc("I want to play a game..."), SAY_SAY, 3000}})
12903
9e7c1d5eec73 String cleanup: Double/triple exclamation marks
Wuzzy <Wuzzy2@mail.ru>
parents: 12901
diff changeset
   518
  table.insert(midAnimAD, {func = AnimSay, args = {princess, loc("Help me, please!"), SAY_SHOUT, 3000}})
7225
e3f2280d9000 Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents: 7219
diff changeset
   519
  table.insert(midAnimAD, {func = AnimSay, args = {cyborg, loc("If you can get that crate fast enough, your beloved \"princess\" may go free."), SAY_SAY, 7000}})
e3f2280d9000 Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents: 7219
diff changeset
   520
  table.insert(midAnimAD, {func = AnimSay, args = {cyborg, loc("However, if you fail to do so, she dies a most violent death, just like your friend! Muahahaha!"), SAY_SAY, 8000}})
e3f2280d9000 Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents: 7219
diff changeset
   521
  table.insert(midAnimAD, {func = AnimSay, args = {cyborg, loc("Good luck...or else!"), SAY_SAY, 4000}})
15069
d131ec7be850 ACF3: Clean up start up sequences a bit
Wuzzy <Wuzzy2@mail.ru>
parents: 15050
diff changeset
   522
  table.insert(midAnimAD, {func = AnimTeleportGear, args = {leaks, 2656, 1845}})
7215
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   523
  table.insert(midAnimAD, {func = AnimCustomFunction, args = {cyborg, HideCyborg, {}}, swh = false})
7225
e3f2280d9000 Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents: 7219
diff changeset
   524
  table.insert(midAnimAD, {func = AnimSay, args = {leaks, loc("Hey! This is cheating!"), SAY_SHOUT, 4000}})
7215
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   525
  AddSkipFunction(midAnimAD, SkipMidAnimAlone, {})
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   526
12543
9fda510f0bc4 ACF, mission 3: Fix broken sequence when princess got caged (failed parcours)
Wuzzy <almikes@aol.com>
parents: 12542
diff changeset
   527
  table.insert(failAnimAD, {func = AnimCustomFunction, args = {cyborg, ClearTrashForPrincessCage, {}}})
15069
d131ec7be850 ACF3: Clean up start up sequences a bit
Wuzzy <Wuzzy2@mail.ru>
parents: 15050
diff changeset
   528
  table.insert(failAnimAD, {func = AnimCustomFunction, swh = false, args = {leaks, RestoreCyborg, {2299, 1687, 2294, 1845}}})
d131ec7be850 ACF3: Clean up start up sequences a bit
Wuzzy <Wuzzy2@mail.ru>
parents: 15050
diff changeset
   529
  table.insert(failAnimAD, {func = AnimTeleportGear, args = {leaks, 2090, 1845}})
7215
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   530
  table.insert(failAnimAD, {func = AnimCustomFunction, swh = false, args = {cyborg, SetupKillRoom, {}}})
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   531
  table.insert(failAnimAD, {func = AnimTurn, swh = false, args = {cyborg, "Left"}})
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   532
  table.insert(failAnimAD, {func = AnimTurn, swh = false, args = {princess, "Left"}})
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   533
  table.insert(failAnimAD, {func = AnimTurn, swh = false, args = {leaks, "Right"}})
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   534
  table.insert(failAnimAD, {func = AnimWait, args = {cyborg, 1000}})
7225
e3f2280d9000 Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents: 7219
diff changeset
   535
  table.insert(failAnimAD, {func = AnimSay, args = {cyborg, loc("You have failed to complete your task, young one!"), SAY_SAY, 6000}})
e3f2280d9000 Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents: 7219
diff changeset
   536
  table.insert(failAnimAD, {func = AnimSay, args = {cyborg, loc("It's time you learned that your actions have consequences!"), SAY_SAY, 7000}})
e3f2280d9000 Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents: 7219
diff changeset
   537
  table.insert(failAnimAD, {func = AnimSay, args = {princess, loc("No! Please, help me!"), SAY_SAY, 4000}})
7215
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   538
  table.insert(failAnimAD, {func = AnimSwitchHog, args = {cyborg}})
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   539
  table.insert(failAnimAD, {func = AnimCustomFunction, args = {cyborg, DumpMines, {}}})
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   540
  table.insert(failAnimAD, {func = AnimCustomFunction, args = {cyborg, KillPrincess, {}}})
12543
9fda510f0bc4 ACF, mission 3: Fix broken sequence when princess got caged (failed parcours)
Wuzzy <almikes@aol.com>
parents: 12542
diff changeset
   541
  table.insert(failAnimAD, {func = AnimWait, args = {cyborg, 500}})
9fda510f0bc4 ACF, mission 3: Fix broken sequence when princess got caged (failed parcours)
Wuzzy <almikes@aol.com>
parents: 12542
diff changeset
   542
  table.insert(failAnimAD, {func = AnimSay, args = {leaks, loc("No! What have I done?! What have YOU done?!"), SAY_SHOUT, 3000}})
9fda510f0bc4 ACF, mission 3: Fix broken sequence when princess got caged (failed parcours)
Wuzzy <almikes@aol.com>
parents: 12542
diff changeset
   543
  table.insert(failAnimAD, {func = AnimSwitchHog, args = {princess}})
12905
06791c62c759 ACF3: Explode princess when skipping 12turn course failanim
Wuzzy <Wuzzy2@mail.ru>
parents: 12904
diff changeset
   544
  AddSkipFunction(failAnimAD, SkipFailAnimAlone, {})
7215
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   545
13474
4ea2c8fa699e ACF3: Tweak princess spawn position
Wuzzy <Wuzzy2@mail.ru>
parents: 13473
diff changeset
   546
  table.insert(endAnimAD, {func = AnimCustomFunction, swh = false, args = {leaks, RestoreCyborg, {437, 1700, 519, 1726}}})
7215
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   547
  table.insert(endAnimAD, {func = AnimTurn, swh = false, args = {cyborg, "Right"}})
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   548
  table.insert(endAnimAD, {func = AnimTurn, swh = false, args = {princess, "Right"}})
7225
e3f2280d9000 Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents: 7219
diff changeset
   549
  table.insert(endAnimAD, {func = AnimSay, args = {princess, loc("Help me, Leaks!"), SAY_SHOUT, 3000}})
e3f2280d9000 Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents: 7219
diff changeset
   550
  table.insert(endAnimAD, {func = AnimSay, args = {leaks, loc("But you said you'd let her go!"), SAY_SHOUT, 5000}})
e3f2280d9000 Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents: 7219
diff changeset
   551
  table.insert(endAnimAD, {func = AnimSay, args = {cyborg, loc("And you believed me? Oh, god, that's cute!"), SAY_SHOUT, 7000}})
e3f2280d9000 Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents: 7219
diff changeset
   552
  table.insert(endAnimAD, {func = AnimSay, args = {leaks, loc("I won't let you kill her!"), SAY_SHOUT, 4000}})
7215
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   553
  AddSkipFunction(endAnimAD, SkipEndAnimAlone, {})
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   554
  
7225
e3f2280d9000 Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents: 7219
diff changeset
   555
  table.insert(endFailAnim, {func = AnimCaption, args = {leaks, loc("Leaks A Lot, depressed for killing his loved one, failed to save the village..."), 3000}})
7215
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   556
7245
53f73f4ae203 Modified frontend so that updating campaogn progress no longer changes current index of the mission combo box
belphegorr <szabibibi@gmail.com>
parents: 7243
diff changeset
   557
  table.insert(winAnimAD, {func = AnimCustomFunction, args = {princess, CondNeedToTurn, {leaks, princess}}})
7225
e3f2280d9000 Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents: 7219
diff changeset
   558
  table.insert(winAnimAD, {func = AnimSay, args = {princess, loc("Thank you, oh, thank you, Leaks A Lot!"), SAY_SAY, 5000}})
e3f2280d9000 Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents: 7219
diff changeset
   559
  table.insert(winAnimAD, {func = AnimSay, args = {princess, loc("How can I ever repay you for saving my life?"), SAY_SAY, 6000}})
e3f2280d9000 Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents: 7219
diff changeset
   560
  table.insert(winAnimAD, {func = AnimSay, args = {leaks, loc("There's nothing more satisfying for me than seeing you share your beauty with the world every morning, my princess!"), SAY_SAY, 10000}})
e3f2280d9000 Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents: 7219
diff changeset
   561
  table.insert(winAnimAD, {func = AnimSay, args = {leaks, loc("Let's go home!"), SAY_SAY, 3000}})
e3f2280d9000 Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents: 7219
diff changeset
   562
  table.insert(winAnimAD, {func = AnimCaption, args = {leaks, loc("And so they discovered that cyborgs weren't invulnerable..."), 2000}})
7215
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   563
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   564
  startAnim = startAnimAD
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   565
  midAnim = midAnimAD
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   566
  failAnim = failAnimAD
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   567
  endAnim = endAnimAD
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   568
  winAnim = winAnimAD
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   569
end
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   570
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   571
function SetupAnimAcceptedLived()
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   572
  table.insert(startAnimAL, {func = AnimWait, args = {leaks, 3000}})
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   573
  table.insert(startAnimAL, {func = AnimCustomFunction, args = {dense, CondNeedToTurn, {leaks, dense}}})
7225
e3f2280d9000 Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents: 7219
diff changeset
   574
  table.insert(startAnimAL, {func = AnimSay, args = {leaks, loc("All right, we just need to get to the other side of the island!"), SAY_SAY, 8000}})
e3f2280d9000 Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents: 7219
diff changeset
   575
  table.insert(startAnimAL, {func = AnimSay, args = {dense, loc("We have no time to waste..."), SAY_SAY, 4000}})
7215
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   576
  table.insert(startAnimAL, {func = AnimSwitchHog, args = {leaks}})
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   577
  AddSkipFunction(startAnimAL, SkipStartAnim, {})
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   578
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   579
  table.insert(pastFlowerAnimAL, {func = AnimCustomFunction, args = {dense, RestoreCyborgOnly, {unpack(startCyborgPosDuo)}}, swh = false})
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   580
  table.insert(pastFlowerAnimAL, {func = AnimTurn, args = {cyborg, "Right"}})
7225
e3f2280d9000 Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents: 7219
diff changeset
   581
  table.insert(pastFlowerAnimAL, {func = AnimSay, args = {cyborg, loc("Well, well! Isn't that the cutest thing you've ever seen?"), SAY_SAY, 7000}})
e3f2280d9000 Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents: 7219
diff changeset
   582
  table.insert(pastFlowerAnimAL, {func = AnimSay, args = {cyborg, loc("Two little hogs cooperating, getting past obstacles..."), SAY_SAY, 7000}})
e3f2280d9000 Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents: 7219
diff changeset
   583
  table.insert(pastFlowerAnimAL, {func = AnimSay, args = {cyborg, loc("Let me test your skills a little, will you?"), SAY_SAY, 6000}})
15069
d131ec7be850 ACF3: Clean up start up sequences a bit
Wuzzy <Wuzzy2@mail.ru>
parents: 15050
diff changeset
   584
  table.insert(pastFlowerAnimAL, {func = AnimWait, args = {cyborg, 2000}})
d131ec7be850 ACF3: Clean up start up sequences a bit
Wuzzy <Wuzzy2@mail.ru>
parents: 15050
diff changeset
   585
  table.insert(pastFlowerAnimAL, {func = AnimTeleportGear, args = {cyborg, 2456, 1845}})
d131ec7be850 ACF3: Clean up start up sequences a bit
Wuzzy <Wuzzy2@mail.ru>
parents: 15050
diff changeset
   586
  table.insert(pastFlowerAnimAL, {func = AnimTeleportGear, args = {dense, 2656, 1845}})
7215
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   587
  table.insert(pastFlowerAnimAL, {func = AnimCustomFunction, args = {dense, CondNeedToTurn, {cyborg, dense}}})
7225
e3f2280d9000 Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents: 7219
diff changeset
   588
  table.insert(pastFlowerAnimAL, {func = AnimSay, args = {dense, loc("Why are you doing this?"), SAY_SAY, 4000}})
e3f2280d9000 Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents: 7219
diff changeset
   589
  table.insert(pastFlowerAnimAL, {func = AnimSay, args = {cyborg, loc("To help you, of course!"), SAY_SAY, 4000}})
15069
d131ec7be850 ACF3: Clean up start up sequences a bit
Wuzzy <Wuzzy2@mail.ru>
parents: 15050
diff changeset
   590
  table.insert(pastFlowerAnimAL, {func = AnimSwitchHog, args = {leaks}})
7215
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   591
  table.insert(pastFlowerAnimAL, {func = AnimDisappear, swh = false, args = {cyborg, 3781, 1583}})
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   592
  table.insert(pastFlowerAnimAL, {func = AnimCustomFunction, swh = false, args = {cyborg, HideCyborgOnly, {}}})
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   593
  AddSkipFunction(pastFlowerAnimAL, SkipPastFlowerAnim, {})
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   594
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   595
  table.insert(outPitAnimAL, {func = AnimCustomFunction, args = {dense, RestoreCyborgOnly, {unpack(midCyborgPosDuo)}}, swh = false})
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   596
  table.insert(outPitAnimAL, {func = AnimTurn, args = {cyborg, "Right"}})
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   597
  table.insert(outPitAnimAL, {func = AnimTeleportGear, args = {dense, unpack(midDensePosDuo)}})
7506
e2632a18bb4c Mission 3: reduced enemy turn time, fixed other HideHog problems
belphegorr <szabibibi@gmail.com>
parents: 7502
diff changeset
   598
  table.insert(outPitAnimAL, {func = AnimTurn, args = {dense, "Left"}})
7225
e3f2280d9000 Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents: 7219
diff changeset
   599
  table.insert(outPitAnimAL, {func = AnimSay, args = {dense, loc("OH, COME ON!"), SAY_SHOUT, 3000}})
e3f2280d9000 Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents: 7219
diff changeset
   600
  table.insert(outPitAnimAL, {func = AnimSay, args = {cyborg, loc("Let's see what your comrade does now!"), SAY_SAY, 5000}})
7215
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   601
  table.insert(outPitAnimAL, {func = AnimSwitchHog, args = {dense}})
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   602
  table.insert(outPitAnimAL, {func = AnimDisappear, swh = false, args = {cyborg, 3781, 1583}})
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   603
  table.insert(outPitAnimAL, {func = AnimCustomFunction, swh = false, args = {cyborg, HideCyborgOnly, {}}})
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   604
  AddSkipFunction(outPitAnimAL, SkipOutPitAnim, {})
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   605
13474
4ea2c8fa699e ACF3: Tweak princess spawn position
Wuzzy <Wuzzy2@mail.ru>
parents: 13473
diff changeset
   606
  table.insert(endAnim, {func = AnimCustomFunction, swh = false, args = {leaks, RestoreCyborg, {437, 1700, 519, 1726}}})
7215
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   607
  table.insert(endAnim, {func = AnimTeleportGear, args = {leaks, 763, 1760}})
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   608
  table.insert(endAnim, {func = AnimTeleportGear, args = {dense, 835, 1519}})
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   609
  table.insert(endAnim, {func = AnimTurn, swh = false, args = {leaks, "Left"}})
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   610
  table.insert(endAnim, {func = AnimTurn, swh = false, args = {dense, "Left"}})
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   611
  table.insert(endAnim, {func = AnimTurn, swh = false, args = {cyborg, "Right"}})
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   612
  table.insert(endAnim, {func = AnimTurn, swh = false, args = {princess, "Right"}})
7225
e3f2280d9000 Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents: 7219
diff changeset
   613
  table.insert(endAnim, {func = AnimSay, args = {princess, loc("Help me, please!"), SAY_SHOUT, 3000}})
e3f2280d9000 Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents: 7219
diff changeset
   614
  table.insert(endAnim, {func = AnimSay, args = {leaks, loc("What are you doing? Let her go!"), SAY_SHOUT, 5000}})
e3f2280d9000 Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents: 7219
diff changeset
   615
  table.insert(endAnim, {func = AnimSay, args = {cyborg, loc("Yeah? Watcha gonna do? Cry?"), SAY_SHOUT, 5000}})
e3f2280d9000 Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents: 7219
diff changeset
   616
  table.insert(endAnim, {func = AnimSay, args = {leaks, loc("We won't let you hurt her!"), SAY_SHOUT, 4000}})
7215
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   617
  AddSkipFunction(endAnim, SkipEndAnimDuo, {})
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   618
  
7225
e3f2280d9000 Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents: 7219
diff changeset
   619
  table.insert(endFailAnim, {func = AnimCaption, args = {leaks, loc("Leaks A Lot, depressed for killing his loved one, failed to save the village..."), 3000}})
7215
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   620
7245
53f73f4ae203 Modified frontend so that updating campaogn progress no longer changes current index of the mission combo box
belphegorr <szabibibi@gmail.com>
parents: 7243
diff changeset
   621
  table.insert(winAnim, {func = AnimCustomFunction, args = {princess, CondNeedToTurn, {leaks, princess}}})
7225
e3f2280d9000 Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents: 7219
diff changeset
   622
  table.insert(winAnim, {func = AnimSay, args = {princess, loc("Thank you, oh, thank you, my heroes!"), SAY_SAY, 5000}})
e3f2280d9000 Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents: 7219
diff changeset
   623
  table.insert(winAnim, {func = AnimSay, args = {princess, loc("How can I ever repay you for saving my life?"), SAY_SAY, 6000}})
7245
53f73f4ae203 Modified frontend so that updating campaogn progress no longer changes current index of the mission combo box
belphegorr <szabibibi@gmail.com>
parents: 7243
diff changeset
   624
  table.insert(winAnim, {func = AnimSay, args = {leaks, loc("There's nothing more satisfying to us than seeing you share your beauty..."), SAY_SAY, 7000}})
53f73f4ae203 Modified frontend so that updating campaogn progress no longer changes current index of the mission combo box
belphegorr <szabibibi@gmail.com>
parents: 7243
diff changeset
   625
  table.insert(winAnim, {func = AnimSay, args = {leaks, loc("... share your beauty with the world every morning, my princess!"), SAY_SAY, 7000}})
7225
e3f2280d9000 Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents: 7219
diff changeset
   626
  table.insert(winAnim, {func = AnimSay, args = {leaks, loc("Let's go home!"), SAY_SAY, 3000}})
e3f2280d9000 Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents: 7219
diff changeset
   627
  table.insert(winAnim, {func = AnimCaption, args = {leaks, loc("And so they discovered that cyborgs weren't invulnerable..."), 2000}})
7215
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   628
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   629
  startAnim = startAnimAL
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   630
  pastFlowerAnim = pastFlowerAnimAL
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   631
  outPitAnim = outPitAnimAL
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   632
end
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   633
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   634
function SetupAnimRefusedLived()
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   635
  table.insert(startAnimRL, {func = AnimWait, args = {leaks, 3000}})
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   636
  table.insert(startAnimRL, {func = AnimCustomFunction, args = {dense, CondNeedToTurn, {leaks, dense}}})
7225
e3f2280d9000 Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents: 7219
diff changeset
   637
  table.insert(startAnimRL, {func = AnimSay, args = {leaks, loc("All right, we just need to get to the other side of the island!"), SAY_SAY, 7000}})
e3f2280d9000 Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents: 7219
diff changeset
   638
  table.insert(startAnimRL, {func = AnimSay, args = {dense, loc("Dude, can you see Ramon and Spiky?"), SAY_SAY, 5000}})
e3f2280d9000 Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents: 7219
diff changeset
   639
  table.insert(startAnimRL, {func = AnimSay, args = {leaks, loc("No...I wonder where they disappeared?!"), SAY_SAY, 5000}})
7215
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   640
  AddSkipFunction(startAnimRL, SkipStartAnim, {})
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   641
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   642
  table.insert(pastFlowerAnimRL, {func = AnimCustomFunction, args = {dense, RestoreCyborgOnly, {unpack(startCyborgPosDuo)}}, swh = false})
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   643
  table.insert(pastFlowerAnimRL, {func = AnimTurn, args = {cyborg, "Right"}})
7225
e3f2280d9000 Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents: 7219
diff changeset
   644
  table.insert(pastFlowerAnimRL, {func = AnimSay, args = {cyborg, loc("Well, well! Isn't that the cutest thing you've ever seen?"), SAY_SAY, 7000}})
e3f2280d9000 Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents: 7219
diff changeset
   645
  table.insert(pastFlowerAnimRL, {func = AnimSay, args = {cyborg, loc("Two little hogs cooperating, getting past obstacles..."), SAY_SAY, 7000}})
e3f2280d9000 Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents: 7219
diff changeset
   646
  table.insert(pastFlowerAnimRL, {func = AnimSay, args = {cyborg, loc("Let me test your skills a little, will you?"), SAY_SAY, 6000}})
15069
d131ec7be850 ACF3: Clean up start up sequences a bit
Wuzzy <Wuzzy2@mail.ru>
parents: 15050
diff changeset
   647
  table.insert(pastFlowerAnimRL, {func = AnimWait, args = {cyborg, 2000}})
d131ec7be850 ACF3: Clean up start up sequences a bit
Wuzzy <Wuzzy2@mail.ru>
parents: 15050
diff changeset
   648
  table.insert(pastFlowerAnimRL, {func = AnimTeleportGear, args = {cyborg, 2456, 1845}})
d131ec7be850 ACF3: Clean up start up sequences a bit
Wuzzy <Wuzzy2@mail.ru>
parents: 15050
diff changeset
   649
  table.insert(pastFlowerAnimRL, {func = AnimTeleportGear, args = {dense, 2656, 1845}})
7215
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   650
  table.insert(pastFlowerAnimRL, {func = AnimCustomFunction, args = {dense, CondNeedToTurn, {cyborg, dense}}})
7225
e3f2280d9000 Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents: 7219
diff changeset
   651
  table.insert(pastFlowerAnimRL, {func = AnimSay, args = {dense, loc("Why are you doing this?"), SAY_SAY, 4000}})
e3f2280d9000 Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents: 7219
diff changeset
   652
  table.insert(pastFlowerAnimRL, {func = AnimSay, args = {cyborg, loc("You couldn't possibly believe that after refusing my offer I'd just let you go!"), SAY_SAY, 9000}})
e3f2280d9000 Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents: 7219
diff changeset
   653
  table.insert(pastFlowerAnimRL, {func = AnimSay, args = {cyborg, loc("You're funny!"), SAY_SAY, 4000}})
7215
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   654
  table.insert(pastFlowerAnimRL, {func = AnimSwitchHog, args = {dense}})
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   655
  table.insert(pastFlowerAnimRL, {func = AnimDisappear, swh = false, args = {cyborg, 3781, 1583}})
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   656
  table.insert(pastFlowerAnimRL, {func = AnimCustomFunction, swh = false, args = {cyborg, HideCyborgOnly, {}}})
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   657
  AddSkipFunction(pastFlowerAnimRL, SkipPastFlowerAnim, {})
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   658
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   659
  table.insert(outPitAnimRL, {func = AnimCustomFunction, args = {dense, RestoreCyborgOnly, {unpack(midCyborgPosDuo)}}, swh = false})
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   660
  table.insert(outPitAnimRL, {func = AnimTurn, args = {cyborg, "Right"}})
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   661
  table.insert(outPitAnimRL, {func = AnimTeleportGear, args = {dense, unpack(midDensePosDuo)}})
7506
e2632a18bb4c Mission 3: reduced enemy turn time, fixed other HideHog problems
belphegorr <szabibibi@gmail.com>
parents: 7502
diff changeset
   662
  table.insert(outPitAnimRL, {func = AnimTurn, args = {dense, "Left"}})
7225
e3f2280d9000 Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents: 7219
diff changeset
   663
  table.insert(outPitAnimRL, {func = AnimSay, args = {dense, loc("OH, COME ON!"), SAY_SHOUT, 3000}})
e3f2280d9000 Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents: 7219
diff changeset
   664
  table.insert(outPitAnimRL, {func = AnimSay, args = {cyborg, loc("Let's see what your comrade does now!"), SAY_SAY, 5000}})
7215
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   665
  table.insert(outPitAnimRL, {func = AnimSwitchHog, args = {dense}})
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   666
  table.insert(outPitAnimRL, {func = AnimDisappear, swh = false, args = {cyborg, 3781, 1583}})
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   667
  table.insert(outPitAnimRL, {func = AnimCustomFunction, swh = false, args = {cyborg, HideCyborgOnly, {}}})
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   668
  AddSkipFunction(outPitAnimRL, SkipOutPitAnim, {})
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   669
13474
4ea2c8fa699e ACF3: Tweak princess spawn position
Wuzzy <Wuzzy2@mail.ru>
parents: 13473
diff changeset
   670
  table.insert(endAnim, {func = AnimCustomFunction, args = {leaks, RestoreCyborg, {437, 1700, 519, 1726}}})
7215
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   671
  table.insert(endAnim, {func = AnimTeleportGear, args = {leaks, 763, 1760}})
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   672
  table.insert(endAnim, {func = AnimTeleportGear, args = {dense, 835, 1519}})
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   673
  table.insert(endAnim, {func = AnimTurn, swh = false, args = {leaks, "Left"}})
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   674
  table.insert(endAnim, {func = AnimTurn, swh = false, args = {dense, "Left"}})
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   675
  table.insert(endAnim, {func = AnimTurn, swh = false, args = {cyborg, "Right"}})
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   676
  table.insert(endAnim, {func = AnimTurn, swh = false, args = {princess, "Right"}})
7225
e3f2280d9000 Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents: 7219
diff changeset
   677
  table.insert(endAnim, {func = AnimSay, args = {princess, loc("Help me, please!"), SAY_SHOUT, 3000}})
e3f2280d9000 Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents: 7219
diff changeset
   678
  table.insert(endAnim, {func = AnimSay, args = {leaks, loc("What are you doing? Let her go!"), SAY_SHOUT, 5000}})
e3f2280d9000 Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents: 7219
diff changeset
   679
  table.insert(endAnim, {func = AnimSay, args = {cyborg, loc("Yeah? Watcha gonna do? Cry?"), SAY_SHOUT, 5000}})
e3f2280d9000 Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents: 7219
diff changeset
   680
  table.insert(endAnim, {func = AnimSay, args = {leaks, loc("We won't let you hurt her!"), SAY_SHOUT, 4000}})
7215
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   681
  AddSkipFunction(endAnim, SkipEndAnimDuo, {})
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   682
  
7225
e3f2280d9000 Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents: 7219
diff changeset
   683
  table.insert(endFailAnim, {func = AnimCaption, args = {leaks, loc("Leaks A Lot, depressed for killing his loved one, failed to save the village..."), 3000}})
7215
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   684
7245
53f73f4ae203 Modified frontend so that updating campaogn progress no longer changes current index of the mission combo box
belphegorr <szabibibi@gmail.com>
parents: 7243
diff changeset
   685
  table.insert(winAnim, {func = AnimCustomFunction, args = {princess, CondNeedToTurn, {leaks, princess}}})
7225
e3f2280d9000 Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents: 7219
diff changeset
   686
  table.insert(winAnim, {func = AnimSay, args = {princess, loc("Thank you, oh, thank you, my heroes!"), SAY_SAY, 5000}})
e3f2280d9000 Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents: 7219
diff changeset
   687
  table.insert(winAnim, {func = AnimSay, args = {princess, loc("How can I ever repay you for saving my life?"), SAY_SAY, 6000}})
e3f2280d9000 Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents: 7219
diff changeset
   688
  table.insert(winAnim, {func = AnimSay, args = {leaks, loc("There's nothing more satisfying to us than seeing you share your beauty with the world every morning, my princess!"), SAY_SAY, 10000}})
e3f2280d9000 Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents: 7219
diff changeset
   689
  table.insert(winAnim, {func = AnimSay, args = {leaks, loc("Let's go home!"), SAY_SAY, 3000}})
e3f2280d9000 Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents: 7219
diff changeset
   690
  table.insert(winAnim, {func = AnimCaption, args = {leaks, loc("And so they discovered that cyborgs weren't invulnerable..."), 2000}})
7215
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   691
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   692
  startAnim = startAnimRL
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   693
  pastFlowerAnim = pastFlowerAnimRL
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   694
  outPitAnim = outPitAnimRL
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   695
end
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   696
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   697
function KillPrincess()
12375
3126214d0e7d ACF, mission 3: Fix victory causing a lot of loser message being displayed. Also add EndTurn()
Wuzzy <almikes@aol.com>
parents: 12374
diff changeset
   698
  EndTurn(true)
7215
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   699
end
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   700
--/////////////////////////////Misc Functions////////////////////////
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   701
7502
16c36f62247b Solved issues with HideHog in mission 2 and 3
belphegorr <szabibibi@gmail.com>
parents: 7448
diff changeset
   702
function HideHedge(hedge)
16c36f62247b Solved issues with HideHog in mission 2 and 3
belphegorr <szabibibi@gmail.com>
parents: 7448
diff changeset
   703
  if hedgeHidden[hedge] ~= true then
16c36f62247b Solved issues with HideHog in mission 2 and 3
belphegorr <szabibibi@gmail.com>
parents: 7448
diff changeset
   704
    HideHog(hedge)
16c36f62247b Solved issues with HideHog in mission 2 and 3
belphegorr <szabibibi@gmail.com>
parents: 7448
diff changeset
   705
    hedgeHidden[hedge] = true
16c36f62247b Solved issues with HideHog in mission 2 and 3
belphegorr <szabibibi@gmail.com>
parents: 7448
diff changeset
   706
  end
16c36f62247b Solved issues with HideHog in mission 2 and 3
belphegorr <szabibibi@gmail.com>
parents: 7448
diff changeset
   707
end
16c36f62247b Solved issues with HideHog in mission 2 and 3
belphegorr <szabibibi@gmail.com>
parents: 7448
diff changeset
   708
16c36f62247b Solved issues with HideHog in mission 2 and 3
belphegorr <szabibibi@gmail.com>
parents: 7448
diff changeset
   709
function RestoreHedge(hedge)
16c36f62247b Solved issues with HideHog in mission 2 and 3
belphegorr <szabibibi@gmail.com>
parents: 7448
diff changeset
   710
  if hedgeHidden[hedge] == true then
16c36f62247b Solved issues with HideHog in mission 2 and 3
belphegorr <szabibibi@gmail.com>
parents: 7448
diff changeset
   711
    RestoreHog(hedge)
16c36f62247b Solved issues with HideHog in mission 2 and 3
belphegorr <szabibibi@gmail.com>
parents: 7448
diff changeset
   712
    hedgeHidden[hedge] = false
16c36f62247b Solved issues with HideHog in mission 2 and 3
belphegorr <szabibibi@gmail.com>
parents: 7448
diff changeset
   713
  end
16c36f62247b Solved issues with HideHog in mission 2 and 3
belphegorr <szabibibi@gmail.com>
parents: 7448
diff changeset
   714
end
16c36f62247b Solved issues with HideHog in mission 2 and 3
belphegorr <szabibibi@gmail.com>
parents: 7448
diff changeset
   715
7215
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   716
function CondNeedToTurn(hog1, hog2)
15069
d131ec7be850 ACF3: Clean up start up sequences a bit
Wuzzy <Wuzzy2@mail.ru>
parents: 15050
diff changeset
   717
  local xl, xd = GetX(hog1), GetX(hog2)
7215
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   718
  if xl > xd then
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   719
    AnimInsertStepNext({func = AnimTurn, args = {hog1, "Left"}})
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   720
    AnimInsertStepNext({func = AnimTurn, args = {hog2, "Right"}})
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   721
  elseif xl < xd then
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   722
    AnimInsertStepNext({func = AnimTurn, args = {hog2, "Left"}})
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   723
    AnimInsertStepNext({func = AnimTurn, args = {hog1, "Right"}})
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   724
  end
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   725
end
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   726
15069
d131ec7be850 ACF3: Clean up start up sequences a bit
Wuzzy <Wuzzy2@mail.ru>
parents: 15050
diff changeset
   727
function NeedToTurn(hog1, hog2)
d131ec7be850 ACF3: Clean up start up sequences a bit
Wuzzy <Wuzzy2@mail.ru>
parents: 15050
diff changeset
   728
  local xl, xd = GetX(hog1), GetX(hog2)
d131ec7be850 ACF3: Clean up start up sequences a bit
Wuzzy <Wuzzy2@mail.ru>
parents: 15050
diff changeset
   729
  if xl > xd then
d131ec7be850 ACF3: Clean up start up sequences a bit
Wuzzy <Wuzzy2@mail.ru>
parents: 15050
diff changeset
   730
    AnimTurn(hog1, "Left")
d131ec7be850 ACF3: Clean up start up sequences a bit
Wuzzy <Wuzzy2@mail.ru>
parents: 15050
diff changeset
   731
    AnimTurn(hog2, "Right")
d131ec7be850 ACF3: Clean up start up sequences a bit
Wuzzy <Wuzzy2@mail.ru>
parents: 15050
diff changeset
   732
  elseif xl < xd then
d131ec7be850 ACF3: Clean up start up sequences a bit
Wuzzy <Wuzzy2@mail.ru>
parents: 15050
diff changeset
   733
    AnimTurn(hog2, "Left")
d131ec7be850 ACF3: Clean up start up sequences a bit
Wuzzy <Wuzzy2@mail.ru>
parents: 15050
diff changeset
   734
    AnimTurn(hog1, "Right")
d131ec7be850 ACF3: Clean up start up sequences a bit
Wuzzy <Wuzzy2@mail.ru>
parents: 15050
diff changeset
   735
  end
d131ec7be850 ACF3: Clean up start up sequences a bit
Wuzzy <Wuzzy2@mail.ru>
parents: 15050
diff changeset
   736
end
d131ec7be850 ACF3: Clean up start up sequences a bit
Wuzzy <Wuzzy2@mail.ru>
parents: 15050
diff changeset
   737
7215
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   738
function SetupPlaceAlone()
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   739
  ------ AMMO CRATE LIST ------
12933
e65aa3c3d4e6 Refactor scripts to use SpawnSupplyCrate (where it makes sense)
Wuzzy <Wuzzy2@mail.ru>
parents: 12905
diff changeset
   740
  SpawnSupplyCrate(3124, 952, amBaseballBat)
e65aa3c3d4e6 Refactor scripts to use SpawnSupplyCrate (where it makes sense)
Wuzzy <Wuzzy2@mail.ru>
parents: 12905
diff changeset
   741
  SpawnSupplyCrate(2508, 1110, amFirePunch)
7215
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   742
  ------ UTILITY CRATE LIST ------
12933
e65aa3c3d4e6 Refactor scripts to use SpawnSupplyCrate (where it makes sense)
Wuzzy <Wuzzy2@mail.ru>
parents: 12905
diff changeset
   743
  blowCrate = SpawnSupplyCrate(3675, 1480, amBlowTorch)
e65aa3c3d4e6 Refactor scripts to use SpawnSupplyCrate (where it makes sense)
Wuzzy <Wuzzy2@mail.ru>
parents: 12905
diff changeset
   744
  gravityCrate = SpawnSupplyCrate(3448, 1349, amLowGravity)
e65aa3c3d4e6 Refactor scripts to use SpawnSupplyCrate (where it makes sense)
Wuzzy <Wuzzy2@mail.ru>
parents: 12905
diff changeset
   745
  SpawnSupplyCrate(3212, 1256, amGirder)
e65aa3c3d4e6 Refactor scripts to use SpawnSupplyCrate (where it makes sense)
Wuzzy <Wuzzy2@mail.ru>
parents: 12905
diff changeset
   746
  SpawnSupplyCrate(3113, 911, amParachute)
e65aa3c3d4e6 Refactor scripts to use SpawnSupplyCrate (where it makes sense)
Wuzzy <Wuzzy2@mail.ru>
parents: 12905
diff changeset
   747
  sniperCrate = SpawnSupplyCrate(784, 1715, amSniperRifle)
7215
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   748
  ------ MINE LIST ------
12380
1eaef4b1b3c1 ACF, mission 3: Standardize mine times. 3s if alone, 5s if playing with 2 hogs
Wuzzy <almikes@aol.com>
parents: 12379
diff changeset
   749
  AddGear(3328, 1399, gtMine, 0, 0, 0, 0)
1eaef4b1b3c1 ACF, mission 3: Standardize mine times. 3s if alone, 5s if playing with 2 hogs
Wuzzy <almikes@aol.com>
parents: 12379
diff changeset
   750
  AddGear(3028, 1262, gtMine, 0, 0, 0, 0)
1eaef4b1b3c1 ACF, mission 3: Standardize mine times. 3s if alone, 5s if playing with 2 hogs
Wuzzy <almikes@aol.com>
parents: 12379
diff changeset
   751
  AddGear(2994, 1274, gtMine, 0, 0, 0, 0)
1eaef4b1b3c1 ACF, mission 3: Standardize mine times. 3s if alone, 5s if playing with 2 hogs
Wuzzy <almikes@aol.com>
parents: 12379
diff changeset
   752
  AddGear(2956, 1277, gtMine, 0, 0, 0, 0)
1eaef4b1b3c1 ACF, mission 3: Standardize mine times. 3s if alone, 5s if playing with 2 hogs
Wuzzy <almikes@aol.com>
parents: 12379
diff changeset
   753
  AddGear(2925, 1282, gtMine, 0, 0, 0, 0)
1eaef4b1b3c1 ACF, mission 3: Standardize mine times. 3s if alone, 5s if playing with 2 hogs
Wuzzy <almikes@aol.com>
parents: 12379
diff changeset
   754
  AddGear(2838, 1276, gtMine, 0, 0, 0, 0)
1eaef4b1b3c1 ACF, mission 3: Standardize mine times. 3s if alone, 5s if playing with 2 hogs
Wuzzy <almikes@aol.com>
parents: 12379
diff changeset
   755
  AddGear(2822, 1278, gtMine, 0, 0, 0, 0)
1eaef4b1b3c1 ACF, mission 3: Standardize mine times. 3s if alone, 5s if playing with 2 hogs
Wuzzy <almikes@aol.com>
parents: 12379
diff changeset
   756
  AddGear(2786, 1283, gtMine, 0, 0, 0, 0)
1eaef4b1b3c1 ACF, mission 3: Standardize mine times. 3s if alone, 5s if playing with 2 hogs
Wuzzy <almikes@aol.com>
parents: 12379
diff changeset
   757
  AddGear(2766, 1270, gtMine, 0, 0, 0, 0)
1eaef4b1b3c1 ACF, mission 3: Standardize mine times. 3s if alone, 5s if playing with 2 hogs
Wuzzy <almikes@aol.com>
parents: 12379
diff changeset
   758
  AddGear(2749, 1231, gtMine, 0, 0, 0, 0)
1eaef4b1b3c1 ACF, mission 3: Standardize mine times. 3s if alone, 5s if playing with 2 hogs
Wuzzy <almikes@aol.com>
parents: 12379
diff changeset
   759
  AddGear(2717, 1354, gtMine, 0, 0, 0, 0)
1eaef4b1b3c1 ACF, mission 3: Standardize mine times. 3s if alone, 5s if playing with 2 hogs
Wuzzy <almikes@aol.com>
parents: 12379
diff changeset
   760
  AddGear(2167, 1330, gtMine, 0, 0, 0, 0)
1eaef4b1b3c1 ACF, mission 3: Standardize mine times. 3s if alone, 5s if playing with 2 hogs
Wuzzy <almikes@aol.com>
parents: 12379
diff changeset
   761
  AddGear(2201, 1321, gtMine, 0, 0, 0, 0)
1eaef4b1b3c1 ACF, mission 3: Standardize mine times. 3s if alone, 5s if playing with 2 hogs
Wuzzy <almikes@aol.com>
parents: 12379
diff changeset
   762
  AddGear(2239, 1295, gtMine, 0, 0, 0, 0)
7215
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   763
7448
d0521a3a4358 Solved "floating repositionings" in every mission
belphegorr <szabibibi@gmail.com>
parents: 7261
diff changeset
   764
  AnimSetGearPosition(leaks, 3781, 1583)
15070
6fc8f0a2929d ACF3: Simplify infinite shoryuken crate
Wuzzy <Wuzzy2@mail.ru>
parents: 15069
diff changeset
   765
  AddAmmo(cannibals[1], amShotgun, AMMO_INFINITE)
7236
378fc97dae99 Reduced number of crates on the challenge in mission 1, fixed an error with mission 3 (at the end)
belphegorr <szabibibi@gmail.com>
parents: 7228
diff changeset
   766
  AddAmmo(leaks, amSwitch, 0)
7215
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   767
end
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   768
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   769
function SetupPlaceDuo()
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   770
  PlaceCratesDuo()
7448
d0521a3a4358 Solved "floating repositionings" in every mission
belphegorr <szabibibi@gmail.com>
parents: 7261
diff changeset
   771
  AnimSetGearPosition(leaks, unpack(startLeaksPosDuo))
d0521a3a4358 Solved "floating repositionings" in every mission
belphegorr <szabibibi@gmail.com>
parents: 7261
diff changeset
   772
  AnimSetGearPosition(dense, unpack(startDensePosDuo))
7215
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   773
end
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   774
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   775
function SetupEventsDuo()
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   776
  AddEvent(CheckPastFlower, {}, DoPastFlower, {}, 0)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   777
  AddEvent(CheckLeaksDead, {}, DoLeaksDead, {}, 0)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   778
  AddEvent(CheckDenseDead, {}, DoDenseDead, {}, 0)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   779
  AddEvent(CheckTookSniper2, {}, DoTookSniper2, {}, 0)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   780
end
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   781
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   782
function SetupEventsAlone()
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   783
  AddEvent(CheckLeaksDead, {}, DoLeaksDead, {}, 0)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   784
  AddEvent(CheckTookBlowTorch, {}, DoTookBlowTorch, {}, 0)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   785
  AddEvent(CheckTookLowGravity, {}, DoTookLowGravity, {}, 0)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   786
  AddEvent(CheckOnBridge, {}, DoOnBridge, {}, 0)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   787
end
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   788
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   789
function StartMission()
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   790
  if m2DenseDead == 1 then
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   791
    DeleteGear(dense)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   792
    if m2Choice == choiceAccepted then
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   793
      SetupAnimAcceptedDied()
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   794
    elseif m2Choice == choiceRefused then
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   795
      SetupAnimRefusedDied()
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   796
    else
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   797
      SetupAnimAttacked()
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   798
    end
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   799
    SetupPlaceAlone()
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   800
    SetupEventsAlone()
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   801
  else
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   802
    if m2Choice == choiceAccepted then
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   803
      SetupAnimAcceptedLived()
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   804
    else
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   805
      SetupAnimRefusedLived()
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   806
    end
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   807
    SetupPlaceDuo()
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   808
    SetupEventsDuo()
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   809
  end
7502
16c36f62247b Solved issues with HideHog in mission 2 and 3
belphegorr <szabibibi@gmail.com>
parents: 7448
diff changeset
   810
  HideHedge(cyborg)
16c36f62247b Solved issues with HideHog in mission 2 and 3
belphegorr <szabibibi@gmail.com>
parents: 7448
diff changeset
   811
  HideHedge(princess)
7261
158f8fb74ded Placed hiding hogs at the end of StartMission in Mission 3
belphegorr <szabibibi@gmail.com>
parents: 7245
diff changeset
   812
  for i = 5, 8 do
7502
16c36f62247b Solved issues with HideHog in mission 2 and 3
belphegorr <szabibibi@gmail.com>
parents: 7448
diff changeset
   813
    HideHedge(cannibals[i])
7261
158f8fb74ded Placed hiding hogs at the end of StartMission in Mission 3
belphegorr <szabibibi@gmail.com>
parents: 7245
diff changeset
   814
  end
158f8fb74ded Placed hiding hogs at the end of StartMission in Mission 3
belphegorr <szabibibi@gmail.com>
parents: 7245
diff changeset
   815
7215
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   816
end
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   817
  
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   818
function SetupCourse()
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   819
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   820
  ------ GIRDER LIST ------
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   821
  PlaceGirder(1091, 1150, 6)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   822
  PlaceGirder(1091, 989, 6)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   823
  PlaceGirder(1091, 829, 6)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   824
  PlaceGirder(1091, 669, 6)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   825
  PlaceGirder(1091, 668, 6)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   826
  PlaceGirder(1091, 669, 6)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   827
  PlaceGirder(1088, 667, 6)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   828
  PlaceGirder(1091, 658, 6)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   829
  PlaceGirder(1091, 646, 6)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   830
  PlaceGirder(1091, 607, 6)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   831
  PlaceGirder(1091, 571, 6)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   832
  PlaceGirder(1376, 821, 6)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   833
  PlaceGirder(1145, 1192, 1)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   834
  PlaceGirder(1169, 1076, 3)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   835
  PlaceGirder(1351, 1082, 4)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   836
  PlaceGirder(1469, 987, 3)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   837
  PlaceGirder(1386, 951, 0)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   838
  PlaceGirder(1465, 852, 3)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   839
  PlaceGirder(1630, 913, 0)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   840
  PlaceGirder(1733, 856, 7)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   841
  PlaceGirder(1688, 713, 5)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   842
  PlaceGirder(1556, 696, 2)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   843
  PlaceGirder(1525, 696, 2)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   844
  PlaceGirder(1457, 697, 2)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   845
  PlaceGirder(1413, 700, 3)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   846
  PlaceGirder(1270, 783, 2)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   847
  PlaceGirder(1207, 825, 2)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   848
  PlaceGirder(1135, 775, 1)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   849
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   850
  ------ UTILITY CRATE LIST ------
12933
e65aa3c3d4e6 Refactor scripts to use SpawnSupplyCrate (where it makes sense)
Wuzzy <Wuzzy2@mail.ru>
parents: 12905
diff changeset
   851
  SpawnSupplyCrate(1590, 628, amParachute)
e65aa3c3d4e6 Refactor scripts to use SpawnSupplyCrate (where it makes sense)
Wuzzy <Wuzzy2@mail.ru>
parents: 12905
diff changeset
   852
  SpawnSupplyCrate(1540, 100, amDynamite)
e65aa3c3d4e6 Refactor scripts to use SpawnSupplyCrate (where it makes sense)
Wuzzy <Wuzzy2@mail.ru>
parents: 12905
diff changeset
   853
  SpawnSupplyCrate(2175, 1815, amLowGravity)
e65aa3c3d4e6 Refactor scripts to use SpawnSupplyCrate (where it makes sense)
Wuzzy <Wuzzy2@mail.ru>
parents: 12905
diff changeset
   854
  SpawnSupplyCrate(2210, 1499, amFirePunch)
e65aa3c3d4e6 Refactor scripts to use SpawnSupplyCrate (where it makes sense)
Wuzzy <Wuzzy2@mail.ru>
parents: 12905
diff changeset
   855
  girderCrate = SpawnSupplyCrate(2300, 1663, amGirder)
e65aa3c3d4e6 Refactor scripts to use SpawnSupplyCrate (where it makes sense)
Wuzzy <Wuzzy2@mail.ru>
parents: 12905
diff changeset
   856
  SpawnSupplyCrate(610, 1394, amPickHammer)
7215
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   857
  
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   858
  ------ BARREL LIST ------
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   859
  SetHealth(AddGear(1148, 736, gtExplosives, 0, 0, 0, 0), 20)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   860
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   861
end
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   862
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   863
function PlaceCourseMines()
12380
1eaef4b1b3c1 ACF, mission 3: Standardize mine times. 3s if alone, 5s if playing with 2 hogs
Wuzzy <almikes@aol.com>
parents: 12379
diff changeset
   864
  AddGear(1215, 1193, gtMine, 0, 0, 0, 0)
1eaef4b1b3c1 ACF, mission 3: Standardize mine times. 3s if alone, 5s if playing with 2 hogs
Wuzzy <almikes@aol.com>
parents: 12379
diff changeset
   865
  AddGear(1259, 1199, gtMine, 0, 0, 0, 0)
1eaef4b1b3c1 ACF, mission 3: Standardize mine times. 3s if alone, 5s if playing with 2 hogs
Wuzzy <almikes@aol.com>
parents: 12379
diff changeset
   866
  AddGear(1310, 1198, gtMine, 0, 0, 0, 0)
1eaef4b1b3c1 ACF, mission 3: Standardize mine times. 3s if alone, 5s if playing with 2 hogs
Wuzzy <almikes@aol.com>
parents: 12379
diff changeset
   867
  AddGear(1346, 1196, gtMine, 0, 0, 0, 0)
1eaef4b1b3c1 ACF, mission 3: Standardize mine times. 3s if alone, 5s if playing with 2 hogs
Wuzzy <almikes@aol.com>
parents: 12379
diff changeset
   868
  AddGear(1383, 1192, gtMine, 0, 0, 0, 0)
1eaef4b1b3c1 ACF, mission 3: Standardize mine times. 3s if alone, 5s if playing with 2 hogs
Wuzzy <almikes@aol.com>
parents: 12379
diff changeset
   869
  AddGear(1436, 1196, gtMine, 0, 0, 0, 0)
1eaef4b1b3c1 ACF, mission 3: Standardize mine times. 3s if alone, 5s if playing with 2 hogs
Wuzzy <almikes@aol.com>
parents: 12379
diff changeset
   870
  AddGear(1487, 1199, gtMine, 0, 0, 0, 0)
1eaef4b1b3c1 ACF, mission 3: Standardize mine times. 3s if alone, 5s if playing with 2 hogs
Wuzzy <almikes@aol.com>
parents: 12379
diff changeset
   871
  AddGear(1651, 1209, gtMine, 0, 0, 0, 0)
1eaef4b1b3c1 ACF, mission 3: Standardize mine times. 3s if alone, 5s if playing with 2 hogs
Wuzzy <almikes@aol.com>
parents: 12379
diff changeset
   872
  AddGear(1708, 1209, gtMine, 0, 0, 0, 0)
1eaef4b1b3c1 ACF, mission 3: Standardize mine times. 3s if alone, 5s if playing with 2 hogs
Wuzzy <almikes@aol.com>
parents: 12379
diff changeset
   873
  AddGear(1759, 1190, gtMine, 0, 0, 0, 0)
1eaef4b1b3c1 ACF, mission 3: Standardize mine times. 3s if alone, 5s if playing with 2 hogs
Wuzzy <almikes@aol.com>
parents: 12379
diff changeset
   874
  AddGear(1815, 1184, gtMine, 0, 0, 0, 0)
7215
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   875
end
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   876
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   877
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   878
--////////////////////////////Event Functions////////////////////////
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   879
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   880
function CheckDensePit()
12372
35e76306b016 ACF, mission 3: Fix Lua error spam when Dense Cloud dies in the pit sequence
Wuzzy <almikes@aol.com>
parents: 12263
diff changeset
   881
  if GetHealth(dense) ~= nil then
35e76306b016 ACF, mission 3: Fix Lua error spam when Dense Cloud dies in the pit sequence
Wuzzy <almikes@aol.com>
parents: 12263
diff changeset
   882
    return GetY(dense) < 1250 and StoppedGear(dense)
35e76306b016 ACF, mission 3: Fix Lua error spam when Dense Cloud dies in the pit sequence
Wuzzy <almikes@aol.com>
parents: 12263
diff changeset
   883
  else
35e76306b016 ACF, mission 3: Fix Lua error spam when Dense Cloud dies in the pit sequence
Wuzzy <almikes@aol.com>
parents: 12263
diff changeset
   884
    return false
35e76306b016 ACF, mission 3: Fix Lua error spam when Dense Cloud dies in the pit sequence
Wuzzy <almikes@aol.com>
parents: 12263
diff changeset
   885
  end
7215
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   886
end
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   887
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   888
function DoDensePit()
14633
bd15c8551318 Make use of passive teams in various campaign missions
Wuzzy <Wuzzy2@mail.ru>
parents: 14508
diff changeset
   889
  EndTurn(true)
7514
8699d501a01e Fixed crashes in mission 3 after RestoreHog
belphegorr <szabibibi@gmail.com>
parents: 7512
diff changeset
   890
  RestoreHedge(cyborg)
8699d501a01e Fixed crashes in mission 3 after RestoreHog
belphegorr <szabibibi@gmail.com>
parents: 7512
diff changeset
   891
  AnimWait(cyborg, 1)
8699d501a01e Fixed crashes in mission 3 after RestoreHog
belphegorr <szabibibi@gmail.com>
parents: 7512
diff changeset
   892
  AddFunction({func = AddAnim, args = {outPitAnim}})
8699d501a01e Fixed crashes in mission 3 after RestoreHog
belphegorr <szabibibi@gmail.com>
parents: 7512
diff changeset
   893
  AddFunction({func = AddFunction, args = {{func = AfterOutPitAnim, args = {}}}})
7215
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   894
end
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   895
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   896
function CheckPastFlower()
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   897
  if denseDead == true or leaksDead == true then
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   898
    return false
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   899
  end
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   900
  return (GetX(dense) < startEventXDuo and StoppedGear(dense))
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   901
      or (GetX(leaks) < startEventXDuo and StoppedGear(leaks))
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   902
end
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   903
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   904
function DoPastFlower()
12375
3126214d0e7d ACF, mission 3: Fix victory causing a lot of loser message being displayed. Also add EndTurn()
Wuzzy <almikes@aol.com>
parents: 12374
diff changeset
   905
  EndTurn(true)
7514
8699d501a01e Fixed crashes in mission 3 after RestoreHog
belphegorr <szabibibi@gmail.com>
parents: 7512
diff changeset
   906
  RestoreHedge(cyborg)
8699d501a01e Fixed crashes in mission 3 after RestoreHog
belphegorr <szabibibi@gmail.com>
parents: 7512
diff changeset
   907
  AnimWait(cyborg, 1)
8699d501a01e Fixed crashes in mission 3 after RestoreHog
belphegorr <szabibibi@gmail.com>
parents: 7512
diff changeset
   908
  AddFunction({func = AddAnim, args = {pastFlowerAnim}})
8699d501a01e Fixed crashes in mission 3 after RestoreHog
belphegorr <szabibibi@gmail.com>
parents: 7512
diff changeset
   909
  AddFunction({func = AddFunction, args = {{func = AfterPastFlowerAnim, args = {}}}})
7215
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   910
end
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   911
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   912
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   913
function CheckLeaksDead()
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   914
  return leaksDead
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   915
end
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   916
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   917
function DoLeaksDead()
12379
eb11e1bc7547 ACF, mission 3: Fix player not losing properly after killing princess
Wuzzy <almikes@aol.com>
parents: 12378
diff changeset
   918
  if not princessDead then
eb11e1bc7547 ACF, mission 3: Fix player not losing properly after killing princess
Wuzzy <almikes@aol.com>
parents: 12378
diff changeset
   919
    EndTurn(true)
eb11e1bc7547 ACF, mission 3: Fix player not losing properly after killing princess
Wuzzy <almikes@aol.com>
parents: 12378
diff changeset
   920
    AddCaption(loc("The village, unprepared, was destroyed by the cyborgs..."))
14506
f37910a73c19 Refactor ACF missions, store team names in variables
Wuzzy <Wuzzy2@mail.ru>
parents: 14465
diff changeset
   921
    DismissTeam(nativesTeamName)
f37910a73c19 Refactor ACF missions, store team names in variables
Wuzzy <Wuzzy2@mail.ru>
parents: 14465
diff changeset
   922
    DismissTeam(princessTeamName)
12379
eb11e1bc7547 ACF, mission 3: Fix player not losing properly after killing princess
Wuzzy <almikes@aol.com>
parents: 12378
diff changeset
   923
  end
7215
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   924
end
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   925
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   926
function CheckDenseDead()
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   927
  return denseDead
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   928
end
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   929
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   930
function DoDenseDead()
12379
eb11e1bc7547 ACF, mission 3: Fix player not losing properly after killing princess
Wuzzy <almikes@aol.com>
parents: 12378
diff changeset
   931
  if not princessDead then
eb11e1bc7547 ACF, mission 3: Fix player not losing properly after killing princess
Wuzzy <almikes@aol.com>
parents: 12378
diff changeset
   932
    EndTurn(true)
eb11e1bc7547 ACF, mission 3: Fix player not losing properly after killing princess
Wuzzy <almikes@aol.com>
parents: 12378
diff changeset
   933
    AddCaption(loc("The village, unprepared, was destroyed by the cyborgs..."))
14506
f37910a73c19 Refactor ACF missions, store team names in variables
Wuzzy <Wuzzy2@mail.ru>
parents: 14465
diff changeset
   934
    DismissTeam(nativesTeamName)
f37910a73c19 Refactor ACF missions, store team names in variables
Wuzzy <Wuzzy2@mail.ru>
parents: 14465
diff changeset
   935
    DismissTeam(princessTeamName)
12379
eb11e1bc7547 ACF, mission 3: Fix player not losing properly after killing princess
Wuzzy <almikes@aol.com>
parents: 12378
diff changeset
   936
  end
7215
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   937
end
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   938
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   939
function CheckTookBlowTorch()
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   940
  return blowTaken
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   941
end
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   942
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   943
function DoTookBlowTorch()
12381
6af2b5406419 ACF, mission 3: Add mission strings to remind the player of the main goal
Wuzzy <almikes@aol.com>
parents: 12380
diff changeset
   944
  ShowMission(loc("The Journey Back"), loc("The Tunnel Maker"), 
6af2b5406419 ACF, mission 3: Add mission strings to remind the player of the main goal
Wuzzy <almikes@aol.com>
parents: 12380
diff changeset
   945
    loc("Get past the flower.").."|"..
6af2b5406419 ACF, mission 3: Add mission strings to remind the player of the main goal
Wuzzy <almikes@aol.com>
parents: 12380
diff changeset
   946
    loc("Hint: Select the blow torch, aim and press [Fire]. Press [Fire] again to stop.").."|"..
15089
6f51c75994a4 Semi-standardize usage of icons in many mission panels
Wuzzy <Wuzzy2@mail.ru>
parents: 15071
diff changeset
   947
    loc("Don't blow up the crate."), 2, 6000)
7215
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   948
end
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   949
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   950
function CheckTookLowGravity()
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   951
  return gravityTaken
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   952
end
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   953
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   954
function DoTookLowGravity()
12380
1eaef4b1b3c1 ACF, mission 3: Standardize mine times. 3s if alone, 5s if playing with 2 hogs
Wuzzy <almikes@aol.com>
parents: 12379
diff changeset
   955
  ShowMission(loc("The Journey Back"), loc("The Moonwalk"),
12381
6af2b5406419 ACF, mission 3: Add mission strings to remind the player of the main goal
Wuzzy <almikes@aol.com>
parents: 12380
diff changeset
   956
    loc("Hop on top of the next flower and advance to the left coast.").."|"..
12380
1eaef4b1b3c1 ACF, mission 3: Standardize mine times. 3s if alone, 5s if playing with 2 hogs
Wuzzy <almikes@aol.com>
parents: 12379
diff changeset
   957
    loc("Hint: Select the low gravity and press [Fire].") .. "|" ..
15089
6f51c75994a4 Semi-standardize usage of icons in many mission panels
Wuzzy <Wuzzy2@mail.ru>
parents: 15071
diff changeset
   958
    loc("Beware of mines: They explode after 3 seconds."), 2, 6000)
7215
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   959
end
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   960
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   961
function CheckOnBridge()
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   962
  return leaksDead == false and GetX(leaks) < 1651 and StoppedGear(leaks)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   963
end
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   964
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   965
function DoOnBridge()
12375
3126214d0e7d ACF, mission 3: Fix victory causing a lot of loser message being displayed. Also add EndTurn()
Wuzzy <almikes@aol.com>
parents: 12374
diff changeset
   966
  EndTurn(true)
7514
8699d501a01e Fixed crashes in mission 3 after RestoreHog
belphegorr <szabibibi@gmail.com>
parents: 7512
diff changeset
   967
  RestoreHedge(cyborg)
8699d501a01e Fixed crashes in mission 3 after RestoreHog
belphegorr <szabibibi@gmail.com>
parents: 7512
diff changeset
   968
  RestoreHedge(princess)
8699d501a01e Fixed crashes in mission 3 after RestoreHog
belphegorr <szabibibi@gmail.com>
parents: 7512
diff changeset
   969
  AnimWait(cyborg, 1)
8699d501a01e Fixed crashes in mission 3 after RestoreHog
belphegorr <szabibibi@gmail.com>
parents: 7512
diff changeset
   970
  AddFunction({func = AddAnim, args = {midAnim}})
8699d501a01e Fixed crashes in mission 3 after RestoreHog
belphegorr <szabibibi@gmail.com>
parents: 7512
diff changeset
   971
  AddFunction({func = AddFunction, args = {{func = AfterMidAnimAlone, args = {}}}})
7215
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   972
end
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   973
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   974
function CheckOnFirstGirder()
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   975
  return leaksDead == false and GetX(leaks) < 1160 and StoppedGear(leaks)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   976
end
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   977
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   978
function DoOnFirstGirder()
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   979
  PlaceCourseMines()
12381
6af2b5406419 ACF, mission 3: Add mission strings to remind the player of the main goal
Wuzzy <almikes@aol.com>
parents: 12380
diff changeset
   980
  ShowMission(loc("The Journey Back"), loc("Slippery"), 
6af2b5406419 ACF, mission 3: Add mission strings to remind the player of the main goal
Wuzzy <almikes@aol.com>
parents: 12380
diff changeset
   981
    loc("Collect the weapon crate at the left coast!") .. "|" ..
12797
981036f1bdef ACF3: Mention mines time in a sequence where it has been forgotten
Wuzzy <Wuzzy2@mail.ru>
parents: 12794
diff changeset
   982
    loc("You'd better watch your steps...") .. "|" ..
15089
6f51c75994a4 Semi-standardize usage of icons in many mission panels
Wuzzy <Wuzzy2@mail.ru>
parents: 15071
diff changeset
   983
    loc("Mines time: 3 seconds"), 7, 4000)
7215
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   984
end
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   985
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   986
function CheckTookSniper()
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   987
  return sniperTaken and StoppedGear(leaks)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   988
end
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   989
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   990
function DoTookSniper()
12375
3126214d0e7d ACF, mission 3: Fix victory causing a lot of loser message being displayed. Also add EndTurn()
Wuzzy <almikes@aol.com>
parents: 12374
diff changeset
   991
  EndTurn(true)
7514
8699d501a01e Fixed crashes in mission 3 after RestoreHog
belphegorr <szabibibi@gmail.com>
parents: 7512
diff changeset
   992
  RestoreHedge(cyborg)
8699d501a01e Fixed crashes in mission 3 after RestoreHog
belphegorr <szabibibi@gmail.com>
parents: 7512
diff changeset
   993
  RestoreHedge(princess)
8699d501a01e Fixed crashes in mission 3 after RestoreHog
belphegorr <szabibibi@gmail.com>
parents: 7512
diff changeset
   994
  AnimWait(cyborg, 1)
8699d501a01e Fixed crashes in mission 3 after RestoreHog
belphegorr <szabibibi@gmail.com>
parents: 7512
diff changeset
   995
  AddFunction({func = AddAnim, args = {endAnim}})
8699d501a01e Fixed crashes in mission 3 after RestoreHog
belphegorr <szabibibi@gmail.com>
parents: 7512
diff changeset
   996
  AddFunction({func = AddFunction, args = {{func = AfterEndAnimAlone, args = {}}}})
7215
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   997
end
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   998
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   999
function CheckTookSniper2()
15050
09c63d4bcf53 ACF: Add some checks before calling StoppedGear
Wuzzy <Wuzzy2@mail.ru>
parents: 15023
diff changeset
  1000
  return sniperTaken and leaksDead == false and StoppedGear(leaks) and denseDead == false and StoppedGear(dense)
7215
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
  1001
end
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
  1002
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
  1003
function DoTookSniper2()
12375
3126214d0e7d ACF, mission 3: Fix victory causing a lot of loser message being displayed. Also add EndTurn()
Wuzzy <almikes@aol.com>
parents: 12374
diff changeset
  1004
  EndTurn(true)
7514
8699d501a01e Fixed crashes in mission 3 after RestoreHog
belphegorr <szabibibi@gmail.com>
parents: 7512
diff changeset
  1005
  RestoreHedge(cyborg)
8699d501a01e Fixed crashes in mission 3 after RestoreHog
belphegorr <szabibibi@gmail.com>
parents: 7512
diff changeset
  1006
  RestoreHedge(princess)
8699d501a01e Fixed crashes in mission 3 after RestoreHog
belphegorr <szabibibi@gmail.com>
parents: 7512
diff changeset
  1007
  AnimWait(cyborg, 1)
8699d501a01e Fixed crashes in mission 3 after RestoreHog
belphegorr <szabibibi@gmail.com>
parents: 7512
diff changeset
  1008
  AddFunction({func = AddAnim, args = {endAnim}})
8699d501a01e Fixed crashes in mission 3 after RestoreHog
belphegorr <szabibibi@gmail.com>
parents: 7512
diff changeset
  1009
  AddFunction({func = AddFunction, args = {{func = AfterEndAnimDuo, args = {}}}})
7215
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
  1010
end
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
  1011
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
  1012
function CheckLost()
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
  1013
  return princessDead
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
  1014
end
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
  1015
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
  1016
function DoLost()
12379
eb11e1bc7547 ACF, mission 3: Fix player not losing properly after killing princess
Wuzzy <almikes@aol.com>
parents: 12378
diff changeset
  1017
  if not cyborgDead then
eb11e1bc7547 ACF, mission 3: Fix player not losing properly after killing princess
Wuzzy <almikes@aol.com>
parents: 12378
diff changeset
  1018
    SwitchHog(cyborg)
eb11e1bc7547 ACF, mission 3: Fix player not losing properly after killing princess
Wuzzy <almikes@aol.com>
parents: 12378
diff changeset
  1019
  end
15071
ce3efc9cc6d3 ACF3: Fix princess-in-cage scene: Princess did not die
Wuzzy <Wuzzy2@mail.ru>
parents: 15070
diff changeset
  1020
  if (not (leaksDead or denseDead)) and (TurnsLeft > 0)  then
13473
1515e643cd91 ACF3: Move princess to her own team, fix clan color
Wuzzy <Wuzzy2@mail.ru>
parents: 13145
diff changeset
  1021
    AddAnim(endFailAnim)
1515e643cd91 ACF3: Move princess to her own team, fix clan color
Wuzzy <Wuzzy2@mail.ru>
parents: 13145
diff changeset
  1022
  end
14506
f37910a73c19 Refactor ACF missions, store team names in variables
Wuzzy <Wuzzy2@mail.ru>
parents: 14465
diff changeset
  1023
  AddFunction({func = DismissTeam, args = {nativesTeamName}})
f37910a73c19 Refactor ACF missions, store team names in variables
Wuzzy <Wuzzy2@mail.ru>
parents: 14465
diff changeset
  1024
  AddFunction({func = DismissTeam, args = {princessTeamName}})
12379
eb11e1bc7547 ACF, mission 3: Fix player not losing properly after killing princess
Wuzzy <almikes@aol.com>
parents: 12378
diff changeset
  1025
  AddFunction({func = EndTurn, args = {true}})
7215
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
  1026
end
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
  1027
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
  1028
function CheckWon()
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
  1029
  return cyborgDead and not princessDead
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
  1030
end
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
  1031
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
  1032
function DoWon()
12375
3126214d0e7d ACF, mission 3: Fix victory causing a lot of loser message being displayed. Also add EndTurn()
Wuzzy <almikes@aol.com>
parents: 12374
diff changeset
  1033
  victory = true
8944
ed2509832311 fix bug that locked unlocked campaign missions, see issue 452
Periklis Ntanasis <pntanasis@gmail.com>
parents: 8043
diff changeset
  1034
  if progress and progress<3 then
ed2509832311 fix bug that locked unlocked campaign missions, see issue 452
Periklis Ntanasis <pntanasis@gmail.com>
parents: 8043
diff changeset
  1035
    SaveCampaignVar("Progress", "3")
ed2509832311 fix bug that locked unlocked campaign missions, see issue 452
Periklis Ntanasis <pntanasis@gmail.com>
parents: 8043
diff changeset
  1036
  end
7215
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
  1037
  AddAnim(winAnim)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
  1038
  AddFunction({func = FinishWon, args = {}})
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
  1039
end
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
  1040
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
  1041
function FinishWon()
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
  1042
  SwitchHog(leaks)
14506
f37910a73c19 Refactor ACF missions, store team names in variables
Wuzzy <Wuzzy2@mail.ru>
parents: 14465
diff changeset
  1043
  DismissTeam(cannibalsTeamName)
f37910a73c19 Refactor ACF missions, store team names in variables
Wuzzy <Wuzzy2@mail.ru>
parents: 14465
diff changeset
  1044
  DismissTeam(cyborgTeamName)
12375
3126214d0e7d ACF, mission 3: Fix victory causing a lot of loser message being displayed. Also add EndTurn()
Wuzzy <almikes@aol.com>
parents: 12374
diff changeset
  1045
  EndTurn(true)
7215
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
  1046
end
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
  1047
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
  1048
function CheckFailedCourse()
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
  1049
  return TurnsLeft == 0
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
  1050
end
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
  1051
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
  1052
function DoFailedCourse()
12375
3126214d0e7d ACF, mission 3: Fix victory causing a lot of loser message being displayed. Also add EndTurn()
Wuzzy <almikes@aol.com>
parents: 12374
diff changeset
  1053
  EndTurn(true)
7514
8699d501a01e Fixed crashes in mission 3 after RestoreHog
belphegorr <szabibibi@gmail.com>
parents: 7512
diff changeset
  1054
  RestoreHedge(cyborg)
8699d501a01e Fixed crashes in mission 3 after RestoreHog
belphegorr <szabibibi@gmail.com>
parents: 7512
diff changeset
  1055
  RestoreHedge(princess)
8699d501a01e Fixed crashes in mission 3 after RestoreHog
belphegorr <szabibibi@gmail.com>
parents: 7512
diff changeset
  1056
  AnimWait(cyborg, 1)
8699d501a01e Fixed crashes in mission 3 after RestoreHog
belphegorr <szabibibi@gmail.com>
parents: 7512
diff changeset
  1057
  AddFunction({func = AddAnim, args = {failAnim}})
8699d501a01e Fixed crashes in mission 3 after RestoreHog
belphegorr <szabibibi@gmail.com>
parents: 7512
diff changeset
  1058
  AddFunction({func = AddFunction, args = {{func = AfterMidFailAnim, args = {}}}})
15071
ce3efc9cc6d3 ACF3: Fix princess-in-cage scene: Princess did not die
Wuzzy <Wuzzy2@mail.ru>
parents: 15070
diff changeset
  1059
  AddEvent(CheckLost, {}, DoLost, {})
7215
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
  1060
end
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
  1061
12905
06791c62c759 ACF3: Explode princess when skipping 12turn course failanim
Wuzzy <Wuzzy2@mail.ru>
parents: 12904
diff changeset
  1062
function SkipFailAnimAlone()
06791c62c759 ACF3: Explode princess when skipping 12turn course failanim
Wuzzy <Wuzzy2@mail.ru>
parents: 12904
diff changeset
  1063
  DumpMines(1)
06791c62c759 ACF3: Explode princess when skipping 12turn course failanim
Wuzzy <Wuzzy2@mail.ru>
parents: 12904
diff changeset
  1064
  KillPrincess()
06791c62c759 ACF3: Explode princess when skipping 12turn course failanim
Wuzzy <Wuzzy2@mail.ru>
parents: 12904
diff changeset
  1065
  AnimSwitchHog(princess)
06791c62c759 ACF3: Explode princess when skipping 12turn course failanim
Wuzzy <Wuzzy2@mail.ru>
parents: 12904
diff changeset
  1066
end
06791c62c759 ACF3: Explode princess when skipping 12turn course failanim
Wuzzy <Wuzzy2@mail.ru>
parents: 12904
diff changeset
  1067
7215
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
  1068
--////////////////////////////Main Functions/////////////////////////
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
  1069
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
  1070
function onGameInit()
12380
1eaef4b1b3c1 ACF, mission 3: Standardize mine times. 3s if alone, 5s if playing with 2 hogs
Wuzzy <almikes@aol.com>
parents: 12379
diff changeset
  1071
  progress = tonumber(GetCampaignVar("Progress"))
13145
5083fb0a2992 A Classic Fairytale: Harden all missions against missing campaign variables in team file and assume default values
Wuzzy <Wuzzy2@mail.ru>
parents: 13142
diff changeset
  1072
  m2Choice = tonumber(GetCampaignVar("M2Choice")) or choiceRefused
14682
0bba06a05d52 ACF: Dump unused campaign vars, use fallback values
Wuzzy <Wuzzy2@mail.ru>
parents: 14643
diff changeset
  1073
  m2DenseDead = tonumber(GetCampaignVar("M2DenseDead")) or 0
12380
1eaef4b1b3c1 ACF, mission 3: Standardize mine times. 3s if alone, 5s if playing with 2 hogs
Wuzzy <almikes@aol.com>
parents: 12379
diff changeset
  1074
7215
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
  1075
	Seed = 0
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
  1076
	GameFlags = gfSolidLand + gfDisableWind
7239
598fe796dd01 Increased turn time to 40
belphegorr <szabibibi@gmail.com>
parents: 7236
diff changeset
  1077
	TurnTime = 40000 
7215
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
  1078
	CaseFreq = 0
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
  1079
	MinesNum = 0
12380
1eaef4b1b3c1 ACF, mission 3: Standardize mine times. 3s if alone, 5s if playing with 2 hogs
Wuzzy <almikes@aol.com>
parents: 12379
diff changeset
  1080
1eaef4b1b3c1 ACF, mission 3: Standardize mine times. 3s if alone, 5s if playing with 2 hogs
Wuzzy <almikes@aol.com>
parents: 12379
diff changeset
  1081
	if m2DenseDead == 1 then
1eaef4b1b3c1 ACF, mission 3: Standardize mine times. 3s if alone, 5s if playing with 2 hogs
Wuzzy <almikes@aol.com>
parents: 12379
diff changeset
  1082
		MinesTime = 3000
1eaef4b1b3c1 ACF, mission 3: Standardize mine times. 3s if alone, 5s if playing with 2 hogs
Wuzzy <almikes@aol.com>
parents: 12379
diff changeset
  1083
	else
1eaef4b1b3c1 ACF, mission 3: Standardize mine times. 3s if alone, 5s if playing with 2 hogs
Wuzzy <almikes@aol.com>
parents: 12379
diff changeset
  1084
		MinesTime = 5000
1eaef4b1b3c1 ACF, mission 3: Standardize mine times. 3s if alone, 5s if playing with 2 hogs
Wuzzy <almikes@aol.com>
parents: 12379
diff changeset
  1085
	end
7215
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
  1086
	Explosives = 0
8979
860836494821 Package the 3 dynamic maps broken by recent uFloat changes as static maps. first_blood actually didn't seem to need it, but, just in case.
nemo
parents: 8944
diff changeset
  1087
    Map = "A_Classic_Fairytale_journey"
860836494821 Package the 3 dynamic maps broken by recent uFloat changes as static maps. first_blood actually didn't seem to need it, but, just in case.
nemo
parents: 8944
diff changeset
  1088
    Theme = "Nature"
860836494821 Package the 3 dynamic maps broken by recent uFloat changes as static maps. first_blood actually didn't seem to need it, but, just in case.
nemo
parents: 8944
diff changeset
  1089
12224
d62d6f8ebef1 Disable Sudden Death consistently in all missions which don't require it
Wuzzy <almikes@aol.com>
parents: 12049
diff changeset
  1090
    -- Disable Sudden Death
d62d6f8ebef1 Disable Sudden Death consistently in all missions which don't require it
Wuzzy <almikes@aol.com>
parents: 12049
diff changeset
  1091
    HealthDecrease = 0
d62d6f8ebef1 Disable Sudden Death consistently in all missions which don't require it
Wuzzy <almikes@aol.com>
parents: 12049
diff changeset
  1092
    WaterRise = 0
7215
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
  1093
14465
d084fc76c566 ACF3: Fix weapons being disabled in first turn
Wuzzy <Wuzzy2@mail.ru>
parents: 14422
diff changeset
  1094
  AnimInit(true)
d084fc76c566 ACF3: Fix weapons being disabled in first turn
Wuzzy <Wuzzy2@mail.ru>
parents: 14422
diff changeset
  1095
14507
f8c2b995c009 Use player team name in ACF campaign
Wuzzy <Wuzzy2@mail.ru>
parents: 14506
diff changeset
  1096
  nativesTeamName = AddMissionTeam(-2)
13475
2c7ae236b2d8 ACF3: Fix initial ammo being locked
Wuzzy <Wuzzy2@mail.ru>
parents: 13474
diff changeset
  1097
  leaks = AddHog(loc("Leaks A Lot"), 0, 100, "Rambo")
7225
e3f2280d9000 Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents: 7219
diff changeset
  1098
  dense = AddHog(loc("Dense Cloud"), 0, 100, "RobinHood")
7215
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
  1099
14953
ff4003a90ff8 Enable automatic voicepack language selection for all missions
Wuzzy <Wuzzy2@mail.ru>
parents: 14919
diff changeset
  1100
  princessTeamName = AddTeam(loc("Princess"), -2, "Bone", "Island", "HillBilly_qau", "cm_female")
14633
bd15c8551318 Make use of passive teams in various campaign missions
Wuzzy <Wuzzy2@mail.ru>
parents: 14508
diff changeset
  1101
  SetTeamPassive(princessTeamName, true)
13475
2c7ae236b2d8 ACF3: Fix initial ammo being locked
Wuzzy <Wuzzy2@mail.ru>
parents: 13474
diff changeset
  1102
  princess = AddHog(loc("Fell From Heaven"), 0, 200, "tiara")
2c7ae236b2d8 ACF3: Fix initial ammo being locked
Wuzzy <Wuzzy2@mail.ru>
parents: 13474
diff changeset
  1103
14953
ff4003a90ff8 Enable automatic voicepack language selection for all missions
Wuzzy <Wuzzy2@mail.ru>
parents: 14919
diff changeset
  1104
  cannibalsTeamName = AddTeam(loc("Cannibal Sentry"), -1, "skull", "Island", "Pirate_qau", "cm_vampire")
7215
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
  1105
  cannibals = {}
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
  1106
  for i = 1, 4 do
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
  1107
    cannibals[i] = AddHog(cannibalNames[i], 3, 40, "Zombi")
7448
d0521a3a4358 Solved "floating repositionings" in every mission
belphegorr <szabibibi@gmail.com>
parents: 7261
diff changeset
  1108
    AnimSetGearPosition(cannibals[i], unpack(cannibalPos[i]))
13142
39aa98d01e80 ACF3: Fix cannibals sometimes doing nothing for a full turn
Wuzzy <Wuzzy2@mail.ru>
parents: 12934
diff changeset
  1109
    SetEffect(cannibals[i], heArtillery, 1)
7215
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
  1110
  end
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
  1111
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
  1112
  for i = 5, 8 do
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
  1113
    cannibals[i] = AddHog(cannibalNames[i], 3, 40, "Zombi")
7448
d0521a3a4358 Solved "floating repositionings" in every mission
belphegorr <szabibibi@gmail.com>
parents: 7261
diff changeset
  1114
    AnimSetGearPosition(cannibals[i], 0, 0)
13142
39aa98d01e80 ACF3: Fix cannibals sometimes doing nothing for a full turn
Wuzzy <Wuzzy2@mail.ru>
parents: 12934
diff changeset
  1115
    SetEffect(cannibals[i], heArtillery, 1)
7215
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
  1116
  end
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
  1117
14953
ff4003a90ff8 Enable automatic voicepack language selection for all missions
Wuzzy <Wuzzy2@mail.ru>
parents: 14919
diff changeset
  1118
  cyborgTeamName = AddTeam(loc("011101001"), -1, "ring", "UFO", "Robot_qau", "cm_binary")
7225
e3f2280d9000 Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents: 7219
diff changeset
  1119
  cyborg = AddHog(loc("Y3K1337"), 0, 200, "cyborg1")
13473
1515e643cd91 ACF3: Move princess to her own team, fix clan color
Wuzzy <Wuzzy2@mail.ru>
parents: 13145
diff changeset
  1120
7448
d0521a3a4358 Solved "floating repositionings" in every mission
belphegorr <szabibibi@gmail.com>
parents: 7261
diff changeset
  1121
  AnimSetGearPosition(dense, 0, 0)
d0521a3a4358 Solved "floating repositionings" in every mission
belphegorr <szabibibi@gmail.com>
parents: 7261
diff changeset
  1122
  AnimSetGearPosition(leaks, 0, 0)
d0521a3a4358 Solved "floating repositionings" in every mission
belphegorr <szabibibi@gmail.com>
parents: 7261
diff changeset
  1123
  AnimSetGearPosition(cyborg, 0, 0)
d0521a3a4358 Solved "floating repositionings" in every mission
belphegorr <szabibibi@gmail.com>
parents: 7261
diff changeset
  1124
  AnimSetGearPosition(princess, 0, 0)
7215
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
  1125
end
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
  1126
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
  1127
function onGameStart()
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
  1128
  StartMission()
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
  1129
end
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
  1130
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
  1131
function onGameTick()
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
  1132
  AnimUnWait()
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
  1133
  if ShowAnimation() == false then
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
  1134
    return
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
  1135
  end
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
  1136
  ExecuteAfterAnimations()
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
  1137
  CheckEvents()
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
  1138
end
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
  1139
12543
9fda510f0bc4 ACF, mission 3: Fix broken sequence when princess got caged (failed parcours)
Wuzzy <almikes@aol.com>
parents: 12542
diff changeset
  1140
-- Track gears for princess cage cleanup
9fda510f0bc4 ACF, mission 3: Fix broken sequence when princess got caged (failed parcours)
Wuzzy <almikes@aol.com>
parents: 12542
diff changeset
  1141
function onGearAdd(gear)
9fda510f0bc4 ACF, mission 3: Fix broken sequence when princess got caged (failed parcours)
Wuzzy <almikes@aol.com>
parents: 12542
diff changeset
  1142
  local gt = GetGearType(gear)
9fda510f0bc4 ACF, mission 3: Fix broken sequence when princess got caged (failed parcours)
Wuzzy <almikes@aol.com>
parents: 12542
diff changeset
  1143
  if gt == gtCase or gt == gtMine then
9fda510f0bc4 ACF, mission 3: Fix broken sequence when princess got caged (failed parcours)
Wuzzy <almikes@aol.com>
parents: 12542
diff changeset
  1144
    trackedGears[gear] = true
9fda510f0bc4 ACF, mission 3: Fix broken sequence when princess got caged (failed parcours)
Wuzzy <almikes@aol.com>
parents: 12542
diff changeset
  1145
  end
9fda510f0bc4 ACF, mission 3: Fix broken sequence when princess got caged (failed parcours)
Wuzzy <almikes@aol.com>
parents: 12542
diff changeset
  1146
end
9fda510f0bc4 ACF, mission 3: Fix broken sequence when princess got caged (failed parcours)
Wuzzy <almikes@aol.com>
parents: 12542
diff changeset
  1147
7215
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
  1148
function onGearDelete(gear)
12543
9fda510f0bc4 ACF, mission 3: Fix broken sequence when princess got caged (failed parcours)
Wuzzy <almikes@aol.com>
parents: 12542
diff changeset
  1149
  if trackedGears[gear] then
9fda510f0bc4 ACF, mission 3: Fix broken sequence when princess got caged (failed parcours)
Wuzzy <almikes@aol.com>
parents: 12542
diff changeset
  1150
    trackedGears[gear] = nil
9fda510f0bc4 ACF, mission 3: Fix broken sequence when princess got caged (failed parcours)
Wuzzy <almikes@aol.com>
parents: 12542
diff changeset
  1151
  end
7215
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
  1152
  if gear == blowCrate then
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
  1153
    blowTaken = true
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
  1154
  elseif gear == gravityCrate then
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
  1155
    gravityTaken = true
12375
3126214d0e7d ACF, mission 3: Fix victory causing a lot of loser message being displayed. Also add EndTurn()
Wuzzy <almikes@aol.com>
parents: 12374
diff changeset
  1156
  elseif gear == leaks and not victory then
7215
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
  1157
    leaksDead = true
12375
3126214d0e7d ACF, mission 3: Fix victory causing a lot of loser message being displayed. Also add EndTurn()
Wuzzy <almikes@aol.com>
parents: 12374
diff changeset
  1158
  elseif gear == dense and not victory then
7215
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
  1159
    denseDead = true
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
  1160
  elseif gear == cyborg then
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
  1161
    cyborgDead = true
12375
3126214d0e7d ACF, mission 3: Fix victory causing a lot of loser message being displayed. Also add EndTurn()
Wuzzy <almikes@aol.com>
parents: 12374
diff changeset
  1162
  elseif gear == princess and not victory then
7215
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
  1163
    princessDead = true
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
  1164
  elseif gear == sniperCrate then
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
  1165
    sniperTaken = true
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
  1166
  else
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
  1167
    for i = 1, 4 do
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
  1168
      if gear == cannibals[i] then
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
  1169
        cannibalDead[i] = true
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
  1170
      end
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
  1171
    end
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
  1172
  end
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
  1173
end
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
  1174
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
  1175
function onAmmoStoreInit()
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
  1176
  SetAmmo(amBlowTorch, 0, 0, 0, 1)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
  1177
  SetAmmo(amParachute, 0, 0, 0, 1)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
  1178
  SetAmmo(amGirder, 0, 0, 0, 3)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
  1179
  SetAmmo(amLowGravity, 0, 0, 0, 1)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
  1180
  SetAmmo(amBaseballBat, 0, 0, 0, 1)
7524
a98ce9191832 Mission 3: Added initial FirePunch
belphegorr <szabibibi@gmail.com>
parents: 7514
diff changeset
  1181
  SetAmmo(amFirePunch, 1, 0, 0, 1)
7215
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
  1182
  SetAmmo(amSkip, 9, 0, 0, 0)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
  1183
  SetAmmo(amSwitch, 9, 0, 0, 0)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
  1184
  SetAmmo(amDEagle, 9, 0, 0, 0)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
  1185
  SetAmmo(amRope, 0, 0, 0, 1)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
  1186
  SetAmmo(amSniperRifle, 0, 0, 0, 1)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
  1187
  SetAmmo(amDynamite, 0, 0, 0, 1)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
  1188
  SetAmmo(amPickHammer, 0, 0, 0, 1)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
  1189
end
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
  1190
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
  1191
function onNewTurn()
14465
d084fc76c566 ACF3: Fix weapons being disabled in first turn
Wuzzy <Wuzzy2@mail.ru>
parents: 14422
diff changeset
  1192
  if not startAnimStarted then
d084fc76c566 ACF3: Fix weapons being disabled in first turn
Wuzzy <Wuzzy2@mail.ru>
parents: 14422
diff changeset
  1193
      AddAnim(startAnim)
d084fc76c566 ACF3: Fix weapons being disabled in first turn
Wuzzy <Wuzzy2@mail.ru>
parents: 14422
diff changeset
  1194
      AddFunction({func = AfterStartAnim, args = {}})
d084fc76c566 ACF3: Fix weapons being disabled in first turn
Wuzzy <Wuzzy2@mail.ru>
parents: 14422
diff changeset
  1195
      startAnimStarted = true
d084fc76c566 ACF3: Fix weapons being disabled in first turn
Wuzzy <Wuzzy2@mail.ru>
parents: 14422
diff changeset
  1196
  end
7215
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
  1197
  if AnimInProgress() then
13752
110d6c1e817f Lua: Rename globals: NoPointX→NO_CURSOR, cMaxTurnTime→MAX_TURN_TIME, cMaxHogHealth→MAX_HOG_HEALTH
Wuzzy <Wuzzy2@mail.ru>
parents: 13742
diff changeset
  1198
    SetTurnTimeLeft(MAX_TURN_TIME)
12375
3126214d0e7d ACF, mission 3: Fix victory causing a lot of loser message being displayed. Also add EndTurn()
Wuzzy <almikes@aol.com>
parents: 12374
diff changeset
  1199
  elseif victory then
3126214d0e7d ACF, mission 3: Fix victory causing a lot of loser message being displayed. Also add EndTurn()
Wuzzy <almikes@aol.com>
parents: 12374
diff changeset
  1200
    EndTurn(true)
14633
bd15c8551318 Make use of passive teams in various campaign missions
Wuzzy <Wuzzy2@mail.ru>
parents: 14508
diff changeset
  1201
  elseif stage == endStage then
bd15c8551318 Make use of passive teams in various campaign missions
Wuzzy <Wuzzy2@mail.ru>
parents: 14508
diff changeset
  1202
    if GetHogTeamName(CurrentHedgehog) == nativesTeamName and CurrentHedgehog ~= leaks then
bd15c8551318 Make use of passive teams in various campaign missions
Wuzzy <Wuzzy2@mail.ru>
parents: 14508
diff changeset
  1203
      AnimSwitchHog(leaks)
bd15c8551318 Make use of passive teams in various campaign missions
Wuzzy <Wuzzy2@mail.ru>
parents: 14508
diff changeset
  1204
      SetTurnTimeLeft(MAX_TURN_TIME)
bd15c8551318 Make use of passive teams in various campaign missions
Wuzzy <Wuzzy2@mail.ru>
parents: 14508
diff changeset
  1205
    else
bd15c8551318 Make use of passive teams in various campaign missions
Wuzzy <Wuzzy2@mail.ru>
parents: 14508
diff changeset
  1206
      SkipTurn()
bd15c8551318 Make use of passive teams in various campaign missions
Wuzzy <Wuzzy2@mail.ru>
parents: 14508
diff changeset
  1207
    end
14506
f37910a73c19 Refactor ACF missions, store team names in variables
Wuzzy <Wuzzy2@mail.ru>
parents: 14465
diff changeset
  1208
  elseif GetHogTeamName(CurrentHedgehog) ~= nativesTeamName then
13742
2bb7141496a9 Use SetTurnTimeLeft and SetReadyTimeLeft in all scripts
Wuzzy <Wuzzy2@mail.ru>
parents: 13643
diff changeset
  1209
    SetTurnTimeLeft(20000)
7215
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
  1210
  else
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
  1211
    TurnsLeft = TurnsLeft - 1
12904
c851be2c0494 Show # of turns left in the 12-turn parcour segment of ACF3
Wuzzy <Wuzzy2@mail.ru>
parents: 12903
diff changeset
  1212
    if TurnsLeft >= 1 then
13643
690cc84e9fd6 Use capcolDefault in Lua scripts
Wuzzy <Wuzzy2@mail.ru>
parents: 13583
diff changeset
  1213
      AddCaption(string.format(loc("Turns left: %d"), TurnsLeft), capcolDefault, capgrpGameState)
12904
c851be2c0494 Show # of turns left in the 12-turn parcour segment of ACF3
Wuzzy <Wuzzy2@mail.ru>
parents: 12903
diff changeset
  1214
    end
7215
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
  1215
  end
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
  1216
end
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
  1217
15023
3ed1cbd31754 Backed out changeset 4596357d002d (onPreciseLocal causes desyncs)
Wuzzy <Wuzzy2@mail.ru>
parents: 14953
diff changeset
  1218
function onPrecise()
7510
a7601ce08b5d Mission 3: Modified onPrecise (added out-commented debug code)
belphegorr <szabibibi@gmail.com>
parents: 7506
diff changeset
  1219
  if GameTime > 2500 and AnimInProgress() then
7215
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
  1220
    SetAnimSkip(true)
7510
a7601ce08b5d Mission 3: Modified onPrecise (added out-commented debug code)
belphegorr <szabibibi@gmail.com>
parents: 7506
diff changeset
  1221
    return
7215
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
  1222
  end
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
  1223
end
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
  1224
15188
9d4a6ab60dec ACF: Show "Mission succeeded/failed" in stats screen
Wuzzy <Wuzzy2@mail.ru>
parents: 15089
diff changeset
  1225
function onGameResult(winner)
9d4a6ab60dec ACF: Show "Mission succeeded/failed" in stats screen
Wuzzy <Wuzzy2@mail.ru>
parents: 15089
diff changeset
  1226
  if winner == GetTeamClan(nativesTeamName) then
9d4a6ab60dec ACF: Show "Mission succeeded/failed" in stats screen
Wuzzy <Wuzzy2@mail.ru>
parents: 15089
diff changeset
  1227
    SendStat(siGameResult, loc("Mission succeeded!"))
9d4a6ab60dec ACF: Show "Mission succeeded/failed" in stats screen
Wuzzy <Wuzzy2@mail.ru>
parents: 15089
diff changeset
  1228
  else
9d4a6ab60dec ACF: Show "Mission succeeded/failed" in stats screen
Wuzzy <Wuzzy2@mail.ru>
parents: 15089
diff changeset
  1229
    SendStat(siGameResult, loc("Mission failed!"))
9d4a6ab60dec ACF: Show "Mission succeeded/failed" in stats screen
Wuzzy <Wuzzy2@mail.ru>
parents: 15089
diff changeset
  1230
  end
9d4a6ab60dec ACF: Show "Mission succeeded/failed" in stats screen
Wuzzy <Wuzzy2@mail.ru>
parents: 15089
diff changeset
  1231
end