// 成就系統配置
// 每個成就包含：id, name, description, condition, reward

export const ACHIEVEMENTS = [
  // ========== 成長類成就 ==========
  {
    id: 'first_step',
    name: '第一步',
    description: '寵物年齡達到 1 小時',
    category: 'growth',
    condition: {
      type: 'age',
      value: 3600 // 1 小時（秒）
    },
    reward: {
      buffs: {
        strGain: 0.05, // 力量成長 +5%
        intGain: 0.05  // 智力成長 +5%
      }
    },
    icon: '👶'
  },
  {
    id: 'one_day_old',
    name: '一日之計',
    description: '寵物年齡達到 1 天',
    category: 'growth',
    condition: {
      type: 'age',
      value: 86400 // 1 天（秒）
    },
    reward: {
      buffs: {
        strGain: 0.10,
        intGain: 0.10,
        dexGain: 0.10,
        luck: 2 // 運勢 +2
      }
    },
    icon: '📅'
  },
  {
    id: 'evolved_baby',
    name: '破殼而出',
    description: '從蛋階段進化到幼體',
    category: 'growth',
    condition: {
      type: 'stage',
      value: 'baby'
    },
    reward: {
      buffs: {
        health: 5, // 最大健康 +5
        strGain: 0.05
      }
    },
    icon: '🥚'
  },
  {
    id: 'evolved_child',
    name: '茁壯成長',
    description: '進化到幼年階段',
    category: 'growth',
    condition: {
      type: 'stage',
      value: 'child'
    },
    reward: {
      buffs: {
        health: 10,
        strGain: 0.10,
        intGain: 0.10
      }
    },
    icon: '🌱'
  },
  {
    id: 'evolved_adult',
    name: '成年禮',
    description: '進化到成年階段',
    category: 'growth',
    condition: {
      type: 'stage',
      value: 'adult'
    },
    reward: {
      buffs: {
        health: 20,
        strGain: 0.15,
        intGain: 0.15,
        dexGain: 0.15,
        luck: 5
      }
    },
    icon: '🎂'
  },
  {
    id: 'perfect_stats',
    name: '完美屬性',
    description: '力量、智力、敏捷都達到 50',
    category: 'growth',
    condition: {
      type: 'stats',
      stats: {
        str: 50,
        int: 50,
        dex: 50
      }
    },
    reward: {
      buffs: {
        str: 3,
        int: 3,
        dex: 3,
        attack: 0.10, // 攻擊力 +10%
        defense: 0.10 // 防禦力 +10%
      }
    },
    icon: '⭐'
  },
  {
    id: 'max_stats',
    name: '屬性巔峰',
    description: '力量、智力、敏捷都達到 100',
    category: 'growth',
    condition: {
      type: 'stats',
      stats: {
        str: 100,
        int: 100,
        dex: 100
      }
    },
    reward: {
      buffs: {
        str: 10,
        int: 10,
        dex: 10,
        luck: 10,
        attack: 0.20,
        defense: 0.20,
        speed: 0.20
      }
    },
    icon: '💎'
  },

  // ========== 互動類成就 ==========
  {
    id: 'first_feed',
    name: '初次餵食',
    description: '第一次餵食寵物',
    category: 'interaction',
    condition: {
      type: 'action_count',
      action: 'feed',
      value: 1
    },
    reward: {
      buffs: {
        strGain: 0.03
      }
    },
    icon: '🍼'
  },
  {
    id: 'caretaker',
    name: '照顧者',
    description: '累計餵食 50 次',
    category: 'interaction',
    condition: {
      type: 'action_count',
      action: 'feed',
      value: 50
    },
    reward: {
      buffs: {
        strGain: 0.10,
        healthRecovery: 0.05
      }
    },
    icon: '🍽️'
  },
  {
    id: 'playful_master',
    name: '玩耍大師',
    description: '累計玩耍 100 次',
    category: 'interaction',
    condition: {
      type: 'action_count',
      action: 'play',
      value: 100
    },
    reward: {
      buffs: {
        dexGain: 0.15,
        intGain: 0.10,
        happinessRecovery: 0.10
      }
    },
    icon: '🎮'
  },
  {
    id: 'clean_freak',
    name: '清潔達人',
    description: '累計清理便便 30 次',
    category: 'interaction',
    condition: {
      type: 'action_count',
      action: 'clean',
      value: 30
    },
    reward: {
      buffs: {
        health: 5,
        sicknessReduction: 0.10 // 生病抗性 +10%
      }
    },
    icon: '🧹'
  },
  {
    id: 'healer',
    name: '治療師',
    description: '累計治療 20 次',
    category: 'interaction',
    condition: {
      type: 'action_count',
      action: 'heal',
      value: 20
    },
    reward: {
      buffs: {
        healthRecovery: 0.15,
        health: 10
      }
    },
    icon: '💊'
  },

  // ========== 神明類成就 ==========
  {
    id: 'first_prayer',
    name: '初次祈福',
    description: '第一次向神明祈福',
    category: 'temple',
    condition: {
      type: 'action_count',
      action: 'pray',
      value: 1
    },
    reward: {
      buffs: {
        luck: 1
      }
    },
    icon: '🙏'
  },
  {
    id: 'devout',
    name: '虔誠信徒',
    description: '累計祈福 50 次',
    category: 'temple',
    condition: {
      type: 'action_count',
      action: 'pray',
      value: 50
    },
    reward: {
      buffs: {
        luck: 5,
        happinessRecovery: 0.05
      }
    },
    icon: '🕯️'
  },
  {
    id: 'deity_friend',
    name: '神明之友',
    description: '任一神明好感度達到 50',
    category: 'temple',
    condition: {
      type: 'deity_favor',
      value: 50
    },
    reward: {
      buffs: {
        luck: 3,
        healthRecovery: 0.05
      }
    },
    icon: '👼'
  },
  {
    id: 'deity_best_friend',
    name: '神明摯友',
    description: '任一神明好感度達到 100',
    category: 'temple',
    condition: {
      type: 'deity_favor',
      value: 100
    },
    reward: {
      buffs: {
        luck: 10,
        healthRecovery: 0.10,
        happinessRecovery: 0.05
      }
    },
    icon: '🌟'
  },
  {
    id: 'fortune_teller',
    name: '求籤達人',
    description: '累計抽籤 10 次',
    category: 'temple',
    condition: {
      type: 'action_count',
      action: 'drawFortune',
      value: 10
    },
    reward: {
      buffs: {
        luck: 3,
        dropRate: 0.05 // 掉落率 +5%
      }
    },
    icon: '🎴'
  },

  // ========== 事件類成就 ==========
  {
    id: 'event_explorer',
    name: '事件探索者',
    description: '觸發 20 個事件',
    category: 'event',
    condition: {
      type: 'event_count',
      value: 20
    },
    reward: {
      buffs: {
        luck: 2,
        dropRate: 0.03
      }
    },
    icon: '🔍'
  },
  {
    id: 'lucky_one',
    name: '幸運兒',
    description: '觸發 5 個好事件',
    category: 'event',
    condition: {
      type: 'event_type_count',
      eventType: 'good',
      value: 5
    },
    reward: {
      buffs: {
        luck: 5,
        happinessRecovery: 0.05
      }
    },
    icon: '🍀'
  },

  // ========== 特殊類成就 ==========
  {
    id: 'survivor',
    name: '倖存者',
    description: '從瀕死狀態恢復健康',
    category: 'special',
    condition: {
      type: 'recovered_from_dying',
      value: true
    },
    reward: {
      buffs: {
        health: 15,
        healthRecovery: 0.20,
        sicknessReduction: 0.15
      }
    },
    icon: '💪'
  },
  {
    id: 'perfect_day',
    name: '完美的一天',
    description: '飢餓、快樂、健康同時達到 100',
    category: 'special',
    condition: {
      type: 'perfect_state',
      value: true
    },
    reward: {
      buffs: {
        strGain: 0.05,
        intGain: 0.05,
        dexGain: 0.05,
        happinessRecovery: 0.05
      }
    },
    icon: '✨'
  },
  {
    id: 'night_owl',
    name: '夜貓子',
    description: '累計睡眠 50 次',
    category: 'special',
    condition: {
      type: 'action_count',
      action: 'sleep',
      value: 50
    },
    reward: {
      buffs: {
        health: 10,
        healthRecovery: 0.10
      }
    },
    icon: '🌙'
  }
]

// 成就分類
export const ACHIEVEMENT_CATEGORIES = {
  growth: { name: '成長', icon: '📈' },
  interaction: { name: '互動', icon: '🤝' },
  temple: { name: '神明', icon: '🙏' },
  event: { name: '事件', icon: '🎲' },
  special: { name: '特殊', icon: '⭐' }
}

