Documentation

DamageEvent extends BattleEvent
in package

BattleEvent.

Table of Contents

$attacker  : FighterInstance
$damage  : int
$defender  : FighterInstance
$applied  : mixed
__construct()  : mixed
Construct a new DamageEvent of $attacker attacking $defender.
apply()  : mixed
Applies the event.
decorate()  : string
Returns a string describing the event.
getDamage()  : int
Returns the damage that is applied in this fight.

Properties

Methods

apply()

Applies the event.

public apply() : mixed
Tags
inheritDoc
Return values
mixed

decorate()

Returns a string describing the event.

public decorate(Game $game) : string
Parameters
$game : Game
Tags
inheritDoc
Return values
string

getDamage()

Returns the damage that is applied in this fight.

public getDamage() : int

If the damage is > 0, the damage is applied to the defender. If it's < 0, it's applied to the attacker.

Return values
int

Search results