Table of Contents

Class TargetAllianceCondition

Namespace
FishMMO.Shared
Assembly
FishMMO.Shared.dll

Condition that checks the alliance relationship between the initiator and the target (defender). Allows configuration for which alliance types (self, enemy, neutral, ally) the condition applies to.

[Serializable]
public sealed class TargetAllianceCondition : BaseCondition, ICondition
Inheritance
TargetAllianceCondition
Implements
Inherited Members

Fields

ApplyToAllies

Whether the condition applies to allies.

public bool ApplyToAllies

Field Value

bool

ApplyToEnemy

Whether the condition applies to enemies (default: true).

public bool ApplyToEnemy

Field Value

bool

ApplyToNeutral

Whether the condition applies to neutral targets.

public bool ApplyToNeutral

Field Value

bool

ApplyToSelf

Whether the condition applies when the initiator targets themselves.

public bool ApplyToSelf

Field Value

bool

Methods

Evaluate(ICharacter, EventData)

Evaluates whether the condition applies based on the alliance relationship between initiator and target.

public override bool Evaluate(ICharacter initiator, EventData eventData)

Parameters

initiator ICharacter

The character initiating the action or condition.

eventData EventData

Event data containing the target character.

Returns

bool

True if the alliance relationship matches the allowed types; otherwise, false.

Remarks

This method checks the target's alliance level (enemy, neutral, ally, or self) and returns true if the corresponding flag is enabled.