Files
Battle-for-Tismo/shared/game_state/constants.js
T

20 lines
833 B
JavaScript

// Simulation constants and tuning knobs. Kept together so the rest of the
// model can import the ones it needs.
// The news feed keeps the most recent entries and drops the oldest ones, so a
// long-running game does not grow the snapshot without bound.
export const MAX_NEWS = 100;
export const UNIT_VISION = 2;
export const TERRITORY_VISION = 1;
export const HOURS_PER_DAY = 24;
export const DAYS_PER_YEAR = 365;
export const HOURS_PER_YEAR = HOURS_PER_DAY * DAYS_PER_YEAR;
export const CONTROLLED_SPEED_MULTIPLIER = 1.5;
export const DEFAULT_UNIT_SPEED = 0.5;
export const MIN_STEP_COST = 0.0001;
// A city may hold at most this many ordered units in its training queue.
export const TRAINING_QUEUE_LIMIT = 100;
// A defending unit's defense is doubled: a 100% defensive bonus.
export const DEFENDER_DEFENSE_MULTIPLIER = 2.0;