export interface SeedTalent {
  name: string;
  source: string; // 'Fighter', 'Priest', 'Thief', 'Wizard', 'Human', 'Elf', 'Dwarf', 'Halfling', 'Goblin', 'Half-Orc', 'General'
  description: string;
  effect: Record<string, unknown>;
}

export const SEED_TALENTS: SeedTalent[] = [
  // --- Fighter ---
  {
    name: "Hauler",
    source: "Fighter",
    description: "Gain +2 gear slots",
    effect: { gear_slots_bonus: 2 },
  },
  {
    name: "Weapon Mastery",
    source: "Fighter",
    description: "+1 to attack and damage with one weapon type",
    effect: { attack_bonus: 1, damage_bonus: 1 },
  },
  {
    name: "Grit",
    source: "Fighter",
    description: "Gain +2 HP and +1 HP each level",
    effect: { hp_bonus: 2, hp_per_level: 1 },
  },

  // --- Priest ---
  {
    name: "Turn Undead",
    source: "Priest",
    description: "Force nearby undead to flee",
    effect: {},
  },
  {
    name: "Healing Touch",
    source: "Priest",
    description: "Heal 1d4+level HP once per rest",
    effect: {},
  },
  {
    name: "Shield of Faith",
    source: "Priest",
    description: "+1 AC when holding a holy symbol",
    effect: { ac_bonus: 1 },
  },

  // --- Thief ---
  {
    name: "Backstab",
    source: "Thief",
    description:
      "Extra 1 + half level (round down) weapon dice of damage with surprise attacks",
    effect: { damage_bonus_surprise: true },
  },
  {
    name: "Thievery",
    source: "Thief",
    description:
      "Trained in climbing, sneaking, hiding, disguise, finding & disabling traps, delicate tasks",
    effect: {},
  },
  {
    name: "Keen Senses",
    source: "Goblin",
    description: "Can't be surprised",
    effect: { immune_surprise: true },
  },

  // --- Wizard ---
  {
    name: "Magic Missile",
    source: "Wizard",
    description: "Auto-hit spell dealing 1d4 damage",
    effect: {},
  },
  {
    name: "Arcane Focus",
    source: "Wizard",
    description: "+1 to spellcasting checks",
    effect: { spellcast_bonus: 1 },
  },

  // --- Ancestry ---
  {
    name: "Brave",
    source: "Halfling",
    description: "Advantage on rolls to resist fear",
    effect: { advantage: "fear" },
  },
  {
    name: "Stout",
    source: "Dwarf",
    description: "Advantage on Constitution checks vs poison",
    effect: { advantage: "poison" },
  },
  {
    name: "Farsight",
    source: "Elf",
    description: "Can see in dim light as if bright light",
    effect: {},
  },
  {
    name: "Mighty",
    source: "Half-Orc",
    description: "Advantage on Strength checks",
    effect: { advantage: "strength" },
  },
  {
    name: "Ambitious",
    source: "Human",
    description: "Gain one extra talent at 1st level",
    effect: {},
  },

  // --- General (level-up talents anyone can pick) ---
  {
    name: "Stat Bonus: +2 Strength",
    source: "General",
    description: "+2 to Strength",
    effect: { stat_bonus: "STR", stat_bonus_value: 2 },
  },
  {
    name: "Stat Bonus: +2 Dexterity",
    source: "General",
    description: "+2 to Dexterity",
    effect: { stat_bonus: "DEX", stat_bonus_value: 2 },
  },
  {
    name: "Stat Bonus: +2 Constitution",
    source: "General",
    description: "+2 to Constitution",
    effect: { stat_bonus: "CON", stat_bonus_value: 2 },
  },
  {
    name: "Stat Bonus: +2 Intelligence",
    source: "General",
    description: "+2 to Intelligence",
    effect: { stat_bonus: "INT", stat_bonus_value: 2 },
  },
  {
    name: "Stat Bonus: +2 Wisdom",
    source: "General",
    description: "+2 to Wisdom",
    effect: { stat_bonus: "WIS", stat_bonus_value: 2 },
  },
  {
    name: "Stat Bonus: +2 Charisma",
    source: "General",
    description: "+2 to Charisma",
    effect: { stat_bonus: "CHA", stat_bonus_value: 2 },
  },
];
