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.
136 lines
2.7 KiB
JSON
136 lines
2.7 KiB
JSON
{
|
|
"schema": 1,
|
|
"purpose": "P1 fixed-seed validation input and result contract for the P3a battle demo",
|
|
"tick_seconds": 0.1,
|
|
"seed_range": {
|
|
"start": 10001,
|
|
"count": 100,
|
|
"step": 1
|
|
},
|
|
"modes": [
|
|
"auto",
|
|
"semi",
|
|
"manual"
|
|
],
|
|
"scenarios": [
|
|
{
|
|
"id": "P3A-N01-AUTO",
|
|
"node_id": "R1-C01-N01",
|
|
"mode": "auto",
|
|
"enemy_ids": [
|
|
"E-R1-F1-V1",
|
|
"E-R1-F1-V1"
|
|
],
|
|
"visible_hero_ids": [
|
|
"H01",
|
|
"H02",
|
|
"H04"
|
|
],
|
|
"input_events": [],
|
|
"target_duration_seconds": [
|
|
8,
|
|
15
|
|
],
|
|
"target_win_rate": [
|
|
0.95,
|
|
1.0
|
|
]
|
|
},
|
|
{
|
|
"id": "P3A-N03-SEMI",
|
|
"node_id": "R1-C01-N03",
|
|
"mode": "semi",
|
|
"enemy_ids": [
|
|
"E-R1-F3-V1",
|
|
"E-R1-F4-V1"
|
|
],
|
|
"visible_hero_ids": [
|
|
"H01",
|
|
"H02",
|
|
"H04"
|
|
],
|
|
"input_events": [
|
|
{
|
|
"time": 2.0,
|
|
"type": "click_enemy",
|
|
"target_id": "E-R1-F3-V1"
|
|
},
|
|
{
|
|
"time": 5.0,
|
|
"type": "offboard_burst"
|
|
}
|
|
],
|
|
"target_duration_seconds": [
|
|
12,
|
|
25
|
|
],
|
|
"target_win_rate": [
|
|
0.7,
|
|
0.9
|
|
],
|
|
"timeout_seconds": 25
|
|
},
|
|
{
|
|
"id": "P3A-N10-MANUAL",
|
|
"node_id": "R1-C01-N10",
|
|
"mode": "manual",
|
|
"enemy_ids": [
|
|
"B-R1-01"
|
|
],
|
|
"visible_hero_ids": [
|
|
"H01",
|
|
"H02",
|
|
"H04"
|
|
],
|
|
"input_events": [
|
|
{
|
|
"time": 3.0,
|
|
"type": "click_enemy",
|
|
"target_id": "B-R1-01"
|
|
},
|
|
{
|
|
"time": 8.0,
|
|
"type": "offboard_burst"
|
|
},
|
|
{
|
|
"time": 15.0,
|
|
"type": "cast_ultimate",
|
|
"hero_id": "H01"
|
|
}
|
|
],
|
|
"target_duration_seconds": [
|
|
20,
|
|
30
|
|
],
|
|
"target_win_rate": [
|
|
0.85,
|
|
0.95
|
|
],
|
|
"timeout_seconds": 30
|
|
}
|
|
],
|
|
"result_schema": {
|
|
"required": [
|
|
"seed",
|
|
"scenario_id",
|
|
"mode",
|
|
"result",
|
|
"duration_seconds",
|
|
"roster_dps",
|
|
"visible_signature_damage",
|
|
"click_damage",
|
|
"burst_damage",
|
|
"ultimate_casts",
|
|
"shield_broken",
|
|
"weakness_hits",
|
|
"reward_id",
|
|
"event_log"
|
|
],
|
|
"determinism_rule": "same scenario_id + seed + input_events must produce byte-equivalent result JSON"
|
|
},
|
|
"interpretation": {
|
|
"is_balance_rewrite": false,
|
|
"note": "CH-derived costs, gold, DPS, Boss timer, offline and rebuild curves remain the baseline. This pack only verifies that the Windroost event order and manual inputs execute deterministically."
|
|
}
|
|
}
|