Tactical AI fleeing needs to check for never_move

Where bugs go to lie down and rest

Moderator: Moderator

Post Reply
Message
Author
yufra
Perspiring Physicist
Posts: 1332
Joined: Tue Jul 13, 2010 2:53 pm

Tactical AI fleeing needs to check for never_move

#1 Post 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)
<DarkGod> lets say it's intended

darkgod
Master of Eyal
Posts: 10751
Joined: Wed Jul 24, 2002 9:26 pm
Location: Angolwen
Contact:

Re: Tactical AI fleeing needs to check for never_move

#2 Post by darkgod »

fixed
[tome] joylove: You can't just release an expansion like one would release a Kraken XD
--
[tome] phantomfrettchen: your ability not to tease anyone is simply stunning ;)

Post Reply