Menu

## CriticalHitEvent extends BattleEvent
in package

CriticalHitEvent.php : 12

Battle event representing a stronger than average attack.

### Table of Contents

$attacker : FighterInstance
$criticalAttackValue : int
$applied : mixed
__construct() : mixed
  Construct a CriticalHitEvent with attacker $attacker.
apply() : mixed
  Applies the event.
decorate() : string
  Returns a string describing the event.

### Properties

#### $attacker

CriticalHitEvent.php : 15
`protected FighterInstance $attacker`

#### $criticalAttackValue

CriticalHitEvent.php : 17
`protected int $criticalAttackValue`

#### $applied

BattleEvent.php : 14
`private mixed $applied = false`

### Methods

#### __construct()

CriticalHitEvent.php : 24

Construct a CriticalHitEvent with attacker $attacker.

`public __construct(FighterInterface $attacker, int $criticalAttackValue) : mixed`

##### Parameters

$attacker : FighterInterface
$criticalAttackValue : int

##### Return values

mixed —

#### apply()

BattleEvent.php : 20

Applies the event.

`public apply() : mixed`

##### Tags

throws
  BattleEventException

##### Return values

mixed —

#### decorate()

CriticalHitEvent.php : 33

Returns a string describing the event.

`public decorate(Game $game) : string`

##### Parameters

$game : Game

##### Tags

inheritDoc

##### Return values

string —

## Search results