HumanAIController calculates the "dangerousness" of an enemy based on the largest amount of damage received from it (assuming it's larger than the attack values of the enemy's limbs). Meaning that an enemy that inflicted lots of damage to the character using items is considered dangerous even if it has no attacks assigned to it's limbs.

This commit is contained in:
Joonas Rikkonen
2017-10-19 00:01:34 +03:00
parent 87e9936c60
commit 1f92e31166
5 changed files with 22 additions and 11 deletions
@@ -36,6 +36,15 @@ namespace Barotrauma
objectives.Add(objective);
}
public T GetObjective<T>() where T : AIObjective
{
foreach (AIObjective objective in objectives)
{
if (objective is T) return (T)objective;
}
return null;
}
public float GetCurrentPriority(Character character)
{
if (currentObjective != null) return OrderPriority;