holdOff beta
Function of @v12-engine/engine
ts
export declare function holdOff(world: World, entity: Entity, order: Order<WaitState>, target: Entity, dt: number): boolean;One tick of an attacker that may have to wait for room at the target it was told to fight, called before engage. Closing in on a target with no room left for one like it (isCrowded), or held up on the way past the game's patience (isBlocked), it waits (waitBy): just behind those fighting it, on its own side, making way for others, hitting what else comes into its reach without letting go of its target. Every fourth tick it asks for a free place by the target (freeSpot) and, given one, goes in again. True while it holds off: the caller does not engage this tick; false when it is to fight as ever