feedback6: merge R21B — 联防 plays on the round's battlefield again, its terrain, crates, water, devices and runes as in 0.1.4 (the owner's report 「联防阶段地形全消失了」 and knowledge of the official mode, GitHub #244's tournament video; 0.2.0's escaped level was the placeholder road every wave-template level carries); the 联防 battle input is byte-identical to 0.1.4's in 20 cases; 乌尔比安's comment keeps both streams' sentences; golden as R21B's commit (unite-1 / unite-2 back to their stages, coop2-NORMAL-3, coop2-HARD-4, coop3-ABYSS-5, coop4-ABYSS-7, coop2-NORMAL-8-serverrun, coop2-NORMAL-14-standins), the merged tree differs from the branch only in R21A's boss pair fields

This commit is contained in:
sganggs committed 2026-10-07 17:54:16 +08:00
commit 26c72a6d95
25 files changed
+334 -283

No files matched your search

+10 -11
View File
@@ -356,20 +356,19 @@ function MatchScreen() {
const shownMembers = shownField ? ((Array.isArray(pub?.fields) ? pub.fields : []).find((f) => f && f.fieldId === shownField.fieldId)?.players
|| (Array.isArray(shownField.players) ? shownField.players : null)) : null;
const ownView = showPrep || (shownField ? (shownMembers ? shownMembers.includes(myId) : shownField.fieldId === ownFieldId(myId)) : !watchingOther);
// a field on a map of its own (联防: the escaped template's map, GitHub #41) shows that map; leaving it restores the board's
const fieldStage = gd.ready && shownField && shownField.stageId && shownField.stageId !== pub?.stageId ? gd.stage(shownField.stageId) : null;
// every field is fought on the round's battlefield — 联防 too, its terrain, crates and water included (0.2.1, the
// owner's decision of 2026-10-07; 0.2.0 drew the escaped levels' empty road there and restored the board on leaving)
useEffect(() => {
if (!view) return;
const st = fieldStage || (ownView ? ownStage : baseStage);
const st = ownView ? ownStage : baseStage;
if (st) view.setStage(st);
}, [view, ownView, ownStage, baseStage, fieldStage]);
// the stage behind the board ON SCREEN — the one view.setStage was just given: a field's own map (联防, GitHub #41),
// else the own one (机变 overrides applied) or, while watching a teammate, the plain one — and how a tapped BOARD tile
// maps to it (GitHub issue #184: tileClick → gameLogic.terrainInfo). Everywhere but a boss-prep board the two spaces
// are the same: a 最终攻势 / 隐秘核心 battle renders the stage's own rows (GEO.BOSS_RECT), 联防 / normal rects are
// stage rows; the boss PREP draws the player's half (stage rows 2–5) as board rows 9–12 (render/prepfield.js toDisp),
// which is exactly gameLogic.fieldTile.
live.current.terrainStage = fieldStage || (ownView ? ownStage : baseStage);
}, [view, ownView, ownStage, baseStage]);
// the stage behind the board ON SCREEN — the own one (机变 overrides applied) or, while watching a teammate, the plain
// one — and how a tapped BOARD tile maps to it (GitHub issue #184: tileClick → gameLogic.terrainInfo). Everywhere but a
// boss-prep board the two spaces are the same: a 最终攻势 / 隐秘核心 battle renders the stage's own rows (GEO.BOSS_RECT),
// 联防 / normal rects are stage rows; the boss PREP draws the player's half (stage rows 2–5) as board rows 9–12
// (render/prepfield.js toDisp), which is exactly gameLogic.fieldTile.
live.current.terrainStage = ownView ? ownStage : baseStage;
live.current.terrainTile = showPrep && (deployField === 'bossL' || deployField === 'bossR')
? (row, col) => fieldTile(deployField, row, col)
: (row, col) => [row, col];