refactor(hero): 重构技能触发与属性系统,使用运行时解析缓存
1. 重构英雄属性组件,将静态配置与运行时缓存分离,新增runtime_前缀的运行时解析字段 2. 移除旧的evolve进化配置处理逻辑,改为通过等级解析器动态获取当前等级生效的技能与属性 3. 统一怪物与英雄的技能触发逻辑,均使用运行时缓存字段 4. 更新测试模式配置结构,适配新的分组+等级数组配置格式 5. 优化技能描述生成逻辑,支持新的等级配置结构
This commit is contained in:
@@ -228,8 +228,8 @@ export class HeroAtkSystem extends ecs.ComblockSystem implements ecs.ISystemUpda
|
||||
let maxReviveCount = 0;
|
||||
let reviveHpPercent = 50; // 默认恢复50%
|
||||
let reviveSkillConf: any = null; // 提取出来的复活技能配置
|
||||
if (TAttrsComp.revive) {
|
||||
const reviveConf = TAttrsComp.revive;
|
||||
if (TAttrsComp.runtime_revive) {
|
||||
const reviveConf = TAttrsComp.runtime_revive;
|
||||
maxReviveCount = reviveConf.r_num + Math.floor((TAttrsComp.lv - 1) * reviveConf.upr);
|
||||
if (TAttrsComp.revived_count < maxReviveCount) {
|
||||
canRevive = true;
|
||||
|
||||
Reference in New Issue
Block a user