AI is particularly dodgy in regard to harmful terrains.
Examples:
When in follow mode, if a harmful terrain is the closest a party member can get, thats where they will go, regardless of whether theres a safe spot next to it, or if theres a safe passage they could use if they waited for the rest of the party to move along. To add, well, *more injury* to injury, the npc will then just *sit there*, dying, until you switch to their solo mode and get them to safety.
If there is a large stretch of harmful ground (eg a swampy map), a critter will decide they need to cross it, get one square into the swamp, then decide they need to get off the harmful terrain, ie back to where they were. Rinse and repeat.
Logged In: YES
user_id=54873
Originator: NO
Terrains with effects are penalized in the pathfunding heuristic, so NPC's have a tendency to avoid them when there is a better way. When there is no other way (or even if the other way is just really long and slow) they will take a path across hazards. I suppose we can always add another flag (eg, PFLAG_AVOIDTERRAINEFFECTS) and set it for follow-mode pathfinding.
I don't have any quick fixes in mind for the second problem. NPCs could use the flag, which means they'd never try to cross hazards to attack. That might be better than the current behavior. It would be nice to have AI that was smart enough to plan more than one move at a time.
Logged In: YES
user_id=1421531
Originator: YES
I wasnt really intending this for the current release. More as a high priority for 0.71 or 0.8 or something. Theres a couple of other ways in which I think AI and NPCs in general need to be overhauled, so its probably going to be one of my areas of attention once we get this release out.