feedback5 R2: docs and comments follow the split — DESIGN §2 and META list server/match/match/ and server/match/player/ (the classes: constructor + method install), research 09 / 11 name the new homes (Match.watch in match/watch.js, the settle in match/settle.js, the facing changes in player/placement.js / items.js), code comments that pointed at moved code say where it lives now (shared constants, client bandDraft / observe / result / hud / teamPanel / underframe / game-mock, test comments); .git-blame-ignore-revs lists the two pure-move commits. DESIGN §17–§23 history citations, the "before" column and the proposal of research 11, tools/build-data.mjs (Match.js still exports BAND_TURN_SECONDS) and public/js/ui/gameLogic.js (in the client stream R5) are left as they are

This commit is contained in:
sganggs committed 2026-10-05 17:18:22 +08:00
1 parent 64443b4aab
commit d9750d8aba
19 files changed
+43 -25

No files matched your search

+2 -2
View File
@@ -318,7 +318,7 @@ The public mirror (ArknightsAssets2 `cn`, `ui/emoticon/theme/[uc]<themeId>/icon/
- `g.move {uid, to:{area:'board',row,col}, dir}` with `dir ∈ 'UP'|'RIGHT'|'DOWN'|'LEFT'`; the server defaults to `'RIGHT'` when absent, for bots and old clients.
- `g.art {itemUid,row,col,dir}`.
- Broadcast `dir` in the board state (public and private views, snapshot `UnitInfo.dir`).
2. **`server/match/PlayerState.js`.**
2. **`server/match/PlayerState.js`** (the methods named here: `server/match/player/placement.js`, `items.js`).
- Store `piece.dir`, preserved across rounds.
- In `_moveChessToBoard` and `_moveTokenToBoard`, `if (occ === piece) return OK;` must become "update `piece.dir`, recompute, OK". This is the in-place re-orient.
- Swaps keep each piece's own dir.
@@ -363,7 +363,7 @@ The public mirror (ArknightsAssets2 `cn`, `ui/emoticon/theme/[uc]<themeId>/icon/
4. Prep: the same avatar → 前往查看 flow (read-only board + pen).
5. 联防 and FA fields: the ‹ › pill cycles LEFT half / 全景 / RIGHT half, with captions "你自己" / "👁 name#" / "全景". Non-helpers are auto-moved to the 联防 field as observers. In FA the other pair's field is not selectable.
6. Eliminated players: a dialog offers 继续观战 (auto-observe the first live field, free switching) or 退出.
7. `server/match/Match.js watch()` must enforce the same rules (prep: any teammate; combat: only if your own field finished; FA: own pair only; dead: anything).
7. `Match.watch()` (`server/match/match/watch.js`) must enforce the same rules (prep: any teammate; combat: only if your own field finished; FA: own pair only; dead: anything).
### 6.4 Combat computation model (user item 5, architecture) [proposal based on §3.2]
+1 -1
View File
@@ -220,7 +220,7 @@ line is lost rather than clamped.
- `shared/constants.js`: `BOND_LAYER_CAP = 999` and `BOSS_HIT_LIMIT = 300000` (0 / Infinity = off), plus
`layerGainRoom(before, n)` = min(n, cap − before), never negative.
- Layers: every writer clamps with it — `PlayerState.addLayers` (every prep-side gain: 特质, items, bands, 机变 cards,
bonds), the settle of the in-battle gains (`Match.js`), `Battle.addLayers` (the live in-battle copy, after the
bonds), the settle of the in-battle gains (`Match.settle`, `server/match/match/settle.js`), `Battle.addLayers` (the live in-battle copy, after the
`layerGain` hook, as the client's `AddBondCount`); a gain at the cap adds 0 (no onLayers, no 'layer' event, no hook),
so the per-N milestones (远见, 奇迹, 维多利亚 …) stop with the count; the client-result check (`fields.js`) bounds a
reported gain by the room left from the bond's starting layers; `invariants.js` flags a bond above the cap. The dev