From 0e32cc1746cb75b61608ac4617ea63dc39f2274d Mon Sep 17 00:00:00 2001 From: DarkGod <darkgod@net-core.org> Date: Mon, 23 Sep 2013 16:05:25 +0200 Subject: [PATCH] can override archery range; use with caution --- game/modules/tome/class/interface/Archery.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/game/modules/tome/class/interface/Archery.lua b/game/modules/tome/class/interface/Archery.lua index 3be9fe57e8..44deb5d9e3 100644 --- a/game/modules/tome/class/interface/Archery.lua +++ b/game/modules/tome/class/interface/Archery.lua @@ -58,7 +58,7 @@ function _M:archeryAcquireTargets(tg, params) local tg = tg or {} tg.type = tg.type or weapon.tg_type or ammo.combat.tg_type or tg.type or "bolt" - if not tg.range then tg.range=math.min(weapon.range or 6, offweapon and offweapon.range or 40) end + if not tg.range then tg.range=math.max(math.min(weapon.range or 6, offweapon and offweapon.range or 40), self:attr("archery_range_override") or 1) end tg.display = tg.display or {display='/'} local wtravel_speed = weapon.travel_speed if offweapon then wtravel_speed = math.ceil(((weapon.travel_speed or 0) + (offweapon.travel_speed or 0)) / 2) end -- GitLab