Skip to content

availableTo beta ​

Function of @v12-engine/engine

ts
availableTo: (def: {
    readonly race?: string;
}, race: string | undefined) => boolean

Whether something of a race (UnitTypeDef.race, UpgradeDef.race) is a player's to make as their race goes: what is of no race is everyone's, and a player of none (the neutral players, the creeps, any in a game without races) may make anything. The available hook has the last word (isAvailable)