// ─── Lightning Spells ────────────────────────────────────────────────────────
// Fast, armor-piercing, harder to dodge
import type { SpellDef } from '../../types';
import { elemCost } from '../elements';

export const LIGHTNING_SPELLS: Record<string, SpellDef> = {
  // Tier 1 - Basic Lightning
  spark: {
    name: "Spark",
    elem: "lightning",
    dmg: 8,
    cost: elemCost("lightning", 1),
    tier: 1,
    castSpeed: 4,
    unlock: 120,
    studyTime: 2,
    desc: "A quick spark of lightning. Very fast and hard to dodge.",
    effects: [{ type: 'armor_pierce', value: 0.2 }],
    onHitEffect: { type: 'armor_corrode', duration: 3, magnitude: 0.15 },
  },
  lightningBolt: {
    name: "Lightning Bolt",
    elem: "lightning",
    dmg: 14,
    cost: elemCost("lightning", 2),
    tier: 1,
    castSpeed: 3,
    unlock: 150,
    studyTime: 3,
    desc: "A bolt of lightning that pierces armor.",
    effects: [{ type: 'armor_pierce', value: 0.3 }],
    onHitEffect: { type: 'armor_corrode', duration: 3, magnitude: 0.15 },
  },
  
  // Tier 2 - Advanced Lightning
  chainLightning: {
    name: "Chain Lightning",
    elem: "lightning",
    dmg: 25,
    cost: elemCost("lightning", 5),
    tier: 2,
    castSpeed: 2,
    unlock: 900,
    studyTime: 8,
    desc: "Lightning that arcs between enemies. Hits 3 targets.",
    isAoe: true,
    aoeTargets: 3,
    effects: [{ type: 'chain', value: 3 }]
  },
  stormCall: {
    name: "Storm Call",
    elem: "lightning",
    dmg: 40,
    cost: elemCost("lightning", 6),
    tier: 2,
    castSpeed: 1.5,
    unlock: 1100,
    studyTime: 10,
    desc: "Call down a storm. Hits 2 targets with armor pierce.",
    isAoe: true,
    aoeTargets: 2,
    effects: [{ type: 'armor_pierce', value: 0.4 }]
  },
  
  // Tier 3 - Master Lightning
  thunderStrike: {
    name: "Thunder Strike",
    elem: "lightning",
    dmg: 150,
    cost: elemCost("lightning", 15),
    tier: 3,
    castSpeed: 0.8,
    unlock: 10000,
    studyTime: 24,
    desc: "Devastating lightning that ignores 50% armor.",
    effects: [{ type: 'armor_pierce', value: 0.5 }]
  },
};
