Open the Battle Tower and add the badges' type boosts (Closes #32)
The Route 40 gate, the Battle Tower and its rooms are open with the offline challenge: the rules, the save before entering, the level menu with its level and uber checks, seven trainers drawn from BattleTowerTrainers with Pokémon from BattleTowerMons, BattleTowerText, save and quit with the receptionist resuming it, cancelling, losing and the vitamin reward. After each battle the party and Pokédex return to the quick save's, as LoadPokemonData does. Battle Tower battles turn off obedience, badge boosts, experience, items, AI items and prize money, use Falkner's AI attributes, keep Sleep to one to three turns and never fail the AI's status moves at random. New script command battletowertext; new specials BattleTowerAction (offline actions), BattleTowerRoomMenu, CheckForBattleTowerRules, BattleTowerBattle, LoadOpponentTrainerAndPokemonWithOTSprite, Menu_ChallengeExplanationCancel, TryQuickSave and Reset. DoBadgeTypeBoosts was missing from every battle; it now adds an eighth of the damage for the first badge matching the move's type on the player's turn, checked against the original routine. This completes Johto from Azalea to Blackthorn: Kanto, the League and the S.S. Aqua continue on #33; radio, rematches and Buena's password on #30. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
3fbc6798eb
commit
fe2b0262c5
13 files changed
+1267
-14
No files matched your search
+11
-1
@@ -22,6 +22,7 @@ The emulator-backed prototype is now at `/reference.html`. The default applicati
|
||||
| Route 42 to Mahogany, the Lake of Rage, the Rocket Hideout and Pryce | Done |
|
||||
| The Radio Tower takeover, Ice Path, Blackthorn, Clair and Dragon's Den | Done |
|
||||
| Tin Tower, Suicune, Ho-Oh, Whirl Islands and Lugia | Done |
|
||||
| The Battle Tower | Done |
|
||||
| Wild and trainer battles, capture and the catching tutorial | Done for the areas that are open |
|
||||
| 1. Complete the overworld foundation | Done |
|
||||
| 2. Opening story and first battle slice | Mostly done |
|
||||
@@ -446,7 +447,16 @@ The numbered sections below keep their full scope. Each one opens with a checkli
|
||||
- Tin Tower's nine floors and roof and the Whirl Islands' eight maps are open. The Clear Bell lets the player past the entrance's sages and through the Wise Trio's room; in Tin Tower 1F Raikou and Entei flee unless caught, and Suicune battles (`BATTLETYPE_SUICUNE`), followed by Eusine.
|
||||
- New specials (`game/scripts/tin-tower.ts`): `MonCheck` and `BeastsCheck` over `CheckOwnMonAnywhere`: the party and every box, the player's ID and the first five letters of the OT, an empty party finding nothing, the Day-Care left out. After the League with all three beasts, the second Wise Trio appears and gives the Rainbow Wing; its stairs lead up to Ho-Oh on the roof. Lugia waits at the bottom of the Whirl Islands for a player with the Silver Wing. Both battles use `BATTLETYPE_FORCEITEM`.
|
||||
- The playthrough driver plans ledge jumps (for the later stages only, so the earlier seeded stages keep their recorded paths), waterfalls carrying a surfer down, warp panels landing elsewhere on a map, and Surf and Whirlpool between warps in `travel`. Tests: `tests/tin-tower.test.ts` (MonCheck's rules, the Rainbow Wing and the climb to Ho-Oh, the Whirl Islands to Lugia). The playthrough continues for two more stages: Routes 45 and 46 back to Ecruteak, and Tin Tower's Suicune.
|
||||
- Remaining: the Battle Tower, Olivine's port and the S.S. Aqua (board #33), radio and rematches (#30), breeding (#29), mobile and link features, and audio. `CheckOwnMonAnywhere` in the original also reads the current box's own SRAM copy, which can be stale; the port keeps no stale copy.
|
||||
- Remaining: the Battle Tower (increment H below), Olivine's port and the S.S. Aqua (board #33), radio and rematches (#30), breeding (#29), mobile and link features, and audio. `CheckOwnMonAnywhere` in the original also reads the current box's own SRAM copy, which can be stale; the port keeps no stale copy.
|
||||
|
||||
## Implemented: the Battle Tower (board #32, increment H)
|
||||
|
||||
- The Route 40 gate, the Battle Tower outside and its 1F, elevator, hallway and Battle Room are open. Offline challenges work as in the original: the explanation, the Challenge/Explanation/Cancel menu, the party rules (three Pokémon, different species and items, no Egg), the save before entering, the level menu (L:10-L:40, or to L:100 after the Hall of Fame) with its level and uber checks, the walk to the room, seven trainers with healing and "next opponent" questions, save and quit, cancelling, a loss, and the reward of five of a random vitamin (not Lucky Punch).
|
||||
- New in `game/scripts/battle-tower.ts`: `BattleTowerAction`'s offline actions on a saved `battleTower` state (the challenge state, streak count and trainers, the last two trainers' species, the level group, the reward and the file flags); `LoadOpponentTrainerAndPokemon`'s trainer and Pokémon sampling (no repeated trainer, species or item, none of the last two trainers' species) from `BattleTowerTrainers` and `BattleTowerMons`; `BattleTowerText` (a random greeting, kept for the end texts); `_CheckForBattleTowerRules`; `Menu_ChallengeExplanationCancel`; the level menu of `_BattleTowerRoomMenu`; `TryQuickSave`; and `Reset`. New script command: `battletowertext`. The opponent's overworld sprite comes from `BTTrainerClassSprites`.
|
||||
- Battle Tower battles (`battleTower` in the battle engine): the SET style, no obedience check, badge boosts, experience, items or prize, no AI item use, Falkner's AI attributes, Sleep of one to three turns, no random failure of the AI's status moves, and BattleTowerText instead of the prize or a whiteout. After each battle `LoadPokemonData` returns the party and Pokédex to the quick save's, so held items used in battle come back.
|
||||
- `DoBadgeTypeBoosts` was missing from all battles: on the player's turn, the first badge whose type is the move's adds an eighth of the damage. `tests/reference-badges.spec.ts` now compares it with the original routine for every Johto badge byte, Kanto badges, types, damage values, both turns and the Battle Tower.
|
||||
- The native game saves itself, so a reload during a challenge replays the room's script from its start instead of reaching the original's "left without saving" state, and `Reset` (save and quit) returns to where the quick save was made. The original also rolls back money gained by Pay Day there; the port keeps it.
|
||||
- Tests: `tests/battle-tower.test.ts` (the gate, every rule's text, the level and uber checks, the L:40 menu, a full streak and its reward, save and quit and the resume, a saved-and-left state after a reload, cancelling and losing) and `tests/battle-tower-engine.test.ts` (no experience, prize or items; obedience; a loss without a whiteout).
|
||||
|
||||
## Native battles: current state
|
||||
|
||||
|
||||
Reference in new issue
Block a user