118 lines
3.4 KiB
JavaScript
118 lines
3.4 KiB
JavaScript
// 敵人配置(資料驅動)
|
||
export const ENEMIES = {
|
||
// 新手區敵人
|
||
cockroach: {
|
||
id: 'cockroach',
|
||
name: '巨大的蟑螂',
|
||
description: '生命力頑強的害蟲,雖然弱小但很噁心。',
|
||
stats: {
|
||
hp: 20000,
|
||
attack: 5,
|
||
defense: 9,
|
||
speed: 260
|
||
},
|
||
goldReward: { min: 1, max: 5 },
|
||
drops: [
|
||
{ itemId: 'cookie', chance: 0.3, count: 1 }
|
||
]
|
||
},
|
||
mouse: {
|
||
id: 'mouse',
|
||
name: '偷吃的老鼠',
|
||
description: '動作敏捷的小偷,喜歡偷吃東西。',
|
||
stats: {
|
||
hp: 35,
|
||
attack: 8,
|
||
defense: 2,
|
||
speed: 15
|
||
},
|
||
goldReward: { min: 3, max: 8 },
|
||
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
|
||
},
|
||
goldReward: { min: 10, max: 20 },
|
||
drops: [
|
||
// { itemId: 'tuna_can', chance: 0.3, count: 1 }, // tuna_can not in items.js, using cookie for now or remove
|
||
{ itemId: 'leather_armor', chance: 0.1, count: 1 }
|
||
]
|
||
},
|
||
wild_cat: {
|
||
id: 'wild_cat',
|
||
name: '流浪貓老大',
|
||
description: '這片區域的老大,身手矯健。',
|
||
stats: {
|
||
hp: 100,
|
||
attack: 20,
|
||
defense: 8,
|
||
speed: 25
|
||
},
|
||
goldReward: { min: 20, max: 40 },
|
||
drops: [
|
||
// { itemId: 'premium_food', chance: 0.2, count: 1 }, // not in items.js
|
||
{ itemId: 'lucky_amulet', chance: 0.05, count: 1 } // lucky_charm -> lucky_amulet
|
||
]
|
||
},
|
||
|
||
// 森林區敵人
|
||
snake: {
|
||
id: 'snake',
|
||
name: '青竹絲',
|
||
description: '台灣常見的毒蛇,潛伏在草叢中。',
|
||
stats: {
|
||
hp: 150,
|
||
attack: 35,
|
||
defense: 10,
|
||
speed: 30
|
||
},
|
||
goldReward: { min: 30, max: 60 },
|
||
drops: [
|
||
{ itemId: 'health_potion', chance: 0.2, count: 1 } // vitality_potion -> health_potion
|
||
]
|
||
},
|
||
formosan_bear: {
|
||
id: 'formosan_bear',
|
||
name: '台灣黑熊',
|
||
description: '胸前有V字白毛的強壯黑熊,是森林的守護者。',
|
||
stats: {
|
||
hp: 500,
|
||
attack: 60,
|
||
defense: 40,
|
||
speed: 15
|
||
},
|
||
goldReward: { min: 100, max: 200 },
|
||
drops: [
|
||
// { 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)
|
||
]
|
||
},
|
||
bad_spirit: {
|
||
id: 'bad_spirit',
|
||
name: '遊蕩的惡靈',
|
||
description: '在寺廟周圍徘徊的負面能量集合體。',
|
||
stats: {
|
||
hp: 200,
|
||
attack: 40,
|
||
defense: 5,
|
||
speed: 25
|
||
},
|
||
goldReward: { min: 50, max: 100 },
|
||
drops: [
|
||
{ itemId: 'lucky_amulet', chance: 0.1, count: 1 } // lucky_charm -> lucky_amulet
|
||
]
|
||
}
|
||
}
|