feedback7 R22-LATE: 引星棘刺 S1 度算浪波 breaks an HP-ratio tie by the latest deployment; golden: roster-033, roster-034 move

PRTS 引星棘刺 技能1 度算浪波 备注: 「※优先选择生命比例最低>最晚部署的我方单位(不含装置职业单位)」. The kit took the ally
with the lowest HP ratio but broke a tie by more blocking, then the nearer one, then the unit id. A tie now goes to
the latest deployment (the highest deploySeq: a redeployed operator counts from its new deployment), the id last.
「不含装置职业单位」 was already met: alliesInGrid never returns a device.

Golden: roster-033 (a normal 引星棘刺 with S1) and roster-034 (an elite one) move — at the start every ally is at full
HP, so the first units now land on the latest deployed ally instead of the nearest one (033: killed 64 → 47, leaks
103 → 120; 034: 5_14_b damage taken 14691 → 11676 …).
Tests: test/content/kits_alt_t5.test.js +1 (two allies at 50 %: the later deployment, though farther, gets the unit;
a lower ratio still wins) — fails on the parent; all 引星棘刺 tests pass (9).
This commit is contained in:
sganggs committed 2026-10-08 21:57:48 +08:00
1 parent ac4231846f
commit 03688c8297
3 files changed
+77 -48

No files matched your search

+27
View File
@@ -1058,6 +1058,33 @@ test('引星棘刺 S1 度算浪波: two alchemy units on one ally add their DEF
done(h);
});
test('引星棘刺 S1 度算浪波: at an HP-ratio tie the unit goes to the latest deployed ally (PRTS 备注 「优先选择生命比例最低>最晚部署的我方单位」)', () => {
for (const id of pair('15')) {
const h = run({
defs: { chess: { t_first: ally('t_first'), t_last: ally('t_last') } },
// t_first stands nearer to her, t_last deploys after it (until 0.2.2 a tie went to more blocking, then the nearer)
units: [entry(id, 'skchr_thorn2_1', { row: 10, col: 3 }), { chessId: 't_first', row: 11, col: 4 }, { chessId: 't_last', row: 9, col: 5 }],
enemies: [],
});
const u = sel(h, id, 'skchr_thorn2_1');
const first = h.unit('t_first'), last = h.unit('t_last');
h.step();
assert.ok(last.deploySeq > first.deploySeq, 't_last is the later deployment');
first.hp = first.s.maxHp * 0.5; last.hp = last.s.maxHp * 0.5;
cast(h, u);
const z = u.mem.zones.find((x) => x.type === 'guard');
assert.deepEqual([z.r, z.c], [9, 5], 'the latest deployed of the two at 50 %');
// the lowest ratio still comes first
last.hp = last.s.maxHp; first.hp = first.s.maxHp * 0.4;
const n0 = u.skill.activations;
u.skill.gainSp(1000);
assert.ok(h.runUntil(() => u.skill.activations > n0, 15), 'cast again');
const z2 = u.mem.zones.filter((x) => x.type === 'guard').at(-1);
assert.deepEqual([z2.r, z2.c], [11, 4], 'a lower ratio beats a later deployment');
done(h);
}
});
test('引星棘刺 S1 度算浪波 (AUTO): fires as soon as its SP is full, no enemy needed (GitHub #124)', () => {
for (const id of pair('15')) {
const h = run({