feat(skill): add multi-cast override support for skills

1. 新增SkillOverrides的num字段配置,支持自定义技能额外施法次数
2. 修改施法次数计算逻辑,优先使用技能卡override配置的num值
3. 更新两张二技能卡和一张三技能卡的配置,实现双发/三发效果
This commit is contained in:
panFD
2026-08-02 17:37:03 +08:00
parent c8d15dbe00
commit da3d8015ab
3 changed files with 11 additions and 6 deletions

View File

@@ -91,7 +91,8 @@ export class SCastSystem extends ecs.ComblockSystem implements ecs.ISystemUpdate
}
const sUp = SkillUpList[s_uuid] ? SkillUpList[s_uuid] : SkillUpList[1001];
const cNum = Math.min(2, Math.max(0, Math.floor(sUp.num ?? 0)));
// 优先读 overrides.num技能卡差异化多发兜底 SkillUpList.num限制在 [0, 2]
const cNum = Math.min(2, Math.max(0, Math.floor(overrides?.num ?? sUp.num ?? 0)));
const castTimes = 1 + cNum;
// 构造一个模拟的 HeroAttrsComp 用于数值计算,只包含基础卡牌伤害计算所需的属性
@@ -274,7 +275,8 @@ export class SCastSystem extends ecs.ComblockSystem implements ecs.ISystemUpdate
}
const sUp = SkillUpList[s_uuid] ? SkillUpList[s_uuid] : SkillUpList[1001];
const cNum = Math.min(2, Math.max(0, Math.floor(sUp.num ?? 0)));
// 优先读 overrides.num技能卡差异化多发兜底 SkillUpList.num限制在 [0, 2]
const cNum = Math.min(2, Math.max(0, Math.floor(overrides?.num ?? sUp.num ?? 0)));
const castTimes = 1 + cNum;
let val = ""
if (castTimes > 1) {
@@ -344,7 +346,8 @@ export class SCastSystem extends ecs.ComblockSystem implements ecs.ISystemUpdate
const overrides = castPlan.overrides;
let config = SkillSet[s_uuid];
const sUp = SkillUpList[s_uuid] ? SkillUpList[s_uuid] : SkillUpList[1001];
const cNum = Math.min(2, Math.max(0, Math.floor(sUp.num ?? 0)));
// 优先读 overrides.num技能卡差异化多发兜底 SkillUpList.num限制在 [0, 2]
const cNum = Math.min(2, Math.max(0, Math.floor(overrides?.num ?? sUp.num ?? 0)));
if (!config) return;
config = mergeSkillParams(config, overrides);