// ─── Magic Sword Enchantments ───────────────────────────────────────────────
// For weapon enchanting system
import type { SpellDef } from '../../types';
import { rawCost } from '../elements';

export const ENCHANTMENT_SPELLS: Record<string, SpellDef> = {
  fireBlade: {
    name: "Fire Blade",
    elem: "fire",
    dmg: 3,
    cost: rawCost(1),
    tier: 1,
    castSpeed: 4,
    unlock: 100,
    studyTime: 2,
    desc: "Enchant a blade with fire. Burns enemies over time.",
    isWeaponEnchant: true,
    effects: [{ type: 'burn', value: 2, duration: 3 }]
  },
  frostBlade: {
    name: "Frost Blade",
    elem: "water",
    dmg: 3,
    cost: rawCost(1),
    tier: 1,
    castSpeed: 4,
    unlock: 100,
    studyTime: 2,
    desc: "Enchant a blade with frost. Prevents enemy dodge.",
    isWeaponEnchant: true,
    effects: [{ type: 'freeze', value: 0, chance: 1 }] // 100% freeze = no dodge
  },
  lightningBlade: {
    name: "Lightning Blade",
    elem: "lightning",
    dmg: 4,
    cost: rawCost(1),
    tier: 1,
    castSpeed: 5,
    unlock: 150,
    studyTime: 3,
    desc: "Enchant a blade with lightning. Pierces 30% armor.",
    isWeaponEnchant: true,
    effects: [{ type: 'armor_pierce', value: 0.3 }]
  },
  voidBlade: {
    name: "Void Blade",
    elem: "dark",
    dmg: 5,
    cost: rawCost(2),
    tier: 2,
    castSpeed: 3,
    unlock: 800,
    studyTime: 8,
    desc: "Enchant a blade with void. +20% damage.",
    isWeaponEnchant: true,
    effects: [{ type: 'buff', value: 0.2 }]
  },
};
