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:
1 parent
5d3ca339e4
commit
64aaac8387
3 files changed
+69
-19
No files matched your search
@@ -0,0 +1,44 @@
|
||||
// test/content/feedback5-swire2-revive-cost.test.js — 琳琅诗怀雅's 破财消灾 (「受到致命伤害时,若费用足够则消耗5点部署费用使生命恢复到
|
||||
// 70%,每次触发该天赋时消耗的费用翻倍」): the doubled cost restarts at 5 with every deployment — PRTS 备注 「再部署时重置本天赋费用
|
||||
// 消耗」 (community report of 2026-10-06 「进入联防阶段琳琅诗怀雅所需的复活费用应该重置,正常对局中死亡之后再部署复活费用也应该
|
||||
// 重置」). A 联防 field is a battle of its own, so it always started at 5; a redeploy used to keep the doubled cost.
|
||||
// Run: node --test test/content/feedback5-swire2-revive-cost.test.js
|
||||
|
||||
import { test } from 'node:test';
|
||||
import assert from 'node:assert/strict';
|
||||
import { makeBattle, checkInvariants } from '../helpers/battleHarness.js';
|
||||
|
||||
const ID = 'chess_char_3_04_a';
|
||||
|
||||
function field(kind = 'normal') {
|
||||
const h = makeBattle({ kind, units: [{ chessId: ID, row: 10, col: 5 }], timeLimit: 300, autoFinish: false, flags: { dpInit: 60, dpMax: 99 } });
|
||||
h.step();
|
||||
return { h, u: h.unit(ID), ps: h.b.getPlayer('p1') };
|
||||
}
|
||||
|
||||
/** A lethal hit with `dp` DP in the pool: returns the DP the talent took (0 when she fell). */
|
||||
function lethal(h, u, ps, dp = 90) {
|
||||
ps.dp = dp;
|
||||
h.b.dealDamage(null, u, { amount: u.s.maxHp * 5, type: 'true', canDodge: false });
|
||||
return u.alive ? dp - ps.dp : 0;
|
||||
}
|
||||
|
||||
test('破财消灾 doubles within one deployment and restarts at 5 DP after a redeploy', () => {
|
||||
const { h, u, ps } = field();
|
||||
assert.equal(lethal(h, u, ps), 5, 'first save: 5 DP');
|
||||
assert.ok(u.alive && Math.abs(u.hp - u.s.maxHp * 0.7) < 1e-6, 'back to 70 % HP');
|
||||
assert.equal(lethal(h, u, ps), 10, 'second save of the same deployment: doubled');
|
||||
h.b.retreat(u);
|
||||
assert.ok(!u.alive);
|
||||
ps.dp = 90;
|
||||
assert.ok(h.runUntil(() => u.alive && u.deployed, 120), 'redeployed');
|
||||
assert.equal(lethal(h, u, ps), 5, 'after the redeploy: 5 DP again (it used to cost 20)');
|
||||
checkInvariants(h.b);
|
||||
assert.equal(h.b.errors.length, 0);
|
||||
});
|
||||
|
||||
test('a 联防 field starts at 5 DP: a battle of its own', () => {
|
||||
const { h, u, ps } = field('unite');
|
||||
assert.equal(lethal(h, u, ps), 5);
|
||||
assert.equal(lethal(h, u, ps), 10);
|
||||
});
|
||||
Reference in new issue
Block a user