Port the special battle types and contest battles
Checks / web (push) Canceled after 0s

Run the forced-shiny, trap, forced-item, Celebi, Suicune, roaming and Bug-Catching Contest battle types. Roaming battles keep their struct's DVs and HP byte, and every other battle makes CleanUpBattleRAM's roaming roll. The contest shows PARKBALL×, counts down Park Balls, ends when they run out, keeps its catch outside the party and asks before switching. Scripts load the special types with loadvar, and while a contest runs, encounters use BugCatchingContestBattleScript and ContestMons.

Validated with 596 unit tests, 155 browser tests (including the contest menu and switch screen), native/reference builds and reference/vendor/release checks. National Park's contest event, the roaming release and the Ilex Forest Celebi event come with their maps.

Closes #28

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Sébastien QUEROLandClaude Opus 5.5 committed 2026-10-03 15:56:30 +02:00
1 parent b547ca29ff
commit 8fae1f0c0f
15 files changed
+787 -42

No files matched your search

+10 -2
View File
@@ -263,8 +263,16 @@ set it. A status heal after a full turn therefore penalises a paralysed
or burned enemy again, as the original does. Kurt's balls keep their
documented bugs (Heavy Ball bank, Fast Ball's three bytes, Moon Ball's
BURN_HEAL compare, Love Ball's same gender). The Heavy Ball is refused for
Kadabra and Sunflora, whose original weight read runs into VRAM. The
Bug-Catching Contest's Park Ball count and contest Pokémon remain gaps.
Kadabra and Sunflora, whose original weight read runs into VRAM.
Special battle types follow `LoadEnemyMon`, `TryToRunAwayFromBattle`,
`BattleMenu`, `CheckContestBattleOver`, `PokeBallEffect`,
`BugContest_SetCaughtContestMon` and `BattleEnd_HandleRoamMons`. The
contest's Park Balls and caught Pokémon (`BugContest`) and a roaming
Pokémon's struct (`RoamMon`) are passed in and updated by the battle. The
world keeps the contest in its script state while one runs, and switches
encounters to `BugCatchingContestBattleScript` and `ContestMons`. It has
no roaming Pokémon yet.
`engine/pokemon/stats_screen.asm`: the stats screen's three pages (HP,
status, types, experience to the next level; item and moves with PP; ID,