author | Wuzzy <almikes@aol.com> |
Wed, 23 Nov 2016 23:54:55 +0100 | |
changeset 12054 | 030464f34d47 |
parent 10290 | 42efccba0711 |
child 12229 | d62d6f8ebef1 |
permissions | -rw-r--r-- |
8043 | 1 |
HedgewarsScriptLoad("/Scripts/Locale.lua") |
2 |
HedgewarsScriptLoad("/Scripts/Animate.lua") |
|
7222
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
3 |
|
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
4 |
-----------------------------Constants--------------------------------- |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
5 |
choiceAccept = 1 |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
6 |
choiceRefuse = 2 |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
7 |
choiceAttack = 3 |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
8 |
|
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
9 |
leaksPos = {2067, 509} |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
10 |
densePos = {1882, 503} |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
11 |
waterPos = {3100, 930} |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
12 |
buffaloPos = {2609, 494} |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
13 |
chiefPos = {2538, 617} |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
14 |
cannibalPos = {{2219, 1339}, {2322, 1357}, {805, 784}, {3876, 1048}, |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
15 |
{1101, 916}, {2854, 1408}, {1974, 486}, {1103, 961}} |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
16 |
|
7225
e3f2280d9000
Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents:
7222
diff
changeset
|
17 |
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
|
18 |
loc("Spleenlover"), loc("Thighlicker"), loc("NomNom"), loc("Mindy")} |
7222
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
19 |
|
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
20 |
natives = {} |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
21 |
-----------------------------Variables--------------------------------- |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
22 |
cannibals = {} |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
23 |
cannibalDead = {} |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
24 |
cannibalHidden = {} |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
25 |
cratesSpawned = {} |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
26 |
healthCratesSpawned = {} |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
27 |
|
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
|
28 |
sdrmv = 0 |
7222
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
29 |
denseDead = false |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
30 |
leaksDead = false |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
31 |
waterDead = false |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
32 |
buffaloDead = false |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
33 |
chiefDead = false |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
34 |
nativesDead = {} |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
35 |
|
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
36 |
m2Choice = 0 |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
37 |
m2DenseDead = 0 |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
38 |
|
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
39 |
startAnim = {} |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
40 |
wave2Anim = {} |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
41 |
finalAnim = {} |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
42 |
--------------------------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
|
43 |
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
|
44 |
freshDead = 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
|
45 |
TurnTimeLeft = TurnTime |
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
|
46 |
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
|
47 |
|
7222
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
48 |
function AfterStartAnim() |
7225
e3f2280d9000
Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents:
7222
diff
changeset
|
49 |
local goal = loc("Defeat the cannibals!|") |
7247
9aba0c6458af
Changed a ShowMission in Mission 4
belphegorr <szabibibi@gmail.com>
parents:
7245
diff
changeset
|
50 |
local chiefgoal = loc("Try to protect the chief! You won't lose if he dies, but it is advised that he survives.") |
7222
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
51 |
TurnTimeLeft = TurnTime |
7225
e3f2280d9000
Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents:
7222
diff
changeset
|
52 |
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
|
53 |
end |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
54 |
|
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
55 |
function SkipStartAnim() |
7448
d0521a3a4358
Solved "floating repositionings" in every mission
belphegorr <szabibibi@gmail.com>
parents:
7253
diff
changeset
|
56 |
AnimSetGearPosition(water, 2467, 754) |
7222
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
57 |
if cratesSpawned[1] ~= true then |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
58 |
SpawnCrates(1) |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
59 |
end |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
60 |
if healthCratesSpawned[1] ~= true then |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
61 |
SpawnHealthCrates(1) |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
62 |
end |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
63 |
if cannibalHidden[1] == true then |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
64 |
RestoreWave(1) |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
65 |
end |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
66 |
AnimSwitchHog(leaks) |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
67 |
end |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
68 |
|
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
69 |
function SkipWave2Anim() |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
70 |
if cratesSpawned[2] ~= true then |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
71 |
SpawnCrates(2) |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
72 |
end |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
73 |
if healthCratesSpawned[2] ~= true then |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
74 |
SpawnHealthCrates(2) |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
75 |
end |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
76 |
if cannibalHidden[5] == true then |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
77 |
RestoreWave(2) |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
78 |
end |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
79 |
AnimSwitchHog(cannibals[5]) |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
80 |
end |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
81 |
|
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
82 |
function AfterWave2Anim() |
7243
9ae9178c525e
Modified Animate.lua function AnimMove to take highercase direction (e.g. "Left")
belphegorr <szabibibi@gmail.com>
parents:
7241
diff
changeset
|
83 |
TurnTimeLeft = 0 |
7222
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
84 |
end |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
85 |
|
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
86 |
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
|
87 |
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
|
88 |
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
|
89 |
else |
cba4960b426f
Fixed a bug where certain ammo types were added to the wrong hogs.
belphegorr <szabibibi@gmail.com>
parents:
7249
diff
changeset
|
90 |
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
|
91 |
end |
7222
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
92 |
if chiefDead == true then |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
93 |
SaveCampaignVar("M4ChiefDead", "1") |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
94 |
else |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
95 |
SaveCampaignVar("M4ChiefDead", "0") |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
96 |
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
|
97 |
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
|
98 |
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
|
99 |
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
|
100 |
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
|
101 |
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
|
102 |
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
|
103 |
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
|
104 |
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
|
105 |
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
|
106 |
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
|
107 |
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
|
108 |
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
|
109 |
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
|
110 |
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
|
111 |
end |
8944
ed2509832311
fix bug that locked unlocked campaign missions, see issue 452
Periklis Ntanasis <pntanasis@gmail.com>
parents:
8043
diff
changeset
|
112 |
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
|
113 |
SaveCampaignVar("Progress", "4") |
ed2509832311
fix bug that locked unlocked campaign missions, see issue 452
Periklis Ntanasis <pntanasis@gmail.com>
parents:
8043
diff
changeset
|
114 |
end |
10290 | 115 |
DismissTeam(loc("011101001")) |
7222
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
116 |
TurnTimeLeft = 0 |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
117 |
end |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
118 |
-----------------------------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
|
119 |
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
|
120 |
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
|
121 |
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
|
122 |
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
|
123 |
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
|
124 |
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
|
125 |
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
|
126 |
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
|
127 |
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
|
128 |
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
|
129 |
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
|
130 |
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
|
131 |
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
|
132 |
end |
7222
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
133 |
|
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
|
134 |
function EmitDenseClouds(dir) |
7222
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
135 |
local dif |
7243
9ae9178c525e
Modified Animate.lua function AnimMove to take highercase direction (e.g. "Left")
belphegorr <szabibibi@gmail.com>
parents:
7241
diff
changeset
|
136 |
if dir == "Left" then |
7222
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
137 |
dif = 10 |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
138 |
else |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
139 |
dif = -10 |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
140 |
end |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
141 |
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
|
142 |
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
|
143 |
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
|
144 |
AnimInsertStepNext({func = AnimWait, args = {dense, 800}}) |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
145 |
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
|
146 |
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
|
147 |
AnimInsertStepNext({func = AnimWait, args = {dense, 800}}) |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
148 |
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
|
149 |
end |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
150 |
|
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
151 |
function AnimationSetup() |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
152 |
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
|
153 |
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
|
154 |
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
|
155 |
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
|
156 |
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
|
157 |
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
|
158 |
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
|
159 |
if denseDead == false then |
7225
e3f2280d9000
Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents:
7222
diff
changeset
|
160 |
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
|
161 |
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
|
162 |
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
|
163 |
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
|
164 |
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
|
165 |
else |
7225
e3f2280d9000
Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents:
7222
diff
changeset
|
166 |
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
|
167 |
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
|
168 |
table.insert(startAnim, {func = AnimCustomFunction, args = {leaks, SpawnCrates, {1}}}) |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
169 |
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
|
170 |
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
|
171 |
end |
7225
e3f2280d9000
Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents:
7222
diff
changeset
|
172 |
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
|
173 |
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
|
174 |
table.insert(startAnim, {func = AnimCustomFunction, args = {leaks, SpawnHealthCrates, {1}}}) |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
175 |
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
|
176 |
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
|
177 |
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
|
178 |
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
|
179 |
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
|
180 |
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
|
181 |
table.insert(startAnim, {func = AnimTurn, args = {water, "Right"}}) |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
182 |
table.insert(startAnim, {func = AnimJump, args = {water, "back"}}) |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
183 |
table.insert(startAnim, {func = AnimJump, args = {water, "back"}}) |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
184 |
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
|
185 |
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
|
186 |
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
|
187 |
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
|
188 |
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
|
189 |
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
|
190 |
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
|
191 |
table.insert(startAnim, {func = AnimCustomFunction, args = {chief, RestoreWave, {1}}}) |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
192 |
for i = 1, 4 do |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
193 |
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
|
194 |
end |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
195 |
table.insert(startAnim, {func = AnimWait, args = {chief, 1500}}) |
7225
e3f2280d9000
Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents:
7222
diff
changeset
|
196 |
table.insert(startAnim, {func = AnimSay, args = {leaks, loc("HOW DO THEY KNOW WHERE WE ARE???"), SAY_SHOUT, 5000}}) |
e3f2280d9000
Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents:
7222
diff
changeset
|
197 |
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
|
198 |
table.insert(startAnim, {func = AnimSwitchHog, args = {leaks}}) |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
199 |
AddSkipFunction(startAnim, SkipStartAnim, {}) |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
200 |
|
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
201 |
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
|
202 |
for i = 5, 8 do |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
203 |
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
|
204 |
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
|
205 |
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
|
206 |
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
|
207 |
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
|
208 |
table.insert(wave2Anim, {func = AnimSwitchHog, args = {cannibals[5]}}) |
7222
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
209 |
AddSkipFunction(wave2Anim, SkipWave2Anim, {}) |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
210 |
end |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
211 |
|
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
|
212 |
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
|
213 |
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
|
214 |
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
|
215 |
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
|
216 |
end |
7827
353d90ddc188
Fix bad loc calls in campaign, rope training. Regenerate lua. Untested.
nemo
parents:
7675
diff
changeset
|
217 |
local hogDeadStrings = {loc("They killed ") .. gear ..loc("! You bastards!"), |
353d90ddc188
Fix bad loc calls in campaign, rope training. Regenerate lua. Untested.
nemo
parents:
7675
diff
changeset
|
218 |
gear .. loc("! Why?!"), |
353d90ddc188
Fix bad loc calls in campaign, rope training. Regenerate lua. Untested.
nemo
parents:
7675
diff
changeset
|
219 |
loc("That was just mean!"), |
353d90ddc188
Fix bad loc calls in campaign, rope training. Regenerate lua. Untested.
nemo
parents:
7675
diff
changeset
|
220 |
loc("Oh no, not ") .. 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
|
221 |
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
|
222 |
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
|
223 |
|
7222
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
224 |
function SetupFinalAnim() |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
225 |
local found = 0 |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
226 |
local hogs = {} |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
227 |
local i = 1 |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
228 |
if nativesNum >= 2 then |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
229 |
while found < 2 do |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
230 |
if nativesDead[i] ~= true then |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
231 |
found = found + 1 |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
232 |
hogs[found] = natives[i] |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
233 |
end |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
234 |
i = i + 1 |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
235 |
end |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
236 |
if chiefDead ~= true then |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
237 |
hogs[2] = chief |
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 |
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
|
240 |
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
|
241 |
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
|
242 |
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
|
243 |
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
|
244 |
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
|
245 |
else |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
246 |
for i = 1, 5 do |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
247 |
if nativesDead[i] ~= true then |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
248 |
hogs[1] = natives[i] |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
249 |
end |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
250 |
end |
7225
e3f2280d9000
Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents:
7222
diff
changeset
|
251 |
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
|
252 |
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
|
253 |
end |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
254 |
end |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
255 |
-----------------------------Misc-------------------------------------- |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
256 |
function RestoreWave(index) |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
257 |
for i = (index - 1) * 4 + 1, index * 4 do |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
258 |
RestoreHog(cannibals[i]) |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
259 |
cannibalHidden[i] = false |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
260 |
end |
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 |
|
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
263 |
function GetVariables() |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
264 |
m2DenseDead = tonumber(GetCampaignVar("M2DenseDead")) |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
265 |
if m2DenseDead == 1 then |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
266 |
denseDead = true |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
267 |
end |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
268 |
m2Choice = tonumber(GetCampaignVar("M2Choice")) |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
269 |
end |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
270 |
|
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
271 |
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
|
272 |
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
|
273 |
sdrmv = 1 |
7222
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
274 |
DeleteGear(dense) |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
275 |
end |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
276 |
for i = 1, 8 do |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
277 |
HideHog(cannibals[i]) |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
278 |
cannibalHidden[i] = true |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
279 |
end |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
280 |
HideHog(cyborg) |
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 |
|
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
283 |
function SetupEvents() |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
284 |
AddEvent(CheckWaveDead, {1}, DoWaveDead, {1}, 0) |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
285 |
AddEvent(CheckWaveDead, {2}, DoWaveDead, {2}, 0) |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
286 |
end |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
287 |
|
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
288 |
function SetupAmmo() |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
289 |
AddAmmo(cannibals[1], amGrenade, 4) |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
290 |
AddAmmo(cannibals[1], amBazooka, 4) |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
291 |
AddAmmo(cannibals[1], amShotgun, 4) |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
292 |
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
|
293 |
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
|
294 |
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
|
295 |
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
|
296 |
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
|
297 |
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
|
298 |
AddAmmo(cannibals[5], amFlamethrower, 3) |
7222
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
299 |
end |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
300 |
|
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
301 |
function AddHogs() |
7225
e3f2280d9000
Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents:
7222
diff
changeset
|
302 |
AddTeam(loc("Natives"), 29439, "Bone", "Island", "HillBilly", "cm_birdy") |
e3f2280d9000
Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents:
7222
diff
changeset
|
303 |
leaks = AddHog(loc("Leaks A Lot"), 0, 100, "Rambo") |
e3f2280d9000
Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents:
7222
diff
changeset
|
304 |
dense = AddHog(loc("Dense Cloud"), 0, 100, "RobinHood") |
e3f2280d9000
Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents:
7222
diff
changeset
|
305 |
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
|
306 |
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
|
307 |
chief = AddHog(loc("Righteous Beard"), 0, 100, "IndianChief") |
7222
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
308 |
natives = {leaks, dense, water, buffalo, chief} |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
309 |
nativesNum = 5 |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
310 |
|
7225
e3f2280d9000
Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents:
7222
diff
changeset
|
311 |
AddTeam(loc("Light Cannfantry"), 14483456, "Skull", "Island", "Pirate", "cm_vampire") |
7222
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
312 |
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
|
313 |
cannibals[i] = AddHog(HogNames[i], 2, 40, "Zombi") |
7222
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 |
|
7225
e3f2280d9000
Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents:
7222
diff
changeset
|
316 |
AddTeam(loc("Heavy Cannfantry"), 14483456, "Skull", "Island", "Pirate", "cm_vampire") |
7222
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
317 |
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
|
318 |
cannibals[i] = AddHog(HogNames[i], 2, 55, "vampirichog") |
7222
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
319 |
end |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
320 |
|
12054
030464f34d47
Tweak flags used in all missions to fit more to the theme
Wuzzy <almikes@aol.com>
parents:
10290
diff
changeset
|
321 |
AddTeam(loc("011101001"), 14483456, "ring", "UFO", "Robot", "cm_binary") |
7225
e3f2280d9000
Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents:
7222
diff
changeset
|
322 |
cyborg = AddHog(loc("Unit 334a$7%;.*"), 0, 200, "cyborg1") |
7222
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
323 |
|
7448
d0521a3a4358
Solved "floating repositionings" in every mission
belphegorr <szabibibi@gmail.com>
parents:
7253
diff
changeset
|
324 |
AnimSetGearPosition(leaks, unpack(leaksPos)) |
d0521a3a4358
Solved "floating repositionings" in every mission
belphegorr <szabibibi@gmail.com>
parents:
7253
diff
changeset
|
325 |
AnimSetGearPosition(dense, unpack(densePos)) |
d0521a3a4358
Solved "floating repositionings" in every mission
belphegorr <szabibibi@gmail.com>
parents:
7253
diff
changeset
|
326 |
AnimSetGearPosition(water, unpack(waterPos)) |
7222
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
327 |
HogTurnLeft(water, true) |
7448
d0521a3a4358
Solved "floating repositionings" in every mission
belphegorr <szabibibi@gmail.com>
parents:
7253
diff
changeset
|
328 |
AnimSetGearPosition(buffalo, unpack(buffaloPos)) |
7222
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
329 |
HogTurnLeft(buffalo, true) |
7448
d0521a3a4358
Solved "floating repositionings" in every mission
belphegorr <szabibibi@gmail.com>
parents:
7253
diff
changeset
|
330 |
AnimSetGearPosition(chief, unpack(chiefPos)) |
7222
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
331 |
HogTurnLeft(chief, true) |
7448
d0521a3a4358
Solved "floating repositionings" in every mission
belphegorr <szabibibi@gmail.com>
parents:
7253
diff
changeset
|
332 |
AnimSetGearPosition(cyborg, 0, 0) |
7222
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
333 |
for i = 1, 8 do |
7448
d0521a3a4358
Solved "floating repositionings" in every mission
belphegorr <szabibibi@gmail.com>
parents:
7253
diff
changeset
|
334 |
AnimSetGearPosition(cannibals[i], unpack(cannibalPos[i])) |
7222
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
335 |
end |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
336 |
end |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
337 |
|
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
338 |
function CondNeedToTurn(hog1, hog2) |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
339 |
xl, xd = GetX(hog1), GetX(hog2) |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
340 |
if xl > xd then |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
341 |
AnimInsertStepNext({func = AnimTurn, args = {hog1, "Left"}}) |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
342 |
AnimInsertStepNext({func = AnimTurn, args = {hog2, "Right"}}) |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
343 |
elseif xl < xd then |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
344 |
AnimInsertStepNext({func = AnimTurn, args = {hog2, "Left"}}) |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
345 |
AnimInsertStepNext({func = AnimTurn, args = {hog1, "Right"}}) |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
346 |
end |
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 |
|
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
349 |
function SpawnHealthCrates(index) |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
350 |
SetHealth(SpawnHealthCrate(0, 0), 25) |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
351 |
SetHealth(SpawnHealthCrate(0, 0), 25) |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
352 |
SetHealth(SpawnHealthCrate(0, 0), 25) |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
353 |
healthCratesSpawned[index] = true |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
354 |
end |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
355 |
|
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
356 |
function SpawnCrates(index) |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
357 |
if index == 1 then |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
358 |
SpawnAmmoCrate(1943, 408, amBazooka) |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
359 |
SpawnAmmoCrate(1981, 464, amGrenade) |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
360 |
SpawnAmmoCrate(1957, 459, amShotgun) |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
361 |
SpawnAmmoCrate(1902, 450, amDynamite) |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
362 |
SpawnUtilityCrate(1982, 405, amPickHammer) |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
363 |
SpawnUtilityCrate(2028, 455, amRope) |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
364 |
SpawnUtilityCrate(2025, 464, amTeleport) |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
365 |
else |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
366 |
SpawnUtilityCrate(1982, 405, amBlowTorch) |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
367 |
SpawnAmmoCrate(2171, 428, amMolotov) |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
368 |
SpawnAmmoCrate(2364, 346, amFlamethrower) |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
369 |
SpawnAmmoCrate(2521, 303, amBazooka) |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
370 |
SpawnAmmoCrate(2223, 967, amGrenade) |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
371 |
SpawnAmmoCrate(1437, 371, amShotgun) |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
372 |
end |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
373 |
cratesSpawned[index] = true |
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 |
|
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
376 |
-----------------------------Events------------------------------------ |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
377 |
|
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
378 |
function CheckWaveDead(index) |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
379 |
for i = (index - 1) * 4 + 1, index * 4 do |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
380 |
if cannibalDead[i] ~= true then |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
381 |
return false |
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 |
end |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
384 |
return true |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
385 |
end |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
386 |
|
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
387 |
function DoWaveDead(index) |
7253
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
7251
diff
changeset
|
388 |
SetGearMessage(CurrentHedgehog, 0) |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
7251
diff
changeset
|
389 |
SetState(CurrentHedgehog, 0) |
7222
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
390 |
if index == 1 then |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
391 |
AddAnim(wave2Anim) |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
392 |
AddFunction({func = AfterWave2Anim, args = {}}) |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
393 |
elseif index == 2 then |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
394 |
SetupFinalAnim() |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
395 |
AddAnim(finalAnim) |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
396 |
AddFunction({func = AfterFinalAnim, args = {}}) |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
397 |
end |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
398 |
end |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
399 |
|
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
400 |
|
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
401 |
-----------------------------Main Functions---------------------------- |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
402 |
|
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
403 |
function onGameInit() |
7243
9ae9178c525e
Modified Animate.lua function AnimMove to take highercase direction (e.g. "Left")
belphegorr <szabibibi@gmail.com>
parents:
7241
diff
changeset
|
404 |
Seed = 1 |
7222
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
405 |
GameFlags = 0 |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
406 |
TurnTime = 60000 |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
407 |
CaseFreq = 0 |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
408 |
MinesNum = 0 |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
409 |
MinesTime = 3000 |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
410 |
Explosives = 2 |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
411 |
Delay = 10 |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
412 |
Map = "Hogville" |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
413 |
Theme = "Nature" |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
414 |
SuddenDeathTurns = 3000 |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
415 |
|
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
416 |
AddHogs() |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
417 |
AnimInit() |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
418 |
end |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
419 |
|
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
420 |
function onGameStart() |
8944
ed2509832311
fix bug that locked unlocked campaign missions, see issue 452
Periklis Ntanasis <pntanasis@gmail.com>
parents:
8043
diff
changeset
|
421 |
progress = tonumber(GetCampaignVar("Progress")) |
7222
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
422 |
GetVariables() |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
423 |
SetupAmmo() |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
424 |
SetupPlace() |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
425 |
AnimationSetup() |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
426 |
SetupEvents() |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
427 |
AddAnim(startAnim) |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
428 |
AddFunction({func = AfterStartAnim, args = {}}) |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
429 |
end |
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 onGameTick() |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
432 |
AnimUnWait() |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
433 |
if ShowAnimation() == false then |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
434 |
return |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
435 |
end |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
436 |
ExecuteAfterAnimations() |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
437 |
CheckEvents() |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
438 |
end |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
439 |
|
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
440 |
function onGearDelete(gear) |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
441 |
if gear == dense then |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
442 |
denseDead = true |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
443 |
nativesNum = nativesNum - 1 |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
444 |
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
|
445 |
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
|
446 |
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
|
447 |
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
|
448 |
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
|
449 |
end |
7222
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
450 |
elseif gear == leaks then |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
451 |
leaksDead = true |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
452 |
nativesNum = nativesNum - 1 |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
453 |
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
|
454 |
freshDead = loc("Leaks A Lot") |
7222
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
455 |
elseif gear == chief then |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
456 |
chiefDead = true |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
457 |
nativesNum = nativesNum - 1 |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
458 |
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
|
459 |
freshDead = loc("Righteous Beard") |
7222
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
460 |
elseif gear == water then |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
461 |
waterDead = true |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
462 |
nativesNum = nativesNum - 1 |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
463 |
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
|
464 |
freshDead = loc("Fiery Water") |
7222
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
465 |
elseif gear == buffalo then |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
466 |
buffaloDead = true |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
467 |
nativesNum = nativesNum - 1 |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
468 |
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
|
469 |
freshDead = loc("Raging Buffalo") |
7222
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
470 |
else |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
471 |
for i = 1, 8 do |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
472 |
if gear == cannibals[i] then |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
473 |
cannibalDead[i] = true |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
474 |
end |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
475 |
end |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
476 |
end |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
477 |
end |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
478 |
|
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
479 |
function onAmmoStoreInit() |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
480 |
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
|
481 |
SetAmmo(amSniperRifle, 4, 0, 0, 0) |
7222
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
482 |
SetAmmo(amFirePunch, 9, 0, 0, 0) |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
483 |
SetAmmo(amWhip, 9, 0, 0, 0) |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
484 |
SetAmmo(amBaseballBat, 9, 0, 0, 0) |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
485 |
SetAmmo(amHammer, 9, 0, 0, 0) |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
486 |
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
|
487 |
SetAmmo(amSnowball, 8, 0, 0, 0) |
7222
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
488 |
SetAmmo(amGirder, 4, 0, 0, 2) |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
489 |
SetAmmo(amParachute, 4, 0, 0, 2) |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
490 |
SetAmmo(amSwitch, 8, 0, 0, 2) |
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
|
491 |
SetAmmo(amSkip, 8, 0, 0, 0) |
7222
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
492 |
SetAmmo(amRope, 5, 0, 0, 3) |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
493 |
SetAmmo(amBlowTorch, 3, 0, 0, 3) |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
494 |
SetAmmo(amPickHammer, 0, 0, 0, 3) |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
495 |
SetAmmo(amLowGravity, 0, 0, 0, 2) |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
496 |
SetAmmo(amDynamite, 0, 0, 0, 3) |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
497 |
SetAmmo(amBazooka, 0, 0, 0, 4) |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
498 |
SetAmmo(amGrenade, 0, 0, 0, 5) |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
499 |
SetAmmo(amMine, 0, 0, 0, 2) |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
500 |
SetAmmo(amMolotov, 0, 0, 0, 3) |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
501 |
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
|
502 |
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
|
503 |
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
|
504 |
SetAmmo(amFlamethrower, 0, 0, 0, 3) |
7222
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 |
|
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
507 |
function onNewTurn() |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
508 |
if AnimInProgress() then |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
509 |
TurnTimeLeft = -1 |
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 |
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
|
511 |
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
|
512 |
if freshDead ~= nil and GetHogTeamName(CurrentHedgehog) == loc("Natives") 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
|
513 |
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
|
514 |
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
|
515 |
AddFunction({func = AfterHogDeadAnim, args = {}}) |
7222
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
516 |
end |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
517 |
end |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
518 |
|
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
519 |
function onPrecise() |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
520 |
if GameTime > 2500 then |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
521 |
SetAnimSkip(true) |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
522 |
end |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
523 |
end |
4a17a921ec93
Added Mission 4: United We Stand
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
524 |