2 using System.Collections.Generic;
18 : base(character, objectiveManager, priorityModifier) { }
26 if (
Targets.None()) {
return 0; }
27 if (!character.IsOnPlayerTeam && !character.IsOriginallyOnPlayerTeam) {
return 100; }
28 if (character.IsSecurity) {
return 100; }
29 if (objectiveManager.IsOrder(
this)) {
return 100; }
37 if (character.IsOnPlayerTeam && target is { IsEscorted: true })
42 var combatObjective =
new AIObjectiveCombat(character, target, combatMode, objectiveManager, PriorityModifier);
45 combatObjective.holdFireCondition = () =>
48 if (character.GetDamageDoneByAttacker(target) > 0.0f) {
return false; }
51 character.Speak(TextManager.Get(
"dialogenteroutpostwarning").Value,
null, Rand.Range(0.5f, 1.0f),
"leaveoutpostwarning".ToIdentifier(), 30.0f);
53 return combatObjective;
61 if (target ==
null || target.
Removed) {
return false; }
62 if (target.
IsDead) {
return false; }
64 if (target == character) {
return false; }
65 if (target.
Submarine ==
null) {
return false; }
66 if (character.
Submarine ==
null) {
return false; }
70 if (!targetCharactersInOtherSubs)
override bool IsValidTarget(Character target)
override AIObjective ObjectiveConstructor(Character target)
override IEnumerable< Character > GetList()
List of all possible items of the specified type. Used for filtering the removed objectives.
override float IgnoreListClearInterval
AIObjectiveFightIntruders(Character character, AIObjectiveManager objectiveManager, float priorityModifier=1)
override bool AllowInAnySub
override bool IgnoreUnsafeHulls
override void OnObjectiveCompleted(AIObjective objective, Character target)
override float GetTargetPriority()
Returns a priority value based on the current targets (e.g. high prio when there's lots of severe fir...
override Identifier Identifier
bool TargetCharactersInOtherSubs
static bool IsValidTarget(Character target, Character character, bool targetCharactersInOtherSubs)
override float TargetUpdateTimeMultiplier
An objective that creates specific kinds of subobjectives for specific types of targets,...
readonly CharacterParams Params
CharacterTeamType?? OriginalTeamID
static readonly List< Character > CharacterList
bool IsKnockedDown
Is the character knocked down regardless whether the technical state is dead, unconcious,...
bool HasAbilityFlag(AbilityFlags abilityFlag)
float ConstantHealthRegeneration
static bool IsLatchedToSomeoneElse(Character target, Character character)
static GameSession?? GameSession
IEnumerable< Identifier > OutpostModuleTags
Inherited flags from outpost generation.
bool IsTrueForAnyCrewMember(Func< Character, bool > predicate, bool onlyActive=true, bool onlyConnectedSubs=false)
Including the player characters in the same team.
static bool IsFriendly(Character me, Character other, bool onlySameTeam=false)
bool IsConnectedTo(Submarine otherSub)
Returns true if the sub is same as the other, or connected to it via docking ports.
AbilityFlags
AbilityFlags are a set of toggleable flags that can be applied to characters.