1 using Microsoft.Xna.Framework;
19 base.Update(characterHealth, targetLimb, deltaTime);
27 if (!affliction.
Prefab.
IsBuff || affliction ==
this || affliction.StrengthDiminishMultiplier.
Source !=
this) {
continue; }
28 affliction.StrengthDiminishMultiplier.
Source =
null;
29 affliction.StrengthDiminishMultiplier.
Value = 1f;
36 if (!affliction.
Prefab.
IsBuff || affliction ==
this) {
continue; }
37 float multiplier = GetDiminishMultiplier();
38 if (affliction.StrengthDiminishMultiplier.
Value < multiplier && affliction.StrengthDiminishMultiplier.
Source !=
this) {
continue; }
40 affliction.StrengthDiminishMultiplier.
Source =
this;
41 affliction.StrengthDiminishMultiplier.
Value = multiplier;
46 private float GetDiminishMultiplier()
50 if (currentEffect ==
null) {
return 1.0f; }
52 float multiplier = MathHelper.Lerp(
53 currentEffect.MinBuffMultiplier,
54 currentEffect.MaxBuffMultiplier,
55 currentEffect.GetStrengthFactor(
this));
56 return 1.0f / Math.Max(multiplier, 0.001f);
AfflictionPrefab.Effect GetActiveEffect()
Character Source
Which character gave this affliction
readonly AfflictionPrefab Prefab
AfflictionPrefab is a prefab that defines a type of affliction that can be applied to a character....
readonly bool IsBuff
If set to true, the game will recognize this affliction as a buff. This means, among other things,...
A special affliction type that increases the duration of buffs (afflictions of the type "buff")....
override void Update(CharacterHealth characterHealth, Limb targetLimb, float deltaTime)
BuffDurationIncrease(AfflictionPrefab prefab, float strength)
IReadOnlyCollection< Affliction > GetAllAfflictions()