share/hedgewars/Data/Scripts/Multiplayer/Continental_supplies.lua
author Wuzzy <Wuzzy2@mail.ru>
Mon, 12 Feb 2018 19:38:07 +0100
changeset 12990 add647b0036e
parent 12945 39b7b3ed619e
child 13364 7d772358dc22
permissions -rw-r--r--
Battalion: Reduce amount of SD messages
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
7893
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
     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
fb2b006ba476 merge git head and hg head
sheepluva
parents: 10956
diff changeset
     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
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
     5
10956
80c3314f8123 Changed to continental supplies from the DLC, because its better :P
caf2 <florian.evaldsson@telia.com>
parents: 10527
diff changeset
     6
	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
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
    13
]]
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
    14
8043
da083f8d95e6 We need custom script loading function in lua now
unc0rr
parents: 7936
diff changeset
    15
HedgewarsScriptLoad("/Scripts/Locale.lua")
da083f8d95e6 We need custom script loading function in lua now
unc0rr
parents: 7936
diff changeset
    16
HedgewarsScriptLoad("/Scripts/Utils.lua")
da083f8d95e6 We need custom script loading function in lua now
unc0rr
parents: 7936
diff changeset
    17
HedgewarsScriptLoad("/Scripts/Tracker.lua")
7893
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
    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
7e71dba4e7f3 avoid floating point desync, other script tweaks
Vatten
parents: 8043
diff changeset
    21
	local temp=num
7893
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
    22
	while(temp*temp-div(temp,2)>num)
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
    23
	do
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
    24
		temp=div((temp+div(num,temp)),2)
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
    25
	end
10965
fb2b006ba476 merge git head and hg head
sheepluva
parents: 10956
diff changeset
    26
7893
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
    27
	return math.abs(temp)
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
    28
end
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
    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
7e71dba4e7f3 avoid floating point desync, other script tweaks
Vatten
parents: 8043
diff changeset
    32
	--to fix overflows
7e71dba4e7f3 avoid floating point desync, other script tweaks
Vatten
parents: 8043
diff changeset
    33
	if(((math.abs(xx)^2)+(math.abs(yy)^2))>2^26)
7e71dba4e7f3 avoid floating point desync, other script tweaks
Vatten
parents: 8043
diff changeset
    34
	then
7e71dba4e7f3 avoid floating point desync, other script tweaks
Vatten
parents: 8043
diff changeset
    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
7e71dba4e7f3 avoid floating point desync, other script tweaks
Vatten
parents: 8043
diff changeset
    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
7e71dba4e7f3 avoid floating point desync, other script tweaks
Vatten
parents: 8043
diff changeset
    39
	end
7893
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
    40
end
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
    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
285b428f391c desync fix for Continental Supplies
Vatten
parents: 10453
diff changeset
    53
function EndTurn()
9805
1795c34ab8db Updated continental to the latest
Vatten
parents: 8618
diff changeset
    54
	SetState(CurrentHedgehog,bor(GetState(CurrentHedgehog),gstAttacked))
10527
285b428f391c desync fix for Continental Supplies
Vatten
parents: 10453
diff changeset
    55
	--3 sec espace time
285b428f391c desync fix for Continental Supplies
Vatten
parents: 10453
diff changeset
    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
fb2b006ba476 merge git head and hg head
sheepluva
parents: 10956
diff changeset
    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
285b428f391c desync fix for Continental Supplies
Vatten
parents: 10453
diff changeset
    70
end
9805
1795c34ab8db Updated continental to the latest
Vatten
parents: 8618
diff changeset
    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
fb2b006ba476 merge git head and hg head
sheepluva
parents: 10956
diff changeset
    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
1795c34ab8db Updated continental to the latest
Vatten
parents: 8618
diff changeset
    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
fb2b006ba476 merge git head and hg head
sheepluva
parents: 10956
diff changeset
    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
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
    96
8618
7e71dba4e7f3 avoid floating point desync, other script tweaks
Vatten
parents: 8043
diff changeset
    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
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
   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
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
   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
7e71dba4e7f3 avoid floating point desync, other script tweaks
Vatten
parents: 8043
diff changeset
   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
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
   119
8618
7e71dba4e7f3 avoid floating point desync, other script tweaks
Vatten
parents: 8043
diff changeset
   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
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
   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
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
   130
12906
bdf8e80a97b8 Fix some minor formatting and grammar flaws in script strings
Wuzzy <Wuzzy2@mail.ru>
parents: 12905
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
7e71dba4e7f3 avoid floating point desync, other script tweaks
Vatten
parents: 8043
diff changeset
   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
1795c34ab8db Updated continental to the latest
Vatten
parents: 8618
diff changeset
   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
1795c34ab8db Updated continental to the latest
Vatten
parents: 8618
diff changeset
   138
loc("Anno 1032: [The explosion will make a strong push ~ Wide range, wont affect hogs close to the target]"),
8618
7e71dba4e7f3 avoid floating point desync, other script tweaks
Vatten
parents: 8043
diff changeset
   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
1795c34ab8db Updated continental to the latest
Vatten
parents: 8618
diff changeset
   141
loc("Drop a bomb: [Drop some heroic wind that will turn into a bomb on impact]"),
12905
a9e4e8fa852c Fix various typos in translatable strings
Wuzzy <Wuzzy2@mail.ru>
parents: 12416
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
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
   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
1795c34ab8db Updated continental to the latest
Vatten
parents: 8618
diff changeset
   146
loc("Hedgehog projectile: [Fire your hog like a Sticky Bomb]"),
7893
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
   147
loc("Napalm rocket: [Fire a bomb with napalm!]"),
9805
1795c34ab8db Updated continental to the latest
Vatten
parents: 8618
diff changeset
   148
loc("Eagle Eye: [Blink to the impact ~ One shot]"),
7893
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
   149
loc("Medicine: [Fire some exploding medicine that will heal all hogs effected by the explosion]"),
9805
1795c34ab8db Updated continental to the latest
Vatten
parents: 8618
diff changeset
   150
loc("Sabotage/Flare: [Sabotage all hogs in the circle and deal ~1 dmg OR Fire a cluster up into the air]")
7893
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
   151
}
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
   152
10965
fb2b006ba476 merge git head and hg head
sheepluva
parents: 10956
diff changeset
   153
local GLOBAL_CONTINENT_INFORMATION =
7893
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
   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
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
   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
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
   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
1795c34ab8db Updated continental to the latest
Vatten
parents: 8618
diff changeset
   162
{{amBazooka,100},{amGrenade,100},{amMortar,100},{amMolotov,100},{amVampiric,3},{amPiano,1},{amResurrector,2},{amJetpack,4}}},
7893
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
   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
1795c34ab8db Updated continental to the latest
Vatten
parents: 8618
diff changeset
   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
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
   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
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
   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
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
   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
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
   178
12905
a9e4e8fa852c Fix various typos in translatable strings
Wuzzy <Wuzzy2@mail.ru>
parents: 12416
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
1795c34ab8db Updated continental to the latest
Vatten
parents: 8618
diff changeset
   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
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
   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
1795c34ab8db Updated continental to the latest
Vatten
parents: 8618
diff changeset
   184
7893
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
   185
}
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
   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
7e71dba4e7f3 avoid floating point desync, other script tweaks
Vatten
parents: 8043
diff changeset
   188
{
9805
1795c34ab8db Updated continental to the latest
Vatten
parents: 8618
diff changeset
   189
	{sndShotgunFire,sndCover},
1795c34ab8db Updated continental to the latest
Vatten
parents: 8618
diff changeset
   190
	{sndEggBreak,sndLaugh},
1795c34ab8db Updated continental to the latest
Vatten
parents: 8618
diff changeset
   191
	{sndExplosion,sndEnemyDown},
1795c34ab8db Updated continental to the latest
Vatten
parents: 8618
diff changeset
   192
	{sndMelonImpact,sndCoward},
1795c34ab8db Updated continental to the latest
Vatten
parents: 8618
diff changeset
   193
	{sndRopeAttach,sndComeonthen},
1795c34ab8db Updated continental to the latest
Vatten
parents: 8618
diff changeset
   194
	{sndBaseballBat,sndNooo},
1795c34ab8db Updated continental to the latest
Vatten
parents: 8618
diff changeset
   195
	{sndSineGun,sndOops},
1795c34ab8db Updated continental to the latest
Vatten
parents: 8618
diff changeset
   196
	{sndPiano5,sndStupid},
1795c34ab8db Updated continental to the latest
Vatten
parents: 8618
diff changeset
   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
7e71dba4e7f3 avoid floating point desync, other script tweaks
Vatten
parents: 8043
diff changeset
   200
}
7e71dba4e7f3 avoid floating point desync, other script tweaks
Vatten
parents: 8043
diff changeset
   201
7893
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
   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
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
   204
	{amKamikaze, 0, 1, 0, 1, 0},
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
   205
	{amSineGun, 0, 1, 0, 1, 1},
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
   206
	{amBazooka, 0, 1, 0, 1, 0},
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
   207
	{amMineStrike, 0, 1, 5, 1, 2},
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
   208
	{amGrenade, 0, 1, 0, 1, 0},
9805
1795c34ab8db Updated continental to the latest
Vatten
parents: 8618
diff changeset
   209
	{amPiano, 0, 1, 5, 1, 0},
7893
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
   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
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
   212
	{amShotgun, 0, 0, 0, 1, 1},
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
   213
	{amMine, 0, 1, 0, 1, 0},
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
   214
	{amSniperRifle, 0, 1, 0, 1, 1},
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
   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
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
   217
	{amFirePunch, 0, 1, 0, 1, 0},
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
   218
	{amHellishBomb, 0, 1, 5, 1, 2},
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
   219
	{amWhip, 0, 1, 0, 1, 0},
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
   220
	{amNapalm, 0, 1, 5, 1, 2},
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
   221
	{amPickHammer, 0, 1, 0, 1, 0},
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
   222
	{amBaseballBat, 0, 1, 0, 1, 1},
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
   223
	{amMortar, 0, 1, 0, 1, 0},
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
   224
	{amCake, 0, 1, 4, 1, 2},
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
   225
	{amSeduction, 0, 0, 0, 1, 0},
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
   226
	{amWatermelon, 0, 1, 5, 1, 2},
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
   227
	{amDrill, 0, 1, 0, 1, 0},
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
   228
	{amBallgun, 0, 1, 5, 1, 2},
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
   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
1795c34ab8db Updated continental to the latest
Vatten
parents: 8618
diff changeset
   231
	{amBirdy, 0, 1, 0, 1, 0},
7893
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
   232
	{amBlowTorch, 0, 1, 0, 1, 0},
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
   233
	{amRCPlane, 0, 1, 5, 1, 2},
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
   234
	{amGasBomb, 0, 0, 0, 1, 0},
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
   235
	{amAirAttack, 0, 1, 4, 1, 1},
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
   236
	{amFlamethrower, 0, 1, 0, 1, 0},
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
   237
	{amSMine, 0, 1, 0, 1, 1},
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
   238
	{amDrillStrike, 0, 1, 4, 1, 2},
8618
7e71dba4e7f3 avoid floating point desync, other script tweaks
Vatten
parents: 8043
diff changeset
   239
	{amSnowball, 0, 1, 0, 1, 0}
7893
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
   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
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
   242
	{amParachute, 0, 1, 0, 1, 0},
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
   243
	{amGirder, 0, 1, 0, 1, 0},
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
   244
	{amSwitch, 0, 1, 0, 1, 0},
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
   245
	{amLowGravity, 0, 1, 0, 1, 0},
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
   246
	{amExtraDamage, 0, 1, 2, 1, 0},
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
   247
	{amRope, 0, 1, 0, 1, 1},
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
   248
	{amInvulnerable, 0, 1, 0, 1, 0},
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
   249
	{amExtraTime, 0, 1, 0, 1, 0},
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
   250
	{amLaserSight, 0, 1, 0, 1, 0},
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
   251
	{amVampiric, 0, 1, 0, 1, 0},
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
   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
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
   254
	{amResurrector, 0, 1, 3, 1, 0},
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
   255
	{amTeleport, 0, 1, 0, 1, 0},
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
   256
	{amLandGun, 0, 1, 0, 1, 0},
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
   257
	{amTardis, 0, 1, 0, 1, 0},
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
   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
fb2b006ba476 merge git head and hg head
sheepluva
parents: 10956
diff changeset
   261
7893
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
   262
}
8618
7e71dba4e7f3 avoid floating point desync, other script tweaks
Vatten
parents: 8043
diff changeset
   263
7e71dba4e7f3 avoid floating point desync, other script tweaks
Vatten
parents: 8043
diff changeset
   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
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
   266
	if(MapHasBorder() == false or (MapHasBorder() == true and weapon ~= amAirAttack and weapon ~= amMineStrike and weapon ~= amNapalm and weapon ~= amDrillStrike and weapon ~= amPiano))
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
   267
	then
9805
1795c34ab8db Updated continental to the latest
Vatten
parents: 8618
diff changeset
   268
		if(amount==1)
1795c34ab8db Updated continental to the latest
Vatten
parents: 8618
diff changeset
   269
		then
1795c34ab8db Updated continental to the latest
Vatten
parents: 8618
diff changeset
   270
			AddAmmo(hog, weapon)
1795c34ab8db Updated continental to the latest
Vatten
parents: 8618
diff changeset
   271
		else
1795c34ab8db Updated continental to the latest
Vatten
parents: 8618
diff changeset
   272
			AddAmmo(hog, weapon,amount)
1795c34ab8db Updated continental to the latest
Vatten
parents: 8618
diff changeset
   273
		end
1795c34ab8db Updated continental to the latest
Vatten
parents: 8618
diff changeset
   274
	end
1795c34ab8db Updated continental to the latest
Vatten
parents: 8618
diff changeset
   275
end
1795c34ab8db Updated continental to the latest
Vatten
parents: 8618
diff changeset
   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
1795c34ab8db Updated continental to the latest
Vatten
parents: 8618
diff changeset
   278
function RemoveWeapon(hog,weapon)
1795c34ab8db Updated continental to the latest
Vatten
parents: 8618
diff changeset
   279
1795c34ab8db Updated continental to the latest
Vatten
parents: 8618
diff changeset
   280
	if(GetAmmoCount(hog, weapon)<100)
1795c34ab8db Updated continental to the latest
Vatten
parents: 8618
diff changeset
   281
	then
1795c34ab8db Updated continental to the latest
Vatten
parents: 8618
diff changeset
   282
		AddAmmo(hog,weapon,GetAmmoCount(hog, weapon)-1)
7893
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
   283
	end
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
   284
end
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
   285
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
   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
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
   288
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
   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
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
   292
	do
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
   293
		AddAmmo(hog,i,0)
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
   294
		i=i+1
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
   295
	end
10965
fb2b006ba476 merge git head and hg head
sheepluva
parents: 10956
diff changeset
   296
7893
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
   297
	AddAmmo(hog,amSkip,100)
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
   298
end
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
   299
8618
7e71dba4e7f3 avoid floating point desync, other script tweaks
Vatten
parents: 8043
diff changeset
   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
fb2b006ba476 merge git head and hg head
sheepluva
parents: 10956
diff changeset
   302
	for v,w in pairs(GLOBAL_CONTINENT_INFORMATION[num][5])
7893
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
   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
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
   305
	end
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
   306
end
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
   307
8618
7e71dba4e7f3 avoid floating point desync, other script tweaks
Vatten
parents: 8043
diff changeset
   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
1795c34ab8db Updated continental to the latest
Vatten
parents: 8618
diff changeset
   310
1795c34ab8db Updated continental to the latest
Vatten
parents: 8618
diff changeset
   311
	if(GetHogLevel(hog)==0)
1795c34ab8db Updated continental to the latest
Vatten
parents: 8618
diff changeset
   312
	then
10965
fb2b006ba476 merge git head and hg head
sheepluva
parents: 10956
diff changeset
   313
		for v,w in pairs(GLOBAL_CONTINENT_INFORMATION)
9805
1795c34ab8db Updated continental to the latest
Vatten
parents: 8618
diff changeset
   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
1795c34ab8db Updated continental to the latest
Vatten
parents: 8618
diff changeset
   316
		end
1795c34ab8db Updated continental to the latest
Vatten
parents: 8618
diff changeset
   317
		AddAmmo(hog,amSwitch) --random continent
10965
fb2b006ba476 merge git head and hg head
sheepluva
parents: 10956
diff changeset
   318
9805
1795c34ab8db Updated continental to the latest
Vatten
parents: 8618
diff changeset
   319
	--for the computers
1795c34ab8db Updated continental to the latest
Vatten
parents: 8618
diff changeset
   320
	else
1795c34ab8db Updated continental to the latest
Vatten
parents: 8618
diff changeset
   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
1795c34ab8db Updated continental to the latest
Vatten
parents: 8618
diff changeset
   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
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
   325
	end
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
   326
end
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
   327
8618
7e71dba4e7f3 avoid floating point desync, other script tweaks
Vatten
parents: 8043
diff changeset
   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
7e71dba4e7f3 avoid floating point desync, other script tweaks
Vatten
parents: 8043
diff changeset
   330
	local geninftext=""
7893
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
   331
	local ns=false
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
   332
	if(time==-1)
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
   333
	then
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
   334
		time=0
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
   335
		ns=true
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
   336
	end
8618
7e71dba4e7f3 avoid floating point desync, other script tweaks
Vatten
parents: 8043
diff changeset
   337
	if(generalinf)
7e71dba4e7f3 avoid floating point desync, other script tweaks
Vatten
parents: 8043
diff changeset
   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
7e71dba4e7f3 avoid floating point desync, other script tweaks
Vatten
parents: 8043
diff changeset
   340
	end
10965
fb2b006ba476 merge git head and hg head
sheepluva
parents: 10956
diff changeset
   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
fb2b006ba476 merge git head and hg head
sheepluva
parents: 10956
diff changeset
   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
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
   345
	if(ns)
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
   346
	then
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
   347
		HideMission()
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
   348
	end
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
   349
end
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
   350
8618
7e71dba4e7f3 avoid floating point desync, other script tweaks
Vatten
parents: 8043
diff changeset
   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
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
   353
	local degr=0
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
   354
	local lap=30
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
   355
	while(lap<range)
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
   356
	do
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
   357
		while(degr < 6.2831)
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
   358
		do
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
   359
			AddVisualGear(xpos+math.cos(degr+0.1)*(lap+5), ypos+math.sin(degr+0.1)*(lap+5), gear1, 0, false)
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
   360
			if(gear2~=false)
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
   361
			then
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
   362
				AddVisualGear(xpos+math.cos(degr)*lap, ypos+math.sin(degr)*lap, gear2, 0, false)
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
   363
			end
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
   364
			degr=degr+((3.1415*3)*0.125) --1/8 = 0.125
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
   365
		end
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
   366
		lap=lap+30
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
   367
		degr=degr-6.2831
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
   368
	end
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
   369
end
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
   370
8618
7e71dba4e7f3 avoid floating point desync, other script tweaks
Vatten
parents: 8043
diff changeset
   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
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
   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
fb2b006ba476 merge git head and hg head
sheepluva
parents: 10956
diff changeset
   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
fb2b006ba476 merge git head and hg head
sheepluva
parents: 10956
diff changeset
   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
fb2b006ba476 merge git head and hg head
sheepluva
parents: 10956
diff changeset
   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
fb2b006ba476 merge git head and hg head
sheepluva
parents: 10956
diff changeset
   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
fb2b006ba476 merge git head and hg head
sheepluva
parents: 10956
diff changeset
   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
7e71dba4e7f3 avoid floating point desync, other script tweaks
Vatten
parents: 8043
diff changeset
   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
7e71dba4e7f3 avoid floating point desync, other script tweaks
Vatten
parents: 8043
diff changeset
   392
			then
7e71dba4e7f3 avoid floating point desync, other script tweaks
Vatten
parents: 8043
diff changeset
   393
				random_weapon=0
7e71dba4e7f3 avoid floating point desync, other script tweaks
Vatten
parents: 8043
diff changeset
   394
			end
7e71dba4e7f3 avoid floating point desync, other script tweaks
Vatten
parents: 8043
diff changeset
   395
			random_weapon = random_weapon+1
7e71dba4e7f3 avoid floating point desync, other script tweaks
Vatten
parents: 8043
diff changeset
   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
7e71dba4e7f3 avoid floating point desync, other script tweaks
Vatten
parents: 8043
diff changeset
   399
		old_rand_weap = random_weapon
10965
fb2b006ba476 merge git head and hg head
sheepluva
parents: 10956
diff changeset
   400
8618
7e71dba4e7f3 avoid floating point desync, other script tweaks
Vatten
parents: 8043
diff changeset
   401
		if(rand_weaponset_power <2)
7e71dba4e7f3 avoid floating point desync, other script tweaks
Vatten
parents: 8043
diff changeset
   402
		then
7e71dba4e7f3 avoid floating point desync, other script tweaks
Vatten
parents: 8043
diff changeset
   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
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
   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
7e71dba4e7f3 avoid floating point desync, other script tweaks
Vatten
parents: 8043
diff changeset
   407
				then
7e71dba4e7f3 avoid floating point desync, other script tweaks
Vatten
parents: 8043
diff changeset
   408
					random_weapon=0
7e71dba4e7f3 avoid floating point desync, other script tweaks
Vatten
parents: 8043
diff changeset
   409
				end
7e71dba4e7f3 avoid floating point desync, other script tweaks
Vatten
parents: 8043
diff changeset
   410
				random_weapon = random_weapon+1
7e71dba4e7f3 avoid floating point desync, other script tweaks
Vatten
parents: 8043
diff changeset
   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
7e71dba4e7f3 avoid floating point desync, other script tweaks
Vatten
parents: 8043
diff changeset
   414
		end
7e71dba4e7f3 avoid floating point desync, other script tweaks
Vatten
parents: 8043
diff changeset
   415
		--check again if  the power is enough
7e71dba4e7f3 avoid floating point desync, other script tweaks
Vatten
parents: 8043
diff changeset
   416
		if(rand_weaponset_power <1)
7e71dba4e7f3 avoid floating point desync, other script tweaks
Vatten
parents: 8043
diff changeset
   417
		then
7e71dba4e7f3 avoid floating point desync, other script tweaks
Vatten
parents: 8043
diff changeset
   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
7e71dba4e7f3 avoid floating point desync, other script tweaks
Vatten
parents: 8043
diff changeset
   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
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
   422
				then
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
   423
					random_weapon=0
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
   424
				end
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
   425
				random_weapon = random_weapon+1
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
   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
7e71dba4e7f3 avoid floating point desync, other script tweaks
Vatten
parents: 8043
diff changeset
   428
		end
10965
fb2b006ba476 merge git head and hg head
sheepluva
parents: 10956
diff changeset
   429
8618
7e71dba4e7f3 avoid floating point desync, other script tweaks
Vatten
parents: 8043
diff changeset
   430
		setTeamValue(GetHogTeamName(hog), "rand-done-turn", true)
7893
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
   431
	end
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
   432
end
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
   433
9805
1795c34ab8db Updated continental to the latest
Vatten
parents: 8618
diff changeset
   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
fb2b006ba476 merge git head and hg head
sheepluva
parents: 10956
diff changeset
   436
9805
1795c34ab8db Updated continental to the latest
Vatten
parents: 8618
diff changeset
   437
		local random_weapon = 0
1795c34ab8db Updated continental to the latest
Vatten
parents: 8618
diff changeset
   438
		local old_rand_weap = 0
1795c34ab8db Updated continental to the latest
Vatten
parents: 8618
diff changeset
   439
		local rand_weaponset_power = 0
10965
fb2b006ba476 merge git head and hg head
sheepluva
parents: 10956
diff changeset
   440
9805
1795c34ab8db Updated continental to the latest
Vatten
parents: 8618
diff changeset
   441
		local firstTurn=0
10965
fb2b006ba476 merge git head and hg head
sheepluva
parents: 10956
diff changeset
   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
fb2b006ba476 merge git head and hg head
sheepluva
parents: 10956
diff changeset
   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
fb2b006ba476 merge git head and hg head
sheepluva
parents: 10956
diff changeset
   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
fb2b006ba476 merge git head and hg head
sheepluva
parents: 10956
diff changeset
   451
9805
1795c34ab8db Updated continental to the latest
Vatten
parents: 8618
diff changeset
   452
		if(TotalRounds<0)
1795c34ab8db Updated continental to the latest
Vatten
parents: 8618
diff changeset
   453
		then
1795c34ab8db Updated continental to the latest
Vatten
parents: 8618
diff changeset
   454
			firstTurn=-TotalRounds
1795c34ab8db Updated continental to the latest
Vatten
parents: 8618
diff changeset
   455
		end
10965
fb2b006ba476 merge git head and hg head
sheepluva
parents: 10956
diff changeset
   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
1795c34ab8db Updated continental to the latest
Vatten
parents: 8618
diff changeset
   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
1795c34ab8db Updated continental to the latest
Vatten
parents: 8618
diff changeset
   460
			then
1795c34ab8db Updated continental to the latest
Vatten
parents: 8618
diff changeset
   461
				random_weapon=0
1795c34ab8db Updated continental to the latest
Vatten
parents: 8618
diff changeset
   462
			end
1795c34ab8db Updated continental to the latest
Vatten
parents: 8618
diff changeset
   463
			random_weapon = random_weapon+1
1795c34ab8db Updated continental to the latest
Vatten
parents: 8618
diff changeset
   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
1795c34ab8db Updated continental to the latest
Vatten
parents: 8618
diff changeset
   467
		old_rand_weap = random_weapon
10965
fb2b006ba476 merge git head and hg head
sheepluva
parents: 10956
diff changeset
   468
9805
1795c34ab8db Updated continental to the latest
Vatten
parents: 8618
diff changeset
   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
1795c34ab8db Updated continental to the latest
Vatten
parents: 8618
diff changeset
   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
1795c34ab8db Updated continental to the latest
Vatten
parents: 8618
diff changeset
   473
			then
1795c34ab8db Updated continental to the latest
Vatten
parents: 8618
diff changeset
   474
				random_weapon=0
1795c34ab8db Updated continental to the latest
Vatten
parents: 8618
diff changeset
   475
			end
1795c34ab8db Updated continental to the latest
Vatten
parents: 8618
diff changeset
   476
			random_weapon = random_weapon+1
1795c34ab8db Updated continental to the latest
Vatten
parents: 8618
diff changeset
   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
fb2b006ba476 merge git head and hg head
sheepluva
parents: 10956
diff changeset
   480
9805
1795c34ab8db Updated continental to the latest
Vatten
parents: 8618
diff changeset
   481
		--check again if  the power is enough
1795c34ab8db Updated continental to the latest
Vatten
parents: 8618
diff changeset
   482
		if(rand_weaponset_power <2)
1795c34ab8db Updated continental to the latest
Vatten
parents: 8618
diff changeset
   483
		then
1795c34ab8db Updated continental to the latest
Vatten
parents: 8618
diff changeset
   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
1795c34ab8db Updated continental to the latest
Vatten
parents: 8618
diff changeset
   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
1795c34ab8db Updated continental to the latest
Vatten
parents: 8618
diff changeset
   488
				then
1795c34ab8db Updated continental to the latest
Vatten
parents: 8618
diff changeset
   489
					random_weapon=0
1795c34ab8db Updated continental to the latest
Vatten
parents: 8618
diff changeset
   490
				end
1795c34ab8db Updated continental to the latest
Vatten
parents: 8618
diff changeset
   491
				random_weapon = random_weapon+1
1795c34ab8db Updated continental to the latest
Vatten
parents: 8618
diff changeset
   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
1795c34ab8db Updated continental to the latest
Vatten
parents: 8618
diff changeset
   495
		end
10965
fb2b006ba476 merge git head and hg head
sheepluva
parents: 10956
diff changeset
   496
9805
1795c34ab8db Updated continental to the latest
Vatten
parents: 8618
diff changeset
   497
		if(rand_weaponset_power <1)
1795c34ab8db Updated continental to the latest
Vatten
parents: 8618
diff changeset
   498
		then
1795c34ab8db Updated continental to the latest
Vatten
parents: 8618
diff changeset
   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
1795c34ab8db Updated continental to the latest
Vatten
parents: 8618
diff changeset
   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
1795c34ab8db Updated continental to the latest
Vatten
parents: 8618
diff changeset
   503
				then
1795c34ab8db Updated continental to the latest
Vatten
parents: 8618
diff changeset
   504
					random_weapon=0
1795c34ab8db Updated continental to the latest
Vatten
parents: 8618
diff changeset
   505
				end
1795c34ab8db Updated continental to the latest
Vatten
parents: 8618
diff changeset
   506
				random_weapon = random_weapon+1
1795c34ab8db Updated continental to the latest
Vatten
parents: 8618
diff changeset
   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
1795c34ab8db Updated continental to the latest
Vatten
parents: 8618
diff changeset
   509
		end
10965
fb2b006ba476 merge git head and hg head
sheepluva
parents: 10956
diff changeset
   510
9805
1795c34ab8db Updated continental to the latest
Vatten
parents: 8618
diff changeset
   511
		AddVisualGear(GetX(hog), GetY(hog)-30, vgtEvilTrace,0, false)
1795c34ab8db Updated continental to the latest
Vatten
parents: 8618
diff changeset
   512
		PlaySound(sndReinforce,hog)
1795c34ab8db Updated continental to the latest
Vatten
parents: 8618
diff changeset
   513
end
1795c34ab8db Updated continental to the latest
Vatten
parents: 8618
diff changeset
   514
1795c34ab8db Updated continental to the latest
Vatten
parents: 8618
diff changeset
   515
8618
7e71dba4e7f3 avoid floating point desync, other script tweaks
Vatten
parents: 8043
diff changeset
   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
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
   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
fb2b006ba476 merge git head and hg head
sheepluva
parents: 10956
diff changeset
   521
8618
7e71dba4e7f3 avoid floating point desync, other script tweaks
Vatten
parents: 8043
diff changeset
   522
	visualstuff=AddVisualGear(GetX(CurrentHedgehog), GetY(CurrentHedgehog)-5, vgtDust,0, false)
7e71dba4e7f3 avoid floating point desync, other script tweaks
Vatten
parents: 8043
diff changeset
   523
	v1, v2, v3, v4, v5, v6, v7, v8, v9, v10 = GetVisualGearValues(visualstuff)
7e71dba4e7f3 avoid floating point desync, other script tweaks
Vatten
parents: 8043
diff changeset
   524
	SetVisualGearValues(visualstuff, v1, v2, v3, v4, v5, v6, v7, 2, v9, GetClanColor(GetHogClan(CurrentHedgehog)))
10965
fb2b006ba476 merge git head and hg head
sheepluva
parents: 10956
diff changeset
   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
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
   527
end
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
   528
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
   529
--==========================run throw all hog/gear weapons ==========================
10965
fb2b006ba476 merge git head and hg head
sheepluva
parents: 10956
diff changeset
   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
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
   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
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
   538
	end
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
   539
end
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
   540
8618
7e71dba4e7f3 avoid floating point desync, other script tweaks
Vatten
parents: 8043
diff changeset
   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
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
   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
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
   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
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
   557
		end
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
   558
	end
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
   559
end
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
   560
10965
fb2b006ba476 merge git head and hg head
sheepluva
parents: 10956
diff changeset
   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
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
   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
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
   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
fb2b006ba476 merge git head and hg head
sheepluva
parents: 10956
diff changeset
   568
9805
1795c34ab8db Updated continental to the latest
Vatten
parents: 8618
diff changeset
   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
1795c34ab8db Updated continental to the latest
Vatten
parents: 8618
diff changeset
   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
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
   580
		end
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
   581
	end
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
   582
end
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
   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
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
   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
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
   611
	end
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
   612
end
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
   613
8618
7e71dba4e7f3 avoid floating point desync, other script tweaks
Vatten
parents: 8043
diff changeset
   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
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
   617
	then
9805
1795c34ab8db Updated continental to the latest
Vatten
parents: 8618
diff changeset
   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
1795c34ab8db Updated continental to the latest
Vatten
parents: 8618
diff changeset
   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
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
   625
	end
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
   626
end
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
   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
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
   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
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
   633
	end
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
   634
end
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
   635
8618
7e71dba4e7f3 avoid floating point desync, other script tweaks
Vatten
parents: 8043
diff changeset
   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
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
   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
7e71dba4e7f3 avoid floating point desync, other script tweaks
Vatten
parents: 8043
diff changeset
   643
			if(GetHealth(hog) > dmg)
7e71dba4e7f3 avoid floating point desync, other script tweaks
Vatten
parents: 8043
diff changeset
   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
7e71dba4e7f3 avoid floating point desync, other script tweaks
Vatten
parents: 8043
diff changeset
   646
				SetHealth(hog, GetHealth(hog)-dmg)
7e71dba4e7f3 avoid floating point desync, other script tweaks
Vatten
parents: 8043
diff changeset
   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
7e71dba4e7f3 avoid floating point desync, other script tweaks
Vatten
parents: 8043
diff changeset
   649
				SetHealth(hog, 0)
7e71dba4e7f3 avoid floating point desync, other script tweaks
Vatten
parents: 8043
diff changeset
   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
fb2b006ba476 merge git head and hg head
sheepluva
parents: 10956
diff changeset
   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
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
   655
	end
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
   656
end
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
   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
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
   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
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
   701
	end
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
   702
end
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
   703
8618
7e71dba4e7f3 avoid floating point desync, other script tweaks
Vatten
parents: 8043
diff changeset
   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
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
   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
12945
39b7b3ed619e Add healing visual effect + heal msg in scripts
Wuzzy <Wuzzy2@mail.ru>
parents: 12906
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
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
   714
	end
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
   715
end
9805
1795c34ab8db Updated continental to the latest
Vatten
parents: 8618
diff changeset
   716
1795c34ab8db Updated continental to the latest
Vatten
parents: 8618
diff changeset
   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
1795c34ab8db Updated continental to the latest
Vatten
parents: 8618
diff changeset
   719
	if(GetGearType(hog) == gtHedgehog)
1795c34ab8db Updated continental to the latest
Vatten
parents: 8618
diff changeset
   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
1795c34ab8db Updated continental to the latest
Vatten
parents: 8618
diff changeset
   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
1795c34ab8db Updated continental to the latest
Vatten
parents: 8618
diff changeset
   724
		end
1795c34ab8db Updated continental to the latest
Vatten
parents: 8618
diff changeset
   725
	end
1795c34ab8db Updated continental to the latest
Vatten
parents: 8618
diff changeset
   726
end
7893
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
   727
--============================================================================
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
   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
11520
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
fb2b006ba476 merge git head and hg head
sheepluva
parents: 10956
diff changeset
   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
fb2b006ba476 merge git head and hg head
sheepluva
parents: 10956
diff changeset
   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
fb2b006ba476 merge git head and hg head
sheepluva
parents: 10956
diff changeset
   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
fb2b006ba476 merge git head and hg head
sheepluva
parents: 10956
diff changeset
   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
fb2b006ba476 merge git head and hg head
sheepluva
parents: 10956
diff changeset
   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
fb2b006ba476 merge git head and hg head
sheepluva
parents: 10956
diff changeset
   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
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
   796
--set each weapons settings
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
   797
function onAmmoStoreInit()
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
   798
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
   799
	SetAmmo(amSkip, 9, 0, 0, 0)
10965
fb2b006ba476 merge git head and hg head
sheepluva
parents: 10956
diff changeset
   800
fb2b006ba476 merge git head and hg head
sheepluva
parents: 10956
diff changeset
   801
	for v,w in pairs(GLOBAL_WEAPONS_DAMAGE)
7893
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
   802
	do
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
   803
		SetAmmo(w[1], w[2], w[3], w[4], w[5])
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
   804
	end
10965
fb2b006ba476 merge git head and hg head
sheepluva
parents: 10956
diff changeset
   805
fb2b006ba476 merge git head and hg head
sheepluva
parents: 10956
diff changeset
   806
	for v,w in pairs(GLOBAL_WEAPONS_SUPPORT)
7893
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
   807
	do
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
   808
		SetAmmo(w[1], w[2], w[3], w[4], w[5])
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
   809
	end
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
   810
end
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
   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
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
   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
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
   816
end
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
   817
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
   818
--what happen when a turn starts
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
   819
function onNewTurn()
10965
fb2b006ba476 merge git head and hg head
sheepluva
parents: 10956
diff changeset
   820
8618
7e71dba4e7f3 avoid floating point desync, other script tweaks
Vatten
parents: 8043
diff changeset
   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
fb2b006ba476 merge git head and hg head
sheepluva
parents: 10956
diff changeset
   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
fb2b006ba476 merge git head and hg head
sheepluva
parents: 10956
diff changeset
   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
fb2b006ba476 merge git head and hg head
sheepluva
parents: 10956
diff changeset
   837
7893
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
   838
	--when all hogs are "placed"
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
   839
	if(GetCurAmmoType()~=amTeleport)
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
   840
	then
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
   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
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
   843
		then
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
   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
fb2b006ba476 merge git head and hg head
sheepluva
parents: 10956
diff changeset
   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
1795c34ab8db Updated continental to the latest
Vatten
parents: 8618
diff changeset
   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
1795c34ab8db Updated continental to the latest
Vatten
parents: 8618
diff changeset
   853
			end
7893
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
   854
		else
8618
7e71dba4e7f3 avoid floating point desync, other script tweaks
Vatten
parents: 8043
diff changeset
   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
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
   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
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
   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
fb2b006ba476 merge git head and hg head
sheepluva
parents: 10956
diff changeset
   863
8618
7e71dba4e7f3 avoid floating point desync, other script tweaks
Vatten
parents: 8043
diff changeset
   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
fb2b006ba476 merge git head and hg head
sheepluva
parents: 10956
diff changeset
   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
7e71dba4e7f3 avoid floating point desync, other script tweaks
Vatten
parents: 8043
diff changeset
   869
			then
7e71dba4e7f3 avoid floating point desync, other script tweaks
Vatten
parents: 8043
diff changeset
   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
7e71dba4e7f3 avoid floating point desync, other script tweaks
Vatten
parents: 8043
diff changeset
   872
			then
9805
1795c34ab8db Updated continental to the latest
Vatten
parents: 8618
diff changeset
   873
				if(getTeamValue(GetHogTeamName(CurrentHedgehog), "Antarctica2-turntick")==nil)
8618
7e71dba4e7f3 avoid floating point desync, other script tweaks
Vatten
parents: 8043
diff changeset
   874
				then
9805
1795c34ab8db Updated continental to the latest
Vatten
parents: 8618
diff changeset
   875
					setTeamValue(GetHogTeamName(CurrentHedgehog), "Antarctica2-turntick", 1)
8618
7e71dba4e7f3 avoid floating point desync, other script tweaks
Vatten
parents: 8043
diff changeset
   876
				end
10965
fb2b006ba476 merge git head and hg head
sheepluva
parents: 10956
diff changeset
   877
9805
1795c34ab8db Updated continental to the latest
Vatten
parents: 8618
diff changeset
   878
				if(getTeamValue(GetHogTeamName(CurrentHedgehog), "Antarctica2-turntick")>=4)
8618
7e71dba4e7f3 avoid floating point desync, other script tweaks
Vatten
parents: 8043
diff changeset
   879
				then
7e71dba4e7f3 avoid floating point desync, other script tweaks
Vatten
parents: 8043
diff changeset
   880
					AddAmmo(CurrentHedgehog,amPortalGun)
9805
1795c34ab8db Updated continental to the latest
Vatten
parents: 8618
diff changeset
   881
					AddAmmo(CurrentHedgehog,amPortalGun)
1795c34ab8db Updated continental to the latest
Vatten
parents: 8618
diff changeset
   882
					AddAmmo(CurrentHedgehog,amSineGun)
1795c34ab8db Updated continental to the latest
Vatten
parents: 8618
diff changeset
   883
					AddAmmo(CurrentHedgehog,amSineGun)
1795c34ab8db Updated continental to the latest
Vatten
parents: 8618
diff changeset
   884
					AddAmmo(CurrentHedgehog,amGirder)
1795c34ab8db Updated continental to the latest
Vatten
parents: 8618
diff changeset
   885
					AddAmmo(CurrentHedgehog,amSnowball)
1795c34ab8db Updated continental to the latest
Vatten
parents: 8618
diff changeset
   886
					setTeamValue(GetHogTeamName(CurrentHedgehog), "Antarctica2-turntick", 0)
8618
7e71dba4e7f3 avoid floating point desync, other script tweaks
Vatten
parents: 8043
diff changeset
   887
				end
9805
1795c34ab8db Updated continental to the latest
Vatten
parents: 8618
diff changeset
   888
				setTeamValue(GetHogTeamName(CurrentHedgehog), "Antarctica2-turntick", getTeamValue(GetHogTeamName(CurrentHedgehog), "Antarctica2-turntick")+1)
10965
fb2b006ba476 merge git head and hg head
sheepluva
parents: 10956
diff changeset
   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
7e71dba4e7f3 avoid floating point desync, other script tweaks
Vatten
parents: 8043
diff changeset
   891
			then
9805
1795c34ab8db Updated continental to the latest
Vatten
parents: 8618
diff changeset
   892
				if(getTeamValue(GetHogTeamName(CurrentHedgehog), "Asia-turntick")==nil)
1795c34ab8db Updated continental to the latest
Vatten
parents: 8618
diff changeset
   893
				then
1795c34ab8db Updated continental to the latest
Vatten
parents: 8618
diff changeset
   894
					setTeamValue(GetHogTeamName(CurrentHedgehog), "Asia-turntick", 1)
1795c34ab8db Updated continental to the latest
Vatten
parents: 8618
diff changeset
   895
				end
10965
fb2b006ba476 merge git head and hg head
sheepluva
parents: 10956
diff changeset
   896
9805
1795c34ab8db Updated continental to the latest
Vatten
parents: 8618
diff changeset
   897
				if(getTeamValue(GetHogTeamName(CurrentHedgehog), "Asia-turntick")>=2)
1795c34ab8db Updated continental to the latest
Vatten
parents: 8618
diff changeset
   898
				then
1795c34ab8db Updated continental to the latest
Vatten
parents: 8618
diff changeset
   899
					AddAmmo(CurrentHedgehog,amParachute)
1795c34ab8db Updated continental to the latest
Vatten
parents: 8618
diff changeset
   900
					setTeamValue(GetHogTeamName(CurrentHedgehog), "Asia-turntick", 0)
1795c34ab8db Updated continental to the latest
Vatten
parents: 8618
diff changeset
   901
				end
1795c34ab8db Updated continental to the latest
Vatten
parents: 8618
diff changeset
   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
1795c34ab8db Updated continental to the latest
Vatten
parents: 8618
diff changeset
   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
fb2b006ba476 merge git head and hg head
sheepluva
parents: 10956
diff changeset
   906
12416
edeae7661dca Lua refactor: Replace ParseCommand('setweap… with SetWeapon
Wuzzy <almikes@aol.com>
parents: 11520
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
7e71dba4e7f3 avoid floating point desync, other script tweaks
Vatten
parents: 8043
diff changeset
   909
			end
7893
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
   910
		end
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
   911
	end
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
   912
end
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
   913
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
   914
--what happens when you press "tab" (common button)
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
   915
function onSwitch()
10965
fb2b006ba476 merge git head and hg head
sheepluva
parents: 10956
diff changeset
   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
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
   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
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
   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
1795c34ab8db Updated continental to the latest
Vatten
parents: 8618
diff changeset
   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
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
   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
1795c34ab8db Updated continental to the latest
Vatten
parents: 8618
diff changeset
   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
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
   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
1795c34ab8db Updated continental to the latest
Vatten
parents: 8618
diff changeset
   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
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
   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
1795c34ab8db Updated continental to the latest
Vatten
parents: 8618
diff changeset
   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
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
  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
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
  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
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
  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
fb2b006ba476 merge git head and hg head
sheepluva
parents: 10956
diff changeset
  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
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
  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
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
  1061
	end
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
  1062
end
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
  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
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
  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
fb2b006ba476 merge git head and hg head
sheepluva
parents: 10956
diff changeset
  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
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
  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
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
  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
fb2b006ba476 merge git head and hg head
sheepluva
parents: 10956
diff changeset
  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
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
  1089
	end
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
  1090
end
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
  1091
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
  1092
function onGameTick20()
8618
7e71dba4e7f3 avoid floating point desync, other script tweaks
Vatten
parents: 8043
diff changeset
  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
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
  1095
	then
8618
7e71dba4e7f3 avoid floating point desync, other script tweaks
Vatten
parents: 8043
diff changeset
  1096
		if(GetCurAmmoType()==amSwitch)
7893
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
  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
7e71dba4e7f3 avoid floating point desync, other script tweaks
Vatten
parents: 8043
diff changeset
  1100
			PlaySound(sndMineTick)
7e71dba4e7f3 avoid floating point desync, other script tweaks
Vatten
parents: 8043
diff changeset
  1101
		else
10965
fb2b006ba476 merge git head and hg head
sheepluva
parents: 10956
diff changeset
  1102
			for v,w in pairs(GLOBAL_CONTINENT_INFORMATION)
8618
7e71dba4e7f3 avoid floating point desync, other script tweaks
Vatten
parents: 8043
diff changeset
  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
7e71dba4e7f3 avoid floating point desync, other script tweaks
Vatten
parents: 8043
diff changeset
  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
7e71dba4e7f3 avoid floating point desync, other script tweaks
Vatten
parents: 8043
diff changeset
  1110
				end
7e71dba4e7f3 avoid floating point desync, other script tweaks
Vatten
parents: 8043
diff changeset
  1111
			end
7893
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
  1112
		end
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
  1113
	end
10965
fb2b006ba476 merge git head and hg head
sheepluva
parents: 10956
diff changeset
  1114
8618
7e71dba4e7f3 avoid floating point desync, other script tweaks
Vatten
parents: 8043
diff changeset
  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
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
  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
7e71dba4e7f3 avoid floating point desync, other script tweaks
Vatten
parents: 8043
diff changeset
  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
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
  1121
		end
10965
fb2b006ba476 merge git head and hg head
sheepluva
parents: 10956
diff changeset
  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
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
  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
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
  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
7e71dba4e7f3 avoid floating point desync, other script tweaks
Vatten
parents: 8043
diff changeset
  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
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
  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
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
  1135
		end
10965
fb2b006ba476 merge git head and hg head
sheepluva
parents: 10956
diff changeset
  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
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
  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
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
  1141
	end
10965
fb2b006ba476 merge git head and hg head
sheepluva
parents: 10956
diff changeset
  1142
8618
7e71dba4e7f3 avoid floating point desync, other script tweaks
Vatten
parents: 8043
diff changeset
  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
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
  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
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
  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
fb2b006ba476 merge git head and hg head
sheepluva
parents: 10956
diff changeset
  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
fb2b006ba476 merge git head and hg head
sheepluva
parents: 10956
diff changeset
  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
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
  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
fb2b006ba476 merge git head and hg head
sheepluva
parents: 10956
diff changeset
  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
fb2b006ba476 merge git head and hg head
sheepluva
parents: 10956
diff changeset
  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
1795c34ab8db Updated continental to the latest
Vatten
parents: 8618
diff changeset
  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
fb2b006ba476 merge git head and hg head
sheepluva
parents: 10956
diff changeset
  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
fb2b006ba476 merge git head and hg head
sheepluva
parents: 10956
diff changeset
  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
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
  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
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
  1207
		end
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
  1208
	end
10965
fb2b006ba476 merge git head and hg head
sheepluva
parents: 10956
diff changeset
  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
fb2b006ba476 merge git head and hg head
sheepluva
parents: 10956
diff changeset
  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
fb2b006ba476 merge git head and hg head
sheepluva
parents: 10956
diff changeset
  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
12416
edeae7661dca Lua refactor: Replace ParseCommand('setweap… with SetWeapon
Wuzzy <almikes@aol.com>
parents: 11520
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
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
  1233
end
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
  1234
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
  1235
--if you used hogswitch or any similar weapon, dont enable any weaponchange
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
  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
fb2b006ba476 merge git head and hg head
sheepluva
parents: 10956
diff changeset
  1238
7893
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
  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
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
  1241
	then
10527
285b428f391c desync fix for Continental Supplies
Vatten
parents: 10453
diff changeset
  1242
		EndTurn()
10965
fb2b006ba476 merge git head and hg head
sheepluva
parents: 10956
diff changeset
  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
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
  1247
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
  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
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
  1250
		PlaySound(sndParachute)
10965
fb2b006ba476 merge git head and hg head
sheepluva
parents: 10956
diff changeset
  1251
9805
1795c34ab8db Updated continental to the latest
Vatten
parents: 8618
diff changeset
  1252
		RemoveWeapon(CurrentHedgehog,amSeduction)
8618
7e71dba4e7f3 avoid floating point desync, other script tweaks
Vatten
parents: 8043
diff changeset
  1253
7893
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
  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
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
  1256
	then
8618
7e71dba4e7f3 avoid floating point desync, other script tweaks
Vatten
parents: 8043
diff changeset
  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
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
  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)
12945
39b7b3ed619e Add healing visual effect + heal msg in scripts
Wuzzy <Wuzzy2@mail.ru>
parents: 12906
diff changeset
  1262
			HealHog(CurrentHedgehog, GLOBAL_TEMP_VALUE)
7893
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
  1263
			PlaySound(sndHellish)
10965
fb2b006ba476 merge git head and hg head
sheepluva
parents: 10956
diff changeset
  1264
8618
7e71dba4e7f3 avoid floating point desync, other script tweaks
Vatten
parents: 8043
diff changeset
  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
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
  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
fb2b006ba476 merge git head and hg head
sheepluva
parents: 10956
diff changeset
  1278
8618
7e71dba4e7f3 avoid floating point desync, other script tweaks
Vatten
parents: 8043
diff changeset
  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
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
  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
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
  1284
			then
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
  1285
				AddGear(0, 0, gtWaterUp, 0, 0,0,0)
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
  1286
				PlaySound(sndWarp)
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
  1287
				PlaySound(sndMolotov)
10965
fb2b006ba476 merge git head and hg head
sheepluva
parents: 10956
diff changeset
  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
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
  1292
			else
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
  1293
				HogSay(CurrentHedgehog, loc("Hogs in sight!"), SAY_SAY)
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
  1294
			end
10965
fb2b006ba476 merge git head and hg head
sheepluva
parents: 10956
diff changeset
  1295
8618
7e71dba4e7f3 avoid floating point desync, other script tweaks
Vatten
parents: 8043
diff changeset
  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
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
  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
1795c34ab8db Updated continental to the latest
Vatten
parents: 8618
diff changeset
  1302
			then
1795c34ab8db Updated continental to the latest
Vatten
parents: 8618
diff changeset
  1303
				PlaySound(sndThrowRelease)
1795c34ab8db Updated continental to the latest
Vatten
parents: 8618
diff changeset
  1304
				AddGear(GetX(CurrentHedgehog), GetY(CurrentHedgehog)-20, gtCluster, 0, 0, -1000000, 32)
1795c34ab8db Updated continental to the latest
Vatten
parents: 8618
diff changeset
  1305
			end
7893
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
  1306
		end
10965
fb2b006ba476 merge git head and hg head
sheepluva
parents: 10956
diff changeset
  1307
10527
285b428f391c desync fix for Continental Supplies
Vatten
parents: 10453
diff changeset
  1308
		EndTurn()
10965
fb2b006ba476 merge git head and hg head
sheepluva
parents: 10956
diff changeset
  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
fb2b006ba476 merge git head and hg head
sheepluva
parents: 10956
diff changeset
  1313
9805
1795c34ab8db Updated continental to the latest
Vatten
parents: 8618
diff changeset
  1314
		RemoveWeapon(CurrentHedgehog,amHammer)
10965
fb2b006ba476 merge git head and hg head
sheepluva
parents: 10956
diff changeset
  1315
8618
7e71dba4e7f3 avoid floating point desync, other script tweaks
Vatten
parents: 8043
diff changeset
  1316
	elseif(GetCurAmmoType() == amVampiric)
7e71dba4e7f3 avoid floating point desync, other script tweaks
Vatten
parents: 8043
diff changeset
  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
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
  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
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
  1322
	end
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
  1323
end
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
  1324
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
  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
fb2b006ba476 merge git head and hg head
sheepluva
parents: 10956
diff changeset
  1327
8618
7e71dba4e7f3 avoid floating point desync, other script tweaks
Vatten
parents: 8043
diff changeset
  1328
	--track the gears im using
10965
fb2b006ba476 merge git head and hg head
sheepluva
parents: 10956
diff changeset
  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
fb2b006ba476 merge git head and hg head
sheepluva
parents: 10956
diff changeset
  1333
7893
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
  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
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
  1336
	then
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
  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
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
  1339
	elseif(GetGearType(gearUid)==gtSMine)
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
  1340
	then
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
  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
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
  1343
		then
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
  1344
			SetState(CurrentHedgehog, gstHHDriven+gstMoving)
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
  1345
			SetGearPosition(CurrentHedgehog, GetX(CurrentHedgehog),GetY(CurrentHedgehog)-3)
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
  1346
			SetGearVelocity(CurrentHedgehog, vx, vy)
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
  1347
			DeleteGear(gearUid)
10965
fb2b006ba476 merge git head and hg head
sheepluva
parents: 10956
diff changeset
  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
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
  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
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
  1352
			DeleteGear(gearUid)
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
  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
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
  1355
	elseif(GetGearType(gearUid)==gtSniperRifleShot)
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
  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
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
  1359
		then
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
  1360
			SetHealth(gearUid, 1)
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
  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
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
  1363
	elseif(GetGearType(gearUid)==gtShotgunShot)
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
  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
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
  1366
		then
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
  1367
			AddVisualGear(GetX(gearUid), GetY(gearUid), vgtFeather, 0, false)
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
  1368
			AddVisualGear(GetX(gearUid), GetY(gearUid), vgtFeather, 0, false)
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
  1369
			AddVisualGear(GetX(gearUid), GetY(gearUid), vgtFeather, 0, false)
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
  1370
			PlaySound(sndBirdyLay)
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
  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
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
  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
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
  1376
	then
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
  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
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
  1379
		SetGearMessage(e_health, 2)
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
  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
fb2b006ba476 merge git head and hg head
sheepluva
parents: 10956
diff changeset
  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
fb2b006ba476 merge git head and hg head
sheepluva
parents: 10956
diff changeset
  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
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
  1405
	elseif(GetGearType(gearUid)==gtParachute)
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
  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
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
  1411
	end
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
  1412
end
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
  1413
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
  1414
function onGearDelete(gearUid)
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
  1415
10965
fb2b006ba476 merge git head and hg head
sheepluva
parents: 10956
diff changeset
  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
fb2b006ba476 merge git head and hg head
sheepluva
parents: 10956
diff changeset
  1419
9805
1795c34ab8db Updated continental to the latest
Vatten
parents: 8618
diff changeset
  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
1795c34ab8db Updated continental to the latest
Vatten
parents: 8618
diff changeset
  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
1795c34ab8db Updated continental to the latest
Vatten
parents: 8618
diff changeset
  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
1795c34ab8db Updated continental to the latest
Vatten
parents: 8618
diff changeset
  1426
			end
10965
fb2b006ba476 merge git head and hg head
sheepluva
parents: 10956
diff changeset
  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
1795c34ab8db Updated continental to the latest
Vatten
parents: 8618
diff changeset
  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
fb2b006ba476 merge git head and hg head
sheepluva
parents: 10956
diff changeset
  1431
8618
7e71dba4e7f3 avoid floating point desync, other script tweaks
Vatten
parents: 8043
diff changeset
  1432
	--north american lipstick
7893
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
  1433
	if(GetGearType(gearUid)==gtSniperRifleShot )
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
  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
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
  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
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
  1440
		end
8618
7e71dba4e7f3 avoid floating point desync, other script tweaks
Vatten
parents: 8043
diff changeset
  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
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
  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
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
  1445
		SetGearPosition(CurrentHedgehog, GetX(gearUid), GetY(gearUid)+7)
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
  1446
		PlaySound(sndWarp)
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
  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
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
  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
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
  1452
		AddVisualGear(GetX(gearUid), GetY(gearUid), vgtExplosion, 0, false)
10965
fb2b006ba476 merge git head and hg head
sheepluva
parents: 10956
diff changeset
  1453
8618
7e71dba4e7f3 avoid floating point desync, other script tweaks
Vatten
parents: 8043
diff changeset
  1454
	--asian special
7893
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
  1455
	elseif(GetGearType(gearUid)==gtSnowball and GetGearMessage(gearUid)==1)
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
  1456
	then
8618
7e71dba4e7f3 avoid floating point desync, other script tweaks
Vatten
parents: 8043
diff changeset
  1457
		AddGear(GetX(gearUid), GetY(gearUid), gtCluster, 0, 0, 0, 22)
10965
fb2b006ba476 merge git head and hg head
sheepluva
parents: 10956
diff changeset
  1458
8618
7e71dba4e7f3 avoid floating point desync, other script tweaks
Vatten
parents: 8043
diff changeset
  1459
	--europe special
7893
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
  1460
	elseif(GetGearType(gearUid)==gtCluster and GetGearMessage(gearUid)==2)
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
  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
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
  1465
		AddVisualGear(GetX(gearUid), GetY(gearUid), vgtExplosion, 0, false)
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
  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
7e71dba4e7f3 avoid floating point desync, other script tweaks
Vatten
parents: 8043
diff changeset
  1473
	--asia (using para)
7893
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
  1474
	elseif(GetGearType(gearUid)==gtParachute)
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
  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
50e8f6714b22 new script specialising in altering weapon behaviour
Vatten
parents:
diff changeset
  1480
	end
7936
9f44e39d856c Script typos
nemo
parents: 7895
diff changeset
  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
]]