feedback5 CB2: 琳琅诗怀雅's 破财消灾 cost restarts at 5 DP with every deployment — a redeploy no longer keeps the doubled cost; a 联防 field already started at 5 (community report of 2026-10-06 「进入联防阶段…正常对局中死亡之后再部署复活费用也应该重置」)

Official: PRTS 琳琅诗怀雅 天赋 破财消灾 备注 「再部署时重置本天赋费用消耗」; the client buff swire2_t_2 multiplies the `cost` in its
own blackboard (CalculateBlackboardValueViaParams × cost_multi) and is rebuilt at each deployment.
Cause: kits/ops/chess_char_3_04-swire2.js kept mem.saveCount for the whole battle. Now: reset on her deploy hook (battle
start, redeploy, 突袭 再部署). 联防 is a battle of its own (fresh units), so its first save always cost 5 — pinned.

Golden: roster-008 (琳琅诗怀雅 elite revived for 5 DP after a redeploy: more DP left, the fight changes), roster-049 (the
same in band 5: snapshot hashes only — DP).
Tests: test/content/feedback5-swire2-revive-cost.test.js (2: the redeploy one fails on the parent, 20 DP instead of 5;
the 联防 one is a pin).
This commit is contained in:
sganggs committed 2026-10-07 02:15:42 +08:00
1 parent 5d3ca339e4
commit 64aaac8387
3 files changed
+69 -19

No files matched your search

@@ -259,6 +259,11 @@ export default {
battle.on('skillStart', (ctx) => { if (ctx.unit === unit && unit.skill?.kind !== 'passive') addCoins(battle, unit, num(t0.sp, 1)); }, { owner: unit });
} },
{ install(battle, unit) { // 破财消灾
// the doubling cost restarts at 5 with every deployment: PRTS 备注 「再部署时重置本天赋费用消耗」 — the client buff
// swire2_t_2 keeps the doubled `cost` in its own blackboard, built anew when she is deployed (a battle start, 联防
// included — a new battle —, a redeploy, a 突袭 再部署). Until 0.2.0 a redeploy kept the doubled cost (community
// report of 2026-10-06 「正常对局中死亡之后再部署复活费用也应该重置」)
battle.on('deploy', (ctx) => { if (ctx.unit === unit) unit.mem.saveCount = 0; }, { owner: unit });
battle.on('fatal', (ctx) => {
if (ctx.unit !== unit || ctx.prevented) return;
const n = unit.mem.saveCount ?? 0;