feedback3 W3A: a 联防 operator down since its own combat resolves its own devour marks (the unit in front takes the 物理流失, a 5-tier revive is spent); the carried SP is set again after the deploy hook, so 独行 / 黄沙罗盘 no longer add to it (review fixes)

This commit is contained in:
sganggs committed 2026-10-04 17:56:59 +08:00
1 parent 3315803b79
commit dff0676dee
6 files changed
+102 -30

No files matched your search

+12
View File
@@ -172,6 +172,18 @@ export class SkillRuntime {
return this.charges >= this.maxCharges ? this.maxCharges * cost : this.charges * cost + this.sp;
}
/**
* Set the official 技力 to `total` (charges rebuilt, nothing fired — a 修改, not a gain): the 联防 carry, applied again
* once the deployment is done (Battle._deploy). A passive skill, or a timed one that runs already, is left as it is.
*/
setSpTotal(total) {
if (this.noSkill || this.kind === 'passive' || (this.active && this.isTimed) || !Number.isFinite(total)) return;
this.sp = 0;
this.charges = 0;
this.gainSp(Math.max(0, total), 'init', true);
if (this.spCost <= 0) this.charges = this.maxCharges;
}
/**
* Called on every (re)deployment. `carry` = { sp } for unite (联防) helpers: their 技力 at the end of their own combat
* (unitsEnd `sp` = spTotal, rebuilt into charges here). Nothing else of the skill is carried — PRTS 卫戍协议/帮助 §联防阶段