Skip to content

MeleeAttacks

Defined in: gameplay/MeleeAttack.ts:105

The swings currently in the air, one per attacker: ONE swing lands on a target once, and the next one may land again. Leaning on “the event only fires once” is a contract the first multi-frame hit window breaks, and breaks silently — double damage reads as a balance problem, not a bug.

new MeleeAttacks(): MeleeAttacks

MeleeAttacks

clear(): void

Defined in: gameplay/MeleeAttack.ts:141

void


close(entity): void

Defined in: gameplay/MeleeAttack.ts:116

number

void


forget(entity): void

Defined in: gameplay/MeleeAttack.ts:137

Drop an attacker’s swing (wire to world.onDespawn).

number

void


live(entity): { hits: number; id: number; } | null

Defined in: gameplay/MeleeAttack.ts:120

number

{ hits: number; id: number; } | null


open(entity): number

Defined in: gameplay/MeleeAttack.ts:110

Begin a swing, ending whatever this attacker had in the air.

number

number


record(entity, target): boolean

Defined in: gameplay/MeleeAttack.ts:129

Record target as hit by this attacker’s live swing. False when the swing already reached it, which is the whole point.

number

number

boolean