feat: 实现游戏核心系统和UI组件

核心系统:
- combatSystem: 战斗逻辑、伤害计算、战斗状态管理
- skillSystem: 技能系统、技能解锁、经验值、里程碑
- taskSystem: 任务系统、任务类型、任务执行和完成
- eventSystem: 事件系统、随机事件处理
- environmentSystem: 环境系统、时间流逝、区域效果
- levelingSystem: 升级系统、属性成长
- soundSystem: 音效系统

配置文件:
- enemies: 敌人配置、掉落表
- events: 事件配置、事件效果
- items: 物品配置、装备属性
- locations: 地点配置、探索事件
- skills: 技能配置、技能树

UI组件:
- CraftingDrawer: 制造界面
- InventoryDrawer: 背包界面
- 其他UI优化和动画

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Claude
2026-01-23 16:20:10 +08:00
parent 021f6a54f5
commit 16223c89a5
25 changed files with 2731 additions and 318 deletions

View File

@@ -3,6 +3,8 @@
* Phase 6 核心系统实现
*/
import { LOCATION_CONFIG } from './locations.js'
/**
* 事件配置
* 每个事件包含:
@@ -236,9 +238,56 @@ export const EVENT_CONFIG = {
title: '新区域',
textTemplate: '解锁了新区域:{areaName}\n\n{description}',
choices: [
{ text: '前往探索', next: null, action: 'teleport', actionData: { locationId: '{areaId}' } },
{ text: '稍后再说', next: null }
]
},
// 探索事件
explore_nothing: {
id: 'explore_nothing',
type: 'info',
title: '探索结果',
text: '你仔细搜索了这片区域,但没有发现任何有用的东西。',
choices: [
{ text: '继续', next: null }
]
},
explore_find_herb: {
id: 'explore_find_herb',
type: 'reward',
title: '探索发现',
text: '你在草丛中发现了一些草药!',
choices: [
{ text: '收下', next: null, action: 'give_item', actionData: { itemId: 'healing_herb', count: { min: 1, max: 3 } } }
]
},
explore_find_coin: {
id: 'explore_find_coin',
type: 'reward',
title: '探索发现',
textTemplate: '你在角落里发现了一些铜币!\n\n获得了 {amount} 铜币',
choices: [
{ text: '太好了', next: null }
]
},
explore_find_trash: {
id: 'explore_find_trash',
type: 'info',
title: '探索发现',
text: '你只找到了一些垃圾。',
choices: [
{ text: '离开', next: null }
]
},
explore_encounter: {
id: 'explore_encounter',
type: 'combat',
title: '遭遇',
textTemplate: '探索时突然遇到了{enemyName}',
choices: [
{ text: '迎战', next: null },
{ text: '逃跑', next: null, action: 'flee' }
]
}
}