share/hedgewars/Data/Missions/Campaign/A_Classic_Fairytale/queen.lua
author Wuzzy <almikes@aol.com>
Sun, 16 Apr 2017 02:02:07 +0200
changeset 12264 41542ed28fe4
parent 12049 030464f34d47
child 12362 f57053c4551d
permissions -rw-r--r--
Allow the diaogues in ACF missions 8 and 10 to be translated
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
8043
da083f8d95e6 We need custom script loading function in lua now
unc0rr
parents: 7675
diff changeset
     1
HedgewarsScriptLoad("/Scripts/Locale.lua")
da083f8d95e6 We need custom script loading function in lua now
unc0rr
parents: 7675
diff changeset
     2
HedgewarsScriptLoad("/Scripts/Animate.lua")
7443
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
     3
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
     4
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
     5
-----------------------------Map--------------------------------------
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
     6
local map =
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
     7
{
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
     8
	"\16\7\0\225\132\15\200\1\40\0\15\200\1\40\132\15\105\8\81\0\16\14\1\64\143\15\200\7\249\0\13\50\7\252\132\12\243\7\172\0",
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
     9
	"\12\236\7\168\132\12\127\6\192\0\12\127\6\192\132\11\52\6\223\0\11\52\6\223\132\10\62\8\35\0\8\201\8\4\132\8\63\7\126\0",
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    10
	"\8\63\7\126\132\8\4\6\58\0\8\0\6\65\132\7\147\6\241\0\7\133\6\195\132\7\20\4\151\0\7\143\6\195\132\7\140\6\234\0",
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    11
	"\7\17\4\151\132\5\191\4\222\0\5\191\4\222\132\3\136\3\252\0\3\136\3\252\132\2\12\4\151\0\2\12\4\151\132\1\138\5\15\0",
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    12
	"\1\138\5\15\132\1\54\5\156\0\1\54\5\156\132\0\130\5\64\0\0\130\5\64\132\255\214\5\135\0\8\141\1\85\179\8\141\1\85\0",
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    13
	"\10\30\2\220\139\10\30\2\220\0\11\77\1\142\131\11\77\1\142\0\10\188\0\113\129\10\188\0\113\0\255\235\0\162\132\0\130\0\225\0",
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    14
	"\0\130\0\229\0\0\127\0\236\132\255\231\0\250\0\0\28\0\215\136\0\4\0\211\0\0\95\5\212\154\0\95\7\238\0\0\246\6\2\154",
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    15
	"\1\71\8\0\0\1\205\5\145\154\2\132\4\239\0\3\98\4\141\154\1\135\5\216\0\3\179\4\151\154\6\213\5\247\0\6\223\5\124\151",
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    16
	"\6\185\5\22\0\6\181\5\29\151\6\37\5\64\0\0\179\5\198\148\0\179\5\198\0\6\216\4\253\148\6\216\4\253\0\1\230\7\147\153",
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    17
	"\8\32\8\18\0\1\187\6\174\153\7\179\7\108\0\2\199\5\177\179\6\128\6\167\0\7\231\7\10\143\7\231\6\202\0\12\148\8\4\156",
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    18
	"\10\241\8\11\0\11\112\7\101\156\12\56\7\91\0\1\89\5\223\199\4\11\5\208\0\4\67\5\212\200\4\172\6\58\0\4\172\6\58\200",
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    19
	"\5\36\5\212\0\5\40\5\194\200\4\169\5\57\0\4\169\5\57\200\4\42\5\205\0\4\130\5\142\200\4\218\5\205\0\4\137\5\194\200",
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    20
	"\4\179\5\251\0\255\245\1\198\133\0\77\1\198\0\0\77\1\198\133\0\102\1\226\0\0\102\1\230\133\255\221\1\244\0\255\245\0\148\195",
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    21
	"\255\231\1\11\0\0\32\0\162\195\255\231\0\169\0\0\60\0\158\195\0\32\0\172\0\0\21\0\176\195\255\242\0\222\0\255\245\0\215\195",
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    22
	"\0\7\0\246\0\255\245\0\243\195\0\11\1\33\0\0\4\1\4\195\0\56\1\36\0\255\245\1\173\195\0\35\1\110\0\255\242\1\180\195",
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    23
	"\255\224\2\9\0\255\238\1\240\195\0\28\2\30\0\0\21\2\19\195\0\102\2\23\0\16\18\1\1\195\16\35\0\222\0\16\14\1\11\195",
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    24
	"\16\7\2\9\0\16\0\2\16\195\16\35\3\34\0\16\11\2\252\195\16\11\4\208\0\16\11\4\208\195\16\0\6\55\0\16\0\6\55\195",
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    25
	"\16\14\8\25\0",
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    26
}
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    27
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    28
--------------------------------------------Constants------------------------------------
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    29
choiceAccepted = 1
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    30
choiceRefused = 2
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    31
choiceAttacked = 3
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    32
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    33
choiceEliminate = 1
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    34
choiceSpare = 2
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    35
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    36
leaksNum = 1
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    37
denseNum = 2
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    38
waterNum = 3
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    39
buffaloNum = 4
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    40
chiefNum = 5
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    41
girlNum = 6
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    42
wiseNum = 7
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    43
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    44
denseScene = 1
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    45
princessScene = 2
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    46
waterScene = 3
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    47
cyborgScene = 4
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    48
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    49
nativeNames = {loc("Leaks A Lot"), loc("Dense Cloud"), loc("Fiery Water"), 
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    50
               loc("Raging Buffalo"), loc("Righteous Beard"), loc("Fell From Grace"),
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    51
               loc("Wise Oak"), loc("Ramon"), loc("Spiky Cheese")
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    52
              }
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    53
nativeSaveNames = {"M8DeployedDead", "M8RamonDead", "M8SpikyDead", "M8PrincessDead"}
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    54
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    55
nativeUnNames = {loc("Zork"), loc("Steve"), loc("Jack"),
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    56
                 loc("Lee"), loc("Elmo"), loc("Rachel"),
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    57
                 loc("Muriel")}
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    58
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    59
nativeHats = {"Rambo", "RobinHood", "pirate_jack", "zoo_Bunny", "IndianChief",
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    60
              "tiara", "AkuAku", "rasta", "hair_yellow"}
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    61
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    62
nativePos = {{1474, 1188}, {923, 986}, {564, 1120}, {128, 1315}}
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    63
nativesNum = 4
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    64
nativesLeft = 4
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    65
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    66
cyborgNames = {loc("Artur Detour"), loc("Led Heart"), loc("Orlando Boom!"), loc("Nilarian"), 
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    67
               loc("Steel Eye"), loc("Rusty Joe"), loc("Hatless Jerry"), loc("Gas Gargler")}
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    68
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    69
cyborgsDif = {2, 2, 2, 2, 2, 2, 2, 2}
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    70
cyborgsHealth = {100, 100, 100, 100, 100, 100, 100, 100}
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    71
cyborgPos = {1765, 1145}
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    72
cyborgsTeamNum = {4, 3}
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    73
cyborgsNum = 7
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    74
cyborgsPos = {{2893, 1717}, {2958, 1701}, {3027, 1696}, {3096, 1698},
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    75
              {2584, 655},  {2047, 1534}, {115, 179}, {2162, 1916}}
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    76
cyborgsDir = {"Left", "Left", "Left", "Left", "Left", "Left", "Right", "Left"}
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    77
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    78
crateConsts = {}
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    79
reactions = {}
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    80
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    81
enemyPos = {4078, 195}
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    82
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    83
-----------------------------Variables---------------------------------
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    84
natives = {}
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    85
origNatives = {}
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    86
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    87
cyborgs = {}
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    88
cyborg = nil
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    89
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    90
gearDead = {}
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    91
hedgeHidden = {}
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    92
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    93
scene = 0
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    94
enemyFled = "0"
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    95
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    96
deployedLeader = "0"
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    97
princessLeader = "0"
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    98
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    99
startAnim = {}
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   100
fleeAnim = {}
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   101
finalAnim = {}
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   102
leaderDeadAnim = {}
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   103
-----------------------------Animations--------------------------------
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   104
function EmitDenseClouds(dir)
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   105
  local dif
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   106
  if dir == "Left" then
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   107
    dif = 10
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   108
  else
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   109
    dif = -10
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   110
  end
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   111
  if dir == nil then
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   112
    dx, dy = GetGearVelocity(dense)
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   113
    if dx < 0 then 
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   114
      dif = 10
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   115
    else 
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   116
      dif = -10
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   117
    end
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   118
  end
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   119
  AnimInsertStepNext({func = AnimVisualGear, args = {dense, GetX(dense) + dif, GetY(dense) + dif, vgtSteam, 0, true}, swh = false})
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   120
  AnimInsertStepNext({func = AnimVisualGear, args = {dense, GetX(dense) + dif, GetY(dense) + dif, vgtSteam, 0, true}, swh = false})
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   121
  AnimInsertStepNext({func = AnimVisualGear, args = {dense, GetX(dense) + dif, GetY(dense) + dif, vgtSteam, 0, true}, swh = false})
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   122
  AnimInsertStepNext({func = AnimWait, args = {dense, 800}})
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   123
  AnimInsertStepNext({func = AnimVisualGear, args = {dense, GetX(dense) + dif, GetY(dense) + dif, vgtSteam, 0, true}, swh = false})
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   124
  AnimInsertStepNext({func = AnimVisualGear, args = {dense, GetX(dense) + dif, GetY(dense) + dif, vgtSteam, 0, true}, swh = false})
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   125
  AnimInsertStepNext({func = AnimWait, args = {dense, 800}})
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   126
  AnimInsertStepNext({func = AnimVisualGear, args = {dense, GetX(dense) + dif, GetY(dense) + dif, vgtSteam, 0, true}, swh = false})
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   127
end
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   128
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   129
function AnimationSetup()
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   130
  table.insert(startAnim, {func = AnimWait, args = {enemy, 3000}})
12264
41542ed28fe4 Allow the diaogues in ACF missions 8 and 10 to be translated
Wuzzy <almikes@aol.com>
parents: 12049
diff changeset
   131
  table.insert(startAnim, {func = AnimCaption, swh = false, args = {natives[1], loc("The team continued their quest of finding the rest of the tribe."), 4000}})
41542ed28fe4 Allow the diaogues in ACF missions 8 and 10 to be translated
Wuzzy <almikes@aol.com>
parents: 12049
diff changeset
   132
  table.insert(startAnim, {func = AnimCaption, swh = false, args = {natives[1], loc("They stumbled upon a pile of weapons, they seemed to be getting closer."), 4500}})
7443
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   133
  if scene == denseScene then
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   134
    if m5DeployedNum == denseNum then
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   135
      deployedLeader = "1"
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   136
      SetupDenseAnimDeployed()
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   137
    else
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   138
      SetupDenseAnim()
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   139
    end
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   140
  elseif scene == waterScene then
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   141
    if m5DeployedNum == waterNum then
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   142
      deployedLeader = "1"
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   143
      SetupWaterAnimDeployed()
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   144
    else
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   145
      SetupWaterAnim()
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   146
    end
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   147
  elseif scene == princessScene then
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   148
    princessLeader = "1"
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   149
    SetupPrincessAnim()
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   150
  else
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   151
    SetupCyborgAnim()
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   152
  end
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   153
7454
ce7d7138b436 Modified final cutscene and fixed a skipping bug
belphegorr <szabibibi@gmail.com>
parents: 7451
diff changeset
   154
  AddSkipFunction(startAnim, SkipAnim, {startAnim})
ce7d7138b436 Modified final cutscene and fixed a skipping bug
belphegorr <szabibibi@gmail.com>
parents: 7451
diff changeset
   155
  AddSkipFunction(fleeAnim, SkipAnim, {fleeAnim})
ce7d7138b436 Modified final cutscene and fixed a skipping bug
belphegorr <szabibibi@gmail.com>
parents: 7451
diff changeset
   156
  AddSkipFunction(leaderDeadAnim, SkipAnim, {leaderDeadAnim})
7443
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   157
end
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   158
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   159
function SetupLeaderDeadAnim()
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   160
  local gear = nil
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   161
  if CheckCyborgsDead() then
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   162
    return
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   163
  end
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   164
  for i = nativesLeft, 1, -1 do
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   165
    if band(GetState(natives[i]), gstDrowning) == 0 then
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   166
      gear = natives[i]
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   167
    end
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   168
  end
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   169
  if gear == nil then
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   170
    return
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   171
  end
7475
7b18314bed2b Added a FollowGear to the leaderDead animation in mission 9
belphegorr <szabibibi@gmail.com>
parents: 7454
diff changeset
   172
  table.insert(leaderDeadAnim, {func = AnimFollowGear, args = {gear}})
12264
41542ed28fe4 Allow the diaogues in ACF missions 8 and 10 to be translated
Wuzzy <almikes@aol.com>
parents: 12049
diff changeset
   173
  table.insert(leaderDeadAnim, {func = AnimSay, args = {gear, loc("That traitor won't be killing us anymore!"), SAY_THINK, 6000}})
7443
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   174
end
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   175
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   176
function SetupDenseAnim()
12264
41542ed28fe4 Allow the diaogues in ACF missions 8 and 10 to be translated
Wuzzy <almikes@aol.com>
parents: 12049
diff changeset
   177
  table.insert(startAnim, {func = AnimSay, args = {enemy, loc("Yo, dude! Get away from our weapons!"), SAY_SHOUT, 5500}})
41542ed28fe4 Allow the diaogues in ACF missions 8 and 10 to be translated
Wuzzy <almikes@aol.com>
parents: 12049
diff changeset
   178
  table.insert(startAnim, {func = AnimSay, args = {natives[1], loc("Dense Cloud?! What are you doing?!"), SAY_SHOUT, 5500}})
41542ed28fe4 Allow the diaogues in ACF missions 8 and 10 to be translated
Wuzzy <almikes@aol.com>
parents: 12049
diff changeset
   179
  table.insert(startAnim, {func = AnimSay, args = {enemy, loc("What does it look like?"), SAY_SHOUT, 3500}})
41542ed28fe4 Allow the diaogues in ACF missions 8 and 10 to be translated
Wuzzy <almikes@aol.com>
parents: 12049
diff changeset
   180
  table.insert(startAnim, {func = AnimSay, args = {natives[1], loc("Are you helping the aliens?"), SAY_SHOUT, 4000}})
41542ed28fe4 Allow the diaogues in ACF missions 8 and 10 to be translated
Wuzzy <almikes@aol.com>
parents: 12049
diff changeset
   181
  table.insert(startAnim, {func = AnimSay, args = {enemy, loc("Haha, I love the look on your face!"), SAY_SHOUT, 5000}})
41542ed28fe4 Allow the diaogues in ACF missions 8 and 10 to be translated
Wuzzy <almikes@aol.com>
parents: 12049
diff changeset
   182
  table.insert(startAnim, {func = AnimSay, args = {enemy, loc("Did you really think that I've changed?"), SAY_SHOUT, 5500}})
41542ed28fe4 Allow the diaogues in ACF missions 8 and 10 to be translated
Wuzzy <almikes@aol.com>
parents: 12049
diff changeset
   183
  table.insert(startAnim, {func = AnimSay, args = {natives[1], loc("But why did you betray us?!"), SAY_SHOUT, 4000}})
41542ed28fe4 Allow the diaogues in ACF missions 8 and 10 to be translated
Wuzzy <almikes@aol.com>
parents: 12049
diff changeset
   184
  table.insert(startAnim, {func = AnimSay, args = {enemy, loc("Yo, the aliens gave me plants. Medicinal plants. Lots of it."), SAY_SHOUT, 6500}})
41542ed28fe4 Allow the diaogues in ACF missions 8 and 10 to be translated
Wuzzy <almikes@aol.com>
parents: 12049
diff changeset
   185
  table.insert(startAnim, {func = AnimSay, args = {enemy, loc("You never give me plants!"), SAY_SHOUT, 5500}})
41542ed28fe4 Allow the diaogues in ACF missions 8 and 10 to be translated
Wuzzy <almikes@aol.com>
parents: 12049
diff changeset
   186
  table.insert(startAnim, {func = AnimSay, args = {enemy, loc("Besides, why would I choose certain death?"), SAY_SHOUT, 5500}})
41542ed28fe4 Allow the diaogues in ACF missions 8 and 10 to be translated
Wuzzy <almikes@aol.com>
parents: 12049
diff changeset
   187
  table.insert(startAnim, {func = AnimSay, args = {enemy, loc("Do you have any idea how bad an exploding arrow hurts?"), SAY_SHOUT, 5500}})
41542ed28fe4 Allow the diaogues in ACF missions 8 and 10 to be translated
Wuzzy <almikes@aol.com>
parents: 12049
diff changeset
   188
  table.insert(startAnim, {func = AnimSay, args = {enemy, loc("Dude, it's unbearable!"), SAY_SHOUT, 5500}})
41542ed28fe4 Allow the diaogues in ACF missions 8 and 10 to be translated
Wuzzy <almikes@aol.com>
parents: 12049
diff changeset
   189
  table.insert(startAnim, {func = AnimSay, args = {natives[1], loc("You're a coward!"), SAY_SHOUT, 3000}})
41542ed28fe4 Allow the diaogues in ACF missions 8 and 10 to be translated
Wuzzy <almikes@aol.com>
parents: 12049
diff changeset
   190
  table.insert(startAnim, {func = AnimSay, args = {natives[1], loc("You endangered your whole tribe, you bastard!"), SAY_SHOUT, 7000}})
41542ed28fe4 Allow the diaogues in ACF missions 8 and 10 to be translated
Wuzzy <almikes@aol.com>
parents: 12049
diff changeset
   191
  table.insert(startAnim, {func = AnimSay, args = {enemy, loc("Yeah, well, for some dude to be happy, some other dude has to suffer."), SAY_SHOUT, 11000}})
41542ed28fe4 Allow the diaogues in ACF missions 8 and 10 to be translated
Wuzzy <almikes@aol.com>
parents: 12049
diff changeset
   192
  table.insert(startAnim, {func = AnimSay, args = {enemy, loc("That's just the way it works, you know."), SAY_SHOUT, 6500}})
41542ed28fe4 Allow the diaogues in ACF missions 8 and 10 to be translated
Wuzzy <almikes@aol.com>
parents: 12049
diff changeset
   193
  table.insert(startAnim, {func = AnimSay, args = {natives[1], loc("You're some piece of hypocrite junkie!"), SAY_SHOUT, 6000}})
41542ed28fe4 Allow the diaogues in ACF missions 8 and 10 to be translated
Wuzzy <almikes@aol.com>
parents: 12049
diff changeset
   194
  table.insert(startAnim, {func = AnimSay, args = {enemy, loc("Why do you always have to call me names?"), SAY_SHOUT, 6000}})
7443
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   195
  table.insert(startAnim, {func = AnimCustomFunction, args = {enemy, EmitDenseClouds, {}}})
12264
41542ed28fe4 Allow the diaogues in ACF missions 8 and 10 to be translated
Wuzzy <almikes@aol.com>
parents: 12049
diff changeset
   196
  table.insert(startAnim, {func = AnimSay, args = {enemy, loc("Make fun of me when I fart …"), SAY_SHOUT, 5000}})
41542ed28fe4 Allow the diaogues in ACF missions 8 and 10 to be translated
Wuzzy <almikes@aol.com>
parents: 12049
diff changeset
   197
  table.insert(startAnim, {func = AnimSay, args = {enemy, loc("IT'S A SERIOUS MEDICAL CONDITION!"), SAY_SHOUT, 5000}})
41542ed28fe4 Allow the diaogues in ACF missions 8 and 10 to be translated
Wuzzy <almikes@aol.com>
parents: 12049
diff changeset
   198
  table.insert(startAnim, {func = AnimSay, args = {enemy, loc("You don't deserve my sacrifice!"), SAY_SHOUT, 5000}})
41542ed28fe4 Allow the diaogues in ACF missions 8 and 10 to be translated
Wuzzy <almikes@aol.com>
parents: 12049
diff changeset
   199
  table.insert(startAnim, {func = AnimSay, args = {natives[1], loc("I won't let you kill the tribe!"), SAY_SHOUT, 5000}})
7443
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   200
12264
41542ed28fe4 Allow the diaogues in ACF missions 8 and 10 to be translated
Wuzzy <almikes@aol.com>
parents: 12049
diff changeset
   201
  table.insert(fleeAnim, {func = AnimSay, args = {enemy, loc("Dude, this is boring!"), SAY_SAY, 3000}})
41542ed28fe4 Allow the diaogues in ACF missions 8 and 10 to be translated
Wuzzy <almikes@aol.com>
parents: 12049
diff changeset
   202
  table.insert(fleeAnim, {func = AnimSay, args = {enemy, loc("I ain't gonna sit around no more!"), SAY_SAY, 5000}})
41542ed28fe4 Allow the diaogues in ACF missions 8 and 10 to be translated
Wuzzy <almikes@aol.com>
parents: 12049
diff changeset
   203
7443
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   204
  table.insert(fleeAnim, {func = AnimTurn, args = {enemy, "Right"}})
12264
41542ed28fe4 Allow the diaogues in ACF missions 8 and 10 to be translated
Wuzzy <almikes@aol.com>
parents: 12049
diff changeset
   205
  table.insert(fleeAnim, {func = AnimSay, args = {enemy, loc("Yo, escort my buttocks!"), SAY_SHOUT, 3500}})
7443
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   206
  table.insert(fleeAnim, {func = AnimSwitchHog, args = {natives[1]}})
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   207
  table.insert(fleeAnim, {func = AnimWait, args = {natives[1], 1}})
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   208
  table.insert(fleeAnim, {func = AnimDisappear, swh = false, args = {enemy, 0, 0}})
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   209
end
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   210
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   211
function SetupDenseAnimDeployed()
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   212
  table.insert(startAnim, {func = AnimCustomFunction, args = {enemy, EmitDenseClouds, {}}})
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   213
  table.insert(startAnim, {func = AnimCustomFunction, args = {enemy, CondNeedToTurn, {natives[3], enemy}}})
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   214
  table.insert(startAnim, {func = AnimCustomFunction, args = {enemy, CondNeedToTurn, {natives[2], enemy}}})
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   215
  table.insert(startAnim, {func = AnimCustomFunction, args = {enemy, CondNeedToTurn, {natives[1], enemy}}})
12264
41542ed28fe4 Allow the diaogues in ACF missions 8 and 10 to be translated
Wuzzy <almikes@aol.com>
parents: 12049
diff changeset
   216
  table.insert(startAnim, {func = AnimSay, args = {enemy, loc("I'm afraid I can't let you proceed!"), SAY_SHOUT, 5000}})
41542ed28fe4 Allow the diaogues in ACF missions 8 and 10 to be translated
Wuzzy <almikes@aol.com>
parents: 12049
diff changeset
   217
  table.insert(startAnim, {func = AnimSay, args = {natives[1], loc("Huh?"), SAY_THINK, 0}})
41542ed28fe4 Allow the diaogues in ACF missions 8 and 10 to be translated
Wuzzy <almikes@aol.com>
parents: 12049
diff changeset
   218
  table.insert(startAnim, {func = AnimSay, args = {natives[2], loc("What the?"), SAY_THINK, 0}})
41542ed28fe4 Allow the diaogues in ACF missions 8 and 10 to be translated
Wuzzy <almikes@aol.com>
parents: 12049
diff changeset
   219
  table.insert(startAnim, {func = AnimSay, args = {natives[3], loc("Why?"), SAY_THINK, 1000}})
41542ed28fe4 Allow the diaogues in ACF missions 8 and 10 to be translated
Wuzzy <almikes@aol.com>
parents: 12049
diff changeset
   220
  table.insert(startAnim, {func = AnimSay, args = {enemy, loc("Dude, wow, you're so cute!"), SAY_SHOUT, 4000}})
41542ed28fe4 Allow the diaogues in ACF missions 8 and 10 to be translated
Wuzzy <almikes@aol.com>
parents: 12049
diff changeset
   221
  table.insert(startAnim, {func = AnimSay, args = {enemy, loc("Did you really think I've changed?"), SAY_SHOUT, 4500}})
41542ed28fe4 Allow the diaogues in ACF missions 8 and 10 to be translated
Wuzzy <almikes@aol.com>
parents: 12049
diff changeset
   222
  table.insert(startAnim, {func = AnimSay, args = {enemy, loc("I'm still with the aliens."), SAY_SHOUT, 4000}})
7443
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   223
  table.insert(startAnim, {func = AnimTeleportGear, args = {enemy, unpack(enemyPos)}})
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   224
  table.insert(startAnim, {func = AnimCustomFunction, args = {enemy, CondNeedToTurn, {natives[1], enemy}}})
12264
41542ed28fe4 Allow the diaogues in ACF missions 8 and 10 to be translated
Wuzzy <almikes@aol.com>
parents: 12049
diff changeset
   225
  table.insert(startAnim, {func = AnimSay, args = {natives[1], loc("What?!"), SAY_THINK, 1000}})
41542ed28fe4 Allow the diaogues in ACF missions 8 and 10 to be translated
Wuzzy <almikes@aol.com>
parents: 12049
diff changeset
   226
  table.insert(startAnim, {func = AnimSay, args = {natives[3], loc("But you saved me!"), SAY_THINK, 2500}})
41542ed28fe4 Allow the diaogues in ACF missions 8 and 10 to be translated
Wuzzy <almikes@aol.com>
parents: 12049
diff changeset
   227
  table.insert(startAnim, {func = AnimSay, args = {enemy, loc("Haha, that was just a coincidence!"), SAY_SHOUT, 4000}})
41542ed28fe4 Allow the diaogues in ACF missions 8 and 10 to be translated
Wuzzy <almikes@aol.com>
parents: 12049
diff changeset
   228
  table.insert(startAnim, {func = AnimSay, args = {enemy, loc("I was heading home, you see!"), SAY_SHOUT, 3500}})
41542ed28fe4 Allow the diaogues in ACF missions 8 and 10 to be translated
Wuzzy <almikes@aol.com>
parents: 12049
diff changeset
   229
  table.insert(startAnim, {func = AnimSay, args = {natives[1], loc("We were your home! Your family!"), SAY_SHOUT, 4000}})
41542ed28fe4 Allow the diaogues in ACF missions 8 and 10 to be translated
Wuzzy <almikes@aol.com>
parents: 12049
diff changeset
   230
  table.insert(startAnim, {func = AnimSay, args = {natives[1], loc("How could you betray us?"), SAY_SHOUT, 4000}})
41542ed28fe4 Allow the diaogues in ACF missions 8 and 10 to be translated
Wuzzy <almikes@aol.com>
parents: 12049
diff changeset
   231
  table.insert(startAnim, {func = AnimSay, args = {enemy, loc("Yo, the aliens gave me plants. Medicinal plants. Lots of it."), SAY_SHOUT, 6500}})
41542ed28fe4 Allow the diaogues in ACF missions 8 and 10 to be translated
Wuzzy <almikes@aol.com>
parents: 12049
diff changeset
   232
  table.insert(startAnim, {func = AnimSay, args = {enemy, loc("You never give me plants!"), SAY_SHOUT, 5500}})
41542ed28fe4 Allow the diaogues in ACF missions 8 and 10 to be translated
Wuzzy <almikes@aol.com>
parents: 12049
diff changeset
   233
  table.insert(startAnim, {func = AnimSay, args = {enemy, loc("Besides, why would I choose certain death?"), SAY_SHOUT, 5500}})
41542ed28fe4 Allow the diaogues in ACF missions 8 and 10 to be translated
Wuzzy <almikes@aol.com>
parents: 12049
diff changeset
   234
  table.insert(startAnim, {func = AnimSay, args = {enemy, loc("Do you have any idea how bad an exploding arrow hurts?"), SAY_SHOUT, 5500}})
41542ed28fe4 Allow the diaogues in ACF missions 8 and 10 to be translated
Wuzzy <almikes@aol.com>
parents: 12049
diff changeset
   235
  table.insert(startAnim, {func = AnimSay, args = {enemy, loc("Dude, it's unbearable!"), SAY_SHOUT, 5500}})
41542ed28fe4 Allow the diaogues in ACF missions 8 and 10 to be translated
Wuzzy <almikes@aol.com>
parents: 12049
diff changeset
   236
  table.insert(startAnim, {func = AnimSay, args = {natives[1], loc("You're a coward!"), SAY_SHOUT, 3000}})
41542ed28fe4 Allow the diaogues in ACF missions 8 and 10 to be translated
Wuzzy <almikes@aol.com>
parents: 12049
diff changeset
   237
  table.insert(startAnim, {func = AnimSay, args = {natives[1], loc("You endangered your whole tribe, you bastard!"), SAY_SHOUT, 7000}})
41542ed28fe4 Allow the diaogues in ACF missions 8 and 10 to be translated
Wuzzy <almikes@aol.com>
parents: 12049
diff changeset
   238
  table.insert(startAnim, {func = AnimSay, args = {enemy, loc("Yeah, well, for some dude to be happy, some other dude has to suffer."), SAY_SHOUT, 11000}})
41542ed28fe4 Allow the diaogues in ACF missions 8 and 10 to be translated
Wuzzy <almikes@aol.com>
parents: 12049
diff changeset
   239
  table.insert(startAnim, {func = AnimSay, args = {enemy, loc("That's just the way it works, you know."), SAY_SHOUT, 6500}})
41542ed28fe4 Allow the diaogues in ACF missions 8 and 10 to be translated
Wuzzy <almikes@aol.com>
parents: 12049
diff changeset
   240
  table.insert(startAnim, {func = AnimSay, args = {natives[1], loc("You're some piece of hypocrite junkie!"), SAY_SHOUT, 6000}})
41542ed28fe4 Allow the diaogues in ACF missions 8 and 10 to be translated
Wuzzy <almikes@aol.com>
parents: 12049
diff changeset
   241
  table.insert(startAnim, {func = AnimSay, args = {enemy, loc("Why do you always have to call me names?"), SAY_SHOUT, 6000}})
7443
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   242
  table.insert(startAnim, {func = AnimCustomFunction, args = {enemy, EmitDenseClouds, {}}})
12264
41542ed28fe4 Allow the diaogues in ACF missions 8 and 10 to be translated
Wuzzy <almikes@aol.com>
parents: 12049
diff changeset
   243
  table.insert(startAnim, {func = AnimSay, args = {enemy, loc("Make fun of me when I fart …"), SAY_SHOUT, 5000}})
41542ed28fe4 Allow the diaogues in ACF missions 8 and 10 to be translated
Wuzzy <almikes@aol.com>
parents: 12049
diff changeset
   244
  table.insert(startAnim, {func = AnimSay, args = {enemy, loc("IT'S A SERIOUS MEDICAL CONDITION!"), SAY_SHOUT, 5000}})
41542ed28fe4 Allow the diaogues in ACF missions 8 and 10 to be translated
Wuzzy <almikes@aol.com>
parents: 12049
diff changeset
   245
  table.insert(startAnim, {func = AnimSay, args = {enemy, loc("You don't deserve my sacrifice!"), SAY_SHOUT, 5000}})
41542ed28fe4 Allow the diaogues in ACF missions 8 and 10 to be translated
Wuzzy <almikes@aol.com>
parents: 12049
diff changeset
   246
  table.insert(startAnim, {func = AnimSay, args = {natives[1], loc("I won't let you kill the tribe!"), SAY_SHOUT, 5000}})
7443
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   247
12264
41542ed28fe4 Allow the diaogues in ACF missions 8 and 10 to be translated
Wuzzy <almikes@aol.com>
parents: 12049
diff changeset
   248
  table.insert(fleeAnim, {func = AnimSay, args = {enemy, loc("Dude, this is boring!"), SAY_SAY, 3000}})
41542ed28fe4 Allow the diaogues in ACF missions 8 and 10 to be translated
Wuzzy <almikes@aol.com>
parents: 12049
diff changeset
   249
  table.insert(fleeAnim, {func = AnimSay, args = {enemy, loc("I ain't gonna sit around no more!"), SAY_SAY, 5000}})
7443
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   250
  table.insert(fleeAnim, {func = AnimTurn, args = {enemy, "Right"}})
12264
41542ed28fe4 Allow the diaogues in ACF missions 8 and 10 to be translated
Wuzzy <almikes@aol.com>
parents: 12049
diff changeset
   251
  table.insert(fleeAnim, {func = AnimSay, args = {enemy, loc("Yo, escort my buttocks!"), SAY_SHOUT, 3500}})
7443
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   252
  table.insert(fleeAnim, {func = AnimSwitchHog, args = {natives[1]}})
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   253
  table.insert(fleeAnim, {func = AnimWait, args = {natives[1], 1}})
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   254
  table.insert(fleeAnim, {func = AnimDisappear, swh = false, args = {enemy, 0, 0}})
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   255
end
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   256
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   257
function SetupWaterAnim()
12264
41542ed28fe4 Allow the diaogues in ACF missions 8 and 10 to be translated
Wuzzy <almikes@aol.com>
parents: 12049
diff changeset
   258
  table.insert(startAnim, {func = AnimSay, args = {enemy, loc("Stay there, comrades!"), SAY_SHOUT, 2500}})
41542ed28fe4 Allow the diaogues in ACF missions 8 and 10 to be translated
Wuzzy <almikes@aol.com>
parents: 12049
diff changeset
   259
  table.insert(startAnim, {func = AnimSay, args = {enemy, loc("Come closer and die! … burp …"), SAY_SHOUT, 4000}})
41542ed28fe4 Allow the diaogues in ACF missions 8 and 10 to be translated
Wuzzy <almikes@aol.com>
parents: 12049
diff changeset
   260
  table.insert(startAnim, {func = AnimSay, args = {natives[1], loc("Fiery Water?! Are you drunk again?"), SAY_SHOUT, 5000}})
41542ed28fe4 Allow the diaogues in ACF missions 8 and 10 to be translated
Wuzzy <almikes@aol.com>
parents: 12049
diff changeset
   261
  table.insert(startAnim, {func = AnimSay, args = {enemy, loc("Drunk with power, perhaps!"), SAY_SHOUT, 4000}})
41542ed28fe4 Allow the diaogues in ACF missions 8 and 10 to be translated
Wuzzy <almikes@aol.com>
parents: 12049
diff changeset
   262
  table.insert(startAnim, {func = AnimSay, args = {enemy, loc("The power of love! No, wait, the power of the aliens!"), SAY_SHOUT, 7500}})
41542ed28fe4 Allow the diaogues in ACF missions 8 and 10 to be translated
Wuzzy <almikes@aol.com>
parents: 12049
diff changeset
   263
  table.insert(startAnim, {func = AnimSay, args = {natives[1], loc("We trusted you, you fool!"), SAY_SHOUT, 4000}})
41542ed28fe4 Allow the diaogues in ACF missions 8 and 10 to be translated
Wuzzy <almikes@aol.com>
parents: 12049
diff changeset
   264
  table.insert(startAnim, {func = AnimSay, args = {natives[1], loc("Why do you keep betraying us?"), SAY_SHOUT, 4000}})
41542ed28fe4 Allow the diaogues in ACF missions 8 and 10 to be translated
Wuzzy <almikes@aol.com>
parents: 12049
diff changeset
   265
  table.insert(startAnim, {func = AnimSay, args = {enemy, loc("Why, why, why, why!"), SAY_SHOUT, 4000}})
41542ed28fe4 Allow the diaogues in ACF missions 8 and 10 to be translated
Wuzzy <almikes@aol.com>
parents: 12049
diff changeset
   266
  table.insert(startAnim, {func = AnimSay, args = {enemy, loc("I grew sick of the oppression! I broke free!"), SAY_SHOUT, 6500}})
41542ed28fe4 Allow the diaogues in ACF missions 8 and 10 to be translated
Wuzzy <almikes@aol.com>
parents: 12049
diff changeset
   267
  table.insert(startAnim, {func = AnimSay, args = {natives[1], loc("What oppression? You were the most unoppressed member of the tribe!"), SAY_SHOUT, 10000}})
41542ed28fe4 Allow the diaogues in ACF missions 8 and 10 to be translated
Wuzzy <almikes@aol.com>
parents: 12049
diff changeset
   268
  table.insert(startAnim, {func = AnimSay, args = {enemy, loc("The opression of the elders, of course!"), SAY_SHOUT, 6500}})
7443
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   269
  if m5DeployedNum == leaksNum then
12264
41542ed28fe4 Allow the diaogues in ACF missions 8 and 10 to be translated
Wuzzy <almikes@aol.com>
parents: 12049
diff changeset
   270
    table.insert(startAnim, {func = AnimSay, args = {enemy, loc("You should know this more than anyone, Leaks!"), SAY_SHOUT, 7000}})
7443
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   271
  elseif m5LeaksDead == 1 then
12264
41542ed28fe4 Allow the diaogues in ACF missions 8 and 10 to be translated
Wuzzy <almikes@aol.com>
parents: 12049
diff changeset
   272
    table.insert(startAnim, {func = AnimSay, args = {enemy, loc("Just look at Leaks, may he rest in peace!"), SAY_SHOUT, 6500}})
7443
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   273
  end
12264
41542ed28fe4 Allow the diaogues in ACF missions 8 and 10 to be translated
Wuzzy <almikes@aol.com>
parents: 12049
diff changeset
   274
  table.insert(startAnim, {func = AnimSay, args = {enemy, loc("We, the youth, have to constantly prove our value."), SAY_SHOUT, 7000}})
41542ed28fe4 Allow the diaogues in ACF missions 8 and 10 to be translated
Wuzzy <almikes@aol.com>
parents: 12049
diff changeset
   275
  table.insert(startAnim, {func = AnimSay, args = {enemy, loc("We work and work until we sweat blood."), SAY_SHOUT, 5000}})
41542ed28fe4 Allow the diaogues in ACF missions 8 and 10 to be translated
Wuzzy <almikes@aol.com>
parents: 12049
diff changeset
   276
  table.insert(startAnim, {func = AnimSay, args = {enemy, loc("We risk our lives going through challenges."), SAY_SHOUT, 6000}})
41542ed28fe4 Allow the diaogues in ACF missions 8 and 10 to be translated
Wuzzy <almikes@aol.com>
parents: 12049
diff changeset
   277
  table.insert(startAnim, {func = AnimSay, args = {enemy, loc("All this to please our beloved “elders” … hick …"), SAY_SHOUT, 6000}})
41542ed28fe4 Allow the diaogues in ACF missions 8 and 10 to be translated
Wuzzy <almikes@aol.com>
parents: 12049
diff changeset
   278
  table.insert(startAnim, {func = AnimSay, args = {enemy, loc("And what do they do in the meantime? Nothing!"), SAY_SHOUT, 6000}})
41542ed28fe4 Allow the diaogues in ACF missions 8 and 10 to be translated
Wuzzy <almikes@aol.com>
parents: 12049
diff changeset
   279
  table.insert(startAnim, {func = AnimSay, args = {enemy, loc("All they do is sit around and judge us!"), SAY_SHOUT, 6000}})
41542ed28fe4 Allow the diaogues in ACF missions 8 and 10 to be translated
Wuzzy <almikes@aol.com>
parents: 12049
diff changeset
   280
  table.insert(startAnim, {func = AnimSay, args = {natives[1], loc("You have never worked a bit in your life!"), SAY_SHOUT, 6000}})
41542ed28fe4 Allow the diaogues in ACF missions 8 and 10 to be translated
Wuzzy <almikes@aol.com>
parents: 12049
diff changeset
   281
  table.insert(startAnim, {func = AnimSay, args = {natives[1], loc("All you do is take long walks when everyone else works."), SAY_SHOUT, 9000}})
41542ed28fe4 Allow the diaogues in ACF missions 8 and 10 to be translated
Wuzzy <almikes@aol.com>
parents: 12049
diff changeset
   282
  table.insert(startAnim, {func = AnimSay, args = {enemy, loc("Anyway, the aliens accept me for who I am."), SAY_SHOUT, 7000}})
41542ed28fe4 Allow the diaogues in ACF missions 8 and 10 to be translated
Wuzzy <almikes@aol.com>
parents: 12049
diff changeset
   283
  table.insert(startAnim, {func = AnimSay, args = {natives[1], loc("We won't accept you destroying our village!"), SAY_SHOUT, 7000}})
7443
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   284
12264
41542ed28fe4 Allow the diaogues in ACF missions 8 and 10 to be translated
Wuzzy <almikes@aol.com>
parents: 12049
diff changeset
   285
  table.insert(fleeAnim, {func = AnimSay, args = {enemy, loc("Argh, the boredom!"), SAY_SAY, 3000}})
41542ed28fe4 Allow the diaogues in ACF missions 8 and 10 to be translated
Wuzzy <almikes@aol.com>
parents: 12049
diff changeset
   286
  table.insert(fleeAnim, {func = AnimSay, args = {enemy, loc("I have more important things to do!"), SAY_SAY, 5000}})
7443
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   287
  table.insert(fleeAnim, {func = AnimTurn, args = {enemy, "Right"}})
12264
41542ed28fe4 Allow the diaogues in ACF missions 8 and 10 to be translated
Wuzzy <almikes@aol.com>
parents: 12049
diff changeset
   288
  table.insert(fleeAnim, {func = AnimSay, args = {enemy, loc("Comrades! Sail me away!"), SAY_SHOUT, 3500}})
7443
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   289
  table.insert(fleeAnim, {func = AnimSwitchHog, args = {natives[1]}})
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   290
  table.insert(fleeAnim, {func = AnimWait, args = {natives[1], 1}})
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   291
  table.insert(fleeAnim, {func = AnimDisappear, swh = false, args = {enemy, 0, 0}})
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   292
end
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   293
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   294
function SetupWaterAnimDeployed()
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   295
  table.insert(startAnim, {func = AnimCustomFunction, args = {enemy, CondNeedToTurn, {natives[3], enemy}}})
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   296
  table.insert(startAnim, {func = AnimCustomFunction, args = {enemy, CondNeedToTurn, {natives[2], enemy}}})
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   297
  table.insert(startAnim, {func = AnimCustomFunction, args = {enemy, CondNeedToTurn, {natives[1], enemy}}})
12264
41542ed28fe4 Allow the diaogues in ACF missions 8 and 10 to be translated
Wuzzy <almikes@aol.com>
parents: 12049
diff changeset
   298
  table.insert(startAnim, {func = AnimSay, args = {enemy, loc("Stop, comrades!"), SAY_SHOUT, 2500}})
41542ed28fe4 Allow the diaogues in ACF missions 8 and 10 to be translated
Wuzzy <almikes@aol.com>
parents: 12049
diff changeset
   299
  table.insert(startAnim, {func = AnimSay, args = {enemy, loc("I cannot let you go any further! … burp …"), SAY_SHOUT, 5500}})
41542ed28fe4 Allow the diaogues in ACF missions 8 and 10 to be translated
Wuzzy <almikes@aol.com>
parents: 12049
diff changeset
   300
  table.insert(startAnim, {func = AnimSay, args = {natives[1], loc("Fiery Water?! Are you drunk again?"), SAY_SHOUT, 5000}})
41542ed28fe4 Allow the diaogues in ACF missions 8 and 10 to be translated
Wuzzy <almikes@aol.com>
parents: 12049
diff changeset
   301
  table.insert(startAnim, {func = AnimSay, args = {enemy, loc("Drunk with power, perhaps!"), SAY_SHOUT, 4000}})
41542ed28fe4 Allow the diaogues in ACF missions 8 and 10 to be translated
Wuzzy <almikes@aol.com>
parents: 12049
diff changeset
   302
  table.insert(startAnim, {func = AnimSay, args = {enemy, loc("The power of love! No, wait, the power of the aliens!"), SAY_SHOUT, 7500}})
7443
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   303
  table.insert(startAnim, {func = AnimTeleportGear, args = {enemy, unpack(enemyPos)}})
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   304
  table.insert(startAnim, {func = AnimCustomFunction, args = {enemy, CondNeedToTurn, {natives[3], enemy}}})
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   305
  table.insert(startAnim, {func = AnimCustomFunction, args = {enemy, CondNeedToTurn, {natives[2], enemy}}})
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   306
  table.insert(startAnim, {func = AnimCustomFunction, args = {enemy, CondNeedToTurn, {natives[1], enemy}}})
12264
41542ed28fe4 Allow the diaogues in ACF missions 8 and 10 to be translated
Wuzzy <almikes@aol.com>
parents: 12049
diff changeset
   307
  table.insert(startAnim, {func = AnimSay, args = {natives[1], loc("We trusted you, you fool!"), SAY_SHOUT, 4000}})
41542ed28fe4 Allow the diaogues in ACF missions 8 and 10 to be translated
Wuzzy <almikes@aol.com>
parents: 12049
diff changeset
   308
  table.insert(startAnim, {func = AnimSay, args = {natives[1], loc("Why do you keep betraying us?"), SAY_SHOUT, 4000}})
41542ed28fe4 Allow the diaogues in ACF missions 8 and 10 to be translated
Wuzzy <almikes@aol.com>
parents: 12049
diff changeset
   309
  table.insert(startAnim, {func = AnimSay, args = {enemy, loc("Why, why, why, why!"), SAY_SHOUT, 4000}})
41542ed28fe4 Allow the diaogues in ACF missions 8 and 10 to be translated
Wuzzy <almikes@aol.com>
parents: 12049
diff changeset
   310
  table.insert(startAnim, {func = AnimSay, args = {enemy, loc("I grew sick of the oppression! I broke free!"), SAY_SHOUT, 6500}})
41542ed28fe4 Allow the diaogues in ACF missions 8 and 10 to be translated
Wuzzy <almikes@aol.com>
parents: 12049
diff changeset
   311
  table.insert(startAnim, {func = AnimSay, args = {natives[1], loc("What oppression? You were the most unoppressed member of the tribe!"), SAY_SHOUT, 10000}})
41542ed28fe4 Allow the diaogues in ACF missions 8 and 10 to be translated
Wuzzy <almikes@aol.com>
parents: 12049
diff changeset
   312
  table.insert(startAnim, {func = AnimSay, args = {enemy, loc("The opression of the elders, of course!"), SAY_SHOUT, 6500}})
41542ed28fe4 Allow the diaogues in ACF missions 8 and 10 to be translated
Wuzzy <almikes@aol.com>
parents: 12049
diff changeset
   313
  table.insert(startAnim, {func = AnimSay, args = {enemy, loc("Just look at Leaks, may he rest in peace!"), SAY_SHOUT, 6500}})
41542ed28fe4 Allow the diaogues in ACF missions 8 and 10 to be translated
Wuzzy <almikes@aol.com>
parents: 12049
diff changeset
   314
  table.insert(startAnim, {func = AnimSay, args = {enemy, loc("We, the youth, have to constantly prove our value."), SAY_SHOUT, 7000}})
41542ed28fe4 Allow the diaogues in ACF missions 8 and 10 to be translated
Wuzzy <almikes@aol.com>
parents: 12049
diff changeset
   315
  table.insert(startAnim, {func = AnimSay, args = {enemy, loc("We work and work until we sweat blood."), SAY_SHOUT, 5000}})
41542ed28fe4 Allow the diaogues in ACF missions 8 and 10 to be translated
Wuzzy <almikes@aol.com>
parents: 12049
diff changeset
   316
  table.insert(startAnim, {func = AnimSay, args = {enemy, loc("We risk our lives going through challenges."), SAY_SHOUT, 6000}})
41542ed28fe4 Allow the diaogues in ACF missions 8 and 10 to be translated
Wuzzy <almikes@aol.com>
parents: 12049
diff changeset
   317
  table.insert(startAnim, {func = AnimSay, args = {enemy, loc("All this to please our beloved “elders” … hick …"), SAY_SHOUT, 6000}})
41542ed28fe4 Allow the diaogues in ACF missions 8 and 10 to be translated
Wuzzy <almikes@aol.com>
parents: 12049
diff changeset
   318
  table.insert(startAnim, {func = AnimSay, args = {enemy, loc("And what do they do in the meantime? Nothing!"), SAY_SHOUT, 6000}})
41542ed28fe4 Allow the diaogues in ACF missions 8 and 10 to be translated
Wuzzy <almikes@aol.com>
parents: 12049
diff changeset
   319
  table.insert(startAnim, {func = AnimSay, args = {enemy, loc("All they do is sit around and judge us!"), SAY_SHOUT, 6000}})
41542ed28fe4 Allow the diaogues in ACF missions 8 and 10 to be translated
Wuzzy <almikes@aol.com>
parents: 12049
diff changeset
   320
  table.insert(startAnim, {func = AnimSay, args = {natives[1], loc("You have never worked a bit in your life!"), SAY_SHOUT, 6000}})
41542ed28fe4 Allow the diaogues in ACF missions 8 and 10 to be translated
Wuzzy <almikes@aol.com>
parents: 12049
diff changeset
   321
  table.insert(startAnim, {func = AnimSay, args = {natives[1], loc("All you do is take long walks when everyone else works."), SAY_SHOUT, 9000}})
41542ed28fe4 Allow the diaogues in ACF missions 8 and 10 to be translated
Wuzzy <almikes@aol.com>
parents: 12049
diff changeset
   322
  table.insert(startAnim, {func = AnimSay, args = {enemy, loc("Anyway, the aliens accept me for who I am."), SAY_SHOUT, 7000}})
41542ed28fe4 Allow the diaogues in ACF missions 8 and 10 to be translated
Wuzzy <almikes@aol.com>
parents: 12049
diff changeset
   323
  table.insert(startAnim, {func = AnimSay, args = {natives[1], loc("We won't accept you destroying our village!"), SAY_SHOUT, 7000}})
7443
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   324
12264
41542ed28fe4 Allow the diaogues in ACF missions 8 and 10 to be translated
Wuzzy <almikes@aol.com>
parents: 12049
diff changeset
   325
  table.insert(fleeAnim, {func = AnimSay, args = {enemy, loc("Argh, the boredom!"), SAY_SAY, 3000}})
41542ed28fe4 Allow the diaogues in ACF missions 8 and 10 to be translated
Wuzzy <almikes@aol.com>
parents: 12049
diff changeset
   326
  table.insert(fleeAnim, {func = AnimSay, args = {enemy, loc("I have more important things to do!"), SAY_SAY, 5000}})
7443
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   327
  table.insert(fleeAnim, {func = AnimTurn, args = {enemy, "Right"}})
12264
41542ed28fe4 Allow the diaogues in ACF missions 8 and 10 to be translated
Wuzzy <almikes@aol.com>
parents: 12049
diff changeset
   328
  table.insert(fleeAnim, {func = AnimSay, args = {enemy, loc("Comrades! Sail me away!"), SAY_SHOUT, 3500}})
7443
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   329
  table.insert(fleeAnim, {func = AnimSwitchHog, args = {natives[1]}})
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   330
  table.insert(fleeAnim, {func = AnimWait, args = {natives[1], 1}})
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   331
  table.insert(fleeAnim, {func = AnimDisappear, swh = false, args = {enemy, 0, 0}})
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   332
end
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   333
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   334
function SetupPrincessAnim()
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   335
  table.insert(startAnim, {func = AnimCustomFunction, args = {enemy, CondNeedToTurn, {natives[3], enemy}}})
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   336
  table.insert(startAnim, {func = AnimCustomFunction, args = {enemy, CondNeedToTurn, {natives[2], enemy}}})
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   337
  table.insert(startAnim, {func = AnimCustomFunction, args = {enemy, CondNeedToTurn, {natives[1], enemy}}})
12264
41542ed28fe4 Allow the diaogues in ACF missions 8 and 10 to be translated
Wuzzy <almikes@aol.com>
parents: 12049
diff changeset
   338
  table.insert(startAnim, {func = AnimSay, args = {enemy, loc("Oh, my! I forgot something!"), SAY_SHOUT, 4000}})
41542ed28fe4 Allow the diaogues in ACF missions 8 and 10 to be translated
Wuzzy <almikes@aol.com>
parents: 12049
diff changeset
   339
  table.insert(startAnim, {func = AnimSay, args = {enemy, loc("We need to go back!"), SAY_SHOUT, 3000}})
41542ed28fe4 Allow the diaogues in ACF missions 8 and 10 to be translated
Wuzzy <almikes@aol.com>
parents: 12049
diff changeset
   340
  table.insert(startAnim, {func = AnimSay, args = {natives[1], loc("What could you possibly forget in that cage?"), SAY_SHOUT, 7000}})
41542ed28fe4 Allow the diaogues in ACF missions 8 and 10 to be translated
Wuzzy <almikes@aol.com>
parents: 12049
diff changeset
   341
  table.insert(startAnim, {func = AnimSay, args = {enemy, loc("I don't like your tone! You're hurting me!"), SAY_SHOUT, 4000}})
41542ed28fe4 Allow the diaogues in ACF missions 8 and 10 to be translated
Wuzzy <almikes@aol.com>
parents: 12049
diff changeset
   342
  table.insert(startAnim, {func = AnimSay, args = {natives[1], loc("I'm terribly sorry!"), SAY_SHOUT, 4000}})
41542ed28fe4 Allow the diaogues in ACF missions 8 and 10 to be translated
Wuzzy <almikes@aol.com>
parents: 12049
diff changeset
   343
  table.insert(startAnim, {func = AnimSay, args = {natives[1], loc("What is it that you forgot?"), SAY_SHOUT, 4000}})
41542ed28fe4 Allow the diaogues in ACF missions 8 and 10 to be translated
Wuzzy <almikes@aol.com>
parents: 12049
diff changeset
   344
  table.insert(startAnim, {func = AnimSay, args = {enemy, loc("Uhmm, it's … uhm … my ring!"), SAY_SHOUT, 4000}})
41542ed28fe4 Allow the diaogues in ACF missions 8 and 10 to be translated
Wuzzy <almikes@aol.com>
parents: 12049
diff changeset
   345
  table.insert(startAnim, {func = AnimSay, args = {enemy, loc("It's precious to me!"), SAY_SHOUT, 3000}})
41542ed28fe4 Allow the diaogues in ACF missions 8 and 10 to be translated
Wuzzy <almikes@aol.com>
parents: 12049
diff changeset
   346
  table.insert(startAnim, {func = AnimSay, args = {natives[1], loc("We don't have time for that now!"), SAY_SHOUT, 5000}})
41542ed28fe4 Allow the diaogues in ACF missions 8 and 10 to be translated
Wuzzy <almikes@aol.com>
parents: 12049
diff changeset
   347
  table.insert(startAnim, {func = AnimSay, args = {natives[1], loc("We have to find our folk!"), SAY_SHOUT, 4000}})
41542ed28fe4 Allow the diaogues in ACF missions 8 and 10 to be translated
Wuzzy <almikes@aol.com>
parents: 12049
diff changeset
   348
  table.insert(startAnim, {func = AnimSay, args = {enemy, loc("But I want my sandals!"), SAY_SHOUT, 3000}})
41542ed28fe4 Allow the diaogues in ACF missions 8 and 10 to be translated
Wuzzy <almikes@aol.com>
parents: 12049
diff changeset
   349
  table.insert(startAnim, {func = AnimSay, args = {natives[1], loc("Sandals?! I thought you left your ring!"), SAY_SHOUT, 6000}})
41542ed28fe4 Allow the diaogues in ACF missions 8 and 10 to be translated
Wuzzy <almikes@aol.com>
parents: 12049
diff changeset
   350
  table.insert(startAnim, {func = AnimSay, args = {enemy, loc("All right, you got me!"), SAY_SHOUT, 3000}})
41542ed28fe4 Allow the diaogues in ACF missions 8 and 10 to be translated
Wuzzy <almikes@aol.com>
parents: 12049
diff changeset
   351
  table.insert(startAnim, {func = AnimSay, args = {natives[1], loc("Got you? You're acting weird."), SAY_SHOUT, 4000}})
41542ed28fe4 Allow the diaogues in ACF missions 8 and 10 to be translated
Wuzzy <almikes@aol.com>
parents: 12049
diff changeset
   352
  table.insert(startAnim, {func = AnimSay, args = {enemy, loc("You just can't let it go, can you!"), SAY_SHOUT, 5000}})
41542ed28fe4 Allow the diaogues in ACF missions 8 and 10 to be translated
Wuzzy <almikes@aol.com>
parents: 12049
diff changeset
   353
  table.insert(startAnim, {func = AnimSay, args = {enemy, loc("All right, I'll admit it!"), SAY_SHOUT, 4000}})
41542ed28fe4 Allow the diaogues in ACF missions 8 and 10 to be translated
Wuzzy <almikes@aol.com>
parents: 12049
diff changeset
   354
  table.insert(startAnim, {func = AnimSay, args = {natives[1], loc("Admit what?"), SAY_SHOUT, 2000}})
41542ed28fe4 Allow the diaogues in ACF missions 8 and 10 to be translated
Wuzzy <almikes@aol.com>
parents: 12049
diff changeset
   355
  table.insert(startAnim, {func = AnimSay, args = {enemy, loc("You give me no choice!"), SAY_SHOUT, 4000}})
41542ed28fe4 Allow the diaogues in ACF missions 8 and 10 to be translated
Wuzzy <almikes@aol.com>
parents: 12049
diff changeset
   356
  table.insert(startAnim, {func = AnimSay, args = {enemy, loc("I can't let you go further because …"), SAY_SHOUT, 6000}})
41542ed28fe4 Allow the diaogues in ACF missions 8 and 10 to be translated
Wuzzy <almikes@aol.com>
parents: 12049
diff changeset
   357
  table.insert(startAnim, {func = AnimSay, args = {enemy, loc("I'm the spy! I've been giving you out!"), SAY_SHOUT, 6000}})
7443
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   358
  table.insert(startAnim, {func = AnimTeleportGear, args = {enemy, unpack(enemyPos)}})
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   359
  table.insert(startAnim, {func = AnimCustomFunction, args = {enemy, CondNeedToTurn, {natives[3], enemy}}})
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   360
  table.insert(startAnim, {func = AnimCustomFunction, args = {enemy, CondNeedToTurn, {natives[2], enemy}}})
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   361
  table.insert(startAnim, {func = AnimCustomFunction, args = {enemy, CondNeedToTurn, {natives[1], enemy}}})
12264
41542ed28fe4 Allow the diaogues in ACF missions 8 and 10 to be translated
Wuzzy <almikes@aol.com>
parents: 12049
diff changeset
   362
  table.insert(startAnim, {func = AnimSay, args = {natives[1], loc("But … they kidnapped you!"), SAY_SHOUT, 4000}})
41542ed28fe4 Allow the diaogues in ACF missions 8 and 10 to be translated
Wuzzy <almikes@aol.com>
parents: 12049
diff changeset
   363
  table.insert(startAnim, {func = AnimSay, args = {enemy, loc("Oh, that. We were just having fun!"), SAY_SHOUT, 5000}})
41542ed28fe4 Allow the diaogues in ACF missions 8 and 10 to be translated
Wuzzy <almikes@aol.com>
parents: 12049
diff changeset
   364
  table.insert(startAnim, {func = AnimSay, args = {enemy, loc("It's an ancient ritual of theirs."), SAY_SHOUT, 5000}})
41542ed28fe4 Allow the diaogues in ACF missions 8 and 10 to be translated
Wuzzy <almikes@aol.com>
parents: 12049
diff changeset
   365
  table.insert(startAnim, {func = AnimSay, args = {natives[1], loc("Why did you do this?"), SAY_SHOUT, 4000}})
7443
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   366
  if m5ChiefDead == 1 then
12264
41542ed28fe4 Allow the diaogues in ACF missions 8 and 10 to be translated
Wuzzy <almikes@aol.com>
parents: 12049
diff changeset
   367
    table.insert(startAnim, {func = AnimSay, args = {natives[1], loc("Why did you kill your father?"), SAY_SHOUT, 5000}})
7443
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   368
  end
12264
41542ed28fe4 Allow the diaogues in ACF missions 8 and 10 to be translated
Wuzzy <almikes@aol.com>
parents: 12049
diff changeset
   369
  table.insert(startAnim, {func = AnimSay, args = {enemy, loc("Do you have any idea what it's like in the village for a woman?"), SAY_SHOUT, 10000}})
41542ed28fe4 Allow the diaogues in ACF missions 8 and 10 to be translated
Wuzzy <almikes@aol.com>
parents: 12049
diff changeset
   370
  table.insert(startAnim, {func = AnimSay, args = {enemy, loc("How would you like being discriminated against?"), SAY_SHOUT, 7000}})
41542ed28fe4 Allow the diaogues in ACF missions 8 and 10 to be translated
Wuzzy <almikes@aol.com>
parents: 12049
diff changeset
   371
  table.insert(startAnim, {func = AnimSay, args = {enemy, loc("Not being able to fight or hunt."), SAY_SHOUT, 5000}})
41542ed28fe4 Allow the diaogues in ACF missions 8 and 10 to be translated
Wuzzy <almikes@aol.com>
parents: 12049
diff changeset
   372
  table.insert(startAnim, {func = AnimSay, args = {enemy, loc("Gathering fruits all day long."), SAY_SHOUT, 5000}})
41542ed28fe4 Allow the diaogues in ACF missions 8 and 10 to be translated
Wuzzy <almikes@aol.com>
parents: 12049
diff changeset
   373
  table.insert(startAnim, {func = AnimSay, args = {enemy, loc("Doing stuff a monkey could do."), SAY_SHOUT, 5000}})
41542ed28fe4 Allow the diaogues in ACF missions 8 and 10 to be translated
Wuzzy <almikes@aol.com>
parents: 12049
diff changeset
   374
  table.insert(startAnim, {func = AnimSay, args = {enemy, loc("Always being considered weak and fragile."), SAY_SHOUT, 6000}})
7443
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   375
  if m5DeployedNum == girlNum then
12264
41542ed28fe4 Allow the diaogues in ACF missions 8 and 10 to be translated
Wuzzy <almikes@aol.com>
parents: 12049
diff changeset
   376
    table.insert(startAnim, {func = AnimSay, args = {natives[1], loc("In case you haven't noticed, I'm a woman, too!"), SAY_SHOUT, 8000}})
41542ed28fe4 Allow the diaogues in ACF missions 8 and 10 to be translated
Wuzzy <almikes@aol.com>
parents: 12049
diff changeset
   377
    table.insert(startAnim, {func = AnimSay, args = {enemy, loc("Yes, but you're … different!"), SAY_SHOUT, 6000}})
41542ed28fe4 Allow the diaogues in ACF missions 8 and 10 to be translated
Wuzzy <almikes@aol.com>
parents: 12049
diff changeset
   378
    table.insert(startAnim, {func = AnimSay, args = {natives[1], loc("Of course I am!"), SAY_SHOUT, 3000}})
7443
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   379
  end
12264
41542ed28fe4 Allow the diaogues in ACF missions 8 and 10 to be translated
Wuzzy <almikes@aol.com>
parents: 12049
diff changeset
   380
  table.insert(startAnim, {func = AnimSay, args = {enemy, loc("The aliens respect me, even worship me!"), SAY_SHOUT, 6000}})
41542ed28fe4 Allow the diaogues in ACF missions 8 and 10 to be translated
Wuzzy <almikes@aol.com>
parents: 12049
diff changeset
   381
  table.insert(startAnim, {func = AnimSay, args = {enemy, loc("I'm living a dream!"), SAY_SHOUT, 3000}})
41542ed28fe4 Allow the diaogues in ACF missions 8 and 10 to be translated
Wuzzy <almikes@aol.com>
parents: 12049
diff changeset
   382
  table.insert(startAnim, {func = AnimSay, args = {natives[1], loc("Well, you're about to wake up!"), SAY_SHOUT, 5000}})
7443
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   383
12264
41542ed28fe4 Allow the diaogues in ACF missions 8 and 10 to be translated
Wuzzy <almikes@aol.com>
parents: 12049
diff changeset
   384
  table.insert(fleeAnim, {func = AnimSay, args = {enemy, loc("Hmm … it's going slower than expected."), SAY_SAY, 5000}})
41542ed28fe4 Allow the diaogues in ACF missions 8 and 10 to be translated
Wuzzy <almikes@aol.com>
parents: 12049
diff changeset
   385
  table.insert(fleeAnim, {func = AnimSay, args = {enemy, loc("I am going to leave the kids play by themselves."), SAY_SAY, 6000}})
7443
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   386
  table.insert(fleeAnim, {func = AnimTurn, args = {enemy, "Right"}})
12264
41542ed28fe4 Allow the diaogues in ACF missions 8 and 10 to be translated
Wuzzy <almikes@aol.com>
parents: 12049
diff changeset
   387
  table.insert(fleeAnim, {func = AnimSay, args = {enemy, loc("Alien! I wish to be moved!"), SAY_SHOUT, 4000}})
7443
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   388
  table.insert(fleeAnim, {func = AnimSwitchHog, args = {natives[1]}})
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   389
  table.insert(fleeAnim, {func = AnimWait, args = {natives[1], 1}})
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   390
  table.insert(fleeAnim, {func = AnimDisappear, swh = false, args = {enemy, 0, 0}})
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   391
end
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   392
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   393
function SetupCyborgAnim()
12264
41542ed28fe4 Allow the diaogues in ACF missions 8 and 10 to be translated
Wuzzy <almikes@aol.com>
parents: 12049
diff changeset
   394
  table.insert(startAnim, {func = AnimSay, args = {enemy, loc("Stop right there, puny worms!"), SAY_SHOUT, 4000}})
41542ed28fe4 Allow the diaogues in ACF missions 8 and 10 to be translated
Wuzzy <almikes@aol.com>
parents: 12049
diff changeset
   395
  table.insert(startAnim, {func = AnimSay, args = {enemy, loc("Stay away from our weapons!"), SAY_SHOUT, 4000}})
41542ed28fe4 Allow the diaogues in ACF missions 8 and 10 to be translated
Wuzzy <almikes@aol.com>
parents: 12049
diff changeset
   396
  table.insert(startAnim, {func = AnimSay, args = {natives[1], loc("We come in peace! Just let our friends go!"), SAY_SHOUT, 5500}})
41542ed28fe4 Allow the diaogues in ACF missions 8 and 10 to be translated
Wuzzy <almikes@aol.com>
parents: 12049
diff changeset
   397
  table.insert(startAnim, {func = AnimSay, args = {enemy, loc("I'm afraid we cannot afford that."), SAY_SHOUT, 4500}})
41542ed28fe4 Allow the diaogues in ACF missions 8 and 10 to be translated
Wuzzy <almikes@aol.com>
parents: 12049
diff changeset
   398
  table.insert(startAnim, {func = AnimSay, args = {enemy, loc("You see, hedgehog spikes are very, very valuable."), SAY_SHOUT, 6500}})
41542ed28fe4 Allow the diaogues in ACF missions 8 and 10 to be translated
Wuzzy <almikes@aol.com>
parents: 12049
diff changeset
   399
  table.insert(startAnim, {func = AnimSay, args = {enemy, loc("Very valuable, haha!"), SAY_SHOUT, 3500}})
41542ed28fe4 Allow the diaogues in ACF missions 8 and 10 to be translated
Wuzzy <almikes@aol.com>
parents: 12049
diff changeset
   400
  table.insert(startAnim, {func = AnimSay, args = {natives[1], loc("Don't you dare harming our tribe!"), SAY_SHOUT, 5000}})
41542ed28fe4 Allow the diaogues in ACF missions 8 and 10 to be translated
Wuzzy <almikes@aol.com>
parents: 12049
diff changeset
   401
  table.insert(startAnim, {func = AnimSay, args = {enemy, loc("It's a shame, really!"), SAY_SHOUT, 4000}})
41542ed28fe4 Allow the diaogues in ACF missions 8 and 10 to be translated
Wuzzy <almikes@aol.com>
parents: 12049
diff changeset
   402
  table.insert(startAnim, {func = AnimSay, args = {enemy, loc("I regret to end your little odyssey."), SAY_SHOUT, 5000}})
41542ed28fe4 Allow the diaogues in ACF missions 8 and 10 to be translated
Wuzzy <almikes@aol.com>
parents: 12049
diff changeset
   403
  table.insert(startAnim, {func = AnimSay, args = {enemy, loc("It was fun to watch."), SAY_SHOUT, 3500}})
41542ed28fe4 Allow the diaogues in ACF missions 8 and 10 to be translated
Wuzzy <almikes@aol.com>
parents: 12049
diff changeset
   404
  table.insert(startAnim, {func = AnimSay, args = {enemy, loc("The way you handled your little internal conflicts …"), SAY_SHOUT, 6500}})
41542ed28fe4 Allow the diaogues in ACF missions 8 and 10 to be translated
Wuzzy <almikes@aol.com>
parents: 12049
diff changeset
   405
  table.insert(startAnim, {func = AnimSay, args = {enemy, loc("Did you really think that we needed the help of one of you?"), SAY_SHOUT, 7500}})
41542ed28fe4 Allow the diaogues in ACF missions 8 and 10 to be translated
Wuzzy <almikes@aol.com>
parents: 12049
diff changeset
   406
  table.insert(startAnim, {func = AnimSay, args = {enemy, loc("You should have known that we don't rely on meatbags!"), SAY_SHOUT, 7500}})
41542ed28fe4 Allow the diaogues in ACF missions 8 and 10 to be translated
Wuzzy <almikes@aol.com>
parents: 12049
diff changeset
   407
  table.insert(startAnim, {func = AnimSay, args = {enemy, loc("It was fun to watch, though."), SAY_SHOUT, 3500}})
7443
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   408
  if m5Choice == choiceEliminate then
12264
41542ed28fe4 Allow the diaogues in ACF missions 8 and 10 to be translated
Wuzzy <almikes@aol.com>
parents: 12049
diff changeset
   409
    table.insert(startAnim, {func = AnimSay, args = {enemy, loc("Heck, you even executed one of your own!"), SAY_SHOUT, 6000}})
7443
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   410
  end
12264
41542ed28fe4 Allow the diaogues in ACF missions 8 and 10 to be translated
Wuzzy <almikes@aol.com>
parents: 12049
diff changeset
   411
  table.insert(startAnim, {func = AnimSay, args = {natives[1], loc("It was all a trick?!"), SAY_SHOUT, 3000}})
41542ed28fe4 Allow the diaogues in ACF missions 8 and 10 to be translated
Wuzzy <almikes@aol.com>
parents: 12049
diff changeset
   412
  table.insert(startAnim, {func = AnimSay, args = {natives[1], loc("Some sick game of yours?!"), SAY_SHOUT, 4000}})
41542ed28fe4 Allow the diaogues in ACF missions 8 and 10 to be translated
Wuzzy <almikes@aol.com>
parents: 12049
diff changeset
   413
  table.insert(startAnim, {func = AnimSay, args = {natives[1], loc("We won't let you hurt any more of us!"), SAY_SHOUT, 6000}})
7443
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   414
12264
41542ed28fe4 Allow the diaogues in ACF missions 8 and 10 to be translated
Wuzzy <almikes@aol.com>
parents: 12049
diff changeset
   415
  table.insert(fleeAnim, {func = AnimSay, args = {enemy, loc("Entered boredom phase! Discrepancies detected …"), SAY_SAY, 5000}})
41542ed28fe4 Allow the diaogues in ACF missions 8 and 10 to be translated
Wuzzy <almikes@aol.com>
parents: 12049
diff changeset
   416
  table.insert(fleeAnim, {func = AnimSay, args = {enemy, loc("Initiate escape wish!"), SAY_SAY, 6000}})
7443
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   417
  table.insert(fleeAnim, {func = AnimTurn, args = {enemy, "Right"}})
12264
41542ed28fe4 Allow the diaogues in ACF missions 8 and 10 to be translated
Wuzzy <almikes@aol.com>
parents: 12049
diff changeset
   418
  table.insert(fleeAnim, {func = AnimSay, args = {enemy, loc("Running displacement algorithm …"), SAY_SHOUT, 4000}})
7443
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   419
  table.insert(fleeAnim, {func = AnimSwitchHog, args = {natives[1]}})
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   420
  table.insert(fleeAnim, {func = AnimWait, args = {natives[1], 1}})
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   421
  table.insert(fleeAnim, {func = AnimDisappear, swh = false, args = {enemy, 0, 0}})
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   422
end
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   423
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   424
function SetupFinalAnim()
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   425
  local found = 0
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   426
  local gears = {}
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   427
  for i = nativesLeft, 1, -1 do
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   428
    if band(GetState(natives[i]), gstDrowning) == 0 then
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   429
      found = found + 1
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   430
      gears[found] = natives[i]
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   431
    end
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   432
  end
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   433
  if found == 0 then
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   434
    return
7454
ce7d7138b436 Modified final cutscene and fixed a skipping bug
belphegorr <szabibibi@gmail.com>
parents: 7451
diff changeset
   435
  else
ce7d7138b436 Modified final cutscene and fixed a skipping bug
belphegorr <szabibibi@gmail.com>
parents: 7451
diff changeset
   436
    for i = 1, found do
ce7d7138b436 Modified final cutscene and fixed a skipping bug
belphegorr <szabibibi@gmail.com>
parents: 7451
diff changeset
   437
      table.insert(finalAnim, {func = AnimCustomFunction, args = {gears[1], CondNeedToTurn, {cyborg, gears[i]}}})
ce7d7138b436 Modified final cutscene and fixed a skipping bug
belphegorr <szabibibi@gmail.com>
parents: 7451
diff changeset
   438
    end
12264
41542ed28fe4 Allow the diaogues in ACF missions 8 and 10 to be translated
Wuzzy <almikes@aol.com>
parents: 12049
diff changeset
   439
    table.insert(finalAnim, {func = AnimSay, args = {cyborg, loc("Nice work, meatbags!"), SAY_SAY, 3000}})
41542ed28fe4 Allow the diaogues in ACF missions 8 and 10 to be translated
Wuzzy <almikes@aol.com>
parents: 12049
diff changeset
   440
    table.insert(finalAnim, {func = AnimSay, args = {cyborg, loc("You're on your way to freeing your tribe!"), SAY_SAY, 5500}})
41542ed28fe4 Allow the diaogues in ACF missions 8 and 10 to be translated
Wuzzy <almikes@aol.com>
parents: 12049
diff changeset
   441
    table.insert(finalAnim, {func = AnimSay, args = {gears[1], loc("Do you know where they are?"), SAY_SAY, 4000}})
41542ed28fe4 Allow the diaogues in ACF missions 8 and 10 to be translated
Wuzzy <almikes@aol.com>
parents: 12049
diff changeset
   442
    table.insert(finalAnim, {func = AnimSay, args = {gears[found], loc("We need to hurry!"), SAY_SAY, 3000}})
41542ed28fe4 Allow the diaogues in ACF missions 8 and 10 to be translated
Wuzzy <almikes@aol.com>
parents: 12049
diff changeset
   443
    table.insert(finalAnim, {func = AnimSay, args = {cyborg, loc("Haha! Come!"), SAY_SAY, 2000}})
7454
ce7d7138b436 Modified final cutscene and fixed a skipping bug
belphegorr <szabibibi@gmail.com>
parents: 7451
diff changeset
   444
    table.insert(finalAnim, {func = AnimJump, args = {cyborg, "high"}})
ce7d7138b436 Modified final cutscene and fixed a skipping bug
belphegorr <szabibibi@gmail.com>
parents: 7451
diff changeset
   445
    table.insert(finalAnim, {func = AnimDisappear, args = {cyborg, GetGearPosition(cyborg)}})
ce7d7138b436 Modified final cutscene and fixed a skipping bug
belphegorr <szabibibi@gmail.com>
parents: 7451
diff changeset
   446
    for i = 1, found do
ce7d7138b436 Modified final cutscene and fixed a skipping bug
belphegorr <szabibibi@gmail.com>
parents: 7451
diff changeset
   447
      table.insert(finalAnim, {func = HideHedge, swh = false, args = {gears[i]}})
ce7d7138b436 Modified final cutscene and fixed a skipping bug
belphegorr <szabibibi@gmail.com>
parents: 7451
diff changeset
   448
    end
ce7d7138b436 Modified final cutscene and fixed a skipping bug
belphegorr <szabibibi@gmail.com>
parents: 7451
diff changeset
   449
    table.insert(finalAnim, {func = SetState, swh = false, args = {cyborg, gstInvisible}})
7443
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   450
  end
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   451
end
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   452
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   453
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   454
--------------------------Anim skip functions--------------------------
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   455
function AfterStartAnim()
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   456
  SetGearMessage(natives[1], 0)
12264
41542ed28fe4 Allow the diaogues in ACF missions 8 and 10 to be translated
Wuzzy <almikes@aol.com>
parents: 12049
diff changeset
   457
  ShowMission(loc("Long Live The Queen"), loc("Closing in"), loc("Defeat the enemy!").."|"..loc("The leader seems scared, he will probably flee."), 1, 0)
7443
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   458
  SetHealth(SpawnHealthCrate(2207, 44), 25)
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   459
  SetHealth(SpawnHealthCrate(519, 1519), 25)
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   460
  SetHealth(SpawnHealthCrate(826, 895), 25)
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   461
  SpawnUtilityCrate(701, 1046, amGirder, 3)
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   462
  TurnTimeLeft = TurnTime
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   463
end
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   464
7454
ce7d7138b436 Modified final cutscene and fixed a skipping bug
belphegorr <szabibibi@gmail.com>
parents: 7451
diff changeset
   465
function SkipAnim(anim)
ce7d7138b436 Modified final cutscene and fixed a skipping bug
belphegorr <szabibibi@gmail.com>
parents: 7451
diff changeset
   466
  if anim == startAnim then
ce7d7138b436 Modified final cutscene and fixed a skipping bug
belphegorr <szabibibi@gmail.com>
parents: 7451
diff changeset
   467
    SetGearPosition(enemy, unpack(enemyPos))
ce7d7138b436 Modified final cutscene and fixed a skipping bug
belphegorr <szabibibi@gmail.com>
parents: 7451
diff changeset
   468
  end
7443
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   469
  if GetHogTeamName(CurrentHedgehog) ~= loc("Natives") then
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   470
    TurnTimeLeft = 0
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   471
  end
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   472
  AnimWait(enemy, 1)
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   473
end
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   474
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   475
function AfterFleeAnim()
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   476
  SetHealth(SpawnHealthCrate(130, 455), 25)
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   477
  SetHealth(SpawnHealthCrate(2087, 50), 25)
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   478
  SetHealth(SpawnHealthCrate(2143, 54), 25)
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   479
  SetHealth(SpawnHealthCrate(70, 1308), 25)
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   480
  SetGearMessage(CurrentHedgehog, 0)
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   481
  HideHedge(enemy)
12264
41542ed28fe4 Allow the diaogues in ACF missions 8 and 10 to be translated
Wuzzy <almikes@aol.com>
parents: 12049
diff changeset
   482
  ShowMission(loc("Long Live The Queen"), loc("Coward"), loc("The leader escaped. Defeat the rest of the aliens!"), 1, 0)
7443
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   483
  TurnTimeLeft = TurnTime
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   484
end
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   485
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   486
function AfterLeaderDeadAnim()
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   487
  SetHealth(SpawnHealthCrate(130, 455), 25)
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   488
  SetHealth(SpawnHealthCrate(2087, 50), 25)
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   489
  SetHealth(SpawnHealthCrate(2143, 54), 25)
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   490
  SetHealth(SpawnHealthCrate(70, 1308), 25)
12264
41542ed28fe4 Allow the diaogues in ACF missions 8 and 10 to be translated
Wuzzy <almikes@aol.com>
parents: 12049
diff changeset
   491
  ShowMission(loc("Long Live The Queen"), loc("Bullseye"), lob("Good job! Defeat the rest of the aliens!"), 1, 0)
7443
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   492
  TurnTimeLeft = 0
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   493
end
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   494
-----------------------------Events------------------------------------
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   495
function CheckTurnsOver()
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   496
  return TotalRounds > 6
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   497
end
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   498
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   499
function DoTurnsOver()
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   500
  SetGearMessage(CurrentHedgehog, 0)
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   501
  enemyFled = "1"
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   502
  AddAnim(fleeAnim)
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   503
  AddFunction({func = AfterFleeAnim, args = {}})
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   504
  RemoveEventFunc(CheckGearDead, {enemy})
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   505
end
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   506
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   507
function CheckNativesDead()
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   508
  return nativesLeft == 0
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   509
end
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   510
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   511
function DoNativesDead()
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   512
  RemoveEventFunc(CheckTurnsOver)
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   513
  RemoveEventFunc(CheckGearDead)
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   514
  RemoveEventFunc(CheckCyborgsDead)
12264
41542ed28fe4 Allow the diaogues in ACF missions 8 and 10 to be translated
Wuzzy <almikes@aol.com>
parents: 12049
diff changeset
   515
  AddCaption(loc("And so the cyborgs took over the island."))
7443
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   516
  TurnTimeLeft = 0
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   517
end
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   518
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   519
function CheckCyborgsDead()
7454
ce7d7138b436 Modified final cutscene and fixed a skipping bug
belphegorr <szabibibi@gmail.com>
parents: 7451
diff changeset
   520
  return (cyborgsLeft == 0 and (gearDead[enemy] == true or enemyFled == "1"))
ce7d7138b436 Modified final cutscene and fixed a skipping bug
belphegorr <szabibibi@gmail.com>
parents: 7451
diff changeset
   521
end
ce7d7138b436 Modified final cutscene and fixed a skipping bug
belphegorr <szabibibi@gmail.com>
parents: 7451
diff changeset
   522
ce7d7138b436 Modified final cutscene and fixed a skipping bug
belphegorr <szabibibi@gmail.com>
parents: 7451
diff changeset
   523
function KillEnemy()
ce7d7138b436 Modified final cutscene and fixed a skipping bug
belphegorr <szabibibi@gmail.com>
parents: 7451
diff changeset
   524
  if enemyFled == "1" then
10290
42efccba0711 lua api: DismissTeam(teamname)
sheepluva
parents: 9306
diff changeset
   525
    DismissTeam(loc("Leaderbot"))
7454
ce7d7138b436 Modified final cutscene and fixed a skipping bug
belphegorr <szabibibi@gmail.com>
parents: 7451
diff changeset
   526
  end
10290
42efccba0711 lua api: DismissTeam(teamname)
sheepluva
parents: 9306
diff changeset
   527
  DismissTeam(loc("011101001"))
7454
ce7d7138b436 Modified final cutscene and fixed a skipping bug
belphegorr <szabibibi@gmail.com>
parents: 7451
diff changeset
   528
  TurnTimeLeft = 0
7443
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   529
end
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   530
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   531
function DoCyborgsDead()
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   532
  SaveCampaignVariables()
7454
ce7d7138b436 Modified final cutscene and fixed a skipping bug
belphegorr <szabibibi@gmail.com>
parents: 7451
diff changeset
   533
  RestoreHedge(cyborg)
ce7d7138b436 Modified final cutscene and fixed a skipping bug
belphegorr <szabibibi@gmail.com>
parents: 7451
diff changeset
   534
  PlaceGirder(3292, 922, 4)
ce7d7138b436 Modified final cutscene and fixed a skipping bug
belphegorr <szabibibi@gmail.com>
parents: 7451
diff changeset
   535
  SetGearPosition(cyborg, 3290, 902)
7443
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   536
  SetupFinalAnim()
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   537
  AddAnim(finalAnim)
7454
ce7d7138b436 Modified final cutscene and fixed a skipping bug
belphegorr <szabibibi@gmail.com>
parents: 7451
diff changeset
   538
  AddFunction({func = KillEnemy, args = {}})
7443
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   539
end
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   540
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   541
function DoLeaderDead()
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   542
  leaderDead = true
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   543
  SetGearMessage(CurrentHedgehog, 0)
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   544
  SetupLeaderDeadAnim()
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   545
  AddAnim(leaderDeadAnim)
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   546
  AddFunction({func = AfterLeaderDeadAnim, args = {}})
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   547
  RemoveEventFunc(CheckTurnsOver)
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   548
end
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   549
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   550
function CheckGearsDead(gearList)
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   551
  for i = 1, # gearList do
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   552
    if gearDead[gearList[i]] ~= true then
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   553
      return false
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   554
    end
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   555
  end
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   556
  return true
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   557
end
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   558
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   559
function CheckGearDead(gear)
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   560
  return gearDead[gear]
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   561
end
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   562
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   563
-----------------------------Misc--------------------------------------
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   564
function HideHedge(hedge)
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   565
  if hedgeHidden[hedge] ~= true then
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   566
    HideHog(hedge)
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   567
    hedgeHidden[hedge] = true
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   568
  end
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   569
end
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   570
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   571
function RestoreHedge(hedge)
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   572
  if hedgeHidden[hedge] == true then
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   573
    RestoreHog(hedge)
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   574
    hedgeHidden[hedge] = false
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   575
  end
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   576
end
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   577
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   578
function GetVariables()
8944
ed2509832311 fix bug that locked unlocked campaign missions, see issue 452
Periklis Ntanasis <pntanasis@gmail.com>
parents: 8043
diff changeset
   579
  progress = tonumber(GetCampaignVar("Progress"))
7443
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   580
  m5DeployedNum = tonumber(GetCampaignVar("M5DeployedNum"))
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   581
  m2Choice = tonumber(GetCampaignVar("M2Choice"))
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   582
  m5Choice = tonumber(GetCampaignVar("M5Choice"))
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   583
  m2DenseDead = tonumber(GetCampaignVar("M2DenseDead"))
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   584
  m4DenseDead = tonumber(GetCampaignVar("M4DenseDead"))
7451
d2dce3b530f8 Fixed variable loading errors and added saving of "M8Scene" in mission 8
belphegorr <szabibibi@gmail.com>
parents: 7448
diff changeset
   585
  m5DenseDead = tonumber(GetCampaignVar("M5DenseDead"))
7443
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   586
  m4LeaksDead = tonumber(GetCampaignVar("M4LeaksDead"))
7451
d2dce3b530f8 Fixed variable loading errors and added saving of "M8Scene" in mission 8
belphegorr <szabibibi@gmail.com>
parents: 7448
diff changeset
   587
  m5LeaksDead = tonumber(GetCampaignVar("M5LeaksDead"))
7443
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   588
  m4ChiefDead = tonumber(GetCampaignVar("M4ChiefDead"))
7451
d2dce3b530f8 Fixed variable loading errors and added saving of "M8Scene" in mission 8
belphegorr <szabibibi@gmail.com>
parents: 7448
diff changeset
   589
  m5ChiefDead = tonumber(GetCampaignVar("M5ChiefDead"))
7443
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   590
  m4WaterDead = tonumber(GetCampaignVar("M4WaterDead"))
7451
d2dce3b530f8 Fixed variable loading errors and added saving of "M8Scene" in mission 8
belphegorr <szabibibi@gmail.com>
parents: 7448
diff changeset
   591
  m5WaterDead = tonumber(GetCampaignVar("M5WaterDead"))
7443
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   592
  m4BuffaloDead = tonumber(GetCampaignVar("M4BuffaloDead"))
7451
d2dce3b530f8 Fixed variable loading errors and added saving of "M8Scene" in mission 8
belphegorr <szabibibi@gmail.com>
parents: 7448
diff changeset
   593
  m5BuffaloDead = tonumber(GetCampaignVar("M5BuffaloDead"))
d2dce3b530f8 Fixed variable loading errors and added saving of "M8Scene" in mission 8
belphegorr <szabibibi@gmail.com>
parents: 7448
diff changeset
   594
  m5WiseDead = tonumber(GetCampaignVar("M5WiseDead"))
d2dce3b530f8 Fixed variable loading errors and added saving of "M8Scene" in mission 8
belphegorr <szabibibi@gmail.com>
parents: 7448
diff changeset
   595
  m5GirlDead = tonumber(GetCampaignVar("M5GirlDead"))
7443
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   596
end
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   597
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   598
function SaveCampaignVariables()
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   599
  for i = 1, 4 do
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   600
    if gearDead[origNatives[i]] ~= true then
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   601
      SaveCampaignVar(nativeSaveNames[i], "0")
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   602
    else
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   603
      SaveCampaignVar(nativeSaveNames[i], "1")
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   604
    end
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   605
  end
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   606
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   607
  SaveCampaignVar("M8DeployedLeader", deployedLeader)
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   608
  SaveCampaignVar("M8PrincessLeader", princessLeader)
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   609
  SaveCampaignVar("M8EnemyFled", enemyFled)
7451
d2dce3b530f8 Fixed variable loading errors and added saving of "M8Scene" in mission 8
belphegorr <szabibibi@gmail.com>
parents: 7448
diff changeset
   610
  SaveCampaignVar("M8Scene", "" .. scene)
8944
ed2509832311 fix bug that locked unlocked campaign missions, see issue 452
Periklis Ntanasis <pntanasis@gmail.com>
parents: 8043
diff changeset
   611
  if progress and progress<8 then
ed2509832311 fix bug that locked unlocked campaign missions, see issue 452
Periklis Ntanasis <pntanasis@gmail.com>
parents: 8043
diff changeset
   612
    SaveCampaignVar("Progress", "8")
ed2509832311 fix bug that locked unlocked campaign missions, see issue 452
Periklis Ntanasis <pntanasis@gmail.com>
parents: 8043
diff changeset
   613
  end
7443
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   614
end
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   615
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   616
function SetupPlace()
7454
ce7d7138b436 Modified final cutscene and fixed a skipping bug
belphegorr <szabibibi@gmail.com>
parents: 7451
diff changeset
   617
  HideHedge(cyborg)
7443
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   618
  SetHogHat(natives[1], nativeHats[m5DeployedNum])
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   619
  SetHogName(natives[1], nativeNames[m5DeployedNum])
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   620
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   621
  if m5DeployedNum == denseNum then
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   622
    dense = natives[1]
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   623
  else
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   624
    dense = enemy
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   625
  end
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   626
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   627
  if m2Choice == choiceAccepted and m5Choice ~= choiceEliminate then
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   628
    scene = denseScene
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   629
    SetHogHat(enemy, nativeHats[denseNum])
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   630
    SetHogName(enemy, nativeNames[denseNum])
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   631
    dense = enemy
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   632
  elseif m2Choice == choiceAccepted then
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   633
    scene = cyborgScene
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   634
    SetHogHat(enemy, "cyborg2")
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   635
    SetHogName(enemy, loc("Nancy Screw"))
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   636
  elseif m5Choice == choiceEliminate then
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   637
    scene = princessScene
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   638
    SetHogHat(enemy, "tiara")
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   639
    SetHogName(enemy, loc("Fell From Heaven"))
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   640
  else
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   641
    scene = waterScene
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   642
    SetHogHat(enemy, nativeHats[waterNum])
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   643
    SetHogName(enemy, nativeNames[waterNum])
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   644
  end
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   645
  for i = 1, 4 do 
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   646
    if GetHogName(natives[i]) == GetHogName(enemy) then
7448
d0521a3a4358 Solved "floating repositionings" in every mission
belphegorr <szabibibi@gmail.com>
parents: 7443
diff changeset
   647
      AnimSetGearPosition(enemy, GetGearPosition(natives[i]))
7443
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   648
      DeleteGear(natives[i])
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   649
      DeleteGear(cyborgs[cyborgsLeft])
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   650
    end
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   651
  end
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   652
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   653
  SpawnAmmoCrate(34, 395, amBee, 2)
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   654
  SpawnAmmoCrate(33, 374, amRCPlane, 1)
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   655
  SpawnAmmoCrate(74, 393, amAirAttack, 3)
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   656
  SpawnAmmoCrate(1313, 1481, amBazooka, 8)
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   657
  SpawnAmmoCrate(80, 360, amSniperRifle, 4)
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   658
  SpawnAmmoCrate(1037, 1494, amShotgun, 7)
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   659
  SpawnAmmoCrate(1037, 1472, amMolotov, 3)
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   660
  SpawnAmmoCrate(1146, 1503, amMortar, 8)
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   661
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   662
  SpawnUtilityCrate(1147, 1431, amPortalGun, 2)
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   663
  SpawnUtilityCrate(1219, 1542, amRope, 5)
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   664
  SpawnUtilityCrate(1259, 1501, amJetpack, 2)
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   665
end
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   666
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   667
function SetupEvents()
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   668
  AddNewEvent(CheckNativesDead, {}, DoNativesDead, {}, 0)
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   669
  AddNewEvent(CheckGearDead, {enemy}, DoLeaderDead, {}, 0)
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   670
  AddNewEvent(CheckTurnsOver, {}, DoTurnsOver, {}, 0)
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   671
  AddNewEvent(CheckCyborgsDead, {}, DoCyborgsDead, {}, 0)
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   672
end
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   673
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   674
function SetupAmmo()
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   675
  AddAmmo(natives[1], amPickHammer, 2)
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   676
  AddAmmo(natives[1], amBazooka, 0)
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   677
  AddAmmo(natives[1], amGrenade, 0)
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   678
  AddAmmo(natives[1], amShotgun, 0)
11038
5a9dde74127e Fix weapon name - bug #967
nemo
parents: 10423
diff changeset
   679
  AddAmmo(natives[1], amAirAttack, 0)
7443
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   680
  AddAmmo(natives[1], amMolotov, 0)
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   681
end
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   682
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   683
function AddHogs()
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   684
	AddTeam(loc("Natives"), 29439, "Bone", "Island", "HillBilly", "cm_birdy")
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   685
  for i = 7, 9 do
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   686
    natives[i-6] = AddHog(nativeNames[i], 0, 100, nativeHats[i])
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   687
    origNatives[i-6] = natives[i-6]
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   688
  end
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   689
  natives[4] = AddHog(loc("Fell From Heaven"), 0, 133, "tiara")
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   690
  origNatives[4] = natives[4]
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   691
  nativesLeft = nativesNum
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   692
12049
030464f34d47 Tweak flags used in all missions to fit more to the theme
Wuzzy <almikes@aol.com>
parents: 11885
diff changeset
   693
  AddTeam(loc("Beep Loopers"), 14483456, "ring", "UFO", "Robot", "cm_cyborg")
7443
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   694
  for i = 1, cyborgsTeamNum[1] do
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   695
    cyborgs[i] = AddHog(cyborgNames[i], cyborgsDif[i], cyborgsHealth[i], "cyborg2")
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   696
  end
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   697
12049
030464f34d47 Tweak flags used in all missions to fit more to the theme
Wuzzy <almikes@aol.com>
parents: 11885
diff changeset
   698
  AddTeam(loc("Corporationals"), 14483456, "ring", "UFO", "Robot", "cm_cyborg")
7443
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   699
  for i = cyborgsTeamNum[1] + 1, cyborgsNum do
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   700
    cyborgs[i] = AddHog(cyborgNames[i], cyborgsDif[i], cyborgsHealth[i], "cyborg2")
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   701
  end
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   702
  cyborgsLeft = cyborgsTeamNum[1] + cyborgsTeamNum[2]
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   703
12049
030464f34d47 Tweak flags used in all missions to fit more to the theme
Wuzzy <almikes@aol.com>
parents: 11885
diff changeset
   704
  AddTeam(loc("Leaderbot"), 14483456, "ring", "UFO", "Robot", "cm_cyborg")
7443
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   705
  enemy = AddHog(loc("Name"), 2, 200, "cyborg1")
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   706
12049
030464f34d47 Tweak flags used in all missions to fit more to the theme
Wuzzy <almikes@aol.com>
parents: 11885
diff changeset
   707
  AddTeam(loc("011101001"), 14483456, "ring", "UFO", "Robot", "cm_binary")
7454
ce7d7138b436 Modified final cutscene and fixed a skipping bug
belphegorr <szabibibi@gmail.com>
parents: 7451
diff changeset
   708
  cyborg = AddHog(loc("Unit 334a$7%;.*"), 0, 200, "cyborg1")
ce7d7138b436 Modified final cutscene and fixed a skipping bug
belphegorr <szabibibi@gmail.com>
parents: 7451
diff changeset
   709
ce7d7138b436 Modified final cutscene and fixed a skipping bug
belphegorr <szabibibi@gmail.com>
parents: 7451
diff changeset
   710
  SetGearPosition(cyborg, 0, 0)
ce7d7138b436 Modified final cutscene and fixed a skipping bug
belphegorr <szabibibi@gmail.com>
parents: 7451
diff changeset
   711
7443
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   712
  for i = 1, nativesNum do
7448
d0521a3a4358 Solved "floating repositionings" in every mission
belphegorr <szabibibi@gmail.com>
parents: 7443
diff changeset
   713
    AnimSetGearPosition(natives[i], unpack(nativePos[i]))
7443
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   714
  end
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   715
7448
d0521a3a4358 Solved "floating repositionings" in every mission
belphegorr <szabibibi@gmail.com>
parents: 7443
diff changeset
   716
  AnimSetGearPosition(enemy, unpack(enemyPos))
7443
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   717
  AnimTurn(enemy, "Left")
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   718
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   719
  for i = 1, cyborgsNum do
7448
d0521a3a4358 Solved "floating repositionings" in every mission
belphegorr <szabibibi@gmail.com>
parents: 7443
diff changeset
   720
    AnimSetGearPosition(cyborgs[i], unpack(cyborgsPos[i]))
7443
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   721
    AnimTurn(cyborgs[i], cyborgsDir[i])
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   722
  end
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   723
end
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   724
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   725
function CondNeedToTurn(hog1, hog2)
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   726
  xl, xd = GetX(hog1), GetX(hog2)
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   727
  if xl > xd then
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   728
    AnimInsertStepNext({func = AnimTurn, args = {hog1, "Left"}})
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   729
    AnimInsertStepNext({func = AnimTurn, args = {hog2, "Right"}})
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   730
  elseif xl < xd then
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   731
    AnimInsertStepNext({func = AnimTurn, args = {hog2, "Left"}})
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   732
    AnimInsertStepNext({func = AnimTurn, args = {hog1, "Right"}})
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   733
  end
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   734
end
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   735
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   736
-----------------------------Main Functions----------------------------
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   737
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   738
function onGameInit()
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   739
	Seed = 0
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   740
	GameFlags = gfDisableGirders + gfDisableLandObjects
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   741
	TurnTime = 60000 
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   742
	CaseFreq = 0
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   743
	MinesNum = 0
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   744
	MinesTime = 3000
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   745
	Explosives = 0
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   746
	Delay = 10 
10423
b9d6463cf2ca fix mapgen of other scripts too
sheepluva
parents: 10290
diff changeset
   747
  MapGen = mgDrawn
7443
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   748
	Theme = "Hell"
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   749
  SuddenDeathTurns = 20
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   750
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   751
	for i = 1, #map do
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   752
		ParseCommand('draw ' .. map[i])
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   753
	end
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   754
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   755
  GetVariables()
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   756
  AnimInit()
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   757
  AddHogs()
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   758
end
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   759
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   760
function onGameStart()
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   761
  SetupAmmo()
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   762
  SetupPlace()
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   763
  AnimationSetup()
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   764
  SetupEvents()
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   765
  AddAnim(startAnim)
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   766
  AddFunction({func = AfterStartAnim, args = {}})
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   767
end
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   768
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   769
function onGameTick()
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   770
  AnimUnWait()
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   771
  if ShowAnimation() == false then
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   772
    return
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   773
  end
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   774
  ExecuteAfterAnimations()
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   775
  CheckEvents()
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   776
end
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   777
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   778
function onGearDelete(gear)
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   779
  local toRemove = nil
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   780
  gearDead[gear] = true
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   781
  if GetGearType(gear) == gtHedgehog then
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   782
    if GetHogTeamName(gear) == loc("Beep Loopers") or GetHogTeamName(gear) == loc("Corporationals") then
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   783
      cyborgsLeft = cyborgsLeft - 1
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   784
    elseif GetHogTeamName(gear) == loc("Natives") then
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   785
      for i = 1, nativesLeft do
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   786
        if natives[i] == gear then
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   787
          toRemove = i
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   788
        end
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   789
      end
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   790
      table.remove(natives, toRemove)
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   791
      nativesLeft = nativesLeft - 1
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   792
    end
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   793
  end
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   794
end
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   795
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   796
function onAmmoStoreInit()
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   797
  SetAmmo(amBaseballBat, 9, 0, 0, 0)
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   798
  SetAmmo(amFirePunch, 9, 0, 0, 0)
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   799
  SetAmmo(amDEagle, 9, 0, 0, 0)
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   800
  SetAmmo(amSkip, 9, 0, 0, 0)
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   801
  SetAmmo(amSwitch, 9, 0, 0, 0)
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   802
  SetAmmo(amBazooka, 9, 0, 0, 0)
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   803
  SetAmmo(amGrenade, 9, 0, 0, 0)
11885
80bc9802f54e Fix Lua error message in A Classic Fairytale mission 8
Wuzzy <almikes@aol.com>
parents: 11038
diff changeset
   804
  SetAmmo(amAirAttack, 1, 0, 0, 0)
7443
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   805
  SetAmmo(amMolotov, 5, 0, 0, 0)
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   806
  SetAmmo(amShotgun, 9, 0, 0, 0)
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   807
end
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   808
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   809
function onNewTurn()
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   810
  if AnimInProgress() then
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   811
    TurnTimeLeft = -1
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   812
    return
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   813
  end
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   814
  if GetHogTeamName(CurrentHedgehog) == loc("011101001") then
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   815
    TurnTimeLeft = 0
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   816
  end
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   817
end
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   818
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   819
function onPrecise()
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   820
  if GameTime > 2500 and AnimInProgress() then
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   821
    SetAnimSkip(true)
7454
ce7d7138b436 Modified final cutscene and fixed a skipping bug
belphegorr <szabibibi@gmail.com>
parents: 7451
diff changeset
   822
--  else
ce7d7138b436 Modified final cutscene and fixed a skipping bug
belphegorr <szabibibi@gmail.com>
parents: 7451
diff changeset
   823
--    DeleteGear(cyborgs[1])
ce7d7138b436 Modified final cutscene and fixed a skipping bug
belphegorr <szabibibi@gmail.com>
parents: 7451
diff changeset
   824
--    table.remove(cyborgs, 1)
ce7d7138b436 Modified final cutscene and fixed a skipping bug
belphegorr <szabibibi@gmail.com>
parents: 7451
diff changeset
   825
--    if cyborgsLeft == 0 then
ce7d7138b436 Modified final cutscene and fixed a skipping bug
belphegorr <szabibibi@gmail.com>
parents: 7451
diff changeset
   826
--      DeleteGear(enemy)
ce7d7138b436 Modified final cutscene and fixed a skipping bug
belphegorr <szabibibi@gmail.com>
parents: 7451
diff changeset
   827
--    end
7443
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   828
  end
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   829
end