share/hedgewars/Data/Missions/Campaign/A_Classic_Fairytale/queen.lua
author Wuzzy <Wuzzy2@mail.ru>
Fri, 27 Oct 2017 05:03:58 +0200
changeset 12782 389453e1e09e
parent 12570 0fb15ad40595
child 12784 f12337d90d03
permissions -rw-r--r--
ACF7: Fix possible Lua error spam in intro sequence This was caused by a race of onGearDelete vs AnimationSetup. If AnimationSetup came first, it uses old values from the natives table. The solution is to force the code to guarantee that AnimationSetup always coms after deleting gears in the natives table.
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 = {}
12782
389453e1e09e ACF7: Fix possible Lua error spam in intro sequence
Wuzzy <Wuzzy2@mail.ru>
parents: 12570
diff changeset
   103
389453e1e09e ACF7: Fix possible Lua error spam in intro sequence
Wuzzy <Wuzzy2@mail.ru>
parents: 12570
diff changeset
   104
nativeAwaitingDeletion = nil
7443
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   105
-----------------------------Animations--------------------------------
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   106
function EmitDenseClouds(dir)
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   107
  local dif
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   108
  if dir == "Left" then
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
  else
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   111
    dif = -10
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   112
  end
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   113
  if dir == nil then
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   114
    dx, dy = GetGearVelocity(dense)
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   115
    if dx < 0 then 
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
    else 
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   118
      dif = -10
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   119
    end
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   120
  end
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 = 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
   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 = AnimWait, args = {dense, 800}})
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   125
  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
   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
  AnimInsertStepNext({func = AnimWait, args = {dense, 800}})
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   128
  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
   129
end
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   130
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   131
function AnimationSetup()
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   132
  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
   133
  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
   134
  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
   135
  if scene == denseScene then
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   136
    if m5DeployedNum == denseNum then
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   137
      deployedLeader = "1"
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   138
      SetupDenseAnimDeployed()
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   139
    else
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   140
      SetupDenseAnim()
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   141
    end
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   142
  elseif scene == waterScene then
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   143
    if m5DeployedNum == waterNum then
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   144
      deployedLeader = "1"
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   145
      SetupWaterAnimDeployed()
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   146
    else
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   147
      SetupWaterAnim()
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   148
    end
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   149
  elseif scene == princessScene then
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   150
    princessLeader = "1"
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   151
    SetupPrincessAnim()
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   152
  else
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   153
    SetupCyborgAnim()
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   154
  end
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   155
7454
ce7d7138b436 Modified final cutscene and fixed a skipping bug
belphegorr <szabibibi@gmail.com>
parents: 7451
diff changeset
   156
  AddSkipFunction(startAnim, SkipAnim, {startAnim})
ce7d7138b436 Modified final cutscene and fixed a skipping bug
belphegorr <szabibibi@gmail.com>
parents: 7451
diff changeset
   157
  AddSkipFunction(fleeAnim, SkipAnim, {fleeAnim})
ce7d7138b436 Modified final cutscene and fixed a skipping bug
belphegorr <szabibibi@gmail.com>
parents: 7451
diff changeset
   158
  AddSkipFunction(leaderDeadAnim, SkipAnim, {leaderDeadAnim})
7443
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   159
end
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   160
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   161
function SetupLeaderDeadAnim()
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   162
  local gear = nil
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   163
  if CheckCyborgsDead() then
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   164
    return
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   165
  end
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   166
  for i = nativesLeft, 1, -1 do
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   167
    if band(GetState(natives[i]), gstDrowning) == 0 then
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   168
      gear = natives[i]
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   169
    end
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   170
  end
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   171
  if gear == nil then
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   172
    return
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   173
  end
7475
7b18314bed2b Added a FollowGear to the leaderDead animation in mission 9
belphegorr <szabibibi@gmail.com>
parents: 7454
diff changeset
   174
  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
   175
  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
   176
end
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   177
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   178
function SetupDenseAnim()
12264
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("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
   180
  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
   181
  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
   182
  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
   183
  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
   184
  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
   185
  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
   186
  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
   187
  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
   188
  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
   189
  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
   190
  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
   191
  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
   192
  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
   193
  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
   194
  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
   195
  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
   196
  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
   197
  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
   198
  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
   199
  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
   200
  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
   201
  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
   202
12264
41542ed28fe4 Allow the diaogues in ACF missions 8 and 10 to be translated
Wuzzy <almikes@aol.com>
parents: 12049
diff changeset
   203
  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
   204
  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
   205
7443
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   206
  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
   207
  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
   208
  table.insert(fleeAnim, {func = AnimSwitchHog, args = {natives[1]}})
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   209
  table.insert(fleeAnim, {func = AnimWait, args = {natives[1], 1}})
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   210
  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
   211
end
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   212
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   213
function SetupDenseAnimDeployed()
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   214
  table.insert(startAnim, {func = AnimCustomFunction, args = {enemy, EmitDenseClouds, {}}})
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[3], enemy}}})
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   216
  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
   217
  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
   218
  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
   219
  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
   220
  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
   221
  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
   222
  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
   223
  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
   224
  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
   225
  table.insert(startAnim, {func = AnimTeleportGear, args = {enemy, unpack(enemyPos)}})
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   226
  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
   227
  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
   228
  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
   229
  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
   230
  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
   231
  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
   232
  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
   233
  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
   234
  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
   235
  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
   236
  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
   237
  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
   238
  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
   239
  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
   240
  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
   241
  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
   242
  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
   243
  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
   244
  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
   245
  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
   246
  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
   247
  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
   248
  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
   249
12264
41542ed28fe4 Allow the diaogues in ACF missions 8 and 10 to be translated
Wuzzy <almikes@aol.com>
parents: 12049
diff changeset
   250
  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
   251
  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
   252
  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
   253
  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
   254
  table.insert(fleeAnim, {func = AnimSwitchHog, args = {natives[1]}})
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   255
  table.insert(fleeAnim, {func = AnimWait, args = {natives[1], 1}})
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   256
  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
   257
end
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   258
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   259
function SetupWaterAnim()
12264
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 = {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
   261
  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
   262
  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
   263
  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
   264
  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
   265
  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
   266
  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
   267
  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
   268
  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
   269
  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
   270
  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
   271
  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
   272
    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
   273
  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
   274
    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
   275
  end
12264
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, 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
   277
  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
   278
  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
   279
  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
   280
  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
   281
  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
   282
  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
   283
  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
   284
  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
   285
  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
   286
12264
41542ed28fe4 Allow the diaogues in ACF missions 8 and 10 to be translated
Wuzzy <almikes@aol.com>
parents: 12049
diff changeset
   287
  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
   288
  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
   289
  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
   290
  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
   291
  table.insert(fleeAnim, {func = AnimSwitchHog, args = {natives[1]}})
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   292
  table.insert(fleeAnim, {func = AnimWait, args = {natives[1], 1}})
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   293
  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
   294
end
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   295
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   296
function SetupWaterAnimDeployed()
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[3], enemy}}})
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   298
  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
   299
  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
   300
  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
   301
  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
   302
  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
   303
  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
   304
  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
   305
  table.insert(startAnim, {func = AnimTeleportGear, args = {enemy, unpack(enemyPos)}})
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[3], enemy}}})
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   307
  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
   308
  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
   309
  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
   310
  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
   311
  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
   312
  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
   313
  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
   314
  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
   315
  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
   316
  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
   317
  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
   318
  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
   319
  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
   320
  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
   321
  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
   322
  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
   323
  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
   324
  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
   325
  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
   326
12264
41542ed28fe4 Allow the diaogues in ACF missions 8 and 10 to be translated
Wuzzy <almikes@aol.com>
parents: 12049
diff changeset
   327
  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
   328
  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
   329
  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
   330
  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
   331
  table.insert(fleeAnim, {func = AnimSwitchHog, args = {natives[1]}})
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   332
  table.insert(fleeAnim, {func = AnimWait, args = {natives[1], 1}})
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   333
  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
   334
end
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   335
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   336
function SetupPrincessAnim()
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[3], enemy}}})
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   338
  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
   339
  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
   340
  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
   341
  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
   342
  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
   343
  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
   344
  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
   345
  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
   346
  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
   347
  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
   348
  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
   349
  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
   350
  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
   351
  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
   352
  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
   353
  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
   354
  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
   355
  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
   356
  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
   357
  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
   358
  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
   359
  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
   360
  table.insert(startAnim, {func = AnimTeleportGear, args = {enemy, unpack(enemyPos)}})
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[3], enemy}}})
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   362
  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
   363
  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
   364
  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
   365
  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
   366
  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
   367
  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
   368
  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
   369
    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
   370
  end
12264
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("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
   372
  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
   373
  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
   374
  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
   375
  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
   376
  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
   377
  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
   378
    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
   379
    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
   380
    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
   381
  end
12264
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 = {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
   383
  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
   384
  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
   385
12264
41542ed28fe4 Allow the diaogues in ACF missions 8 and 10 to be translated
Wuzzy <almikes@aol.com>
parents: 12049
diff changeset
   386
  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
   387
  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
   388
  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
   389
  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
   390
  table.insert(fleeAnim, {func = AnimSwitchHog, args = {natives[1]}})
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   391
  table.insert(fleeAnim, {func = AnimWait, args = {natives[1], 1}})
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   392
  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
   393
end
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   394
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   395
function SetupCyborgAnim()
12264
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 = {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
   397
  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
   398
  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
   399
  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
   400
  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
   401
  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
   402
  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
   403
  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
   404
  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
   405
  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
   406
  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
   407
  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
   408
  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
   409
  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
   410
  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
   411
    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
   412
  end
12264
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("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
   414
  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
   415
  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
   416
12264
41542ed28fe4 Allow the diaogues in ACF missions 8 and 10 to be translated
Wuzzy <almikes@aol.com>
parents: 12049
diff changeset
   417
  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
   418
  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
   419
  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
   420
  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
   421
  table.insert(fleeAnim, {func = AnimSwitchHog, args = {natives[1]}})
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   422
  table.insert(fleeAnim, {func = AnimWait, args = {natives[1], 1}})
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   423
  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
   424
end
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   425
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   426
function SetupFinalAnim()
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   427
  local found = 0
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   428
  local gears = {}
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   429
  for i = nativesLeft, 1, -1 do
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   430
    if band(GetState(natives[i]), gstDrowning) == 0 then
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   431
      found = found + 1
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   432
      gears[found] = natives[i]
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   433
    end
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   434
  end
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   435
  if found == 0 then
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   436
    return
7454
ce7d7138b436 Modified final cutscene and fixed a skipping bug
belphegorr <szabibibi@gmail.com>
parents: 7451
diff changeset
   437
  else
ce7d7138b436 Modified final cutscene and fixed a skipping bug
belphegorr <szabibibi@gmail.com>
parents: 7451
diff changeset
   438
    for i = 1, found do
ce7d7138b436 Modified final cutscene and fixed a skipping bug
belphegorr <szabibibi@gmail.com>
parents: 7451
diff changeset
   439
      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
   440
    end
12264
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 = {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
   442
    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
   443
    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
   444
    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
   445
    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
   446
    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
   447
    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
   448
    for i = 1, found do
ce7d7138b436 Modified final cutscene and fixed a skipping bug
belphegorr <szabibibi@gmail.com>
parents: 7451
diff changeset
   449
      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
   450
    end
ce7d7138b436 Modified final cutscene and fixed a skipping bug
belphegorr <szabibibi@gmail.com>
parents: 7451
diff changeset
   451
    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
   452
  end
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   453
end
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   454
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   455
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   456
--------------------------Anim skip functions--------------------------
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   457
function AfterStartAnim()
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   458
  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
   459
  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
   460
  SetHealth(SpawnHealthCrate(2207, 44), 25)
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   461
  SetHealth(SpawnHealthCrate(519, 1519), 25)
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   462
  SetHealth(SpawnHealthCrate(826, 895), 25)
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   463
  SpawnUtilityCrate(701, 1046, amGirder, 3)
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   464
  TurnTimeLeft = TurnTime
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   465
end
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   466
7454
ce7d7138b436 Modified final cutscene and fixed a skipping bug
belphegorr <szabibibi@gmail.com>
parents: 7451
diff changeset
   467
function SkipAnim(anim)
ce7d7138b436 Modified final cutscene and fixed a skipping bug
belphegorr <szabibibi@gmail.com>
parents: 7451
diff changeset
   468
  if anim == startAnim then
ce7d7138b436 Modified final cutscene and fixed a skipping bug
belphegorr <szabibibi@gmail.com>
parents: 7451
diff changeset
   469
    SetGearPosition(enemy, unpack(enemyPos))
ce7d7138b436 Modified final cutscene and fixed a skipping bug
belphegorr <szabibibi@gmail.com>
parents: 7451
diff changeset
   470
  end
7443
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   471
  if GetHogTeamName(CurrentHedgehog) ~= loc("Natives") then
12555
d51ea6ac1ca1 ACF: Replace TurnTimeLeft=0 with EndTurn(true)
Wuzzy <almikes@aol.com>
parents: 12398
diff changeset
   472
    EndTurn(true)
7443
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
  AnimWait(enemy, 1)
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   475
end
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   476
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   477
function AfterFleeAnim()
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   478
  SetHealth(SpawnHealthCrate(130, 455), 25)
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   479
  SetHealth(SpawnHealthCrate(2087, 50), 25)
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   480
  SetHealth(SpawnHealthCrate(2143, 54), 25)
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   481
  SetHealth(SpawnHealthCrate(70, 1308), 25)
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   482
  SetGearMessage(CurrentHedgehog, 0)
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   483
  HideHedge(enemy)
12264
41542ed28fe4 Allow the diaogues in ACF missions 8 and 10 to be translated
Wuzzy <almikes@aol.com>
parents: 12049
diff changeset
   484
  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
   485
  TurnTimeLeft = TurnTime
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   486
end
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   487
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   488
function AfterLeaderDeadAnim()
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   489
  SetHealth(SpawnHealthCrate(130, 455), 25)
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   490
  SetHealth(SpawnHealthCrate(2087, 50), 25)
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   491
  SetHealth(SpawnHealthCrate(2143, 54), 25)
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   492
  SetHealth(SpawnHealthCrate(70, 1308), 25)
12362
f57053c4551d Fix Lua fail in Long Live the Queen mission on victory
Wuzzy <almikes@aol.com>
parents: 12264
diff changeset
   493
  ShowMission(loc("Long Live The Queen"), loc("Bullseye"), loc("Good job! Defeat the rest of the aliens!"), 1, 0)
12555
d51ea6ac1ca1 ACF: Replace TurnTimeLeft=0 with EndTurn(true)
Wuzzy <almikes@aol.com>
parents: 12398
diff changeset
   494
  EndTurn(true)
7443
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   495
end
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   496
-----------------------------Events------------------------------------
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   497
function CheckTurnsOver()
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   498
  return TotalRounds > 6
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   499
end
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   500
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   501
function DoTurnsOver()
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   502
  SetGearMessage(CurrentHedgehog, 0)
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   503
  enemyFled = "1"
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   504
  AddAnim(fleeAnim)
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   505
  AddFunction({func = AfterFleeAnim, args = {}})
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   506
  RemoveEventFunc(CheckGearDead, {enemy})
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   507
end
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   508
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   509
function CheckNativesDead()
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   510
  return nativesLeft == 0
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   511
end
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   512
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   513
function DoNativesDead()
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   514
  RemoveEventFunc(CheckTurnsOver)
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   515
  RemoveEventFunc(CheckGearDead)
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   516
  RemoveEventFunc(CheckCyborgsDead)
12264
41542ed28fe4 Allow the diaogues in ACF missions 8 and 10 to be translated
Wuzzy <almikes@aol.com>
parents: 12049
diff changeset
   517
  AddCaption(loc("And so the cyborgs took over the island."))
12555
d51ea6ac1ca1 ACF: Replace TurnTimeLeft=0 with EndTurn(true)
Wuzzy <almikes@aol.com>
parents: 12398
diff changeset
   518
  EndTurn(true)
7443
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   519
end
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   520
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   521
function CheckCyborgsDead()
7454
ce7d7138b436 Modified final cutscene and fixed a skipping bug
belphegorr <szabibibi@gmail.com>
parents: 7451
diff changeset
   522
  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
   523
end
ce7d7138b436 Modified final cutscene and fixed a skipping bug
belphegorr <szabibibi@gmail.com>
parents: 7451
diff changeset
   524
ce7d7138b436 Modified final cutscene and fixed a skipping bug
belphegorr <szabibibi@gmail.com>
parents: 7451
diff changeset
   525
function KillEnemy()
ce7d7138b436 Modified final cutscene and fixed a skipping bug
belphegorr <szabibibi@gmail.com>
parents: 7451
diff changeset
   526
  if enemyFled == "1" then
10290
42efccba0711 lua api: DismissTeam(teamname)
sheepluva
parents: 9306
diff changeset
   527
    DismissTeam(loc("Leaderbot"))
7454
ce7d7138b436 Modified final cutscene and fixed a skipping bug
belphegorr <szabibibi@gmail.com>
parents: 7451
diff changeset
   528
  end
10290
42efccba0711 lua api: DismissTeam(teamname)
sheepluva
parents: 9306
diff changeset
   529
  DismissTeam(loc("011101001"))
12555
d51ea6ac1ca1 ACF: Replace TurnTimeLeft=0 with EndTurn(true)
Wuzzy <almikes@aol.com>
parents: 12398
diff changeset
   530
  EndTurn(true)
7443
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   531
end
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   532
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   533
function DoCyborgsDead()
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   534
  SaveCampaignVariables()
7454
ce7d7138b436 Modified final cutscene and fixed a skipping bug
belphegorr <szabibibi@gmail.com>
parents: 7451
diff changeset
   535
  RestoreHedge(cyborg)
ce7d7138b436 Modified final cutscene and fixed a skipping bug
belphegorr <szabibibi@gmail.com>
parents: 7451
diff changeset
   536
  PlaceGirder(3292, 922, 4)
ce7d7138b436 Modified final cutscene and fixed a skipping bug
belphegorr <szabibibi@gmail.com>
parents: 7451
diff changeset
   537
  SetGearPosition(cyborg, 3290, 902)
7443
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   538
  SetupFinalAnim()
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   539
  AddAnim(finalAnim)
7454
ce7d7138b436 Modified final cutscene and fixed a skipping bug
belphegorr <szabibibi@gmail.com>
parents: 7451
diff changeset
   540
  AddFunction({func = KillEnemy, args = {}})
7443
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   541
end
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   542
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   543
function DoLeaderDead()
12570
0fb15ad40595 ACF8: Fix mission panel being shown after victory (if the leader fled)
Wuzzy <almikes@aol.com>
parents: 12555
diff changeset
   544
  if enemyFled ~= "1" then
0fb15ad40595 ACF8: Fix mission panel being shown after victory (if the leader fled)
Wuzzy <almikes@aol.com>
parents: 12555
diff changeset
   545
    leaderDead = true
0fb15ad40595 ACF8: Fix mission panel being shown after victory (if the leader fled)
Wuzzy <almikes@aol.com>
parents: 12555
diff changeset
   546
    SetGearMessage(CurrentHedgehog, 0)
0fb15ad40595 ACF8: Fix mission panel being shown after victory (if the leader fled)
Wuzzy <almikes@aol.com>
parents: 12555
diff changeset
   547
    SetupLeaderDeadAnim()
0fb15ad40595 ACF8: Fix mission panel being shown after victory (if the leader fled)
Wuzzy <almikes@aol.com>
parents: 12555
diff changeset
   548
    AddAnim(leaderDeadAnim)
0fb15ad40595 ACF8: Fix mission panel being shown after victory (if the leader fled)
Wuzzy <almikes@aol.com>
parents: 12555
diff changeset
   549
    AddFunction({func = AfterLeaderDeadAnim, args = {}})
0fb15ad40595 ACF8: Fix mission panel being shown after victory (if the leader fled)
Wuzzy <almikes@aol.com>
parents: 12555
diff changeset
   550
    RemoveEventFunc(CheckTurnsOver)
0fb15ad40595 ACF8: Fix mission panel being shown after victory (if the leader fled)
Wuzzy <almikes@aol.com>
parents: 12555
diff changeset
   551
  end
7443
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   552
end
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   553
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   554
function CheckGearsDead(gearList)
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   555
  for i = 1, # gearList do
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   556
    if gearDead[gearList[i]] ~= true then
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   557
      return false
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   558
    end
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   559
  end
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   560
  return true
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
function CheckGearDead(gear)
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   564
  return gearDead[gear]
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   565
end
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   566
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   567
-----------------------------Misc--------------------------------------
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   568
function HideHedge(hedge)
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   569
  if hedgeHidden[hedge] ~= true then
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   570
    HideHog(hedge)
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   571
    hedgeHidden[hedge] = true
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   572
  end
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   573
end
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   574
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   575
function RestoreHedge(hedge)
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   576
  if hedgeHidden[hedge] == true then
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   577
    RestoreHog(hedge)
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   578
    hedgeHidden[hedge] = false
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   579
  end
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   580
end
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   581
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   582
function GetVariables()
8944
ed2509832311 fix bug that locked unlocked campaign missions, see issue 452
Periklis Ntanasis <pntanasis@gmail.com>
parents: 8043
diff changeset
   583
  progress = tonumber(GetCampaignVar("Progress"))
7443
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   584
  m5DeployedNum = tonumber(GetCampaignVar("M5DeployedNum"))
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   585
  m2Choice = tonumber(GetCampaignVar("M2Choice"))
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   586
  m5Choice = tonumber(GetCampaignVar("M5Choice"))
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   587
  m2DenseDead = tonumber(GetCampaignVar("M2DenseDead"))
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   588
  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
   589
  m5DenseDead = tonumber(GetCampaignVar("M5DenseDead"))
7443
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   590
  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
   591
  m5LeaksDead = tonumber(GetCampaignVar("M5LeaksDead"))
7443
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   592
  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
   593
  m5ChiefDead = tonumber(GetCampaignVar("M5ChiefDead"))
7443
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   594
  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
   595
  m5WaterDead = tonumber(GetCampaignVar("M5WaterDead"))
7443
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   596
  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
   597
  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
   598
  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
   599
  m5GirlDead = tonumber(GetCampaignVar("M5GirlDead"))
7443
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   600
end
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   601
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   602
function SaveCampaignVariables()
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   603
  for i = 1, 4 do
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   604
    if gearDead[origNatives[i]] ~= true then
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   605
      SaveCampaignVar(nativeSaveNames[i], "0")
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   606
    else
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   607
      SaveCampaignVar(nativeSaveNames[i], "1")
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   608
    end
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   609
  end
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   610
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   611
  SaveCampaignVar("M8DeployedLeader", deployedLeader)
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   612
  SaveCampaignVar("M8PrincessLeader", princessLeader)
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   613
  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
   614
  SaveCampaignVar("M8Scene", "" .. scene)
8944
ed2509832311 fix bug that locked unlocked campaign missions, see issue 452
Periklis Ntanasis <pntanasis@gmail.com>
parents: 8043
diff changeset
   615
  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
   616
    SaveCampaignVar("Progress", "8")
ed2509832311 fix bug that locked unlocked campaign missions, see issue 452
Periklis Ntanasis <pntanasis@gmail.com>
parents: 8043
diff changeset
   617
  end
7443
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   618
end
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   619
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   620
function SetupPlace()
7454
ce7d7138b436 Modified final cutscene and fixed a skipping bug
belphegorr <szabibibi@gmail.com>
parents: 7451
diff changeset
   621
  HideHedge(cyborg)
7443
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   622
  SetHogHat(natives[1], nativeHats[m5DeployedNum])
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   623
  SetHogName(natives[1], nativeNames[m5DeployedNum])
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   624
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   625
  if m5DeployedNum == denseNum then
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   626
    dense = natives[1]
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   627
  else
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   628
    dense = enemy
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   629
  end
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   630
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   631
  if m2Choice == choiceAccepted and m5Choice ~= choiceEliminate then
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   632
    scene = denseScene
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   633
    SetHogHat(enemy, nativeHats[denseNum])
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   634
    SetHogName(enemy, nativeNames[denseNum])
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   635
    dense = enemy
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   636
  elseif m2Choice == choiceAccepted then
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   637
    scene = cyborgScene
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   638
    SetHogHat(enemy, "cyborg2")
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   639
    SetHogName(enemy, loc("Nancy Screw"))
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   640
  elseif m5Choice == choiceEliminate then
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   641
    scene = princessScene
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   642
    SetHogHat(enemy, "tiara")
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   643
    SetHogName(enemy, loc("Fell From Heaven"))
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   644
  else
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   645
    scene = waterScene
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   646
    SetHogHat(enemy, nativeHats[waterNum])
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   647
    SetHogName(enemy, nativeNames[waterNum])
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   648
  end
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   649
  for i = 1, 4 do 
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   650
    if GetHogName(natives[i]) == GetHogName(enemy) then
7448
d0521a3a4358 Solved "floating repositionings" in every mission
belphegorr <szabibibi@gmail.com>
parents: 7443
diff changeset
   651
      AnimSetGearPosition(enemy, GetGearPosition(natives[i]))
7443
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   652
      DeleteGear(natives[i])
12782
389453e1e09e ACF7: Fix possible Lua error spam in intro sequence
Wuzzy <Wuzzy2@mail.ru>
parents: 12570
diff changeset
   653
      -- triggers AfterSetupPlace when the gear is *actually* deleted
389453e1e09e ACF7: Fix possible Lua error spam in intro sequence
Wuzzy <Wuzzy2@mail.ru>
parents: 12570
diff changeset
   654
      nativeAwaitingDeletion = natives[i]
7443
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   655
      DeleteGear(cyborgs[cyborgsLeft])
12782
389453e1e09e ACF7: Fix possible Lua error spam in intro sequence
Wuzzy <Wuzzy2@mail.ru>
parents: 12570
diff changeset
   656
      break
7443
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   657
    end
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   658
  end
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   659
12398
5d805b345343 Fix overlapping crates in ACF mission 8
Wuzzy <almikes@aol.com>
parents: 12362
diff changeset
   660
  SpawnAmmoCrate(34, 410, amBee, 2)
7443
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   661
  SpawnAmmoCrate(33, 374, amRCPlane, 1)
12398
5d805b345343 Fix overlapping crates in ACF mission 8
Wuzzy <almikes@aol.com>
parents: 12362
diff changeset
   662
  SpawnAmmoCrate(74, 410, amAirAttack, 3)
7443
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   663
  SpawnAmmoCrate(1313, 1481, amBazooka, 8)
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   664
  SpawnAmmoCrate(80, 360, amSniperRifle, 4)
12398
5d805b345343 Fix overlapping crates in ACF mission 8
Wuzzy <almikes@aol.com>
parents: 12362
diff changeset
   665
  SpawnAmmoCrate(1037, 1508, amShotgun, 7)
7443
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   666
  SpawnAmmoCrate(1037, 1472, amMolotov, 3)
12398
5d805b345343 Fix overlapping crates in ACF mission 8
Wuzzy <almikes@aol.com>
parents: 12362
diff changeset
   667
  SpawnAmmoCrate(1146, 1576, amMortar, 8)
7443
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   668
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   669
  SpawnUtilityCrate(1147, 1431, amPortalGun, 2)
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   670
  SpawnUtilityCrate(1219, 1542, amRope, 5)
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   671
  SpawnUtilityCrate(1259, 1501, amJetpack, 2)
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 SetupEvents()
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   675
  AddNewEvent(CheckNativesDead, {}, DoNativesDead, {}, 0)
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   676
  AddNewEvent(CheckGearDead, {enemy}, DoLeaderDead, {}, 0)
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   677
  AddNewEvent(CheckTurnsOver, {}, DoTurnsOver, {}, 0)
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   678
  AddNewEvent(CheckCyborgsDead, {}, DoCyborgsDead, {}, 0)
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   679
end
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   680
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   681
function SetupAmmo()
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   682
  AddAmmo(natives[1], amPickHammer, 2)
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   683
  AddAmmo(natives[1], amBazooka, 0)
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   684
  AddAmmo(natives[1], amGrenade, 0)
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   685
  AddAmmo(natives[1], amShotgun, 0)
11038
5a9dde74127e Fix weapon name - bug #967
nemo
parents: 10423
diff changeset
   686
  AddAmmo(natives[1], amAirAttack, 0)
7443
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   687
  AddAmmo(natives[1], amMolotov, 0)
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
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   690
function AddHogs()
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   691
	AddTeam(loc("Natives"), 29439, "Bone", "Island", "HillBilly", "cm_birdy")
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   692
  for i = 7, 9 do
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   693
    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
   694
    origNatives[i-6] = natives[i-6]
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   695
  end
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   696
  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
   697
  origNatives[4] = natives[4]
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   698
  nativesLeft = nativesNum
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   699
12049
030464f34d47 Tweak flags used in all missions to fit more to the theme
Wuzzy <almikes@aol.com>
parents: 11885
diff changeset
   700
  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
   701
  for i = 1, cyborgsTeamNum[1] do
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   702
    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
   703
  end
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   704
12049
030464f34d47 Tweak flags used in all missions to fit more to the theme
Wuzzy <almikes@aol.com>
parents: 11885
diff changeset
   705
  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
   706
  for i = cyborgsTeamNum[1] + 1, cyborgsNum do
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   707
    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
   708
  end
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   709
  cyborgsLeft = cyborgsTeamNum[1] + cyborgsTeamNum[2]
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   710
12049
030464f34d47 Tweak flags used in all missions to fit more to the theme
Wuzzy <almikes@aol.com>
parents: 11885
diff changeset
   711
  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
   712
  enemy = AddHog(loc("Name"), 2, 200, "cyborg1")
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   713
12049
030464f34d47 Tweak flags used in all missions to fit more to the theme
Wuzzy <almikes@aol.com>
parents: 11885
diff changeset
   714
  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
   715
  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
   716
ce7d7138b436 Modified final cutscene and fixed a skipping bug
belphegorr <szabibibi@gmail.com>
parents: 7451
diff changeset
   717
  SetGearPosition(cyborg, 0, 0)
ce7d7138b436 Modified final cutscene and fixed a skipping bug
belphegorr <szabibibi@gmail.com>
parents: 7451
diff changeset
   718
7443
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   719
  for i = 1, nativesNum do
7448
d0521a3a4358 Solved "floating repositionings" in every mission
belphegorr <szabibibi@gmail.com>
parents: 7443
diff changeset
   720
    AnimSetGearPosition(natives[i], unpack(nativePos[i]))
7443
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   721
  end
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   722
7448
d0521a3a4358 Solved "floating repositionings" in every mission
belphegorr <szabibibi@gmail.com>
parents: 7443
diff changeset
   723
  AnimSetGearPosition(enemy, unpack(enemyPos))
7443
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   724
  AnimTurn(enemy, "Left")
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   725
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   726
  for i = 1, cyborgsNum do
7448
d0521a3a4358 Solved "floating repositionings" in every mission
belphegorr <szabibibi@gmail.com>
parents: 7443
diff changeset
   727
    AnimSetGearPosition(cyborgs[i], unpack(cyborgsPos[i]))
7443
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   728
    AnimTurn(cyborgs[i], cyborgsDir[i])
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   729
  end
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   730
end
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   731
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   732
function CondNeedToTurn(hog1, hog2)
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   733
  xl, xd = GetX(hog1), GetX(hog2)
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   734
  if xl > xd then
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   735
    AnimInsertStepNext({func = AnimTurn, args = {hog1, "Left"}})
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   736
    AnimInsertStepNext({func = AnimTurn, args = {hog2, "Right"}})
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   737
  elseif xl < xd then
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   738
    AnimInsertStepNext({func = AnimTurn, args = {hog2, "Left"}})
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   739
    AnimInsertStepNext({func = AnimTurn, args = {hog1, "Right"}})
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   740
  end
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   741
end
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   742
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   743
-----------------------------Main Functions----------------------------
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   744
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   745
function onGameInit()
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   746
	Seed = 0
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   747
	GameFlags = gfDisableGirders + gfDisableLandObjects
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   748
	TurnTime = 60000 
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   749
	CaseFreq = 0
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   750
	MinesNum = 0
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   751
	MinesTime = 3000
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   752
	Explosives = 0
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   753
	Delay = 10 
10423
b9d6463cf2ca fix mapgen of other scripts too
sheepluva
parents: 10290
diff changeset
   754
  MapGen = mgDrawn
7443
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   755
	Theme = "Hell"
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   756
  SuddenDeathTurns = 20
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   757
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   758
	for i = 1, #map do
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   759
		ParseCommand('draw ' .. map[i])
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   760
	end
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   761
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   762
  GetVariables()
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   763
  AnimInit()
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   764
  AddHogs()
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   765
end
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   766
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   767
function onGameStart()
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   768
  SetupAmmo()
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   769
  SetupPlace()
12782
389453e1e09e ACF7: Fix possible Lua error spam in intro sequence
Wuzzy <Wuzzy2@mail.ru>
parents: 12570
diff changeset
   770
  -- Animation is setup in AfterSetupPlace
389453e1e09e ACF7: Fix possible Lua error spam in intro sequence
Wuzzy <Wuzzy2@mail.ru>
parents: 12570
diff changeset
   771
end
389453e1e09e ACF7: Fix possible Lua error spam in intro sequence
Wuzzy <Wuzzy2@mail.ru>
parents: 12570
diff changeset
   772
389453e1e09e ACF7: Fix possible Lua error spam in intro sequence
Wuzzy <Wuzzy2@mail.ru>
parents: 12570
diff changeset
   773
function AfterSetupPlace()
7443
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   774
  AnimationSetup()
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   775
  SetupEvents()
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   776
  AddAnim(startAnim)
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   777
  AddFunction({func = AfterStartAnim, args = {}})
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   778
end
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   779
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   780
function onGameTick()
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   781
  AnimUnWait()
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   782
  if ShowAnimation() == false then
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   783
    return
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   784
  end
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   785
  ExecuteAfterAnimations()
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   786
  CheckEvents()
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   787
end
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   788
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   789
function onGearDelete(gear)
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   790
  local toRemove = nil
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   791
  gearDead[gear] = true
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   792
  if GetGearType(gear) == gtHedgehog then
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   793
    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
   794
      cyborgsLeft = cyborgsLeft - 1
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   795
    elseif GetHogTeamName(gear) == loc("Natives") then
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   796
      for i = 1, nativesLeft do
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   797
        if natives[i] == gear then
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   798
          toRemove = i
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   799
        end
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   800
      end
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   801
      table.remove(natives, toRemove)
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   802
      nativesLeft = nativesLeft - 1
12782
389453e1e09e ACF7: Fix possible Lua error spam in intro sequence
Wuzzy <Wuzzy2@mail.ru>
parents: 12570
diff changeset
   803
      if nativeAwaitingDeletion and gear == nativeAwaitingDeletion then
389453e1e09e ACF7: Fix possible Lua error spam in intro sequence
Wuzzy <Wuzzy2@mail.ru>
parents: 12570
diff changeset
   804
        AfterSetupPlace()
389453e1e09e ACF7: Fix possible Lua error spam in intro sequence
Wuzzy <Wuzzy2@mail.ru>
parents: 12570
diff changeset
   805
        nativeAwaitingDeletion = nil
389453e1e09e ACF7: Fix possible Lua error spam in intro sequence
Wuzzy <Wuzzy2@mail.ru>
parents: 12570
diff changeset
   806
      end
7443
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
  end
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   809
end
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   810
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   811
function onAmmoStoreInit()
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   812
  SetAmmo(amBaseballBat, 9, 0, 0, 0)
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   813
  SetAmmo(amFirePunch, 9, 0, 0, 0)
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   814
  SetAmmo(amDEagle, 9, 0, 0, 0)
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   815
  SetAmmo(amSkip, 9, 0, 0, 0)
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   816
  SetAmmo(amSwitch, 9, 0, 0, 0)
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   817
  SetAmmo(amBazooka, 9, 0, 0, 0)
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   818
  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
   819
  SetAmmo(amAirAttack, 1, 0, 0, 0)
7443
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   820
  SetAmmo(amMolotov, 5, 0, 0, 0)
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   821
  SetAmmo(amShotgun, 9, 0, 0, 0)
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   822
end
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   823
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   824
function onNewTurn()
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   825
  if AnimInProgress() then
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   826
    TurnTimeLeft = -1
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   827
    return
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
  if GetHogTeamName(CurrentHedgehog) == loc("011101001") then
12555
d51ea6ac1ca1 ACF: Replace TurnTimeLeft=0 with EndTurn(true)
Wuzzy <almikes@aol.com>
parents: 12398
diff changeset
   830
    EndTurn(true)
7443
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   831
  end
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   832
end
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   833
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   834
function onPrecise()
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   835
  if GameTime > 2500 and AnimInProgress() then
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   836
    SetAnimSkip(true)
7454
ce7d7138b436 Modified final cutscene and fixed a skipping bug
belphegorr <szabibibi@gmail.com>
parents: 7451
diff changeset
   837
--  else
ce7d7138b436 Modified final cutscene and fixed a skipping bug
belphegorr <szabibibi@gmail.com>
parents: 7451
diff changeset
   838
--    DeleteGear(cyborgs[1])
ce7d7138b436 Modified final cutscene and fixed a skipping bug
belphegorr <szabibibi@gmail.com>
parents: 7451
diff changeset
   839
--    table.remove(cyborgs, 1)
ce7d7138b436 Modified final cutscene and fixed a skipping bug
belphegorr <szabibibi@gmail.com>
parents: 7451
diff changeset
   840
--    if cyborgsLeft == 0 then
ce7d7138b436 Modified final cutscene and fixed a skipping bug
belphegorr <szabibibi@gmail.com>
parents: 7451
diff changeset
   841
--      DeleteGear(enemy)
ce7d7138b436 Modified final cutscene and fixed a skipping bug
belphegorr <szabibibi@gmail.com>
parents: 7451
diff changeset
   842
--    end
7443
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   843
  end
a7f861f1c3b8 Added Mission 8: Long Live The Queen
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   844
end