// ─── Base Disciplines ─────────────────────────────────────────────────────────
// Disciplines available to all attunements

import { DisciplinesAttunementType } from '../../types/disciplines';
import type { DisciplineDefinition } from '../../types/disciplines';

export const baseDisciplines: DisciplineDefinition[] = [
  {
    id: 'raw-mastery',
    name: 'Raw Mana Mastery',
    attunement: DisciplinesAttunementType.BASE,
    manaType: 'raw',
    baseCost: 5,
    description: 'Learn to harness raw mana more efficiently.',
    statBonus: { stat: 'maxManaBonus', baseValue: 10, label: 'Max Mana' },
    difficultyFactor: 100,
    scalingFactor: 50,
    drainBase: 1,
    perks: [
      {
        id: 'raw-mastery-1',
        type: 'once',
        threshold: 100,
        value: 0,
        description: '+50 Max Mana',
        bonus: { stat: 'maxManaBonus', amount: 50 },
      },
      {
        id: 'raw-mastery-2',
        type: 'infinite',
        threshold: 500,
        value: 100,
        description: 'Every 100 XP: +25 Max Mana',
        bonus: { stat: 'maxManaBonus', amount: 25 },
      },
    ],
  },
  {
    id: 'mana-circulation',
    name: 'Mana Circulation',
    attunement: DisciplinesAttunementType.BASE,
    manaType: 'raw',
    baseCost: 5,
    description:
      'Cultivate and circulate raw mana through the body — the foundation upon which all elemental work is built.',
    statBonus: { stat: 'regenBonus', baseValue: 0.2, label: 'Raw Mana Regen' },
    difficultyFactor: 100,
    scalingFactor: 50,
    drainBase: 1,
    perks: [
      {
        id: 'mana-circulation-regen',
        type: 'infinite',
        threshold: 100,
        value: 100,
        description: 'Every 100 XP: +10% raw mana regen',
        bonus: { stat: 'regenMultiplier', amount: 0.10 },
      },
      {
        id: 'mana-circulation-meditation',
        type: 'capped',
        threshold: 100,
        value: 100,
        description: 'Every 100 XP: +0.5 to meditation multiplier (7 tiers, up to +3.5). Adds directly to the meditation multiplier cap.',
        bonus: { stat: 'meditationCapBonus', amount: 0.5 },
        maxTier: 7,
      },
      {
        id: 'mana-circulation-click',
        type: 'capped',
        threshold: 500,
        value: 500,
        description: 'Every 500 XP: +1 mana per click (5 tiers, up to +5).',
        bonus: { stat: 'clickManaBonus', amount: 1 },
        maxTier: 5,
      },
    ],
  },
  {
    id: 'meditative-mastery',
    name: 'Meditative Mastery',
    attunement: DisciplinesAttunementType.BASE,
    manaType: 'raw',
    baseCost: 5,
    description:
      'Deepen your meditation practice to accelerate discipline XP gain. The more you master yourself, the faster all disciplines grow.',
    statBonus: { stat: 'disciplineXpBonus', baseValue: 0.5, label: 'Discipline XP Bonus/sec' },
    difficultyFactor: 120,
    scalingFactor: 60,
    drainBase: 1,
    perks: [
      {
        id: 'meditative-mastery-1',
        type: 'once',
        threshold: 100,
        value: 0,
        description: '+0.5 Discipline XP per sec',
        bonus: { stat: 'disciplineXpBonus', amount: 0.5 },
      },
      {
        id: 'meditative-mastery-2',
        type: 'infinite',
        threshold: 200,
        value: 100,
        description: 'Every 100 XP: +0.25 Discipline XP per sec',
        bonus: { stat: 'disciplineXpBonus', amount: 0.25 },
      },
    ],
  },
];