Skip to content
Snippets Groups Projects
Commit ffdce8de authored by DarkGod's avatar DarkGod
Browse files

fix

parent 348a6a7e
No related branches found
No related tags found
No related merge requests found
......@@ -30,19 +30,18 @@ module(..., package.seeall, class.make)
--- Look for possible archery targets
-- Take care of removing enough ammo
function _M:archeryAcquireTargets(tg, params)
params = params or {}
local weapon, ammo, offweapon = self:hasArcheryWeapon()
if not weapon then
game.logPlayer(self, "You must wield a bow or a sling (%s)!", ammo)
return nil
end
local infinite = ammo.infinite or self:attr("infinite_ammo") or params.infinite
if not ammo or (ammo.combat.shots_left <= 0 and not infinite) then
game.logPlayer(self, "You do not have enough ammo left!")
return nil
end
params = params or {}
print("[ARCHERY ACQUIRE TARGETS WITH]", weapon.name, ammo.name)
local realweapon = weapon
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment