Table of Contents

Class ApplyDamageAction

Namespace
FishMMO.Shared
Assembly
FishMMO.Shared.dll

Action that applies damage to a target character using a configurable value provider and a given damage attribute type.

Runs on the server, and on the client that OWNS the initiator — see MayPredict(ICharacter, EventData). The caster draws its own number immediately through PredictedCombatEvents rather than waiting half a round trip for the server's report; the server's report then confirms it, or the prediction is greyed out when none arrives. Observers still wait to be told.

[Serializable]
public class ApplyDamageAction : BaseAction, IAction
Inheritance
ApplyDamageAction
Implements
Inherited Members

Fields

DamageAttributeTemplate

The attribute template associated with this damage type (e.g., 'Physical', 'Fire'). Used to determine the element or type of damage applied.

[Tooltip("The attribute template associated with this damage type (e.g., 'Physical', 'Fire').")]
public DamageAttributeTemplate DamageAttributeTemplate

Field Value

DamageAttributeTemplate

DamageValue

The value provider that determines the amount of damage to apply.

[Tooltip("The value provider that determines the amount of damage to apply.")]
[SerializeReference]
public IIntValueProvider DamageValue

Field Value

IIntValueProvider

Methods

Execute(ICharacter, EventData)

Applies damage to the target character using the computed value and attribute template. Runs on the server and on the client that owns the initiator — see the note on the class.

public override void Execute(ICharacter initiator, EventData eventData)

Parameters

initiator ICharacter

The character initiating the action.

eventData EventData

The event data containing the target information.