Table of Contents

Class AbilityEvent

Namespace
FishMMO.Shared
Assembly
FishMMO.Shared.dll

Abstract base class for ability events. Extends Trigger to provide ECA-driven conditions and actions. Ability requirements (resources, faction, archetype, attributes) are defined as ECA conditions on the inherited Conditions list or on the parent ActivationConditions list.

public abstract class AbilityEvent : Trigger, ICachedObject, ITooltip
Inheritance
Object
ScriptableObject
AbilityEvent
Implements
Derived
Inherited Members
ScriptableObject.SetDirty()
ScriptableObject.CreateInstance<T>()
Object.GetEntityId()
Object.MemberwiseClone()
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.name
Object.hideFlags
Extension Methods

Fields

ActivationTime

Time required to activate the event (in seconds). Aggregated into the runtime ability.

public float ActivationTime

Field Value

float

Cooldown

Cooldown time for the event (in seconds). Aggregated into the runtime ability.

public float Cooldown

Field Value

float

LifeTime

Lifetime of the event effect (in seconds). Aggregated into the runtime ability.

public float LifeTime

Field Value

float

Modifiers

Rules scaling the ability's numbers by the weather where it is cast (Q16). Aggregated with the parent template's.

[Tooltip("Scale the ability's numbers by the weather where it is cast. Empty: this effect does not care about the weather.")]
[SerializeReference]
[FormerlySerializedAs("WeatherModifiers")]
public List<IAbilityModifier> Modifiers

Field Value

List<IAbilityModifier>

Remarks

An effect added to an ability brings its own weather rules, the same way it brings its own cast time — so a Lightning Bolt effect can be the thing that makes an ability hit harder in a storm, whatever ability it is crafted onto.

Price

Crafting price of the event (in-game currency cost to add this event during ability crafting).

public int Price

Field Value

int

Speed

Speed of the event effect (units per second). Aggregated into the runtime ability.

public float Speed

Field Value

float

Properties

Icon

The icon representing the event (property accessor).

public Sprite Icon { get; }

Property Value

Sprite

Name

The name of the event (from the ScriptableObject name).

public string Name { get; }

Property Value

string

Methods

AppendEffectDescriptions(List<string>)

Effect lines this event contributes beyond the wording of its own actions.

public virtual void AppendEffectDescriptions(List<string> into)

Parameters

into List<string>

The list to append to.

Remarks

For effects whose result is data rather than an action, such as the abilities an AbilityOnSummonEvent teaches the pet. Shared by this event's own tooltip and by AbilitySummary, so the effect reads the same in both.

BuildTooltip(TooltipContent)

Describes what this effect is and what adding it to an ability would do.

public virtual void BuildTooltip(TooltipContent content)

Parameters

content TooltipContent

The content being assembled.

Remarks

Written as the CHANGE it represents rather than as absolute numbers, because that is what the player is deciding about: an effect on its own has no cast time, it adds one. Signs are therefore always shown, and the tone says whether the change helps.

IsCompatibleWith(AbilityTemplate)

Whether this effect does anything on an ability built from template.

public virtual bool IsCompatibleWith(AbilityTemplate template)

Parameters

template AbilityTemplate

The base ability the effect would be added to.

Returns

bool

True when the effect can be part of that ability.

Remarks

The one statement of which effects go on which abilities. Crafting, premade offers, the craft window and AddEvent(AbilityEvent) all ask it, so an effect the server refuses is one the window never offers and a stale database row can never smuggle in.

The default refuses summon spells. A PetAbilityTemplate spawns no ability object, so the tick, hit, spawn and destroy phases these effects run in never happen on one. Crafting one onto a summon used to be accepted all the same, and all it did was fold the effect's cast time, cooldown and cost into the spell: a player paid for a fireball and got a slower summon, or found a negative cast-time effect made a faster one. AbilityOnSummonEvent is the effect that belongs on a summon, and inverts this.

ShouldEvaluateCondition(BaseCondition)

Determines whether a condition should be evaluated when this ability event executes. Resource cost conditions are aggregated and processed by the owning ability during activation, so event execution skips them to avoid checking already-consumed resources again.

protected override bool ShouldEvaluateCondition(BaseCondition condition)

Parameters

condition BaseCondition

The condition being considered.

Returns

bool

True when the condition should be evaluated during event execution; otherwise, false.