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-08 18:54:54 +08:00
2026-10-11 22:49:56 +08:00
2026-10-08 18:48:42 +08:00
2026-10-06 05:05:42 +08:00
2026-09-29 16:21:31 +08:00
2026-10-02 17:58:35 +08:00
2026-10-11 01:58:52 +08:00
2026-10-06 05:05:42 +08:00
2026-10-02 17:58:35 +08:00
2026-10-11 01:58:52 +08:00
2026-10-08 19:10:15 +08:00
2026-10-09 17:15:28 +08:00
2026-10-09 17:14:50 +08:00
2026-10-09 01:38:57 +08:00
2026-10-02 17:58:35 +08:00
2026-10-08 19:18:01 +08:00
2026-10-11 01:58:52 +08:00
2026-10-09 17:14:50 +08:00
2026-10-03 08:36:16 +08:00
2026-10-03 06:45:59 +08:00
2026-10-03 06:25:12 +08:00
2026-10-03 07:16:34 +08:00
2026-10-03 07:16:34 +08:00
2026-10-03 07:17:49 +08:00
2026-10-04 00:26:13 +08:00
2026-10-08 19:20:55 +08:00
2026-10-04 17:42:18 +08:00
2026-10-04 20:33:29 +08:00
2026-10-04 17:27:56 +08:00
2026-10-07 14:43:29 +08:00
2026-10-04 17:43:32 +08:00
2026-10-07 14:43:29 +08:00
2026-10-06 21:57:51 +08:00
2026-10-06 21:57:51 +08:00
2026-10-07 02:32:28 +08:00
2026-10-09 01:38:57 +08:00
2026-10-02 17:58:35 +08:00
2026-10-02 17:58:35 +08:00
2026-10-08 19:23:49 +08:00
2026-10-08 18:48:53 +08:00
2026-10-08 21:45:09 +08:00
2026-09-30 05:35:45 +08:00
2026-09-29 16:21:31 +08:00
2026-09-30 05:35:45 +08:00
2026-10-07 12:19:55 +08:00
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
2026-10-09 17:38:12 +08:00
2026-10-09 17:14:50 +08:00
2026-10-11 01:58:52 +08:00
2026-10-08 19:22:08 +08:00
2026-10-03 07:30:52 +08:00
2026-10-03 16:15:01 +08:00
2026-10-06 00:56:52 +08:00
2026-10-09 22:55:24 +08:00
feedback6 R21F: enemy animation states, the client part of PR #275 by @xcdoge re-implemented — the resolver gives an enemy every numbered skill clip (anims.skills; the caller's first index stays the primary, operators unchanged, 宴's PREFAB_SPINE_ROLES fix kept), the stun spellings Stun_1 and Dizzy_Begin/Loop/End, a separate run role (Run_Begin/Loop/End); the renderer walks an enemy faster than moveSpeed 1 on its Run cycle (猎狗pro, 深池侦察犬 ×2; [ASSUMED] threshold), swaps an enemy's skill clip on a cast event (UnitView.setSkillSlot; a form in force is kept), and plays the 重生 of 巨大的丑东西 (Revive, then the fleeing 大祭司 Idle_2 / Move_2 / Stun_2) and 自在 (Revive_01); data/assets.json regenerated offline: 18 enemies gain anims.skills, 6 anims.run, 3 a stun clip (巨大的丑东西, 斩胄之剑, 破胄之锤), nothing else; the sim's cast slot (a new event) is not part of it; golden: unchanged
2026-10-07 17:59:11 +08:00
2026-10-09 01:38:57 +08:00
2026-09-29 16:21:31 +08:00
2026-10-06 14:08:18 +08:00
2026-10-06 14:08:18 +08:00
feedback6 R21B: 联防 plays on the round's battlefield again — its terrain, crates, water, devices and runes, as in 0.1.4 (the owner's decision of 2026-10-07, 「官服保留地形,改回去」; GitHub #244). 0.2.0's escaped-level map (8a436249, §25.6.4) is withdrawn: that map is the placeholder grid all 39 wave template levels carry, tile for tile; only the 11 stage levels have terrain. match/unitePhase.js _uniteOpts fields this.stageId in both combat modes, unite.js uniteStageId is removed, the client draws the 联防 on the board's stage again (screens/game.js: 0.1.4's ownStage / baseStage, no map switch, nothing to restore on leaving), the dev mock likewise. Kept from 0.2.0: own-board 突袭 / 乌尔比安 S3 landings (onOwnBoard, raidTile untouched), the bounty payee, the 联防 BGM, the SETTLE result box. data/stages.json keeps the two kind 'unite' records (no field uses them; engine tests use them as a plain two-halves road); tools/build-data.mjs comments only, an offline rebuild reproduces data/ byte for byte. The 联防 battle input is byte-identical to v0.1.4's in 20 cases (5 stages × 1 / 2 helpers × both combat modes); GitHub #41 item 3 (野鬃 pushing walkers back across the gate onto the other half) is back with v0.1.4's numbers, none off the map. Tests: test/match/feedback5-unite-map.test.js rewritten (6, all fail on the parent), test/e2e/coop.e2e.mjs checks the 联防 field's drawn stage; docs: DATA §12, META §4, PLAYING §5, design/geometry-time, I18N, the §25.6.4 pointer; golden: fields unite-1 (escaped_single → act1autochess_m02) and unite-2 (escaped_multi → act1autochess_m07), the stages of 0.1.4, and the co-op matches whose 联防 rounds come out differently on the round's map — coop2-NORMAL-3, coop2-HARD-4, coop3-ABYSS-5, coop4-ABYSS-7, coop2-NORMAL-8-serverrun, coop2-NORMAL-14-standins (now a victory)
2026-10-07 17:40:03 +08:00
2026-10-03 04:59:08 +08:00
2026-09-30 19:12:36 +08:00
2026-09-30 20:32:47 +08:00
Playtest #6 fixes: summons placed by hand, boss pool stall, bounties, 联防 leak counter, distinct offers, 机变 card text, phone buy tap, skill triggers, blocking, push force, 孤立, enemies, element bar
2026-10-01 19:08:23 +08:00
2026-10-02 04:19:28 +08:00
2026-10-02 17:58:35 +08:00
2026-10-11 22:49:56 +08:00
2026-10-02 04:19:28 +08:00
2026-09-30 19:12:36 +08:00
2026-09-29 16:21:31 +08:00
2026-10-11 01:58:52 +08:00
feedback6 R21B: 联防 plays on the round's battlefield again — its terrain, crates, water, devices and runes, as in 0.1.4 (the owner's decision of 2026-10-07, 「官服保留地形,改回去」; GitHub #244). 0.2.0's escaped-level map (8a436249, §25.6.4) is withdrawn: that map is the placeholder grid all 39 wave template levels carry, tile for tile; only the 11 stage levels have terrain. match/unitePhase.js _uniteOpts fields this.stageId in both combat modes, unite.js uniteStageId is removed, the client draws the 联防 on the board's stage again (screens/game.js: 0.1.4's ownStage / baseStage, no map switch, nothing to restore on leaving), the dev mock likewise. Kept from 0.2.0: own-board 突袭 / 乌尔比安 S3 landings (onOwnBoard, raidTile untouched), the bounty payee, the 联防 BGM, the SETTLE result box. data/stages.json keeps the two kind 'unite' records (no field uses them; engine tests use them as a plain two-halves road); tools/build-data.mjs comments only, an offline rebuild reproduces data/ byte for byte. The 联防 battle input is byte-identical to v0.1.4's in 20 cases (5 stages × 1 / 2 helpers × both combat modes); GitHub #41 item 3 (野鬃 pushing walkers back across the gate onto the other half) is back with v0.1.4's numbers, none off the map. Tests: test/match/feedback5-unite-map.test.js rewritten (6, all fail on the parent), test/e2e/coop.e2e.mjs checks the 联防 field's drawn stage; docs: DATA §12, META §4, PLAYING §5, design/geometry-time, I18N, the §25.6.4 pointer; golden: fields unite-1 (escaped_single → act1autochess_m02) and unite-2 (escaped_multi → act1autochess_m07), the stages of 0.1.4, and the co-op matches whose 联防 rounds come out differently on the round's map — coop2-NORMAL-3, coop2-HARD-4, coop3-ABYSS-5, coop4-ABYSS-7, coop2-NORMAL-8-serverrun, coop2-NORMAL-14-standins (now a victory)
2026-10-07 17:40:03 +08:00
2026-10-11 01:58:52 +08:00
2026-10-09 17:15:28 +08:00
2026-10-09 17:16:49 +08:00