diff --git a/docs/DESIGN.md b/docs/DESIGN.md index fb6f449a..28fa0d3c 100644 --- a/docs/DESIGN.md +++ b/docs/DESIGN.md @@ -1473,7 +1473,7 @@ TBD-22-intro - The Front model replays the state: the Die clip where it would be (`dieT`), a knocked-down one holding its end; `die(true)` and a view built for a unit already down start on the held end (the 联防 entry `FORCED_EXIT`, a field entered late, the re-entry from the field meta after an overflowed hidden-tab backlog). Its first frame gets the knocked-down grey (`_dropActor` drops the cached tint; a swapped-in model used to keep the previous model's tint state). A withdrawn operator facing UP (no `down` entry) fades like one facing RIGHT: the Front model's Die clip times the fade (`_fallDur`). - The redeploy (a `deploy` event: timed, 不屈, 阿戈尔 — every `Battle._deploy` — or a revive seen only in the snapshot) brings the Back model back; a deploy clip the Front model is playing goes on on the Back model where it is (`SpineActor.deployElapsed`). - Safety net: until the Front model is there, or when it fails to load, the Back model holds still — `SpineActor.die()` on a skeleton without a Die clip stops whatever looped and holds the first frame of its idle clip (frozen when it has none either), and nothing restarts an attack on a dead actor. The 20 summon / enemy skeletons without a Die clip (e.g. 浊心斯卡蒂's 海嗣) now fade holding still instead of looping [ASSUMED look]. - - Unchanged: operators facing RIGHT / DOWN / LEFT, enemies and summons (no Back models in the manifest: `_wantsBack` is false for them), the redeploy ring, the sim. Nothing changes in render/interp.js or battle/runner.js: `die` / `deploy` are state events every client stage keeps (runner `keepsState`, game.js `keepEarly`, interp `isCosmeticEvent`), and b.snap `down` / `fieldMeta` rebuild the view of an operator already down; both now reach the model swap. + - Unchanged model choice: operators facing RIGHT / DOWN / LEFT, enemies and summons (no Back models in the manifest: `_wantsBack` is false for them; only the safety net above changes how their idle-only skeletons die), the redeploy ring, the sim. Nothing changes in render/interp.js or battle/runner.js: `die` / `deploy` are state events every client stage keeps (runner `keepsState`, game.js `keepEarly`, interp `isCosmeticEvent`), and b.snap `down` / `fieldMeta` rebuild the view of an operator already down; both now reach the model swap. - [ASSUMED]: the Front model for the fall and the knocked-down pose (above); the Back skeleton's own Die clip when it has one; the held first idle frame of a skeleton without a Die clip. - Tests: `test/render/issue25-downback.test.js` (fake PIXI with the real manifest and asset helpers: the manifest counts; the five operators of the report lie down with their Front model's Die; an UP knock-out mid-attack — the Back model holds still, then the Front model's Die is held under the ring, greyed, every acquire paired with a release; RIGHT unchanged; the redeploy back to the Back model with the deploy clip carried over; the snapshot's DIE anim and a snapshot revive; a death and a redeploy in one frame load nothing; a view built for an operator already down and the 联防 entry lie on the held end; a withdrawn one fades like a RIGHT one; 薄绿 keeps its Back Die clip; the SpineActor safety net; enemies and summons unchanged); `downring`, `feedback1f-down-tile`, `unitview`, `forms`, `test/ui/unitFacing.test.js` unchanged. diff --git a/public/js/render/spine.js b/public/js/render/spine.js index b9b40a87..24067e31 100644 --- a/public/js/render/spine.js +++ b/public/js/render/spine.js @@ -361,7 +361,7 @@ export class SpineActor { /** * Play the death clip; returns its duration (0 when there is none). A skeleton without one (131 of the 135 Back * models, GitHub issue #25; a few idle-only summons and enemies) stops whatever looped — an attack, a skill or the idle — - * and holds the first frame of its idle clip (frozen when it has none either): a dead unit never goes on attacking. A + * and holds the first frame of its idle clip (frozen when it has none either) [ASSUMED look]: a dead unit never goes on attacking. A * knocked-out operator shows its fall with the Front model instead (render/units.js _wantsBack). */ die() { diff --git a/public/js/render/units.js b/public/js/render/units.js index db52cc3b..3cd7f78c 100644 --- a/public/js/render/units.js +++ b/public/js/render/units.js @@ -26,7 +26,7 @@ // Knocked-out operators (user playtest #4 item 9, b.snap `down`): `setDown([id, respawnAt, respawnTime, state, row, // col])` keeps a dead operator on the tile it lies on (row / col: where it fell, or its home — sim Battle._layBody, // player report F5 after 0.1.0) in its knocked-down pose — the Spine Die clip played once and held on its last -// frame (the collapsed / kneeling pose with closed eyes; the Front model's for one facing UP, see above), slightly +// frame (the collapsed / kneeling pose with closed eyes; the Front model's for one facing UP unless its Back skeleton has its own Die clip, see above), slightly // greyed — with a redeploy ring above its head: // a dark disc, a mint arc filling as the respawn timer runs and the seconds left; once the timer is done and it still // waits, a full amber ring with "DP" (not enough DP) or a red ring with "!" (its tile is taken). `onDeploy` (the