Код IT
← Каталог

TypeScript — OnlineCardGame — `src/game/settings.ts`

Фрагмент из «TypeScript — OnlineCardGame»: `src/game/settings.ts`.

typescript spinoffencyclopedia9-04-razrabotka-igr-praktikum-razrabotki-igr-9 embed URL статья в энциклопедии
TypeScript main.ts
export const CARD_ATTACK = 'attack';
export const CARD_BLOCK = 'block';
export const CARD_BUFF = 'buff';
export const CARD_DEBUFF = 'debuff';
export const CARD_DRAW = 'draw';
export const CARD_CREATURE = 'creature';

export const NODE_COMBAT = 'combat';
export const NODE_ELITE = 'elite';
export const NODE_BOSS = 'boss';
export const NODE_REST = 'rest';
export const NODE_SHOP = 'shop';
export const NODE_TREASURE = 'treasure';
export const NODE_EVENT = 'event';

export const STARTING_HP = 85;
export const STARTING_ENERGY = 3;
export const MAX_ENERGY = 10;
export const STARTING_GOLD = 99;
export const STARTING_HAND = 5;
export const DRAW_PER_TURN = 5;
export const MAX_HAND = 10;

export const CARD_TYPE_COLORS: Record<string, string> = {
  attack: '#c83737',
  block: '#3770c8',
  buff: '#c89628',
  debuff: '#8232b4',
  draw: '#37aa78',
  creature: '#b47832',
};
export const CARD_ATTACK = 'attack';
export const CARD_BLOCK = 'block';
export const CARD_BUFF = 'buff';
export const CARD_DEBUFF = 'debuff';
export const CARD_DRAW = 'draw';
export const CARD_CREATURE = 'creature';

export const NODE_COMBAT = 'combat';
export const NODE_ELITE = 'elite';
export const NODE_BOSS = 'boss';
export const NODE_REST = 'rest';
export const NODE_SHOP = 'shop';
export const NODE_TREASURE = 'treasure';
export const NODE_EVENT = 'event';

export const STARTING_HP = 85;
export const STARTING_ENERGY = 3;
export const MAX_ENERGY = 10;
export const STARTING_GOLD = 99;
export const STARTING_HAND = 5;
export const DRAW_PER_TURN = 5;
export const MAX_HAND = 10;

export const CARD_TYPE_COLORS: Record<string, string> = {
  attack: '#c83737',
  block: '#3770c8',
  buff: '#c89628',
  debuff: '#8232b4',
  draw: '#37aa78',
  creature: '#b47832',
};