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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user