Initial commit: Text Adventure Game

Features:
- Combat system with AP/EP hit calculation and three-layer defense
- Auto-combat/farming mode
- Item system with stacking support
- Skill system with levels, milestones, and parent skill sync
- Shop system with dynamic pricing
- Inventory management with bulk selling
- Event system
- Game loop with offline earnings
- Save/Load system

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Claude
2026-01-21 17:13:51 +08:00
commit cb412544e9
90 changed files with 17149 additions and 0 deletions

87
config/items.js Normal file
View File

@@ -0,0 +1,87 @@
// 物品配置
export const ITEM_CONFIG = {
// 武器
wooden_stick: {
id: 'wooden_stick',
name: '木棍',
type: 'weapon',
subtype: 'one_handed',
icon: '🪵',
baseValue: 10, // 基础价值(铜币)
baseDamage: 5,
attackSpeed: 1.0,
quality: 100, // 默认品质
unlockSkill: 'stick_mastery',
description: '一根粗糙的木棍,至少比空手强。'
},
// 消耗品
bread: {
id: 'bread',
name: '面包',
type: 'consumable',
subtype: 'food',
icon: '🍞',
baseValue: 10,
effect: {
stamina: 20
},
description: '普通的面包,可以恢复耐力。',
stackable: true,
maxStack: 99
},
healing_herb: {
id: 'healing_herb',
name: '草药',
type: 'consumable',
subtype: 'medicine',
icon: '🌿',
baseValue: 15,
effect: {
health: 15
},
description: '常见的治疗草药,可以恢复生命值。',
stackable: true,
maxStack: 99
},
// 书籍
old_book: {
id: 'old_book',
name: '破旧书籍',
type: 'book',
icon: '📖',
baseValue: 50,
readingTime: 60, // 秒
expReward: {
reading: 10
},
completionBonus: null,
description: '一本破旧的书籍,记录着一些基础知识。',
consumable: false // 书籍不消耗
},
// 素材
dog_skin: {
id: 'dog_skin',
name: '狗皮',
type: 'material',
icon: '🐕',
baseValue: 5,
description: '野狗的皮毛,可以用来制作简单装备。',
stackable: true,
maxStack: 99
},
// 关键道具
basement_key: {
id: 'basement_key',
name: '地下室钥匙',
type: 'key',
icon: '🔑',
baseValue: 0,
description: '一把生锈的钥匙上面刻着「B」字母。',
stackable: false
}
}