Andrettin / Wyrmsun

Strategy game based on history, mythology and fiction
http://andrettin.github.io/
GNU General Public License v2.0
301 stars 47 forks source link

Hero gets stuck when it cannot reach enemies #110

Closed KroArtem closed 8 years ago

KroArtem commented 8 years ago

It's easy to reveal in dungeons. If my hero starts to use 'stun' ability, he tries to stun all units near him. When one unit blocks hero's way, he still tries to stun unit that is unreachable and doesn't attack a unit that is in from of him. From my point of view, if unit is unreachable (I don't know whether units standing in front of yours affect path found to reach another unit), do not try to reach him.

Andrettin commented 8 years ago

You're quite right, there seems to a problem with the pathfinder that is either specific to dungeons, or is more noticeable there. I'm looking further into it.

Andrettin commented 8 years ago

Fixed now :)

https://github.com/Andrettin/Wyrmgus/commit/0b219679502954379ceda76fd67a783dcfd71d20