1 using System.Collections.Generic;
12 private readonly
bool applyToSelf;
13 private readonly
bool nearbyCharactersAppliesToSelf;
14 private readonly
bool nearbyCharactersAppliesToAllies;
15 private readonly
bool nearbyCharactersAppliesToEnemies;
16 private readonly
bool applyToSelected;
18 readonly List<ISerializableEntity> targets =
new List<ISerializableEntity>();
20 private bool effectBeingApplied;
27 nearbyCharactersAppliesToSelf = abilityElement.
GetAttributeBool(
"nearbycharactersappliestoself",
true);
28 nearbyCharactersAppliesToAllies = abilityElement.
GetAttributeBool(
"nearbycharactersappliestoallies",
true);
29 nearbyCharactersAppliesToEnemies = abilityElement.
GetAttributeBool(
"nearbycharactersappliestoenemies",
true);
36 if (effectBeingApplied) {
return; }
38 effectBeingApplied =
true;
47 statusEffect.SetUser(targetCharacter);
53 statusEffect.AddNearbyTargets(targetCharacter.
WorldPosition, targets);
54 if (!nearbyCharactersAppliesToSelf)
58 if (!nearbyCharactersAppliesToAllies)
62 if (!nearbyCharactersAppliesToEnemies)
88 effectBeingApplied =
false;
override bool AllowClientSimulation
readonly List< StatusEffect > statusEffects
override void ApplyEffect()
CharacterAbilityApplyStatusEffects(CharacterAbilityGroup characterAbilityGroup, ContentXElement abilityElement)
void ApplyEffectSpecific(Character targetCharacter, Limb targetLimb=null)
override bool AppliesEffectOnIntervalUpdate
override void ApplyEffect(AbilityObject abilityObject)
static List< StatusEffect > ParseStatusEffects(CharacterTalent characterTalent, ContentXElement statusEffectElements)
float EffectDeltaTime
Used primarily for StatusEffects. Default to constant outside interval abilities.
Character SelectedCharacter
ContentXElement? GetChildElement(string name)
bool GetAttributeBool(string key, bool def)
virtual Vector2 WorldPosition
static bool IsFriendly(Character me, Character other, bool onlySameTeam=false)
StatusEffects can be used to execute various kinds of effects: modifying the state of some entity in ...
ActionType
ActionTypes define when a StatusEffect is executed.