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:
@@ -145,6 +145,11 @@ namespace Barotrauma
|
||||
if (enemy == null || enemy == Character) return;
|
||||
|
||||
objectiveManager.AddObjective(new AIObjectiveCombat(Character, enemy));
|
||||
|
||||
//the objective in the manager is not necessarily the same as the one we just instantiated,
|
||||
//because the objective isn't added if there's already an identical objective in the manager
|
||||
var combatObjective = objectiveManager.GetObjective<AIObjectiveCombat>();
|
||||
combatObjective.MaxEnemyDamage = Math.Max(amount, combatObjective.MaxEnemyDamage);
|
||||
}
|
||||
|
||||
public void SetOrder(Order order, string option)
|
||||
|
||||
Reference in New Issue
Block a user