- Shared card pool and item stock as in the official mode (the owner's request, from the 路标档案馆 video and public notes): solo low-tier exceptions, co-op operators x2, shared item stock with special-item exceptions, normal / advanced occupancy 1 / 2, re-check on buy, 机变 exhaustion, release on consume / destroy / elimination; 整备 never exceeds stock; invariant held <= cap. - 突袭: one taunt-first reselect right after a revive (the owner's rule); ordinary polls and redeploys keep the 0.2.3 rule; a revive on an enemy's tile stays. #475: online boss / hidden-boss Raid may land on the empty half (owner-limited scope). - 浊心斯卡蒂 S1 x 坚守 no longer bounce redirected damage, and the two shares conserve the hit (idea of PR #464 by @HappyTanuki). - Operator fixes adapted from PRs by @Xinglan233 (#459 哈洛德 S2 elemental trigger, #460 涤火杰西卡 shield on the four adjacent tiles, #461 家族徽章 first hit after stealth, #462 松果 S2 regrow per deploy); 克莱门莎 S2 splash 1.1 / 100% ATK and air auto-trigger (#467); 白面 copying 歌蕾蒂娅 / 余 skips the three-member condition (#473, the owner's video). - 香槟炸弹 is not chosen by friendly auras / heals (PR #468 / #476 by @Siornya); 琳琅诗怀雅 coin balance (PR #450 by @IceCodeNew); Touch prep display (PR #451 by @YinqiMargatroid); lobby header (PR #471 by @YuriRestia); Japanese UI terms (PR #448 by @scutkane). - AI-only boss countdown grace, render-failure cache / recovery without restarting a battle, device units kept on a same-field re-entry, DIY detail / skill previews, large-text result buttons. - golden: battle families equal 0.2.3 except diy-135 / diy-136 (克莱门莎); all 18 release matches move through the shared pool, every flip named in docs/history/0.2.4.md §29.12; two coverage scenarios added.
48 lines
2.5 KiB
JavaScript
48 lines
2.5 KiB
JavaScript
// 外勤医疗: the official preparation field already shows 预备干员-医疗; Touch replaces it at battle start.
|
|
import { test } from 'node:test';
|
|
import assert from 'node:assert/strict';
|
|
import { makeMatch } from './harness.js';
|
|
|
|
const MEDIC = 'char_605_cmedic';
|
|
const STAGE = 'act2autochess_m01';
|
|
|
|
test('外勤医疗 shows the reserve medic on every prep board and in prep scouting, without adding a movable piece', () => {
|
|
const h = makeMatch({ mode: 'coop', humans: 2, seed: 6301, fake: true }).start().toPrep();
|
|
h.setStage(STAGE);
|
|
const [holder, teammate] = [h.ps('p_0'), h.ps('p_1')];
|
|
assert.deepEqual(holder.privateView().prepMapChars, [], 'no medic without the strategy');
|
|
holder.bandId = 'band_amedic';
|
|
for (const ps of [holder, teammate]) {
|
|
const priv = ps.privateView();
|
|
assert.equal(priv.prepMapChars.length, 1);
|
|
const medic = priv.prepMapChars[0];
|
|
assert.deepEqual([medic.defId, medic.kind, medic.x, medic.y, medic.dir, medic.ownerId],
|
|
[MEDIC, 'token', 2, 10, 'RIGHT', ps.playerId]);
|
|
assert.ok(medic.uid < 0 && !priv.board.some((p) => p.uid === medic.uid), 'display only: no board piece to move or sell');
|
|
assert.equal(h.m.prepFieldMeta(ps).units.find((u) => u.uid === medic.uid)?.defId, MEDIC);
|
|
}
|
|
holder.bandId = null;
|
|
assert.deepEqual(teammate.privateView().prepMapChars, [], 'the preview goes away when nobody holds the strategy');
|
|
h.m.dispose();
|
|
});
|
|
|
|
test('外勤医疗 boss preparation shows both reserve medics on their matching halves, mirrored for the right player', () => {
|
|
const h = makeMatch({ mode: 'coop', humans: 2, seed: 6302, fake: true }).start().toPrep();
|
|
h.setStage(STAGE);
|
|
const m = h.m;
|
|
m.bossWaves = [{ players: ['p_0', 'p_1'], wave: { spawns: [] } }];
|
|
h.ps('p_0').bandId = 'band_amedic';
|
|
const [left, right] = [h.ps('p_0'), h.ps('p_1')];
|
|
const own = left.privateView().prepMapChars[0];
|
|
const mate = left.privateView().bossMate.units.find((u) => u.defId === MEDIC);
|
|
assert.deepEqual([own.y, own.x, own.dir], [10, 2, 'RIGHT'], 'own prep uses board coordinates');
|
|
assert.deepEqual([mate.y, mate.x, mate.dir, mate.ownerId], [3, 18, 'LEFT', 'p_1']);
|
|
const scout = m.prepFieldMeta(right);
|
|
assert.equal(scout.kind, 'boss');
|
|
const medics = scout.units.filter((u) => u.defId === MEDIC).sort((a, b) => a.x - b.x);
|
|
assert.deepEqual(medics.map((u) => [u.y, u.x, u.dir, u.ownerId]),
|
|
[[3, 2, 'RIGHT', 'p_0'], [3, 18, 'LEFT', 'p_1']]);
|
|
assert.notEqual(medics[0].uid, medics[1].uid, 'both model IDs remain distinct on the shared field');
|
|
m.dispose();
|
|
});
|