The change applies to ships with accuracy greater than 0. Dumb ships will continue to act dumb and flee in straight lines, but more often than not, you will be encountering pilots who will react more like a normal pilot would. "Clever" NPC pilots now check your position against theirs when fleeing and, if they feel that they are sitting in your sights, they will attempt to react. Most of the times they will try to jink more in order to get out of the way of your guns, but sometimes, in an act of desperation, they will turn and try to land a few hits on their attacker, hoping to surprise them. Current probability is 65% continue fleeing, 35% go evasive and consider an attack and they are open to suggestions.
The change required to test this:
Function performFlee in ShipEntityAI.m is changed to:
Code: Select all
- (void) performFlee
{
if (behaviour != BEHAVIOUR_FLEE_EVASIVE_ACTION)
{
behaviour = BEHAVIOUR_FLEE_TARGET;
[self setEvasiveJink:400.0];
frustration = 0.0;
if (accuracy > COMBAT_AI_ISNT_AWFUL)
{
double aspect = [self approachAspectToPrimaryTarget];
// alert! they've got us in their sights! react!!
if (aspect > 0.9995 || aspect < -0.999)
{
behaviour = randf() < 0.35 ? BEHAVIOUR_EVASIVE_ACTION : BEHAVIOUR_FLEE_EVASIVE_ACTION;
}
}
}
}