// ─── Compound Mana Spells ───────────────────────────────────────────────────
// Blood, Metal, Wood, Sand
import type { SpellDef } from '../../types';
import { elemCost } from '../elements';

export const COMPOUND_SPELLS: Record<string, SpellDef> = {
  // ─── METAL SPELLS (Fire + Earth) ─────────────────────────────────────────────
  // Metal magic is slow but devastating with high armor pierce
  metalShard: {
    name: "Metal Shard",
    elem: "metal",
    dmg: 16,
    cost: elemCost("metal", 2),
    tier: 1,
    castSpeed: 1.8,
    unlock: 220,
    studyTime: 3,
    desc: "A sharpened metal shard. Slower but pierces armor.",
    effects: [{ type: 'armor_pierce', value: 0.25 }]
  },
  ironFist: {
    name: "Iron Fist",
    elem: "metal",
    dmg: 28,
    cost: elemCost("metal", 4),
    tier: 1,
    castSpeed: 1.5,
    unlock: 350,
    studyTime: 5,
    desc: "A crushing fist of iron. High armor pierce.",
    effects: [{ type: 'armor_pierce', value: 0.35 }]
  },
  steelTempest: {
    name: "Steel Tempest",
    elem: "metal",
    dmg: 55,
    cost: elemCost("metal", 8),
    tier: 2,
    castSpeed: 1,
    unlock: 1300,
    studyTime: 12,
    desc: "A whirlwind of steel blades. Ignores much armor.",
    effects: [{ type: 'armor_pierce', value: 0.45 }]
  },
  furnaceBlast: {
    name: "Furnace Blast",
    elem: "metal",
    dmg: 200,
    cost: elemCost("metal", 20),
    tier: 3,
    castSpeed: 0.5,
    unlock: 18000,
    studyTime: 32,
    desc: "Molten metal and fire combined. Devastating armor pierce.",
    effects: [{ type: 'armor_pierce', value: 0.6 }]
  },
  
  // ─── SAND SPELLS (Earth + Water) ────────────────────────────────────────────
  // Sand magic slows enemies and deals steady damage
  sandBlast: {
    name: "Sand Blast",
    elem: "sand",
    dmg: 11,
    cost: elemCost("sand", 2),
    tier: 1,
    castSpeed: 3,
    unlock: 190,
    studyTime: 3,
    desc: "A blast of stinging sand. Fast casting.",
  },
  sandstorm: {
    name: "Sandstorm",
    elem: "sand",
    dmg: 22,
    cost: elemCost("sand", 4),
    tier: 1,
    castSpeed: 2,
    unlock: 300,
    studyTime: 4,
    desc: "A swirling sandstorm. Hits 2 enemies.",
    isAoe: true,
    aoeTargets: 2,
  },
  desertWind: {
    name: "Desert Wind",
    elem: "sand",
    dmg: 38,
    cost: elemCost("sand", 6),
    tier: 2,
    castSpeed: 1.5,
    unlock: 950,
    studyTime: 8,
    desc: "A scouring desert wind. Hits 3 enemies.",
    isAoe: true,
    aoeTargets: 3,
  },
  duneCollapse: {
    name: "Dune Collapse",
    elem: "sand",
    dmg: 100,
    cost: elemCost("sand", 16),
    tier: 3,
    castSpeed: 0.6,
    unlock: 14000,
    studyTime: 28,
    desc: "Dunes collapse on all enemies. Hits 5 targets.",
    isAoe: true,
    aoeTargets: 5,
  },
};
