Skip to content

Death beta ​

Interface of @v12-engine/engine

ts
export interface Death

Something dies. In death it still stands where it was; in afterDeath it is gone from the world

Members ​

attack ​

ts
readonly attack: boolean;

Whether an attack of the killer did it

carried ​

ts
readonly carried?: readonly BuffInstance[];

The buffs it carried as it fell, in afterDeath (where they are taken off it already): an onKill's effects ask them of the one killed (B44). Left out when it carried none

cause ​

ts
readonly cause?: DeathCause;

The blow that did it, when it ran out of health: its damage type, the ability, how much too much

entity ​

ts
readonly entity: Entity;

The entity that died

how ​

ts
how?: string;

What the rules make of the death, for the screen ('exploded', 'burned'): what the blow says (AttackDef.how, AbilityDef.how) to start with, changed in the death hook as the game likes. The view gets it with the death (SessionEvent death) to show it its way (UnitLook.death). Nothing when left out

killer ​

ts
readonly killer?: Entity;

The entity that killed it, left out when nothing did

reason ​

ts
readonly reason: DeathReason;

Why it dies (DeathReason): damage, or what the rules said (cancelled, expired, a game's own word)