# Lorekeeper - Support/Control
# Flexible hybrid class: Choose Arcane Weaving (buffs/debuffs) or Illusionist (crowd control)

class_id: lorekeeper
name: Lorekeeper
description: >
  A master of arcane knowledge who manipulates reality through words and illusions. Lorekeepers
  excel in supporting allies and controlling enemies through clever magic and mental manipulation.
  Choose your art: weave arcane power or bend reality itself.

# Base stats (total: 67 + luck)
base_stats:
  strength: 8       # Low physical power
  dexterity: 11     # Above average agility
  constitution: 10  # Average endurance
  intelligence: 13  # Above average magical power
  wisdom: 11        # Above average perception
  charisma: 14      # High social/performance
  luck: 10          # Knowledge is its own luck

starting_equipment:
  - tome
  - cloth_armor
  - rusty_knife

starting_abilities:
  - basic_attack

skill_trees:
  # ==================== ARCANE WEAVING (Buffs/Debuffs) ====================
  - tree_id: arcane_weaving
    name: Arcane Weaving
    description: >
      The path of the arcane weaver. Master supportive magic to enhance allies,
      weaken enemies, and turn the tide of battle through clever enchantments.

    nodes:
      # --- TIER 1 ---
      - skill_id: arcane_brilliance
        name: Arcane Brilliance
        description: Grant an ally increased intelligence and magical power for 5 turns.
        tier: 1
        prerequisites: []
        effects:
          abilities:
            - arcane_brilliance

      - skill_id: scholarly_mind
        name: Scholarly Mind
        description: Your extensive study enhances your magical knowledge.
        tier: 1
        prerequisites: []
        effects:
          stat_bonuses:
            intelligence: 5

      # --- TIER 2 ---
      - skill_id: haste
        name: Haste
        description: Speed up an ally, granting them an extra action this turn.
        tier: 2
        prerequisites:
          - arcane_brilliance
        effects:
          abilities:
            - haste

      - skill_id: arcane_mastery
        name: Arcane Mastery
        description: Your mastery of arcane arts increases all buff effectiveness.
        tier: 2
        prerequisites:
          - scholarly_mind
        effects:
          stat_bonuses:
            intelligence: 5
            charisma: 3
          combat_bonuses:
            buff_power: 0.20  # +20% buff effectiveness

      # --- TIER 3 ---
      - skill_id: mass_enhancement
        name: Mass Enhancement
        description: Enhance all allies at once, increasing their stats for 5 turns.
        tier: 3
        prerequisites:
          - haste
        effects:
          abilities:
            - mass_enhancement

      - skill_id: arcane_weakness
        name: Arcane Weakness
        description: Curse an enemy with weakness, reducing their stats and damage.
        tier: 3
        prerequisites:
          - arcane_mastery
        effects:
          abilities:
            - arcane_weakness

      # --- TIER 4 ---
      - skill_id: time_warp
        name: Time Warp
        description: Manipulate time itself, granting all allies bonus actions.
        tier: 4
        prerequisites:
          - mass_enhancement
        effects:
          abilities:
            - time_warp

      - skill_id: master_weaver
        name: Master Weaver
        description: Your weaving expertise makes all enchantments far more potent.
        tier: 4
        prerequisites:
          - arcane_weakness
        effects:
          stat_bonuses:
            intelligence: 15
            charisma: 10
          combat_bonuses:
            buff_power: 0.35  # Additional +35% buff effectiveness
            debuff_power: 0.35  # +35% debuff effectiveness

      # --- TIER 5 (Ultimate) ---
      - skill_id: reality_shift
        name: Reality Shift
        description: Shift reality to massively empower all allies and weaken all enemies.
        tier: 5
        prerequisites:
          - time_warp
        effects:
          abilities:
            - reality_shift

      - skill_id: archmage
        name: Archmage
        description: Achieve the rank of archmage. Incredible support magic bonuses.
        tier: 5
        prerequisites:
          - master_weaver
        effects:
          stat_bonuses:
            intelligence: 25
            charisma: 20
            wisdom: 10
          combat_bonuses:
            buff_power: 0.75  # Additional +75% buff effectiveness
            debuff_power: 0.75  # Additional +75% debuff effectiveness

  # ==================== ILLUSIONIST (Crowd Control) ====================
  - tree_id: illusionist
    name: Illusionist
    description: >
      The path of deception. Master illusion magic to confuse, disorient, and control
      the minds of your enemies, rendering them helpless.

    nodes:
      # --- TIER 1 ---
      - skill_id: confuse
        name: Confuse
        description: Confuse an enemy's mind, causing them to attack randomly for 2 turns.
        tier: 1
        prerequisites: []
        effects:
          abilities:
            - confuse

      - skill_id: silver_tongue
        name: Silver Tongue
        description: Your persuasive abilities make mind magic more effective.
        tier: 1
        prerequisites: []
        effects:
          stat_bonuses:
            charisma: 5

      # --- TIER 2 ---
      - skill_id: mesmerize
        name: Mesmerize
        description: Mesmerize an enemy, stunning them for 2 turns.
        tier: 2
        prerequisites:
          - confuse
        effects:
          abilities:
            - mesmerize

      - skill_id: mental_fortress
        name: Mental Fortress
        description: Fortify your mind and those of your allies against mental attacks.
        tier: 2
        prerequisites:
          - silver_tongue
        effects:
          stat_bonuses:
            wisdom: 5
          combat_bonuses:
            mental_resistance: 0.25  # +25% resistance to mind effects

      # --- TIER 3 ---
      - skill_id: mass_confusion
        name: Mass Confusion
        description: Confuse all enemies, causing chaos on the battlefield.
        tier: 3
        prerequisites:
          - mesmerize
        effects:
          abilities:
            - mass_confusion

      - skill_id: mirror_image
        name: Mirror Image
        description: Create illusory copies of yourself that absorb attacks.
        tier: 3
        prerequisites:
          - mental_fortress
        effects:
          abilities:
            - mirror_image

      # --- TIER 4 ---
      - skill_id: phantasmal_killer
        name: Phantasmal Killer
        description: Create a terrifying illusion that deals massive psychic damage and fears enemies.
        tier: 4
        prerequisites:
          - mass_confusion
        effects:
          abilities:
            - phantasmal_killer

      - skill_id: master_illusionist
        name: Master Illusionist
        description: Your illusions become nearly indistinguishable from reality.
        tier: 4
        prerequisites:
          - mirror_image
        effects:
          stat_bonuses:
            charisma: 15
            intelligence: 10
          combat_bonuses:
            illusion_duration: 2  # +2 turns to illusion effects
            cc_effectiveness: 0.35  # +35% crowd control effectiveness

      # --- TIER 5 (Ultimate) ---
      - skill_id: mass_domination
        name: Mass Domination
        description: Dominate the minds of all enemies, forcing them to fight for you briefly.
        tier: 5
        prerequisites:
          - phantasmal_killer
        effects:
          abilities:
            - mass_domination

      - skill_id: grand_illusionist
        name: Grand Illusionist
        description: Become a grand illusionist. Reality bends to your will.
        tier: 5
        prerequisites:
          - master_illusionist
        effects:
          stat_bonuses:
            charisma: 30
            intelligence: 15
            wisdom: 10
          combat_bonuses:
            illusion_duration: 5  # Additional +5 turns to illusions
            cc_effectiveness: 0.75  # Additional +75% crowd control effectiveness
            mental_damage_bonus: 1.0  # +100% psychic damage
