Class AttributeTickBuffTemplate
Buff template that applies cumulative attribute modifiers on each tick. Each tick adds a modifier; on remove, the total accumulated modifier is reversed. Tracks total applied ticks internally on the buff to ensure perfect symmetry. Useful for "ramping" buffs that grow stronger over time.
[CreateAssetMenu(fileName = "New Attribute Tick Buff Template", menuName = "FishMMO/Character/Buff/Attribute Tick Buff", order = 4)]
public class AttributeTickBuffTemplate : BaseBuffTemplate, ICachedObject, ITooltip
- Inheritance
-
ObjectScriptableObjectAttributeTickBuffTemplate
- Implements
- Inherited Members
-
ScriptableObject.SetDirty()ScriptableObject.CreateInstance<T>()Object.GetEntityId()Object.GetInstanceID()Object.GetHashCode()Object.InstantiateAsync<T>(T)Object.InstantiateAsync<T>(T, Transform)Object.InstantiateAsync<T>(T, Vector3, Quaternion)Object.InstantiateAsync<T>(T, Transform, Vector3, Quaternion)Object.Instantiate(Object, Vector3, Quaternion)Object.Instantiate(Object, Vector3, Quaternion, Transform)Object.Instantiate(Object)Object.Instantiate(Object, Scene)Object.Instantiate<T>(T, InstantiateParameters)Object.Instantiate<T>(T, Vector3, Quaternion, InstantiateParameters)Object.Instantiate(Object, Transform)Object.Instantiate<T>(T)Object.Instantiate<T>(T, Vector3, Quaternion)Object.Instantiate<T>(T, Vector3, Quaternion, Transform)Object.Instantiate<T>(T, Transform)Object.Destroy(Object)Object.DestroyImmediate(Object)Object.DontDestroyOnLoad(Object)Object.DestroyObject(Object)Object.FindObjectsOfType<T>()Object.FindObjectsByType<T>(FindObjectsSortMode)Object.FindObjectsByType<T>(FindObjectsInactive, FindObjectsSortMode)Object.FindObjectOfType<T>()Object.FindFirstObjectByType<T>()Object.FindAnyObjectByType<T>()Object.FindFirstObjectByType<T>(FindObjectsInactive)Object.FindAnyObjectByType<T>(FindObjectsInactive)Object.FindObjectsByType<T>()Object.FindObjectsByType<T>(FindObjectsInactive)Object.ToString()Object.nameObject.hideFlags
Fields
TickAttributes
List of attribute modifications applied per tick.
[Tooltip("Attribute modifiers added on each tick. Cumulative — reversed on removal.")]
public List<BuffAttributeTemplate> TickAttributes
Field Value
Methods
OnApply(Buff, ICharacter)
No immediate modifier on apply. All modifications happen via OnTick.
public override void OnApply(Buff buff, ICharacter target)
Parameters
buffBuffThe buff instance being applied.
targetICharacterThe character receiving the buff.
OnApplyStack(Buff, ICharacter)
Stacking does not apply immediate modifiers. The multiplier in OnTick scales with stacks.
public override void OnApplyStack(Buff buff, ICharacter target)
Parameters
buffBuffThe buff instance being stacked.
targetICharacterThe character receiving the stack.
OnRemove(Buff, ICharacter)
Removes all accumulated tick modifiers from the target. Uses TickCount tracked on the buff to ensure exact reversal.
public override void OnRemove(Buff buff, ICharacter target)
Parameters
buffBuffThe buff instance being removed.
targetICharacterThe character losing the buff.
OnRemoveStack(Buff, ICharacter)
Stack removal does not immediately remove modifiers. Tick multiplier decreases naturally.
public override void OnRemoveStack(Buff buff, ICharacter target)
Parameters
buffBuffThe buff instance being unstacked.
targetICharacterThe character losing the stack.
OnTick(Buff, ICharacter)
Called each tick. Adds attribute modifiers scaled by (1 + Stacks) and increments TickCount.
public override void OnTick(Buff buff, ICharacter target)
Parameters
buffBuffThe buff instance.
targetICharacterThe character affected.
SecondaryTooltip(TooltipBuilder)
Appends a secondary tooltip describing the per-tick attribute effects.
public override void SecondaryTooltip(TooltipBuilder builder)
Parameters
builderTooltipBuilderThe tooltip builder to populate.