RulesProblem beta
Interface of @v12-engine/engine
export interface RulesProblemWhat of a game's rules does not fit together (checkRules): an id that names nothing (an ability's buff, a unit's trains, an upgrade's requires, a shop's items), an effect of a type nobody handles, requirements that wait on each other, and, as warnings, what nothing makes, abilities nothing has, and numbers that do not do what they are there for (an arc or a bounce not of a missile, or of nothing, charges of none). Ids are text to the compiler, so a slip in one shows only when the game runs into it ("Unknown unit type") or never (a button that is not there)
Members
at
at?: {
kind: DataKind;
id: string;
path: string;
};The definition it is in and the field, as the editor's Data panel names them ( kind: 'abilities', id: 'holy-light', path: 'effects.0.buff' ), where it is in one
id
id: string;The id that is wrong, or the definition the warning is about
level
level: 'error' | 'warning';error: the game will throw or misbehave when it gets there; warning: likely a slip, possibly meant
message
message: string;What is wrong, in words for the person writing the rules
where
where: string;Where in the rules: units.footman.trains, abilities.holy-light.effects[0].buff