Skip to content

Verify native Beat Up held-item adjustment across engines - #209

Closed
Roxas2712 wants to merge 32 commits into
UNDERdecoded:mainfrom
Roxas2712:codex/gen3-beat-up-adjustment
Closed

Roxas2712 wants to merge 32 commits into
UNDERdecoded:mainfrom
Roxas2712:codex/gen3-beat-up-adjustment

Conversation

@Roxas2712

@Roxas2712 Roxas2712 commented Oct 24, 2026 •

Copy link
Copy Markdown

Beat Up's dedicated executor (#206) and native held-item adjustment (#182) need to reach the same build. Without #182, nonlethal, Substitute and Endure strikes can omit Focus Band draws, shifting later RNG and changing native execution.

Add cross-engine contract coverage through the same actual API-3 consumer, planner and native executor. FireRed and Emerald evaluate Focus Band independently for each reached strike; a previous successful roll must not save a later hit. This PR adds no new runtime behavior beyond its already published prerequisites.

Stacked on #206 plus #182. Clean composed prerequisite: 45220e4; review the test-only commit 03d68a4 against its parent. The #182 prerequisite cherry-pick preserves #206's Substitute clipping, per-strike counter memory and Spit Up Protect callback.

Validation:

  • 1,672/1,672 focused checks: 17 cases at all four user positions on FireRed/Emerald, physical Focus Band 196 and imported-shaped item 1196, success/failure, strict chance boundary, zero-percent rolls, nonlethal/lethal hits, Substitute, Endure, later procs, callback removal/equipping and a second move. Verify owned PP, public hit metadata/amounts, counter memory, and exact number/order/value of Focus Band draws.
  • Same real API-3 consumer/fixture against unchanged read-only Gen1Recomp 535a5ec088c1ae1bf4d91dd3e35a56f64cf46d91: 44 isolated workers / 4,622 paired observations pass. Clean combined runtime 4d16999 also passes this comparison.
  • Negative control: Calculate native GBA Beat Up damage per party member #206 without Align native GBA AI held-item knowledge and observation producers #182 fails 56 assertions in the new FireRed cases. The clean composed prerequisite already has the correct behavior.
  • Full local feature run: 90/99 engine suites versus 89/98 on the clean composed prerequisite. Exact Counters of all 25 inherited FAIL lines across nine suites match, with no additions. SDK 3/3 and B30 pass.
  • Pinned JIT-enabled LuaJIT v2.1 a4c064539ea931274d407e1249b4bb575424a0f4; scoped StyLua, actionlint and git diff --check pass.
  • Test-only coverage does not change built-in record revisions or fingerprint goldens.

The reference has a distinct move-local persistence policy for Ruby/Sapphire. FireRed/Emerald do not select it, so these tests do not invent that behavior. Native physical item IDs have built-in metadata; parameter mutation therefore uses an imported-shaped custom item rather than pretending to override that table.

Focus Band draws are checked at the actual 0..99 boundary; critical/variation observations retain the existing semantic normalization. Full raw RNG traces, other scripted executors, multi-trainer/link and Ruby/Sapphire controllers, animation and complete gameplay remain separate acceptance surfaces. Gen1 stays read-only, with no source changes or publication.

Combined full-suite acceptance and hosted CI are reported below.

Hosted CI: all six workflows for 03d68a4 report action_required pending maintainer approval. The dedicated contract run has zero executed jobs. Local acceptance is separate.

Combined-fork acceptance: integrated into Roxas2712:codex/portability-testing. Clean runtime 4d16999 passes 216/216 engine suites, 3/3 SDK suites and B30 with zero FAIL lines. The same runtime passes all 44 workers / 4,622 paired observations. The feature's only added runtime commit is its explicitly identified #182 prerequisite; the contract commit changes tests/workflow/docs only. Subsequent combined commits record validation.

# Conflicts:
#	src/mods/Loader.lua
# Conflicts:
#	docs/modding.md
#	src/mods/Loader.lua
#	src/world/WorldAPI.lua
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