checkTarget
checkTarget<
Check>(world,from,target,check?):TargetRefusalOf<Check> |undefined
Checks that from may act on target, in the order the engine’s cast
checks it: Refusal.NoTarget where it is missing, from itself, gone,
not targetable, downed or out of health, then, each only where check
asks, NotHostile, OutOfRange and NoLineOfSight; undefined where
it passes. A target with no health counts as standing, so a chest or a
door passes where a press asks no more. Refuse a press with what it
returns, press.refuse(refusal), at the press for what a player sees as
she presses, such as range, and again as the action lands for what may
have changed, such as sight.
Type Parameters
Section titled “Type Parameters”| Type Parameter | Default type |
|---|---|
Check extends TargetCheck |
Record<never, never> |
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
world |
World |
from |
Entity |
target |
Entity | null | undefined |
check? |
Check |
Returns
Section titled “Returns”TargetRefusalOf<Check> | undefined