share/hedgewars/Data/Scripts/Multiplayer/Highlander.lua
author mikade
Sun, 13 Nov 2011 17:52:50 +0200
changeset 6349 b10715d6b986
child 6378 b812bfcfeb49
permissions -rw-r--r--
Correct outdated feedback. Move mudball into utility bundle.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
6349
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
     1
--------------------------------
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
     2
-- HIGHLANDER / HOGS OF WAR
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
     3
-- version 0.3
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
     4
-- by mikade
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
     5
--------------------------------
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
     6
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
     7
-----------
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
     8
--0.1
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
     9
-----------
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
    10
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
    11
-- concept test
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
    12
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
    13
-----------
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
    14
--0.2
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
    15
-----------
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
    16
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
    17
-- remove tardis till Henek fixes his tracker
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
    18
-- change wep crates to health crates
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
    19
-- reset arb turntimevalue
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
    20
-- include randomOrder
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
    21
-- Until fixed .17 methods come out, remove switches and resurrector
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
    22
-- on request, removed kamikaze and piano weapons
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
    23
-- provisional fixing of bugs that can't actually be fixed yet
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
    24
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
    25
-----------
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
    26
--0.3
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
    27
-----------
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
    28
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
    29
-- meh, update incorrect display
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
    30
-- may change this in the future to have switches
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
    31
-- but for now people are used to it without, so~
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
    32
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
    33
-- mudball is now counted as a utility
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
    34
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
    35
----------------
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
    36
-- other ideas
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
    37
----------------
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
    38
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
    39
-- circles to mark hogs with more than 4 weapons
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
    40
-- health crate and switch drops
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
    41
-- hogs start with 1 weap and 1 utility each (some are rarer than others?)
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
    42
-- could always create a "donor card" mini circle instead of automatic disposal
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
    43
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
    44
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
    45
loadfile(GetDataPath() .. "Scripts/Locale.lua")()
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
    46
loadfile(GetDataPath() .. "Scripts/Tracker.lua")()
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
    47
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
    48
local wepArray = {}
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
    49
local wepArrayCount = 0
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
    50
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
    51
local atkArray = {}
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
    52
local atkCount = 0
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
    53
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
    54
local utilArray = {}
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
    55
local utilArrayCount = 0
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
    56
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
    57
local currName
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
    58
local lastName
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
    59
local started = false
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
    60
local switchStage = 0
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
    61
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
    62
function StartingSetUp(gear)
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
    63
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
    64
	for i = 0, (wepArrayCount-1) do
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
    65
		setGearValue(gear,wepArray[i],0)
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
    66
	end
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
    67
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
    68
	i = GetRandom(atkArrayCount)
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
    69
	setGearValue(gear,atkArray[i],1)
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
    70
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
    71
	i = GetRandom(utilArrayCount)
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
    72
	setGearValue(gear,utilArray[i],1)
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
    73
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
    74
	SetHealth(gear, 100)
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
    75
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
    76
end
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
    77
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
    78
--[[function SaveWeapons(gear)
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
    79
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
    80
	-
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
    81
	for i = 0, (wepArrayCount-1) do
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
    82
		setGearValue(gear, wepArray[i], GetAmmoCount(gear, wepArray[i]) )
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
    83
		 --AddAmmo(gear, wepArray[i], getGearValue(gear,wepArray[i]) )
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
    84
	end
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
    85
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
    86
end]]
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
    87
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
    88
function ConvertValues(gear)
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
    89
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
    90
	for i = 0, (wepArrayCount-1) do
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
    91
		AddAmmo(gear, wepArray[i], getGearValue(gear,wepArray[i]) )
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
    92
	end
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
    93
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
    94
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
    95
end
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
    96
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
    97
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
    98
function TransferWeps(gear)
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
    99
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
   100
	if CurrentHedgehog ~= nil then
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
   101
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
   102
		for i = 0, (wepArrayCount-1) do
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
   103
			val = getGearValue(gear,wepArray[i])
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
   104
			if val ~= 0 then
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
   105
				setGearValue(CurrentHedgehog, wepArray[i], val)
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
   106
				AddAmmo(CurrentHedgehog, wepArray[i], val)
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
   107
			end
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
   108
		end
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
   109
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
   110
	end
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
   111
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
   112
end
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
   113
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
   114
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
   115
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
   116
function onGameInit()
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
   117
	GameFlags = gfInfAttack + gfRandomOrder
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
   118
	HealthCaseProb = 100
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
   119
end
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
   120
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
   121
function onGameStart()
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
   122
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
   123
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
   124
	ShowMission	(
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
   125
				loc("HIGHLANDER"),
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
   126
				loc("Not all hogs are born equal."),
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
   127
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
   128
				"- " .. loc("Eliminate enemy hogs and take their weapons.") .. "|" ..
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
   129
				"- " .. loc("Per-Hog Ammo") .. "|" ..
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
   130
				"- " .. loc("Weapons reset.") .. "|" ..
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
   131
				"- " .. loc("Unlimited Attacks") .. "|" ..
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
   132
				"", 4, 4000
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
   133
				)
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
   134
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
   135
	atkArray[0] = amBazooka
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
   136
	atkArray[1] = amBee
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
   137
	atkArray[2] = amMortar
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
   138
	atkArray[3] = amDrill
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
   139
	--atkArray[4] = amSnowball
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
   140
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
   141
	atkArray[4] = amGrenade
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
   142
	atkArray[5] = amClusterBomb
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
   143
	atkArray[6] = amMolotov
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
   144
	atkArray[7] = amWatermelon
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
   145
	atkArray[8] = amHellishBomb
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
   146
	atkArray[9] = amGasBomb
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
   147
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
   148
	atkArray[10] = amShotgun
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
   149
	atkArray[11] = amDEagle
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
   150
	atkArray[12] = amFlamethrower
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
   151
	atkArray[13] = amSniperRifle
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
   152
	atkArray[14] = amSineGun
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
   153
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
   154
	atkArray[15] = amFirePunch
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
   155
	atkArray[16] = amWhip
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
   156
	atkArray[17] = amBaseballBat
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
   157
	--atkArray[19] = amKamikaze
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
   158
	atkArray[18] = amBirdy
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
   159
	atkArray[19] = amSeduction
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
   160
	atkArray[20] = amHammer
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
   161
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
   162
	atkArray[21] = amMine
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
   163
	atkArray[22] = amDynamite
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
   164
	atkArray[23] = amCake
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
   165
	atkArray[24] = amBallgun
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
   166
	atkArray[25] = amRCPlane
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
   167
	atkArray[26] = amSMine
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
   168
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
   169
	atkArray[27] = amAirAttack
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
   170
	atkArray[28] = amMineStrike
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
   171
	atkArray[29] = amDrillStrike
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
   172
	atkArray[30] = amNapalm
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
   173
	--atkArray[32] = amPiano
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
   174
	atkArray[31] = amLandGun
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
   175
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
   176
	--atkArray[33] = amBirdy
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
   177
	--atkArray[34] = amLandGun
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
   178
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
   179
	atkArrayCount = 32
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
   180
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
   181
	-------------------------------
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
   182
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
   183
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
   184
	wepArray[0] = amBazooka
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
   185
	wepArray[1] = amBee
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
   186
	wepArray[2] = amMortar
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
   187
	wepArray[3] = amDrill
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
   188
	wepArray[4] = amSnowball
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
   189
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
   190
	wepArray[5] = amGrenade
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
   191
	wepArray[6] = amClusterBomb
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
   192
	wepArray[7] = amMolotov
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
   193
	wepArray[8] = amWatermelon
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
   194
	wepArray[9] = amHellishBomb
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
   195
	wepArray[10] = amGasBomb
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
   196
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
   197
	wepArray[11] = amShotgun
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
   198
	wepArray[12] = amDEagle
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
   199
	wepArray[13] = amFlamethrower
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
   200
	wepArray[14] = amSniperRifle
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
   201
	wepArray[15] = amSineGun
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
   202
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
   203
	wepArray[16] = amFirePunch
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
   204
	wepArray[17] = amWhip
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
   205
	wepArray[18] = amBaseballBat
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
   206
	--wepArray[19] = amKamikaze
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
   207
	wepArray[19] = amExtraTime
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
   208
	wepArray[20] = amSeduction
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
   209
	wepArray[21] = amHammer
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
   210
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
   211
	wepArray[22] = amMine
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
   212
	wepArray[23] = amDynamite
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
   213
	wepArray[24] = amCake
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
   214
	wepArray[25] = amBallgun
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
   215
	wepArray[26] = amRCPlane
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
   216
	wepArray[27] = amSMine
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
   217
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
   218
	wepArray[28] = amAirAttack
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
   219
	wepArray[29] = amMineStrike
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
   220
	wepArray[30] = amDrillStrike
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
   221
	wepArray[31] = amNapalm
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
   222
	--wepArray[32] = amPiano
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
   223
	wepArray[32] = amExtraDamage
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
   224
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
   225
	wepArray[33] = amBirdy
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
   226
	wepArray[34] = amLandGun
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
   227
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
   228
	wepArray[35] = amBlowTorch
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
   229
	wepArray[36] = amPickHammer
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
   230
	wepArray[37] = amGirder
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
   231
	wepArray[38] = amPortalGun
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
   232
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
   233
	wepArray[39] = amRope
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
   234
	wepArray[40] = amParachute
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
   235
	wepArray[41] = amTeleport
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
   236
	wepArray[42] = amJetpack
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
   237
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
   238
	wepArray[43] = amInvulnerable
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
   239
	wepArray[44] = amLaserSight
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
   240
	wepArray[45] = amVampiric
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
   241
	----resurrector used to be here
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
   242
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
   243
	wepArray[46] = amLowGravity
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
   244
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
   245
	--wepArray[47] = amExtraDamage -- see 19
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
   246
	--wepArray[48] = amExtraTime	-- see 32
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
   247
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
   248
	--wepArray[49] = amResurrector
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
   249
	--wepArray[50] = amTardis
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
   250
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
   251
	wepArrayCount = 47
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
   252
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
   253
	----------------------------
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
   254
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
   255
	utilArray[0] = amBlowTorch
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
   256
	utilArray[1] = amPickHammer
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
   257
	utilArray[2] = amGirder
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
   258
	utilArray[3] = amPortalGun
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
   259
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
   260
	utilArray[4] = amRope
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
   261
	utilArray[5] = amParachute
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
   262
	utilArray[6] = amTeleport
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
   263
	utilArray[7] = amJetpack
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
   264
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
   265
	utilArray[8] = amInvulnerable
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
   266
	utilArray[9] = amLaserSight
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
   267
	utilArray[10] = amVampiric
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
   268
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
   269
	utilArray[11] = amLowGravity
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
   270
	utilArray[12] = amExtraDamage
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
   271
	utilArray[13] = amExtraTime
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
   272
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
   273
	utilArray[14] = amSnowball
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
   274
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
   275
	--utilArray[14] = amResurrector
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
   276
	--utilArray[15] = amTardis
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
   277
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
   278
	utilArrayCount = 15
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
   279
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
   280
	runOnGears(StartingSetUp)
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
   281
	runOnGears(ConvertValues)
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
   282
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
   283
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
   284
end
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
   285
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
   286
function onNewTurn()
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
   287
--
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
   288
end
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
   289
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
   290
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
   291
function onGameTick()
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
   292
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
   293
	if (CurrentHedgehog ~= nil) then
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
   294
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
   295
		currName = GetHogName(CurrentHedgehog)
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
   296
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
   297
		if (currName ~= lastName) then
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
   298
			AddCaption(loc("Switched to ") .. currName .. "!")
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
   299
			ConvertValues(CurrentHedgehog)
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
   300
		end
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
   301
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
   302
		lastName = currName
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
   303
	end
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
   304
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
   305
end
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
   306
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
   307
--[[function onHogHide(gear)
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
   308
	-- waiting for Henek
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
   309
end
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
   310
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
   311
function onHogRestore(gear)
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
   312
	-- waiting for Henek
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
   313
end]]
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
   314
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
   315
function onGearAdd(gear)
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
   316
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
   317
	--if GetGearType(gear) == gtSwitcher then
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
   318
	--	SaveWeapons(CurrentHedgehog)
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
   319
	--end
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
   320
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
   321
	if (GetGearType(gear) == gtHedgehog) then
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
   322
		trackGear(gear)
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
   323
	end
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
   324
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
   325
end
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
   326
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
   327
function onGearDelete(gear)
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
   328
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
   329
	if (GetGearType(gear) == gtHedgehog) then --or (GetGearType(gear) == gtResurrector) then
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
   330
		TransferWeps(gear)
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
   331
		trackDeletion(gear)
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
   332
	end
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
   333
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
   334
end
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
   335
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
   336
function onAmmoStoreInit()
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
   337
	SetAmmo(amSkip, 9, 0, 0, 0)
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
   338
	--SetAmmo(amSwitch, 9, 0, 0, 0) -------1
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
   339
end
b10715d6b986 Correct outdated feedback.
mikade
parents:
diff changeset
   340