xcdoge
7b4f512ce9
敌方血条偏高:头顶高度按"原点以上的高度"算(bounds.y + bounds.height),而不是包围盒高度
玩家反馈:逐腐兽的血条明显偏高。
原因:单位血条/名字牌的头顶高度用的是 spine setup-pose 包围盒的**高度**(units.js headTilesForUnit 里
`bounds.height × 1/320 × 模型系数 × 0.92`)。这个公式默认包围盒是**脚锚定**的 —— 大多数敌人确实如此
(猎狗pro y=−3.7、大鲍勃 y=−2.6,height 与"脚以上高度"几乎相等)。但有些模型的**原点在身体中间**:
逐腐兽的包围盒是 y=−404.7 / height=722.6,锏是 y=−798 / height=1183 —— 对它们,包围盒高度比可见顶端多出
大半个模型,于是血条被顶到上限 2.2 格(非 Boss)之上,看起来就是"明显偏高"。
改法:定位改用**原点以上的高度**(`Number.isFinite(b.y) ? b.y + b.height : b.height`,仍按 20…900 夹取)。
同时把这段计算从 UnitView 内联代码提成一个纯函数 `headTilesForUnit()`(放 units.js,紧挨 UNIT/EL_BAR 常量),
入参只有 isEnemy / isBoss / spineShown / bounds / modelK / modelKY,便于直接测;UnitView 仍然保留
"没显示 spine 就不看模型"的短路语义。spine.js 的 `height` getter 语义不变(别处也用它,例如替身的纵向拉伸)。
影响面(用真实 bounds 扫过 167 个有模型数据的敌人):
逐腐兽 / 疯狂的逐腐兽 1.85 → 0.81 格(降 1.03)
锏(Boss) 2.59 → 1.11 格(降 1.48)
萨卡兹大剑手 / 组长 1.54 → 1.23 格(降 0.31)
枯朽之种 0.72 → 0.55、萨卡兹百夫长 1.51 → 1.34、妖怪MKII 0.71 → 0.55
其余 103 / 167 个敌人的变化 ≤ 0.02 格(脚锚定模型几乎无感)
测试:
test/render/bar-head.test.js(新增 5 条):用真实的逐腐兽 / 猎狗pro / 大鲍勃 / 锏 包围盒断言新公式、
夹取上限、以及三个回退分支(无 bounds 用 chibi 余量 × 系数、Boss 无模型用 2.2、干员与召唤物用固定余量),
并做源码断言把"y + height"这条规则钉住。
test/render/playtest6-enemies.test.js:两条 prefab 测试的期望值原本写死 `390 × …`(合成夹具的 bounds 是
y=−150 / height=390,即当年就把这个 bug 当成了正确行为),现在改为从**被测 view 自己的 bounds** 推导
(240 而不是 390),夹具本身不动。
test/render 全量 552 项 / 546 通过 / 0 失败;test/ui + test/render 1279 项 / 1265 通过 / 0 失败。
未触碰 server/sim,test/golden 无变动。
2026-10-11 22:49:56 +08:00
..
2026-10-11 01:58:52 +08:00
2026-10-09 18:58:36 +08:00
2026-10-08 20:36:41 +08:00
2026-10-11 01:58:52 +08:00
feedback7 UIBACK: the top-bar capsule counts like the official — resolved = killed + leaked among the enemies the round scheduled (opening 0/3, a leak 1/3, a kill 2/3, the splitter 3/3); a split child, a summon and a boss summon are in neither number but still cost LP and break 完美作战 (PR #308 by @xcdoge, the capsule half of PR #157 — authored by them: the sim / protocol / HUD hunks applied as reviewed): inTotal / killedInTotal / leakedInTotal / resolved, b.snap / BattleResult / b.progress (optional field) / m.public progress carry resolved, killed may exceed total (validation bounds it by the content-spawn allowance); dropped the PR's stray design-doc line — it had replaced the S→C b.end bullet of docs/design/network.md, which is back; the 联防 live-counter change mark follows the enemy list now that a spawn no longer moves total (uniteLeftMark + test); golden: only total / players.*.total / snaps move, outcomes bit-identical — roster 23 (roster-002 003 007 008 009 010 011 012 013 015 017 018 020 023 024 025 026 027 037 045 047 048 049), bonds 2 (bond-maniShip-low, bond-soloShip-high), fields 11 (boss-boss_1 3 5 pair+solo, boss-boss_6-solo, hidden-boss_8 10 pair+solo), diy 11 (diy-036 040 056 062 068 073 083 091 095 114 115), matches 12 (solo-FUNNY-1 NORMAL-1 HARD-1 ABYSS-1 ABYSS-2, coop2-NORMAL-3 coop2-HARD-4 coop3-ABYSS-5 coop4-ABYSS-7 coop2-NORMAL-8-serverrun solo-HARD-9-boosted coop2-NORMAL-70-diy: the total column of 36 round rows), standins unchanged
2026-10-08 19:30:36 +08:00
2026-10-11 01:58:52 +08:00
2026-10-11 22:49:56 +08:00
2026-10-11 01:58:52 +08:00
2026-10-11 01:58:52 +08:00
2026-10-06 14:18:30 +08:00
2026-10-06 17:59:13 +08:00
2026-10-08 20:05:07 +08:00
2026-10-09 17:13:13 +08:00
2026-10-09 17:46:07 +08:00
2026-10-08 18:42:23 +08:00
2026-10-08 18:42:46 +08:00
2026-10-05 16:20:55 +08:00
2026-10-08 18:48:16 +08:00
2026-10-10 01:58:06 +08:00
2026-10-08 18:41:33 +08:00
2026-10-10 01:58:06 +08:00
2026-10-11 01:58:52 +08:00
2026-10-08 20:08:32 +08:00
2026-10-09 17:46:07 +08:00
2026-10-10 00:45:41 +08:00
feedback5 WW: split DESIGN.md into docs/design/ (the current rules) and docs/history/ (the per-release revisions), section numbers kept — a pure move: every ## N. block (heading, text, the --- after it) moves verbatim, each part file only gains a title line and a pointer to the index; docs/DESIGN.md keeps its header and becomes the index (a § → file table). design/overview.md §0 §1 §2 §11 §12, geometry-time.md §3 §4, engine.md §5 §7, match.md §6 §16, network.md §8 §14, client.md §9 §10 §13 §15; history/v2.2-playtest3.md §17, v2.3-playtest4.md §18, v2.4-playtest5.md §19, v2.5-playtest6.md §20, 0.1.1.md §21, 0.1.2.md §22, 0.1.3.md §23, 0.1.4.md §24, 0.2.0.md §25. Round trip: the index header plus the blocks in § order reproduce the pre-split DESIGN.md byte for byte (813 785 bytes, sha256 fe81884c…). Tests: test/helpers/designDocs.js designText() (the split script's splitBlocks / designText) reassembles the text in § order; docs-consistency and feedback1-gaps read it instead of docs/DESIGN.md (every pin unchanged); docs-paths guards the split (each § exactly once in docs/design/ or docs/history/, the index row of every file names its sections, every "DESIGN §N(.M)" cited in the repository is a heading — 779 in 327 files today); package.test keeps docs/design/ and docs/history/ out of the zips; golden unchanged
2026-10-06 19:08:44 +08:00
2026-10-03 15:41:57 +08:00
2026-10-05 22:34:54 +08:00
2026-10-07 02:38:07 +08:00
2026-10-07 13:28:12 +08:00
2026-10-09 22:55:24 +08:00
2026-10-09 22:55:24 +08:00
2026-10-09 17:46:07 +08:00
2026-10-09 17:13:13 +08:00
2026-10-09 17:46:07 +08:00
2026-10-07 18:03:54 +08:00
2026-10-11 01:58:52 +08:00
2026-10-11 01:58:52 +08:00
feedback5: merge WE1 — fidelity (sim rules): 秘术师 store at the attack check (深靛; 维伊 / 黑键 plug into it), enemy attacks land at their damage frame so a short stun / freeze / sleep / 浮空 / 缴械 / 恐惧 before it cancels the swing, 武者 heal per damage instance through 禁疗, 庇护 the strongest only, PHY-X 不高于 50 %, 链愈师 jumps in the 3×3, a summon readied at its owner's redeploy, Misery's duration skills, 伺夜 S2 in 战术点形态, centurions hit up to block-count targets; merge fixes: 黑键's kit keeps the up() import WE2's S2 cast needs (WE1 dropped it with its tick store — the first regeneration had stored 9288 swallowed errors in diy-114), the 自选 refusal names 集成战略 / 生息演算, tools/golden.mjs prints a missing value, test/golden.test.js fails on any stored engine error; golden: vs WE1 only the W4B / WE2 scenarios differ (roster-042, bond-egirShip-high, coop2-ABYSS-10-boosted, coop2-NORMAL-70-diy, diy-045 / 078 / 114 / 115 / 116)
2026-10-06 16:52:11 +08:00
2026-10-09 17:46:07 +08:00
2026-10-07 16:51:35 +08:00
2026-10-06 18:27:13 +08:00
2026-10-06 18:31:28 +08:00
2026-10-08 18:53:24 +08:00
2026-10-08 19:57:26 +08:00
feedback5 WK: 自选编队 on the server — room.diy { picks } (lenient: illegal picks dropped, only malformed input is BAD_MSG; stored per session / seat; a match takes the picks its seat had at the start, a change during a match is for the next one; welcome lists diyKitted), PlayerState.diy with the player's data view (a slotted DIY slot is its operator for every rule: bonds from its factions, no 特质, the pick's skill and module, the slot's tier / price / merge), a per-player stock per slotted piece (8 at tier 5, 5 at tier 6 [ASSUMED]; never in the shared pool; none when every bond of it is banned), DIY pieces in that player's shop rolls and reward offers once the 调度中心 reaches the slot's level, battleInput diy, m.private.diy / diyBanned, prep scouting and results name the operator, 信标 never sends a 自选 piece to a teammate [ASSUMED]
2026-10-05 23:35:01 +08:00
2026-10-04 17:38:29 +08:00
2026-10-08 20:52:30 +08:00
2026-10-05 19:13:46 +08:00
2026-10-04 17:39:30 +08:00
2026-10-11 01:58:52 +08:00
2026-10-11 01:58:52 +08:00
2026-10-03 22:33:20 +08:00
2026-10-03 23:05:06 +08:00
2026-10-10 02:11:23 +08:00
2026-10-08 18:48:42 +08:00
2026-10-09 17:46:07 +08:00
2026-10-06 20:16:20 +08:00
2026-10-07 11:23:42 +08:00
2026-10-08 17:45:45 +08:00
feedback5: the public dev branch is marked as a development build (the owner's decision of 2026-10-06): version 0.2.0-dev (title footer, boot banner, /healthz), a README warning under the title (unstable, not for public servers, how to report, shared browser storage, no release zips), a visible 开发版 tag on the title screen (zh / en), a boot-banner warning for hosts, and tools/package.mjs refuses a dev version without --allow-dev; test/version.test.js checks all of it
2026-10-06 19:05:40 +08:00
2026-10-04 14:20:11 +08:00