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

@@ -539,23 +539,6 @@ export function initCombat(enemyId, enemyConfig, environment = 'normal') {
}
}
/**
* 计算姿态切换后的攻击速度修正
* @param {String} stance - 姿态
* @param {Number} baseSpeed - 基础攻击速度
* @returns {Number} 修正后的攻击速度
*/
export function getAttackSpeed(stance, baseSpeed = 1.0) {
const speedModifiers = {
attack: 1.3, // 攻击姿态: 速度 +30%
defense: 0.9, // 防御姿态: 速度 -10%
balance: 1.0,
rapid: 2.0, // 快速打击: 速度 +100%
heavy: 0.5 // 重击: 速度 -50%
}
return baseSpeed * (speedModifiers[stance] || 1.0)
}
/**
* 获取姿态显示名称
* @param {String} stance - 姿态
@@ -572,6 +555,23 @@ export function getStanceDisplayName(stance) {
return names[stance] || '平衡'
}
/**
* 获取攻击速度修正
* @param {String} stance - 姿态
* @param {Number} baseSpeed - 基础攻击速度
* @returns {Number} 修正后的攻击速度
*/
export function getAttackSpeed(stance, baseSpeed = 1.0) {
const speedModifiers = {
attack: 1.3, // 攻击姿态: 速度 +30%
defense: 0.9, // 防御姿态: 速度 -10%
balance: 1.0,
rapid: 2.0, // 快速打击: 速度 +100%
heavy: 0.5 // 重击: 速度 -50%
}
return baseSpeed * (speedModifiers[stance] || 1.0)
}
/**
* 获取环境类型
* @param {String} locationId - 位置ID