enum ActionType { attack, defend }

enum RiskLevel { safe, normal, risky }

enum EnemyActionType { attack, defend }

enum StatusEffectType {
  stun, // Cannot act this turn
  vulnerable, // Takes 50% more damage
  bleed, // Takes damage at start/end of turn
  defenseForbidden, // Cannot use Defend action
  disarmed, // Attack strength reduced (e.g., 10%)
  attackUp,
  heal, // New: Increases Attack Power
}

/// 공격 실패 시 이펙트 피드백 타입 정의
enum BattleFeedbackType {
  miss, // 공격이 빗나감
  failed, // 방어 실패
  dodge, // 회피 성공
}

/// 스탯에 적용될 수 있는 수정자(Modifier)의 타입 정의.
/// Flat: 기본 값에 직접 더해지는 값.
/// Percent: 기본 값에 비율로 곱해지는 값.
enum ModifierType { flat, percent }

enum StageType {
  battle, // Normal battle
  elite, // Stronger enemy
  shop, // Buy/Sell items
  rest, // Heal or repair
}

enum EquipmentSlot { weapon, armor, shield, accessory, consumable }

enum WeaponType { oneHanded, twoHanded }

EquipmentSlot equipmentSlotFromName(String name) {
  switch (name) {
    case 'mainWeapon':
    case 'weapon':
      return EquipmentSlot.weapon;
    case 'subweapon':
    case 'shield':
      return EquipmentSlot.shield;
    case 'armor':
      return EquipmentSlot.armor;
    case 'accessory':
      return EquipmentSlot.accessory;
    case 'consumable':
      return EquipmentSlot.consumable;
    default:
      return EquipmentSlot.weapon;
  }
}

String equipmentSlotStorageName(EquipmentSlot slot) {
  switch (slot) {
    case EquipmentSlot.weapon:
      return 'mainWeapon';
    case EquipmentSlot.shield:
      return 'subweapon';
    case EquipmentSlot.armor:
      return 'armor';
    case EquipmentSlot.accessory:
      return 'accessory';
    case EquipmentSlot.consumable:
      return 'consumable';
  }
}

enum DamageType { normal, bleed, vulnerable }

enum StatType { maxHp, atk, defense, luck, dodge }

enum ItemRarity { normal, magic, rare, legendary, unique }

enum ItemTier { tier1, tier2, tier3 }
