2025-11-24 13:45:09 +00:00
|
|
|
|
// 敵人配置(資料驅動)
|
|
|
|
|
|
export const ENEMIES = {
|
|
|
|
|
|
// 新手區敵人
|
|
|
|
|
|
cockroach: {
|
|
|
|
|
|
id: 'cockroach',
|
|
|
|
|
|
name: '巨大的蟑螂',
|
|
|
|
|
|
description: '生命力頑強的害蟲,雖然弱小但很噁心。',
|
|
|
|
|
|
stats: {
|
2025-11-27 09:48:36 +00:00
|
|
|
|
hp: 20000,
|
2025-11-24 13:45:09 +00:00
|
|
|
|
attack: 5,
|
2025-11-27 09:48:36 +00:00
|
|
|
|
defense: 9,
|
|
|
|
|
|
speed: 260
|
2025-11-24 13:45:09 +00:00
|
|
|
|
},
|
2025-11-27 09:48:36 +00:00
|
|
|
|
goldReward: { min: 1, max: 5 },
|
2025-11-24 13:45:09 +00:00
|
|
|
|
drops: [
|
|
|
|
|
|
{ itemId: 'cookie', chance: 0.3, count: 1 }
|
|
|
|
|
|
]
|
|
|
|
|
|
},
|
|
|
|
|
|
mouse: {
|
|
|
|
|
|
id: 'mouse',
|
|
|
|
|
|
name: '偷吃的老鼠',
|
|
|
|
|
|
description: '動作敏捷的小偷,喜歡偷吃東西。',
|
|
|
|
|
|
stats: {
|
|
|
|
|
|
hp: 35,
|
|
|
|
|
|
attack: 8,
|
|
|
|
|
|
defense: 2,
|
|
|
|
|
|
speed: 15
|
|
|
|
|
|
},
|
2025-11-27 09:48:36 +00:00
|
|
|
|
goldReward: { min: 3, max: 8 },
|
2025-11-24 13:45:09 +00:00
|
|
|
|
drops: [
|
|
|
|
|
|
{ itemId: 'cookie', chance: 0.4, count: 1 },
|
|
|
|
|
|
{ itemId: 'wooden_sword', chance: 0.05, count: 1 }
|
|
|
|
|
|
]
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
// 公園區敵人
|
|
|
|
|
|
stray_dog: {
|
|
|
|
|
|
id: 'stray_dog',
|
|
|
|
|
|
name: '兇猛的野狗',
|
|
|
|
|
|
description: '為了搶地盤而變得兇暴的野狗。',
|
|
|
|
|
|
stats: {
|
|
|
|
|
|
hp: 80,
|
|
|
|
|
|
attack: 15,
|
|
|
|
|
|
defense: 5,
|
|
|
|
|
|
speed: 10
|
|
|
|
|
|
},
|
2025-11-27 09:48:36 +00:00
|
|
|
|
goldReward: { min: 10, max: 20 },
|
2025-11-24 13:45:09 +00:00
|
|
|
|
drops: [
|
2025-11-27 09:48:36 +00:00
|
|
|
|
// { itemId: 'tuna_can', chance: 0.3, count: 1 }, // tuna_can not in items.js, using cookie for now or remove
|
2025-11-24 13:45:09 +00:00
|
|
|
|
{ itemId: 'leather_armor', chance: 0.1, count: 1 }
|
|
|
|
|
|
]
|
|
|
|
|
|
},
|
|
|
|
|
|
wild_cat: {
|
|
|
|
|
|
id: 'wild_cat',
|
|
|
|
|
|
name: '流浪貓老大',
|
|
|
|
|
|
description: '這片區域的老大,身手矯健。',
|
|
|
|
|
|
stats: {
|
|
|
|
|
|
hp: 100,
|
|
|
|
|
|
attack: 20,
|
|
|
|
|
|
defense: 8,
|
|
|
|
|
|
speed: 25
|
|
|
|
|
|
},
|
2025-11-27 09:48:36 +00:00
|
|
|
|
goldReward: { min: 20, max: 40 },
|
2025-11-24 13:45:09 +00:00
|
|
|
|
drops: [
|
2025-11-27 09:48:36 +00:00
|
|
|
|
// { itemId: 'premium_food', chance: 0.2, count: 1 }, // not in items.js
|
|
|
|
|
|
{ itemId: 'lucky_amulet', chance: 0.05, count: 1 } // lucky_charm -> lucky_amulet
|
2025-11-24 13:45:09 +00:00
|
|
|
|
]
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
// 森林區敵人
|
|
|
|
|
|
snake: {
|
|
|
|
|
|
id: 'snake',
|
2025-11-27 09:31:56 +00:00
|
|
|
|
name: '青竹絲',
|
|
|
|
|
|
description: '台灣常見的毒蛇,潛伏在草叢中。',
|
2025-11-24 13:45:09 +00:00
|
|
|
|
stats: {
|
|
|
|
|
|
hp: 150,
|
|
|
|
|
|
attack: 35,
|
|
|
|
|
|
defense: 10,
|
|
|
|
|
|
speed: 30
|
|
|
|
|
|
},
|
2025-11-27 09:48:36 +00:00
|
|
|
|
goldReward: { min: 30, max: 60 },
|
2025-11-24 13:45:09 +00:00
|
|
|
|
drops: [
|
2025-11-27 09:48:36 +00:00
|
|
|
|
{ itemId: 'health_potion', chance: 0.2, count: 1 } // vitality_potion -> health_potion
|
2025-11-24 13:45:09 +00:00
|
|
|
|
]
|
|
|
|
|
|
},
|
2025-11-27 09:31:56 +00:00
|
|
|
|
formosan_bear: {
|
|
|
|
|
|
id: 'formosan_bear',
|
|
|
|
|
|
name: '台灣黑熊',
|
|
|
|
|
|
description: '胸前有V字白毛的強壯黑熊,是森林的守護者。',
|
2025-11-24 13:45:09 +00:00
|
|
|
|
stats: {
|
2025-11-27 09:31:56 +00:00
|
|
|
|
hp: 500,
|
|
|
|
|
|
attack: 60,
|
|
|
|
|
|
defense: 40,
|
|
|
|
|
|
speed: 15
|
|
|
|
|
|
},
|
2025-11-27 09:48:36 +00:00
|
|
|
|
goldReward: { min: 100, max: 200 },
|
2025-11-27 09:31:56 +00:00
|
|
|
|
drops: [
|
2025-11-27 09:48:36 +00:00
|
|
|
|
// { itemId: 'gold_coin', chance: 0.5, count: 50 }, // gold is handled by goldReward
|
|
|
|
|
|
{ itemId: 'iron_sword', chance: 0.05, count: 1 } // hero_sword -> iron_sword (or add hero_sword to items)
|
2025-11-27 09:31:56 +00:00
|
|
|
|
]
|
|
|
|
|
|
},
|
|
|
|
|
|
bad_spirit: {
|
|
|
|
|
|
id: 'bad_spirit',
|
|
|
|
|
|
name: '遊蕩的惡靈',
|
|
|
|
|
|
description: '在寺廟周圍徘徊的負面能量集合體。',
|
|
|
|
|
|
stats: {
|
|
|
|
|
|
hp: 200,
|
|
|
|
|
|
attack: 40,
|
|
|
|
|
|
defense: 5,
|
|
|
|
|
|
speed: 25
|
2025-11-24 13:45:09 +00:00
|
|
|
|
},
|
2025-11-27 09:48:36 +00:00
|
|
|
|
goldReward: { min: 50, max: 100 },
|
2025-11-24 13:45:09 +00:00
|
|
|
|
drops: [
|
2025-11-27 09:48:36 +00:00
|
|
|
|
{ itemId: 'lucky_amulet', chance: 0.1, count: 1 } // lucky_charm -> lucky_amulet
|
2025-11-24 13:45:09 +00:00
|
|
|
|
]
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|