In my map, there are zombies and humans. Normally, you just fight zombies and everything is fine (all units have equal priorty). However, there is quite a bit of reanimation happening (rise of the dead ability, but the units are not invulnerable) so you often end up fighting the human forces as well.
Now here's the problem. For no reason that I can tell, your hero will ALWAYS attack an undead unit before a human unit. Even if your hero is walled out by reanimated human units, it will just run around trying to get to the zombie in the back.

Here's some things that might cause it, but I don't really know what's up. Hopefully someone has better knowledge about it than me:
Undead unit classification.
No idea if this would change anything in the AI.
Armour type.
All the units in question take the same damage from heroes.
Armour type again.
The humans use fortified armour type (though it is modified to be complete different from it). Maybe there's still some AI attached to this armour type?
Unit level.
Some of the humans are higher level, but there are times where all the units are the same level and, still, the hero goes for the zombies first.
Armour / health value.
The zombies are definitely more squishy overall (less health and armour), so maybe that has something to do with it?
Thanks for any insight anyone provides.
Now here's the problem. For no reason that I can tell, your hero will ALWAYS attack an undead unit before a human unit. Even if your hero is walled out by reanimated human units, it will just run around trying to get to the zombie in the back.

Here's some things that might cause it, but I don't really know what's up. Hopefully someone has better knowledge about it than me:
Undead unit classification.
No idea if this would change anything in the AI.
Armour type.
All the units in question take the same damage from heroes.
Armour type again.
The humans use fortified armour type (though it is modified to be complete different from it). Maybe there's still some AI attached to this armour type?
Unit level.
Some of the humans are higher level, but there are times where all the units are the same level and, still, the hero goes for the zombies first.
Armour / health value.
The zombies are definitely more squishy overall (less health and armour), so maybe that has something to do with it?
Thanks for any insight anyone provides.