Skip to content

BeforeHeal beta ​

Interface of @v12-engine/engine

ts
export interface BeforeHeal

Health about to be given back. Change amount, or cancel()

Members ​

amount ​

ts
amount: number;

How much health is given; a handler may change it

cancel ​

ts
cancel(reason?: MessageRef): void;

Stops it. The reason is what the player is told, where this hook tells them (reason)

cancelled ​

ts
cancelled: boolean;

Whether a handler has called it off; set by cancel()

source ​

ts
readonly source?: Entity;

The entity that heals it, left out when nothing does

target ​

ts
readonly target: Entity;

The entity about to be healed