author | Wuzzy <Wuzzy2@mail.ru> |
Wed, 19 Dec 2018 05:50:02 +0100 | |
changeset 14480 | 2113296b7a29 |
parent 14329 | 5da99c43b96f |
child 14816 | d65e25e211d4 |
permissions | -rw-r--r-- |
7893 | 1 |
--[[ |
13372 | 2 |
=== Continental supplies === |
3 |
Created by Vatten in 2012. |
|
4 |
Further worked on by the Hedgewars Team and contributors. |
|
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
5 |
|
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
6 |
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: |
7895
ac1610a7b7fa
apparently an older version was provided earlier and this one is newer and theoretically desync free. untested.
Vatten
parents:
7893
diff
changeset
|
7 |
|
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
8 |
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. |
7895
ac1610a7b7fa
apparently an older version was provided earlier and this one is newer and theoretically desync free. untested.
Vatten
parents:
7893
diff
changeset
|
9 |
|
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
10 |
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
7893 | 11 |
]] |
13364 | 12 |
-- fix selection increase delay (weapons to compesate) |
7893 | 13 |
|
8043 | 14 |
HedgewarsScriptLoad("/Scripts/Locale.lua") |
15 |
HedgewarsScriptLoad("/Scripts/Utils.lua") |
|
16 |
HedgewarsScriptLoad("/Scripts/Tracker.lua") |
|
7893 | 17 |
|
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
18 |
--approximative version of square root. This function follows the babylonian method. |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
19 |
function IntegerSqrt(num) |
8618 | 20 |
local temp=num |
7893 | 21 |
while(temp*temp-div(temp,2)>num) |
22 |
do |
|
23 |
temp=div((temp+div(num,temp)),2) |
|
24 |
end |
|
10965 | 25 |
|
7893 | 26 |
return math.abs(temp) |
27 |
end |
|
28 |
||
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
29 |
-- sqrt(x^2,y^2), work without desyncs. is approximative |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
30 |
function Norm(xx,yy) |
8618 | 31 |
--to fix overflows |
32 |
if(((math.abs(xx)^2)+(math.abs(yy)^2))>2^26) |
|
33 |
then |
|
34 |
local bitr=2^13 |
|
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
35 |
return IntegerSqrt((div(math.abs(xx),bitr)^2)+(div(math.abs(yy),bitr)^2))*bitr |
8618 | 36 |
else |
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
37 |
return IntegerSqrt((math.abs(xx)^2)+(math.abs(yy)^2)) |
8618 | 38 |
end |
7893 | 39 |
end |
40 |
||
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
41 |
-- returns 1 or -1 depending on where it is |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
42 |
function GetIfNegative(num) |
7895
ac1610a7b7fa
apparently an older version was provided earlier and this one is newer and theoretically desync free. untested.
Vatten
parents:
7893
diff
changeset
|
43 |
if(num<0) |
ac1610a7b7fa
apparently an older version was provided earlier and this one is newer and theoretically desync free. untested.
Vatten
parents:
7893
diff
changeset
|
44 |
then |
ac1610a7b7fa
apparently an older version was provided earlier and this one is newer and theoretically desync free. untested.
Vatten
parents:
7893
diff
changeset
|
45 |
return -1 |
ac1610a7b7fa
apparently an older version was provided earlier and this one is newer and theoretically desync free. untested.
Vatten
parents:
7893
diff
changeset
|
46 |
else |
ac1610a7b7fa
apparently an older version was provided earlier and this one is newer and theoretically desync free. untested.
Vatten
parents:
7893
diff
changeset
|
47 |
return 1 |
ac1610a7b7fa
apparently an older version was provided earlier and this one is newer and theoretically desync free. untested.
Vatten
parents:
7893
diff
changeset
|
48 |
end |
ac1610a7b7fa
apparently an older version was provided earlier and this one is newer and theoretically desync free. untested.
Vatten
parents:
7893
diff
changeset
|
49 |
end |
ac1610a7b7fa
apparently an older version was provided earlier and this one is newer and theoretically desync free. untested.
Vatten
parents:
7893
diff
changeset
|
50 |
|
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
51 |
--Will end the turn + give escape time |
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
52 |
function EndTurnCS(seconds) |
13367
8a9a723eb185
Continental supplies: Fix “Boring” sound being played after continent select
Wuzzy <Wuzzy2@mail.ru>
parents:
13365
diff
changeset
|
53 |
-- Set attacked state to prevent “Boring” sound to be played |
8a9a723eb185
Continental supplies: Fix “Boring” sound being played after continent select
Wuzzy <Wuzzy2@mail.ru>
parents:
13365
diff
changeset
|
54 |
SetState(CurrentHedgehog, bor(GetState(CurrentHedgehog), gstAttacked)) |
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
55 |
--set escape time |
13748
d7b72ea8d136
Fix buggy behaviour when setting TurnTimeLeft through Retreat
Wuzzy <Wuzzy2@mail.ru>
parents:
13745
diff
changeset
|
56 |
local escapeTime = GetAwayTime*10*seconds |
d7b72ea8d136
Fix buggy behaviour when setting TurnTimeLeft through Retreat
Wuzzy <Wuzzy2@mail.ru>
parents:
13745
diff
changeset
|
57 |
if escapeTime > 0 then |
d7b72ea8d136
Fix buggy behaviour when setting TurnTimeLeft through Retreat
Wuzzy <Wuzzy2@mail.ru>
parents:
13745
diff
changeset
|
58 |
Retreat(escapeTime, false) |
d7b72ea8d136
Fix buggy behaviour when setting TurnTimeLeft through Retreat
Wuzzy <Wuzzy2@mail.ru>
parents:
13745
diff
changeset
|
59 |
else |
d7b72ea8d136
Fix buggy behaviour when setting TurnTimeLeft through Retreat
Wuzzy <Wuzzy2@mail.ru>
parents:
13745
diff
changeset
|
60 |
SetTurnTimeLeft(escapeTime) |
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
61 |
end |
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
62 |
end |
10965 | 63 |
|
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
64 |
--show health tag (will mostly be used when a hog is damaged) |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
65 |
function ShowDamageTag(hog,damage) |
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
66 |
local healthtag=AddVisualGear(GetX(hog), GetY(hog), vgtHealthTag, damage, false) |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
67 |
SetVisualGearValues(healthtag, nil, nil, nil, nil, nil, nil, nil, nil, nil, GetClanColor(GetHogClan(hog))) |
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
68 |
end |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
69 |
|
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
70 |
--will use IntegerSqrt |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
71 |
function FireGear(hedgehog,geartype,vx,vy,timer) |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
72 |
local hypo=Norm(vx,vy) |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
73 |
return AddGear(div((GetGearRadius(hedgehog)*2*vx),hypo)+GetX(hedgehog), div((GetGearRadius(hedgehog)*2*vy),hypo)+GetY(hedgehog), geartype, 0, vx, vy, timer) |
10527 | 74 |
end |
9805 | 75 |
|
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
76 |
function CollectMultiAmmo(hog, ammoList, noAddAmmo) |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
77 |
local x, y = GetGearPosition(hog) |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
78 |
x = x + 2 |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
79 |
y = y + 32 |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
80 |
local ammoStr = "" |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
81 |
local ammoLength = 0 |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
82 |
for _, _ in pairs(ammoList) do |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
83 |
ammoLength = ammoLength + 1 |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
84 |
end |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
85 |
local a = 1 |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
86 |
for ammo, count in pairs(ammoList) do |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
87 |
if not noAddAmmo then |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
88 |
local oldCount = GetAmmoCount(hog, ammo) |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
89 |
local newCount = oldCount + count |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
90 |
-- Make sure that finite ammo stays finite |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
91 |
if count < 100 and oldCount < 100 and newCount >= 100 then |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
92 |
newCount = 99 |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
93 |
end |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
94 |
AddAmmo(hog, ammo, newCount) |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
95 |
end |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
96 |
if IsHogLocal(hog) then |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
97 |
x = x + 2 |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
98 |
y = y + 32 |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
99 |
local vgear = AddVisualGear(x, y, vgtAmmo, 0, true) |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
100 |
if vgear ~= nil then |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
101 |
local vgtFrame = ammo |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
102 |
SetVisualGearValues(vgear, nil, nil, nil, nil, nil, vgtFrame) |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
103 |
end |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
104 |
|
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
105 |
ammoStr = ammoStr .. string.format(loc("%s (+%d)"), GetAmmoName(ammo), count) |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
106 |
if a < ammoLength then |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
107 |
ammoStr = ammoStr .. " • " |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
108 |
end |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
109 |
end |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
110 |
a = a + 1 |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
111 |
end |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
112 |
if ammoLength > 0 then |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
113 |
PlaySound(sndShotgunReload) |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
114 |
-- Show collected ammo |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
115 |
if IsHogLocal(hog) then |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
116 |
AddCaption(ammoStr, GetClanColor(GetHogClan(hog)), capgrpAmmoinfo) |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
117 |
end |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
118 |
end |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
119 |
end |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
120 |
|
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
121 |
function SetAttackState(state) |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
122 |
if state==true then |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
123 |
SetInputMask(bor(GetInputMask(), gmAttack)) |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
124 |
else |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
125 |
SetInputMask(band(GetInputMask(), bnot(gmAttack))) |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
126 |
end |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
127 |
end |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
128 |
|
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
129 |
--====MISC_TIMER GLOBALS==== |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
130 |
local CS = {} |
10965 | 131 |
|
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
132 |
--for selecting continent |
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
133 |
|
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
134 |
CS.INIT_TEAMS = {} |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
135 |
CS.GAME_STARTED = false |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
136 |
CS.SELECT_CONTINENT_CHECK=false |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
137 |
CS.START_TIME=0 |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
138 |
CS.HOG_HEALTH=100 |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
139 |
CS.TEAM_CONTINENT = {} |
7893 | 140 |
|
8618 | 141 |
--variables for seeing if you have swaped around on a weapon |
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
142 |
CS.AUSTRALIAN_SPECIAL=0 |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
143 |
CS.AFRICAN_SPECIAL_SEDUCTION=0 |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
144 |
CS.AFRICAN_SPECIAL_STICKY=0 |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
145 |
CS.SOUTH_AMERICAN_SPECIAL=false |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
146 |
CS.NORTH_AMERICAN_SPECIAL_SNIPER=1 |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
147 |
CS.NORTH_AMERICAN_SPECIAL_SNIPER_IS_ON=false |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
148 |
CS.KERGUELEN_SPECIAL=1 |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
149 |
CS.NORTH_AMERICAN_SPECIAL_SHOTGUN=false |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
150 |
CS.EUROPE_SPECIAL=0 |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
151 |
CS.ANTARCTICA_SPECIAL=0 |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
152 |
CS.SEDUCTION_INCREASER=0 |
7893 | 153 |
|
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
154 |
--detection if something is activated |
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
155 |
CS.SWITCH_HOG_IS_ON=false |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
156 |
CS.VAMPIRIC_IS_ON=0 |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
157 |
CS.EXTRA_DAMAGE_IS_ON=100 |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
158 |
CS.PARACHUTE_IS_ON=false |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
159 |
CS.PRECISE=false |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
160 |
|
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
161 |
CS.CONTINENT_LABEL_TIMER=-1 |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
162 |
CS.SPEECH_TIMER=-1 |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
163 |
CS.HANDLE_SPECIAL_WEAPON_MISC_TIMER=-1 |
13379
e1aa72e0872e
CS: Fix display of ammo caption for weapon specials
Wuzzy <Wuzzy2@mail.ru>
parents:
13377
diff
changeset
|
164 |
CS.HANDLE_SOUTH_AMERICAN_SPECIAL_TIMER=-1 |
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
165 |
CS.CONFIRM_CONTINENT_SELECTION=-1 |
7893 | 166 |
|
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
167 |
--the visual circle for kerguelen |
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
168 |
CS.VISUAL_CIRCLE=nil |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
169 |
|
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
170 |
--the global temporary value |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
171 |
CS.TEMP_VALUE=0 |
8618 | 172 |
|
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
173 |
--true if player used any sticky mine mine mode besides hedgehog projectile in this turn |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
174 |
CS.AFRICAN_SPECIAL_NON_PROJECTILE_USED=false |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
175 |
|
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
176 |
-- “constants” |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
177 |
CS.SABOTAGE_GRAVITY=350 |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
178 |
CS.SABOTAGE_GRAVITY_LOW=175 |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
179 |
CS.SABOTAGE_DAMAGE=2 |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
180 |
CS.SABOTAGE_FREQUENCY=100 |
7893 | 181 |
|
8618 | 182 |
--for sabotage |
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
183 |
CS.SABOTAGE_COUNTER=0 |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
184 |
CS.SABOTAGE_HOGS={} |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
185 |
CS.SABOTAGE_FREQUENCY_NOW=0 |
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
186 |
|
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
187 |
--for sundaland |
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
188 |
CS.SUNDALAND_END_HOG_CONTINENT_NAME=nil |
13364 | 189 |
|
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
190 |
--misc. |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
191 |
CS.OPTION_NO_SPECIALS=false |
7893 | 192 |
|
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
193 |
--====GENERAL GLOBALS (useful for handling continents)==== |
7893 | 194 |
|
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
195 |
CS.SNIPER_SPECIAL_NAME = loc("Green Lipstick Bullet") |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
196 |
CS.BASEBALLBAT_BOOMERANG_NAME = loc("Bouncy Boomerang") |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
197 |
CS.CHEESE_SPECIAL_NAME = loc("Anno 1032") |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
198 |
CS.SEDUCTION_SPECIAL_NAME = loc("Dust Storm") |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
199 |
CS.BASEBALLBAT_CRICKET_NAME = loc("Cricket Time") |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
200 |
CS.PARACHUTE_SPECIAL_NAME = loc("Heroic Wind") |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
201 |
CS.HAMMER_ROAR_NAME = loc("Penguin Roar") |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
202 |
CS.HAMMER_SWAP_NAME = loc("Disguise as a Rockhopper Penguin") |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
203 |
CS.HAMMER_LONELY_NAME = loc("Lonely Cries") |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
204 |
CS.STICKY_PROJECTILE_NAME = loc("Hedgehog Projectile") |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
205 |
CS.STICKY_NAPALM_NAME = loc("Napalm Rocket") |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
206 |
CS.SHOTGUN_SPECIAL_NAME = loc("Eagle Eye") |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
207 |
CS.MOLOTOV_SPECIAL_NAME = loc("Medicine") |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
208 |
CS.HAMMER_SABOTAGE_NAME = loc("Flare") |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
209 |
CS.PICKHAMMER_SPECIAL_NAME = loc("Upside-Down World") |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
210 |
|
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
211 |
CS.SNIPER_SPECIAL_DESC = loc("Poisonous, deals no damage.") |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
212 |
CS.BASEBALLBAT_BOOMERANG_DESC = loc("Launch a bouncy ball which explodes into a crate.") |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
213 |
CS.CHEESE_SPECIAL_DESC = loc("Strong knockback, but no poison.") |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
214 |
CS.SEDUCTION_SPECIAL_DESC = loc("Deals 15 damage to all enemies in the circle.") |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
215 |
CS.BASEBALLBAT_CRICKET_DESC = loc("Throw a 1 second mine!") |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
216 |
CS.PARACHUTE_SPECIAL_DESC = loc("Drop a ball of dirt which turns into a|cluster on impact. Doesn’t end turn.") |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
217 |
CS.HAMMER_ROAR_DESC = loc("Deal 15 damage + 10% of your hog’s health to all hogs around you and get 2/3 back.") |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
218 |
CS.HAMMER_SWAP_DESC = loc("Swap place with a random enemy in the circle.") |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
219 |
CS.HAMMER_LONELY_DESC = loc("Rise the water if nobody else is in the circle and deal 6 damage to all enemy hogs.") |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
220 |
CS.STICKY_PROJECTILE_DESC = loc("Fire your hedgehog like a sticky mine.") |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
221 |
CS.STICKY_NAPALM_DESC = loc("Fire a rocket with napalm.") |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
222 |
CS.SHOTGUN_SPECIAL_DESC = loc("Teleport to the impact location.") |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
223 |
CS.MOLOTOV_SPECIAL_DESC = loc("Fire some exploding medicine that will heal 15 health to all hogs in its effect radius.") |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
224 |
CS.HAMMER_SABOTAGE_DESC = loc("Sabotage all hogs in the circle and fire a cluster above you.|Sabotaged hogs lose health and have to deal with a very high gravity during their turn.") |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
225 |
CS.PICKHAMMER_SPECIAL_DESC = loc("Teleport to the top of the map, expect fall damage!") |
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
226 |
|
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
227 |
CS.INVULNERABLE_SPECIAL_CAPTION = loc("15+%d damage, %d invulnerable left") |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
228 |
-- Make info |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
229 |
local minfo = function(name, desc) |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
230 |
return string.format(loc("%s: %s"), name, desc) |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
231 |
end |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
232 |
CS.SNIPER_SPECIAL_INFO = minfo(CS.SNIPER_SPECIAL_NAME, CS.SNIPER_SPECIAL_DESC) |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
233 |
CS.BASEBALLBAT_BOOMERANG_INFO = minfo(CS.BASEBALLBAT_BOOMERANG_NAME, CS.BASEBALLBAT_BOOMERANG_DESC) |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
234 |
CS.CHEESE_SPECIAL_INFO = minfo(CS.CHEESE_SPECIAL_NAME, CS.CHEESE_SPECIAL_DESC) |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
235 |
CS.SEDUCTION_SPECIAL_INFO = minfo(CS.SEDUCTION_SPECIAL_NAME, CS.SEDUCTION_SPECIAL_DESC) |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
236 |
CS.INVULNERABLE_SPECIAL_INFO = loc("Increase the dust storm damage by sacrificing|your invulnerable ammo.") |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
237 |
CS.INVULNERABLE_SPECIAL_CTRL = loc("Up/Down: Adjust dust storm damage") |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
238 |
CS.BASEBALLBAT_CRICKET_INFO = minfo(CS.BASEBALLBAT_CRICKET_NAME, CS.BASEBALLBAT_CRICKET_DESC) |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
239 |
CS.PARACHUTE_SPECIAL_INFO = minfo(CS.PARACHUTE_SPECIAL_NAME, CS.PARACHUTE_SPECIAL_DESC) |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
240 |
CS.HAMMER_ROAR_INFO = minfo(CS.HAMMER_ROAR_NAME, CS.HAMMER_ROAR_DESC) |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
241 |
CS.HAMMER_SWAP_INFO = minfo(CS.HAMMER_SWAP_NAME, CS.HAMMER_SWAP_DESC) |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
242 |
CS.HAMMER_LONELY_INFO = minfo(CS.HAMMER_LONELY_NAME, CS.HAMMER_LONELY_DESC) |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
243 |
CS.STICKY_PROJECTILE_INFO = minfo(CS.STICKY_PROJECTILE_NAME, CS.STICKY_PROJECTILE_DESC) |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
244 |
CS.STICKY_NAPALM_INFO = minfo(CS.STICKY_NAPALM_NAME, CS.STICKY_NAPALM_DESC) |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
245 |
CS.SHOTGUN_SPECIAL_INFO = minfo(CS.SHOTGUN_SPECIAL_NAME, CS.SHOTGUN_SPECIAL_DESC) |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
246 |
CS.MOLOTOV_SPECIAL_INFO = minfo(CS.MOLOTOV_SPECIAL_NAME, CS.MOLOTOV_SPECIAL_DESC) |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
247 |
CS.HAMMER_SABOTAGE_INFO = minfo(CS.HAMMER_SABOTAGE_NAME, CS.HAMMER_SABOTAGE_DESC) |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
248 |
CS.PICKHAMMER_SPECIAL_INFO = minfo(CS.PICKHAMMER_SPECIAL_NAME, CS.PICKHAMMER_SPECIAL_DESC) |
13364 | 249 |
|
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
250 |
CS.SELECT_WEP_INFORMATION=loc("Select your continent with [Up]/[Down] or by selecting a representative weapon.").."|".. |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
251 |
loc("Press [Attack] to confirm.") |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
252 |
CS.SELECT_WEP_INFORMATION_SHORT=loc("%s, select your continent!") |
7893 | 253 |
|
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
254 |
function GeneralInformation() |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
255 |
local select_wep, quit_hint |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
256 |
if not CS.GAME_STARTED then |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
257 |
select_wep = "| |"..CS.SELECT_WEP_INFORMATION |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
258 |
quit_hint = "|"..loc("Hint: Use the quit key to see the team’s continent.") |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
259 |
else |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
260 |
select_wep = "" |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
261 |
quit_hint = "" |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
262 |
end |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
263 |
local general_information = |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
264 |
loc("Continents: Select a continent at the beginning.").."|".. |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
265 |
loc("Supplies: Each continent gives you unique weapons, specials and health.").."|".. |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
266 |
loc("Weapon specials: Some weapons have special modes (see weapon description).").. |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
267 |
select_wep.. |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
268 |
quit_hint |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
269 |
return general_information |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
270 |
end |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
271 |
|
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
272 |
CS.CONTINENT_INFORMATION = |
7893 | 273 |
{ |
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
274 |
{loc("North America"), |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
275 |
loc("The continent of firearms"), |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
276 |
loc("The Union: You can select a hedgehog at the start of your turns.").."| |".. |
13991
f0dea2b88cf8
Continental supplies: Highlight "Special weapons:" line in mission panel
Wuzzy <Wuzzy2@mail.ru>
parents:
13753
diff
changeset
|
277 |
loc("Special weapons:").." |".. |
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
278 |
GetAmmoName(amShotgun)..": "..CS.SHOTGUN_SPECIAL_INFO.."|".. |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
279 |
GetAmmoName(amSniperRifle)..": "..CS.SNIPER_SPECIAL_INFO, |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
280 |
{amSniperRifle,1}, |
13364 | 281 |
{{amShotgun,100},{amDEagle,100},{amLaserSight,2},{amSniperRifle,100},{amCake,1},{amAirAttack,2},{amSwitch,2}}, |
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
282 |
{sndShotgunFire,sndCover},100}, |
7893 | 283 |
|
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
284 |
{loc("South America"), |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
285 |
loc("The continent of guerilla tactics"), |
13991
f0dea2b88cf8
Continental supplies: Highlight "Special weapons:" line in mission panel
Wuzzy <Wuzzy2@mail.ru>
parents:
13753
diff
changeset
|
286 |
"| |"..loc("Special weapons:").." |" |
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
287 |
..GetAmmoName(amGasBomb)..": "..CS.CHEESE_SPECIAL_INFO, |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
288 |
{amGasBomb,2}, |
13364 | 289 |
{{amBirdy,100},{amHellishBomb,1},{amBee,100},{amGasBomb,100},{amFlamethrower,100},{amNapalm,2},{amExtraDamage,3}}, |
290 |
{sndEggBreak,sndLaugh},125}, |
|
7893 | 291 |
|
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
292 |
{loc("Europe"), |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
293 |
loc("The continent of medicine"), |
13991
f0dea2b88cf8
Continental supplies: Highlight "Special weapons:" line in mission panel
Wuzzy <Wuzzy2@mail.ru>
parents:
13753
diff
changeset
|
294 |
"| |"..loc("Special weapons:").." |" |
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
295 |
..GetAmmoName(amMolotov)..": "..CS.MOLOTOV_SPECIAL_INFO, |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
296 |
{amBazooka,3}, |
13364 | 297 |
{{amBazooka,100},{amGrenade,100},{amMortar,100},{amMolotov,100},{amVampiric,4},{amPiano,1},{amResurrector,2},{amJetpack,4}}, |
298 |
{sndExplosion,sndEnemyDown},100}, |
|
9805 | 299 |
|
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
300 |
{loc("Africa"), |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
301 |
loc("The continent of dust"), |
13991
f0dea2b88cf8
Continental supplies: Highlight "Special weapons:" line in mission panel
Wuzzy <Wuzzy2@mail.ru>
parents:
13753
diff
changeset
|
302 |
"| |"..loc("Special weapons:").." |".. |
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
303 |
GetAmmoName(amSeduction)..": "..CS.SEDUCTION_SPECIAL_INFO.."|".. |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
304 |
CS.INVULNERABLE_SPECIAL_INFO.."|".. |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
305 |
GetAmmoName(amSMine)..": "..CS.STICKY_PROJECTILE_INFO.."|".. |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
306 |
GetAmmoName(amSMine)..": "..CS.STICKY_NAPALM_INFO, |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
307 |
{amSMine,4}, |
13364 | 308 |
{{amSMine,100},{amWatermelon,1},{amDrillStrike,1},{amDrill,100},{amInvulnerable,7},{amSeduction,100},{amLandGun,3}}, |
309 |
{sndMelonImpact,sndCoward},125}, |
|
7893 | 310 |
|
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
311 |
{loc("Asia"), |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
312 |
loc("The continent of ninjas"), |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
313 |
loc("Textile industry: Will give you a parachute every second turn.").."| |".. |
13991
f0dea2b88cf8
Continental supplies: Highlight "Special weapons:" line in mission panel
Wuzzy <Wuzzy2@mail.ru>
parents:
13753
diff
changeset
|
314 |
loc("Special weapons:").." |".. |
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
315 |
GetAmmoName(amParachute)..": "..CS.PARACHUTE_SPECIAL_INFO, |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
316 |
{amRope,5}, |
13364 | 317 |
{{amRope,100},{amFirePunch,100},{amParachute,1},{amKnife,2},{amDynamite,1}}, |
318 |
{sndRopeAttach,sndComeonthen},50}, |
|
7893 | 319 |
|
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
320 |
{loc("Australia"), |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
321 |
loc("The continent of sports"), |
13991
f0dea2b88cf8
Continental supplies: Highlight "Special weapons:" line in mission panel
Wuzzy <Wuzzy2@mail.ru>
parents:
13753
diff
changeset
|
322 |
"| |"..loc("Special weapons:").." |".. |
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
323 |
GetAmmoName(amBaseballBat)..": "..CS.BASEBALLBAT_CRICKET_INFO.."|".. |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
324 |
GetAmmoName(amBaseballBat)..": "..CS.BASEBALLBAT_BOOMERANG_INFO.."|".. |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
325 |
loc("Baseball bat specials cannot be used close to other hogs."), |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
326 |
{amBaseballBat,6}, |
13364 | 327 |
{{amBaseballBat,100},{amMine,100},{amLowGravity,4},{amBlowTorch,100},{amRCPlane,2},{amRubber,4}}, |
328 |
{sndBaseballBat,sndNooo},100}, |
|
329 |
||
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
330 |
{loc("Antarctica"), |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
331 |
loc("The continent of ice and science"), |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
332 |
loc("Antarctic summer: Every 4th turn you get 1 girder, 1 mudball, 2 sine guns and 1 portable portal device.").."| |".. |
13991
f0dea2b88cf8
Continental supplies: Highlight "Special weapons:" line in mission panel
Wuzzy <Wuzzy2@mail.ru>
parents:
13753
diff
changeset
|
333 |
loc("Special weapons:").." |".. |
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
334 |
GetAmmoName(amPickHammer)..": "..CS.PICKHAMMER_SPECIAL_INFO, |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
335 |
{amIceGun,7}, |
13364 | 336 |
{{amSnowball,2},{amPickHammer,100},{amSineGun,4},{amGirder,1},{amExtraTime,1},{amIceGun,1},{amPortalGun,2}}, |
337 |
{sndSineGun,sndOops},75}, |
|
7893 | 338 |
|
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
339 |
{loc("Kerguelen"), |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
340 |
loc("The continent of cowards"), |
13991
f0dea2b88cf8
Continental supplies: Highlight "Special weapons:" line in mission panel
Wuzzy <Wuzzy2@mail.ru>
parents:
13753
diff
changeset
|
341 |
"| |"..loc("Special weapons:").." |".. |
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
342 |
GetAmmoName(amHammer)..": "..CS.HAMMER_ROAR_INFO.."|".. |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
343 |
GetAmmoName(amHammer)..": "..CS.HAMMER_SWAP_INFO.."|".. |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
344 |
GetAmmoName(amHammer)..": "..CS.HAMMER_LONELY_INFO.."|".. |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
345 |
GetAmmoName(amHammer)..": "..CS.HAMMER_SABOTAGE_INFO, |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
346 |
{amHammer,8}, |
13364 | 347 |
{{amHammer,100},{amMineStrike,1},{amBallgun,1},{amTeleport,1}}, |
348 |
{sndPiano5,sndStupid},75}, |
|
7893 | 349 |
|
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
350 |
{loc("Zealandia"), |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
351 |
loc("The forgotten continent"), |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
352 |
loc("Surprise supplies: Get 1-3 random weapons each turn.") .. "|" .. |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
353 |
loc("Treasure: Massive weapon bonus in first turn.").."|".. |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
354 |
loc("Forgetfulness: You will lose all your weapons each turn."), |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
355 |
{amInvulnerable,9}, |
13364 | 356 |
{{amBazooka,1},{amGrenade,1},{amBlowTorch,1},{amSwitch,1},{amRope,1},{amDrill,1},{amDEagle,1},{amPickHammer,1},{amFirePunch,1},{amWhip,1},{amMortar,1},{amSnowball,1},{amExtraTime,1},{amInvulnerable,1},{amVampiric,1},{amFlamethrower,1},{amBee,1},{amClusterBomb,1},{amTeleport,1},{amLowGravity,1},{amJetpack,1},{amGirder,1},{amLandGun,1},{amBirdy,1},{amAirMine,1},{amTardis,1},{amLaserSight,1},{amAirMine,1}}, |
357 |
{sndSplash,sndFirstBlood},100}, |
|
7893 | 358 |
|
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
359 |
{loc("Sundaland"), |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
360 |
loc("The continent of greed"), |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
361 |
loc("Bounty: Get 6 weapons for each kill (even on own hogs)."), |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
362 |
{amTardis,10}, |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
363 |
{{amClusterBomb,5},{amTardis,100},{amWhip,100},{amKamikaze,100},{amAirMine,2}}, |
13364 | 364 |
{sndWarp,sndSameTeam},100} |
9805 | 365 |
|
7893 | 366 |
} |
367 |
||
368 |
--weapontype,ammo,?,duration,*times your choice,affect on random team (should be placed with 1,0,1,0,1 on the 6th option for better randomness) |
|
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
369 |
CS.WEAPONS_DAMAGE = { |
13364 | 370 |
{amKamikaze, 0, 1, 0, 1, 0}, |
371 |
{amSineGun, 0, 1, 0, 1, 0}, |
|
372 |
{amMineStrike, 0, 1, 6, 1, 1}, |
|
373 |
{amGrenade, 0, 1, 0, 1, 0}, |
|
374 |
{amPiano, 0, 1, 7, 1, 0}, |
|
7893 | 375 |
{amClusterBomb, 0, 1, 0, 1, 0}, |
13364 | 376 |
{amBee, 0, 1, 0, 1, 0}, |
377 |
{amShotgun, 0, 1, 0, 1, 0}, |
|
378 |
{amSniperRifle, 0, 1, 0, 1, 0}, |
|
379 |
{amDynamite, 0, 1, 6, 1, 1}, |
|
380 |
{amFirePunch, 0, 1, 0, 1, 0}, |
|
381 |
{amHellishBomb, 0, 1, 6, 1, 2}, |
|
382 |
{amWhip, 0, 1, 0, 1, 0}, |
|
383 |
{amNapalm, 0, 1, 6, 1, 1}, |
|
384 |
{amPickHammer, 0, 1, 0, 1, 0}, |
|
7893 | 385 |
{amBaseballBat, 0, 1, 0, 1, 1}, |
13364 | 386 |
{amMortar, 0, 1, 0, 1, 0}, |
387 |
{amCake, 0, 1, 5, 1, 2}, |
|
388 |
{amSeduction, 0, 1, 0, 1, 0}, |
|
389 |
{amWatermelon, 0, 1, 6, 1, 2}, |
|
390 |
{amDrill, 0, 1, 0, 1, 0}, |
|
391 |
{amBallgun, 0, 1, 8, 1, 2}, |
|
392 |
{amDEagle, 0, 1, 0, 1, 0}, |
|
393 |
{amMolotov, 0, 1, 0, 1, 0}, |
|
394 |
{amHammer, 0, 1, 0, 1, 1}, |
|
395 |
{amBirdy, 0, 1, 0, 1, 0}, |
|
396 |
{amRCPlane, 0, 1, 6, 1, 2}, |
|
397 |
{amMine, 0, 1, 0, 1, 0}, |
|
398 |
{amGasBomb, 0, 1, 0, 1, 0}, |
|
399 |
{amAirAttack, 0, 1, 5, 1, 1}, |
|
400 |
{amBlowTorch, 0, 1, 0, 1, 0}, |
|
401 |
{amFlamethrower,0, 1, 0, 1, 0}, |
|
402 |
{amSMine, 0, 1, 0, 1, 0}, |
|
403 |
{amSnowball, 0, 1, 0, 1, 0}, |
|
404 |
{amKnife, 0, 1, 0, 1, 0}, |
|
405 |
{amDrillStrike, 0, 1, 5, 1, 1}, |
|
406 |
{amBazooka, 0, 1, 0, 1, 0}, |
|
407 |
{amAirMine, 0, 1, 0, 1, 0}, |
|
7893 | 408 |
} |
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
409 |
CS.WEAPONS_SUPPORT = { |
13364 | 410 |
{amParachute, 0, 1, 0, 1, 0}, |
411 |
{amGirder, 0, 1, 0, 1, 0}, |
|
412 |
{amSwitch, 0, 1, 0, 1, 0}, |
|
413 |
{amLowGravity, 0, 1, 0, 1, 0}, |
|
7893 | 414 |
{amExtraDamage, 0, 1, 2, 1, 0}, |
13364 | 415 |
{amRope, 0, 1, 0, 1, 0}, |
416 |
{amInvulnerable,0, 1, 0, 1, 0}, |
|
417 |
{amExtraTime, 0, 1, 0, 1, 0}, |
|
418 |
{amLaserSight, 0, 1, 0, 1, 0}, |
|
419 |
{amVampiric, 0, 1, 0, 1, 0}, |
|
420 |
{amJetpack, 0, 1, 0, 1, 0}, |
|
421 |
{amPortalGun, 0, 1, 3, 1, 1}, |
|
422 |
{amResurrector, 0, 1, 2, 1, 0}, |
|
423 |
{amTeleport, 0, 1, 0, 1, 0}, |
|
424 |
{amLandGun, 0, 1, 0, 1, 0}, |
|
425 |
{amTardis, 0, 1, 0, 1, 0}, |
|
426 |
{amIceGun, 0, 1, 0, 1, 0}, |
|
427 |
{amRubber, 0, 1, 0, 1, 0} |
|
10965 | 428 |
|
7893 | 429 |
} |
8618 | 430 |
|
13364 | 431 |
--check if weps valid |
432 |
function wepNotValidBorder(weapon) |
|
433 |
if(MapHasBorder() == false or (weapon ~= amAirAttack and weapon ~= amMineStrike and weapon ~= amNapalm and weapon ~= amDrillStrike and weapon ~= amPiano)) |
|
434 |
then |
|
435 |
return true |
|
436 |
end |
|
437 |
||
438 |
return false |
|
439 |
end |
|
440 |
||
8618 | 441 |
--will check after borders and stuff |
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
442 |
function ValidateWeapon(hog,weapon,amount) |
13364 | 443 |
if(wepNotValidBorder(weapon)) |
7893 | 444 |
then |
9805 | 445 |
if(amount==1) |
446 |
then |
|
447 |
AddAmmo(hog, weapon) |
|
448 |
else |
|
449 |
AddAmmo(hog, weapon,amount) |
|
450 |
end |
|
451 |
end |
|
452 |
end |
|
453 |
||
13364 | 454 |
function SpawnRandomCrate(x,y,strength) |
14235
8edbdd3a1fe7
Get rid of table.maxn in all Lua code
Wuzzy <Wuzzy2@mail.ru>
parents:
13992
diff
changeset
|
455 |
local tot=#CS.WEAPONS_SUPPORT + #CS.WEAPONS_DAMAGE |
13364 | 456 |
local rand=GetRandom(tot)+1 |
457 |
||
14235
8edbdd3a1fe7
Get rid of table.maxn in all Lua code
Wuzzy <Wuzzy2@mail.ru>
parents:
13992
diff
changeset
|
458 |
if(rand > #CS.WEAPONS_SUPPORT) |
13364 | 459 |
then |
14235
8edbdd3a1fe7
Get rid of table.maxn in all Lua code
Wuzzy <Wuzzy2@mail.ru>
parents:
13992
diff
changeset
|
460 |
local weapon = rand - #CS.WEAPONS_SUPPORT |
13364 | 461 |
|
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
462 |
while(wepNotValidBorder(CS.WEAPONS_DAMAGE[weapon][1])==false) |
13364 | 463 |
do |
14235
8edbdd3a1fe7
Get rid of table.maxn in all Lua code
Wuzzy <Wuzzy2@mail.ru>
parents:
13992
diff
changeset
|
464 |
if(weapon >= #CS.WEAPONS_DAMAGE) |
13364 | 465 |
then |
466 |
weapon=0 |
|
467 |
end |
|
468 |
weapon = weapon+1 |
|
469 |
end |
|
470 |
||
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
471 |
SpawnAmmoCrate(x, y, CS.WEAPONS_DAMAGE[weapon][1]) |
13364 | 472 |
else |
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
473 |
SpawnUtilityCrate(x, y, CS.WEAPONS_SUPPORT[rand][1]) |
13364 | 474 |
end |
475 |
end |
|
476 |
||
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
477 |
--removes one weapon |
9805 | 478 |
function RemoveWeapon(hog,weapon) |
479 |
||
480 |
if(GetAmmoCount(hog, weapon)<100) |
|
481 |
then |
|
482 |
AddAmmo(hog,weapon,GetAmmoCount(hog, weapon)-1) |
|
7893 | 483 |
end |
484 |
end |
|
485 |
||
486 |
--reset all weapons for a team |
|
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
487 |
function CleanWeapons(hog) |
7893 | 488 |
|
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
489 |
for w=1, #CS.WEAPONS_SUPPORT do |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
490 |
AddAmmo(hog, CS.WEAPONS_SUPPORT[w][1], 0) |
7893 | 491 |
end |
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
492 |
for w=1, #CS.WEAPONS_DAMAGE do |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
493 |
AddAmmo(hog, CS.WEAPONS_DAMAGE[w][1], 0) |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
494 |
end |
7893 | 495 |
end |
496 |
||
8618 | 497 |
--get the weapons from a weaponset |
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
498 |
function LoadWeaponset(hog, num) |
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
499 |
for v,w in pairs(CS.CONTINENT_INFORMATION[num][5]) |
7893 | 500 |
do |
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
501 |
ValidateWeapon(hog, w[1],w[2]) |
7893 | 502 |
end |
13364 | 503 |
|
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
504 |
CS.TEMP_VALUE=CS.CONTINENT_INFORMATION[num][7] |
13364 | 505 |
runOnGears(SetHogHealth) |
7893 | 506 |
end |
507 |
||
8618 | 508 |
--list up all weapons from the icons for each continent |
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
509 |
function InitWeaponsMenu(hog) |
9805 | 510 |
|
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
511 |
if(GetHogLevel(hog)==0 or CS.CONTINENT_INFORMATION[1][6][1]==sndFrozenHogImpact) |
9805 | 512 |
then |
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
513 |
for v,w in pairs(CS.CONTINENT_INFORMATION) |
9805 | 514 |
do |
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
515 |
ValidateWeapon(hog, CS.CONTINENT_INFORMATION[v][4][1], 100) |
9805 | 516 |
end |
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
517 |
AddAmmo(hog, amSwitch, 100) --random continent |
10965 | 518 |
|
9805 | 519 |
--for the computers |
520 |
else |
|
521 |
--europe |
|
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
522 |
ValidateWeapon(hog, CS.CONTINENT_INFORMATION[3][4][1], 100) |
9805 | 523 |
--north america |
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
524 |
ValidateWeapon(hog, CS.CONTINENT_INFORMATION[1][4][1], 100) |
7893 | 525 |
end |
526 |
end |
|
527 |
||
8618 | 528 |
--shows the continent info |
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
529 |
function ShowContinentInfo(continent,time,generalinf) |
8618 | 530 |
local geninftext="" |
7893 | 531 |
local ns=false |
532 |
if(time==-1) |
|
533 |
then |
|
534 |
time=0 |
|
535 |
ns=true |
|
536 |
end |
|
8618 | 537 |
if(generalinf) |
538 |
then |
|
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
539 |
geninftext="| |"..loc("General information:").."|"..GeneralInformation() |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
540 |
else |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
541 |
geninftext="| |"..loc("Press [Attack] to select this continent!") |
8618 | 542 |
end |
10965 | 543 |
|
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
544 |
ShowMission(CS.CONTINENT_INFORMATION[continent][1], |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
545 |
CS.CONTINENT_INFORMATION[continent][2], |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
546 |
string.format(loc("Initial health: %d"), CS.CONTINENT_INFORMATION[continent][7]) .. "|".. |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
547 |
CS.CONTINENT_INFORMATION[continent][3]..geninftext, |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
548 |
CS.CONTINENT_INFORMATION[continent][4][2], time) |
7893 | 549 |
if(ns) |
550 |
then |
|
551 |
HideMission() |
|
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
552 |
elseif not CS.GAME_STARTED then |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
553 |
AddCaption(CS.CONTINENT_INFORMATION[continent][1], GetClanColor(GetHogClan(CurrentHedgehog)), capgrpAmmoinfo) |
7893 | 554 |
end |
555 |
end |
|
556 |
||
8618 | 557 |
--will show a circle of gears (eye candy) |
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
558 |
function VisualExplosion(range,xpos,ypos,gear1,gear2) |
7893 | 559 |
local degr=0 |
560 |
local lap=30 |
|
561 |
while(lap<range) |
|
562 |
do |
|
563 |
while(degr < 6.2831) |
|
564 |
do |
|
565 |
AddVisualGear(xpos+math.cos(degr+0.1)*(lap+5), ypos+math.sin(degr+0.1)*(lap+5), gear1, 0, false) |
|
566 |
if(gear2~=false) |
|
567 |
then |
|
568 |
AddVisualGear(xpos+math.cos(degr)*lap, ypos+math.sin(degr)*lap, gear2, 0, false) |
|
569 |
end |
|
570 |
degr=degr+((3.1415*3)*0.125) --1/8 = 0.125 |
|
571 |
end |
|
572 |
lap=lap+30 |
|
573 |
degr=degr-6.2831 |
|
574 |
end |
|
575 |
end |
|
576 |
||
13364 | 577 |
--give one random weapon |
578 |
function GetRandomWeapon(hog, weptype, power, onlyonewep, getdelayedweps, mypower) |
|
10965 | 579 |
|
13364 | 580 |
local wepout=nil |
581 |
local rand_weaponset_power=mypower |
|
10965 | 582 |
|
13364 | 583 |
if(rand_weaponset_power < power) |
584 |
then |
|
14235
8edbdd3a1fe7
Get rid of table.maxn in all Lua code
Wuzzy <Wuzzy2@mail.ru>
parents:
13992
diff
changeset
|
585 |
local numberofweapons = #weptype |
10965 | 586 |
|
13364 | 587 |
local random_weapon = math.abs(GetRandom(numberofweapons)+1) |
10965 | 588 |
|
13364 | 589 |
while((weptype[random_weapon][4]>TotalRounds and getdelayedweps==false) or rand_weaponset_power+weptype[random_weapon][6]>power |
590 |
or (wepNotValidBorder(weptype[random_weapon][1])==false) or GetAmmoCount(hog,weptype[random_weapon][1])>=100 |
|
591 |
or (GetAmmoCount(hog,weptype[random_weapon][1])>=1 and onlyonewep==true)) |
|
8618 | 592 |
do |
13364 | 593 |
if(random_weapon>=numberofweapons) |
8618 | 594 |
then |
595 |
random_weapon=0 |
|
596 |
end |
|
597 |
random_weapon = random_weapon+1 |
|
598 |
end |
|
13364 | 599 |
|
600 |
wepout=weptype[random_weapon][1] |
|
10965 | 601 |
|
13364 | 602 |
ValidateWeapon(hog, wepout,1) |
603 |
rand_weaponset_power=mypower+weptype[random_weapon][6] |
|
604 |
end |
|
10965 | 605 |
|
13364 | 606 |
return rand_weaponset_power , wepout |
7893 | 607 |
end |
608 |
||
13364 | 609 |
--zealandia (generates weapons from the weaponinfo above) and sundaland |
610 |
function RandomContinentsGetWeapons(hog) |
|
611 |
if(GetGearType(hog) == gtHedgehog) |
|
612 |
then |
|
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
613 |
local currCont=CS.TEAM_CONTINENT[GetHogTeamName(hog)] |
10965 | 614 |
|
13364 | 615 |
if(currCont~=0) |
9805 | 616 |
then |
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
617 |
local checkDefCont=CS.CONTINENT_INFORMATION[currCont][4][2] |
10965 | 618 |
|
13364 | 619 |
--for sunda |
620 |
local wepamount=getTeamValue(GetHogTeamName(hog), "sundaland-count") |
|
10965 | 621 |
|
13364 | 622 |
if(checkDefCont==9 and getTeamValue(GetHogTeamName(hog), "rand-done-turn")==false) |
9805 | 623 |
then |
13364 | 624 |
CleanWeapons(hog) |
625 |
||
626 |
local rand_weaponset_power = 0 |
|
627 |
||
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
628 |
rand_weaponset_power=GetRandomWeapon(hog,CS.WEAPONS_DAMAGE,100,true,false,rand_weaponset_power) |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
629 |
rand_weaponset_power=GetRandomWeapon(hog,CS.WEAPONS_SUPPORT,2,true,false,rand_weaponset_power) |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
630 |
rand_weaponset_power=GetRandomWeapon(hog,CS.WEAPONS_DAMAGE,1,true,false,rand_weaponset_power) |
13364 | 631 |
|
632 |
setTeamValue(GetHogTeamName(hog), "rand-done-turn", true) |
|
633 |
||
634 |
elseif(checkDefCont==10 and wepamount~=nil) |
|
635 |
then |
|
636 |
local loci=0 |
|
10965 | 637 |
|
13364 | 638 |
while(loci<wepamount) |
639 |
do |
|
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
640 |
local _ |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
641 |
local wep = {} |
13364 | 642 |
--6 random weapons |
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
643 |
_, wep[1] = GetRandomWeapon(hog,CS.WEAPONS_DAMAGE,100,false,true,0) |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
644 |
_, wep[2] = GetRandomWeapon(hog,CS.WEAPONS_DAMAGE,100,false,true,0) |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
645 |
_, wep[3] = GetRandomWeapon(hog,CS.WEAPONS_DAMAGE,2,false,true,1) |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
646 |
|
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
647 |
_, wep[4] = GetRandomWeapon(hog,CS.WEAPONS_SUPPORT,100,false,true,0) |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
648 |
_, wep[5] = GetRandomWeapon(hog,CS.WEAPONS_SUPPORT,100,false,true,0) |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
649 |
_, wep[6] = GetRandomWeapon(hog,CS.WEAPONS_SUPPORT,100,false,true,0) |
13364 | 650 |
|
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
651 |
-- Don't give weapons directly, only insert them into the global temp. value |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
652 |
-- We expect this function to be called by runOnGears for Sundaland. |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
653 |
if CS.TEMP_VALUE[hog] == nil then |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
654 |
CS.TEMP_VALUE[hog] = {} |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
655 |
end |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
656 |
for w=1, #wep do |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
657 |
local ammoList = CS.TEMP_VALUE[hog] |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
658 |
if ammoList[wep[w]] == nil then |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
659 |
ammoList[wep[w]] = 1 |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
660 |
else |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
661 |
ammoList[wep[w]] = math.min(99, ammoList[wep[w]] + 1) |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
662 |
end |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
663 |
end |
13364 | 664 |
|
665 |
loci=loci+1 |
|
9805 | 666 |
end |
13364 | 667 |
|
668 |
setTeamValue(GetHogTeamName(hog), "sundaland-count",nil) |
|
9805 | 669 |
end |
670 |
end |
|
13364 | 671 |
end |
9805 | 672 |
end |
673 |
||
8618 | 674 |
--this will take that hogs settings for the weapons and add them |
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
675 |
function SetContinentWeapons() |
7893 | 676 |
|
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
677 |
CleanWeapons(CurrentHedgehog) |
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
678 |
LoadWeaponset(CurrentHedgehog,CS.TEAM_CONTINENT[GetHogTeamName(CurrentHedgehog)]) |
10965 | 679 |
|
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
680 |
local visualstuff=AddVisualGear(GetX(CurrentHedgehog), GetY(CurrentHedgehog)-5, vgtDust,0, false) |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
681 |
SetVisualGearValues(visualstuff, nil, nil, nil, nil, nil, nil, nil, 2, nil, GetClanColor(GetHogClan(CurrentHedgehog))) |
10965 | 682 |
|
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
683 |
SetCSAmmoDescriptions("weapons") |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
684 |
ShowContinentInfo(CS.TEAM_CONTINENT[GetHogTeamName(CurrentHedgehog)],5000,false) |
7893 | 685 |
end |
686 |
||
13364 | 687 |
--count hogs in team |
688 |
function CountHogsInTeam(hog) |
|
689 |
if(GetHogTeamName(hog)==GetHogTeamName(CurrentHedgehog)) |
|
690 |
then |
|
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
691 |
CS.TEMP_VALUE=CS.TEMP_VALUE+1 |
13364 | 692 |
end |
693 |
end |
|
694 |
||
7893 | 695 |
--==========================run throw all hog/gear weapons ========================== |
13364 | 696 |
|
697 |
function SetHogHealth(hog) |
|
698 |
if(GetGearType(hog) == gtHedgehog and GetHogClan(hog) == GetHogClan(CurrentHedgehog)) |
|
699 |
then |
|
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
700 |
SetHealth(hog, div(CS.TEMP_VALUE*CS.HOG_HEALTH,100)) |
13364 | 701 |
end |
702 |
end |
|
703 |
||
10965 | 704 |
--will check if the mine is nicely placed |
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
705 |
function AustraliaSpecialCheckHogs(hog) |
7895
ac1610a7b7fa
apparently an older version was provided earlier and this one is newer and theoretically desync free. untested.
Vatten
parents:
7893
diff
changeset
|
706 |
if(GetGearType(hog) == gtHedgehog) |
7893 | 707 |
then |
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
708 |
if(gearIsInCircle(hog,GetX(CurrentHedgehog), GetY(CurrentHedgehog), 40, false)==true and hog ~= CurrentHedgehog) |
7895
ac1610a7b7fa
apparently an older version was provided earlier and this one is newer and theoretically desync free. untested.
Vatten
parents:
7893
diff
changeset
|
709 |
then |
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
710 |
CS.TEMP_VALUE=1 |
7895
ac1610a7b7fa
apparently an older version was provided earlier and this one is newer and theoretically desync free. untested.
Vatten
parents:
7893
diff
changeset
|
711 |
end |
7893 | 712 |
end |
713 |
end |
|
714 |
||
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
715 |
function HogOuch(hog, ouchType) |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
716 |
local r |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
717 |
if ouchType == "moan" then |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
718 |
r = math.random(1, 2) |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
719 |
if r == 1 then |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
720 |
PlaySound(sndPoisonMoan, hog, true) |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
721 |
else |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
722 |
PlaySound(sndPoisonCough, hog, true) |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
723 |
end |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
724 |
else |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
725 |
local r = math.random(1, 4) |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
726 |
PlaySound(_G["sndOw"..r], hog) |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
727 |
end |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
728 |
end |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
729 |
|
8618 | 730 |
--african special on sedunction |
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
731 |
function AfricaSpecialSeduction(hog) |
7895
ac1610a7b7fa
apparently an older version was provided earlier and this one is newer and theoretically desync free. untested.
Vatten
parents:
7893
diff
changeset
|
732 |
if(GetGearType(hog) == gtHedgehog) |
7893 | 733 |
then |
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
734 |
local dmg=div((15+CS.SEDUCTION_INCREASER)*CS.EXTRA_DAMAGE_IS_ON,100) |
7895
ac1610a7b7fa
apparently an older version was provided earlier and this one is newer and theoretically desync free. untested.
Vatten
parents:
7893
diff
changeset
|
735 |
if(gearIsInCircle(hog,GetX(CurrentHedgehog), GetY(CurrentHedgehog), 250, false)==true and GetHogClan(hog) ~= GetHogClan(CurrentHedgehog)) |
7893 | 736 |
then |
7895
ac1610a7b7fa
apparently an older version was provided earlier and this one is newer and theoretically desync free. untested.
Vatten
parents:
7893
diff
changeset
|
737 |
if(GetHealth(hog) > dmg) |
ac1610a7b7fa
apparently an older version was provided earlier and this one is newer and theoretically desync free. untested.
Vatten
parents:
7893
diff
changeset
|
738 |
then |
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
739 |
CS.TEMP_VALUE=CS.TEMP_VALUE+div(dmg*CS.VAMPIRIC_IS_ON,100) |
7895
ac1610a7b7fa
apparently an older version was provided earlier and this one is newer and theoretically desync free. untested.
Vatten
parents:
7893
diff
changeset
|
740 |
SetHealth(hog, GetHealth(hog)-dmg) |
ac1610a7b7fa
apparently an older version was provided earlier and this one is newer and theoretically desync free. untested.
Vatten
parents:
7893
diff
changeset
|
741 |
else |
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
742 |
CS.TEMP_VALUE=CS.TEMP_VALUE+div(GetHealth(hog)*CS.VAMPIRIC_IS_ON,100) |
7895
ac1610a7b7fa
apparently an older version was provided earlier and this one is newer and theoretically desync free. untested.
Vatten
parents:
7893
diff
changeset
|
743 |
SetHealth(hog, 0) |
ac1610a7b7fa
apparently an older version was provided earlier and this one is newer and theoretically desync free. untested.
Vatten
parents:
7893
diff
changeset
|
744 |
end |
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
745 |
HogOuch(hog) |
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
746 |
ShowDamageTag(hog,dmg) |
7893 | 747 |
end |
748 |
end |
|
749 |
end |
|
750 |
||
10965 | 751 |
--kerguelen special on structure |
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
752 |
function KerguelenSpecialRed(hog) |
7895
ac1610a7b7fa
apparently an older version was provided earlier and this one is newer and theoretically desync free. untested.
Vatten
parents:
7893
diff
changeset
|
753 |
if(GetGearType(hog) == gtHedgehog) |
7893 | 754 |
then |
7895
ac1610a7b7fa
apparently an older version was provided earlier and this one is newer and theoretically desync free. untested.
Vatten
parents:
7893
diff
changeset
|
755 |
if(gearIsInCircle(hog,GetX(CurrentHedgehog), GetY(CurrentHedgehog), 120, false)==true and GetHogClan(hog) ~= GetHogClan(CurrentHedgehog)) |
7893 | 756 |
then |
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
757 |
local dmg=div((15+div(GetHealth(CurrentHedgehog)*10,100))*CS.EXTRA_DAMAGE_IS_ON,100) |
10965 | 758 |
|
9805 | 759 |
if(GetHealth(hog)>dmg) |
7895
ac1610a7b7fa
apparently an older version was provided earlier and this one is newer and theoretically desync free. untested.
Vatten
parents:
7893
diff
changeset
|
760 |
then |
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
761 |
CS.TEMP_VALUE=CS.TEMP_VALUE+div(dmg*2,3)+div(dmg*CS.VAMPIRIC_IS_ON*2,100*3) |
9805 | 762 |
SetHealth(hog, GetHealth(hog)-dmg) |
7895
ac1610a7b7fa
apparently an older version was provided earlier and this one is newer and theoretically desync free. untested.
Vatten
parents:
7893
diff
changeset
|
763 |
else |
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
764 |
CS.TEMP_VALUE=CS.TEMP_VALUE+(div(GetHealth(hog)*75,100))+(div(GetHealth(CurrentHedgehog)*10,100))+div((GetHealth(hog)+div(GetHealth(CurrentHedgehog)*10,100))*CS.VAMPIRIC_IS_ON,100) |
7895
ac1610a7b7fa
apparently an older version was provided earlier and this one is newer and theoretically desync free. untested.
Vatten
parents:
7893
diff
changeset
|
765 |
SetHealth(hog, 0) |
ac1610a7b7fa
apparently an older version was provided earlier and this one is newer and theoretically desync free. untested.
Vatten
parents:
7893
diff
changeset
|
766 |
end |
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
767 |
HogOuch(hog) |
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
768 |
ShowDamageTag(hog,dmg) |
7895
ac1610a7b7fa
apparently an older version was provided earlier and this one is newer and theoretically desync free. untested.
Vatten
parents:
7893
diff
changeset
|
769 |
AddVisualGear(GetX(hog), GetY(hog), vgtExplosion, 0, false) |
ac1610a7b7fa
apparently an older version was provided earlier and this one is newer and theoretically desync free. untested.
Vatten
parents:
7893
diff
changeset
|
770 |
AddVisualGear(GetX(CurrentHedgehog), GetY(CurrentHedgehog), vgtSmokeWhite, 0, false) |
7893 | 771 |
end |
772 |
end |
|
773 |
end |
|
774 |
||
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
775 |
--will count the hogs, used to get one random hog. |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
776 |
function KerguelenSpecialYellowCountHogs(hog) |
7895
ac1610a7b7fa
apparently an older version was provided earlier and this one is newer and theoretically desync free. untested.
Vatten
parents:
7893
diff
changeset
|
777 |
if(GetGearType(hog) == gtHedgehog) |
7893 | 778 |
then |
13364 | 779 |
if(GetHogClan(hog) ~= GetHogClan(CurrentHedgehog) and gearIsInCircle(hog,GetX(CurrentHedgehog), GetY(CurrentHedgehog), 390, false)) |
7895
ac1610a7b7fa
apparently an older version was provided earlier and this one is newer and theoretically desync free. untested.
Vatten
parents:
7893
diff
changeset
|
780 |
then |
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
781 |
CS.TEMP_VALUE=CS.TEMP_VALUE+1 |
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
782 |
end |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
783 |
end |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
784 |
end |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
785 |
--kerguelen special swap hog |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
786 |
function KerguelenSpecialYellowSwap(hog) |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
787 |
if(GetGearType(hog) == gtHedgehog) |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
788 |
then |
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
789 |
if(CS.KERGUELEN_SPECIAL ~= -1 and GetHogClan(hog) ~= GetHogClan(CurrentHedgehog) and gearIsInCircle(hog,GetX(CurrentHedgehog), GetY(CurrentHedgehog), 420, false)) |
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
790 |
then |
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
791 |
if(CS.TEMP_VALUE==0) |
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
792 |
then |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
793 |
local thisX=GetX(CurrentHedgehog) |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
794 |
local thisY=GetY(CurrentHedgehog) |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
795 |
SetGearPosition(CurrentHedgehog, GetX(hog), GetY(hog)) |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
796 |
SetGearPosition(hog, thisX, thisY) |
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
797 |
CS.KERGUELEN_SPECIAL=-1 |
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
798 |
else |
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
799 |
CS.TEMP_VALUE=CS.TEMP_VALUE-1 |
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
800 |
end |
7895
ac1610a7b7fa
apparently an older version was provided earlier and this one is newer and theoretically desync free. untested.
Vatten
parents:
7893
diff
changeset
|
801 |
end |
7893 | 802 |
end |
803 |
end |
|
804 |
||
8618 | 805 |
--kerguelen special will apply sabotage |
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
806 |
function KerguelenSpecialGreen(hog) |
7895
ac1610a7b7fa
apparently an older version was provided earlier and this one is newer and theoretically desync free. untested.
Vatten
parents:
7893
diff
changeset
|
807 |
if(GetGearType(hog) == gtHedgehog) |
7893 | 808 |
then |
9805 | 809 |
if(CurrentHedgehog~=hog and gearIsInCircle(hog,GetX(CurrentHedgehog), GetY(CurrentHedgehog), 80, false)) |
7895
ac1610a7b7fa
apparently an older version was provided earlier and this one is newer and theoretically desync free. untested.
Vatten
parents:
7893
diff
changeset
|
810 |
then |
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
811 |
CS.TEMP_VALUE=1 |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
812 |
CS.SABOTAGE_HOGS[hog]=1 |
9805 | 813 |
AddGear(GetX(hog), GetY(hog), gtCluster, 0, 0, 0, 1) |
7895
ac1610a7b7fa
apparently an older version was provided earlier and this one is newer and theoretically desync free. untested.
Vatten
parents:
7893
diff
changeset
|
814 |
PlaySound(sndNooo,hog) |
ac1610a7b7fa
apparently an older version was provided earlier and this one is newer and theoretically desync free. untested.
Vatten
parents:
7893
diff
changeset
|
815 |
end |
7893 | 816 |
end |
817 |
end |
|
818 |
||
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
819 |
--first part on kerguelen special (lonely cries) |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
820 |
function KerguelenSpecialBlueCheck(hog) |
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
821 |
if(GetGearType(hog) == gtHedgehog and hog ~= CurrentHedgehog and GetHealth(CurrentHedgehog) and gearIsInCircle(hog,GetX(CurrentHedgehog), GetY(CurrentHedgehog), 500, false)) |
7893 | 822 |
then |
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
823 |
CS.TEMP_VALUE=1 |
7893 | 824 |
end |
825 |
end |
|
826 |
||
8618 | 827 |
--second part on kerguelen special (lonely cries) |
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
828 |
function KerguelenSpecialBlueActivate(hog) |
7895
ac1610a7b7fa
apparently an older version was provided earlier and this one is newer and theoretically desync free. untested.
Vatten
parents:
7893
diff
changeset
|
829 |
if(GetGearType(hog) == gtHedgehog) |
7893 | 830 |
then |
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
831 |
local dmg=div(6*CS.EXTRA_DAMAGE_IS_ON,100) |
7895
ac1610a7b7fa
apparently an older version was provided earlier and this one is newer and theoretically desync free. untested.
Vatten
parents:
7893
diff
changeset
|
832 |
if(GetHogClan(hog) ~= GetHogClan(CurrentHedgehog)) |
ac1610a7b7fa
apparently an older version was provided earlier and this one is newer and theoretically desync free. untested.
Vatten
parents:
7893
diff
changeset
|
833 |
then |
8618 | 834 |
if(GetHealth(hog) > dmg) |
835 |
then |
|
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
836 |
CS.TEMP_VALUE=CS.TEMP_VALUE+div(dmg*CS.VAMPIRIC_IS_ON,100) |
8618 | 837 |
SetHealth(hog, GetHealth(hog)-dmg) |
838 |
else |
|
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
839 |
CS.TEMP_VALUE=CS.TEMP_VALUE+div(GetHealth(hog)*CS.VAMPIRIC_IS_ON,100) |
8618 | 840 |
SetHealth(hog, 0) |
841 |
end |
|
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
842 |
HogOuch(hog, "moan") |
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
843 |
ShowDamageTag(hog,dmg) |
10965 | 844 |
|
7895
ac1610a7b7fa
apparently an older version was provided earlier and this one is newer and theoretically desync free. untested.
Vatten
parents:
7893
diff
changeset
|
845 |
AddVisualGear(GetX(hog), GetY(hog)-30, vgtEvilTrace, 0, false) |
ac1610a7b7fa
apparently an older version was provided earlier and this one is newer and theoretically desync free. untested.
Vatten
parents:
7893
diff
changeset
|
846 |
end |
7893 | 847 |
end |
848 |
end |
|
849 |
||
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
850 |
--south american special (used fire gear) |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
851 |
function SouthAmericaSpecialCheeseExplosion(hog) |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
852 |
if(GetGearType(hog) == gtHedgehog or GetGearType(hog) == gtMine or GetGearType(hog) == gtExplosives) |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
853 |
then |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
854 |
local power_radius_outer=230 |
13364 | 855 |
local power_sa=700000 |
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
856 |
local hypo=0 |
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
857 |
if(gearIsInCircle(hog,GetX(CS.TEMP_VALUE), GetY(CS.TEMP_VALUE), power_radius_outer, false)) |
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
858 |
then |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
859 |
if(hog == CurrentHedgehog) |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
860 |
then |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
861 |
SetState(CurrentHedgehog, gstMoving) |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
862 |
end |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
863 |
SetGearPosition(hog, GetX(hog),GetY(hog)-3) |
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
864 |
hypo=Norm(math.abs(GetX(hog)-GetX(CS.TEMP_VALUE)),math.abs(GetY(hog)-GetY(CS.TEMP_VALUE))) |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
865 |
SetGearVelocity(hog, div((power_radius_outer-hypo)*power_sa*GetIfNegative(GetX(hog)-GetX(CS.TEMP_VALUE)),power_radius_outer), div((power_radius_outer-hypo)*power_sa*GetIfNegative(GetY(hog)-GetY(CS.TEMP_VALUE)),power_radius_outer)) |
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
866 |
end |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
867 |
end |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
868 |
end |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
869 |
|
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
870 |
--north american special on sniper |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
871 |
function NorthAmericaSpecialSniper(hog) |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
872 |
if(GetGearType(hog) == gtHedgehog) |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
873 |
then |
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
874 |
if(gearIsInCircle(CS.TEMP_VALUE,GetX(hog), GetY(hog), 20, false)) |
7895
ac1610a7b7fa
apparently an older version was provided earlier and this one is newer and theoretically desync free. untested.
Vatten
parents:
7893
diff
changeset
|
875 |
then |
13364 | 876 |
SetEffect(hog, hePoisoned, 5) |
7895
ac1610a7b7fa
apparently an older version was provided earlier and this one is newer and theoretically desync free. untested.
Vatten
parents:
7893
diff
changeset
|
877 |
PlaySound(sndBump) |
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
878 |
SetSoundMask(sndMissed, true) |
7895
ac1610a7b7fa
apparently an older version was provided earlier and this one is newer and theoretically desync free. untested.
Vatten
parents:
7893
diff
changeset
|
879 |
end |
7893 | 880 |
end |
881 |
end |
|
882 |
||
8618 | 883 |
--european special on molotov (used fire gear) |
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
884 |
function EuropeSpecialMolotovHit(hog) |
7895
ac1610a7b7fa
apparently an older version was provided earlier and this one is newer and theoretically desync free. untested.
Vatten
parents:
7893
diff
changeset
|
885 |
if(GetGearType(hog) == gtHedgehog) |
7893 | 886 |
then |
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
887 |
if(gearIsInCircle(CS.TEMP_VALUE,GetX(hog), GetY(hog), 100, false)) |
7895
ac1610a7b7fa
apparently an older version was provided earlier and this one is newer and theoretically desync free. untested.
Vatten
parents:
7893
diff
changeset
|
888 |
then |
13364 | 889 |
local healthadd=15 |
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
890 |
HealHog(hog, healthadd+(div(healthadd*CS.VAMPIRIC_IS_ON,100)), hog == CurrentHedgehog) |
7895
ac1610a7b7fa
apparently an older version was provided earlier and this one is newer and theoretically desync free. untested.
Vatten
parents:
7893
diff
changeset
|
891 |
SetEffect(hog, hePoisoned, false) |
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
892 |
CS.SABOTAGE_HOGS[hog]=0 |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
893 |
SetSoundMask(sndMissed, true) |
7895
ac1610a7b7fa
apparently an older version was provided earlier and this one is newer and theoretically desync free. untested.
Vatten
parents:
7893
diff
changeset
|
894 |
end |
7893 | 895 |
end |
896 |
end |
|
9805 | 897 |
|
13364 | 898 |
--a weaponset string to something readable by the script |
899 |
function transferableParamToWeaponSet(string,icon) |
|
900 |
local continentinfo={} |
|
901 |
local numb=0 |
|
902 |
local wepcodes=0 |
|
903 |
local where=0 |
|
904 |
||
905 |
local x=0 |
|
906 |
local i=1 |
|
907 |
||
908 |
--default icon |
|
909 |
continentinfo[4]={} |
|
910 |
if(icon==1000) |
|
911 |
then |
|
14235
8edbdd3a1fe7
Get rid of table.maxn in all Lua code
Wuzzy <Wuzzy2@mail.ru>
parents:
13992
diff
changeset
|
912 |
local mid = #CS.WEAPONS_DAMAGE |
8edbdd3a1fe7
Get rid of table.maxn in all Lua code
Wuzzy <Wuzzy2@mail.ru>
parents:
13992
diff
changeset
|
913 |
local max = mid + #CS.WEAPONS_SUPPORT |
13364 | 914 |
local ic=(string.byte(string) % max)+1 |
915 |
||
916 |
if(ic>mid) |
|
917 |
then |
|
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
918 |
ic=CS.WEAPONS_SUPPORT[ic-mid][1] |
13364 | 919 |
else |
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
920 |
ic=CS.WEAPONS_DAMAGE[ic][1] |
13364 | 921 |
end |
922 |
||
923 |
continentinfo[4][1]=ic |
|
924 |
continentinfo[4][2]=-ic |
|
925 |
else |
|
926 |
continentinfo[4][1]=icon |
|
927 |
continentinfo[4][2]=-icon |
|
928 |
end |
|
929 |
||
930 |
continentinfo[6]={sndFrozenHogImpact,sndUhOh} |
|
931 |
continentinfo[7]=100 |
|
932 |
||
933 |
for c in string:gmatch"." |
|
934 |
do |
|
935 |
--first part, eg name of the weaponset |
|
936 |
if(where==0) |
|
937 |
then |
|
938 |
if(string.byte(c)==126) |
|
939 |
then |
|
940 |
continentinfo[1]=string.sub(string,0,numb) |
|
941 |
wepcodes=numb |
|
942 |
where=1 |
|
943 |
end |
|
944 |
--second part, subname of the weaponset |
|
945 |
elseif(where==1) |
|
946 |
then |
|
947 |
if(string.byte(c)==126) |
|
948 |
then |
|
949 |
continentinfo[2]=string.sub(string,wepcodes+2,numb) |
|
950 |
continentinfo[5]={} |
|
951 |
wepcodes=numb |
|
952 |
where=2 |
|
953 |
end |
|
954 |
--insert all weapons |
|
955 |
elseif(where==2) |
|
956 |
then |
|
957 |
x=string.byte(c)-35 |
|
958 |
if(x>90) |
|
959 |
then |
|
960 |
break |
|
961 |
elseif(x>80) |
|
962 |
then |
|
963 |
if(x-80<10) |
|
964 |
then |
|
965 |
i=x-80 |
|
966 |
else |
|
967 |
i=100 |
|
968 |
end |
|
969 |
else |
|
970 |
table.insert(continentinfo[5],{x,i}) |
|
971 |
end |
|
972 |
end |
|
973 |
numb=numb+1 |
|
974 |
end |
|
975 |
||
976 |
if(continentinfo[5]~=nil and continentinfo[5][1]~=nil) |
|
977 |
then |
|
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
978 |
continentinfo[3] = |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
979 |
string.format(loc("%s was extracted from the scheme"), continentinfo[1]) |
13364 | 980 |
|
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
981 |
table.insert(CS.CONTINENT_INFORMATION, continentinfo) |
13364 | 982 |
end |
983 |
||
984 |
return nil |
|
985 |
end |
|
986 |
||
987 |
--add a weaponset from a hogname |
|
988 |
function HogNameToWeaponset(hog) |
|
9805 | 989 |
if(GetGearType(hog) == gtHedgehog) |
990 |
then |
|
13364 | 991 |
local string=GetHogName(hog) |
992 |
local numb=0 |
|
993 |
||
994 |
for c in string:gmatch"." |
|
995 |
do |
|
996 |
if(string.byte(c)==126) |
|
997 |
then |
|
998 |
local name=string.sub(string,0,numb) |
|
999 |
SetHogName(hog,name) |
|
1000 |
local weaponcode=string.sub(string,numb+2) |
|
1001 |
local continentinfo=transferableParamToWeaponSet(weaponcode,1000) |
|
1002 |
||
1003 |
if(continentinfo~=nil) |
|
1004 |
then |
|
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1005 |
table.insert(CS.CONTINENT_INFORMATION, continentinfo) |
13364 | 1006 |
end |
1007 |
return |
|
1008 |
end |
|
1009 |
numb=numb+1 |
|
9805 | 1010 |
end |
1011 |
end |
|
1012 |
end |
|
13364 | 1013 |
|
7893 | 1014 |
--============================================================================ |
1015 |
||
13364 | 1016 |
--Parameters -> [options],[global-continent] |
1017 |
--wt=yes allow to search for weaponsets on hog names |
|
1018 |
--spec=off disable specials (will make stuff unbalanced) |
|
1019 |
--cont=no remove the pre-defined continents |
|
1020 |
||
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1021 |
--for custom made continent, follows the same standards as the globalism one. You can make your continent with <Name>~<Information>~<Weapons>. Take the weapons generated from globalism, if you want a GUI :P |
13511
36f3f77e9b1b
Switch from http:// to https:// URLs where possible
Wuzzy <Wuzzy2@mail.ru>
parents:
13384
diff
changeset
|
1022 |
--weapons=<ammo><types>, ammo = ascii[116(1 ammo) to 125(inf ammo)] types = ascii[36(Grenade), 37(Clusterbomb) to 90(knife)] see https://hedgewars.org/kb/AmmoTypes |
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1023 |
--ex "Own continent~this continent rocks!~tZ}$" will get 1 knife and inf grenades |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1024 |
function onParameters() |
10965 | 1025 |
|
13364 | 1026 |
local searchfor="wt=yes" |
1027 |
local match=string.find(ScriptParam,searchfor, 1) |
|
1028 |
||
1029 |
if(match~=nil) |
|
1030 |
then |
|
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1031 |
CS.TEMP_VALUE=1 |
13364 | 1032 |
|
1033 |
ScriptParam=string.gsub(ScriptParam,"(,?)"..searchfor.."(,?)","") |
|
1034 |
end |
|
1035 |
||
1036 |
searchfor="spec=off" |
|
1037 |
match=string.find(ScriptParam,searchfor, 1) |
|
1038 |
||
1039 |
if(match~=nil) |
|
1040 |
then |
|
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1041 |
CS.OPTION_NO_SPECIALS=true |
13364 | 1042 |
|
1043 |
ScriptParam=string.gsub(ScriptParam,"(,?)"..searchfor.."(,?)","") |
|
1044 |
end |
|
1045 |
||
1046 |
searchfor="cont=no" |
|
1047 |
match=string.find(ScriptParam,searchfor, 1) |
|
1048 |
||
1049 |
if(match~=nil) |
|
1050 |
then |
|
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1051 |
CS.CONTINENT_INFORMATION={} |
13364 | 1052 |
|
1053 |
ScriptParam=string.gsub(ScriptParam,"(,?)"..searchfor.."(,?)","") |
|
1054 |
end |
|
1055 |
||
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1056 |
if(ScriptParam~=nil) |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1057 |
then |
13364 | 1058 |
local continentinfo=transferableParamToWeaponSet(ScriptParam,amLowGravity) |
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1059 |
|
13364 | 1060 |
if(continentinfo~=nil) |
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1061 |
then |
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1062 |
table.insert(CS.CONTINENT_INFORMATION, continentinfo) |
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1063 |
end |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1064 |
end |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1065 |
end |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1066 |
|
7893 | 1067 |
--set each weapons settings |
1068 |
function onAmmoStoreInit() |
|
1069 |
||
1070 |
SetAmmo(amSkip, 9, 0, 0, 0) |
|
10965 | 1071 |
|
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1072 |
for v,w in pairs(CS.WEAPONS_DAMAGE) |
7893 | 1073 |
do |
1074 |
SetAmmo(w[1], w[2], w[3], w[4], w[5]) |
|
1075 |
end |
|
10965 | 1076 |
|
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1077 |
for v,w in pairs(CS.WEAPONS_SUPPORT) |
7893 | 1078 |
do |
1079 |
SetAmmo(w[1], w[2], w[3], w[4], w[5]) |
|
1080 |
end |
|
1081 |
end |
|
1082 |
||
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1083 |
function SetCSAmmoDescriptions(mode) |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1084 |
if mode == "continents" then |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1085 |
for c=1, #CS.CONTINENT_INFORMATION do |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1086 |
local cont = CS.CONTINENT_INFORMATION[c] |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1087 |
local hp = string.format(loc("Initial health: %d"), cont[7]) |
13377
57e15407804d
Continental supplies: Fix continent ammo tooltip containing annoying "use of this weapon does not end turn"
Wuzzy <Wuzzy2@mail.ru>
parents:
13372
diff
changeset
|
1088 |
SetAmmoTexts(cont[4][1], cont[1], cont[2], hp .."|" .. cont[3], false) |
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1089 |
SetAmmoDescriptionAppendix(cont[4][1], nil) |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1090 |
end |
13377
57e15407804d
Continental supplies: Fix continent ammo tooltip containing annoying "use of this weapon does not end turn"
Wuzzy <Wuzzy2@mail.ru>
parents:
13372
diff
changeset
|
1091 |
SetAmmoTexts(amSwitch, loc("Random continent"), loc("If you just don’t care …"), loc("Select this item for a random continent."), false) |
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1092 |
|
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1093 |
elseif mode == "weapons" then |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1094 |
local specSelect = loc("Switch: Select weapon special") |
13992
2d1df39c8642
CS: Highlight "Available weapon specials:" as well
Wuzzy <Wuzzy2@mail.ru>
parents:
13991
diff
changeset
|
1095 |
local specHeader = loc("Available weapon specials:") .. " " |
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1096 |
local specText="|".. |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1097 |
specSelect.."| |".. |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1098 |
specHeader.."|" |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1099 |
|
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1100 |
SetAmmoDescriptionAppendix(amSniperRifle, |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1101 |
specText.. |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1102 |
CS.SNIPER_SPECIAL_INFO) |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1103 |
SetAmmoDescriptionAppendix(amBaseballBat, |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1104 |
specText.. |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1105 |
CS.BASEBALLBAT_BOOMERANG_INFO .. "|" .. |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1106 |
CS.BASEBALLBAT_CRICKET_INFO .. "|" .. |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1107 |
loc("These weapon specials cannot be used close to other hogs.")) |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1108 |
SetAmmoDescriptionAppendix(amGasBomb, |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1109 |
specText.. |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1110 |
CS.CHEESE_SPECIAL_INFO) |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1111 |
SetAmmoDescriptionAppendix(amSeduction, |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1112 |
specSelect .. "|" .. |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1113 |
CS.INVULNERABLE_SPECIAL_CTRL .. "| |" .. |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1114 |
specHeader .. "|" .. |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1115 |
CS.SEDUCTION_SPECIAL_INFO .. "|" .. |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1116 |
CS.INVULNERABLE_SPECIAL_INFO) |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1117 |
SetAmmoDescriptionAppendix(amParachute, |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1118 |
loc("Switch: Drop ball of dirt from parachute (once)") .. "| |" .. |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1119 |
specHeader .. "|" .. |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1120 |
CS.PARACHUTE_SPECIAL_INFO) |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1121 |
SetAmmoDescriptionAppendix(amHammer, |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1122 |
specText.. |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1123 |
CS.HAMMER_ROAR_INFO .. "|" .. |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1124 |
CS.HAMMER_SWAP_INFO .. "|" .. |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1125 |
CS.HAMMER_LONELY_INFO .. "|" .. |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1126 |
CS.HAMMER_SABOTAGE_INFO) |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1127 |
SetAmmoDescriptionAppendix(amSMine, |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1128 |
specText.. |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1129 |
CS.STICKY_PROJECTILE_INFO .. "|" .. |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1130 |
CS.STICKY_NAPALM_INFO) |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1131 |
SetAmmoDescriptionAppendix(amShotgun, |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1132 |
specText.. |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1133 |
CS.SHOTGUN_SPECIAL_INFO) |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1134 |
SetAmmoDescriptionAppendix(amMolotov, |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1135 |
specText.. |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1136 |
CS.MOLOTOV_SPECIAL_INFO) |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1137 |
SetAmmoDescriptionAppendix(amPickHammer, |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1138 |
specText.. |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1139 |
CS.PICKHAMMER_SPECIAL_INFO) |
13368
544867ac1017
Continental supplies: Mention that vamp increases Medicine effectiveness
Wuzzy <Wuzzy2@mail.ru>
parents:
13367
diff
changeset
|
1140 |
SetAmmoDescriptionAppendix(amVampiric, |
544867ac1017
Continental supplies: Mention that vamp increases Medicine effectiveness
Wuzzy <Wuzzy2@mail.ru>
parents:
13367
diff
changeset
|
1141 |
loc("This also increases the effectiveness of Medicine.") |
544867ac1017
Continental supplies: Mention that vamp increases Medicine effectiveness
Wuzzy <Wuzzy2@mail.ru>
parents:
13367
diff
changeset
|
1142 |
) |
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1143 |
for c=1, #CS.CONTINENT_INFORMATION do |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1144 |
local cont = CS.CONTINENT_INFORMATION[c] |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1145 |
SetAmmoTexts(cont[4][1], nil, nil, nil) |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1146 |
end |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1147 |
SetAmmoTexts(amSwitch, nil, nil, nil) |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1148 |
end |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1149 |
|
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1150 |
if mode == "continents" or not CS.GAME_STARTED then |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1151 |
SetAmmoTexts(amSkip, loc("Select continent"), loc("Continent selection"), loc("Select the current continent.") .. "|" .. loc("Choose your continent wisely, as your decision will be permanent.") .. "|" .. loc("Up/Down: Browse through continents") .. "|" .. loc("Attack: Select this continent")) |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1152 |
else |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1153 |
SetAmmoTexts(amSkip, nil, nil, nil) |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1154 |
end |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1155 |
end |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1156 |
|
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1157 |
--on game start |
7893 | 1158 |
function onGameStart() |
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1159 |
ShowMission(loc("Continental supplies"),loc("Let a continent provide your weapons!"),GeneralInformation(), 0, 0) |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1160 |
SetCSAmmoDescriptions("continents") |
13364 | 1161 |
|
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1162 |
if(CS.TEMP_VALUE==1) |
13364 | 1163 |
then |
1164 |
runOnGears(HogNameToWeaponset) |
|
1165 |
end |
|
1166 |
end |
|
1167 |
||
1168 |
function onGameInit() |
|
1169 |
SuddenDeathTurns= SuddenDeathTurns+1 |
|
7893 | 1170 |
end |
1171 |
||
1172 |
--what happen when a turn starts |
|
1173 |
function onNewTurn() |
|
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1174 |
--will refresh the info on each tab weapon |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1175 |
CS.AUSTRALIAN_SPECIAL=0 |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1176 |
CS.AFRICAN_SPECIAL_SEDUCTION=0 |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1177 |
CS.SEDUCTION_INCREASER=0 |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1178 |
CS.SOUTH_AMERICAN_SPECIAL=false |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1179 |
CS.AFRICAN_SPECIAL_STICKY=0 |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1180 |
CS.KERGUELEN_SPECIAL=1 |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1181 |
CS.NORTH_AMERICAN_SPECIAL_SNIPER=1 |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1182 |
CS.NORTH_AMERICAN_SPECIAL_SHOTGUN=false |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1183 |
CS.NORTH_AMERICAN_SPECIAL_SNIPER_IS_ON=false |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1184 |
CS.EUROPE_SPECIAL=0 |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1185 |
CS.VAMPIRIC_IS_ON=0 |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1186 |
CS.EXTRA_DAMAGE_IS_ON=100 |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1187 |
CS.SABOTAGE_COUNTER=0 |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1188 |
CS.ANTARCTICA_SPECIAL=0 |
10965 | 1189 |
|
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1190 |
CS.TEMP_VALUE=0 |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1191 |
|
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1192 |
CS.SUNDALAND_END_HOG_CONTINENT_NAME=GetHogTeamName(CurrentHedgehog) |
10965 | 1193 |
|
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1194 |
if TotalRounds >= 1 then |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1195 |
CS.GAME_STARTED = true |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1196 |
end |
10965 | 1197 |
|
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1198 |
SetSoundMask(sndLaugh, false) |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1199 |
SetSoundMask(sndMissed, false) |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1200 |
CS.AFRICAN_SPECIAL_NON_PROJECTILE_USED=false |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1201 |
SetAttackState(true) |
10965 | 1202 |
|
7893 | 1203 |
--when all hogs are "placed" |
1204 |
if(GetCurAmmoType()~=amTeleport) |
|
1205 |
then |
|
1206 |
--will run once when the game really starts (after placing hogs and so on |
|
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1207 |
if(CS.INIT_TEAMS[GetHogTeamName(CurrentHedgehog)] == nil) |
7893 | 1208 |
then |
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1209 |
SetInputMask(band(GetInputMask(), gmWeapon)) |
13364 | 1210 |
|
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1211 |
if(CS.START_TIME==0) |
13364 | 1212 |
then |
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1213 |
CS.START_TIME=TurnTimeLeft |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1214 |
CS.HOG_HEALTH=GetHealth(CurrentHedgehog) |
13364 | 1215 |
end |
1216 |
||
13745
2bb7141496a9
Use SetTurnTimeLeft and SetReadyTimeLeft in all scripts
Wuzzy <Wuzzy2@mail.ru>
parents:
13648
diff
changeset
|
1217 |
SetTurnTimeLeft(100000) |
13364 | 1218 |
|
13648 | 1219 |
AddCaption(string.format(CS.SELECT_WEP_INFORMATION_SHORT, GetHogTeamName(CurrentHedgehog)), capcolDefault, capgrpGameState) |
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1220 |
AddCaption(loc("No continent selected"), GetClanColor(GetHogClan(CurrentHedgehog)), capgrpAmmoinfo) |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1221 |
CS.SELECT_CONTINENT_CHECK=true |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1222 |
ShowMission(loc("Continental supplies"),loc("Let a continent provide your weapons!"),GeneralInformation(), 0, 0) |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1223 |
SetCSAmmoDescriptions("continents") |
13364 | 1224 |
|
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1225 |
InitWeaponsMenu(CurrentHedgehog) |
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1226 |
CS.TEAM_CONTINENT[GetHogTeamName(CurrentHedgehog)]=0 |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1227 |
CS.INIT_TEAMS[GetHogTeamName(CurrentHedgehog)] = 2 |
10965 | 1228 |
|
7893 | 1229 |
else |
8618 | 1230 |
--if its not the initialization turn |
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1231 |
CS.SELECT_CONTINENT_CHECK=false |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1232 |
SetInputMask(bor(GetInputMask(), bnot(gmWeapon))) |
13364 | 1233 |
|
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1234 |
if(CS.TEAM_CONTINENT[GetHogTeamName(CurrentHedgehog)]==0) |
7893 | 1235 |
then |
14235
8edbdd3a1fe7
Get rid of table.maxn in all Lua code
Wuzzy <Wuzzy2@mail.ru>
parents:
13992
diff
changeset
|
1236 |
CS.TEAM_CONTINENT[GetHogTeamName(CurrentHedgehog)]=GetRandom(#CS.CONTINENT_INFORMATION)+1 |
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1237 |
SetContinentWeapons() |
7893 | 1238 |
end |
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1239 |
local currCont=CS.TEAM_CONTINENT[GetHogTeamName(CurrentHedgehog)] |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1240 |
local checkDefCont=CS.CONTINENT_INFORMATION[currCont][4][2] |
10965 | 1241 |
|
8618 | 1242 |
--give zeelandia-teams new weapons so they can plan for the next turn |
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1243 |
-- Use temporary value to store list of collected weapons |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1244 |
CS.TEMP_VALUE = {} |
13364 | 1245 |
runOnGears(RandomContinentsGetWeapons) |
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1246 |
for hog, ammoList in pairs(CS.TEMP_VALUE) do |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1247 |
CollectMultiAmmo(hog, ammoList, true) |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1248 |
end |
10965 | 1249 |
|
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1250 |
--some specials for some continents (CS.TEMP_VALUE is from get random weapons) |
13364 | 1251 |
if(checkDefCont==9) |
8618 | 1252 |
then |
13364 | 1253 |
setTeamValue(GetHogTeamName(CurrentHedgehog), "rand-done-turn", false) |
1254 |
elseif(checkDefCont==7) |
|
8618 | 1255 |
then |
13364 | 1256 |
--this will be set on the second turn |
9805 | 1257 |
if(getTeamValue(GetHogTeamName(CurrentHedgehog), "Antarctica2-turntick")==nil) |
8618 | 1258 |
then |
9805 | 1259 |
setTeamValue(GetHogTeamName(CurrentHedgehog), "Antarctica2-turntick", 1) |
8618 | 1260 |
end |
10965 | 1261 |
|
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1262 |
-- Antarctic summer |
9805 | 1263 |
if(getTeamValue(GetHogTeamName(CurrentHedgehog), "Antarctica2-turntick")>=4) |
8618 | 1264 |
then |
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1265 |
CollectMultiAmmo(CurrentHedgehog, {[amPortalGun] = 1, [amSineGun] = 2, [amGirder] = 1, [amSnowball] = 1}) |
9805 | 1266 |
setTeamValue(GetHogTeamName(CurrentHedgehog), "Antarctica2-turntick", 0) |
8618 | 1267 |
end |
9805 | 1268 |
setTeamValue(GetHogTeamName(CurrentHedgehog), "Antarctica2-turntick", getTeamValue(GetHogTeamName(CurrentHedgehog), "Antarctica2-turntick")+1) |
10965 | 1269 |
|
13364 | 1270 |
elseif(checkDefCont==5) |
8618 | 1271 |
then |
13364 | 1272 |
--this will be set on the second turn |
9805 | 1273 |
if(getTeamValue(GetHogTeamName(CurrentHedgehog), "Asia-turntick")==nil) |
1274 |
then |
|
1275 |
setTeamValue(GetHogTeamName(CurrentHedgehog), "Asia-turntick", 1) |
|
1276 |
end |
|
10965 | 1277 |
|
9805 | 1278 |
if(getTeamValue(GetHogTeamName(CurrentHedgehog), "Asia-turntick")>=2) |
1279 |
then |
|
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1280 |
CollectMultiAmmo(CurrentHedgehog, {[amParachute] = 1}) |
9805 | 1281 |
setTeamValue(GetHogTeamName(CurrentHedgehog), "Asia-turntick", 0) |
1282 |
end |
|
1283 |
setTeamValue(GetHogTeamName(CurrentHedgehog), "Asia-turntick", getTeamValue(GetHogTeamName(CurrentHedgehog), "Asia-turntick")+1) |
|
13364 | 1284 |
elseif(checkDefCont==1) |
9805 | 1285 |
then |
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1286 |
CS.TEMP_VALUE=0 |
13364 | 1287 |
runOnGears(CountHogsInTeam) |
10965 | 1288 |
|
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1289 |
if(CS.TEMP_VALUE>1) |
13364 | 1290 |
then |
13384
4dd503978c0a
Continental supplies: No more hacky switch hog for North America
Wuzzy <Wuzzy2@mail.ru>
parents:
13382
diff
changeset
|
1291 |
-- Enable switch hog on turn start (North America) |
4dd503978c0a
Continental supplies: No more hacky switch hog for North America
Wuzzy <Wuzzy2@mail.ru>
parents:
13382
diff
changeset
|
1292 |
EnableSwitchHog() |
13364 | 1293 |
end |
8618 | 1294 |
end |
13364 | 1295 |
|
1296 |
ShowContinentInfo(currCont,-1,true) |
|
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1297 |
SetCSAmmoDescriptions("weapons") |
7893 | 1298 |
end |
1299 |
end |
|
1300 |
end |
|
1301 |
||
13379
e1aa72e0872e
CS: Fix display of ammo caption for weapon specials
Wuzzy <Wuzzy2@mail.ru>
parents:
13377
diff
changeset
|
1302 |
function WeaponCaption(ammoType, customName) |
e1aa72e0872e
CS: Fix display of ammo caption for weapon specials
Wuzzy <Wuzzy2@mail.ru>
parents:
13377
diff
changeset
|
1303 |
local caption |
e1aa72e0872e
CS: Fix display of ammo caption for weapon specials
Wuzzy <Wuzzy2@mail.ru>
parents:
13377
diff
changeset
|
1304 |
if not customName then |
e1aa72e0872e
CS: Fix display of ammo caption for weapon specials
Wuzzy <Wuzzy2@mail.ru>
parents:
13377
diff
changeset
|
1305 |
customName = GetAmmoName(ammoType) |
e1aa72e0872e
CS: Fix display of ammo caption for weapon specials
Wuzzy <Wuzzy2@mail.ru>
parents:
13377
diff
changeset
|
1306 |
end |
e1aa72e0872e
CS: Fix display of ammo caption for weapon specials
Wuzzy <Wuzzy2@mail.ru>
parents:
13377
diff
changeset
|
1307 |
local count = GetAmmoCount(CurrentHedgehog, ammoType) |
e1aa72e0872e
CS: Fix display of ammo caption for weapon specials
Wuzzy <Wuzzy2@mail.ru>
parents:
13377
diff
changeset
|
1308 |
local timer = GetAmmoTimer(CurrentHedgehog, ammoType) |
e1aa72e0872e
CS: Fix display of ammo caption for weapon specials
Wuzzy <Wuzzy2@mail.ru>
parents:
13377
diff
changeset
|
1309 |
local secs |
e1aa72e0872e
CS: Fix display of ammo caption for weapon specials
Wuzzy <Wuzzy2@mail.ru>
parents:
13377
diff
changeset
|
1310 |
if type(timer) == "number" then |
e1aa72e0872e
CS: Fix display of ammo caption for weapon specials
Wuzzy <Wuzzy2@mail.ru>
parents:
13377
diff
changeset
|
1311 |
secs = div(timer, 1000) |
e1aa72e0872e
CS: Fix display of ammo caption for weapon specials
Wuzzy <Wuzzy2@mail.ru>
parents:
13377
diff
changeset
|
1312 |
end |
e1aa72e0872e
CS: Fix display of ammo caption for weapon specials
Wuzzy <Wuzzy2@mail.ru>
parents:
13377
diff
changeset
|
1313 |
if count ~= 100 then |
e1aa72e0872e
CS: Fix display of ammo caption for weapon specials
Wuzzy <Wuzzy2@mail.ru>
parents:
13377
diff
changeset
|
1314 |
strCount = tostring(count) |
e1aa72e0872e
CS: Fix display of ammo caption for weapon specials
Wuzzy <Wuzzy2@mail.ru>
parents:
13377
diff
changeset
|
1315 |
end |
e1aa72e0872e
CS: Fix display of ammo caption for weapon specials
Wuzzy <Wuzzy2@mail.ru>
parents:
13377
diff
changeset
|
1316 |
-- Finite count, timerable |
e1aa72e0872e
CS: Fix display of ammo caption for weapon specials
Wuzzy <Wuzzy2@mail.ru>
parents:
13377
diff
changeset
|
1317 |
if type(timer) == "number" and count ~= 100 then |
e1aa72e0872e
CS: Fix display of ammo caption for weapon specials
Wuzzy <Wuzzy2@mail.ru>
parents:
13377
diff
changeset
|
1318 |
-- e.g. “Grenade (5), 3 sec” |
e1aa72e0872e
CS: Fix display of ammo caption for weapon specials
Wuzzy <Wuzzy2@mail.ru>
parents:
13377
diff
changeset
|
1319 |
caption = string.format(loc("%s (%d), %d sec"), customName, count, secs) |
e1aa72e0872e
CS: Fix display of ammo caption for weapon specials
Wuzzy <Wuzzy2@mail.ru>
parents:
13377
diff
changeset
|
1320 |
-- Infinite count, timerable |
e1aa72e0872e
CS: Fix display of ammo caption for weapon specials
Wuzzy <Wuzzy2@mail.ru>
parents:
13377
diff
changeset
|
1321 |
elseif type(timer) == "number" and count == 100 then |
e1aa72e0872e
CS: Fix display of ammo caption for weapon specials
Wuzzy <Wuzzy2@mail.ru>
parents:
13377
diff
changeset
|
1322 |
-- e.g. “Grenade, 3 sec” |
e1aa72e0872e
CS: Fix display of ammo caption for weapon specials
Wuzzy <Wuzzy2@mail.ru>
parents:
13377
diff
changeset
|
1323 |
caption = string.format(loc("%s, %d sec"), customName, secs) |
e1aa72e0872e
CS: Fix display of ammo caption for weapon specials
Wuzzy <Wuzzy2@mail.ru>
parents:
13377
diff
changeset
|
1324 |
-- Finite count, non-timerable |
e1aa72e0872e
CS: Fix display of ammo caption for weapon specials
Wuzzy <Wuzzy2@mail.ru>
parents:
13377
diff
changeset
|
1325 |
elseif type(timer) ~= "number" and count ~= 100 then |
e1aa72e0872e
CS: Fix display of ammo caption for weapon specials
Wuzzy <Wuzzy2@mail.ru>
parents:
13377
diff
changeset
|
1326 |
-- e.g. “Bazooka (5)” |
e1aa72e0872e
CS: Fix display of ammo caption for weapon specials
Wuzzy <Wuzzy2@mail.ru>
parents:
13377
diff
changeset
|
1327 |
caption = string.format(loc("%s (%d)"), customName, count) |
e1aa72e0872e
CS: Fix display of ammo caption for weapon specials
Wuzzy <Wuzzy2@mail.ru>
parents:
13377
diff
changeset
|
1328 |
-- Infinite count, non-timerable |
e1aa72e0872e
CS: Fix display of ammo caption for weapon specials
Wuzzy <Wuzzy2@mail.ru>
parents:
13377
diff
changeset
|
1329 |
else |
e1aa72e0872e
CS: Fix display of ammo caption for weapon specials
Wuzzy <Wuzzy2@mail.ru>
parents:
13377
diff
changeset
|
1330 |
-- e.g. “Bazooka” |
e1aa72e0872e
CS: Fix display of ammo caption for weapon specials
Wuzzy <Wuzzy2@mail.ru>
parents:
13377
diff
changeset
|
1331 |
caption = customName |
e1aa72e0872e
CS: Fix display of ammo caption for weapon specials
Wuzzy <Wuzzy2@mail.ru>
parents:
13377
diff
changeset
|
1332 |
end |
e1aa72e0872e
CS: Fix display of ammo caption for weapon specials
Wuzzy <Wuzzy2@mail.ru>
parents:
13377
diff
changeset
|
1333 |
|
e1aa72e0872e
CS: Fix display of ammo caption for weapon specials
Wuzzy <Wuzzy2@mail.ru>
parents:
13377
diff
changeset
|
1334 |
AddCaption(caption, GetClanColor(GetHogClan(CurrentHedgehog)), capgrpAmmoinfo) |
e1aa72e0872e
CS: Fix display of ammo caption for weapon specials
Wuzzy <Wuzzy2@mail.ru>
parents:
13377
diff
changeset
|
1335 |
end |
e1aa72e0872e
CS: Fix display of ammo caption for weapon specials
Wuzzy <Wuzzy2@mail.ru>
parents:
13377
diff
changeset
|
1336 |
|
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1337 |
function ShowSpecialWeaponCaption(ammoType) |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1338 |
--place mine (australia) |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1339 |
if(ammoType == amBaseballBat) |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1340 |
then |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1341 |
if(CS.AUSTRALIAN_SPECIAL==1) |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1342 |
then |
13379
e1aa72e0872e
CS: Fix display of ammo caption for weapon specials
Wuzzy <Wuzzy2@mail.ru>
parents:
13377
diff
changeset
|
1343 |
WeaponCaption(amBaseballBat, CS.BASEBALLBAT_CRICKET_NAME) |
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1344 |
elseif(CS.AUSTRALIAN_SPECIAL==2) |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1345 |
then |
13379
e1aa72e0872e
CS: Fix display of ammo caption for weapon specials
Wuzzy <Wuzzy2@mail.ru>
parents:
13377
diff
changeset
|
1346 |
WeaponCaption(amBaseballBat, CS.BASEBALLBAT_BOOMERANG_NAME) |
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1347 |
else |
13379
e1aa72e0872e
CS: Fix display of ammo caption for weapon specials
Wuzzy <Wuzzy2@mail.ru>
parents:
13377
diff
changeset
|
1348 |
WeaponCaption(amBaseballBat) |
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1349 |
end |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1350 |
|
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1351 |
--africa |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1352 |
elseif(ammoType == amSeduction) |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1353 |
then |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1354 |
if(CS.AFRICAN_SPECIAL_SEDUCTION==1) |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1355 |
then |
13379
e1aa72e0872e
CS: Fix display of ammo caption for weapon specials
Wuzzy <Wuzzy2@mail.ru>
parents:
13377
diff
changeset
|
1356 |
WeaponCaption(amSeduction, CS.SEDUCTION_SPECIAL_NAME) |
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1357 |
AddCaption(string.format(CS.INVULNERABLE_SPECIAL_CAPTION, CS.SEDUCTION_INCREASER, GetAmmoCount(CurrentHedgehog,amInvulnerable)), GetClanColor(GetHogClan(CurrentHedgehog)), capgrpAmmostate) |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1358 |
else |
13379
e1aa72e0872e
CS: Fix display of ammo caption for weapon specials
Wuzzy <Wuzzy2@mail.ru>
parents:
13377
diff
changeset
|
1359 |
WeaponCaption(amSeduction) |
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1360 |
end |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1361 |
|
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1362 |
--south america |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1363 |
elseif(ammoType == amGasBomb) |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1364 |
then |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1365 |
if(CS.SOUTH_AMERICAN_SPECIAL==true) |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1366 |
then |
13379
e1aa72e0872e
CS: Fix display of ammo caption for weapon specials
Wuzzy <Wuzzy2@mail.ru>
parents:
13377
diff
changeset
|
1367 |
WeaponCaption(amGasBomb, CS.CHEESE_SPECIAL_NAME) |
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1368 |
else |
13379
e1aa72e0872e
CS: Fix display of ammo caption for weapon specials
Wuzzy <Wuzzy2@mail.ru>
parents:
13377
diff
changeset
|
1369 |
WeaponCaption(amGasBomb) |
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1370 |
end |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1371 |
|
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1372 |
--africa |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1373 |
elseif(ammoType == amSMine) |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1374 |
then |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1375 |
if(CS.AFRICAN_SPECIAL_STICKY==1) |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1376 |
then |
13379
e1aa72e0872e
CS: Fix display of ammo caption for weapon specials
Wuzzy <Wuzzy2@mail.ru>
parents:
13377
diff
changeset
|
1377 |
WeaponCaption(amSMine, CS.STICKY_PROJECTILE_NAME) |
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1378 |
elseif(CS.AFRICAN_SPECIAL_STICKY == 2) |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1379 |
then |
13379
e1aa72e0872e
CS: Fix display of ammo caption for weapon specials
Wuzzy <Wuzzy2@mail.ru>
parents:
13377
diff
changeset
|
1380 |
WeaponCaption(amSMine, CS.STICKY_NAPALM_NAME) |
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1381 |
else |
13379
e1aa72e0872e
CS: Fix display of ammo caption for weapon specials
Wuzzy <Wuzzy2@mail.ru>
parents:
13377
diff
changeset
|
1382 |
WeaponCaption(amSMine) |
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1383 |
end |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1384 |
|
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1385 |
--north america (sniper) |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1386 |
elseif(ammoType == amSniperRifle and CS.NORTH_AMERICAN_SPECIAL_SNIPER_IS_ON==false) |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1387 |
then |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1388 |
if(CS.NORTH_AMERICAN_SPECIAL_SNIPER==1) |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1389 |
then |
13379
e1aa72e0872e
CS: Fix display of ammo caption for weapon specials
Wuzzy <Wuzzy2@mail.ru>
parents:
13377
diff
changeset
|
1390 |
WeaponCaption(amSniperRifle) |
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1391 |
elseif(CS.NORTH_AMERICAN_SPECIAL_SNIPER==2) |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1392 |
then |
13379
e1aa72e0872e
CS: Fix display of ammo caption for weapon specials
Wuzzy <Wuzzy2@mail.ru>
parents:
13377
diff
changeset
|
1393 |
WeaponCaption(amSniperRifle, CS.SNIPER_SPECIAL_NAME) |
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1394 |
end |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1395 |
|
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1396 |
--north america (shotgun) |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1397 |
elseif(ammoType == amShotgun) |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1398 |
then |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1399 |
if(CS.NORTH_AMERICAN_SPECIAL_SHOTGUN==true) |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1400 |
then |
13379
e1aa72e0872e
CS: Fix display of ammo caption for weapon specials
Wuzzy <Wuzzy2@mail.ru>
parents:
13377
diff
changeset
|
1401 |
WeaponCaption(amShotgun, CS.SHOTGUN_SPECIAL_NAME) |
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1402 |
else |
13379
e1aa72e0872e
CS: Fix display of ammo caption for weapon specials
Wuzzy <Wuzzy2@mail.ru>
parents:
13377
diff
changeset
|
1403 |
WeaponCaption(amShotgun) |
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1404 |
end |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1405 |
|
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1406 |
--europe |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1407 |
elseif(ammoType == amMolotov) |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1408 |
then |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1409 |
if(CS.EUROPE_SPECIAL==1) |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1410 |
then |
13379
e1aa72e0872e
CS: Fix display of ammo caption for weapon specials
Wuzzy <Wuzzy2@mail.ru>
parents:
13377
diff
changeset
|
1411 |
WeaponCaption(amMolotov, CS.MOLOTOV_SPECIAL_NAME) |
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1412 |
else |
13379
e1aa72e0872e
CS: Fix display of ammo caption for weapon specials
Wuzzy <Wuzzy2@mail.ru>
parents:
13377
diff
changeset
|
1413 |
WeaponCaption(amMolotov) |
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1414 |
end |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1415 |
|
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1416 |
--antarctica |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1417 |
elseif(ammoType == amPickHammer) |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1418 |
then |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1419 |
if(CS.ANTARCTICA_SPECIAL==1) |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1420 |
then |
13379
e1aa72e0872e
CS: Fix display of ammo caption for weapon specials
Wuzzy <Wuzzy2@mail.ru>
parents:
13377
diff
changeset
|
1421 |
WeaponCaption(amPickHammer, CS.PICKHAMMER_SPECIAL_NAME) |
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1422 |
else |
13379
e1aa72e0872e
CS: Fix display of ammo caption for weapon specials
Wuzzy <Wuzzy2@mail.ru>
parents:
13377
diff
changeset
|
1423 |
WeaponCaption(amPickHammer) |
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1424 |
end |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1425 |
|
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1426 |
--kerguelen |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1427 |
elseif(ammoType == amHammer) |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1428 |
then |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1429 |
if(CS.KERGUELEN_SPECIAL==1) |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1430 |
then |
13379
e1aa72e0872e
CS: Fix display of ammo caption for weapon specials
Wuzzy <Wuzzy2@mail.ru>
parents:
13377
diff
changeset
|
1431 |
WeaponCaption(amHammer) |
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1432 |
elseif(CS.KERGUELEN_SPECIAL==2) |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1433 |
then |
13379
e1aa72e0872e
CS: Fix display of ammo caption for weapon specials
Wuzzy <Wuzzy2@mail.ru>
parents:
13377
diff
changeset
|
1434 |
WeaponCaption(amHammer, CS.HAMMER_ROAR_NAME) |
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1435 |
elseif(CS.KERGUELEN_SPECIAL==3) |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1436 |
then |
13379
e1aa72e0872e
CS: Fix display of ammo caption for weapon specials
Wuzzy <Wuzzy2@mail.ru>
parents:
13377
diff
changeset
|
1437 |
WeaponCaption(amHammer, CS.HAMMER_SWAP_NAME) |
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1438 |
elseif(CS.KERGUELEN_SPECIAL==5) |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1439 |
then |
13379
e1aa72e0872e
CS: Fix display of ammo caption for weapon specials
Wuzzy <Wuzzy2@mail.ru>
parents:
13377
diff
changeset
|
1440 |
WeaponCaption(amHammer, CS.HAMMER_LONELY_NAME) |
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1441 |
elseif(CS.KERGUELEN_SPECIAL==6) |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1442 |
then |
13379
e1aa72e0872e
CS: Fix display of ammo caption for weapon specials
Wuzzy <Wuzzy2@mail.ru>
parents:
13377
diff
changeset
|
1443 |
WeaponCaption(amHammer, CS.HAMMER_SABOTAGE_NAME) |
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1444 |
end |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1445 |
end |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1446 |
end |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1447 |
|
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1448 |
function onPrecise() |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1449 |
CS.PRECISE = true |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1450 |
end |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1451 |
function onPreciseUp() |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1452 |
CS.PRECISE = false |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1453 |
end |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1454 |
|
7893 | 1455 |
--what happens when you press "tab" (common button) |
1456 |
function onSwitch() |
|
10965 | 1457 |
|
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1458 |
if(CS.SWITCH_HOG_IS_ON==false) |
7893 | 1459 |
then |
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1460 |
if(CS.OPTION_NO_SPECIALS==false and CS.SELECT_CONTINENT_CHECK==false and |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1461 |
band(GetState(CurrentHedgehog), gstAttacked) == 0 and |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1462 |
band(GetState(CurrentHedgehog), gstHHDriven) ~= 0) |
7893 | 1463 |
then |
13364 | 1464 |
--place mine (australia) |
1465 |
if(GetCurAmmoType() == amBaseballBat) |
|
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1466 |
then |
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1467 |
CS.AUSTRALIAN_SPECIAL = CS.AUSTRALIAN_SPECIAL + 1 |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1468 |
CS.AUSTRALIAN_SPECIAL = CS.AUSTRALIAN_SPECIAL % 3 |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1469 |
|
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1470 |
SetAttackState(CS.AUSTRALIAN_SPECIAL == 0) |
13364 | 1471 |
|
1472 |
--Asian special |
|
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1473 |
elseif(CS.PARACHUTE_IS_ON==1) |
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1474 |
then |
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1475 |
local asiabomb=AddGear(GetX(CurrentHedgehog), GetY(CurrentHedgehog)+3, gtSnowball, 0, 0, 0, 0) |
13364 | 1476 |
SetGearMessage(asiabomb, 1) |
1477 |
||
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1478 |
CS.PARACHUTE_IS_ON=2 |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1479 |
CS.SELECT_CONTINENT_CHECK=false |
13364 | 1480 |
|
1481 |
--africa |
|
1482 |
elseif(GetCurAmmoType() == amSeduction) |
|
1483 |
then |
|
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1484 |
if(CS.AFRICAN_SPECIAL_SEDUCTION==0) |
13364 | 1485 |
then |
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1486 |
CS.AFRICAN_SPECIAL_SEDUCTION = 1 |
13364 | 1487 |
else |
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1488 |
CS.AFRICAN_SPECIAL_SEDUCTION = 0 |
13364 | 1489 |
end |
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1490 |
|
13364 | 1491 |
--south america |
1492 |
elseif(GetCurAmmoType() == amGasBomb) |
|
1493 |
then |
|
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1494 |
if(CS.SOUTH_AMERICAN_SPECIAL==false) |
13364 | 1495 |
then |
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1496 |
CS.SOUTH_AMERICAN_SPECIAL = true |
13364 | 1497 |
else |
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1498 |
CS.SOUTH_AMERICAN_SPECIAL = false |
13364 | 1499 |
end |
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1500 |
|
13364 | 1501 |
--africa |
1502 |
elseif(GetCurAmmoType() == amSMine) |
|
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1503 |
then |
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1504 |
CS.AFRICAN_SPECIAL_STICKY = CS.AFRICAN_SPECIAL_STICKY + 1 |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1505 |
CS.AFRICAN_SPECIAL_STICKY = CS.AFRICAN_SPECIAL_STICKY % 3 |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1506 |
SetSoundMask(sndLaugh, CS.AFRICAN_SPECIAL_STICKY ~= 0) |
9805 | 1507 |
|
13364 | 1508 |
--north america (sniper) |
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1509 |
elseif(GetCurAmmoType() == amSniperRifle and CS.NORTH_AMERICAN_SPECIAL_SNIPER_IS_ON==false) |
13364 | 1510 |
then |
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1511 |
if(CS.NORTH_AMERICAN_SPECIAL_SNIPER==2) |
13364 | 1512 |
then |
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1513 |
CS.NORTH_AMERICAN_SPECIAL_SNIPER = 1 |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1514 |
elseif(CS.NORTH_AMERICAN_SPECIAL_SNIPER==1) |
13364 | 1515 |
then |
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1516 |
CS.NORTH_AMERICAN_SPECIAL_SNIPER = 2 |
13364 | 1517 |
end |
1518 |
||
1519 |
--north america (shotgun) |
|
1520 |
elseif(GetCurAmmoType() == amShotgun) |
|
1521 |
then |
|
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1522 |
if(CS.NORTH_AMERICAN_SPECIAL_SHOTGUN==false) |
13364 | 1523 |
then |
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1524 |
CS.NORTH_AMERICAN_SPECIAL_SHOTGUN = true |
13364 | 1525 |
else |
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1526 |
CS.NORTH_AMERICAN_SPECIAL_SHOTGUN = false |
13364 | 1527 |
end |
1528 |
||
1529 |
--europe |
|
1530 |
elseif(GetCurAmmoType() == amMolotov) |
|
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1531 |
then |
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1532 |
if(CS.EUROPE_SPECIAL==0) |
13364 | 1533 |
then |
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1534 |
CS.EUROPE_SPECIAL = 1 |
13364 | 1535 |
else |
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1536 |
CS.EUROPE_SPECIAL = 0 |
13364 | 1537 |
end |
1538 |
||
1539 |
--antarctica |
|
1540 |
elseif(GetCurAmmoType() == amPickHammer) |
|
1541 |
then |
|
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1542 |
if(CS.ANTARCTICA_SPECIAL==0) |
13364 | 1543 |
then |
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1544 |
CS.ANTARCTICA_SPECIAL = 1 |
13364 | 1545 |
else |
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1546 |
CS.ANTARCTICA_SPECIAL = 0 |
13364 | 1547 |
end |
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1548 |
|
13364 | 1549 |
--kerguelen |
1550 |
elseif(GetCurAmmoType() == amHammer) |
|
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1551 |
then |
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1552 |
if(CS.KERGUELEN_SPECIAL==6) |
13364 | 1553 |
then |
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1554 |
CS.KERGUELEN_SPECIAL = 1 |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1555 |
elseif(CS.KERGUELEN_SPECIAL==1) |
13364 | 1556 |
then |
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1557 |
CS.KERGUELEN_SPECIAL = 2 |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1558 |
elseif(CS.KERGUELEN_SPECIAL==2) |
13364 | 1559 |
then |
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1560 |
CS.KERGUELEN_SPECIAL = 3 |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1561 |
elseif(CS.KERGUELEN_SPECIAL==3) |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1562 |
then |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1563 |
CS.KERGUELEN_SPECIAL = 5 |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1564 |
elseif(CS.KERGUELEN_SPECIAL==5) |
13364 | 1565 |
then |
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1566 |
CS.KERGUELEN_SPECIAL = 6 |
13364 | 1567 |
end |
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1568 |
SetAttackState(CS.KERGUELEN_SPECIAL == 1) |
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1569 |
end |
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1570 |
ShowSpecialWeaponCaption(GetCurAmmoType()) |
13364 | 1571 |
end |
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1572 |
--for selecting weaponset, this is mostly for old players. |
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1573 |
-- Switch: Next continent |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1574 |
-- Precise+Switch: Previous continent |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1575 |
TrySelectNextContinent(CS.PRECISE) |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1576 |
--if switching out from sabotage. |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1577 |
elseif(CS.SABOTAGE_HOGS[CurrentHedgehog]~=nil and CS.SABOTAGE_HOGS[CurrentHedgehog]==2) |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1578 |
then |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1579 |
CS.SABOTAGE_HOGS[CurrentHedgehog]=1 |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1580 |
end |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1581 |
end |
10965 | 1582 |
|
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1583 |
function TrySelectNextContinent(reverse) |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1584 |
local direction = 1 |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1585 |
if reverse then |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1586 |
direction = -1 |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1587 |
end |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1588 |
if(GetHogLevel(CurrentHedgehog)==0 and CS.SELECT_CONTINENT_CHECK==true and (GetCurAmmoType() == amSkip or GetCurAmmoType() == amNothing)) |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1589 |
then |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1590 |
CS.TEAM_CONTINENT[GetHogTeamName(CurrentHedgehog)]=CS.TEAM_CONTINENT[GetHogTeamName(CurrentHedgehog)] + direction |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1591 |
|
14235
8edbdd3a1fe7
Get rid of table.maxn in all Lua code
Wuzzy <Wuzzy2@mail.ru>
parents:
13992
diff
changeset
|
1592 |
if(CS.TEAM_CONTINENT[GetHogTeamName(CurrentHedgehog)]> #CS.CONTINENT_INFORMATION) |
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1593 |
then |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1594 |
CS.TEAM_CONTINENT[GetHogTeamName(CurrentHedgehog)]=1 |
7893 | 1595 |
end |
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1596 |
if(CS.TEAM_CONTINENT[GetHogTeamName(CurrentHedgehog)]<=0) |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1597 |
then |
14235
8edbdd3a1fe7
Get rid of table.maxn in all Lua code
Wuzzy <Wuzzy2@mail.ru>
parents:
13992
diff
changeset
|
1598 |
CS.TEAM_CONTINENT[GetHogTeamName(CurrentHedgehog)] = #CS.CONTINENT_INFORMATION |
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1599 |
end |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1600 |
SetContinentWeapons() |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1601 |
|
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1602 |
PlaySound(sndSwitchHog) |
7893 | 1603 |
end |
1604 |
end |
|
1605 |
||
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1606 |
function onUp() |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1607 |
--swap forward in the weaponmenu (1.0 style) |
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1608 |
TrySelectNextContinent(false) |
10965 | 1609 |
|
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1610 |
if(GetCurAmmoType() == amSeduction and CS.AFRICAN_SPECIAL_SEDUCTION == 1 and GetAmmoCount(CurrentHedgehog,amInvulnerable)>0) |
13364 | 1611 |
then |
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1612 |
CS.SEDUCTION_INCREASER=CS.SEDUCTION_INCREASER+7 |
13364 | 1613 |
|
1614 |
RemoveWeapon(CurrentHedgehog,amInvulnerable) |
|
1615 |
||
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1616 |
AddCaption(string.format(CS.INVULNERABLE_SPECIAL_CAPTION, CS.SEDUCTION_INCREASER, GetAmmoCount(CurrentHedgehog,amInvulnerable)), GetClanColor(GetHogClan(CurrentHedgehog)), capgrpAmmostate) |
13364 | 1617 |
end |
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1618 |
end |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1619 |
|
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1620 |
function onDown() |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1621 |
--swap backwards in the weaponmenu (1.0 style) |
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1622 |
TrySelectNextContinent(true) |
10965 | 1623 |
|
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1624 |
if(GetCurAmmoType() == amSeduction and CS.AFRICAN_SPECIAL_SEDUCTION == 1 and CS.SEDUCTION_INCREASER>0) |
13364 | 1625 |
then |
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1626 |
CS.SEDUCTION_INCREASER=CS.SEDUCTION_INCREASER-7 |
13364 | 1627 |
|
1628 |
AddAmmo(CurrentHedgehog,amInvulnerable,GetAmmoCount(CurrentHedgehog, amInvulnerable)+1) |
|
1629 |
||
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1630 |
AddCaption(string.format(CS.INVULNERABLE_SPECIAL_CAPTION, CS.SEDUCTION_INCREASER, GetAmmoCount(CurrentHedgehog,amInvulnerable)), GetClanColor(GetHogClan(CurrentHedgehog)), capgrpAmmostate) |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1631 |
end |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1632 |
end |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1633 |
|
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1634 |
-- Spawn sabotage smoke for inactive hogs (red smoke, more subtle than for active hogs) |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1635 |
function SabotageSmokeInactive(gear) |
14329
5da99c43b96f
CS: Don't start sabotage damage before ready phase ends
Wuzzy <Wuzzy2@mail.ru>
parents:
14235
diff
changeset
|
1636 |
if GetGearType(gear) == gtHedgehog and (gear ~= CurrentHedgehog or ReadyTimeLeft > 0) and CS.SABOTAGE_HOGS[gear]~=nil and CS.SABOTAGE_HOGS[gear]>=1 then |
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1637 |
local vg = AddVisualGear(GetX(gear), GetY(gear), vgtSmokeWhite, 0, false) |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1638 |
SetVisualGearValues(vg, nil, nil, nil, nil, nil, nil, nil, nil, nil, 0xFF8080B0) |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1639 |
end |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1640 |
end |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1641 |
|
13753
d09366ca4d7b
Continental supplies: Fix health not being set immediately if skipping continent selection, provoking random continent
Wuzzy <Wuzzy2@mail.ru>
parents:
13748
diff
changeset
|
1642 |
function ShowContinentLabel(continent) |
d09366ca4d7b
Continental supplies: Fix health not being set immediately if skipping continent selection, provoking random continent
Wuzzy <Wuzzy2@mail.ru>
parents:
13748
diff
changeset
|
1643 |
if not continent then |
d09366ca4d7b
Continental supplies: Fix health not being set immediately if skipping continent selection, provoking random continent
Wuzzy <Wuzzy2@mail.ru>
parents:
13748
diff
changeset
|
1644 |
continent = CS.TEAM_CONTINENT[GetHogTeamName(CurrentHedgehog)] |
d09366ca4d7b
Continental supplies: Fix health not being set immediately if skipping continent selection, provoking random continent
Wuzzy <Wuzzy2@mail.ru>
parents:
13748
diff
changeset
|
1645 |
end |
d09366ca4d7b
Continental supplies: Fix health not being set immediately if skipping continent selection, provoking random continent
Wuzzy <Wuzzy2@mail.ru>
parents:
13748
diff
changeset
|
1646 |
if continent == 0 then |
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1647 |
AddCaption(loc("Random continent"), GetClanColor(GetHogClan(CurrentHedgehog)), capgrpAmmoinfo) |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1648 |
else |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1649 |
AddCaption(CS.CONTINENT_INFORMATION[CS.TEAM_CONTINENT[GetHogTeamName(CurrentHedgehog)]][1], GetClanColor(GetHogClan(CurrentHedgehog)), capgrpAmmoinfo) |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1650 |
end |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1651 |
end |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1652 |
|
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1653 |
function onGameTick() |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1654 |
-- This is a trick to show the continent label delayed by 1 tick |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1655 |
if CS.CONTINENT_LABEL_TIMER > 0 then |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1656 |
CS.CONTINENT_LABEL_TIMER = CS.CONTINENT_LABEL_TIMER - 1 |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1657 |
end |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1658 |
if CS.CONTINENT_LABEL_TIMER == 0 then |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1659 |
ShowContinentLabel() |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1660 |
CS.CONTINENT_LABEL_TIMER = -1 |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1661 |
end |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1662 |
|
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1663 |
if CS.HANDLE_SPECIAL_WEAPON_MISC_TIMER > 0 then |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1664 |
CS.HANDLE_SPECIAL_WEAPON_MISC_TIMER = CS.HANDLE_SPECIAL_WEAPON_MISC_TIMER - 1 |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1665 |
end |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1666 |
if CS.HANDLE_SPECIAL_WEAPON_MISC_TIMER == 0 then |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1667 |
HandleSpecialWeaponMisc() |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1668 |
CS.HANDLE_SPECIAL_WEAPON_MISC_TIMER = -1 |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1669 |
end |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1670 |
|
13379
e1aa72e0872e
CS: Fix display of ammo caption for weapon specials
Wuzzy <Wuzzy2@mail.ru>
parents:
13377
diff
changeset
|
1671 |
if CS.HANDLE_SOUTH_AMERICAN_SPECIAL_TIMER > 0 then |
e1aa72e0872e
CS: Fix display of ammo caption for weapon specials
Wuzzy <Wuzzy2@mail.ru>
parents:
13377
diff
changeset
|
1672 |
CS.HANDLE_SOUTH_AMERICAN_SPECIAL_TIMER = CS.HANDLE_SOUTH_AMERICAN_SPECIAL_TIMER - 1 |
e1aa72e0872e
CS: Fix display of ammo caption for weapon specials
Wuzzy <Wuzzy2@mail.ru>
parents:
13377
diff
changeset
|
1673 |
end |
e1aa72e0872e
CS: Fix display of ammo caption for weapon specials
Wuzzy <Wuzzy2@mail.ru>
parents:
13377
diff
changeset
|
1674 |
if CS.HANDLE_SOUTH_AMERICAN_SPECIAL_TIMER == 0 then |
e1aa72e0872e
CS: Fix display of ammo caption for weapon specials
Wuzzy <Wuzzy2@mail.ru>
parents:
13377
diff
changeset
|
1675 |
WeaponCaption(amGasBomb, CS.CHEESE_SPECIAL_NAME) |
e1aa72e0872e
CS: Fix display of ammo caption for weapon specials
Wuzzy <Wuzzy2@mail.ru>
parents:
13377
diff
changeset
|
1676 |
CS.HANDLE_SOUTH_AMERICAN_SPECIAL_TIMER = -1 |
e1aa72e0872e
CS: Fix display of ammo caption for weapon specials
Wuzzy <Wuzzy2@mail.ru>
parents:
13377
diff
changeset
|
1677 |
end |
e1aa72e0872e
CS: Fix display of ammo caption for weapon specials
Wuzzy <Wuzzy2@mail.ru>
parents:
13377
diff
changeset
|
1678 |
|
e1aa72e0872e
CS: Fix display of ammo caption for weapon specials
Wuzzy <Wuzzy2@mail.ru>
parents:
13377
diff
changeset
|
1679 |
|
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1680 |
-- See onAttack() |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1681 |
if CS.CONFIRM_CONTINENT_SELECTION > 0 then |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1682 |
CS.CONFIRM_CONTINENT_SELECTION = CS.CONFIRM_CONTINENT_SELECTION - 1 |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1683 |
end |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1684 |
if CS.CONFIRM_CONTINENT_SELECTION == 0 then |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1685 |
CS.SELECT_CONTINENT_CHECK=false |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1686 |
EndTurnCS(0) |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1687 |
PlaySound(sndPlaced) |
13753
d09366ca4d7b
Continental supplies: Fix health not being set immediately if skipping continent selection, provoking random continent
Wuzzy <Wuzzy2@mail.ru>
parents:
13748
diff
changeset
|
1688 |
if(CurrentHedgehog and CS.TEAM_CONTINENT[GetHogTeamName(CurrentHedgehog)]==0) |
d09366ca4d7b
Continental supplies: Fix health not being set immediately if skipping continent selection, provoking random continent
Wuzzy <Wuzzy2@mail.ru>
parents:
13748
diff
changeset
|
1689 |
then |
14235
8edbdd3a1fe7
Get rid of table.maxn in all Lua code
Wuzzy <Wuzzy2@mail.ru>
parents:
13992
diff
changeset
|
1690 |
CS.TEAM_CONTINENT[GetHogTeamName(CurrentHedgehog)]=GetRandom(#CS.CONTINENT_INFORMATION)+1 |
13753
d09366ca4d7b
Continental supplies: Fix health not being set immediately if skipping continent selection, provoking random continent
Wuzzy <Wuzzy2@mail.ru>
parents:
13748
diff
changeset
|
1691 |
SetContinentWeapons() |
d09366ca4d7b
Continental supplies: Fix health not being set immediately if skipping continent selection, provoking random continent
Wuzzy <Wuzzy2@mail.ru>
parents:
13748
diff
changeset
|
1692 |
HideMission() |
d09366ca4d7b
Continental supplies: Fix health not being set immediately if skipping continent selection, provoking random continent
Wuzzy <Wuzzy2@mail.ru>
parents:
13748
diff
changeset
|
1693 |
ShowContinentLabel(0) |
d09366ca4d7b
Continental supplies: Fix health not being set immediately if skipping continent selection, provoking random continent
Wuzzy <Wuzzy2@mail.ru>
parents:
13748
diff
changeset
|
1694 |
else |
d09366ca4d7b
Continental supplies: Fix health not being set immediately if skipping continent selection, provoking random continent
Wuzzy <Wuzzy2@mail.ru>
parents:
13748
diff
changeset
|
1695 |
ShowContinentLabel() |
d09366ca4d7b
Continental supplies: Fix health not being set immediately if skipping continent selection, provoking random continent
Wuzzy <Wuzzy2@mail.ru>
parents:
13748
diff
changeset
|
1696 |
end |
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1697 |
CS.CONFIRM_CONTINENT_SELECTION = -1 |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1698 |
end |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1699 |
|
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1700 |
if GameTime % 600 == 0 then |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1701 |
runOnGears(SabotageSmokeInactive) |
13364 | 1702 |
end |
7893 | 1703 |
end |
1704 |
||
1705 |
function onGameTick20() |
|
8618 | 1706 |
--if you picked a weaponset from the weaponmenu (icon) |
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1707 |
if(CS.TEAM_CONTINENT[GetHogTeamName(CurrentHedgehog)]==0) |
7893 | 1708 |
then |
8618 | 1709 |
if(GetCurAmmoType()==amSwitch) |
7893 | 1710 |
then |
14235
8edbdd3a1fe7
Get rid of table.maxn in all Lua code
Wuzzy <Wuzzy2@mail.ru>
parents:
13992
diff
changeset
|
1711 |
CS.TEAM_CONTINENT[GetHogTeamName(CurrentHedgehog)]=GetRandom(#CS.CONTINENT_INFORMATION)+1 |
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1712 |
SetContinentWeapons() |
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1713 |
SetWeapon(amSkip) |
8618 | 1714 |
PlaySound(sndMineTick) |
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1715 |
CS.CONTINENT_LABEL_TIMER = 1 |
8618 | 1716 |
else |
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1717 |
for v,w in pairs(CS.CONTINENT_INFORMATION) |
8618 | 1718 |
do |
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1719 |
if(GetCurAmmoType()==CS.CONTINENT_INFORMATION[v][4][1]) |
8618 | 1720 |
then |
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1721 |
CS.TEAM_CONTINENT[GetHogTeamName(CurrentHedgehog)]=v |
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1722 |
SetContinentWeapons() |
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1723 |
SetWeapon(amSkip) |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1724 |
PlaySound(CS.CONTINENT_INFORMATION[v][6][1]) |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1725 |
PlaySound(CS.CONTINENT_INFORMATION[v][6][2],CurrentHedgehog) |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1726 |
CS.CONTINENT_LABEL_TIMER = 1 |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1727 |
break |
8618 | 1728 |
end |
1729 |
end |
|
7893 | 1730 |
end |
1731 |
end |
|
10965 | 1732 |
|
8618 | 1733 |
--show the kerguelen ring |
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1734 |
if(CS.KERGUELEN_SPECIAL > 1 and GetCurAmmoType() == amHammer and |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1735 |
band(GetState(CurrentHedgehog), gstAttacked) == 0 and |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1736 |
band(GetState(CurrentHedgehog), gstHHDriven) ~= 0) |
7893 | 1737 |
then |
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1738 |
if(CS.VISUAL_CIRCLE==nil) |
8618 | 1739 |
then |
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1740 |
CS.VISUAL_CIRCLE=AddVisualGear(GetX(CurrentHedgehog), GetY(CurrentHedgehog), vgtCircle, 0, true) |
7893 | 1741 |
end |
10965 | 1742 |
|
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1743 |
if(CS.KERGUELEN_SPECIAL == 2) --walrus scream |
7893 | 1744 |
then |
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1745 |
SetVisualGearValues(CS.VISUAL_CIRCLE, GetX(CurrentHedgehog), GetY(CurrentHedgehog),20, 200, 0, 0, 100, 120, 4, 0xff0000ee) |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1746 |
elseif(CS.KERGUELEN_SPECIAL == 3) --swap hog |
7893 | 1747 |
then |
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1748 |
SetVisualGearValues(CS.VISUAL_CIRCLE, GetX(CurrentHedgehog), GetY(CurrentHedgehog),20, 200, 0, 0, 100, 390, 3, 0xffff00ee) |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1749 |
elseif(CS.KERGUELEN_SPECIAL == 5) --cries |
8618 | 1750 |
then |
13364 | 1751 |
|
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1752 |
CS.TEMP_VALUE=0 |
13364 | 1753 |
runOnGears(KerguelenSpecialBlueCheck) |
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1754 |
if(CS.TEMP_VALUE==0) |
13364 | 1755 |
then |
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1756 |
SetVisualGearValues(CS.VISUAL_CIRCLE, GetX(CurrentHedgehog), GetY(CurrentHedgehog),20, 200, 0, 0, 100, 500, 1, 0x0000ffee) |
13364 | 1757 |
else |
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1758 |
SetVisualGearValues(CS.VISUAL_CIRCLE, GetX(CurrentHedgehog), GetY(CurrentHedgehog),20, 200, 0, 0, 100, 500, 10, 0x0000ffee) |
13364 | 1759 |
end |
1760 |
||
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1761 |
elseif(CS.KERGUELEN_SPECIAL == 6) --sabotage |
7893 | 1762 |
then |
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1763 |
SetVisualGearValues(CS.VISUAL_CIRCLE, GetX(CurrentHedgehog), GetY(CurrentHedgehog),20, 200, 0, 0, 100, 80, 10, 0x00ff00ee) |
7893 | 1764 |
end |
10965 | 1765 |
|
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1766 |
elseif(CS.VISUAL_CIRCLE~=nil) |
7893 | 1767 |
then |
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1768 |
DeleteVisualGear(CS.VISUAL_CIRCLE) |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1769 |
CS.VISUAL_CIRCLE=nil |
7893 | 1770 |
end |
10965 | 1771 |
|
8618 | 1772 |
--sabotage |
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1773 |
if(CS.SABOTAGE_HOGS[CurrentHedgehog]~=nil and CS.SABOTAGE_HOGS[CurrentHedgehog]>=1) |
7893 | 1774 |
then |
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1775 |
--for sabotage |
14329
5da99c43b96f
CS: Don't start sabotage damage before ready phase ends
Wuzzy <Wuzzy2@mail.ru>
parents:
14235
diff
changeset
|
1776 |
if(CS.SABOTAGE_HOGS[CurrentHedgehog]==1 and ReadyTimeLeft == 0) |
7893 | 1777 |
then |
13364 | 1778 |
AddCaption(loc("You are sabotaged, RUN!")) |
1779 |
||
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1780 |
PlaySound(sndHellish) |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1781 |
--update the constant at the top also to something in between |
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1782 |
CS.SABOTAGE_FREQUENCY_NOW=CS.SABOTAGE_FREQUENCY |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1783 |
SetGravity(CS.SABOTAGE_GRAVITY) |
10965 | 1784 |
|
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1785 |
CS.SABOTAGE_HOGS[CurrentHedgehog]=2 |
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1786 |
end |
10965 | 1787 |
|
14329
5da99c43b96f
CS: Don't start sabotage damage before ready phase ends
Wuzzy <Wuzzy2@mail.ru>
parents:
14235
diff
changeset
|
1788 |
if(CS.SABOTAGE_HOGS[CurrentHedgehog]==2 and CS.SABOTAGE_COUNTER % 20 == 0) |
7893 | 1789 |
then |
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1790 |
-- Sabotage effect (red smoke) |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1791 |
local vg = AddVisualGear(GetX(CurrentHedgehog), GetY(CurrentHedgehog), vgtSmokeWhite, 0, false) |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1792 |
SetVisualGearValues(vg, nil, nil, nil, nil, nil, nil, nil, nil, nil, 0xFF4040FF) |
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1793 |
end |
10965 | 1794 |
|
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1795 |
if(TurnTimeLeft<(GetAwayTime*10) or band(GetState(CurrentHedgehog),gstAttacked)==1) |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1796 |
then |
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1797 |
CS.SABOTAGE_HOGS[CurrentHedgehog]=0 |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1798 |
elseif(CS.SABOTAGE_COUNTER >= CS.SABOTAGE_FREQUENCY_NOW) |
9805 | 1799 |
then |
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1800 |
-- Sabotage decreases hog health regularily, |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1801 |
-- but invulnerable protects. |
14329
5da99c43b96f
CS: Don't start sabotage damage before ready phase ends
Wuzzy <Wuzzy2@mail.ru>
parents:
14235
diff
changeset
|
1802 |
-- Also do not decrease health while retreating, attacking or in ready phase. |
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1803 |
if(GetEffect(CurrentHedgehog, heInvulnerable) == 0 and |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1804 |
band(GetState(CurrentHedgehog), gstHHDriven) ~= 0 and |
14329
5da99c43b96f
CS: Don't start sabotage damage before ready phase ends
Wuzzy <Wuzzy2@mail.ru>
parents:
14235
diff
changeset
|
1805 |
band(GetState(CurrentHedgehog), gstAttacked+gstAttacking) == 0) and |
5da99c43b96f
CS: Don't start sabotage damage before ready phase ends
Wuzzy <Wuzzy2@mail.ru>
parents:
14235
diff
changeset
|
1806 |
(ReadyTimeLeft == 0) |
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1807 |
then |
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1808 |
if(GetHealth(CurrentHedgehog)<=CS.SABOTAGE_DAMAGE) |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1809 |
then |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1810 |
-- All health lost! Sabotage is cruel. |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1811 |
PlaySound(sndPoisonMoan, CurrentHedgehog) |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1812 |
SetHealth(CurrentHedgehog, 0) |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1813 |
CS.SABOTAGE_HOGS[CurrentHedgehog]=0 |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1814 |
-- Take away control so the hog can die in peace. |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1815 |
SetState(CurrentHedgehog, band(GetState(CurrentHedgehog), bnot(gstHHDriven))) |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1816 |
else |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1817 |
local newHealth = GetHealth(CurrentHedgehog)-CS.SABOTAGE_DAMAGE |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1818 |
-- Start moaning if health is at a critical level |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1819 |
if newHealth <= 16 then |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1820 |
PlaySound(sndPoisonMoan, CurrentHedgehog) |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1821 |
elseif newHealth <= 32 then |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1822 |
PlaySound(sndPoisonCough, CurrentHedgehog) |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1823 |
end |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1824 |
SetHealth(CurrentHedgehog, newHealth) |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1825 |
end |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1826 |
ShowDamageTag(CurrentHedgehog,CS.SABOTAGE_DAMAGE) |
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1827 |
end |
10965 | 1828 |
|
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1829 |
CS.SABOTAGE_COUNTER=0 |
7893 | 1830 |
else |
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1831 |
CS.SABOTAGE_COUNTER=CS.SABOTAGE_COUNTER+1 |
7893 | 1832 |
end |
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1833 |
elseif((GetGravity()==CS.SABOTAGE_GRAVITY or GetGravity()==CS.SABOTAGE_GRAVITY_LOW) and (CS.SABOTAGE_HOGS[CurrentHedgehog]==0 or CS.SABOTAGE_HOGS[CurrentHedgehog]==nil)) |
13364 | 1834 |
then |
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1835 |
-- Reset gravity |
13364 | 1836 |
SetGravity(100) |
7893 | 1837 |
end |
10965 | 1838 |
|
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1839 |
if(CS.SPEECH_TIMER > 0) then |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1840 |
CS.SPEECH_TIMER = CS.SPEECH_TIMER - 20 |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1841 |
end |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1842 |
end |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1843 |
|
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1844 |
function HandleSpecialWeaponMisc(ammoType) |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1845 |
if not ammoType then |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1846 |
ammoType = GetCurAmmoType() |
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1847 |
end |
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1848 |
ShowSpecialWeaponCaption(ammoType) |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1849 |
if ammoType == amSMine and CS.AFRICAN_SPECIAL_STICKY ~= 0 then |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1850 |
SetSoundMask(sndLaugh, true) |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1851 |
else |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1852 |
SetSoundMask(sndLaugh, false) |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1853 |
end |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1854 |
if (ammoType == amHammer and CS.KERGUELEN_SPECIAL > 1) or (ammoType == amBaseballBat and CS.AUSTRALIAN_SPECIAL ~= 0) then |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1855 |
SetAttackState(false) |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1856 |
else |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1857 |
SetAttackState(true) |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1858 |
end |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1859 |
|
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1860 |
end |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1861 |
|
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1862 |
--some ppl complained :P |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1863 |
function onSlot(slot) |
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1864 |
if(CS.TEAM_CONTINENT[GetHogTeamName(CurrentHedgehog)]==0) |
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1865 |
then |
12416
edeae7661dca
Lua refactor: Replace ParseCommand('setweap… with SetWeapon
Wuzzy <almikes@aol.com>
parents:
11520
diff
changeset
|
1866 |
SetWeapon(amSkip) |
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1867 |
end |
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1868 |
if CS.GAME_STARTED then |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1869 |
-- Delay calling HandleSpecialWeaponMisc because |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1870 |
-- the CurAmmoType is not updated yet. |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1871 |
CS.HANDLE_SPECIAL_WEAPON_MISC_TIMER = 2 |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1872 |
end |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1873 |
end |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1874 |
|
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1875 |
function onSetWeapon(ammoType) |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1876 |
if CS.GAME_STARTED then |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1877 |
HandleSpecialWeaponMisc(ammoType) |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1878 |
end |
7893 | 1879 |
end |
1880 |
||
1881 |
--if you used hogswitch or any similar weapon, dont enable any weaponchange |
|
1882 |
function onAttack() |
|
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1883 |
if(CS.SELECT_CONTINENT_CHECK==true) |
13364 | 1884 |
then |
1885 |
if(GetCurAmmoType() == amSkip or GetCurAmmoType() == amNothing) |
|
1886 |
then |
|
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1887 |
SetWeapon(amNothing) |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1888 |
-- Delay the real continent selection so the SetWeapon |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1889 |
-- has time to take effect. |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1890 |
CS.CONFIRM_CONTINENT_SELECTION=2 |
13364 | 1891 |
else |
1892 |
SetWeapon(amSkip) |
|
1893 |
end |
|
1894 |
end |
|
10965 | 1895 |
|
7893 | 1896 |
--african special |
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1897 |
if(CS.AFRICAN_SPECIAL_SEDUCTION == 1 and GetCurAmmoType() == amSeduction and band(GetState(CurrentHedgehog),gstAttacked)==0) |
7893 | 1898 |
then |
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1899 |
EndTurnCS(3) |
10965 | 1900 |
|
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1901 |
CS.TEMP_VALUE=0 |
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1902 |
runOnGears(AfricaSpecialSeduction) |
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1903 |
SetHealth(CurrentHedgehog, GetHealth(CurrentHedgehog)+CS.TEMP_VALUE) |
7893 | 1904 |
|
1905 |
--visual stuff |
|
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1906 |
VisualExplosion(250,GetX(CurrentHedgehog), GetY(CurrentHedgehog),vgtSmoke,vgtSmokeWhite) |
7893 | 1907 |
PlaySound(sndParachute) |
10965 | 1908 |
|
9805 | 1909 |
RemoveWeapon(CurrentHedgehog,amSeduction) |
8618 | 1910 |
|
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1911 |
elseif(CS.ANTARCTICA_SPECIAL == 1 and GetCurAmmoType() == amPickHammer and band(GetState(CurrentHedgehog),gstAttacked)==0) |
13364 | 1912 |
then |
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1913 |
EndTurnCS(10) |
13382
03e4d9b5b09c
Continental supplies: Upside-Down World special now works in cave maps as well
Wuzzy <Wuzzy2@mail.ru>
parents:
13379
diff
changeset
|
1914 |
local dx, dy = GetGearVelocity(CurrentHedgehog) |
03e4d9b5b09c
Continental supplies: Upside-Down World special now works in cave maps as well
Wuzzy <Wuzzy2@mail.ru>
parents:
13379
diff
changeset
|
1915 |
local isLeft = dx < 0 |
03e4d9b5b09c
Continental supplies: Upside-Down World special now works in cave maps as well
Wuzzy <Wuzzy2@mail.ru>
parents:
13379
diff
changeset
|
1916 |
-- Cave map / map has border |
03e4d9b5b09c
Continental supplies: Upside-Down World special now works in cave maps as well
Wuzzy <Wuzzy2@mail.ru>
parents:
13379
diff
changeset
|
1917 |
if not MapHasBorder() then |
03e4d9b5b09c
Continental supplies: Upside-Down World special now works in cave maps as well
Wuzzy <Wuzzy2@mail.ru>
parents:
13379
diff
changeset
|
1918 |
-- Place hog at Y = 0 |
03e4d9b5b09c
Continental supplies: Upside-Down World special now works in cave maps as well
Wuzzy <Wuzzy2@mail.ru>
parents:
13379
diff
changeset
|
1919 |
SetGearPosition(CurrentHedgehog, GetX(CurrentHedgehog), 0) |
03e4d9b5b09c
Continental supplies: Upside-Down World special now works in cave maps as well
Wuzzy <Wuzzy2@mail.ru>
parents:
13379
diff
changeset
|
1920 |
ParseCommand("hjump") |
03e4d9b5b09c
Continental supplies: Upside-Down World special now works in cave maps as well
Wuzzy <Wuzzy2@mail.ru>
parents:
13379
diff
changeset
|
1921 |
SetGearVelocity(CurrentHedgehog, 0, 100000000) |
13364 | 1922 |
|
13382
03e4d9b5b09c
Continental supplies: Upside-Down World special now works in cave maps as well
Wuzzy <Wuzzy2@mail.ru>
parents:
13379
diff
changeset
|
1923 |
-- Open air map |
03e4d9b5b09c
Continental supplies: Upside-Down World special now works in cave maps as well
Wuzzy <Wuzzy2@mail.ru>
parents:
13379
diff
changeset
|
1924 |
else |
03e4d9b5b09c
Continental supplies: Upside-Down World special now works in cave maps as well
Wuzzy <Wuzzy2@mail.ru>
parents:
13379
diff
changeset
|
1925 |
-- Place hog just below the top border, erase a bit of land as well |
03e4d9b5b09c
Continental supplies: Upside-Down World special now works in cave maps as well
Wuzzy <Wuzzy2@mail.ru>
parents:
13379
diff
changeset
|
1926 |
local x = GetX(CurrentHedgehog) |
03e4d9b5b09c
Continental supplies: Upside-Down World special now works in cave maps as well
Wuzzy <Wuzzy2@mail.ru>
parents:
13379
diff
changeset
|
1927 |
Explode(x, TopY + 6, 32, EXPLNoDamage + EXPLDoNotTouchAny + EXPLNoGfx) |
03e4d9b5b09c
Continental supplies: Upside-Down World special now works in cave maps as well
Wuzzy <Wuzzy2@mail.ru>
parents:
13379
diff
changeset
|
1928 |
Explode(x, TopY + 20, 24, EXPLNoDamage + EXPLDoNotTouchAny) |
03e4d9b5b09c
Continental supplies: Upside-Down World special now works in cave maps as well
Wuzzy <Wuzzy2@mail.ru>
parents:
13379
diff
changeset
|
1929 |
SetGearPosition(CurrentHedgehog, x, TopY + 26) |
03e4d9b5b09c
Continental supplies: Upside-Down World special now works in cave maps as well
Wuzzy <Wuzzy2@mail.ru>
parents:
13379
diff
changeset
|
1930 |
local dx, dy = GetGearVelocity(CurrentHedgehog) |
03e4d9b5b09c
Continental supplies: Upside-Down World special now works in cave maps as well
Wuzzy <Wuzzy2@mail.ru>
parents:
13379
diff
changeset
|
1931 |
SetGearVelocity(CurrentHedgehog, 0, dy) |
03e4d9b5b09c
Continental supplies: Upside-Down World special now works in cave maps as well
Wuzzy <Wuzzy2@mail.ru>
parents:
13379
diff
changeset
|
1932 |
ParseCommand("hjump") |
03e4d9b5b09c
Continental supplies: Upside-Down World special now works in cave maps as well
Wuzzy <Wuzzy2@mail.ru>
parents:
13379
diff
changeset
|
1933 |
end |
03e4d9b5b09c
Continental supplies: Upside-Down World special now works in cave maps as well
Wuzzy <Wuzzy2@mail.ru>
parents:
13379
diff
changeset
|
1934 |
if isLeft then |
03e4d9b5b09c
Continental supplies: Upside-Down World special now works in cave maps as well
Wuzzy <Wuzzy2@mail.ru>
parents:
13379
diff
changeset
|
1935 |
HogTurnLeft(CurrentHedgehog, true) |
03e4d9b5b09c
Continental supplies: Upside-Down World special now works in cave maps as well
Wuzzy <Wuzzy2@mail.ru>
parents:
13379
diff
changeset
|
1936 |
end |
13364 | 1937 |
PlaySound(sndPiano8) |
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1938 |
PlaySound(sndWarp) |
13364 | 1939 |
|
1940 |
RemoveWeapon(CurrentHedgehog,amPickHammer) |
|
1941 |
||
7893 | 1942 |
--Kerguelen specials |
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1943 |
elseif(GetCurAmmoType() == amHammer and CS.KERGUELEN_SPECIAL > 1 and band(GetState(CurrentHedgehog),gstAttacked)==0) |
7893 | 1944 |
then |
13364 | 1945 |
local escapetime=3 |
1946 |
||
8618 | 1947 |
--scream |
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1948 |
if(CS.KERGUELEN_SPECIAL == 2) |
7893 | 1949 |
then |
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1950 |
CS.TEMP_VALUE=0 |
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1951 |
runOnGears(KerguelenSpecialRed) |
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1952 |
HealHog(CurrentHedgehog, CS.TEMP_VALUE) |
7893 | 1953 |
PlaySound(sndHellish) |
10965 | 1954 |
|
8618 | 1955 |
--swap |
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1956 |
elseif(CS.KERGUELEN_SPECIAL == 3) |
7893 | 1957 |
then |
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1958 |
CS.TEMP_VALUE=0 |
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1959 |
runOnGears(KerguelenSpecialYellowCountHogs) |
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1960 |
if(CS.TEMP_VALUE>0) |
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1961 |
then |
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1962 |
CS.TEMP_VALUE=GetRandom(CS.TEMP_VALUE) |
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1963 |
runOnGears(KerguelenSpecialYellowSwap) |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1964 |
PlaySound(sndPiano3) |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1965 |
else |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1966 |
PlaySound(sndPiano6) |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1967 |
end |
10965 | 1968 |
|
8618 | 1969 |
--cries |
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1970 |
elseif(CS.KERGUELEN_SPECIAL == 5) |
7893 | 1971 |
then |
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1972 |
CS.TEMP_VALUE=0 |
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1973 |
runOnGears(KerguelenSpecialBlueCheck) |
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1974 |
if(CS.TEMP_VALUE==0) |
7893 | 1975 |
then |
1976 |
AddGear(0, 0, gtWaterUp, 0, 0,0,0) |
|
1977 |
PlaySound(sndWarp) |
|
1978 |
PlaySound(sndMolotov) |
|
10965 | 1979 |
|
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1980 |
runOnGears(KerguelenSpecialBlueActivate) |
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1981 |
SetHealth(CurrentHedgehog, GetHealth(CurrentHedgehog)+CS.TEMP_VALUE) |
7893 | 1982 |
else |
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1983 |
PlaySound(sndDenied) |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1984 |
escapetime = -1 |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1985 |
if CS.SPEECH_TIMER <= 0 then |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1986 |
HogSay(CurrentHedgehog, loc("Hogs in sight!"), SAY_SAY) |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1987 |
CS.SPEECH_TIMER = 5000 |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1988 |
end |
7893 | 1989 |
end |
10965 | 1990 |
|
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1991 |
--flare/sabotage |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1992 |
elseif(CS.KERGUELEN_SPECIAL == 6) |
7893 | 1993 |
then |
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
1994 |
CS.TEMP_VALUE=0 |
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1995 |
runOnGears(KerguelenSpecialGreen) |
13364 | 1996 |
|
1997 |
PlaySound(sndThrowRelease) |
|
1998 |
AddGear(GetX(CurrentHedgehog), GetY(CurrentHedgehog)-20, gtCluster, 0, 0, -1000000, 32) |
|
1999 |
||
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
2000 |
if(CS.TEMP_VALUE==1) |
9805 | 2001 |
then |
13364 | 2002 |
escapetime=10 |
9805 | 2003 |
end |
7893 | 2004 |
end |
10965 | 2005 |
|
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
2006 |
if escapetime >= 0 then |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
2007 |
EndTurnCS(escapetime) |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
2008 |
|
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
2009 |
DeleteVisualGear(CS.VISUAL_CIRCLE) |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
2010 |
CS.VISUAL_CIRCLE=nil |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
2011 |
CS.KERGUELEN_SPECIAL=0 |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
2012 |
|
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
2013 |
RemoveWeapon(CurrentHedgehog,amHammer) |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
2014 |
end |
10965 | 2015 |
|
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
2016 |
elseif(GetCurAmmoType() == amBaseballBat) |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
2017 |
then |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
2018 |
if CS.AUSTRALIAN_SPECIAL ~= 0 |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
2019 |
then |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
2020 |
CS.TEMP_VALUE=0 |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
2021 |
runOnGears(AustraliaSpecialCheckHogs) |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
2022 |
if CS.TEMP_VALUE == 0 then |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
2023 |
SetGearMessage(CurrentHedgehog, bor(GetGearMessage(CurrentHedgehog), gmAttack)) |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
2024 |
else |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
2025 |
PlaySound(sndDenied) |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
2026 |
end |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
2027 |
end |
10965 | 2028 |
|
8618 | 2029 |
elseif(GetCurAmmoType() == amVampiric) |
2030 |
then |
|
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
2031 |
CS.VAMPIRIC_IS_ON=75 |
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
2032 |
elseif(GetCurAmmoType() == amExtraDamage) |
7893 | 2033 |
then |
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
2034 |
CS.EXTRA_DAMAGE_IS_ON=150 |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
2035 |
end |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
2036 |
end |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
2037 |
|
13379
e1aa72e0872e
CS: Fix display of ammo caption for weapon specials
Wuzzy <Wuzzy2@mail.ru>
parents:
13377
diff
changeset
|
2038 |
function onTimer() |
e1aa72e0872e
CS: Fix display of ammo caption for weapon specials
Wuzzy <Wuzzy2@mail.ru>
parents:
13377
diff
changeset
|
2039 |
-- This hack makes sure the correct weapon label + timer is displayed for the GasBomb special |
e1aa72e0872e
CS: Fix display of ammo caption for weapon specials
Wuzzy <Wuzzy2@mail.ru>
parents:
13377
diff
changeset
|
2040 |
if GetCurAmmoType() == amGasBomb and (CS.SOUTH_AMERICAN_SPECIAL==true) then |
e1aa72e0872e
CS: Fix display of ammo caption for weapon specials
Wuzzy <Wuzzy2@mail.ru>
parents:
13377
diff
changeset
|
2041 |
CS.HANDLE_SOUTH_AMERICAN_SPECIAL_TIMER = 2 |
e1aa72e0872e
CS: Fix display of ammo caption for weapon specials
Wuzzy <Wuzzy2@mail.ru>
parents:
13377
diff
changeset
|
2042 |
end |
e1aa72e0872e
CS: Fix display of ammo caption for weapon specials
Wuzzy <Wuzzy2@mail.ru>
parents:
13377
diff
changeset
|
2043 |
end |
e1aa72e0872e
CS: Fix display of ammo caption for weapon specials
Wuzzy <Wuzzy2@mail.ru>
parents:
13377
diff
changeset
|
2044 |
|
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
2045 |
function onHogAttack(ammoType) |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
2046 |
-- When a sabotaged hog uses low gravity, overwrite the default low gravity, |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
2047 |
-- otherwise it would be too easy. |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
2048 |
if(ammoType == amLowGravity and CS.SABOTAGE_HOGS[CurrentHedgehog]~=nil and CS.SABOTAGE_HOGS[CurrentHedgehog]>=1) |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
2049 |
then |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
2050 |
SetGravity(CS.SABOTAGE_GRAVITY_LOW) |
7893 | 2051 |
end |
2052 |
end |
|
2053 |
||
2054 |
function onGearAdd(gearUid) |
|
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
2055 |
CS.SELECT_CONTINENT_CHECK=false |
10965 | 2056 |
|
8618 | 2057 |
--track the gears im using |
10965 | 2058 |
if(GetGearType(gearUid) == gtHedgehog or GetGearType(gearUid) == gtMine or GetGearType(gearUid) == gtExplosives) |
7895
ac1610a7b7fa
apparently an older version was provided earlier and this one is newer and theoretically desync free. untested.
Vatten
parents:
7893
diff
changeset
|
2059 |
then |
ac1610a7b7fa
apparently an older version was provided earlier and this one is newer and theoretically desync free. untested.
Vatten
parents:
7893
diff
changeset
|
2060 |
trackGear(gearUid) |
ac1610a7b7fa
apparently an older version was provided earlier and this one is newer and theoretically desync free. untested.
Vatten
parents:
7893
diff
changeset
|
2061 |
end |
10965 | 2062 |
|
7893 | 2063 |
--remove gasclouds on gasbombspecial |
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
2064 |
if(GetGearType(gearUid)==gtPoisonCloud and CS.SOUTH_AMERICAN_SPECIAL == true) |
7893 | 2065 |
then |
2066 |
DeleteGear(gearUid) |
|
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
2067 |
--african special |
7893 | 2068 |
elseif(GetGearType(gearUid)==gtSMine) |
2069 |
then |
|
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
2070 |
local vx,vy=GetGearVelocity(gearUid) |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
2071 |
if(CS.AFRICAN_SPECIAL_STICKY == 1) |
7893 | 2072 |
then |
2073 |
SetState(CurrentHedgehog, gstHHDriven+gstMoving) |
|
2074 |
SetGearPosition(CurrentHedgehog, GetX(CurrentHedgehog),GetY(CurrentHedgehog)-3) |
|
2075 |
SetGearVelocity(CurrentHedgehog, vx, vy) |
|
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
2076 |
PlaySound(sndJump2, CurrentHedgehog) |
7893 | 2077 |
DeleteGear(gearUid) |
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
2078 |
if (not CS.AFRICAN_SPECIAL_NON_PROJECTILE_USED) then |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
2079 |
SetSoundMask(sndMissed, true) |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
2080 |
end |
10965 | 2081 |
|
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
2082 |
elseif(CS.AFRICAN_SPECIAL_STICKY == 2) |
7893 | 2083 |
then |
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
2084 |
FireGear(CurrentHedgehog,gtNapalmBomb, vx, vy, 0) |
7893 | 2085 |
DeleteGear(gearUid) |
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
2086 |
CS.AFRICAN_SPECIAL_NON_PROJECTILE_USED=true |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
2087 |
SetSoundMask(sndMissed, false) |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
2088 |
else |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
2089 |
CS.AFRICAN_SPECIAL_NON_PROJECTILE_USED=true |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
2090 |
SetSoundMask(sndMissed, false) |
7893 | 2091 |
end |
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
2092 |
--north american special |
7893 | 2093 |
elseif(GetGearType(gearUid)==gtSniperRifleShot) |
2094 |
then |
|
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
2095 |
CS.NORTH_AMERICAN_SPECIAL_SNIPER_IS_ON=true |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
2096 |
if(CS.NORTH_AMERICAN_SPECIAL_SNIPER~=1) |
7893 | 2097 |
then |
2098 |
SetHealth(gearUid, 1) |
|
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
2099 |
SetGearValues(gearUid, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 0) |
7893 | 2100 |
end |
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
2101 |
--north american special |
7893 | 2102 |
elseif(GetGearType(gearUid)==gtShotgunShot) |
2103 |
then |
|
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
2104 |
if(CS.NORTH_AMERICAN_SPECIAL_SHOTGUN==true) |
7893 | 2105 |
then |
2106 |
AddVisualGear(GetX(gearUid), GetY(gearUid), vgtFeather, 0, false) |
|
2107 |
AddVisualGear(GetX(gearUid), GetY(gearUid), vgtFeather, 0, false) |
|
2108 |
AddVisualGear(GetX(gearUid), GetY(gearUid), vgtFeather, 0, false) |
|
2109 |
PlaySound(sndBirdyLay) |
|
2110 |
end |
|
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
2111 |
--european special |
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
2112 |
elseif(GetGearType(gearUid)==gtMolotov and CS.EUROPE_SPECIAL==1) |
7893 | 2113 |
then |
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
2114 |
local vx,vy=GetGearVelocity(gearUid) |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
2115 |
local e_health=FireGear(CurrentHedgehog,gtCluster, vx, vy, 1) |
7893 | 2116 |
SetGearMessage(e_health, 2) |
2117 |
DeleteGear(gearUid) |
|
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
2118 |
--australian specials |
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
2119 |
elseif(GetGearType(gearUid)==gtShover and CS.AUSTRALIAN_SPECIAL~=0) |
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
2120 |
then |
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
2121 |
CS.TEMP_VALUE=0 |
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
2122 |
runOnGears(AustraliaSpecialCheckHogs) |
10965 | 2123 |
|
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
2124 |
if(CS.TEMP_VALUE==0) |
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
2125 |
then |
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
2126 |
local vx,vy=GetGearVelocity(gearUid) |
10965 | 2127 |
|
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
2128 |
if(CS.AUSTRALIAN_SPECIAL==1) |
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
2129 |
then |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
2130 |
local austmine=FireGear(CurrentHedgehog,gtMine, vx, vy, 0) |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
2131 |
SetHealth(austmine, 100) |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
2132 |
SetTimer(austmine, 1000) |
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
2133 |
PlaySound(sndLaugh, CurrentHedgehog) |
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
2134 |
else |
13364 | 2135 |
local austmine=FireGear(CurrentHedgehog,gtBall, vx, vy, 1) |
2136 |
SetTimer(austmine, 1000) |
|
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
2137 |
SetGearMessage(austmine, 3) |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
2138 |
end |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
2139 |
else |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
2140 |
PlaySound(sndDenied) |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
2141 |
end |
7893 | 2142 |
elseif(GetGearType(gearUid)==gtParachute) |
2143 |
then |
|
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
2144 |
CS.PARACHUTE_IS_ON=1 |
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
2145 |
elseif(GetGearType(gearUid)==gtSwitcher) |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
2146 |
then |
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
2147 |
CS.SWITCH_HOG_IS_ON=true |
7893 | 2148 |
end |
2149 |
end |
|
2150 |
||
13364 | 2151 |
function onGearDamage(gearUid, damage) |
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
2152 |
if(gearUid==CurrentHedgehog and CS.SABOTAGE_HOGS[CurrentHedgehog]==1) |
13364 | 2153 |
then |
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
2154 |
CS.SABOTAGE_HOGS[CurrentHedgehog]=0 |
13364 | 2155 |
end |
2156 |
end |
|
2157 |
||
7893 | 2158 |
function onGearDelete(gearUid) |
2159 |
||
10965 | 2160 |
if(GetGearType(gearUid) == gtHedgehog or GetGearType(gearUid) == gtMine or GetGearType(gearUid) == gtExplosives) |
7895
ac1610a7b7fa
apparently an older version was provided earlier and this one is newer and theoretically desync free. untested.
Vatten
parents:
7893
diff
changeset
|
2161 |
then |
13364 | 2162 |
--sundaland special |
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
2163 |
if(GetGearType(gearUid) == gtHedgehog and CS.TEAM_CONTINENT[CS.SUNDALAND_END_HOG_CONTINENT_NAME]==10) |
13364 | 2164 |
then |
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
2165 |
local currvalue=getTeamValue(CS.SUNDALAND_END_HOG_CONTINENT_NAME, "sundaland-count") |
10965 | 2166 |
|
13364 | 2167 |
if(currvalue==nil) |
9805 | 2168 |
then |
13364 | 2169 |
currvalue=0 |
9805 | 2170 |
end |
10965 | 2171 |
|
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
2172 |
setTeamValue(CS.SUNDALAND_END_HOG_CONTINENT_NAME, "sundaland-count", currvalue+1) |
9805 | 2173 |
end |
13364 | 2174 |
|
2175 |
trackDeletion(gearUid) |
|
2176 |
end |
|
2177 |
||
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
2178 |
--if picking up a health crate, heal sabotage |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
2179 |
if(CS.SABOTAGE_HOGS[CurrentHedgehog]~=0 and GetGearType(gearUid) == gtCase and GetGearPos(gearUid)==2 and band(GetGearMessage(gearUid), gmDestroy) ~= 0) |
13364 | 2180 |
then |
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
2181 |
CS.SABOTAGE_HOGS[CurrentHedgehog]=0 |
7895
ac1610a7b7fa
apparently an older version was provided earlier and this one is newer and theoretically desync free. untested.
Vatten
parents:
7893
diff
changeset
|
2182 |
end |
10965 | 2183 |
|
8618 | 2184 |
--north american lipstick |
7893 | 2185 |
if(GetGearType(gearUid)==gtSniperRifleShot ) |
2186 |
then |
|
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
2187 |
CS.NORTH_AMERICAN_SPECIAL_SNIPER_IS_ON=false |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
2188 |
if(CS.NORTH_AMERICAN_SPECIAL_SNIPER==2) |
7893 | 2189 |
then |
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
2190 |
CS.TEMP_VALUE=gearUid |
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
2191 |
runOnGears(NorthAmericaSpecialSniper) |
7893 | 2192 |
end |
8618 | 2193 |
--north american eagle eye |
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
2194 |
elseif(GetGearType(gearUid)==gtShotgunShot and CS.NORTH_AMERICAN_SPECIAL_SHOTGUN==true) |
7893 | 2195 |
then |
2196 |
SetGearPosition(CurrentHedgehog, GetX(gearUid), GetY(gearUid)+7) |
|
2197 |
PlaySound(sndWarp) |
|
2198 |
--south american special |
|
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
2199 |
elseif(GetGearType(gearUid)==gtGasBomb and CS.SOUTH_AMERICAN_SPECIAL == true) |
7893 | 2200 |
then |
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
2201 |
if band(GetState(gearUid), gstDrowning) == 0 then |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
2202 |
CS.TEMP_VALUE=gearUid |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
2203 |
runOnGears(SouthAmericaSpecialCheeseExplosion) |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
2204 |
AddVisualGear(GetX(gearUid), GetY(gearUid), vgtExplosion, 0, false) |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
2205 |
end |
10965 | 2206 |
|
8618 | 2207 |
--asian special |
7893 | 2208 |
elseif(GetGearType(gearUid)==gtSnowball and GetGearMessage(gearUid)==1) |
2209 |
then |
|
8618 | 2210 |
AddGear(GetX(gearUid), GetY(gearUid), gtCluster, 0, 0, 0, 22) |
10965 | 2211 |
|
8618 | 2212 |
--europe special |
7893 | 2213 |
elseif(GetGearType(gearUid)==gtCluster and GetGearMessage(gearUid)==2) |
2214 |
then |
|
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
2215 |
if band(GetState(gearUid), gstDrowning) == 0 then |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
2216 |
CS.TEMP_VALUE=gearUid |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
2217 |
runOnGears(EuropeSpecialMolotovHit) |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
2218 |
VisualExplosion(100,GetX(gearUid), GetY(gearUid),vgtSmokeWhite,vgtSmokeWhite) |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
2219 |
AddVisualGear(GetX(gearUid), GetY(gearUid), vgtExplosion, 0, false) |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
2220 |
PlaySound(sndGraveImpact) |
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
2221 |
end |
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
2222 |
--australian special |
13364 | 2223 |
elseif(GetGearType(gearUid)==gtBall and GetGearMessage(gearUid)==3) |
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
2224 |
then |
13369
f609c5cd8286
Continental supplies: Bouncy boomerang does not spawn crate when drowning
Wuzzy <Wuzzy2@mail.ru>
parents:
13368
diff
changeset
|
2225 |
if band(GetState(gearUid), gstDrowning) == 0 then |
f609c5cd8286
Continental supplies: Bouncy boomerang does not spawn crate when drowning
Wuzzy <Wuzzy2@mail.ru>
parents:
13368
diff
changeset
|
2226 |
SpawnRandomCrate(GetX(gearUid), GetY(gearUid)) |
f609c5cd8286
Continental supplies: Bouncy boomerang does not spawn crate when drowning
Wuzzy <Wuzzy2@mail.ru>
parents:
13368
diff
changeset
|
2227 |
end |
13364 | 2228 |
|
8618 | 2229 |
--asia (using para) |
7893 | 2230 |
elseif(GetGearType(gearUid)==gtParachute) |
2231 |
then |
|
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
2232 |
CS.PARACHUTE_IS_ON=false |
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
2233 |
elseif(GetGearType(gearUid)==gtSwitcher) |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
2234 |
then |
13365
e27540ad33bd
Massive Continental supplies update
Wuzzy <Wuzzy2@mail.ru>
parents:
13364
diff
changeset
|
2235 |
CS.SWITCH_HOG_IS_ON=false |
7893 | 2236 |
end |
7936 | 2237 |
end |
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
2238 |