fix(skill&hero): 添加击退属性配置与处理逻辑

1. 移除英雄配置注释里废弃属性的提示
2. 为小刺客技能添加击退概率覆盖参数
3. 补全技能系统中击退属性的计算逻辑
4. 修复代码格式与缩进问题
This commit is contained in:
pan
2026-07-21 10:19:56 +08:00
parent 011446acc6
commit 9a0dbaf41d
2 changed files with 39 additions and 39 deletions

View File

@@ -213,7 +213,6 @@ export interface HeroEvolve {
* fend 辅助 每波结束触发,跨波次累积增益 * fend 辅助 每波结束触发,跨波次累积增益
* *
* 触发节奏atked 3次/5次atking 5次/7次fstart/fend 1次/波 * 触发节奏atked 3次/5次atking 5次/7次fstart/fend 1次/波
* 废弃属性frz(冰冻)、bck(击退) — 怪物固定不移动,无效
* *
* 设定中的英雄都是1级,最高可以升级到3级不在列表内提现,升级在游戏内进行) * 设定中的英雄都是1级,最高可以升级到3级不在列表内提现,升级在游戏内进行)
* skills[0]是普通攻击技能 * skills[0]是普通攻击技能
@@ -258,7 +257,7 @@ export const HeroInfo: Record<number, heroInfo> = {
// ========== atking 类 — 刺客(自身强化) ========== // ========== atking 类 — 刺客(自身强化) ==========
5021: { 5021: {
uuid: 5021, name: "小刺客", path: "hc1", fac: FacSet.HERO, pool_lv: 1, lv: 1, type: HType.Melee, hp: 300, ap: 28, uuid: 5021, name: "小刺客", path: "hc1", fac: FacSet.HERO, pool_lv: 1, lv: 1, type: HType.Melee, hp: 300, ap: 28,
skills: { 6001: { uuid: 6001, lv: 1, cd: AtkSpeedSet[AtkSpeedLv.Fast2].cd, ccd: 0 } }, skills: { 6001: { uuid: 6001, lv: 1, cd: AtkSpeedSet[AtkSpeedLv.Fast2].cd, ccd: 0, overrides: { bck: 20 } } },
atking: [{ s_uuid: 6401, t_num: 5, overrides: { TGroup: TGroup.Self, ap: 8 } }], atking: [{ s_uuid: 6401, t_num: 5, overrides: { TGroup: TGroup.Self, ap: 8 } }],
info: "每攻击5次永久提升自身攻击力8点" info: "每攻击5次永久提升自身攻击力8点"
}, },

View File

@@ -207,6 +207,7 @@ export class Skill extends ecs.Entity {
const sCrt = (config.crt ?? 0) + (SUp.crt * skill_lv); const sCrt = (config.crt ?? 0) + (SUp.crt * skill_lv);
const sFrz = (config.frz ?? 0) + (SUp.frz * skill_lv); const sFrz = (config.frz ?? 0) + (SUp.frz * skill_lv);
const sStun = (config.stun ?? 0) + (SUp.stun * skill_lv); const sStun = (config.stun ?? 0) + (SUp.stun * skill_lv);
const sBck = (config.bck ?? 0) + (SUp.bck * skill_lv);
const sAp = config.ap + (SUp.ap * skill_lv); const sAp = config.ap + (SUp.ap * skill_lv);
const sHit = config.hit_count + (SUp.hit_count * skill_lv); const sHit = config.hit_count + (SUp.hit_count * skill_lv);
sDataCom.Attrs[Attrs.ap] = Math.floor(cAttrsComp.ap * sAp / 100); //技能的ap是百分值 需要/100 而且需要再最终计算总ap时再/100不然会出现ap为90%变0 sDataCom.Attrs[Attrs.ap] = Math.floor(cAttrsComp.ap * sAp / 100); //技能的ap是百分值 需要/100 而且需要再最终计算总ap时再/100不然会出现ap为90%变0
@@ -214,7 +215,7 @@ export class Skill extends ecs.Entity {
sDataCom.Attrs[Attrs.critical_damage] = cAttrsComp.getRuntimeCritDamageBonus(); sDataCom.Attrs[Attrs.critical_damage] = cAttrsComp.getRuntimeCritDamageBonus();
sDataCom.Attrs[Attrs.freeze_chance] = cAttrsComp.getRuntimeFreezeChance() + sFrz; sDataCom.Attrs[Attrs.freeze_chance] = cAttrsComp.getRuntimeFreezeChance() + sFrz;
sDataCom.Attrs[Attrs.stun_chance] = cAttrsComp.getRuntimeStunChance() + sStun; sDataCom.Attrs[Attrs.stun_chance] = cAttrsComp.getRuntimeStunChance() + sStun;
sDataCom.Attrs[Attrs.knockback_chance] = cAttrsComp.knockback_chance || 0; sDataCom.Attrs[Attrs.knockback_chance] = cAttrsComp.knockback_chance + sBck;
sDataCom.Attrs[Attrs.knockback_distance] = cAttrsComp.knockback_distance || 0; sDataCom.Attrs[Attrs.knockback_distance] = cAttrsComp.knockback_distance || 0;
sDataCom.Attrs[Attrs.puncture_chance] = cAttrsComp.getRuntimePunctureChance(); // 初始化携带施法者的穿透概率 sDataCom.Attrs[Attrs.puncture_chance] = cAttrsComp.getRuntimePunctureChance(); // 初始化携带施法者的穿透概率
sDataCom.s_uuid = s_uuid sDataCom.s_uuid = s_uuid