share/hedgewars/Data/Missions/Campaign/A Classic Fairytale/enemy.lua
author belphegorr <szabibibi@gmail.com>
Sat, 18 Aug 2012 14:22:54 +0300
changeset 7469 003b7384a90a
parent 7460 d32d573aeb64
child 7512 cc3f036121fe
permissions -rw-r--r--
Fixed a typo in mission 6
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
7460
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
     1
loadfile(GetDataPath() .. "Scripts/Locale.lua")()
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
     2
loadfile(GetDataPath() .. "Scripts/Animate.lua")()
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
     3
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
     4
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
     5
--------------------------------------------Constants------------------------------------
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
     6
choiceAccepted = 1
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
     7
choiceRefused = 2
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
     8
choiceAttacked = 3
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
     9
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    10
choiceEliminate = 1
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    11
choiceSpare = 2
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    12
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    13
leaksNum = 1
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    14
denseNum = 2
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    15
waterNum = 3
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    16
buffaloNum = 4
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    17
chiefNum = 5
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    18
girlNum = 6
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    19
wiseNum = 7
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    20
ramonNum = 8
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    21
spikyNum = 9
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    22
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    23
denseScene = 1
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    24
princessScene = 2
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    25
waterScene = 3
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    26
cyborgScene = 4
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    27
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    28
nativeNames = {loc("Leaks A Lot"), loc("Dense Cloud"), loc("Fiery Water"), 
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    29
               loc("Raging Buffalo"), loc("Righteous Beard"), loc("Fell From Grace"),
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    30
               loc("Wise Oak"), loc("Ramon"), loc("Spiky Cheese")
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    31
              }
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    32
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    33
nativeHats = {"Rambo", "RobinHood", "pirate_jack", "zoo_Bunny", "IndianChief",
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    34
              "tiara", "AkuAku", "rasta", "hair_yellow"}
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    35
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    36
nativePos = {{1259, 120}, {2378, 796}, {424, 1299}, {3322, 260}, {1022, 1550}}
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    37
nativeDir = {"Right", "Left", "Right", "Left", "Right"}
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    38
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    39
cannibalNames = {loc("Honest Lee"), loc("Vegan Jack"), loc("Sirius Lee"),
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    40
                 loc("Brutal Lily")}
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    41
cannibalPos = {{162, 266}, {2159, 1517}, {3311, 1621}, {1180, 1560}}
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    42
cannibalDir = {"Right", "Left", "Left", "Right"}
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    43
cannibalsNum = 4
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    44
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    45
playersDir = {"Right", "Left", "Right", "Left", "Right", "Right", "Left", "Left", "Right"}
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    46
playersAntiDir = {"Left", "Right", "Left", "Right", "Left", "Left", "Right", "Right", "Left"}
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    47
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    48
cyborgNames = {loc("Smith 0.97"), loc("Smith 0.98"), loc("Smith 0.99a"),
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    49
               loc("Smith 0.99b"), loc("Smith 0.99f"), loc("Smith 1.0")}
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    50
cyborgPos = {{2162, 20}, {2458, 564}, {542, 1133}, {3334, 1427}}
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    51
cyborgDir = "Right"
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    52
cyborgsNum = 6
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    53
cyborgsPos = {{1490, 330}, {1737, 1005}, {2972, 922}, {1341, 1571},
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    54
              {751, 543}, {3889, 907}}
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    55
cyborgsDir = {"Right", "Right", "Left", "Right", "Right", "Left"}
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    56
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    57
leaderPos = {3474, 151}
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    58
leaderDir = "Left"
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    59
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    60
-----------------------------Variables---------------------------------
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    61
natives = {}
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    62
origNatives = {}
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    63
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    64
cyborgs = {}
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    65
cyborg = nil
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    66
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    67
cannibals = {}
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    68
players = {}
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    69
leader = nil
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    70
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    71
gearDead = {}
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    72
hedgeHidden = {}
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    73
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    74
startAnim = {}
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    75
finalAnim = {}
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    76
-----------------------------Animations--------------------------------
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    77
function CondNeedToTurn(hog1, hog2)
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    78
  xl, xd = GetX(hog1), GetX(hog2)
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    79
  if xl > xd then
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    80
    AnimInsertStepNext({func = AnimTurn, args = {hog1, "Left"}})
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    81
    AnimInsertStepNext({func = AnimTurn, args = {hog2, "Right"}})
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    82
  elseif xl < xd then
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    83
    AnimInsertStepNext({func = AnimTurn, args = {hog2, "Left"}})
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    84
    AnimInsertStepNext({func = AnimTurn, args = {hog1, "Right"}})
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    85
  end
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    86
end
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    87
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    88
function CondNeedToTurn2(hog1, hog2)
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    89
  xl, xd = GetX(hog1), GetX(hog2)
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    90
  if xl > xd then
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    91
    AnimTurn(hog1, "Left")
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    92
    AnimTurn(hog2, "Right")
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    93
  elseif xl < xd then
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    94
    AnimTurn(hog2, "Left")
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    95
    AnimTurn(hog1, "Right")
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    96
  end
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    97
end
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    98
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    99
function EmitDenseClouds(dir)
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   100
  local dif
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   101
  if dir == "Left" then
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   102
    dif = 10
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   103
  else
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   104
    dif = -10
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   105
  end
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   106
  if dir == nil then
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   107
    dx, dy = GetGearVelocity(dense)
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   108
    if dx < 0 then 
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   109
      dif = 10
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   110
    else 
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   111
      dif = -10
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   112
    end
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   113
  end
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   114
  AnimInsertStepNext({func = AnimVisualGear, args = {dense, GetX(dense) + dif, GetY(dense) + dif, vgtSteam, 0, true}, swh = false})
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   115
  AnimInsertStepNext({func = AnimVisualGear, args = {dense, GetX(dense) + dif, GetY(dense) + dif, vgtSteam, 0, true}, swh = false})
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   116
  AnimInsertStepNext({func = AnimVisualGear, args = {dense, GetX(dense) + dif, GetY(dense) + dif, vgtSteam, 0, true}, swh = false})
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   117
  AnimInsertStepNext({func = AnimWait, args = {dense, 800}})
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   118
  AnimInsertStepNext({func = AnimVisualGear, args = {dense, GetX(dense) + dif, GetY(dense) + dif, vgtSteam, 0, true}, swh = false})
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   119
  AnimInsertStepNext({func = AnimVisualGear, args = {dense, GetX(dense) + dif, GetY(dense) + dif, vgtSteam, 0, true}, swh = false})
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   120
  AnimInsertStepNext({func = AnimWait, args = {dense, 800}})
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   121
  AnimInsertStepNext({func = AnimVisualGear, args = {dense, GetX(dense) + dif, GetY(dense) + dif, vgtSteam, 0, true}, swh = false})
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   122
end
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   123
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   124
function RestoreNatives(cgi)
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   125
  for i = 1, playersNum do
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   126
    RestoreHedge(players[i])
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   127
    AnimOutOfNowhere(players[i], GetGearPosition(players[i]))
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   128
  end
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   129
end
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   130
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   131
function AnimationSetup()
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   132
  SetupCyborgStartAnim()
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   133
  SetupPeopleStartAnim()
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   134
  SetupEnemyStartAnim()
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   135
  AddSkipFunction(startAnim, SkipStartAnim, {})
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   136
end
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   137
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   138
function SetupCyborgStartAnim()
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   139
  table.insert(startAnim, {func = AnimWait, args = {cyborg, 3000}})
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   140
  table.insert(startAnim, {func = AnimTurn, args = {cyborg, "Left"}})
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   141
  table.insert(startAnim, {func = AnimWait, args = {cyborg, 800}})
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   142
  table.insert(startAnim, {func = AnimTurn, args = {cyborg, "Right"}})
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   143
  table.insert(startAnim, {func = AnimWait, args = {cyborg, 800}})
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   144
  table.insert(startAnim, {func = AnimTurn, args = {cyborg, "Left"}})
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   145
  table.insert(startAnim, {func = AnimWait, args = {cyborg, 800}})
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   146
  table.insert(startAnim, {func = AnimTeleportGear, args = {cyborg, unpack(cyborgPos[2])}})
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   147
  table.insert(startAnim, {func = AnimWait, args = {cyborg, 800}})
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   148
  table.insert(startAnim, {func = AnimTurn, args = {cyborg, "Right"}})
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   149
  table.insert(startAnim, {func = AnimWait, args = {cyborg, 800}})
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   150
  table.insert(startAnim, {func = AnimTurn, args = {cyborg, "Left"}})
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   151
  table.insert(startAnim, {func = AnimWait, args = {cyborg, 800}})
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   152
  table.insert(startAnim, {func = AnimTeleportGear, args = {cyborg, unpack(cyborgPos[3])}})
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   153
  table.insert(startAnim, {func = AnimWait, args = {cyborg, 1800}})
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   154
  table.insert(startAnim, {func = AnimTeleportGear, args = {cyborg, unpack(cyborgPos[4])}})
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   155
  table.insert(startAnim, {func = AnimWait, args = {cyborg, 800}})
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   156
  table.insert(startAnim, {func = AnimSay, args = {cyborg, loc("Everything looks OK..."), SAY_THINK, 2500}})
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   157
  table.insert(startAnim, {func = AnimSay, args = {cyborg, loc("This will be fun!"), SAY_THINK, 2500}})
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   158
  table.insert(startAnim, {func = AnimJump, args = {cyborg, "high"}})
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   159
  table.insert(startAnim, {func = AnimCustomFunction, args = {cyborg, RestoreNatives, {true}}})
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   160
  table.insert(startAnim, {func = AnimSay, args = {cyborg, loc("HAHA!"), SAY_SHOUT, 2000}})
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   161
  table.insert(startAnim, {func = AnimSwitchHog, args = {players[1]}})
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   162
  table.insert(startAnim, {func = AnimDisappear, swh = false, args = {cyborg, unpack(cyborgPos[4])}})
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   163
  table.insert(startAnim, {func = HideHedge, swh = false, args = {cyborg}})
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   164
end
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   165
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   166
function SetupPeopleStartAnim()
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   167
  for i = 1, playersNum do
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   168
    table.insert(startAnim, {func = AnimTurn, swh = false, args = {players[i], playersAntiDir[i]}})
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   169
  end
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   170
  table.insert(startAnim, {func = AnimWait, args = {players[1], 800}})
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   171
  for i = 1, playersNum do
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   172
    table.insert(startAnim, {func = AnimTurn, swh = false, args = {players[i], playersDir[i]}})
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   173
  end
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   174
  table.insert(startAnim, {func = AnimWait, args = {players[1], 800}})
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   175
  table.insert(startAnim, {func = AnimSay, args = {players[1], loc("What is this place?"), SAY_SHOUT, 2500}})
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   176
  if m5LeaksDead == 1 then
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   177
    table.insert(startAnim, {func = AnimSay, args = {players[1], loc("And how am I alive?!"), SAY_SAY, 3000}})
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   178
  end
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   179
  table.insert(startAnim, {func = AnimCustomFunction, args = {players[1], CondNeedToTurn, {players[1], players[2]}}})
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   180
  table.insert(startAnim, {func = AnimSay, args = {players[2], loc("It must be the cyborgs again!"), SAY_SAY, 4000}})
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   181
  table.insert(startAnim, {func = AnimSay, args = {players[3], loc("Looks like the whole world is falling apart!"), SAY_SAY, 6000}})
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   182
  table.insert(startAnim, {func = AnimSay, args = {cannibals[1], loc("Look out! We're surrounded by cannibals!"), SAY_SHOUT, 6000}})
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   183
  table.insert(startAnim, {func = AnimCustomFunction, args = {players[4], CondNeedToTurn, {players[4], cannibals[1]}}})
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   184
  table.insert(startAnim, {func = AnimCustomFunction, args = {players[4], CondNeedToTurn, {players[1], cannibals[1]}}})
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   185
  table.insert(startAnim, {func = AnimSay, args = {players[4], loc("Cannibals?! You're the cannibals!"), SAY_SHOUT, 4000}})
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   186
  table.insert(startAnim, {func = AnimSay, args = {cannibals[1], loc("WHAT?! You're the ones attacking us!"), SAY_SHOUT, 5000}})
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   187
  table.insert(startAnim, {func = AnimSay, args = {players[4], loc("You have kidnapped our whole tribe!"), SAY_SHOUT, 4000}})
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   188
  table.insert(startAnim, {func = AnimSay, args = {players[1], loc("You've been assaulting us, we have been just defending ourselves!"), SAY_SHOUT, 8000}})
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   189
  table.insert(startAnim, {func = AnimSay, args = {cannibals[1], loc("I can't believe this!"), SAY_SHOUT, 3000}})
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   190
  table.insert(startAnim, {func = AnimSay, args = {cannibals[1], loc("Have we ever attacked you first?"), SAY_SHOUT, 5000}})
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   191
  table.insert(startAnim, {func = AnimSay, args = {players[4], loc("Yes!"), SAY_SHOUT, 2000}})
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   192
  table.insert(startAnim, {func = AnimSay, args = {cannibals[1], loc("When?"), SAY_SHOUT, 2000}})
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   193
  table.insert(startAnim, {func = AnimSay, args = {players[4], loc("Uhmm...ok no."), SAY_SHOUT, 2000}})
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   194
  table.insert(startAnim, {func = AnimSay, args = {players[1], loc("But you're cannibals. It's what you do."), SAY_SHOUT, 5000}})
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   195
  table.insert(startAnim, {func = AnimSay, args = {cannibals[1], loc("Again with the 'cannibals' thing!"), SAY_SHOUT, 4000}})
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   196
  table.insert(startAnim, {func = AnimSay, args = {cannibals[1], loc("Where do you get that?!"), SAY_SHOUT, 3000}})
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   197
  table.insert(startAnim, {func = AnimSay, args = {players[4], loc("Everyone knows this."), SAY_SHOUT, 2500}})
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   198
  table.insert(startAnim, {func = AnimSay, args = {players[1], loc("I didn't until about a month ago."), SAY_SHOUT, 4000}})
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   199
  table.insert(startAnim, {func = AnimSay, args = {players[4], loc("Hmmm...actually...I didn't either."), SAY_SHOUT, 4000}})
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   200
  table.insert(startAnim, {func = AnimSay, args = {cannibals[1], loc("About a month ago, a cyborg came and told us that you're the cannibals!"), SAY_SHOUT, 8000}})
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   201
  table.insert(startAnim, {func = AnimSay, args = {players[1], loc("A cy-what?"), SAY_SHOUT, 2000}})
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   202
  table.insert(startAnim, {func = AnimSay, args = {cannibals[1], loc("Cyborg. It's what the aliens call themselves."), SAY_SHOUT, 5000}})
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   203
  table.insert(startAnim, {func = AnimSay, args = {cannibals[1], loc("They told us to wear these clothes. They said that this is the newest trend."), SAY_SHOUT, 8000}})
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   204
  table.insert(startAnim, {func = AnimSay, args = {players[1], loc("They've been manipulating us all this time!"), SAY_SHOUT, 5000}})
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   205
  table.insert(startAnim, {func = AnimSay, args = {cannibals[1], loc("They must be trying to weaken us!"), SAY_SHOUT, 5000}})
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   206
  table.insert(startAnim, {func = AnimSay, args = {players[1], loc("We have to unite and defeat those cylergs!"), SAY_SHOUT, 5000}})
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   207
  table.insert(startAnim, {func = AnimSay, args = {cannibals[1], loc("We can't let them take over our little island!"), SAY_SHOUT, 5000}})
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   208
end
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   209
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   210
function RestoreCyborgs(cgi)
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   211
  if cyborgsRestored == true then
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   212
    return
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   213
  end
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   214
  for i = 1, cyborgsNum do
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   215
    RestoreHedge(cyborgs[i])
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   216
    if cgi == true then
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   217
      AnimOutOfNowhere(cyborgs[i], unpack(cyborgsPos[i]))
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   218
    end
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   219
  end
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   220
  RestoreHedge(leader)
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   221
  AnimOutOfNowhere(leader, unpack(leaderPos))
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   222
  cyborgsRestored = true
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   223
end
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   224
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   225
function SetupEnemyStartAnim()
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   226
  local gear
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   227
  table.insert(startAnim, {func = AnimCustomFunction, args = {cannibals[1], RestoreCyborgs, {true}}})
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   228
  if m8EnemyFled == 1 then
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   229
    gear = leader
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   230
  else
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   231
    gear = cyborgs[2]
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   232
  end
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   233
  table.insert(startAnim, {func = AnimCustomFunction, args = {players[1], CondNeedToTurn, {players[4], gear}}})
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   234
  table.insert(startAnim, {func = AnimCustomFunction, args = {players[1], CondNeedToTurn, {players[1], gear}}})
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   235
  table.insert(startAnim, {func = AnimSay, args = {gear, loc("You have finally figured it out!"), SAY_SHOUT, 4500}})
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   236
  table.insert(startAnim, {func = AnimSay, args = {gear, loc("You blood needers are pretty slow, you know!"), SAY_SHOUT, 5500}})
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   237
  table.insert(startAnim, {func = AnimSay, args = {players[1], loc("Why do you want to take over our island?"), SAY_SHOUT, 5500}})
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   238
  table.insert(startAnim, {func = AnimSay, args = {gear, loc("Do you have any idea how valuable grass is?"), SAY_SHOUT, 5500}})
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   239
  table.insert(startAnim, {func = AnimSay, args = {gear, loc("This island is the only place left on Earth with grass on it!"), SAY_SHOUT, 7000}})
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   240
  table.insert(startAnim, {func = AnimSay, args = {gear, loc("It's worth more than wood!"), SAY_SHOUT, 4000}})
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   241
  table.insert(startAnim, {func = AnimSay, args = {gear, loc("That makes it almost invaluable!"), SAY_SHOUT, 4500}})
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   242
  table.insert(startAnim, {func = AnimSay, args = {players[1], loc("We have nowhere else to live!"), SAY_SHOUT, 4500}})
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   243
  table.insert(startAnim, {func = AnimSay, args = {gear, loc("That's not our problem!"), SAY_SHOUT, 4500}})
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   244
  table.insert(startAnim, {func = AnimSay, args = {players[1], loc("We'll give you a problem then!"), SAY_SHOUT, 5000}})
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   245
  table.insert(startAnim, {func = AnimSwitchHog, args = {gear}})
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   246
end
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   247
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   248
function SetupFinalAnim()
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   249
  finalAnim = {
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   250
    {func = AnimGearWait, args = {cyborg, 1000}},
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   251
    {func = AnimSay, args = {cyborg, loc("Nicely done, blood needer!"), SAY_SAY, 3000}},
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   252
    {func = AnimSay, args = {cyborg, loc("You have won the game by proving true cooperative skills!"), SAY_SAY, 7000}},
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   253
    {func = AnimSay, args = {cyborg, loc("You have proven yourselves worthy!"), SAY_SAY, 4000}},
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   254
    {func = AnimSay, args = {players[1], loc("Game? Was this a game to you?!"), SAY_SAY, 4000}},
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   255
    {func = AnimSay, args = {cyborg, loc("Well, yes. This was a cyborg television show."), SAY_SAY, 5500}},
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   256
    {func = AnimSay, args = {cyborg, loc("It is called 'Hogs of Steel'."), SAY_SAY, 4000}},
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   257
    {func = AnimSay, args = {players[1], loc("Are you saying that many of us have died for your entertainment?"), SAY_SAY, 8000}},
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   258
    {func = AnimSay, args = {players[1], loc("Our tribe, our beautiful island!"), SAY_SAY, 4000}},
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   259
    {func = AnimSay, args = {players[1], loc("All gone...everything!"), SAY_SAY, 3000}},
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   260
    {func = AnimSay, args = {cyborg, loc("But the ones alive are stronger in their heart!"), SAY_SAY, 6000}},
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   261
    {func = AnimSay, args = {cyborg, loc("Just kidding, none of you have died!"), SAY_SAY, 5000}},
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   262
    {func = AnimSay, args = {cyborg, loc("I mean, none of you ceased to live."), SAY_SAY, 5000}},
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   263
    {func = AnimSay, args = {cyborg, loc("You'll see what I mean!"), SAY_SAY, 4000}},
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   264
    {func = AnimSay, args = {cyborg, loc("They are all waiting back in the village, haha."), SAY_SAY, 7000}},
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   265
    {func = AnimSay, args = {players[1], loc("You are playing with our lives here!"), SAY_SAY, 6000}},
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   266
    {func = AnimSay, args = {players[1], loc("Do you think you're some kind of god?"), SAY_SAY, 6000}},
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   267
    {func = AnimSay, args = {cyborg, loc("Interesting idea, haha!"), SAY_SAY, 2000}},
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   268
    {func = AnimSwitchHog, args = {players[1]}},
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   269
    {func = AnimWait, args = {players[1], 1}},
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   270
    {func = AnimDisappear, swh = false, args = {cyborg, unpack(cyborgPos[4])}},
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   271
    {func = HideHedge, swh = false, args = {cyborg}},
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   272
    {func = AnimSay, args = {players[1], loc("What a douche!"), SAY_SAY, 2000}},
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   273
  }
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   274
end
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   275
--------------------------Anim skip functions--------------------------
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   276
function SkipStartAnim()
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   277
  RestoreNatives()
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   278
  RestoreCyborgs()
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   279
  SetGearMessage(CurrentHedgehog, 0)
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   280
  AnimSwitchHog(cyborgs[1])
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   281
  AnimWait(cyborg, 1)
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   282
  AddFunction({func = HideHedge, args = {cyborg}})
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   283
end
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   284
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   285
function AfterStartAnim()
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   286
  ShowMission(loc("The Enemy Of My Enemy"), loc("The Union"), loc("Defeat the cyborgs!"), 1, 0)
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   287
  PutWeaponCrates()
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   288
  PutHealthCrates()
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   289
  TurnTimeLeft = 0
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   290
end
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   291
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   292
function PutHealthCrates()
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   293
  for i = 1, 10 do
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   294
    SpawnHealthCrate(0, 0)
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   295
  end
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   296
end
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   297
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   298
function PutWeaponCrates()
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   299
  SpawnAmmoCrate(2399, 622, amNapalm, 2)
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   300
  SpawnAmmoCrate(2199, -18, amBee, 2)
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   301
  SpawnAmmoCrate(2088, 430, amBee, 2)
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   302
  SpawnAmmoCrate(237, 20, amMortar, 4)
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   303
  SpawnAmmoCrate(312, 1107, amMolotov, 3)
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   304
  SpawnAmmoCrate(531, 1123, amWatermelon, 2)
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   305
  SpawnAmmoCrate(1253, 1444, amFlamethrower, 5)
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   306
  SpawnAmmoCrate(994, 1364, amBaseballBat, 3)
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   307
  SpawnAmmoCrate(1104, 1553, amMine, 6)
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   308
  SpawnAmmoCrate(2277, 803, amDynamite, 2)
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   309
  SpawnAmmoCrate(1106, 184, amRCPlane, 3)
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   310
  SpawnAmmoCrate(1333, 28, amSMine, 4)
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   311
  SpawnAmmoCrate(90, 279, amAirAttack, 2)
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   312
  SpawnAmmoCrate(288, 269, amBee, 2)
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   313
  SpawnAmmoCrate(818, 1633, amBaseballBat, 2)
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   314
end
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   315
-----------------------------Events------------------------------------
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   316
function CheckNativesDead()
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   317
  return nativesLeft == 0
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   318
end
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   319
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   320
function CheckCannibalsDead()
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   321
  return cannibalsLeft == 0
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   322
end
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   323
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   324
function CheckPlayersDead()
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   325
  return playersLeft == 0
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   326
end
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   327
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   328
function CheckCyborgsDead()
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   329
  return (cyborgsLeft == 0 and (leader == nil or gearDead[leader] == true))
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   330
end
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   331
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   332
function DoNativesDead()
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   333
  nativesDeadFresh = true
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   334
  TurnTimeLeft = 0
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   335
end
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   336
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   337
function DoCannibalsDead()
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   338
  cannibalsDeadFresh = true
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   339
  TurnTimeLeft = 0
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   340
end
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   341
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   342
function DoPlayersDead()
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   343
  RemoveEventFunc(CheckNativesDead)
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   344
  RemoveEventFunc(CheckCannibalsDead)
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   345
  RemoveEventFunc(CheckCyborgsDead)
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   346
  playersDeadFresh = true
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   347
  TurnTimeLeft = 0
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   348
end
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   349
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   350
function DoCyborgsDead()
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   351
--  RemoveEventFunc(CheckNativesDead)
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   352
--  RemoveEventFunc(CheckCannibalsDead)
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   353
  cyborgsDeadFresh= true
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   354
  TurnTimeLeft = 0
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   355
end
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   356
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   357
function CheckGearsDead(gearList)
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   358
  for i = 1, # gearList do
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   359
    if gearDead[gearList[i]] ~= true then
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   360
      return false
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   361
    end
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   362
  end
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   363
  return true
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   364
end
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   365
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   366
function CheckGearDead(gear)
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   367
  return gearDead[gear]
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   368
end
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   369
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   370
function FailedMission()
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   371
  RestoreHedge(cyborg)
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   372
  AnimOutOfNowhere(cyborg, unpack(cyborgPos[1]))
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   373
  if CheckCyborgsDead() then
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   374
    AnimSay(cyborg, loc("Hmmm...it's a draw. How unfortunate!"), SAY_THINK, 6000)
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   375
  elseif leader ~= nil then
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   376
    CondNeedToTurn2(cyborg, leader)
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   377
    AddAnim({{func = AnimSay, args = {leader, loc("Yay, we won!"), SAY_SAY, 2000}},
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   378
             {func = AnimSay, args = {cyborg, loc("Nice work!"), SAY_SAY, 2000}}})
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   379
  else
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   380
    CondNeedToTurn2(cyborg, cyborgs[1])
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   381
    AddAnim({{func = AnimSay, args = {cyborgs[1], loc("Yay, we won!"), SAY_SAY, 2000}},
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   382
             {func = AnimSay, args = {cyborg, loc("Nice work!"), SAY_SAY, 2000}}})
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   383
  end
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   384
  AddFunction({func = LoseMission, args = {}})
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   385
end
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   386
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   387
function LoseMission()
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   388
  ParseCommand("teamgone " .. loc("Natives"))
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   389
  ParseCommand("teamgone " .. loc("Cannibals"))
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   390
  ParseCommand("teamgone " .. loc("011101001"))
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   391
  TurnTimeLeft = 0
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   392
end
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   393
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   394
function WonMission()
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   395
  RestoreHedge(cyborg)
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   396
  CondNeedToTurn2(cyborg, players[1])
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   397
  SetupFinalAnim()
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   398
  AddAnim(finalAnim)
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   399
  AddFunction({func = WinMission, args = {}})
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   400
end
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   401
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   402
function WinMission()
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   403
  SaveCampaignVar("Progress", "9")
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   404
  ParseCommand("teamgone " .. loc("011101001"))
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   405
  TurnTimeLeft = 0
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   406
end
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   407
-----------------------------Misc--------------------------------------
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   408
function HideHedge(hedge)
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   409
  if hedgeHidden[hedge] ~= true then
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   410
    HideHog(hedge)
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   411
    hedgeHidden[hedge] = true
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   412
  end
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   413
end
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   414
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   415
function RestoreHedge(hedge)
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   416
  if hedgeHidden[hedge] == true then
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   417
    RestoreHog(hedge)
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   418
    hedgeHidden[hedge] = false
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   419
  end
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   420
end
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   421
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   422
function GetVariables()
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   423
  m5DeployedNum = tonumber(GetCampaignVar("M5DeployedNum"))
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   424
  m2Choice = tonumber(GetCampaignVar("M2Choice"))
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   425
  m5Choice = tonumber(GetCampaignVar("M5Choice"))
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   426
  m2DenseDead = tonumber(GetCampaignVar("M2DenseDead"))
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   427
  m4DenseDead = tonumber(GetCampaignVar("M4DenseDead"))
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   428
  m5DenseDead = tonumber(GetCampaignVar("M5DenseDead"))
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   429
  m4LeaksDead = tonumber(GetCampaignVar("M4LeaksDead"))
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   430
  m5LeaksDead = tonumber(GetCampaignVar("M5LeaksDead"))
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   431
  m4ChiefDead = tonumber(GetCampaignVar("M4ChiefDead"))
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   432
  m5ChiefDead = tonumber(GetCampaignVar("M5ChiefDead"))
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   433
  m4WaterDead = tonumber(GetCampaignVar("M4WaterDead"))
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   434
  m5WaterDead = tonumber(GetCampaignVar("M5WaterDead"))
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   435
  m4BuffaloDead = tonumber(GetCampaignVar("M4BuffaloDead"))
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   436
  m5BuffaloDead = tonumber(GetCampaignVar("M5BuffaloDead"))
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   437
  m5WiseDead = tonumber(GetCampaignVar("M5WiseDead"))
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   438
  m5GirlDead = tonumber(GetCampaignVar("M5GirlDead"))
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   439
  m8DeployedDead = tonumber(GetCampaignVar("M8DeployedDead"))
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   440
  m8PrincessDead = tonumber(GetCampaignVar("M8PrincessDead"))
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   441
  m8RamonDead = tonumber(GetCampaignVar("M8RamonDead"))
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   442
  m8SpikyDead = tonumber(GetCampaignVar("M8SpikyDead"))
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   443
  m8DeployedLeader = tonumber(GetCampaignVar("M8DeployedLeader"))
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   444
  m8PrincessLeader = tonumber(GetCampaignVar("M8PrincessLeader"))
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   445
  m8EnemyFled = tonumber(GetCampaignVar("M8EnemyFled"))
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   446
  m8Scene = tonumber(GetCampaignVar("M8Scene"))
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   447
end
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   448
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   449
function SetupPlace()
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   450
  for i = 1, playersNum do
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   451
    HideHedge(players[i])
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   452
  end
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   453
  for i = 1, cyborgsNum do
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   454
    HideHedge(cyborgs[i])
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   455
  end
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   456
  if leader ~= nil then
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   457
    HideHedge(leader)
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   458
  end
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   459
end
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   460
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   461
function SetupEvents()
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   462
  AddNewEvent(CheckPlayersDead, {}, DoPlayersDead, {}, 0)
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   463
  AddNewEvent(CheckNativesDead, {}, DoNativesDead, {}, 0)
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   464
  AddNewEvent(CheckCannibalsDead, {}, DoCannibalsDead, {}, 0)
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   465
  AddNewEvent(CheckCyborgsDead, {}, DoCyborgsDead, {}, 0)
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   466
end
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   467
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   468
function SetupAmmo()
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   469
  AddAmmo(cyborgs[1], amClusterBomb, 100)
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   470
  AddAmmo(cyborgs[1], amMortar, 100)
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   471
  AddAmmo(cyborgs[1], amDynamite, 2)
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   472
  AddAmmo(cyborgs[1], amAirAttack, 2)
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   473
  AddAmmo(cyborgs[1], amTeleport, 100)
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   474
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   475
  if leader ~= nil then
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   476
    AddAmmo(leader, amClusterBomb, 100)
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   477
    AddAmmo(leader, amMortar, 100)
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   478
    AddAmmo(leader, amDynamite, 100)
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   479
    AddAmmo(leader, amAirAttack, 3)
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   480
    AddAmmo(leader, amTeleport, 100)
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   481
  end
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   482
end
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   483
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   484
function AddHogs()
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   485
  AddTeam(loc("011101001"), 14483456, "ring", "UFO", "Robot", "cm_star")
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   486
  cyborg = AddHog(loc("Unit 334a$7%;.*"), 0, 200, "cyborg1")
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   487
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   488
	AddTeam(loc("Natives"), 29439, "Bone", "Island", "HillBilly", "cm_birdy")
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   489
  natives[1] = AddHog(nativeNames[leaksNum], 0, 100, nativeHats[leaksNum])
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   490
  if m5DeployedNum ~= leaksNum and m8DeployedLeader == 0 then
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   491
    natives[2] = AddHog(nativeNames[m5DeployedNum], 0, 100, nativeHats[m5DeployedNum])
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   492
  end
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   493
  table.insert(natives, AddHog(nativeNames[ramonNum], 0, 100, nativeHats[ramonNum]))
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   494
  table.insert(natives, AddHog(nativeNames[spikyNum], 0, 100, nativeHats[spikyNum]))
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   495
  if m8PrincessLeader == 0 then
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   496
    table.insert(natives, AddHog(loc("Fell From Heaven"), 0, 100, "tiara"))
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   497
  end
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   498
  nativesNum = #natives
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   499
  nativesLeft = nativesNum
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   500
  cannibalsLeft = cannibalsNum
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   501
  for i = 1, nativesNum do
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   502
    table.insert(players, natives[i])
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   503
  end
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   504
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   505
	AddTeam(loc("Cannibals"), 29439, "Bone", "Island", "HillBilly", "cm_birdy")
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   506
  for i = 1, cannibalsNum do
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   507
    cannibals[i] = AddHog(cannibalNames[i], 0, 100, "Zombi")
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   508
    table.insert(players, cannibals[i])
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   509
  end
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   510
  playersNum = #players
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   511
  playersLeft = playersNum
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   512
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   513
  AddTeam(loc("Hedge-cogs"), 14483455, "ring", "UFO", "Robot", "cm_star")
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   514
  for i = 1, cyborgsNum do
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   515
    cyborgs[i] = AddHog(cyborgNames[i], 2, 80, "cyborg2")
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   516
  end
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   517
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   518
  if m8EnemyFled == 1 then
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   519
    AddTeam(loc("Leader"), 14483455, "ring", "UFO", "Robot", "cm_star")
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   520
    if m8Scene == denseScene then
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   521
      leader = AddHog(loc("Dense Cloud"), 2, 200, nativeHats[denseNum])
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   522
    elseif m8Scene == waterScene then
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   523
      leader = AddHog(loc("Fiery Water"), 2, 200, nativeHats[waterNum])
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   524
    elseif m8Scene == princessScene then
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   525
      leader = AddHog(loc("Fell From Heaven"), 2, 200, "tiara")
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   526
    else
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   527
      leader = AddHog(loc("Nancy Screw"), 2, 200, "cyborg2")
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   528
    end
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   529
  end
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   530
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   531
  cyborgsLeft = cyborgsNum
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   532
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   533
  for i = 1, nativesNum do
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   534
    AnimSetGearPosition(natives[i], unpack(nativePos[i]))
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   535
    AnimTurn(natives[i], nativeDir[i])
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   536
  end
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   537
  for i = 1, cannibalsNum do
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   538
    AnimSetGearPosition(cannibals[i], unpack(cannibalPos[i]))
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   539
    AnimTurn(cannibals[i], cannibalDir[i])
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   540
  end
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   541
  for i = 1, cyborgsNum do
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   542
    AnimSetGearPosition(cyborgs[i], unpack(cyborgsPos[i]))
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   543
    AnimTurn(cyborgs[i], cyborgsDir[i])
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   544
  end
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   545
  AnimSetGearPosition(cyborg, unpack(cyborgPos[1]))
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   546
  AnimTurn(cyborg, cyborgDir)
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   547
  if leader ~= nil then
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   548
    AnimSetGearPosition(leader, unpack(leaderPos))
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   549
    AnimTurn(leader, leaderDir[i])
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   550
  end
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   551
end
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   552
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   553
-----------------------------Main Functions----------------------------
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   554
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   555
function onGameInit()
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   556
	Seed = 0
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   557
	GameFlags = gfSolidLand
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   558
	TurnTime = 60000 
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   559
	CaseFreq = 0
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   560
	MinesNum = 0
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   561
	MinesTime = 3000
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   562
	Explosives = 0
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   563
	Delay = 10 
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   564
  Map = "Islands"
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   565
	Theme = "EarthRise"
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   566
  SuddenDeathTurns = 20
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   567
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   568
  GetVariables()
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   569
  AnimInit()
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   570
  AddHogs()
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   571
end
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   572
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   573
function onGameStart()
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   574
  SetupAmmo()
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   575
  SetupPlace()
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   576
  AnimationSetup()
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   577
  SetupEvents()
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   578
  AddAnim(startAnim)
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   579
  AddFunction({func = AfterStartAnim, args = {}})
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   580
end
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   581
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   582
function onGameTick()
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   583
  AnimUnWait()
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   584
  if ShowAnimation() == false then
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   585
    return
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   586
  end
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   587
  ExecuteAfterAnimations()
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   588
  CheckEvents()
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   589
end
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   590
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   591
function onGearDelete(gear)
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   592
  gearDead[gear] = true
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   593
  if GetGearType(gear) == gtHedgehog then
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   594
    if GetHogTeamName(gear) == loc("Natives") then
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   595
      for i = 1, nativesLeft do
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   596
        if natives[i] == gear then
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   597
          table.remove(natives, i)
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   598
          table.remove(players, i)
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   599
          nativesLeft = nativesLeft - 1
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   600
          playersLeft = playersLeft - 1
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   601
        end
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   602
      end
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   603
    elseif GetHogTeamName(gear) == loc("Cannibals") then
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   604
      for i = 1, cannibalsLeft do
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   605
        if cannibals[i] == gear then
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   606
          table.remove(cannibals, i)
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   607
          table.remove(players, nativesLeft + i)
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   608
          cannibalsLeft = cannibalsLeft - 1
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   609
          playersLeft = playersLeft - 1
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   610
        end
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   611
      end
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   612
    elseif GetHogTeamName(gear) == loc("Hedge-cogs") then
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   613
      for i = 1, cyborgsLeft do
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   614
        if cyborgs[i] == gear then
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   615
          table.remove(cyborgs, i)
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   616
        end
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   617
      end
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   618
      cyborgsLeft = cyborgsLeft - 1
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   619
    end
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   620
  end
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   621
end
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   622
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   623
function onGearAdd(gear)
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   624
end
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   625
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   626
function onAmmoStoreInit()
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   627
  SetAmmo(amSkip, 9, 0, 0, 0)
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   628
  SetAmmo(amSwitch, 9, 0, 0, 0)
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   629
  SetAmmo(amDEagle, 9, 0, 0, 0)
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   630
  SetAmmo(amSniperRifle, 9, 0, 0, 0)
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   631
  SetAmmo(amBazooka, 8, 0, 0, 0)
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   632
  SetAmmo(amGrenade, 7, 0, 0, 0)
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   633
  SetAmmo(amFirePunch, 9, 0, 0, 0)
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   634
  SetAmmo(amShotgun, 9, 0, 0, 0)
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   635
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   636
  SetAmmo(amParachute, 9, 0, 0, 0)
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   637
  SetAmmo(amRope, 9, 0, 0, 0)
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   638
  SetAmmo(amPickHammer, 9, 0, 0, 0)
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   639
  SetAmmo(amBlowTorch, 9, 0, 0, 0)
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   640
end
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   641
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   642
function onNewTurn()
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   643
  if AnimInProgress() then
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   644
    TurnTimeLeft = -1
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   645
    return
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   646
  end
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   647
  if playersDeadFresh then
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   648
    playersDeadFresh = false
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   649
    FailedMission()
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   650
  elseif cyborgsDeadFresh then
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   651
    cyborgsDeadFresh = false
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   652
    WonMission()
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   653
  elseif nativesDeadFresh and GetHogTeamName(CurrentHedgehog) == loc("Cannibals") then
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   654
    AnimSay(CurrentHedgehog, loc("Your deaths will be avenged, cannibals!"), SAY_SHOUT, 0)
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   655
    nativesDeadFresh = false
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   656
  elseif cannibalsDeadFresh and GetHogTeamName(CurrentHedgehog) == loc("Natives") then
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   657
    AnimSay(CurrentHedgehog, loc("Your deaths will be avenged, cannibals!"), SAY_SHOUT, 0)
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   658
    cannibalsDeadFresh = false
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   659
  end
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   660
end
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   661
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   662
function onGearDamage(gear, damage)
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   663
end
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   664
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   665
function onPrecise()
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   666
  if GameTime > 3000 and AnimInProgress() then
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   667
    SetAnimSkip(true)
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   668
  end
d32d573aeb64 Forgot to add mission 9 -.-'
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   669
end