Skip to content

Normalize public GBA enemy move choices and native PP ownership - #190

Closed
Roxas2712 wants to merge 16 commits into
UNDERdecoded:mainfrom
Roxas2712:codex/portable-enemy-move-choices
Closed

Roxas2712 wants to merge 16 commits into
UNDERdecoded:mainfrom
Roxas2712:codex/portable-enemy-move-choices

Conversation

@Roxas2712

@Roxas2712 Roxas2712 commented Oct 24, 2026 •

Copy link
Copy Markdown

Returning {move = "SCRATCH"} from battle.enemy_action currently produces no move on GBA, while {id = "SCRATCH"} can reach PP subtraction with no PP value and crash. Bare names/numbers also get rejected by the unified callback boundary. Normalize these choices against the active dataset and bind execution PP to the selected native move slot.

The change preserves learned move IDs, duplicate-slot selection, Pressure costs, Mimic slot ownership, native charge continuation identity, legacy delegated id edits, unchanged delegated handles, and native special actions. Nil/false/unknown choices use the captured native fallback. Other generations and record boundaries retain their current validation.

Stacked on #102 (API-3 entry). The isolated feature is commit 64068911: 12 files, including focused fixtures, the same public consumer on both engines, a pinned read-only contract checker, documentation and CI.

Validation:

  • 1,252/1,252 focused checks, FireRed/Emerald, API-1 native, API-2 native/unified and API-3 unified; actual SDK loading and action execution.
  • 8 isolated engine runs / 100 paired observations against clean unchanged Gen1Recomp 535a5ec088c1ae1bf4d91dd3e35a56f64cf46d91, API 2/unified and API 3. Move choices, owned PP, learned moves, damage occurrence and charge outcomes match.
  • Full local quick run: 77/87 engine suites versus 76/86 on the clean Add shared API 3 entry and authenticated compatibility acceptance #102 prerequisite. The exact Counter of all 27 pre-existing FAIL lines across ten suites is unchanged; no new failures. SDK 3/3 and B30 pass.
  • git diff --check and actionlint pass.

Scope: GBA move-result normalization. The second hook argument, native action fields, public item/switch/watch records, explicit double-target conversion, damage arithmetic and RNG-trace parity are separate contracts. No Gen1 patch or publication is required. Hosted CI results will be reported separately from local validation.

Combined-fork validation: cherry-picked into Roxas2712:codex/portability-testing, production runtime fbd10fa. All 208/208 engine suites, 3/3 SDK suites and B30 pass; the same 8-worker / 100-observation cross-engine contract passes on this runtime too. The combined callback boundary retains the existing three-argument restore contract.

Hosted CI: all three workflows report action_required pending maintainer approval. The dedicated contract workflow has zero executed jobs; these are not hosted green results.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant