feedback5 WN: 补位 display follows the official game (the owner's recall of 2026-10-06) — a chess the player does not own is shown as its stand-in wherever the player's copy appears: shop and reward cards (the stand-in's portrait, name, class and backup skill; the chess's bonds, tier and price; a small 「替补」 mark), the hand and 临时整备区 pieces (the stand-in's model, a 「替补」 tag; the board already was), the detail card (the stand-in's portrait, name, skill, talents and module with the chess's bonds and 特质, 「银灰的替补」 under the name [ASSUMED]), bond popups (own and a teammate's by UnitInfo standInFor through ownerBoard / ownerOps), the result lineup (m.result standInFor), prep scouting of the bench, the equip-replace dialog, the elite and gift tickers; rules unchanged (bonds, price, tier, merges, pools and 特质 stay the chess's); new strings through t() with English; tests updated (standin-ui 15, standin-ownership 7, watch-bonds wiring) and the e2e now ends on the result screen (fastServer SP_FINISH_AFTER); golden unchanged
This commit is contained in:
1 parent
78251f499c
commit
0e8004a382
32 files changed
+518
-181
No files matched your search
+5
-2
@@ -30,9 +30,11 @@ export function freePort() {
|
||||
* Start the real server (`node server/index.js`, or test/e2e/fastServer.mjs with `fast` speed-ups) on a free port (or
|
||||
* `port`: e.g. the port of a server just stopped — a server restart the open clients reconnect to).
|
||||
* @param {{ port?: number, fast?: { timerScale?: number, combatSpeed?: number, startRound?: 'boss'|'hidden'|number, kit?: number, chess?: string[],
|
||||
* items?: string[], idleBots?: boolean, kits?: string[][], botChess?: string[], autoPlace?: boolean, eliminate?: number[], stage?: string } }} [opts]
|
||||
* items?: string[], idleBots?: boolean, kits?: string[][], botChess?: string[], autoPlace?: boolean, eliminate?: number[], stage?: string,
|
||||
* finishAfter?: number } }} [opts]
|
||||
* kits: per-human starter kits (seat order); botChess: the AI seats' kit; autoPlace: the kits go onto the board at the
|
||||
* first prep; eliminate: humans (seat order) eliminated at the jump; stage: the stage of every match — fastServer.mjs hooks
|
||||
* first prep; eliminate: humans (seat order) eliminated at the jump; stage: the stage of every match; finishAfter: the
|
||||
* match ends (RESULT) once that round has settled — fastServer.mjs hooks
|
||||
* @returns {Promise<{ base: string, port: number, logs: string[], stop: (o?: { hard?: boolean }) => Promise<void> }>}
|
||||
*/
|
||||
export async function startRealServer(opts = {}) {
|
||||
@@ -57,6 +59,7 @@ export async function startRealServer(opts = {}) {
|
||||
if (opts.fast.eliminate?.length) env.SP_ELIMINATE = opts.fast.eliminate.join(',');
|
||||
if (opts.fast.stage) env.SP_STAGE = String(opts.fast.stage);
|
||||
if (opts.fast.level) env.SP_START_LEVEL = String(opts.fast.level);
|
||||
if (opts.fast.finishAfter) env.SP_FINISH_AFTER = String(opts.fast.finishAfter);
|
||||
}
|
||||
const child = spawn(process.execPath, [entry], { cwd: ROOT, env, stdio: ['ignore', 'pipe', 'pipe'] });
|
||||
const logs = [];
|
||||
|
||||
@@ -24,6 +24,8 @@
|
||||
// 战场#08's pool).
|
||||
// SP_START_LEVEL=<1..6>: the starter kit also puts every human's 调度中心 at this level (and rerolls its shop there, before
|
||||
// SP_START_SHOP stocks its first slots) — test/ui/diy.e2e.test.js: a tier-5 自选 piece is sold from level 5.
|
||||
// SP_FINISH_AFTER=<round>: the match ends (a defeat: m.result, the RESULT screen) once that round has settled, instead
|
||||
// of going on to the next round — test/ui/standin.e2e.test.js: the result lineup of the board just fought with.
|
||||
// Not a test file (node --test runs it as a no-op module when NODE_TEST_CONTEXT is set).
|
||||
|
||||
import { startServer } from '../../server/index.js';
|
||||
@@ -49,6 +51,7 @@ if (!process.env.NODE_TEST_CONTEXT) {
|
||||
const eliminate = String(process.env.SP_ELIMINATE || '').split(',').map((x) => x.trim()).filter(Boolean).map(Number);
|
||||
const forcedStage = String(process.env.SP_STAGE || '').trim();
|
||||
const startLevel = Math.max(0, Math.min(6, Number(process.env.SP_START_LEVEL) || 0));
|
||||
const finishAfter = Math.max(0, Number(process.env.SP_FINISH_AFTER) || 0);
|
||||
|
||||
class FastMatch extends Match {
|
||||
constructor(opts) {
|
||||
@@ -119,6 +122,11 @@ if (!process.env.NODE_TEST_CONTEXT) {
|
||||
this.markPublic();
|
||||
}
|
||||
|
||||
afterSettle() {
|
||||
if (finishAfter && this.round >= finishAfter && !this.ended) { this.finish({ victory: false, reason: 'defeat' }); return; }
|
||||
super.afterSettle();
|
||||
}
|
||||
|
||||
scheduleBotPrep(ps, i = 0) {
|
||||
if (!idleBots) { super.scheduleBotPrep(ps, i); return; }
|
||||
const round = this.round;
|
||||
|
||||
Reference in new issue
Block a user