Skip to content

Implement native GBA Rage state and move-end boosts - #225

Closed
Roxas2712 wants to merge 66 commits into
UNDERdecoded:mainfrom
Roxas2712:codex/gen3-rage
Closed

Roxas2712 wants to merge 66 commits into
UNDERdecoded:mainfrom
Roxas2712:codex/gen3-rage

Conversation

@Roxas2712

@Roxas2712 Roxas2712 commented Oct 25, 2026 •

Copy link
Copy Markdown

GBA Rage currently inherits the legacy rageMove controller, locking future choices and potentially exempting continued uses from PP. Its incoming-hit boost also runs inside generic HP damage, rather than at the native completed move boundary.

Implement a native rage flag: activate after accuracy, preserve native miss/immunity/cancellation/called semantics, spend PP on each separately selected use and leave the menu actionable. Raise Attack once for a completed qualifying opponent attack, before move-end item reads; honor Substitute, Endure, stage caps, ally/self/residual exclusions and a later immunity during multi-hit execution.

Clear Rage from actual effective choices before actions/turn-start observers, including Encore. Resolve double choices once and preserve native cached selections. Prepare one committed non-move reply for items, capture, switching and failed/successful escape cleanup. Add native AI STATUS2 visibility, stale-offer tracking and active link hashing; keep older-generation and explicit legacy controllers unchanged.

Stacks on #222 and reuses the existing #188 native AI/order prerequisite. A clean #222+#188 baseline is tested separately; #188 was already in the combined fork and is not reapplied there. Gen1 stays unchanged and read-only; no Gen1 development or publication.

Advertise GBA command revision 7, party codec 1. Independently audit raw fixture a7db0874db78aec0 → dcc938191b0bb075 using the unchanged #222 hasher with only the revision token changed. Older-generation goldens are unchanged.

Validation at clean feature runtime 03c4a841ee327d232ca504a1ae5df1c5159064b6 (later commit documents acceptance):

  • 796 focused checks pass: 584 native command/planning/lifecycle, 122 host public-command/composition/reply/legacy, 90 actual link/compatibility. Native protocol and the reused AI/order suite also pass.
  • 104 workers / 75,210 paired observations agree with clean Gen1 535a5ec088c1ae1bf4d91dd3e35a56f64cf46d91. The new mode adds 357 complete rows per FireRed/Emerald profile: all four actor slots, activation/failure/cancellation/called/custom moves, repeated PP, opponent/ally/self damage, multi-hit/Substitute/Endure/stage caps, later immunity, residuals and actual planners/Encore choices. Raw RNG bounds/values, accuracy-hook state, public move/damage events and all battler state observations remain retained.
  • Move planning includes actual turn-word preparation with fixed choices. Non-move planning starts at the same explicitly prepared input boundary. Original unmatched planner reports are retained; this is not complete earlier/global selection/RNG/controller parity.
  • Full feature: 123/132 engine suites, SDK 3/3, B30. The exact Counter of all 25 inherited FAIL lines across nine suites equals clean prerequisite fa5cb30ec4050980dc940e2181d6943a9de669b4 (120/129). The full command retains its nonzero exit.
  • Combined runtime e1a9295e57c1545ec69deec2c4541a4da193b7b6: 243/243 engine suites, SDK 3/3, B30, the same complete comparison and four imported smoke scenarios pass.
  • Unchanged prerequisite fails all four checks of the same public selector/delegated native continuation: missing native flag, legacy lock, only one PP spent across two uses, and locked menu. Raw negative/exploratory reports are retained.
  • Two actual link roles complete four turns: Rage twice, a multi-hit versus retained Rage, then Tackle on both roles. All completed paired hashes/components, learned PP and stages agree; a whole incoming multi-hit builds Rage once and cleared owners get no stale boost. Revision 6 is refused before party exchange.
  • Four CPU-only scenarios with actual local FireRed/Emerald imports pass real public FIGHT/move submission, repeated Rage (20→18 PP), alternative Tackle and the committed item-reply pipeline. Imported metadata is preserved with controlled valid accuracy rolls. No ROM/cache/save data is distributed or normal SAVE issued. The item scenario starts at the spent-item callback, not a full bag/healing playthrough.
  • Scoped StyLua, actionlint and whitespace pass.

Host content overrides/delegation are tested separately. An extra synthetic Gen1 GBA catalog probe could not retrieve RAGE_EFFECT; its raw failure remains retained. This does not claim cross-engine effect-catalog/delegation equality. The native accuracy-stage adapter is private, not a new portable public effect stage.

See docs/native-gen3-rage.md for commands and boundaries. Broader canceller/full/custom/delayed scripts, Ruby/Sapphire scheduling, complete catalogs and item/capture/escape controllers, whole-game RNG/VBlank, rendering and full playthroughs remain separate work. The feature is pushed to Roxas2712/Gen2Recomped:codex/gen3-rage; combined publication and hosted CI are recorded separately from local acceptance.

Published combined snapshot: Roxas2712/Gen2Recomped:codex/portability-testing at 1d3d2c5311c31febe96c8679fb0b7cab238d9abb. Changes after the tested combined runtime only add validation/publication documentation. Fork main remains 13af468b97dc37015d14ad5c71d7f067c3ee810d.

All nine hosted workflows currently require maintainer approval (action_required). The dedicated contract run has zero jobs, verified separately; local acceptance does not claim hosted execution. The app's 100-artifact identity cap rejected attachment, but the regular PR remains published and linked.

# 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