Page 1 of 1

Tactical AI fleeing needs to check for never_move

Posted: Tue May 24, 2011 6:49 am
by yufra
The tactical AI canFlee function should check for never_move, otherwise bosses like the Spellblaze Crystal will not attack when in melee distance.

Code: Select all

diff --git a/game/modules/tome/ai/tactical.lua b/game/modules/tome/ai/tactical.lua
index 6686d00..dfcafef 100644
--- a/game/modules/tome/ai/tactical.lua
+++ b/game/modules/tome/ai/tactical.lua
@@ -37,6 +37,9 @@ local checkLOS = function(sx, sy, tx, ty)
 end
 
 local canFleeDmapKeepLos = function(self)
+       if self.never_move then
+               return false
+       end
        if self.ai_target.actor then
                local act = self.ai_target.actor
                local c = act:distanceMap(self.x, self.y)

Re: Tactical AI fleeing needs to check for never_move

Posted: Fri May 27, 2011 1:35 pm
by darkgod
fixed