share/hedgewars/Data/Missions/Campaign/A Classic Fairytale/journey.lua
author belphegorr <szabibibi@gmail.com>
Sun, 01 Jul 2012 17:24:04 +0300
changeset 7217 bc87b2b6f18b
parent 7215 533debc28ee5
child 7219 6c7739c6446f
permissions -rw-r--r--
Removed some debugging lines I forgot to remove.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
7215
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
     1
loadfile(GetDataPath() .. "Scripts/Animate.lua")()
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
     2
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
     3
--///////////////////////////////CONSTANTS///////////////////////////
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
     4
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
     5
choiceAccepted = 0
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
     6
choiceRefused = 1
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
     7
choiceAttacked = 2
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
     8
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
     9
endStage = 1
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    10
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    11
cannibalNum = 8
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    12
cannibalNames = {"John", "Flesh for Brainz", "Eye Chewer", "Torn Muscle",
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    13
                 "Nom-Nom", "Vedgies", "Brain Blower", "Gorkij"}
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    14
cannibalPos = {{2471, 1174}, {939, 1019}, {1953, 902}, {3055, 1041},
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    15
               {1121, 729}, {1150, 718}, {1149, 680}, {1161, 773}}
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    16
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    17
startLeaksPosDuo = {3572, 1426}
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    18
startEventXDuo = 3300
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    19
startDensePosDuo = {3454, 1471}
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    20
startCyborgPosDuo = {3202, 1307}
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    21
midDensePosDuo = {1464, 1408}
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    22
midCyborgPosDuo = {1264, 1390}
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    23
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    24
--///////////////////////////////VARIABLES///////////////////////////
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    25
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    26
m2Choice = 0
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    27
m2DenseDead = 0
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    28
m2RamonDead = 0
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    29
m2SpikyDead = 0
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    30
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    31
TurnsLeft = 0
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    32
stage = 0
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    33
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    34
cyborgHidden = false
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    35
princessHidden = false
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    36
blowTaken = false
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    37
fireTaken = false
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    38
gravityTaken = false
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    39
sniperTaken = false
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    40
girderTaken = false
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    41
girder1Taken = false
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    42
girder2Taken = false
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    43
leaksDead = false
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    44
denseDead = false
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    45
princessDead = false
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    46
cyborgDead = false
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    47
cannibalDead = {}
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    48
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    49
startAnim = {}
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    50
startAnimAD = {}
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    51
startAnimAL = {}
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    52
startAnimRL = {}
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    53
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    54
pastFlowerAnimAL = {}
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    55
pastFlowerAnimRL = {}
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    56
pastFlowerAnim = {}
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    57
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    58
outPitAnimAL = {}
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    59
outPitAnimRL = {}
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    60
outPitAnim = {}
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    61
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    62
midAnim = {}
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    63
midAnimAD = {}
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    64
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    65
failAnim = {}
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    66
failAnimAD = {}
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    67
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    68
endAnim = {}
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    69
endAnimAD = {}
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    70
endAnimAL = {}
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    71
endAnimRL = {}
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    72
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    73
endFailAnim = {}
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    74
endFailAnimAD = {}
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    75
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    76
winAnim = {}
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    77
winAnimAD = {}
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    78
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    79
--/////////////////////////Animation Functions///////////////////////
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    80
function AfterMidFailAnim()
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    81
  ParseCommand("teamgone Natives")
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    82
  TurnTimeLeft = 0
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    83
end
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    84
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    85
function AfterMidAnimAlone()
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    86
  SetupCourse()
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    87
  for i = 5, 8 do
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    88
    RestoreHog(cannibals[i])
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    89
    SetGearPosition(cannibals[i], unpack(cannibalPos[i]))
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    90
  end
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    91
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    92
  AddAmmo(cannibals[5], amDEagle, 0)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    93
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    94
  AddEvent(CheckGirderTaken, {}, DoGirderTaken, {}, 0)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    95
  AddEvent(CheckOnFirstGirder, {}, DoOnFirstGirder, {}, 0)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    96
  AddEvent(CheckTookSniper, {}, DoTookSniper, {}, 0)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    97
  AddEvent(CheckFailedCourse, {}, DoFailedCourse, {}, 0)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    98
  SetGearMessage(leaks, 0)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    99
  TurnsLeft = 12
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   100
  TurnTimeLeft = TurnTime
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   101
  ShowMission("The Journey Back", "Collateral Damage", "Save the princess by collecting the crate in under 12 turns!", 0, 6000)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   102
  -----------------------///////////////------------
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   103
  --SetGearPosition(leaks, 417, 1800)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   104
end
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   105
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   106
function SkipEndAnimAlone()
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   107
  if cyborgHidden then
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   108
    RestoreHog(cyborg)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   109
    cyborgHidden = false
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   110
  end
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   111
  if princessHidden then
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   112
    RestoreHog(princess)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   113
    princessHidden = false
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   114
  end
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   115
  SetGearPosition(cyborg, 437, 1700)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   116
  SetGearPosition(princess, 519, 1722)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   117
end
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   118
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   119
function SkipEndAnimDuo()
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   120
  if cyborgHidden then
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   121
    RestoreHog(cyborg)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   122
    cyborgHidden = false
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   123
  end
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   124
  if princessHidden then
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   125
    RestoreHog(princess)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   126
    princessHidden = false
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   127
  end
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   128
  SetGearPosition(cyborg, 437, 1700)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   129
  SetGearPosition(princess, 519, 1722)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   130
  SetGearPosition(leaks, 763, 1760)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   131
  SetGearPosition(dense, 835, 1519)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   132
  HogTurnLeft(leaks, true)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   133
  HogTurnLeft(dense, true)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   134
end
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   135
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   136
function AfterEndAnimAlone()
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   137
  stage = endStage
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   138
  SwitchHog(leaks)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   139
  SetGearMessage(leaks, 0)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   140
  TurnTimeLeft = -1
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   141
  ShowMission("The Journey Back", "Collateral Damage II", "Save Fell From Heaven!", 1, 4000)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   142
  AddEvent(CheckLost, {}, DoLost, {}, 0)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   143
  AddEvent(CheckWon, {}, DoWon, 0)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   144
  RemoveEventFunc(CheckFailedCourse)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   145
end
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   146
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   147
function AfterEndAnimDuo()
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   148
  stage = endStage
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   149
  SwitchHog(leaks)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   150
  SetGearMessage(leaks, 0)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   151
  TurnTimeLeft = -1
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   152
  ShowMission("The Journey Back", "Collateral Damage II", "Save Fell From Heaven!", 1, 4000)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   153
  AddEvent(CheckLost, {}, DoLost, {}, 0)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   154
  AddEvent(CheckWon, {}, DoWon, {}, 0)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   155
end
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   156
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   157
function SkipMidAnimAlone()
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   158
  SetGearPosition(leaks, 2656, 1842)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   159
  AnimSwitchHog(leaks)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   160
  SetInputMask(0xFFFFFFFF)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   161
  if princessHidden == false then
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   162
    HideHog(princess)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   163
    princessHidden = true
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   164
  end
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   165
  if cyborgHidden == false then
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   166
    HideHog(cyborg)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   167
    cyborgHidden = true
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   168
  end
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   169
end
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   170
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   171
function AfterStartAnim()
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   172
  SetGearMessage(leaks, 0)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   173
  TurnTimeLeft = TurnTime
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   174
  local goal = "Get the crate on the other side of the island!|"
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   175
  local hint = "Hint: you might want to stay out of sight and take all the crates...|"
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   176
  local stuck = "If you get stuck, use your Desert Eagle or restart the mission!|"
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   177
  local conds = "Leaks A Lot must survive!"
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   178
  if m2DenseDead == 0 then
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   179
    conds = "Your hogs must survive!"
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   180
  end
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   181
  ShowMission("The Journey Back", "Adventurous", goal .. hint .. stuck .. conds, 0, 7000)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   182
end
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   183
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   184
function SkipStartAnim()
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   185
  AnimSwitchHog(leaks)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   186
end
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   187
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   188
function PlaceCratesDuo()
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   189
  SpawnAmmoCrate(3104, 827, amBaseballBat)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   190
  girderCrate1 = SpawnUtilityCrate(2466, 1814, amGirder)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   191
  girderCrate2 = SpawnUtilityCrate(2630, 1278, amGirder)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   192
  SpawnUtilityCrate(2422, 1810, amParachute)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   193
  SpawnUtilityCrate(3107, 1009, amLowGravity)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   194
  sniperCrate = SpawnAmmoCrate(784, 1715, amSniperRifle)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   195
end
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   196
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   197
function PlaceMinesDuo()
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   198
  SetTimer(AddGear(2920, 1448, gtMine, 0, 0, 0, 0), 5000)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   199
  SetTimer(AddGear(2985, 1338, gtMine, 0, 0, 0, 0), 5000)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   200
  SetTimer(AddGear(3005, 1302, gtMine, 0, 0, 0, 0), 5000)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   201
  SetTimer(AddGear(3030, 1270, gtMine, 0, 0, 0, 0), 5000)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   202
  SetTimer(AddGear(3046, 1257, gtMine, 0, 0, 0, 0), 5000)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   203
  SetTimer(AddGear(2954, 1400, gtMine, 0, 0, 0, 0), 5000)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   204
  SetTimer(AddGear(2967, 1385, gtMine, 0, 0, 0, 0), 5000)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   205
  SetTimer(AddGear(2849, 1449, gtMine, 0, 0, 0, 0), 5000)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   206
  SetTimer(AddGear(2811, 1436, gtMine, 0, 0, 0, 0), 5000)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   207
  SetTimer(AddGear(2773, 1411, gtMine, 0, 0, 0, 0), 5000)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   208
  SetTimer(AddGear(2732, 1390, gtMine, 0, 0, 0, 0), 5000)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   209
  SetTimer(AddGear(2700, 1362, gtMine, 0, 0, 0, 0), 5000)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   210
  SetTimer(AddGear(2642, 1321, gtMine, 0, 0, 0, 0), 5000)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   211
  SetTimer(AddGear(2172, 1417, gtMine, 0, 0, 0, 0), 5000)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   212
  SetTimer(AddGear(2190, 1363, gtMine, 0, 0, 0, 0), 5000)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   213
  SetTimer(AddGear(2219, 1332, gtMine, 0, 0, 0, 0), 5000)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   214
  SetTimer(AddGear(1201, 1207, gtMine, 0, 0, 0, 0), 5000)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   215
  SetTimer(AddGear(1247, 1205, gtMine, 0, 0, 0, 0), 5000)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   216
  SetTimer(AddGear(1295, 1212, gtMine, 0, 0, 0, 0), 5000)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   217
  SetTimer(AddGear(1356, 1209, gtMine, 0, 0, 0, 0), 5000)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   218
  SetTimer(AddGear(1416, 1201, gtMine, 0, 0, 0, 0), 5000)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   219
  SetTimer(AddGear(1466, 1201, gtMine, 0, 0, 0, 0), 5000)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   220
  SetTimer(AddGear(1678, 1198, gtMine, 0, 0, 0, 0), 5000)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   221
  SetTimer(AddGear(1738, 1198, gtMine, 0, 0, 0, 0), 5000)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   222
  SetTimer(AddGear(1796, 1198, gtMine, 0, 0, 0, 0), 5000)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   223
  SetTimer(AddGear(1637, 1217, gtMine, 0, 0, 0, 0), 5000)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   224
  SetTimer(AddGear(1519, 1213, gtMine, 0, 0, 0, 0), 5000)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   225
end
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   226
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   227
function AfterPastFlowerAnim()
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   228
  PlaceMinesDuo()
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   229
  AddEvent(CheckDensePit, {}, DoDensePit, {}, 0)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   230
  AddEvent(CheckTookGirder1, {}, DoTookGirder1, {}, 0)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   231
  AddEvent(CheckTookGirder2, {}, DoTookGirder2, {}, 0)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   232
  SetGearMessage(leaks, 0)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   233
  SetGearMessage(dense, 0)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   234
  TurnTimeLeft = 0
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   235
  ShowMission("The Journey Back", "The Savior", "Get Dense Cloud out of the pit!", 1, 5000)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   236
end
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   237
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   238
function SkipPastFlowerAnim()
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   239
  SetGearPosition(dense, 2656, 1842)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   240
  AnimSwitchHog(dense)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   241
  if cyborgHidden == false then
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   242
    HideHog(cyborg)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   243
    cyborgHidden = true
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   244
  end
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   245
end
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   246
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   247
function AfterOutPitAnim()
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   248
  SetupCourseDuo()
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   249
  RestoreHog(cannibals[5])
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   250
  AddAmmo(cannibals[5], amDEagle, 0)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   251
  HideHog(cannibals[5])
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   252
  AddEvent(CheckTookFire, {}, DoTookFire, {}, 0)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   253
  SetGearMessage(leaks, 0)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   254
  SetGearMessage(dense, 0)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   255
  TurnTimeLeft = 0
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   256
  ShowMission("The Journey Back", "They never learn", "Free Dense Cloud and continue the mission!", 1, 5000)
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 SkipOutPitAnim()
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   260
  SetGearPosition(dense, unpack(midDensePosDuo))
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   261
  AnimSwitchHog(dense)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   262
  if cyborgHidden == false then
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   263
    HideHog(cyborg)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   264
    cyborgHidden = true
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   265
  end
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   266
end
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   267
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   268
function RestoreCyborg(x, y, xx, yy)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   269
  RestoreHog(cyborg)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   270
  RestoreHog(princess)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   271
  cyborgHidden = false
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   272
  princessHidden = false
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   273
  AnimOutOfNowhere(cyborg, x, y)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   274
  AnimOutOfNowhere(princess, xx, yy)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   275
  HogTurnLeft(princess, false)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   276
  return true
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   277
end
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   278
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   279
function RestoreCyborgOnly(x, y)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   280
  RestoreHog(cyborg)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   281
  cyborgHidden = false
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   282
  AnimOutOfNowhere(cyborg, x, y)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   283
  return true
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 TargetPrincess()
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   287
  ParseCommand("setweap " .. string.char(amDEagle))
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   288
  SetGearMessage(cyborg, gmUp)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   289
  return true
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   290
end
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   291
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   292
function HideCyborg()
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   293
  if cyborgHidden == false then
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   294
    HideHog(cyborg)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   295
    cyborgHidden = true
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   296
  end
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   297
  if princessHidden == false then
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   298
    HideHog(princess)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   299
    princessHidden = true
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   300
  end
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   301
end
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   302
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   303
function HideCyborgOnly()
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   304
  if cyborgHidden == false then
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   305
    HideHog(cyborg)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   306
    cyborgHidden = true
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   307
  end
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   308
end
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   309
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   310
function SetupKillRoom()
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   311
  PlaceGirder(2342, 1814, 2)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   312
  PlaceGirder(2294, 1783, 0)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   313
  PlaceGirder(2245, 1814, 2)
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 SetupCourseDuo()
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   317
  PlaceGirder(1083, 1152, 6)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   318
  PlaceGirder(1087, 1150, 6)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   319
  PlaceGirder(1133, 1155, 0)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   320
  PlaceGirder(1135, 1152, 0)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   321
  PlaceGirder(1135, 1078, 0)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   322
  PlaceGirder(1087, 1016, 2)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   323
  PlaceGirder(1018, 921, 5)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   324
  PlaceGirder(1016, 921, 5)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   325
  PlaceGirder(962, 782, 6)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   326
  PlaceGirder(962, 662, 2)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   327
  PlaceGirder(962, 661, 2)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   328
  PlaceGirder(962, 650, 2)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   329
  PlaceGirder(962, 630, 2)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   330
  PlaceGirder(1033, 649, 0)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   331
  PlaceGirder(952, 650, 0)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   332
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   333
  fireCrate = SpawnAmmoCrate(1846, 1100, amFirePunch)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   334
  SpawnUtilityCrate(1849, 1149, amPickHammer)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   335
  SpawnAmmoCrate(960, 674, amDynamite)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   336
  SpawnUtilityCrate(994, 825, amRope)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   337
  SpawnUtilityCrate(570, 1357, amLowGravity)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   338
end
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   339
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   340
function DumpMines()
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   341
  SetTimer(AddGear(2261, 1835, gtMine, 0, 0, 0, 0), 5000)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   342
  SetTimer(AddGear(2280, 1831, gtMine, 0, 0, 0, 0), 5000)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   343
  SetTimer(AddGear(2272, 1809, gtMine, 0, 0, 0, 0), 5000)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   344
  SetTimer(AddGear(2290, 1815, gtMine, 0, 0, 0, 0), 5000)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   345
  SetTimer(AddGear(2278, 1815, gtMine, 0, 0, 0, 0), 5000)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   346
  SetTimer(AddGear(2307, 1811, gtMine, 0, 0, 0, 0), 5000)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   347
  SetTimer(AddGear(2286, 1820, gtMine, 0, 0, 0, 0), 5000)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   348
  SetTimer(AddGear(2309, 1813, gtMine, 0, 0, 0, 0), 5000)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   349
  SetTimer(AddGear(2303, 1822, gtMine, 0, 0, 0, 0), 5000)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   350
  SetTimer(AddGear(2317, 1827, gtMine, 0, 0, 0, 0), 5000)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   351
  SetTimer(AddGear(2312, 1816, gtMine, 0, 0, 0, 0), 5000)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   352
  SetTimer(AddGear(2316, 1812, gtMine, 0, 0, 0, 0), 5000)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   353
  SetTimer(AddGear(2307, 1802, gtMine, 0, 0, 0, 0), 5000)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   354
  SetTimer(AddGear(2276, 1818, gtMine, 0, 0, 0, 0), 5000)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   355
  SetTimer(AddGear(2284, 1816, gtMine, 0, 0, 0, 0), 5000)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   356
  SetTimer(AddGear(2292, 1811, gtMine, 0, 0, 0, 0), 5000)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   357
  SetTimer(AddGear(2295, 1814, gtMine, 0, 0, 0, 0), 5000)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   358
  SetTimer(AddGear(2306, 1811, gtMine, 0, 0, 0, 0), 5000)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   359
  SetTimer(AddGear(2292, 1815, gtMine, 0, 0, 0, 0), 5000)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   360
  SetTimer(AddGear(2314, 1815, gtMine, 0, 0, 0, 0), 5000)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   361
  SetTimer(AddGear(2286, 1813, gtMine, 0, 0, 0, 0), 5000)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   362
  SetTimer(AddGear(2275, 1813, gtMine, 0, 0, 0, 0), 5000)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   363
  SetTimer(AddGear(2269, 1814, gtMine, 0, 0, 0, 0), 5000)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   364
  SetTimer(AddGear(2273, 1812, gtMine, 0, 0, 0, 0), 5000)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   365
  SetTimer(AddGear(2300, 1808, gtMine, 0, 0, 0, 0), 5000)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   366
  SetTimer(AddGear(2322, 1812, gtMine, 0, 0, 0, 0), 5000)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   367
  SetTimer(AddGear(2323, 1813, gtMine, 0, 0, 0, 0), 5000)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   368
  SetTimer(AddGear(2311, 1811, gtMine, 0, 0, 0, 0), 5000)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   369
  SetTimer(AddGear(2303, 1809, gtMine, 0, 0, 0, 0), 5000)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   370
  SetTimer(AddGear(2287, 1808, gtMine, 0, 0, 0, 0), 5000)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   371
  SetTimer(AddGear(2282, 1808, gtMine, 0, 0, 0, 0), 5000)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   372
  SetTimer(AddGear(2277, 1809, gtMine, 0, 0, 0, 0), 5000)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   373
  SetTimer(AddGear(2296, 1809, gtMine, 0, 0, 0, 0), 5000)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   374
  SetTimer(AddGear(2314, 1818, gtMine, 0, 0, 0, 0), 5000)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   375
end
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   376
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   377
function SetupAnimRefusedDied()
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   378
  SetupAnimAcceptedDied()
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   379
  table.insert(startAnim, {func = AnimSay, args = {leaks, "I just wonder where Ramon and Spiky disappeared...", SAY_THINK, 6000}})
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   380
end
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   381
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   382
function SetupAnimAttacked()
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   383
  SetupAnimAcceptedDied()
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   384
  startAnim = {}
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   385
  table.insert(startAnim, {func = AnimWait, args = {leaks, 3000}})
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   386
  table.insert(startAnim, {func = AnimTurn, args = {leaks, "Left"}})
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   387
  table.insert(startAnim, {func = AnimSay, args = {leaks, "I wonder where Dense Cloud is...", SAY_THINK, 4000}})
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   388
  table.insert(startAnim, {func = AnimSay, args = {leaks, "He must be in the village already.", SAY_THINK, 4000}})
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   389
  table.insert(startAnim, {func = AnimSay, args = {leaks, "I'd better get going myself.", SAY_THINK, 4000}})
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   390
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   391
  midAnim = {}
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   392
  table.insert(midAnim, {func = AnimWait, args = {leaks, 500}})
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   393
  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
   394
  table.insert(midAnim, {func = AnimSwitchHog, args = {cyborg}})
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   395
  table.insert(midAnim, {func = AnimCustomFunction, args = {cyborg, TargetPrincess, {}}})
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   396
  table.insert(midAnim, {func = AnimSay, args = {cyborg, "Welcome, Leaks A Lot!", SAY_SAY, 3000}})
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   397
  table.insert(midAnim, {func = AnimSay, args = {cyborg, "I want to play a game...", SAY_SAY, 3000}})
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   398
  table.insert(midAnim, {func = AnimSay, args = {princess, "Help me, please!!!", SAY_SHOUT, 3000}})
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   399
  table.insert(midAnim, {func = AnimSay, args = {cyborg, "If you can get that crate fast enough, your beloved \"princess\" may go free.", SAY_SAY, 7000}})
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   400
  table.insert(midAnim, {func = AnimSay, args = {cyborg, "However, if you fail to do so, she dies a most violent death! Muahahaha!", SAY_SAY, 8000}})
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   401
  table.insert(midAnim, {func = AnimSay, args = {cyborg, "Good luck...or else!", SAY_SAY, 4000}})
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   402
  table.insert(midAnim, {func = AnimTeleportGear, args = {leaks, 2656, 1842}})
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   403
  table.insert(midAnim, {func = AnimCustomFunction, args = {cyborg, HideCyborg, {}}, swh = false})
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   404
  table.insert(midAnim, {func = AnimSay, args = {leaks, "Hey! This is cheating!", SAY_SHOUT, 4000}})
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   405
  AddSkipFunction(midAnim, SkipMidAnimAlone, {})
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   406
end
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   407
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   408
function SetupAnimAcceptedDied()
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   409
  table.insert(startAnimAD, {func = AnimWait, args = {leaks, 3000}})
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   410
  table.insert(startAnimAD, {func = AnimTurn, args = {leaks, "left"}})
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   411
  table.insert(startAnimAD, {func = AnimSay, args = {leaks, "I need to get to the other side of this island, fast!", SAY_THINK, 5000}})
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   412
  table.insert(startAnimAD, {func = AnimSay, args = {leaks, "With Dense Cloud on the land of shadows, I'm the village's only hope...", SAY_THINK, 7000}})
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   413
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   414
  table.insert(midAnimAD, {func = AnimWait, args = {leaks, 500}})
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   415
  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
   416
  table.insert(midAnimAD, {func = AnimSwitchHog, args = {cyborg}})
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   417
  table.insert(midAnimAD, {func = AnimCustomFunction, args = {cyborg, TargetPrincess, {}}})
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   418
  table.insert(midAnimAD, {func = AnimSay, args = {cyborg, "Welcome, Leaks A Lot!", SAY_SAY, 3000}})
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   419
  table.insert(midAnimAD, {func = AnimSay, args = {cyborg, "I want to play a game...", SAY_SAY, 3000}})
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   420
  table.insert(midAnimAD, {func = AnimSay, args = {princess, "Help me, please!!!", SAY_SHOUT, 3000}})
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   421
  table.insert(midAnimAD, {func = AnimSay, args = {cyborg, "If you can get that crate fast enough, your beloved \"princess\" may go free.", SAY_SAY, 7000}})
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   422
  table.insert(midAnimAD, {func = AnimSay, args = {cyborg, "However, if you fail to do so, she dies a most violent death, just like your friend! Muahahaha!", SAY_SAY, 8000}})
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   423
  table.insert(midAnimAD, {func = AnimSay, args = {cyborg, "Good luck...or else!", SAY_SAY, 4000}})
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   424
  table.insert(midAnimAD, {func = AnimTeleportGear, args = {leaks, 2656, 1842}})
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   425
  table.insert(midAnimAD, {func = AnimCustomFunction, args = {cyborg, HideCyborg, {}}, swh = false})
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   426
  table.insert(midAnimAD, {func = AnimSay, args = {leaks, "Hey! This is cheating!", SAY_SHOUT, 4000}})
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   427
  AddSkipFunction(midAnimAD, SkipMidAnimAlone, {})
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   428
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   429
  table.insert(failAnimAD, {func = AnimCustomFunction, swh = false, args = {leaks, RestoreCyborg, {2299, 1687, 2294, 1841}}})
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   430
  table.insert(failAnimAD, {func = AnimTeleportGear, args = {leaks, 2090, 1841}})
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   431
  table.insert(failAnimAD, {func = AnimCustomFunction, swh = false, args = {cyborg, SetupKillRoom, {}}})
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   432
  table.insert(failAnimAD, {func = AnimTurn, swh = false, args = {cyborg, "Left"}})
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   433
  table.insert(failAnimAD, {func = AnimTurn, swh = false, args = {princess, "Left"}})
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   434
  table.insert(failAnimAD, {func = AnimTurn, swh = false, args = {leaks, "Right"}})
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   435
  table.insert(failAnimAD, {func = AnimWait, args = {cyborg, 1000}})
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   436
  table.insert(failAnimAD, {func = AnimSay, args = {cyborg, "You have failed to complete your task, young one!", SAY_SAY, 6000}})
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   437
  table.insert(failAnimAD, {func = AnimSay, args = {cyborg, "It's time you learned that your actions have consequences!", SAY_SAY, 7000}})
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   438
  table.insert(failAnimAD, {func = AnimSay, args = {princess, "No! Please, help me!", SAY_SAY, 4000}})
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   439
  table.insert(failAnimAD, {func = AnimSwitchHog, args = {cyborg}})
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   440
  table.insert(failAnimAD, {func = AnimCustomFunction, args = {cyborg, DumpMines, {}}})
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   441
  table.insert(failAnimAD, {func = AnimCustomFunction, args = {cyborg, KillPrincess, {}}})
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   442
  table.insert(failAnimAD, {func = AnimWait, args = {cyborg, 12000}})
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   443
  table.insert(failAnimAD, {func = AnimSay, args = {leaks, "No! What have I done?! What have YOU done?!", SAY_SHOUT, 6000}})
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   444
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   445
  table.insert(endAnimAD, {func = AnimCustomFunction, swh = false, args = {leaks, RestoreCyborg, {437, 1700, 519, 1722}}})
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   446
  table.insert(endAnimAD, {func = AnimTurn, swh = false, args = {cyborg, "Right"}})
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   447
  table.insert(endAnimAD, {func = AnimTurn, swh = false, args = {princess, "Right"}})
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   448
  table.insert(endAnimAD, {func = AnimSay, args = {princess, "Help me, Leaks!", SAY_SHOUT, 3000}})
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   449
  table.insert(endAnimAD, {func = AnimSay, args = {leaks, "But you said you'd let her go!", SAY_SHOUT, 5000}})
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   450
  table.insert(endAnimAD, {func = AnimSay, args = {cyborg, "And you believed me? Oh, god, that's cute!", SAY_SHOUT, 7000}})
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   451
  table.insert(endAnimAD, {func = AnimSay, args = {leaks, "I won't let you kill her!", SAY_SHOUT, 4000}})
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   452
  AddSkipFunction(endAnimAD, SkipEndAnimAlone, {})
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   453
  
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   454
  table.insert(endFailAnim, {func = AnimCaption, args = {leaks, "Leaks A Lot, depressed for killing his loved one, failed to save the village...", 3000}})
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   455
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   456
  table.insert(winAnimAD, {func = AnimSay, args = {princess, "Thank you, oh, thank you, Leaks A Lot!", SAY_SAY, 5000}})
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   457
  table.insert(winAnimAD, {func = AnimSay, args = {princess, "How can I ever repay you for saving my life?", SAY_SAY, 6000}})
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   458
  table.insert(winAnimAD, {func = AnimSay, args = {leaks, "There's nothing more satisfying for me than seeing you share your beauty with the world every morning, my princess!", SAY_SAY, 10000}})
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   459
  table.insert(winAnimAD, {func = AnimSay, args = {leaks, "Let's go home!", SAY_SAY, 3000}})
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   460
  table.insert(winAnimAD, {func = AnimCaption, args = {leaks, "And so they discovered that cyborgs weren't invulnerable...", 2000}})
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   461
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   462
  startAnim = startAnimAD
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   463
  midAnim = midAnimAD
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   464
  failAnim = failAnimAD
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   465
  endAnim = endAnimAD
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   466
  endFailAnim = endFailAnimAD
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   467
  winAnim = winAnimAD
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   468
end
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   469
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   470
function SetupAnimAcceptedLived()
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   471
  table.insert(startAnimAL, {func = AnimWait, args = {leaks, 3000}})
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   472
  table.insert(startAnimAL, {func = AnimCustomFunction, args = {dense, CondNeedToTurn, {leaks, dense}}})
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   473
  table.insert(startAnimAL, {func = AnimSay, args = {leaks, "All right, we just need to get to the other side of the island!", SAY_SAY, 8000}})
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   474
  table.insert(startAnimAL, {func = AnimSay, args = {dense, "We have no time to waste...", SAY_SAY, 4000}})
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   475
  table.insert(startAnimAL, {func = AnimSwitchHog, args = {leaks}})
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   476
  AddSkipFunction(startAnimAL, SkipStartAnim, {})
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
  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
   479
  table.insert(pastFlowerAnimAL, {func = AnimTurn, args = {cyborg, "Right"}})
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   480
  table.insert(pastFlowerAnimAL, {func = AnimSay, args = {cyborg, "Well, well! Isn't that the cutest thing you've ever seen?", SAY_SAY, 7000}})
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   481
  table.insert(pastFlowerAnimAL, {func = AnimSay, args = {cyborg, "Two little hogs cooperating, getting past obstacles...", SAY_SAY, 7000}})
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   482
  table.insert(pastFlowerAnimAL, {func = AnimSay, args = {cyborg, "Let me test your skills a little, will you?", SAY_SAY, 6000}})
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   483
  table.insert(pastFlowerAnimAL, {func = AnimTeleportGear, args = {cyborg, 2456, 1842}})
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   484
  table.insert(pastFlowerAnimAL, {func = AnimTeleportGear, args = {dense, 2656, 1842}})
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   485
  table.insert(pastFlowerAnimAL, {func = AnimCustomFunction, args = {dense, CondNeedToTurn, {cyborg, dense}}})
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   486
  table.insert(pastFlowerAnimAL, {func = AnimSay, args = {dense, "Why are you doing this?", SAY_SAY, 4000}})
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   487
  table.insert(pastFlowerAnimAL, {func = AnimSay, args = {cyborg, "To help you, of course!", SAY_SAY, 4000}})
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   488
  table.insert(pastFlowerAnimAL, {func = AnimSwitchHog, args = {dense}})
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   489
  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
   490
  table.insert(pastFlowerAnimAL, {func = AnimCustomFunction, swh = false, args = {cyborg, HideCyborgOnly, {}}})
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   491
  AddSkipFunction(pastFlowerAnimAL, SkipPastFlowerAnim, {})
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   492
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   493
  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
   494
  table.insert(outPitAnimAL, {func = AnimTurn, args = {cyborg, "Right"}})
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   495
  table.insert(outPitAnimAL, {func = AnimTeleportGear, args = {dense, unpack(midDensePosDuo)}})
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   496
  table.insert(outPitAnimAL, {func = AnimSay, args = {dense, "OH, COME ON!", SAY_SHOUT, 3000}})
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   497
  table.insert(outPitAnimAL, {func = AnimSay, args = {cyborg, "Let's see what your comrade does now!", SAY_SAY, 5000}})
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   498
  table.insert(outPitAnimAL, {func = AnimSwitchHog, args = {dense}})
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   499
  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
   500
  table.insert(outPitAnimAL, {func = AnimCustomFunction, swh = false, args = {cyborg, HideCyborgOnly, {}}})
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   501
  AddSkipFunction(outPitAnimAL, SkipOutPitAnim, {})
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   502
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   503
  table.insert(endAnim, {func = AnimCustomFunction, swh = false, args = {leaks, RestoreCyborg, {437, 1700, 519, 1722}}})
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   504
  table.insert(endAnim, {func = AnimTeleportGear, args = {leaks, 763, 1760}})
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   505
  table.insert(endAnim, {func = AnimTeleportGear, args = {dense, 835, 1519}})
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   506
  table.insert(endAnim, {func = AnimTurn, swh = false, args = {leaks, "Left"}})
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   507
  table.insert(endAnim, {func = AnimTurn, swh = false, args = {dense, "Left"}})
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   508
  table.insert(endAnim, {func = AnimTurn, swh = false, args = {cyborg, "Right"}})
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   509
  table.insert(endAnim, {func = AnimTurn, swh = false, args = {princess, "Right"}})
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   510
  table.insert(endAnim, {func = AnimSay, args = {princess, "Help me, please!", SAY_SHOUT, 3000}})
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   511
  table.insert(endAnim, {func = AnimSay, args = {leaks, "What are you doing? Let her go!", SAY_SHOUT, 5000}})
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   512
  table.insert(endAnim, {func = AnimSay, args = {cyborg, "Yeah? Watcha gonna do? Cry?", SAY_SHOUT, 5000}})
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   513
  table.insert(endAnim, {func = AnimSay, args = {leaks, "We won't let you hurt her!", SAY_SHOUT, 4000}})
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   514
  AddSkipFunction(endAnim, SkipEndAnimDuo, {})
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   515
  
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   516
  table.insert(endFailAnim, {func = AnimCaption, args = {leaks, "Leaks A Lot, depressed for killing his loved one, failed to save the village...", 3000}})
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   517
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   518
  table.insert(winAnim, {func = AnimSay, args = {princess, "Thank you, oh, thank you, my heroes!", SAY_SAY, 5000}})
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   519
  table.insert(winAnim, {func = AnimSay, args = {princess, "How can I ever repay you for saving my life?", SAY_SAY, 6000}})
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   520
  table.insert(winAnim, {func = AnimSay, args = {leaks, "There's nothing more satisfying to us than seeing you share your beauty with the world every morning, my princess!", SAY_SAY, 10000}})
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   521
  table.insert(winAnim, {func = AnimSay, args = {leaks, "Let's go home!", SAY_SAY, 3000}})
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   522
  table.insert(winAnim, {func = AnimCaption, args = {leaks, "And so they discovered that cyborgs weren't invulnerable...", 2000}})
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   523
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   524
  startAnim = startAnimAL
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   525
  pastFlowerAnim = pastFlowerAnimAL
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   526
  outPitAnim = outPitAnimAL
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   527
end
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   528
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   529
function SetupAnimRefusedLived()
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   530
  table.insert(startAnimRL, {func = AnimWait, args = {leaks, 3000}})
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   531
  table.insert(startAnimRL, {func = AnimCustomFunction, args = {dense, CondNeedToTurn, {leaks, dense}}})
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   532
  table.insert(startAnimRL, {func = AnimSay, args = {leaks, "All right, we just need to get to the other side of the island!", SAY_SAY, 7000}})
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   533
  table.insert(startAnimRL, {func = AnimSay, args = {dense, "Dude, can you see Ramon and Spiky?", SAY_SAY, 5000}})
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   534
  table.insert(startAnimRL, {func = AnimSay, args = {leaks, "No...I wonder where they disappeared?!", SAY_SAY, 5000}})
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   535
  AddSkipFunction(startAnimRL, SkipStartAnim, {})
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   536
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   537
  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
   538
  table.insert(pastFlowerAnimRL, {func = AnimTurn, args = {cyborg, "Right"}})
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   539
  table.insert(pastFlowerAnimRL, {func = AnimSay, args = {cyborg, "Well, well! Isn't that the cutest thing you've ever seen?", SAY_SAY, 7000}})
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   540
  table.insert(pastFlowerAnimRL, {func = AnimSay, args = {cyborg, "Two little hogs cooperating, getting past obstacles...", SAY_SAY, 7000}})
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   541
  table.insert(pastFlowerAnimRL, {func = AnimSay, args = {cyborg, "Let me test your skills a little, will you?", SAY_SAY, 6000}})
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   542
  table.insert(pastFlowerAnimRL, {func = AnimTeleportGear, args = {cyborg, 2456, 1842}})
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   543
  table.insert(pastFlowerAnimRL, {func = AnimTeleportGear, args = {dense, 2656, 1842}})
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   544
  table.insert(pastFlowerAnimRL, {func = AnimCustomFunction, args = {dense, CondNeedToTurn, {cyborg, dense}}})
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   545
  table.insert(pastFlowerAnimRL, {func = AnimSay, args = {dense, "Why are you doing this?", SAY_SAY, 4000}})
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   546
  table.insert(pastFlowerAnimRL, {func = AnimSay, args = {cyborg, "You couldn't possibly believe that after refusing my offer I'd just let you go!", SAY_SAY, 9000}})
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   547
  table.insert(pastFlowerAnimRL, {func = AnimSay, args = {cyborg, "You're funny!", SAY_SAY, 4000}})
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   548
  table.insert(pastFlowerAnimRL, {func = AnimSwitchHog, args = {dense}})
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   549
  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
   550
  table.insert(pastFlowerAnimRL, {func = AnimCustomFunction, swh = false, args = {cyborg, HideCyborgOnly, {}}})
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   551
  AddSkipFunction(pastFlowerAnimRL, SkipPastFlowerAnim, {})
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   552
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   553
  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
   554
  table.insert(outPitAnimRL, {func = AnimTurn, args = {cyborg, "Right"}})
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   555
  table.insert(outPitAnimRL, {func = AnimTeleportGear, args = {dense, unpack(midDensePosDuo)}})
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   556
  table.insert(outPitAnimRL, {func = AnimSay, args = {dense, "OH, COME ON!", SAY_SHOUT, 3000}})
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   557
  table.insert(outPitAnimRL, {func = AnimSay, args = {cyborg, "Let's see what your comrade does now!", SAY_SAY, 5000}})
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   558
  table.insert(outPitAnimRL, {func = AnimSwitchHog, args = {dense}})
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   559
  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
   560
  table.insert(outPitAnimRL, {func = AnimCustomFunction, swh = false, args = {cyborg, HideCyborgOnly, {}}})
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   561
  AddSkipFunction(outPitAnimRL, SkipOutPitAnim, {})
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   562
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   563
  table.insert(endAnim, {func = AnimCustomFunction, args = {leaks, RestoreCyborg, {437, 1700, 519, 1722}}})
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   564
  table.insert(endAnim, {func = AnimTeleportGear, args = {leaks, 763, 1760}})
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   565
  table.insert(endAnim, {func = AnimTeleportGear, args = {dense, 835, 1519}})
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   566
  table.insert(endAnim, {func = AnimTurn, swh = false, args = {leaks, "Left"}})
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   567
  table.insert(endAnim, {func = AnimTurn, swh = false, args = {dense, "Left"}})
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   568
  table.insert(endAnim, {func = AnimTurn, swh = false, args = {cyborg, "Right"}})
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   569
  table.insert(endAnim, {func = AnimTurn, swh = false, args = {princess, "Right"}})
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   570
  table.insert(endAnim, {func = AnimSay, args = {princess, "Help me, please!", SAY_SHOUT, 3000}})
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   571
  table.insert(endAnim, {func = AnimSay, args = {leaks, "What are you doing? Let her go!", SAY_SHOUT, 5000}})
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   572
  table.insert(endAnim, {func = AnimSay, args = {cyborg, "Yeah? Watcha gonna do? Cry?", SAY_SHOUT, 5000}})
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   573
  table.insert(endAnim, {func = AnimSay, args = {leaks, "We won't let you hurt her!", SAY_SHOUT, 4000}})
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   574
  AddSkipFunction(endAnim, SkipEndAnimDuo, {})
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   575
  
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   576
  table.insert(endFailAnim, {func = AnimCaption, args = {leaks, "Leaks A Lot, depressed for killing his loved one, failed to save the village...", 3000}})
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   577
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   578
  table.insert(winAnim, {func = AnimSay, args = {princess, "Thank you, oh, thank you, my heroes!", SAY_SAY, 5000}})
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   579
  table.insert(winAnim, {func = AnimSay, args = {princess, "How can I ever repay you for saving my life?", SAY_SAY, 6000}})
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   580
  table.insert(winAnim, {func = AnimSay, args = {leaks, "There's nothing more satisfying to us than seeing you share your beauty with the world every morning, my princess!", SAY_SAY, 10000}})
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   581
  table.insert(winAnim, {func = AnimSay, args = {leaks, "Let's go home!", SAY_SAY, 3000}})
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   582
  table.insert(winAnim, {func = AnimCaption, args = {leaks, "And so they discovered that cyborgs weren't invulnerable...", 2000}})
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   583
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   584
  startAnim = startAnimRL
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   585
  pastFlowerAnim = pastFlowerAnimRL
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   586
  outPitAnim = outPitAnimRL
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   587
end
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   588
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   589
function KillPrincess()
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   590
  ParseCommand("teamgone Cannibal Sentry")
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   591
  TurnTimeLeft = 0
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   592
end
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   593
--/////////////////////////////Misc Functions////////////////////////
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
function CondNeedToTurn(hog1, hog2)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   596
  xl, xd = GetX(hog1), GetX(hog2)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   597
  if xl > xd then
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   598
    AnimInsertStepNext({func = AnimTurn, args = {hog1, "Left"}})
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   599
    AnimInsertStepNext({func = AnimTurn, args = {hog2, "Right"}})
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   600
  elseif xl < xd then
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   601
    AnimInsertStepNext({func = AnimTurn, args = {hog2, "Left"}})
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   602
    AnimInsertStepNext({func = AnimTurn, args = {hog1, "Right"}})
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   603
  end
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   604
end
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   605
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   606
function SetupPlaceAlone()
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   607
  ------ AMMO CRATE LIST ------
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   608
  --SpawnAmmoCrate(3122, 994, amShotgun)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   609
  SpawnAmmoCrate(3124, 952, amBaseballBat)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   610
  SpawnAmmoCrate(2508, 1110, amFirePunch)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   611
  ------ UTILITY CRATE LIST ------
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   612
  blowCrate = SpawnUtilityCrate(3675, 1480, amBlowTorch)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   613
  gravityCrate = SpawnUtilityCrate(3448, 1349, amLowGravity)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   614
  SpawnUtilityCrate(3212, 1256, amGirder)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   615
  SpawnUtilityCrate(3113, 911, amParachute)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   616
  sniperCrate = SpawnAmmoCrate(784, 1715, amSniperRifle)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   617
  ------ MINE LIST ------
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   618
  SetTimer(AddGear(3328, 1399, gtMine, 0, 0, 0, 0), 3000)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   619
  SetTimer(AddGear(3028, 1262, gtMine, 0, 0, 0, 0), 3000)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   620
  SetTimer(AddGear(2994, 1274, gtMine, 0, 0, 0, 0), 3000)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   621
  SetTimer(AddGear(2956, 1277, gtMine, 0, 0, 0, 0), 3000)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   622
  SetTimer(AddGear(2925, 1282, gtMine, 0, 0, 0, 0), 3000)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   623
  SetTimer(AddGear(2838, 1276, gtMine, 0, 0, 0, 0), 3000)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   624
  SetTimer(AddGear(2822, 1278, gtMine, 0, 0, 0, 0), 3000)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   625
  SetTimer(AddGear(2786, 1283, gtMine, 0, 0, 0, 0), 3000)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   626
  SetTimer(AddGear(2766, 1270, gtMine, 0, 0, 0, 0), 3000)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   627
  SetTimer(AddGear(2749, 1231, gtMine, 0, 0, 0, 0), 3000)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   628
  SetTimer(AddGear(2717, 1354, gtMine, 0, 0, 0, 0), 3000)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   629
  SetTimer(AddGear(2167, 1330, gtMine, 0, 0, 0, 0), 3000)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   630
  SetTimer(AddGear(2201, 1321, gtMine, 0, 0, 0, 0), 3000)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   631
  SetTimer(AddGear(2239, 1295, gtMine, 0, 0, 0, 0), 3000)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   632
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   633
  SetGearPosition(leaks, 3781, 1583)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   634
  --SetGearPosition(leaks, 1650, 1583)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   635
  AddAmmo(cannibals[1], amShotgun, 100)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   636
end
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   637
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   638
function SetupPlaceDuo()
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   639
  PlaceCratesDuo()
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   640
  SetGearPosition(leaks, unpack(startLeaksPosDuo))
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   641
  SetGearPosition(dense, unpack(startDensePosDuo))
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   642
end
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   643
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   644
function SetupEventsDuo()
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   645
  AddEvent(CheckPastFlower, {}, DoPastFlower, {}, 0)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   646
  AddEvent(CheckLeaksDead, {}, DoLeaksDead, {}, 0)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   647
  AddEvent(CheckDenseDead, {}, DoDenseDead, {}, 0)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   648
  AddEvent(CheckTookSniper2, {}, DoTookSniper2, {}, 0)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   649
end
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   650
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   651
function SetupEventsAlone()
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   652
  AddEvent(CheckLeaksDead, {}, DoLeaksDead, {}, 0)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   653
  AddEvent(CheckTookBlowTorch, {}, DoTookBlowTorch, {}, 0)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   654
  AddEvent(CheckTookLowGravity, {}, DoTookLowGravity, {}, 0)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   655
  AddEvent(CheckOnBridge, {}, DoOnBridge, {}, 0)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   656
end
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   657
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   658
function StartMission()
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   659
  HideHog(cyborg)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   660
  HideHog(princess)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   661
  cyborgHidden = true
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   662
  princessHidden = true
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   663
  for i = 5, 8 do
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   664
    HideHog(cannibals[i])
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   665
  end
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   666
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   667
  if m2DenseDead == 1 then
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   668
    DeleteGear(dense)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   669
    if m2Choice == choiceAccepted then
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   670
      SetupAnimAcceptedDied()
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   671
    elseif m2Choice == choiceRefused then
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   672
      SetupAnimRefusedDied()
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   673
    else
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   674
      SetupAnimAttacked()
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   675
    end
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   676
    SetupPlaceAlone()
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   677
    SetupEventsAlone()
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   678
    AddAnim(startAnim)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   679
    AddFunction({func = AfterStartAnim, args = {}})
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   680
  else
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   681
    if m2Choice == choiceAccepted then
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   682
      SetupAnimAcceptedLived()
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   683
    else
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   684
      SetupAnimRefusedLived()
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   685
    end
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   686
    SetupPlaceDuo()
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   687
    SetupEventsDuo()
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   688
    AddAnim(startAnim)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   689
    AddFunction({func = AfterStartAnim, args = {}})
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   690
  end
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   691
end
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   692
  
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   693
function SetupCourse()
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   694
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   695
  ------ GIRDER LIST ------
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   696
  PlaceGirder(1091, 1150, 6)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   697
  PlaceGirder(1091, 989, 6)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   698
  PlaceGirder(1091, 829, 6)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   699
  PlaceGirder(1091, 669, 6)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   700
  PlaceGirder(1091, 668, 6)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   701
  PlaceGirder(1091, 669, 6)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   702
  PlaceGirder(1088, 667, 6)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   703
  PlaceGirder(1091, 658, 6)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   704
  PlaceGirder(1091, 646, 6)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   705
  PlaceGirder(1091, 607, 6)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   706
  PlaceGirder(1091, 571, 6)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   707
  PlaceGirder(1376, 821, 6)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   708
  PlaceGirder(1145, 1192, 1)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   709
  PlaceGirder(1169, 1076, 3)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   710
  PlaceGirder(1351, 1082, 4)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   711
  PlaceGirder(1469, 987, 3)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   712
  PlaceGirder(1386, 951, 0)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   713
  PlaceGirder(1465, 852, 3)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   714
  PlaceGirder(1630, 913, 0)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   715
  PlaceGirder(1733, 856, 7)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   716
  PlaceGirder(1688, 713, 5)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   717
  PlaceGirder(1556, 696, 2)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   718
  PlaceGirder(1525, 696, 2)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   719
  PlaceGirder(1457, 697, 2)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   720
  PlaceGirder(1413, 700, 3)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   721
  PlaceGirder(1270, 783, 2)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   722
  PlaceGirder(1207, 825, 2)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   723
  PlaceGirder(1135, 775, 1)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   724
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   725
  ------ UTILITY CRATE LIST ------
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   726
  SpawnUtilityCrate(1540, 628, amParachute)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   727
  SpawnAmmoCrate(1540, 100, amDynamite)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   728
  SpawnUtilityCrate(2175, 1815, amLowGravity)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   729
  SpawnUtilityCrate(2210, 1499, amFirePunch)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   730
  girderCrate = SpawnUtilityCrate(2300, 1663, amGirder)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   731
  SpawnUtilityCrate(610, 1394, amPickHammer)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   732
  
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   733
  ------ BARREL LIST ------
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   734
  SetHealth(AddGear(1148, 736, gtExplosives, 0, 0, 0, 0), 20)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   735
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   736
end
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   737
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   738
function PlaceCourseMines()
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   739
  SetTimer(AddGear(1215, 1193, gtMine, 0, 0, 0, 0), 5000)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   740
  SetTimer(AddGear(1259, 1199, gtMine, 0, 0, 0, 0), 5000)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   741
  SetTimer(AddGear(1310, 1198, gtMine, 0, 0, 0, 0), 5000)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   742
  SetTimer(AddGear(1346, 1196, gtMine, 0, 0, 0, 0), 5000)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   743
  SetTimer(AddGear(1383, 1192, gtMine, 0, 0, 0, 0), 5000)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   744
  SetTimer(AddGear(1436, 1196, gtMine, 0, 0, 0, 0), 5000)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   745
  SetTimer(AddGear(1487, 1199, gtMine, 0, 0, 0, 0), 5000)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   746
  SetTimer(AddGear(1651, 1209, gtMine, 0, 0, 0, 0), 5000)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   747
  SetTimer(AddGear(1708, 1209, gtMine, 0, 0, 0, 0), 5000)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   748
  SetTimer(AddGear(1759, 1190, gtMine, 0, 0, 0, 0), 5000)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   749
  SetTimer(AddGear(1815, 1184, gtMine, 0, 0, 0, 0), 5000)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   750
end
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   751
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   752
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   753
--////////////////////////////Event Functions////////////////////////
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   754
function CheckTookFire()
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   755
  return fireTaken
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   756
end
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   757
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   758
function DoTookFire()
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   759
  AddAmmo(leaks, amFirePunch, 100)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   760
end
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   761
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   762
function CheckTookGirder1()
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   763
  return girder1Taken
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   764
end
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   765
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   766
function CheckTookGirder2()
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   767
  return girder2Taken
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   768
end
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   769
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   770
function DoTookGirder1()
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   771
  AddAmmo(dense, amGirder, 2)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   772
end
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   773
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   774
function DoTookGirder2()
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   775
  AddAmmo(dense, amGirder, 3)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   776
end
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   777
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   778
function CheckDensePit()
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   779
  return GetY(dense) < 1250 and StoppedGear(dense)
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 DoDensePit()
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   783
  AddAnim(outPitAnim)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   784
  AddFunction({func = AfterOutPitAnim, args = {}})
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   785
end
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   786
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   787
function CheckPastFlower()
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   788
  if denseDead == true or leaksDead == true then
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   789
    return false
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   790
  end
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   791
  return (GetX(dense) < startEventXDuo and StoppedGear(dense))
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   792
      or (GetX(leaks) < startEventXDuo and StoppedGear(leaks))
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   793
end
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   794
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   795
function DoPastFlower()
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   796
  AddAnim(pastFlowerAnim)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   797
  AddFunction({func = AfterPastFlowerAnim, args = {}})
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
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   800
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   801
function CheckLeaksDead()
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   802
  return leaksDead
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   803
end
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   804
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   805
function DoLeaksDead()
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   806
  AddCaption("The village, unprepared, was destroyed by the cyborgs...")
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   807
  ParseCommand("teamgone Natives")
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   808
end
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   809
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   810
function CheckDenseDead()
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   811
  return denseDead
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   812
end
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   813
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   814
function DoDenseDead()
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   815
  AddCaption("The village, unprepared, was destroyed by the cyborgs...")
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   816
  ParseCommand("teamgone Natives")
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   817
end
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   818
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   819
function CheckTookBlowTorch()
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   820
  return blowTaken
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   821
end
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   822
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   823
function DoTookBlowTorch()
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   824
  ShowMission("The Journey Back", "The Tunnel Maker", "Hint: Select the BlowTorch, aim and press [Fire]. Press [Fire] again to stop.|Don't blow up the crate.", 0, 6000)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   825
end
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   826
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   827
function CheckTookLowGravity()
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   828
  return gravityTaken
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   829
end
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   830
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   831
function DoTookLowGravity()
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   832
  ShowMission("The Journey Back", "The Moonwalk", "Hint: Select the LowGravity and press [Fire].", 0, 6000)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   833
end
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   834
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   835
function CheckOnBridge()
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   836
  return leaksDead == false and GetX(leaks) < 1651 and StoppedGear(leaks)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   837
end
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   838
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   839
function DoOnBridge()
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   840
  AddAnim(midAnim)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   841
  AddFunction({func = AfterMidAnimAlone, args = {}})
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   842
end
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   843
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   844
function CheckGirderTaken()
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   845
  return girderTaken
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   846
end
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   847
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   848
function DoGirderTaken()
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   849
  AddAmmo(leaks, amGirder, 2)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   850
--  AddAmmo(leaks, amGirder, 3)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   851
end
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   852
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   853
function CheckOnFirstGirder()
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   854
  return leaksDead == false and GetX(leaks) < 1160 and StoppedGear(leaks)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   855
end
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   856
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   857
function DoOnFirstGirder()
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   858
  PlaceCourseMines()
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   859
  ShowMission("The Journey Back", "Slippery", "You'd better watch your steps...", 0, 4000)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   860
end
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   861
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   862
function CheckTookSniper()
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   863
  return sniperTaken and StoppedGear(leaks)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   864
end
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   865
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   866
function DoTookSniper()
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   867
  AddAnim(endAnim)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   868
  AddFunction({func = AfterEndAnimAlone, args = {}})
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   869
end
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   870
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   871
function CheckTookSniper2()
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   872
  return sniperTaken and StoppedGear(leaks) and StoppedGear(dense)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   873
end
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   874
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   875
function DoTookSniper2()
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   876
  AddAnim(endAnim)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   877
  AddFunction({func = AfterEndAnimDuo, args = {}})
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   878
end
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 CheckLost()
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   881
  return princessDead
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   882
end
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   883
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   884
function DoLost()
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   885
  AddAnim(endFailAnim)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   886
  AddFunction({func = ParseCommand, args = {'teamgone Natives'}})
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   887
end
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   888
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   889
function CheckWon()
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   890
  return cyborgDead and not princessDead
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   891
end
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   892
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   893
function DoWon()
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   894
  SaveCampaignVar("Progress", "3")
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   895
  AddAnim(winAnim)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   896
  AddFunction({func = FinishWon, args = {}})
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   897
end
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   898
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   899
function FinishWon()
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   900
  SwitchHog(leaks)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   901
  ParseCommand("teamgone Cannibal Sentry")
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   902
  ParseCommand("teamgone 011101001")
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   903
  TurnTimeLeft = 0
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   904
end
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   905
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   906
function CheckFailedCourse()
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   907
  return TurnsLeft == 0
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   908
end
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   909
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   910
function DoFailedCourse()
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   911
  AddAnim(failAnim)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   912
  AddFunction({func = AfterMidFailAnim, args = {}})
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   913
end
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   914
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   915
--////////////////////////////Main Functions/////////////////////////
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 onGameInit()
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   918
	Seed = 0
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   919
  TemplateFilter = 3
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   920
	GameFlags = gfSolidLand + gfDisableWind
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   921
	TurnTime = 25000 
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   922
	CaseFreq = 0
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   923
	MinesNum = 0
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   924
	MinesTime = 3000
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   925
	Explosives = 0
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   926
	Delay = 5
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   927
	MapGen = 0
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   928
	Theme = "Nature"
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   929
  SuddenDeathTurns = 3000
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   930
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   931
	AddTeam("Natives", 2567585, "Bone", "Island", "HillBilly", "cm_birdy")
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   932
	leaks = AddHog("Leaks A Lot", 0, 100, "Rambo")
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   933
  dense = AddHog("Dense Cloud", 0, 100, "RobinHood")
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   934
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   935
  AddTeam("Cannibal Sentry", 14483456, "Skull", "Island", "Pirate","cm_vampire")
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   936
  cannibals = {}
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   937
  for i = 1, 4 do
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   938
    cannibals[i] = AddHog(cannibalNames[i], 3, 40, "Zombi")
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   939
    SetGearPosition(cannibals[i], unpack(cannibalPos[i]))
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   940
  end
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   941
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   942
  for i = 5, 8 do
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   943
    cannibals[i] = AddHog(cannibalNames[i], 3, 40, "Zombi")
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   944
    SetGearPosition(cannibals[i], 0, 0)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   945
  end
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   946
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   947
  AddTeam("011101001", 14483456, "ring", "UFO", "Robot", "cm_star")
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   948
  cyborg = AddHog("Y3K1337", 0, 200, "cyborg1")
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   949
  princess = AddHog("Fell From Heaven", 0, 200, "tiara")
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   950
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   951
  SetGearPosition(dense, 0, 0)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   952
  SetGearPosition(leaks, 0, 0)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   953
  SetGearPosition(cyborg, 0, 0)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   954
  SetGearPosition(princess, 0, 0)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   955
  
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   956
  AnimInit()
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   957
end
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   958
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   959
function onGameStart()
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   960
  m2Choice = tonumber(GetCampaignVar("M2Choice"))
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   961
  m2DenseDead = tonumber(GetCampaignVar("M2DenseDead"))
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   962
  m2RamonDead = tonumber(GetCampaignVar("M2RamonDead"))
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   963
  m2SpikyDead = tonumber(GetCampaignVar("M2SpikyDead"))
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   964
  StartMission()
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   965
end
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   966
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   967
function onGameTick()
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   968
  AnimUnWait()
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   969
  if ShowAnimation() == false then
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   970
    return
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   971
  end
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   972
  ExecuteAfterAnimations()
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   973
  CheckEvents()
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   974
end
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   975
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   976
function onGearDelete(gear)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   977
  if gear == blowCrate then
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   978
    blowTaken = true
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   979
  elseif gear == fireCrate then
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   980
    fireTaken = true
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   981
  elseif gear == gravityCrate then
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   982
    gravityTaken = true
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   983
  elseif gear == leaks then
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   984
    leaksDead = true
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   985
  elseif gear == dense then
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   986
    denseDead = true
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   987
  elseif gear == cyborg then
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   988
    cyborgDead = true
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   989
  elseif gear == princess then
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   990
    princessDead = true
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   991
  elseif gear == girderCrate then
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   992
    girderTaken = true
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   993
  elseif gear == girderCrate1 then
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   994
    girder1Taken = true
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   995
  elseif gear == girderCrate2 then
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   996
    girder2Taken = true
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   997
  elseif gear == sniperCrate then
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   998
    sniperTaken = true
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   999
  else
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
  1000
    for i = 1, 4 do
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
  1001
      if gear == cannibals[i] then
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
  1002
        cannibalDead[i] = true
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
  1003
      end
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
  1004
    end
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
  1005
  end
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
  1006
end
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
  1007
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
  1008
function onGearAdd(gear)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
  1009
end
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
  1010
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
  1011
function onAmmoStoreInit()
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
  1012
  SetAmmo(amBlowTorch, 0, 0, 0, 1)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
  1013
  SetAmmo(amParachute, 0, 0, 0, 1)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
  1014
  SetAmmo(amGirder, 0, 0, 0, 3)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
  1015
  SetAmmo(amLowGravity, 0, 0, 0, 1)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
  1016
  SetAmmo(amBaseballBat, 0, 0, 0, 1)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
  1017
  SetAmmo(amFirePunch, 0, 0, 0, 1)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
  1018
  SetAmmo(amSkip, 9, 0, 0, 0)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
  1019
  SetAmmo(amSwitch, 9, 0, 0, 0)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
  1020
  SetAmmo(amDEagle, 9, 0, 0, 0)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
  1021
  SetAmmo(amRope, 0, 0, 0, 1)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
  1022
  SetAmmo(amSniperRifle, 0, 0, 0, 1)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
  1023
  SetAmmo(amDynamite, 0, 0, 0, 1)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
  1024
  SetAmmo(amPickHammer, 0, 0, 0, 1)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
  1025
end
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
  1026
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
  1027
function onNewTurn()
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
  1028
  if AnimInProgress() then
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
  1029
    TurnTimeLeft = -1
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
  1030
  elseif stage == endStage and CurrentHedgehog ~= leaks then
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
  1031
    AnimSwitchHog(leaks)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
  1032
    SetGearMessage(leaks, 0)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
  1033
    TurnTimeLeft = -1
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
  1034
  elseif GetHogTeamName(CurrentHedgehog) ~= "Natives" then
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
  1035
    for i = 1, 4 do
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
  1036
      if cannibalDead[i] ~= true then
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
  1037
        if GetX(cannibals[i]) < GetX(leaks) then
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
  1038
          HogTurnLeft(cannibals[i], false)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
  1039
        else
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
  1040
          HogTurnLeft(cannibals[i], true)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
  1041
        end
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
  1042
      end
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
  1043
    end
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
  1044
    SetInputMask(band(0xFFFFFFFF, bnot(gmLeft + gmRight + gmLJump + gmHJump)))
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
  1045
  else
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
  1046
    SetInputMask(0xFFFFFFFF)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
  1047
    TurnsLeft = TurnsLeft - 1
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
  1048
  end
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
  1049
end
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
  1050
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
  1051
function onGearDamage(gear, damage)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
  1052
end
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
  1053
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
  1054
function onPrecise()
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
  1055
  if GameTime > 2500 then
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
  1056
    SetAnimSkip(true)
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
  1057
  end
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
  1058
end
533debc28ee5 Added mission 3: The Journey Back
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
  1059