コード例 #1
0
 public static float GetVitalityThreshold(AIObjectiveManager manager, Character character, Character target)
 {
     if (manager == null)
     {
         return(vitalityThreshold);
     }
     else
     {
         // When targeting player characters, always treat them when ordered, else use the threshold so that minor/non-severe damage is ignored.
         // If we ignore any damage when the player orders a bot to do healings, it's observed to cause confusion among the players.
         // On the other hand, if the bots too eagerly heal characters when it's not necessary, it's inefficient and can feel frustrating, because it can't be controlled.
         return(character == target || manager.HasOrder <AIObjectiveRescueAll>() ? (target.IsPlayer ? 100 : vitalityThresholdForOrders) : vitalityThreshold);
     }
 }