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