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

69
config/locations.js Normal file
View File

@@ -0,0 +1,69 @@
// 区域配置
export const LOCATION_CONFIG = {
camp: {
id: 'camp',
name: '测试营地',
type: 'safe',
environment: 'normal',
description: '一个临时的幸存者营地,相对安全。',
connections: ['market', 'blackmarket', 'wild1'],
npcs: ['injured_adventurer'],
activities: ['rest', 'talk', 'trade']
},
market: {
id: 'market',
name: '测试市场',
type: 'safe',
environment: 'normal',
description: '商人老张在这里摆摊。',
connections: ['camp'],
npcs: ['merchant_zhang'],
activities: ['trade']
},
blackmarket: {
id: 'blackmarket',
name: '测试黑市',
type: 'safe',
environment: 'normal',
description: '神秘人偶尔会在这里出现。',
connections: ['camp'],
npcs: ['mysterious_man'],
activities: ['trade']
},
wild1: {
id: 'wild1',
name: '测试野外1',
type: 'danger',
environment: 'normal',
description: '野狗经常出没的区域。',
connections: ['camp', 'boss_lair'],
enemies: ['wild_dog'],
activities: ['explore', 'combat']
},
boss_lair: {
id: 'boss_lair',
name: '测试Boss巢',
type: 'danger',
environment: 'normal',
description: '强大的野兽盘踞在这里。',
connections: ['wild1', 'basement'],
enemies: ['test_boss'],
unlockCondition: { type: 'kill', target: 'wild_dog', count: 5 },
activities: ['combat']
},
basement: {
id: 'basement',
name: '地下室',
type: 'dungeon',
environment: 'dark',
description: '黑暗潮湿的地下室,需要照明。',
connections: ['boss_lair'],
unlockCondition: { type: 'item', item: 'basement_key' },
activities: ['explore', 'read']
}
}