feat(战斗系统): 实现攻击和技能伤害加成天赋效果
添加ATK_DMG和SKILL_DMG天赋类型,支持在普通攻击和技能释放时应用额外伤害 修改SACastSystem以处理不同类型的伤害加成 重构TalEffet枚举并更新相关配置
This commit is contained in:
@@ -157,29 +157,39 @@ export class SACastSystem extends ecs.ComblockSystem implements ecs.ISystemUpdat
|
||||
return false;
|
||||
}
|
||||
// 2. 延迟创建技能实体(等待动画)
|
||||
const delay = 0.3
|
||||
heroView.scheduleOnce(() => {
|
||||
this.createSkill(s_uuid, heroView,targets);
|
||||
}, delay);
|
||||
if (hset === HSSet.atk){
|
||||
let delay = 0.3
|
||||
let ext_dmg = heroAttrs.useCountValTal(TalEffet.ATK_DMG);
|
||||
heroView.scheduleOnce(() => {
|
||||
this.createSkill(s_uuid, heroView,targets,ext_dmg);
|
||||
}, delay);
|
||||
}
|
||||
if(hset === HSSet.skill){
|
||||
let delay = 0.3
|
||||
let ext_dmg = heroAttrs.useCountValTal(TalEffet.SKILL_DMG);
|
||||
heroView.scheduleOnce(() => {
|
||||
this.createSkill(s_uuid, heroView,targets,ext_dmg);
|
||||
}, delay);
|
||||
}
|
||||
|
||||
//风怒wfuny 只针对 普通攻击起效
|
||||
if (hset === HSSet.atk && heroAttrs.useCountTal(TalEffet.WFUNY)){
|
||||
let delay = 0.3
|
||||
heroView.playSkillEffect(s_uuid);
|
||||
//需要再添加 风怒动画
|
||||
this.createSkill(s_uuid, heroView,targets);
|
||||
heroView.scheduleOnce(() => {
|
||||
this.createSkill(s_uuid, heroView,targets);
|
||||
},delay);
|
||||
}
|
||||
|
||||
// 双技能 只针对 技能起效
|
||||
if(hset === HSSet.skill && heroAttrs.useCountTal(TalEffet.D_SKILL)){
|
||||
targets = this.sTargets(heroView, s_uuid);
|
||||
if (targets.length === 0) {
|
||||
console.warn("[SACastSystem] 没有找到有效目标");
|
||||
return false;
|
||||
}
|
||||
let delay = 0.3
|
||||
heroView.playSkillEffect(s_uuid);
|
||||
//需要再添加 双技能动画
|
||||
heroView.scheduleOnce(() => {
|
||||
this.createSkill(s_uuid, heroView,targets);
|
||||
}, delay);
|
||||
},delay);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user