// ─── Combat Enchantment Effects ─────────────────────────────────────────────
// All combat-related enchantment effects that can be applied to equipment

import type { EquipmentCategory } from '../equipment'
import type { EnchantmentEffectDef } from '../enchantment-types'

// Helper to define allowed equipment categories for each effect type
const CASTER_AND_HANDS: EquipmentCategory[] = ['caster', 'hands']

export const COMBAT_EFFECTS: Record<string, EnchantmentEffectDef> = {
  // ═══════════════════════════════════════════════════════════════════════════
  // COMBAT EFFECTS - Damage and attack enhancements
  // ═══════════════════════════════════════════════════════════════════════════
  
  damage_5: {
    id: 'damage_5',
    name: 'Minor Power',
    description: '+5 base damage',
    category: 'combat',
    baseCapacityCost: 15,
    maxStacks: 5,
    allowedEquipmentCategories: CASTER_AND_HANDS,
    effect: { type: 'bonus', stat: 'baseDamage', value: 5 }
  },
  damage_10: {
    id: 'damage_10',
    name: 'Moderate Power',
    description: '+10 base damage',
    category: 'combat',
    baseCapacityCost: 28,
    maxStacks: 4,
    allowedEquipmentCategories: CASTER_AND_HANDS,
    effect: { type: 'bonus', stat: 'baseDamage', value: 10 }
  },
  damage_pct_10: {
    id: 'damage_pct_10',
    name: 'Amplification',
    description: '+10% damage',
    category: 'combat',
    baseCapacityCost: 30,
    maxStacks: 3,
    allowedEquipmentCategories: CASTER_AND_HANDS,
    effect: { type: 'multiplier', stat: 'baseDamage', value: 1.10 }
  },
  crit_5: {
    id: 'crit_5',
    name: 'Sharp Edge',
    description: '+5% critical hit chance',
    category: 'combat',
    baseCapacityCost: 20,
    maxStacks: 4,
    allowedEquipmentCategories: CASTER_AND_HANDS,
    effect: { type: 'bonus', stat: 'critChance', value: 0.05 }
  },
  attack_speed_10: {
    id: 'attack_speed_10',
    name: 'Swift Casting',
    description: '+10% attack speed',
    category: 'combat',
    baseCapacityCost: 22,
    maxStacks: 4,
    allowedEquipmentCategories: CASTER_AND_HANDS,
    effect: { type: 'multiplier', stat: 'attackSpeed', value: 1.10 }
  },
};
