share/hedgewars/Data/Missions/Campaign/A_Classic_Fairytale/first_blood.lua
author Wuzzy <Wuzzy2@mail.ru>
Thu, 26 Oct 2017 22:49:39 +0200
changeset 12784 1f8a62d1609d
parent 12629 705dde538519
child 12799 bca911f8e804
permissions -rw-r--r--
ACF5: Fix final animation being stuck when the cyborg's way to the right is blocked Fixed with the new maxMoveTime parameter in AnimMove. If cyborg didn't reach its destination in 7000ms, the move anim is skipped and the sequence just continues.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
8043
da083f8d95e6 We need custom script loading function in lua now
unc0rr
parents: 7512
diff changeset
     1
HedgewarsScriptLoad("/Scripts/Locale.lua")
da083f8d95e6 We need custom script loading function in lua now
unc0rr
parents: 7512
diff changeset
     2
HedgewarsScriptLoad("/Scripts/Animate.lua")
7203
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
-----------------------------Variables---------------------------------
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
     5
startDialogue = {}
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
     6
damageAnim = {}
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
     7
onShroomAnim = {}
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
     8
onFlowerAnim = {}
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
     9
tookParaAnim = {}
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    10
tookPunchAnim = {}
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    11
onMoleHeadAnim = {}
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    12
tookRope2Anim = {}
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    13
challengeAnim = {}
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    14
challengeFailedAnim = {}
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    15
challengeCompletedAnim = {}
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    16
beforeKillAnim = {}
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    17
closeCannim = {}
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    18
cannKilledAnim = {}
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    19
cannKilledEarlyAnim = {}
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    20
princessDamagedAnim = {}
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    21
elderDamagedAnim = {}
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    22
pastMoleHeadAnim = {}
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    23
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
targets = {}
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    26
crates = {}
7236
378fc97dae99 Reduced number of crates on the challenge in mission 1, fixed an error with mission 3 (at the end)
belphegorr <szabibibi@gmail.com>
parents: 7228
diff changeset
    27
targXdif2 = {2755, 2638, 2921, 2973, 3162, 3067, 3062, 1300}
378fc97dae99 Reduced number of crates on the challenge in mission 1, fixed an error with mission 3 (at the end)
belphegorr <szabibibi@gmail.com>
parents: 7228
diff changeset
    28
targYdif2 = {1197, 1537, 1646, 1857, 1804, 1173, 1167, 1183}
7225
e3f2280d9000 Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents: 7209
diff changeset
    29
targXdif1 = {2749, 2909, 2770, 2836, 1558, 1305}
e3f2280d9000 Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents: 7209
diff changeset
    30
targYdif1 = {1179, 1313, 1734, 1441, 1152, 1259}
e3f2280d9000 Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents: 7209
diff changeset
    31
targetPosX = {{821, 866, 789}, {614, 656, 638}, {1238, 1237, 1200}}
e3f2280d9000 Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents: 7209
diff changeset
    32
targetPosY = {{1342, 1347, 1326}, {1112, 1121, 1061}, {1152, 1111, 1111}}
7236
378fc97dae99 Reduced number of crates on the challenge in mission 1, fixed an error with mission 3 (at the end)
belphegorr <szabibibi@gmail.com>
parents: 7228
diff changeset
    33
crateNum = {6, 8}
12550
9c3ff4ffd4f3 ACF1: Fix various problems with the parachute section
Wuzzy <almikes@aol.com>
parents: 12549
diff changeset
    34
rope2GirderX = 3245
9c3ff4ffd4f3 ACF1: Fix various problems with the parachute section
Wuzzy <almikes@aol.com>
parents: 12549
diff changeset
    35
rope2GirderY = 1190
7203
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    36
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    37
stage = 1
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    38
cratesCollected = 0
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    39
chalTries = 0
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    40
targetsDestroyed = 0
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    41
targsWave = 1
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    42
tTime = -1
12609
a45f8eec6869 ACF1: Force player to press jump to confirm difficulty dialog
Wuzzy <almikes@aol.com>
parents: 12590
diff changeset
    43
difficulty = 1
7203
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
cannibalVisible = false
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    46
cannibalKilles = false
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    47
youngdamaged = false
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    48
youngKilled = false
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    49
elderDamaged = false
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    50
princessDamaged = false
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    51
elderKilled = false
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    52
princessKilled = false
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    53
rope1Taken = false
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    54
paraTaken = false
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    55
rope2Taken = false
12550
9c3ff4ffd4f3 ACF1: Fix various problems with the parachute section
Wuzzy <almikes@aol.com>
parents: 12549
diff changeset
    56
rope2InProgress = false
7203
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    57
punchTaken = false
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    58
canKilled = false
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    59
desertTaken = false
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    60
challengeFailed = false
8984
3c342826f299 fix comparison error in Campaign mission 1
Periklis Ntanasis <pntanasis@gmail.com>
parents: 8979
diff changeset
    61
deleteCrate = false
7203
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    62
difficultyChoice = false
7245
53f73f4ae203 Modified frontend so that updating campaogn progress no longer changes current index of the mission combo box
belphegorr <szabibibi@gmail.com>
parents: 7243
diff changeset
    63
princessFace = "Left"
53f73f4ae203 Modified frontend so that updating campaogn progress no longer changes current index of the mission combo box
belphegorr <szabibibi@gmail.com>
parents: 7243
diff changeset
    64
elderFace = "Left"
7203
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    65
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    66
goals = {
7225
e3f2280d9000 Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents: 7209
diff changeset
    67
  [startDialogue] = {loc("First Blood"), loc("First Steps"), loc("Press [Left] or [Right] to move around, [Enter] to jump"), 1, 4000},
12549
77b05be26a6e Improve the mission texts in ACF, mission 1
Wuzzy <almikes@aol.com>
parents: 12471
diff changeset
    68
  [onShroomAnim] = {loc("First Blood"), loc("A leap in a leap"), loc("Go on top of the flower") .. "|" .. loc("Hint: Press [Esc] to review the mission texts."), 1, 7000},
7225
e3f2280d9000 Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents: 7209
diff changeset
    69
  [onFlowerAnim] = {loc("First Blood"), loc("Hightime"), loc("Collect the crate on the right.|Hint: Select the rope, [Up] or [Down] to aim, [Space] to fire, directional keys to move.|Ropes can be fired again in the air!"), 1, 7000},
e3f2280d9000 Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents: 7209
diff changeset
    70
  [tookParaAnim] = {loc("First Blood"), loc("Omnivore"), loc("Get on the head of the mole"), 1, 4000},
e3f2280d9000 Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents: 7209
diff changeset
    71
  [onMoleHeadAnim] = {loc("First Blood"), loc("The Leap of Faith"), loc("Use the parachute ([Space] while in air) to get the next crate"), 1, 4000},
12549
77b05be26a6e Improve the mission texts in ACF, mission 1
Wuzzy <almikes@aol.com>
parents: 12471
diff changeset
    72
  [tookRope2Anim] = {loc("First Blood"), loc("The Rising"), loc("Get that crate!"), 1, 4000},
7225
e3f2280d9000 Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents: 7209
diff changeset
    73
  [tookPunchAnim] = {loc("First Blood"), loc("The Slaughter"), loc("Destroy the targets!|Hint: Select the Shoryuken and hit [Space]|P.S. You can use it mid-air."), 1, 5000},
e3f2280d9000 Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents: 7209
diff changeset
    74
  [challengeAnim] = {loc("First Blood"), loc("The Crate Frenzy"), loc("Collect the crates within the time limit!|If you fail, you'll have to try again."), 1, 5000},
e3f2280d9000 Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents: 7209
diff changeset
    75
  [challengeFailedAnim] = {loc("First Blood"), loc("The Crate Frenzy"), loc("Collect the crates within the time limit!|If you fail, you'll have to try again."), 1, 5000},
12549
77b05be26a6e Improve the mission texts in ACF, mission 1
Wuzzy <almikes@aol.com>
parents: 12471
diff changeset
    76
  [challengeCompletedAnim] = {loc("First Blood"), loc("The Ultimate Weapon"), loc("Get that crate!"), 1, 5000},
7225
e3f2280d9000 Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents: 7209
diff changeset
    77
  [beforeKillAnim] = {loc("First Blood"), loc("The First Blood"), loc("Kill the cannibal!"), 1, 5000},
e3f2280d9000 Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents: 7209
diff changeset
    78
  [closeCannim] = {loc("First Blood"), loc("The First Blood"), loc("KILL IT!"), 1, 5000}
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
-----------------------------Animations--------------------------------
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    81
function Skipanim(anim)
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    82
  AnimSwitchHog(youngh)
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    83
  if goals[anim] ~= nil then
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    84
    ShowMission(unpack(goals[anim]))
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    85
  end
7245
53f73f4ae203 Modified frontend so that updating campaogn progress no longer changes current index of the mission combo box
belphegorr <szabibibi@gmail.com>
parents: 7243
diff changeset
    86
  if anim == startDialogue then
53f73f4ae203 Modified frontend so that updating campaogn progress no longer changes current index of the mission combo box
belphegorr <szabibibi@gmail.com>
parents: 7243
diff changeset
    87
    HogTurnLeft(princess, false)
53f73f4ae203 Modified frontend so that updating campaogn progress no longer changes current index of the mission combo box
belphegorr <szabibibi@gmail.com>
parents: 7243
diff changeset
    88
  end
7203
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    89
end
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    90
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    91
function SkipDamageAnim(anim)
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    92
  SwitchHog(youngh)
12609
a45f8eec6869 ACF1: Force player to press jump to confirm difficulty dialog
Wuzzy <almikes@aol.com>
parents: 12590
diff changeset
    93
  AnimSetInputMask(0xFFFFFFFF)
7203
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    94
end
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    95
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    96
function SkipOnShroom()
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    97
  Skipanim(onShroomAnim)
7448
d0521a3a4358 Solved "floating repositionings" in every mission
belphegorr <szabibibi@gmail.com>
parents: 7425
diff changeset
    98
  AnimSetGearPosition(elderh, 2700, 1278)
7203
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    99
end
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   100
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   101
function AnimationSetup()
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   102
  AddSkipFunction(damageAnim, SkipDamageAnim, {damageAnim})
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   103
  table.insert(damageAnim, {func = AnimWait, args = {youngh, 500}, skipFunc = Skipanim, skipArgs = damageAnim})
7225
e3f2280d9000 Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents: 7209
diff changeset
   104
  table.insert(damageAnim, {func = AnimSay, args = {elderh, loc("Watch your steps, young one!"), SAY_SAY, 2000}})
7203
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   105
  table.insert(damageAnim, {func = AnimGearWait, args = {youngh, 500}})
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   106
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   107
  AddSkipFunction(princessDamagedAnim, SkipDamageAnim, {princessDamagedAnim})
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   108
  table.insert(princessDamagedAnim, {func = AnimWait, args = {princess, 500}, skipFunc = Skipanim, skipArgs = princessDamagedAnim})
7225
e3f2280d9000 Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents: 7209
diff changeset
   109
  table.insert(princessDamagedAnim, {func = AnimSay, args = {princess, loc("Why do men keep hurting me?"), 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
   110
  table.insert(princessDamagedAnim, {func = AnimGearWait, args = {youngh, 500}})
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   111
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   112
  AddSkipFunction(elderDamagedAnim, SkipDamageAnim, {elderDamagedAnim})
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   113
  table.insert(elderDamagedAnim, {func = AnimWait, args = {elderh, 500}, skipFunc = Skipanim, skipArgs = elderDamagedAnim})
7225
e3f2280d9000 Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents: 7209
diff changeset
   114
  table.insert(elderDamagedAnim, {func = AnimSay, args = {elderh, loc("Violence is not the answer to your problems!"), 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
   115
  table.insert(elderDamagedAnim, {func = AnimGearWait, args = {youngh, 500}})
12549
77b05be26a6e Improve the mission texts in ACF, mission 1
Wuzzy <almikes@aol.com>
parents: 12471
diff changeset
   116
7203
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   117
  AddSkipFunction(startDialogue, Skipanim, {startDialogue})
9263
5069877daa09 reverting 2 files I accidentally changed
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9258
diff changeset
   118
  table.insert(startDialogue, {func = AnimWait, args = {youngh, 3500}, skipFunc = Skipanim, skipArgs = startDialogue})
7225
e3f2280d9000 Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents: 7209
diff changeset
   119
  table.insert(startDialogue, {func = AnimCaption, args = {youngh, loc("Once upon a time, on an island with great natural resources, lived two tribes in heated conflict..."),  5000}})
e3f2280d9000 Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents: 7209
diff changeset
   120
  table.insert(startDialogue, {func = AnimCaption, args = {youngh, loc("One tribe was peaceful, spending their time hunting and training, enjoying the small pleasures of life..."), 5000}})
e3f2280d9000 Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents: 7209
diff changeset
   121
  table.insert(startDialogue, {func = AnimCaption, args = {youngh, loc("The other one were all cannibals, spending their time eating the organs of fellow hedgehogs..."), 5000}})
e3f2280d9000 Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents: 7209
diff changeset
   122
  table.insert(startDialogue, {func = AnimCaption, args = {youngh, loc("And so it began..."), 1000}})
e3f2280d9000 Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents: 7209
diff changeset
   123
  table.insert(startDialogue, {func = AnimSay, args = {elderh, loc("What are you doing at a distance so great, young one?"), SAY_SHOUT, 4000}})
e3f2280d9000 Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents: 7209
diff changeset
   124
  table.insert(startDialogue, {func = AnimSay, args = {elderh, loc("Come closer, so that your training may continue!"), SAY_SHOUT, 6000}})
e3f2280d9000 Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents: 7209
diff changeset
   125
  table.insert(startDialogue, {func = AnimSay, args = {youngh, loc("This is it! It's time to make Fell From Heaven fall for me..."), SAY_THINK, 6000}})
7203
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   126
  table.insert(startDialogue, {func = AnimJump, args = {youngh, "long"}})
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   127
  table.insert(startDialogue, {func = AnimTurn, args = {princess, "Right"}})
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   128
  table.insert(startDialogue, {func = AnimSwitchHog, args = {youngh}})
12549
77b05be26a6e Improve the mission texts in ACF, mission 1
Wuzzy <almikes@aol.com>
parents: 12471
diff changeset
   129
  table.insert(startDialogue, {func = AnimShowMission, args = {youngh, loc("First Blood"), loc("First Steps"), loc("Press [Left] or [Right] to move around, [Enter] to jump"), 1, 4000}})
9263
5069877daa09 reverting 2 files I accidentally changed
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9258
diff changeset
   130
7203
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   131
  AddSkipFunction(onShroomAnim, SkipOnShroom, {onShroomAnim})
7225
e3f2280d9000 Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents: 7209
diff changeset
   132
  table.insert(onShroomAnim, {func = AnimSay, args = {elderh, loc("I can see you have been training diligently."), SAY_SAY, 4000}, skipFunc = Skipanim, skipArgs = onShroomAnim})
e3f2280d9000 Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents: 7209
diff changeset
   133
  table.insert(onShroomAnim, {func = AnimSay, args = {elderh, loc("The wind whispers that you are ready to become familiar with tools, now..."), SAY_SAY, 4000}})
e3f2280d9000 Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents: 7209
diff changeset
   134
  table.insert(onShroomAnim, {func = AnimSay, args = {elderh, loc("Open that crate and we will continue!"), SAY_SAY, 5000}})
7243
9ae9178c525e Modified Animate.lua function AnimMove to take highercase direction (e.g. "Left")
belphegorr <szabibibi@gmail.com>
parents: 7236
diff changeset
   135
  table.insert(onShroomAnim, {func = AnimMove, args = {elderh, "Right", 2700, 0}})
7203
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   136
  table.insert(onShroomAnim, {func = AnimTurn, args = {elderh, "Left"}})
7225
e3f2280d9000 Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents: 7209
diff changeset
   137
  table.insert(onShroomAnim, {func = AnimSay, args = {princess, loc("He moves like an eagle in the sky."), SAY_THINK, 4000}})
7203
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   138
  table.insert(onShroomAnim, {func = AnimSwitchHog, args = {youngh}})
12549
77b05be26a6e Improve the mission texts in ACF, mission 1
Wuzzy <almikes@aol.com>
parents: 12471
diff changeset
   139
  table.insert(onShroomAnim, {func = AnimShowMission, args = {youngh, loc("First Blood"), loc("A leap in a leap"), loc("Go on top of the flower") .. "|" .. loc("Hint: Press [Esc] to review the mission texts."), 1, 7000}})
7203
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   140
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   141
  AddSkipFunction(onFlowerAnim, Skipanim, {onFlowerAnim})
7225
e3f2280d9000 Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents: 7209
diff changeset
   142
  table.insert(onFlowerAnim, {func = AnimSay, args = {elderh, loc("See that crate farther on the right?"), SAY_SAY, 4000}})
e3f2280d9000 Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents: 7209
diff changeset
   143
  table.insert(onFlowerAnim, {func = AnimSay, args = {elderh, loc("Swing, Leaks A Lot, on the wings of the wind!"), SAY_SAY, 6000}})
e3f2280d9000 Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents: 7209
diff changeset
   144
  table.insert(onFlowerAnim, {func = AnimSay, args = {princess, loc("His arms are so strong!"), SAY_THINK, 4000}})
7203
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   145
  table.insert(onFlowerAnim, {func = AnimSwitchHog, args = {youngh}})
12549
77b05be26a6e Improve the mission texts in ACF, mission 1
Wuzzy <almikes@aol.com>
parents: 12471
diff changeset
   146
  table.insert(onFlowerAnim, {func = AnimShowMission, args = {youngh, loc("First Blood"), loc("Hightime"), loc("Collect the crate on the right.|Hint: Select the rope, [Up] or [Down] to aim, [Space] to fire, directional keys to move.|Ropes can be fired again in the air!"), 1, 7000}})
77b05be26a6e Improve the mission texts in ACF, mission 1
Wuzzy <almikes@aol.com>
parents: 12471
diff changeset
   147
7203
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   148
  AddSkipFunction(tookParaAnim, Skipanim, {tookParaAnim})
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   149
  table.insert(tookParaAnim, {func = AnimGearWait, args = {youngh, 1000}, skipFunc = Skipanim, skipArgs = tookParaAnim})
7225
e3f2280d9000 Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents: 7209
diff changeset
   150
  table.insert(tookParaAnim, {func = AnimSay, args = {elderh, loc("Use the rope to get on the head of the mole, young one!"), SAY_SHOUT, 4000}})
e3f2280d9000 Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents: 7209
diff changeset
   151
  table.insert(tookParaAnim, {func = AnimSay, args = {elderh, loc("Worry not, for it is a peaceful animal! There is no reason to be afraid..."), SAY_SHOUT, 5000}})
e3f2280d9000 Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents: 7209
diff changeset
   152
  table.insert(tookParaAnim, {func = AnimSay, args = {elderh, loc("We all know what happens when you get frightened..."), SAY_SAY, 4000}})
e3f2280d9000 Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents: 7209
diff changeset
   153
  table.insert(tookParaAnim, {func = AnimSay, args = {youngh, loc("So humiliating..."), SAY_SAY, 4000}})
12549
77b05be26a6e Improve the mission texts in ACF, mission 1
Wuzzy <almikes@aol.com>
parents: 12471
diff changeset
   154
  table.insert(tookParaAnim, {func = AnimShowMission, args = {youngh, loc("First Blood"), loc("Omnivore"), loc("Get on the head of the mole"), 1, 4000}})
7203
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   155
  table.insert(tookParaAnim, {func = AnimSwitchHog, args = {youngh}})
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   156
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   157
  AddSkipFunction(onMoleHeadAnim, Skipanim, {onMoleHeadAnim})
7225
e3f2280d9000 Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents: 7209
diff changeset
   158
  table.insert(onMoleHeadAnim, {func = AnimSay, args = {elderh, loc("Perfect! Now try to get the next crate without hurting yourself!"), SAY_SAY, 4000}, skipFunc = Skipanim, skipArgs = onMoleHeadAnim})
e3f2280d9000 Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents: 7209
diff changeset
   159
  table.insert(onMoleHeadAnim, {func = AnimSay, args = {elderh, loc("The giant umbrella from the last crate should help break the fall."), SAY_SAY, 4000}})
e3f2280d9000 Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents: 7209
diff changeset
   160
  table.insert(onMoleHeadAnim, {func = AnimSay, args = {princess, loc("He's so brave..."), SAY_THINK, 4000}})
12549
77b05be26a6e Improve the mission texts in ACF, mission 1
Wuzzy <almikes@aol.com>
parents: 12471
diff changeset
   161
  table.insert(onMoleHeadAnim, {func = AnimShowMission, args = {youngh, loc("First Blood"), loc("The Leap of Faith"), loc("Use the parachute ([Space] while in air) to get the next crate"), 1, 4000}})
7203
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   162
  table.insert(onMoleHeadAnim, {func = AnimSwitchHog, args = {youngh}})
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   163
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   164
  AddSkipFunction(pastMoleHeadAnim, Skipanim, {pastMoleHeadAnim})
7225
e3f2280d9000 Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents: 7209
diff changeset
   165
  table.insert(pastMoleHeadAnim, {func = AnimSay, args = {elderh, loc("I see you have already taken the leap of faith."), SAY_SAY, 4000}, skipFunc = Skipanim, skipArgs = pastMoleHeadAnim})
e3f2280d9000 Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents: 7209
diff changeset
   166
  table.insert(pastMoleHeadAnim, {func = AnimSay, args = {elderh, loc("Get that crate!"), 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
   167
  table.insert(pastMoleHeadAnim, {func = AnimSwitchHog, args = {youngh}})
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   168
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   169
  AddSkipFunction(tookRope2Anim, Skipanim, {tookRope2Anim})
7225
e3f2280d9000 Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents: 7209
diff changeset
   170
  table.insert(tookRope2Anim, {func = AnimSay, args = {elderh, loc("Impressive...you are still dry as the corpse of a hawk after a week in the desert..."), SAY_SAY, 5000}, skipFunc = Skipanim, skipArgs = tookRope2Anim})
e3f2280d9000 Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents: 7209
diff changeset
   171
  table.insert(tookRope2Anim, {func = AnimSay, args = {elderh, loc("You probably know what to do next..."), SAY_SAY, 4000}})
12549
77b05be26a6e Improve the mission texts in ACF, mission 1
Wuzzy <almikes@aol.com>
parents: 12471
diff changeset
   172
  table.insert(tookRope2Anim, {func = AnimShowMission, args = {youngh, loc("First Blood"), loc("The Rising"), loc("Get that crate!"), 1, 4000}})
7203
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   173
  table.insert(tookRope2Anim, {func = AnimSwitchHog, args = {youngh}})
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   174
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   175
  AddSkipFunction(tookPunchAnim, Skipanim, {tookPunchAnim})
7225
e3f2280d9000 Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents: 7209
diff changeset
   176
  table.insert(tookPunchAnim, {func = AnimSay, args = {elderh, loc("It is time to practice your fighting skills."), SAY_SAY, 4000}})
e3f2280d9000 Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents: 7209
diff changeset
   177
  table.insert(tookPunchAnim, {func = AnimSay, args = {elderh, loc("Imagine those targets are the wolves that killed your parents! Take your anger out on them!"), SAY_SAY, 5000}})
12549
77b05be26a6e Improve the mission texts in ACF, mission 1
Wuzzy <almikes@aol.com>
parents: 12471
diff changeset
   178
  table.insert(tookPunchAnim, {func = AnimShowMission, args = {youngh, loc("First Blood"), loc("The Slaughter"), loc("Destroy the targets!|Hint: Select the Shoryuken and hit [Space]|P.S. You can use it mid-air."), 1, 5000}})
7203
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   179
  table.insert(tookPunchAnim, {func = AnimSwitchHog, args = {youngh}})
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   180
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   181
  AddSkipFunction(challengeAnim, Skipanim, {challengeAnim})
7225
e3f2280d9000 Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents: 7209
diff changeset
   182
  table.insert(challengeAnim, {func = AnimSay, args = {elderh, loc("I hope you are prepared for a small challenge, young one."), SAY_SAY, 4000}, skipFunc = Skipanim, skipArgs = challengeAnim})
e3f2280d9000 Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents: 7209
diff changeset
   183
  table.insert(challengeAnim, {func = AnimSay, args = {elderh, loc("Your movement skills will be evaluated now."), SAY_SAY, 4000}})
e3f2280d9000 Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents: 7209
diff changeset
   184
  table.insert(challengeAnim, {func = AnimSay, args = {elderh, loc("Collect all the crates, but remember, our time in this life is limited!"), SAY_SAY, 4000}})
e3f2280d9000 Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents: 7209
diff changeset
   185
  table.insert(challengeAnim, {func = AnimSay, args = {elderh, loc("How difficult would you like it to be?")}})
7203
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   186
  table.insert(challengeAnim, {func = AnimSwitchHog, args = {youngh}})
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   187
  table.insert(challengeAnim, {func = AnimWait, args = {youngh, 500}})
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   188
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   189
  AddSkipFunction(challengeFailedAnim, Skipanim, {challengeFailedAnim})
7225
e3f2280d9000 Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents: 7209
diff changeset
   190
  table.insert(challengeFailedAnim, {func = AnimSay, args = {elderh, loc("Hmmm...perhaps a little more time will help."), SAY_SAY, 4000}, skipFunc = Skipanim, skipArgs = challengeFailedAnim})
12549
77b05be26a6e Improve the mission texts in ACF, mission 1
Wuzzy <almikes@aol.com>
parents: 12471
diff changeset
   191
  table.insert(challengeFailedAnim, {func = AnimShowMission, args = {youngh, loc("First Blood"), loc("The Crate Frenzy"), loc("Collect the crates within the time limit!|If you fail, you'll have to try again."), 1, 5000}})
7203
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   192
  table.insert(challengeFailedAnim, {func = AnimSwitchHog, args = {youngh}})
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   193
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   194
  AddSkipFunction(challengeCompletedAnim, Skipanim, {challengeCompletedAnim})
7225
e3f2280d9000 Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents: 7209
diff changeset
   195
  table.insert(challengeCompletedAnim, {func = AnimSay, args = {elderh, loc("The spirits of the ancerstors are surely pleased, Leaks A Lot."), SAY_SAY, 4000}, skipFunc = Skipanim, skipArgs = challengeCompletedAnim})
e3f2280d9000 Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents: 7209
diff changeset
   196
  table.insert(challengeCompletedAnim, {func = AnimSay, args = {elderh, loc("You have proven yourself worthy to see our most ancient secret!"), SAY_SAY, 4000}})
e3f2280d9000 Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents: 7209
diff changeset
   197
  table.insert(challengeCompletedAnim, {func = AnimSay, args = {elderh, loc("The weapon in that last crate was bestowed upon us by the ancients!"), SAY_SAY, 4000}})
e3f2280d9000 Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents: 7209
diff changeset
   198
  table.insert(challengeCompletedAnim, {func = AnimSay, args = {elderh, loc("Use it with precaution!"), SAY_SAY, 4000}})
12549
77b05be26a6e Improve the mission texts in ACF, mission 1
Wuzzy <almikes@aol.com>
parents: 12471
diff changeset
   199
  table.insert(challengeCompletedAnim, {func = AnimShowMission, args = {youngh, loc("First Blood"), loc("The Ultimate Weapon"), loc("Get that crate!"), 1, 5000}})
7203
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   200
  table.insert(challengeCompletedAnim, {func = AnimSwitchHog, args = {youngh}})
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   201
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   202
  AddSkipFunction(beforeKillAnim, Skipanim, {beforeKillAnim})
12590
b28f09d70e73 ACF1: Fix graphical deagle shot glitch after shooting final target
Wuzzy <almikes@aol.com>
parents: 12559
diff changeset
   203
  table.insert(beforeKillAnim, {func = AnimWait, args = {elderh, 100}})
7225
e3f2280d9000 Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents: 7209
diff changeset
   204
  table.insert(beforeKillAnim, {func = AnimSay, args = {elderh, loc("What do my faulty eyes observe? A spy!"), SAY_SHOUT, 4000}, skipFunc = Skipanim, skipArgs = beforeKillAnim})
7203
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   205
  table.insert(beforeKillAnim, {func = AnimFollowGear, args = {cannibal}})
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   206
  table.insert(beforeKillAnim, {func = AnimWait, args = {cannibal, 1000}})
7225
e3f2280d9000 Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents: 7209
diff changeset
   207
  table.insert(beforeKillAnim, {func = AnimSay, args = {elderh, loc("Destroy him, Leaks A Lot! He is responsible for the deaths of many of us!"), SAY_SHOUT, 4000}})
e3f2280d9000 Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents: 7209
diff changeset
   208
  table.insert(beforeKillAnim, {func = AnimSay, args = {cannibal, loc("Oh, my!"), SAY_THINK, 4000}})
12549
77b05be26a6e Improve the mission texts in ACF, mission 1
Wuzzy <almikes@aol.com>
parents: 12471
diff changeset
   209
  table.insert(beforeKillAnim, {func = AnimShowMission, args = {youngh, loc("First Blood"), loc("The First Blood"), loc("Kill the cannibal!"), 1, 5000}})
7203
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   210
  table.insert(beforeKillAnim, {func = AnimSwitchHog, args = {youngh}})
12549
77b05be26a6e Improve the mission texts in ACF, mission 1
Wuzzy <almikes@aol.com>
parents: 12471
diff changeset
   211
7203
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   212
  AddSkipFunction(closeCannim, Skipanim, {closeCannim})
7225
e3f2280d9000 Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents: 7209
diff changeset
   213
  table.insert(closeCannim, {func = AnimSay, args = {elderh, loc("I see you would like his punishment to be more...personal..."), SAY_SAY, 4000}, skipFunc = Skipanim, skipArgs = closeCannim})
e3f2280d9000 Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents: 7209
diff changeset
   214
  table.insert(closeCannim, {func = AnimSay, args = {cannibal, loc("I'm certain that this is a misunderstanding, fellow hedgehogs!"), SAY_SAY, 4000}})
e3f2280d9000 Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents: 7209
diff changeset
   215
  table.insert(closeCannim, {func = AnimSay, args = {cannibal, loc("If only I were given a chance to explain my being here..."), SAY_SAY, 4000}})
e3f2280d9000 Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents: 7209
diff changeset
   216
  table.insert(closeCannim, {func = AnimSay, args = {elderh, loc("Do not let his words fool you, young one! He will stab you in the back as soon as you turn away!"), SAY_SAY, 6000}})
e3f2280d9000 Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents: 7209
diff changeset
   217
  table.insert(closeCannim, {func = AnimSay, args = {elderh, loc("Here...pick your weapon!"), SAY_SAY, 5000}})
12549
77b05be26a6e Improve the mission texts in ACF, mission 1
Wuzzy <almikes@aol.com>
parents: 12471
diff changeset
   218
  table.insert(closeCannim, {func = AnimShowMission, args = {youngh, loc("First Blood"), loc("The First Blood"), loc("KILL IT!"), 1, 5000}})
7203
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   219
  table.insert(closeCannim, {func = AnimSwitchHog, args = {youngh}})
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   220
7225
e3f2280d9000 Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents: 7209
diff changeset
   221
  table.insert(cannKilledAnim, {func = AnimSay, args = {elderh, loc("Yes, yeees! You are now ready to enter the real world!"), 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
   222
7225
e3f2280d9000 Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents: 7209
diff changeset
   223
  table.insert(cannKilledEarlyAnim, {func = AnimSay, args = {elderh, loc("What?! A cannibal? Here? There is no time to waste! Come, you are prepared."), SAY_SHOUT, 4000}})
7203
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
-----------------------------Events------------------------------------
7245
53f73f4ae203 Modified frontend so that updating campaogn progress no longer changes current index of the mission combo box
belphegorr <szabibibi@gmail.com>
parents: 7243
diff changeset
   226
function CheckNeedToTurn(gear)
8943
63ecf5320439 fix nil comparison error, see issues 470 and 601
Periklis Ntanasis <pntanasis@gmail.com>
parents: 8043
diff changeset
   227
  if youngKilled then
63ecf5320439 fix nil comparison error, see issues 470 and 601
Periklis Ntanasis <pntanasis@gmail.com>
parents: 8043
diff changeset
   228
    return false
63ecf5320439 fix nil comparison error, see issues 470 and 601
Periklis Ntanasis <pntanasis@gmail.com>
parents: 8043
diff changeset
   229
  end
7245
53f73f4ae203 Modified frontend so that updating campaogn progress no longer changes current index of the mission combo box
belphegorr <szabibibi@gmail.com>
parents: 7243
diff changeset
   230
  if gear == princess then
53f73f4ae203 Modified frontend so that updating campaogn progress no longer changes current index of the mission combo box
belphegorr <szabibibi@gmail.com>
parents: 7243
diff changeset
   231
    if princessKilled ~= true then
53f73f4ae203 Modified frontend so that updating campaogn progress no longer changes current index of the mission combo box
belphegorr <szabibibi@gmail.com>
parents: 7243
diff changeset
   232
      if (GetX(princess) > GetX(youngh) and princessFace == "Right")
53f73f4ae203 Modified frontend so that updating campaogn progress no longer changes current index of the mission combo box
belphegorr <szabibibi@gmail.com>
parents: 7243
diff changeset
   233
        or (GetX(princess) < GetX(youngh) and princessFace == "Left") then
53f73f4ae203 Modified frontend so that updating campaogn progress no longer changes current index of the mission combo box
belphegorr <szabibibi@gmail.com>
parents: 7243
diff changeset
   234
      --if (GetX(princess) > GetX(youngh))
53f73f4ae203 Modified frontend so that updating campaogn progress no longer changes current index of the mission combo box
belphegorr <szabibibi@gmail.com>
parents: 7243
diff changeset
   235
       -- or (GetX(princess) < GetX(youngh)) then
53f73f4ae203 Modified frontend so that updating campaogn progress no longer changes current index of the mission combo box
belphegorr <szabibibi@gmail.com>
parents: 7243
diff changeset
   236
        return true
53f73f4ae203 Modified frontend so that updating campaogn progress no longer changes current index of the mission combo box
belphegorr <szabibibi@gmail.com>
parents: 7243
diff changeset
   237
      end
53f73f4ae203 Modified frontend so that updating campaogn progress no longer changes current index of the mission combo box
belphegorr <szabibibi@gmail.com>
parents: 7243
diff changeset
   238
    end
53f73f4ae203 Modified frontend so that updating campaogn progress no longer changes current index of the mission combo box
belphegorr <szabibibi@gmail.com>
parents: 7243
diff changeset
   239
  else
53f73f4ae203 Modified frontend so that updating campaogn progress no longer changes current index of the mission combo box
belphegorr <szabibibi@gmail.com>
parents: 7243
diff changeset
   240
    if elderKilled ~= true then
53f73f4ae203 Modified frontend so that updating campaogn progress no longer changes current index of the mission combo box
belphegorr <szabibibi@gmail.com>
parents: 7243
diff changeset
   241
      if (GetX(elderh) > GetX(youngh) and elderFace == "Right")
53f73f4ae203 Modified frontend so that updating campaogn progress no longer changes current index of the mission combo box
belphegorr <szabibibi@gmail.com>
parents: 7243
diff changeset
   242
        or (GetX(elderh) < GetX(youngh) and elderFace == "Left") then
53f73f4ae203 Modified frontend so that updating campaogn progress no longer changes current index of the mission combo box
belphegorr <szabibibi@gmail.com>
parents: 7243
diff changeset
   243
        return true
53f73f4ae203 Modified frontend so that updating campaogn progress no longer changes current index of the mission combo box
belphegorr <szabibibi@gmail.com>
parents: 7243
diff changeset
   244
      end
53f73f4ae203 Modified frontend so that updating campaogn progress no longer changes current index of the mission combo box
belphegorr <szabibibi@gmail.com>
parents: 7243
diff changeset
   245
    end
53f73f4ae203 Modified frontend so that updating campaogn progress no longer changes current index of the mission combo box
belphegorr <szabibibi@gmail.com>
parents: 7243
diff changeset
   246
  end
53f73f4ae203 Modified frontend so that updating campaogn progress no longer changes current index of the mission combo box
belphegorr <szabibibi@gmail.com>
parents: 7243
diff changeset
   247
  return false
53f73f4ae203 Modified frontend so that updating campaogn progress no longer changes current index of the mission combo box
belphegorr <szabibibi@gmail.com>
parents: 7243
diff changeset
   248
end
53f73f4ae203 Modified frontend so that updating campaogn progress no longer changes current index of the mission combo box
belphegorr <szabibibi@gmail.com>
parents: 7243
diff changeset
   249
53f73f4ae203 Modified frontend so that updating campaogn progress no longer changes current index of the mission combo box
belphegorr <szabibibi@gmail.com>
parents: 7243
diff changeset
   250
function DoNeedToTurn(gear)
12610
d05a159e7874 ACF1: Fix princess/elder flying very weirdly when punching to direction they look at
Wuzzy <almikes@aol.com>
parents: 12609
diff changeset
   251
  if gear == princess and not princessDamaged then
7245
53f73f4ae203 Modified frontend so that updating campaogn progress no longer changes current index of the mission combo box
belphegorr <szabibibi@gmail.com>
parents: 7243
diff changeset
   252
    if GetX(princess) > GetX(youngh) then
53f73f4ae203 Modified frontend so that updating campaogn progress no longer changes current index of the mission combo box
belphegorr <szabibibi@gmail.com>
parents: 7243
diff changeset
   253
      HogTurnLeft(princess, true)
53f73f4ae203 Modified frontend so that updating campaogn progress no longer changes current index of the mission combo box
belphegorr <szabibibi@gmail.com>
parents: 7243
diff changeset
   254
      princessFace = "Left"
53f73f4ae203 Modified frontend so that updating campaogn progress no longer changes current index of the mission combo box
belphegorr <szabibibi@gmail.com>
parents: 7243
diff changeset
   255
    elseif GetX(princess) < GetX(youngh) then
53f73f4ae203 Modified frontend so that updating campaogn progress no longer changes current index of the mission combo box
belphegorr <szabibibi@gmail.com>
parents: 7243
diff changeset
   256
      HogTurnLeft(princess, false)
53f73f4ae203 Modified frontend so that updating campaogn progress no longer changes current index of the mission combo box
belphegorr <szabibibi@gmail.com>
parents: 7243
diff changeset
   257
      princessFace = "Right"
53f73f4ae203 Modified frontend so that updating campaogn progress no longer changes current index of the mission combo box
belphegorr <szabibibi@gmail.com>
parents: 7243
diff changeset
   258
    end
12610
d05a159e7874 ACF1: Fix princess/elder flying very weirdly when punching to direction they look at
Wuzzy <almikes@aol.com>
parents: 12609
diff changeset
   259
  elseif gear == elderh and not elderDamaged then
7245
53f73f4ae203 Modified frontend so that updating campaogn progress no longer changes current index of the mission combo box
belphegorr <szabibibi@gmail.com>
parents: 7243
diff changeset
   260
    if GetX(elderh) > GetX(youngh) then
53f73f4ae203 Modified frontend so that updating campaogn progress no longer changes current index of the mission combo box
belphegorr <szabibibi@gmail.com>
parents: 7243
diff changeset
   261
      HogTurnLeft(elderh, true)
53f73f4ae203 Modified frontend so that updating campaogn progress no longer changes current index of the mission combo box
belphegorr <szabibibi@gmail.com>
parents: 7243
diff changeset
   262
      elderFace = "Left"
53f73f4ae203 Modified frontend so that updating campaogn progress no longer changes current index of the mission combo box
belphegorr <szabibibi@gmail.com>
parents: 7243
diff changeset
   263
    elseif GetX(elderh) < GetX(youngh) then
53f73f4ae203 Modified frontend so that updating campaogn progress no longer changes current index of the mission combo box
belphegorr <szabibibi@gmail.com>
parents: 7243
diff changeset
   264
      HogTurnLeft(elderh, false)
53f73f4ae203 Modified frontend so that updating campaogn progress no longer changes current index of the mission combo box
belphegorr <szabibibi@gmail.com>
parents: 7243
diff changeset
   265
      elderFace = "Right"
53f73f4ae203 Modified frontend so that updating campaogn progress no longer changes current index of the mission combo box
belphegorr <szabibibi@gmail.com>
parents: 7243
diff changeset
   266
    end
53f73f4ae203 Modified frontend so that updating campaogn progress no longer changes current index of the mission combo box
belphegorr <szabibibi@gmail.com>
parents: 7243
diff changeset
   267
  end
53f73f4ae203 Modified frontend so that updating campaogn progress no longer changes current index of the mission combo box
belphegorr <szabibibi@gmail.com>
parents: 7243
diff changeset
   268
end
7203
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   269
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   270
function CheckDamage()
12549
77b05be26a6e Improve the mission texts in ACF, mission 1
Wuzzy <almikes@aol.com>
parents: 12471
diff changeset
   271
  return youngdamaged and StoppedGear(youngh)
7203
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   272
end
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   273
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   274
function DoOnDamage()
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   275
  AddAnim(damageAnim)
12550
9c3ff4ffd4f3 ACF1: Fix various problems with the parachute section
Wuzzy <almikes@aol.com>
parents: 12549
diff changeset
   276
  if rope2InProgress and not rope2Taken then
9c3ff4ffd4f3 ACF1: Fix various problems with the parachute section
Wuzzy <almikes@aol.com>
parents: 12549
diff changeset
   277
    AnimSetGearPosition(youngh, 3040, 1221)
9c3ff4ffd4f3 ACF1: Fix various problems with the parachute section
Wuzzy <almikes@aol.com>
parents: 12549
diff changeset
   278
  end
7203
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   279
  youngdamaged = false
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   280
  AddFunction({func = ResetTurnTime, args = {}})
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   281
end
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   282
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   283
function CheckDeath()
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   284
  return youngKilled
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   285
end
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   286
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   287
function DoDeath()
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   288
  RemoveEventFunc(CheckKilledOthers)
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   289
  RemoveEventFunc(CheckDamage)
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   290
  RemoveEventFunc(CheckDamagedOthers)
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   291
  FinishThem()
7225
e3f2280d9000 Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents: 7209
diff changeset
   292
  ShowMission(loc("First Blood"), loc("The wasted youth"), loc("Leaks A Lot gave his life for his tribe! He should have survived!"), 2, 4000)
7203
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
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   295
function CheckDamagedOthers()
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   296
  return (princessDamaged and StoppedGear(princess)) or (elderDamaged and StoppedGear(elderh))
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   297
end
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   298
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   299
function CheckKilledOthers()
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   300
  return princessKilled or elderKilled
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   301
end
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   302
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   303
function DoOnDamagedOthers()
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   304
  if princessDamaged then
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   305
    AddAnim(princessDamagedAnim)
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   306
  end
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   307
  if elderDamaged then
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   308
    AddAnim(elderDamagedAnim)
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   309
  end
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   310
  elderDamaged = false
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   311
  princessDamaged = false
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   312
  AddFunction({func = ResetTurnTime, args = {}})
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   313
end
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   314
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   315
function DoKilledOthers()
7225
e3f2280d9000 Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents: 7209
diff changeset
   316
  AddCaption(loc("After Leaks A Lot betrayed his tribe, he joined the cannibals..."))
7203
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   317
  FinishThem()
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   318
end
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   319
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   320
function CheckMovedUntilJump()
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   321
   return GetX(youngh) >= 2343
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   322
end
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   323
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   324
function DoMovedUntilJump()
7225
e3f2280d9000 Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents: 7209
diff changeset
   325
  ShowMission(loc("First Blood"), loc("Step By Step"), loc("Hint: Double Jump - Press [Backspace] twice"), -amSkip, 0)
7203
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   326
  AddEvent(CheckOnShroom, {}, DoOnShroom, {}, 0)
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   327
end
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   328
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   329
function CheckOnShroom()
7245
53f73f4ae203 Modified frontend so that updating campaogn progress no longer changes current index of the mission combo box
belphegorr <szabibibi@gmail.com>
parents: 7243
diff changeset
   330
  return GetX(youngh) >= 2461 and StoppedGear(youngh)
7203
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   331
end
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   332
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   333
function DoOnShroom()
12471
72c17eabc497 Fix incorrect crate messages when collecting crates in ACF mission 1
Wuzzy <almikes@aol.com>
parents: 12268
diff changeset
   334
  ropeCrate1 = SpawnUtilityCrate(2751, 1194, amRope, 100)
7448
d0521a3a4358 Solved "floating repositionings" in every mission
belphegorr <szabibibi@gmail.com>
parents: 7425
diff changeset
   335
  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
   336
  AddAnim(onShroomAnim)
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   337
  AddEvent(CheckOnFlower, {}, DoOnFlower, {}, 0)
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   338
end
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   339
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   340
function CheckOnFlower()
7245
53f73f4ae203 Modified frontend so that updating campaogn progress no longer changes current index of the mission combo box
belphegorr <szabibibi@gmail.com>
parents: 7243
diff changeset
   341
  return rope1Taken and StoppedGear(youngh)
7203
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   342
end
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   343
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   344
function DoOnFlower()
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   345
  AddAmmo(youngh, amRope, 100)
12471
72c17eabc497 Fix incorrect crate messages when collecting crates in ACF mission 1
Wuzzy <almikes@aol.com>
parents: 12268
diff changeset
   346
  paraCrate = SpawnUtilityCrate(3245, 1758, amParachute, 100)
7448
d0521a3a4358 Solved "floating repositionings" in every mission
belphegorr <szabibibi@gmail.com>
parents: 7425
diff changeset
   347
  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
   348
  AddAnim(onFlowerAnim)
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   349
  AddEvent(CheckTookParaCrate, {}, DoTookParaCrate, {}, 0)
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   350
end
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   351
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   352
function CheckTookParaCrate()
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   353
  return paraTaken and StoppedGear(youngh)
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   354
end
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   355
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   356
function DoTookParaCrate()
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   357
  AddAmmo(youngh, amParachute, 100)
7448
d0521a3a4358 Solved "floating repositionings" in every mission
belphegorr <szabibibi@gmail.com>
parents: 7425
diff changeset
   358
  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
   359
  AddAnim(tookParaAnim)
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   360
  AddEvent(CheckOnMoleHead, {}, DoOnMoleHead, {}, 0)
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   361
  AddEvent(CheckPastMoleHead, {}, DoPastMoleHead, {}, 0)
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   362
end
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
function CheckOnMoleHead()
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   365
  x = GetX(youngh)
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   366
  return x >= 3005 and x <= 3126 and StoppedGear(youngh)
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   367
end
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   368
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   369
function CheckPastMoleHead()
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   370
  x = GetX(youngh)
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   371
  y = GetY(youngh)
12549
77b05be26a6e Improve the mission texts in ACF, mission 1
Wuzzy <almikes@aol.com>
parents: 12471
diff changeset
   372
  return x < 3005 and y > 1500 and StoppedGear(youngh)
7203
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   373
end
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   374
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   375
function DoPastMoleHead()
12550
9c3ff4ffd4f3 ACF1: Fix various problems with the parachute section
Wuzzy <almikes@aol.com>
parents: 12549
diff changeset
   376
  -- Initiate parachute challenge
7203
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   377
  RemoveEventFunc(CheckOnMoleHead)
12471
72c17eabc497 Fix incorrect crate messages when collecting crates in ACF mission 1
Wuzzy <almikes@aol.com>
parents: 12268
diff changeset
   378
  ropeCrate2 = SpawnUtilityCrate(2782, 1720, amRope, 100)
12550
9c3ff4ffd4f3 ACF1: Fix various problems with the parachute section
Wuzzy <almikes@aol.com>
parents: 12549
diff changeset
   379
  rope2InProgress = true
7203
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   380
  AddAmmo(youngh, amRope, 0)
7448
d0521a3a4358 Solved "floating repositionings" in every mission
belphegorr <szabibibi@gmail.com>
parents: 7425
diff changeset
   381
  SetGearMessage(CurrentHedgehog, 0)
12550
9c3ff4ffd4f3 ACF1: Fix various problems with the parachute section
Wuzzy <almikes@aol.com>
parents: 12549
diff changeset
   382
  -- Block the way to the hole to the right, since the player loses the rope for this section
9c3ff4ffd4f3 ACF1: Fix various problems with the parachute section
Wuzzy <almikes@aol.com>
parents: 12549
diff changeset
   383
  PlaceGirder(rope2GirderX, rope2GirderY, 6)
7203
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   384
  AddAnim(pastMoleHeadAnim)
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   385
  AddEvent(CheckTookRope2, {}, DoTookRope2, {}, 0)
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   386
end
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   387
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   388
function DoOnMoleHead()
12550
9c3ff4ffd4f3 ACF1: Fix various problems with the parachute section
Wuzzy <almikes@aol.com>
parents: 12549
diff changeset
   389
  -- Initiate parachute challenge
7203
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   390
  RemoveEventFunc(CheckPastMoleHead)
12471
72c17eabc497 Fix incorrect crate messages when collecting crates in ACF mission 1
Wuzzy <almikes@aol.com>
parents: 12268
diff changeset
   391
  ropeCrate2 = SpawnUtilityCrate(2782, 1720, amRope, 100)
12550
9c3ff4ffd4f3 ACF1: Fix various problems with the parachute section
Wuzzy <almikes@aol.com>
parents: 12549
diff changeset
   392
  rope2InProgress = true
7203
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   393
  AddAmmo(youngh, amRope, 0)
7448
d0521a3a4358 Solved "floating repositionings" in every mission
belphegorr <szabibibi@gmail.com>
parents: 7425
diff changeset
   394
  SetGearMessage(CurrentHedgehog, 0)
12550
9c3ff4ffd4f3 ACF1: Fix various problems with the parachute section
Wuzzy <almikes@aol.com>
parents: 12549
diff changeset
   395
  -- Block the way to the hole to the right, since the player loses the rope for this section
9c3ff4ffd4f3 ACF1: Fix various problems with the parachute section
Wuzzy <almikes@aol.com>
parents: 12549
diff changeset
   396
  PlaceGirder(rope2GirderX, rope2GirderY, 6)
7203
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   397
  AddAnim(onMoleHeadAnim)
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   398
  AddEvent(CheckTookRope2, {}, DoTookRope2, {}, 0)
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   399
end
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   400
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   401
function CheckTookRope2()
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   402
  return rope2Taken and StoppedGear(youngh)
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   403
end
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   404
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   405
function DoTookRope2()
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   406
  AddAmmo(youngh, amRope, 100)
7448
d0521a3a4358 Solved "floating repositionings" in every mission
belphegorr <szabibibi@gmail.com>
parents: 7425
diff changeset
   407
  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
   408
  AddAnim(tookRope2Anim)
12471
72c17eabc497 Fix incorrect crate messages when collecting crates in ACF mission 1
Wuzzy <almikes@aol.com>
parents: 12268
diff changeset
   409
  punchCrate = SpawnAmmoCrate(2460, 1321, amFirePunch, 100)
7203
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   410
  AddEvent(CheckTookPunch, {}, DoTookPunch, {})
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   411
end
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   412
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   413
function CheckTookPunch()
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   414
  return punchTaken and StoppedGear(youngh)
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   415
end
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   416
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   417
function DoTookPunch()
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   418
  AddAmmo(youngh, amFirePunch, 100)
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   419
  AddAmmo(youngh, amRope, 0)
7448
d0521a3a4358 Solved "floating repositionings" in every mission
belphegorr <szabibibi@gmail.com>
parents: 7425
diff changeset
   420
  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
   421
  AddAnim(tookPunchAnim)
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   422
  targets[1] = AddGear(1594, 1185, gtTarget, 0, 0, 0, 0)
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   423
  targets[2] = AddGear(2188, 1314, gtTarget, 0, 0, 0, 0)
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   424
  targets[3] = AddGear(1961, 1318, gtTarget, 0, 0, 0, 0)
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   425
  targets[4] = AddGear(1961, 1200, gtTarget, 0, 0, 0, 0)
7245
53f73f4ae203 Modified frontend so that updating campaogn progress no longer changes current index of the mission combo box
belphegorr <szabibibi@gmail.com>
parents: 7243
diff changeset
   426
  targets[5] = AddGear(1800, 900, gtTarget, 0, 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
   427
  AddEvent(CheckTargDestroyed, {}, DoTargDestroyed, {}, 0)
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   428
end
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   429
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   430
function CheckTargDestroyed()
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   431
  return targetsDestroyed == 5 and StoppedGear(youngh)
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   432
end
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   433
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   434
function DoTargDestroyed()
12471
72c17eabc497 Fix incorrect crate messages when collecting crates in ACF mission 1
Wuzzy <almikes@aol.com>
parents: 12268
diff changeset
   435
  AddAmmo(youngh, amFirePunch, 0)
7448
d0521a3a4358 Solved "floating repositionings" in every mission
belphegorr <szabibibi@gmail.com>
parents: 7425
diff changeset
   436
  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
   437
  AddAnim(challengeAnim)
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   438
  targetsDestroyed = 0
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   439
  AddFunction({func = SetChoice, args = {}})
12471
72c17eabc497 Fix incorrect crate messages when collecting crates in ACF mission 1
Wuzzy <almikes@aol.com>
parents: 12268
diff changeset
   440
  ropeCrate3 = SpawnUtilityCrate(2000, 1200, amRope, 100)
7203
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   441
  AddEvent(CheckTookRope3, {}, AddAmmo, {youngh, amRope, 100}, 0)
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   442
  AddEvent(CheckCratesColled, {}, DoCratesColled, {}, 0)
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   443
  AddEvent(CheckChallengeWon, {}, DoChallengeWon, {}, 0)
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   444
  AddEvent(CheckTimesUp, {}, DoTimesUp, {}, 1)
12550
9c3ff4ffd4f3 ACF1: Fix various problems with the parachute section
Wuzzy <almikes@aol.com>
parents: 12549
diff changeset
   445
  -- Remove up the old mole blockade from the parachute challenge
9c3ff4ffd4f3 ACF1: Fix various problems with the parachute section
Wuzzy <almikes@aol.com>
parents: 12549
diff changeset
   446
  EraseSprite(rope2GirderX, rope2GirderY, sprAmGirder, 6)
7203
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   447
end
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
function DoChoice()
12609
a45f8eec6869 ACF1: Force player to press jump to confirm difficulty dialog
Wuzzy <almikes@aol.com>
parents: 12590
diff changeset
   450
  PlaySound(sndPlaced)
7203
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   451
  difficultyChoice = false
12609
a45f8eec6869 ACF1: Force player to press jump to confirm difficulty dialog
Wuzzy <almikes@aol.com>
parents: 12590
diff changeset
   452
  AnimSetInputMask(0xFFFFFFFF)
7203
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   453
  StartChallenge(120000 + chalTries * 20000)
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   454
end
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   455
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   456
function CheckCratesColled()
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   457
  return cratesCollected == crateNum[difficulty]
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   458
end
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   459
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   460
function DoCratesColled()
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   461
  RemoveEventFunc(CheckTimesUp)
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   462
  TurnTimeLeft = -1
7225
e3f2280d9000 Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents: 7209
diff changeset
   463
  AddCaption(loc("As the challenge was completed, Leaks A Lot set foot on the ground..."))
7203
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   464
end
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   465
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   466
function CheckChallengeWon()
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   467
  return cratesCollected == crateNum[difficulty] and StoppedGear(youngh)
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   468
end
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   469
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   470
function DoChallengeWon()
12471
72c17eabc497 Fix incorrect crate messages when collecting crates in ACF mission 1
Wuzzy <almikes@aol.com>
parents: 12268
diff changeset
   471
  desertCrate = SpawnAmmoCrate(1240, 1212, amDEagle, 100)
7448
d0521a3a4358 Solved "floating repositionings" in every mission
belphegorr <szabibibi@gmail.com>
parents: 7425
diff changeset
   472
  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
   473
  AddAnim(challengeCompletedAnim)
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   474
  AddEvent(CheckDesertColled, {}, DoDesertColled, {}, 0)
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   475
end
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
function CheckTookRope3()
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   478
  return rope3Taken
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   479
end
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   480
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   481
function CheckTimesUp()
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   482
  return TurnTimeLeft == 100
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   483
end
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   484
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   485
function DoTimesUp()
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   486
  challengeFailed = true
8984
3c342826f299 fix comparison error in Campaign mission 1
Periklis Ntanasis <pntanasis@gmail.com>
parents: 8979
diff changeset
   487
  deleteCrate = true
7203
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   488
  DeleteGear(crates[1])
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   489
  TurnTimeLeft = -1
12268
2c8e7e73ef58 Use format strings everywhere in A Classic Fairytale (for translators)
Wuzzy <almikes@aol.com>
parents: 9308
diff changeset
   490
  AddCaption(loc("And so happened that Leaks A Lot failed to complete the challenge! He landed, pressured by shame ..."))
7203
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   491
  AddEvent(CheckChallengeFailed, {}, DoChallengeFailed, {}, 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 CheckChallengeFailed()
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   495
  return challengeFailed and StoppedGear(youngh)
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   496
end
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   497
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   498
function DoChallengeFailed()
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   499
  challengeFailed = false
7448
d0521a3a4358 Solved "floating repositionings" in every mission
belphegorr <szabibibi@gmail.com>
parents: 7425
diff changeset
   500
  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
   501
  AddAnim(challengeFailedAnim)
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   502
  chalTries = chalTries + 1
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   503
  difficulty = 0
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   504
  AddFunction({func = SetChoice, args = {}})
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   505
end
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   506
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   507
function CheckDesertColled()
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   508
  return desertTaken and StoppedGear(youngh)
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   509
end
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   510
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   511
function DoDesertColled()
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   512
  AddAmmo(youngh, amDEagle, 100)
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   513
  PutTargets(1)
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   514
  AddEvent(CheckTargetsKilled, {}, DoTargetsKilled, {}, 1)
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   515
  AddEvent(CheckCannibalKilled, {}, DoCannibalKilledEarly, {}, 0)
12549
77b05be26a6e Improve the mission texts in ACF, mission 1
Wuzzy <almikes@aol.com>
parents: 12471
diff changeset
   516
  ShowMission(loc("First Blood"), loc("The Bull's Eye"), loc("Destroy the targets!|Hint: [Up], [Down] to aim, [Space] to shoot"), 1, 5000)
7203
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   517
end
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   518
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   519
function CheckTargetsKilled()
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   520
  return targetsDestroyed == 3 and StoppedGear(youngh)
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   521
end
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   522
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   523
function DoTargetsKilled()
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   524
  targetsDestroyed = 0
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   525
  targsWave = targsWave + 1
7225
e3f2280d9000 Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents: 7209
diff changeset
   526
  if targsWave > 3 then
7203
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   527
    RemoveEventFunc(CheckTargetsKilled)
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   528
    SetState(cannibal, gstVisible)
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   529
    cannibalVisible = true
7448
d0521a3a4358 Solved "floating repositionings" in every mission
belphegorr <szabibibi@gmail.com>
parents: 7425
diff changeset
   530
    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
   531
    AddAnim(beforeKillAnim)
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   532
    AddEvent(CheckCloseToCannibal, {}, DoCloseToCannibal, {}, 0)
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   533
    AddEvent(CheckCannibalKilled, {}, DoCannibalKilled, {}, 0)
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   534
  else
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   535
    PutTargets(targsWave)
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   536
  end
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   537
end
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   538
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   539
function CheckCloseToCannibal()
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   540
  if CheckCannibalKilled() then
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   541
    return false
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   542
  end
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   543
  return math.abs(GetX(cannibal) - GetX(youngh)) <= 400 and StoppedGear(youngh)
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   544
end
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   545
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   546
function DoCloseToCannibal()
7448
d0521a3a4358 Solved "floating repositionings" in every mission
belphegorr <szabibibi@gmail.com>
parents: 7425
diff changeset
   547
  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
   548
  AddAnim(closeCannim)
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   549
  AddFunction({func = SpawnAmmoCrate, args = {targetPosX[1][1], targetPosY[1][1], amWhip}})
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   550
  AddFunction({func = SpawnAmmoCrate, args = {targetPosX[1][2], targetPosY[1][2], amBaseballBat}})
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   551
  AddFunction({func = SpawnAmmoCrate, args = {targetPosX[1][3], targetPosY[1][3], amHammer}})
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   552
end
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   553
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   554
function CheckCannibalKilled()
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   555
  return cannibalKilled and StoppedGear(youngh)
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   556
end
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   557
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   558
function DoCannibalKilled()
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   559
  AddAnim(cannKilledAnim)
8944
ed2509832311 fix bug that locked unlocked campaign missions, see issue 452
Periklis Ntanasis <pntanasis@gmail.com>
parents: 8943
diff changeset
   560
  if not progress then
ed2509832311 fix bug that locked unlocked campaign missions, see issue 452
Periklis Ntanasis <pntanasis@gmail.com>
parents: 8943
diff changeset
   561
    SaveCampaignVar("Progress", "1")
ed2509832311 fix bug that locked unlocked campaign missions, see issue 452
Periklis Ntanasis <pntanasis@gmail.com>
parents: 8943
diff changeset
   562
  end
7203
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   563
end
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   564
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   565
function DoCannibalKilledEarly()
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   566
  AddAnim(cannKilledEarlyAnim)
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   567
  DoCannibalKilled()
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   568
end
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   569
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   570
-----------------------------Misc--------------------------------------
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   571
function StartChallenge(time)
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   572
  cratesCollected = 0
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   573
  PutCrate(1)
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   574
  TurnTimeLeft = time
12549
77b05be26a6e Improve the mission texts in ACF, mission 1
Wuzzy <almikes@aol.com>
parents: 12471
diff changeset
   575
  ShowMission(loc("First Blood"), loc("The Crate Frenzy"), loc("Collect the crates within the time limit!|If you fail, you'll have to try again."), 1, 5000)
7203
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   576
end
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   577
12609
a45f8eec6869 ACF1: Force player to press jump to confirm difficulty dialog
Wuzzy <almikes@aol.com>
parents: 12590
diff changeset
   578
function ChoiceDialog()
a45f8eec6869 ACF1: Force player to press jump to confirm difficulty dialog
Wuzzy <almikes@aol.com>
parents: 12590
diff changeset
   579
  local dstr
a45f8eec6869 ACF1: Force player to press jump to confirm difficulty dialog
Wuzzy <almikes@aol.com>
parents: 12590
diff changeset
   580
  if difficulty == 2 then
a45f8eec6869 ACF1: Force player to press jump to confirm difficulty dialog
Wuzzy <almikes@aol.com>
parents: 12590
diff changeset
   581
    dstr = loc("Difficulty: Hard")
a45f8eec6869 ACF1: Force player to press jump to confirm difficulty dialog
Wuzzy <almikes@aol.com>
parents: 12590
diff changeset
   582
  else
a45f8eec6869 ACF1: Force player to press jump to confirm difficulty dialog
Wuzzy <almikes@aol.com>
parents: 12590
diff changeset
   583
    dstr = loc("Difficulty: Easy")
a45f8eec6869 ACF1: Force player to press jump to confirm difficulty dialog
Wuzzy <almikes@aol.com>
parents: 12590
diff changeset
   584
  end
a45f8eec6869 ACF1: Force player to press jump to confirm difficulty dialog
Wuzzy <almikes@aol.com>
parents: 12590
diff changeset
   585
  ShowMission(loc("First Blood"), loc("The Torment"),
a45f8eec6869 ACF1: Force player to press jump to confirm difficulty dialog
Wuzzy <almikes@aol.com>
parents: 12590
diff changeset
   586
    loc("Your next task is to collect some crates by using the rope!") .. "|" ..
a45f8eec6869 ACF1: Force player to press jump to confirm difficulty dialog
Wuzzy <almikes@aol.com>
parents: 12590
diff changeset
   587
    loc("Press [Left] and [Right] to change the difficulty.") .. "| |" ..
a45f8eec6869 ACF1: Force player to press jump to confirm difficulty dialog
Wuzzy <almikes@aol.com>
parents: 12590
diff changeset
   588
    dstr .. "| |" ..
12611
f1e0fa009eb7 ACF1: Change rope challenge confirm key to [Attack]
Wuzzy <almikes@aol.com>
parents: 12610
diff changeset
   589
    loc("Press [Attack] to begin."),
12629
705dde538519 ACF1, fruit01, WxW: Make sure the selection dialogues never disappear on their own
Wuzzy <almikes@aol.com>
parents: 12611
diff changeset
   590
    0, 9999000)
12609
a45f8eec6869 ACF1: Force player to press jump to confirm difficulty dialog
Wuzzy <almikes@aol.com>
parents: 12590
diff changeset
   591
end
a45f8eec6869 ACF1: Force player to press jump to confirm difficulty dialog
Wuzzy <almikes@aol.com>
parents: 12590
diff changeset
   592
7203
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   593
function SetChoice()
12609
a45f8eec6869 ACF1: Force player to press jump to confirm difficulty dialog
Wuzzy <almikes@aol.com>
parents: 12590
diff changeset
   594
  AnimSetInputMask(0)
7203
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   595
  difficultyChoice = true
12609
a45f8eec6869 ACF1: Force player to press jump to confirm difficulty dialog
Wuzzy <almikes@aol.com>
parents: 12590
diff changeset
   596
  ChoiceDialog()
7203
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 SetTime(time)
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   600
  TurnTimeLeft = time
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   601
end
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   602
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   603
function ResetTurnTime()
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   604
  TurnTimeLeft = tTime
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   605
  tTime = -1
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   606
end
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   607
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   608
function PutCrate(i)
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   609
  if i > crateNum[difficulty] then
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   610
    return
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
  if difficulty == 1 then
12471
72c17eabc497 Fix incorrect crate messages when collecting crates in ACF mission 1
Wuzzy <almikes@aol.com>
parents: 12268
diff changeset
   613
    crates[1] = SpawnFakeAmmoCrate(targXdif1[i], targYdif1[i], false, false)
7203
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   614
  else
12471
72c17eabc497 Fix incorrect crate messages when collecting crates in ACF mission 1
Wuzzy <almikes@aol.com>
parents: 12268
diff changeset
   615
    crates[1] = SpawnFakeAmmoCrate(targXdif2[i], targYdif2[i], false, false)
7203
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   616
  end
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
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   619
function PutTargets(i)
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   620
  targets[1] = AddGear(targetPosX[i][1], targetPosY[i][1], gtTarget, 0, 0, 0, 0)
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   621
  targets[2] = AddGear(targetPosX[i][2], targetPosY[i][2], gtTarget, 0, 0, 0, 0)
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   622
  targets[3] = AddGear(targetPosX[i][3], targetPosY[i][3], gtTarget, 0, 0, 0, 0)
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   623
end
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   624
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   625
function FinishThem()
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   626
  SetHealth(elderh, 0)
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   627
  SetHealth(youngh, 0)
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   628
  SetHealth(princess, 0)
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   629
end
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   630
-----------------------------Main Functions----------------------------
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 onGameInit()
12549
77b05be26a6e Improve the mission texts in ACF, mission 1
Wuzzy <almikes@aol.com>
parents: 12471
diff changeset
   633
	Seed = 69
77b05be26a6e Improve the mission texts in ACF, mission 1
Wuzzy <almikes@aol.com>
parents: 12471
diff changeset
   634
	GameFlags = gfInfAttack + gfSolidLand + gfDisableWind
77b05be26a6e Improve the mission texts in ACF, mission 1
Wuzzy <almikes@aol.com>
parents: 12471
diff changeset
   635
	TurnTime = 100000
7203
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   636
	CaseFreq = 0
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   637
	MinesNum = 0
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   638
	MinesTime = 3000
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   639
	Explosives = 0
12549
77b05be26a6e Improve the mission texts in ACF, mission 1
Wuzzy <almikes@aol.com>
parents: 12471
diff changeset
   640
	Delay = 10
8979
860836494821 Package the 3 dynamic maps broken by recent uFloat changes as static maps. first_blood actually didn't seem to need it, but, just in case.
nemo
parents: 8944
diff changeset
   641
	Map = "A_Classic_Fairytale_first_blood"
7203
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   642
	Theme = "Nature"
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   643
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   644
7225
e3f2280d9000 Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents: 7209
diff changeset
   645
	AddTeam(loc("Natives"), 29439, "Bone", "Island", "HillBilly", "cm_birdy")
e3f2280d9000 Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents: 7209
diff changeset
   646
	youngh = AddHog(loc("Leaks A Lot"), 0, 100, "Rambo")
7245
53f73f4ae203 Modified frontend so that updating campaogn progress no longer changes current index of the mission combo box
belphegorr <szabibibi@gmail.com>
parents: 7243
diff changeset
   647
  elderh = AddHog(loc("Righteous Beard"), 0, 99, "IndianChief")
7225
e3f2280d9000 Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents: 7209
diff changeset
   648
  princess = AddHog(loc("Fell From Heaven"), 0, 300, "tiara")
7448
d0521a3a4358 Solved "floating repositionings" in every mission
belphegorr <szabibibi@gmail.com>
parents: 7425
diff changeset
   649
  AnimSetGearPosition(princess, 1911, 1361)
7203
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   650
  HogTurnLeft(princess, true)
7448
d0521a3a4358 Solved "floating repositionings" in every mission
belphegorr <szabibibi@gmail.com>
parents: 7425
diff changeset
   651
  AnimSetGearPosition(elderh, 2667, 1208)
7203
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   652
  HogTurnLeft(elderh, true)
7448
d0521a3a4358 Solved "floating repositionings" in every mission
belphegorr <szabibibi@gmail.com>
parents: 7425
diff changeset
   653
  AnimSetGearPosition(youngh, 1862, 1362)
7203
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   654
  HogTurnLeft(youngh, false)
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   655
12559
194b00c4ba07 ACF: Use skull grave for cannibal teams (for real)
Wuzzy <almikes@aol.com>
parents: 12550
diff changeset
   656
  AddTeam(loc("Cannibals"), 14483456, "skull", "Island", "Pirate","cm_vampire")
7225
e3f2280d9000 Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents: 7209
diff changeset
   657
  cannibal = AddHog(loc("Brainiac"), 0, 5, "Zombi")
7448
d0521a3a4358 Solved "floating repositionings" in every mission
belphegorr <szabibibi@gmail.com>
parents: 7425
diff changeset
   658
  AnimSetGearPosition(cannibal, 525, 1256)
7203
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   659
  HogTurnLeft(cannibal, false)
12549
77b05be26a6e Improve the mission texts in ACF, mission 1
Wuzzy <almikes@aol.com>
parents: 12471
diff changeset
   660
7203
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   661
  AnimInit()
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   662
  AnimationSetup()
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   663
end
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   664
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   665
function onGameStart()
8944
ed2509832311 fix bug that locked unlocked campaign missions, see issue 452
Periklis Ntanasis <pntanasis@gmail.com>
parents: 8943
diff changeset
   666
  progress = tonumber(GetCampaignVar("Progress"))
7203
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   667
  TurnTimeLeft = -1
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   668
  FollowGear(youngh)
7225
e3f2280d9000 Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents: 7209
diff changeset
   669
	ShowMission(loc("A Classic Fairytale"), loc("First Blood"), loc("Finish your training|Hint: Animations can be skipped with the [Precise] key."), -amSkip, 0)
7203
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   670
  SetState(cannibal, gstInvisible)
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   671
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   672
  AddAnim(startDialogue)
7245
53f73f4ae203 Modified frontend so that updating campaogn progress no longer changes current index of the mission combo box
belphegorr <szabibibi@gmail.com>
parents: 7243
diff changeset
   673
  princessFace = "Right"
53f73f4ae203 Modified frontend so that updating campaogn progress no longer changes current index of the mission combo box
belphegorr <szabibibi@gmail.com>
parents: 7243
diff changeset
   674
  AddEvent(CheckNeedToTurn, {princess}, DoNeedToTurn, {princess}, 1)
53f73f4ae203 Modified frontend so that updating campaogn progress no longer changes current index of the mission combo box
belphegorr <szabibibi@gmail.com>
parents: 7243
diff changeset
   675
  AddEvent(CheckNeedToTurn, {elderh}, DoNeedToTurn, {elderh}, 1)
7203
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   676
  AddEvent(CheckDamage, {}, DoOnDamage, {}, 1)
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   677
  AddEvent(CheckDeath, {}, DoDeath, {}, 0)
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   678
  AddEvent(CheckDamagedOthers, {}, DoOnDamagedOthers, {}, 1)
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   679
  AddEvent(CheckKilledOthers, {}, DoKilledOthers, {}, 0)
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   680
  AddEvent(CheckMovedUntilJump, {}, DoMovedUntilJump, {}, 0)
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   681
end
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   682
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   683
function onGameTick()
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   684
  AnimUnWait()
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   685
  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
   686
    return
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
  ExecuteAfterAnimations()
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   689
  CheckEvents()
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   690
end
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   691
12629
705dde538519 ACF1, fruit01, WxW: Make sure the selection dialogues never disappear on their own
Wuzzy <almikes@aol.com>
parents: 12611
diff changeset
   692
local choiceDialogTimer = 0
705dde538519 ACF1, fruit01, WxW: Make sure the selection dialogues never disappear on their own
Wuzzy <almikes@aol.com>
parents: 12611
diff changeset
   693
function onGameTick20()
705dde538519 ACF1, fruit01, WxW: Make sure the selection dialogues never disappear on their own
Wuzzy <almikes@aol.com>
parents: 12611
diff changeset
   694
  -- Make sure the choice dialog never disappears while it is active
705dde538519 ACF1, fruit01, WxW: Make sure the selection dialogues never disappear on their own
Wuzzy <almikes@aol.com>
parents: 12611
diff changeset
   695
  if difficultyChoice then
705dde538519 ACF1, fruit01, WxW: Make sure the selection dialogues never disappear on their own
Wuzzy <almikes@aol.com>
parents: 12611
diff changeset
   696
    choiceDialogTimer = choiceDialogTimer + 20
705dde538519 ACF1, fruit01, WxW: Make sure the selection dialogues never disappear on their own
Wuzzy <almikes@aol.com>
parents: 12611
diff changeset
   697
    if choiceDialogTimer > 9990000 then
705dde538519 ACF1, fruit01, WxW: Make sure the selection dialogues never disappear on their own
Wuzzy <almikes@aol.com>
parents: 12611
diff changeset
   698
      ChoiceDialog()
705dde538519 ACF1, fruit01, WxW: Make sure the selection dialogues never disappear on their own
Wuzzy <almikes@aol.com>
parents: 12611
diff changeset
   699
      choiceDialogTimer = 0
705dde538519 ACF1, fruit01, WxW: Make sure the selection dialogues never disappear on their own
Wuzzy <almikes@aol.com>
parents: 12611
diff changeset
   700
    end
705dde538519 ACF1, fruit01, WxW: Make sure the selection dialogues never disappear on their own
Wuzzy <almikes@aol.com>
parents: 12611
diff changeset
   701
  end
705dde538519 ACF1, fruit01, WxW: Make sure the selection dialogues never disappear on their own
Wuzzy <almikes@aol.com>
parents: 12611
diff changeset
   702
end
705dde538519 ACF1, fruit01, WxW: Make sure the selection dialogues never disappear on their own
Wuzzy <almikes@aol.com>
parents: 12611
diff changeset
   703
7203
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   704
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
   705
  if gear == ropeCrate1 then
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   706
    rope1Taken = true
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   707
  elseif gear == paraCrate then
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   708
    paraTaken = true
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   709
  elseif gear == ropeCrate2 then
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   710
    rope2Taken = true
12550
9c3ff4ffd4f3 ACF1: Fix various problems with the parachute section
Wuzzy <almikes@aol.com>
parents: 12549
diff changeset
   711
    rope2InProgress = false
7203
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   712
  elseif gear == ropeCrate3 then
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   713
    rope3Taken = true
12471
72c17eabc497 Fix incorrect crate messages when collecting crates in ACF mission 1
Wuzzy <almikes@aol.com>
parents: 12268
diff changeset
   714
  elseif gear == crates[1] then
72c17eabc497 Fix incorrect crate messages when collecting crates in ACF mission 1
Wuzzy <almikes@aol.com>
parents: 12268
diff changeset
   715
    -- Play sound if challenge crate (fake crate) collected
72c17eabc497 Fix incorrect crate messages when collecting crates in ACF mission 1
Wuzzy <almikes@aol.com>
parents: 12268
diff changeset
   716
    if band(GetGearMessage(gear), gmDestroy) ~= 0 then
72c17eabc497 Fix incorrect crate messages when collecting crates in ACF mission 1
Wuzzy <almikes@aol.com>
parents: 12268
diff changeset
   717
      PlaySound(sndShotgunReload)
72c17eabc497 Fix incorrect crate messages when collecting crates in ACF mission 1
Wuzzy <almikes@aol.com>
parents: 12268
diff changeset
   718
    end
72c17eabc497 Fix incorrect crate messages when collecting crates in ACF mission 1
Wuzzy <almikes@aol.com>
parents: 12268
diff changeset
   719
72c17eabc497 Fix incorrect crate messages when collecting crates in ACF mission 1
Wuzzy <almikes@aol.com>
parents: 12268
diff changeset
   720
    -- Update crate challenge
72c17eabc497 Fix incorrect crate messages when collecting crates in ACF mission 1
Wuzzy <almikes@aol.com>
parents: 12268
diff changeset
   721
    if deleteCrate == true then
72c17eabc497 Fix incorrect crate messages when collecting crates in ACF mission 1
Wuzzy <almikes@aol.com>
parents: 12268
diff changeset
   722
      deleteCrate = false
72c17eabc497 Fix incorrect crate messages when collecting crates in ACF mission 1
Wuzzy <almikes@aol.com>
parents: 12268
diff changeset
   723
    elseif challengeFailed == false then
72c17eabc497 Fix incorrect crate messages when collecting crates in ACF mission 1
Wuzzy <almikes@aol.com>
parents: 12268
diff changeset
   724
      crates[1] = nil
72c17eabc497 Fix incorrect crate messages when collecting crates in ACF mission 1
Wuzzy <almikes@aol.com>
parents: 12268
diff changeset
   725
      cratesCollected = cratesCollected + 1
72c17eabc497 Fix incorrect crate messages when collecting crates in ACF mission 1
Wuzzy <almikes@aol.com>
parents: 12268
diff changeset
   726
      PutCrate(cratesCollected + 1)
72c17eabc497 Fix incorrect crate messages when collecting crates in ACF mission 1
Wuzzy <almikes@aol.com>
parents: 12268
diff changeset
   727
    end
7203
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   728
  elseif gear == punchCrate then
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   729
    punchTaken = true
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   730
  elseif gear == desertCrate then
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   731
    desertTaken = true
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   732
  elseif GetGearType(gear) == gtTarget then
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   733
    i = 1
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   734
    while targets[i] ~= gear do
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   735
      i = i + 1
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   736
    end
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   737
    targets[i] = nil
12549
77b05be26a6e Improve the mission texts in ACF, mission 1
Wuzzy <almikes@aol.com>
parents: 12471
diff changeset
   738
    targetsDestroyed = targetsDestroyed + 1
7203
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   739
  elseif gear == cannibal then
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   740
    cannibalKilled = true
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   741
  elseif gear == princess then
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   742
    princessKilled = true
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   743
  elseif gear == elderh then
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   744
    elderKilled = true
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   745
  elseif gear == youngh then
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   746
    youngKilled = true
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   747
  end
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   748
end
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   749
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   750
function onAmmoStoreInit()
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   751
  SetAmmo(amWhip, 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
   752
  SetAmmo(amBaseballBat, 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
   753
  SetAmmo(amHammer, 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
   754
end
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   755
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   756
function onNewTurn()
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   757
  if CurrentHedgehog == cannibal and cannibalVisible == false then
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   758
    SetState(cannibal, gstInvisible)
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   759
  end
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   760
  SwitchHog(youngh)
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   761
  FollowGear(youngh)
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   762
  TurnTimeLeft = -1
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   763
end
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   764
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   765
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
   766
  if gear == youngh then
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   767
    youngdamaged = true
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   768
    tTime = TurnTimeLeft
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   769
  elseif gear == princess then
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   770
    princessDamaged = true
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   771
    tTime = TurnTimeLeft
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   772
  elseif gear == elderh then
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   773
    elderDamaged = true
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   774
    tTime = TurnTimeLeft
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   775
  elseif gear == cannibal then
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   776
    cannibalVisible = true
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   777
    cannibalDamaged = true
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   778
    SetState(cannibal, 0)
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
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   782
function onPrecise()
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   783
  if GameTime > 2000 then
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   784
    SetAnimSkip(true)
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   785
  end
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 onLeft()
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   789
  if difficultyChoice == true then
12609
a45f8eec6869 ACF1: Force player to press jump to confirm difficulty dialog
Wuzzy <almikes@aol.com>
parents: 12590
diff changeset
   790
    if difficulty ~= 1 then
a45f8eec6869 ACF1: Force player to press jump to confirm difficulty dialog
Wuzzy <almikes@aol.com>
parents: 12590
diff changeset
   791
       difficulty = 1
a45f8eec6869 ACF1: Force player to press jump to confirm difficulty dialog
Wuzzy <almikes@aol.com>
parents: 12590
diff changeset
   792
    else
a45f8eec6869 ACF1: Force player to press jump to confirm difficulty dialog
Wuzzy <almikes@aol.com>
parents: 12590
diff changeset
   793
       difficulty = 2
a45f8eec6869 ACF1: Force player to press jump to confirm difficulty dialog
Wuzzy <almikes@aol.com>
parents: 12590
diff changeset
   794
    end
a45f8eec6869 ACF1: Force player to press jump to confirm difficulty dialog
Wuzzy <almikes@aol.com>
parents: 12590
diff changeset
   795
    PlaySound(sndSwitchHog)
a45f8eec6869 ACF1: Force player to press jump to confirm difficulty dialog
Wuzzy <almikes@aol.com>
parents: 12590
diff changeset
   796
    ChoiceDialog()
7203
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
end
12609
a45f8eec6869 ACF1: Force player to press jump to confirm difficulty dialog
Wuzzy <almikes@aol.com>
parents: 12590
diff changeset
   799
onRight = onLeft
7203
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   800
12611
f1e0fa009eb7 ACF1: Change rope challenge confirm key to [Attack]
Wuzzy <almikes@aol.com>
parents: 12610
diff changeset
   801
function onAttack()
7203
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   802
  if difficultyChoice == true then
12609
a45f8eec6869 ACF1: Force player to press jump to confirm difficulty dialog
Wuzzy <almikes@aol.com>
parents: 12590
diff changeset
   803
    DoChoice()
7203
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   804
  end
37661b2a7b64 Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   805
end