diff --git a/game/modules/tome/class/Game.lua b/game/modules/tome/class/Game.lua index ea1946fb4321aa97ce9632cd29dc2a51fb2ddfc4..7d287fbc13b75028969fdfa888a489acbc64130b 100644 --- a/game/modules/tome/class/Game.lua +++ b/game/modules/tome/class/Game.lua @@ -1866,9 +1866,13 @@ do return end for _, node in ipairs(seen) do node.actor:addParticles(engine.Particles.new("notice_enemy", 1)) end - elseif not self.player:autoExplore() then - self.log("There is nowhere left to explore.") - self:triggerHook{"Player:autoExplore:nowhere"} + else + if not self.player:autoExplore() then + self.log("There is nowhere left to explore.") + self:triggerHook{"Player:autoExplore:nowhere"} + else + while self.player:enoughEnergy() and self.player:runStep() do end + end end end end @@ -1880,14 +1884,14 @@ do return end end end, - RUN_LEFT = function() self.player:runInit(4) end, - RUN_RIGHT = function() self.player:runInit(6) end, - RUN_UP = function() self.player:runInit(8) end, - RUN_DOWN = function() self.player:runInit(2) end, - RUN_LEFT_UP = function() self.player:runInit(7) end, - RUN_LEFT_DOWN = function() self.player:runInit(1) end, - RUN_RIGHT_UP = function() self.player:runInit(9) end, - RUN_RIGHT_DOWN = function() self.player:runInit(3) end, + RUN_LEFT = function() self.player:runInit(4) while self.player:enoughEnergy() and self.player:runStep() do end end, + RUN_RIGHT = function() self.player:runInit(6) while self.player:enoughEnergy() and self.player:runStep() do end end, + RUN_UP = function() self.player:runInit(8) while self.player:enoughEnergy() and self.player:runStep() do end end, + RUN_DOWN = function() self.player:runInit(2) while self.player:enoughEnergy() and self.player:runStep() do end end, + RUN_LEFT_UP = function() self.player:runInit(7) while self.player:enoughEnergy() and self.player:runStep() do end end, + RUN_LEFT_DOWN = function() self.player:runInit(1) while self.player:enoughEnergy() and self.player:runStep() do end end, + RUN_RIGHT_UP = function() self.player:runInit(9) while self.player:enoughEnergy() and self.player:runStep() do end end, + RUN_RIGHT_DOWN = function() self.player:runInit(3) while self.player:enoughEnergy() and self.player:runStep() do end end, ATTACK_OR_MOVE_LEFT = function() self.player:attackOrMoveDir(4) end, ATTACK_OR_MOVE_RIGHT = function() self.player:attackOrMoveDir(6) end, diff --git a/game/modules/tome/class/Player.lua b/game/modules/tome/class/Player.lua index e0f3c7ae7f7f06cc3c550a3a62c32a7b57ecc533..d1c52dd05383fb56b085de31ab635bdaa487ad33 100644 --- a/game/modules/tome/class/Player.lua +++ b/game/modules/tome/class/Player.lua @@ -385,10 +385,12 @@ function _M:act() -- Resting ? Running ? Otherwise pause if self.player and self:enoughEnergy() then if self:restStep() then - while self:enoughEnergy() do self:restStep() end + while self:enoughEnergy() and self:restStep() do end elseif self:runStep() then - while self:enoughEnergy() do self:runStep() end - else + while self:enoughEnergy() and self:runStep() do end + end + + if self:enoughEnergy() then game.paused = true if game.uiset.logdisplay:getNewestLine() ~= "" then game.log("") end end