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