# HG changeset patch # User Wuzzy # Date 1543191190 -3600 # Node ID 0855344f54a7e9c041bd394e109df3cce73612a6 # Parent fd8e0e52d5bd649b0f1763a45fdb7d87e9428871 Highlander: Fix hogs receiving air strikes in maps with border diff -r fd8e0e52d5bd -r 0855344f54a7 ChangeLog.txt --- a/ChangeLog.txt Mon Nov 26 02:50:54 2018 +0300 +++ b/ChangeLog.txt Mon Nov 26 01:13:10 2018 +0100 @@ -97,6 +97,7 @@ Highlander: * Fix all hogs receiving a free teleport after hog placement phase + * Fix hogs receiving air strikes in maps with border Racer/TechRacer: * Fix rare bug in TechRacer causing crates and other objects to not appear on start of turn diff -r fd8e0e52d5bd -r 0855344f54a7 share/hedgewars/Data/Scripts/Multiplayer/Highlander.lua --- a/share/hedgewars/Data/Scripts/Multiplayer/Highlander.lua Mon Nov 26 02:50:54 2018 +0300 +++ b/share/hedgewars/Data/Scripts/Multiplayer/Highlander.lua Mon Nov 26 01:13:10 2018 +0100 @@ -23,9 +23,7 @@ HedgewarsScriptLoad("/Scripts/Tracker.lua") HedgewarsScriptLoad("/Scripts/Params.lua") --- These define weps allowed by the script. --- These were arbitrarily defined out-of-order in initial script, so that was preserved here, resulting --- in a moderately odd syntax. +-- These define weapons allowed by the script. local atkWeps = { [amBazooka]=true, [amBee]=true, [amMortar]=true, [amDrill]=true, [amSnowball]=true, [amGrenade]=true, [amClusterBomb]=true, [amMolotov]=true, [amWatermelon]=true, @@ -259,6 +257,30 @@ end function onGameStart() + -- Remove air strikes in maps with border + if MapHasBorder() or GetGameFlag(gfBorder) then + atkWeps[amAirAttack] = nil + atkWeps[amMineStrike] = nil + atkWeps[amNapalm] = nil + atkWeps[amDrillStrike] = nil + atkWeps[amPiano] = nil + end + -- Disable redundant utilities + if GetGameFlag(gfVampiric) then + utilWeps[amVampiric] = nil + end + if GetGameFlag(gfLowGravity) then + utilWeps[amLowGravity] = nil + end + if GetGameFlag(gfLaserSight) then + utilWeps[amLaserSight] = nil + end + if GetGameFlag(gfInvulnerable) then + utilWeps[amInvulnerable] = nil + end + if TurnTime > 999000 then + utilWeps[amExtraTime] = nil + end utilChoices[amSkip] = 0 local c = 0 for i = 0, AmmoTypeMax do