21 |
21 |
22 HedgewarsScriptLoad("/Scripts/Locale.lua") |
22 HedgewarsScriptLoad("/Scripts/Locale.lua") |
23 HedgewarsScriptLoad("/Scripts/Tracker.lua") |
23 HedgewarsScriptLoad("/Scripts/Tracker.lua") |
24 HedgewarsScriptLoad("/Scripts/Params.lua") |
24 HedgewarsScriptLoad("/Scripts/Params.lua") |
25 |
25 |
26 -- These define weps allowed by the script. |
26 -- These define weapons allowed by the script. |
27 -- These were arbitrarily defined out-of-order in initial script, so that was preserved here, resulting |
|
28 -- in a moderately odd syntax. |
|
29 local atkWeps = { |
27 local atkWeps = { |
30 [amBazooka]=true, [amBee]=true, [amMortar]=true, [amDrill]=true, [amSnowball]=true, |
28 [amBazooka]=true, [amBee]=true, [amMortar]=true, [amDrill]=true, [amSnowball]=true, |
31 [amGrenade]=true, [amClusterBomb]=true, [amMolotov]=true, [amWatermelon]=true, |
29 [amGrenade]=true, [amClusterBomb]=true, [amMolotov]=true, [amWatermelon]=true, |
32 [amHellishBomb]=true, [amGasBomb]=true, [amShotgun]=true, [amDEagle]=true, |
30 [amHellishBomb]=true, [amGasBomb]=true, [amShotgun]=true, [amDEagle]=true, |
33 [amFlamethrower]=true, [amSniperRifle]=true, [amSineGun]=true, [amMinigun]=true, |
31 [amFlamethrower]=true, [amSniperRifle]=true, [amSineGun]=true, [amMinigun]=true, |
257 Goals = Goals .. loc("No Multi-Use: Once you used an ammo, you can’t take it again in this turn") |
255 Goals = Goals .. loc("No Multi-Use: Once you used an ammo, you can’t take it again in this turn") |
258 end |
256 end |
259 end |
257 end |
260 |
258 |
261 function onGameStart() |
259 function onGameStart() |
|
260 -- Remove air strikes in maps with border |
|
261 if MapHasBorder() or GetGameFlag(gfBorder) then |
|
262 atkWeps[amAirAttack] = nil |
|
263 atkWeps[amMineStrike] = nil |
|
264 atkWeps[amNapalm] = nil |
|
265 atkWeps[amDrillStrike] = nil |
|
266 atkWeps[amPiano] = nil |
|
267 end |
|
268 -- Disable redundant utilities |
|
269 if GetGameFlag(gfVampiric) then |
|
270 utilWeps[amVampiric] = nil |
|
271 end |
|
272 if GetGameFlag(gfLowGravity) then |
|
273 utilWeps[amLowGravity] = nil |
|
274 end |
|
275 if GetGameFlag(gfLaserSight) then |
|
276 utilWeps[amLaserSight] = nil |
|
277 end |
|
278 if GetGameFlag(gfInvulnerable) then |
|
279 utilWeps[amInvulnerable] = nil |
|
280 end |
|
281 if TurnTime > 999000 then |
|
282 utilWeps[amExtraTime] = nil |
|
283 end |
262 utilChoices[amSkip] = 0 |
284 utilChoices[amSkip] = 0 |
263 local c = 0 |
285 local c = 0 |
264 for i = 0, AmmoTypeMax do |
286 for i = 0, AmmoTypeMax do |
265 if i ~= amNothing then |
287 if i ~= amNothing then |
266 atkChoices[i] = 0 |
288 atkChoices[i] = 0 |