Skip to content
Snippets Groups Projects
Commit 8d97cac6 authored by dg's avatar dg
Browse files

Avoid avoidable ambush immediately after new target is attained when autoexploring

Explore more efficiently by inferring likely wall tiles when autoexploring
If autoexplore is stopped on the way to an exit (such as by a trap), then it will still go that target when AE is initiated again
When autoexploring don't go to items that the player dropped


git-svn-id: http://svn.net-core.org/repos/t-engine4@4720 51575b47-30f0-44d4-a5cc-537603b46e54
parent 63d2ffcb
No related branches found
No related tags found
No related merge requests found
......@@ -3241,6 +3241,8 @@ end
--- Called upon dropping an object
function _M:onDropObject(o)
if self:attr("has_transmo") then o.__transmo = false end
if self.player then game.level.map.attrs(self.x, self.y, "obj_seen", true)
elseif game.level.map.attrs(self.x, self.y, "obj_seen") then game.level.map.attrs(self.x, self.y, "obj_seen", false) end
end
function _M:transmoPricemod(o) if o.type == "gem" then return 0.40 else return 0.05 end end
......
......@@ -724,6 +724,10 @@ function _M:runStopped()
node.actor:addParticles(engine.Particles.new("notice_enemy", 1))
end
end
-- if you stop at an object (such as on a trap), then mark it as seen
local obj = game.level.map:getObject(x, y, 1)
if obj then game.level.map.attrs(x, y, "obj_seen", true) end
end
--- Activates a hotkey with a type "inventory"
......
This diff is collapsed.
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