feat(penetration): 将穿刺机制从固定次数改为概率触发模式

统一重命名所有穿刺相关属性为 `puncture_chance` 以规范代码命名,新增FightSet.PUNCTURE_DOWN配置项控制每次穿透后的概率衰减值。调整6408号穿刺强化技能,将提升穿刺次数效果改为提升20%穿透概率并修正AP消耗。在技能命中逻辑中添加穿透概率判定逻辑,实现概率穿透效果,同时更新所有引用原属性的代码位置确保功能正常。
This commit is contained in:
walkpan
2026-05-23 14:08:45 +08:00
parent cb53417ea8
commit 0b59f601d8
7 changed files with 41 additions and 9 deletions

View File

@@ -51,7 +51,7 @@ export class HeroAttrsComp extends ecs.Comp {
knockback_distance: number = 0; // 击退距离强化
knockback_res: number = 0; // 击退抗性
crit_damage: number = 0; // 额外暴击伤害
puncture: number = 0; // 穿刺次数
puncture_chance: number = 0; // 穿透概率
wfuny: number = 0; // 风怒
revived_count: number = 0; // 已复活次数
@@ -243,6 +243,11 @@ export class HeroAttrsComp extends ecs.Comp {
return this.freeze_chance + this.getFieldPercentValue(FieldSkillType.HeroFrost);
}
/** 英雄实时穿透概率 = 基础穿透概率。 */
public getRuntimePunctureChance(): number {
return this.puncture_chance;
}
/** 英雄实时暴击伤害 = 基础额外暴伤 + 驻场暴伤。 */
public getRuntimeCritDamageBonus(): number {
if (this.fac !== FacSet.HERO) return this.crit_damage;
@@ -330,7 +335,7 @@ export class HeroAttrsComp extends ecs.Comp {
this.crit_damage = 0;
this.revived_count = 0;
this.invincible_time = 0;
this.puncture = 0;
this.puncture_chance = 0;
this.wfuny = 0;
this.boom = false;

View File

@@ -108,7 +108,7 @@ export class SCastSystem extends ecs.ComblockSystem implements ecs.ISystemUpdate
mockAttrs.ap = highestAp;
mockAttrs.critical = 0;
mockAttrs.freeze_chance = 0;
mockAttrs.puncture = 0;
mockAttrs.puncture_chance = 0;
mockAttrs.fac = FacSet.HERO;
for (let i = 0; i < castTimes; i++) {