share/hedgewars/Data/Missions/Campaign/A Classic Fairytale/shadow.lua
author belphegorr <szabibibi@gmail.com>
Sat, 25 Aug 2012 23:25:18 +0300
changeset 7516 d167af4ab5a0
parent 7512 cc3f036121fe
child 7522 21acf357d7fd
permissions -rw-r--r--
Changed a line in Mission 2 dialogue...
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
7225
e3f2280d9000 Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents: 7213
diff changeset
     1
loadfile(GetDataPath() .. "Scripts/Locale.lua")()
7203
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
     2
loadfile(GetDataPath() .. "Scripts/Animate.lua")()
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
     3
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
     4
-----------------------------Constants---------------------------------
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
     5
startStage = 0
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
     6
spyStage = 1
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
     7
wave1Stage = 2
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
     8
wave2Stage = 3
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
     9
cyborgStage = 4
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    10
ramonStage = 5
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    11
aloneStage = 6
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    12
duoStage = 7
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    13
interSpyStage = 8
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    14
interWeakStage = 9
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    15
acceptedReturnStage = 10
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    16
refusedReturnStage = 11
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    17
attackedReturnStage = 12
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    18
loseStage = 13
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    19
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    20
ourTeam = 0
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    21
weakTeam = 1
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    22
strongTeam = 2
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    23
cyborgTeam = 3
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    24
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    25
leaksNr = 0
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    26
denseNr = 1
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    27
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    28
choiceAccept = 1
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    29
choiceRefuse = 2
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    30
choiceAttack = 3
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    31
7225
e3f2280d9000 Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents: 7213
diff changeset
    32
HogNames = {loc("Brainiac"), loc("Corpsemonger"), loc("Femur Lover"), loc("Glark"), loc("Bonely"), loc("Rot Molester"), loc("Bloodrocutor"), loc("Muscle Dissolver"), loc("Bloodsucker")}
7203
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    33
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    34
---POSITIONS---
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    35
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    36
cannibalPos = {{3108, 1127}, 
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    37
               {2559, 1080}, {3598, 1270}, {3293, 1177}, {2623, 1336}, 
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    38
               {3418, 1336}, {3447, 1335}, {3481, 1340}, {3507, 1324}} 
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    39
densePos = {2776, 1177}
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    40
leaksPos = {2941, 1172}
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    41
cyborgPos = {1113, 1818}
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    42
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    43
---Animations
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    44
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    45
startDialogue = {}
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    46
weaklingsAnim = {}
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    47
stronglingsAnim = {}
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    48
acceptedAnim = {}
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    49
acceptedSurvivedFinalAnim = {}
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    50
acceptedDiedFinalAnim = {}
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    51
refusedAnim = {}
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    52
refusedFinalAnim = {}
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    53
attackedAnim = {}
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    54
attackedFinalAnim = {}
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    55
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    56
-----------------------------Variables---------------------------------
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    57
lastHogTeam = ourTeam
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    58
lastOurHog = leaksNr
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    59
lastEnemyHog = 0
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    60
stage = 0
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    61
choice = 0
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    62
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    63
brainiacDead = false
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    64
cyborgHidden = false
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    65
leaksHidden = false
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    66
denseHidden = false
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    67
cyborgAttacked = false
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    68
retryReturn = false
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    69
shotgunTaken = false
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    70
grenadeTaken = false
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    71
spikyDead = false
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    72
ramonDead = false
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    73
denseDead = false
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    74
leaksDead = false
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    75
ramonHidden = false
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    76
spikyHidden = false
7213
fce7de71742f Fixed some bugs with Mission 2 and Animate.lua.
belphegorr <szabibibi@gmail.com>
parents: 7211
diff changeset
    77
grenadeUsed = false
fce7de71742f Fixed some bugs with Mission 2 and Animate.lua.
belphegorr <szabibibi@gmail.com>
parents: 7211
diff changeset
    78
shotgunUsed = false
7203
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    79
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    80
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    81
hogNr = {}
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    82
cannibalDead = {}
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    83
isHidden = {}
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    84
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    85
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    86
--------------------------Anim skip functions--------------------------
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    87
function AfterRefusedAnim()
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    88
  SpawnUtilityCrate(2045, 1575, amSwitch)
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    89
  SpawnUtilityCrate(2365, 1495, amShotgun)
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    90
  SpawnUtilityCrate(2495, 1519, amGrenade)
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    91
  SpawnUtilityCrate(2620, 1524, amRope)
7225
e3f2280d9000 Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents: 7213
diff changeset
    92
  ShowMission(loc("The Shadow Falls"), loc("The Showdown"), loc("Save Leaks A Lot!|Hint: The Switch utility might be of help to you."), 1, 6000)
7203
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    93
  RemoveEventFunc(CheckDenseDead)
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    94
  AddEvent(CheckStronglingsDead, {}, DoStronglingsDeadRefused, {}, 0)
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    95
  AddAmmo(cannibals[6], amGrenade, 5)
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    96
  stage = ramonStage
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    97
  SwitchHog(cannibals[9])
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    98
  FollowGear(ramon)
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    99
  TurnTimeLeft = 0
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   100
  SetGearMessage(ramon, 0)
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   101
  SetGearMessage(leaks, 0)
7502
16c36f62247b Solved issues with HideHog in mission 2 and 3
belphegorr <szabibibi@gmail.com>
parents: 7448
diff changeset
   102
  AnimWait(ramon, 1)
16c36f62247b Solved issues with HideHog in mission 2 and 3
belphegorr <szabibibi@gmail.com>
parents: 7448
diff changeset
   103
  AddFunction({func = HideHog, args = {cyborg}})
7203
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   104
end
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   105
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   106
function SkipRefusedAnim()
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   107
  RefusedStart()
7448
d0521a3a4358 Solved "floating repositionings" in every mission
belphegorr <szabibibi@gmail.com>
parents: 7425
diff changeset
   108
  AnimSetGearPosition(dense, 2645, 1146)
d0521a3a4358 Solved "floating repositionings" in every mission
belphegorr <szabibibi@gmail.com>
parents: 7425
diff changeset
   109
  AnimSetGearPosition(ramon, 2218, 1675)
d0521a3a4358 Solved "floating repositionings" in every mission
belphegorr <szabibibi@gmail.com>
parents: 7425
diff changeset
   110
  AnimSetGearPosition(spiky, 2400, 1675)
7203
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   111
end
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   112
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   113
function AfterStartDialogue()
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   114
  stage = spyStage
7225
e3f2280d9000 Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents: 7213
diff changeset
   115
  ShowMission(loc("The Shadow Falls"), loc("Play with me!"), loc("Defend yourself!|Hint: You can get tips on using weapons by moving your mouse over them in the weapon selection menu"), 1, 6000)
7203
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   116
  TurnTimeLeft = TurnTime
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   117
end
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   118
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   119
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   120
function StartSkipFunc()
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   121
  SetState(cannibals[1], 0)
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   122
  AnimTurn(leaks, "Right")
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   123
  AnimSwitchHog(leaks)
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   124
  SetInputMask(0xFFFFFFFF)
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   125
end
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   126
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   127
function AfterWeaklingsAnim()
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   128
  AddAmmo(cannibals[2], amShotgun, 4)
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   129
  AddAmmo(cannibals[2], amGrenade, 3)
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   130
  AddAmmo(leaks, amSkip, 4)
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   131
  AddEvent(CheckWeaklingsKilled, {}, DoWeaklingsKilled, {}, 0)
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   132
  SetHealth(SpawnHealthCrate(2757, 1030), 50)
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   133
  SetHealth(SpawnHealthCrate(2899, 1009), 50)
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   134
  stage = wave1Stage
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   135
  SwitchHog(dense)
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   136
  SetGearMessage(dense, 0)
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   137
  SetGearMessage(leaks, 0)
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   138
  TurnTimeLeft = TurnTime
7225
e3f2280d9000 Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents: 7213
diff changeset
   139
  ShowMission(loc("The Shadow Falls"), loc("Why do you not like me?"), loc("Obliterate them!|Hint: You might want to take cover..."), 1, 6000)
7203
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   140
end
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   141
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   142
function SkipWeaklingsAnim()
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   143
  for i = 2, 5 do
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   144
    if isHidden[cannibals[i]] == true then
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   145
      RestoreHog(cannibals[i])
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   146
      isHidden[cannibals[i]] = false
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   147
    end
7448
d0521a3a4358 Solved "floating repositionings" in every mission
belphegorr <szabibibi@gmail.com>
parents: 7425
diff changeset
   148
    AnimSetGearPosition(cannibals[i], unpack(cannibalPos[i]))
7203
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   149
    SetState(cannibals[i], 0)
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   150
  end
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   151
  SetInputMask(0xFFFFFFFF)
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   152
end
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   153
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   154
function AfterStronglingsAnim()
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   155
  stage = cyborgStage
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   156
  TurnTimeLeft = 0
7225
e3f2280d9000 Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents: 7213
diff changeset
   157
  ShowMission(loc("The Shadow Falls"), loc("The Dilemma"), loc("Choose your side! If you want to join the strange man, walk up to him.|Otherwise, walk away from him. If you decide to att...nevermind..."), 1, 8000)
7203
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   158
  AddEvent(CheckChoice, {}, DoChoice, {}, 0)
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   159
  AddEvent(CheckRefuse, {}, DoRefuse, {}, 0)
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   160
  AddEvent(CheckAccept, {}, DoAccept, {}, 0)
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   161
  AddEvent(CheckConfront, {}, DoConfront, {}, 0)
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   162
  AddAmmo(dense, amSwitch, 0)
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   163
  AddAmmo(dense, amSkip, 0)
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   164
  SetHealth(SpawnHealthCrate(2557, 1030), 50)
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   165
  SetHealth(SpawnHealthCrate(3599, 1009), 50)
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   166
end
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   167
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   168
function SkipStronglingsAnim()
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   169
  for i = 6, 9 do
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   170
    if isHidden[cannibals[i]] == true then
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   171
      RestoreHog(cannibals[i])
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   172
      isHidden[cannibals[i]] = false
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   173
    end
7448
d0521a3a4358 Solved "floating repositionings" in every mission
belphegorr <szabibibi@gmail.com>
parents: 7425
diff changeset
   174
    AnimSetGearPosition(cannibals[i], unpack(cannibalPos[i]))
7203
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   175
    SetState(cannibals[i], 0)
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   176
  end
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   177
  if cyborgHidden == true then
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   178
    RestoreHog(cyborg)
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   179
    cyborgHidden = false
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   180
  end
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   181
  SetState(cyborg, 0)
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   182
  SetState(dense, 0)
7448
d0521a3a4358 Solved "floating repositionings" in every mission
belphegorr <szabibibi@gmail.com>
parents: 7425
diff changeset
   183
  AnimSetGearPosition(dense, 1350, 1310)
7203
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   184
  FollowGear(dense)
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   185
  HogTurnLeft(dense, true)
7448
d0521a3a4358 Solved "floating repositionings" in every mission
belphegorr <szabibibi@gmail.com>
parents: 7425
diff changeset
   186
  AnimSetGearPosition(cyborg, 1250, 1310)
7203
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   187
  SwitchHog(dense)
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   188
  SetInputMask(0xFFFFFFFF)
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   189
end
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   190
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   191
function RestartReturnAccepted()
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   192
  retryReturn = false
7448
d0521a3a4358 Solved "floating repositionings" in every mission
belphegorr <szabibibi@gmail.com>
parents: 7425
diff changeset
   193
  AnimSetGearPosition(dense, 1350, 1310)
7203
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   194
  AddAmmo(dense, amGirder, 2)
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   195
  AddAmmo(dense, amParachute, 2)
7225
e3f2280d9000 Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents: 7213
diff changeset
   196
  ShowMission(loc("The Shadow Falls"), loc("The walk of Fame"), loc("Return to Leaks A Lot! If you get stuck, press [Precise] to try again!"), 1, 6000)
7203
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   197
  RemoveEventFunc(CheckNeedGirder)
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   198
  RemoveEventFunc(CheckNeedWeapons)
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   199
  AddEvent(CheckNeedGirder, {}, DoNeedGirder, {}, 0)
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   200
  AddEvent(CheckNeedWeapons, {}, DoNeedWeapons, {}, 0)
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   201
end
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   202
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   203
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   204
function AfterAcceptedAnim()
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   205
  stage = acceptedReturnStage
7228
1b29b8cfb17a Modified some crate positions, added sound to teleports, fixed loc errors...
belphegorr <szabibibi@gmail.com>
parents: 7225
diff changeset
   206
  SpawnAmmoCrate(1370, 810, amGirder)
1b29b8cfb17a Modified some crate positions, added sound to teleports, fixed loc errors...
belphegorr <szabibibi@gmail.com>
parents: 7225
diff changeset
   207
  SpawnAmmoCrate(1300, 810, amParachute)
7225
e3f2280d9000 Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents: 7213
diff changeset
   208
  ShowMission(loc("The Shadow Falls"), loc("The walk of Fame"), loc("Return to Leaks A Lot! If you get stuck, press [Precise] to try again!"), 1, 6000)
7203
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   209
  AddEvent(CheckTookWeapons, {}, DoTookWeapons, {}, 0)
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   210
  AddEvent(CheckNeedGirder, {}, DoNeedGirder, {}, 0)
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   211
  AddEvent(CheckNeedWeapons, {}, DoNeedWeapons, {}, 0)
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   212
  AddEvent(CheckRestartReturnAccepted, {}, RestartReturnAccepted, {}, 1)
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   213
  RemoveEventFunc(CheckDenseDead)
7502
16c36f62247b Solved issues with HideHog in mission 2 and 3
belphegorr <szabibibi@gmail.com>
parents: 7448
diff changeset
   214
  SwitchHog(dense)
16c36f62247b Solved issues with HideHog in mission 2 and 3
belphegorr <szabibibi@gmail.com>
parents: 7448
diff changeset
   215
  AnimWait(dense, 1)
16c36f62247b Solved issues with HideHog in mission 2 and 3
belphegorr <szabibibi@gmail.com>
parents: 7448
diff changeset
   216
  AddFunction({func = HideHog, args = {cyborg}})
7203
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   217
end
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   218
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   219
function SkipAcceptedAnim()
7448
d0521a3a4358 Solved "floating repositionings" in every mission
belphegorr <szabibibi@gmail.com>
parents: 7425
diff changeset
   220
  AnimSetGearPosition(cyborg, unpack(cyborgPos))
7203
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   221
  SetState(cyborg, gstInvisible)
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   222
  AnimSwitchHog(dense)
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   223
  SetInputMask(0xFFFFFFFF)
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   224
end
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   225
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   226
function AfterAttackedAnim()
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   227
  stage = aloneStage
7225
e3f2280d9000 Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents: 7213
diff changeset
   228
  ShowMission(loc("The Shadow Falls"), loc("The Individualist"), loc("Defeat the cannibals!|Grenade hint: set the timer with [1-5], aim with [Up]/[Down] and hold [Space] to set power"), 1, 8000)
7203
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   229
  AddAmmo(cannibals[6], amGrenade, 5)
7213
fce7de71742f Fixed some bugs with Mission 2 and Animate.lua.
belphegorr <szabibibi@gmail.com>
parents: 7211
diff changeset
   230
  AddAmmo(cannibals[6], amFirePunch, 0)
fce7de71742f Fixed some bugs with Mission 2 and Animate.lua.
belphegorr <szabibibi@gmail.com>
parents: 7211
diff changeset
   231
  AddAmmo(cannibals[6], amBaseballBat, 0)
7203
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   232
  SetGearMessage(leaks, 0)
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   233
  TurnTimeLeft = TurnTime
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   234
  AddEvent(CheckStronglingsDead, {}, DoStronglingsDeadAttacked, {}, 0)
7502
16c36f62247b Solved issues with HideHog in mission 2 and 3
belphegorr <szabibibi@gmail.com>
parents: 7448
diff changeset
   235
  SwitchHog(leaks)
16c36f62247b Solved issues with HideHog in mission 2 and 3
belphegorr <szabibibi@gmail.com>
parents: 7448
diff changeset
   236
  AnimWait(dense, 1)
16c36f62247b Solved issues with HideHog in mission 2 and 3
belphegorr <szabibibi@gmail.com>
parents: 7448
diff changeset
   237
  AddFunction({func = HideHog, args = {cyborg}})
7203
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   238
end
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   239
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   240
function SkipAttackedAnim()
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   241
  if denseDead == false then
7213
fce7de71742f Fixed some bugs with Mission 2 and Animate.lua.
belphegorr <szabibibi@gmail.com>
parents: 7211
diff changeset
   242
    DeleteGear(dense)
7203
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   243
  end
7213
fce7de71742f Fixed some bugs with Mission 2 and Animate.lua.
belphegorr <szabibibi@gmail.com>
parents: 7211
diff changeset
   244
  SpawnAmmoCrate(2551, 994, amGrenade)
fce7de71742f Fixed some bugs with Mission 2 and Animate.lua.
belphegorr <szabibibi@gmail.com>
parents: 7211
diff changeset
   245
  SpawnAmmoCrate(3551, 994, amGrenade)
fce7de71742f Fixed some bugs with Mission 2 and Animate.lua.
belphegorr <szabibibi@gmail.com>
parents: 7211
diff changeset
   246
  SpawnAmmoCrate(3392, 1101, amShotgun)
fce7de71742f Fixed some bugs with Mission 2 and Animate.lua.
belphegorr <szabibibi@gmail.com>
parents: 7211
diff changeset
   247
  SpawnAmmoCrate(3192, 1101, amShotgun)
7448
d0521a3a4358 Solved "floating repositionings" in every mission
belphegorr <szabibibi@gmail.com>
parents: 7425
diff changeset
   248
  AnimSetGearPosition(cyborg, unpack(cyborgPos))
7203
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   249
  SetState(cyborg, gstInvisible)
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   250
  AnimSwitchHog(leaks)
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   251
  SetInputMask(0xFFFFFFFF)
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   252
end
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   253
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   254
  
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   255
-----------------------------Animations--------------------------------
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   256
7213
fce7de71742f Fixed some bugs with Mission 2 and Animate.lua.
belphegorr <szabibibi@gmail.com>
parents: 7211
diff changeset
   257
function SpawnCrates()
fce7de71742f Fixed some bugs with Mission 2 and Animate.lua.
belphegorr <szabibibi@gmail.com>
parents: 7211
diff changeset
   258
  SpawnAmmoCrate(2551, 994, amGrenade)
fce7de71742f Fixed some bugs with Mission 2 and Animate.lua.
belphegorr <szabibibi@gmail.com>
parents: 7211
diff changeset
   259
  SpawnAmmoCrate(3551, 994, amGrenade)
fce7de71742f Fixed some bugs with Mission 2 and Animate.lua.
belphegorr <szabibibi@gmail.com>
parents: 7211
diff changeset
   260
  SpawnAmmoCrate(3392, 1101, amShotgun)
fce7de71742f Fixed some bugs with Mission 2 and Animate.lua.
belphegorr <szabibibi@gmail.com>
parents: 7211
diff changeset
   261
  SpawnAmmoCrate(3192, 1101, amShotgun)
fce7de71742f Fixed some bugs with Mission 2 and Animate.lua.
belphegorr <szabibibi@gmail.com>
parents: 7211
diff changeset
   262
  return true
fce7de71742f Fixed some bugs with Mission 2 and Animate.lua.
belphegorr <szabibibi@gmail.com>
parents: 7211
diff changeset
   263
end
fce7de71742f Fixed some bugs with Mission 2 and Animate.lua.
belphegorr <szabibibi@gmail.com>
parents: 7211
diff changeset
   264
7203
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   265
function EmitDenseClouds(anim, dir)
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   266
  local dif
7243
9ae9178c525e Modified Animate.lua function AnimMove to take highercase direction (e.g. "Left")
belphegorr <szabibibi@gmail.com>
parents: 7232
diff changeset
   267
  if dir == "Left" then 
7203
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   268
    dif = 10
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   269
  else
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   270
    dif = -10
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   271
  end
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   272
  AnimInsertStepNext({func = AnimVisualGear, args = {dense, GetX(dense) + dif, GetY(dense) + dif, vgtSteam, 0, true}, swh = false})
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   273
  AnimInsertStepNext({func = AnimVisualGear, args = {dense, GetX(dense) + dif, GetY(dense) + dif, vgtSteam, 0, true}, swh = false})
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   274
  AnimInsertStepNext({func = AnimVisualGear, args = {dense, GetX(dense) + dif, GetY(dense) + dif, vgtSteam, 0, true}, swh = false})
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   275
  AnimInsertStepNext({func = AnimWait, args = {dense, 800}})
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   276
  AnimInsertStepNext({func = AnimVisualGear, args = {dense, GetX(dense) + dif, GetY(dense) + dif, vgtSteam, 0, true}, swh = false})
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   277
  AnimInsertStepNext({func = AnimVisualGear, args = {dense, GetX(dense) + dif, GetY(dense) + dif, vgtSteam, 0, true}, swh = false})
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   278
  AnimInsertStepNext({func = AnimWait, args = {dense, 800}})
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   279
  AnimInsertStepNext({func = AnimVisualGear, args = {dense, GetX(dense) + dif, GetY(dense) + dif, vgtSteam, 0, true}, swh = false})
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   280
end
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   281
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   282
function BlowDenseCloud()
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   283
  AnimInsertStepNext({func = DeleteGear, args = {dense}, swh = false}) 
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   284
  AnimInsertStepNext({func = AnimVisualGear, args = {dense, GetX(dense), GetY(dense), vgtBigExplosion, 0, true}, swh = false})
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   285
  AnimInsertStepNext({func = AnimWait, args = {dense, 1200}})
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   286
  AnimInsertStepNext({func = AnimVisualGear, args = {dense, GetX(dense) + 20, GetY(dense), vgtExplosion, 0, true}, swh = false})
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   287
  AnimInsertStepNext({func = AnimWait, args = {dense, 100}})
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   288
  AnimInsertStepNext({func = AnimVisualGear, args = {dense, GetX(dense) + 10, GetY(dense), vgtExplosion, 0, true}, swh = false})
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   289
  AnimInsertStepNext({func = AnimWait, args = {dense, 100}})
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   290
  AnimInsertStepNext({func = AnimVisualGear, args = {dense, GetX(dense) - 10, GetY(dense), vgtExplosion, 0, true}, swh = false})
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   291
  AnimInsertStepNext({func = AnimWait, args = {dense, 100}})
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   292
  AnimInsertStepNext({func = AnimVisualGear, args = {dense, GetX(dense) - 20, GetY(dense), vgtExplosion, 0, true}, swh = false})
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   293
end
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   294
7213
fce7de71742f Fixed some bugs with Mission 2 and Animate.lua.
belphegorr <szabibibi@gmail.com>
parents: 7211
diff changeset
   295
function SetupAcceptedSurvivedFinalAnim()
fce7de71742f Fixed some bugs with Mission 2 and Animate.lua.
belphegorr <szabibibi@gmail.com>
parents: 7211
diff changeset
   296
  table.insert(acceptedSurvivedFinalAnim, {func = AnimCustomFunction, args = {dense, CondNeedToTurn, {leaks, dense}}})
7225
e3f2280d9000 Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents: 7213
diff changeset
   297
  table.insert(acceptedSurvivedFinalAnim, {func = AnimSay, args = {leaks, loc("Pfew! That was close!"), SAY_SAY, 3000}})
7213
fce7de71742f Fixed some bugs with Mission 2 and Animate.lua.
belphegorr <szabibibi@gmail.com>
parents: 7211
diff changeset
   298
  if grenadeUsed and shotgunUsed then
7225
e3f2280d9000 Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents: 7213
diff changeset
   299
    table.insert(acceptedSurvivedFinalAnim, {func = AnimSay, args = {leaks, loc("Where did you get the exploding apples and the magic bow that shoots many arrows?"), SAY_SAY, 9000}})
7213
fce7de71742f Fixed some bugs with Mission 2 and Animate.lua.
belphegorr <szabibibi@gmail.com>
parents: 7211
diff changeset
   300
  elseif grenadeUsed then
7225
e3f2280d9000 Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents: 7213
diff changeset
   301
    table.insert(acceptedSurvivedFinalAnim, {func = AnimSay, args = {leaks, loc("Where did you get the exploding apples?"), SAY_SAY, 6000}})
7213
fce7de71742f Fixed some bugs with Mission 2 and Animate.lua.
belphegorr <szabibibi@gmail.com>
parents: 7211
diff changeset
   302
  elseif shotgunUsed then
7225
e3f2280d9000 Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents: 7213
diff changeset
   303
    table.insert(acceptedSurvivedFinalAnim, {func = AnimSay, args = {leaks, loc("Where did you get the magic bow that shoots many arrows?"), SAY_SAY, 8000}})
7213
fce7de71742f Fixed some bugs with Mission 2 and Animate.lua.
belphegorr <szabibibi@gmail.com>
parents: 7211
diff changeset
   304
  else
7225
e3f2280d9000 Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents: 7213
diff changeset
   305
    table.insert(acceptedSurvivedFinalAnim, {func = AnimSay, args = {leaks, loc("Did you warn the village?"), SAY_SAY, 4000}})
e3f2280d9000 Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents: 7213
diff changeset
   306
    table.insert(acceptedSurvivedFinalAnim, {func = AnimSay, args = {dense, loc("No, I came back to help you out..."), SAY_SAY, 5000}})
7213
fce7de71742f Fixed some bugs with Mission 2 and Animate.lua.
belphegorr <szabibibi@gmail.com>
parents: 7211
diff changeset
   307
  end
fce7de71742f Fixed some bugs with Mission 2 and Animate.lua.
belphegorr <szabibibi@gmail.com>
parents: 7211
diff changeset
   308
  if grenadeUsed or shotgunUsed then
7225
e3f2280d9000 Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents: 7213
diff changeset
   309
    table.insert(acceptedSurvivedFinalAnim, {func = AnimSay, args = {dense, loc("Uhm...I met one of them and took his weapons."), SAY_SAY, 5000}})
7213
fce7de71742f Fixed some bugs with Mission 2 and Animate.lua.
belphegorr <szabibibi@gmail.com>
parents: 7211
diff changeset
   310
  end
7225
e3f2280d9000 Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents: 7213
diff changeset
   311
  table.insert(acceptedSurvivedFinalAnim, {func = AnimSay, args = {dense, loc("We should head back to the village now."), SAY_SAY, 5000}})
7213
fce7de71742f Fixed some bugs with Mission 2 and Animate.lua.
belphegorr <szabibibi@gmail.com>
parents: 7211
diff changeset
   312
end
fce7de71742f Fixed some bugs with Mission 2 and Animate.lua.
belphegorr <szabibibi@gmail.com>
parents: 7211
diff changeset
   313
7203
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   314
function AnimationSetup()
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   315
  table.insert(startDialogue, {func = AnimWait, args = {dense, 4000}})
7225
e3f2280d9000 Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents: 7213
diff changeset
   316
  table.insert(startDialogue, {func = AnimCaption, args = {leaks, loc("After the shock caused by the enemy spy, Leaks A Lot and Dense Cloud went hunting to relax."), 6000}})
e3f2280d9000 Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents: 7213
diff changeset
   317
  table.insert(startDialogue, {func = AnimCaption, args = {leaks, loc("Little did they know that this hunt will mark them forever..."), 4000}})
e3f2280d9000 Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents: 7213
diff changeset
   318
  table.insert(startDialogue, {func = AnimSay, args = {leaks, loc("I have no idea where that mole disappeared...Can you see it?"), SAY_SAY, 9000}})
e3f2280d9000 Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents: 7213
diff changeset
   319
  table.insert(startDialogue, {func = AnimSay, args = {dense, loc("Nope. It was one fast mole, that's for sure."), SAY_SAY, 5000}}) 
7243
9ae9178c525e Modified Animate.lua function AnimMove to take highercase direction (e.g. "Left")
belphegorr <szabibibi@gmail.com>
parents: 7232
diff changeset
   320
  table.insert(startDialogue, {func = AnimCustomFunction, args = {dense, EmitDenseClouds, {startDialogue, "Right"}}})
7203
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   321
  table.insert(startDialogue, {func = AnimWait, args = {dense, 2000}})
7225
e3f2280d9000 Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents: 7213
diff changeset
   322
  table.insert(startDialogue, {func = AnimSay, args = {leaks, loc("Please, stop releasing your \"smoke signals\"!"), SAY_SAY, 5000}})
e3f2280d9000 Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents: 7213
diff changeset
   323
  table.insert(startDialogue, {func = AnimSay, args = {leaks, loc("You're terrorizing the forest...We won't catch anything like this!"), SAY_SAY, 6000}})
e3f2280d9000 Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents: 7213
diff changeset
   324
  table.insert(startDialogue, {func = AnimSay, args = {leaks, loc("..."), SAY_THINK, 1000}})
7203
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   325
  table.insert(startDialogue, {func = AnimGiveState, args = {cannibals[1], 0}, swh = false})
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   326
  table.insert(startDialogue, {func = AnimOutOfNowhere, args = {cannibals[1], unpack(cannibalPos[1])}, swh = false})
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   327
  table.insert(startDialogue, {func = AnimTurn, args = {leaks, "Right"}})
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   328
  table.insert(startDialogue, {func = AnimTurn, args = {cannibals[1], "Right"}})
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   329
  table.insert(startDialogue, {func = AnimWait, args = {cannibals[1], 1000}})
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   330
  table.insert(startDialogue, {func = AnimTurn, args = {cannibals[1], "Left"}})
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   331
  table.insert(startDialogue, {func = AnimWait, args = {cannibals[1], 1000}})
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   332
  table.insert(startDialogue, {func = AnimTurn, args = {cannibals[1], "Right"}})
7225
e3f2280d9000 Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents: 7213
diff changeset
   333
  table.insert(startDialogue, {func = AnimSay, args = {cannibals[1], loc("I can't believe it worked!"), SAY_THINK, 3500}})
7516
d167af4ab5a0 Changed a line in Mission 2 dialogue...
belphegorr <szabibibi@gmail.com>
parents: 7512
diff changeset
   334
  table.insert(startDialogue, {func = AnimSay, args = {cannibals[1], loc("That shaman sure knows what he's doing!"), SAY_THINK, 6000}})
d167af4ab5a0 Changed a line in Mission 2 dialogue...
belphegorr <szabibibi@gmail.com>
parents: 7512
diff changeset
   335
  table.insert(startDialogue, {func = AnimSay, args = {cannibals[1], loc("Yeah...I think it's a 'he', lol."), SAY_THINK, 5000}})
7225
e3f2280d9000 Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents: 7213
diff changeset
   336
  table.insert(startDialogue, {func = AnimSay, args = {leaks, loc("It wants our brains!"), SAY_SHOUT, 3000}})
7203
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   337
  table.insert(startDialogue, {func = AnimTurn, args = {cannibals[1], "Left"}})
7225
e3f2280d9000 Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents: 7213
diff changeset
   338
  table.insert(startDialogue, {func = AnimSay, args = {cannibals[1], loc("Not you again! My head still hurts from last time!"), SAY_SHOUT, 6000}})
7203
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   339
  table.insert(startDialogue, {func = AnimSwitchHog, args = {leaks}})
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   340
  AddSkipFunction(startDialogue, StartSkipFunc, {})
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   341
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   342
  table.insert(weaklingsAnim, {func = AnimGearWait, args = {leaks, 1000}})
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   343
  table.insert(weaklingsAnim, {func = AnimCustomFunction, args = {leaks, CondNeedToTurn, {leaks, dense}}})
7225
e3f2280d9000 Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents: 7213
diff changeset
   344
  table.insert(weaklingsAnim, {func = AnimSay, args = {leaks, loc("Did you see him coming?"), SAY_SAY, 3500}})
e3f2280d9000 Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents: 7213
diff changeset
   345
  table.insert(weaklingsAnim, {func = AnimSay, args = {dense, loc("No. Where did he come from?"), SAY_SAY, 3500}})
7213
fce7de71742f Fixed some bugs with Mission 2 and Animate.lua.
belphegorr <szabibibi@gmail.com>
parents: 7211
diff changeset
   346
  table.insert(weaklingsAnim, {func = AnimCustomFunction, args = {leaks, UnHideWeaklings, {}}})
7203
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   347
  table.insert(weaklingsAnim, {func = AnimOutOfNowhere, args = {cannibals[2], unpack(cannibalPos[2])}})
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   348
  table.insert(weaklingsAnim, {func = AnimGiveState, args = {cannibals[2], 0}})
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   349
  table.insert(weaklingsAnim, {func = AnimWait, args = {leaks, 400}})
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   350
  table.insert(weaklingsAnim, {func = AnimGiveState, args = {cannibals[3], 0}})
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   351
  table.insert(weaklingsAnim, {func = AnimOutOfNowhere, args = {cannibals[3], unpack(cannibalPos[3])}})
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   352
  table.insert(weaklingsAnim, {func = AnimWait, args = {leaks, 400}})
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   353
  table.insert(weaklingsAnim, {func = AnimGiveState, args = {cannibals[4], 0}})
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   354
  table.insert(weaklingsAnim, {func = AnimOutOfNowhere, args = {cannibals[4], unpack(cannibalPos[4])}})
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   355
  table.insert(weaklingsAnim, {func = AnimWait, args = {leaks, 400}})
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   356
  table.insert(weaklingsAnim, {func = AnimGiveState, args = {cannibals[5], 0}})
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   357
  table.insert(weaklingsAnim, {func = AnimOutOfNowhere, args = {cannibals[5], unpack(cannibalPos[5])}})
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   358
  table.insert(weaklingsAnim, {func = AnimWait, args = {leaks, 400}})
7225
e3f2280d9000 Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents: 7213
diff changeset
   359
  table.insert(weaklingsAnim, {func = AnimSay, args = {cannibals[3], loc("Are we there yet?"), SAY_SAY, 4000}}) 
e3f2280d9000 Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents: 7213
diff changeset
   360
  table.insert(weaklingsAnim, {func = AnimSay, args = {dense, loc("This must be some kind of sorcery!"), SAY_SHOUT, 3500}})
7203
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   361
  table.insert(weaklingsAnim, {func = AnimSwitchHog, args = {leaks}})
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   362
  AddSkipFunction(weaklingsAnim, SkipWeaklingsAnim, {})
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   363
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   364
  table.insert(stronglingsAnim, {func = AnimGearWait, args = {leaks, 1000}})
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   365
  table.insert(stronglingsAnim, {func = AnimCustomFunction, args = {leaks, UnHideStronglings, {}}})
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   366
  table.insert(stronglingsAnim, {func = AnimCustomFunction, args = {leaks, CondNeedToTurn, {leaks, dense}}})
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   367
  table.insert(stronglingsAnim, {func = AnimGiveState, args = {leaks, 0}})
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   368
  table.insert(stronglingsAnim, {func = AnimGiveState, args = {dense, 0}})
7225
e3f2280d9000 Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents: 7213
diff changeset
   369
  table.insert(stronglingsAnim, {func = AnimSay, args = {leaks, loc("I thought their shaman died when he tried our medicine!"), SAY_SAY, 7000}})
e3f2280d9000 Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents: 7213
diff changeset
   370
  table.insert(stronglingsAnim, {func = AnimSay, args = {dense, loc("I saw it with my own eyes!"), SAY_SAY, 4000}})
e3f2280d9000 Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents: 7213
diff changeset
   371
  table.insert(stronglingsAnim, {func = AnimSay, args = {leaks, loc("Then how do they keep appearing?"), SAY_SAY, 4000}})
e3f2280d9000 Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents: 7213
diff changeset
   372
  table.insert(stronglingsAnim, {func = AnimSay, args = {leaks, loc("It's impossible to communicate with the spirits without a shaman."), SAY_SAY, 7000}})
e3f2280d9000 Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents: 7213
diff changeset
   373
  table.insert(stronglingsAnim, {func = AnimSay, args = {dense, loc("We need to warn the village."), SAY_SAY, 3500}})
7203
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   374
  table.insert(stronglingsAnim, {func = AnimGiveState, args = {cannibals[6], 0}})
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   375
  table.insert(stronglingsAnim, {func = AnimOutOfNowhere, args = {cannibals[6], unpack(cannibalPos[6])}})
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   376
  table.insert(stronglingsAnim, {func = AnimWait, args = {leaks, 400}})
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   377
  table.insert(stronglingsAnim, {func = AnimGiveState, args = {cannibals[7], 0}})
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   378
  table.insert(stronglingsAnim, {func = AnimOutOfNowhere, args = {cannibals[7], unpack(cannibalPos[7])}})
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   379
  table.insert(stronglingsAnim, {func = AnimWait, args = {leaks, 400}})
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   380
  table.insert(stronglingsAnim, {func = AnimGiveState, args = {cannibals[8], 0}})
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   381
  table.insert(stronglingsAnim, {func = AnimOutOfNowhere, args = {cannibals[8], unpack(cannibalPos[8])}})
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   382
  table.insert(stronglingsAnim, {func = AnimWait, args = {leaks, 400}})
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   383
  table.insert(stronglingsAnim, {func = AnimGiveState, args = {cannibals[9], 0}})
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   384
  table.insert(stronglingsAnim, {func = AnimOutOfNowhere, args = {cannibals[9], unpack(cannibalPos[9])}})
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   385
  table.insert(stronglingsAnim, {func = AnimWait, args = {leaks, 400}})
7225
e3f2280d9000 Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents: 7213
diff changeset
   386
  table.insert(stronglingsAnim, {func = AnimSay, args = {cannibals[7], loc("What a ride!"), SAY_SHOUT, 2000}})
7203
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   387
  table.insert(stronglingsAnim, {func = AnimTurn, args = {leaks, "Right"}})
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   388
  table.insert(stronglingsAnim, {func = AnimWait, args = {leaks, 700}})
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   389
  table.insert(stronglingsAnim, {func = AnimTurn, args = {leaks, "Left"}})
7225
e3f2280d9000 Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents: 7213
diff changeset
   390
  table.insert(stronglingsAnim, {func = AnimSay, args = {leaks, loc("We can't defeat them!"), SAY_THINK, 3000}})
e3f2280d9000 Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents: 7213
diff changeset
   391
  table.insert(stronglingsAnim, {func = AnimSay, args = {leaks, loc("I'll hold them up while you return to the village!"), SAY_SAY, 6000}})
7203
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   392
  table.insert(stronglingsAnim, {func = AnimFollowGear, args = {cyborg}, swh = false})
7225
e3f2280d9000 Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents: 7213
diff changeset
   393
  table.insert(stronglingsAnim, {func = AnimCaption, args = {cyborg, loc("30 minutes later...")}, swh = false})
7213
fce7de71742f Fixed some bugs with Mission 2 and Animate.lua.
belphegorr <szabibibi@gmail.com>
parents: 7211
diff changeset
   394
  table.insert(stronglingsAnim, {func = AnimWait, args = {cyborg, 2000}})
7203
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   395
  table.insert(stronglingsAnim, {func = AnimSetGearPosition, args = {dense, 1420, 1315}})
7243
9ae9178c525e Modified Animate.lua function AnimMove to take highercase direction (e.g. "Left")
belphegorr <szabibibi@gmail.com>
parents: 7232
diff changeset
   396
  table.insert(stronglingsAnim, {func = AnimMove, args = {dense, "Left", 1400, 0}})
9ae9178c525e Modified Animate.lua function AnimMove to take highercase direction (e.g. "Left")
belphegorr <szabibibi@gmail.com>
parents: 7232
diff changeset
   397
  table.insert(stronglingsAnim, {func = AnimCustomFunction, args = {dense, EmitDenseClouds, {stronglingsAnim, "Left"}}})
9ae9178c525e Modified Animate.lua function AnimMove to take highercase direction (e.g. "Left")
belphegorr <szabibibi@gmail.com>
parents: 7232
diff changeset
   398
  table.insert(stronglingsAnim, {func = AnimMove, args = {dense, "Left", 1350, 0}})
7203
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   399
  table.insert(stronglingsAnim, {func = AnimOutOfNowhere, args = {cyborg, 1250, 1320}})
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   400
  table.insert(stronglingsAnim, {func = AnimRemoveState, args = {cyborg, gstInvisible}})
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   401
  table.insert(stronglingsAnim, {func = AnimGearWait, args = {cyborg, 2000}})
7225
e3f2280d9000 Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents: 7213
diff changeset
   402
  table.insert(stronglingsAnim, {func = AnimSay, args = {cyborg, loc("Greetings, cloudy one!"), SAY_SAY, 3000}})
e3f2280d9000 Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents: 7213
diff changeset
   403
  table.insert(stronglingsAnim, {func = AnimSay, args = {cyborg, loc("I have come to make you an offering..."), SAY_SAY, 6000}})
e3f2280d9000 Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents: 7213
diff changeset
   404
  table.insert(stronglingsAnim, {func = AnimSay, args = {cyborg, loc("You are given the chance to turn your life around..."), SAY_SAY, 6000}})
e3f2280d9000 Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents: 7213
diff changeset
   405
  table.insert(stronglingsAnim, {func = AnimSay, args = {cyborg, loc("If you agree to provide the information we need, you will be spared!"), SAY_SAY, 7000}})
e3f2280d9000 Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents: 7213
diff changeset
   406
  table.insert(stronglingsAnim, {func = AnimSay, args = {cyborg, loc("Have no illusions, your tribe is dead, indifferent of your choice."), SAY_SAY, 7000}})
e3f2280d9000 Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents: 7213
diff changeset
   407
  table.insert(stronglingsAnim, {func = AnimSay, args = {cyborg, loc("If you decide to help us, though, we will no longer need to find a new governor for the island."), SAY_SAY, 8000}})
e3f2280d9000 Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents: 7213
diff changeset
   408
  table.insert(stronglingsAnim, {func = AnimSay, args = {cyborg, loc("If you know what I mean..."), SAY_SAY, 3000}})
e3f2280d9000 Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents: 7213
diff changeset
   409
  table.insert(stronglingsAnim, {func = AnimSay, args = {cyborg, loc("So? What will it be?"), SAY_SAY, 3000}})
7203
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   410
  table.insert(stronglingsAnim, {func = AnimSwitchHog, args = {dense}})
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   411
  AddSkipFunction(stronglingsAnim, SkipStronglingsAnim, {})
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   412
7225
e3f2280d9000 Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents: 7213
diff changeset
   413
  table.insert(acceptedAnim, {func = AnimSay, args = {cyborg, loc("Great choice, Steve! Mind if I call you that?"), SAY_SAY, 7000}})
e3f2280d9000 Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents: 7213
diff changeset
   414
  table.insert(acceptedAnim, {func = AnimSay, args = {dense, loc("Whatever floats your boat..."), SAY_SAY, 4500}})
e3f2280d9000 Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents: 7213
diff changeset
   415
  table.insert(acceptedAnim, {func = AnimSay, args = {cyborg, loc("Great! You will be contacted soon for assistance."), SAY_SAY, 6000}})
e3f2280d9000 Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents: 7213
diff changeset
   416
  table.insert(acceptedAnim, {func = AnimSay, args = {cyborg, loc("In the meantime, take these and return to your \"friend\"!"), SAY_SAY, 6000}})
7203
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   417
  table.insert(acceptedAnim, {func = AnimGiveState, args = {cyborg, gstInvisible}})
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   418
  table.insert(acceptedAnim, {func = AnimDisappear, args = {cyborg, unpack(cyborgPos)}})
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   419
  table.insert(acceptedAnim, {func = AnimSwitchHog, args = {dense}})
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   420
  AddSkipFunction(acceptedAnim, SkipAcceptedAnim, {}) 
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   421
7225
e3f2280d9000 Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents: 7213
diff changeset
   422
  table.insert(acceptedDiedFinalAnim, {func = AnimSay, args = {leaks, loc("Pfew! That was close!"), SAY_THINK, 3000}})
e3f2280d9000 Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents: 7213
diff changeset
   423
  table.insert(acceptedDiedFinalAnim, {func = AnimSay, args = {leaks, loc("Your death will not be in vain, Dense Cloud!"), SAY_THINK, 5000}})
e3f2280d9000 Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents: 7213
diff changeset
   424
  table.insert(acceptedDiedFinalAnim, {func = AnimSay, args = {dense, loc("You will be avenged!"), SAY_SAY, 3000}})
7203
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   425
7225
e3f2280d9000 Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents: 7213
diff changeset
   426
  table.insert(refusedAnim, {func = AnimSay, args = {cyborg, loc("I see..."), SAY_SAY, 2000}})
e3f2280d9000 Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents: 7213
diff changeset
   427
  table.insert(refusedAnim, {func = AnimSay, args = {cyborg, loc("Remember this, pathetic animal: when the day comes, you will regret your blind loyalty!"), SAY_SAY, 8000}})
e3f2280d9000 Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents: 7213
diff changeset
   428
  table.insert(refusedAnim, {func = AnimSay, args = {cyborg, loc("You just committed suicide..."), SAY_SAY, 5000}})
7203
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   429
  table.insert(refusedAnim, {func = AnimDisappear, args = {cyborg, unpack(cyborgPos)}})
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   430
  table.insert(refusedAnim, {func = AnimGiveState, args = {cyborg, gstInvisible}})
7225
e3f2280d9000 Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents: 7213
diff changeset
   431
  table.insert(refusedAnim, {func = AnimSay, args = {dense, loc("If you say so..."), SAY_THINK, 3000}})
7203
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   432
  table.insert(refusedAnim, {func = AnimFollowGear, args = {cyborg}, swh = false})
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   433
  table.insert(refusedAnim, {func = AnimWait, args = {cyborg, 700}})
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   434
  table.insert(refusedAnim, {func = AnimCustomFunction, args = {dense, RefusedStart, {}}})
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   435
  table.insert(refusedAnim, {func = AnimOutOfNowhere, args = {dense, 2645, 1146}})
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   436
  table.insert(refusedAnim, {func = AnimOutOfNowhere, args = {ramon, 2218, 1675}})
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   437
  table.insert(refusedAnim, {func = AnimOutOfNowhere, args = {spiky, 2400, 1675}})
7243
9ae9178c525e Modified Animate.lua function AnimMove to take highercase direction (e.g. "Left")
belphegorr <szabibibi@gmail.com>
parents: 7232
diff changeset
   438
  table.insert(refusedAnim, {func = AnimTurn, args = {spiky, "Left"}})
7203
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   439
  table.insert(refusedAnim, {func = AnimWait, args = {cyborg, 1700}})
7243
9ae9178c525e Modified Animate.lua function AnimMove to take highercase direction (e.g. "Left")
belphegorr <szabibibi@gmail.com>
parents: 7232
diff changeset
   440
  table.insert(refusedAnim, {func = AnimTurn, args = {spiky, "Right"}})
7203
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   441
  table.insert(refusedAnim, {func = AnimWait, args = {cyborg, 1700}})
7243
9ae9178c525e Modified Animate.lua function AnimMove to take highercase direction (e.g. "Left")
belphegorr <szabibibi@gmail.com>
parents: 7232
diff changeset
   442
  table.insert(refusedAnim, {func = AnimTurn, args = {spiky, "Left"}})
7225
e3f2280d9000 Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents: 7213
diff changeset
   443
  table.insert(refusedAnim, {func = AnimSay, args = {spiky, loc("Dude, we really need a new shaman..."), SAY_SAY, 4000}})
7203
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   444
  AddSkipFunction(refusedAnim, SkipRefusedAnim, {})
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   445
7225
e3f2280d9000 Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents: 7213
diff changeset
   446
  table.insert(refusedFinalAnim, {func = AnimSay, args = {leaks, loc("It's over..."), SAY_SAY, 2000}})
e3f2280d9000 Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents: 7213
diff changeset
   447
  table.insert(refusedFinalAnim, {func = AnimSay, args = {leaks, loc("Let's head back to the village!"), SAY_SAY, 4000}})
7203
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   448
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   449
  table.insert(attackedAnim, {func = AnimCustomFunction, args = {dense, CondNeedToTurn, {cyborg, dense}}})
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   450
  table.insert(attackedAnim, {func = AnimCustomFunction, args = {cyborg, SetHealth, {cyborg, 200}}})
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   451
  table.insert(attackedAnim, {func = AnimWait, args = {cyborg, 2000}})
7225
e3f2280d9000 Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents: 7213
diff changeset
   452
  table.insert(attackedAnim, {func = AnimSay, args = {cyborg, loc("Really?! You thought you could harm me with your little toys?"), SAY_SAY, 7000}})
e3f2280d9000 Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents: 7213
diff changeset
   453
  table.insert(attackedAnim, {func = AnimSay, args = {cyborg, loc("You're pathetic! You are not worthy of my attention..."), SAY_SAY, 6000}})
e3f2280d9000 Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents: 7213
diff changeset
   454
  table.insert(attackedAnim, {func = AnimSay, args = {cyborg, loc("Actually, you aren't worthy of life! Take this..."), SAY_SAY, 5000}})
7203
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   455
  table.insert(attackedAnim, {func = AnimCustomFunction, args = {dense, BlowDenseCloud, {}}, swh = false})
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   456
  table.insert(attackedAnim, {func = AnimWait, args = {cyborg, 2000}})
7225
e3f2280d9000 Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents: 7213
diff changeset
   457
  table.insert(attackedAnim, {func = AnimSay, args = {cyborg, loc("Incredible..."), SAY_SAY, 3000}})
7203
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   458
  table.insert(attackedAnim, {func = AnimDisappear, args = {cyborg, unpack(cyborgPos)}})
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   459
  table.insert(attackedAnim, {func = AnimGiveState, args = {cyborg, gstInvisible}})
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   460
  table.insert(attackedAnim, {func = AnimSwitchHog, args = {leaks}})
7225
e3f2280d9000 Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents: 7213
diff changeset
   461
  table.insert(attackedAnim, {func = AnimSay, args = {leaks, loc("I wonder where Dense Cloud is..."), SAY_THINK, 4000}})
e3f2280d9000 Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents: 7213
diff changeset
   462
  table.insert(attackedAnim, {func = AnimSay, args = {leaks, loc("I can't wait any more, I have to save myself!"), SAY_THINK, 5000}})
7213
fce7de71742f Fixed some bugs with Mission 2 and Animate.lua.
belphegorr <szabibibi@gmail.com>
parents: 7211
diff changeset
   463
  table.insert(attackedAnim, {func = AnimCustomFunction, args = {leaks, SpawnCrates, {}}})
fce7de71742f Fixed some bugs with Mission 2 and Animate.lua.
belphegorr <szabibibi@gmail.com>
parents: 7211
diff changeset
   464
  table.insert(attackedAnim, {func = AnimWait, args = {leaks, 1500}})
7225
e3f2280d9000 Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents: 7213
diff changeset
   465
  table.insert(attackedAnim, {func = AnimSay, args = {leaks, loc("Where are all these crates coming from?!"), SAY_THINK, 5500}})
7203
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   466
  AddSkipFunction(attackedAnim, SkipAttackedAnim, {})
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   467
  
7213
fce7de71742f Fixed some bugs with Mission 2 and Animate.lua.
belphegorr <szabibibi@gmail.com>
parents: 7211
diff changeset
   468
  table.insert(attackedFinalAnim, {func = AnimWait, args = {leaks, 2000}})
7225
e3f2280d9000 Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents: 7213
diff changeset
   469
  table.insert(attackedFinalAnim, {func = AnimSay, args = {leaks, loc("I have to get back to the village!"), SAY_THINK, 5000}})
e3f2280d9000 Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents: 7213
diff changeset
   470
  table.insert(attackedFinalAnim, {func = AnimSay, args = {leaks, loc("Dense Cloud must have already told them everything..."), SAY_THINK, 7000}})
7203
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   471
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   472
end
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   473
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   474
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   475
-----------------------------Misc--------------------------------------
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   476
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   477
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   478
function RefusedStart()
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   479
  if ramonHidden == true then
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   480
    RestoreHog(ramon)
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   481
    ramonHidden = false
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   482
  end
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   483
  if spikyHidden == true then
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   484
    RestoreHog(spiky)
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   485
    spikyHidden = false
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   486
  end
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   487
  SetState(ramon, 0)
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   488
  SetState(spiky, 0)
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   489
  SetGearMessage(dense, 0)
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   490
  SetGearMessage(ramon, 0)
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   491
  SetGearMessage(spiky, 0)
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   492
end
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   493
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   494
function AddHogs()
7225
e3f2280d9000 Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents: 7213
diff changeset
   495
	AddTeam(loc("Natives"), 29439, "Bone", "Island", "HillBilly", "cm_birdy")
e3f2280d9000 Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents: 7213
diff changeset
   496
  ramon = AddHog(loc("Ramon"), 0, 100, "rasta")
e3f2280d9000 Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents: 7213
diff changeset
   497
	leaks = AddHog(loc("Leaks A Lot"), 0, 100, "Rambo")
e3f2280d9000 Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents: 7213
diff changeset
   498
  dense = AddHog(loc("Dense Cloud"), 0, 100, "RobinHood")
e3f2280d9000 Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents: 7213
diff changeset
   499
  spiky = AddHog(loc("Spiky Cheese"), 0, 100, "hair_yellow")
7203
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   500
7225
e3f2280d9000 Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents: 7213
diff changeset
   501
  AddTeam(loc("Weaklings"), 14483456, "Skull", "Island", "Pirate","cm_vampire")
7203
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   502
  cannibals = {}
7225
e3f2280d9000 Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents: 7213
diff changeset
   503
  cannibals[1] = AddHog(loc("Brainiac"), 5, 20, "Zombi")
7203
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   504
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   505
  for i = 2, 5 do
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   506
    cannibals[i] = AddHog(HogNames[i], 1, 20, "Zombi")
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   507
    hogNr[cannibals[i]] = i - 2
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   508
  end
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   509
7225
e3f2280d9000 Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents: 7213
diff changeset
   510
  AddTeam(loc("Stronglings"), 14483456, "Skull", "Island", "Pirate","cm_vampire")
7203
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   511
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   512
  for i = 6, 9 do
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   513
    cannibals[i] = AddHog(HogNames[i], 2, 30, "vampirichog")
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   514
    hogNr[cannibals[i]] = i - 2
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   515
  end
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   516
7225
e3f2280d9000 Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents: 7213
diff changeset
   517
  AddTeam(loc("011101001"), 14483456, "ring", "UFO", "Robot", "cm_star")
e3f2280d9000 Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents: 7213
diff changeset
   518
  cyborg = AddHog(loc("Y3K1337"), 0, 200, "cyborg1")
7203
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   519
end
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   520
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   521
function PlaceHogs()
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   522
  HogTurnLeft(leaks, true)
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   523
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   524
  for i = 2, 9 do
7448
d0521a3a4358 Solved "floating repositionings" in every mission
belphegorr <szabibibi@gmail.com>
parents: 7425
diff changeset
   525
    AnimSetGearPosition(cannibals[i], unpack(cyborgPos))
7243
9ae9178c525e Modified Animate.lua function AnimMove to take highercase direction (e.g. "Left")
belphegorr <szabibibi@gmail.com>
parents: 7232
diff changeset
   526
    AnimTurn(cannibals[i], "Left")
7203
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   527
    cannibalDead[i] = false
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   528
  end
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   529
7448
d0521a3a4358 Solved "floating repositionings" in every mission
belphegorr <szabibibi@gmail.com>
parents: 7425
diff changeset
   530
  AnimSetGearPosition(cannibals[1], cannibalPos[1][1], cannibalPos[1][2])
7243
9ae9178c525e Modified Animate.lua function AnimMove to take highercase direction (e.g. "Left")
belphegorr <szabibibi@gmail.com>
parents: 7232
diff changeset
   531
  AnimTurn(cannibals[1], "Left")
7203
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   532
7448
d0521a3a4358 Solved "floating repositionings" in every mission
belphegorr <szabibibi@gmail.com>
parents: 7425
diff changeset
   533
  AnimSetGearPosition(cyborg, cyborgPos[1], cyborgPos[2])
d0521a3a4358 Solved "floating repositionings" in every mission
belphegorr <szabibibi@gmail.com>
parents: 7425
diff changeset
   534
  AnimSetGearPosition(ramon, 2218, 1675)
d0521a3a4358 Solved "floating repositionings" in every mission
belphegorr <szabibibi@gmail.com>
parents: 7425
diff changeset
   535
  AnimSetGearPosition(skiky, 2400, 1675)
d0521a3a4358 Solved "floating repositionings" in every mission
belphegorr <szabibibi@gmail.com>
parents: 7425
diff changeset
   536
  AnimSetGearPosition(dense, densePos[1], densePos[2])
d0521a3a4358 Solved "floating repositionings" in every mission
belphegorr <szabibibi@gmail.com>
parents: 7425
diff changeset
   537
  AnimSetGearPosition(leaks, leaksPos[1], leaksPos[2]) 
7203
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   538
end
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   539
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   540
function VisiblizeHogs()
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   541
  for i = 1, 9 do
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   542
    SetState(cannibals[i], gstInvisible)
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   543
  end
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   544
  SetState(cyborg, gstInvisible)
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   545
  SetState(ramon, gstInvisible)
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   546
  SetState(spiky, gstInvisible)
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   547
end
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   548
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   549
function CondNeedToTurn(hog1, hog2)
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   550
  xl, xd = GetX(hog1), GetX(hog2)
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   551
  if xl > xd then
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   552
    AnimInsertStepNext({func = AnimTurn, args = {hog1, "Left"}})
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   553
    AnimInsertStepNext({func = AnimTurn, args = {hog2, "Right"}})
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   554
  elseif xl < xd then
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   555
    AnimInsertStepNext({func = AnimTurn, args = {hog2, "Left"}})
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   556
    AnimInsertStepNext({func = AnimTurn, args = {hog1, "Right"}})
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   557
  end
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   558
end
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   559
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   560
function HideHogs()
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   561
  for i = 2, 9 do
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   562
    HideHog(cannibals[i])
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   563
    isHidden[cannibals[i]] = true
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   564
  end
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   565
  HideHog(cyborg)
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   566
  cyborgHidden = true
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   567
  HideHog(ramon)
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   568
  HideHog(spiky)
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   569
  ramonHidden = true
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   570
  spikyHidden = true
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   571
end
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   572
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   573
function HideStronglings()
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   574
  for i = 6, 9 do
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   575
    HideHog(cannibals[i])
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   576
    isHidden[cannibals[i]] = true
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   577
  end
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   578
end
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   579
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   580
function UnHideWeaklings()
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   581
  for i = 2, 5 do
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   582
    RestoreHog(cannibals[i])
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   583
    isHidden[cannibals[i]] = false
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   584
    SetState(cannibals[i], gstInvisible)
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   585
  end
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   586
end
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   587
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   588
function UnHideStronglings()
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   589
  for i = 6, 9 do
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   590
    RestoreHog(cannibals[i])
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   591
    isHidden[cannibals[i]] = false
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   592
    SetState(cannibals[i], gstInvisible)
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   593
  end
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   594
  RestoreHog(cyborg)
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   595
  cyborgHidden = false
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   596
  SetState(cyborg, gstInvisible)
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   597
end
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   598
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   599
function ChoiceTaken()
7448
d0521a3a4358 Solved "floating repositionings" in every mission
belphegorr <szabibibi@gmail.com>
parents: 7425
diff changeset
   600
  SetGearMessage(CurrentHedgehog, 0)
7203
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   601
  if choice == choiceAccept then
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   602
    AddAnim(acceptedAnim)
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   603
    AddFunction({func = AfterAcceptedAnim, args = {}})
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   604
  elseif choice == choiceRefuse then
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   605
    AddAnim(refusedAnim)
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   606
    AddFunction({func = AfterRefusedAnim, args = {}})
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   607
  else
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   608
    AddAnim(attackedAnim)
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   609
    AddFunction({func = AfterAttackedAnim, args = {}})
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   610
  end
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   611
end
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   612
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   613
function KillCyborg()
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   614
  RestoreHog(cyborg)
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   615
  DeleteGear(cyborg)
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   616
  TurnTimeLeft = 0
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   617
end
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   618
-----------------------------Events------------------------------------
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   619
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   620
function CheckBrainiacDead()
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   621
  return brainiacDead
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   622
end
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   623
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   624
function DoBrainiacDead()
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   625
  TurnTimeLeft = 0
7448
d0521a3a4358 Solved "floating repositionings" in every mission
belphegorr <szabibibi@gmail.com>
parents: 7425
diff changeset
   626
  SetGearMessage(CurrentHedgehog, 0)
7203
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   627
  AddAnim(weaklingsAnim)
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   628
  AddFunction({func = AfterWeaklingsAnim, args = {}})
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   629
  stage = interSpyStage
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   630
end
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   631
  
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   632
function CheckWeaklingsKilled()
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   633
  for i = 2, 5 do
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   634
    if cannibalDead[i] == false then
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   635
      return false
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   636
    end
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   637
  end
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   638
  return true
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   639
end
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   640
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   641
function DoWeaklingsKilled()
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   642
  TurnTimeLeft = 0
7448
d0521a3a4358 Solved "floating repositionings" in every mission
belphegorr <szabibibi@gmail.com>
parents: 7425
diff changeset
   643
  SetGearMessage(CurrentHedgehog, 0)
7203
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   644
  AddAnim(stronglingsAnim)
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   645
  AddFunction({func = AfterStronglingsAnim, args = {}})
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   646
  stage = interWeakStage
7225
e3f2280d9000 Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents: 7213
diff changeset
   647
  ParseCommand("teamgone " .. loc("Weaklings"))
7203
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   648
end
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   649
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   650
function CheckRefuse()
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   651
  return GetX(dense) > 1400 and StoppedGear(dense)
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   652
end
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   653
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   654
function DoRefuse()
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   655
  choice = choiceRefuse
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   656
end
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   657
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   658
function CheckAccept()
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   659
  return GetX(dense) < 1300 and StoppedGear(dense)
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   660
end
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   661
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   662
function DoAccept()
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   663
  choice = choiceAccept
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   664
end
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   665
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   666
function CheckConfront()
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   667
  return cyborgAttacked and StoppedGear(dense)
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   668
end
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   669
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   670
function DoConfront()
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   671
  choice = choiceAttack
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   672
end
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   673
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   674
function CheckChoice()
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   675
  return choice ~= 0
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   676
end
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   677
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   678
function DoChoice()
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   679
  RemoveEventFunc(CheckConfront)
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   680
  RemoveEventFunc(CheckAccept)
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   681
  RemoveEventFunc(CheckRefuse)
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   682
  ChoiceTaken()
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   683
end
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   684
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   685
function CheckNeedGirder()
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   686
  return GetX(dense) > 1640 and StoppedGear(dense)
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   687
end
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   688
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   689
function DoNeedGirder()
7225
e3f2280d9000 Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents: 7213
diff changeset
   690
  ShowMission(loc("The Shadow Falls"), loc("Under Construction"), loc("To place a girder, select it, use [Left] and [Right] to select angle and length, place with [Left Click]"), 1, 6000)
7203
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   691
end
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   692
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   693
function CheckNeedWeapons()
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   694
  return GetX(dense) > 2522 and StoppedGear(dense)
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   695
end
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   696
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   697
function DoNeedWeapons()
7228
1b29b8cfb17a Modified some crate positions, added sound to teleports, fixed loc errors...
belphegorr <szabibibi@gmail.com>
parents: 7225
diff changeset
   698
  grenadeCrate = SpawnAmmoCrate(2550, 800, amGrenade)
1b29b8cfb17a Modified some crate positions, added sound to teleports, fixed loc errors...
belphegorr <szabibibi@gmail.com>
parents: 7225
diff changeset
   699
  shotgunCrate = SpawnAmmoCrate(2610, 850, amShotgun)
7225
e3f2280d9000 Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents: 7213
diff changeset
   700
  AddCaption(loc("A little gift from the cyborgs"))
7203
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   701
end
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   702
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   703
function CheckTookWeapons()
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   704
  return shotgunTaken and grenadeTaken
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   705
end
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   706
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   707
function DoTookWeapons()
7225
e3f2280d9000 Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents: 7213
diff changeset
   708
  ShowMission(loc("The Shadow Falls"), loc("The guardian"), loc("Protect yourselves!|Grenade hint: set the timer with [1-5], aim with [Up]/[Down] and hold [Space] to set power"), 1, 8000)
7203
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   709
  AddAmmo(dense, amSkip, 100)
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   710
  AddAmmo(dense, amSwitch, 100)
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   711
  stage = duoStage
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   712
  RemoveEventFunc(CheckNeedGirder)
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   713
  RemoveEventFunc(CheckNeedWeapons)
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   714
  RemoveEventFunc(CheckRestartReturnAccepted)
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   715
  AddEvent(CheckStronglingsDead, {}, DoStronglingsDead, {}, 0)
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   716
  AddAmmo(cannibals[6], amGrenade, 7)
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   717
  AddAmmo(cannibals[6], amShotgun, 7)
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   718
  SetGearMessage(leaks, 0)
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   719
  SetGearMessage(dense, 0)
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   720
  TurnTimeLeft = TurnTime
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   721
end
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   722
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   723
function DoStronglingsDead()
7448
d0521a3a4358 Solved "floating repositionings" in every mission
belphegorr <szabibibi@gmail.com>
parents: 7425
diff changeset
   724
  SetGearMessage(CurrentHedgehog, 0)
7203
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   725
  if denseDead == true then
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   726
    AddAnim(acceptedDiedFinalAnim)
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   727
    SaveCampaignVar("M2DenseDead", "1")
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   728
  else
7213
fce7de71742f Fixed some bugs with Mission 2 and Animate.lua.
belphegorr <szabibibi@gmail.com>
parents: 7211
diff changeset
   729
    SetupAcceptedSurvivedFinalAnim()
7203
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   730
    AddAnim(acceptedSurvivedFinalAnim)
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   731
    SaveCampaignVar("M2DenseDead", "0")
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   732
  end
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   733
  SaveCampaignVar("M2RamonDead", "0")
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   734
  SaveCampaignVar("M2SpikyDead", "0")
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   735
  AddFunction({func = KillCyborg, args = {}})
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   736
  SaveCampaignVar("Progress", "2")
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   737
  SaveCampaignVar("M2Choice", "" .. choice)
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   738
end
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   739
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   740
function DoStronglingsDeadRefused()
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   741
  if denseDead == true then
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   742
    SaveCampaignVar("M2DenseDead", "1")
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   743
  else
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   744
    SaveCampaignVar("M2DenseDead", "0")
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   745
  end
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   746
  if ramonDead == true then
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   747
    SaveCampaignVar("M2RamonDead", "1")
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   748
  else
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   749
    SaveCampaignVar("M2RamonDead", "0")
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   750
  end
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   751
  if spikyDead == true then
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   752
    SaveCampaignVar("M2SpikyDead", "1")
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   753
  else
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   754
    SaveCampaignVar("M2SpikyDead", "0")
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   755
  end
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   756
  AddAnim(refusedFinalAnim)
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   757
  AddFunction({func = KillCyborg, args = {}})
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   758
  SaveCampaignVar("Progress", "2")
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   759
  SaveCampaignVar("M2Choice", "" .. choice)
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   760
end
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   761
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   762
function DoStronglingsDeadAttacked()
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   763
  SaveCampaignVar("M2DenseDead", "1")
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   764
  SaveCampaignVar("M2RamonDead", "0")
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   765
  SaveCampaignVar("M2SpikyDead", "0")
7213
fce7de71742f Fixed some bugs with Mission 2 and Animate.lua.
belphegorr <szabibibi@gmail.com>
parents: 7211
diff changeset
   766
  SaveCampaignVar("Progress", "2")
fce7de71742f Fixed some bugs with Mission 2 and Animate.lua.
belphegorr <szabibibi@gmail.com>
parents: 7211
diff changeset
   767
  SaveCampaignVar("M2Choice", "" .. choice)
7203
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   768
  AddAnim(attackedFinalAnim)
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   769
  AddFunction({func = KillCyborg, args = {}})
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   770
end
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   771
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   772
function CheckStronglingsDead()
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   773
  if leaksDead == true then
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   774
    return false
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   775
  end
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   776
  for i = 6, 9 do
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   777
    if cannibalDead[i] == false then
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   778
      return false
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   779
    end
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   780
  end
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   781
  return true
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   782
end
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   783
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   784
function CheckLeaksDead()
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   785
  return leaksDead
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   786
end
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   787
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   788
function DoDead()
7225
e3f2280d9000 Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents: 7213
diff changeset
   789
  AddCaption(loc("...and so the cyborgs took over the world..."))
7203
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   790
  stage = loseStage
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   791
  TurnTimeLeft = 0
7225
e3f2280d9000 Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents: 7213
diff changeset
   792
  ParseCommand("teamgone " .. loc("Natives"))
7203
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   793
end
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   794
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   795
function CheckDenseDead()
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   796
  return denseDead and choice ~= choiceAttack 
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   797
end
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   798
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   799
function CheckRestartReturnAccepted()
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   800
  return retryReturn
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   801
end
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   802
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   803
-----------------------------Main Functions----------------------------
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   804
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   805
function onGameInit()
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   806
	Seed = 334 
7425
3495e70c6d14 Mission 1: Fixed a typo
belphegorr <szabibibi@gmail.com>
parents: 7243
diff changeset
   807
	GameFlags = gfSolidLand + gfDisableWind + gfPerHogAmmo
7203
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   808
	TurnTime = 50000 
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   809
	CaseFreq = 0
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   810
	MinesNum = 0
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   811
	MinesTime = 3000
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   812
	Explosives = 0
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   813
	Delay = 10 
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   814
	MapGen = 0
7512
cc3f036121fe Modified missions to be compatible with the merge
belphegorr <szabibibi@gmail.com>
parents: 7502
diff changeset
   815
  TemplateFilter = 6
cc3f036121fe Modified missions to be compatible with the merge
belphegorr <szabibibi@gmail.com>
parents: 7502
diff changeset
   816
  TemplateNumber = 22
7203
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   817
	Theme = "Nature"
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   818
  SuddenDeathTurns = 3000
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   819
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   820
  AddHogs()
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   821
  PlaceHogs()
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   822
  VisiblizeHogs()
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   823
  
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   824
  AnimInit()
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   825
  AnimationSetup()
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   826
end
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   827
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   828
function onGameStart()
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   829
  HideHogs()
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   830
  AddAmmo(leaks, amSwitch, 100)
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   831
  AddEvent(CheckLeaksDead, {}, DoDead, {}, 0)
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   832
  AddEvent(CheckDenseDead, {}, DoDead, {}, 0)
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   833
  AddAnim(startDialogue)
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   834
  AddFunction({func = AfterStartDialogue, args = {}})
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   835
  AddEvent(CheckBrainiacDead, {}, DoBrainiacDead, {}, 0)
7225
e3f2280d9000 Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents: 7213
diff changeset
   836
  ShowMission(loc("The Shadow Falls"), loc("The First Encounter"), loc("Survive!|Hint: Cinematics can be skipped with the [Precise] key."), 1, 0)
7203
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   837
end
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   838
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   839
function onGameTick()
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   840
  AnimUnWait()
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   841
  if ShowAnimation() == false then
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   842
    return
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   843
  end
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   844
  ExecuteAfterAnimations()
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   845
  CheckEvents()
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   846
end
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   847
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   848
function onGearDelete(gear)
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   849
  if gear == cannibals[1] then
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   850
    brainiacDead = true
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   851
  elseif gear == grenadeCrate then
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   852
    grenadeTaken = true
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   853
  elseif gear == shotgunCrate then
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   854
    shotgunTaken = true
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   855
  elseif gear == dense then
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   856
    denseDead = true
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   857
  elseif gear == leaks then
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   858
    leaksDead = true
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   859
  elseif gear == ramon then
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   860
    ramonDead = true
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   861
  elseif gear == spiky then
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   862
    spikyDead = true
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   863
  else
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   864
    for i = 2, 9 do
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   865
      if gear == cannibals[i] then
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   866
        cannibalDead[i] = true
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   867
      end
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   868
    end
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   869
  end
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   870
end
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   871
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   872
function onGearAdd(gear)
7225
e3f2280d9000 Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents: 7213
diff changeset
   873
  if GetGearType(gear) == gtGrenade and GetHogTeamName(CurrentHedgehog) == loc("Natives") then
7213
fce7de71742f Fixed some bugs with Mission 2 and Animate.lua.
belphegorr <szabibibi@gmail.com>
parents: 7211
diff changeset
   874
    grenadeUsed = true
7225
e3f2280d9000 Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents: 7213
diff changeset
   875
  elseif GetGearType(gear) == gtShotgunShot and GetHogTeamName(CurrentHedgehog) == loc("Natives") then
7213
fce7de71742f Fixed some bugs with Mission 2 and Animate.lua.
belphegorr <szabibibi@gmail.com>
parents: 7211
diff changeset
   876
    shotgunUsed = true
fce7de71742f Fixed some bugs with Mission 2 and Animate.lua.
belphegorr <szabibibi@gmail.com>
parents: 7211
diff changeset
   877
  end
7203
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   878
end
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   879
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   880
function onAmmoStoreInit()
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   881
  SetAmmo(amDEagle, 9, 0, 0, 0)
7232
277cbfbed93c Reduced ammo count on Mission 2
belphegorr <szabibibi@gmail.com>
parents: 7228
diff changeset
   882
  SetAmmo(amSniperRifle, 6, 0, 0, 0)
277cbfbed93c Reduced ammo count on Mission 2
belphegorr <szabibibi@gmail.com>
parents: 7228
diff changeset
   883
  SetAmmo(amFirePunch, 3, 0, 0, 0)
277cbfbed93c Reduced ammo count on Mission 2
belphegorr <szabibibi@gmail.com>
parents: 7228
diff changeset
   884
  SetAmmo(amWhip, 4, 0, 0, 0)
277cbfbed93c Reduced ammo count on Mission 2
belphegorr <szabibibi@gmail.com>
parents: 7228
diff changeset
   885
  SetAmmo(amBaseballBat, 4, 0, 0, 0)
277cbfbed93c Reduced ammo count on Mission 2
belphegorr <szabibibi@gmail.com>
parents: 7228
diff changeset
   886
  SetAmmo(amHammer, 2, 0, 0, 0)
277cbfbed93c Reduced ammo count on Mission 2
belphegorr <szabibibi@gmail.com>
parents: 7228
diff changeset
   887
  SetAmmo(amLandGun, 1, 0, 0, 0)
277cbfbed93c Reduced ammo count on Mission 2
belphegorr <szabibibi@gmail.com>
parents: 7228
diff changeset
   888
  SetAmmo(amSnowball, 7, 0, 0, 0)
7203
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   889
  SetAmmo(amGirder, 0, 0, 0, 2)
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   890
  SetAmmo(amParachute, 0, 0, 0, 2)
7232
277cbfbed93c Reduced ammo count on Mission 2
belphegorr <szabibibi@gmail.com>
parents: 7228
diff changeset
   891
  SetAmmo(amGrenade, 0, 0, 0, 3)
277cbfbed93c Reduced ammo count on Mission 2
belphegorr <szabibibi@gmail.com>
parents: 7228
diff changeset
   892
  SetAmmo(amShotgun, 0, 0, 0, 3)
7203
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   893
  SetAmmo(amSwitch, 0, 0, 0, 8)
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   894
  SetAmmo(amRope, 0, 0, 0, 6)
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   895
end
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   896
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   897
function onNewTurn()
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   898
  if AnimInProgress() then
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   899
    TurnTimeLeft = -1
7225
e3f2280d9000 Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents: 7213
diff changeset
   900
--  elseif stage == interSpyStage and GetHogTeamName(CurrentHedgehog) ~= loc("Natives") then
7203
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   901
--    TurnTimeLeft = 0
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   902
--    SetState(CurrentHedgehog, gstInvisible)
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   903
  elseif stage == cyborgStage then
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   904
    if CurrentHedgehog ~= dense then
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   905
      TurnTimeLeft = 0
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   906
    else
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   907
      TurnTimeLeft = -1
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   908
    end
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   909
  elseif stage == acceptedReturnStage then
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   910
    SwitchHog(dense)
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   911
    FollowGear(dense)
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   912
    TurnTimeLeft = -1
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   913
  end
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   914
end
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   915
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   916
function onGearDamage(gear, damage)
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   917
  if gear == cyborg and stage == cyborgStage then
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   918
    cyborgAttacked = true
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   919
  end
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   920
end
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   921
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   922
function onPrecise()
7502
16c36f62247b Solved issues with HideHog in mission 2 and 3
belphegorr <szabibibi@gmail.com>
parents: 7448
diff changeset
   923
  if GameTime > 2500 and AnimInProgress() then
7203
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   924
    SetAnimSkip(true)
7502
16c36f62247b Solved issues with HideHog in mission 2 and 3
belphegorr <szabibibi@gmail.com>
parents: 7448
diff changeset
   925
    return
7203
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   926
  end
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   927
  if stage == acceptedReturnStage then
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   928
    retryReturn = true
7502
16c36f62247b Solved issues with HideHog in mission 2 and 3
belphegorr <szabibibi@gmail.com>
parents: 7448
diff changeset
   929
--  else
16c36f62247b Solved issues with HideHog in mission 2 and 3
belphegorr <szabibibi@gmail.com>
parents: 7448
diff changeset
   930
--    for i = 1, 9 do
16c36f62247b Solved issues with HideHog in mission 2 and 3
belphegorr <szabibibi@gmail.com>
parents: 7448
diff changeset
   931
--      DeleteGear(cannibals[i])
16c36f62247b Solved issues with HideHog in mission 2 and 3
belphegorr <szabibibi@gmail.com>
parents: 7448
diff changeset
   932
--    end
7203
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   933
  end
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   934
end
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   935