Port the start menu, the party menu and the pack outside battle
Checks / web (push) Canceled after 0s
Checks / web (push) Canceled after 0s
Start opens the original start menu. POKéMON shows the party with the Pokémon submenu (stats, switching, move order, held items); PACK shows the four pockets with the field item effects for healing, PP and the Bicycle, plus giving and tossing. The menu runs on a script draft, and its cursors persist until a battle clears them. Select keeps the Key Items shortcut. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
60e06ae678
commit
1af2beacdc
18 files changed
+1918
-49
No files matched your search
@@ -170,6 +170,20 @@ export class PokemonData {
|
||||
);
|
||||
return Boolean(permissions & 0x80);
|
||||
}
|
||||
/** ItemAttributes permissions, bit 6 (CANT_SELECT_F): CheckSelectableItem. */
|
||||
itemUnselectable(item: number): boolean {
|
||||
this.checkItem(item);
|
||||
const permissions = this.reader.byte(
|
||||
SYMBOLS.itemAttributes + (item - 1) * 7 + 4,
|
||||
);
|
||||
return Boolean(permissions & 0x40);
|
||||
}
|
||||
/** CheckItemMenu: the field menu (ITEMMENU_*), the help byte's high
|
||||
* nibble. CheckItemContext reads the low one in battle. */
|
||||
itemFieldMenu(item: number): number {
|
||||
this.checkItem(item);
|
||||
return this.reader.byte(SYMBOLS.itemAttributes + (item - 1) * 7 + 6) >> 4;
|
||||
}
|
||||
pocketName(pocket: Pocket): string {
|
||||
const r = this.reader,
|
||||
bank = r.bank(SYMBOLS.itemPocketNames);
|
||||
|
||||
@@ -173,6 +173,7 @@ export const EVENTS = {
|
||||
|
||||
/** Engine flag indices named directly by translated routines. */
|
||||
export const ENGINE_FLAGS = {
|
||||
pokegear: 4,
|
||||
pokedex: 11,
|
||||
allFruitTrees: 84,
|
||||
} as const;
|
||||
@@ -404,6 +405,42 @@ export const PC = {
|
||||
Script_ReceivePhoneCall: 0x90241,
|
||||
} as const;
|
||||
|
||||
/** The start menu, the party menu and its Pokémon submenu, and the pack
|
||||
* outside battle: menu data, strings and texts, keyed by their PRET labels
|
||||
* so that \`npm run check:reference\` can verify each address by name. */
|
||||
export const MENU = {
|
||||
"StartMenu.Items": 0x126eb,
|
||||
PartyMenuStrings: 0x504d2,
|
||||
MonMenuOptionStrings: 0x24caf,
|
||||
MonMenuOptions: 0x24cd9,
|
||||
"GiveTakeItemMenuData.Items": 0x12ca3,
|
||||
String_MoveWhere: 0x1316b,
|
||||
MailItems: 0xb9e80,
|
||||
PokemonSwapItemText: 0x12caf,
|
||||
PokemonHoldItemText: 0x12cb4,
|
||||
PokemonRemoveMailText: 0x12cb9,
|
||||
PokemonNotHoldingText: 0x12cbe,
|
||||
ItemStorageFullText: 0x12cc3,
|
||||
PokemonTookItemText: 0x12cc8,
|
||||
PokemonAskSwapItemText: 0x12ccd,
|
||||
ItemCantHeldText: 0x12cd2,
|
||||
"GiveItem.AnEggCantHoldAnItemText": 0x1048d,
|
||||
"MenuHeader_UsableKeyItem.MenuData": 0x10251,
|
||||
"MenuHeader_UsableItem.MenuData": 0x1027c,
|
||||
"MenuHeader_UnusableItem.MenuData": 0x102a1,
|
||||
"MenuHeader_UnusableKeyItem.MenuData": 0x102b8,
|
||||
"MenuHeader_HoldableKeyItem.MenuData": 0x102d5,
|
||||
"MenuHeader_HoldableItem.MenuData": 0x102fa,
|
||||
AskThrowAwayText: 0x10ae4,
|
||||
AskQuantityThrowAwayText: 0x10ae9,
|
||||
ThrewAwayText: 0x10aee,
|
||||
YouDontHaveAMonText: 0x10af8,
|
||||
RaiseThePPOfWhichMoveText: 0xf725,
|
||||
PPIsMaxedOutText: 0xf72f,
|
||||
PPsIncreasedText: 0xf734,
|
||||
BicycleEffect: 0xee08,
|
||||
} as const;
|
||||
|
||||
/** Battle engine tables and texts, keyed by their PRET labels so that
|
||||
* \`npm run check:reference\` can verify each address by name. */
|
||||
export const BATTLE = {
|
||||
|
||||
Reference in new issue
Block a user