Friendly Fire Data

An overview of friendly fire and NPC behavior.

Overview
NPCs will normally respond to being attacked by the player by going into combat against the player. However, there are cases where we want to avoid that behavior -- we don't want the player's allies turning on him every time they are struck by a stray bullet during a battle.

Implementation
Actor relationship towards player:

Neutral

 * Aggro immediately on player when attacked, in or out of combat.

Friend

 * During combat, the actor will not aggro on the player until a set number of hits has been done by the player within a set amount of time. Number of hits are tracked using the GetFriendHit function.
 * Outside of combat, immediately go into combat with the player when attacked by the player.

Ally

 * During combat, the actor will completely ignore hits from the player. They will never aggro on the player no matter how many times they are hit. For purposes of GetFriendHit, the count never goes above 1 (so they always react as if it was the first time you hit them).
 * Outside of combat, the actor will use the "friendly fire" combat procedure described above -- not aggro until a set number of hits has been reached.