UpgradeDef
Interface of @v12-engine/engine
export interface UpgradeDefResearch that improves a player's units for the rest of the game
Members
apply
apply?: (world: World, entity: Entity, level: number) => void;What it does besides stats, in code, to each unit of the player's: as a level is researched (to the units there are), and as a unit comes into the world while the player has it. Gives an ability, lets a unit hit what flies. Run again for every level: what it does is up to it to not do twice
basedOn
basedOn?: string;The definition this one is a copy of, made from the data (copyOf in a data.json, the editor's Copy as new): what it is drawn, heard and pictured as where the game gives it no look of its own
cost
cost: Cost;Paid for every level
description
description?: string;What the upgrade does, in words, shown when the pointer is over it
effects
effects: UpgradeEffect[];What each level changes in the stats of the units it applies to
hotkey
hotkey?: string;The key that researches it from the command card
id
id: string;The upgrade's id, shared by every game: give it a prefix of the game's
maxLevel
maxLevel?: number;The highest level that can be researched; 1 when left out
name
name: string;What the player sees the upgrade called
race
race?: string;The race it is of (Rules.races): only its players may research it. Everyone's when left out
requires
requires?: string[][];Building types needed, one list per level. Levels past the end of the list need nothing
researchTime
researchTime: number;Seconds per level