// ─── Discipline Types ─────────────────────────────────────────────────────────

import type { ManaType } from './elements';

// ─── Attunement Types ─────────────────────────────────────────────────────────
export enum DisciplinesAttunementType {
  BASE = 'base',
  ENCHANTER = 'enchanter',
  FABRICATOR = 'fabricator',
  INVOKER = 'invoker',
}

// ─── Perk Types ───────────────────────────────────────────────────────────────
export type PerkType = 'capped' | 'once' | 'infinite';

export interface DisciplinePerk {
  id: string;
  type: PerkType;
  threshold: number;
  value: number;
  description: string;
}

// ─── Discipline Definition ────────────────────────────────────────────────────
export interface DisciplineDefinition {
  id: string;
  name: string;
  attunement: DisciplinesAttunementType;
  manaType: ManaType;
  baseCost: number;
  description: string;
  statBonus: { stat: string; baseValue: number };
  difficultyFactor: number;
  scalingFactor: number;
  drainBase: number;
  perks: DisciplinePerk[];
  requires?: string[];
}

// ─── Discipline State ─────────────────────────────────────────────────────────
export interface DisciplineState {
  id: string;
  xp: number;
  paused: boolean;
}

// ─── Discipline Constants ─────────────────────────────────────────────────────
export const MAX_CONCURRENT_DISCIPLINES = 1;
export const BASE_CONCURRENT_DISCIPLINES = 1;