pet_data/data/items.js

439 lines
10 KiB
JavaScript
Raw Permalink Normal View History

2025-11-24 10:34:02 +00:00
// 道具配置系統
// 道具類型equipment裝備、appearance外觀、consumable消耗品、talisman護身符、special特殊
2025-11-23 18:03:56 +00:00
export const ITEMS = {
2025-11-24 10:34:02 +00:00
// ========== 裝備類(有耐久度)==========
2025-11-24 13:45:09 +00:00
2025-11-24 10:34:02 +00:00
// 武器類
wooden_sword: {
id: 'wooden_sword',
name: '木劍',
type: 'equipment',
category: 'weapon',
slot: 'weapon',
rarity: 'common',
dropRate: 0.50, // 掉落機率 50%
durability: 100, // 最大耐久度
maxDurability: 100,
effects: {
flat: { attack: 5 },
percent: { attack: 0.05 } // 攻擊力 +5%
},
description: '基礎木製武器,增加攻擊力',
icon: '⚔️',
2025-11-27 09:48:36 +00:00
price: 50,
2025-11-24 10:34:02 +00:00
appearance: null // 武器不改變外觀
},
2025-11-24 13:45:09 +00:00
2025-11-24 10:34:02 +00:00
iron_sword: {
id: 'iron_sword',
name: '鐵劍',
type: 'equipment',
category: 'weapon',
slot: 'weapon',
rarity: 'uncommon',
dropRate: 0.30, // 掉落機率 30%
durability: 200,
maxDurability: 200,
effects: {
flat: { attack: 15, str: 3 },
percent: { attack: 0.10 }
},
description: '堅固的鐵製武器,大幅增加攻擊力',
icon: '🗡️',
2025-11-27 09:48:36 +00:00
price: 150,
2025-11-24 10:34:02 +00:00
appearance: null
},
2025-11-24 13:45:09 +00:00
2025-11-24 10:34:02 +00:00
magic_staff: {
id: 'magic_staff',
name: '魔法杖',
type: 'equipment',
category: 'weapon',
slot: 'weapon',
rarity: 'rare',
dropRate: 0.15, // 掉落機率 15%
durability: 150,
maxDurability: 150,
effects: {
flat: { attack: 10, int: 5 },
percent: { attack: 0.08, intGain: 0.10 }
},
description: '蘊含魔力的法杖,增加智力和智力成長',
icon: '🪄',
2025-11-27 09:48:36 +00:00
price: 300,
2025-11-24 10:34:02 +00:00
appearance: null
},
2025-11-24 13:45:09 +00:00
2025-11-24 10:34:02 +00:00
// 防具類
leather_armor: {
id: 'leather_armor',
name: '皮甲',
type: 'equipment',
category: 'armor',
slot: 'armor',
rarity: 'common',
dropRate: 0.50, // 掉落機率 50%
durability: 120,
maxDurability: 120,
effects: {
flat: { defense: 8, health: 10 },
percent: { defense: 0.05 }
},
description: '輕便的皮製護甲,增加防禦力和最大健康',
icon: '🛡️',
2025-11-27 09:48:36 +00:00
price: 50,
2025-11-24 10:34:02 +00:00
appearance: null
},
2025-11-24 13:45:09 +00:00
2025-11-24 10:34:02 +00:00
iron_armor: {
id: 'iron_armor',
name: '鐵甲',
type: 'equipment',
category: 'armor',
slot: 'armor',
rarity: 'uncommon',
dropRate: 0.30, // 掉落機率 30%
durability: 250,
maxDurability: 250,
effects: {
flat: { defense: 20, health: 20 },
percent: { defense: 0.15 }
},
description: '厚重的鐵製護甲,大幅增加防禦力',
icon: '⚔️',
2025-11-27 09:48:36 +00:00
price: 150,
2025-11-24 10:34:02 +00:00
appearance: null
},
2025-11-24 13:45:09 +00:00
2025-11-24 10:34:02 +00:00
// ========== 外觀類(無耐久,不壞)==========
2025-11-24 13:45:09 +00:00
2025-11-24 10:34:02 +00:00
cute_hat: {
id: 'cute_hat',
name: '可愛帽子',
type: 'appearance',
category: 'hat',
slot: 'hat',
rarity: 'common',
durability: Infinity, // 外觀類永不損壞
maxDurability: Infinity,
effects: {
flat: { happiness: 5 } // 外觀類可以有小加成
},
description: '可愛的帽子,讓寵物看起來更萌',
icon: '🎩',
2025-11-27 09:48:36 +00:00
price: 100,
2025-11-24 10:34:02 +00:00
appearance: {
hat: 'cute_hat'
}
},
2025-11-24 13:45:09 +00:00
2025-11-24 10:34:02 +00:00
cool_sunglasses: {
id: 'cool_sunglasses',
name: '酷炫墨鏡',
type: 'appearance',
category: 'accessory',
slot: 'accessory',
rarity: 'uncommon',
durability: Infinity,
maxDurability: Infinity,
effects: {
percent: { happinessRecovery: 0.10, dex: 2 }
},
description: '超酷的墨鏡,增加快樂恢復和敏捷',
icon: '🕶️',
2025-11-27 09:48:36 +00:00
price: 200,
2025-11-24 10:34:02 +00:00
appearance: {
accessory: 'cool_sunglasses'
}
},
2025-11-24 13:45:09 +00:00
2025-11-24 10:34:02 +00:00
red_scarf: {
id: 'red_scarf',
name: '紅色圍巾',
type: 'appearance',
category: 'accessory',
slot: 'accessory',
rarity: 'common',
durability: Infinity,
maxDurability: Infinity,
effects: {},
description: '溫暖的紅色圍巾,純外觀道具',
icon: '🧣',
2025-11-27 09:48:36 +00:00
price: 80,
2025-11-24 10:34:02 +00:00
appearance: {
accessory: 'red_scarf'
}
},
2025-11-24 13:45:09 +00:00
2025-11-24 10:34:02 +00:00
// ========== 消耗品類 ==========
2025-11-24 13:45:09 +00:00
2025-11-23 18:03:56 +00:00
cookie: {
id: 'cookie',
name: '幸運餅乾',
type: 'consumable',
2025-11-24 10:34:02 +00:00
category: 'food',
rarity: 'common',
stackable: true,
effects: {
modifyStats: { hunger: 20, happiness: 10 }
},
description: '美味的餅乾,增加飢餓和快樂',
2025-11-27 09:48:36 +00:00
icon: '🍪',
price: 10
2025-11-24 10:34:02 +00:00
},
2025-11-24 13:45:09 +00:00
2025-11-24 10:34:02 +00:00
health_potion: {
id: 'health_potion',
name: '治療藥水',
type: 'consumable',
category: 'potion',
rarity: 'common',
stackable: true,
effects: {
modifyStats: { health: 30 },
cureSickness: true
},
description: '恢復健康並治癒疾病',
2025-11-27 09:48:36 +00:00
icon: '🧪',
price: 20
2025-11-23 18:03:56 +00:00
},
2025-11-24 13:45:09 +00:00
2025-11-24 10:34:02 +00:00
energy_drink: {
id: 'energy_drink',
name: '能量飲料',
2025-11-23 18:03:56 +00:00
type: 'consumable',
2025-11-24 10:34:02 +00:00
category: 'potion',
rarity: 'uncommon',
stackable: true,
effects: {
modifyStats: { happiness: 20 },
addBuff: {
id: 'energized',
name: '精力充沛',
durationTicks: 10, // 持續 10 ticks
flat: { dex: 5 },
percent: { speed: 0.10 }
}
},
description: '提供臨時速度和敏捷加成',
2025-11-27 09:48:36 +00:00
icon: '🥤',
price: 30
2025-11-23 18:03:56 +00:00
},
2025-11-24 13:45:09 +00:00
2025-11-24 10:34:02 +00:00
growth_pill: {
id: 'growth_pill',
name: '成長藥丸',
type: 'consumable',
category: 'potion',
rarity: 'rare',
stackable: true,
effects: {
modifyStats: { str: 1, int: 1, dex: 1 }
},
description: '永久增加力量、智力、敏捷各 1 點',
2025-11-27 09:48:36 +00:00
icon: '💊',
price: 500
2025-11-24 10:34:02 +00:00
},
2025-11-24 13:45:09 +00:00
2025-11-24 10:34:02 +00:00
// ========== 護身符類(永久加成)==========
2025-11-24 13:45:09 +00:00
2025-11-24 10:34:02 +00:00
lucky_amulet: {
id: 'lucky_amulet',
name: '幸運護身符',
type: 'talisman',
category: 'talisman',
slot: 'talisman',
rarity: 'uncommon',
durability: Infinity,
maxDurability: Infinity,
effects: {
flat: { luck: 5 },
percent: { dropRate: 0.10 }
},
description: '帶來好運的護身符,增加運勢和掉落率',
2025-11-27 09:48:36 +00:00
icon: '🔮',
price: 250
2025-11-24 10:34:02 +00:00
},
2025-11-24 13:45:09 +00:00
2025-11-24 10:34:02 +00:00
protection_amulet: {
id: 'protection_amulet',
2025-11-23 18:03:56 +00:00
name: '平安符',
2025-11-24 10:34:02 +00:00
type: 'talisman',
category: 'talisman',
slot: 'talisman',
rarity: 'rare',
durability: Infinity,
maxDurability: Infinity,
effects: {
flat: { health: 20 },
percent: { sicknessReduction: 0.20, healthRecovery: 0.15 }
},
description: '保佑平安的護身符,增加健康上限和恢復效率',
2025-11-27 09:48:36 +00:00
icon: '🛡️',
price: 300
2025-11-23 18:03:56 +00:00
},
2025-11-24 13:45:09 +00:00
2025-11-24 10:34:02 +00:00
wisdom_amulet: {
id: 'wisdom_amulet',
name: '智慧護身符',
type: 'talisman',
category: 'talisman',
slot: 'talisman',
rarity: 'rare',
durability: Infinity,
maxDurability: Infinity,
effects: {
flat: { int: 5 },
percent: { intGain: 0.15, happinessRecovery: 0.10 }
},
description: '提升智慧的護身符,增加智力和智力成長',
2025-11-27 09:48:36 +00:00
icon: '📿',
price: 300
2025-11-23 18:03:56 +00:00
},
2025-11-24 13:45:09 +00:00
2025-11-24 10:34:02 +00:00
// ========== 特殊道具類 ==========
2025-11-24 13:45:09 +00:00
2025-11-23 18:03:56 +00:00
training_manual: {
id: 'training_manual',
name: '訓練手冊',
2025-11-24 10:34:02 +00:00
type: 'special',
category: 'book',
slot: 'special',
rarity: 'uncommon',
durability: Infinity,
maxDurability: Infinity,
effects: {
percent: { strGain: 0.15, dexGain: 0.15 }
},
description: '訓練指南,增加力量和敏捷成長效率',
2025-11-27 09:48:36 +00:00
icon: '📖',
price: 150
2025-11-24 10:34:02 +00:00
},
2025-11-24 13:45:09 +00:00
2025-11-24 10:34:02 +00:00
time_crystal: {
id: 'time_crystal',
name: '時間水晶',
type: 'special',
category: 'crystal',
slot: 'special',
rarity: 'legendary',
durability: Infinity,
maxDurability: Infinity,
effects: {
2025-11-24 13:45:09 +00:00
percent: {
strGain: 0.10,
intGain: 0.10,
2025-11-24 10:34:02 +00:00
dexGain: 0.10,
happinessRecovery: 0.10,
healthRecovery: 0.10
}
},
description: '神秘的水晶,全面提升成長和恢復效率',
2025-11-27 09:48:36 +00:00
icon: '💎',
price: 2000
2025-11-24 10:34:02 +00:00
},
2025-11-24 13:45:09 +00:00
2025-11-24 10:34:02 +00:00
// ========== 永久裝備(不會壞)==========
2025-11-24 13:45:09 +00:00
2025-11-24 10:34:02 +00:00
golden_crown: {
id: 'golden_crown',
name: '黃金王冠',
2025-11-23 18:03:56 +00:00
type: 'equipment',
2025-11-24 10:34:02 +00:00
category: 'crown',
slot: 'hat',
rarity: 'legendary',
durability: Infinity, // 永久裝備
maxDurability: Infinity,
effects: {
flat: { str: 10, int: 10, dex: 10, luck: 10 },
percent: { attack: 0.20, defense: 0.20, speed: 0.20 }
},
description: '傳說中的黃金王冠,全面提升所有屬性',
icon: '👑',
2025-11-27 09:48:36 +00:00
price: 5000,
2025-11-24 10:34:02 +00:00
appearance: {
hat: 'golden_crown'
}
}
}
// 道具類型定義
export const ITEM_TYPES = {
equipment: { name: '裝備', icon: '⚔️' },
appearance: { name: '外觀', icon: '👕' },
consumable: { name: '消耗品', icon: '🍪' },
talisman: { name: '護身符', icon: '🔮' },
special: { name: '特殊', icon: '⭐' }
}
// 稀有度定義(資料檔保持英文 key但 name 為中文顯示用)
export const ITEM_RARITY = {
2025-11-24 13:45:09 +00:00
common: {
name: '普通',
color: '#9d9d9d',
2025-11-24 10:34:02 +00:00
multiplier: 1.0,
dropRate: 0.50, // 50% 基礎掉落機率
description: '最常見的道具,容易獲得'
},
2025-11-24 13:45:09 +00:00
uncommon: {
name: '優秀',
color: '#1eff00',
2025-11-24 10:34:02 +00:00
multiplier: 1.2,
dropRate: 0.30, // 30% 基礎掉落機率
description: '較為少見的道具,有一定價值'
},
2025-11-24 13:45:09 +00:00
rare: {
name: '稀有',
color: '#0070dd',
2025-11-24 10:34:02 +00:00
multiplier: 1.5,
dropRate: 0.15, // 15% 基礎掉落機率
description: '稀有的道具,效果顯著'
},
2025-11-24 13:45:09 +00:00
epic: {
name: '史詩',
color: '#a335ee',
2025-11-24 10:34:02 +00:00
multiplier: 2.0,
dropRate: 0.05, // 5% 基礎掉落機率
description: '史詩級道具,非常珍貴'
},
2025-11-24 13:45:09 +00:00
legendary: {
name: '傳說',
color: '#ff8000',
2025-11-24 10:34:02 +00:00
multiplier: 3.0,
dropRate: 0.01, // 1% 基礎掉落機率
description: '傳說級道具,極其稀有且強大'
2025-11-23 18:03:56 +00:00
}
}
2025-11-24 10:34:02 +00:00
// 裝備槽位定義
export const EQUIPMENT_SLOTS = {
weapon: { name: '武器', icon: '⚔️' },
armor: { name: '防具', icon: '🛡️' },
hat: { name: '帽子', icon: '🎩' },
accessory: { name: '飾品', icon: '💍' },
talisman: { name: '護身符', icon: '🔮' },
special: { name: '特殊', icon: '⭐' }
}
2025-11-26 09:53:03 +00:00
// 道具類型定義
export const ITEM_TYPE = {
EQUIPMENT: 'equipment',
CONSUMABLE: 'consumable',
TALISMAN: 'talisman',
SPECIAL: 'special',
APPEARANCE: 'appearance'
}
// 道具類別定義
export const ITEM_CATEGORY = {
FOOD: 'food',
MEDICINE: 'potion',
WEAPON: 'weapon',
ARMOR: 'armor',
TOY: 'toy',
ACCESSORY: 'accessory',
TALISMAN: 'talisman',
BOOK: 'book'
}