1 using Microsoft.Xna.Framework;
3 using System.Collections.Generic;
10 private readonly
float force;
11 private readonly
float maxVelocity;
13 private readonly
string afflictionIdentifier;
15 private readonly HashSet<LimbType> limbTypes =
new HashSet<LimbType>();
25 foreach (
string limbTypeStr
in limbTypesStr)
27 if (Enum.TryParse(limbTypeStr, out
LimbType limbType))
29 limbTypes.Add(limbType);
33 DebugConsole.ThrowError($
"Error in talent \"{characterAbilityGroup.CharacterTalent.DebugIdentifier}\" - \"{limbTypeStr}\" is not a valid limb type.",
34 contentPackage: abilityElement.ContentPackage);
41 float strength = 1.0f;
42 if (!
string.IsNullOrEmpty(afflictionIdentifier))
45 if (affliction ==
null) {
return; }
54 if (!limbTypes.Contains(limb.
type)) {
continue; }
override bool AppliesEffectOnIntervalUpdate
CharacterAbilityApplyForce(CharacterAbilityGroup characterAbilityGroup, ContentXElement abilityElement)
override void ApplyEffect()
readonly AfflictionPrefab Prefab
readonly float MaxStrength
The maximum strength this affliction can have.
Affliction GetAffliction(string identifier, bool allowLimbAfflictions=true)
CharacterHealth CharacterHealth
readonly AnimController AnimController
string? GetAttributeString(string key, string? def)
float GetAttributeFloat(string key, float def)
string?[] GetAttributeStringArray(string key, string[]? def, bool convertToLowerInvariant=false)
void ApplyForce(Vector2 force, float maxVelocity=NetConfig.MaxPhysicsBodyVelocity)