5 private readonly Identifier resistanceId;
6 private readonly
float multiplier;
16 if (resistanceId.IsEmpty)
18 DebugConsole.ThrowError($
"Error in talent {CharacterTalent.DebugIdentifier} - resistance identifier not set in {nameof(CharacterAbilityModifyResistance)}.",
21 if (MathUtils.NearlyEqual(multiplier, 1.0f))
23 DebugConsole.AddWarning($
"Possible error in talent {CharacterTalent.DebugIdentifier} - resistance set to 1, which will do nothing.",
30 if (conditionsMatched != lastState)
33 if (conditionsMatched)
41 lastState = conditionsMatched;
override void UpdateCharacterAbility(bool conditionsMatched, float timeSinceLastUpdate)
override bool AllowClientSimulation
CharacterAbilityModifyResistance(CharacterAbilityGroup characterAbilityGroup, ContentXElement abilityElement)
void RemoveAbilityResistance(TalentResistanceIdentifier identifier)
void ChangeAbilityResistance(TalentResistanceIdentifier identifier, float value)
readonly TalentPrefab Prefab
float GetAttributeFloat(string key, float def)
ContentPackage? ContentPackage
Identifier GetAttributeIdentifier(string key, string def)
readonly Identifier Identifier
readonly record struct TalentResistanceIdentifier(Identifier ResistanceIdentifier, Identifier TalentIdentifier)