share/hedgewars/Data/Missions/Campaign/A_Classic_Fairytale/dragon.lua
author Wuzzy <Wuzzy2@mail.ru>
Fri, 09 Mar 2018 19:05:59 +0100
changeset 13145 5083fb0a2992
parent 13143 2c867c7d939f
child 13583 141cdfe0f3ca
permissions -rw-r--r--
A Classic Fairytale: Harden all missions against missing campaign variables in team file and assume default values This assumes the worst case in which the team file is missing all campaign variables except Progress. This has been successfully tested with all 10 missions and still generates a logical storyline. By default, the game assumes: - The cyborg's offer in mission 2 was refused - The traitor in mission 5 was killed As a consequence, missions 8 and 10 use the princessScene cut scene.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
12794
bca911f8e804 Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents: 12625
diff changeset
     1
--[[
bca911f8e804 Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents: 12625
diff changeset
     2
A Classic Fairytale: Dragon's Lair
bca911f8e804 Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents: 12625
diff changeset
     3
bca911f8e804 Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents: 12625
diff changeset
     4
= SUMMARY =
bca911f8e804 Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents: 12625
diff changeset
     5
Hero must collect an utility crate on the other side of the river.
bca911f8e804 Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents: 12625
diff changeset
     6
To accomplish that, hero must first collect a series of crates with
bca911f8e804 Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents: 12625
diff changeset
     7
the rope and wipe out the cyborgs.
12901
bdf8e80a97b8 Fix some minor formatting and grammar flaws in script strings
Wuzzy <Wuzzy2@mail.ru>
parents: 12798
diff changeset
     8
The hero is one survivor of the previous missions.
12794
bca911f8e804 Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents: 12625
diff changeset
     9
bca911f8e804 Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents: 12625
diff changeset
    10
= GOALS =
bca911f8e804 Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents: 12625
diff changeset
    11
- Mission goal (leads to immediate victory): Collect utility crate at the right side of the river
bca911f8e804 Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents: 12625
diff changeset
    12
- First sub-goal: Collect (or destroy) a series of crates (all other utility crates)
bca911f8e804 Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents: 12625
diff changeset
    13
- Second sub-goal: Wipe out the cyborgs
bca911f8e804 Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents: 12625
diff changeset
    14
bca911f8e804 Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents: 12625
diff changeset
    15
= FLOW CHART =
12901
bdf8e80a97b8 Fix some minor formatting and grammar flaws in script strings
Wuzzy <Wuzzy2@mail.ru>
parents: 12798
diff changeset
    16
- Choose hog to be hero (read from m5DeployedNum)
12794
bca911f8e804 Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents: 12625
diff changeset
    17
- Cut scene: Intro
bca911f8e804 Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents: 12625
diff changeset
    18
- TBS
bca911f8e804 Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents: 12625
diff changeset
    19
| Player accomplishes first sub-goal first:
bca911f8e804 Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents: 12625
diff changeset
    20
    - Cut scene: Cyborg reveals second goal
12798
fdb3730aa0e2 ACF6: Make sure player only gets portal gun at the portal sequence, and not a pile full of weapons and ropes
Wuzzy <Wuzzy2@mail.ru>
parents: 12794
diff changeset
    21
    - A ton of weapon crates and some rope crates spawn on the long platform
12794
bca911f8e804 Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents: 12625
diff changeset
    22
| Player accomplshed second sub-goal first:
bca911f8e804 Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents: 12625
diff changeset
    23
    - Hero reminds player to collect/destroy remaining crates
bca911f8e804 Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents: 12625
diff changeset
    24
- Player accomplished both goals
12798
fdb3730aa0e2 ACF6: Make sure player only gets portal gun at the portal sequence, and not a pile full of weapons and ropes
Wuzzy <Wuzzy2@mail.ru>
parents: 12794
diff changeset
    25
- Cut scene: Cyborg teleports hero to the long platform and congrats hero
fdb3730aa0e2 ACF6: Make sure player only gets portal gun at the portal sequence, and not a pile full of weapons and ropes
Wuzzy <Wuzzy2@mail.ru>
parents: 12794
diff changeset
    26
- Hero's ammo is cleared, all crates, mines, sticky mines and barrels are removed from platform
fdb3730aa0e2 ACF6: Make sure player only gets portal gun at the portal sequence, and not a pile full of weapons and ropes
Wuzzy <Wuzzy2@mail.ru>
parents: 12794
diff changeset
    27
- Spawn a portal gun crate on the long platform and also a teleportation crate further to the right
fdb3730aa0e2 ACF6: Make sure player only gets portal gun at the portal sequence, and not a pile full of weapons and ropes
Wuzzy <Wuzzy2@mail.ru>
parents: 12794
diff changeset
    28
- (These utilities can be used to finish the mission)
12794
bca911f8e804 Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents: 12625
diff changeset
    29
- Player takes final crate at the very right
bca911f8e804 Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents: 12625
diff changeset
    30
> Victory
bca911f8e804 Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents: 12625
diff changeset
    31
bca911f8e804 Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents: 12625
diff changeset
    32
]]
bca911f8e804 Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents: 12625
diff changeset
    33
8043
da083f8d95e6 We need custom script loading function in lua now
unc0rr
parents: 7675
diff changeset
    34
HedgewarsScriptLoad("/Scripts/Locale.lua")
da083f8d95e6 We need custom script loading function in lua now
unc0rr
parents: 7675
diff changeset
    35
HedgewarsScriptLoad("/Scripts/Animate.lua")
7413
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    36
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    37
-----------------------------Map--------------------------------------
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    38
local map = 
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    39
{
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    40
	"\0\91\4\253\131\0\88\0\46\0\0\91\0\49\131\15\196\0\53\0\15\196\0\53\131\15\196\4\250\0\255\242\7\179\131\1\128\7\214\0",
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    41
	"\1\113\7\207\131\3\182\7\157\0\3\175\7\143\131\6\58\7\200\0\6\76\7\193\131\6\188\7\129\0\6\188\7\129\131\6\248\6\216\0",
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    42
	"\6\248\6\216\131\7\52\8\14\0\10\206\8\0\131\11\203\6\65\0\11\203\6\65\131\12\18\7\66\0\12\18\7\69\131\16\0\7\69\0",
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    43
	"\0\109\1\1\131\2\111\0\49\0\2\111\0\49\131\3\133\1\18\0\3\140\1\18\131\4\162\0\165\0\4\162\0\165\131\5\135\1\29\0",
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    44
	"\5\145\1\22\131\8\84\0\232\0\8\84\0\232\131\9\26\0\70\0\9\26\0\70\131\10\5\1\4\0\10\48\0\243\131\10\2\1\8\0",
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    45
	"\10\58\0\243\131\10\118\1\15\0\10\118\1\15\131\10\234\1\173\0\11\10\1\177\131\12\11\1\22\0\12\39\1\40\131\12\243\2\9\0",
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    46
	"\12\243\2\9\131\13\106\0\165\0\13\131\0\176\131\15\186\1\78\0\1\244\0\81\136\0\120\0\84\0\1\99\0\123\137\0\130\0\215\0",
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    47
	"\0\158\0\130\143\0\158\0\130\0\2\216\0\88\138\4\165\0\102\0\4\91\0\127\142\3\129\0\197\0\3\69\0\134\142\3\69\0\134\0",
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    48
	"\4\215\0\120\143\8\88\0\134\0\8\187\0\84\139\8\187\0\84\0\8\239\0\70\135\8\239\0\70\0\8\60\0\187\138\5\99\0\222\0",
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    49
	"\5\61\0\197\138\5\61\0\197\0\9\99\0\81\137\10\23\0\218\0\9\187\0\77\137\11\31\1\117\0\10\30\0\88\137\15\161\0\109\0",
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    50
	"\15\126\0\225\144\13\177\0\116\0\15\150\0\144\139\15\157\1\26\0\10\202\0\169\152\12\246\0\169\0\10\72\0\144\145\11\122\1\36\0",
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    51
	"\11\17\1\121\141\11\17\1\121\0\12\229\1\194\138\12\229\1\194\0\12\208\1\85\150\12\208\1\85\0\12\148\1\15\147\12\148\1\15\0",
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    52
	"\13\145\0\208\147\13\145\0\208\0\6\238\7\45\135\7\10\7\238\0\6\220\7\150\135\6\206\7\242\0\6\174\7\175\135\6\135\8\7\0",
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    53
	"\6\118\7\214\135\6\62\7\238\0\6\30\7\245\140\3\217\7\210\0\3\161\7\221\138\255\252\7\231\0\15\242\7\165\148\11\115\7\175\0",
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    54
	"\11\196\6\164\138\11\10\8\4\0\11\210\7\31\141\11\210\7\31\0\14\216\2\72\166\14\216\2\72\0\14\213\4\4\166\14\213\4\4\0",
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    55
	"\13\216\1\159\148\13\216\1\159\0\13\159\2\143\148\13\159\2\143\0\13\230\3\69\145\13\230\3\69\0\13\163\4\11\145\13\166\4\11\0",
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    56
	"\13\237\4\208\145\13\237\4\208\0\14\195\5\61\145\14\195\5\61\0\13\78\1\254\136\13\78\1\254\0\12\239\2\93\136\12\239\2\93\0",
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    57
	"\12\250\2\227\136\12\250\2\227\0\13\71\3\59\136\13\71\3\59\0\13\1\3\168\136\13\1\3\168\0\12\243\4\32\136\12\246\4\32\0",
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    58
	"\13\40\4\130\136\13\43\4\134\0\13\92\4\243\136\13\92\4\243\0\13\142\5\135\136\13\142\5\135\0\14\33\5\106\136\14\33\5\106\0",
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    59
	"\14\111\5\208\136\14\121\5\216\0\15\13\5\237\136\15\13\5\237\0\15\73\5\128\136\15\73\5\128\0\15\84\4\243\136\15\84\4\243\0",
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    60
	"\14\199\6\33\133\14\199\6\33\0\14\97\6\44\133\14\83\6\44\0\14\9\5\240\133\14\9\5\240\0\13\226\5\163\133\13\226\5\163\0",
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    61
	"\13\170\5\233\133\13\170\5\233\0\13\71\5\205\133\13\71\5\205\0\13\61\5\117\133\13\61\5\117\0\13\22\5\40\133\13\22\5\40\0",
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    62
	"\12\253\4\211\133\12\253\4\211\0\12\197\4\169\133\12\197\4\169\0\12\204\4\106\133\12\204\4\106\0\12\162\4\46\133\12\162\4\42\0",
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    63
	"\12\194\3\200\133\12\194\3\196\0\12\201\3\84\133\12\201\3\84\0\12\253\3\62\133\12\253\3\62\0\12\169\2\241\133\12\169\2\241\0",
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    64
	"\12\187\2\167\133\12\187\2\167\0\12\158\2\93\133\12\158\2\93\0\12\162\2\9\133\12\162\2\9\0\12\123\1\205\132\12\123\1\205\0",
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    65
	"\12\84\1\251\132\12\84\1\251\0\12\91\2\55\132\12\95\2\55\0\12\63\2\139\132\12\63\2\139\0\12\120\2\164\132\12\120\2\164\0",
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    66
	"\12\81\2\206\132\12\81\2\206\0\12\106\3\17\132\12\109\3\20\0\12\137\3\73\132\12\137\3\73\0\12\84\3\122\132\12\84\3\122\0",
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    67
	"\12\137\3\150\132\12\137\3\150\0\12\95\3\217\132\12\95\3\217\0\12\134\3\231\132\12\134\3\231\0\12\106\4\63\132\12\106\4\63\0",
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    68
	"\12\137\4\120\132\12\141\4\120\0\12\88\4\179\132\12\88\4\183\0\12\134\4\190\132\12\134\4\190\0\12\158\4\232\132\12\165\4\232\0",
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    69
	"\12\215\5\15\132\12\215\5\15\0\12\91\4\243\130\12\91\4\243\0\12\144\5\26\130\12\144\5\26\0\12\176\5\54\130\12\176\5\54\0",
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    70
	"\12\225\5\82\130\12\225\5\82\0\13\4\5\117\130\13\1\5\117\0\12\239\5\166\130\12\239\5\166\0\13\8\5\184\130\13\11\5\184\0",
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    71
	"\13\8\5\226\130\13\8\5\226\0\13\54\6\12\130\13\57\6\12\0\13\106\6\2\130\13\106\5\254\0\13\138\6\12\130\13\138\6\12\0",
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    72
	"\13\184\6\30\130\13\187\6\30\0\13\223\5\254\130\13\223\5\254\0\13\149\6\69\130\13\145\6\69\0\13\128\6\33\130\13\128\6\33\0",
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    73
	"\13\85\6\40\130\13\85\6\40\0\12\232\6\2\130\12\232\6\2\0\12\204\5\205\130\12\204\5\201\0\12\183\5\159\130\12\183\5\156\0",
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    74
	"\12\211\5\128\130\12\211\5\128\0\12\165\5\103\130\12\165\5\103\0\12\123\5\64\130\12\120\5\64\0\12\81\5\71\130\12\81\5\71\0",
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    75
	"\12\84\5\18\130\12\84\5\18\0\12\39\4\243\130\12\39\4\243\0\12\35\4\194\130\12\35\4\194\0\12\63\4\127\130\12\63\4\127\0",
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    76
	"\12\91\4\106\130\12\91\4\106\0\12\53\4\60\130\12\53\4\60\0\12\74\4\25\130\12\84\4\21\0\12\120\4\4\130\12\120\4\4\0",
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    77
	"\12\42\3\231\130\12\42\3\231\0\12\39\3\189\130\12\42\3\186\0\12\60\3\175\130\12\60\3\175\0\12\39\3\133\130\12\39\3\133\0",
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    78
	"\12\70\3\73\130\12\70\3\73\0\12\25\3\77\130\12\25\3\77\0\12\42\3\13\130\12\46\3\13\0\12\81\3\31\130\12\81\3\31\0",
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    79
	"\12\32\2\213\130\12\32\2\213\0\12\14\2\178\130\12\14\2\178\0\12\42\2\181\130\12\46\2\181\0\12\14\2\128\130\12\14\2\128\0",
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    80
	"\12\39\2\100\130\12\42\2\100\0\12\74\2\104\130\12\77\2\104\0\12\106\2\135\130\12\109\2\135\0\12\39\2\72\130\12\39\2\69\0",
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    81
	"\12\35\2\37\130\12\35\2\37\0\12\32\2\2\130\12\32\2\2\0\12\28\1\226\130\12\28\1\223\0\12\63\1\208\130\12\63\1\208\0",
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    82
	"\12\84\1\173\130\12\84\1\170\0\12\63\1\159\130\12\60\1\159\0\12\39\1\113\130\12\39\1\113\0\12\14\1\96\130\12\11\1\96\0",
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    83
	"\11\228\1\131\130\11\228\1\135\0\12\7\1\149\130\12\7\1\149\0\12\21\1\177\130\12\25\1\177\0\11\242\1\201\130\11\242\1\201\0",
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    84
	"\13\226\6\58\130\13\226\6\58\0\14\16\6\40\130\14\16\6\40\0\13\208\6\86\130\13\208\6\86\0\13\247\6\111\130\13\247\6\114\0",
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    85
	"\13\184\6\121\130\13\184\6\121\0\13\198\6\146\130\13\201\6\146\0\13\244\6\139\130\13\244\6\139\0\13\223\6\185\130\13\223\6\185\0",
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    86
	"\13\173\6\199\130\13\173\6\199\0\13\159\6\171\130\13\159\6\171\0\13\138\6\220\130\13\138\6\220\0\13\184\6\238\130\13\184\6\238\0",
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    87
	"\13\208\6\223\130\13\208\6\223\0\13\216\7\10\130\13\216\7\10\0\13\184\7\10\130\13\180\7\10\0\13\142\7\38\130\13\142\7\41\0",
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    88
	"\13\128\7\6\130\13\128\7\6\0\13\85\7\34\130\13\89\7\34\0\13\89\7\3\130\13\89\7\3\0\13\117\6\220\130\13\121\6\220\0",
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    89
	"\13\75\6\195\130\13\75\6\195\0\13\110\6\164\130\13\110\6\164\0\13\156\6\125\130\13\156\6\125\0\13\106\6\135\130\13\106\6\135\0",
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    90
	"\13\103\6\100\130\13\103\6\100\0\13\64\6\143\130\13\64\6\143\0\13\47\6\104\130\13\47\6\104\0\13\71\6\79\130\13\71\6\79\0",
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    91
	"\13\40\6\65\130\13\36\6\65\0\13\8\6\44\130\13\1\6\44\0\13\8\6\76\130\13\8\6\76\0\13\1\6\132\130\13\1\6\132\0",
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    92
	"\13\33\6\135\130\13\33\6\135\0\13\26\6\178\130\13\22\6\178\0\13\47\6\202\130\13\50\6\202\0\13\54\6\245\130\13\54\6\245\0",
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    93
	"\13\22\7\3\130\13\22\7\3\0\13\43\7\27\130\13\43\7\27\0\12\253\6\248\130\12\250\6\248\0\12\253\6\220\130\12\253\6\220\0",
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    94
	"\12\215\6\174\130\12\225\6\174\0\12\253\6\174\130\12\253\6\174\0\12\215\6\121\130\12\215\6\121\0\12\229\6\76\130\12\229\6\76\0",
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    95
	"\12\201\6\51\130\12\201\6\51\0\12\190\6\19\130\12\190\6\19\0\12\151\5\223\130\12\151\5\223\0\12\148\5\194\130\12\151\5\194\0",
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    96
	"\12\155\5\159\130\12\155\5\156\0\12\144\5\121\130\12\144\5\121\0\12\95\5\110\130\12\95\5\110\0\12\102\5\156\130\12\102\5\159\0",
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    97
	"\12\99\5\216\130\12\106\5\219\0\12\148\6\40\130\12\148\6\40\0\12\127\6\19\130\12\127\6\19\0\12\176\6\104\130\12\176\6\104\0",
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    98
	"\12\141\6\72\130\12\141\6\72\0\12\162\6\139\130\12\162\6\143\0\12\172\6\181\130\12\172\6\181\0\12\204\6\216\130\12\208\6\216\0",
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
    99
	"\12\201\7\3\130\12\201\7\3\0\12\236\7\24\130\12\236\7\24\0\12\120\6\146\130\12\120\6\146\0\12\123\6\104\130\12\123\6\104\0",
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   100
	"\12\123\6\185\130\12\123\6\185\0\12\162\6\227\130\12\162\6\227\0\12\134\6\241\130\12\134\6\241\0\12\155\7\10\130\12\155\7\10\0",
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   101
	"\12\190\7\41\130\12\190\7\41\0\11\228\1\96\129\11\228\1\96\0\11\200\1\121\129\11\200\1\121\0\11\193\1\156\129\11\196\1\156\0",
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   102
	"\11\221\1\170\129\11\221\1\170\0\11\217\1\208\129\11\217\1\208\0\11\245\1\230\129\11\245\1\230\0\11\245\2\16\129\11\245\2\16\0",
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   103
	"\12\14\2\62\129\12\18\2\62\0\11\242\2\93\129\11\242\2\93\0\11\235\2\178\129\11\235\2\178\0\11\231\2\238\129\11\235\2\238\0",
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   104
	"\12\4\2\252\129\12\4\2\252\0\11\252\3\34\129\11\252\3\34\0\11\235\3\87\129\11\238\3\87\0\12\11\3\119\129\12\11\3\119\0",
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   105
	"\12\4\3\168\129\12\4\3\168\0\11\245\3\200\129\11\245\3\200\0\11\252\3\238\129\11\252\3\242\0\12\11\4\7\129\12\11\4\7\0",
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   106
	"\11\245\4\60\129\11\238\4\60\0\11\224\4\74\129\11\221\4\74\0\11\210\4\137\129\11\210\4\137\0\11\228\4\151\129\11\231\4\151\0",
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   107
	"\11\242\4\130\129\11\242\4\130\0\12\4\4\113\129\12\7\4\113\0\12\28\4\102\129\12\28\4\102\0\12\11\4\141\129\12\11\4\141\0",
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   108
	"\11\249\4\162\129\11\249\4\162\0\11\221\4\116\129\11\221\4\116\0\11\214\4\106\129\11\217\4\102\0\12\4\4\211\129\12\4\4\211\0",
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   109
	"\11\249\5\8\129\11\252\5\8\0\12\39\5\11\129\12\42\5\11\0\12\56\5\50\129\12\60\5\47\0\12\46\5\96\129\12\49\5\96\0",
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   110
	"\12\70\5\113\129\12\70\5\113\0\12\56\5\166\129\12\63\5\166\0\12\70\5\145\129\12\74\5\145\0\12\70\5\194\129\12\77\5\194\0",
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   111
	"\12\70\5\237\129\12\74\5\237\0\12\106\5\240\129\12\109\5\240\0\12\99\6\33\129\12\99\6\33\0\12\88\6\72\129\12\88\6\72\0",
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   112
	"\12\91\6\107\129\12\95\6\107\0\12\77\6\146\129\12\81\6\146\0\12\88\6\181\129\12\91\6\181\0\12\91\6\220\129\12\99\6\220\0",
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   113
	"\12\113\7\10\129\12\116\7\10\0\8\116\4\18\179\8\116\4\18\0\9\205\3\73\156\9\205\3\73\0\10\83\2\146\144\10\83\2\146\0",
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   114
	"\10\153\2\44\136\10\153\2\44\0\10\181\1\240\132\10\181\1\240\0\10\199\1\205\131\10\199\1\205\0\10\209\1\184\129\10\209\1\184\0",
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   115
	"\8\42\2\167\150\8\42\2\167\0\8\53\1\240\141\8\53\1\237\0\8\67\1\135\134\8\67\1\135\0\11\224\5\8\129\11\224\5\8\0",
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   116
	"\11\200\5\8\129\11\200\5\8\0\11\182\5\8\129\11\182\5\8\0\11\154\5\4\129\11\154\5\4\0\11\129\5\8\129\11\129\5\8\0",
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   117
	"\11\119\3\84\129\11\119\3\84\0\11\140\3\87\129\11\140\3\87\0\11\165\3\87\129\11\165\3\87\0\11\182\3\87\129\11\182\3\87\0",
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   118
	"\11\203\3\87\129\11\203\3\87\0\9\33\6\223\132\9\33\8\11\0\9\33\6\188\129\9\33\6\188\0\0\123\1\26\136\0\211\2\223\0",
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   119
	"\0\211\2\223\136\0\120\3\84\0\0\130\3\101\136\0\211\4\53\0\0\204\4\53\136\0\120\4\151\0\0\130\3\193\136\0\127\4\63\0",
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   120
	"\0\130\3\31\136\0\130\1\201\0\0\91\4\253\130\0\91\6\76\0\7\94\3\136\138\7\94\3\136\0\7\24\3\77\135\7\24\3\77\0",
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   121
	"\6\238\3\24\132\6\241\3\24\0\6\223\2\238\131\6\223\2\238\0\6\220\2\209\129\6\220\2\209\0\7\87\4\14\133\7\87\4\14\0",
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   122
	"\7\38\4\0\131\7\38\4\0\0\7\6\3\242\130\7\6\3\242\0\6\241\3\228\129\6\241\3\228\0\6\227\3\217\128\6\227\3\217\0",
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   123
	"\0\109\4\197\135\0\162\5\99\0\0\144\5\121\135\0\123\6\9\0\0\127\5\92\135\0\127\5\92\0\0\127\5\54\135\0\127\5\54\0",
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   124
	"\0\134\6\23\132\0\236\6\97\0\0\236\6\97\132\1\106\6\135\0\1\117\6\135\132\1\177\6\143\0\2\234\7\80\130\3\69\7\80\0",
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   125
	"\3\69\7\80\130\3\84\7\101\0\3\84\7\101\130\3\87\7\129\0\3\87\7\129\130\3\84\7\150\0\0\183\5\103\130\1\92\5\159\0",
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   126
	"\1\11\5\138\130\0\253\5\180\0\0\253\5\180\130\0\158\5\166\0\0\239\4\60\131\1\166\4\95\0\2\104\3\133\131\3\84\3\129\0",
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   127
	"\4\162\2\181\131\4\162\3\147\0\3\115\2\26\131\4\74\2\30\0\2\23\1\54\131\2\230\1\54\0\0\204\2\5\131\1\194\2\5\0",
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   128
	"\4\74\2\33\131\5\226\1\223\0\0\225\5\121\197\1\135\5\163\0\0\204\5\173\197\1\1\5\173\0\0\179\5\152\131\1\57\5\163\0",
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   129
	"\1\57\5\159\131\1\106\5\219\0\0\165\5\226\130\0\253\5\230\0\0\253\5\230\130\1\8\5\159\0\1\254\6\86\131\1\254\6\86\0",
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   130
	"\1\254\6\33\131\1\254\6\33\0\1\254\5\230\131\1\254\5\230\0\1\254\5\170\131\1\254\5\170\0\1\254\5\113\131\1\254\5\113\0",
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   131
	"\1\251\6\5\129\1\251\6\5\0\1\254\5\201\129\1\254\5\201\0\1\254\5\138\129\1\254\5\138\0\1\254\6\58\129\1\254\6\58\0",
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   132
	"\1\254\5\78\129\1\254\5\78\0\2\2\5\40\131\2\2\5\40\0\2\2\4\246\131\2\2\4\246\0\1\237\4\204\131\1\237\4\204\0",
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   133
	"\2\40\4\190\131\2\40\4\190\0\6\160\7\52\223\7\27\7\126\0\1\219\4\172\204\1\219\4\172\0\2\37\4\183\197\2\37\4\183\0",
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   134
	"\3\98\3\122\131\3\126\3\84\0\3\126\3\84\131\3\126\3\52\0\3\126\3\41\131\3\80\3\24\0\3\80\3\24\131\3\112\2\248\0",
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   135
	"\3\112\2\248\131\3\98\2\188\0",
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   136
}
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   137
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   138
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   139
-----------------------------Constants---------------------------------
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   140
choiceAccepted = 1
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   141
choiceRefused = 2
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   142
choiceAttacked = 3
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   143
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   144
choiceEliminate = 1
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   145
choiceSpare = 2
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   146
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   147
leaksNum = 1
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   148
denseNum = 2
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   149
waterNum = 3
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   150
buffaloNum = 4
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   151
chiefNum = 5
7417
2520705b857f Switched Fell From Heaven to Fell From Grace on missions 5, 6.
belphegorr <szabibibi@gmail.com>
parents: 7415
diff changeset
   152
girlNum = 6
7413
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   153
wiseNum = 7
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   154
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   155
nativeNames = {loc("Leaks A Lot"), loc("Dense Cloud"), loc("Fiery Water"), 
7422
aa8a4dfe78e3 Changed name of princess in mission 6 (forgot it last time).
belphegorr <szabibibi@gmail.com>
parents: 7419
diff changeset
   156
               loc("Raging Buffalo"), loc("Righteous Beard"), loc("Fell From Grace"),
7413
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   157
               loc("Wise Oak")}
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   158
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   159
nativeUnNames = {loc("Zork"), loc("Steve"), loc("Jack"),
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   160
                 loc("Lee"), loc("Elmo"), loc("Rachel"),
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   161
                 loc("Muriel")}
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   162
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   163
nativeHats = {"Rambo", "RobinHood", "pirate_jack", "zoo_Bunny", "IndianChief",
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   164
              "tiara", "AkuAku"}
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   165
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   166
nativePos = {257, 1950}
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   167
7415
1a6a6db3fa96 Fixed localization of Mission 6 and fixed a typo.
belphegorr <szabibibi@gmail.com>
parents: 7413
diff changeset
   168
cyborgNames = {loc("Syntax Errol"), loc("Segmentation Paul"), loc("Unexpected Igor"), loc("Jeremiah")}
7413
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   169
cyborgPos = {745, 1847}
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   170
cyborgsPos = {{2937, 831}, {2945, 1264}, {2335, 1701}, {448, 484}}
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   171
cyborgsDir = {"Left", "Left", "Left", "Right"}
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   172
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   173
cratePos = {
12511
15e9ef8be44f ACF mission 6: Fix incorrect crate types (weapon vs utility)
Wuzzy <almikes@aol.com>
parents: 12510
diff changeset
   174
            {{788, 1919, amGirder, 2}, true}, {{412, 1615, amGirder, 1}, true},
15e9ef8be44f ACF mission 6: Fix incorrect crate types (weapon vs utility)
Wuzzy <almikes@aol.com>
parents: 12510
diff changeset
   175
            {{209, 1474, amSniperRifle, 1}}, {{1178, 637, amDEagle, 1}},
15e9ef8be44f ACF mission 6: Fix incorrect crate types (weapon vs utility)
Wuzzy <almikes@aol.com>
parents: 12510
diff changeset
   176
            {{633, 268, amDEagle, 1}}, {{3016, 1545, amDEagle, 1}},
15e9ef8be44f ACF mission 6: Fix incorrect crate types (weapon vs utility)
Wuzzy <almikes@aol.com>
parents: 12510
diff changeset
   177
            {{249, 1377, amRope, 3}, true}, {{330, 1018, amGirder, 1}, true},
15e9ef8be44f ACF mission 6: Fix incorrect crate types (weapon vs utility)
Wuzzy <almikes@aol.com>
parents: 12510
diff changeset
   178
            {{888, 647, amRope, 3}, true}, {{2116, 337, amRope, 3}, true},
15e9ef8be44f ACF mission 6: Fix incorrect crate types (weapon vs utility)
Wuzzy <almikes@aol.com>
parents: 12510
diff changeset
   179
            {{1779, 948, amRope, 3}, true}, {{3090, 1066, amRope, 3}, true},
15e9ef8be44f ACF mission 6: Fix incorrect crate types (weapon vs utility)
Wuzzy <almikes@aol.com>
parents: 12510
diff changeset
   180
            {{947, 480, amBazooka, 3}}, {{1097, 480, amMortar, 3}},
15e9ef8be44f ACF mission 6: Fix incorrect crate types (weapon vs utility)
Wuzzy <almikes@aol.com>
parents: 12510
diff changeset
   181
            {{1139, 451, amSnowball, 3}}, {{1207, 468, amShotgun, 3}},
15e9ef8be44f ACF mission 6: Fix incorrect crate types (weapon vs utility)
Wuzzy <almikes@aol.com>
parents: 12510
diff changeset
   182
            {{1024, 393, amSniperRifle, 2}}, {{998, 391, amDynamite, 2}},
15e9ef8be44f ACF mission 6: Fix incorrect crate types (weapon vs utility)
Wuzzy <almikes@aol.com>
parents: 12510
diff changeset
   183
            {{1024, 343, amRope, 2}, true}, {{998, 341, amRope, 2}, true},
7413
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   184
           }
7415
1a6a6db3fa96 Fixed localization of Mission 6 and fixed a typo.
belphegorr <szabibibi@gmail.com>
parents: 7413
diff changeset
   185
reactions = {loc("Yeah, take that!"), loc("Bullseye"), loc("Die, die, die!")}
7413
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   186
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   187
secondPos = {{1010, 510}, {1067, 510}}
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   188
-----------------------------Variables---------------------------------
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   189
natives = {}
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   190
native = nil
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   191
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   192
cyborgs = {}
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   193
cyborg = {}
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   194
cyborgsLeft = 0
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   195
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   196
gearDead = {}
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   197
hedgeHidden = {}
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   198
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   199
startAnim = {}
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   200
killAnim = {}
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   201
killedAnim = {}
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   202
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   203
freshDead = nil
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   204
crates = {}
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   205
cratesNum = 0
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   206
jetCrate = nil
12272
2c884bb73975 Add alternate dialogs in ACF mission 6 when killing cyborgs before collecting crates
Wuzzy <almikes@aol.com>
parents: 12271
diff changeset
   207
12510
cc146b018d14 Fix mines not working in first turn in ACF, mission 6 (bug 180)
Wuzzy <almikes@aol.com>
parents: 12509
diff changeset
   208
firstTurn = true
12272
2c884bb73975 Add alternate dialogs in ACF mission 6 when killing cyborgs before collecting crates
Wuzzy <almikes@aol.com>
parents: 12271
diff changeset
   209
cyborgsKilledBeforeCrates = false
2c884bb73975 Add alternate dialogs in ACF mission 6 when killing cyborgs before collecting crates
Wuzzy <almikes@aol.com>
parents: 12271
diff changeset
   210
cratesTaken = false
2c884bb73975 Add alternate dialogs in ACF mission 6 when killing cyborgs before collecting crates
Wuzzy <almikes@aol.com>
parents: 12271
diff changeset
   211
doneCyborgsDead = false
12798
fdb3730aa0e2 ACF6: Make sure player only gets portal gun at the portal sequence, and not a pile full of weapons and ropes
Wuzzy <Wuzzy2@mail.ru>
parents: 12794
diff changeset
   212
fdb3730aa0e2 ACF6: Make sure player only gets portal gun at the portal sequence, and not a pile full of weapons and ropes
Wuzzy <Wuzzy2@mail.ru>
parents: 12794
diff changeset
   213
annoyingGearsForPortalScene = {}
7413
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   214
-----------------------------Animations--------------------------------
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   215
function EmitDenseClouds(dir)
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   216
  local dif
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   217
  if dir == "Left" then
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   218
    dif = 10
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   219
  else
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   220
    dif = -10
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   221
  end
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   222
  AnimInsertStepNext({func = AnimVisualGear, args = {native, GetX(native) + dif, GetY(native) + dif, vgtSteam, 0, true}, swh = false})
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   223
  AnimInsertStepNext({func = AnimVisualGear, args = {native, GetX(native) + dif, GetY(native) + dif, vgtSteam, 0, true}, swh = false})
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   224
  AnimInsertStepNext({func = AnimVisualGear, args = {native, GetX(native) + dif, GetY(native) + dif, vgtSteam, 0, true}, swh = false})
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   225
  AnimInsertStepNext({func = AnimWait, args = {native, 800}})
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   226
  AnimInsertStepNext({func = AnimVisualGear, args = {native, GetX(native) + dif, GetY(native) + dif, vgtSteam, 0, true}, swh = false})
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   227
  AnimInsertStepNext({func = AnimVisualGear, args = {native, GetX(native) + dif, GetY(native) + dif, vgtSteam, 0, true}, swh = false})
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   228
  AnimInsertStepNext({func = AnimWait, args = {native, 800}})
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   229
  AnimInsertStepNext({func = AnimVisualGear, args = {native, GetX(native) + dif, GetY(native) + dif, vgtSteam, 0, true}, swh = false})
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   230
end
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   231
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   232
function AnimationSetup()
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   233
  startAnim = {}
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   234
  local m = m5DeployedNum
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   235
  table.insert(startAnim, {func = AnimWait, args = {native, 3000}})
12263
2c8e7e73ef58 Use format strings everywhere in A Classic Fairytale (for translators)
Wuzzy <almikes@aol.com>
parents: 12262
diff changeset
   236
  table.insert(startAnim, {func = AnimCaption, args = {native, string.format(loc("With the rest of the tribe gone, it was up to %s to save the village."), nativeNames[m5DeployedNum]), 5000}})
7415
1a6a6db3fa96 Fixed localization of Mission 6 and fixed a typo.
belphegorr <szabibibi@gmail.com>
parents: 7413
diff changeset
   237
  table.insert(startAnim, {func = AnimCaption, args = {native, loc("But it proved to be no easy task!"), 2000}})
7413
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   238
  for i = 1, 4 do
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   239
    table.insert(startAnim, {func = FollowGear, swh = false, args = {cyborgs[i]}})
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   240
    table.insert(startAnim, {func = AnimWait, args = {native, 1000}})
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   241
  end
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   242
  table.insert(startAnim, {func = FollowGear, swh = false, args = {native}})
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   243
  if m == leaksNum then
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   244
    table.insert(startAnim, {func = AnimMove, args = {native, "Right", nativePos[1] + 50, 0}})
7415
1a6a6db3fa96 Fixed localization of Mission 6 and fixed a typo.
belphegorr <szabibibi@gmail.com>
parents: 7413
diff changeset
   245
    table.insert(startAnim, {func = AnimSay, args = {native, loc("What a strange cave!"), SAY_THINK, 0}})
7413
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   246
    table.insert(startAnim, {func = AnimMove, args = {native, "Right", nativePos[1] + 200, 0}})
7415
1a6a6db3fa96 Fixed localization of Mission 6 and fixed a typo.
belphegorr <szabibibi@gmail.com>
parents: 7413
diff changeset
   247
    table.insert(startAnim, {func = AnimSay, args = {native, loc("Now how do I get on the other side?!"), SAY_THINK, 5500}})
7413
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   248
  elseif m == denseNum then
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   249
    table.insert(startAnim, {func = AnimMove, args = {native, "Right", nativePos[1] + 50, 0}})
7415
1a6a6db3fa96 Fixed localization of Mission 6 and fixed a typo.
belphegorr <szabibibi@gmail.com>
parents: 7413
diff changeset
   250
    table.insert(startAnim, {func = AnimSay, args = {native, loc("Dude, what's this place?!"), SAY_THINK, 0}})
7413
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   251
    table.insert(startAnim, {func = AnimCustomFunction, args = {native, EmitDenseClouds, {"Right"}}})
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   252
    table.insert(startAnim, {func = AnimMove, args = {native, "Right", nativePos[1] + 200, 0}})
7415
1a6a6db3fa96 Fixed localization of Mission 6 and fixed a typo.
belphegorr <szabibibi@gmail.com>
parents: 7413
diff changeset
   253
    table.insert(startAnim, {func = AnimSay, args = {native, loc("And where's all the weed?"), SAY_THINK, 4000}})
7413
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   254
  elseif m == waterNum then
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   255
    table.insert(startAnim, {func = AnimMove, args = {native, "Right", nativePos[1] + 50, 0}})
7415
1a6a6db3fa96 Fixed localization of Mission 6 and fixed a typo.
belphegorr <szabibibi@gmail.com>
parents: 7413
diff changeset
   256
    table.insert(startAnim, {func = AnimSay, args = {native, loc("Is this place in my head?"), SAY_THINK, 0}})
7413
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   257
    table.insert(startAnim, {func = AnimMove, args = {native, "Right", nativePos[1] + 200, 0}})
7415
1a6a6db3fa96 Fixed localization of Mission 6 and fixed a typo.
belphegorr <szabibibi@gmail.com>
parents: 7413
diff changeset
   258
    table.insert(startAnim, {func = AnimSay, args = {native, loc("I shouldn't have drunk that last pint."), SAY_THINK, 6000}})
7413
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   259
  elseif m == buffaloNum then
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   260
    table.insert(startAnim, {func = AnimMove, args = {native, "Right", nativePos[1] + 50, 0}})
7415
1a6a6db3fa96 Fixed localization of Mission 6 and fixed a typo.
belphegorr <szabibibi@gmail.com>
parents: 7413
diff changeset
   261
    table.insert(startAnim, {func = AnimSay, args = {native, loc("Where did that alien run?"), SAY_THINK, 0}})
7413
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   262
    table.insert(startAnim, {func = AnimMove, args = {native, "Right", nativePos[1] + 200, 0}})
7415
1a6a6db3fa96 Fixed localization of Mission 6 and fixed a typo.
belphegorr <szabibibi@gmail.com>
parents: 7413
diff changeset
   263
    table.insert(startAnim, {func = AnimSay, args = {native, loc("When I find it..."), SAY_THINK, 3000}})
7417
2520705b857f Switched Fell From Heaven to Fell From Grace on missions 5, 6.
belphegorr <szabibibi@gmail.com>
parents: 7415
diff changeset
   264
  elseif m == girlNum then
7413
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   265
    table.insert(startAnim, {func = AnimMove, args = {native, "Right", nativePos[1] + 50, 0}})
7417
2520705b857f Switched Fell From Heaven to Fell From Grace on missions 5, 6.
belphegorr <szabibibi@gmail.com>
parents: 7415
diff changeset
   266
    table.insert(startAnim, {func = AnimSay, args = {native, loc("This is typical!"), SAY_THINK, 0}})
7413
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   267
    table.insert(startAnim, {func = AnimMove, args = {native, "Right", nativePos[1] + 200, 0}})
7417
2520705b857f Switched Fell From Heaven to Fell From Grace on missions 5, 6.
belphegorr <szabibibi@gmail.com>
parents: 7415
diff changeset
   268
    table.insert(startAnim, {func = AnimSay, args = {native, loc("It's always up to women to clear up the mess men created!"), SAY_THINK, 8500}})
7413
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   269
  elseif m == chiefNum then
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   270
    table.insert(startAnim, {func = AnimMove, args = {native, "Right", nativePos[1] + 50, 0}})
7415
1a6a6db3fa96 Fixed localization of Mission 6 and fixed a typo.
belphegorr <szabibibi@gmail.com>
parents: 7413
diff changeset
   271
    table.insert(startAnim, {func = AnimSay, args = {native, loc("What is this place?"), SAY_THINK, 0}})
7413
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   272
    table.insert(startAnim, {func = AnimMove, args = {native, "Right", nativePos[1] + 200, 0}})
7415
1a6a6db3fa96 Fixed localization of Mission 6 and fixed a typo.
belphegorr <szabibibi@gmail.com>
parents: 7413
diff changeset
   273
    table.insert(startAnim, {func = AnimSay, args = {native, loc("It doesn't matter. I won't let that alien hurt my daughter!"), SAY_THINK, 8500}})
7413
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   274
  elseif m == wiseNum then
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   275
    table.insert(startAnim, {func = AnimMove, args = {native, "Right", nativePos[1] + 50, 0}})
7415
1a6a6db3fa96 Fixed localization of Mission 6 and fixed a typo.
belphegorr <szabibibi@gmail.com>
parents: 7413
diff changeset
   276
    table.insert(startAnim, {func = AnimSay, args = {native, loc("Every single time!"), SAY_THINK, 0}})
7413
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   277
    table.insert(startAnim, {func = AnimMove, args = {native, "Right", nativePos[1] + 200, 0}})
7415
1a6a6db3fa96 Fixed localization of Mission 6 and fixed a typo.
belphegorr <szabibibi@gmail.com>
parents: 7413
diff changeset
   278
    table.insert(startAnim, {func = AnimSay, args = {native, loc("How come in a village full of warriors, it's up to me to save it?"), SAY_THINK, 8500}})
7413
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   279
  end
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   280
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   281
  table.insert(startAnim, {func = AnimCustomFunction, args = {native, RestoreHedge, {cyborg, unpack(cyborgPos)}}})
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   282
  table.insert(startAnim, {func = AnimOutOfNowhere, args = {cyborg, unpack(cyborgPos)}})
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   283
  table.insert(startAnim, {func = AnimTurn, args = {cyborg, "Left"}})
12263
2c8e7e73ef58 Use format strings everywhere in A Classic Fairytale (for translators)
Wuzzy <almikes@aol.com>
parents: 12262
diff changeset
   284
  table.insert(startAnim, {func = AnimSay, args = {cyborg, string.format(loc("Greetings, %s!"), nativeUnNames[m]), SAY_SAY, 2500}})
7415
1a6a6db3fa96 Fixed localization of Mission 6 and fixed a typo.
belphegorr <szabibibi@gmail.com>
parents: 7413
diff changeset
   285
  table.insert(startAnim, {func = AnimSay, args = {cyborg, loc("As you can see, there is no way to get on the other side!"), SAY_SAY, 7000}})
12263
2c8e7e73ef58 Use format strings everywhere in A Classic Fairytale (for translators)
Wuzzy <almikes@aol.com>
parents: 12262
diff changeset
   286
  table.insert(startAnim, {func = AnimSay, args = {cyborg, string.format(loc("I wish to help you, %s!"), nativeUnNames[m]), SAY_SAY, 4000}})
7415
1a6a6db3fa96 Fixed localization of Mission 6 and fixed a typo.
belphegorr <szabibibi@gmail.com>
parents: 7413
diff changeset
   287
  table.insert(startAnim, {func = AnimSay, args = {cyborg, loc("Beware, though! If you are slow, you die!"), SAY_SAY, 7000}})
7413
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   288
  table.insert(startAnim, {func = AnimDisappear, args = {cyborg, unpack(cyborgPos)}})
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   289
  table.insert(startAnim, {func = AnimSwitchHog, args = {native}})
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   290
  table.insert(startAnim, {func = AnimCustomFunction, args = {native, HideHedge, {cyborg}}})
7415
1a6a6db3fa96 Fixed localization of Mission 6 and fixed a typo.
belphegorr <szabibibi@gmail.com>
parents: 7413
diff changeset
   291
  table.insert(startAnim, {func = AnimSay, args = {native, loc("Talk about mixed signals..."), SAY_SAY, 4000}})
7413
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   292
  AddSkipFunction(startAnim, SkipStartAnim, {})
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   293
end
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   294
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   295
function SetupKillAnim()
7415
1a6a6db3fa96 Fixed localization of Mission 6 and fixed a typo.
belphegorr <szabibibi@gmail.com>
parents: 7413
diff changeset
   296
  table.insert(killAnim, {func = AnimSay, args = {native, loc("Well, that was a waste of time."), SAY_THINK, 5000}})
7413
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   297
  table.insert(killAnim, {func = AnimCustomFunction, args = {native, RestoreHedge, {cyborg, unpack(cyborgPos)}}})
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   298
  table.insert(killAnim, {func = AnimOutOfNowhere, args = {cyborg, unpack(cyborgPos)}})
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   299
  table.insert(killAnim, {func = AnimCustomFunction, args = {cyborg, CondNeedToTurn, {cyborg, native}}})
12263
2c8e7e73ef58 Use format strings everywhere in A Classic Fairytale (for translators)
Wuzzy <almikes@aol.com>
parents: 12262
diff changeset
   300
  table.insert(killAnim, {func = AnimSay, args = {cyborg, string.format(loc("You bear impressive skills, %s!"), nativeUnNames[m5DeployedNum]), SAY_SHOUT, 4000}})
12272
2c884bb73975 Add alternate dialogs in ACF mission 6 when killing cyborgs before collecting crates
Wuzzy <almikes@aol.com>
parents: 12271
diff changeset
   301
  if CheckCyborgsDead() then
2c884bb73975 Add alternate dialogs in ACF mission 6 when killing cyborgs before collecting crates
Wuzzy <almikes@aol.com>
parents: 12271
diff changeset
   302
    table.insert(killAnim, {func = AnimSay, args = {cyborg, loc("I see you already took care of your enemies."), SAY_SHOUT, 7000}})
2c884bb73975 Add alternate dialogs in ACF mission 6 when killing cyborgs before collecting crates
Wuzzy <almikes@aol.com>
parents: 12271
diff changeset
   303
    table.insert(killAnim, {func = AnimSay, args = {cyborg, loc("Those were scheduled for disposal anyway."), SAY_SHOUT, 4000}})
2c884bb73975 Add alternate dialogs in ACF mission 6 when killing cyborgs before collecting crates
Wuzzy <almikes@aol.com>
parents: 12271
diff changeset
   304
    table.insert(killAnim, {func = AnimSay, args = {cyborg, loc("So you basically did the dirty work for us."), SAY_SHOUT, 4000}})
2c884bb73975 Add alternate dialogs in ACF mission 6 when killing cyborgs before collecting crates
Wuzzy <almikes@aol.com>
parents: 12271
diff changeset
   305
    cyborgsKilledBeforeCrates = true
2c884bb73975 Add alternate dialogs in ACF mission 6 when killing cyborgs before collecting crates
Wuzzy <almikes@aol.com>
parents: 12271
diff changeset
   306
  else
2c884bb73975 Add alternate dialogs in ACF mission 6 when killing cyborgs before collecting crates
Wuzzy <almikes@aol.com>
parents: 12271
diff changeset
   307
    table.insert(killAnim, {func = AnimSay, args = {cyborg, loc("However, my mates don't agree with me on letting you go..."), SAY_SHOUT, 7000}})
2c884bb73975 Add alternate dialogs in ACF mission 6 when killing cyborgs before collecting crates
Wuzzy <almikes@aol.com>
parents: 12271
diff changeset
   308
    table.insert(killAnim, {func = AnimSay, args = {cyborg, loc("I guess you'll have to kill them."), SAY_SHOUT, 4000}})
2c884bb73975 Add alternate dialogs in ACF mission 6 when killing cyborgs before collecting crates
Wuzzy <almikes@aol.com>
parents: 12271
diff changeset
   309
  end
7413
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   310
  table.insert(killAnim, {func = AnimDisappear, args = {cyborg, unpack(cyborgPos)}})
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   311
  table.insert(killAnim, {func = AnimSwitchHog, args = {native}})
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   312
  table.insert(killAnim, {func = AnimWait, args = {native, 1}})
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   313
  table.insert(killAnim, {func = AnimCustomFunction, args = {native, HideHedge, {cyborg}}})
12272
2c884bb73975 Add alternate dialogs in ACF mission 6 when killing cyborgs before collecting crates
Wuzzy <almikes@aol.com>
parents: 12271
diff changeset
   314
2c884bb73975 Add alternate dialogs in ACF mission 6 when killing cyborgs before collecting crates
Wuzzy <almikes@aol.com>
parents: 12271
diff changeset
   315
  local function checkCyborgsAgain()
2c884bb73975 Add alternate dialogs in ACF mission 6 when killing cyborgs before collecting crates
Wuzzy <almikes@aol.com>
parents: 12271
diff changeset
   316
     if CheckCyborgsDead() then
2c884bb73975 Add alternate dialogs in ACF mission 6 when killing cyborgs before collecting crates
Wuzzy <almikes@aol.com>
parents: 12271
diff changeset
   317
        DoCyborgsDead()
2c884bb73975 Add alternate dialogs in ACF mission 6 when killing cyborgs before collecting crates
Wuzzy <almikes@aol.com>
parents: 12271
diff changeset
   318
     end
2c884bb73975 Add alternate dialogs in ACF mission 6 when killing cyborgs before collecting crates
Wuzzy <almikes@aol.com>
parents: 12271
diff changeset
   319
  end
2c884bb73975 Add alternate dialogs in ACF mission 6 when killing cyborgs before collecting crates
Wuzzy <almikes@aol.com>
parents: 12271
diff changeset
   320
  table.insert(killAnim, {func = AnimCustomFunction, args = {native, checkCyborgsAgain, {}}})
2c884bb73975 Add alternate dialogs in ACF mission 6 when killing cyborgs before collecting crates
Wuzzy <almikes@aol.com>
parents: 12271
diff changeset
   321
7413
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   322
  AddSkipFunction(killAnim, SkipKillAnim, {})
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   323
end
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   324
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   325
function SetupKilledAnim()
7428
4cc8398384e6 Mission 6: Fixed a typo, an animation bug, added 2 rope crates to the weapon stack
belphegorr <szabibibi@gmail.com>
parents: 7422
diff changeset
   326
  table.insert(killedAnim, {func = AnimWait, args = {cyborg, 500}})
7413
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   327
  table.insert(killedAnim, {func = AnimOutOfNowhere, args = {cyborg, unpack(secondPos[2])}})
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   328
  table.insert(killedAnim, {func = AnimOutOfNowhere, args = {native, unpack(secondPos[1])}})
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   329
  table.insert(killedAnim, {func = AnimCustomFunction, args = {cyborg, CondNeedToTurn, {cyborg, native}}})
12272
2c884bb73975 Add alternate dialogs in ACF mission 6 when killing cyborgs before collecting crates
Wuzzy <almikes@aol.com>
parents: 12271
diff changeset
   330
  if not cyborgsKilledBeforeCrates then
2c884bb73975 Add alternate dialogs in ACF mission 6 when killing cyborgs before collecting crates
Wuzzy <almikes@aol.com>
parents: 12271
diff changeset
   331
    table.insert(killedAnim, {func = AnimSay, args = {cyborg, string.format(loc("Nice work, %s!"), nativeUnNames[m5DeployedNum]), SAY_SHOUT, 4000}})
2c884bb73975 Add alternate dialogs in ACF mission 6 when killing cyborgs before collecting crates
Wuzzy <almikes@aol.com>
parents: 12271
diff changeset
   332
  end
7415
1a6a6db3fa96 Fixed localization of Mission 6 and fixed a typo.
belphegorr <szabibibi@gmail.com>
parents: 7413
diff changeset
   333
  table.insert(killedAnim, {func = AnimSay, args = {cyborg, loc("As a reward for your performance, here's some new technology!"), SAY_SHOUT, 8000}})
7431
fee9ae17c007 Mission 6: Modified a dialogue timing
belphegorr <szabibibi@gmail.com>
parents: 7428
diff changeset
   334
  table.insert(killedAnim, {func = AnimSay, args = {cyborg, loc("Use it wisely!"), SAY_SHOUT, 3000}})
7413
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   335
  table.insert(killedAnim, {func = AnimDisappear, args = {cyborg, unpack(secondPos[2])}})
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   336
  table.insert(killedAnim, {func = AnimSwitchHog, args = {native}})
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   337
  AddSkipFunction(killedAnim, SkipKilledAnim, {})
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   338
end
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   339
--------------------------Anim skip functions--------------------------
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   340
function SkipStartAnim()
12625
52ed732cf494 ACF6: Set correct position of native after skipping
Wuzzy <almikes@aol.com>
parents: 12555
diff changeset
   341
  AnimSetGearPosition(native, 457, 1955)
7413
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   342
  AnimSwitchHog(native)
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   343
  AnimWait(native, 1)
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   344
  AddFunction({func = HideHedge, args = {cyborg}})
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   345
end
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   346
12511
15e9ef8be44f ACF mission 6: Fix incorrect crate types (weapon vs utility)
Wuzzy <almikes@aol.com>
parents: 12510
diff changeset
   347
function SpawnCrateByID(id)
15e9ef8be44f ACF mission 6: Fix incorrect crate types (weapon vs utility)
Wuzzy <almikes@aol.com>
parents: 12510
diff changeset
   348
    if cratePos[id][2] == true then
12933
e65aa3c3d4e6 Refactor scripts to use SpawnSupplyCrate (where it makes sense)
Wuzzy <Wuzzy2@mail.ru>
parents: 12901
diff changeset
   349
       crates[id] = SpawnSupplyCrate(unpack(cratePos[id][1]))
12511
15e9ef8be44f ACF mission 6: Fix incorrect crate types (weapon vs utility)
Wuzzy <almikes@aol.com>
parents: 12510
diff changeset
   350
    else
12933
e65aa3c3d4e6 Refactor scripts to use SpawnSupplyCrate (where it makes sense)
Wuzzy <Wuzzy2@mail.ru>
parents: 12901
diff changeset
   351
       crates[id] = SpawnSupplyCrate(unpack(cratePos[id][1]))
12511
15e9ef8be44f ACF mission 6: Fix incorrect crate types (weapon vs utility)
Wuzzy <almikes@aol.com>
parents: 12510
diff changeset
   352
    end
15e9ef8be44f ACF mission 6: Fix incorrect crate types (weapon vs utility)
Wuzzy <almikes@aol.com>
parents: 12510
diff changeset
   353
    return crates[id]
15e9ef8be44f ACF mission 6: Fix incorrect crate types (weapon vs utility)
Wuzzy <almikes@aol.com>
parents: 12510
diff changeset
   354
end
15e9ef8be44f ACF mission 6: Fix incorrect crate types (weapon vs utility)
Wuzzy <almikes@aol.com>
parents: 12510
diff changeset
   355
7413
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   356
function AfterStartAnim()
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   357
  SetGearMessage(native, 0)
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   358
  cratesNum = 0
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   359
  for i = 1, 6 do
12511
15e9ef8be44f ACF mission 6: Fix incorrect crate types (weapon vs utility)
Wuzzy <almikes@aol.com>
parents: 12510
diff changeset
   360
    SpawnCrateByID(i)
7413
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   361
    cratesNum = cratesNum + 1
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   362
  end
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   363
  FollowGear(native)
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   364
  AddNewEvent(CheckGearsDead, {{crates[1], crates[2]}}, PutCrates, {2}, 0) 
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   365
  TurnTimeLeft = TurnTime
12508
071d1d699f27 ACF, mission 6: Fix messages, now they imply that destroying crates is also OK
Wuzzy <almikes@aol.com>
parents: 12273
diff changeset
   366
  ShowMission(loc("Dragon's Lair"), loc("Obstacle course"), loc("In order to get to the other side, you need to get rid of the crates first.") .. "|" ..
071d1d699f27 ACF, mission 6: Fix messages, now they imply that destroying crates is also OK
Wuzzy <almikes@aol.com>
parents: 12273
diff changeset
   367
                                                  loc("As the ammo is sparse, you might want to reuse ropes while mid-air.") .. "|" ..
071d1d699f27 ACF, mission 6: Fix messages, now they imply that destroying crates is also OK
Wuzzy <almikes@aol.com>
parents: 12273
diff changeset
   368
                                                  loc("The enemy can't move but it might be a good idea to stay out of sight!") .. "|" ..
12269
401cf7a7f870 Show mines timer in ACF, Dragon's Lair
Wuzzy <almikes@aol.com>
parents: 12263
diff changeset
   369
                                                  loc("Mines time: 5 seconds"), 1, 0)
7413
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   370
end
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   371
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   372
function SkipKillAnim()
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   373
  AnimSwitchHog(native)
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   374
  AnimWait(native, 1)
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   375
  AddFunction({func = HideHedge, args = {cyborg}})
12798
fdb3730aa0e2 ACF6: Make sure player only gets portal gun at the portal sequence, and not a pile full of weapons and ropes
Wuzzy <Wuzzy2@mail.ru>
parents: 12794
diff changeset
   376
  if CheckCyborgsDead() then
fdb3730aa0e2 ACF6: Make sure player only gets portal gun at the portal sequence, and not a pile full of weapons and ropes
Wuzzy <Wuzzy2@mail.ru>
parents: 12794
diff changeset
   377
    DoCyborgsDead()
fdb3730aa0e2 ACF6: Make sure player only gets portal gun at the portal sequence, and not a pile full of weapons and ropes
Wuzzy <Wuzzy2@mail.ru>
parents: 12794
diff changeset
   378
  end
7413
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   379
end
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   380
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   381
function AfterKillAnim()
12798
fdb3730aa0e2 ACF6: Make sure player only gets portal gun at the portal sequence, and not a pile full of weapons and ropes
Wuzzy <Wuzzy2@mail.ru>
parents: 12794
diff changeset
   382
  if not cyborgsKilledBeforeCrates then
fdb3730aa0e2 ACF6: Make sure player only gets portal gun at the portal sequence, and not a pile full of weapons and ropes
Wuzzy <Wuzzy2@mail.ru>
parents: 12794
diff changeset
   383
    PutWeaponCrates()
fdb3730aa0e2 ACF6: Make sure player only gets portal gun at the portal sequence, and not a pile full of weapons and ropes
Wuzzy <Wuzzy2@mail.ru>
parents: 12794
diff changeset
   384
    TurnTimeLeft = TurnTime
fdb3730aa0e2 ACF6: Make sure player only gets portal gun at the portal sequence, and not a pile full of weapons and ropes
Wuzzy <Wuzzy2@mail.ru>
parents: 12794
diff changeset
   385
    AddEvent(CheckCyborgsDead, {}, DoCyborgsDead, {}, 0)
fdb3730aa0e2 ACF6: Make sure player only gets portal gun at the portal sequence, and not a pile full of weapons and ropes
Wuzzy <Wuzzy2@mail.ru>
parents: 12794
diff changeset
   386
    ShowMission(loc("Dragon's Lair"), loc("The Slaughter"), loc("Kill the aliens!").."|"..loc("Mines time: 5 seconds"), 1, 2000)
fdb3730aa0e2 ACF6: Make sure player only gets portal gun at the portal sequence, and not a pile full of weapons and ropes
Wuzzy <Wuzzy2@mail.ru>
parents: 12794
diff changeset
   387
  end
7413
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   388
end
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   389
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   390
function SkipKilledAnim()
7448
d0521a3a4358 Solved "floating repositionings" in every mission
belphegorr <szabibibi@gmail.com>
parents: 7431
diff changeset
   391
  AnimSetGearPosition(native, unpack(secondPos[1]))
7413
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   392
  AnimSwitchHog(native)
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   393
  AnimWait(native, 1)
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   394
end
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   395
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   396
function AfterKilledAnim()
12798
fdb3730aa0e2 ACF6: Make sure player only gets portal gun at the portal sequence, and not a pile full of weapons and ropes
Wuzzy <Wuzzy2@mail.ru>
parents: 12794
diff changeset
   397
  -- Final mission segment with the portal gun
7413
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   398
  HideHedge(cyborg)
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   399
  TurnTimeLeft = TurnTime
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   400
  SetGearMessage(native, 0)
12933
e65aa3c3d4e6 Refactor scripts to use SpawnSupplyCrate (where it makes sense)
Wuzzy <Wuzzy2@mail.ru>
parents: 12901
diff changeset
   401
  SpawnSupplyCrate(1184, 399, amPortalGun, 100)
e65aa3c3d4e6 Refactor scripts to use SpawnSupplyCrate (where it makes sense)
Wuzzy <Wuzzy2@mail.ru>
parents: 12901
diff changeset
   402
  SpawnSupplyCrate(2259, 755, amTeleport, 2)
12798
fdb3730aa0e2 ACF6: Make sure player only gets portal gun at the portal sequence, and not a pile full of weapons and ropes
Wuzzy <Wuzzy2@mail.ru>
parents: 12794
diff changeset
   403
  SpawnHealthCrate(secondPos[1][1] + 50, secondPos[1][2] - 20)
7415
1a6a6db3fa96 Fixed localization of Mission 6 and fixed a typo.
belphegorr <szabibibi@gmail.com>
parents: 7413
diff changeset
   404
  ShowMission(loc("Dragon's Lair"), loc("The what?!"), loc("Use the portal gun to get to the next crate, then use the new gun to get to the final destination!|")..
12901
bdf8e80a97b8 Fix some minor formatting and grammar flaws in script strings
Wuzzy <Wuzzy2@mail.ru>
parents: 12798
diff changeset
   405
                                             loc("Portal hint: One goes to the destination, the other one is the entrance.|")..
bdf8e80a97b8 Fix some minor formatting and grammar flaws in script strings
Wuzzy <Wuzzy2@mail.ru>
parents: 12798
diff changeset
   406
                                             loc("Teleport hint: Just use the mouse to select the destination!").."|"..
12798
fdb3730aa0e2 ACF6: Make sure player only gets portal gun at the portal sequence, and not a pile full of weapons and ropes
Wuzzy <Wuzzy2@mail.ru>
parents: 12794
diff changeset
   407
                                             loc("Mines time: 5 seconds"), 1, 8000)
7413
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   408
end
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   409
-----------------------------Events------------------------------------
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   410
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   411
function CheckCyborgsDead()
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   412
  return cyborgsLeft == 0
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   413
end
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   414
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   415
function NullifyAmmo()
12798
fdb3730aa0e2 ACF6: Make sure player only gets portal gun at the portal sequence, and not a pile full of weapons and ropes
Wuzzy <Wuzzy2@mail.ru>
parents: 12794
diff changeset
   416
  -- Clear the ammo and delete all inappropirate gears on the long platform for the portal scene
7413
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   417
  AddAmmo(native, amRope, 0)
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   418
  AddAmmo(native, amGirder, 0)
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   419
  AddAmmo(native, amLowGravity, 0)
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   420
  AddAmmo(native, amBazooka, 0)
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   421
  AddAmmo(native, amSniperRifle, 0)
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   422
  AddAmmo(native, amDEagle, 0)
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   423
  AddAmmo(native, amDynamite, 0)
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   424
  AddAmmo(native, amFirePunch, 0)
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   425
  AddAmmo(native, amBaseballBat, 0)
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   426
  AddAmmo(native, amMortar, 0)
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   427
  AddAmmo(native, amSnowball, 0)
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   428
  AddAmmo(native, amShotgun, 0)
12798
fdb3730aa0e2 ACF6: Make sure player only gets portal gun at the portal sequence, and not a pile full of weapons and ropes
Wuzzy <Wuzzy2@mail.ru>
parents: 12794
diff changeset
   429
fdb3730aa0e2 ACF6: Make sure player only gets portal gun at the portal sequence, and not a pile full of weapons and ropes
Wuzzy <Wuzzy2@mail.ru>
parents: 12794
diff changeset
   430
  for i=1, #annoyingGearsForPortalScene do
fdb3730aa0e2 ACF6: Make sure player only gets portal gun at the portal sequence, and not a pile full of weapons and ropes
Wuzzy <Wuzzy2@mail.ru>
parents: 12794
diff changeset
   431
    local gear = annoyingGearsForPortalScene[i]
fdb3730aa0e2 ACF6: Make sure player only gets portal gun at the portal sequence, and not a pile full of weapons and ropes
Wuzzy <Wuzzy2@mail.ru>
parents: 12794
diff changeset
   432
    if not gearDead[gear] and GetY(gear) > 100 and GetY(gear) < 571 and GetX(gear) > 840 and GetX(gear) < 1550 then
fdb3730aa0e2 ACF6: Make sure player only gets portal gun at the portal sequence, and not a pile full of weapons and ropes
Wuzzy <Wuzzy2@mail.ru>
parents: 12794
diff changeset
   433
      DeleteGear(annoyingGearsForPortalScene[i])
fdb3730aa0e2 ACF6: Make sure player only gets portal gun at the portal sequence, and not a pile full of weapons and ropes
Wuzzy <Wuzzy2@mail.ru>
parents: 12794
diff changeset
   434
    end
fdb3730aa0e2 ACF6: Make sure player only gets portal gun at the portal sequence, and not a pile full of weapons and ropes
Wuzzy <Wuzzy2@mail.ru>
parents: 12794
diff changeset
   435
  end
7413
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   436
end
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   437
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   438
function DoCyborgsDead()
12272
2c884bb73975 Add alternate dialogs in ACF mission 6 when killing cyborgs before collecting crates
Wuzzy <almikes@aol.com>
parents: 12271
diff changeset
   439
  if cratesTaken and not doneCyborgsDead then
2c884bb73975 Add alternate dialogs in ACF mission 6 when killing cyborgs before collecting crates
Wuzzy <almikes@aol.com>
parents: 12271
diff changeset
   440
    NullifyAmmo()
2c884bb73975 Add alternate dialogs in ACF mission 6 when killing cyborgs before collecting crates
Wuzzy <almikes@aol.com>
parents: 12271
diff changeset
   441
    RestoreHedge(cyborg)
2c884bb73975 Add alternate dialogs in ACF mission 6 when killing cyborgs before collecting crates
Wuzzy <almikes@aol.com>
parents: 12271
diff changeset
   442
    SetupKilledAnim()
2c884bb73975 Add alternate dialogs in ACF mission 6 when killing cyborgs before collecting crates
Wuzzy <almikes@aol.com>
parents: 12271
diff changeset
   443
    SetGearMessage(CurrentHedgehog, 0)
2c884bb73975 Add alternate dialogs in ACF mission 6 when killing cyborgs before collecting crates
Wuzzy <almikes@aol.com>
parents: 12271
diff changeset
   444
    AddAnim(killedAnim)
2c884bb73975 Add alternate dialogs in ACF mission 6 when killing cyborgs before collecting crates
Wuzzy <almikes@aol.com>
parents: 12271
diff changeset
   445
    AddFunction({func = AfterKilledAnim, args = {}})
2c884bb73975 Add alternate dialogs in ACF mission 6 when killing cyborgs before collecting crates
Wuzzy <almikes@aol.com>
parents: 12271
diff changeset
   446
    doneCyborgsDead = true
2c884bb73975 Add alternate dialogs in ACF mission 6 when killing cyborgs before collecting crates
Wuzzy <almikes@aol.com>
parents: 12271
diff changeset
   447
  end
7413
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   448
end
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   449
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   450
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   451
function PutWeaponCrates()
7428
4cc8398384e6 Mission 6: Fixed a typo, an animation bug, added 2 rope crates to the weapon stack
belphegorr <szabibibi@gmail.com>
parents: 7422
diff changeset
   452
  for i = 1, 8 do
7413
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   453
    cratesNum = cratesNum + 1
12511
15e9ef8be44f ACF mission 6: Fix incorrect crate types (weapon vs utility)
Wuzzy <almikes@aol.com>
parents: 12510
diff changeset
   454
    SpawnCrateByID(cratesNum)
7413
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   455
  end
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   456
  FollowGear(native)
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   457
end
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   458
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   459
function DoCratesTaken()
12272
2c884bb73975 Add alternate dialogs in ACF mission 6 when killing cyborgs before collecting crates
Wuzzy <almikes@aol.com>
parents: 12271
diff changeset
   460
  cratesTaken = true
7413
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   461
  SetupKillAnim()
7448
d0521a3a4358 Solved "floating repositionings" in every mission
belphegorr <szabibibi@gmail.com>
parents: 7431
diff changeset
   462
  SetGearMessage(CurrentHedgehog, 0)
7413
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   463
  AddAnim(killAnim)
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   464
  AddFunction({func = AfterKillAnim, args = {}})
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   465
end
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   466
12548
933aee9786c3 ACF6: Fix error message spam when falling into water when took last rope crate w/o touching ground
Wuzzy <almikes@aol.com>
parents: 12511
diff changeset
   467
function CheckPutCrates(gear)
933aee9786c3 ACF6: Fix error message spam when falling into water when took last rope crate w/o touching ground
Wuzzy <almikes@aol.com>
parents: 12511
diff changeset
   468
  if gear and GetHealth(gear) then
933aee9786c3 ACF6: Fix error message spam when falling into water when took last rope crate w/o touching ground
Wuzzy <almikes@aol.com>
parents: 12511
diff changeset
   469
    return StoppedGear(gear)
933aee9786c3 ACF6: Fix error message spam when falling into water when took last rope crate w/o touching ground
Wuzzy <almikes@aol.com>
parents: 12511
diff changeset
   470
  else
933aee9786c3 ACF6: Fix error message spam when falling into water when took last rope crate w/o touching ground
Wuzzy <almikes@aol.com>
parents: 12511
diff changeset
   471
    return false
933aee9786c3 ACF6: Fix error message spam when falling into water when took last rope crate w/o touching ground
Wuzzy <almikes@aol.com>
parents: 12511
diff changeset
   472
  end
933aee9786c3 ACF6: Fix error message spam when falling into water when took last rope crate w/o touching ground
Wuzzy <almikes@aol.com>
parents: 12511
diff changeset
   473
end
933aee9786c3 ACF6: Fix error message spam when falling into water when took last rope crate w/o touching ground
Wuzzy <almikes@aol.com>
parents: 12511
diff changeset
   474
7413
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   475
function PutCrates(index)
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   476
  if index <= 7 then
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   477
    cratesNum = cratesNum + 1
12511
15e9ef8be44f ACF mission 6: Fix incorrect crate types (weapon vs utility)
Wuzzy <almikes@aol.com>
parents: 12510
diff changeset
   478
    SpawnCrateByID(cratesNum)
7413
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   479
    AddNewEvent(CheckGearDead, {crates[cratesNum]}, PutCrates, {index + 1}, 0)
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   480
    FollowGear(native)
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   481
  else
12548
933aee9786c3 ACF6: Fix error message spam when falling into water when took last rope crate w/o touching ground
Wuzzy <almikes@aol.com>
parents: 12511
diff changeset
   482
    AddEvent(CheckPutCrates, {native}, DoCratesTaken, {}, 0)
7413
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   483
  end
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   484
  if index == 4 then
7415
1a6a6db3fa96 Fixed localization of Mission 6 and fixed a typo.
belphegorr <szabibibi@gmail.com>
parents: 7413
diff changeset
   485
    AnimSay(native, loc("I'm a ninja."), SAY_THINK, 0)
7413
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   486
  end
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   487
end
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   488
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   489
function CheckMissionFinished()
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   490
  return gearDead[jetCrate] == true
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   491
end
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   492
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   493
function DoMissionFinished()
7415
1a6a6db3fa96 Fixed localization of Mission 6 and fixed a typo.
belphegorr <szabibibi@gmail.com>
parents: 7413
diff changeset
   494
  AddCaption(loc("Salvation was one step closer now..."))
8944
ed2509832311 fix bug that locked unlocked campaign missions, see issue 452
Periklis Ntanasis <pntanasis@gmail.com>
parents: 8043
diff changeset
   495
  if progress and progress<6 then
ed2509832311 fix bug that locked unlocked campaign missions, see issue 452
Periklis Ntanasis <pntanasis@gmail.com>
parents: 8043
diff changeset
   496
    SaveCampaignVar("Progress", "6")
ed2509832311 fix bug that locked unlocked campaign missions, see issue 452
Periklis Ntanasis <pntanasis@gmail.com>
parents: 8043
diff changeset
   497
  end
9120
089411fbf4e6 fix mission 6 hiding cyborg (issue 622)
master_ex
parents: 8944
diff changeset
   498
  RestoreHedge(cyborg)
089411fbf4e6 fix mission 6 hiding cyborg (issue 622)
master_ex
parents: 8944
diff changeset
   499
  DeleteGear(cyborg)
12555
d51ea6ac1ca1 ACF: Replace TurnTimeLeft=0 with EndTurn(true)
Wuzzy <almikes@aol.com>
parents: 12548
diff changeset
   500
  EndTurn(true)
7413
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   501
end
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   502
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   503
function CheckGearsDead(gearList)
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   504
  for i = 1, # gearList do
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   505
    if gearDead[gearList[i]] ~= true then
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   506
      return false
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   507
    end
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   508
  end
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   509
  return true
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   510
end
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   511
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   512
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   513
function CheckGearDead(gear)
7675
58620e9e5ed5 Fixed grammar/vocabulary and improved balance
belphegorr <szabibibi@gmail.com>
parents: 7530
diff changeset
   514
  return gearDead[gear]
7413
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   515
end
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   516
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   517
function EndMission()
9120
089411fbf4e6 fix mission 6 hiding cyborg (issue 622)
master_ex
parents: 8944
diff changeset
   518
  RestoreHedge(cyborg)
089411fbf4e6 fix mission 6 hiding cyborg (issue 622)
master_ex
parents: 8944
diff changeset
   519
  DeleteGear(cyborg)
12555
d51ea6ac1ca1 ACF: Replace TurnTimeLeft=0 with EndTurn(true)
Wuzzy <almikes@aol.com>
parents: 12548
diff changeset
   520
  EndTurn(true)
7413
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   521
end
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   522
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   523
function CheckFreshDead()
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   524
  return freshDead ~= nil
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   525
end
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   526
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   527
function CyborgDeadReact()
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   528
  freshDead = nil
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   529
  if cyborgsLeft == 0 then
12272
2c884bb73975 Add alternate dialogs in ACF mission 6 when killing cyborgs before collecting crates
Wuzzy <almikes@aol.com>
parents: 12271
diff changeset
   530
    if not cratesTaken then
12508
071d1d699f27 ACF, mission 6: Fix messages, now they imply that destroying crates is also OK
Wuzzy <almikes@aol.com>
parents: 12273
diff changeset
   531
       AnimSay(native, loc("I still have to get rid of the crates."), SAY_THINK, 8000)
12272
2c884bb73975 Add alternate dialogs in ACF mission 6 when killing cyborgs before collecting crates
Wuzzy <almikes@aol.com>
parents: 12271
diff changeset
   532
    end
7413
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   533
    return
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   534
  end
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   535
  AnimSay(native, reactions[cyborgsLeft])
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   536
end
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   537
-----------------------------Misc--------------------------------------
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   538
function HideHedge(hedge)
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   539
  if hedgeHidden[hedge] ~= true then
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   540
    HideHog(hedge)
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   541
    hedgeHidden[hedge] = true
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   542
  end
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   543
end
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   544
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   545
function RestoreHedge(hedge)
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   546
  if hedgeHidden[hedge] == true then
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   547
    RestoreHog(hedge)
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   548
    hedgeHidden[hedge] = false
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   549
  end
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   550
end
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   551
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   552
function GetVariables()
8944
ed2509832311 fix bug that locked unlocked campaign missions, see issue 452
Periklis Ntanasis <pntanasis@gmail.com>
parents: 8043
diff changeset
   553
  progress = tonumber(GetCampaignVar("Progress"))
13145
5083fb0a2992 A Classic Fairytale: Harden all missions against missing campaign variables in team file and assume default values
Wuzzy <Wuzzy2@mail.ru>
parents: 13143
diff changeset
   554
  m5DeployedNum = tonumber(GetCampaignVar("M5DeployedNum")) or leaksNum
7413
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   555
end
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   556
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   557
function SetupPlace()
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   558
  for i = 1, 7 do
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   559
    if i ~= m5DeployedNum then 
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   560
      DeleteGear(natives[i])
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   561
    else
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   562
      native = natives[i]
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   563
    end
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   564
  end
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   565
  HideHedge(cyborg)
12933
e65aa3c3d4e6 Refactor scripts to use SpawnSupplyCrate (where it makes sense)
Wuzzy <Wuzzy2@mail.ru>
parents: 12901
diff changeset
   566
  jetCrate = SpawnSupplyCrate(3915, 1723, amJetpack)
7675
58620e9e5ed5 Fixed grammar/vocabulary and improved balance
belphegorr <szabibibi@gmail.com>
parents: 7530
diff changeset
   567
12273
1d2fe83709d1 Block left entrance in ACF, mission 6
Wuzzy <almikes@aol.com>
parents: 12272
diff changeset
   568
  --[[ Block the left entrance.
1d2fe83709d1 Block left entrance in ACF, mission 6
Wuzzy <almikes@aol.com>
parents: 12272
diff changeset
   569
       Otherwise the player could rope out of the map and
1d2fe83709d1 Block left entrance in ACF, mission 6
Wuzzy <almikes@aol.com>
parents: 12272
diff changeset
   570
       go all the way around to the final crate. ]]
1d2fe83709d1 Block left entrance in ACF, mission 6
Wuzzy <almikes@aol.com>
parents: 12272
diff changeset
   571
  PlaceGirder(90, 1709, 6)
1d2fe83709d1 Block left entrance in ACF, mission 6
Wuzzy <almikes@aol.com>
parents: 12272
diff changeset
   572
  PlaceGirder(90, 1875, 6)
1d2fe83709d1 Block left entrance in ACF, mission 6
Wuzzy <almikes@aol.com>
parents: 12272
diff changeset
   573
1d2fe83709d1 Block left entrance in ACF, mission 6
Wuzzy <almikes@aol.com>
parents: 12272
diff changeset
   574
  -- Place mines on the ground floor
12261
69217c8c91fe Refactor ACF mission 6
Wuzzy <almikes@aol.com>
parents: 12226
diff changeset
   575
  AddGear(1071, 1913, gtMine, 0, 0, 0, 0)
69217c8c91fe Refactor ACF mission 6
Wuzzy <almikes@aol.com>
parents: 12226
diff changeset
   576
  AddGear(1098, 1919, gtMine, 0, 0, 0, 0)
69217c8c91fe Refactor ACF mission 6
Wuzzy <almikes@aol.com>
parents: 12226
diff changeset
   577
  AddGear(1136, 1923, gtMine, 0, 0, 0, 0)
69217c8c91fe Refactor ACF mission 6
Wuzzy <almikes@aol.com>
parents: 12226
diff changeset
   578
  AddGear(1170, 1930, gtMine, 0, 0, 0, 0)
69217c8c91fe Refactor ACF mission 6
Wuzzy <almikes@aol.com>
parents: 12226
diff changeset
   579
  AddGear(1203, 1924, gtMine, 0, 0, 0, 0)
69217c8c91fe Refactor ACF mission 6
Wuzzy <almikes@aol.com>
parents: 12226
diff changeset
   580
  AddGear(1228, 1939, gtMine, 0, 0, 0, 0)
69217c8c91fe Refactor ACF mission 6
Wuzzy <almikes@aol.com>
parents: 12226
diff changeset
   581
  AddGear(1264, 1931, gtMine, 0, 0, 0, 0)
69217c8c91fe Refactor ACF mission 6
Wuzzy <almikes@aol.com>
parents: 12226
diff changeset
   582
  AddGear(1309, 1938, gtMine, 0, 0, 0, 0)
69217c8c91fe Refactor ACF mission 6
Wuzzy <almikes@aol.com>
parents: 12226
diff changeset
   583
  AddGear(1352, 1936, gtMine, 0, 0, 0, 0)
69217c8c91fe Refactor ACF mission 6
Wuzzy <almikes@aol.com>
parents: 12226
diff changeset
   584
  AddGear(1386, 1939, gtMine, 0, 0, 0, 0)
69217c8c91fe Refactor ACF mission 6
Wuzzy <almikes@aol.com>
parents: 12226
diff changeset
   585
  AddGear(1432, 1942, gtMine, 0, 0, 0, 0)
69217c8c91fe Refactor ACF mission 6
Wuzzy <almikes@aol.com>
parents: 12226
diff changeset
   586
  AddGear(1483, 1950, gtMine, 0, 0, 0, 0)
69217c8c91fe Refactor ACF mission 6
Wuzzy <almikes@aol.com>
parents: 12226
diff changeset
   587
  AddGear(1530, 1954, gtMine, 0, 0, 0, 0)
69217c8c91fe Refactor ACF mission 6
Wuzzy <almikes@aol.com>
parents: 12226
diff changeset
   588
  AddGear(1579, 1959, gtMine, 0, 0, 0, 0)
69217c8c91fe Refactor ACF mission 6
Wuzzy <almikes@aol.com>
parents: 12226
diff changeset
   589
  AddGear(1000, 1903, gtMine, 0, 0, 0, 0)
69217c8c91fe Refactor ACF mission 6
Wuzzy <almikes@aol.com>
parents: 12226
diff changeset
   590
  AddGear(957, 1903, gtMine, 0, 0, 0, 0)
69217c8c91fe Refactor ACF mission 6
Wuzzy <almikes@aol.com>
parents: 12226
diff changeset
   591
  AddGear(909, 1910, gtMine, 0, 0, 0, 0)
69217c8c91fe Refactor ACF mission 6
Wuzzy <almikes@aol.com>
parents: 12226
diff changeset
   592
  AddGear(889, 1917, gtMine, 0, 0, 0, 0)
13143
2c867c7d939f ACF6: Change mines, remove mines placed at unfair positions
Wuzzy <Wuzzy2@mail.ru>
parents: 13139
diff changeset
   593
2c867c7d939f ACF6: Change mines, remove mines placed at unfair positions
Wuzzy <Wuzzy2@mail.ru>
parents: 13139
diff changeset
   594
  -- Place misc. mines
2c867c7d939f ACF6: Change mines, remove mines placed at unfair positions
Wuzzy <Wuzzy2@mail.ru>
parents: 13139
diff changeset
   595
  AddGear(759, 878, gtMine, 0, 0, 0, 0)
2c867c7d939f ACF6: Change mines, remove mines placed at unfair positions
Wuzzy <Wuzzy2@mail.ru>
parents: 13139
diff changeset
   596
  AddGear(2388, 759, gtMine, 0, 0, 0, 0)
2c867c7d939f ACF6: Change mines, remove mines placed at unfair positions
Wuzzy <Wuzzy2@mail.ru>
parents: 13139
diff changeset
   597
  AddGear(2498, 696, gtMine, 0, 0, 0, 0)
2c867c7d939f ACF6: Change mines, remove mines placed at unfair positions
Wuzzy <Wuzzy2@mail.ru>
parents: 13139
diff changeset
   598
  AddGear(2936, 1705, gtMine, 0, 0, 0, 0)
2c867c7d939f ACF6: Change mines, remove mines placed at unfair positions
Wuzzy <Wuzzy2@mail.ru>
parents: 13139
diff changeset
   599
  AddGear(3119, 1366, gtMine, 0, 0, 0, 0)
2c867c7d939f ACF6: Change mines, remove mines placed at unfair positions
Wuzzy <Wuzzy2@mail.ru>
parents: 13139
diff changeset
   600
  AddGear(2001, 832, gtMine, 0, 0, 0, 0)
2c867c7d939f ACF6: Change mines, remove mines placed at unfair positions
Wuzzy <Wuzzy2@mail.ru>
parents: 13139
diff changeset
   601
  AddGear(2008, 586, gtMine, 0, 0, 0, 0)
2c867c7d939f ACF6: Change mines, remove mines placed at unfair positions
Wuzzy <Wuzzy2@mail.ru>
parents: 13139
diff changeset
   602
  AddGear(511, 1245, gtMine, 0, 0, 0, 0)
2c867c7d939f ACF6: Change mines, remove mines placed at unfair positions
Wuzzy <Wuzzy2@mail.ru>
parents: 13139
diff changeset
   603
2c867c7d939f ACF6: Change mines, remove mines placed at unfair positions
Wuzzy <Wuzzy2@mail.ru>
parents: 13139
diff changeset
   604
  -- And one barrel for fun
2c867c7d939f ACF6: Change mines, remove mines placed at unfair positions
Wuzzy <Wuzzy2@mail.ru>
parents: 13139
diff changeset
   605
  AddGear(719, 276, gtExplosives, 0, 0, 0, 0)
2c867c7d939f ACF6: Change mines, remove mines placed at unfair positions
Wuzzy <Wuzzy2@mail.ru>
parents: 13139
diff changeset
   606
7675
58620e9e5ed5 Fixed grammar/vocabulary and improved balance
belphegorr <szabibibi@gmail.com>
parents: 7530
diff changeset
   607
  ------ STICKY MINE LIST ------
13143
2c867c7d939f ACF6: Change mines, remove mines placed at unfair positions
Wuzzy <Wuzzy2@mail.ru>
parents: 13139
diff changeset
   608
  AddGear(1199, 733, gtSMine, 0, 0, 0, 0)
2c867c7d939f ACF6: Change mines, remove mines placed at unfair positions
Wuzzy <Wuzzy2@mail.ru>
parents: 13139
diff changeset
   609
  AddGear(1195, 793, gtSMine, 0, 0, 0, 0)
2c867c7d939f ACF6: Change mines, remove mines placed at unfair positions
Wuzzy <Wuzzy2@mail.ru>
parents: 13139
diff changeset
   610
  AddGear(1201, 861, gtSMine, 0, 0, 0, 0)
2c867c7d939f ACF6: Change mines, remove mines placed at unfair positions
Wuzzy <Wuzzy2@mail.ru>
parents: 13139
diff changeset
   611
  AddGear(682, 878, gtSMine, 0, 0, 0, 0)
2c867c7d939f ACF6: Change mines, remove mines placed at unfair positions
Wuzzy <Wuzzy2@mail.ru>
parents: 13139
diff changeset
   612
  AddGear(789, 876, gtSMine, 0, 0, 0, 0)
7413
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   613
end
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   614
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   615
function SetupEvents()
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   616
  AddNewEvent(CheckMissionFinished, {}, DoMissionFinished, {}, 0)
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   617
  AddNewEvent(CheckGearDead, {native}, EndMission, {}, 0)
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   618
  AddNewEvent(CheckFreshDead, {}, CyborgDeadReact, {}, 1)
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   619
end
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   620
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   621
function SetupAmmo()
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   622
  AddAmmo(cyborgs[1], amBazooka, 100)
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   623
  AddAmmo(cyborgs[1], amShotgun, 100)
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   624
  AddAmmo(cyborgs[1], amSwitch, 100)
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   625
end
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   626
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   627
function AddHogs()
13139
674b76f2d64a ACF: Only use standard team colors
Wuzzy <Wuzzy2@mail.ru>
parents: 13097
diff changeset
   628
  AddTeam(loc("Natives"), 0x4980C1, "Bone", "Island", "HillBilly", "cm_birdy")
7413
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   629
  for i = 1, 7 do
7428
4cc8398384e6 Mission 6: Fixed a typo, an animation bug, added 2 rope crates to the weapon stack
belphegorr <szabibibi@gmail.com>
parents: 7422
diff changeset
   630
    natives[i] = AddHog(nativeNames[i], 0, 200, nativeHats[i])
7413
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   631
    gearDead[natives[i]] = false
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   632
  end
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   633
13139
674b76f2d64a ACF: Only use standard team colors
Wuzzy <Wuzzy2@mail.ru>
parents: 13097
diff changeset
   634
  AddTeam(loc("011101001"), 0xFF0204, "ring", "UFO", "Robot", "cm_binary")
7413
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   635
  cyborg = AddHog(loc("Unit 334a$7%;.*"), 0, 200, "cyborg1")
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   636
  gearDead[cyborg] = false
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   637
13139
674b76f2d64a ACF: Only use standard team colors
Wuzzy <Wuzzy2@mail.ru>
parents: 13097
diff changeset
   638
  AddTeam(loc("011101000"), 0xFFFF01, "ring", "UFO", "Robot", "cm_binary")
7413
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   639
  for i = 1, 4 do
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   640
    cyborgs[i] = AddHog(cyborgNames[i], 2, 100, "cyborg2")
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   641
    gearDead[cyborgs[i]] = false
13097
03d065fc60dc ACF6: Fix cyborgs sometimes idling forever in their turns (fixes bug 521)
Wuzzy <Wuzzy2@mail.ru>
parents: 12933
diff changeset
   642
    SetEffect(cyborgs[i], heArtillery, 1)
7413
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   643
  end
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   644
  cyborgsLeft = 4
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   645
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   646
  for i = 1, 7 do
7448
d0521a3a4358 Solved "floating repositionings" in every mission
belphegorr <szabibibi@gmail.com>
parents: 7431
diff changeset
   647
    AnimSetGearPosition(natives[i], unpack(nativePos))
7413
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   648
  end
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   649
7448
d0521a3a4358 Solved "floating repositionings" in every mission
belphegorr <szabibibi@gmail.com>
parents: 7431
diff changeset
   650
  AnimSetGearPosition(cyborg, unpack(cyborgPos))
7413
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   651
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   652
  for i = 1, 4 do
7448
d0521a3a4358 Solved "floating repositionings" in every mission
belphegorr <szabibibi@gmail.com>
parents: 7431
diff changeset
   653
    AnimSetGearPosition(cyborgs[i], unpack(cyborgsPos[i]))
7413
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   654
    AnimTurn(cyborgs[i], cyborgsDir[i])
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   655
  end
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   656
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   657
end
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   658
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   659
function CondNeedToTurn(hog1, hog2)
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   660
  xl, xd = GetX(hog1), GetX(hog2)
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   661
  if xl > xd then
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   662
    AnimInsertStepNext({func = AnimTurn, args = {hog1, "Left"}})
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   663
    AnimInsertStepNext({func = AnimTurn, args = {hog2, "Right"}})
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   664
  elseif xl < xd then
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   665
    AnimInsertStepNext({func = AnimTurn, args = {hog2, "Left"}})
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   666
    AnimInsertStepNext({func = AnimTurn, args = {hog1, "Right"}})
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   667
  end
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   668
end
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   669
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   670
-----------------------------Main Functions----------------------------
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   671
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   672
function onGameInit()
12261
69217c8c91fe Refactor ACF mission 6
Wuzzy <almikes@aol.com>
parents: 12226
diff changeset
   673
  Seed = 0
69217c8c91fe Refactor ACF mission 6
Wuzzy <almikes@aol.com>
parents: 12226
diff changeset
   674
  GameFlags = gfSolidLand + gfDisableLandObjects + gfDisableWind + gfDisableGirders
69217c8c91fe Refactor ACF mission 6
Wuzzy <almikes@aol.com>
parents: 12226
diff changeset
   675
  TurnTime = 60000 
69217c8c91fe Refactor ACF mission 6
Wuzzy <almikes@aol.com>
parents: 12226
diff changeset
   676
  CaseFreq = 0
13143
2c867c7d939f ACF6: Change mines, remove mines placed at unfair positions
Wuzzy <Wuzzy2@mail.ru>
parents: 13139
diff changeset
   677
  MinesNum = 0
12261
69217c8c91fe Refactor ACF mission 6
Wuzzy <almikes@aol.com>
parents: 12226
diff changeset
   678
  MinesTime = 5000
13143
2c867c7d939f ACF6: Change mines, remove mines placed at unfair positions
Wuzzy <Wuzzy2@mail.ru>
parents: 13139
diff changeset
   679
  Explosives = 0
10423
b9d6463cf2ca fix mapgen of other scripts too
sheepluva
parents: 9306
diff changeset
   680
  MapGen = mgDrawn
12261
69217c8c91fe Refactor ACF mission 6
Wuzzy <almikes@aol.com>
parents: 12226
diff changeset
   681
  Theme = "City"
7413
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   682
  SuddenDeathTurns = 25
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   683
12261
69217c8c91fe Refactor ACF mission 6
Wuzzy <almikes@aol.com>
parents: 12226
diff changeset
   684
  for i = 1, #map do
69217c8c91fe Refactor ACF mission 6
Wuzzy <almikes@aol.com>
parents: 12226
diff changeset
   685
     ParseCommand('draw ' .. map[i])
69217c8c91fe Refactor ACF mission 6
Wuzzy <almikes@aol.com>
parents: 12226
diff changeset
   686
  end
7413
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   687
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   688
  AddHogs()
12510
cc146b018d14 Fix mines not working in first turn in ACF, mission 6 (bug 180)
Wuzzy <almikes@aol.com>
parents: 12509
diff changeset
   689
  AnimInit(true)
7413
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   690
end
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   691
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   692
function onGameStart()
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   693
  GetVariables()
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   694
  SetupAmmo()
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   695
  SetupPlace()
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   696
  AnimationSetup()
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   697
  SetupEvents()
7415
1a6a6db3fa96 Fixed localization of Mission 6 and fixed a typo.
belphegorr <szabibibi@gmail.com>
parents: 7413
diff changeset
   698
  ShowMission(loc("Dragon's Lair"), loc("Y Chwiliad"), loc("Find your tribe!|Cross the lake!"), 1, 0)
7413
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   699
end
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   700
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   701
function onGameTick()
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   702
  AnimUnWait()
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   703
  if ShowAnimation() == false then
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   704
    return
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   705
  end
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   706
  ExecuteAfterAnimations()
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   707
  CheckEvents()
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   708
end
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   709
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   710
function onGearDelete(gear)
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   711
  gearDead[gear] = true
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   712
  if GetGearType(gear) == gtHedgehog then
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   713
    if GetHogTeamName(gear) == loc("011101000") then
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   714
      freshDead = GetHogName(gear)
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   715
      cyborgsLeft = cyborgsLeft - 1
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   716
    end
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   717
  end
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   718
end
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   719
12798
fdb3730aa0e2 ACF6: Make sure player only gets portal gun at the portal sequence, and not a pile full of weapons and ropes
Wuzzy <Wuzzy2@mail.ru>
parents: 12794
diff changeset
   720
function onGearAdd(gear)
fdb3730aa0e2 ACF6: Make sure player only gets portal gun at the portal sequence, and not a pile full of weapons and ropes
Wuzzy <Wuzzy2@mail.ru>
parents: 12794
diff changeset
   721
  -- Track gears for removal when reaching the portal segment
fdb3730aa0e2 ACF6: Make sure player only gets portal gun at the portal sequence, and not a pile full of weapons and ropes
Wuzzy <Wuzzy2@mail.ru>
parents: 12794
diff changeset
   722
  local gt = GetGearType(gear)
fdb3730aa0e2 ACF6: Make sure player only gets portal gun at the portal sequence, and not a pile full of weapons and ropes
Wuzzy <Wuzzy2@mail.ru>
parents: 12794
diff changeset
   723
  if gt == gtMine or gt == gtSMine or gt == gtCase or gt == gtExplosives then
fdb3730aa0e2 ACF6: Make sure player only gets portal gun at the portal sequence, and not a pile full of weapons and ropes
Wuzzy <Wuzzy2@mail.ru>
parents: 12794
diff changeset
   724
    table.insert(annoyingGearsForPortalScene, gear)
fdb3730aa0e2 ACF6: Make sure player only gets portal gun at the portal sequence, and not a pile full of weapons and ropes
Wuzzy <Wuzzy2@mail.ru>
parents: 12794
diff changeset
   725
  end
fdb3730aa0e2 ACF6: Make sure player only gets portal gun at the portal sequence, and not a pile full of weapons and ropes
Wuzzy <Wuzzy2@mail.ru>
parents: 12794
diff changeset
   726
end
fdb3730aa0e2 ACF6: Make sure player only gets portal gun at the portal sequence, and not a pile full of weapons and ropes
Wuzzy <Wuzzy2@mail.ru>
parents: 12794
diff changeset
   727
7413
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   728
function onAmmoStoreInit()
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   729
  SetAmmo(amFirePunch, 3, 0, 0, 0)
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   730
  SetAmmo(amBaseballBat, 2, 0, 0, 0)
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   731
  SetAmmo(amGirder, 0, 0, 0, 2)
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   732
  SetAmmo(amLowGravity, 0, 0, 0, 1)
12798
fdb3730aa0e2 ACF6: Make sure player only gets portal gun at the portal sequence, and not a pile full of weapons and ropes
Wuzzy <Wuzzy2@mail.ru>
parents: 12794
diff changeset
   733
  SetAmmo(amJetpack, 0, 0, 0, 1)
7413
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   734
  SetAmmo(amSkip, 9, 0, 0, 0)
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   735
end
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   736
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   737
function onNewTurn()
12510
cc146b018d14 Fix mines not working in first turn in ACF, mission 6 (bug 180)
Wuzzy <almikes@aol.com>
parents: 12509
diff changeset
   738
  if firstTurn then
cc146b018d14 Fix mines not working in first turn in ACF, mission 6 (bug 180)
Wuzzy <almikes@aol.com>
parents: 12509
diff changeset
   739
    AddAnim(startAnim)
cc146b018d14 Fix mines not working in first turn in ACF, mission 6 (bug 180)
Wuzzy <almikes@aol.com>
parents: 12509
diff changeset
   740
    AddFunction({func = AfterStartAnim, args = {}})
cc146b018d14 Fix mines not working in first turn in ACF, mission 6 (bug 180)
Wuzzy <almikes@aol.com>
parents: 12509
diff changeset
   741
    firstTurn = false
7413
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   742
  end
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   743
  if GetHogTeamName(CurrentHedgehog) == loc("011101000") then
7675
58620e9e5ed5 Fixed grammar/vocabulary and improved balance
belphegorr <szabibibi@gmail.com>
parents: 7530
diff changeset
   744
    if TotalRounds % 6 == 0 then
58620e9e5ed5 Fixed grammar/vocabulary and improved balance
belphegorr <szabibibi@gmail.com>
parents: 7530
diff changeset
   745
      AddAmmo(CurrentHedgehog, amSniperRifle, 1)
58620e9e5ed5 Fixed grammar/vocabulary and improved balance
belphegorr <szabibibi@gmail.com>
parents: 7530
diff changeset
   746
      AddAmmo(CurrentHedgehog, amDEagle, 1)
58620e9e5ed5 Fixed grammar/vocabulary and improved balance
belphegorr <szabibibi@gmail.com>
parents: 7530
diff changeset
   747
    end
7413
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   748
    TurnTimeLeft = 30000
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   749
  elseif GetHogTeamName(CurrentHedgehog) == loc("011101001") then
12555
d51ea6ac1ca1 ACF: Replace TurnTimeLeft=0 with EndTurn(true)
Wuzzy <almikes@aol.com>
parents: 12548
diff changeset
   750
    EndTurn(true)
7413
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   751
  end
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   752
end
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   753
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   754
function onPrecise()
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   755
  if GameTime > 2500 and AnimInProgress() then
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   756
    SetAnimSkip(true)
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   757
  end
dbf6e803d5bc Finished mission 6: Dragon's lair
belphegorr <szabibibi@gmail.com>
parents:
diff changeset
   758
end