author | Wuzzy <Wuzzy2@mail.ru> |
Tue, 22 Jan 2019 18:00:08 +0100 | |
changeset 14683 | 35fc8266a1e3 |
parent 14682 | 0bba06a05d52 |
child 14919 | 4596357d002d |
permissions | -rw-r--r-- |
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:
12555
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:
12555
diff
changeset
|
2 |
A Classic Fairytale: United we stand |
bca911f8e804
Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents:
12555
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:
12555
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:
12555
diff
changeset
|
5 |
Simple Deathmatch against cannibals in two waves. |
bca911f8e804
Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents:
12555
diff
changeset
|
6 |
|
bca911f8e804
Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents:
12555
diff
changeset
|
7 |
= GOAL = |
bca911f8e804
Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents:
12555
diff
changeset
|
8 |
Kill both Cannfantery (cannibal) teams. |
bca911f8e804
Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents:
12555
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:
12555
diff
changeset
|
10 |
= FLOW CHART = |
bca911f8e804
Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents:
12555
diff
changeset
|
11 |
|
bca911f8e804
Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents:
12555
diff
changeset
|
12 |
- Light Cannfantery and player hogs spawn |
bca911f8e804
Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents:
12555
diff
changeset
|
13 |
- Cut scene: startAnim |
bca911f8e804
Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents:
12555
diff
changeset
|
14 |
- 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:
12555
diff
changeset
|
15 |
- Light Cannfantery defeated |
bca911f8e804
Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents:
12555
diff
changeset
|
16 |
- Cut scene: wave2Anim |
bca911f8e804
Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents:
12555
diff
changeset
|
17 |
- Heavy Cannfantery spawns |
bca911f8e804
Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents:
12555
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:
12555
diff
changeset
|
19 |
- Heavy Cannfantery defeated |
bca911f8e804
Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents:
12555
diff
changeset
|
20 |
- Cut scene: finalAnim |
bca911f8e804
Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents:
12555
diff
changeset
|
21 |
> 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:
12555
diff
changeset
|
22 |
|
bca911f8e804
Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents:
12555
diff
changeset
|
23 |
]] |
bca911f8e804
Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents:
12555
diff
changeset
|
24 |
|
8043 | 25 |
HedgewarsScriptLoad("/Scripts/Locale.lua") |
26 |
HedgewarsScriptLoad("/Scripts/Animate.lua") |
|
7222
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
27 |
|
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
28 |
-----------------------------Constants--------------------------------- |
13145
5083fb0a2992
A Classic Fairytale: Harden all missions against missing campaign variables in team file and assume default values
Wuzzy <Wuzzy2@mail.ru>
parents:
12933
diff
changeset
|
29 |
choiceAccepted = 1 |
5083fb0a2992
A Classic Fairytale: Harden all missions against missing campaign variables in team file and assume default values
Wuzzy <Wuzzy2@mail.ru>
parents:
12933
diff
changeset
|
30 |
choiceRefused = 2 |
5083fb0a2992
A Classic Fairytale: Harden all missions against missing campaign variables in team file and assume default values
Wuzzy <Wuzzy2@mail.ru>
parents:
12933
diff
changeset
|
31 |
choiceAttacked = 3 |
7222
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
32 |
|
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
33 |
leaksPos = {2067, 509} |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
34 |
densePos = {1882, 503} |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
35 |
waterPos = {3100, 930} |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
36 |
buffaloPos = {2609, 494} |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
37 |
chiefPos = {2538, 617} |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
38 |
cannibalPos = {{2219, 1339}, {2322, 1357}, {805, 784}, {3876, 1048}, |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
39 |
{1101, 916}, {2854, 1408}, {1974, 486}, {1103, 961}} |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
40 |
|
7225
e3f2280d9000
Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents:
7222
diff
changeset
|
41 |
HogNames = {loc("Olive"), loc("Brain Stu"), loc("Brainila"), loc("Salivaslurper"), |
7675
58620e9e5ed5
Fixed grammar/vocabulary and improved balance
belphegorr <szabibibi@gmail.com>
parents:
7512
diff
changeset
|
42 |
loc("Spleenlover"), loc("Thighlicker"), loc("NomNom"), loc("Mindy")} |
7222
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
43 |
|
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
44 |
natives = {} |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
45 |
-----------------------------Variables--------------------------------- |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
46 |
cannibals = {} |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
47 |
cannibalDead = {} |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
48 |
cannibalHidden = {} |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
49 |
cratesSpawned = {} |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
50 |
healthCratesSpawned = {} |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
51 |
|
7249
79b399c04410
Reduced mission 4 difficulty (enemy health and level) and fixed a bug where hogs would comment on the death of Dense Cloud eve though he isn't added
belphegorr <szabibibi@gmail.com>
parents:
7247
diff
changeset
|
52 |
sdrmv = 0 |
7222
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
53 |
denseDead = false |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
54 |
leaksDead = false |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
55 |
waterDead = false |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
56 |
buffaloDead = false |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
57 |
chiefDead = false |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
58 |
nativesDead = {} |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
59 |
|
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
60 |
m2Choice = 0 |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
61 |
m2DenseDead = 0 |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
62 |
|
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
63 |
startAnim = {} |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
64 |
wave2Anim = {} |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
65 |
finalAnim = {} |
14506
f37910a73c19
Refactor ACF missions, store team names in variables
Wuzzy <Wuzzy2@mail.ru>
parents:
14422
diff
changeset
|
66 |
|
f37910a73c19
Refactor ACF missions, store team names in variables
Wuzzy <Wuzzy2@mail.ru>
parents:
14422
diff
changeset
|
67 |
nativesTeamName = nil |
f37910a73c19
Refactor ACF missions, store team names in variables
Wuzzy <Wuzzy2@mail.ru>
parents:
14422
diff
changeset
|
68 |
cyborgTeamName = nil |
f37910a73c19
Refactor ACF missions, store team names in variables
Wuzzy <Wuzzy2@mail.ru>
parents:
14422
diff
changeset
|
69 |
|
7222
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
70 |
--------------------------Anim skip functions-------------------------- |
7241
7fda4d886c5e
Modified Mission 4: reduced second wave health, reduced some ammos, added some ammos, added reaction to hog death, added reaction to second wave of hogs
belphegorr <szabibibi@gmail.com>
parents:
7225
diff
changeset
|
71 |
function AfterHogDeadAnim() |
7fda4d886c5e
Modified Mission 4: reduced second wave health, reduced some ammos, added some ammos, added reaction to hog death, added reaction to second wave of hogs
belphegorr <szabibibi@gmail.com>
parents:
7225
diff
changeset
|
72 |
freshDead = nil |
13742
2bb7141496a9
Use SetTurnTimeLeft and SetReadyTimeLeft in all scripts
Wuzzy <Wuzzy2@mail.ru>
parents:
13583
diff
changeset
|
73 |
SetTurnTimeLeft(TurnTime) |
7241
7fda4d886c5e
Modified Mission 4: reduced second wave health, reduced some ammos, added some ammos, added reaction to hog death, added reaction to second wave of hogs
belphegorr <szabibibi@gmail.com>
parents:
7225
diff
changeset
|
74 |
end |
7fda4d886c5e
Modified Mission 4: reduced second wave health, reduced some ammos, added some ammos, added reaction to hog death, added reaction to second wave of hogs
belphegorr <szabibibi@gmail.com>
parents:
7225
diff
changeset
|
75 |
|
7222
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
76 |
function AfterStartAnim() |
14521 | 77 |
local goal = loc("Defeat the cannibals!") |
7247
9aba0c6458af
Changed a ShowMission in Mission 4
belphegorr <szabibibi@gmail.com>
parents:
7245
diff
changeset
|
78 |
local chiefgoal = loc("Try to protect the chief! You won't lose if he dies, but it is advised that he survives.") |
13742
2bb7141496a9
Use SetTurnTimeLeft and SetReadyTimeLeft in all scripts
Wuzzy <Wuzzy2@mail.ru>
parents:
13583
diff
changeset
|
79 |
SetTurnTimeLeft(TurnTime) |
14521 | 80 |
ShowMission(loc("United We Stand"), loc("Invasion"), goal .. "|" .. chiefgoal, 1, 6000) |
7222
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
81 |
end |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
82 |
|
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
83 |
function SkipStartAnim() |
7448
d0521a3a4358
Solved "floating repositionings" in every mission
belphegorr <szabibibi@gmail.com>
parents:
7253
diff
changeset
|
84 |
AnimSetGearPosition(water, 2467, 754) |
7222
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
85 |
if cratesSpawned[1] ~= true then |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
86 |
SpawnCrates(1) |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
87 |
end |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
88 |
if healthCratesSpawned[1] ~= true then |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
89 |
SpawnHealthCrates(1) |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
90 |
end |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
91 |
if cannibalHidden[1] == true then |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
92 |
RestoreWave(1) |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
93 |
end |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
94 |
AnimSwitchHog(leaks) |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
95 |
end |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
96 |
|
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
97 |
function SkipWave2Anim() |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
98 |
if cratesSpawned[2] ~= true then |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
99 |
SpawnCrates(2) |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
100 |
end |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
101 |
if healthCratesSpawned[2] ~= true then |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
102 |
SpawnHealthCrates(2) |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
103 |
end |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
104 |
if cannibalHidden[5] == true then |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
105 |
RestoreWave(2) |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
106 |
end |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
107 |
AnimSwitchHog(cannibals[5]) |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
108 |
end |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
109 |
|
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
110 |
function AfterWave2Anim() |
12555
d51ea6ac1ca1
ACF: Replace TurnTimeLeft=0 with EndTurn(true)
Wuzzy <almikes@aol.com>
parents:
12554
diff
changeset
|
111 |
EndTurn(true) |
7222
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
112 |
end |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
113 |
|
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
114 |
function AfterFinalAnim() |
7251
cba4960b426f
Fixed a bug where certain ammo types were added to the wrong hogs.
belphegorr <szabibibi@gmail.com>
parents:
7249
diff
changeset
|
115 |
if leaksDead == true then |
cba4960b426f
Fixed a bug where certain ammo types were added to the wrong hogs.
belphegorr <szabibibi@gmail.com>
parents:
7249
diff
changeset
|
116 |
SaveCampaignVar("M4LeaksDead", "1") |
cba4960b426f
Fixed a bug where certain ammo types were added to the wrong hogs.
belphegorr <szabibibi@gmail.com>
parents:
7249
diff
changeset
|
117 |
else |
cba4960b426f
Fixed a bug where certain ammo types were added to the wrong hogs.
belphegorr <szabibibi@gmail.com>
parents:
7249
diff
changeset
|
118 |
SaveCampaignVar("M4LeaksDead", "0") |
cba4960b426f
Fixed a bug where certain ammo types were added to the wrong hogs.
belphegorr <szabibibi@gmail.com>
parents:
7249
diff
changeset
|
119 |
end |
7222
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
120 |
if chiefDead == true then |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
121 |
SaveCampaignVar("M4ChiefDead", "1") |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
122 |
else |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
123 |
SaveCampaignVar("M4ChiefDead", "0") |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
124 |
end |
7249
79b399c04410
Reduced mission 4 difficulty (enemy health and level) and fixed a bug where hogs would comment on the death of Dense Cloud eve though he isn't added
belphegorr <szabibibi@gmail.com>
parents:
7247
diff
changeset
|
125 |
if buffaloDead == true then |
79b399c04410
Reduced mission 4 difficulty (enemy health and level) and fixed a bug where hogs would comment on the death of Dense Cloud eve though he isn't added
belphegorr <szabibibi@gmail.com>
parents:
7247
diff
changeset
|
126 |
SaveCampaignVar("M4BuffaloDead", "1") |
79b399c04410
Reduced mission 4 difficulty (enemy health and level) and fixed a bug where hogs would comment on the death of Dense Cloud eve though he isn't added
belphegorr <szabibibi@gmail.com>
parents:
7247
diff
changeset
|
127 |
else |
79b399c04410
Reduced mission 4 difficulty (enemy health and level) and fixed a bug where hogs would comment on the death of Dense Cloud eve though he isn't added
belphegorr <szabibibi@gmail.com>
parents:
7247
diff
changeset
|
128 |
SaveCampaignVar("M4BuffaloDead", "0") |
79b399c04410
Reduced mission 4 difficulty (enemy health and level) and fixed a bug where hogs would comment on the death of Dense Cloud eve though he isn't added
belphegorr <szabibibi@gmail.com>
parents:
7247
diff
changeset
|
129 |
end |
79b399c04410
Reduced mission 4 difficulty (enemy health and level) and fixed a bug where hogs would comment on the death of Dense Cloud eve though he isn't added
belphegorr <szabibibi@gmail.com>
parents:
7247
diff
changeset
|
130 |
if waterDead == true then |
79b399c04410
Reduced mission 4 difficulty (enemy health and level) and fixed a bug where hogs would comment on the death of Dense Cloud eve though he isn't added
belphegorr <szabibibi@gmail.com>
parents:
7247
diff
changeset
|
131 |
SaveCampaignVar("M4WaterDead", "1") |
79b399c04410
Reduced mission 4 difficulty (enemy health and level) and fixed a bug where hogs would comment on the death of Dense Cloud eve though he isn't added
belphegorr <szabibibi@gmail.com>
parents:
7247
diff
changeset
|
132 |
else |
79b399c04410
Reduced mission 4 difficulty (enemy health and level) and fixed a bug where hogs would comment on the death of Dense Cloud eve though he isn't added
belphegorr <szabibibi@gmail.com>
parents:
7247
diff
changeset
|
133 |
SaveCampaignVar("M4WaterDead", "0") |
79b399c04410
Reduced mission 4 difficulty (enemy health and level) and fixed a bug where hogs would comment on the death of Dense Cloud eve though he isn't added
belphegorr <szabibibi@gmail.com>
parents:
7247
diff
changeset
|
134 |
end |
79b399c04410
Reduced mission 4 difficulty (enemy health and level) and fixed a bug where hogs would comment on the death of Dense Cloud eve though he isn't added
belphegorr <szabibibi@gmail.com>
parents:
7247
diff
changeset
|
135 |
if denseDead == true then |
79b399c04410
Reduced mission 4 difficulty (enemy health and level) and fixed a bug where hogs would comment on the death of Dense Cloud eve though he isn't added
belphegorr <szabibibi@gmail.com>
parents:
7247
diff
changeset
|
136 |
SaveCampaignVar("M4DenseDead", "1") |
79b399c04410
Reduced mission 4 difficulty (enemy health and level) and fixed a bug where hogs would comment on the death of Dense Cloud eve though he isn't added
belphegorr <szabibibi@gmail.com>
parents:
7247
diff
changeset
|
137 |
else |
79b399c04410
Reduced mission 4 difficulty (enemy health and level) and fixed a bug where hogs would comment on the death of Dense Cloud eve though he isn't added
belphegorr <szabibibi@gmail.com>
parents:
7247
diff
changeset
|
138 |
SaveCampaignVar("M4DenseDead", "0") |
79b399c04410
Reduced mission 4 difficulty (enemy health and level) and fixed a bug where hogs would comment on the death of Dense Cloud eve though he isn't added
belphegorr <szabibibi@gmail.com>
parents:
7247
diff
changeset
|
139 |
end |
8944
ed2509832311
fix bug that locked unlocked campaign missions, see issue 452
Periklis Ntanasis <pntanasis@gmail.com>
parents:
8043
diff
changeset
|
140 |
if progress and progress<4 then |
ed2509832311
fix bug that locked unlocked campaign missions, see issue 452
Periklis Ntanasis <pntanasis@gmail.com>
parents:
8043
diff
changeset
|
141 |
SaveCampaignVar("Progress", "4") |
ed2509832311
fix bug that locked unlocked campaign missions, see issue 452
Periklis Ntanasis <pntanasis@gmail.com>
parents:
8043
diff
changeset
|
142 |
end |
14506
f37910a73c19
Refactor ACF missions, store team names in variables
Wuzzy <Wuzzy2@mail.ru>
parents:
14422
diff
changeset
|
143 |
DismissTeam(cyborgTeamName) |
12555
d51ea6ac1ca1
ACF: Replace TurnTimeLeft=0 with EndTurn(true)
Wuzzy <almikes@aol.com>
parents:
12554
diff
changeset
|
144 |
EndTurn(true) |
7222
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
145 |
end |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
146 |
-----------------------------Animations-------------------------------- |
7241
7fda4d886c5e
Modified Mission 4: reduced second wave health, reduced some ammos, added some ammos, added reaction to hog death, added reaction to second wave of hogs
belphegorr <szabibibi@gmail.com>
parents:
7225
diff
changeset
|
147 |
function Wave2Reaction() |
7fda4d886c5e
Modified Mission 4: reduced second wave health, reduced some ammos, added some ammos, added reaction to hog death, added reaction to second wave of hogs
belphegorr <szabibibi@gmail.com>
parents:
7225
diff
changeset
|
148 |
local i = 1 |
7fda4d886c5e
Modified Mission 4: reduced second wave health, reduced some ammos, added some ammos, added reaction to hog death, added reaction to second wave of hogs
belphegorr <szabibibi@gmail.com>
parents:
7225
diff
changeset
|
149 |
local gearr = nil |
7fda4d886c5e
Modified Mission 4: reduced second wave health, reduced some ammos, added some ammos, added reaction to hog death, added reaction to second wave of hogs
belphegorr <szabibibi@gmail.com>
parents:
7225
diff
changeset
|
150 |
while nativesDead[i] == true do |
7fda4d886c5e
Modified Mission 4: reduced second wave health, reduced some ammos, added some ammos, added reaction to hog death, added reaction to second wave of hogs
belphegorr <szabibibi@gmail.com>
parents:
7225
diff
changeset
|
151 |
i = i + 1 |
7fda4d886c5e
Modified Mission 4: reduced second wave health, reduced some ammos, added some ammos, added reaction to hog death, added reaction to second wave of hogs
belphegorr <szabibibi@gmail.com>
parents:
7225
diff
changeset
|
152 |
end |
7fda4d886c5e
Modified Mission 4: reduced second wave health, reduced some ammos, added some ammos, added reaction to hog death, added reaction to second wave of hogs
belphegorr <szabibibi@gmail.com>
parents:
7225
diff
changeset
|
153 |
gearr = natives[i] |
7fda4d886c5e
Modified Mission 4: reduced second wave health, reduced some ammos, added some ammos, added reaction to hog death, added reaction to second wave of hogs
belphegorr <szabibibi@gmail.com>
parents:
7225
diff
changeset
|
154 |
if denseDead ~= true and band(GetState(dense), gstDrowning) == 0 then |
7fda4d886c5e
Modified Mission 4: reduced second wave health, reduced some ammos, added some ammos, added reaction to hog death, added reaction to second wave of hogs
belphegorr <szabibibi@gmail.com>
parents:
7225
diff
changeset
|
155 |
AnimInsertStepNext({func = AnimSay, args = {dense, loc("I'm so scared!"), SAY_SAY, 3000}}) |
7243
9ae9178c525e
Modified Animate.lua function AnimMove to take highercase direction (e.g. "Left")
belphegorr <szabibibi@gmail.com>
parents:
7241
diff
changeset
|
156 |
AnimInsertStepNext({func = AnimCustomFunction, args = {dense, EmitDenseClouds, {"Left"}}}) |
7241
7fda4d886c5e
Modified Mission 4: reduced second wave health, reduced some ammos, added some ammos, added reaction to hog death, added reaction to second wave of hogs
belphegorr <szabibibi@gmail.com>
parents:
7225
diff
changeset
|
157 |
AnimInsertStepNext({func = AnimTurn, args = {dense, "Left"}}) |
7fda4d886c5e
Modified Mission 4: reduced second wave health, reduced some ammos, added some ammos, added reaction to hog death, added reaction to second wave of hogs
belphegorr <szabibibi@gmail.com>
parents:
7225
diff
changeset
|
158 |
end |
7fda4d886c5e
Modified Mission 4: reduced second wave health, reduced some ammos, added some ammos, added reaction to hog death, added reaction to second wave of hogs
belphegorr <szabibibi@gmail.com>
parents:
7225
diff
changeset
|
159 |
AnimInsertStepNext({func = AnimSay, args = {gearr, loc("There's more of them? When did they become so hungry?"), SAY_SHOUT, 8000}}) |
7fda4d886c5e
Modified Mission 4: reduced second wave health, reduced some ammos, added some ammos, added reaction to hog death, added reaction to second wave of hogs
belphegorr <szabibibi@gmail.com>
parents:
7225
diff
changeset
|
160 |
end |
7222
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
161 |
|
7241
7fda4d886c5e
Modified Mission 4: reduced second wave health, reduced some ammos, added some ammos, added reaction to hog death, added reaction to second wave of hogs
belphegorr <szabibibi@gmail.com>
parents:
7225
diff
changeset
|
162 |
function EmitDenseClouds(dir) |
7222
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
163 |
local dif |
7243
9ae9178c525e
Modified Animate.lua function AnimMove to take highercase direction (e.g. "Left")
belphegorr <szabibibi@gmail.com>
parents:
7241
diff
changeset
|
164 |
if dir == "Left" then |
7222
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
165 |
dif = 10 |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
166 |
else |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
167 |
dif = -10 |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
168 |
end |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
169 |
AnimInsertStepNext({func = AnimVisualGear, args = {dense, GetX(dense) + dif, GetY(dense) + dif, vgtSteam, 0, true}, swh = false}) |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
170 |
AnimInsertStepNext({func = AnimVisualGear, args = {dense, GetX(dense) + dif, GetY(dense) + dif, vgtSteam, 0, true}, swh = false}) |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
171 |
AnimInsertStepNext({func = AnimVisualGear, args = {dense, GetX(dense) + dif, GetY(dense) + dif, vgtSteam, 0, true}, swh = false}) |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
172 |
AnimInsertStepNext({func = AnimWait, args = {dense, 800}}) |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
173 |
AnimInsertStepNext({func = AnimVisualGear, args = {dense, GetX(dense) + dif, GetY(dense) + dif, vgtSteam, 0, true}, swh = false}) |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
174 |
AnimInsertStepNext({func = AnimVisualGear, args = {dense, GetX(dense) + dif, GetY(dense) + dif, vgtSteam, 0, true}, swh = false}) |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
175 |
AnimInsertStepNext({func = AnimWait, args = {dense, 800}}) |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
176 |
AnimInsertStepNext({func = AnimVisualGear, args = {dense, GetX(dense) + dif, GetY(dense) + dif, vgtSteam, 0, true}, swh = false}) |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
177 |
end |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
178 |
|
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
179 |
function AnimationSetup() |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
180 |
table.insert(startAnim, {func = AnimWait, args = {leaks, 4000}}) |
7225
e3f2280d9000
Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents:
7222
diff
changeset
|
181 |
table.insert(startAnim, {func = AnimCaption, args = {leaks, loc("Back in the village, after telling the villagers about the threat..."), 5000}}) |
e3f2280d9000
Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents:
7222
diff
changeset
|
182 |
table.insert(startAnim, {func = AnimCaption, args = {leaks, loc("Their buildings were very primitive back then, even for an uncivilised island."), 7000}}) |
e3f2280d9000
Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents:
7222
diff
changeset
|
183 |
table.insert(startAnim, {func = AnimSay, args = {chief, loc("Young one, you are telling us that they can instantly change location without a shaman?"), SAY_SAY, 8000}}) |
e3f2280d9000
Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents:
7222
diff
changeset
|
184 |
table.insert(startAnim, {func = AnimSay, args = {chief, loc("That is, indeed, very weird..."), SAY_SAY, 3500}}) |
e3f2280d9000
Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents:
7222
diff
changeset
|
185 |
table.insert(startAnim, {func = AnimSay, args = {buffalo, loc("If they try coming here, they can have a taste of my delicious knuckles!"), SAY_SHOUT, 8000}}) |
e3f2280d9000
Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents:
7222
diff
changeset
|
186 |
table.insert(startAnim, {func = AnimSay, args = {buffalo, loc("Haha!"), SAY_SHOUT, 2000}}) |
7222
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
187 |
if denseDead == false then |
7225
e3f2280d9000
Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents:
7222
diff
changeset
|
188 |
table.insert(startAnim, {func = AnimSay, args = {dense, loc("I'm not sure about that!"), SAY_SAY, 3400}}) |
e3f2280d9000
Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents:
7222
diff
changeset
|
189 |
table.insert(startAnim, {func = AnimSay, args = {dense, loc("They have weapons we've never seen before!"), SAY_SAY, 5000}}) |
e3f2280d9000
Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents:
7222
diff
changeset
|
190 |
table.insert(startAnim, {func = AnimSay, args = {dense, loc("Luckily, I've managed to snatch some of them."), SAY_SAY, 5000}}) |
7222
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
191 |
table.insert(startAnim, {func = AnimCustomFunction, args = {dense, SpawnCrates, {1}}}) |
7225
e3f2280d9000
Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents:
7222
diff
changeset
|
192 |
table.insert(startAnim, {func = AnimSay, args = {dense, loc("Oops...I dropped them."), SAY_SAY, 3000}}) |
7222
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
193 |
else |
7225
e3f2280d9000
Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents:
7222
diff
changeset
|
194 |
table.insert(startAnim, {func = AnimSay, args = {leaks, loc("I'm not sure about that!"), SAY_SAY, 3400}}) |
e3f2280d9000
Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents:
7222
diff
changeset
|
195 |
table.insert(startAnim, {func = AnimSay, args = {leaks, loc("They have weapons we've never seen before!"), SAY_SAY, 5000}}) |
7222
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
196 |
table.insert(startAnim, {func = AnimCustomFunction, args = {leaks, SpawnCrates, {1}}}) |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
197 |
table.insert(startAnim, {func = AnimWait, args = {leaks, 1000}}) |
7225
e3f2280d9000
Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents:
7222
diff
changeset
|
198 |
table.insert(startAnim, {func = AnimSay, args = {leaks, loc("They keep appearing like this. It's weird!"), SAY_SAY, 5000}}) |
7222
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
199 |
end |
7225
e3f2280d9000
Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents:
7222
diff
changeset
|
200 |
table.insert(startAnim, {func = AnimSay, args = {chief, loc("Did anyone follow you?"), SAY_SAY, 3000}}) |
e3f2280d9000
Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents:
7222
diff
changeset
|
201 |
table.insert(startAnim, {func = AnimSay, args = {leaks, loc("No, we made sure of that!"), SAY_SAY, 3500}}) |
7222
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
202 |
table.insert(startAnim, {func = AnimCustomFunction, args = {leaks, SpawnHealthCrates, {1}}}) |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
203 |
table.insert(startAnim, {func = AnimWait, args = {leaks, 1000}}) |
7225
e3f2280d9000
Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents:
7222
diff
changeset
|
204 |
table.insert(startAnim, {func = AnimSay, args = {chief, loc("First aid kits?!"), SAY_SAY, 3000}}) |
e3f2280d9000
Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents:
7222
diff
changeset
|
205 |
table.insert(startAnim, {func = AnimSay, args = {leaks, loc("I've seen this before. They just appear out of thin air."), SAY_SAY, 7000}}) |
7243
9ae9178c525e
Modified Animate.lua function AnimMove to take highercase direction (e.g. "Left")
belphegorr <szabibibi@gmail.com>
parents:
7241
diff
changeset
|
206 |
table.insert(startAnim, {func = AnimMove, args = {water, "Left", 3000, 0}}) |
7222
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
207 |
table.insert(startAnim, {func = AnimJump, args = {water, "long"}}) |
7243
9ae9178c525e
Modified Animate.lua function AnimMove to take highercase direction (e.g. "Left")
belphegorr <szabibibi@gmail.com>
parents:
7241
diff
changeset
|
208 |
table.insert(startAnim, {func = AnimMove, args = {water, "Left", 2655, 0}}) |
7222
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
209 |
table.insert(startAnim, {func = AnimTurn, args = {water, "Right"}}) |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
210 |
table.insert(startAnim, {func = AnimJump, args = {water, "back"}}) |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
211 |
table.insert(startAnim, {func = AnimJump, args = {water, "back"}}) |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
212 |
table.insert(startAnim, {func = AnimTurn, args = {water, "Left"}}) |
7243
9ae9178c525e
Modified Animate.lua function AnimMove to take highercase direction (e.g. "Left")
belphegorr <szabibibi@gmail.com>
parents:
7241
diff
changeset
|
213 |
table.insert(startAnim, {func = AnimMove, args = {water, "Left", 2467, 754}}) |
7225
e3f2280d9000
Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents:
7222
diff
changeset
|
214 |
table.insert(startAnim, {func = AnimSay, args = {water, loc("Hey guys!"), SAY_SAY, 2500}}) |
e3f2280d9000
Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents:
7222
diff
changeset
|
215 |
table.insert(startAnim, {func = AnimSay, args = {chief, loc("..."), SAY_THINK, 1500}}) |
e3f2280d9000
Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents:
7222
diff
changeset
|
216 |
table.insert(startAnim, {func = AnimSay, args = {chief, loc("Where have you been?"), SAY_SAY, 4000}}) |
e3f2280d9000
Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents:
7222
diff
changeset
|
217 |
table.insert(startAnim, {func = AnimSay, args = {water, loc("Just on a walk."), SAY_SAY, 3000}}) |
e3f2280d9000
Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents:
7222
diff
changeset
|
218 |
table.insert(startAnim, {func = AnimSay, args = {chief, loc("You have chosen the perfect moment to leave."), SAY_SAY, 6000}}) |
7222
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
219 |
table.insert(startAnim, {func = AnimCustomFunction, args = {chief, RestoreWave, {1}}}) |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
220 |
for i = 1, 4 do |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
221 |
table.insert(startAnim, {func = AnimOutOfNowhere, args = {cannibals[i], unpack(cannibalPos[i])}}) |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
222 |
end |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
223 |
table.insert(startAnim, {func = AnimWait, args = {chief, 1500}}) |
12263
2c8e7e73ef58
Use format strings everywhere in A Classic Fairytale (for translators)
Wuzzy <almikes@aol.com>
parents:
12224
diff
changeset
|
224 |
table.insert(startAnim, {func = AnimSay, args = {leaks, loc("HOW DO THEY KNOW WHERE WE ARE?"), SAY_SHOUT, 5000}}) |
7225
e3f2280d9000
Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents:
7222
diff
changeset
|
225 |
table.insert(startAnim, {func = AnimSay, args = {chief, loc("We have to protect the village!"), SAY_SAY, 5000}}) |
7222
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
226 |
table.insert(startAnim, {func = AnimSwitchHog, args = {leaks}}) |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
227 |
AddSkipFunction(startAnim, SkipStartAnim, {}) |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
228 |
|
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
229 |
table.insert(wave2Anim, {func = AnimCustomFunction, args = {leaks, RestoreWave, {2}}, swh = false}) |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
230 |
for i = 5, 8 do |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
231 |
table.insert(wave2Anim, {func = AnimOutOfNowhere, args = {cannibals[i], unpack(cannibalPos[i])}}) |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
232 |
end |
7241
7fda4d886c5e
Modified Mission 4: reduced second wave health, reduced some ammos, added some ammos, added reaction to hog death, added reaction to second wave of hogs
belphegorr <szabibibi@gmail.com>
parents:
7225
diff
changeset
|
233 |
table.insert(wave2Anim, {func = AnimCustomFunction, args = {leaks, Wave2Reaction, {}}, swh = false}) |
7222
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
234 |
table.insert(wave2Anim, {func = AnimCustomFunction, args = {leaks, SpawnCrates, {2}}, swh = false}) |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
235 |
table.insert(wave2Anim, {func = AnimCustomFunction, args = {leaks, SpawnHealthCrates, {2}}, swh = false}) |
7243
9ae9178c525e
Modified Animate.lua function AnimMove to take highercase direction (e.g. "Left")
belphegorr <szabibibi@gmail.com>
parents:
7241
diff
changeset
|
236 |
table.insert(wave2Anim, {func = AnimSwitchHog, args = {cannibals[5]}}) |
7222
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
237 |
AddSkipFunction(wave2Anim, SkipWave2Anim, {}) |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
238 |
end |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
239 |
|
7241
7fda4d886c5e
Modified Mission 4: reduced second wave health, reduced some ammos, added some ammos, added reaction to hog death, added reaction to second wave of hogs
belphegorr <szabibibi@gmail.com>
parents:
7225
diff
changeset
|
240 |
function SetupHogDeadAnim(gear) |
7fda4d886c5e
Modified Mission 4: reduced second wave health, reduced some ammos, added some ammos, added reaction to hog death, added reaction to second wave of hogs
belphegorr <szabibibi@gmail.com>
parents:
7225
diff
changeset
|
241 |
hogDeadAnim = {} |
7fda4d886c5e
Modified Mission 4: reduced second wave health, reduced some ammos, added some ammos, added reaction to hog death, added reaction to second wave of hogs
belphegorr <szabibibi@gmail.com>
parents:
7225
diff
changeset
|
242 |
if nativesNum == 0 then |
7fda4d886c5e
Modified Mission 4: reduced second wave health, reduced some ammos, added some ammos, added reaction to hog death, added reaction to second wave of hogs
belphegorr <szabibibi@gmail.com>
parents:
7225
diff
changeset
|
243 |
return |
7fda4d886c5e
Modified Mission 4: reduced second wave health, reduced some ammos, added some ammos, added reaction to hog death, added reaction to second wave of hogs
belphegorr <szabibibi@gmail.com>
parents:
7225
diff
changeset
|
244 |
end |
12263
2c8e7e73ef58
Use format strings everywhere in A Classic Fairytale (for translators)
Wuzzy <almikes@aol.com>
parents:
12224
diff
changeset
|
245 |
local hogDeadStrings = {string.format(loc("They killed %s! You bastards!"), gear), |
2c8e7e73ef58
Use format strings everywhere in A Classic Fairytale (for translators)
Wuzzy <almikes@aol.com>
parents:
12224
diff
changeset
|
246 |
string.format(loc("%s! Why?!"), gear), |
7827
353d90ddc188
Fix bad loc calls in campaign, rope training. Regenerate lua. Untested.
nemo
parents:
7675
diff
changeset
|
247 |
loc("That was just mean!"), |
12263
2c8e7e73ef58
Use format strings everywhere in A Classic Fairytale (for translators)
Wuzzy <almikes@aol.com>
parents:
12224
diff
changeset
|
248 |
string.format(loc("Oh no, not %s!"), gear)} |
7241
7fda4d886c5e
Modified Mission 4: reduced second wave health, reduced some ammos, added some ammos, added reaction to hog death, added reaction to second wave of hogs
belphegorr <szabibibi@gmail.com>
parents:
7225
diff
changeset
|
249 |
table.insert(hogDeadAnim, {func = AnimSay, args = {CurrentHedgehog, hogDeadStrings[nativesNum], SAY_SHOUT, 4000}}) |
7fda4d886c5e
Modified Mission 4: reduced second wave health, reduced some ammos, added some ammos, added reaction to hog death, added reaction to second wave of hogs
belphegorr <szabibibi@gmail.com>
parents:
7225
diff
changeset
|
250 |
end |
7fda4d886c5e
Modified Mission 4: reduced second wave health, reduced some ammos, added some ammos, added reaction to hog death, added reaction to second wave of hogs
belphegorr <szabibibi@gmail.com>
parents:
7225
diff
changeset
|
251 |
|
7222
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
252 |
function SetupFinalAnim() |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
253 |
local found = 0 |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
254 |
local hogs = {} |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
255 |
local i = 1 |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
256 |
if nativesNum >= 2 then |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
257 |
while found < 2 do |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
258 |
if nativesDead[i] ~= true then |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
259 |
found = found + 1 |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
260 |
hogs[found] = natives[i] |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
261 |
end |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
262 |
i = i + 1 |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
263 |
end |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
264 |
if chiefDead ~= true then |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
265 |
hogs[2] = chief |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
266 |
end |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
267 |
table.insert(finalAnim, {func = AnimCustomFunction, args = {hogs[1], CondNeedToTurn, {hogs[1], hogs[2]}}}) |
7225
e3f2280d9000
Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents:
7222
diff
changeset
|
268 |
table.insert(finalAnim, {func = AnimSay, args = {hogs[1], loc("We can't hold them up much longer!"), SAY_SAY, 5000}}) |
e3f2280d9000
Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents:
7222
diff
changeset
|
269 |
table.insert(finalAnim, {func = AnimSay, args = {hogs[1], loc("We need to move!"), SAY_SAY, 3000}}) |
e3f2280d9000
Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents:
7222
diff
changeset
|
270 |
table.insert(finalAnim, {func = AnimSay, args = {hogs[2], loc("But where can we go?"), SAY_SAY, 3000}}) |
e3f2280d9000
Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents:
7222
diff
changeset
|
271 |
table.insert(finalAnim, {func = AnimSay, args = {hogs[1], loc("To the caves..."), SAY_SAY, 2500}}) |
e3f2280d9000
Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents:
7222
diff
changeset
|
272 |
table.insert(finalAnim, {func = AnimSay, args = {hogs[2], loc("Good idea, they'll never find us there!"), SAY_SAY, 5000}}) |
7222
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
273 |
else |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
274 |
for i = 1, 5 do |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
275 |
if nativesDead[i] ~= true then |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
276 |
hogs[1] = natives[i] |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
277 |
end |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
278 |
end |
7225
e3f2280d9000
Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents:
7222
diff
changeset
|
279 |
table.insert(finalAnim, {func = AnimSay, args = {hogs[1], loc("I need to move the tribe!"), SAY_THINK, 4000}}) |
e3f2280d9000
Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents:
7222
diff
changeset
|
280 |
table.insert(finalAnim, {func = AnimSay, args = {hogs[1], loc("The caves are well hidden, they won't find us there!"), SAY_THINK, 7000}}) |
7222
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
281 |
end |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
282 |
end |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
283 |
-----------------------------Misc-------------------------------------- |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
284 |
function RestoreWave(index) |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
285 |
for i = (index - 1) * 4 + 1, index * 4 do |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
286 |
RestoreHog(cannibals[i]) |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
287 |
cannibalHidden[i] = false |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
288 |
end |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
289 |
end |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
290 |
|
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
291 |
function GetVariables() |
14682
0bba06a05d52
ACF: Dump unused campaign vars, use fallback values
Wuzzy <Wuzzy2@mail.ru>
parents:
14521
diff
changeset
|
292 |
m2DenseDead = tonumber(GetCampaignVar("M2DenseDead")) or 0 |
7222
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
293 |
if m2DenseDead == 1 then |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
294 |
denseDead = true |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
295 |
end |
13145
5083fb0a2992
A Classic Fairytale: Harden all missions against missing campaign variables in team file and assume default values
Wuzzy <Wuzzy2@mail.ru>
parents:
12933
diff
changeset
|
296 |
m2Choice = tonumber(GetCampaignVar("M2Choice")) or choiceRefused |
7222
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
297 |
end |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
298 |
|
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
299 |
function SetupPlace() |
7245
53f73f4ae203
Modified frontend so that updating campaogn progress no longer changes current index of the mission combo box
belphegorr <szabibibi@gmail.com>
parents:
7243
diff
changeset
|
300 |
if m2DenseDead == 1 then |
7249
79b399c04410
Reduced mission 4 difficulty (enemy health and level) and fixed a bug where hogs would comment on the death of Dense Cloud eve though he isn't added
belphegorr <szabibibi@gmail.com>
parents:
7247
diff
changeset
|
301 |
sdrmv = 1 |
7222
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
302 |
DeleteGear(dense) |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
303 |
end |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
304 |
for i = 1, 8 do |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
305 |
HideHog(cannibals[i]) |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
306 |
cannibalHidden[i] = true |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
307 |
end |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
308 |
HideHog(cyborg) |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
309 |
end |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
310 |
|
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
311 |
function SetupEvents() |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
312 |
AddEvent(CheckWaveDead, {1}, DoWaveDead, {1}, 0) |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
313 |
AddEvent(CheckWaveDead, {2}, DoWaveDead, {2}, 0) |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
314 |
end |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
315 |
|
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
316 |
function SetupAmmo() |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
317 |
AddAmmo(cannibals[1], amGrenade, 4) |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
318 |
AddAmmo(cannibals[1], amBazooka, 4) |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
319 |
AddAmmo(cannibals[1], amShotgun, 4) |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
320 |
AddAmmo(cannibals[1], amMine, 2) |
7251
cba4960b426f
Fixed a bug where certain ammo types were added to the wrong hogs.
belphegorr <szabibibi@gmail.com>
parents:
7249
diff
changeset
|
321 |
AddAmmo(cannibals[5], amGrenade, 4) |
cba4960b426f
Fixed a bug where certain ammo types were added to the wrong hogs.
belphegorr <szabibibi@gmail.com>
parents:
7249
diff
changeset
|
322 |
AddAmmo(cannibals[5], amBazooka, 4) |
cba4960b426f
Fixed a bug where certain ammo types were added to the wrong hogs.
belphegorr <szabibibi@gmail.com>
parents:
7249
diff
changeset
|
323 |
AddAmmo(cannibals[5], amShotgun, 4) |
cba4960b426f
Fixed a bug where certain ammo types were added to the wrong hogs.
belphegorr <szabibibi@gmail.com>
parents:
7249
diff
changeset
|
324 |
AddAmmo(cannibals[5], amMine, 2) |
cba4960b426f
Fixed a bug where certain ammo types were added to the wrong hogs.
belphegorr <szabibibi@gmail.com>
parents:
7249
diff
changeset
|
325 |
AddAmmo(cannibals[5], amMolotov, 2) |
cba4960b426f
Fixed a bug where certain ammo types were added to the wrong hogs.
belphegorr <szabibibi@gmail.com>
parents:
7249
diff
changeset
|
326 |
AddAmmo(cannibals[5], amFlamethrower, 3) |
7222
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
327 |
end |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
328 |
|
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
329 |
function AddHogs() |
14507
f8c2b995c009
Use player team name in ACF campaign
Wuzzy <Wuzzy2@mail.ru>
parents:
14506
diff
changeset
|
330 |
nativesTeamName = AddMissionTeam(-2) |
14506
f37910a73c19
Refactor ACF missions, store team names in variables
Wuzzy <Wuzzy2@mail.ru>
parents:
14422
diff
changeset
|
331 |
leaks = AddHog(loc("Leaks A Lot"), 0, 100, "Rambo") |
7225
e3f2280d9000
Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents:
7222
diff
changeset
|
332 |
dense = AddHog(loc("Dense Cloud"), 0, 100, "RobinHood") |
e3f2280d9000
Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents:
7222
diff
changeset
|
333 |
water = AddHog(loc("Fiery Water"), 0, 100, "pirate_jack") |
e3f2280d9000
Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents:
7222
diff
changeset
|
334 |
buffalo = AddHog(loc("Raging Buffalo"), 0, 100, "zoo_Bunny") |
e3f2280d9000
Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents:
7222
diff
changeset
|
335 |
chief = AddHog(loc("Righteous Beard"), 0, 100, "IndianChief") |
7222
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
336 |
natives = {leaks, dense, water, buffalo, chief} |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
337 |
nativesNum = 5 |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
338 |
|
13583
141cdfe0f3ca
Switch almost all Lua calls of AddTeam to using default clan colors instead of hardcoded color
Wuzzy <Wuzzy2@mail.ru>
parents:
13145
diff
changeset
|
339 |
AddTeam(loc("Light Cannfantry"), -1, "skull", "Island", "Pirate", "cm_vampire") |
7222
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
340 |
for i = 1, 4 do |
7249
79b399c04410
Reduced mission 4 difficulty (enemy health and level) and fixed a bug where hogs would comment on the death of Dense Cloud eve though he isn't added
belphegorr <szabibibi@gmail.com>
parents:
7247
diff
changeset
|
341 |
cannibals[i] = AddHog(HogNames[i], 2, 40, "Zombi") |
7222
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
342 |
end |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
343 |
|
13583
141cdfe0f3ca
Switch almost all Lua calls of AddTeam to using default clan colors instead of hardcoded color
Wuzzy <Wuzzy2@mail.ru>
parents:
13145
diff
changeset
|
344 |
AddTeam(loc("Heavy Cannfantry"), -1, "skull", "Island", "Pirate", "cm_vampire") |
7222
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
345 |
for i = 5, 8 do |
7249
79b399c04410
Reduced mission 4 difficulty (enemy health and level) and fixed a bug where hogs would comment on the death of Dense Cloud eve though he isn't added
belphegorr <szabibibi@gmail.com>
parents:
7247
diff
changeset
|
346 |
cannibals[i] = AddHog(HogNames[i], 2, 55, "vampirichog") |
7222
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
347 |
end |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
348 |
|
14506
f37910a73c19
Refactor ACF missions, store team names in variables
Wuzzy <Wuzzy2@mail.ru>
parents:
14422
diff
changeset
|
349 |
cyborgTeamName = AddTeam(loc("011101001"), -1, "ring", "UFO", "Robot", "cm_binary") |
7225
e3f2280d9000
Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents:
7222
diff
changeset
|
350 |
cyborg = AddHog(loc("Unit 334a$7%;.*"), 0, 200, "cyborg1") |
7222
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
351 |
|
7448
d0521a3a4358
Solved "floating repositionings" in every mission
belphegorr <szabibibi@gmail.com>
parents:
7253
diff
changeset
|
352 |
AnimSetGearPosition(leaks, unpack(leaksPos)) |
d0521a3a4358
Solved "floating repositionings" in every mission
belphegorr <szabibibi@gmail.com>
parents:
7253
diff
changeset
|
353 |
AnimSetGearPosition(dense, unpack(densePos)) |
d0521a3a4358
Solved "floating repositionings" in every mission
belphegorr <szabibibi@gmail.com>
parents:
7253
diff
changeset
|
354 |
AnimSetGearPosition(water, unpack(waterPos)) |
7222
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
355 |
HogTurnLeft(water, true) |
7448
d0521a3a4358
Solved "floating repositionings" in every mission
belphegorr <szabibibi@gmail.com>
parents:
7253
diff
changeset
|
356 |
AnimSetGearPosition(buffalo, unpack(buffaloPos)) |
7222
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
357 |
HogTurnLeft(buffalo, true) |
7448
d0521a3a4358
Solved "floating repositionings" in every mission
belphegorr <szabibibi@gmail.com>
parents:
7253
diff
changeset
|
358 |
AnimSetGearPosition(chief, unpack(chiefPos)) |
7222
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
359 |
HogTurnLeft(chief, true) |
7448
d0521a3a4358
Solved "floating repositionings" in every mission
belphegorr <szabibibi@gmail.com>
parents:
7253
diff
changeset
|
360 |
AnimSetGearPosition(cyborg, 0, 0) |
7222
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
361 |
for i = 1, 8 do |
7448
d0521a3a4358
Solved "floating repositionings" in every mission
belphegorr <szabibibi@gmail.com>
parents:
7253
diff
changeset
|
362 |
AnimSetGearPosition(cannibals[i], unpack(cannibalPos[i])) |
7222
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
363 |
end |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
364 |
end |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
365 |
|
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
366 |
function CondNeedToTurn(hog1, hog2) |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
367 |
xl, xd = GetX(hog1), GetX(hog2) |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
368 |
if xl > xd then |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
369 |
AnimInsertStepNext({func = AnimTurn, args = {hog1, "Left"}}) |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
370 |
AnimInsertStepNext({func = AnimTurn, args = {hog2, "Right"}}) |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
371 |
elseif xl < xd then |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
372 |
AnimInsertStepNext({func = AnimTurn, args = {hog2, "Left"}}) |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
373 |
AnimInsertStepNext({func = AnimTurn, args = {hog1, "Right"}}) |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
374 |
end |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
375 |
end |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
376 |
|
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
377 |
function SpawnHealthCrates(index) |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
378 |
SetHealth(SpawnHealthCrate(0, 0), 25) |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
379 |
SetHealth(SpawnHealthCrate(0, 0), 25) |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
380 |
SetHealth(SpawnHealthCrate(0, 0), 25) |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
381 |
healthCratesSpawned[index] = true |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
382 |
end |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
383 |
|
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
384 |
function SpawnCrates(index) |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
385 |
if index == 1 then |
12933
e65aa3c3d4e6
Refactor scripts to use SpawnSupplyCrate (where it makes sense)
Wuzzy <Wuzzy2@mail.ru>
parents:
12794
diff
changeset
|
386 |
SpawnSupplyCrate(1943, 408, amBazooka) |
e65aa3c3d4e6
Refactor scripts to use SpawnSupplyCrate (where it makes sense)
Wuzzy <Wuzzy2@mail.ru>
parents:
12794
diff
changeset
|
387 |
SpawnSupplyCrate(1981, 464, amGrenade) |
e65aa3c3d4e6
Refactor scripts to use SpawnSupplyCrate (where it makes sense)
Wuzzy <Wuzzy2@mail.ru>
parents:
12794
diff
changeset
|
388 |
SpawnSupplyCrate(1957, 459, amShotgun) |
e65aa3c3d4e6
Refactor scripts to use SpawnSupplyCrate (where it makes sense)
Wuzzy <Wuzzy2@mail.ru>
parents:
12794
diff
changeset
|
389 |
SpawnSupplyCrate(1902, 450, amDynamite) |
e65aa3c3d4e6
Refactor scripts to use SpawnSupplyCrate (where it makes sense)
Wuzzy <Wuzzy2@mail.ru>
parents:
12794
diff
changeset
|
390 |
SpawnSupplyCrate(1982, 405, amPickHammer) |
e65aa3c3d4e6
Refactor scripts to use SpawnSupplyCrate (where it makes sense)
Wuzzy <Wuzzy2@mail.ru>
parents:
12794
diff
changeset
|
391 |
SpawnSupplyCrate(2028, 455, amRope) |
e65aa3c3d4e6
Refactor scripts to use SpawnSupplyCrate (where it makes sense)
Wuzzy <Wuzzy2@mail.ru>
parents:
12794
diff
changeset
|
392 |
SpawnSupplyCrate(2025, 464, amTeleport) |
7222
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
393 |
else |
12933
e65aa3c3d4e6
Refactor scripts to use SpawnSupplyCrate (where it makes sense)
Wuzzy <Wuzzy2@mail.ru>
parents:
12794
diff
changeset
|
394 |
SpawnSupplyCrate(1982, 405, amBlowTorch) |
e65aa3c3d4e6
Refactor scripts to use SpawnSupplyCrate (where it makes sense)
Wuzzy <Wuzzy2@mail.ru>
parents:
12794
diff
changeset
|
395 |
SpawnSupplyCrate(2171, 428, amMolotov) |
e65aa3c3d4e6
Refactor scripts to use SpawnSupplyCrate (where it makes sense)
Wuzzy <Wuzzy2@mail.ru>
parents:
12794
diff
changeset
|
396 |
SpawnSupplyCrate(2364, 346, amFlamethrower) |
e65aa3c3d4e6
Refactor scripts to use SpawnSupplyCrate (where it makes sense)
Wuzzy <Wuzzy2@mail.ru>
parents:
12794
diff
changeset
|
397 |
SpawnSupplyCrate(2521, 303, amBazooka) |
e65aa3c3d4e6
Refactor scripts to use SpawnSupplyCrate (where it makes sense)
Wuzzy <Wuzzy2@mail.ru>
parents:
12794
diff
changeset
|
398 |
SpawnSupplyCrate(2223, 967, amGrenade) |
e65aa3c3d4e6
Refactor scripts to use SpawnSupplyCrate (where it makes sense)
Wuzzy <Wuzzy2@mail.ru>
parents:
12794
diff
changeset
|
399 |
SpawnSupplyCrate(1437, 371, amShotgun) |
7222
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
400 |
end |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
401 |
cratesSpawned[index] = true |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
402 |
end |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
403 |
|
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
404 |
-----------------------------Events------------------------------------ |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
405 |
|
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
406 |
function CheckWaveDead(index) |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
407 |
for i = (index - 1) * 4 + 1, index * 4 do |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
408 |
if cannibalDead[i] ~= true then |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
409 |
return false |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
410 |
end |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
411 |
end |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
412 |
return true |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
413 |
end |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
414 |
|
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
415 |
function DoWaveDead(index) |
7253
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
7251
diff
changeset
|
416 |
SetGearMessage(CurrentHedgehog, 0) |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
7251
diff
changeset
|
417 |
SetState(CurrentHedgehog, 0) |
7222
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
418 |
if index == 1 then |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
419 |
AddAnim(wave2Anim) |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
420 |
AddFunction({func = AfterWave2Anim, args = {}}) |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
421 |
elseif index == 2 then |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
422 |
SetupFinalAnim() |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
423 |
AddAnim(finalAnim) |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
424 |
AddFunction({func = AfterFinalAnim, args = {}}) |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
425 |
end |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
426 |
end |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
427 |
|
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
428 |
|
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
429 |
-----------------------------Main Functions---------------------------- |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
430 |
|
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
431 |
function onGameInit() |
7243
9ae9178c525e
Modified Animate.lua function AnimMove to take highercase direction (e.g. "Left")
belphegorr <szabibibi@gmail.com>
parents:
7241
diff
changeset
|
432 |
Seed = 1 |
7222
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
433 |
GameFlags = 0 |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
434 |
TurnTime = 60000 |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
435 |
CaseFreq = 0 |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
436 |
MinesNum = 0 |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
437 |
MinesTime = 3000 |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
438 |
Explosives = 2 |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
439 |
Map = "Hogville" |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
440 |
Theme = "Nature" |
12224
d62d6f8ebef1
Disable Sudden Death consistently in all missions which don't require it
Wuzzy <almikes@aol.com>
parents:
12049
diff
changeset
|
441 |
-- Disable Sudden Death |
d62d6f8ebef1
Disable Sudden Death consistently in all missions which don't require it
Wuzzy <almikes@aol.com>
parents:
12049
diff
changeset
|
442 |
HealthDecrease = 0 |
d62d6f8ebef1
Disable Sudden Death consistently in all missions which don't require it
Wuzzy <almikes@aol.com>
parents:
12049
diff
changeset
|
443 |
WaterRise = 0 |
7222
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
444 |
|
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
445 |
AddHogs() |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
446 |
AnimInit() |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
447 |
end |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
448 |
|
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
449 |
function onGameStart() |
8944
ed2509832311
fix bug that locked unlocked campaign missions, see issue 452
Periklis Ntanasis <pntanasis@gmail.com>
parents:
8043
diff
changeset
|
450 |
progress = tonumber(GetCampaignVar("Progress")) |
7222
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
451 |
GetVariables() |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
452 |
SetupAmmo() |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
453 |
SetupPlace() |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
454 |
AnimationSetup() |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
455 |
SetupEvents() |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
456 |
AddAnim(startAnim) |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
457 |
AddFunction({func = AfterStartAnim, args = {}}) |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
458 |
end |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
459 |
|
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
460 |
function onGameTick() |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
461 |
AnimUnWait() |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
462 |
if ShowAnimation() == false then |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
463 |
return |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
464 |
end |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
465 |
ExecuteAfterAnimations() |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
466 |
CheckEvents() |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
467 |
end |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
468 |
|
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
469 |
function onGearDelete(gear) |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
470 |
if gear == dense then |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
471 |
denseDead = true |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
472 |
nativesNum = nativesNum - 1 |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
473 |
nativesDead[2] = true |
7249
79b399c04410
Reduced mission 4 difficulty (enemy health and level) and fixed a bug where hogs would comment on the death of Dense Cloud eve though he isn't added
belphegorr <szabibibi@gmail.com>
parents:
7247
diff
changeset
|
474 |
if sdrmv == 1 then |
79b399c04410
Reduced mission 4 difficulty (enemy health and level) and fixed a bug where hogs would comment on the death of Dense Cloud eve though he isn't added
belphegorr <szabibibi@gmail.com>
parents:
7247
diff
changeset
|
475 |
freshDead = nil |
79b399c04410
Reduced mission 4 difficulty (enemy health and level) and fixed a bug where hogs would comment on the death of Dense Cloud eve though he isn't added
belphegorr <szabibibi@gmail.com>
parents:
7247
diff
changeset
|
476 |
else |
79b399c04410
Reduced mission 4 difficulty (enemy health and level) and fixed a bug where hogs would comment on the death of Dense Cloud eve though he isn't added
belphegorr <szabibibi@gmail.com>
parents:
7247
diff
changeset
|
477 |
freshDead = loc("Dense Cloud") |
79b399c04410
Reduced mission 4 difficulty (enemy health and level) and fixed a bug where hogs would comment on the death of Dense Cloud eve though he isn't added
belphegorr <szabibibi@gmail.com>
parents:
7247
diff
changeset
|
478 |
end |
7222
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
479 |
elseif gear == leaks then |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
480 |
leaksDead = true |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
481 |
nativesNum = nativesNum - 1 |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
482 |
nativesDead[1] = true |
7241
7fda4d886c5e
Modified Mission 4: reduced second wave health, reduced some ammos, added some ammos, added reaction to hog death, added reaction to second wave of hogs
belphegorr <szabibibi@gmail.com>
parents:
7225
diff
changeset
|
483 |
freshDead = loc("Leaks A Lot") |
7222
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
484 |
elseif gear == chief then |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
485 |
chiefDead = true |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
486 |
nativesNum = nativesNum - 1 |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
487 |
nativesDead[5] = true |
7241
7fda4d886c5e
Modified Mission 4: reduced second wave health, reduced some ammos, added some ammos, added reaction to hog death, added reaction to second wave of hogs
belphegorr <szabibibi@gmail.com>
parents:
7225
diff
changeset
|
488 |
freshDead = loc("Righteous Beard") |
7222
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
489 |
elseif gear == water then |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
490 |
waterDead = true |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
491 |
nativesNum = nativesNum - 1 |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
492 |
nativesDead[3] = true |
7241
7fda4d886c5e
Modified Mission 4: reduced second wave health, reduced some ammos, added some ammos, added reaction to hog death, added reaction to second wave of hogs
belphegorr <szabibibi@gmail.com>
parents:
7225
diff
changeset
|
493 |
freshDead = loc("Fiery Water") |
7222
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
494 |
elseif gear == buffalo then |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
495 |
buffaloDead = true |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
496 |
nativesNum = nativesNum - 1 |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
497 |
nativesDead[4] = true |
7241
7fda4d886c5e
Modified Mission 4: reduced second wave health, reduced some ammos, added some ammos, added reaction to hog death, added reaction to second wave of hogs
belphegorr <szabibibi@gmail.com>
parents:
7225
diff
changeset
|
498 |
freshDead = loc("Raging Buffalo") |
7222
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
499 |
else |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
500 |
for i = 1, 8 do |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
501 |
if gear == cannibals[i] then |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
502 |
cannibalDead[i] = true |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
503 |
end |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
504 |
end |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
505 |
end |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
506 |
end |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
507 |
|
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
508 |
function onAmmoStoreInit() |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
509 |
SetAmmo(amDEagle, 9, 0, 0, 0) |
7241
7fda4d886c5e
Modified Mission 4: reduced second wave health, reduced some ammos, added some ammos, added reaction to hog death, added reaction to second wave of hogs
belphegorr <szabibibi@gmail.com>
parents:
7225
diff
changeset
|
510 |
SetAmmo(amSniperRifle, 4, 0, 0, 0) |
7222
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
511 |
SetAmmo(amFirePunch, 9, 0, 0, 0) |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
512 |
SetAmmo(amWhip, 9, 0, 0, 0) |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
513 |
SetAmmo(amBaseballBat, 9, 0, 0, 0) |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
514 |
SetAmmo(amHammer, 9, 0, 0, 0) |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
515 |
SetAmmo(amLandGun, 9, 0, 0, 0) |
7241
7fda4d886c5e
Modified Mission 4: reduced second wave health, reduced some ammos, added some ammos, added reaction to hog death, added reaction to second wave of hogs
belphegorr <szabibibi@gmail.com>
parents:
7225
diff
changeset
|
516 |
SetAmmo(amSnowball, 8, 0, 0, 0) |
7222
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
517 |
SetAmmo(amGirder, 4, 0, 0, 2) |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
518 |
SetAmmo(amParachute, 4, 0, 0, 2) |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
519 |
SetAmmo(amSwitch, 8, 0, 0, 2) |
12363
6ad1f86e0c81
Set infinite skip in ACF: United We Stand
Wuzzy <almikes@aol.com>
parents:
12263
diff
changeset
|
520 |
SetAmmo(amSkip, 9, 0, 0, 0) |
7222
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
521 |
SetAmmo(amRope, 5, 0, 0, 3) |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
522 |
SetAmmo(amBlowTorch, 3, 0, 0, 3) |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
523 |
SetAmmo(amPickHammer, 0, 0, 0, 3) |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
524 |
SetAmmo(amLowGravity, 0, 0, 0, 2) |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
525 |
SetAmmo(amDynamite, 0, 0, 0, 3) |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
526 |
SetAmmo(amBazooka, 0, 0, 0, 4) |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
527 |
SetAmmo(amGrenade, 0, 0, 0, 5) |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
528 |
SetAmmo(amMine, 0, 0, 0, 2) |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
529 |
SetAmmo(amMolotov, 0, 0, 0, 3) |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
530 |
SetAmmo(amFlamethrower, 0, 0, 0, 3) |
7241
7fda4d886c5e
Modified Mission 4: reduced second wave health, reduced some ammos, added some ammos, added reaction to hog death, added reaction to second wave of hogs
belphegorr <szabibibi@gmail.com>
parents:
7225
diff
changeset
|
531 |
SetAmmo(amShotgun, 0, 0, 0, 3) |
7fda4d886c5e
Modified Mission 4: reduced second wave health, reduced some ammos, added some ammos, added reaction to hog death, added reaction to second wave of hogs
belphegorr <szabibibi@gmail.com>
parents:
7225
diff
changeset
|
532 |
SetAmmo(amTeleport, 0, 0, 0, 2) |
7fda4d886c5e
Modified Mission 4: reduced second wave health, reduced some ammos, added some ammos, added reaction to hog death, added reaction to second wave of hogs
belphegorr <szabibibi@gmail.com>
parents:
7225
diff
changeset
|
533 |
SetAmmo(amFlamethrower, 0, 0, 0, 3) |
7222
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
534 |
end |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
535 |
|
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
536 |
function onNewTurn() |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
537 |
if AnimInProgress() then |
13752
110d6c1e817f
Lua: Rename globals: NoPointX→NO_CURSOR, cMaxTurnTime→MAX_TURN_TIME, cMaxHogHealth→MAX_HOG_HEALTH
Wuzzy <Wuzzy2@mail.ru>
parents:
13742
diff
changeset
|
538 |
SetTurnTimeLeft(MAX_TURN_TIME) |
7241
7fda4d886c5e
Modified Mission 4: reduced second wave health, reduced some ammos, added some ammos, added reaction to hog death, added reaction to second wave of hogs
belphegorr <szabibibi@gmail.com>
parents:
7225
diff
changeset
|
539 |
return |
7fda4d886c5e
Modified Mission 4: reduced second wave health, reduced some ammos, added some ammos, added reaction to hog death, added reaction to second wave of hogs
belphegorr <szabibibi@gmail.com>
parents:
7225
diff
changeset
|
540 |
end |
14506
f37910a73c19
Refactor ACF missions, store team names in variables
Wuzzy <Wuzzy2@mail.ru>
parents:
14422
diff
changeset
|
541 |
if freshDead ~= nil and GetHogTeamName(CurrentHedgehog) == nativesTeamName then |
7241
7fda4d886c5e
Modified Mission 4: reduced second wave health, reduced some ammos, added some ammos, added reaction to hog death, added reaction to second wave of hogs
belphegorr <szabibibi@gmail.com>
parents:
7225
diff
changeset
|
542 |
SetupHogDeadAnim(freshDead) |
7fda4d886c5e
Modified Mission 4: reduced second wave health, reduced some ammos, added some ammos, added reaction to hog death, added reaction to second wave of hogs
belphegorr <szabibibi@gmail.com>
parents:
7225
diff
changeset
|
543 |
AddAnim(hogDeadAnim) |
7fda4d886c5e
Modified Mission 4: reduced second wave health, reduced some ammos, added some ammos, added reaction to hog death, added reaction to second wave of hogs
belphegorr <szabibibi@gmail.com>
parents:
7225
diff
changeset
|
544 |
AddFunction({func = AfterHogDeadAnim, args = {}}) |
7222
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
545 |
end |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
546 |
end |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
547 |
|
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
548 |
function onPrecise() |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
549 |
if GameTime > 2500 then |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
550 |
SetAnimSkip(true) |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
551 |
end |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
552 |
end |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
553 |