# HG changeset patch # User nemo # Date 1396115866 14400 # Node ID bbeb1e9aaa6524ebb23e5e6a2b1b5b489e6e8b4d # Parent 1d7112ccb3e9587c6769c2e6e3127c5c2ba3cdc0 param for original highlander mode - right now just allows getting another copy of a weapon you already had, but had used that turn. diff -r 1d7112ccb3e9 -r bbeb1e9aaa65 share/hedgewars/Data/Scripts/Multiplayer/Highlander.lua --- a/share/hedgewars/Data/Scripts/Multiplayer/Highlander.lua Fri Mar 28 23:04:23 2014 +0400 +++ b/share/hedgewars/Data/Scripts/Multiplayer/Highlander.lua Sat Mar 29 13:57:46 2014 -0400 @@ -89,6 +89,7 @@ HedgewarsScriptLoad("/Scripts/Locale.lua") HedgewarsScriptLoad("/Scripts/Tracker.lua") +HedgewarsScriptLoad("/Scripts/Params.lua") -- These define weps allowed by the script. At present Tardis and Resurrection is banned for example -- These were arbitrarily defined out-of-order in initial script, so that was preserved here, resulting @@ -132,6 +133,13 @@ local someHog = nil -- just for looking up the weps +local mode = nil + +function onParameters() + parseParams() + mode = params["mode"] +end + function CheckForWeaponSwap() if GetCurAmmoType() ~= lastWep then shotsFired = 0 @@ -212,7 +220,7 @@ for w,c in pairs(wepArray) do val = getGearValue(gear,w) - if val ~= 0 and wepArray[w] ~= 9 and getGearValue(CurrentHedgehog, w) == 0 then + if val ~= 0 and (mode == "orig" or (wepArray[w] ~= 9 and getGearValue(CurrentHedgehog, w) == 0)) then setGearValue(CurrentHedgehog, w, val) -- if you are using multi-shot weapon, gimme one more