RaceHookDef beta
TypeAlias of @v12-engine/engine
ts
export type RaceHookDef = HookDef & {
of?: (event: any) => PlayerId | undefined;
};A hook handler of a race (RaceDef.hooks): run only where the event is of one of the race's players. Whose an event is, is of(event) where it is given, or else its player, or else the owner of the first there is of its entity, caster, attacker, worker, buyer, hero, producer, source, target: the one doing it before the one it is done to (a damage is its source's)