Skip to main content

Targets

Targets define who a skill affects. They are prefixed with @ and come between the action and trigger.

Syntax

action{params} @target{params} ~trigger

If no target is specified, @Self is used by default.

Quick Example

Skills:
# Target self (default)
- animation{name=hurt} ~onHurt

# Target the attacker
- damage{amount=3} @Attacker ~onHurt

# Target nearby players
- damage{amount=10, type=explosion} @PlayersInRadius{r=5} ~onDeath

All Targets

TargetDescription
@SelfThe entity itself (default)
@AttackerEntity that last attacked
@PlayersInRadiusPlayers within a radius

Target Context

Different triggers provide different target contexts:

TriggerAvailable Targets
~onHurt@Self, @Attacker
~onAttack, ~onKill@Self, @Target
~onDeath, ~onSpawn@Self, @PlayersInRadius
~onInteract@Self, @TriggerSource
~idle, ~moving@Self, @PlayersInRadius

Common Patterns

Counter-Attack

Skills:
- damage{amount=3, type=magic} @Attacker ~onHurt

Death Explosion

Skills:
- damage{amount=15, type=explosion} @PlayersInRadius{r=8} ~onDeath

Scaling Retaliation

Skills:
# Small hits = small retaliation
- damage{amount=1} @Attacker ~onHurt{max=5}

# Big hits = big retaliation
- damage{amount=5, type=fire} @Attacker ~onHurt{min=10}