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

Escorts will flee foes instead of attacking them

git-svn-id: http://svn.net-core.org/repos/t-engine4@5179 51575b47-30f0-44d4-a5cc-537603b46e54
parent c8794c92
No related branches found
No related tags found
No related merge requests found
......@@ -38,9 +38,14 @@ newAI("escort_quest", function(self)
end
if not self.energy.used then
if self:reactionToward(self.ai_target.actor) < 0 and not self:hasLOS(self.escort_target.x, self.escort_target.y, "block_move") then
self:runAI("move_dmap")
self:runAI("flee_dmap")
if not self.ai_state.fleeing_msg then
self.ai_state.fleeing_msg = true
self:doEmote("Help!")
end
else
self:runAI("move_escort")
self.ai_state.fleeing_msg = nil
end
end
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