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

Xorns wont stand helpless as you hit them from far away

git-svn-id: http://svn.net-core.org/repos/t-engine4@1486 51575b47-30f0-44d4-a5cc-537603b46e54
parent a6b82a4f
No related branches found
No related tags found
No related merge requests found
......@@ -75,7 +75,7 @@ function _M:runInit(dir)
block_left = block_left,
block_right = block_right,
cnt = 1,
dialog = Dialog:simplePopup("Running...", "You are running, press any key to stop.", function()
dialog = Dialog:simplePopup("Running...", "You are running, press Enter to stop.", function()
self:runStop()
end),
}
......
......@@ -53,6 +53,8 @@ end)
-- Target the player if within sense radius
newAI("target_player_radius", function(self)
if self.ai_target.actor and not self.ai_target.actor.dead and rng.percent(90) then return true end
if core.fov.distance(self.x, self.y, game.player.x, game.player.y) < self.ai_state.sense_radius then
self.ai_target.actor = game.player
return true
......
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