feedback7: merge fb7-late follow-ups — 画卷's copied items always arrive unequipped (PRTS 「获得的装备为未装备状态」; hand, then temp, destroyed with the toast when both are full), 度算浪波 breaks an HP-ratio tie by the latest deployment (PRTS)
- Golden union OK (roster-033 / roster-034 again); broad node --test 5602 (5600 pass, 0 fail, 2 skipped); lint 0 errors.
This commit is contained in:
commit
cee3784321
8 files changed
+141
-73
No files matched your search
@@ -1121,10 +1121,11 @@ test('画卷 (Art): copies the operator on the tile / in front with its elite st
|
||||
const copy = ps.hand.find((p) => p && p.kind === 'chess');
|
||||
assert.equal(copy && copy.id, DATA.chess[cid].goldenId, 'elite copy in the hand');
|
||||
// the copied 激光发射器 pairs with the original's (items merge "无论是否被装备") ⇒ the golden goes to the hand;
|
||||
// 变形同构体 never merges ⇒ the copy wears it too
|
||||
assert.deepEqual(copy.items.map((x) => x.id), [A('6_09')]);
|
||||
// 变形同构体 never merges ⇒ its copy waits in the hand too, unequipped (PRTS 画卷 备注 "获得的装备为未装备状态";
|
||||
// until 0.2.2 the copy wore it)
|
||||
assert.deepEqual(copy.items.map((x) => x.id), [], 'the copy wears nothing');
|
||||
assert.deepEqual(ps.find(target.uid).piece.items.map((x) => x.id), [A('6_09')]);
|
||||
assert.deepEqual(handIds(ps, 'item'), [B('3_03')], 'merged golden in the hand (regression: was equipped on the copy)');
|
||||
assert.deepEqual(handIds(ps, 'item').slice().sort(), [B('3_03'), A('6_09')].sort(), 'the merged golden and the copied 变形同构体 in the hand');
|
||||
const art2 = giveItem(m, ps, 'chess_item_6_02_m');
|
||||
assert.equal(m.handle('p_0', { t: 'g.art', itemUid: art2.uid, row: 11, col: 7 }).error, 'BAD_TARGET', 'no operator in range');
|
||||
cover('chess_item_6_02_m');
|
||||
|
||||
@@ -1061,6 +1061,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({
|
||||
|
||||
Reference in new issue
Block a user