Commit Graph
392 Commits
Author SHA1 Message Date
sganggs eb04f5dfa4 feedback5 R5: split the in-match UI logic into modules
public/js/ui/gameLogic.js becomes a re-export barrel. The bodies move verbatim into public/js/ui/gameLogic/*.js (shared, phases, camera, watch, bonds, shop, placement, draft, enemies, format, shortcuts, settings, result, loadout, panel). The barrel re-exports the same 96 names in the same order. isObj and int gain export on shared.js so sibling modules can import them; they stay off the barrel. No importer changes.
2026-10-05 17:06:45 +08:00
sganggs 8ab6d021da feedback5: merge feedback4 — PR #129, the lobby ERR import 2026-10-05 16:48:02 +08:00
sganggs f2440d4fd7 feedback4: merge master — PR #129 (watching a teammate shows hand, temp, equipment, strategy, effects) 2026-10-05 16:47:54 +08:00
Luo Xingyu bce182703b Watching a teammate shows their hand, 临时整备区, equipment, strategy and effects (#129)
The prep scout of another player's board carries their 整备区 hand and 临时整备区 as units on the bench rows (like the own prep bench), the equipped items of their operators, their strategy in the drawer and their effects column (the official mode shows a teammate's hand too). The scout signature includes the hand / temp slots, so a moved card refreshes the watcher. Closes #128. Contributed by @2321Robin.
2026-10-05 16:47:33 +08:00
sganggs dcce7858c2 feedback5: shared/standIn.js JSDoc marks the selection's skillIndex optional and documents diyRecord, so the checkJs slice passes 2026-10-05 16:35:33 +08:00
sganggs 3288afc787 feedback5: merge R6 (tooling) — correctness-only ESLint, a first checkJs slice + core typedefs, tools/check-imports.mjs, tools/package.mjs (+ --lite), CI tooling job 2026-10-05 16:34:01 +08:00
sganggs e1de092b74 feedback4: the lobby imports ERR, so a failed 观战 join shows its toast instead of throwing (PR #119's error path; found by the 0.2.0 lint) 2026-10-05 16:32:44 +08:00
sganggs 6a7a23765a feedback5: merge R4 — operator kits one file per chess (kits/ops/*, kits/shared/*, kits/index.js in the old registry order) + kits/README.md with the fidelity checklist; golden unchanged
# Conflicts:
#	.git-blame-ignore-revs
#	test/docs-consistency.test.js
2026-10-05 16:30:29 +08:00
sganggs 920624e743 feedback5 R4: kits/README.md — how a kit file is built, what it may use (shared helpers, the battle API of docs/SIM.md), naming, registration, tests, the fidelity rule and a ten-item fidelity checklist per operator with example kits and tests (for the stand-ins, self-select 6★ operators and GitHub #136); test/content/kits_layout.test.js checks that every ops/ file is listed in kits/index.js, named after its chess id and charId, registers exactly its kit, and imports nothing Node-only or server-only and no clock / Math.random 2026-10-05 16:26:29 +08:00
sganggs 4dff116c19 feedback5 R6: run lint, import check and typecheck in CI
One extra Ubuntu job. The existing test matrix is unchanged. Lint warnings are allowed.
2026-10-05 16:23:54 +08:00
sganggs b6c9918c46 feedback5 R6: add a player package tool with a lite dry-run
tools/package.mjs packs git-tracked runtime files and production dependencies. --lite leaves out local art, fonts and the local asset manifest. --dry-run lists the files and the uncompressed sizes and does not write a zip.
2026-10-05 16:23:47 +08:00
sganggs 95842cef6e feedback5: merge R3 — server/sim/Battle.js split into server/sim/battle/* (prototype methods in fixed order) and content/enemies.js into content/enemies/* (same KITS order); golden unchanged
# Conflicts:
#	.git-blame-ignore-revs
2026-10-05 16:23:17 +08:00
sganggs 014259b75f feedback5 R6: check that sim and match stay off the net and the client
tools/check-imports.mjs lists boundary hits and exits 1 only with --strict. The current hit is the Node data loader's node:fs, node:path and node:url. server/data.js stays allowed.
2026-10-05 16:20:55 +08:00
sganggs 5024559028 feedback5 R3: docs and comments follow the split — DESIGN §2 and SIM.md list server/sim/battle/ and content/enemies/, SIM.md and research 08 name the new homes (archetypes.js frontGuard / ep / dmgZone / pollution, helpers.js areaAllies / zone / setForm, fly.js kitShell), code comments that pointed at moved code say where it lives now (enemies.js header, battle/blocking.js, battle/queries.js, sim constants / snapshot / units / ai / targeting / devices / bosses, shared constants / protocol, render style / interp); .git-blame-ignore-revs lists the two pure-move commits 2026-10-05 16:20:06 +08:00
sganggs 37b1c0a644 feedback5 R4: paths after the kit split — DESIGN §7 and SIM.md (layout, §7.2 kit contract, kit citations), research 09, code comments (content/generic, tokens, items/battle, shared/loadoutRecord, render fx / demo), test comments, and the kits' own comments that named tierN.js; DESIGN §17–§23 history citations are left as they are 2026-10-05 16:18:58 +08:00
sganggs 64a7f48efa feedback5 R6: add a small checkJs slice and core typedefs
tsc checks shared (except protocol.js and bandBonds.js), the sim rng/dir/constants helpers, and types/core.js. strict stays off. types/README.md says how to widen the slice.
2026-10-05 16:18:28 +08:00
sganggs babc35b72a feedback5 R6: add a correctness-only eslint
Flat config for Node and the browser, with unused names as warnings. The run is clean of errors after three small fixes: the lobby spectate path imports ERR, a disable comment for a rule that is not installed is gone, and two atlas regexes spell the BOM as an escape.
2026-10-05 16:16:45 +08:00
sganggs 560328cacc feedback5 R3: content/enemies.js → content/enemies/*.js, a pure move — every declaration verbatim with its comments: helpers.js (shared constants, per-battle state, ability bookkeeping, selection / damage helpers), archetypes.js (ability archetypes and the archetype kits reused by several keys), one file per kit family with its kit-only constants and its part of KITS (invisible, times, element, dot, reflection, fly, special, leaders — the kitLeaderMisc entries that closed the SPECIAL section open the leaders part, so the order stands); enemies.js keeps the header, the dispatch hooks and dispatchers, STATS_ONLY and the chalice share, builds KITS from the parts (188 keys, same order, same functions) and re-exports all 43 names it exported before. docs-consistency pins kitMace's inR in enemies/leaders.js 2026-10-05 16:16:37 +08:00
sganggs 7adf46b033 feedback5 R4: .git-blame-ignore-revs lists the kit split (a pure move), so blame skips it 2026-10-05 16:14:48 +08:00
sganggs 8924007e55 feedback5 R4: content/index.js takes the kit registry from kits/index.js (one guarded import per kit file) instead of loading the six tier shims; KITS is the same object kits/index.js exports — same keys, order and builders, golden unchanged 2026-10-05 16:14:39 +08:00
sganggs 1169102d46 feedback5 R4: one file per operator kit — kits/tier1..6.js split into kits/ops/<chessId>-<codename>.js (129 kits), kits/shared/tier1..6.js (the helpers two or more kits of a tier use, and each tier's header notes) and kits/index.js (the registry, same keys in the same order); the tier files become re-export shims
Pure move: every line of a kit, of a helper and of the tier headers is copied verbatim (only the headers' first
line names the new file); a helper used by one kit moved into that kit's file. Glue only: the generated imports,
`export default { … }` around each registry entry, `export { … }` lists in shared/tier2..6.js, and tier4's
`(bb, chess, def)` default-argument wrapper as shared/tier4.js `withDefaults` (applied in each tier-4 kit file).
kits/index.js loads every kit file with a guarded dynamic import (browser-safe, no directory listing); tierN.js
re-export the tier registry (TIER_KITS) and their old named exports (tier1 helpers + tinmanKit, tier6
PITHST_ELEMENTS). The merged registry, every tier default and named export have the same keys, order, frozenness
and function sources as before. test/docs-consistency.test.js reads the moved code at its new paths.
Golden: GOLDEN_FULL=1 node --test test/golden.test.js unchanged.
2026-10-05 16:13:56 +08:00
sganggs 13224f9483 feedback5 R3: Battle.js → server/sim/battle/*.js, a pure move — the 131 methods, verbatim with their comments, go to 14 per-concern method containers (players, lifecycle, hooks, spawns, deploy, blocking, status, combat, queries, summons, tiles, displacement, economy, events; fin / clone in util.js) that Battle.js installs on Battle.prototype in a fixed order with class-method descriptors; Battle.js keeps the header, the constructor and the class, and re-exports pushTiles. docs-consistency reads the method modules (battleText) and pins layerGainRoom in battle/economy.js 2026-10-05 16:13:25 +08:00
sganggs aef8caef3f feedback5: merge R1 — server/index.js split into server/http/* modules on plain node:http (same exports, headers and responses) 2026-10-05 16:13:20 +08:00
sganggs 5f0830cdc5 feedback5 R1: docs and comments follow the split — DESIGN §2 layout lists server/http/, the README table names the entry and http/, path comments in shared/media.js, public/js/media.js, buildGuard.js, net.js and three tests point at the new modules; .git-blame-ignore-revs lists the pure-move commit 2026-10-05 16:11:30 +08:00
sganggs 1b38e30819 feedback5 R1: startServer and main become wiring — PORT / HOST / TRUST_PROXY and the option picks go to http/config.js, the session stack and the /ws upgrade to http/websocket.js, the request listener and /healthz to http/routes.js (new), the security headers and the clientError 400 to http/common.js, the banner, signals and entry check to http/boot.js
Same order of construction, listeners and headers as before; a scripted fingerprint (export list, 51 HTTP requests'
status / header order / body hash, raw upgrade and malformed-request replies) and the process run (banner, port in
use, SIGINT) match the pre-split server exactly. test/version.test.js reads the banner and /healthz from their new
files; module headers describe each piece.
2026-10-05 16:08:41 +08:00
sganggs b48a67caec feedback5 R1: pure move — the top-level code of server/index.js goes to server/http/ (config, common, files, static, media, buildTag, websocket, boot) verbatim; index.js imports it and re-exports the same 15 names, startServer and main are untouched
Only changes besides the move: `export` on helpers another module now needs (sendError, sendJson, splitUrl, GzipCache,
isNotModified, serveFile, serveMedia, noopLog, makeLogger), ROOT resolves two levels up from server/http/config.js
(same path), and short headers on the new files.
2026-10-05 16:02:33 +08:00
sganggs 67ca229d44 feedback5: merge W5B — stand-in (补位) and self-select (自选编队) data: chess backup fields, data/backups.json (17 stand-ins, 4 DIY slots, picks, faction bonds), shared/standIn.js 2026-10-05 16:02:25 +08:00
sganggs 73a30148b6 feedback5 WB: DATA.md documents chess.json backup and data/backups.json (§18); research 02 / 03 name the DIY faction rule (mainPower + every subPower) 2026-10-05 15:58:17 +08:00
sganggs 4b1d9606d2 feedback5 WB: the data of 补位 and 自选 — chess.json keeps the official backup fields, data/backups.json builds the 17 stand-ins and the DIY picks
chess.json: every record carries the shop row's backupCharId / backupTmplId / backupCharSkillIndex /
backupCharUniEquipId / backupCharPotRank verbatim as `backup` (both forms; nothing else changed).
data/backups.json: units = the 17 原型干员 with a form per status they fight at (43 forms: stats, trait,
talents, every unlocked skill, modules), diy = the 4 slots, the prototype picks per tier (9 6★ at 5 and 6,
six 4★ at 5), the 78 owned-6★ picks and their faction bonds (mainPower + subPower vs powerIdList, else 协防).
shared/standIn.js composes a stand-in (or a DIY prototype) into a chess-shaped record; the build fails when
the form builder cannot give back every PRESET chess field for field. test/backups.test.js (10 tests).
2026-10-05 15:58:10 +08:00
sganggs 6b489b1776 feedback4: merge W5A — golden-result safety net (tools/golden.mjs, test/golden: every chess loadout, enemy, bond, field and bot match, fixed seeds) 2026-10-05 15:50:16 +08:00
sganggs 0fa0f958b1 feedback5 WA: golden-result safety net before the 0.2.0 refactor — tools/golden.mjs runs a seeded corpus (49 roster battles: every chess record × skill × module, every stage and enemy kind; 46 bond battles; 22 leader / 联防 fields; 16 bot-only matches) and test/golden.test.js compares its digests with test/golden/*.json field by field (fast subset by default, GOLDEN_FULL=1 for all; npm run golden / golden:update; test/golden/README.md) 2026-10-05 15:49:24 +08:00
sganggs 305b524df2 feedback4: a bond card's layer-scaled chance (不屈, 迅捷, 奇迹) stops at 100 % like the sim's (GitHub #108: 124 % at 266 layers) 2026-10-05 14:37:23 +08:00
sganggs 723755e3a5 feedback4: 引星棘刺 S1 度算浪波 (an AUTO skill thrown at an ally) fires as soon as its SP is full, with no enemy around (GitHub #124) 2026-10-05 14:37:23 +08:00
sganggs 2519a23a55 feedback4: merge master — PRs #114 #119 #127 #115 #110 2026-10-05 14:35:00 +08:00
Convey123 bd892a4dd6 联防 plays the official escaped stage's own corrosion BGM (#110)
The 联防 phase plays m_bat_corrosion (intro + loop), the track of the official escaped stages, instead of carrying on with the round's battle music; without the downloaded track it falls back to the battle music. Asset plan, manifest entry (audio.bgm.unite), audio.js and tests. Contributed by @Convey123.
2026-10-05 14:34:42 +08:00
sganggs bcd916eb61 feedback4: the real-browser e2e suites confirm the leftover-funds prompt on the Space path too (coop.e2e 4/4, real.e2e 2/2) 2026-10-05 14:28:47 +08:00
shanzhaikabi 763e224b8d A 咒愈师's trait heals on every damage she deals; 收割者 / 武者 heal on their skill hits too (#115)
The official trait buffs fire on output damage, not only on a normal attack (buff_template_data vendla_tr / reed2_tr / titi_tr ON_AFTER_OUTPUT_DAMAGE; etlchi_trait etc. ON_OUTPUT_DAMAGE, attackType BUFF filtered for 隐德来希). Skill damage now heals: 缇缇's 凝固的时光 ticks, 焰影苇草 S2 fireballs and 刺玫 S2's counter heal the one ally the skill names (DamageInfo.traitAlly); 隐德来希's S2 blood sickles heal her, capped at her block count per instant. PRTS 分支特性信息 §咒愈师: the heal depends only on the damage value. Contributed by @shanzhaikabi.
2026-10-05 14:20:59 +08:00
Convey123 bbff3514a8 Emote browser tests run with the fetched emote art too (#127)
The emote E2E suite accepts either the local-client extraction or the copies tools/fetch-assets.mjs downloads (public/assets/ui/emoticon), and checks the wheel's official cell sprite only when the local ui/battle art is present. Contributed by @Convey123.
2026-10-05 14:20:12 +08:00
saltfish 7bea774f01 The 观战 and 加入 buttons send the typed key, not the click event (#119)
Preact hands the click event to onClick handlers, so the 0.1.3 spectate button normalised an element into the key "OBJE" and every spectate request failed. codeArg() takes only a string key and otherwise falls back to the input field; spectate errors now say what went wrong; a recent-key chip fills the field instead of joining at once. Contributed by @salt-fishes.
2026-10-05 14:20:08 +08:00
Chun'an Shi 3f05c65dec Q / X hotkeys retreat and sell the selected operator in prep (#114)
Q retreats and X sells the selected operator during prep, through the same buttons (never an item, never while typing in a field); the buttons show [Q] / [X]. Contributed by @SpiritedAwayCN.
2026-10-05 14:18:44 +08:00
sganggs 8aa41d9c1c feedback4: real.e2e confirms the leftover-funds prompt on ready; DESIGN's §23.f4 references point to §23.23; the 0.1.3 changelog names the 不屈 source and fixes 手牌 2026-10-05 14:03:32 +08:00
sganggs a0a5419eb8 feedback3: the mock prep test confirms the leftover-funds prompt 2026-10-04 22:35:13 +08:00
sganggs a5c31cbcb4 feedback3: browser tests accept the leftover-funds prompt when they press ready 2026-10-04 22:31:55 +08:00
sganggs 9f3785636a feedback3: a prep-end item may sit unmerged through the fight, and bonds.json matches the offline build 2026-10-04 22:20:20 +08:00
sganggs 351ead3603 feedback3: 0.1.3 design notes, changelog and version 2026-10-04 22:13:05 +08:00
sganggs c9dd2a6392 feedback3: merge WJ — 高台 only for elite 歌蕾蒂娅 with HOK-Y, live prep watch, silenced 折射, grant toasts, emote timeout glyph 2026-10-04 21:26:46 +08:00
sganggs 1005754bf3 feedback3: merge WH — ground operators are melee-position, 叙拉古 rolls on every normal hit, off bonds show as disabled, prep-end items merge next prep 2026-10-04 21:26:10 +08:00
sganggs a3ebca0ddf feedback3: merge WI — 乌尔比安 S3 move and return are free redeploys, 波登可's spore radius is 0.9, 琳琅诗怀雅 S3 shoots at 10 coins when an enemy is in her attack range 2026-10-04 21:25:44 +08:00
sganggs 3500ef2d32 feedback3: merge WG — nest enemies pulse instead of attacking, children carry no bounty, a 隐匿 blocker is skipped by areas, stacked cold freezes for the longer duration 2026-10-04 21:25:40 +08:00
sganggs 7e711582b0 feedback3 WJ: the bot places elite 歌蕾蒂娅 with HOK-Y on a 高台 that covers the road 2026-10-04 21:11:41 +08:00