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:
1 parent
64443b4aab
commit
d9750d8aba
19 files changed
+43
-25
No files matched your search
@@ -1,5 +1,5 @@
|
||||
// Observing rules and labels of client-side combat (research 09 §3.1 / §6.3, DESIGN §14 "Spectating") — pure helpers
|
||||
// for the game screen, the team panel and the combat HUD (mirror of server/match/Match.js _watchClient):
|
||||
// for the game screen, the team panel and the combat HUD (mirror of server/match/match/watch.js _watchClient):
|
||||
// * prep (休整期): tap a teammate → 前往查看 → their board (read-only);
|
||||
// * own normal battle running: no observing ("当前无法查看");
|
||||
// * own battle over: "⌛ 作战结束,等待队友完成作战" + the teammates' progress; tap a teammate → 前往查看 → a local
|
||||
|
||||
@@ -58,7 +58,7 @@ export function allowedBands(bands, modeType) {
|
||||
export const DEFAULT_TIMEOUT_BAND = 'band_bldsk';
|
||||
|
||||
/**
|
||||
* The strategy the server assigns me when my turn times out (server/match/Match.js defaultBand): the official default
|
||||
* The strategy the server assigns me when my turn times out (server/match/match/phases.js defaultBand): the official default
|
||||
* 「华法琳」 while no teammate holds it, else the first free strategy in draft order (sortId) — never one a teammate
|
||||
* already picked (队友已选).
|
||||
* @param {any[]} bands allowedBands(...) (sortId order)
|
||||
@@ -218,7 +218,7 @@ export function BandDraftScreen() {
|
||||
act('g.bandFocus', { bandId: sel }, { sfx: false, quiet: true });
|
||||
}, [sel, timed, myPick]);
|
||||
|
||||
// what a timeout gives me: the highlighted band while free, else the default (never 队友已选 — Match.js timeoutBand)
|
||||
// what a timeout gives me: the highlighted band while free, else the default (never 队友已选 — match/phases.js timeoutBand)
|
||||
const autoId = autoPickBand(sel, { bands, taken, myPick, defaultId });
|
||||
const autoName = (autoId && gd.band(autoId)?.name) || gd.band(defaultId)?.name || '华法琳';
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ import { audio } from '../audio.js';
|
||||
const cx = (...p) => p.flat().filter(Boolean).join(' ');
|
||||
|
||||
// The first seven present are shown (+ remaining LP = a 4×2 grid); the title (评语) stats come first.
|
||||
// `gold` is the funds a player SPENT (server/match/PlayerState.js spend(); the 挥金如土 title stat).
|
||||
// `gold` is the funds a player SPENT (server/match/player/economy.js spend(); the 挥金如土 title stat).
|
||||
const STAT_ROWS = [
|
||||
['dmgDealt', '造成伤害'], ['kills', '击倒敌人'], ['bossDamage', '领袖伤害'], ['activatedLayers', '盟约层数'],
|
||||
['merges', '晋升次数'], ['itemsEquipped', '配发装备'], ['gold', '消耗资金'], ['perfectRounds', '完美作战'],
|
||||
|
||||
+1
-1
@@ -102,7 +102,7 @@ export function MissTag({ n, name = null }) {
|
||||
const LEAK_PHASES = new Set([PHASE.COMBAT, PHASE.UNITE]);
|
||||
|
||||
/**
|
||||
* LP a round's leaks cost at settlement — the server rule (server/match/Match.js settle): min(lpCapPerRound, counted
|
||||
* LP a round's leaks cost at settlement — the server rule (server/match/match/settle.js): min(lpCapPerRound, counted
|
||||
* leaks), never negative.
|
||||
* @param {number} leaks counted leaks so far
|
||||
* @param {number} [cap] data/config.json lpCapPerRound
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
// watches that player's field at once.
|
||||
// Live LP (user playtest #3 item 2): during a normal round's battle each row's tower shows lp − the loss that player's
|
||||
// leaks so far will cost (red, −N): the own row the top bar's live value (`self`, ui/hud.js liveLp), a teammate's row
|
||||
// m.public players[].pendingLp (server/match/Match.js, ~1 Hz). 联防 (user playtest #6 item 7): a leaker's row adds the
|
||||
// m.public players[].pendingLp (server/match/match/views.js, ~1 Hz). 联防 (user playtest #6 item 7): a leaker's row adds the
|
||||
// runner tag ×N — its enemies still standing on the 联防 field, uncapped and live (falling as the helpers kill them,
|
||||
// rising when one splits) — next to lp − min(lpCapPerRound, N): the own row the top bar's value, a teammate's row the
|
||||
// local 联防 replica's count while it is on screen (`uniteLocal`: the battle runner's state().uniteLeft, the same battle
|
||||
|
||||
@@ -135,7 +135,7 @@ export function tempRowFrame(a, b, { labelW = 0, gap = 8, vw = Infinity } = {})
|
||||
}
|
||||
|
||||
/**
|
||||
* What the temp row's label says will happen to its pieces (server/match/PlayerState.js tempDue): a piece is resolved
|
||||
* What the temp row's label says will happen to its pieces (server/match/player/basics.js tempDue): a piece is resolved
|
||||
* at the end of the first prep in which the player can act on it. Not ready (or outside PREP): at the end of this / the
|
||||
* coming prep, and 准备就绪 waits for the row to be cleared. Ready in PREP: Ready is refused while the row holds pieces,
|
||||
* so whatever lies there arrived after it — kept through the NEXT prep (cancelling Ready makes it due at this one).
|
||||
|
||||
Reference in new issue
Block a user