author | Wuzzy <Wuzzy2@mail.ru> |
Fri, 09 Feb 2018 14:33:00 +0100 | |
changeset 12940 | 39b7b3ed619e |
parent 12901 | bdf8e80a97b8 |
child 13359 | 7d772358dc22 |
permissions | -rw-r--r-- |
7893 | 1 |
--[[ |
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
2 |
version 1.3n |
10965 | 3 |
|
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
4 |
The expat (MIT) license |
7893 | 5 |
|
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
6 |
Copyright (C) 2012 Vatten |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
7 |
|
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
8 |
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
|
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 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
|
11 |
|
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
12 |
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 | 13 |
]] |
14 |
||
8043 | 15 |
HedgewarsScriptLoad("/Scripts/Locale.lua") |
16 |
HedgewarsScriptLoad("/Scripts/Utils.lua") |
|
17 |
HedgewarsScriptLoad("/Scripts/Tracker.lua") |
|
7893 | 18 |
|
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
19 |
--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
|
20 |
function IntegerSqrt(num) |
8618 | 21 |
local temp=num |
7893 | 22 |
while(temp*temp-div(temp,2)>num) |
23 |
do |
|
24 |
temp=div((temp+div(num,temp)),2) |
|
25 |
end |
|
10965 | 26 |
|
7893 | 27 |
return math.abs(temp) |
28 |
end |
|
29 |
||
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
30 |
-- 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
|
31 |
function Norm(xx,yy) |
8618 | 32 |
--to fix overflows |
33 |
if(((math.abs(xx)^2)+(math.abs(yy)^2))>2^26) |
|
34 |
then |
|
35 |
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
|
36 |
return IntegerSqrt((div(math.abs(xx),bitr)^2)+(div(math.abs(yy),bitr)^2))*bitr |
8618 | 37 |
else |
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
38 |
return IntegerSqrt((math.abs(xx)^2)+(math.abs(yy)^2)) |
8618 | 39 |
end |
7893 | 40 |
end |
41 |
||
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
42 |
-- 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
|
43 |
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
|
44 |
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
|
45 |
then |
ac1610a7b7fa
apparently an older version was provided earlier and this one is newer and theoretically desync free. untested.
Vatten
parents:
7893
diff
changeset
|
46 |
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
|
47 |
else |
ac1610a7b7fa
apparently an older version was provided earlier and this one is newer and theoretically desync free. untested.
Vatten
parents:
7893
diff
changeset
|
48 |
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
|
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 |
end |
ac1610a7b7fa
apparently an older version was provided earlier and this one is newer and theoretically desync free. untested.
Vatten
parents:
7893
diff
changeset
|
51 |
|
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
52 |
--Will end the turn + give escape time |
10527 | 53 |
function EndTurn() |
9805 | 54 |
SetState(CurrentHedgehog,bor(GetState(CurrentHedgehog),gstAttacked)) |
10527 | 55 |
--3 sec espace time |
56 |
TurnTimeLeft = GetAwayTime*10*3 |
|
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
57 |
end |
10965 | 58 |
|
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
59 |
--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
|
60 |
function ShowDamageTag(hog,damage) |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
61 |
healthtag=AddVisualGear(GetX(hog), GetY(hog), vgtHealthTag, damage, false) |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
62 |
v1, v2, v3, v4, v5, v6, v7, v8, v9, v10 = GetVisualGearValues(healthtag) |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
63 |
SetVisualGearValues(healthtag, v1, v2, v3, v4, v5, v6, v7, v8, v9, GetClanColor(GetHogClan(hog))) |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
64 |
end |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
65 |
|
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
66 |
--will use IntegerSqrt |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
67 |
function FireGear(hedgehog,geartype,vx,vy,timer) |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
68 |
local hypo=Norm(vx,vy) |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
69 |
return AddGear(div((GetGearRadius(hedgehog)*2*vx),hypo)+GetX(hedgehog), div((GetGearRadius(hedgehog)*2*vy),hypo)+GetY(hedgehog), geartype, 0, vx, vy, timer) |
10527 | 70 |
end |
9805 | 71 |
|
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
72 |
--This function will set the gravity on a scale from 0->100, where 50 is the standard one. |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
73 |
function SetGravityFromScale(grav) |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
74 |
if(grav>100) |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
75 |
then |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
76 |
grav=100 |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
77 |
elseif(grav<0) |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
78 |
then |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
79 |
grav=0 |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
80 |
end |
10965 | 81 |
|
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
82 |
if(grav>50) |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
83 |
then |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
84 |
SetGravity(100+((grav-50)*12)) |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
85 |
else |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
86 |
SetGravity(25+grav+div(grav,2)) |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
87 |
end |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
88 |
end |
9805 | 89 |
|
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
90 |
--====MISC GLOBALS==== |
10965 | 91 |
|
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
92 |
--for selecting continent |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
93 |
local GLOBAL_INIT_TEAMS = {} |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
94 |
local GLOBAL_SELECT_CONTINENT_CHECK=false |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
95 |
local GLOBAL_TEAM_CONTINENT = {} |
7893 | 96 |
|
8618 | 97 |
--variables for seeing if you have swaped around on a weapon |
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
98 |
local GLOBAL_AUSTRALIAN_SPECIAL=0 |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
99 |
local GLOBAL_AFRICAN_SPECIAL_SEDUCTION=0 |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
100 |
local GLOBAL_AFRICAN_SPECIAL_STICKY=0 |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
101 |
local GLOBAL_SOUTH_AMERICAN_SPECIAL=false |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
102 |
local GLOBAL_NORTH_AMERICAN_SPECIAL_SNIPER=1 |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
103 |
local GLOBAL_NORTH_AMERICAN_SPECIAL_SNIPER_IS_ON=false |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
104 |
local GLOBAL_KERGUELEN_SPECIAL=1 |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
105 |
local GLOBAL_NORTH_AMERICAN_SPECIAL_SHOTGUN=false |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
106 |
local GLOBAL_EUROPE_SPECIAL=0 |
7893 | 107 |
|
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
108 |
--detection if something is activated |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
109 |
local GLOBAL_SWITCH_HOG_IS_ON=false |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
110 |
local GLOBAL_VAMPIRIC_IS_ON=0 |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
111 |
local GLOBAL_EXTRA_DAMAGE_IS_ON=100 |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
112 |
local GLOBAL_PARACHUTE_IS_ON=false |
7893 | 113 |
|
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
114 |
--the visual circle for kerguelen |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
115 |
local GLOBAL_VISUAL_CIRCLE=nil |
8618 | 116 |
|
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
117 |
--the global temp value |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
118 |
local GLOBAL_TEMP_VALUE=0 |
7893 | 119 |
|
8618 | 120 |
--for sabotage |
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
121 |
local GLOBAL_SABOTAGE_COUNTER=0 |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
122 |
local GLOBAL_SABOTAGE_HOGS={} |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
123 |
local GLOBAL_SABOTAGE_FREQUENCY=0 |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
124 |
local GLOBAL_SABOTAGE_GRAVITY_SWITCH=true |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
125 |
|
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
126 |
--for sundaland |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
127 |
local GLOBAL_SUNDALAND_END_HOG=0 |
7893 | 128 |
|
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
129 |
--====GENERAL GLOBALS (useful for handling continents)==== |
7893 | 130 |
|
12901
bdf8e80a97b8
Fix some minor formatting and grammar flaws in script strings
Wuzzy <Wuzzy2@mail.ru>
parents:
12900
diff
changeset
|
131 |
local GLOBAL_GENERAL_INFORMATION="- "..loc("Per team weapons").."|- "..loc("10 weapon schemes").."|- "..loc("Unique new weapons").."| |"..loc("Select your continent/weaponset: With the \"Up\" or \"Down\" keys. You can also select one with the weapons menu.").."|"..string.format(loc("Note: Some weapons have a second option (See continent information). Find and use them with the \"%s\" key."), loc("switch")).."|"..loc("Tip: See the \"Esc\" key (this menu) if you want to see the currently playing teams continent, or that continents specials.") |
8618 | 132 |
|
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
133 |
local GLOBAL_SHOW_SMALL_INFO=0 |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
134 |
|
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
135 |
local GLOBAL_WEAPON_TEXTS = { |
9805 | 136 |
loc("Green lipstick bullet: [Poisonous, deals no damage]"), |
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
137 |
loc("Cluck-cluck time: [Fire an egg ~ Sabotages and cures poison ~ Cannot be fired close to another hog]"), |
9805 | 138 |
loc("Anno 1032: [The explosion will make a strong push ~ Wide range, wont affect hogs close to the target]"), |
8618 | 139 |
loc("Dust storm: [Deals 15 damage to all enemies in the circle]"), |
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
140 |
loc("Cricket time: [Fire away a 1 sec mine! ~ Cannot be fired close to another hog]"), |
9805 | 141 |
loc("Drop a bomb: [Drop some heroic wind that will turn into a bomb on impact]"), |
12900
a9e4e8fa852c
Fix various typos in translatable strings
Wuzzy <Wuzzy2@mail.ru>
parents:
12411
diff
changeset
|
142 |
loc("Penguin roar: [Deal 15 damage + 10% of your hog’s health to all hogs around you and get 2/3 back]"), |
7893 | 143 |
loc("Disguise as a Rockhopper Penguin: [Swap place with a random enemy hog in the circle]"), |
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
144 |
nil, |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
145 |
loc("Lonely Cries: [Rise the water if no hog is in the circle and deal 6 damage to all enemy hogs.]"), |
9805 | 146 |
loc("Hedgehog projectile: [Fire your hog like a Sticky Bomb]"), |
7893 | 147 |
loc("Napalm rocket: [Fire a bomb with napalm!]"), |
9805 | 148 |
loc("Eagle Eye: [Blink to the impact ~ One shot]"), |
7893 | 149 |
loc("Medicine: [Fire some exploding medicine that will heal all hogs effected by the explosion]"), |
9805 | 150 |
loc("Sabotage/Flare: [Sabotage all hogs in the circle and deal ~1 dmg OR Fire a cluster up into the air]") |
7893 | 151 |
} |
152 |
||
10965 | 153 |
local GLOBAL_CONTINENT_INFORMATION = |
7893 | 154 |
{ |
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
155 |
{loc("North America"),"["..loc("Difficulty: ")..loc("EASY").."] "..loc("Area")..": 24,709,000 km2, "..loc("Population")..": 529,000,000",loc("- You can switch between hogs at the start of your turns. (Not first one)").."|"..loc("Special Weapons:").."|"..loc("Shotgun")..": "..GLOBAL_WEAPON_TEXTS[13].."|"..loc("Sniper Rifle")..": "..GLOBAL_WEAPON_TEXTS[1],amSniperRifle, |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
156 |
{{amShotgun,100},{amDEagle,100},{amLaserSight,2},{amSniperRifle,100},{amCake,1},{amAirAttack,2},{amSwitch,2}}}, |
7893 | 157 |
|
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
158 |
{loc("South America"),"["..loc("Difficulty: ")..loc("MEDIUM").."] "..loc("Area")..": 17,840,000 km2, "..loc("Population")..": 387,000,000",loc("Special Weapons:").."|"..loc("GasBomb")..": "..GLOBAL_WEAPON_TEXTS[3],amGasBomb, |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
159 |
{{amBirdy,100},{amHellishBomb,1},{amBee,100},{amGasBomb,100},{amFlamethrower,100},{amNapalm,1},{amExtraDamage,2}}}, |
7893 | 160 |
|
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
161 |
{loc("Europe"),"["..loc("Difficulty: ")..loc("EASY").."] "..loc("Area")..": 10,180,000 km2, "..loc("Population")..": 740,000,000",loc("Special Weapons:").."|"..loc("Molotov")..": "..GLOBAL_WEAPON_TEXTS[14],amBazooka, |
9805 | 162 |
{{amBazooka,100},{amGrenade,100},{amMortar,100},{amMolotov,100},{amVampiric,3},{amPiano,1},{amResurrector,2},{amJetpack,4}}}, |
7893 | 163 |
|
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
164 |
{loc("Africa"),"["..loc("Difficulty: ")..loc("MEDIUM").."] "..loc("Area")..": 30,222,000 km2, "..loc("Population")..": 1,033,000,000",loc("Special Weapons:").."|"..loc("Seduction")..": "..GLOBAL_WEAPON_TEXTS[4].."|"..loc("Sticky Mine")..": "..GLOBAL_WEAPON_TEXTS[11].."|"..loc("Sticky Mine")..": "..GLOBAL_WEAPON_TEXTS[12],amSMine, |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
165 |
{{amSMine,100},{amWatermelon,1},{amDrillStrike,1},{amDrill,100},{amInvulnerable,5},{amSeduction,100},{amLandGun,2}}}, |
9805 | 166 |
|
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
167 |
{loc("Asia"),"["..loc("Difficulty: ")..loc("MEDIUM").."] "..loc("Area")..": 44,579,000 km2, "..loc("Population")..": 3,880,000,000",loc("- Will give you a parachute every second turn.").."|"..loc("Special Weapons:").."|"..loc("Parachute")..": "..GLOBAL_WEAPON_TEXTS[6],amRope, |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
168 |
{{amRope,100},{amFirePunch,100},{amParachute,2},{amKnife,2},{amDynamite,1}}}, |
7893 | 169 |
|
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
170 |
{loc("Australia"),"["..loc("Difficulty: ")..loc("EASY").."] "..loc("Area")..": 8,468,000 km2, "..loc("Population")..": 31,000,000",loc("Special Weapons:").."|"..loc("Baseballbat")..": "..GLOBAL_WEAPON_TEXTS[5].."|"..loc("Baseballbat")..": "..GLOBAL_WEAPON_TEXTS[2],amBaseballBat, |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
171 |
{{amBaseballBat,100},{amMine,100},{amLowGravity,4},{amBlowTorch,100},{amRCPlane,2},{amTeleport,2},{amRubber,2}}}, |
7893 | 172 |
|
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
173 |
{loc("Antarctica"),"["..loc("Difficulty: ")..loc("HARD").."] "..loc("Area")..": 14,000,000 km2, "..loc("Population")..": ~1,000",loc("Antarctic summer: - Will give you one girder/mudball and two sineguns/portals every fourth turn."),amIceGun, |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
174 |
{{amSnowball,2},{amIceGun,2},{amPickHammer,100},{amSineGun,5},{amGirder,2},{amExtraTime,1},{amPortalGun,2}}}, |
7893 | 175 |
|
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
176 |
{loc("Kerguelen"),"["..loc("Difficulty: ")..loc("EASY").."] "..loc("Area")..": 1,100,000 km2, "..loc("Population")..": ~100",loc("Special Weapons:").."|"..loc("Hammer")..": "..GLOBAL_WEAPON_TEXTS[7].."|"..loc("Hammer")..": "..GLOBAL_WEAPON_TEXTS[8].." ("..loc("Duration")..": 2)|"..loc("Hammer")..": "..GLOBAL_WEAPON_TEXTS[10].."|"..loc("Hammer")..": "..GLOBAL_WEAPON_TEXTS[15],amHammer, |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
177 |
{{amHammer,100},{amMineStrike,1},{amBallgun,1}}}, |
7893 | 178 |
|
12900
a9e4e8fa852c
Fix various typos in translatable strings
Wuzzy <Wuzzy2@mail.ru>
parents:
12411
diff
changeset
|
179 |
{loc("Zealandia"),"["..loc("Difficulty: ")..loc("MEDIUM").."] "..loc("Area")..": 3,500,000 km2, "..loc("Population")..": 5,000,000",loc("- Will get 1-3 random weapons") .. "|" .. loc("- Massive weapon bonus on first turn"),amInvulnerable, |
9805 | 180 |
{{amBazooka,1},{amGrenade,1},{amBlowTorch,1},{amSwitch,100},{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}}}, |
7893 | 181 |
|
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
182 |
{loc("Sundaland"),"["..loc("Difficulty: ")..loc("HARD").."] "..loc("Area")..": 1,850,000 km2, "..loc("Population")..": 290,000,000",loc("- You will recieve 2-4 weapons on each kill! (Even on own hogs)"),amTardis, |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
183 |
{{amClusterBomb,4},{amTardis,4},{amWhip,100},{amKamikaze,4}}} |
9805 | 184 |
|
7893 | 185 |
} |
186 |
||
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
187 |
local GLOBAL_CONTINENT_SOUNDS= |
8618 | 188 |
{ |
9805 | 189 |
{sndShotgunFire,sndCover}, |
190 |
{sndEggBreak,sndLaugh}, |
|
191 |
{sndExplosion,sndEnemyDown}, |
|
192 |
{sndMelonImpact,sndCoward}, |
|
193 |
{sndRopeAttach,sndComeonthen}, |
|
194 |
{sndBaseballBat,sndNooo}, |
|
195 |
{sndSineGun,sndOops}, |
|
196 |
{sndPiano5,sndStupid}, |
|
197 |
{sndSplash,sndFirstBlood}, |
|
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
198 |
{sndWarp,sndSameTeam}, |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
199 |
{sndFrozenHogImpact,sndUhOh} |
8618 | 200 |
} |
201 |
||
7893 | 202 |
--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) |
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
203 |
local GLOBAL_WEAPONS_DAMAGE = { |
7893 | 204 |
{amKamikaze, 0, 1, 0, 1, 0}, |
205 |
{amSineGun, 0, 1, 0, 1, 1}, |
|
206 |
{amBazooka, 0, 1, 0, 1, 0}, |
|
207 |
{amMineStrike, 0, 1, 5, 1, 2}, |
|
208 |
{amGrenade, 0, 1, 0, 1, 0}, |
|
9805 | 209 |
{amPiano, 0, 1, 5, 1, 0}, |
7893 | 210 |
{amClusterBomb, 0, 1, 0, 1, 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
|
211 |
{amBee, 0, 1, 0, 1, 0}, |
7893 | 212 |
{amShotgun, 0, 0, 0, 1, 1}, |
213 |
{amMine, 0, 1, 0, 1, 0}, |
|
214 |
{amSniperRifle, 0, 1, 0, 1, 1}, |
|
215 |
{amDEagle, 0, 1, 0, 1, 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
|
216 |
{amDynamite, 0, 1, 5, 1, 1}, |
7893 | 217 |
{amFirePunch, 0, 1, 0, 1, 0}, |
218 |
{amHellishBomb, 0, 1, 5, 1, 2}, |
|
219 |
{amWhip, 0, 1, 0, 1, 0}, |
|
220 |
{amNapalm, 0, 1, 5, 1, 2}, |
|
221 |
{amPickHammer, 0, 1, 0, 1, 0}, |
|
222 |
{amBaseballBat, 0, 1, 0, 1, 1}, |
|
223 |
{amMortar, 0, 1, 0, 1, 0}, |
|
224 |
{amCake, 0, 1, 4, 1, 2}, |
|
225 |
{amSeduction, 0, 0, 0, 1, 0}, |
|
226 |
{amWatermelon, 0, 1, 5, 1, 2}, |
|
227 |
{amDrill, 0, 1, 0, 1, 0}, |
|
228 |
{amBallgun, 0, 1, 5, 1, 2}, |
|
229 |
{amMolotov, 0, 1, 0, 1, 0}, |
|
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
230 |
{amHammer, 0, 1, 0, 1, 2}, |
9805 | 231 |
{amBirdy, 0, 1, 0, 1, 0}, |
7893 | 232 |
{amBlowTorch, 0, 1, 0, 1, 0}, |
233 |
{amRCPlane, 0, 1, 5, 1, 2}, |
|
234 |
{amGasBomb, 0, 0, 0, 1, 0}, |
|
235 |
{amAirAttack, 0, 1, 4, 1, 1}, |
|
236 |
{amFlamethrower, 0, 1, 0, 1, 0}, |
|
237 |
{amSMine, 0, 1, 0, 1, 1}, |
|
238 |
{amDrillStrike, 0, 1, 4, 1, 2}, |
|
8618 | 239 |
{amSnowball, 0, 1, 0, 1, 0} |
7893 | 240 |
} |
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
241 |
local GLOBAL_WEAPONS_SUPPORT = { |
7893 | 242 |
{amParachute, 0, 1, 0, 1, 0}, |
243 |
{amGirder, 0, 1, 0, 1, 0}, |
|
244 |
{amSwitch, 0, 1, 0, 1, 0}, |
|
245 |
{amLowGravity, 0, 1, 0, 1, 0}, |
|
246 |
{amExtraDamage, 0, 1, 2, 1, 0}, |
|
247 |
{amRope, 0, 1, 0, 1, 1}, |
|
248 |
{amInvulnerable, 0, 1, 0, 1, 0}, |
|
249 |
{amExtraTime, 0, 1, 0, 1, 0}, |
|
250 |
{amLaserSight, 0, 1, 0, 1, 0}, |
|
251 |
{amVampiric, 0, 1, 0, 1, 0}, |
|
252 |
{amJetpack, 0, 1, 0, 1, 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
|
253 |
{amPortalGun, 0, 1, 2, 1, 1}, |
7893 | 254 |
{amResurrector, 0, 1, 3, 1, 0}, |
255 |
{amTeleport, 0, 1, 0, 1, 0}, |
|
256 |
{amLandGun, 0, 1, 0, 1, 0}, |
|
257 |
{amTardis, 0, 1, 0, 1, 0}, |
|
258 |
{amIceGun, 0, 1, 0, 1, 0}, |
|
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
259 |
{amKnife, 0, 1, 0, 1, 0}, |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
260 |
{amRubber, 0, 1, 0, 1, 0} |
10965 | 261 |
|
7893 | 262 |
} |
8618 | 263 |
|
264 |
--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
|
265 |
function ValidateWeapon(hog,weapon,amount) |
7893 | 266 |
if(MapHasBorder() == false or (MapHasBorder() == true and weapon ~= amAirAttack and weapon ~= amMineStrike and weapon ~= amNapalm and weapon ~= amDrillStrike and weapon ~= amPiano)) |
267 |
then |
|
9805 | 268 |
if(amount==1) |
269 |
then |
|
270 |
AddAmmo(hog, weapon) |
|
271 |
else |
|
272 |
AddAmmo(hog, weapon,amount) |
|
273 |
end |
|
274 |
end |
|
275 |
end |
|
276 |
||
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
277 |
--removes one weapon |
9805 | 278 |
function RemoveWeapon(hog,weapon) |
279 |
||
280 |
if(GetAmmoCount(hog, weapon)<100) |
|
281 |
then |
|
282 |
AddAmmo(hog,weapon,GetAmmoCount(hog, weapon)-1) |
|
7893 | 283 |
end |
284 |
end |
|
285 |
||
286 |
--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
|
287 |
function CleanWeapons(hog) |
7893 | 288 |
|
289 |
local i=1 |
|
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
290 |
--+1 for skip |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
291 |
while(i<=table.maxn(GLOBAL_WEAPONS_SUPPORT)+table.maxn(GLOBAL_WEAPONS_DAMAGE)+1) |
7893 | 292 |
do |
293 |
AddAmmo(hog,i,0) |
|
294 |
i=i+1 |
|
295 |
end |
|
10965 | 296 |
|
7893 | 297 |
AddAmmo(hog,amSkip,100) |
298 |
end |
|
299 |
||
8618 | 300 |
--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
|
301 |
function LoadWeaponset(hog, num) |
10965 | 302 |
for v,w in pairs(GLOBAL_CONTINENT_INFORMATION[num][5]) |
7893 | 303 |
do |
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
304 |
ValidateWeapon(hog, w[1],w[2]) |
7893 | 305 |
end |
306 |
end |
|
307 |
||
8618 | 308 |
--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
|
309 |
function InitWeaponsMenu(hog) |
9805 | 310 |
|
311 |
if(GetHogLevel(hog)==0) |
|
312 |
then |
|
10965 | 313 |
for v,w in pairs(GLOBAL_CONTINENT_INFORMATION) |
9805 | 314 |
do |
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
315 |
ValidateWeapon(hog, GLOBAL_CONTINENT_INFORMATION[v][4],1) |
9805 | 316 |
end |
317 |
AddAmmo(hog,amSwitch) --random continent |
|
10965 | 318 |
|
9805 | 319 |
--for the computers |
320 |
else |
|
321 |
--europe |
|
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
322 |
ValidateWeapon(hog, GLOBAL_CONTINENT_INFORMATION[3][4],1) |
9805 | 323 |
--north america |
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
324 |
ValidateWeapon(hog, GLOBAL_CONTINENT_INFORMATION[1][4],1) |
7893 | 325 |
end |
326 |
end |
|
327 |
||
8618 | 328 |
--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
|
329 |
function ShowContinentInfo(continent,time,generalinf) |
8618 | 330 |
local geninftext="" |
7893 | 331 |
local ns=false |
332 |
if(time==-1) |
|
333 |
then |
|
334 |
time=0 |
|
335 |
ns=true |
|
336 |
end |
|
8618 | 337 |
if(generalinf) |
338 |
then |
|
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
339 |
geninftext="| |"..loc("General information")..": |"..GLOBAL_GENERAL_INFORMATION |
8618 | 340 |
end |
10965 | 341 |
|
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
342 |
GLOBAL_SHOW_SMALL_INFO=div(time,40) |
10965 | 343 |
|
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
344 |
ShowMission(GLOBAL_CONTINENT_INFORMATION[continent][1],GLOBAL_CONTINENT_INFORMATION[continent][2],GLOBAL_CONTINENT_INFORMATION[continent][3]..geninftext, -GLOBAL_CONTINENT_INFORMATION[continent][4], time) |
7893 | 345 |
if(ns) |
346 |
then |
|
347 |
HideMission() |
|
348 |
end |
|
349 |
end |
|
350 |
||
8618 | 351 |
--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
|
352 |
function VisualExplosion(range,xpos,ypos,gear1,gear2) |
7893 | 353 |
local degr=0 |
354 |
local lap=30 |
|
355 |
while(lap<range) |
|
356 |
do |
|
357 |
while(degr < 6.2831) |
|
358 |
do |
|
359 |
AddVisualGear(xpos+math.cos(degr+0.1)*(lap+5), ypos+math.sin(degr+0.1)*(lap+5), gear1, 0, false) |
|
360 |
if(gear2~=false) |
|
361 |
then |
|
362 |
AddVisualGear(xpos+math.cos(degr)*lap, ypos+math.sin(degr)*lap, gear2, 0, false) |
|
363 |
end |
|
364 |
degr=degr+((3.1415*3)*0.125) --1/8 = 0.125 |
|
365 |
end |
|
366 |
lap=lap+30 |
|
367 |
degr=degr-6.2831 |
|
368 |
end |
|
369 |
end |
|
370 |
||
8618 | 371 |
--zealandia (generates weapons from the weaponinfo above |
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
372 |
function ZealandiaGetWeapons(hog) |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
373 |
if(GetGearType(hog) == gtHedgehog and GLOBAL_TEAM_CONTINENT[GetHogTeamName(hog)]==9 and getTeamValue(GetHogTeamName(hog), "rand-done-turn")==nil) |
7893 | 374 |
then |
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
375 |
CleanWeapons(hog) |
10965 | 376 |
|
7895
ac1610a7b7fa
apparently an older version was provided earlier and this one is newer and theoretically desync free. untested.
Vatten
parents:
7893
diff
changeset
|
377 |
local random_weapon = 0 |
ac1610a7b7fa
apparently an older version was provided earlier and this one is newer and theoretically desync free. untested.
Vatten
parents:
7893
diff
changeset
|
378 |
local old_rand_weap = 0 |
ac1610a7b7fa
apparently an older version was provided earlier and this one is newer and theoretically desync free. untested.
Vatten
parents:
7893
diff
changeset
|
379 |
local rand_weaponset_power = 0 |
10965 | 380 |
|
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
381 |
local numberofweaponssupp=table.maxn(GLOBAL_WEAPONS_SUPPORT) |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
382 |
local numberofweaponsdmg=table.maxn(GLOBAL_WEAPONS_DAMAGE) |
10965 | 383 |
|
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
384 |
local rand1=math.abs(GetRandom(numberofweaponssupp)+1) |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
385 |
local rand2=math.abs(GetRandom(numberofweaponsdmg)+1) |
10965 | 386 |
|
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
387 |
random_weapon = math.abs(GetRandom(table.maxn(GLOBAL_WEAPONS_DAMAGE))+1) |
10965 | 388 |
|
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
389 |
while(GLOBAL_WEAPONS_DAMAGE[random_weapon][4]>TotalRounds or (MapHasBorder() == true and (GLOBAL_WEAPONS_DAMAGE[random_weapon][1]== amAirAttack or GLOBAL_WEAPONS_DAMAGE[random_weapon][1] == amMineStrike or GLOBAL_WEAPONS_DAMAGE[random_weapon][1] == amNapalm or GLOBAL_WEAPONS_DAMAGE[random_weapon][1] == amDrillStrike or GLOBAL_WEAPONS_DAMAGE[random_weapon][1] == amPiano))) |
8618 | 390 |
do |
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
391 |
if(random_weapon>=numberofweaponsdmg) |
8618 | 392 |
then |
393 |
random_weapon=0 |
|
394 |
end |
|
395 |
random_weapon = random_weapon+1 |
|
396 |
end |
|
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
397 |
ValidateWeapon(hog, GLOBAL_WEAPONS_DAMAGE[random_weapon][1],1) |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
398 |
rand_weaponset_power=GLOBAL_WEAPONS_DAMAGE[random_weapon][6] |
8618 | 399 |
old_rand_weap = random_weapon |
10965 | 400 |
|
8618 | 401 |
if(rand_weaponset_power <2) |
402 |
then |
|
403 |
random_weapon = rand1 |
|
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
404 |
while(GLOBAL_WEAPONS_SUPPORT[random_weapon][4]>TotalRounds or rand_weaponset_power+GLOBAL_WEAPONS_SUPPORT[random_weapon][6]>2) |
7893 | 405 |
do |
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
406 |
if(random_weapon>=numberofweaponssupp) |
8618 | 407 |
then |
408 |
random_weapon=0 |
|
409 |
end |
|
410 |
random_weapon = random_weapon+1 |
|
411 |
end |
|
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
412 |
ValidateWeapon(hog, GLOBAL_WEAPONS_SUPPORT[random_weapon][1],1) |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
413 |
rand_weaponset_power=rand_weaponset_power+GLOBAL_WEAPONS_SUPPORT[random_weapon][6] |
8618 | 414 |
end |
415 |
--check again if the power is enough |
|
416 |
if(rand_weaponset_power <1) |
|
417 |
then |
|
418 |
random_weapon = rand2 |
|
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
419 |
while(GLOBAL_WEAPONS_DAMAGE[random_weapon][4]>TotalRounds or old_rand_weap == random_weapon or GLOBAL_WEAPONS_DAMAGE[random_weapon][6]>0 or (MapHasBorder() == true and (GLOBAL_WEAPONS_DAMAGE[random_weapon][1]== amAirAttack or GLOBAL_WEAPONS_DAMAGE[random_weapon][1] == amMineStrike or GLOBAL_WEAPONS_DAMAGE[random_weapon][1] == amNapalm or GLOBAL_WEAPONS_DAMAGE[random_weapon][1] == amDrillStrike or GLOBAL_WEAPONS_DAMAGE[random_weapon][1] == amPiano))) |
8618 | 420 |
do |
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
421 |
if(random_weapon>=numberofweaponsdmg) |
7893 | 422 |
then |
423 |
random_weapon=0 |
|
424 |
end |
|
425 |
random_weapon = random_weapon+1 |
|
426 |
end |
|
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
427 |
ValidateWeapon(hog, GLOBAL_WEAPONS_DAMAGE[random_weapon][1],1) |
8618 | 428 |
end |
10965 | 429 |
|
8618 | 430 |
setTeamValue(GetHogTeamName(hog), "rand-done-turn", true) |
7893 | 431 |
end |
432 |
end |
|
433 |
||
9805 | 434 |
--sundaland add weps |
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
435 |
function SundalandGetWeapons(hog) |
10965 | 436 |
|
9805 | 437 |
local random_weapon = 0 |
438 |
local old_rand_weap = 0 |
|
439 |
local rand_weaponset_power = 0 |
|
10965 | 440 |
|
9805 | 441 |
local firstTurn=0 |
10965 | 442 |
|
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
443 |
local numberofweaponssupp=table.maxn(GLOBAL_WEAPONS_SUPPORT) |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
444 |
local numberofweaponsdmg=table.maxn(GLOBAL_WEAPONS_DAMAGE) |
10965 | 445 |
|
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
446 |
local rand1=GetRandom(numberofweaponssupp)+1 |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
447 |
local rand2=GetRandom(numberofweaponsdmg)+1 |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
448 |
local rand3=GetRandom(numberofweaponsdmg)+1 |
10965 | 449 |
|
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
450 |
random_weapon = GetRandom(numberofweaponsdmg)+1 |
10965 | 451 |
|
9805 | 452 |
if(TotalRounds<0) |
453 |
then |
|
454 |
firstTurn=-TotalRounds |
|
455 |
end |
|
10965 | 456 |
|
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
457 |
while(GLOBAL_WEAPONS_DAMAGE[random_weapon][4]>(TotalRounds+firstTurn) or (MapHasBorder() == true and (GLOBAL_WEAPONS_DAMAGE[random_weapon][1]== amAirAttack or GLOBAL_WEAPONS_DAMAGE[random_weapon][1] == amMineStrike or GLOBAL_WEAPONS_DAMAGE[random_weapon][1] == amNapalm or GLOBAL_WEAPONS_DAMAGE[random_weapon][1] == amDrillStrike or GLOBAL_WEAPONS_DAMAGE[random_weapon][1] == amPiano))) |
9805 | 458 |
do |
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
459 |
if(random_weapon>=numberofweaponsdmg) |
9805 | 460 |
then |
461 |
random_weapon=0 |
|
462 |
end |
|
463 |
random_weapon = random_weapon+1 |
|
464 |
end |
|
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
465 |
ValidateWeapon(hog, GLOBAL_WEAPONS_DAMAGE[random_weapon][1],1) |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
466 |
rand_weaponset_power=GLOBAL_WEAPONS_DAMAGE[random_weapon][6] |
9805 | 467 |
old_rand_weap = random_weapon |
10965 | 468 |
|
9805 | 469 |
random_weapon = rand1 |
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
470 |
while(GLOBAL_WEAPONS_SUPPORT[random_weapon][4]>(TotalRounds+firstTurn) or rand_weaponset_power+GLOBAL_WEAPONS_SUPPORT[random_weapon][6]>2) |
9805 | 471 |
do |
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
472 |
if(random_weapon>=numberofweaponssupp) |
9805 | 473 |
then |
474 |
random_weapon=0 |
|
475 |
end |
|
476 |
random_weapon = random_weapon+1 |
|
477 |
end |
|
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
478 |
ValidateWeapon(hog, GLOBAL_WEAPONS_SUPPORT[random_weapon][1],1) |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
479 |
rand_weaponset_power=rand_weaponset_power+GLOBAL_WEAPONS_SUPPORT[random_weapon][6] |
10965 | 480 |
|
9805 | 481 |
--check again if the power is enough |
482 |
if(rand_weaponset_power <2) |
|
483 |
then |
|
484 |
random_weapon = rand2 |
|
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
485 |
while(GLOBAL_WEAPONS_DAMAGE[random_weapon][4]>(TotalRounds+firstTurn) or old_rand_weap == random_weapon or GLOBAL_WEAPONS_DAMAGE[random_weapon][6]>0 or (MapHasBorder() == true and (GLOBAL_WEAPONS_DAMAGE[random_weapon][1]== amAirAttack or GLOBAL_WEAPONS_DAMAGE[random_weapon][1] == amMineStrike or GLOBAL_WEAPONS_DAMAGE[random_weapon][1] == amNapalm or GLOBAL_WEAPONS_DAMAGE[random_weapon][1] == amDrillStrike or GLOBAL_WEAPONS_DAMAGE[random_weapon][1] == amPiano))) |
9805 | 486 |
do |
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
487 |
if(random_weapon>=numberofweaponsdmg) |
9805 | 488 |
then |
489 |
random_weapon=0 |
|
490 |
end |
|
491 |
random_weapon = random_weapon+1 |
|
492 |
end |
|
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
493 |
ValidateWeapon(hog, GLOBAL_WEAPONS_DAMAGE[random_weapon][1],1) |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
494 |
rand_weaponset_power=GLOBAL_WEAPONS_DAMAGE[random_weapon][6] |
9805 | 495 |
end |
10965 | 496 |
|
9805 | 497 |
if(rand_weaponset_power <1) |
498 |
then |
|
499 |
random_weapon = rand3 |
|
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
500 |
while(GLOBAL_WEAPONS_DAMAGE[random_weapon][4]>(TotalRounds+firstTurn) or old_rand_weap == random_weapon or GLOBAL_WEAPONS_DAMAGE[random_weapon][6]>0 or (MapHasBorder() == true and (GLOBAL_WEAPONS_DAMAGE[random_weapon][1]== amAirAttack or GLOBAL_WEAPONS_DAMAGE[random_weapon][1] == amMineStrike or GLOBAL_WEAPONS_DAMAGE[random_weapon][1] == amNapalm or GLOBAL_WEAPONS_DAMAGE[random_weapon][1] == amDrillStrike or GLOBAL_WEAPONS_DAMAGE[random_weapon][1] == amPiano))) |
9805 | 501 |
do |
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
502 |
if(random_weapon>=numberofweaponsdmg) |
9805 | 503 |
then |
504 |
random_weapon=0 |
|
505 |
end |
|
506 |
random_weapon = random_weapon+1 |
|
507 |
end |
|
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
508 |
ValidateWeapon(hog, GLOBAL_WEAPONS_DAMAGE[random_weapon][1],1) |
9805 | 509 |
end |
10965 | 510 |
|
9805 | 511 |
AddVisualGear(GetX(hog), GetY(hog)-30, vgtEvilTrace,0, false) |
512 |
PlaySound(sndReinforce,hog) |
|
513 |
end |
|
514 |
||
515 |
||
8618 | 516 |
--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
|
517 |
function SetContinentWeapons() |
7893 | 518 |
|
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
519 |
CleanWeapons(CurrentHedgehog) |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
520 |
LoadWeaponset(CurrentHedgehog,GLOBAL_TEAM_CONTINENT[GetHogTeamName(CurrentHedgehog)]) |
10965 | 521 |
|
8618 | 522 |
visualstuff=AddVisualGear(GetX(CurrentHedgehog), GetY(CurrentHedgehog)-5, vgtDust,0, false) |
523 |
v1, v2, v3, v4, v5, v6, v7, v8, v9, v10 = GetVisualGearValues(visualstuff) |
|
524 |
SetVisualGearValues(visualstuff, v1, v2, v3, v4, v5, v6, v7, 2, v9, GetClanColor(GetHogClan(CurrentHedgehog))) |
|
10965 | 525 |
|
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
526 |
ShowContinentInfo(GLOBAL_TEAM_CONTINENT[GetHogTeamName(CurrentHedgehog)],3000,false) |
7893 | 527 |
end |
528 |
||
529 |
--==========================run throw all hog/gear weapons ========================== |
|
10965 | 530 |
--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
|
531 |
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
|
532 |
if(GetGearType(hog) == gtHedgehog) |
7893 | 533 |
then |
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
534 |
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
|
535 |
then |
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
536 |
GLOBAL_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
|
537 |
end |
7893 | 538 |
end |
539 |
end |
|
540 |
||
8618 | 541 |
--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
|
542 |
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
|
543 |
if(GetGearType(hog) == gtHedgehog) |
7893 | 544 |
then |
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
545 |
local dmg=div(15*GLOBAL_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
|
546 |
if(gearIsInCircle(hog,GetX(CurrentHedgehog), GetY(CurrentHedgehog), 250, false)==true and GetHogClan(hog) ~= GetHogClan(CurrentHedgehog)) |
7893 | 547 |
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
|
548 |
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
|
549 |
then |
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
550 |
GLOBAL_TEMP_VALUE=GLOBAL_TEMP_VALUE+div(dmg*GLOBAL_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
|
551 |
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
|
552 |
else |
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
553 |
GLOBAL_TEMP_VALUE=GLOBAL_TEMP_VALUE+div(GetHealth(hog)*GLOBAL_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
|
554 |
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
|
555 |
end |
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
556 |
ShowDamageTag(hog,dmg) |
7893 | 557 |
end |
558 |
end |
|
559 |
end |
|
560 |
||
10965 | 561 |
--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
|
562 |
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
|
563 |
if(GetGearType(hog) == gtHedgehog) |
7893 | 564 |
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
|
565 |
if(gearIsInCircle(hog,GetX(CurrentHedgehog), GetY(CurrentHedgehog), 120, false)==true and GetHogClan(hog) ~= GetHogClan(CurrentHedgehog)) |
7893 | 566 |
then |
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
567 |
local dmg=div((15+div(GetHealth(CurrentHedgehog)*10,100))*GLOBAL_EXTRA_DAMAGE_IS_ON,100) |
10965 | 568 |
|
9805 | 569 |
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
|
570 |
then |
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
571 |
GLOBAL_TEMP_VALUE=GLOBAL_TEMP_VALUE+div(dmg*2,3)+div(dmg*GLOBAL_VAMPIRIC_IS_ON*2,100*3) |
9805 | 572 |
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
|
573 |
else |
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
574 |
GLOBAL_TEMP_VALUE=GLOBAL_TEMP_VALUE+(div(GetHealth(hog)*75,100))+(div(GetHealth(CurrentHedgehog)*10,100))+div((GetHealth(hog)+div(GetHealth(CurrentHedgehog)*10,100))*GLOBAL_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
|
575 |
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
|
576 |
end |
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
577 |
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
|
578 |
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
|
579 |
AddVisualGear(GetX(CurrentHedgehog), GetY(CurrentHedgehog), vgtSmokeWhite, 0, false) |
7893 | 580 |
end |
581 |
end |
|
582 |
end |
|
583 |
||
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
584 |
--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
|
585 |
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
|
586 |
if(GetGearType(hog) == gtHedgehog) |
7893 | 587 |
then |
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
588 |
if(GetHogClan(hog) ~= GetHogClan(CurrentHedgehog) and gearIsInCircle(hog,GetX(CurrentHedgehog), GetY(CurrentHedgehog), 420, 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
|
589 |
then |
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
590 |
GLOBAL_TEMP_VALUE=GLOBAL_TEMP_VALUE+1 |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
591 |
end |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
592 |
end |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
593 |
end |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
594 |
--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
|
595 |
function KerguelenSpecialYellowSwap(hog) |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
596 |
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
|
597 |
then |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
598 |
if(GLOBAL_KERGUELEN_SPECIAL ~= -1 and GetHogClan(hog) ~= GetHogClan(CurrentHedgehog) and gearIsInCircle(hog,GetX(CurrentHedgehog), GetY(CurrentHedgehog), 420, false)) |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
599 |
then |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
600 |
if(GLOBAL_TEMP_VALUE==0) |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
601 |
then |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
602 |
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
|
603 |
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
|
604 |
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
|
605 |
SetGearPosition(hog, thisX, thisY) |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
606 |
GLOBAL_KERGUELEN_SPECIAL=-1 |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
607 |
else |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
608 |
GLOBAL_TEMP_VALUE=GLOBAL_TEMP_VALUE-1 |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
609 |
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
|
610 |
end |
7893 | 611 |
end |
612 |
end |
|
613 |
||
8618 | 614 |
--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
|
615 |
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
|
616 |
if(GetGearType(hog) == gtHedgehog) |
7893 | 617 |
then |
9805 | 618 |
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
|
619 |
then |
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
620 |
GLOBAL_TEMP_VALUE=1 |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
621 |
GLOBAL_SABOTAGE_HOGS[hog]=1 |
9805 | 622 |
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
|
623 |
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
|
624 |
end |
7893 | 625 |
end |
626 |
end |
|
627 |
||
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
628 |
--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
|
629 |
function KerguelenSpecialBlueCheck(hog) |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
630 |
if(GetGearType(hog) == gtHedgehog and hog ~= CurrentHedgehog and gearIsInCircle(hog,GetX(CurrentHedgehog), GetY(CurrentHedgehog), 550, false)) |
7893 | 631 |
then |
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
632 |
GLOBAL_KERGUELEN_SPECIAL=-1 |
7893 | 633 |
end |
634 |
end |
|
635 |
||
8618 | 636 |
--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
|
637 |
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
|
638 |
if(GetGearType(hog) == gtHedgehog) |
7893 | 639 |
then |
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
640 |
local dmg=div(6*GLOBAL_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
|
641 |
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
|
642 |
then |
8618 | 643 |
if(GetHealth(hog) > dmg) |
644 |
then |
|
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
645 |
GLOBAL_TEMP_VALUE=GLOBAL_TEMP_VALUE+div(dmg*GLOBAL_VAMPIRIC_IS_ON,100) |
8618 | 646 |
SetHealth(hog, GetHealth(hog)-dmg) |
647 |
else |
|
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
648 |
GLOBAL_TEMP_VALUE=GLOBAL_TEMP_VALUE+div(GetHealth(hog)*GLOBAL_VAMPIRIC_IS_ON,100) |
8618 | 649 |
SetHealth(hog, 0) |
650 |
end |
|
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
651 |
ShowDamageTag(hog,dmg) |
10965 | 652 |
|
7895
ac1610a7b7fa
apparently an older version was provided earlier and this one is newer and theoretically desync free. untested.
Vatten
parents:
7893
diff
changeset
|
653 |
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
|
654 |
end |
7893 | 655 |
end |
656 |
end |
|
657 |
||
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
658 |
--australia |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
659 |
function AustraliaSpecialEggHit(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
|
660 |
if(GetGearType(hog) == gtHedgehog) |
7893 | 661 |
then |
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
662 |
if(gearIsInCircle(hog,GetX(GLOBAL_TEMP_VALUE), GetY(GLOBAL_TEMP_VALUE), 18, false)) |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
663 |
then |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
664 |
GLOBAL_SABOTAGE_HOGS[hog]=1 |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
665 |
PlaySound(sndNooo,hog) |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
666 |
SetEffect(hog, hePoisoned, false) |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
667 |
end |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
668 |
end |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
669 |
end |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
670 |
|
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
671 |
--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
|
672 |
function SouthAmericaSpecialCheeseExplosion(hog) |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
673 |
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
|
674 |
then |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
675 |
local power_radius_outer=230 |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
676 |
local power_radius_inner=45 |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
677 |
local power_sa=500000 |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
678 |
local hypo=0 |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
679 |
if(gearIsInCircle(hog,GetX(GLOBAL_TEMP_VALUE), GetY(GLOBAL_TEMP_VALUE), power_radius_outer, false) and gearIsInCircle(hog,GetX(GLOBAL_TEMP_VALUE), GetY(GLOBAL_TEMP_VALUE), power_radius_inner, false)==false) |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
680 |
then |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
681 |
if(hog == CurrentHedgehog) |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
682 |
then |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
683 |
SetState(CurrentHedgehog, gstMoving) |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
684 |
end |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
685 |
SetGearPosition(hog, GetX(hog),GetY(hog)-3) |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
686 |
hypo=Norm(math.abs(GetX(hog)-GetX(GLOBAL_TEMP_VALUE)),math.abs(GetY(hog)-GetY(GLOBAL_TEMP_VALUE))) |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
687 |
SetGearVelocity(hog, div((power_radius_outer-hypo)*power_sa*GetIfNegative(GetX(hog)-GetX(GLOBAL_TEMP_VALUE)),power_radius_outer), div((power_radius_outer-hypo)*power_sa*GetIfNegative(GetY(hog)-GetY(GLOBAL_TEMP_VALUE)),power_radius_outer)) |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
688 |
end |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
689 |
end |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
690 |
end |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
691 |
|
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
692 |
--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
|
693 |
function NorthAmericaSpecialSniper(hog) |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
694 |
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
|
695 |
then |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
696 |
if(gearIsInCircle(GLOBAL_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
|
697 |
then |
ac1610a7b7fa
apparently an older version was provided earlier and this one is newer and theoretically desync free. untested.
Vatten
parents:
7893
diff
changeset
|
698 |
SetEffect(hog, hePoisoned, 1) |
ac1610a7b7fa
apparently an older version was provided earlier and this one is newer and theoretically desync free. untested.
Vatten
parents:
7893
diff
changeset
|
699 |
PlaySound(sndBump) |
ac1610a7b7fa
apparently an older version was provided earlier and this one is newer and theoretically desync free. untested.
Vatten
parents:
7893
diff
changeset
|
700 |
end |
7893 | 701 |
end |
702 |
end |
|
703 |
||
8618 | 704 |
--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
|
705 |
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
|
706 |
if(GetGearType(hog) == gtHedgehog) |
7893 | 707 |
then |
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
708 |
if(gearIsInCircle(GLOBAL_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
|
709 |
then |
12940
39b7b3ed619e
Add healing visual effect + heal msg in scripts
Wuzzy <Wuzzy2@mail.ru>
parents:
12901
diff
changeset
|
710 |
HealHog(hog, 25 + (div(25*GLOBAL_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
|
711 |
SetEffect(hog, hePoisoned, false) |
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
712 |
GLOBAL_SABOTAGE_HOGS[hog]=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
|
713 |
end |
7893 | 714 |
end |
715 |
end |
|
9805 | 716 |
|
717 |
--for sundaland |
|
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
718 |
function SundalandFindOtherHogInTeam(hog) |
9805 | 719 |
if(GetGearType(hog) == gtHedgehog) |
720 |
then |
|
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
721 |
if(GetHogTeamName(GLOBAL_SUNDALAND_END_HOG)==GetHogTeamName(hog)) |
9805 | 722 |
then |
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
723 |
GLOBAL_SUNDALAND_END_HOG=hog |
9805 | 724 |
end |
725 |
end |
|
726 |
end |
|
7893 | 727 |
--============================================================================ |
728 |
||
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
729 |
--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 |
11515
4dd77731453b
update some old google code links in the code/etc. thanks Wuzzy for the heads-up
sheepluva
parents:
10965
diff
changeset
|
730 |
--weapons=<ammo><types>, ammo = ascii[116(1 ammo) to 125(inf ammo)] types = ascii[36(Grenade), 37(Clusterbomb) to 90(knife)] see http://hedgewars.org/kb/AmmoTypes |
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
731 |
--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
|
732 |
function onParameters() |
10965 | 733 |
|
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
734 |
if(ScriptParam~=nil) |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
735 |
then |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
736 |
local continentinfo={} |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
737 |
local numb=0 |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
738 |
local wepcodes=0 |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
739 |
local where=0 |
10965 | 740 |
|
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
741 |
local x=0 |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
742 |
local i=1 |
10965 | 743 |
|
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
744 |
--default icon |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
745 |
continentinfo[4]=amLowGravity |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
746 |
|
10965 | 747 |
for c in ScriptParam:gmatch"." |
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
748 |
do |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
749 |
if(where==0) |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
750 |
then |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
751 |
if(string.byte(c)==126) |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
752 |
then |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
753 |
continentinfo[1]=string.sub(ScriptParam,0,numb) |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
754 |
wepcodes=numb |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
755 |
where=1 |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
756 |
end |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
757 |
elseif(where==1) |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
758 |
then |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
759 |
if(string.byte(c)==126) |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
760 |
then |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
761 |
continentinfo[2]=string.sub(ScriptParam,wepcodes+2,numb) |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
762 |
continentinfo[5]={} |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
763 |
wepcodes=numb |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
764 |
where=2 |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
765 |
end |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
766 |
elseif(where==2) |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
767 |
then |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
768 |
x=string.byte(c)-35 |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
769 |
if(x>90) |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
770 |
then |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
771 |
break |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
772 |
elseif(x>80) |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
773 |
then |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
774 |
if(x-80<10) |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
775 |
then |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
776 |
i=x-80 |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
777 |
else |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
778 |
i=100 |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
779 |
end |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
780 |
else |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
781 |
table.insert(continentinfo[5],{x,i}) |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
782 |
end |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
783 |
end |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
784 |
numb=numb+1 |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
785 |
end |
10965 | 786 |
|
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
787 |
if(continentinfo[5]~=nil and continentinfo[5][1]~=nil) |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
788 |
then |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
789 |
continentinfo[3]="- "..continentinfo[1]..loc(" was extracted from the scheme|- This continent will be able to use the specials from the other continents!") |
10965 | 790 |
|
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
791 |
table.insert(GLOBAL_CONTINENT_INFORMATION, continentinfo) |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
792 |
end |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
793 |
end |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
794 |
end |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
795 |
|
7893 | 796 |
--set each weapons settings |
797 |
function onAmmoStoreInit() |
|
798 |
||
799 |
SetAmmo(amSkip, 9, 0, 0, 0) |
|
10965 | 800 |
|
801 |
for v,w in pairs(GLOBAL_WEAPONS_DAMAGE) |
|
7893 | 802 |
do |
803 |
SetAmmo(w[1], w[2], w[3], w[4], w[5]) |
|
804 |
end |
|
10965 | 805 |
|
806 |
for v,w in pairs(GLOBAL_WEAPONS_SUPPORT) |
|
7893 | 807 |
do |
808 |
SetAmmo(w[1], w[2], w[3], w[4], w[5]) |
|
809 |
end |
|
810 |
end |
|
811 |
||
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
812 |
--on game start |
7893 | 813 |
function onGameStart() |
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
814 |
ShowMission(loc("Continental supplies"),loc("Let a continent provide your weapons!"), |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
815 |
GLOBAL_GENERAL_INFORMATION, -amLowGravity, 0) |
7893 | 816 |
end |
817 |
||
818 |
--what happen when a turn starts |
|
819 |
function onNewTurn() |
|
10965 | 820 |
|
8618 | 821 |
--will refresh the info on each tab weapon |
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
822 |
GLOBAL_AUSTRALIAN_SPECIAL=0 |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
823 |
GLOBAL_AFRICAN_SPECIAL_SEDUCTION=0 |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
824 |
GLOBAL_SOUTH_AMERICAN_SPECIAL=false |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
825 |
GLOBAL_AFRICAN_SPECIAL_STICKY=0 |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
826 |
GLOBAL_KERGUELEN_SPECIAL=1 |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
827 |
GLOBAL_NORTH_AMERICAN_SPECIAL_SNIPER=1 |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
828 |
GLOBAL_NORTH_AMERICAN_SPECIAL_SHOTGUN=false |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
829 |
GLOBAL_NORTH_AMERICAN_SPECIAL_SNIPER_IS_ON=false |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
830 |
GLOBAL_EUROPE_SPECIAL=0 |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
831 |
GLOBAL_VAMPIRIC_IS_ON=0 |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
832 |
GLOBAL_EXTRA_DAMAGE_IS_ON=100 |
10965 | 833 |
|
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
834 |
GLOBAL_TEMP_VALUE=0 |
10965 | 835 |
|
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
836 |
GLOBAL_SUNDALAND_END_HOG=CurrentHedgehog |
10965 | 837 |
|
7893 | 838 |
--when all hogs are "placed" |
839 |
if(GetCurAmmoType()~=amTeleport) |
|
840 |
then |
|
841 |
--will run once when the game really starts (after placing hogs and so on |
|
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
842 |
if(GLOBAL_INIT_TEAMS[GetHogTeamName(CurrentHedgehog)] == nil) |
7893 | 843 |
then |
844 |
AddCaption("["..loc("Select continent!").."]") |
|
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
845 |
InitWeaponsMenu(CurrentHedgehog) |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
846 |
GLOBAL_TEAM_CONTINENT[GetHogTeamName(CurrentHedgehog)]=0 |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
847 |
GLOBAL_SELECT_CONTINENT_CHECK=true |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
848 |
GLOBAL_INIT_TEAMS[GetHogTeamName(CurrentHedgehog)] = 2 |
10965 | 849 |
|
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
850 |
if(GLOBAL_SABOTAGE_HOGS[CurrentHedgehog]~=nil and GLOBAL_SABOTAGE_HOGS[CurrentHedgehog]==1) |
9805 | 851 |
then |
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
852 |
GLOBAL_SABOTAGE_COUNTER=-750 |
9805 | 853 |
end |
7893 | 854 |
else |
8618 | 855 |
--if its not the initialization turn |
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
856 |
GLOBAL_SELECT_CONTINENT_CHECK=false |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
857 |
if(GLOBAL_TEAM_CONTINENT[GetHogTeamName(CurrentHedgehog)]==0) |
7893 | 858 |
then |
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
859 |
GLOBAL_TEAM_CONTINENT[GetHogTeamName(CurrentHedgehog)]=GetRandom(table.maxn(GLOBAL_CONTINENT_INFORMATION))+1 |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
860 |
SetContinentWeapons() |
7893 | 861 |
end |
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
862 |
ShowContinentInfo(GLOBAL_TEAM_CONTINENT[GetHogTeamName(CurrentHedgehog)],-1,true) |
10965 | 863 |
|
8618 | 864 |
--give zeelandia-teams new weapons so they can plan for the next turn |
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
865 |
runOnGears(ZealandiaGetWeapons) |
10965 | 866 |
|
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
867 |
--some specials for some continents (GLOBAL_TEMP_VALUE is from get random weapons) |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
868 |
if(GLOBAL_TEAM_CONTINENT[GetHogTeamName(CurrentHedgehog)]==9) |
8618 | 869 |
then |
870 |
setTeamValue(GetHogTeamName(CurrentHedgehog), "rand-done-turn", nil) |
|
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
871 |
elseif(GLOBAL_TEAM_CONTINENT[GetHogTeamName(CurrentHedgehog)]==7) |
8618 | 872 |
then |
9805 | 873 |
if(getTeamValue(GetHogTeamName(CurrentHedgehog), "Antarctica2-turntick")==nil) |
8618 | 874 |
then |
9805 | 875 |
setTeamValue(GetHogTeamName(CurrentHedgehog), "Antarctica2-turntick", 1) |
8618 | 876 |
end |
10965 | 877 |
|
9805 | 878 |
if(getTeamValue(GetHogTeamName(CurrentHedgehog), "Antarctica2-turntick")>=4) |
8618 | 879 |
then |
880 |
AddAmmo(CurrentHedgehog,amPortalGun) |
|
9805 | 881 |
AddAmmo(CurrentHedgehog,amPortalGun) |
882 |
AddAmmo(CurrentHedgehog,amSineGun) |
|
883 |
AddAmmo(CurrentHedgehog,amSineGun) |
|
884 |
AddAmmo(CurrentHedgehog,amGirder) |
|
885 |
AddAmmo(CurrentHedgehog,amSnowball) |
|
886 |
setTeamValue(GetHogTeamName(CurrentHedgehog), "Antarctica2-turntick", 0) |
|
8618 | 887 |
end |
9805 | 888 |
setTeamValue(GetHogTeamName(CurrentHedgehog), "Antarctica2-turntick", getTeamValue(GetHogTeamName(CurrentHedgehog), "Antarctica2-turntick")+1) |
10965 | 889 |
|
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
890 |
elseif(GLOBAL_TEAM_CONTINENT[GetHogTeamName(CurrentHedgehog)]==5) |
8618 | 891 |
then |
9805 | 892 |
if(getTeamValue(GetHogTeamName(CurrentHedgehog), "Asia-turntick")==nil) |
893 |
then |
|
894 |
setTeamValue(GetHogTeamName(CurrentHedgehog), "Asia-turntick", 1) |
|
895 |
end |
|
10965 | 896 |
|
9805 | 897 |
if(getTeamValue(GetHogTeamName(CurrentHedgehog), "Asia-turntick")>=2) |
898 |
then |
|
899 |
AddAmmo(CurrentHedgehog,amParachute) |
|
900 |
setTeamValue(GetHogTeamName(CurrentHedgehog), "Asia-turntick", 0) |
|
901 |
end |
|
902 |
setTeamValue(GetHogTeamName(CurrentHedgehog), "Asia-turntick", getTeamValue(GetHogTeamName(CurrentHedgehog), "Asia-turntick")+1) |
|
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
903 |
elseif(GLOBAL_TEAM_CONTINENT[GetHogTeamName(CurrentHedgehog)]==1) |
9805 | 904 |
then |
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
905 |
AddAmmo(CurrentHedgehog,amSwitch,GetAmmoCount(CurrentHedgehog, amSwitch)+1) |
10965 | 906 |
|
12411
edeae7661dca
Lua refactor: Replace ParseCommand('setweap… with SetWeapon
Wuzzy <almikes@aol.com>
parents:
11515
diff
changeset
|
907 |
SetWeapon(amSwitch) |
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
908 |
GLOBAL_TEMP_VALUE=87 |
8618 | 909 |
end |
7893 | 910 |
end |
911 |
end |
|
912 |
end |
|
913 |
||
914 |
--what happens when you press "tab" (common button) |
|
915 |
function onSwitch() |
|
10965 | 916 |
|
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
917 |
if(GLOBAL_SWITCH_HOG_IS_ON==false) |
7893 | 918 |
then |
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
919 |
--place mine (australia) |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
920 |
if(GetCurAmmoType() == amBaseballBat) |
7893 | 921 |
then |
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
922 |
if(GLOBAL_AUSTRALIAN_SPECIAL==0) |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
923 |
then |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
924 |
GLOBAL_AUSTRALIAN_SPECIAL = 1 |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
925 |
AddCaption(GLOBAL_WEAPON_TEXTS[5]) |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
926 |
elseif(GLOBAL_AUSTRALIAN_SPECIAL==1) |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
927 |
then |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
928 |
GLOBAL_AUSTRALIAN_SPECIAL = 2 |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
929 |
AddCaption(GLOBAL_WEAPON_TEXTS[2]) |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
930 |
else |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
931 |
GLOBAL_AUSTRALIAN_SPECIAL = 0 |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
932 |
AddCaption(loc("NORMAL")) |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
933 |
end |
9805 | 934 |
|
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
935 |
--Asian special |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
936 |
elseif(GLOBAL_PARACHUTE_IS_ON==1) |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
937 |
then |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
938 |
asiabomb=AddGear(GetX(CurrentHedgehog), GetY(CurrentHedgehog)+3, gtSnowball, 0, 0, 0, 0) |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
939 |
SetGearMessage(asiabomb, 1) |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
940 |
|
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
941 |
GLOBAL_PARACHUTE_IS_ON=2 |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
942 |
GLOBAL_SELECT_CONTINENT_CHECK=false |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
943 |
|
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
944 |
--africa |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
945 |
elseif(GetCurAmmoType() == amSeduction) |
7893 | 946 |
then |
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
947 |
if(GLOBAL_AFRICAN_SPECIAL_SEDUCTION==0) |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
948 |
then |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
949 |
GLOBAL_AFRICAN_SPECIAL_SEDUCTION = 1 |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
950 |
AddCaption(GLOBAL_WEAPON_TEXTS[4]) |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
951 |
else |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
952 |
GLOBAL_AFRICAN_SPECIAL_SEDUCTION = 0 |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
953 |
AddCaption(loc("NORMAL")) |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
954 |
end |
9805 | 955 |
|
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
956 |
--south america |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
957 |
elseif(GetCurAmmoType() == amGasBomb) |
7893 | 958 |
then |
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
959 |
if(GLOBAL_SOUTH_AMERICAN_SPECIAL==false) |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
960 |
then |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
961 |
GLOBAL_SOUTH_AMERICAN_SPECIAL = true |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
962 |
AddCaption(GLOBAL_WEAPON_TEXTS[3]) |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
963 |
else |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
964 |
GLOBAL_SOUTH_AMERICAN_SPECIAL = false |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
965 |
AddCaption(loc("NORMAL")) |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
966 |
end |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
967 |
|
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
968 |
--africa |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
969 |
elseif(GetCurAmmoType() == amSMine) |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
970 |
then |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
971 |
if(GLOBAL_AFRICAN_SPECIAL_STICKY==0) |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
972 |
then |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
973 |
GLOBAL_AFRICAN_SPECIAL_STICKY = 1 |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
974 |
AddCaption(GLOBAL_WEAPON_TEXTS[11]) |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
975 |
elseif(GLOBAL_AFRICAN_SPECIAL_STICKY == 1) |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
976 |
then |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
977 |
GLOBAL_AFRICAN_SPECIAL_STICKY = 2 |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
978 |
AddCaption(GLOBAL_WEAPON_TEXTS[12]) |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
979 |
elseif(GLOBAL_AFRICAN_SPECIAL_STICKY == 2) |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
980 |
then |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
981 |
GLOBAL_AFRICAN_SPECIAL_STICKY = 0 |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
982 |
AddCaption(loc("NORMAL")) |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
983 |
end |
9805 | 984 |
|
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
985 |
--north america (sniper) |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
986 |
elseif(GetCurAmmoType() == amSniperRifle and GLOBAL_NORTH_AMERICAN_SPECIAL_SNIPER_IS_ON==false) |
7893 | 987 |
then |
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
988 |
if(GLOBAL_NORTH_AMERICAN_SPECIAL_SNIPER==2) |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
989 |
then |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
990 |
GLOBAL_NORTH_AMERICAN_SPECIAL_SNIPER = 1 |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
991 |
AddCaption(loc("NORMAL")) |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
992 |
elseif(GLOBAL_NORTH_AMERICAN_SPECIAL_SNIPER==1) |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
993 |
then |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
994 |
GLOBAL_NORTH_AMERICAN_SPECIAL_SNIPER = 2 |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
995 |
AddCaption(GLOBAL_WEAPON_TEXTS[1]) |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
996 |
end |
9805 | 997 |
|
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
998 |
--north america (shotgun) |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
999 |
elseif(GetCurAmmoType() == amShotgun and GLOBAL_NORTH_AMERICAN_SPECIAL_SHOTGUN~=nil) |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1000 |
then |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1001 |
if(GLOBAL_NORTH_AMERICAN_SPECIAL_SHOTGUN==false) |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1002 |
then |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1003 |
GLOBAL_NORTH_AMERICAN_SPECIAL_SHOTGUN = true |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1004 |
AddCaption(GLOBAL_WEAPON_TEXTS[13]) |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1005 |
else |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1006 |
GLOBAL_NORTH_AMERICAN_SPECIAL_SHOTGUN = false |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1007 |
AddCaption(loc("NORMAL")) |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1008 |
end |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1009 |
|
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1010 |
--europe |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1011 |
elseif(GetCurAmmoType() == amMolotov) |
7893 | 1012 |
then |
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1013 |
if(GLOBAL_EUROPE_SPECIAL==0) |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1014 |
then |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1015 |
GLOBAL_EUROPE_SPECIAL = 1 |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1016 |
AddCaption(GLOBAL_WEAPON_TEXTS[14]) |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1017 |
else |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1018 |
GLOBAL_EUROPE_SPECIAL = 0 |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1019 |
AddCaption(loc("NORMAL")) |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1020 |
end |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1021 |
|
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1022 |
--kerguelen |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1023 |
elseif(GetCurAmmoType() == amHammer) |
7893 | 1024 |
then |
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1025 |
if(GLOBAL_KERGUELEN_SPECIAL==6) |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1026 |
then |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1027 |
GLOBAL_KERGUELEN_SPECIAL = 1 |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1028 |
AddCaption("Normal") |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1029 |
elseif(GLOBAL_KERGUELEN_SPECIAL==1) |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1030 |
then |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1031 |
GLOBAL_KERGUELEN_SPECIAL = 2 |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1032 |
AddCaption("#"..GLOBAL_WEAPON_TEXTS[7]) |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1033 |
elseif(GLOBAL_KERGUELEN_SPECIAL==2 and TotalRounds>=1) |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1034 |
then |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1035 |
GLOBAL_KERGUELEN_SPECIAL = 3 |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1036 |
AddCaption("##"..GLOBAL_WEAPON_TEXTS[8]) |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1037 |
elseif(GLOBAL_KERGUELEN_SPECIAL==3 or (GLOBAL_KERGUELEN_SPECIAL==2 and TotalRounds<1)) |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1038 |
then |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1039 |
GLOBAL_KERGUELEN_SPECIAL = 5 |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1040 |
AddCaption("###"..GLOBAL_WEAPON_TEXTS[10]) |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1041 |
elseif(GLOBAL_KERGUELEN_SPECIAL==5) |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1042 |
then |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1043 |
GLOBAL_KERGUELEN_SPECIAL = 6 |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1044 |
AddCaption("####"..GLOBAL_WEAPON_TEXTS[15]) |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1045 |
end |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1046 |
--for selecting weaponset, this is mostly for old players. |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1047 |
elseif(GetHogLevel(CurrentHedgehog)==0 and GLOBAL_SELECT_CONTINENT_CHECK==true and (GetCurAmmoType() == amSkip or GetCurAmmoType() == amNothing)) |
7893 | 1048 |
then |
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1049 |
GLOBAL_TEAM_CONTINENT[GetHogTeamName(CurrentHedgehog)]=GLOBAL_TEAM_CONTINENT[GetHogTeamName(CurrentHedgehog)]+1 |
10965 | 1050 |
|
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1051 |
if(GLOBAL_TEAM_CONTINENT[GetHogTeamName(CurrentHedgehog)]> table.maxn(GLOBAL_CONTINENT_INFORMATION)) |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1052 |
then |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1053 |
GLOBAL_TEAM_CONTINENT[GetHogTeamName(CurrentHedgehog)]=1 |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1054 |
end |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1055 |
SetContinentWeapons() |
7893 | 1056 |
end |
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1057 |
--if switching out from sabotage. |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1058 |
elseif(GLOBAL_SABOTAGE_HOGS[CurrentHedgehog]~=nil and GLOBAL_SABOTAGE_HOGS[CurrentHedgehog]==2) |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1059 |
then |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1060 |
GLOBAL_SABOTAGE_HOGS[CurrentHedgehog]=1 |
7893 | 1061 |
end |
1062 |
end |
|
1063 |
||
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1064 |
function onUp() |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1065 |
--swap forward in the weaponmenu (1.0 style) |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1066 |
if(GetHogLevel(CurrentHedgehog)==0 and GLOBAL_SELECT_CONTINENT_CHECK==true and (GetCurAmmoType() == amSkip or GetCurAmmoType() == amNothing)) |
7893 | 1067 |
then |
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1068 |
GLOBAL_TEAM_CONTINENT[GetHogTeamName(CurrentHedgehog)]=GLOBAL_TEAM_CONTINENT[GetHogTeamName(CurrentHedgehog)]+1 |
10965 | 1069 |
|
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1070 |
if(GLOBAL_TEAM_CONTINENT[GetHogTeamName(CurrentHedgehog)]> table.maxn(GLOBAL_CONTINENT_INFORMATION)) |
7893 | 1071 |
then |
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1072 |
GLOBAL_TEAM_CONTINENT[GetHogTeamName(CurrentHedgehog)]=1 |
7893 | 1073 |
end |
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1074 |
SetContinentWeapons() |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1075 |
end |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1076 |
end |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1077 |
|
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1078 |
function onDown() |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1079 |
--swap backwards in the weaponmenu (1.0 style) |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1080 |
if(GetHogLevel(CurrentHedgehog)==0 and GLOBAL_SELECT_CONTINENT_CHECK==true and (GetCurAmmoType() == amSkip or GetCurAmmoType() == amNothing)) |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1081 |
then |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1082 |
GLOBAL_TEAM_CONTINENT[GetHogTeamName(CurrentHedgehog)]=GLOBAL_TEAM_CONTINENT[GetHogTeamName(CurrentHedgehog)]-1 |
10965 | 1083 |
|
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1084 |
if(GLOBAL_TEAM_CONTINENT[GetHogTeamName(CurrentHedgehog)]<=0) |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1085 |
then |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1086 |
GLOBAL_TEAM_CONTINENT[GetHogTeamName(CurrentHedgehog)]=table.maxn(GLOBAL_CONTINENT_INFORMATION) |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1087 |
end |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1088 |
SetContinentWeapons() |
7893 | 1089 |
end |
1090 |
end |
|
1091 |
||
1092 |
function onGameTick20() |
|
8618 | 1093 |
--if you picked a weaponset from the weaponmenu (icon) |
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1094 |
if(GLOBAL_TEAM_CONTINENT[GetHogTeamName(CurrentHedgehog)]==0) |
7893 | 1095 |
then |
8618 | 1096 |
if(GetCurAmmoType()==amSwitch) |
7893 | 1097 |
then |
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1098 |
GLOBAL_TEAM_CONTINENT[GetHogTeamName(CurrentHedgehog)]=GetRandom(table.maxn(GLOBAL_CONTINENT_INFORMATION))+1 |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1099 |
SetContinentWeapons() |
8618 | 1100 |
PlaySound(sndMineTick) |
1101 |
else |
|
10965 | 1102 |
for v,w in pairs(GLOBAL_CONTINENT_INFORMATION) |
8618 | 1103 |
do |
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1104 |
if(GetCurAmmoType()==GLOBAL_CONTINENT_INFORMATION[v][4]) |
8618 | 1105 |
then |
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1106 |
GLOBAL_TEAM_CONTINENT[GetHogTeamName(CurrentHedgehog)]=v |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1107 |
SetContinentWeapons() |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1108 |
PlaySound(GLOBAL_CONTINENT_SOUNDS[v][1]) |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1109 |
PlaySound(GLOBAL_CONTINENT_SOUNDS[v][2],CurrentHedgehog) |
8618 | 1110 |
end |
1111 |
end |
|
7893 | 1112 |
end |
1113 |
end |
|
10965 | 1114 |
|
8618 | 1115 |
--show the kerguelen ring |
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1116 |
if(GLOBAL_KERGUELEN_SPECIAL > 1 and GetCurAmmoType() == amHammer) |
7893 | 1117 |
then |
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1118 |
if(GLOBAL_VISUAL_CIRCLE==nil) |
8618 | 1119 |
then |
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1120 |
GLOBAL_VISUAL_CIRCLE=AddVisualGear(GetX(CurrentHedgehog), GetY(CurrentHedgehog), vgtCircle, 0, true) |
7893 | 1121 |
end |
10965 | 1122 |
|
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1123 |
if(GLOBAL_KERGUELEN_SPECIAL == 2) --walrus scream |
7893 | 1124 |
then |
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1125 |
SetVisualGearValues(GLOBAL_VISUAL_CIRCLE, GetX(CurrentHedgehog), GetY(CurrentHedgehog),20, 200, 0, 0, 100, 120, 4, 0xff0000ee) |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1126 |
elseif(GLOBAL_KERGUELEN_SPECIAL == 3) --swap hog |
7893 | 1127 |
then |
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1128 |
SetVisualGearValues(GLOBAL_VISUAL_CIRCLE, GetX(CurrentHedgehog), GetY(CurrentHedgehog),20, 200, 0, 0, 100, 420, 3, 0xffff00ee) |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1129 |
elseif(GLOBAL_KERGUELEN_SPECIAL == 5) --cries |
8618 | 1130 |
then |
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1131 |
SetVisualGearValues(GLOBAL_VISUAL_CIRCLE, GetX(CurrentHedgehog), GetY(CurrentHedgehog),20, 200, 0, 0, 100, 550, 1, 0x0000ffee) |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1132 |
elseif(GLOBAL_KERGUELEN_SPECIAL == 6) --sabotage |
7893 | 1133 |
then |
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1134 |
SetVisualGearValues(GLOBAL_VISUAL_CIRCLE, GetX(CurrentHedgehog), GetY(CurrentHedgehog),20, 200, 0, 0, 100, 80, 10, 0x00ff00ee) |
7893 | 1135 |
end |
10965 | 1136 |
|
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1137 |
elseif(GLOBAL_VISUAL_CIRCLE~=nil) |
7893 | 1138 |
then |
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1139 |
DeleteVisualGear(GLOBAL_VISUAL_CIRCLE) |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1140 |
GLOBAL_VISUAL_CIRCLE=nil |
7893 | 1141 |
end |
10965 | 1142 |
|
8618 | 1143 |
--sabotage |
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1144 |
if(GLOBAL_SABOTAGE_HOGS[CurrentHedgehog]~=nil and GLOBAL_SABOTAGE_HOGS[CurrentHedgehog]>=1) |
7893 | 1145 |
then |
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1146 |
--for sabotage |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1147 |
if(GLOBAL_SABOTAGE_HOGS[CurrentHedgehog]==1) |
7893 | 1148 |
then |
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1149 |
local RND=GetRandom(2) |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1150 |
if(RND==0) |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1151 |
then |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1152 |
AddCaption(loc("You are sabotaged, RUN!")) |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1153 |
else |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1154 |
AddCaption(loc("WARNING: Sabotage detected!")) |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1155 |
end |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1156 |
PlaySound(sndHellish) |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1157 |
GLOBAL_SABOTAGE_COUNTER=-50 |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1158 |
--update the constant at the top also to something in between |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1159 |
GLOBAL_SABOTAGE_FREQUENCY=(25*(RND))+70 |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1160 |
GLOBAL_SABOTAGE_GRAVITY_SWITCH=true |
10965 | 1161 |
|
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1162 |
GLOBAL_SABOTAGE_HOGS[CurrentHedgehog]=2 |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1163 |
end |
10965 | 1164 |
|
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1165 |
if(GLOBAL_SABOTAGE_COUNTER >0) |
7893 | 1166 |
then |
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1167 |
if(GLOBAL_SABOTAGE_GRAVITY_SWITCH) |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1168 |
then |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1169 |
SetGravityFromScale(div(100*GLOBAL_SABOTAGE_COUNTER,GLOBAL_SABOTAGE_FREQUENCY)) |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1170 |
else |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1171 |
SetGravityFromScale(100-div(100*GLOBAL_SABOTAGE_COUNTER,GLOBAL_SABOTAGE_FREQUENCY)) |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1172 |
end |
10965 | 1173 |
|
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1174 |
if(GLOBAL_SABOTAGE_COUNTER % 20 == 0) |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1175 |
then |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1176 |
AddVisualGear(GetX(CurrentHedgehog), GetY(CurrentHedgehog), vgtSmokeWhite, 0, false) |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1177 |
end |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1178 |
end |
10965 | 1179 |
|
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1180 |
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
|
1181 |
then |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1182 |
GLOBAL_SABOTAGE_HOGS[CurrentHedgehog]=0 |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1183 |
SetGravity(100) |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1184 |
elseif(GLOBAL_SABOTAGE_COUNTER >= GLOBAL_SABOTAGE_FREQUENCY) |
9805 | 1185 |
then |
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1186 |
if(GLOBAL_SABOTAGE_GRAVITY_SWITCH==true) |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1187 |
then |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1188 |
GLOBAL_SABOTAGE_GRAVITY_SWITCH=false |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1189 |
else |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1190 |
--AddGear(GetX(CurrentHedgehog), GetY(CurrentHedgehog)-10, gtCluster, 0, 0, -160000, 30) |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1191 |
GLOBAL_SABOTAGE_GRAVITY_SWITCH=true |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1192 |
end |
10965 | 1193 |
|
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1194 |
if(GetHealth(CurrentHedgehog)<=2) |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1195 |
then |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1196 |
SetHealth(CurrentHedgehog, 0) |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1197 |
GLOBAL_SABOTAGE_HOGS[CurrentHedgehog]=0 |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1198 |
SetGravity(100) |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1199 |
else |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1200 |
SetHealth(CurrentHedgehog, GetHealth(CurrentHedgehog)-2) |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1201 |
end |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1202 |
ShowDamageTag(CurrentHedgehog,2) |
10965 | 1203 |
|
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1204 |
GLOBAL_SABOTAGE_COUNTER=0 |
7893 | 1205 |
else |
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1206 |
GLOBAL_SABOTAGE_COUNTER=GLOBAL_SABOTAGE_COUNTER+1 |
7893 | 1207 |
end |
1208 |
end |
|
10965 | 1209 |
|
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1210 |
if(GetCurAmmoType() == amSwitch and GLOBAL_TEMP_VALUE==87) |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1211 |
then |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1212 |
SetGearMessage(CurrentHedgehog,gmAttack) |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1213 |
GLOBAL_TEMP_VALUE=0 |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1214 |
end |
10965 | 1215 |
|
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1216 |
if(GLOBAL_SHOW_SMALL_INFO>0) |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1217 |
then |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1218 |
if(GLOBAL_SHOW_SMALL_INFO==1) |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1219 |
then |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1220 |
ShowContinentInfo(GLOBAL_TEAM_CONTINENT[GetHogTeamName(CurrentHedgehog)],-1,true) |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1221 |
end |
10965 | 1222 |
|
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1223 |
GLOBAL_SHOW_SMALL_INFO=GLOBAL_SHOW_SMALL_INFO-1 |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1224 |
end |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1225 |
end |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1226 |
|
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1227 |
--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
|
1228 |
function onSlot(slot) |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1229 |
if(GLOBAL_TEAM_CONTINENT[GetHogTeamName(CurrentHedgehog)]==0) |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1230 |
then |
12411
edeae7661dca
Lua refactor: Replace ParseCommand('setweap… with SetWeapon
Wuzzy <almikes@aol.com>
parents:
11515
diff
changeset
|
1231 |
SetWeapon(amSkip) |
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1232 |
end |
7893 | 1233 |
end |
1234 |
||
1235 |
--if you used hogswitch or any similar weapon, dont enable any weaponchange |
|
1236 |
function onAttack() |
|
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1237 |
GLOBAL_SELECT_CONTINENT_CHECK=false |
10965 | 1238 |
|
7893 | 1239 |
--african special |
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1240 |
if(GLOBAL_AFRICAN_SPECIAL_SEDUCTION == 1 and GetCurAmmoType() == amSeduction and band(GetState(CurrentHedgehog),gstAttacked)==0) |
7893 | 1241 |
then |
10527 | 1242 |
EndTurn() |
10965 | 1243 |
|
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1244 |
GLOBAL_TEMP_VALUE=0 |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1245 |
runOnGears(AfricaSpecialSeduction) |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1246 |
SetHealth(CurrentHedgehog, GetHealth(CurrentHedgehog)+GLOBAL_TEMP_VALUE) |
7893 | 1247 |
|
1248 |
--visual stuff |
|
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1249 |
VisualExplosion(250,GetX(CurrentHedgehog), GetY(CurrentHedgehog),vgtSmoke,vgtSmokeWhite) |
7893 | 1250 |
PlaySound(sndParachute) |
10965 | 1251 |
|
9805 | 1252 |
RemoveWeapon(CurrentHedgehog,amSeduction) |
8618 | 1253 |
|
7893 | 1254 |
--Kerguelen specials |
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1255 |
elseif(GetCurAmmoType() == amHammer and GLOBAL_KERGUELEN_SPECIAL > 1 and band(GetState(CurrentHedgehog),gstAttacked)==0) |
7893 | 1256 |
then |
8618 | 1257 |
--scream |
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1258 |
if(GLOBAL_KERGUELEN_SPECIAL == 2) |
7893 | 1259 |
then |
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1260 |
GLOBAL_TEMP_VALUE=0 |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1261 |
runOnGears(KerguelenSpecialRed) |
12940
39b7b3ed619e
Add healing visual effect + heal msg in scripts
Wuzzy <Wuzzy2@mail.ru>
parents:
12901
diff
changeset
|
1262 |
HealHog(CurrentHedgehog, GLOBAL_TEMP_VALUE) |
7893 | 1263 |
PlaySound(sndHellish) |
10965 | 1264 |
|
8618 | 1265 |
--swap |
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1266 |
elseif(GLOBAL_KERGUELEN_SPECIAL == 3 and TotalRounds>=1) |
7893 | 1267 |
then |
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1268 |
GLOBAL_TEMP_VALUE=0 |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1269 |
runOnGears(KerguelenSpecialYellowCountHogs) |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1270 |
if(GLOBAL_TEMP_VALUE>0) |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1271 |
then |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1272 |
GLOBAL_TEMP_VALUE=GetRandom(GLOBAL_TEMP_VALUE) |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1273 |
runOnGears(KerguelenSpecialYellowSwap) |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1274 |
PlaySound(sndPiano3) |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1275 |
else |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1276 |
PlaySound(sndPiano6) |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1277 |
end |
10965 | 1278 |
|
8618 | 1279 |
--cries |
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1280 |
elseif(GLOBAL_KERGUELEN_SPECIAL == 5) |
7893 | 1281 |
then |
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1282 |
runOnGears(KerguelenSpecialBlueCheck) |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1283 |
if(GLOBAL_KERGUELEN_SPECIAL~=-1) |
7893 | 1284 |
then |
1285 |
AddGear(0, 0, gtWaterUp, 0, 0,0,0) |
|
1286 |
PlaySound(sndWarp) |
|
1287 |
PlaySound(sndMolotov) |
|
10965 | 1288 |
|
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1289 |
GLOBAL_TEMP_VALUE=0 |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1290 |
runOnGears(KerguelenSpecialBlueActivate) |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1291 |
SetHealth(CurrentHedgehog, GetHealth(CurrentHedgehog)+GLOBAL_TEMP_VALUE) |
7893 | 1292 |
else |
1293 |
HogSay(CurrentHedgehog, loc("Hogs in sight!"), SAY_SAY) |
|
1294 |
end |
|
10965 | 1295 |
|
8618 | 1296 |
--sabotage |
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1297 |
elseif(GLOBAL_KERGUELEN_SPECIAL == 6) |
7893 | 1298 |
then |
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1299 |
GLOBAL_TEMP_VALUE=0 |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1300 |
runOnGears(KerguelenSpecialGreen) |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1301 |
if(GLOBAL_TEMP_VALUE==0) |
9805 | 1302 |
then |
1303 |
PlaySound(sndThrowRelease) |
|
1304 |
AddGear(GetX(CurrentHedgehog), GetY(CurrentHedgehog)-20, gtCluster, 0, 0, -1000000, 32) |
|
1305 |
end |
|
7893 | 1306 |
end |
10965 | 1307 |
|
10527 | 1308 |
EndTurn() |
10965 | 1309 |
|
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1310 |
DeleteVisualGear(GLOBAL_VISUAL_CIRCLE) |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1311 |
GLOBAL_VISUAL_CIRCLE=nil |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1312 |
GLOBAL_KERGUELEN_SPECIAL=0 |
10965 | 1313 |
|
9805 | 1314 |
RemoveWeapon(CurrentHedgehog,amHammer) |
10965 | 1315 |
|
8618 | 1316 |
elseif(GetCurAmmoType() == amVampiric) |
1317 |
then |
|
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1318 |
GLOBAL_VAMPIRIC_IS_ON=75 |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1319 |
elseif(GetCurAmmoType() == amExtraDamage) |
7893 | 1320 |
then |
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1321 |
GLOBAL_EXTRA_DAMAGE_IS_ON=150 |
7893 | 1322 |
end |
1323 |
end |
|
1324 |
||
1325 |
function onGearAdd(gearUid) |
|
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1326 |
GLOBAL_SELECT_CONTINENT_CHECK=false |
10965 | 1327 |
|
8618 | 1328 |
--track the gears im using |
10965 | 1329 |
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
|
1330 |
then |
ac1610a7b7fa
apparently an older version was provided earlier and this one is newer and theoretically desync free. untested.
Vatten
parents:
7893
diff
changeset
|
1331 |
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
|
1332 |
end |
10965 | 1333 |
|
7893 | 1334 |
--remove gasclouds on gasbombspecial |
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1335 |
if(GetGearType(gearUid)==gtPoisonCloud and GLOBAL_SOUTH_AMERICAN_SPECIAL == true) |
7893 | 1336 |
then |
1337 |
DeleteGear(gearUid) |
|
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1338 |
--african special |
7893 | 1339 |
elseif(GetGearType(gearUid)==gtSMine) |
1340 |
then |
|
1341 |
vx,vy=GetGearVelocity(gearUid) |
|
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1342 |
if(GLOBAL_AFRICAN_SPECIAL_STICKY == 1) |
7893 | 1343 |
then |
1344 |
SetState(CurrentHedgehog, gstHHDriven+gstMoving) |
|
1345 |
SetGearPosition(CurrentHedgehog, GetX(CurrentHedgehog),GetY(CurrentHedgehog)-3) |
|
1346 |
SetGearVelocity(CurrentHedgehog, vx, vy) |
|
1347 |
DeleteGear(gearUid) |
|
10965 | 1348 |
|
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1349 |
elseif(GLOBAL_AFRICAN_SPECIAL_STICKY == 2) |
7893 | 1350 |
then |
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1351 |
FireGear(CurrentHedgehog,gtNapalmBomb, vx, vy, 0) |
7893 | 1352 |
DeleteGear(gearUid) |
1353 |
end |
|
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1354 |
--north american special |
7893 | 1355 |
elseif(GetGearType(gearUid)==gtSniperRifleShot) |
1356 |
then |
|
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1357 |
GLOBAL_NORTH_AMERICAN_SPECIAL_SNIPER_IS_ON=true |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1358 |
if(GLOBAL_NORTH_AMERICAN_SPECIAL_SNIPER~=1) |
7893 | 1359 |
then |
1360 |
SetHealth(gearUid, 1) |
|
1361 |
end |
|
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1362 |
--north american special |
7893 | 1363 |
elseif(GetGearType(gearUid)==gtShotgunShot) |
1364 |
then |
|
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1365 |
if(GLOBAL_NORTH_AMERICAN_SPECIAL_SHOTGUN==true) |
7893 | 1366 |
then |
1367 |
AddVisualGear(GetX(gearUid), GetY(gearUid), vgtFeather, 0, false) |
|
1368 |
AddVisualGear(GetX(gearUid), GetY(gearUid), vgtFeather, 0, false) |
|
1369 |
AddVisualGear(GetX(gearUid), GetY(gearUid), vgtFeather, 0, false) |
|
1370 |
PlaySound(sndBirdyLay) |
|
1371 |
else |
|
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1372 |
GLOBAL_NORTH_AMERICAN_SPECIAL_SHOTGUN=nil |
7893 | 1373 |
end |
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1374 |
--european special |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1375 |
elseif(GetGearType(gearUid)==gtMolotov and GLOBAL_EUROPE_SPECIAL==1) |
7893 | 1376 |
then |
1377 |
vx,vy=GetGearVelocity(gearUid) |
|
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1378 |
e_health=FireGear(CurrentHedgehog,gtCluster, vx, vy, 1) |
7893 | 1379 |
SetGearMessage(e_health, 2) |
1380 |
DeleteGear(gearUid) |
|
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1381 |
--australian specials |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1382 |
elseif(GetGearType(gearUid)==gtShover and GLOBAL_AUSTRALIAN_SPECIAL~=0) |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1383 |
then |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1384 |
GLOBAL_TEMP_VALUE=0 |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1385 |
runOnGears(AustraliaSpecialCheckHogs) |
10965 | 1386 |
|
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1387 |
if(GLOBAL_TEMP_VALUE==0) |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1388 |
then |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1389 |
vx,vy=GetGearVelocity(gearUid) |
10965 | 1390 |
|
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1391 |
if(GLOBAL_AUSTRALIAN_SPECIAL==1) |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1392 |
then |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1393 |
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
|
1394 |
SetHealth(austmine, 100) |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1395 |
SetTimer(austmine, 1000) |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1396 |
else |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1397 |
local austmine=FireGear(CurrentHedgehog,gtEgg, vx, vy, 10) |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1398 |
--SetHealth(austmine, 2000) |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1399 |
SetTimer(austmine, 6000) |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1400 |
SetGearMessage(austmine, 3) |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1401 |
end |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1402 |
else |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1403 |
PlaySound(sndDenied) |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1404 |
end |
7893 | 1405 |
elseif(GetGearType(gearUid)==gtParachute) |
1406 |
then |
|
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1407 |
GLOBAL_PARACHUTE_IS_ON=1 |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1408 |
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
|
1409 |
then |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1410 |
GLOBAL_SWITCH_HOG_IS_ON=true |
7893 | 1411 |
end |
1412 |
end |
|
1413 |
||
1414 |
function onGearDelete(gearUid) |
|
1415 |
||
10965 | 1416 |
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
|
1417 |
then |
ac1610a7b7fa
apparently an older version was provided earlier and this one is newer and theoretically desync free. untested.
Vatten
parents:
7893
diff
changeset
|
1418 |
trackDeletion(gearUid) |
10965 | 1419 |
|
9805 | 1420 |
--sundaland special |
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1421 |
if(GetGearType(gearUid) == gtHedgehog and GLOBAL_TEAM_CONTINENT[GetHogTeamName(GLOBAL_SUNDALAND_END_HOG)]==10) |
9805 | 1422 |
then |
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1423 |
if(GLOBAL_SUNDALAND_END_HOG==CurrentHedgehog) |
9805 | 1424 |
then |
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1425 |
runOnGears(SundalandFindOtherHogInTeam) |
9805 | 1426 |
end |
10965 | 1427 |
|
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1428 |
SundalandGetWeapons(GLOBAL_SUNDALAND_END_HOG) |
9805 | 1429 |
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
|
1430 |
end |
10965 | 1431 |
|
8618 | 1432 |
--north american lipstick |
7893 | 1433 |
if(GetGearType(gearUid)==gtSniperRifleShot ) |
1434 |
then |
|
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1435 |
GLOBAL_NORTH_AMERICAN_SPECIAL_SNIPER_IS_ON=false |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1436 |
if(GLOBAL_NORTH_AMERICAN_SPECIAL_SNIPER==2) |
7893 | 1437 |
then |
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1438 |
GLOBAL_TEMP_VALUE=gearUid |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1439 |
runOnGears(NorthAmericaSpecialSniper) |
7893 | 1440 |
end |
8618 | 1441 |
--north american eagle eye |
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1442 |
elseif(GetGearType(gearUid)==gtShotgunShot and GLOBAL_NORTH_AMERICAN_SPECIAL_SHOTGUN==true) |
7893 | 1443 |
then |
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1444 |
EndTurn() |
7893 | 1445 |
SetGearPosition(CurrentHedgehog, GetX(gearUid), GetY(gearUid)+7) |
1446 |
PlaySound(sndWarp) |
|
1447 |
--south american special |
|
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1448 |
elseif(GetGearType(gearUid)==gtGasBomb and GLOBAL_SOUTH_AMERICAN_SPECIAL == true) |
7893 | 1449 |
then |
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1450 |
GLOBAL_TEMP_VALUE=gearUid |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1451 |
runOnGears(SouthAmericaSpecialCheeseExplosion) |
7893 | 1452 |
AddVisualGear(GetX(gearUid), GetY(gearUid), vgtExplosion, 0, false) |
10965 | 1453 |
|
8618 | 1454 |
--asian special |
7893 | 1455 |
elseif(GetGearType(gearUid)==gtSnowball and GetGearMessage(gearUid)==1) |
1456 |
then |
|
8618 | 1457 |
AddGear(GetX(gearUid), GetY(gearUid), gtCluster, 0, 0, 0, 22) |
10965 | 1458 |
|
8618 | 1459 |
--europe special |
7893 | 1460 |
elseif(GetGearType(gearUid)==gtCluster and GetGearMessage(gearUid)==2) |
1461 |
then |
|
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1462 |
GLOBAL_TEMP_VALUE=gearUid |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1463 |
runOnGears(EuropeSpecialMolotovHit) |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1464 |
VisualExplosion(100,GetX(gearUid), GetY(gearUid),vgtSmokeWhite,vgtSmokeWhite) |
7893 | 1465 |
AddVisualGear(GetX(gearUid), GetY(gearUid), vgtExplosion, 0, false) |
1466 |
PlaySound(sndGraveImpact) |
|
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1467 |
--australian special |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1468 |
elseif(GetGearType(gearUid)==gtEgg and GetGearMessage(gearUid)==3) |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1469 |
then |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1470 |
GLOBAL_TEMP_VALUE=gearUid |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1471 |
runOnGears(AustraliaSpecialEggHit) |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1472 |
GLOBAL_TEMP_VALUE=0 |
8618 | 1473 |
--asia (using para) |
7893 | 1474 |
elseif(GetGearType(gearUid)==gtParachute) |
1475 |
then |
|
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1476 |
GLOBAL_PARACHUTE_IS_ON=false |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1477 |
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
|
1478 |
then |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1479 |
GLOBAL_SWITCH_HOG_IS_ON=false |
7893 | 1480 |
end |
7936 | 1481 |
end |
10956
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1482 |
|
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1483 |
--[[ |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1484 |
sources (populations & area): |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1485 |
Own calculations from wikipedia. |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1486 |
Some are approximations. |
80c3314f8123
Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents:
10527
diff
changeset
|
1487 |
]] |