// ─── Miasma Spells ────────────────────────────────────────────────────────────
// Miasma magic - Air + Death compound, toxic/plague/armor corrosion focus
import type { SpellDef } from '../../types';
import { elemCost } from '../elements';

export const MIASMA_SPELLS: Record<string, SpellDef> = {
  // Tier 1 - Basic Miasma
  toxicCloud: {
    name: "Toxic Cloud",
    elem: "miasma",
    dmg: 9,
    cost: elemCost("miasma", 2),
    tier: 1,
    castSpeed: 2.8,
    unlock: 190,
    studyTime: 3,
    desc: "A cloud of toxic gas. Spreads to nearby enemies.",
    effects: [{ type: 'poison', value: 0.12 }]
  },
  plagueTouch: {
    name: "Plague Touch",
    elem: "miasma",
    dmg: 16,
    cost: elemCost("miasma", 3),
    tier: 1,
    castSpeed: 2.2,
    unlock: 280,
    studyTime: 4,
    desc: "Touch of plague. Corrodes armor and poisons.",
    effects: [{ type: 'poison', value: 0.15 }, { type: 'armor_corrode', value: 0.1 }]
  },

  // Tier 2 - Advanced Miasma
  miasmaBurst: {
    name: "Miasma Burst",
    elem: "miasma",
    dmg: 32,
    cost: elemCost("miasma", 5),
    tier: 2,
    castSpeed: 1.6,
    unlock: 900,
    studyTime: 8,
    desc: "A burst of toxic miasma. Hits all enemies in swarm rooms.",
    isAoe: true,
    aoeTargets: 4,
    effects: [{ type: 'poison', value: 0.2 }, { type: 'armor_corrode', value: 0.15 }]
  },
  pestilence: {
    name: "Pestilence",
    elem: "miasma",
    dmg: 48,
    cost: elemCost("miasma", 7),
    tier: 2,
    castSpeed: 1.2,
    unlock: 1300,
    studyTime: 11,
    desc: "Spreading plague. Reduces armor and stacks poison.",
    effects: [{ type: 'poison', value: 0.25 }, { type: 'armor_corrode', value: 0.2 }]
  },

  // Tier 3 - Master Miasma
  deathMiasma: {
    name: "Death Miasma",
    elem: "miasma",
    dmg: 130,
    cost: elemCost("miasma", 18),
    tier: 3,
    castSpeed: 0.5,
    unlock: 14000,
    studyTime: 28,
    desc: "Ultimate toxic cloud. Melts armor and spreads deadly plague.",
    isAoe: true,
    aoeTargets: 5,
    effects: [{ type: 'poison', value: 0.35 }, { type: 'armor_corrode', value: 0.3 }]
  },
};
