Skip to content

BeforeBuff beta ​

Interface of @v12-engine/engine

ts
export interface BeforeBuff

A buff about to be put on, or put on again. Change how long it lasts or how strong it is, or call it off (immunity)

Members ​

buff ​

ts
readonly buff: BuffDef;

The buff to be put on

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()

duration ​

ts
duration: number;

Seconds, after tenacity. Infinity for one that stays

level ​

ts
level: number;

The level the buff is put on at; a handler may change it

source ​

ts
readonly source?: Entity;

The unit that puts it on, left out when nothing does

target ​

ts
readonly target: Entity;

The unit about to get the buff