Hi community! I got stuck at this level with no idea what causes the problem. Any help appreciated.
The hero just stand around instead to move on to the next cycle at the poison check.
while true do
local enemy = hero:findNearestEnemy()
local item = hero:findNearestItem()
if not enemy.type == "peon" then
hero:attack(enemy)
elseif not item.type == "poison" then
local pos = item.pos
local x = pos.x
local y = pos.y
hero:moveXY(x, y)
end
end