Numbers. The paper runner (tools/mvp_validation_sim.py) and the Godot
runtime adapter were two independent rewrites of the same rules and had
drifted: seed derivation, damage order, the weakness rule and the shield
rebuild semantics all differed, so the runtime never actually reproduced
the paper numbers and P2-BAT-01 could never pass.
- add data/mvp_battle_rules.json as the single source of balance data and
of the per-run seed derivation, read by both engines
- derive the efficiency factor from SHA-256 (48-bit prefix) so Python and
GDScript land on the same float64
- port the paper semantics into battle_sim.gd and expose the simulation as
a stepwise state machine so a live scene can drive it at 1x/2x/3x
- add tools/mvp_parity_gate.py: diffs 300 results field by field, event
log by event log, and exits non-zero on any difference
- freeze data/mvp_validation_seed_reference.json so unapproved numeric
drift fails the gate
- note that GDScript's roundf() is half-away-from-zero while Python's
round() is banker's rounding; the runtime uses String.num instead
UI. The sample had no real UI carrier, no localization and no touch path,
so the NinePatch, dynamic text, safe area and input cases had nothing to
be proven against.
- add the battle HUD, laid out from the contract table rather than container
stretch ratios, reproducing the 390x844 rectangles exactly and adapting
360x800 / 430x932 with the stage kept as priority space
- add runtime text tables for zh_CN and en_US and a key validator that
proves both locales carry the same keys and every content id has a string
- add NinePatch frames with a 6px border band and 6px cut corners
- add the live battle scene, the capture runner and the 1x/2x/3x
equivalence test
tools/run_p2_checks.sh runs the nine gates in one command; all pass.