refactor(天赋系统): 优化天赋触发逻辑和代码结构
重构 TalComp 类的触发检查方法,将 checkIsTrigger 拆分为 getTriggers 和 checkIsTrigger 简化 SACastSystem 中的天赋触发判断逻辑,使用新的 checkIsTrigger 返回值
This commit is contained in:
@@ -119,14 +119,11 @@ export class SACastSystem extends ecs.ComblockSystem implements ecs.ISystemUpdat
|
||||
// 2. 更新攻击类型的天赋触发值
|
||||
if(casterEntity.has(TalComp)){
|
||||
const talComp = casterEntity.get(TalComp);
|
||||
if (hset === HSSet.atk) {
|
||||
talComp.updateCur(TriType.ATK);
|
||||
isWFuny= talComp.checkIsTrigger(TalEffet.WFUNY);
|
||||
}
|
||||
if (hset != HSSet.atk) {
|
||||
talComp.updateCur(TriType.SKILL);
|
||||
isDSill= talComp.checkIsTrigger(TalEffet.D_SKILL);
|
||||
}
|
||||
if (hset === HSSet.atk) talComp.updateCur(TriType.ATK);
|
||||
if (hset != HSSet.atk) talComp.updateCur(TriType.SKILL);
|
||||
isDSill=talComp.checkIsTrigger().isDSill
|
||||
isWFuny=talComp.checkIsTrigger().isWFuny
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -149,6 +146,7 @@ export class SACastSystem extends ecs.ComblockSystem implements ecs.ISystemUpdat
|
||||
// console.log(`[SACastSystem] ${heroAttrs?.hero_name ?? '未知'} 施放技能: ${config.name}`);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 创建技能实体
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user