author | Wuzzy <almikes@aol.com> |
Wed, 27 Sep 2017 06:38:51 +0200 | |
changeset 12559 | 194b00c4ba07 |
parent 12517 | b1c2b0a8a43e |
child 12574 | 87326fec6ea2 |
permissions | -rw-r--r-- |
8043 | 1 |
HedgewarsScriptLoad("/Scripts/Locale.lua") |
2 |
HedgewarsScriptLoad("/Scripts/Animate.lua") |
|
7434
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
3 |
|
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
4 |
-----------------------------Map-------------------------------------- |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
5 |
local map = |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
6 |
{ |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
7 |
"\255\242\4\218\132\0\53\4\253\0\0\53\4\253\132\0\102\5\92\0\0\102\5\92\132\0\106\5\205\0\0\106\5\205\132\1\1\6\37\0", |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
8 |
"\1\1\6\37\132\1\124\6\160\0\1\113\6\160\132\2\157\6\111\0\2\164\6\107\132\2\252\6\178\0\2\252\6\178\132\3\224\4\179\0", |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
9 |
"\3\224\4\179\132\3\38\2\209\0\3\38\2\209\132\4\109\3\179\0\4\109\3\179\132\5\124\3\172\0\5\128\3\172\132\6\69\4\239\0", |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
10 |
"\6\69\4\239\132\7\175\4\32\0\7\172\4\46\132\8\116\5\18\0\3\38\2\213\132\3\41\1\244\0\3\41\1\244\132\3\94\2\245\0", |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
11 |
"\8\127\5\8\132\8\127\0\14\0\8\127\0\14\132\8\194\5\29\0\8\194\5\29\132\9\36\5\82\0\9\29\5\75\132\9\180\5\103\0", |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
12 |
"\9\194\5\92\132\10\51\6\5\0\10\51\6\5\132\10\216\5\152\0\10\227\5\145\132\11\189\5\212\0\11\189\5\212\132\12\91\5\131\0", |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
13 |
"\12\91\5\131\132\12\253\5\191\0\12\253\5\191\132\13\149\5\106\0\13\149\5\106\132\16\11\5\106\0\14\19\5\110\132\14\16\4\236\0", |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
14 |
"\14\16\4\236\132\15\66\4\236\0\15\66\4\236\132\15\66\5\110\0\14\79\4\194\132\15\6\4\194\0\14\255\4\176\132\14\255\4\49\0", |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
15 |
"\14\255\4\49\132\14\76\4\53\0\14\76\4\53\132\14\76\4\201\0\14\125\4\74\128\14\128\4\187\0\14\188\4\77\128\14\185\4\179\0", |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
16 |
"\14\111\4\39\129\14\76\3\252\0\14\72\3\249\129\14\72\3\147\0\14\72\3\147\129\14\97\3\235\0\14\97\3\235\129\14\146\4\28\0", |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
17 |
"\14\202\4\28\129\14\248\3\238\0\14\248\3\238\129\15\17\3\133\0\15\17\3\133\129\15\27\3\235\0\15\27\3\235\129\14\230\4\49\0", |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
18 |
"\1\124\6\220\130\1\244\7\13\0\1\244\7\13\130\2\104\6\206\0\2\100\6\206\130\2\30\6\178\0\2\12\6\181\130\1\135\6\213\0", |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
19 |
"\3\172\7\136\130\15\41\7\136\0\15\41\7\136\130\15\41\7\62\0\15\41\7\62\130\3\175\7\52\0\3\175\7\52\130\3\126\6\206\0", |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
20 |
"\3\126\6\206\130\3\122\7\133\0\3\122\7\133\130\3\186\7\136\0\8\123\7\94\136\9\173\7\101\0\8\88\7\66\130\8\88\7\119\0", |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
21 |
"\9\212\7\69\130\9\212\7\126\0\8\155\0\14\133\8\151\5\11\0\8\190\2\160\131\8\194\5\1\0\14\83\3\235\131\14\114\4\21\0", |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
22 |
"\15\10\3\196\131\15\10\3\235\0\15\10\3\235\131\14\220\4\32\0\14\65\5\47\137\15\20\5\36\0\15\41\5\82\132\15\41\5\82\0", |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
23 |
"\3\94\3\17\138\4\137\5\124\0\3\221\3\119\138\5\57\4\250\0\4\102\4\67\160\5\26\4\74\0\4\113\5\36\161\5\142\4\222\0", |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
24 |
"\4\42\5\216\169\9\89\6\26\0\6\100\5\22\145\8\134\5\64\0\6\255\4\197\140\7\161\4\120\0\7\214\4\204\146\7\214\4\204\0", |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
25 |
"\10\55\6\97\147\11\13\5\247\0\11\59\6\26\146\11\224\6\30\0\12\95\6\16\153\14\55\6\90\0\13\173\5\226\153\15\196\5\212\0", |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
26 |
"\15\172\7\91\152\15\165\5\230\0\15\235\7\221\142\255\238\7\207\0\14\248\6\188\152\3\217\6\178\0\3\112\6\83\143\3\31\7\101\0", |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
27 |
"\3\73\7\143\140\3\73\7\143\0\15\62\7\13\140\15\62\7\13\0\15\101\7\157\140\15\101\7\157\0\2\181\6\220\141\1\205\7\108\0", |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
28 |
"\2\86\6\160\137\2\150\6\128\0\2\26\6\153\134\1\96\6\195\0\1\82\6\241\136\1\226\7\59\0\2\157\7\98\155\2\157\7\98\0", |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
29 |
"\1\64\7\80\149\255\249\7\27\0\1\4\6\174\148\0\25\6\86\0\0\211\6\58\139\0\7\5\219\0\0\35\5\159\142\0\4\5\47\0", |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
30 |
"\8\123\0\14\199\8\187\0\11\0\16\14\5\99\199\16\14\7\245\0\255\235\4\218\199\255\238\8\25\0\8\67\2\72\202\8\208\2\72\0", |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
31 |
"\8\141\1\251\202\8\141\0\74\0\8\201\2\143\195\8\204\4\49\0\8\84\2\185\205\8\204\2\188\0\8\99\2\230\205\8\187\2\230\0", |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
32 |
"\8\165\3\41\131\8\144\3\3\0\8\144\3\3\131\8\60\2\248\0\8\60\2\248\131\7\252\3\59\0\7\252\3\59\131\8\137\3\31\0", |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
33 |
"\8\56\3\20\131\8\102\3\20\0\8\60\3\13\194\8\60\3\13\0\8\60\3\3\128\8\60\3\31\0\7\238\3\66\128\7\214\3\84\0", |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
34 |
"\7\217\3\87\128\7\217\3\98\0\7\217\3\87\128\7\200\3\91\0\6\209\4\70\208\8\18\4\95\0\0\11\4\225\131\0\0\8\21\0", |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
35 |
"\15\224\5\99\131\15\245\7\252\0\15\242\5\191\192\15\196\6\33\0\15\196\6\33\192\15\245\6\209\0\15\245\6\209\192\15\193\7\115\0", |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
36 |
"\15\193\7\115\192\15\235\8\18\0\15\249\5\223\196\15\217\6\40\0\15\217\6\40\196\16\4\6\188\0\15\245\6\16\196\16\21\7\77\0", |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
37 |
"\16\0\6\245\196\15\214\7\112\0\15\207\7\129\196\16\0\8\4\0\15\245\7\80\196\16\4\7\207\0\15\221\5\85\196\16\11\5\184\0", |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
38 |
} |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
39 |
--------------------------------------------Constants------------------------------------ |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
40 |
choiceAccepted = 1 |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
41 |
choiceRefused = 2 |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
42 |
choiceAttacked = 3 |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
43 |
|
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
44 |
choiceEliminate = 1 |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
45 |
choiceSpare = 2 |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
46 |
|
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
47 |
leaksNum = 1 |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
48 |
denseNum = 2 |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
49 |
waterNum = 3 |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
50 |
buffaloNum = 4 |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
51 |
chiefNum = 5 |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
52 |
girlNum = 6 |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
53 |
wiseNum = 7 |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
54 |
|
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
55 |
nativeNames = {loc("Leaks A Lot"), loc("Dense Cloud"), loc("Fiery Water"), |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
56 |
loc("Raging Buffalo"), loc("Righteous Beard"), loc("Fell From Grace"), |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
57 |
loc("Wise Oak"), loc("Ramon"), loc("Spiky Cheese") |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
58 |
} |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
59 |
|
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
60 |
nativeUnNames = {loc("Zork"), loc("Steve"), loc("Jack"), |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
61 |
loc("Lee"), loc("Elmo"), loc("Rachel"), |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
62 |
loc("Muriel")} |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
63 |
|
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
64 |
nativeHats = {"Rambo", "RobinHood", "pirate_jack", "zoo_Bunny", "IndianChief", |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
65 |
"tiara", "AkuAku", "rasta", "hair_yellow"} |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
66 |
|
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
67 |
nativePos = {{110, 1310}, {984, 1907}, {1040, 1907}} |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
68 |
nativePos2 = {196, 1499} |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
69 |
|
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
70 |
cyborgNames = {loc("Unit 0x0007"), loc("Hogminator"), loc("Carol"), |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
71 |
loc("Blender"), loc("Elderbot"), loc("Fiery Water")} |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
72 |
cyborgsDif = {2, 2, 2, 2, 2, 1} |
7484
f3a7c4e75815
Mission 7: changed enemy health, ammos, fixed crashes, princess no longer hidden
belphegorr <szabibibi@gmail.com>
parents:
7472
diff
changeset
|
73 |
cyborgsHealth = {45, 45, 45, 40, 40, 20} |
7434
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
74 |
cyborgPos = {945, 1216} |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
75 |
cyborgsNum = 6 |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
76 |
cyborgsPos = {{2243, 1043}, {3588, 1227}, {2781, 1388}, |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
77 |
{3749, 1040}, {2475, 1338}, {3853, 881}} |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
78 |
cyborgsDir = {"Left", "Left", "Left", "Left", "Left", "Right"} |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
79 |
|
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
80 |
princessPos = {3737, 1181} |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
81 |
crateConsts = {} |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
82 |
reactions = {} |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
83 |
|
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
84 |
nativeMidPos = {1991, 841} |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
85 |
cyborgMidPos = {2109, 726} |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
86 |
nativeMidPos2 = {2250, 1071} |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
87 |
-----------------------------Variables--------------------------------- |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
88 |
natives = {} |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
89 |
native = nil |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
90 |
|
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
91 |
cyborgs = {} |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
92 |
cyborg = nil |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
93 |
|
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
94 |
gearDead = {} |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
95 |
hedgeHidden = {} |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
96 |
|
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
97 |
startAnim = {} |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
98 |
midAnim = {} |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
99 |
|
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
100 |
freshDead = nil |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
101 |
crates = {} |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
102 |
cratesNum = 0 |
12369
5857936921ec
Get rid of some incorrect timeout messages in ACF, by using EndTurn(true)
Wuzzy <almikes@aol.com>
parents:
12268
diff
changeset
|
103 |
|
5857936921ec
Get rid of some incorrect timeout messages in ACF, by using EndTurn(true)
Wuzzy <almikes@aol.com>
parents:
12268
diff
changeset
|
104 |
princessFreed = false |
7434
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
105 |
-----------------------------Animations-------------------------------- |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
106 |
function EmitDenseClouds(dir) |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
107 |
local dif |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
108 |
if dir == "Left" then |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
109 |
dif = 10 |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
110 |
else |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
111 |
dif = -10 |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
112 |
end |
7520
dd0b68bbe456
Mission 7: increased distance between Leaks and the princess, fixed EmitDenseClouds typo
belphegorr <szabibibi@gmail.com>
parents:
7512
diff
changeset
|
113 |
AnimInsertStepNext({func = AnimVisualGear, args = {natives[1], GetX(natives[1]) + dif, GetY(natives[1]) + dif, vgtSteam, 0, true}, swh = false}) |
dd0b68bbe456
Mission 7: increased distance between Leaks and the princess, fixed EmitDenseClouds typo
belphegorr <szabibibi@gmail.com>
parents:
7512
diff
changeset
|
114 |
AnimInsertStepNext({func = AnimVisualGear, args = {natives[1], GetX(natives[1]) + dif, GetY(natives[1]) + dif, vgtSteam, 0, true}, swh = false}) |
dd0b68bbe456
Mission 7: increased distance between Leaks and the princess, fixed EmitDenseClouds typo
belphegorr <szabibibi@gmail.com>
parents:
7512
diff
changeset
|
115 |
AnimInsertStepNext({func = AnimVisualGear, args = {natives[1], GetX(natives[1]) + dif, GetY(natives[1]) + dif, vgtSteam, 0, true}, swh = false}) |
dd0b68bbe456
Mission 7: increased distance between Leaks and the princess, fixed EmitDenseClouds typo
belphegorr <szabibibi@gmail.com>
parents:
7512
diff
changeset
|
116 |
AnimInsertStepNext({func = AnimWait, args = {natives[1], 800}}) |
dd0b68bbe456
Mission 7: increased distance between Leaks and the princess, fixed EmitDenseClouds typo
belphegorr <szabibibi@gmail.com>
parents:
7512
diff
changeset
|
117 |
AnimInsertStepNext({func = AnimVisualGear, args = {natives[1], GetX(natives[1]) + dif, GetY(natives[1]) + dif, vgtSteam, 0, true}, swh = false}) |
dd0b68bbe456
Mission 7: increased distance between Leaks and the princess, fixed EmitDenseClouds typo
belphegorr <szabibibi@gmail.com>
parents:
7512
diff
changeset
|
118 |
AnimInsertStepNext({func = AnimVisualGear, args = {natives[1], GetX(natives[1]) + dif, GetY(natives[1]) + dif, vgtSteam, 0, true}, swh = false}) |
dd0b68bbe456
Mission 7: increased distance between Leaks and the princess, fixed EmitDenseClouds typo
belphegorr <szabibibi@gmail.com>
parents:
7512
diff
changeset
|
119 |
AnimInsertStepNext({func = AnimWait, args = {natives[1], 800}}) |
dd0b68bbe456
Mission 7: increased distance between Leaks and the princess, fixed EmitDenseClouds typo
belphegorr <szabibibi@gmail.com>
parents:
7512
diff
changeset
|
120 |
AnimInsertStepNext({func = AnimVisualGear, args = {natives[1], GetX(natives[1]) + dif, GetY(natives[1]) + dif, vgtSteam, 0, true}, swh = false}) |
7434
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
121 |
end |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
122 |
|
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
123 |
function AnimationSetup() |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
124 |
table.insert(startAnim, {func = AnimWait, args = {natives[1], 4000}}) |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
125 |
table.insert(startAnim, {func = AnimMove, args = {natives[1], "Right", unpack(nativePos2)}}) |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
126 |
if m5DeployedNum == leaksNum then |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
127 |
table.insert(startAnim, {func = AnimSay, args = {natives[1], loc("Those aliens are destroying the island!"), SAY_THINK, 5000}}) |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
128 |
elseif m5DeployedNum == denseNum then |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
129 |
table.insert(startAnim, {func = AnimSay, args = {natives[1], loc("Dude, all the plants are gone!"), SAY_THINK, 3500}}) |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
130 |
table.insert(startAnim, {func = AnimSay, args = {natives[1], loc("What am I gonna...eat, yo?"), SAY_THINK, 3500}}) |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
131 |
elseif m5DeployedNum == girlNum then |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
132 |
table.insert(startAnim, {func = AnimSay, args = {natives[1], loc("Fell From Heaven is the best! Fell From Heaven is the greatest!"), SAY_THINK, 7000}}) |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
133 |
table.insert(startAnim, {func = AnimSay, args = {natives[1], loc("Yuck! I bet they'll keep worshipping her even after I save the village!"), SAY_THINK, 7500}}) |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
134 |
elseif m5DeployedNum == chiefNum then |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
135 |
table.insert(startAnim, {func = AnimSay, args = {natives[1], loc("I'm getting old for this!"), SAY_THINK, 4000}}) |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
136 |
elseif m5DeployedNum == waterNum then |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
137 |
table.insert(startAnim, {func = AnimSay, args = {natives[1], loc("I'm getting thirsty..."), SAY_THINK, 3000}}) |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
138 |
elseif m5DeployedNum == buffaloNum then |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
139 |
table.insert(startAnim, {func = AnimSay, args = {natives[1], loc("I wonder why I'm so angry all the time..."), SAY_THINK, 6000}}) |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
140 |
table.insert(startAnim, {func = AnimSay, args = {natives[1], loc("It must be a childhood trauma..."), SAY_THINK, 4000}}) |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
141 |
table.insert(startAnim, {func = AnimSay, args = {natives[1], loc("Just wait till I get my hands on that trauma! ARGH!"), SAY_THINK, 6500}}) |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
142 |
elseif m5DeployedNum == wiseNum then |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
143 |
table.insert(startAnim, {func = AnimSay, args = {natives[1], loc("I could just teleport myself there..."), SAY_THINK, 4500}}) |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
144 |
table.insert(startAnim, {func = AnimSay, args = {natives[1], loc("It's a shame, I forgot how to do that!"), SAY_THINK, 4500}}) |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
145 |
end |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
146 |
table.insert(startAnim, {func = AnimCustomFunction, args = {natives[1], RestoreHedge, {cyborg}}}) |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
147 |
table.insert(startAnim, {func = AnimOutOfNowhere, args = {cyborg, unpack(cyborgPos)}}) |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
148 |
table.insert(startAnim, {func = AnimTurn, args = {cyborg, "Left"}}) |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
149 |
table.insert(startAnim, {func = AnimTurn, args = {natives[2], "Left"}}) |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
150 |
table.insert(startAnim, {func = AnimTurn, args = {natives[3], "Left"}}) |
12268
2c8e7e73ef58
Use format strings everywhere in A Classic Fairytale (for translators)
Wuzzy <almikes@aol.com>
parents:
12054
diff
changeset
|
151 |
table.insert(startAnim, {func = AnimSay, args = {cyborg, string.format(loc("Hello again, %s!"), nativeUnNames[m5DeployedNum]), SAY_SAY, 2500}}) |
7434
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
152 |
table.insert(startAnim, {func = AnimSay, args = {cyborg, loc("I just found out that they have captured your princess!"), SAY_SAY, 7000}}) |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
153 |
if m5DeployedNum == girlNum then |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
154 |
table.insert(startAnim, {func = AnimSay, args = {natives[1], loc("Of course I have to save her. What did I expect?!"), SAY_SAY, 7000}}) |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
155 |
elseif m5DeployedNum == denseNum then |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
156 |
table.insert(startAnim, {func = AnimCustomFunction, args = {natives[1], EmitDenseClouds, {"Right"}}}) |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
157 |
end |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
158 |
table.insert(startAnim, {func = AnimSay, args = {cyborg, loc("She's behind that tall thingy."), SAY_SAY, 5000}}) |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
159 |
table.insert(startAnim, {func = FollowGear, swh = false, args = {princess}}) |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
160 |
table.insert(startAnim, {func = AnimWait, swh = false, args = {princess, 1000}}) |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
161 |
table.insert(startAnim, {func = FollowGear, swh = false, args = {cyborg}}) |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
162 |
table.insert(startAnim, {func = AnimSay, args = {cyborg, loc("I'm here to help you rescue her."), SAY_SAY, 5000}}) |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
163 |
table.insert(startAnim, {func = AnimSay, args = {natives[2], loc("Yo, dude, we're here, too!"), SAY_SHOUT, 4000}}) |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
164 |
table.insert(startAnim, {func = AnimSay, args = {natives[3], loc("We were trying to save her and we got lost."), SAY_SHOUT, 6000}}) |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
165 |
table.insert(startAnim, {func = AnimSay, args = {natives[1], loc("That's typical of you!"), SAY_SAY, 3000}}) |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
166 |
table.insert(startAnim, {func = AnimSay, args = {natives[1], loc("Why are you helping us, uhm...?"), SAY_SAY, 3000}}) |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
167 |
table.insert(startAnim, {func = AnimSay, args = {cyborg, loc("Call me Beep! Well, 'cause I'm such a nice...person!"), SAY_SAY, 2500}}) |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
168 |
table.insert(startAnim, {func = AnimDisappear, args = {cyborg, unpack(cyborgPos)}}) |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
169 |
table.insert(startAnim, {func = AnimSwitchHog, args = {natives[1]}}) |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
170 |
table.insert(startAnim, {func = AnimWait, args = {natives[1], 1}}) |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
171 |
AddSkipFunction(startAnim, SkipStartAnim, {}) |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
172 |
|
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
173 |
table.insert(midAnim, {func = AnimCustomFunction, args = {natives[1], RestoreHedge, {cyborg}}}) |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
174 |
table.insert(midAnim, {func = AnimOutOfNowhere, args = {cyborg, unpack(cyborgMidPos)}}) |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
175 |
table.insert(midAnim, {func = AnimTurn, args = {cyborg, "Left"}}) |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
176 |
table.insert(midAnim, {func = AnimTeleportGear, args = {natives[1], unpack(nativeMidPos)}}) |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
177 |
table.insert(midAnim, {func = AnimSay, args = {cyborg, loc("Here, let me help you save her!"), SAY_SAY, 5000}}) |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
178 |
table.insert(midAnim, {func = AnimSay, args = {natives[1], loc("Thanks!"), SAY_SAY, 2000}}) |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
179 |
table.insert(midAnim, {func = AnimTeleportGear, args = {natives[1], unpack(nativeMidPos2)}}) |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
180 |
table.insert(midAnim, {func = AnimSay, args = {natives[1], loc("Why can't he just let her go?!"), SAY_THINK, 5000}}) |
7484
f3a7c4e75815
Mission 7: changed enemy health, ammos, fixed crashes, princess no longer hidden
belphegorr <szabibibi@gmail.com>
parents:
7472
diff
changeset
|
181 |
AddSkipFunction(midAnim, SkipMidAnim, {}) |
7434
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
182 |
end |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
183 |
|
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
184 |
--------------------------Anim skip functions-------------------------- |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
185 |
function AfterMidAnim() |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
186 |
HideHedge(cyborg) |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
187 |
SetupPlace3() |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
188 |
SetGearMessage(natives[1], 0) |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
189 |
AddNewEvent(CheckPrincessFreed, {}, DoPrincessFreed, {}, 0) |
12369
5857936921ec
Get rid of some incorrect timeout messages in ACF, by using EndTurn(true)
Wuzzy <almikes@aol.com>
parents:
12268
diff
changeset
|
190 |
EndTurn(true) |
7675
58620e9e5ed5
Fixed grammar/vocabulary and improved balance
belphegorr <szabibibi@gmail.com>
parents:
7520
diff
changeset
|
191 |
ShowMission(loc("Family Reunion"), loc("Salvation"), loc("Get your teammates out of their natural prison and save the princess!|Hint: Drilling holes should solve everything.|Hint: It might be a good idea to place a girder before starting to drill. Just saying.|Hint: All your hedgehogs need to be above the marked height!|Hint: Leaks A Lot needs to get really close to the princess!"), 1, 7000) |
7493
f261d6bf76b3
Mission 7: Added a visual gear to mark height, changed ShowMission to be more precise.
belphegorr <szabibibi@gmail.com>
parents:
7484
diff
changeset
|
192 |
vCirc = AddVisualGear(0,0,vgtCircle,0,true) |
f261d6bf76b3
Mission 7: Added a visual gear to mark height, changed ShowMission to be more precise.
belphegorr <szabibibi@gmail.com>
parents:
7484
diff
changeset
|
193 |
SetVisualGearValues(vCirc, 2625, 1500, 100, 255, 1, 10, 0, 120, 3, 0xff00ffff) |
7434
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
194 |
end |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
195 |
|
7484
f3a7c4e75815
Mission 7: changed enemy health, ammos, fixed crashes, princess no longer hidden
belphegorr <szabibibi@gmail.com>
parents:
7472
diff
changeset
|
196 |
function SkipMidAnim() |
f3a7c4e75815
Mission 7: changed enemy health, ammos, fixed crashes, princess no longer hidden
belphegorr <szabibibi@gmail.com>
parents:
7472
diff
changeset
|
197 |
AnimTeleportGear(natives[1], unpack(nativeMidPos2)) |
f3a7c4e75815
Mission 7: changed enemy health, ammos, fixed crashes, princess no longer hidden
belphegorr <szabibibi@gmail.com>
parents:
7472
diff
changeset
|
198 |
SkipStartAnim() |
f3a7c4e75815
Mission 7: changed enemy health, ammos, fixed crashes, princess no longer hidden
belphegorr <szabibibi@gmail.com>
parents:
7472
diff
changeset
|
199 |
end |
f3a7c4e75815
Mission 7: changed enemy health, ammos, fixed crashes, princess no longer hidden
belphegorr <szabibibi@gmail.com>
parents:
7472
diff
changeset
|
200 |
|
7434
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
201 |
function SetupPlace3() |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
202 |
SpawnUtilityCrate(2086, 1887, amRope, 1) |
12517
b1c2b0a8a43e
Fix crate types (weapon/utility) in A Classic Fairytale missions
Wuzzy <almikes@aol.com>
parents:
12369
diff
changeset
|
203 |
SpawnAmmoCrate(2147, 728, amBlowTorch, 2) |
b1c2b0a8a43e
Fix crate types (weapon/utility) in A Classic Fairytale missions
Wuzzy <almikes@aol.com>
parents:
12369
diff
changeset
|
204 |
SpawnAmmoCrate(2778, 1372, amPickHammer, 3) |
b1c2b0a8a43e
Fix crate types (weapon/utility) in A Classic Fairytale missions
Wuzzy <almikes@aol.com>
parents:
12369
diff
changeset
|
205 |
SpawnAmmoCrate(2579, 1886, amPickHammer, 3) |
7434
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
206 |
SpawnUtilityCrate(2622, 1893, amGirder, 1) |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
207 |
SpawnUtilityCrate(2671, 1883, amPortalGun, 3) |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
208 |
SpawnUtilityCrate(2831, 1384, amGirder, 3) |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
209 |
|
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
210 |
SetTimer(AddGear(2725, 1387, gtMine, 0, 0, 0, 0), 5000) |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
211 |
SetTimer(AddGear(2760, 1351, gtMine, 0, 0, 0, 0), 5000) |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
212 |
SetTimer(AddGear(2805, 1287, gtMine, 0, 0, 0, 0), 5000) |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
213 |
SetTimer(AddGear(2831, 1376, gtMine, 0, 0, 0, 0), 5000) |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
214 |
SetTimer(AddGear(2684, 1409, gtMine, 0, 0, 0, 0), 5000) |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
215 |
SetTimer(AddGear(2637, 1428, gtMine, 0, 0, 0, 0), 5000) |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
216 |
SetTimer(AddGear(2278, 1280, gtMine, 0, 0, 0, 0), 5000) |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
217 |
SetTimer(AddGear(2311, 1160, gtMine, 0, 0, 0, 0), 5000) |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
218 |
SetTimer(AddGear(2339, 1162, gtMine, 0, 0, 0, 0), 5000) |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
219 |
SetTimer(AddGear(2362, 1184, gtMine, 0, 0, 0, 0), 5000) |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
220 |
SetTimer(AddGear(2407, 1117, gtMine, 0, 0, 0, 0), 5000) |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
221 |
SetTimer(AddGear(2437, 1143, gtMine, 0, 0, 0, 0), 5000) |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
222 |
SetTimer(AddGear(2472, 1309, gtMine, 0, 0, 0, 0), 5000) |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
223 |
SetTimer(AddGear(2495, 1331, gtMine, 0, 0, 0, 0), 5000) |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
224 |
SetTimer(AddGear(2536, 1340, gtMine, 0, 0, 0, 0), 5000) |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
225 |
SetTimer(AddGear(2569, 1360, gtMine, 0, 0, 0, 0), 5000) |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
226 |
SetTimer(AddGear(2619, 1379, gtMine, 0, 0, 0, 0), 5000) |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
227 |
SetTimer(AddGear(2596, 1246, gtMine, 0, 0, 0, 0), 5000) |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
228 |
end |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
229 |
|
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
230 |
function SkipStartAnim() |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
231 |
AnimSwitchHog(natives[1]) |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
232 |
AnimWait(natives[1], 1) |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
233 |
end |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
234 |
|
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
235 |
function AfterStartAnim() |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
236 |
HideHedge(cyborg) |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
237 |
SetupPlace2() |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
238 |
SetGearMessage(natives[1], 0) |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
239 |
AddNewEvent(CheckGearDead, {natives[1]}, EndMission, {}, 0) |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
240 |
AddNewEvent(CheckGearDead, {natives[2]}, EndMission, {}, 0) |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
241 |
AddNewEvent(CheckGearDead, {natives[3]}, EndMission, {}, 0) |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
242 |
AddNewEvent(CheckGearDead, {princess}, EndMission, {}, 0) |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
243 |
AddNewEvent(CheckCyborgsDead, {}, DoCyborgsDead, {}, 0) |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
244 |
for i = 1, cyborgsNum do |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
245 |
AddNewEvent(CheckGearDead, {cyborgs[i]}, DoCyborgDead, {i}, 0) |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
246 |
end |
7472
cd747aefcba1
Fixed a few bugs in mission 7
belphegorr <szabibibi@gmail.com>
parents:
7448
diff
changeset
|
247 |
AddNewEvent(CheckOutOfCluster, {}, DoOutOfCluster, {}, 1) |
cd747aefcba1
Fixed a few bugs in mission 7
belphegorr <szabibibi@gmail.com>
parents:
7448
diff
changeset
|
248 |
AddNewEvent(CheckOutOfGrenade, {}, DoOutOfGrenade, {}, 1) |
7484
f3a7c4e75815
Mission 7: changed enemy health, ammos, fixed crashes, princess no longer hidden
belphegorr <szabibibi@gmail.com>
parents:
7472
diff
changeset
|
249 |
-- AddNewEvent(CheckNeedToHide, {}, DoNeedToHide, {}, 1) |
7434
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
250 |
TurnTimeLeft = TurnTime |
7472
cd747aefcba1
Fixed a few bugs in mission 7
belphegorr <szabibibi@gmail.com>
parents:
7448
diff
changeset
|
251 |
ShowMission(loc("Family Reunion"), loc("Hostage Situation"), loc("Save the princess! All your hogs must survive!|Hint: Kill the cyborgs first! Use the ammo very carefully!|Hint: You might want to spare a girder for cover!"), 1, 7000) |
7434
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
252 |
end |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
253 |
|
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
254 |
function SetupPlace2() |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
255 |
PlaceGirder(709, 564, 7) |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
256 |
PlaceGirder(591, 677, 7) |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
257 |
PlaceGirder(473, 794, 7) |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
258 |
PlaceGirder(433, 933, 5) |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
259 |
PlaceGirder(553, 1052, 5) |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
260 |
PlaceGirder(674, 1170, 5) |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
261 |
PlaceGirder(710, 1310, 7) |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
262 |
PlaceGirder(648, 1427, 5) |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
263 |
PlaceGirder(2110, 980, 0) |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
264 |
|
7484
f3a7c4e75815
Mission 7: changed enemy health, ammos, fixed crashes, princess no longer hidden
belphegorr <szabibibi@gmail.com>
parents:
7472
diff
changeset
|
265 |
SpawnAmmoCrate(814, 407, amBazooka, 4) |
f3a7c4e75815
Mission 7: changed enemy health, ammos, fixed crashes, princess no longer hidden
belphegorr <szabibibi@gmail.com>
parents:
7472
diff
changeset
|
266 |
clusterCrate = SpawnAmmoCrate(862, 494, amClusterBomb, 4) |
f3a7c4e75815
Mission 7: changed enemy health, ammos, fixed crashes, princess no longer hidden
belphegorr <szabibibi@gmail.com>
parents:
7472
diff
changeset
|
267 |
SpawnAmmoCrate(855, 486, amBee, 3) |
f3a7c4e75815
Mission 7: changed enemy health, ammos, fixed crashes, princess no longer hidden
belphegorr <szabibibi@gmail.com>
parents:
7472
diff
changeset
|
268 |
grenadeCrate1 = SpawnAmmoCrate(849, 459, amGrenade, 4) |
7434
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
269 |
SpawnAmmoCrate(2077, 847, amWatermelon, 3) |
7484
f3a7c4e75815
Mission 7: changed enemy health, ammos, fixed crashes, princess no longer hidden
belphegorr <szabibibi@gmail.com>
parents:
7472
diff
changeset
|
270 |
grenadeCrate2 = SpawnAmmoCrate(2122, 847, amGrenade, 3) |
7434
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
271 |
|
12517
b1c2b0a8a43e
Fix crate types (weapon/utility) in A Classic Fairytale missions
Wuzzy <almikes@aol.com>
parents:
12369
diff
changeset
|
272 |
SpawnAmmoCrate(747, 1577, amPickHammer, 1) |
7434
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
273 |
SpawnUtilityCrate(496, 1757, amGirder, 2) |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
274 |
SpawnUtilityCrate(1809, 1880, amGirder, 1) |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
275 |
SpawnUtilityCrate(530, 1747, amPortalGun, 1) |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
276 |
end |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
277 |
|
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
278 |
-----------------------------Events------------------------------------ |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
279 |
function CheckPrincessFreed() |
7675
58620e9e5ed5
Fixed grammar/vocabulary and improved balance
belphegorr <szabibibi@gmail.com>
parents:
7520
diff
changeset
|
280 |
if GetX(natives[1]) == nil or GetX(natives[2]) == nil or GetX(natives[3]) == nil or GetX(princess) == nil then |
58620e9e5ed5
Fixed grammar/vocabulary and improved balance
belphegorr <szabibibi@gmail.com>
parents:
7520
diff
changeset
|
281 |
return false |
58620e9e5ed5
Fixed grammar/vocabulary and improved balance
belphegorr <szabibibi@gmail.com>
parents:
7520
diff
changeset
|
282 |
end |
7520
dd0b68bbe456
Mission 7: increased distance between Leaks and the princess, fixed EmitDenseClouds typo
belphegorr <szabibibi@gmail.com>
parents:
7512
diff
changeset
|
283 |
return math.abs(GetX(natives[1]) - GetX(princess)) <= 15 and math.abs(GetY(natives[1]) - GetY(princess)) <= 15 and StoppedGear(natives[1]) |
7434
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
284 |
and GetY(natives[2]) < 1500 and GetY(natives[3]) < 1500 and StoppedGear(natives[2]) and StoppedGear(natives[3]) |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
285 |
end |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
286 |
|
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
287 |
function DoPrincessFreed() |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
288 |
AnimSay(princess, loc("Thank you, my hero!"), SAY_SAY, 0) |
8944
ed2509832311
fix bug that locked unlocked campaign missions, see issue 452
Periklis Ntanasis <pntanasis@gmail.com>
parents:
8043
diff
changeset
|
289 |
if progress and progress<7 then |
ed2509832311
fix bug that locked unlocked campaign missions, see issue 452
Periklis Ntanasis <pntanasis@gmail.com>
parents:
8043
diff
changeset
|
290 |
SaveCampaignVar("Progress", "7") |
ed2509832311
fix bug that locked unlocked campaign missions, see issue 452
Periklis Ntanasis <pntanasis@gmail.com>
parents:
8043
diff
changeset
|
291 |
end |
12369
5857936921ec
Get rid of some incorrect timeout messages in ACF, by using EndTurn(true)
Wuzzy <almikes@aol.com>
parents:
12268
diff
changeset
|
292 |
princessFreed = true |
10290 | 293 |
DismissTeam(loc("011101001")) |
12369
5857936921ec
Get rid of some incorrect timeout messages in ACF, by using EndTurn(true)
Wuzzy <almikes@aol.com>
parents:
12268
diff
changeset
|
294 |
EndTurn(true) |
7434
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
295 |
end |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
296 |
|
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
297 |
function CheckCyborgsDead() |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
298 |
return cyborgsLeft == 0 |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
299 |
end |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
300 |
|
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
301 |
function DoCyborgsDead() |
7448
d0521a3a4358
Solved "floating repositionings" in every mission
belphegorr <szabibibi@gmail.com>
parents:
7436
diff
changeset
|
302 |
SetGearMessage(CurrentHedgehog, 0) |
7484
f3a7c4e75815
Mission 7: changed enemy health, ammos, fixed crashes, princess no longer hidden
belphegorr <szabibibi@gmail.com>
parents:
7472
diff
changeset
|
303 |
RestoreHedge(princess) |
f3a7c4e75815
Mission 7: changed enemy health, ammos, fixed crashes, princess no longer hidden
belphegorr <szabibibi@gmail.com>
parents:
7472
diff
changeset
|
304 |
-- RemoveEventFunc(CheckNeedToHide) |
7434
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
305 |
AddAnim(midAnim) |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
306 |
AddFunction({func = AfterMidAnim, args = {}}) |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
307 |
end |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
308 |
|
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
309 |
function DoCyborgDead(index) |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
310 |
if cyborgsLeft == 0 then |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
311 |
return |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
312 |
end |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
313 |
if index == 1 then |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
314 |
SpawnAmmoCrate(1700, 407, amBazooka, 3) |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
315 |
elseif index == 2 then |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
316 |
SpawnAmmoCrate(1862, 494, amClusterBomb, 3) |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
317 |
elseif index == 3 then |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
318 |
SpawnAmmoCrate(1855, 486, amBee, 1) |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
319 |
elseif index == 4 then |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
320 |
SpawnAmmoCrate(1849, 459, amGrenade, 3) |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
321 |
elseif index == 5 then |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
322 |
SpawnAmmoCrate(2122, 847, amGrenade, 3) |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
323 |
elseif index == 6 then |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
324 |
SpawnAmmoCrate(2077, 847, amWatermelon, 1) |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
325 |
end |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
326 |
end |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
327 |
|
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
328 |
function CheckGearsDead(gearList) |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
329 |
for i = 1, # gearList do |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
330 |
if gearDead[gearList[i]] ~= true then |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
331 |
return false |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
332 |
end |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
333 |
end |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
334 |
return true |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
335 |
end |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
336 |
|
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
337 |
|
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
338 |
function CheckGearDead(gear) |
7436
4802191f6a09
Removed gfOneClanMode from Mission 7
belphegorr <szabibibi@gmail.com>
parents:
7434
diff
changeset
|
339 |
return gearDead[gear] |
7434
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
340 |
end |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
341 |
|
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
342 |
function EndMission() |
12369
5857936921ec
Get rid of some incorrect timeout messages in ACF, by using EndTurn(true)
Wuzzy <almikes@aol.com>
parents:
12268
diff
changeset
|
343 |
if not princessFreed then |
5857936921ec
Get rid of some incorrect timeout messages in ACF, by using EndTurn(true)
Wuzzy <almikes@aol.com>
parents:
12268
diff
changeset
|
344 |
RemoveEventFunc(CheckPrincessFreed) |
5857936921ec
Get rid of some incorrect timeout messages in ACF, by using EndTurn(true)
Wuzzy <almikes@aol.com>
parents:
12268
diff
changeset
|
345 |
AddCaption(loc("So the princess was never heard of again ...")) |
5857936921ec
Get rid of some incorrect timeout messages in ACF, by using EndTurn(true)
Wuzzy <almikes@aol.com>
parents:
12268
diff
changeset
|
346 |
DismissTeam(loc("Natives")) |
5857936921ec
Get rid of some incorrect timeout messages in ACF, by using EndTurn(true)
Wuzzy <almikes@aol.com>
parents:
12268
diff
changeset
|
347 |
DismissTeam(loc("011101001")) |
5857936921ec
Get rid of some incorrect timeout messages in ACF, by using EndTurn(true)
Wuzzy <almikes@aol.com>
parents:
12268
diff
changeset
|
348 |
EndTurn(true) |
5857936921ec
Get rid of some incorrect timeout messages in ACF, by using EndTurn(true)
Wuzzy <almikes@aol.com>
parents:
12268
diff
changeset
|
349 |
end |
7434
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
350 |
end |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
351 |
|
7472
cd747aefcba1
Fixed a few bugs in mission 7
belphegorr <szabibibi@gmail.com>
parents:
7448
diff
changeset
|
352 |
function CheckOutOfCluster() |
cd747aefcba1
Fixed a few bugs in mission 7
belphegorr <szabibibi@gmail.com>
parents:
7448
diff
changeset
|
353 |
return CheckGearDead(clusterCrate) and GetAmmoCount(natives[1], amClusterBomb) == 0 |
cd747aefcba1
Fixed a few bugs in mission 7
belphegorr <szabibibi@gmail.com>
parents:
7448
diff
changeset
|
354 |
end |
cd747aefcba1
Fixed a few bugs in mission 7
belphegorr <szabibibi@gmail.com>
parents:
7448
diff
changeset
|
355 |
|
cd747aefcba1
Fixed a few bugs in mission 7
belphegorr <szabibibi@gmail.com>
parents:
7448
diff
changeset
|
356 |
function CheckOutOfGrenade() |
cd747aefcba1
Fixed a few bugs in mission 7
belphegorr <szabibibi@gmail.com>
parents:
7448
diff
changeset
|
357 |
return CheckGearDead(grenadeCrate1) and CheckGearDead(grenadeCrate2) and GetAmmoCount(natives[1], amGrenade) == 0 |
cd747aefcba1
Fixed a few bugs in mission 7
belphegorr <szabibibi@gmail.com>
parents:
7448
diff
changeset
|
358 |
end |
cd747aefcba1
Fixed a few bugs in mission 7
belphegorr <szabibibi@gmail.com>
parents:
7448
diff
changeset
|
359 |
|
cd747aefcba1
Fixed a few bugs in mission 7
belphegorr <szabibibi@gmail.com>
parents:
7448
diff
changeset
|
360 |
function DoOutOfCluster() |
7675
58620e9e5ed5
Fixed grammar/vocabulary and improved balance
belphegorr <szabibibi@gmail.com>
parents:
7520
diff
changeset
|
361 |
if (GetX(natives[1]) == nil) then |
58620e9e5ed5
Fixed grammar/vocabulary and improved balance
belphegorr <szabibibi@gmail.com>
parents:
7520
diff
changeset
|
362 |
return |
58620e9e5ed5
Fixed grammar/vocabulary and improved balance
belphegorr <szabibibi@gmail.com>
parents:
7520
diff
changeset
|
363 |
end |
7484
f3a7c4e75815
Mission 7: changed enemy health, ammos, fixed crashes, princess no longer hidden
belphegorr <szabibibi@gmail.com>
parents:
7472
diff
changeset
|
364 |
clusterCrate = SpawnAmmoCrate(GetX(natives[1]) - 50, GetY(natives[1]) - 50, amClusterBomb, 3) |
7472
cd747aefcba1
Fixed a few bugs in mission 7
belphegorr <szabibibi@gmail.com>
parents:
7448
diff
changeset
|
365 |
end |
cd747aefcba1
Fixed a few bugs in mission 7
belphegorr <szabibibi@gmail.com>
parents:
7448
diff
changeset
|
366 |
|
cd747aefcba1
Fixed a few bugs in mission 7
belphegorr <szabibibi@gmail.com>
parents:
7448
diff
changeset
|
367 |
function DoOutOfGrenade() |
7675
58620e9e5ed5
Fixed grammar/vocabulary and improved balance
belphegorr <szabibibi@gmail.com>
parents:
7520
diff
changeset
|
368 |
if (GetX(natives[1]) == nil) then |
58620e9e5ed5
Fixed grammar/vocabulary and improved balance
belphegorr <szabibibi@gmail.com>
parents:
7520
diff
changeset
|
369 |
return |
58620e9e5ed5
Fixed grammar/vocabulary and improved balance
belphegorr <szabibibi@gmail.com>
parents:
7520
diff
changeset
|
370 |
end |
7484
f3a7c4e75815
Mission 7: changed enemy health, ammos, fixed crashes, princess no longer hidden
belphegorr <szabibibi@gmail.com>
parents:
7472
diff
changeset
|
371 |
grenadeCrate2 = SpawnAmmoCrate(GetX(natives[1]) - 50, GetY(natives[1]) - 50, amGrenade, 3) |
7472
cd747aefcba1
Fixed a few bugs in mission 7
belphegorr <szabibibi@gmail.com>
parents:
7448
diff
changeset
|
372 |
end |
cd747aefcba1
Fixed a few bugs in mission 7
belphegorr <szabibibi@gmail.com>
parents:
7448
diff
changeset
|
373 |
|
cd747aefcba1
Fixed a few bugs in mission 7
belphegorr <szabibibi@gmail.com>
parents:
7448
diff
changeset
|
374 |
function CheckNeedToHide() |
cd747aefcba1
Fixed a few bugs in mission 7
belphegorr <szabibibi@gmail.com>
parents:
7448
diff
changeset
|
375 |
if gearDead[princess] == true then |
cd747aefcba1
Fixed a few bugs in mission 7
belphegorr <szabibibi@gmail.com>
parents:
7448
diff
changeset
|
376 |
return false |
cd747aefcba1
Fixed a few bugs in mission 7
belphegorr <szabibibi@gmail.com>
parents:
7448
diff
changeset
|
377 |
end |
cd747aefcba1
Fixed a few bugs in mission 7
belphegorr <szabibibi@gmail.com>
parents:
7448
diff
changeset
|
378 |
return TurnTimeLeft == 0 |
cd747aefcba1
Fixed a few bugs in mission 7
belphegorr <szabibibi@gmail.com>
parents:
7448
diff
changeset
|
379 |
end |
cd747aefcba1
Fixed a few bugs in mission 7
belphegorr <szabibibi@gmail.com>
parents:
7448
diff
changeset
|
380 |
|
cd747aefcba1
Fixed a few bugs in mission 7
belphegorr <szabibibi@gmail.com>
parents:
7448
diff
changeset
|
381 |
function DoNeedToHide() |
cd747aefcba1
Fixed a few bugs in mission 7
belphegorr <szabibibi@gmail.com>
parents:
7448
diff
changeset
|
382 |
HideHedge(princess) |
cd747aefcba1
Fixed a few bugs in mission 7
belphegorr <szabibibi@gmail.com>
parents:
7448
diff
changeset
|
383 |
end |
7434
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
384 |
-----------------------------Misc-------------------------------------- |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
385 |
function HideHedge(hedge) |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
386 |
if hedgeHidden[hedge] ~= true then |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
387 |
HideHog(hedge) |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
388 |
hedgeHidden[hedge] = true |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
389 |
end |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
390 |
end |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
391 |
|
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
392 |
function RestoreHedge(hedge) |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
393 |
if hedgeHidden[hedge] == true then |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
394 |
RestoreHog(hedge) |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
395 |
hedgeHidden[hedge] = false |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
396 |
end |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
397 |
end |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
398 |
|
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
399 |
function GetVariables() |
8944
ed2509832311
fix bug that locked unlocked campaign missions, see issue 452
Periklis Ntanasis <pntanasis@gmail.com>
parents:
8043
diff
changeset
|
400 |
progress = tonumber(GetCampaignVar("Progress")) |
7434
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
401 |
m5DeployedNum = tonumber(GetCampaignVar("M5DeployedNum")) |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
402 |
m2Choice = tonumber(GetCampaignVar("M2Choice")) |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
403 |
m5Choice = tonumber(GetCampaignVar("M5Choice")) |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
404 |
end |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
405 |
|
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
406 |
function SetupPlace() |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
407 |
SetHogHat(natives[1], nativeHats[m5DeployedNum]) |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
408 |
SetHogName(natives[1], nativeNames[m5DeployedNum]) |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
409 |
if m2Choice ~= choiceAccepted or m5Choice ~= choiceEliminate then |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
410 |
DeleteGear(cyborgs[cyborgsNum]) |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
411 |
cyborgsNum = cyborgsNum - 1 |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
412 |
end |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
413 |
HideHedge(cyborg) |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
414 |
end |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
415 |
|
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
416 |
function SetupAmmo() |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
417 |
AddAmmo(cyborgs[1], amBazooka, 100) |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
418 |
AddAmmo(cyborgs[1], amGrenade, 100) |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
419 |
AddAmmo(cyborgs[1], amClusterBomb, 100) |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
420 |
AddAmmo(cyborgs[1], amSniperRifle, 1) |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
421 |
AddAmmo(cyborgs[1], amDynamite, 100) |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
422 |
AddAmmo(cyborgs[1], amBaseballBat, 100) |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
423 |
AddAmmo(cyborgs[1], amMolotov, 100) |
7675
58620e9e5ed5
Fixed grammar/vocabulary and improved balance
belphegorr <szabibibi@gmail.com>
parents:
7520
diff
changeset
|
424 |
AddAmmo(cyborgs[1], amWatermelon, 1) |
11038 | 425 |
AddAmmo(cyborgs[1], amAirAttack, 2) |
7675
58620e9e5ed5
Fixed grammar/vocabulary and improved balance
belphegorr <szabibibi@gmail.com>
parents:
7520
diff
changeset
|
426 |
AddAmmo(cyborgs[1], amDrillStrike, 1) |
7434
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
427 |
end |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
428 |
|
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
429 |
function AddHogs() |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
430 |
AddTeam(loc("Natives"), 29439, "Bone", "Island", "HillBilly", "cm_birdy") |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
431 |
for i = 7, 9 do |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
432 |
natives[i-6] = AddHog(nativeNames[i], 0, 100, nativeHats[i]) |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
433 |
gearDead[natives[i-6]] = false |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
434 |
end |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
435 |
|
12054
030464f34d47
Tweak flags used in all missions to fit more to the theme
Wuzzy <almikes@aol.com>
parents:
11038
diff
changeset
|
436 |
AddTeam(loc("011101001"), 14483456, "ring", "UFO", "Robot", "cm_binary") |
7434
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
437 |
cyborg = AddHog(loc("Unit 334a$7%;.*"), 0, 200, "cyborg1") |
7472
cd747aefcba1
Fixed a few bugs in mission 7
belphegorr <szabibibi@gmail.com>
parents:
7448
diff
changeset
|
438 |
princess = AddHog(loc("Fell From Heaven"), 0, 333, "tiara") |
7434
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
439 |
gearDead[cyborg] = false |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
440 |
gearDead[princess] = false |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
441 |
|
12054
030464f34d47
Tweak flags used in all missions to fit more to the theme
Wuzzy <almikes@aol.com>
parents:
11038
diff
changeset
|
442 |
AddTeam(loc("Biomechanic Team"), 14483456, "ring", "UFO", "Robot", "cm_cyborg") |
7434
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
443 |
for i = 1, cyborgsNum do |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
444 |
cyborgs[i] = AddHog(cyborgNames[i], cyborgsDif[i], cyborgsHealth[i], "cyborg2") |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
445 |
gearDead[cyborgs[i]] = false |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
446 |
end |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
447 |
cyborgsLeft = cyborgsNum |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
448 |
|
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
449 |
for i = 1, 3 do |
7448
d0521a3a4358
Solved "floating repositionings" in every mission
belphegorr <szabibibi@gmail.com>
parents:
7436
diff
changeset
|
450 |
AnimSetGearPosition(natives[i], unpack(nativePos[i])) |
7434
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
451 |
end |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
452 |
|
7448
d0521a3a4358
Solved "floating repositionings" in every mission
belphegorr <szabibibi@gmail.com>
parents:
7436
diff
changeset
|
453 |
AnimSetGearPosition(cyborg, unpack(cyborgPos)) |
d0521a3a4358
Solved "floating repositionings" in every mission
belphegorr <szabibibi@gmail.com>
parents:
7436
diff
changeset
|
454 |
AnimSetGearPosition(princess, unpack(princessPos)) |
7472
cd747aefcba1
Fixed a few bugs in mission 7
belphegorr <szabibibi@gmail.com>
parents:
7448
diff
changeset
|
455 |
AnimTurn(princess, "Left") |
7434
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
456 |
|
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
457 |
for i = 1, cyborgsNum do |
7448
d0521a3a4358
Solved "floating repositionings" in every mission
belphegorr <szabibibi@gmail.com>
parents:
7436
diff
changeset
|
458 |
AnimSetGearPosition(cyborgs[i], unpack(cyborgsPos[i])) |
7434
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
459 |
AnimTurn(cyborgs[i], cyborgsDir[i]) |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
460 |
end |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
461 |
end |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
462 |
|
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
463 |
function CondNeedToTurn(hog1, hog2) |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
464 |
xl, xd = GetX(hog1), GetX(hog2) |
7675
58620e9e5ed5
Fixed grammar/vocabulary and improved balance
belphegorr <szabibibi@gmail.com>
parents:
7520
diff
changeset
|
465 |
if xl == nil or xd == nil then |
58620e9e5ed5
Fixed grammar/vocabulary and improved balance
belphegorr <szabibibi@gmail.com>
parents:
7520
diff
changeset
|
466 |
return |
58620e9e5ed5
Fixed grammar/vocabulary and improved balance
belphegorr <szabibibi@gmail.com>
parents:
7520
diff
changeset
|
467 |
end |
7434
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
468 |
if xl > xd then |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
469 |
AnimInsertStepNext({func = AnimTurn, args = {hog1, "Left"}}) |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
470 |
AnimInsertStepNext({func = AnimTurn, args = {hog2, "Right"}}) |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
471 |
elseif xl < xd then |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
472 |
AnimInsertStepNext({func = AnimTurn, args = {hog2, "Left"}}) |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
473 |
AnimInsertStepNext({func = AnimTurn, args = {hog1, "Right"}}) |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
474 |
end |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
475 |
end |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
476 |
|
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
477 |
-----------------------------Main Functions---------------------------- |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
478 |
|
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
479 |
function onGameInit() |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
480 |
Seed = 0 |
7436
4802191f6a09
Removed gfOneClanMode from Mission 7
belphegorr <szabibibi@gmail.com>
parents:
7434
diff
changeset
|
481 |
GameFlags = gfSolidLand + gfDisableLandObjects + gfDisableGirders |
7434
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
482 |
TurnTime = 60000 |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
483 |
CaseFreq = 0 |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
484 |
MinesNum = 0 |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
485 |
MinesTime = 3000 |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
486 |
Explosives = 0 |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
487 |
Delay = 10 |
10423 | 488 |
MapGen = mgDrawn |
7434
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
489 |
Theme = "Hell" |
7472
cd747aefcba1
Fixed a few bugs in mission 7
belphegorr <szabibibi@gmail.com>
parents:
7448
diff
changeset
|
490 |
SuddenDeathTurns = 35 |
7434
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
491 |
|
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
492 |
for i = 1, #map do |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
493 |
ParseCommand('draw ' .. map[i]) |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
494 |
end |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
495 |
|
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
496 |
AddHogs() |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
497 |
AnimInit() |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
498 |
end |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
499 |
|
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
500 |
function onGameStart() |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
501 |
GetVariables() |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
502 |
SetupAmmo() |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
503 |
SetupPlace() |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
504 |
AnimationSetup() |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
505 |
AddAnim(startAnim) |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
506 |
AddFunction({func = AfterStartAnim, args = {}}) |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
507 |
end |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
508 |
|
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
509 |
function onGameTick() |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
510 |
AnimUnWait() |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
511 |
if ShowAnimation() == false then |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
512 |
return |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
513 |
end |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
514 |
ExecuteAfterAnimations() |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
515 |
CheckEvents() |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
516 |
end |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
517 |
|
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
518 |
function onGearDelete(gear) |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
519 |
gearDead[gear] = true |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
520 |
if GetGearType(gear) == gtHedgehog then |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
521 |
if GetHogTeamName(gear) == loc("Biomechanic Team") then |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
522 |
cyborgsLeft = cyborgsLeft - 1 |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
523 |
end |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
524 |
end |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
525 |
end |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
526 |
|
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
527 |
function onAmmoStoreInit() |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
528 |
SetAmmo(amSkip, 9, 0, 0, 0) |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
529 |
SetAmmo(amSwitch, 9, 0, 0, 0) |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
530 |
SetAmmo(amBazooka, 0, 0, 0, 8) |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
531 |
SetAmmo(amClusterBomb,0, 0, 0, 8) |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
532 |
SetAmmo(amBee, 0, 0, 0, 3) |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
533 |
SetAmmo(amGrenade, 0, 0, 0, 8) |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
534 |
SetAmmo(amWatermelon, 0, 0, 0, 2) |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
535 |
SetAmmo(amSniperRifle, 0, 0, 0, 3) |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
536 |
SetAmmo(amPickHammer, 0, 0, 0, 1) |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
537 |
SetAmmo(amGirder, 0, 0, 0, 3) |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
538 |
SetAmmo(amPortalGun, 0, 0, 0, 1) |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
539 |
end |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
540 |
|
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
541 |
function onNewTurn() |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
542 |
if AnimInProgress() then |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
543 |
TurnTimeLeft = -1 |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
544 |
return |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
545 |
end |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
546 |
if GetHogTeamName(CurrentHedgehog) == loc("011101001") then |
7484
f3a7c4e75815
Mission 7: changed enemy health, ammos, fixed crashes, princess no longer hidden
belphegorr <szabibibi@gmail.com>
parents:
7472
diff
changeset
|
547 |
if CheckCyborgsDead() ~= true then |
f3a7c4e75815
Mission 7: changed enemy health, ammos, fixed crashes, princess no longer hidden
belphegorr <szabibibi@gmail.com>
parents:
7472
diff
changeset
|
548 |
for i = 1, 3 do |
f3a7c4e75815
Mission 7: changed enemy health, ammos, fixed crashes, princess no longer hidden
belphegorr <szabibibi@gmail.com>
parents:
7472
diff
changeset
|
549 |
if gearDead[natives[i]] ~= true then |
f3a7c4e75815
Mission 7: changed enemy health, ammos, fixed crashes, princess no longer hidden
belphegorr <szabibibi@gmail.com>
parents:
7472
diff
changeset
|
550 |
HideHedge(natives[i]) |
f3a7c4e75815
Mission 7: changed enemy health, ammos, fixed crashes, princess no longer hidden
belphegorr <szabibibi@gmail.com>
parents:
7472
diff
changeset
|
551 |
end |
f3a7c4e75815
Mission 7: changed enemy health, ammos, fixed crashes, princess no longer hidden
belphegorr <szabibibi@gmail.com>
parents:
7472
diff
changeset
|
552 |
end |
f3a7c4e75815
Mission 7: changed enemy health, ammos, fixed crashes, princess no longer hidden
belphegorr <szabibibi@gmail.com>
parents:
7472
diff
changeset
|
553 |
end |
12369
5857936921ec
Get rid of some incorrect timeout messages in ACF, by using EndTurn(true)
Wuzzy <almikes@aol.com>
parents:
12268
diff
changeset
|
554 |
EndTurn(true) |
7434
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
555 |
else |
7484
f3a7c4e75815
Mission 7: changed enemy health, ammos, fixed crashes, princess no longer hidden
belphegorr <szabibibi@gmail.com>
parents:
7472
diff
changeset
|
556 |
for i = 1, 3 do |
f3a7c4e75815
Mission 7: changed enemy health, ammos, fixed crashes, princess no longer hidden
belphegorr <szabibibi@gmail.com>
parents:
7472
diff
changeset
|
557 |
if gearDead[natives[i]] ~= true then |
f3a7c4e75815
Mission 7: changed enemy health, ammos, fixed crashes, princess no longer hidden
belphegorr <szabibibi@gmail.com>
parents:
7472
diff
changeset
|
558 |
RestoreHedge(natives[i]) |
f3a7c4e75815
Mission 7: changed enemy health, ammos, fixed crashes, princess no longer hidden
belphegorr <szabibibi@gmail.com>
parents:
7472
diff
changeset
|
559 |
end |
f3a7c4e75815
Mission 7: changed enemy health, ammos, fixed crashes, princess no longer hidden
belphegorr <szabibibi@gmail.com>
parents:
7472
diff
changeset
|
560 |
end |
7434
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
561 |
end |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
562 |
end |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
563 |
|
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
564 |
function onPrecise() |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
565 |
if GameTime > 2500 and AnimInProgress() then |
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
566 |
SetAnimSkip(true) |
7436
4802191f6a09
Removed gfOneClanMode from Mission 7
belphegorr <szabibibi@gmail.com>
parents:
7434
diff
changeset
|
567 |
return |
7434
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
568 |
end |
7496 | 569 |
-- HideHedge(princess) |
570 |
-- for i = 1, 5 do |
|
571 |
-- DeleteGear(cyborgs[i]) |
|
572 |
-- end |
|
573 |
-- AddAmmo(natives[1], amTeleport, 100) |
|
7434
3daea8c9a770
Added Mission 7: Family Reunion
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
574 |
end |