4.4 KiB
P9.2 Authoritative Battle Implementation Plan
Status:
ACTIVEActive step:P9.2-STEP-3 CONTROLS_AND_RESULTBaseline:b43e73e439f786e59aefdd97f3ec6c9d76908b93Goal:docs/goals/PHASE9_2_AUTHORITATIVE_BATTLE_GOAL.mdContract:docs/runtime/PHASE9_2_AUTHORITATIVE_BATTLE_CONTRACT.mdProcess:docs/runtime/PLAN_DRIVEN_DEVELOPMENT_PROTOCOL.mdLedger:docs/reviews/PHASE9_GODOT_VERTICAL_SLICE_LEDGER.md
Player-Visible Stopping Point
P9.2 ends when the P9.1 final result can continue into one real horizontal automatic battle. The player sees both lines move, melee collide, rear roles act, HP change and one deterministic outcome. Pause, speed, inspect and legal retreat work through real touch. The result explains cause, survivors and next action.
Ordered Steps
| Step | Status | Player outcome | Verification | Commit boundary |
|---|---|---|---|---|
| P9.2-STEP-0 Contract and baseline | COMPLETE |
The next playable boundary and frozen scope are unambiguous. | Goal/contract/plan/checkpoint links; exact baseline; one active step. | Planning commit. |
| P9.2-STEP-1 Authoritative domain | COMPLETE |
One fixed encounter resolves movement, contact, profession actions, HP, victory/defeat/timeout and retreat identically from the same inputs. | ABG_P9_2_AUTHORITATIVE_BATTLE_DOMAIN_OK cases=93 actions=37; strict diagnostics zero; P9.1 foundation/full-session regressions pass. |
Pushed in cbf35d0. |
| P9.2-STEP-2 Horizontal battle runtime | COMPLETE |
The player enters from the P9.1 result and watches real state drive the battlefield and HUD. | ABG_P9_2_HORIZONTAL_BATTLE_RUNTIME_OK viewport=844x390 source=p9_1_result members=3 hp_import=true movement=true contact=true member_events=true enemy_events=true outcome=victory domain_bound=true; five native normal-render frames; strict diagnostics zero. |
Pushed in 2e2ed93; evidence in STEP_2_RUNTIME_EVIDENCE.md. |
| P9.2-STEP-3 Controls and result | IN_PROGRESS |
Pause, 1x/2x, inspect and retreat are understandable; result gives cause/survivors/next. | Parsed touch; pre-tick retreat disabled; duplicate receipt; outcome pages zh/en 130%. | UI/result files and focused tests, pushed. |
| P9.2-STEP-4 Integrated gate and H5 | PENDING |
Owner can play the complete new encounter through a stable private H5. | Five profiles, three layouts, accessibility, strict logs, normal recording, runtime-only export and remote checks. | Evidence/delivery closure, pushed. |
| P9.2-STEP-5 Owner review | PENDING |
Owner judges movement, causality, controls and retreat decision without coaching. | Owner observations and at most one bounded repair batch. | Final closure, pushed. |
Current Step Contract
P9.2-STEP-3 CONTROLS_AND_RESULT
Owned files:
runtime/main.gd
runtime/presentation/p9_2_battle_presenter.gd
runtime/tests/p9_2/controls_and_result_runtime_test.gd
Required acceptance:
- Pause, 1x and 2x are visible stable controls; Pause freezes accepted ticks and speed changes wall-time requests only.
- Inspect opens the recent authoritative event list without mutating state.
- Retreat is visibly disabled before tick 50, then accepts one real ScreenTouch command and preserves the original receipt on duplicate input.
- Victory, defeat, timeout and retreat render the fixed five-line result grammar with stable member IDs, survivors/HP and zero false persistent casualty.
- Controls and result fit
844x390,1280x720and390x844, zh_CN/English and 130% text with 44px minimum touch targets. - Focused verification uses
Input.parse_input_eventScreenTouch with zero fallback/direct command calls for the claimed player path.
Issue Register
| ID | Status | Boundary | Disposition |
|---|---|---|---|
| P92-I01 | OPEN |
P9.1 battles are deterministic presentation fixtures rather than a reusable authoritative combat loop. | Step 1 builds an isolated P9.2 domain without rewriting P9.1. |
| P92-I02 | OPEN |
Existing product authorities contain later full-game casualty/save rules beyond this milestone. | P9.2 freezes permanent settlement and records only run-local survivors. |
| P92-I03 | OPEN |
P9.1 H5 cold start is multi-minute. | Do not optimize until Step 4; gameplay source remains the current priority. |
Stopping Rule
Finish one step, run its checks, commit and push before changing the next step to
IN_PROGRESS. A failure keeps the same step active. P9.3 casualty/recovery/save
does not begin inside this plan.