1 using System.Collections.Generic;
7 private readonly
float interval;
10 private readonly
float effectDelay;
11 private float effectDelayTimer;
15 base(abilityEffectType, characterTalent, abilityElementGroup)
29 bool conditionsMatched;
31 if (AllConditionsMatched())
34 bool shouldApplyDelayedEffect = effectDelayTimer >= effectDelay;
35 conditionsMatched = shouldApplyDelayedEffect;
39 effectDelayTimer = 0f;
40 conditionsMatched =
false;
43 bool hasFallbacks = fallbackAbilities.Count > 0;
45 List<CharacterAbility> abilitiesToRun =
46 !conditionsMatched && hasFallbacks
52 conditionsMatched =
true;
55 foreach (var characterAbility
in abilitiesToRun)
57 if (!characterAbility.IsViable()) {
continue; }
62 if (conditionsMatched)
70 private bool AllConditionsMatched()
76 if (!abilityCondition.MatchesCondition()) {
return false; }
readonly List< AbilityCondition > abilityConditions
readonly List< CharacterAbility > characterAbilities
List of abilities that are triggered by this group. Fallback abilities are triggered if the condition...
readonly int maxTriggerCount
CharacterAbilityGroupInterval(AbilityEffectType abilityEffectType, CharacterTalent characterTalent, ContentXElement abilityElementGroup)
float TimeSinceLastUpdate
void UpdateAbilityGroup(float deltaTime)
float GetAttributeFloat(string key, float def)