diff options
author | dannye <33dannye@gmail.com> | 2020-11-14 19:23:15 -0600 |
---|---|---|
committer | dannye <33dannye@gmail.com> | 2020-11-14 19:58:10 -0600 |
commit | 6c44ebb86d6d45150e69fbab82d4e1a251c7366b (patch) | |
tree | 09b24b440e425d41ff53e711c19936d39c39a2b3 | |
parent | 90336d902707b28094ac832fbf7ee309e59457c8 (diff) |
Trim some address comments
31 files changed, 3 insertions, 858 deletions
diff --git a/src/engine/bank01.asm b/src/engine/bank01.asm index d074c45..1b7a90f 100644 --- a/src/engine/bank01.asm +++ b/src/engine/bank01.asm @@ -51,11 +51,9 @@ SetupResetBackUpRamScreen: ; 405a (1:405a) lb de, $38, $7f call SetupText ret -; 0x406e CommentedOut_406e: ; 406e (1:406e) ret -; 0x406f ; try to resume a saved duel from the main menu TryContinueDuel: ; 406f (1:406f) @@ -78,14 +76,12 @@ _ContinueDuel: ; 407a (1:407a) ld [wDuelFinished], a call DuelMainInterface jp MainDuelLoop.between_turns -; 0x4097 HandleFailedToContinueDuel: ; 4097 (1:4097) call DrawWideTextBox_WaitForInput call ResetSerial scf ret -; 0x409f ; this function begins the duel after the opponent's graphics, name and deck have been introduced ; loads both player's decks and sets up the variables and resources required to begin a duel. @@ -274,7 +270,6 @@ MainDuelLoop: ; 40ee (1:40ee) call Func_4b60 jp nc, MainDuelLoop ret -; 0x420b ; empty the screen, and setup text and graphics for a duel SetupDuel: ; 420b (1:420b) @@ -288,7 +283,6 @@ SetupDuel: ; 420b (1:420b) call SetupText call EnableLCD ret -; 0x4225 ; handle the turn of the duelist identified by hWhoseTurn. ; if player's turn, display the animation of the player drawing the card at @@ -420,7 +414,6 @@ Func_42fd: ; 42fd (1:42fd) ld a, OPPACTION_DRAW_CARD call SetOppAction_SerialSendDuelData jp PrintDuelMenuAndHandleInput.menu_items_printed -; 0x430b ; triggered by pressing B + UP in the duel menu DuelMenuShortcut_OpponentPlayArea: ; 430b (1:430b) @@ -472,7 +465,6 @@ OpenNonTurnHolderHandScreen_Simple: ; 4345 (1:4345) call SwapTurn call OpenTurnHolderHandScreen_Simple jp SwapTurn -; 0x434e ; draw the turn holder's hand screen. simpler version of OpenPlayerHandScreen ; used only for checking the cards rather than for playing them. @@ -487,7 +479,6 @@ OpenTurnHolderHandScreen_Simple: ; 434e (1:434e) .no_cards_in_hand ldtx hl, NoCardsInHandText jp DrawWideTextBox_WaitForInput -; 0x4364 ; triggered by pressing B + START in the duel menu DuelMenuShortcut_OpponentActivePokemon: ; 4364 (1:4364) @@ -495,13 +486,11 @@ DuelMenuShortcut_OpponentActivePokemon: ; 4364 (1:4364) call OpenActivePokemonScreen call SwapTurn jp DuelMainInterface -; 0x4370 ; triggered by pressing START in the duel menu DuelMenuShortcut_PlayerActivePokemon: ; 4370 (1:4370) call OpenActivePokemonScreen jp DuelMainInterface -; 0x4376 ; draw the turn holder's active Pokemon screen if it exists OpenActivePokemonScreen: ; 4376 (1:4376) @@ -517,7 +506,6 @@ OpenActivePokemonScreen: ; 4376 (1:4376) ld [hl], a ; wCurPlayAreaY call OpenCardPage_FromCheckPlayArea ret -; 0x438e ; triggered by selecting the "Pkmn Power" item in the duel menu DuelMenu_PkmnPower: ; 438e (1:438e) @@ -701,7 +689,6 @@ ReloadCardListScreen: ; 44d2 (1:44d2) ; skip doing the things that have already been done when initially opened call DrawCardListScreenLayout jp OpenPlayerHandScreen.handle_input -; 0x44db ; place a basic Pokemon card on the arena or bench, or place an stage 1 or 2 ; Pokemon card over a Pokemon card already in play to evolve it. @@ -806,7 +793,6 @@ PlayPokemonCard: ; 44db (1:44db) call DrawWideTextBox_WaitForInput scf ret -; 0x4585 ; triggered by selecting the "Check" item in the duel menu DuelMenu_Check: ; 4585 (1:4585) @@ -819,7 +805,6 @@ DuelMenuShortcut_BothActivePokemon: ; 458e (1:458e) call Func_3b31 call Func_4597 jp DuelMainInterface -; 0x4597 Func_4597: ; 4597 (1:4597) call OpenInPlayAreaScreen_FromSelectButton @@ -830,7 +815,6 @@ Func_4597: ; 4597 (1:4597) call Func_45a9 call SwapTurn ret -; 0x45a9 Func_45a9: ; 45a9 (1:45a9) call HasAlivePokemonInPlayArea @@ -842,7 +826,6 @@ Func_45a9: ; 45a9 (1:45a9) ret z scf ret -; 0x45bb ; check if the turn holder's arena Pokemon is unable to retreat due to ; some status condition or due the bench containing no alive Pokemon. @@ -877,7 +860,6 @@ CheckAbleToRetreat: ; 45bb (1:45bb) .done scf ret -; 0x45f4 ; check if the turn holder's arena Pokemon has enough energies attached to it ; in order to retreat. Return carry if it doesn't. @@ -898,7 +880,6 @@ CheckIfEnoughEnergiesToRetreat: ; 45f4 (1:45f4) ld [wEnergyCardsRequiredToRetreat], a or a ret -; 0x4611 ; display the screen that prompts the player to select energy cards to discard ; in order to retreat a Pokemon card. also handle input in order to display @@ -960,7 +941,6 @@ DisplayRetreatScreen: ; 4611 (1:4611) ld [$ff00+c], a or a ret -; 0x4673 ; display the screen that prompts the player to select energy cards to discard ; in order to retreat a Pokemon card or use an attack like Ember. includes the @@ -999,7 +979,6 @@ DisplayEnergyDiscardMenu: ; 4693 (1:4693) ld a, 4 ld [wCardListIndicatorYPosition], a ret -; 0x46b7 ; if [wcbfa] non-0: ; prints "[wcbfb]/[wcbfa]" at 16,16, where [wcbfb] is the total amount @@ -1039,7 +1018,6 @@ HandleEnergyDiscardMenuInput: ; 46b7 (1:46b7) .return_carry scf ret -; 0x46f3 EnergyDiscardCardListParameters: db 1, 5 ; cursor x, cursor y @@ -1348,7 +1326,6 @@ CheckIfEnoughEnergiesToMove: ; 488f (1:488f) pop bc pop hl ret -; 0x48ac ; check if a pokemon card has enough energy attached to it in order to use a move ; input: @@ -1413,7 +1390,6 @@ _CheckIfEnoughEnergiesToMove: ; 48ac (1:48ac) .not_usable_or_not_enough_energies scf jr .done -; 0x4900 ; given the amount of energies of a specific type required for an attack in the ; lower nybble of register a, test if the pokemon card has enough energies of that type @@ -1440,7 +1416,6 @@ CheckIfEnoughEnergiesOfType: ; 4900 (1:4900) inc hl or a ret -; 0x4918 ; return carry and the corresponding text in hl if the turn holder's ; arena Pokemon card is paralyzed or asleep. @@ -1529,7 +1504,6 @@ DisplayDrawOneCardScreen: ; 4933 (1:4933) pop de pop hl ret -; 0x49a8 Func_49a8: ; 49a8 (1:49a8) call Func_3b21 @@ -1550,7 +1524,6 @@ Func_49a8: ; 49a8 (1:49a8) .asm_49c6 call Func_3b31 ret -; 0x49ca ; prints, for each duelist, the number of cards in the hand along with the ; hand icon, and the number of cards in the deck, along with the deck icon, @@ -1570,7 +1543,6 @@ PrintDeckAndHandIconsAndNumberOfCards: ; 49ca (1:49ca) call PrintPlayerNumberOfHandAndDeckCards call PrintOpponentNumberOfHandAndDeckCards ret -; 0x49ed ; prints, for each duelist, the number of cards in the hand, and the number ; of cards in the deck, according to their placement in the draw card(s) screen. @@ -1617,7 +1589,6 @@ PrintOpponentNumberOfHandAndDeckCards: ld a, e lb bc, 11, 3 jp WriteTwoDigitNumberInTxSymbolFormat -; 0x4a35 DeckAndHandIconsTileData: ; x, y, tiles[], 0 @@ -1682,7 +1653,6 @@ DrawDuelistPortraitsAndNames: ; 4a97 (1:4a97) ; middle line call DrawDuelHorizontalSeparator ret -; 0x4ad6 ; print the number of prizes left, of active Pokemon, and of cards left in the deck ; of both duelists. this is called when the duel ends. @@ -1694,7 +1664,6 @@ PrintDuelResultStats: ; 4ad6 (1:4ad6) call PrintDuelistResultStats call SwapTurn ret -; 0x4ae9 ; print, at d,e, the number of prizes left, of active Pokemon, and of cards left in ; the deck of the turn duelist. b,c are used throughout as input coords for @@ -1736,7 +1705,6 @@ PrintDuelistResultStats: ; 4ae9 (1:4ae9) ldtx hl, CardsText call InitTextPrinting_ProcessTextFromID ret -; 0x4b2c ; display the animation of the player drawing the card at hTempCardIndex_ff98 DisplayPlayerDrawCardScreen: ; 4b2c (1:4b2c) @@ -1751,7 +1719,6 @@ DisplayCardDetailScreen: ; 4b31 (1:4b31) call LoadCardDataToBuffer1_FromDeckIndex call _DisplayCardDetailScreen ret -; 0x4b38 Func_4b38: ; 4b38 (1:4b38) ld a, [wDuelTempList] @@ -1769,7 +1736,6 @@ Func_4b38: ; 4b38 (1:4b38) ldtx hl, YouReceivedTheseCardsText call DrawWideTextBox_WaitForInput ret -; 0x4b60 Func_4b60: ; 4b60 (1:4b60) call InitializeDuelVariables @@ -1950,7 +1916,6 @@ Func_4b60: ; 4b60 (1:4b60) db $06, $07, $0d, $04 db $05, $08, $0e, $03 db $06, $08, $0d, $03 -; 0x4cd5 ; have the turn duelist place, at the beginning of the duel, the active Pokemon ; and 0 more bench Pokemon, all of which must be basic Pokemon cards. @@ -2061,7 +2026,6 @@ ChooseInitialArenaAndBenchPokemon: ; 4cd5 (1:4cd5) jr c, .bench_loop or a ret -; 0x4d97 ; the turn duelist shuffles the deck unless it's a practice duel, then draws 7 cards ; returns $00 in a and carry if no basic Pokemon cards are drawn, and $01 in a otherwise @@ -2135,7 +2099,6 @@ IsLoadedCard1BasicPokemon: ; 4dd1 (1:4dd1) ld a, $01 or a ret ; nz -; 0x4df3 DisplayNoBasicPokemonInHandScreenAndText: ; 4df3 (1:4df3) ldtx hl, ThereAreNoBasicPokemonInHand @@ -2149,7 +2112,6 @@ PrintReturnCardsToDeckDrawAgain: ; 4dfc (1:4dfc) call DrawWideTextBox_WaitForInput call ExchangeRNG ret -; 0x4e06 ; display a bare list of seven hand cards of the turn duelist, and the duelist's name above ; used to let the player know that there are no basic Pokemon in the hand and need to redraw @@ -2171,7 +2133,6 @@ DisplayNoBasicPokemonInHandScreen: ; 4e06 (1:4e06) call EnableLCD call WaitForWideTextBoxInput ret -; 0x4e37 NoBasicPokemonCardListParameters: db 1, 3 ; cursor x, cursor y @@ -2201,7 +2162,6 @@ DisplayPracticeDuelPlayerHandScreen: ; 4e40 (1:4e40) call PrintTextNoDelay call EnableLCD ret -; 0x4e6e Func_4e6e: ; 4e6e (1:4e6e) ld b, $51 @@ -2304,7 +2264,6 @@ Func_4e98: ; 4e98 (1:4e98) call Func_3b31 pop bc ret -; 0x4f2d Func_4f2d: ; 4f2d (1:4f2d) ld a, [wDuelDisplayedScreen] @@ -2362,7 +2321,6 @@ Func_4f2d: ; 4f2d (1:4f2d) jr nz, .asm_4f94 ld a, $01 ret -; 0x4f9d ; draw the main scene during a duel, except the contents of the bottom text box, ; which depend on the type of duelist holding the turn. @@ -2436,7 +2394,6 @@ DrawDuelMainScene: ; 4f9d (1:4f9d) call DrawWideTextBox call EnableLCD ret -; 0x503a ; draws the main elements of the main duel interface, including HUDs, HPs, card names ; and color symbols, attached cards, and other information, of both duelists. @@ -2480,7 +2437,6 @@ DrawDuelHUDs: ; 503a (1:503a) call CheckPrintDoublePoisoned ; if double poisoned, print a second poison icon call SwapTurn ret -; 0x5093 DrawDuelHUD: ; 5093 (1:5093) ld hl, wHUDEnergyAndHPBarsX @@ -2616,7 +2572,6 @@ DrawDuelHUD: ; 5093 (1:5093) call WriteByteToBGMap0 .done ret -; 0x516f ; draws an horizonal line that separates the arena side of each duelist ; also colorizes the line on CGB @@ -2631,7 +2586,6 @@ DrawDuelHorizontalSeparator: ; 516f (1:516f) call WriteDataBlocksToBGMap0 call BankswitchVRAM0 ret -; 0x5188 DuelEAndHPTileData: ; 5188 (1:5188) ; x, y, tiles[], 0 @@ -2640,7 +2594,6 @@ DuelEAndHPTileData: ; 5188 (1:5188) db 9, 8, SYM_E, 0 db 9, 9, SYM_HP, 0 db $ff -; 0x5199 DuelHorizontalSeparatorTileData: ; 5199 (1:5199) ; x, y, tiles[], 0 @@ -2649,7 +2602,6 @@ DuelHorizontalSeparatorTileData: ; 5199 (1:5199) db 9, 6, $33, $34, 0 db 9, 7, $35, $36, $37, $37, $37, $37, $37, $37, $37, $37, $37, 0 db $ff -; 0x51c0 DuelHorizontalSeparatorCGBPalData: ; 51c0 (1:51c0) ; x, y, pals[], 0 @@ -2658,7 +2610,6 @@ DuelHorizontalSeparatorCGBPalData: ; 51c0 (1:51c0) db 9, 6, $02, $02, 0 db 9, 7, $02, $02, $02, $02, $02, $02, $02, $02, $02, $02, $02, 0 db $ff -; 0x51e7 ; if this is a practice duel, execute the practice duel action at wPracticeDuelAction ; if not a practice duel, always return nc @@ -2671,7 +2622,6 @@ DoPracticeDuelAction: ; 51e7 (1:51e7) ld a, [wPracticeDuelAction] ld hl, PracticeDuelActionTable jp JumpToFunctionInTable -; 0x51f8 PracticeDuelActionTable: ; 51f8 (1:51f8) dw $0000 @@ -2685,14 +2635,12 @@ PracticeDuelActionTable: ; 51f8 (1:51f8) dw PracticeDuel_RepeatInstructions dw PracticeDuel_PlayStaryuFromBench dw PracticeDuel_ReplaceKnockedOutPokemon -; 0x520e PracticeDuel_DrawSevenCards: ; 520e (1:520e) call DisplayPracticeDuelPlayerHandScreen call EnableLCD ldtx hl, DrawSevenCardsPracticeDuelText jp PrintPracticeDuelDrMasonInstructions -; 0x521a PracticeDuel_PlayGoldeen: ; 521a (1:521a) ld a, [wLoadedCard1ID] @@ -2702,14 +2650,12 @@ PracticeDuel_PlayGoldeen: ; 521a (1:521a) ldtx de, DrMasonText scf jp PrintPracticeDuelDrMasonInstructions -; 0x522a PracticeDuel_PutStaryuInBench: ; 522a (1:522a) call DisplayPracticeDuelPlayerHandScreen call EnableLCD ldtx hl, PutPokemonOnBenchPracticeDuelText jp PrintPracticeDuelDrMasonInstructions -; 0x5236 PracticeDuel_VerifyInitialPlay: ; 5236 (1:5236) ld a, DUELVARS_NUMBER_OF_POKEMON_IN_PLAY_AREA @@ -2719,7 +2665,6 @@ PracticeDuel_VerifyInitialPlay: ; 5236 (1:5236) ldtx hl, ChooseStaryuPracticeDuelText scf jp PrintPracticeDuelDrMasonInstructions -; 0x5245 PracticeDuel_DonePuttingOnBench: ; 5245 (1:5245) call DisplayPracticeDuelPlayerHandScreen @@ -2728,7 +2673,6 @@ PracticeDuel_DonePuttingOnBench: ; 5245 (1:5245) ld [wPracticeDuelTurn], a ldtx hl, PressBToFinishPracticeDuelText jp PrintPracticeDuelDrMasonInstructions -; 0x5256 PracticeDuel_PrintTurnInstructions: ; 5256 (1:5256) call DrawPracticeDuelInstructionsTextBox @@ -2749,7 +2693,6 @@ PracticeDuel_PrintTurnInstructions: ; 5256 (1:5256) call PrintScrollableText_WithTextBoxLabel_NoWait call YesOrNoMenu jp PrintPracticeDuelInstructionsForCurrentTurn -; 0x5278 PracticeDuel_VerifyPlayerTurnActions: ; 5278 (1:5278) ld a, [wDuelTurns] @@ -2773,7 +2716,6 @@ PracticeDuel_RepeatInstructions: ; 5284 (1:5284) ; return carry in order to repeat instructions scf ret -; 0x529b PracticeDuel_PlayStaryuFromBench: ; 529b (1:529b) ld a, [wDuelTurns] @@ -2787,7 +2729,6 @@ PracticeDuel_PlayStaryuFromBench: ; 529b (1:529b) call EnableLCD ld hl, PracticeDuelText_SamTurn4 jp PrintPracticeDuelInstructions -; 0x52b0 PracticeDuel_ReplaceKnockedOutPokemon: ; 52b0 (1:52b0) ldh a, [hTempPlayAreaLocation_ff9d] @@ -2806,7 +2747,6 @@ PrintPracticeDuelDrMasonInstructions: ; 52bc (1:52bc) call PrintScrollableText_WithTextBoxLabel pop af ret -; 0x52c5 PracticeDuelTextPointerTable: ; 52c5 (1:52c5) dw PracticeDuelText_Turn1 @@ -2817,7 +2757,6 @@ PracticeDuelTextPointerTable: ; 52c5 (1:52c5) dw PracticeDuelText_Turn6 dw PracticeDuelText_Turn7 dw PracticeDuelText_Turn8 -; 0x52d5 practicetext: MACRO db \1 ; Y coord to place the point-by-point instruction @@ -2906,7 +2845,6 @@ PrintPracticeDuelInstructionsTextBoxLabel: ; 535d (1:535d) lb de, 1, 0 ldtx hl, ReplaceDueToKnockoutPracticeDuelText jp InitTextPrinting_ProcessTextFromID -; 0x5382 ; print the instructions of the current practice duel turn, taken from ; one of the structs in PracticeDuelTextPointerTable. @@ -2986,7 +2924,6 @@ PrintPracticeDuelInstructions_Fast: ; 53da (1:53da) ld d, 1 call PrintPracticeDuelNumberedInstruction jr PrintPracticeDuelInstructions_Fast -; 0x53e6 ; print a practice duel point-by-point instruction at d,e, with text id at hl, ; that has been read from an entry of PracticeDuelText_* @@ -3005,7 +2942,6 @@ PrintPracticeDuelNumberedInstruction: ; 53e6 (1:53e6) call SetOneLineSeparation pop hl ret -; 0x53fa Func_53fa: ; 53fa (1:53fa) ld a, $01 @@ -3032,7 +2968,6 @@ Func_53fa: ; 53fa (1:53fa) xor a ldh [hffb0], a ret -; 0x541f PracticeDuelTurnVerificationPointerTable: ; 541f (1:541f) dw PracticeDuelVerify_Turn1 @@ -3049,7 +2984,6 @@ PracticeDuelVerify_Turn1: ; 542f (1:542f) cp GOLDEEN jp nz, ReturnWrongAction ret -; 0x5438 PracticeDuelVerify_Turn2: ; 5438 (1:5438) ld a, [wTempCardID_ccc2] @@ -3064,7 +2998,6 @@ PracticeDuelVerify_Turn2: ; 5438 (1:5438) or a jr z, ReturnWrongAction ret -; 0x5454 PracticeDuelVerify_Turn3: ; 5454 (1:5454) ld a, [wTempCardID_ccc2] @@ -3076,7 +3009,6 @@ PracticeDuelVerify_Turn3: ; 5454 (1:5454) or a jr z, ReturnWrongAction ret -; 0x5467 PracticeDuelVerify_Turn4: ; 5467 (1:5467) ld a, [wPlayerNumberOfPokemonInPlayArea] @@ -3094,7 +3026,6 @@ PracticeDuelVerify_Turn4: ; 5467 (1:5467) cp 1 jr nz, ReturnWrongAction ret -; 0x5488 PracticeDuelVerify_Turn5: ; 5488 (1:5488) ld e, PLAY_AREA_ARENA @@ -3106,7 +3037,6 @@ PracticeDuelVerify_Turn5: ; 5488 (1:5488) cp STARYU jr nz, ReturnWrongAction ret -; 0x549c PracticeDuelVerify_Turn6: ; 549c (1:549c) ld e, PLAY_AREA_ARENA @@ -3121,7 +3051,6 @@ PracticeDuelVerify_Turn6: ; 549c (1:549c) cp STARYU jr nz, ReturnWrongAction ret -; 0x54b7 PracticeDuelVerify_Turn7Or8: ; 54b7 (1:54b7) ld a, [wTempCardID_ccc2] @@ -3135,7 +3064,6 @@ PracticeDuelVerify_Turn7Or8: ; 54b7 (1:54b7) ReturnWrongAction: scf ret -; 0x54c8 ; display BOXMSG_PLAYERS_TURN or BOXMSG_OPPONENTS_TURN and print ; DuelistTurnText in a textbox. also call ExchangeRNG. @@ -3153,12 +3081,10 @@ DisplayDuelistTurnScreen: ; 54c8 (1:54c8) call DrawWideTextBox_WaitForInput call ExchangeRNG ret -; 0x54e2 Unknown_54e2: ; 54e2 (1:54e2) ; ??? db $00, $0c, $06, $0f, $00, $00, $00 -; 0x54e9 DuelMenuData: ; 54e9 (1:54e9) ; x, y, text id @@ -3169,7 +3095,6 @@ DuelMenuData: ; 54e9 (1:54e9) textitem 9, 16, PKMNPowerText textitem 15, 16, DoneText db $ff -; 0x5502 ; display the screen that prompts the player to choose a Pokemon card to ; place in the arena or in the bench at the beginning of the duel. @@ -3216,7 +3141,6 @@ DisplayPlaceInitialPokemonCardsScreen: ; 5502 (1:5502) call nz, SortHandCardsByID pop af ret -; 0x5542 Func_5542: ; 5542 (1:5542) call CreateDiscardPileCardList @@ -3225,7 +3149,6 @@ Func_5542: ; 5542 (1:5542) call SetDiscardPileScreenTexts call DisplayCardList ret -; 0x5550 ; draw the turn holder's discard pile screen OpenDiscardPileScreen: ; 5550 (1:5550) @@ -3243,7 +3166,6 @@ OpenDiscardPileScreen: ; 5550 (1:5550) call DrawWideTextBox_WaitForInput scf ret -; 0x556d ; set wCardListHeaderText and SetCardListInfoBoxText to the text ; that correspond to the Discard Pile screen @@ -3257,7 +3179,6 @@ SetDiscardPileScreenTexts: ; 556d (1:556d) ldtx hl, ChooseTheCardYouWishToExamineText call SetCardListHeaderText ret -; 0x5580 SetCardListHeaderText: ; 5580 (1:5580) ld a, e @@ -3272,14 +3193,12 @@ SetCardListInfoBoxText: ; 5588 (1:5588) ld a, h ld [wCardListInfoBoxText + 1], a ret -; 0x5591 Func_5591: ; 5591 (1:5591) call InitAndDrawCardListScreenLayout ld a, SELECT_CHECK ld [wCardListItemSelectionMenuType], a ret -; 0x559a ; draw the layout of the screen that displays the player's Hand card list or a ; Discard Pile card list, including a bottom-right image of the current card. @@ -3334,7 +3253,6 @@ DrawCardListScreenLayout: ret z or a ret -; 0x55f0 ; displays a list of cards and handles input in order to navigate through the list, ; select a card, open a card page, etc. @@ -3447,7 +3365,6 @@ DisplayCardList: ; 55f0 (1:55f0) ldh a, [hCurMenuItem] scf ret -; 0x5690 Func_5690: ; 5690 (1:5690) ldh a, [hDPadHeld] @@ -3459,7 +3376,6 @@ Func_5690: ; 5690 (1:5690) xor a ldh [hffb0], a ret -; 0x56a0 ; prints the text ID at wCardListHeaderText at 1,1 ; and the text ID at wCardListInfoBoxText at 1,14 @@ -3480,7 +3396,6 @@ PrintCardListHeaderAndInfoBoxTexts: ; 56a0 (1:56a0) call InitTextPrinting call PrintTextNoDelay ret -; 0x56c2 ; display the SELECT|CHECK or PLAY|CHECK menu when a card of a list is selected ; and handle input. return carry if b is pressed. @@ -3522,7 +3437,6 @@ CardListItemSelectionMenu: ; 56c2 (1:56c2) .b_pressed scf ret -; 0x5708 ItemSelectionMenuParameters: ; 5708 (1:5708) db 1, 14 ; corsor x, cursor y @@ -3531,7 +3445,6 @@ ItemSelectionMenuParameters: ; 5708 (1:5708) db SYM_CURSOR_R ; cursor tile number db SYM_SPACE ; tile behind cursor dw $0000 ; function pointer if non-0 -; 0x5710 CardListParameters: ; 5710 (1:5710) db 1, 3 ; cursor x, cursor y @@ -3541,7 +3454,6 @@ CardListParameters: ; 5710 (1:5710) db SYM_CURSOR_R ; cursor tile number db SYM_SPACE ; tile behind cursor dw CardListFunction ; function pointer if non-0 -; 0x5719 ; return carry if any of the buttons is pressed, and load the graphics ; of the card pointed to by the cursor whenever a d-pad key is released. @@ -3566,7 +3478,6 @@ CardListFunction: ; 5719 (1:5719) call LoadSelectedCardGfx or a ret -; 0x5735 Func_5735: ; 5735 (1:5735) ld hl, wcbd8 @@ -3577,12 +3488,10 @@ Func_5735: ; 5735 (1:5735) ld a, 1 ld [wSortCardListByID], a ret -; 0x5744 Func_5744: ; 5744 (1:5744) ld hl, wcbd8 jp CallIndirect -; 0x574a Func_574a: ; 574a (1:574a) lb bc, 1, 2 @@ -3602,7 +3511,6 @@ Func_574a: ; 574a (1:574a) jr .next .done ret -; 0x5762 ; draw the card page of the card at wLoadedCard1 and listen for input ; in order to switch the page or to exit. @@ -3679,7 +3587,6 @@ OpenCardPage: ; 5779 (1:5779) jr .input_loop .done ret -; 0x57cd ; display the previous valid card page of the card at wLoadedCard1 if bit D_LEFT_F ; of a is set, and the first or next valid card page otherwise. @@ -3698,7 +3605,6 @@ DisplayCardPageOnLeftOrRightPressed: ; 57cd (1:57cd) call DisplayPreviousCardPage call c, DisplayCardPage ret -; 0x57df Func_57df: ; 57df (1:57df) push hl @@ -3716,7 +3622,6 @@ Func_57df: ; 57df (1:57df) call SetOneLineSeparation call WaitForWideTextBoxInput ret -; 0x5805 Func_5805: ; 5805 (1:5805) call Func_3b31 @@ -3786,14 +3691,12 @@ Func_5805: ; 5805 (1:5805) ldtx hl, DrewNPrizesText call DrawWideTextBox_WaitForInput jr .asm_582f -; 0x588a Func_588a: ; 588a (1:588a) ld l, PLAYER_TURN ldh a, [hWhoseTurn] ld h, a jp DrawYourOrOppPlayAreaScreen_Bank0 -; 0x5892 ; display the previous valid card page DisplayPreviousCardPage: ; 5892 (1:5892) @@ -3815,7 +3718,6 @@ DisplayCardPage: ; 589c (1:589c) call EnableLCD or a ret -; 0x58aa ; load the tiles and palette of the card selected in card list screen LoadSelectedCardGfx: ; 58aa (1:58aa) @@ -3828,7 +3730,6 @@ LoadSelectedCardGfx: ; 58aa (1:58aa) call SetBGP6OrSGB3ToCardPalette call FlushAllPalettesOrSendPal23Packet ret -; 0x58c2 CardPageDisplayPointerTable: ; 58c2 (1:58c2) dw DrawDuelMainScene @@ -3847,7 +3748,6 @@ CardPageDisplayPointerTable: ; 58c2 (1:58c2) dw DisplayCardPage_TrainerPage1 ; CARDPAGE_TRAINER_1 dw DisplayCardPage_TrainerPage2 ; CARDPAGE_TRAINER_2 dw DrawDuelMainScene -; 0x58e2 ; given the current card page at [wCardPageNumber], go to the next valid card page or load ; the first valid card page of the current card at wLoadedCard1 if [wCardPageNumber] == 0 @@ -3883,7 +3783,6 @@ GoToFirstOrNextCardPage: ; 58e2 (1:58e2) .set_card_page ld [wCardPageNumber], a ret -; 0x5911 ; given the current card page at [wCardPageNumber], go to the previous ; valid card page for the current card at wLoadedCard1 @@ -3910,7 +3809,6 @@ GoToPreviousCardPage: ; 5911 (1:5911) .stay scf ret -; 0x5930 ; check if the card page trying to switch to is valid for the card at wLoadedCard1 ; return with the equivalent to one of these three actions: @@ -3920,7 +3818,6 @@ GoToPreviousCardPage: ; 5911 (1:5911) SwitchCardPage: ; 5930 (1:5930) ld hl, CardPageSwitchPointerTable jp JumpToFunctionInTable -; 0x5936 CardPageSwitchPointerTable: ; 5936 (1:5936) dw CardPageSwitch_00 @@ -3939,21 +3836,18 @@ CardPageSwitchPointerTable: ; 5936 (1:5936) dw CardPageSwitch_EnergyOrTrainerPage1 ; CARDPAGE_TRAINER_1 dw CardPageSwitch_TrainerPage2 ; CARDPAGE_TRAINER_2 dw CardPageSwitch_TrainerEnd -; 0x5956 ; return with CARDPAGE_POKEMON_DESCRIPTION CardPageSwitch_00: ; 5956 (1:5956) ld a, CARDPAGE_POKEMON_DESCRIPTION scf ret -; 0x595a ; return with current page CardPageSwitch_PokemonOverviewOrDescription: ; 595a (1:595a) ld a, $1 or a ret ; nz -; 0x595e ; return with current page if [wLoadedCard1Move1Name] non-0 ; (if card has at least one move) @@ -3983,63 +3877,54 @@ CheckCardPageExists: ; 5970 (1:5970) ld a, [hli] or [hl] ret -; 0x5973 ; return with CARDPAGE_POKEMON_OVERVIEW CardPageSwitch_PokemonEnd: ; 5973 (1:5973) ld a, CARDPAGE_POKEMON_OVERVIEW scf ret -; 0x5977 ; return with CARDPAGE_ENERGY + 1 CardPageSwitch_08: ; 5977 (1:5977) ld a, CARDPAGE_ENERGY + 1 scf ret -; 0x597b ; return with current page CardPageSwitch_EnergyOrTrainerPage1: ; 597b (1:597b) ld a, $1 or a ret ; nz -; 0x597f ; return with current page if [wLoadedCard1NonPokemonDescription + 2] non-0 ; (if this trainer card has a two-page description) CardPageSwitch_TrainerPage2: ; 597f (1:597f) ld hl, wLoadedCard1NonPokemonDescription + 2 jr CheckCardPageExists -; 0x5984 ; return with CARDPAGE_ENERGY CardPageSwitch_EnergyEnd: ; 5984 (1:5984) ld a, CARDPAGE_ENERGY scf ret -; 0x5988 ; return with CARDPAGE_TRAINER_2 CardPageSwitch_0c: ; 5988 (1:5988) ld a, CARDPAGE_TRAINER_2 scf ret -; 0x598c ; return with CARDPAGE_TRAINER_1 CardPageSwitch_TrainerEnd: ; 598c (1:598c) ld a, CARDPAGE_TRAINER_1 scf ret -; 0x5990 ZeroObjectPositionsAndToggleOAMCopy: ; 5990 (1:5990) call ZeroObjectPositions ld a, $01 ld [wVBlankOAMCopyToggle], a ret -; 0x5999 ; place OAM for a 8x6 image, using object size 8x16 and obj palette 1. ; d, e: X Position and Y Position of the top-left corner. @@ -4074,7 +3959,6 @@ PlaceCardImageOAM: ; 5999 (1:5999) ld a, $01 ld [wVBlankOAMCopyToggle], a ret -; 0x59c2 ; given the deck index of a card in the play area (i.e. -1 indicates empty) ; load the graphics (tiles and palette) of the card to de @@ -4095,7 +3979,6 @@ LoadLoaded1CardGfx: ; 59ca (1:59ca) lb bc, $30, TILE_SIZE call LoadCardGfx ret -; 0x59d7 SetBGP7OrSGB2ToCardPalette: ; 59d7 (1:59d7) ld a, [wConsole] @@ -4117,7 +4000,6 @@ SetBGP7OrSGB2ToCardPalette: ; 59d7 (1:59d7) dec b jr nz, .copy_pal_loop ret -; 0x59f5 SetBGP6OrSGB3ToCardPalette: ; 59f5 (1:59f5) ld a, [wConsole] @@ -4134,7 +4016,6 @@ SetSGB3ToCardPalette: ; 5a04 (1:5a04) ld de, wTempSGBPacket + 9 ; Pal Packet color #4 (PAL23's SGB3) ld b, 6 jr SetBGP7OrSGB2ToCardPalette.copy_pal_loop -; 0x5a0e SetOBP1OrSGB3ToCardPalette: ; 5a0e (1:5a0e) ld a, $e4 @@ -4164,7 +4045,6 @@ CopyCGBCardPalette: ; 5a1e (1:5a1e) dec b jr nz, .copy_pal_loop ret -; 0x5a34 FlushAllPalettesOrSendPal23Packet: ; 5a34 (1:5a34) ld a, [wConsole] @@ -4190,7 +4070,6 @@ FlushAllPalettesOrSendPal23Packet: ; 5a34 (1:5a34) ld [wTempSGBPacket + $f], a call SendSGB ret -; 0x5a56 ApplyBGP6OrSGB3ToCardImage: ; 5a56 (1:5a56) ld a, [wConsole] @@ -4209,7 +4088,6 @@ SendCardAttrBlkPacket: ; 5a67 (1:5a67) call CreateCardAttrBlkPacket call SendSGB ret -; 0x5a6e ApplyBGP7OrSGB2ToCardImage: ; 5a6e (1:5a6e) ld a, [wConsole] @@ -4223,7 +4101,6 @@ ApplyBGP7OrSGB2ToCardImage: ; 5a6e (1:5a6e) .sgb ld a, 2 << 0 + 2 << 2 ; Color Palette Designation jr SendCardAttrBlkPacket -; 0x5a81 Func_5a81: ; 5a81 (1:5a81) ld a, [wConsole] @@ -4250,7 +4127,6 @@ Func_5a81: ; 5a81 (1:5a81) pop hl call SendSGB ret -; 0x5ab5 CreateCardAttrBlkPacket: ; 5ab5 (1:5ab5) ; sgb ATTR_BLK, 1 ; sgb_command, length @@ -4269,7 +4145,6 @@ CreateCardAttrBlkPacket: ; 5ab5 (1:5ab5) ld [hli], a pop hl ret -; 0x5ac9 CreateCardAttrBlkPacket_DataSet: ; 5ac9 (1:5ac9) ; Control Code, Color Palette Designation, X1, Y1, X2, Y2 @@ -4289,7 +4164,6 @@ CreateCardAttrBlkPacket_DataSet: ; 5ac9 (1:5ac9) add e ld [hli], a ret -; 0x5adb ; given the 8x6 card image with coordinates at de, fill its BGMap attributes with a ApplyCardCGBAttributes: ; 5adb (1:5adb) @@ -4299,7 +4173,6 @@ ApplyCardCGBAttributes: ; 5adb (1:5adb) call FillRectangle call BankswitchVRAM0 ret -; 0x5aeb ; set the default game palettes for all three systems ; BGP and OBP0 on DMG @@ -4352,7 +4225,6 @@ SetDefaultPalettes: ; 5aeb (1:5aeb) dec c jr nz, .copy_de_to_hl ret -; 0x5b44 CGBDefaultPalettes: ; 5b44 (1:5b44) ; BGP0 and OBP0 @@ -4395,7 +4267,6 @@ Pal01Packet_Default: ; 5b6c (1:5b6c) JPWriteByteToBGMap0: ; 5b7a (1:5b7a) jp WriteByteToBGMap0 -; 0x5b7d DisplayCardPage_PokemonOverview: ; 5b7d (1:5b7d) ld a, [wCardPageType] @@ -4503,7 +4374,6 @@ DisplayCardPage_PokemonOverview: ; 5b7d (1:5b7d) ld a, e call PrintCardPageWeaknessesOrResistances ret -; 0x5c33 ; displays the name, damage, and energy cost of a move or Pokemon power. ; used in the Attack menu and in the card page of a Pokemon. @@ -4587,7 +4457,6 @@ PrintMoveOrPkmnPowerInformation: ; 5c33 (1:5c33) call InitTextPrinting_ProcessTextFromID pop bc ret -; 0x5c9c ; print the number of energies required of color (type) e, and return e ++ (next color). ; the requirement of the current color is provided as input in the lower nybble of a. @@ -4605,7 +4474,6 @@ PrintEnergiesOfColor: ; 5c9c (1:5c9c) jr nz, .print_energies_loop pop de ret -; 0x5cac ; print the weaknesses or resistances of a Pokemon card, given in a, at b,c PrintCardPageWeaknessesOrResistances: ; 5cac (1:5cac) @@ -4631,7 +4499,6 @@ PrintCardPageWeaknessesOrResistances: ; 5cac (1:5cac) pop de pop bc ret -; 0x5cc4 ; prints surrounding box, card name at 5,1, type, set 2, and rarity. ; used in all CARDPAGE_POKEMON_* and MOVEPAGE_*, except in @@ -4655,7 +4522,6 @@ PrintPokemonCardPageGenericInformation: ; 5cc4 (1:5cc4) call JPWriteByteToBGMap0 call DrawCardPageSet2AndRarityIcons ret -; 0x5cec ; draws the 20x18 surrounding box and also colorizes the card image DrawCardPageSurroundingBox: ; 5cec (1:5cec) @@ -4670,7 +4536,6 @@ DrawCardPageSurroundingBox: ; 5cec (1:5cec) lb de, 6, 4 call ApplyBGP6OrSGB3ToCardImage ret -; 0x5d05 CardPageRetreatWRTextData: ; 5d05 (1:5d05) textitem 1, 14, RetreatCostText @@ -4732,7 +4597,6 @@ PrintMoveOrNonPokemonCardDescription: ; 5d49 (1:5d49) lb de, 1, 11 call PrintMoveOrCardDescription ret -; 0x5d54 DisplayCardPage_PokemonDescription: ; 5d54 (1:5d54) ; print surrounding box, card name at 5,1, type, set 2, and rarity @@ -4794,7 +4658,6 @@ DisplayCardPage_PokemonDescription: ; 5d54 (1:5d54) call ProcessTextFromPointerToID call SetOneLineSeparation ret -; 0x5dd3 ; given a card rarity constant in a, and CardRarityTextIDs in hl, ; print the text character associated to it at d,e @@ -4806,7 +4669,6 @@ PrintCardPageRarityIcon: ; 5dd3 (1:5dd3) add hl, bc call InitTextPrinting_ProcessTextFromPointerToID ret -; 0x5ddd ; prints the card's set 2 icon and the full width text character of the card's rarity DrawCardPageSet2AndRarityIcons: ; 5ddd (1:5ddd) @@ -4826,7 +4688,6 @@ DrawCardPageSet2AndRarityIcons: ; 5ddd (1:5ddd) cp PROMOSTAR call nz, PrintCardPageRarityIcon ret -; 0x5e02 CardPageLengthWeightTextData: ; 5e02 (1:5e02) textitem 1, 11, LengthText @@ -4843,7 +4704,6 @@ CardRarityTextIDs: ; 5e14 (1:5e14) tx CircleRarityText ; CIRCLE tx DiamondRarityText ; DIAMOND tx StarRarityText ; STAR -; 0x5e1c DisplayCardPage_TrainerPage1: ; 5e1c (1:5e1c) xor a ; HEADER_TRAINER @@ -4888,7 +4748,6 @@ DisplayEnergyOrTrainerCardPage: ; 5e2d (1:5e2d) pop hl call PrintMoveOrNonPokemonCardDescription ret -; 0x5e5f ; display the card details of the card in wLoadedCard1 ; print the text at hl @@ -4903,7 +4762,6 @@ _DisplayCardDetailScreen: ; 5e5f (1:5e5f) pop hl call DrawWideTextBox_WaitForInput ret -; 0x5e75 ; draw a large picture of the card loaded in wLoadedCard1, including its image ; and a header indicating the type of card (TRAINER, ENERGY, PoKéMoN) @@ -4935,7 +4793,6 @@ DrawLargePictureOfCard: ; 5e75 (1:5e75) lb de, 6, 3 call ApplyBGP6OrSGB3ToCardImage ret -; 0x5eb7 LargeCardTileData: ; 5eb7 (1:5eb7) db 5, 0, $d0, $d4, $d4, $d4, $d4, $d4, $d4, $d4, $d4, $d1, 0 ; top border @@ -4953,7 +4810,6 @@ LargeCardTileData: ; 5eb7 (1:5eb7) db 14, 10, $d7, 0 ; empty line 2 (right) db 5, 11, $d2, $d5, $d5, $d5, $d5, $d5, $d5, $d5, $d5, $d3, 0 ; bottom border db $ff -; 0x5f4a ; print lines of text with no separation between them SetNoLineSeparation: ; 5f4a (1:5f4a) @@ -4963,13 +4819,11 @@ SetNoLineSeparation: ; 5f4a (1:5f4a) SetLineSeparation: ; 5f4c (1:5f4c) ld [wLineSeparation], a ret -; 0x5f50 ; separate lines of text by an empty line SetOneLineSeparation: ; 5f50 (1:5f50) xor a jr SetLineSeparation -; 0x5f53 ; given a number in hl, print it divided by 10 at b,c, with decimal part ; separated by a dot (unless it's 0). used to print a Pokemon card's weight. @@ -5025,7 +4879,6 @@ PrintPokemonCardWeight: ; 5f53 (1:5f53) add d ld d, a ret -; 0x5f9a ; given a number in h and another in l, print them formatted as <l>'<h>" at b,c. ; used to print the length (feet and inches) of a Pokemon card. @@ -5072,7 +4925,6 @@ PrintPokemonCardLength: ; 5f9a (1:5f9a) pop bc inc b ret -; 0x5fd9 ; return carry if the turn holder has any Pokemon with non-zero HP on the bench. ; return how many Pokemon with non-zero HP in b. @@ -5116,7 +4968,6 @@ _HasAlivePokemonInPlayArea: ; 5fde (1:5fde) ret nz scf ret -; 0x6008 OpenPlayAreaScreenForViewing: ; 6008 (1:6008) ld a, START + A_BUTTON @@ -5216,7 +5067,6 @@ DisplayPlayAreaScreen: ; 600e (1:600e) ldh [hCurMenuItem], a scf ret -; 0x60be PlayAreaScreenMenuParameters_ActivePokemonIncluded: ; 60be (1:60be) db 0, 0 ; cursor x, cursor y @@ -5245,7 +5095,6 @@ PlayAreaScreenMenuFunction: ; 60ce (1:60ce) .start_or_a scf ret -; 0x60dd Func_60dd: ; 60dd (1:60dd) ld a, [wcbd4] @@ -5295,7 +5144,6 @@ Func_60dd: ; 60dd (1:60dd) .asm_6132 call OpenTurnHolderHandScreen_Simple jr .asm_60f2 -; 0x6137 Func_6137: ; 6137 (1:6137) ldh a, [hDPadHeld] @@ -5333,7 +5181,6 @@ Func_615c: ld e, 16 lb bc, SYM_CURSOR_R, SYM_SPACE jp SetCursorParametersForTextBox -; 0x616e Func_616e: ; 616e (1:616e) ldh [hTempPlayAreaLocation_ff9d], a @@ -5357,7 +5204,6 @@ Func_6186: ld [hl], a call PrintPlayAreaCardInformationAndLocation ret -; 0x6194 Func_6194: ; 6194 (1:6194) call Func_6186 @@ -5366,7 +5212,6 @@ Func_6194: ; 6194 (1:6194) ld d, 0 call SetCursorParametersForTextBox_Default ret -; 0x61a1 Func_61a1: ; 61a1 (1:61a1) xor a @@ -5379,7 +5224,6 @@ Func_61a1: ; 61a1 (1:61a1) call LoadDuelCardSymbolTiles call LoadDuelCheckPokemonScreenTiles ret -; 0x61b8 ; for each turn holder's play area Pokemon card, print the name, level, ; face down stage card, color symbol, status symbol (if any), pluspower/defender @@ -5393,7 +5237,6 @@ PrintPlayAreaCardList_EnableLCD: ; 61b8 (1:61b8) call EnableLCD ld a, [wNumPlayAreaItems] ret -; 0x61c7 ; for each turn holder's play area Pokemon card, print the name, level, ; face down stage card, color symbol, status symbol (if any), pluspower/defender @@ -5463,7 +5306,6 @@ PrintPlayAreaCardList: ; 61c7 (1:61c7) dec b jr nz, .shift_back_loop ret -; 0x622a ; print a turn holder's play area Pokemon card's name, level, face down stage card, ; color symbol, status symbol (if any), pluspower/defender symbols (if any), @@ -5513,7 +5355,6 @@ PrintPlayAreaCardLocation: ; 6238 (1:6238) add d call WriteByteToBGMap0 ret -; 0x6264 PlayAreaLocationTileNumbers: ; 6264 (1:6264) db $e0, $e1, $e2, $00 ; ACT @@ -5580,7 +5421,6 @@ PrintPlayAreaCardInformation: ; 627c (1:627c) ldtx hl, KnockOutText call InitTextPrinting_ProcessTextFromID ret -; 0x62d5 ; print a turn holder's play area Pokemon card's name, level, face down stage card, ; color symbol, status symbol (if any), and pluspower/defender symbols (if any). @@ -5711,7 +5551,6 @@ PrintPlayAreaCardHeader: ; 62d5 (1:62d5) call WriteByteToBGMap0 .not_defender ret -; 0x63b3 FaceDownCardTileNumbers: ; 63b3 (1:63b3) ; starting tile number, cgb palette (grey, yellow/red, green/blue, pink/orange) @@ -5719,7 +5558,6 @@ FaceDownCardTileNumbers: ; 63b3 (1:63b3) db $d4, $02 ; stage 1 db $d8, $01 ; stage 2 db $dc, $01 ; stage 2 special -; 0x63bb ; given a card's status in a, print the Poison symbol at bc if it's poisoned CheckPrintPoisoned: ; 63bb (1:63bb) @@ -5732,7 +5570,6 @@ CheckPrintPoisoned: ; 63bb (1:63bb) call WriteByteToBGMap0 pop af ret -; 0x63c7 ; given a card's status in a, print the Poison symbol at bc if it's double poisoned CheckPrintDoublePoisoned: ; 63c7 (1:63c7) @@ -5740,7 +5577,6 @@ CheckPrintDoublePoisoned: ; 63c7 (1:63c7) and DOUBLE_POISONED & (POISONED ^ $ff) jr nz, CheckPrintPoisoned.poison ; double poisoned (print SYM_POISONED) jr CheckPrintPoisoned.print ; not double poisoned (print SYM_SPACE) -; 0x63ce ; given a card's status in a, print the Confusion, Sleep, or Paralysis symbol at bc ; for each of those status that is active @@ -5763,7 +5599,6 @@ CheckPrintCnfSlpPrz: ; 63ce (1:63ce) .status_symbols ; NO_STATUS, CONFUSED, ASLEEP, PARALYZED db SYM_SPACE, SYM_CONFUSED, SYM_ASLEEP, SYM_PARALYZED -; 0x63e6 ; print the symbols of the attached energies of a turn holder's play area card ; input: @@ -5836,7 +5671,6 @@ DisplayUsePokemonPowerScreen: ; 6510 (1:6510) ld hl, wLoadedCard1Move1Description call PrintMoveOrCardDescription ret -; 0x653e ; print the description of a move, a Pokemon power, or a trainer or energy card ; x,y coordinates of where to start printing the text are given at de @@ -5856,7 +5690,6 @@ PrintMoveOrCardDescription: ; 653e (1:653e) call ProcessTextFromID call SetOneLineSeparation ret -; 0x6558 ; moves the cards loaded by deck index at hTempRetreatCostCards to the discard pile DiscardRetreatCostCards: ; 6558 (1:6558) @@ -5867,7 +5700,6 @@ DiscardRetreatCostCards: ; 6558 (1:6558) ret z call PutCardInDiscardPile jr .discard_loop -; 0x6564 ; moves the discard pile cards that were loaded to hTempRetreatCostCards back to the active Pokemon. ; this exists because they will be discarded again during the call to AttemptRetreat, so @@ -5885,7 +5717,6 @@ ReturnRetreatCostCardsToArena: ; 6564 (1:6564) call PutHandCardInPlayArea pop hl jr .loop -; 0x657a ; discard retreat cost energy cards and attempt retreat of the arena card. ; return carry if unable to retreat this turn due to unsuccessful confusion check @@ -5910,7 +5741,6 @@ AttemptRetreat: ; 657a (1:657a) xor a ld [wGotHeadsFromConfusionCheckDuringRetreat], a ret -; 0x659f ; given a number between 0-255 in a, converts it to TX_SYMBOL format, ; and writes it to wStringBuffer + 2 and to the BGMap0 address at bc. @@ -5930,7 +5760,6 @@ WriteTwoByteNumberInTxSymbolFormat: ; 659f (1:659f) pop bc pop de ret -; 0x65b7 ; given a number between 0-99 in a, converts it to TX_SYMBOL format, ; and writes it to wStringBuffer + 3 and to the BGMap0 address at bc. @@ -5952,7 +5781,6 @@ WriteTwoDigitNumberInTxSymbolFormat: ; 65b7 (1:65b7) pop de pop hl ret -; 0x65d1 ; convert the number at hl to TX_SYMBOL text format and write it to wStringBuffer ; replace leading zeros with SYM_SPACE @@ -5998,7 +5826,6 @@ TwoByteNumberToTxSymbol_TrimLeadingZeros_Bank1: ; 65d1 (1:65d1) sbc b ld h, a ret -; 0x6614 ; input d, e: max. HP, current HP DrawHPBar: ; 6614 (1:6614) @@ -6025,7 +5852,6 @@ DrawHPBar: ; 6614 (1:6614) sub MAX_HP / HP_BAR_LENGTH jr nz, .tile_loop ret -; 0x6635 ; when an opponent's Pokemon card attacks, this displays a screen ; containing the description and information of the used move @@ -6052,7 +5878,6 @@ DisplayOpponentUsedMoveScreen: ; 6635 (1:6635) ld hl, wLoadedMoveDescription call PrintMoveOrCardDescription ret -; 0x666a ; display card detail when a trainer card is used, and print "Used xxx" ; hTempCardIndex_ff9f contains the card's deck index @@ -6061,7 +5886,6 @@ DisplayUsedTrainerCardDetailScreen: ; 666a (1:666a) ldtx hl, UsedText call DisplayCardDetailScreen ret -; 0x6673 ; prints the name and description of a trainer card, along with the ; "Used xxx" text in a text box. this function is used to show the player @@ -6082,7 +5906,6 @@ PrintUsedTrainerCardDescription: ; 6673 (1:6673) ldtx hl, UsedText call DrawWideTextBox_WaitForInput ret -; 0x669d ; save data of the current duel to sCurrentDuel ; byte 0 is $01, bytes 1 and 2 are the checksum, byte 3 is [wDuelType] @@ -6152,7 +5975,6 @@ SaveDuelDataToDE: ; 66a4 (1:66a4) ld [hl], a ; sCurrentDuelData call DisableSRAM ret -; 0x66e9 Func_66e9: ; 66e9 (1:66e9) ld hl, sCurrentDuel @@ -6165,7 +5987,6 @@ Func_66e9: ; 66e9 (1:66e9) call Func_3a40 or a ret -; 0x66ff ; load the data saved in sCurrentDuelData to WRAM according to the distribution ; of DuelDataToSave. assumes saved data exists and that the checksum is valid. @@ -6206,7 +6027,6 @@ LoadSavedDuelData: ; 66ff (1:66ff) .done call DisableSRAM ret -; 0x6729 DuelDataToSave: ; 6729 (1:6729) ; dw address, number_of_bytes_to_copy @@ -6218,7 +6038,6 @@ DuelDataToSave: ; 6729 (1:6729) dw wRNG1, wRNGCounter + $1 - wRNG1 dw wcda5, $0010 dw $0000 -; 0x6747 ; return carry if there is no data saved at sCurrentDuel or if the checksum isn't correct, ; or if the value saved from wDuelType is DUELTYPE_LINK @@ -6272,7 +6091,6 @@ ValidateSavedDuelData: ; 6759 (1:6759) call DisableSRAM pop de ret -; 0x6785 ; discard data of a duel that was saved by SaveDuelData, by setting the first byte ; of sCurrentDuel to $00, and zeroing the checksum (next two bytes) @@ -6285,7 +6103,6 @@ DiscardSavedDuelData: ; 6785 (1:6785) ld [hl], a call DisableSRAM ret -; 0x6793 ; loads a player deck (sDeck*Cards) from SRAM to wPlayerDeck ; sCurrentlySelectedDeck determines which sDeck*Cards source (0-3) @@ -6307,7 +6124,6 @@ LoadPlayerDeck: ; 6793 (1:6793) jr nz, .copy_cards_loop call DisableSRAM ret -; 0x67b2 ; returns carry if wSkipDelayAllowed is non-0 and B is being held in order to branch ; out of the caller's wait frames loop. probably only used for debugging. @@ -6320,7 +6136,6 @@ CheckSkipDelayAllowed: ; 67b2 (1:67b2) ret z scf ret -; 0x67be ; related to AI taking their turn in a duel ; called multiple times during one AI turn @@ -6360,7 +6175,6 @@ AIMakeDecision: ; 67be (1:67be) .turn_ended scf ret -; 0x67fb Func_67fb: ; 67fb (1:67fb) ld a, 10 @@ -6397,7 +6211,6 @@ Func_67fb: ; 67fb (1:67fb) .asm_6839 call OpenTurnHolderHandScreen_Simple jr .asm_6829 -; 0x683e Func_683e: ; 683e (1:683e) ldh a, [hDPadHeld] @@ -6422,7 +6235,6 @@ Func_6850: ; 6850 (1:6850) ld e, 16 lb bc, SYM_CURSOR_R, SYM_SPACE jp SetCursorParametersForTextBox -; 0x6862 Func_6862: ; 6862 (1:6862) ld [wcbff], a @@ -6481,7 +6293,6 @@ Func_6862: ; 6862 (1:6862) .right_pressed call OpenNonTurnHolderDiscardPileScreen jr .return_carry -; 0x68c6 Func_68c6: ; 68c6 (1:68c6) call Func_3b31 @@ -6496,7 +6307,6 @@ Func_68c6: ; 68c6 (1:68c6) inc hl ld [hl], d ret -; 0x68dd ResetDoFrameFunction_Bank1: ; 68dd (1:68dd) xor a @@ -6504,7 +6314,6 @@ ResetDoFrameFunction_Bank1: ; 68dd (1:68dd) ld [hli], a ld [hl], a ret -; 0x68e4 ; print the AttachedEnergyToPokemonText, given the energy card to attach in hTempCardIndex_ff98, ; and the PLAY_AREA_* of the turn holder's Pokemon to attach the energy to in hTempPlayAreaLocation_ff9d @@ -6518,7 +6327,6 @@ PrintAttachedEnergyToPokemon: ; 68e4 (1:68e4) ldtx hl, AttachedEnergyToPokemonText call DrawWideTextBox_WaitForInput ret -; 0x68fa ; print the PokemonEvolvedIntoPokemonText, given the Pokemon card to evolve in wccee, ; and the evolved Pokemon card in hTempCardIndex_ff98. also play a sound effect. @@ -6532,7 +6340,6 @@ PrintPokemonEvolvedIntoPokemon: ; 68fa (1:68fa) ldtx hl, PokemonEvolvedIntoPokemonText call DrawWideTextBox_WaitForInput ret -; 0x6911 ; handle the opponent's turn in a link duel ; loop until either [wOpponentTurnEnded] or [wDuelFinished] is non-0 @@ -6572,7 +6379,6 @@ DoLinkOpponentTurn: ; 6911 (1:6911) or [hl] jr z, .link_opp_turn_loop ret -; 0x695e ; actions for the opponent's turn ; on a link duel, this is referenced by DoLinkOpponentTurn in a loop (on each opponent's HandleTurn) @@ -6606,7 +6412,6 @@ OppAction_DrawCard: ; 698c (1:698c) call DrawCardFromDeck call nc, AddCardToHand ret -; 0x6993 OppAction_FinishTurnWithoutAttacking: ; 6993 (1:6993) call DrawDuelMainScene @@ -6616,7 +6421,6 @@ OppAction_FinishTurnWithoutAttacking: ; 6993 (1:6993) ld a, 1 ld [wOpponentTurnEnded], a ret -; 0x69a5 ; attach an energy card from hand to the arena or a benched Pokemon OppAction_PlayEnergyCard: ; 69a5 (1:69a5) @@ -6634,7 +6438,6 @@ OppAction_PlayEnergyCard: ; 69a5 (1:69a5) ld [wAlreadyPlayedEnergy], a call DrawDuelMainScene ret -; 0x69c5 ; evolve a Pokemon card in the arena or in the bench OppAction_EvolvePokemonCard: ; 69c5 (1:69c5) @@ -6649,7 +6452,6 @@ OppAction_EvolvePokemonCard: ; 69c5 (1:69c5) call Func_161e call DrawDuelMainScene ret -; 0x69e0 ; place a basic Pokemon card from hand in the bench OppAction_PlayBasicPokemonCard: ; 69e0 (1:69e0) @@ -6666,7 +6468,6 @@ OppAction_PlayBasicPokemonCard: ; 69e0 (1:69e0) call Func_161e call DrawDuelMainScene ret -; 0x69ff ; attempt the retreat of the active Pokemon card ; if successful, discard the required energy cards for retreat and @@ -6691,7 +6492,6 @@ OppAction_AttemptRetreat: ; 69ff (1:69ff) pop hl call DrawWideTextBox_WaitForInput_Bank1 ret -; 0x6a23 ; play trainer card from hand OppAction_PlayTrainerCard: ; 6a23 (1:6a23) @@ -6702,7 +6502,6 @@ OppAction_PlayTrainerCard: ; 6a23 (1:6a23) ld a, $01 ld [wSkipDuelistIsThinkingDelay], a ret -; 0x6a35 ; execute the effect commands of the trainer card that is being played ; used only for Trainer cards, as a continuation of OppAction_PlayTrainerCard @@ -6717,7 +6516,6 @@ OppAction_ExecuteTrainerCardEffectCommands: ; 6a35 (1:6a35) call ExchangeRNG call DrawDuelMainScene ret -; 0x6a4e ; begin the execution of an attack and handle the attack being ; possibly unsuccessful due to Sand Attack or Smokescreen @@ -6754,7 +6552,6 @@ OppAction_BeginUseAttack: ; 6a4e (1:6a4e) ld a, 1 ld [wOpponentTurnEnded], a ret -; 0x6a8c ; display the attack used by the opponent, and handle ; EFFECTCMDTYPE_DISCARD_ENERGY and confusion damage to self @@ -6776,14 +6573,12 @@ OppAction_UseAttack: ; 6a8c (1:6a8c) ld a, 1 ld [wOpponentTurnEnded], a ret -; 0x6ab1 OppAction_PlayAttackAnimationDealAttackDamage: ; 6ab1 (1:6ab1) call PlayAttackAnimation_DealAttackDamage ld a, 1 ld [wOpponentTurnEnded], a ret -; 0x6aba ; force the player to switch the active Pokemon with a benched Pokemon OppAction_ForceSwitchActive: ; 6aba (1:6aba) @@ -6800,7 +6595,6 @@ OppAction_ForceSwitchActive: ; 6aba (1:6aba) ldh a, [hTempPlayAreaLocation_ff9d] call SerialSendByte ret -; 0x6ad9 OppAction_UsePokemonPower: ; 6ad9 (1:6ad9) ldh a, [hTempCardIndex_ff9f] @@ -6823,7 +6617,6 @@ OppAction_UsePokemonPower: ; 6ad9 (1:6ad9) ld a, $01 ld [wSkipDuelistIsThinkingDelay], a ret -; 0x6b07 ; execute the EFFECTCMDTYPE_BEFORE_DAMAGE command of the used Pokemon Power OppAction_ExecutePokemonPowerEffect: ; 6b07 (1:6b07) @@ -6833,7 +6626,6 @@ OppAction_ExecutePokemonPowerEffect: ; 6b07 (1:6b07) ld a, $01 ld [wSkipDuelistIsThinkingDelay], a ret -; 0x6b15 ; execute the EFFECTCMDTYPE_AFTER_DAMAGE command of the used Pokemon Power OppAction_6b15: ; 6b15 (1:6b15) @@ -6842,12 +6634,10 @@ OppAction_6b15: ; 6b15 (1:6b15) ld a, $01 ld [wSkipDuelistIsThinkingDelay], a ret -; 0x6b20 OppAction_DrawDuelMainScene: ; 6b20 (1:6b20) call DrawDuelMainScene ret -; 0x6b24 OppAction_TossCoinATimes: ; 6b24 (1:6b24) call SerialRecv8Bytes @@ -6855,7 +6645,6 @@ OppAction_TossCoinATimes: ; 6b24 (1:6b24) ld a, $01 ld [wSkipDuelistIsThinkingDelay], a ret -; 0x6b30 OppAction_6b30: ; 6b30 (1:6b30) ldh a, [hWhoseTurn] @@ -6866,7 +6655,6 @@ OppAction_6b30: ; 6b30 (1:6b30) pop af ldh [hWhoseTurn], a ret -; 0x6b3e OppAction_6b3e: ; 6b3e (1:6b3e) call DrawDuelMainScene @@ -6896,11 +6684,9 @@ OppAction_6b3e: ; 6b3e (1:6b3e) ld a, c ld [wccf0], a ret -; 0x6b7d OppAction_NoAction: ; 6b7d (1:6b7d) ret -; 0x6b7e ; load the text ID of the card name with deck index given in a to TxRam2 ; also loads the card to wLoadedCard1 @@ -6911,7 +6697,6 @@ LoadCardNameToTxRam2: ; 6b7e (1:6b7e) ld a, [wLoadedCard1Name + 1] ld [wTxRam2 + 1], a ret -; 0x6b8e ; load the text ID of the card name with deck index given in a to TxRam2_b ; also loads the card to wLoadedCard1 @@ -6922,12 +6707,10 @@ LoadCardNameToTxRam2_b: ; 6b8e (1:6b8e) ld a, [wLoadedCard1Name + 1] ld [wTxRam2_b + 1], a ret -; 0x6b9e DrawWideTextBox_WaitForInput_Bank1: ; 6b9e (1:6b9e) call DrawWideTextBox_WaitForInput ret -; 0x6ba2 Func_6ba2: ; 6ba2 (1:6ba2) call DrawWideTextBox_PrintText @@ -6936,7 +6719,6 @@ Func_6ba2: ; 6ba2 (1:6ba2) ret z call WaitForWideTextBoxInput ret -; 0x6baf ; apply and/or refresh status conditions and other events that trigger between turns HandleBetweenTurnsEvents: ; 6baf (1:6baf) @@ -7009,7 +6791,6 @@ HandleBetweenTurnsEvents: ; 6baf (1:6baf) call SwapTurn call $6e4c ret -; 0x6c44 ; discard any PLUSPOWER attached to the turn holder's arena and/or bench Pokemon DiscardAttachedPluspowers: ; 6c44 (1:6c44) @@ -7023,7 +6804,6 @@ DiscardAttachedPluspowers: ; 6c44 (1:6c44) jr nz, .unattach_pluspower_loop ld de, PLUSPOWER jp MoveCardToDiscardPileIfInArena -; 0x6c56 ; discard any DEFENDER attached to the turn holder's arena and/or bench Pokemon DiscardAttachedDefenders: ; 6c56 (1:6c56) @@ -7037,7 +6817,6 @@ DiscardAttachedDefenders: ; 6c56 (1:6c56) jr nz, .unattach_defender_loop ld de, DEFENDER jp MoveCardToDiscardPileIfInArena -; 0x6c68 ; return carry if the turn holder's arena Pokemon card is asleep, poisoned, or double poisoned. ; also, if confused, paralyzed, or asleep, return the status condition in a. @@ -7059,7 +6838,6 @@ IsArenaPokemonAsleepOrPoisoned: ; 6c68 (1:6c68) .set_carry scf ret -; 0x6c7e Func_6c7e: ; 6c7e (1:6c7e) ld a, [wDuelDisplayedScreen] @@ -7082,7 +6860,6 @@ Func_6c7e: ; 6c7e (1:6c7e) call DrawDuelHUDs call SwapTurn ret -; 0x6cab Func_6cab: ; 6cab (1:6cab) push af @@ -7113,7 +6890,6 @@ Func_6cab: ; 6cab (1:6cab) jr c, .asm_6cd8 call Func_6c7e.asm_6c98 ret -; 0x6ce4 ; prints the name of the card at wTempNonTurnDuelistCardID in a text box Func_6ce4: ; 6ce4 (1:6ce4) @@ -7129,7 +6905,6 @@ Func_6ce4: ; 6ce4 (1:6ce4) pop hl call DrawWideTextBox_PrintText ret -; 0x6cfa Func_6cfa: ; 6cfa (1:6cfa) ld a, [hl] @@ -7281,7 +7056,6 @@ Func_6df1: ; 6df1 (1:6df1) jr .asm_6e23 .asm_6e37 ret -; 0x6e38 ; apply the status condition at hl+1 to the arena Pokemon ; discard the arena Pokemon's status conditions contained in the bitmask at hl @@ -7301,7 +7075,6 @@ ApplyStatusConditionToArenaPokemon: ; 6e38 (1:6e38) inc hl ld [de], a ret -; 0x6e49 Func_6e49: ; 6e49 (1:6e49) call HandleDestinyBondSubstatus @@ -7369,7 +7142,6 @@ Func_6e49: ; 6e49 (1:6e49) ld [wDuelFinished], a scf jr .asm_6eb2 -; 0x6ed2 Data_6ed2: ; 6ed2 (1:6ed2) db DUEL_NOT_FINISHED, TURN_PLAYER_LOST, TURN_PLAYER_WON, TURN_PLAYER_TIED @@ -7390,21 +7162,18 @@ ClearDamageReductionSubstatus2OfKnockedOutPokemon: ; 6ee2 (1:6ee2) ret nz call ClearDamageReductionSubstatus2 ret -; 0x6ef6 Func_6ef6: ; 6ef6 (1:6ef6) call Func_6fa5 ld hl, wcce8 rl [hl] ret -; 0x6eff Func_6eff: ; 6eff (1:6eff) call ReplaceKnockedOutPokemon ld hl, wcce8 rl [hl] ret -; 0x6f08 ; for each Pokemon in the turn holder's play area (arena and bench), ; move that card to the discard pile if its HP is 0 @@ -7429,7 +7198,6 @@ MoveAllTurnHolderKnockedOutPokemonToDiscardPile: ; 6f08 (1:6f08) dec d jr nz, .loop ret -; 0x6f23 ; have the turn holder replace the arena Pokemon card when it's been knocked out. ; if there are no Pokemon cards in the turn holder's bench, return carry. @@ -7505,7 +7273,6 @@ ReplaceKnockedOutPokemon: ; 6f23 (1:6f23) call SerialRecv8Bytes ldh [hTempPlayAreaLocation_ff9d], a jr .replace_pokemon -; 0x6fa5 Func_6fa5: ; 6fa5 (1:6fa5) call CountKnockedOutPokemon @@ -7523,7 +7290,6 @@ Func_6fa5: ; 6fa5 (1:6fa5) call SwapTurn scf ret -; 0x6fc7 ; return in wNumberPrizeCardsToTake the amount of Pokemon in the turn holder's ; play area that are still there despite having 0 HP. @@ -7563,7 +7329,6 @@ CountKnockedOutPokemon: ; 6fc7 (1:6fc7) ret z scf ret -; 0x6ff7 Func_6ff7: ; 6ff7 (1:6ff7) ld a, DUELVARS_NUMBER_OF_POKEMON_IN_PLAY_AREA @@ -7581,7 +7346,6 @@ Func_6ff7: ; 6ff7 (1:6ff7) .non_zero_hp or a ret -; 0x700a ; print one of the "There was no effect from" texts depending ; on the value at wNoEffectFromStatus (NO_STATUS or a status condition constant) @@ -7619,7 +7383,6 @@ PrintThereWasNoEffectFromStatusText: ; 700a (1:700a) ret z ldtx hl, ThereWasNoEffectFromToxicText ret -; 0x7045 ; returns carry if card at hTempPlayAreaLocation_ff9d ; is a basic card. @@ -7700,7 +7463,6 @@ GetCardOneStageBelow: ; 7045 (1:7045) ld e, a or a ret -; 0x70aa ; initializes variables when a duel begins, such as zeroing wDuelFinished or wDuelTurns, ; and setting wDuelType based on wPlayerDuelistType and wOpponentDuelistType @@ -7731,7 +7493,6 @@ InitVariablesToBeginDuel: ; 70aa (1:70aa) .set_duel_type ld [wDuelType], a ret -; 0x70e6 ; init variables that last a single player's turn InitVariablesToBeginTurn: ; 70e6 (1:70e6) @@ -7742,7 +7503,6 @@ InitVariablesToBeginTurn: ; 70e6 (1:70e6) ldh a, [hWhoseTurn] ld [wWhoseTurn], a ret -; 0x70f6 ; make all Pokemon in the turn holder's play area able to evolve. called from the ; player's second turn on, in order to allow evolution of all Pokemon already played. @@ -7758,7 +7518,6 @@ SetAllPlayAreaPokemonCanEvolve: ; 70f6 (1:70f6) dec c jr nz, .next_pkmn_loop ret -; 0x7107 ; initializes duel variables such as cards in deck and in hand, or Pokemon in play area ; player turn: [c200, c2ff] @@ -7801,7 +7560,6 @@ InitializeDuelVariables: ; 7107 (1:7107) dec c jr nz, .init_play_area ret -; 0x7133 ; draw [wDuelInitialPrizes] cards from the turn holder's deck and place them as prizes: ; write their deck indexes to DUELVARS_PRIZE_CARDS, set their location to @@ -7834,11 +7592,9 @@ InitTurnDuelistPrizes: ; 7133 (1:7133) ld l, DUELVARS_PRIZES ld [hl], a ret -; 0x715a PrizeBitmasks: ; 715a (1:715a) db %0, %1, %11, %111, %1111, %11111, %111111 -; 0x7161 ; update the turn holder's DUELVARS_PRIZES following that duelist ; drawing a number of prizes equal to register a @@ -7860,7 +7616,6 @@ TakeAPrizes: ; 7161 (1:7161) call GetTurnDuelistVariable ld [hl], b ret -; 0x717a ; clear the non-turn holder's duelvars starting at DUELVARS_ARENA_CARD_DISABLED_MOVE_INDEX ; these duelvars only last a two-player turn at most. @@ -7877,7 +7632,6 @@ ClearNonTurnTemporaryDuelvars: ; 717a (1:717a) ld [hli], a ld [hl], a ret -; 0x7189 ; same as ClearNonTurnTemporaryDuelvars, except the non-turn holder's arena ; Pokemon status condition is copied to wccc5 @@ -7887,7 +7641,6 @@ ClearNonTurnTemporaryDuelvars_CopyStatus: ; 7189 (1:7189) ld [wccc5], a call ClearNonTurnTemporaryDuelvars ret -; 0x7195 ; update non-turn holder's DUELVARS_ARENA_CARD_LAST_TURN_DAMAGE ; if wccef == 0: set to [wDealtDamage] @@ -7908,7 +7661,6 @@ Func_7195: ; 7195 (1:7195) ld [hli], a ld [hl], a ret -; 0x71ad _TossCoin: ; 71ad (1:71ad) ld [wcd9c], a @@ -8115,7 +7867,6 @@ Func_7415: ; 7415 (1:7415) xor a ld [wce7e], a ret -; 0x741a Func_741a: ; 741a (1:741a) ld hl, wEffectFunctionsFeedbackIndex @@ -8165,7 +7916,6 @@ Func_741a: ; 741a (1:741a) jr .loop .done ret -; 0x7469 ; this is a simple version of PlayAttackAnimation_DealAttackDamage that doesn't ; take into account status conditions, damage modifiers, etc, for damage calculation. @@ -8187,7 +7937,6 @@ PlayAttackAnimation_DealAttackDamageSimple: ; 7469 (1:7469) pop de pop hl ret -; 0x7484 ; if [wLoadedMoveAnimation] != 0, wait until the animation is over WaitMoveAnimation: ; 7484 (1:7484) @@ -8201,7 +7950,6 @@ WaitMoveAnimation: ; 7484 (1:7484) jr c, .anim_loop pop de ret -; 0x7494 ; play move animation ; input: @@ -8269,12 +8017,10 @@ Func_758f: ; 758f (1:758f) Func_7594: ; 7594 (1:7594) farcall Func_1a61f ret -; 0x7599 Func_7599: ; 7599 (1:7599) farcall Func_1a68d ret -; 0x759e rept $a62 db $ff diff --git a/src/engine/bank02.asm b/src/engine/bank02.asm index 203d4bc..eefd707 100644 --- a/src/engine/bank02.asm +++ b/src/engine/bank02.asm @@ -794,7 +794,7 @@ DrawPlayArea_PrizeCards: ; 8464 (2:4464) pop af ret -PrizeCardsCoordinateData_YourOrOppPlayArea: ; 0x84b4 (2:44b4) +PrizeCardsCoordinateData_YourOrOppPlayArea: ; 84b4 (2:44b4) ; x and y coordinates for player prize cards .player db 2, 1 @@ -813,7 +813,7 @@ PrizeCardsCoordinateData_YourOrOppPlayArea: ; 0x84b4 (2:44b4) db 5, 15 ; used by Func_833c -PrizeCardsCoordinateData_2: ; 0x84cc (2:44cc) +PrizeCardsCoordinateData_2: ; 84cc (2:44cc) ; x and y coordinates for player prize cards .player db 6, 0 @@ -831,7 +831,7 @@ PrizeCardsCoordinateData_2: ; 0x84cc (2:44cc) db 0, 18 db 0, 16 -PrizeCardsCoordinateData_InPlayArea: ; 0x84e4 (2:44e4) +PrizeCardsCoordinateData_InPlayArea: ; 84e4 (2:44e4) ; x and y coordinates for player prize cards .player db 9, 1 @@ -1826,7 +1826,6 @@ ZeroObjectPositionsWithCopyToggleOn: ; 8aa1 (2:4aa1) ld a, $01 ld [wVBlankOAMCopyToggle], a ret -; 0x8aaa Func_8aaa: ; 8aaa (2:4aaa) INCROM $8aaa, $8b85 diff --git a/src/engine/bank03.asm b/src/engine/bank03.asm index d96d7ff..a0dd8c5 100644 --- a/src/engine/bank03.asm +++ b/src/engine/bank03.asm @@ -1160,7 +1160,6 @@ Func_c8ba: ; c8ba (3:48ba) call DoFrameIfLCDEnabled call $2c62 ret -; 0xc8ed Func_c8ed: ; c8ed (3:48ed) push hl @@ -1433,7 +1432,6 @@ GetEventFlagValue: ; ca6c (3:4a6c) pop hl or a ret -; 0xca84 ZeroStackFlagValue2: ; ca84 (3:4a84) call GetByteAfterCall @@ -1491,7 +1489,6 @@ GetByteAfterCall: ; cab3 (3:4ab3) pop bc pop hl ret -; 0xcac2 MaxStackFlagValue: ; cac2 (3:4ac2) call GetByteAfterCall @@ -1503,7 +1500,6 @@ MaxOutEventFlag: ; cac5 (3:4ac5) call SetEventFlagValue pop bc ret -; 0xcacd ZeroStackFlagValue: ; cacd (3:4acd) call GetByteAfterCall @@ -1559,7 +1555,6 @@ TryGiveMedalPCPacks: ; cad8 (3:4ad8) pop bc pop hl ret -; 0xcb15 MedalEventFlags: ; cb15 (3:4b15) db EVENT_FLAG_08 @@ -3109,7 +3104,6 @@ ScriptCommand_JumpIfFlagZero2: .fail call SetScriptControlByteFail jp IncreaseScriptPointerBy4 -; 0xd4ec LoadOverworld: ; d4ec (3:54ec) call Func_d4fb @@ -3744,7 +3738,6 @@ Script_Ronald: ; dc4b (3:5c4b) .ows_dc60 run_command ScriptCommand_PrintTextQuitFully tx Text0743 -; 0xdc63 ; could be a commented function, or could be placed by mistake from ; someone thinking that the Ronald script ended with more code execution @@ -3796,7 +3789,6 @@ Script_Imakuni: ; dd0d (3:5d0d) db IMAKUNI_DECK_ID db MUSIC_IMAKUNI run_command ScriptCommand_QuitScriptFully -; 0xdd2d Script_BeatImakuni: ; dd2d (3:5d2d) start_script @@ -3874,7 +3866,6 @@ ScriptJump_ImakuniCommon: ; dd60 (3:5d60) db $09 run_command Func_d41d run_command ScriptCommand_QuitScriptFully -; 0xdd78 NPCMovement_dd78: ; dd78 (3:5d78) db SOUTH @@ -3907,7 +3898,6 @@ Preload_ImakuniInWaterClubLobby: ; e0b0 (3:60b0) ld [wd111], a scf ret -; 0xe0cf Script_Gal1: ; e0cf (3:60cf) start_script @@ -4561,7 +4551,6 @@ FindEndOfBattleScript: ; e52c (3:652c) inc hl ld b, [hl] jp SetNextNPCAndScript -; 0xe553 GrassClubEntranceAfterDuelTable: ; e553 (3:6553) db NPC_MICHAEL @@ -4660,7 +4649,6 @@ Script_LostToBrittany: ; e618 (3:6618) start_script run_command ScriptCommand_PrintTextQuitFully tx Text06e9 -; 0xe61c Script_e61c: ; e61c (3:661c) run_command ScriptCommand_PrintTextQuitFully @@ -5463,7 +5451,6 @@ Func_f121: ; f121 (3:7121) jr nz, .asm_f123 or a ret -; 0xf146 Unknown_f146: ; f146 (3:7146) INCROM $f146, $f156 @@ -5518,7 +5505,6 @@ Preload_Guide: ; f270 (3:7270) .asm_f281 scf ret -; 0xf283 Script_Guide: ; f283 (3:7283) start_script diff --git a/src/engine/bank04.asm b/src/engine/bank04.asm index 13df81b..0f59899 100644 --- a/src/engine/bank04.asm +++ b/src/engine/bank04.asm @@ -832,7 +832,6 @@ Func_1157c: ; 1157c (4:557c) .asm_1159f call $5238 ret -; 0x115a3 Func_115a3: ; 115a3 (4:55a3) INCROM $115a3, $1162a diff --git a/src/engine/bank05.asm b/src/engine/bank05.asm index 170c45c..6af2582 100644 --- a/src/engine/bank05.asm +++ b/src/engine/bank05.asm @@ -26,27 +26,22 @@ AIActionTable_Unreferenced: ; 1406a (5:406a) ld a, OPPACTION_FINISH_NO_ATTACK bank1call AIMakeDecision ret -; 0x1409e .star_duel ; 1409e (5:409e) call AIPlayInitialBasicCards ret -; 0x140a2 .forced_switch ; 140a2 (5:40a2) call AIDecideBenchPokemonToSwitchTo ret -; 0x140a6 .ko_switch ; 140a6 (5:40a6) call AIDecideBenchPokemonToSwitchTo ret -; 0x140aa .take_prize ; 140aa (5:40aa) call AIPickPrizeCards ret -; 0x140ae ; returns carry if damage dealt from any of ; a card's moves KOs defending Pokémon @@ -72,7 +67,6 @@ CheckIfMoveKnocksOutDefendingCard: ; 140b5 (5:40b5) ret nz scf ret -; 0x140c5 ; returns carry if any of the defending Pokémon's attacks ; brings card at hTempPlayAreaLocation_ff9d down @@ -96,7 +90,6 @@ CheckIfAnyDefendingPokemonAttackDealsSameDamageAsHP: ; 140c5 (5:40c5) .true scf ret -; 0x140df ; checks AI scores for all benched Pokémon ; returns the location of the card with highest score @@ -126,7 +119,6 @@ FindHighestBenchScore: ; 140df (5:40df) ldh [hTempPlayAreaLocation_ff9d], a or a ret -; 0x140fe ; adds a to wAIScore ; if there's overflow, it's capped at $ff @@ -142,7 +134,6 @@ AddToAIScore: ; 140fe (5:40fe) ld [hl], a pop hl ret -; 0x1410a ; subs a from wAIScore ; if there's underflow, it's capped at $00 @@ -162,7 +153,6 @@ SubFromAIScore: ; 1410a (5:410a) pop de pop hl ret -; 0x1411d ; loads defending Pokémon's weakness/resistance ; and the number of prize cards in both sides @@ -181,7 +171,6 @@ LoadDefendingPokemonColorWRAndPrizeCards: ; 1411d (5:411d) call CountPrizes ld [wAIOpponentPrizeCount], a ret -; 0x14145 ; called when AI has chosen its attack. ; executes all effects and damage. @@ -220,7 +209,6 @@ AITryUseAttack: ; 14145 (5:4145) ld a, OPPACTION_ATTACK_ANIM_AND_DAMAGE bank1call AIMakeDecision ret -; 0x14184 ; return carry if any of the following is satisfied: ; - deck index in a corresponds to a double colorless energy card; @@ -293,7 +281,6 @@ CheckIfEnergyIsUseful: ; 14184 (5:4184) pop de scf ret -; 0x141da ; pick a random Pokemon in the bench. ; output: @@ -305,7 +292,6 @@ PickRandomBenchPokemon: ; 141da (5:41da) call Random inc a ret -; 0x141e5 AIPickPrizeCards: ; 141e5 (5:41e5) ld a, [wNumberPrizeCardsToTake] @@ -320,7 +306,6 @@ AIPickPrizeCards: ; 141e5 (5:41e5) jr nz, .loop .done ret -; 0x141f8 ; picks a prize card at random ; and adds it to the hand. @@ -367,7 +352,6 @@ AIPickPrizeCards: ; 141e5 (5:41e5) db $1 << 5 db $1 << 6 db $1 << 7 -; 0x14226 ; routine for AI to play all Basic cards from its hand ; in the beginning of the Duel. @@ -394,7 +378,6 @@ AIPlayInitialBasicCards: ; 14226 (5:4226) call PutHandPokemonCardInPlayArea pop hl jr .check_for_next_card -; 0x1424b ; returns carry if Pokémon at hTempPlayAreaLocation_ff9d ; can't use a move or if that selected move doesn't have enough energy @@ -429,7 +412,6 @@ CheckIfSelectedMoveIsUnusable: ; 1424b (5:424b) ld a, MOVE_FLAG2_ADDRESS | FLAG_2_BIT_5_F call CheckLoadedMoveFlag ret -; 0x14279 ; load selected move from Pokémon in hTempPlayAreaLocation_ff9d ; and checks if there is enough energy to execute the selected move @@ -534,7 +516,6 @@ CheckEnergyNeededForAttack: ; 14279 (5:4279) ld d, 0 scf ret -; 0x142f4 ; takes as input the energy cost of a move for a ; particular energy, stored in the lower nibble of a @@ -569,7 +550,6 @@ CheckIfEnoughParticularAttachedEnergy: ; 142f4 (5:42f4) inc b scf ret -; 0x1430f ; input: ; a = energy type @@ -661,7 +641,6 @@ CheckIfCardCanBePlayed: ; 1433d (5:433d) ld a, EFFECTCMDTYPE_INITIAL_EFFECT_1 call TryExecuteEffectCommandFunction ret -; 0x1438c ; loads all the energy cards ; in hand in wDuelTempList @@ -704,7 +683,6 @@ CreateEnergyCardListFromHand: ; 1438c (5:438c) cp $ff ccf ret -; 0x143bf ; looks for card ID in hand and ; sets carry if a card wasn't found @@ -752,7 +730,6 @@ LookForCardIDInHand: ; 143bf (5:43bf) pop hl or a ret -; 0x143e5 ; stores in wDamage, wAIMinDamage and wAIMaxDamage the calculated damage ; done to the defending Pokémon by a given card and move @@ -966,7 +943,6 @@ _CalculateDamage_VersusDefendingPokemon: ; 14462 (5:4462) ld a, $ff ld [hl], a ret -; 0x1450b ; stores in wDamage, wAIMinDamage and wAIMaxDamage the calculated damage ; done to the Pokémon at hTempPlayAreaLocation_ff9d @@ -1207,7 +1183,6 @@ CalculateDamage_FromDefendingPokemon: ; 1458c (5:458c) ld a, $ff ld [hl], a ret -; 0x14663 AIProcessHandTrainerCards: ; 14663 (5:4663) farcall _AIProcessHandTrainerCards @@ -1243,7 +1218,6 @@ LookForCardIDInHandList_Bank5: ; 155d2 (5:55d2) ldh a, [hTempCardIndex_ff98] scf ret -; 0x155ef ; returns carry if card ID in a ; is found in Play Area, starting with @@ -1280,7 +1254,6 @@ LookForCardIDInPlayArea_Bank5: ; 155ef (5:55ef) ld a, b scf ret -; 0x15612 ; check if energy card ID in e is in AI hand and, ; if so, attaches it to card ID in d in Play Area. @@ -1305,7 +1278,6 @@ AIAttachEnergyInHandToCardInPlayArea: ; 15612 (5:5612) ld a, OPPACTION_PLAY_ENERGY bank1call AIMakeDecision ret -; 0x1562b ; same as AIAttachEnergyInHandToCardInPlayArea but ; only look for card ID in the Bench. @@ -1317,7 +1289,6 @@ AIAttachEnergyInHandToCardInBench: ; 1562b (5:562b) ret nc ld b, PLAY_AREA_BENCH_1 jr AIAttachEnergyInHandToCardInPlayArea.attach -; 0x15636 InitAIDuelVars: ; 15636 (5:5636) ld a, $10 @@ -1417,7 +1388,6 @@ InitAITurnVars: ; 15649 (5:5649) ld [wAIBarrierFlagCounter], a .done ret -; 0x156c3 ; load selected move from Pokémon in hTempPlayAreaLocation_ff9d, ; gets an energy card to discard and subsequently @@ -1534,7 +1504,6 @@ CheckEnergyNeededForAttackAfterDiscard: ; 156c3 (5:56c3) ld d, 0 scf ret -; 0x1575e ; zeroes a bytes starting at hl ClearMemory_Bank5: ; 1575e (5:575e) @@ -1551,7 +1520,6 @@ ClearMemory_Bank5: ; 1575e (5:575e) pop bc pop af ret -; 0x1576b ; returns in a the tens digit of value in a CalculateByteTensDigit: ; 1576b (5:576b) @@ -1566,7 +1534,6 @@ CalculateByteTensDigit: ; 1576b (5:576b) ld a, c pop bc ret -; 0x15778 ; returns in a the result of ; dividing b by a, rounded down @@ -1588,7 +1555,6 @@ CalculateBDividedByA_Bank5: ; 15778 (5:5778) ld a, c pop bc ret -; 0x15787 ; returns in a the number of energy cards attached ; to Pokémon in location held by e @@ -1623,7 +1589,6 @@ CountNumberOfEnergyCardsAttached: ; 15787 (5:5787) pop bc pop hl ret -; 0x157a3 ; returns carry if any card with ID in e is found ; in card location in a @@ -1660,7 +1625,6 @@ CheckIfAnyCardIDinLocation: ; 157a3 (5:57a3) ld a, e scf ret -; 0x157c6 ; counts total number of energy cards in opponent's hand ; plus all the cards attached in Turn Duelist's Play Area. @@ -1699,7 +1663,6 @@ CountOppEnergyCardsInHandAndAttached: ; 157c6 (5:57c6) dec d jr nz, .loop_play_area ret -; 0x157f3 ; returns carry if any card with ID in e is found ; in the list that is pointed by hl. @@ -1751,7 +1714,6 @@ RemoveCardIDInList: ; 157f3 (5:57f3) pop hl or a ret -; 0x1581b ; play Pokemon cards from the hand to set the starting ; Play Area of Boss decks. @@ -1787,7 +1749,6 @@ TrySetUpBossStartingPlayArea: ; 1581b (5:581b) .set_carry scf ret -; 0x1583f ; runs through input card ID list in de. ; plays to Play Area first card that is found in hand. @@ -1825,7 +1786,6 @@ TrySetUpBossStartingPlayArea: ; 1581b (5:581b) .not_found scf ret -; 0x1585b Func_1585b: ; 1585b (5:585b) INCROM $1585b, $158b2 @@ -2264,7 +2224,6 @@ AIDecideWhetherToRetreat: ; 158b2 (5:58b2) pop de jr nc, .loop_ko_3 jr .set_carry -; 0x15b54 ; if player's turn and loaded move is not a Pokémon Power OR ; if opponent's turn and wcddb == 0 @@ -2291,7 +2250,6 @@ Func_15b54: ; 15b54 (5:5b54) ld a, %10000000 ld [wcdda], a ret -; 0x15b72 ; calculates AI score for bench Pokémon ; returns in a and [hTempPlayAreaLocation_ff9d] the @@ -2595,7 +2553,6 @@ AIDecideBenchPokemonToSwitchTo: ; 15b72 (5:5b72) xor a ld [wcdb4], a jp FindHighestBenchScore -; 0x15d4f ; handles AI action of retreating Arena Pokémon ; and chooses which energy cards to discard. @@ -2842,7 +2799,6 @@ AITryToRetreat: ; 15d4f (5:5d4f) bank1call AIMakeDecision or a ret -; 0x15ea6 ; Copy cards from wDuelTempList in hl to wHandTempList in de CopyHandCardList: ; 15ea6 (5:5ea6) @@ -3377,7 +3333,6 @@ Func_16120: ; 16120 (5:6120) cp 3 jr c, .lower_score jr .check_muk -; 0x161d5 ; determine AI score for the legendary cards ; Moltres, Zapdos and Articuno @@ -3481,7 +3436,6 @@ Func_161d5: ; 161d5 (5:61d5) call CountPokemonIDInBothPlayAreas jr c, .subtract ret -; 0x16270 ; check if player's active Pokémon is Mr Mime ; if it isn't, set carry @@ -3508,7 +3462,6 @@ CheckDamageToMrMime: ; 16270 (5:6270) .set_carry scf ret -; 0x1628f ; returns carry if arena card ; can knock out defending Pokémon @@ -3525,7 +3478,6 @@ CheckIfActiveCardCanKnockOut: ; 1628f (5:628f) .fail or a ret -; 0x162a1 ; outputs carry if any of the active Pokémon attacks ; can be used and are not residual @@ -3556,7 +3508,6 @@ CheckIfActivePokemonCanUseAnyNonResidualMove: ; 162a1 (5:62a1) .ok scf ret -; 0x162c8 ; looks for energy card(s) in hand depending on ; what is needed for selected card, for both moves @@ -3618,7 +3569,6 @@ LookForEnergyNeededInHand: ; 162c8 (5:62c8) call LookForCardIDInHandList_Bank5 ret c jr .no_carry -; 0x16311 ; looks for energy card(s) in hand depending on ; what is needed for selected card and move @@ -3665,7 +3615,6 @@ LookForEnergyNeededForMoveInHand: ; 16311 (5:6311) call LookForCardIDInHandList_Bank5 ret c jr .done -; 0x1633f ; goes through $00 terminated list pointed ; by wAICardListPlayFromHandPriority and compares it to each card in hand. @@ -3726,7 +3675,6 @@ SortTempHandByIDList: ; 1633f (5:633f) .not_same inc hl jr .next_hand_card -; 0x1637b ; looks for energy card(s) in list at wDuelTempList ; depending on energy flags set in a @@ -3791,7 +3739,6 @@ CheckEnergyFlagsNeededInList: ; 1637b (5:637b) .no_carry or a ret -; 0x163c9 ; returns in a the energy cost of both moves from card index in a ; represented by energy flags @@ -3813,7 +3760,6 @@ GetMovesEnergyCostBits: ; 163c9 (5:63c9) pop bc or b ret -; 0x163dd ; returns in a the energy cost of a move in [hl] ; represented by energy flags @@ -3880,7 +3826,6 @@ GetEnergyCostBits: ; 163dd (5:63dd) .done ld a, c ret -; 0x16422 ; set carry flag if any card in ; wDuelTempList evolves card index in a @@ -3925,7 +3870,6 @@ CheckForEvolutionInList: ; 16422 (5:6422) ld [hl], a or a ret -; 0x16451 ; set carry if it finds an evolution for ; the card index in a in the deck @@ -3977,7 +3921,6 @@ CheckForEvolutionInDeck: ; 16451 (5:6451) ld a, e scf ret -; 0x16488 Func_16488: ; 16488 (5:6488) INCROM $16488, $164a1 @@ -4048,7 +3991,6 @@ RetrievePlayAreaAIScoreFromBackup1: ; 164d3 (5:64d3) ld [wAIScore], a pop af ret -; 0x164e8 ; have AI decide whether to play energy card from hand ; and determine which card is best to attach it. @@ -4352,7 +4294,6 @@ AIProcessEnergyCards: ; 164fc (5:64fc) .no_carry or a ret -; 0x16695 ; checks score related to selected move, ; in order to determine whether to play energy card. @@ -4552,7 +4493,6 @@ DetermineAIScoreOfMoveEnergyRequirement: ; 16695 (5:6695) pop af ld [hl], a ret -; 0x167b5 ; returns in hTempPlayAreaLocation_ff9d the Play Area location ; of the card with the highest Play Area AI score, unless @@ -4630,7 +4570,6 @@ FindPlayAreaCardWithHighestAIScore: ; 167b5 (5:67b5) .no_carry or a ret -; 0x16805 ; returns carry if there's an evolution card ; that can evolve card in hTempPlayAreaLocation_ff9d, @@ -4670,7 +4609,6 @@ CheckIfEvolutionNeedsEnergyForMove: ; 16805 (5:6805) ld [hl], a scf ret -; 0x1683b ; returns in e the card ID of the energy required for ; the Discard/Energy Boost attack loaded in wSelectedAttack. @@ -4763,7 +4701,6 @@ GetEnergyCardForDiscardOrEnergyBoostAttack: ; 1683b (5:683b) lb bc, $00, $01 scf ret -; 0x1689f ; called after the AI has decided which card to attach ; energy from hand. AI does checks to determine whether @@ -4929,7 +4866,6 @@ AITryToPlayEnergyCard: ; 1689f (5:689f) or a jp z, .second_attack ret -; 0x1696e ; check if playing certain decks so that AI can decide whether to play ; double colorless to some specific cards. @@ -5016,7 +4952,6 @@ CheckSpecificDecksToAttachDoubleColorless: ; 1696e (5:696e) call GetCardIDFromDeckIndex ld a, e ret -; 0x169ca ; have AI choose an attack to use, but do not execute it. ; return carry if an attack is chosen. @@ -5059,7 +4994,6 @@ RetrievePlayAreaAIScoreFromBackup2: ; 169e3 (5:69e3) ld [wAIScore], a pop af ret -; 0x169f8 ; have AI choose and execute an attack. ; return carry if an attack was chosen and attempted. @@ -5189,7 +5123,6 @@ AIProcessAttacks: ; 169fc (5:69fc) inc [hl] or a ret -; 0x16a86 ; determines the AI score of attack index in a ; of card in Play Area location hTempPlayAreaLocation_ff9d. @@ -5741,7 +5674,6 @@ GetAIScoreOfAttack: ; 16a86 (5:6a86) .done ret -; 0x16dcd ; this function handles moves with the FLAG_3_BIT_1 set, ; and makes specific checks in each of these moves @@ -6143,7 +6075,6 @@ HandleHyperBeam: ; 17005 (5:7005) .keep_score ld a, $80 ret -; 0x17019 ; called when second attack is determined by AI to have ; more AI score than the first attack, so that it checks @@ -6194,7 +6125,6 @@ CheckWhetherToSwitchToFirstAttack: ; 17019 (5:7019) ld a, $01 ld [wSelectedAttack], a ret -; 0x17057 ; returns carry if there are ; any basic Pokémon cards in deck. @@ -6226,7 +6156,6 @@ CheckIfAnyBasicPokemonInDeck: ; 17057 (5:7057) .set_carry scf ret -; 0x17080 ; checks in other Play Area for non-basic cards. ; afterwards, that card is checked for damage, @@ -6288,7 +6217,6 @@ LookForCardThatIsKnockedOutOnDevolution: ; 17080 (5:7080) ld a, c scf ret -; 0x170c9 ; returns carry if the following conditions are met: ; - arena card HP >= half max HP @@ -6331,7 +6259,6 @@ CheckIfArenaCardIsAtHalfHPCanEvolveAndUseSecondMove: ; 170c9 (5:70c9) .no_carry or a ret -; 0x17101 ; count Pokemon in the Bench that ; meet the following conditions: @@ -6418,7 +6345,6 @@ CountNumberOfSetUpBenchPokemon: ; 17101 (5:7101) ret z scf ret -; 0x17161 ; handles AI logic to determine some selections regarding certain attacks, ; if any of these attacks were chosen to be used. @@ -6433,7 +6359,6 @@ AISelectSpecialAttackParameters: ; 17161 (5:7161) ld a, b ld [wSelectedAttack], a ret -; 0x1716e .SelectAttackParameters: ; 1716e (5:716e) ld a, DUELVARS_ARENA_CARD @@ -6551,7 +6476,6 @@ AISelectSpecialAttackParameters: ; 17161 (5:7161) ldh [hTempPlayAreaLocation_ffa1], a scf ret -; 0x171fb ; return carry if Pokémon at play area location ; in hTempPlayAreaLocation_ff9d does not have @@ -6622,7 +6546,6 @@ CheckIfNoSurplusEnergyForMove: ; 171fb (5:71fb) ; exactly the amount of energy needed scf ret -; 0x17258 ; takes as input the energy cost of a move for a ; particular energy, stored in the lower nibble of a @@ -6656,7 +6579,6 @@ CalculateParticularAttachedEnergyNeeded: ; 17258 (5:7258) pop bc ld [wTempLoadedMoveEnergyNeededAmount], a jr .done -; 0x17274 ; return carry if there is a card that ; can evolve a Pokémon in hand or deck. @@ -6709,7 +6631,6 @@ CheckCardEvolutionInHandOrDeck: ; 17274 (5:7274) ld a, e scf ret -; 0x172af ; sets up the inital hand of boss deck. ; always draws at least 2 Basic Pokemon cards and 2 Energy cards. @@ -6843,7 +6764,6 @@ SetUpBossStartingHandAndDeck: ; 172af (5:72af) dec b jr nz, .draw_loop ret -; 0x17366 ; expectation: return carry if card ID corresponding ; to the input deck index is listed in wAICardListAvoidPrize; @@ -6879,7 +6799,6 @@ SetUpBossStartingHandAndDeck: ; 172af (5:72af) pop hl or a ret -; 0x17383 ; returns carry if Pokemon at PLAY_AREA* in a ; can damage defending Pokémon with any of its moves @@ -6914,7 +6833,6 @@ CheckIfCanDamageDefendingPokemon: ; 17383 (5:7383) .set_carry scf ret -; 0x173b1 ; checks if defending Pokémon can knock out ; card at hTempPlayAreaLocation_ff9d with any of its moves @@ -6958,7 +6876,6 @@ CheckIfDefendingPokemonCanKnockOut: ; 173b1 (5:73b1) .set_carry scf ret -; 0x173e4 ; return carry if defending Pokémon can knock out ; card at hTempPlayAreaLocation_ff9d @@ -6997,7 +6914,6 @@ CheckIfDefendingPokemonCanKnockOutWithMove: ; 173e4 (5:73e4) .done or a ret -; 0x17414 ; sets carry if Opponent's deck ID ; is between LEGENDARY_MOLTRES_DECK_ID (inclusive) @@ -7018,7 +6934,6 @@ CheckIfOpponentHasBossDeckID: ; 17414 (5:7414) pop af or a ret -; 0x17426 ; sets carry if not a boss fight ; and if s0a00a == 0 @@ -7037,7 +6952,6 @@ CheckIfNotABossDeckID: ; 17426 (5:7426) .set_carry scf ret -; 0x1743b ; probability to return carry: ; - 50% if deck AI is playing is on the list; @@ -7085,7 +6999,6 @@ AIChooseRandomlyNotToDoAction: ; 1743b (5:743b) pop de pop hl ret -; 0x17474 ; checks if any bench Pokémon has same ID ; as input, and sets carry if it has more than @@ -7154,7 +7067,6 @@ CheckForBenchIDAtHalfHPAndCanUseSecondMove: ; 17474 (5:7474) ret z scf ret -; 0x174cd ; add 5 to wPlayAreaEnergyAIScore AI score corresponding to all cards ; in bench that have same ID as register a @@ -7186,7 +7098,6 @@ RaiseAIScoreToAllMatchingIDsInBench: ; 174cd (5:74cd) ld [hl], a pop hl jr .loop -; 0x174f2 ; goes through each play area Pokémon, and ; for all cards of the same ID, determine which @@ -7310,7 +7221,6 @@ Func_174f2: ; 174f2 (5:74f2) pop de pop hl jp .loop_play_area -; 0x17583 ; loads wcdea + play area location in e ; with nenergy * 2 + $80 - floor(dam / 10) @@ -7340,7 +7250,6 @@ Func_17583: ; 17583 (5:7583) pop de pop hl ret -; 0x175a8 ; counts how many play area locations in wcdea ; are != 0, and outputs result in a @@ -7361,7 +7270,6 @@ Func_175a8: ; 175a8 (5:75a8) ld a, d cp 2 ret -; 0x175bd ; handle how AI scores giving out Energy Cards ; when using Legendary Articuno deck @@ -7373,7 +7281,6 @@ HandleLegendaryArticunoEnergyScoring: ; 175bd (5:75bd) .articuno_deck call ScoreLegendaryArticunoCards ret -; 0x175c9 Func_175c9: ; 175c9 (5:75c9) INCROM $175c9, $18000 diff --git a/src/engine/bank06.asm b/src/engine/bank06.asm index 8d6f75a..604effb 100644 --- a/src/engine/bank06.asm +++ b/src/engine/bank06.asm @@ -150,7 +150,6 @@ _CopyCardNameAndLevel_HalfwidthText: pop de pop bc ret -; 0x180d5 ; this function is called when the player is shown the "In Play Area" screen. ; it can be called with either the select button (DuelMenuShortcut_BothActivePokemon), @@ -1582,7 +1581,6 @@ Func_1a61f: ; 1a61f (6:661f) call ResumeSong bank1call OpenCardPage_FromHand ret -; 0x1a68d Func_1a68d: ; 1a68d (6:668d) ld a, $c2 ; player's turn diff --git a/src/engine/bank07.asm b/src/engine/bank07.asm index f5b1629..72b422a 100644 --- a/src/engine/bank07.asm +++ b/src/engine/bank07.asm @@ -326,7 +326,6 @@ Func_1c58e: ; 1c58e (7:458e) pop bc pop hl ret -; 0x1c5b9 Func_1c5b9: ; 1c5b9 (7:45b9) INCROM $1c5b9, $1c5e9 diff --git a/src/engine/bank08.asm b/src/engine/bank08.asm index a7a5466..272f7c7 100644 --- a/src/engine/bank08.asm +++ b/src/engine/bank08.asm @@ -194,7 +194,6 @@ _AIProcessHandTrainerCards: ; 200e5 (8:40e5) .pop_hl pop hl jp .loop_hand -; 0x201b5 ; makes AI use Potion card. AIPlay_Potion: ; 201b5 (8:41b5) @@ -212,7 +211,6 @@ AIPlay_Potion: ; 201b5 (8:41b5) ld a, OPPACTION_EXECUTE_TRAINER_EFFECTS bank1call AIMakeDecision ret -; 0x201d1 ; if AI doesn't decide to retreat this card, ; check if defending Pokémon can KO active card @@ -256,7 +254,6 @@ AIDecide_Potion1: ; 201d1 (8:41d1) .no_carry or a ret -; 0x20204 ; finds a card in Play Area to use Potion on. ; output: @@ -356,7 +353,6 @@ AIDecide_Potion2: ; 20204 (8:4204) .no_carry or a ret -; 0x2027e ; return carry if either of the attacks are usable ; and have the BOOST_IF_TAKEN_DAMAGE effect. @@ -385,7 +381,6 @@ AIDecide_Potion2: ; 20204 (8:4204) pop de scf ret -; 0x202a8 ; makes AI use Super Potion card. AIPlay_SuperPotion: ; 202a8 (8:42a8) @@ -406,7 +401,6 @@ AIPlay_SuperPotion: ; 202a8 (8:42a8) ld a, OPPACTION_EXECUTE_TRAINER_EFFECTS bank1call AIMakeDecision ret -; 0x202cc ; if AI doesn't decide to retreat this card and card has ; any energy cards attached, check if defending Pokémon can KO @@ -451,7 +445,6 @@ AIDecide_SuperPotion1: ; 202cc (8:42cc) .no_carry or a ret -; 0x20305 ; returns carry if card has energies attached. .check_attached_energy ; 20305 (8:4305) @@ -461,7 +454,6 @@ AIDecide_SuperPotion1: ; 202cc (8:42cc) ret z scf ret -; 0x2030f ; finds a card in Play Area to use Super Potion on. ; output: @@ -568,7 +560,6 @@ AIDecide_SuperPotion2: ; 2030f (8:430f) .no_carry or a ret -; 0x20394 ; returns carry if card has energies attached. .check_attached_energy ; 20394 (8:4394) @@ -578,7 +569,6 @@ AIDecide_SuperPotion2: ; 2030f (8:430f) ret z scf ret -; 0x2039e ; return carry if either of the attacks are usable ; and have the BOOST_IF_TAKEN_DAMAGE effect. @@ -607,7 +597,6 @@ AIDecide_SuperPotion2: ; 2030f (8:430f) pop de scf ret -; 0x203c8 ; returns carry if discarding energy card renders any attack unusable, ; given that they have enough energy to be used before discarding. @@ -642,7 +631,6 @@ AIDecide_SuperPotion2: ; 2030f (8:430f) pop de scf ret -; 0x203f8 AIPlay_Defender: ; 203f8 (8:43f8) ld a, [wAITrainerCardToPlay] @@ -652,7 +640,6 @@ AIPlay_Defender: ; 203f8 (8:43f8) ld a, OPPACTION_EXECUTE_TRAINER_EFFECTS bank1call AIMakeDecision ret -; 0x20406 ; returns carry if using Defender can prevent a KO ; by the defending Pokémon. @@ -738,7 +725,6 @@ AIDecide_Defender1: ; 20406 (8:4406) .no_carry or a ret -; 0x20486 ; return carry if using Defender prevents Pokémon ; from being knocked out by an attack with recoil. @@ -813,7 +799,6 @@ AIDecide_Defender2: ; 20486 (8:4486) .no_carry or a ret -; 0x204e8 AIPlay_Pluspower: ; 204e8 (8:44e8) ld a, [wCurrentAIFlags] @@ -826,7 +811,6 @@ AIPlay_Pluspower: ; 204e8 (8:44e8) ld a, OPPACTION_EXECUTE_TRAINER_EFFECTS bank1call AIMakeDecision ret -; 0x20501 ; returns carry if using a Pluspower can KO defending Pokémon ; if active card cannot KO without the boost. @@ -901,7 +885,6 @@ AIDecide_Pluspower1: ; 20501 (8:4501) ld a, SECOND_ATTACK scf ret -; 0x20562 ; return carry if move is useable and KOs ; defending Pokémon with Pluspower boost. @@ -929,7 +912,6 @@ AIDecide_Pluspower1: ; 20501 (8:4501) .unusable or a ret -; 0x20589 ; returns carry if Pluspower boost does ; not exceed 30 damage when facing Mr. Mime. @@ -949,7 +931,6 @@ AIDecide_Pluspower1: ; 20501 (8:4501) ; damage is >= 30 but not Mr. Mime scf ret -; 0x205a5 ; returns carry 7/10 of the time ; if selected move is useable, can't KO without Pluspower boost @@ -970,7 +951,6 @@ AIDecide_Pluspower2: ; 205a5 (8:45a5) .no_carry or a ret -; 0x205bb ; returns carry if Pluspower boost does ; not exceed 30 damage when facing Mr. Mime. @@ -990,7 +970,6 @@ AIDecide_Pluspower2: ; 205a5 (8:45a5) ; damage is >= 30 but not Mr. Mime scf ret -; 0x205d7 ; return carry if move is useable but cannot KO. .check_can_ko ; 205d7 (8:45d7) @@ -1011,7 +990,6 @@ AIDecide_Pluspower2: ; 205a5 (8:45a5) .unuseable or a ret -; 0x205f6 ; return carry 7/10 of the time if ; move is useable and minimum damage > 0. @@ -1027,7 +1005,6 @@ AIDecide_Pluspower2: ; 205a5 (8:45a5) call Random cp 3 ret -; 0x20612 AIPlay_Switch: ; 20612 (8:4612) ld a, [wCurrentAIFlags] @@ -1042,7 +1019,6 @@ AIPlay_Switch: ; 20612 (8:4612) xor a ld [wcdb4], a ret -; 0x2062e ; returns carry if the active card has less energy cards ; than the retreat cost and if AI can't play an energy @@ -1092,7 +1068,6 @@ AIDecide_Switch: ; 2062e (8:462e) farcall AIDecideBenchPokemonToSwitchTo ccf ret -; 0x20666 AIPlay_GustOfWind: ; 20666 (8:4666) ld a, [wCurrentAIFlags] @@ -1105,7 +1080,6 @@ AIPlay_GustOfWind: ; 20666 (8:4666) ld a, OPPACTION_EXECUTE_TRAINER_EFFECTS bank1call AIMakeDecision ret -; 0x2067e AIDecide_GustOfWind: ; 2067e (8:467e) ld a, DUELVARS_NUMBER_OF_POKEMON_IN_PLAY_AREA @@ -1481,7 +1455,6 @@ AIDecide_GustOfWind: ; 2067e (8:467e) pop bc scf ret -; 0x2086d AIPlay_Bill: ; 2086d (8:486d) ld a, [wAITrainerCardToPlay] @@ -1489,7 +1462,6 @@ AIPlay_Bill: ; 2086d (8:486d) ld a, OPPACTION_EXECUTE_TRAINER_EFFECTS bank1call AIMakeDecision ret -; 0x20878 ; return carry if cards in deck > 9 AIDecide_Bill: ; 20878 (8:4878) @@ -1497,7 +1469,6 @@ AIDecide_Bill: ; 20878 (8:4878) call GetTurnDuelistVariable cp DECK_SIZE - 9 ret -; 0x20880 AIPlay_EnergyRemoval: ; 20880 (8:4880) ld a, [wAITrainerCardToPlay] @@ -1509,7 +1480,6 @@ AIPlay_EnergyRemoval: ; 20880 (8:4880) ld a, OPPACTION_EXECUTE_TRAINER_EFFECTS bank1call AIMakeDecision ret -; 0x20895 ; picks an energy card in the player's Play Area to remove AIDecide_EnergyRemoval: ; 20895 (8:4895) @@ -1712,7 +1682,6 @@ AIDecide_EnergyRemoval: ; 20895 (8:4895) .skip_2 pop de ret -; 0x20994 AIPlay_SuperEnergyRemoval: ; 20994 (8:4994) ld a, [wAITrainerCardToPlay] @@ -1732,7 +1701,6 @@ AIPlay_SuperEnergyRemoval: ; 20994 (8:4994) ld a, OPPACTION_EXECUTE_TRAINER_EFFECTS bank1call AIMakeDecision ret -; 0x209bc ; picks two energy cards in the player's Play Area to remove AIDecide_SuperEnergyRemoval: ; 209bc (8:49bc) @@ -1949,7 +1917,6 @@ AIDecide_SuperEnergyRemoval: ; 209bc (8:49bc) pop de scf ret -; 0x20ac1 ; stores in wce06 the highest damaging attack ; for the card in play area location in e @@ -2001,7 +1968,6 @@ AIDecide_SuperEnergyRemoval: ; 209bc (8:49bc) .skip_2 pop de ret -; 0x20b06 AIPlay_PokemonBreeder: ; 20b06 (8:4b06) ld a, [wAITrainerCardToPlay] @@ -2013,7 +1979,6 @@ AIPlay_PokemonBreeder: ; 20b06 (8:4b06) ld a, OPPACTION_EXECUTE_TRAINER_EFFECTS bank1call AIMakeDecision ret -; 0x20b1b AIDecide_PokemonBreeder: ; 20b1b (8:4b1b) call IsPrehistoricPowerActive @@ -2357,7 +2322,6 @@ AIDecide_PokemonBreeder: ; 20b1b (8:4b1b) pop af scf ret -; 0x20cae AIPlay_ProfessorOak: ; 20cae (8:4cae) ld a, [wCurrentAIFlags] @@ -2368,7 +2332,6 @@ AIPlay_ProfessorOak: ; 20cae (8:4cae) ld a, OPPACTION_EXECUTE_TRAINER_EFFECTS bank1call AIMakeDecision ret -; 0x20cc1 ; sets carry if AI determines a score of playing ; Professor Oak is over a certain threshold. @@ -2537,7 +2500,6 @@ AIDecide_ProfessorOak: ; 20cc1 (8:4cc1) .set_carry scf ret -; 0x20d9d ; return carry if there's a card in the hand that ; can evolve the card in Play Area location in e. @@ -2578,7 +2540,6 @@ AIDecide_ProfessorOak: ; 20cc1 (8:4cc1) scf ret -; 0x20dc3 ; handles Legendary Articuno Deck AI logic. .HandleLegendaryArticunoDeck ; 20dc3 (8:4dc3) @@ -2646,7 +2607,6 @@ AIDecide_ProfessorOak: ; 20cc1 (8:4cc1) .no_carry_articuno or a ret -; 0x20e11 ; handles Excavation deck AI logic. ; sets score depending on whether there's no @@ -2668,7 +2628,6 @@ AIDecide_ProfessorOak: ; 20cc1 (8:4cc1) ld a, $1e ld [wce06], a jp .check_cards_hand -; 0x20e2c ; handles Wonders of Science AI logic. ; if there's either Grimer or Muk in hand, @@ -2688,7 +2647,6 @@ AIDecide_ProfessorOak: ; 20cc1 (8:4cc1) .found_grimer_or_muk or a ret -; 0x20e44 AIPlay_EnergyRetrieval: ; 20e44 (8:4e44) ld a, [wCurrentAIFlags] @@ -2710,7 +2668,6 @@ AIPlay_EnergyRetrieval: ; 20e44 (8:4e44) ld a, OPPACTION_EXECUTE_TRAINER_EFFECTS bank1call AIMakeDecision ret -; 0x20e6e ; checks whether AI can play Energy Retrieval and ; picks the energy cards from the discard pile, @@ -2847,7 +2804,6 @@ AIDecide_EnergyRetrieval: ; 20e6e (8:4e6e) ld a, [wce06] scf ret -; 0x20f27 ; remove an element from the list ; and shortens it accordingly @@ -2870,7 +2826,6 @@ RemoveCardFromList: ; 20f27 (8:4f27) pop hl pop de ret -; 0x20f38 ; finds duplicates in card list in hl. ; if a duplicate of Pokemon cards are found, return in @@ -2947,7 +2902,6 @@ FindDuplicateCards: ; 20f38 (8:4f38) ; of either Pokemon or Non-Pokemon cards or a ret -; 0x20f80 AIPlay_SuperEnergyRetrieval: ; 20f80 (8:4f80) ld a, [wCurrentAIFlags] @@ -2979,7 +2933,6 @@ AIPlay_SuperEnergyRetrieval: ; 20f80 (8:4f80) ld a, OPPACTION_EXECUTE_TRAINER_EFFECTS bank1call AIMakeDecision ret -; 0x20fc1 AIDecide_SuperEnergyRetrieval: ; 20fc1 (8:4fc1) ; return no carry if no cards in hand @@ -3160,7 +3113,6 @@ AIDecide_SuperEnergyRetrieval: ; 20fc1 (8:4fc1) ld a, [wce06] scf ret -; 0x210d5 ; finds the card with deck index a in list hl, ; and removes it from the list. @@ -3179,7 +3131,6 @@ FindAndRemoveCardFromList: ; 210d5 (8:50d5) call RemoveCardFromList pop hl ret -; 0x210e0 AIPlay_PokemonCenter: ; 210e0 (8:50e0) ld a, [wAITrainerCardToPlay] @@ -3187,7 +3138,6 @@ AIPlay_PokemonCenter: ; 210e0 (8:50e0) ld a, OPPACTION_EXECUTE_TRAINER_EFFECTS bank1call AIMakeDecision ret -; 0x210eb AIDecide_PokemonCenter: ; 210eb (8:50eb) xor a @@ -3280,7 +3230,6 @@ AIDecide_PokemonCenter: ; 210eb (8:50eb) .no_carry or a ret -; 0x21170 AIPlay_ImposterProfessorOak: ; 21170 (8:5170) ld a, [wAITrainerCardToPlay] @@ -3288,7 +3237,6 @@ AIPlay_ImposterProfessorOak: ; 21170 (8:5170) ld a, OPPACTION_EXECUTE_TRAINER_EFFECTS bank1call AIMakeDecision ret -; 0x2117b ; sets carry depending on player's number of cards ; in deck in in hand. @@ -3318,7 +3266,6 @@ AIDecide_ImposterProfessorOak: ; 2117b (8:517b) .set_carry scf ret -; 0x2119a AIPlay_EnergySearch: ; 2119a (8:519a) ld a, [wAITrainerCardToPlay] @@ -3328,7 +3275,6 @@ AIPlay_EnergySearch: ; 2119a (8:519a) ld a, OPPACTION_EXECUTE_TRAINER_EFFECTS bank1call AIMakeDecision ret -; 0x211aa ; AI checks for playing Energy Search AIDecide_EnergySearch: ; 211aa (8:51aa) @@ -3390,7 +3336,6 @@ AIDecide_EnergySearch: ; 211aa (8:51aa) jr c, .no_carry scf ret -; 0x211f1 ; return carry if cards in wDuelTempList are not ; useful to any of the Play Area Pokemon @@ -3441,7 +3386,6 @@ AIDecide_EnergySearch: ; 211aa (8:51aa) scf ret -; 0x2122e ; checks whether there are useful energies ; only for Fire and Lightning type Pokemon cards @@ -3505,7 +3449,6 @@ AIDecide_EnergySearch: ; 211aa (8:51aa) ; for Fire/Lightning type Pokemon card. scf ret -; 0x21273 ; checks whether there are useful energies ; only for Grass type Pokemon cards @@ -3566,7 +3509,6 @@ AIDecide_EnergySearch: ; 211aa (8:51aa) ; for Grass type Pokemon card. scf ret -; 0x212b4 AIPlay_Pokedex: ; 212b4 (8:52b4) ld a, [wAITrainerCardToPlay] @@ -3586,7 +3528,6 @@ AIPlay_Pokedex: ; 212b4 (8:52b4) ld a, OPPACTION_EXECUTE_TRAINER_EFFECTS bank1call AIMakeDecision ret -; 0x212dc AIDecide_Pokedex: ; 212dc (8:52dc) ld a, [wAIPokedexCounter] @@ -3616,7 +3557,6 @@ AIDecide_Pokedex: ; 212dc (8:52dc) ld a, [wOpponentDeckID] cp WONDERS_OF_SCIENCE_DECK_ID jp PickPokedexCards ; bug, should be jp nz -; 0x212ff ; picks order of the cards in deck from the effects of Pokedex. ; prioritises Pokemon cards, then Trainer cards, then energy cards. @@ -3739,7 +3679,6 @@ PickPokedexCards_Unreferenced: ; 212ff (8:52ff) .done scf ret -; 0x21383 .GetCardType ; 21383 (8:5383) push bc @@ -3749,7 +3688,6 @@ PickPokedexCards_Unreferenced: ; 212ff (8:52ff) pop de pop bc ret -; 0x2138e ; picks order of the cards in deck from the effects of Pokedex. ; prioritises energy cards, then Pokemon cards, then Trainer cards. @@ -3871,7 +3809,6 @@ PickPokedexCards: ; 2138e (8:538e) .done scf ret -; 0x21412 .GetCardType ; 21412 (8:5412) push bc @@ -3881,7 +3818,6 @@ PickPokedexCards: ; 2138e (8:538e) pop de pop bc ret -; 0x2141d AIPlay_FullHeal: ; 2141d (8:541d) ld a, [wAITrainerCardToPlay] @@ -3889,7 +3825,6 @@ AIPlay_FullHeal: ; 2141d (8:541d) ld a, OPPACTION_EXECUTE_TRAINER_EFFECTS bank1call AIMakeDecision ret -; 0x21428 AIDecide_FullHeal: ; 21428 (8:5428) ld a, DUELVARS_ARENA_CARD_STATUS @@ -3976,7 +3911,6 @@ AIDecide_FullHeal: ; 21428 (8:5428) jr nz, .set_carry ; if not, return no carry. jr .no_carry -; 0x21497 AIPlay_MrFuji: ; 21497 (8:5497) ld a, [wAITrainerCardToPlay] @@ -3986,7 +3920,6 @@ AIPlay_MrFuji: ; 21497 (8:5497) ld a, OPPACTION_EXECUTE_TRAINER_EFFECTS bank1call AIMakeDecision ret -; 0x214a7 ; AI logic for playing Mr Fuji AIDecide_MrFuji: ; 214a7 (8:54a7) @@ -4050,7 +3983,6 @@ AIDecide_MrFuji: ; 214a7 (8:54a7) scf ret -; 0x214f1 AIPlay_ScoopUp: ; 214f1 (8:54f1) ld a, [wAITrainerCardToPlay] @@ -4062,7 +3994,6 @@ AIPlay_ScoopUp: ; 214f1 (8:54f1) ld a, OPPACTION_EXECUTE_TRAINER_EFFECTS bank1call AIMakeDecision ret -; 0x21506 AIDecide_ScoopUp: ; 21506 (8:5506) xor a @@ -4236,7 +4167,6 @@ AIDecide_ScoopUp: ; 21506 (8:5506) pop af scf ret -; 0x215e7 ; this deck will use Scoop Up on a benched Articuno2, Zapdos3 or Molres2. ; interestingly, does not check for Muk in both Play Areas. @@ -4260,7 +4190,6 @@ AIDecide_ScoopUp: ; 21506 (8:5506) call LookForCardIDInPlayArea_Bank8 jr c, .check_attached_energy jp .no_carry -; 0x2160f AIPlay_Maintenance: ; 2160f (8:560f) ld a, [wCurrentAIFlags] @@ -4275,7 +4204,6 @@ AIPlay_Maintenance: ; 2160f (8:560f) ld a, OPPACTION_EXECUTE_TRAINER_EFFECTS bank1call AIMakeDecision ret -; 0x2162c ; AI logic for playing Maintenance AIDecide_Maintenance: ; 2162c (8:562c) @@ -4359,7 +4287,6 @@ AIDecide_Maintenance: ; 2162c (8:562c) ; two cards were found, return carry. scf ret -; 0x2169a AIPlay_Recycle: ; 2169a (8:569a) ld a, [wAITrainerCardToPlay] @@ -4377,7 +4304,6 @@ AIPlay_Recycle: ; 2169a (8:569a) ld a, OPPACTION_EXECUTE_TRAINER_EFFECTS bank1call AIMakeDecision ret -; 0x216b8 ; lists cards to look for in the Discard Pile. ; has priorities for Ghost Deck, and a "default" priority list @@ -4500,7 +4426,6 @@ AIDecide_Recycle: ; 216b8 (8:56b8) ld a, b ld [wce08 + 4], a jr .loop_2 -; 0x21755 AIPlay_Lass: ; 21755 (8:5755) ld a, [wCurrentAIFlags] @@ -4511,7 +4436,6 @@ AIPlay_Lass: ; 21755 (8:5755) ld a, OPPACTION_EXECUTE_TRAINER_EFFECTS bank1call AIMakeDecision ret -; 0x21768 AIDecide_Lass: ; 21768 (8:5768) ; skip if player has less than 7 cards in hand @@ -4542,7 +4466,6 @@ AIDecide_Lass: ; 21768 (8:5768) .set_carry scf ret -; 0x2178f AIPlay_ItemFinder: ; 2178f (8:578f) ld a, [wCurrentAIFlags] @@ -4559,7 +4482,6 @@ AIPlay_ItemFinder: ; 2178f (8:578f) ld a, OPPACTION_EXECUTE_TRAINER_EFFECTS bank1call AIMakeDecision ret -; 0x217b1 ; checks whether there's Energy Removal in Discard Pile. ; if so, find duplicate cards in hand to discard @@ -4635,7 +4557,6 @@ AIDecide_ItemFinder: ; 217b1 (8:57b1) .no_carry or a ret -; 0x21813 AIPlay_Imakuni: ; 21813 (8:5813) ld a, [wAITrainerCardToPlay] @@ -4643,7 +4564,6 @@ AIPlay_Imakuni: ; 21813 (8:5813) ld a, OPPACTION_EXECUTE_TRAINER_EFFECTS bank1call AIMakeDecision ret -; 0x2181e ; only sets carry if Active card is not confused. AIDecide_Imakuni: ; 2181e (8:581e) @@ -4657,7 +4577,6 @@ AIDecide_Imakuni: ; 2181e (8:581e) .confused or a ret -; 0x2182d AIPlay_Gambler: ; 2182d (8:582d) ld a, [wCurrentAIFlags] @@ -4695,7 +4614,6 @@ AIPlay_Gambler: ; 2182d (8:582d) ld a, OPPACTION_EXECUTE_TRAINER_EFFECTS bank1call AIMakeDecision ret -; 0x21875 ; checks whether to play Gambler. ; aside from Imakuni?, all other opponents only @@ -4731,7 +4649,6 @@ AIDecide_Gambler: ; 21875 (8:5875) .set_carry scf ret -; 0x21899 AIPlay_Revive: ; 21899 (8:5899) ld a, [wAITrainerCardToPlay] @@ -4741,7 +4658,6 @@ AIPlay_Revive: ; 21899 (8:5899) ld a, OPPACTION_EXECUTE_TRAINER_EFFECTS bank1call AIMakeDecision ret -; 0x218a9 ; checks certain cards in Discard Pile to use Revive on. ; suitable for Muscle For Brains deck only. @@ -4789,7 +4705,6 @@ AIDecide_Revive: ; 218a9 (8:58a9) .no_carry or a ret -; 0x218d8 AIPlay_PokemonFlute: ; 218d8 (8:58d8) ld a, [wAITrainerCardToPlay] @@ -4799,7 +4714,6 @@ AIPlay_PokemonFlute: ; 218d8 (8:58d8) ld a, OPPACTION_EXECUTE_TRAINER_EFFECTS bank1call AIMakeDecision ret -; 0x218e8 AIDecide_PokemonFlute: ; 218e8 (8:58e8) ; if player has no Discard Pile, skip. @@ -4896,7 +4810,6 @@ AIDecide_PokemonFlute: ; 218e8 (8:58e8) ld a, b scf ret -; 0x21977 AIPlay_ClefairyDollOrMysteriousFossil: ; 21977 (8:5977) ld a, [wAITrainerCardToPlay] @@ -4904,7 +4817,6 @@ AIPlay_ClefairyDollOrMysteriousFossil: ; 21977 (8:5977) ld a, OPPACTION_EXECUTE_TRAINER_EFFECTS bank1call AIMakeDecision ret -; 0x21982 ; AI logic for playing Clefairy Doll AIDecide_ClefairyDollOrMysteriousFossil: ; 21982 (8:5982) @@ -4936,7 +4848,6 @@ AIDecide_ClefairyDollOrMysteriousFossil: ; 21982 (8:5982) .no_carry or a ret -; 0x219a6 AIPlay_Pokeball: ; 219a6 (8:59a6) ld a, [wAITrainerCardToPlay] @@ -4955,7 +4866,6 @@ AIPlay_Pokeball: ; 219a6 (8:59a6) ld a, OPPACTION_EXECUTE_TRAINER_EFFECTS bank1call AIMakeDecision ret -; 0x219c6 AIDecide_Pokeball: ; 219c6 (8:59c6) ; go to the routines associated with deck ID @@ -5157,7 +5067,6 @@ AIDecide_Pokeball: ; 219c6 (8:59c6) call LookForCardIDInDeck_GivenCardIDInHand ret c ret -; 0x21b12 AIPlay_ComputerSearch: ; 21b12 (8:5b12) ld a, [wCurrentAIFlags] @@ -5174,7 +5083,6 @@ AIPlay_ComputerSearch: ; 21b12 (8:5b12) ld a, OPPACTION_EXECUTE_TRAINER_EFFECTS bank1call AIMakeDecision ret -; 0x21b34 ; checks what Deck ID AI is playing and handle ; them in their own routine. @@ -5514,7 +5422,6 @@ AIDecide_ComputerSearch_FireCharge: ; 21cbb (8:5cbb) ld a, [wce06] scf ret -; 0x21d1e AIDecide_ComputerSearch_Anger: ; 21d1e (8:5d1e) ; for each of the following cards, @@ -5575,7 +5482,6 @@ AIDecide_ComputerSearch_Anger: ; 21d1e (8:5d1e) ld a, [wce06] scf ret -; 0x21d7a AIPlay_PokemonTrader: ; 21d7a (8:5d7a) ld a, [wAITrainerCardToPlay] @@ -5587,7 +5493,6 @@ AIPlay_PokemonTrader: ; 21d7a (8:5d7a) ld a, OPPACTION_EXECUTE_TRAINER_EFFECTS bank1call AIMakeDecision ret -; 0x21d8f AIDecide_PokemonTrader: ; 21d8f (8:5d8f) ; each deck has their own routine for picking @@ -5686,7 +5591,6 @@ AIDecide_PokemonTrader_LegendaryArticuno: ; 21dd5 (8:5dd5) .set_carry scf ret -; 0x21e24 AIDecide_PokemonTrader_LegendaryDragonite: ; 21e24 (8:5e24) ; if has less than 5 cards of energy @@ -5784,7 +5688,6 @@ AIDecide_PokemonTrader_LegendaryDragonite: ; 21e24 (8:5e24) .set_carry scf ret -; 0x21ec9 AIDecide_PokemonTrader_LegendaryRonald: ; 21ec9 (8:5ec9) ; for each of the following cards, @@ -5855,7 +5758,6 @@ AIDecide_PokemonTrader_LegendaryRonald: ; 21ec9 (8:5ec9) .set_carry scf ret -; 0x21f41 AIDecide_PokemonTrader_BlisteringPokemon: ; 21f41 (8:5f41) ; for each of the following cards, @@ -5901,7 +5803,6 @@ AIDecide_PokemonTrader_BlisteringPokemon: ; 21f41 (8:5f41) .set_carry scf ret -; 0x21f85 AIDecide_PokemonTrader_SoundOfTheWaves: ; 21f85 (8:5f85) ; for each of the following cards, @@ -5978,7 +5879,6 @@ AIDecide_PokemonTrader_SoundOfTheWaves: ; 21f85 (8:5f85) .set_carry scf ret -; 0x2200b AIDecide_PokemonTrader_PowerGenerator: ; 2200b (8:600b) ; for each of the following cards, @@ -6070,7 +5970,6 @@ AIDecide_PokemonTrader_PowerGenerator: ; 2200b (8:600b) .set_carry scf ret -; 0x220a8 AIDecide_PokemonTrader_FlowerGarden: ; 220a8 (8:60a8) ; for each of the following cards, @@ -6140,7 +6039,6 @@ AIDecide_PokemonTrader_FlowerGarden: ; 220a8 (8:60a8) .found scf ret -; 0x22122 AIDecide_PokemonTrader_StrangePower: ; 22122 (8:6122) ; looks for a Pokemon in hand to trade with Mr Mime in deck. @@ -6158,7 +6056,6 @@ AIDecide_PokemonTrader_StrangePower: ; 22122 (8:6122) .no_carry or a ret -; 0x22133 AIDecide_PokemonTrader_Flamethrower: ; 22133 (8:6133) ; for each of the following cards, @@ -6220,7 +6117,6 @@ AIDecide_PokemonTrader_Flamethrower: ; 22133 (8:6133) .set_carry scf ret -; 0x2219b ; handle AI routines for Energy Trans. ; uses AI_ENERGY_TRANS_* constants as input: @@ -6364,7 +6260,6 @@ HandleAIEnergyTrans: ; 2219b (8:619b) ld a, OPPACTION_DUEL_MAIN_SCENE bank1call AIMakeDecision ret -; 0x22246 ; checks if the Arena card needs energy for its second attack, ; and if it does, return carry if transferring Grass energy from Bench @@ -6425,7 +6320,6 @@ HandleAIEnergyTrans: ; 2219b (8:619b) scf ret -; 0x22286 ; outputs in a the number of Grass energy cards ; currently attached to Bench cards. @@ -6455,7 +6349,6 @@ HandleAIEnergyTrans: ; 2219b (8:619b) jr nz, .count_loop ld a, d ret -; 0x222a9 ; returns carry if there are enough Grass energy cards in Bench ; to satisfy the retreat cost of the Arena card. @@ -6489,7 +6382,6 @@ HandleAIEnergyTrans: ; 2219b (8:619b) .retreat_false or a ret -; 0x222ca ; AI logic to determine whether to use Energy Trans Pkmn Power ; to transfer energy cards attached from the Arena Pokemon to @@ -6628,7 +6520,6 @@ AIEnergyTransTransferEnergyToBench: ; 222ca (8:62ca) ld a, OPPACTION_DUEL_MAIN_SCENE bank1call AIMakeDecision ret -; 0x2237f ; handles AI logic for using some Pkmn Powers. ; Pkmn Powers handled here are: @@ -6731,7 +6622,6 @@ HandleAIPkmnPowers: ; 2237f (8:637f) .done pop bc ret -; 0x22402 ; checks whether AI uses Heal on Pokemon in Play Area. ; input: @@ -6753,7 +6643,6 @@ HandleAIHeal: ; 22402 (8:6402) ld a, OPPACTION_DUEL_MAIN_SCENE bank1call AIMakeDecision ret -; 0x22422 ; finds a target suitable for AI to use Heal on. ; only heals Arena card if the Defending Pokemon @@ -6838,7 +6727,6 @@ HandleAIHeal: ; 22402 (8:6402) .not_found or a ret -; 0x22476 ; checks whether AI uses Shift. ; input: @@ -6895,7 +6783,6 @@ HandleAIShift: ; 22476 (8:6476) ld a, OPPACTION_DUEL_MAIN_SCENE bank1call AIMakeDecision ret -; 0x224c6 ; returns carry if turn Duelist has a Pokemon ; with same color as wAIDefendingPokemonWeakness. @@ -6921,7 +6808,6 @@ HandleAIShift: ; 22476 (8:6476) .false or a ret -; 0x224e6 ; checks whether AI uses Peek. ; input: @@ -7005,7 +6891,6 @@ HandleAIPeek: ; 224e6 (8:64e6) ld a, OPPACTION_DUEL_MAIN_SCENE bank1call AIMakeDecision ret -; 0x2255d ; checks whether AI uses Strange Behavior. ; input: @@ -7072,7 +6957,6 @@ HandleAIStrangeBehavior: ; 2255d (8:655d) ld a, OPPACTION_DUEL_MAIN_SCENE bank1call AIMakeDecision ret -; 0x225b5 ; checks whether AI uses Curse. ; input: @@ -7176,7 +7060,6 @@ HandleAICurse: ; 225b5 (8:65b5) ld a, OPPACTION_DUEL_MAIN_SCENE bank1call AIMakeDecision ret -; 0x2262d ; handles AI logic for Cowardice HandleAICowardice: ; 2262d (8:662d) @@ -7224,7 +7107,6 @@ HandleAICowardice: ; 2262d (8:662d) cp b jr nz, .loop ret -; 0x22671 ; checks whether AI uses Cowardice. ; return carry if Pkmn Power was used. @@ -7265,7 +7147,6 @@ HandleAICowardice: ; 2262d (8:662d) bank1call AIMakeDecision scf ret -; 0x226a3 ; AI logic for Damage Swap to transfer damage from Arena card ; to a card in Bench with more than 10 HP remaining @@ -7368,7 +7249,6 @@ HandleAIDamageSwap: ; 226a3 (8:66a3) .no_more_target pop de jr .done -; 0x2273c ; looks for a target in the bench to receive damage counters. ; returns carry if one is found, and outputs remaining HP in a. @@ -7438,7 +7318,6 @@ HandleAIDamageSwap: ; 226a3 (8:66a3) .set_carry scf ret -; 0x22790 ; handles AI logic for attaching energy cards ; in Go Go Rain Dance deck. @@ -7459,7 +7338,6 @@ HandleAIGoGoRainDanceEnergy: ; 22790 (8:6790) farcall AIProcessAndTryToPlayEnergy jr c, .loop ret -; 0x227a9 ; runs through Player's whole deck and ; sets carry if there's any Pokemon other @@ -7493,7 +7371,6 @@ CheckIfPlayerHasPokemonOtherThanMewtwo1: ; 227a9 (8:67a9) call SwapTurn scf ret -; 0x227d3 ; returns no carry if, given the Player is using a Mewtwo1 mill deck, ; the AI already has a Bench fully set up, in which case it @@ -7534,7 +7411,6 @@ HandleAIAntiMewtwoDeckStrategy: ; 227d3 (8:67d3) .set_carry scf ret -; 0x227f6 ; lists in wDuelTempList all the basic energy cards ; in card location of a. @@ -7600,7 +7476,6 @@ FindBasicEnergyCardsInLocation: ; 227f6 (8:67f6) .set_carry scf ret -; 0x2282e ; returns in a the card index of energy card ; attached to Pokémon in Play Area location a, @@ -7657,7 +7532,6 @@ AIPickEnergyCardToDiscard: ; 2282e (8:682e) .no_energy ld a, $ff ret -; 0x22875 ; returns in a the deck index of an energy card attached to card ; in player's Play Area location a to remove. @@ -7737,7 +7611,6 @@ PickAttachedEnergyCardToRemove: ; 22875 (8:6875) .no_energy ld a, $ff ret -; 0x228d1 ; stores in wTempAI and wCurCardCanAttack the deck indices ; of energy cards attached to card in Play Area location a. @@ -7858,7 +7731,6 @@ PickTwoAttachedEnergyCards: ; 228d1 (8:68d1) .not_enough ld a, $ff ret -; 0x2297b ; copies $ff terminated buffer from hl to de CopyBuffer: ; 2297b (8:697b) @@ -7868,7 +7740,6 @@ CopyBuffer: ; 2297b (8:697b) ret z inc de jr CopyBuffer -; 0x22983 ; zeroes a bytes starting at hl ClearMemory_Bank8: ; 22983 (8:6983) @@ -7885,7 +7756,6 @@ ClearMemory_Bank8: ; 22983 (8:6983) pop bc pop af ret -; 0x22990 ; counts number of energy cards found in hand ; and outputs result in a @@ -7905,7 +7775,6 @@ CountOppEnergyCardsInHand: ; 22990 (8:6990) ld a, b or a ret -; 0x229a3 ; converts HP in a to number of equivalent damage counters ; input: @@ -7924,7 +7793,6 @@ ConvertHPToCounters: ; 229a3 (8:69a3) ld a, c pop bc ret -; 0x229b0 ; calculates floor(hl / 10) CalculateWordTensDigit: ; 229b0 (8:69b0) @@ -7941,7 +7809,6 @@ CalculateWordTensDigit: ; 229b0 (8:69b0) pop de pop bc ret -; 0x229c1 ; returns in a division of b by a CalculateBDividedByA_Bank8: ; 229c1 (8:69c1) @@ -7959,7 +7826,6 @@ CalculateBDividedByA_Bank8: ; 229c1 (8:69c1) ld a, c pop bc ret -; 0x229d0 ; returns in a the deck index of the first ; instance of card with ID equal to the ID in e @@ -7998,7 +7864,6 @@ LookForCardIDInLocation: ; 229d0 (8:69d0) ld a, e scf ret -; 0x229f3 ; return carry if card ID loaded in a is found in hand ; and outputs in a the deck index of that card @@ -8027,7 +7892,6 @@ LookForCardIDInHandList_Bank8: ; 229f3 (8:69f3) ldh a, [hTempCardIndex_ff98] scf ret -; 0x22a10 ; searches in deck for card ID 1 in a, and ; if found, searches in Hand/Play Area for card ID 2 in b, and @@ -8077,7 +7941,6 @@ LookForCardIDInDeck_GivenCardIDInHandAndPlayArea: ; 22a10 (8:6a10) .no_carry or a ret -; 0x22a39 ; returns carry if card ID in a ; is found in Play Area or in hand @@ -8096,7 +7959,6 @@ LookForCardIDInHandAndPlayArea: ; 22a39 (8:6a39) ret c or a ret -; 0x22a49 ; searches in deck for card ID 1 in a, and ; if found, searches in Hand Area for card ID 2 in b, and @@ -8145,7 +8007,6 @@ LookForCardIDInDeck_GivenCardIDInHand: ; 22a49 (8:6a49) .no_carry or a ret -; 0x22a72 ; returns carry if card ID in a ; is found in Play Area, starting with @@ -8183,7 +8044,6 @@ LookForCardIDInPlayArea_Bank8: ; 22a72 (8:6a72) ld a, b scf ret -; 0x22a95 ; runs through list avoiding card in e. ; removes first card in list not equal to e @@ -8264,7 +8124,6 @@ RemoveFromListDifferentCardOfGivenType: ; 22a95 (8:6a95) pop hl or a ret -; 0x22ae0 ; used in Pokemon Trader checks to look for a specific ; card in the deck to trade with a card in hand that @@ -8324,7 +8183,6 @@ LookForCardIDToTradeWithDifferentHandCard: ; 22ae0 (8:6ae0) .no_carry or a ret -; 0x22b1f ; returns carry if at least one card in the hand ; has the card ID of input. Outputs its index. @@ -8358,7 +8216,6 @@ CheckIfHasCardIDInHand: ; 22b1f (8:6b1f) ldh a, [hTempCardIndex_ff98] scf ret -; 0x22b45 ; outputs in a total number of Pokemon cards in hand ; plus Pokemon in Turn Duelist's Play Area. @@ -8383,7 +8240,6 @@ CountPokemonCardsInHandAndInPlayArea: ; 22b45 (8:6b45) .done ld a, [wTempAI] ret -; 0x22b6f ; returns carry if a duplicate Pokemon card is found in hand. ; outputs in a the deck index of one of them. @@ -8438,7 +8294,6 @@ FindDuplicatePokemonCards: ; 22b6f (8:6b6f) .no_carry or a ret -; 0x22bad ; return carry flag if move is not high recoil. Func_22bad: ; 22bad (8:6bad) @@ -8454,7 +8309,6 @@ Func_22bad: ; 22bad (8:6bad) call CheckLoadedMoveFlag ccf ret -; 0x22bc6 rept $143a db $ff diff --git a/src/engine/bank1c.asm b/src/engine/bank1c.asm index 7fa5bf4..cff0a96 100644 --- a/src/engine/bank1c.asm +++ b/src/engine/bank1c.asm @@ -20,7 +20,6 @@ Func_70018: ; 70018 (1c:4018) ld a, $0 call Func_70044 ret -; 0x70024 AtrcEnPacket_Disable: ; 70024 (1c:4024) sgb ATRC_EN, 1 ; sgb_command, length diff --git a/src/engine/bank20.asm b/src/engine/bank20.asm index bacf5e3..5c41c96 100644 --- a/src/engine/bank20.asm +++ b/src/engine/bank20.asm @@ -136,7 +136,6 @@ Func_800e0: ; 800e0 (20:40e0) jr nz, .asm_800fe pop hl ret -; 0x80148 Func_80148: ; 80148 (20:4148) ld a, [$d291] diff --git a/src/engine/deck_ai/decks/fire_charge.asm b/src/engine/deck_ai/decks/fire_charge.asm index 0248a8a..4253d55 100644 --- a/src/engine/deck_ai/decks/fire_charge.asm +++ b/src/engine/deck_ai/decks/fire_charge.asm @@ -9,7 +9,6 @@ AIActionTable_FireCharge: ; 15232 (5:5232) .do_turn ; 1523e (5:523e) call AIMainTurnLogic ret -; 0x15242 .start_duel ; 15242 (5:5242) call InitAIDuelVars @@ -19,22 +18,18 @@ AIActionTable_FireCharge: ; 15232 (5:5232) ret nc call AIPlayInitialBasicCards ret -; 0x15253 .forced_switch ; 15253 (5:5253) call AIDecideBenchPokemonToSwitchTo ret -; 0x15257 .ko_switch ; 15257 (5:5257) call AIDecideBenchPokemonToSwitchTo ret -; 0x1525b .take_prize ; 1525b (5:525b) call AIPickPrizeCards ret -; 0x1525f .list_arena ; 1525f (5:525f) db JIGGLYPUFF3 diff --git a/src/engine/deck_ai/decks/first_strike.asm b/src/engine/deck_ai/decks/first_strike.asm index e0bffb2..9f5934d 100644 --- a/src/engine/deck_ai/decks/first_strike.asm +++ b/src/engine/deck_ai/decks/first_strike.asm @@ -9,7 +9,6 @@ AIActionTable_FirstStrike: ; 14e89 (5:4e89) .do_turn ; 14e95 (5:4e95) call AIMainTurnLogic ret -; 0x14e99 .start_duel ; 14e99 (5:4e99) call InitAIDuelVars @@ -19,22 +18,18 @@ AIActionTable_FirstStrike: ; 14e89 (5:4e89) ret nc call AIPlayInitialBasicCards ret -; 0x14eaa .forced_switch ; 14eaa (5:4eaa) call AIDecideBenchPokemonToSwitchTo ret -; 0x14eae .ko_switch ; 14eae (5:4eae) call AIDecideBenchPokemonToSwitchTo ret -; 0x14eb2 .take_prize ; 14eb2 (5:4eb2) call AIPickPrizeCards ret -; 0x14eb6 .list_arena ; 14eb6 (5:1eb6) db HITMONCHAN diff --git a/src/engine/deck_ai/decks/flower_power.asm b/src/engine/deck_ai/decks/flower_power.asm index c9a0ca8..47bbd55 100644 --- a/src/engine/deck_ai/decks/flower_power.asm +++ b/src/engine/deck_ai/decks/flower_power.asm @@ -9,7 +9,6 @@ AIActionTable_FlowerPower: ; 1509b (5:509b) .do_turn ; 150a7 (5:50a7) call AIMainTurnLogic ret -; 0x150ab .start_duel ; 150ab (5:50ab) call InitAIDuelVars @@ -19,22 +18,18 @@ AIActionTable_FlowerPower: ; 1509b (5:509b) ret nc call AIPlayInitialBasicCards ret -; 0x150bc .forced_switch ; 150bc (5:50bc) call AIDecideBenchPokemonToSwitchTo ret -; 0x150c0 .ko_switch ; 150c0 (5:50c0) call AIDecideBenchPokemonToSwitchTo ret -; 0x150c4 .take_prize ; 150c4 (5:50c4) call AIPickPrizeCards ret -; 0x150c8 .list_arena ; 150c8 (5:50c8) db ODDISH diff --git a/src/engine/deck_ai/decks/general.asm b/src/engine/deck_ai/decks/general.asm index 546787d..dd9060e 100644 --- a/src/engine/deck_ai/decks/general.asm +++ b/src/engine/deck_ai/decks/general.asm @@ -145,7 +145,6 @@ AIMainTurnLogic: ; 1468b (5:468b) ld a, OPPACTION_FINISH_NO_ATTACK bank1call AIMakeDecision ret -; 0x14786 ; handles AI retreating logic AIProcessRetreat: ; 14786 (5:4786) diff --git a/src/engine/deck_ai/decks/general_no_retreat.asm b/src/engine/deck_ai/decks/general_no_retreat.asm index e8f8fec..4b962d4 100644 --- a/src/engine/deck_ai/decks/general_no_retreat.asm +++ b/src/engine/deck_ai/decks/general_no_retreat.asm @@ -10,28 +10,23 @@ AIActionTable_GeneralNoRetreat: ; 148dc (5:48dc) .do_turn ; 148e8 (5:48e8) call AIDoTurn_GeneralNoRetreat ret -; 0x148ec .start_duel ; 148ec (5:48ec) call InitAIDuelVars call AIPlayInitialBasicCards ret -; 0x148f3 .forced_switch ; 148f3 (5:48f3) call AIDecideBenchPokemonToSwitchTo ret -; 0x148f7 .ko_switch ; 148f7 (5:48f7) call AIDecideBenchPokemonToSwitchTo ret -; 0x148fb .take_prize ; 148fb (5:48fb) call AIPickPrizeCards ret -; 0x148ff AIDoTurn_GeneralNoRetreat: ; 148ff (5:48ff) ; initialize variables diff --git a/src/engine/deck_ai/decks/go_go_rain_dance.asm b/src/engine/deck_ai/decks/go_go_rain_dance.asm index 89e34c1..cf18893 100644 --- a/src/engine/deck_ai/decks/go_go_rain_dance.asm +++ b/src/engine/deck_ai/decks/go_go_rain_dance.asm @@ -9,7 +9,6 @@ AIActionTable_GoGoRainDance: ; 14f8f (5:4f8f) .do_turn ; 14f9b (5:4f9b) call AIMainTurnLogic ret -; 0x14f9f .start_duel ; 14f9f (5:4f9f) call InitAIDuelVars @@ -19,22 +18,18 @@ AIActionTable_GoGoRainDance: ; 14f8f (5:4f8f) ret nc call AIPlayInitialBasicCards ret -; 0x14fb0 .forced_switch ; 14fb0 (5:4fb0) call AIDecideBenchPokemonToSwitchTo ret -; 0x14fb4 .ko_switch ; 14fb4 (5:4fb4) call AIDecideBenchPokemonToSwitchTo ret -; 0x14fb8 .take_prize ; 14fb8 (5:4fb8) call AIPickPrizeCards ret -; 0x14fbc .list_arena ; 14fbc (5:4fbc) db LAPRAS diff --git a/src/engine/deck_ai/decks/im_ronald.asm b/src/engine/deck_ai/decks/im_ronald.asm index 3ce72e6..8d8de6d 100644 --- a/src/engine/deck_ai/decks/im_ronald.asm +++ b/src/engine/deck_ai/decks/im_ronald.asm @@ -9,7 +9,6 @@ AIActionTable_ImRonald: ; 152bd (5:52bd) .do_turn ; 152c9 (5:52c9) call AIMainTurnLogic ret -; 0x152cd .start_duel ; 152cd (5:52cd) call InitAIDuelVars @@ -19,22 +18,18 @@ AIActionTable_ImRonald: ; 152bd (5:52bd) ret nc call AIPlayInitialBasicCards ret -; 0x152de .forced_switch ; 152de (5:52de) call AIDecideBenchPokemonToSwitchTo ret -; 0x152e2 .ko_switch ; 152e2 (5:52e2) call AIDecideBenchPokemonToSwitchTo ret -; 0x152e6 .take_prize ; 152e6 (5:52e6) call AIPickPrizeCards ret -; 0x152ea .list_arena ; 152ea (5:52ea) db LAPRAS diff --git a/src/engine/deck_ai/decks/invincible_ronald.asm b/src/engine/deck_ai/decks/invincible_ronald.asm index 3f302ac..c228577 100644 --- a/src/engine/deck_ai/decks/invincible_ronald.asm +++ b/src/engine/deck_ai/decks/invincible_ronald.asm @@ -9,7 +9,6 @@ AIActionTable_InvincibleRonald: ; 153e8 (5:53e8) .do_turn ; 153f4 (5:53f4) call AIMainTurnLogic ret -; 0x153f8 .start_duel ; 153f8 (5:53f8) call InitAIDuelVars @@ -19,22 +18,18 @@ AIActionTable_InvincibleRonald: ; 153e8 (5:53e8) ret nc call AIPlayInitialBasicCards ret -; 0x15409 .forced_switch ; 15409 (5:5409) call AIDecideBenchPokemonToSwitchTo ret -; 0x1540d .ko_switch ; 1540d (5:540d) call AIDecideBenchPokemonToSwitchTo ret -; 0x15411 .take_prize ; 15411 (5:5411) call AIPickPrizeCards ret -; 0x15415 .list_arena ; 15415 (5:5415) db KANGASKHAN diff --git a/src/engine/deck_ai/decks/legendary_articuno.asm b/src/engine/deck_ai/decks/legendary_articuno.asm index 011abb0..62ee246 100644 --- a/src/engine/deck_ai/decks/legendary_articuno.asm +++ b/src/engine/deck_ai/decks/legendary_articuno.asm @@ -9,7 +9,6 @@ AIActionTable_LegendaryArticuno: ; 14c0b (5:4c0b) .do_turn ; 14c17 (5:4c17) call AIDoTurn_LegendaryArticuno ret -; 0x14c1b .start_duel ; 14c1b (5:4c1b) call InitAIDuelVars @@ -19,22 +18,18 @@ AIActionTable_LegendaryArticuno: ; 14c0b (5:4c0b) ret nc call AIPlayInitialBasicCards ret -; 0x14c2c .forced_switch ; 14c2c (5:4c2c) call AIDecideBenchPokemonToSwitchTo ret -; 0x14c30 .ko_switch ; 14c30 (5:4c30) call AIDecideBenchPokemonToSwitchTo ret -; 0x14c34 .take_prize ; 14c34 (5:4c34) call AIPickPrizeCards ret -; 0x14c38 .list_arena ; 14c38 (5:4c38) db CHANSEY @@ -81,7 +76,6 @@ AIActionTable_LegendaryArticuno: ; 14c0b (5:4c0b) ; missing store_list_pointer wAICardListRetreatBonus, .list_retreat store_list_pointer wAICardListEnergyBonus, .list_energy ret -; 0x14c91 ; this routine handles how Legendary Articuno ; prioritises playing energy cards to each Pokémon. @@ -156,7 +150,6 @@ ScoreLegendaryArticunoCards: ; 14c91 (5:4c91) ld a, SEEL call RaiseAIScoreToAllMatchingIDsInBench ret -; 0x14cf7 AIDoTurn_LegendaryArticuno: ; 14cf7 (5:4cf7) ; initialize variables diff --git a/src/engine/deck_ai/decks/legendary_dragonite.asm b/src/engine/deck_ai/decks/legendary_dragonite.asm index a931416..7090e50 100644 --- a/src/engine/deck_ai/decks/legendary_dragonite.asm +++ b/src/engine/deck_ai/decks/legendary_dragonite.asm @@ -9,7 +9,6 @@ AIActionTable_LegendaryDragonite: ; 14d60 (05:4d60) .do_turn ; 14d6c (5:4d6c) call AIDoTurn_LegendaryDragonite ret -; 0x14d70 .start_duel ; 14d70 (5:4d70) call InitAIDuelVars @@ -19,22 +18,18 @@ AIActionTable_LegendaryDragonite: ; 14d60 (05:4d60) ret nc call AIPlayInitialBasicCards ret -; 0x14d81 .forced_switch ; 14d81 (5:4d81) call AIDecideBenchPokemonToSwitchTo ret -; 0x14d85 .ko_switch ; 14d85 (5:4d85) call AIDecideBenchPokemonToSwitchTo ret -; 0x14d89 .take_prize ; 14d89 (5:4d89) call AIPickPrizeCards ret -; 0x14d8d .list_arena ; 14d8d (5:4d8d) db KANGASKHAN @@ -84,7 +79,6 @@ AIActionTable_LegendaryDragonite: ; 14d60 (05:4d60) ; missing store_list_pointer wAICardListRetreatBonus, .list_retreat store_list_pointer wAICardListEnergyBonus, .list_energy ret -; 0x14def AIDoTurn_LegendaryDragonite: ; 14def (5:4def) ; initialize variables diff --git a/src/engine/deck_ai/decks/legendary_moltres.asm b/src/engine/deck_ai/decks/legendary_moltres.asm index 725ef82..2f67c3e 100644 --- a/src/engine/deck_ai/decks/legendary_moltres.asm +++ b/src/engine/deck_ai/decks/legendary_moltres.asm @@ -9,7 +9,6 @@ AIActionTable_LegendaryMoltres: ; 149e8 (05:49e8) .do_turn ; 149f4 (5:49f4) call AIDoTurn_LegendaryMoltres ret -; 0x149f8 .start_duel ; 149f8 (5:49f8) call InitAIDuelVars @@ -19,22 +18,18 @@ AIActionTable_LegendaryMoltres: ; 149e8 (05:49e8) ret nc ; Play Area set up was successful call AIPlayInitialBasicCards ret -; 0x14a09 .forced_switch ; 14a09 (5:4a09) call AIDecideBenchPokemonToSwitchTo ret -; 0x14a0d .ko_switch ; 14a0d (5:4a0d) call AIDecideBenchPokemonToSwitchTo ret -; 0x14a11 .take_prize ; 14a11 (5:4a11) call AIPickPrizeCards ret -; 0x14a15 .list_arena ; 14a15 (5:4a15) db MAGMAR2 @@ -91,7 +86,6 @@ AIActionTable_LegendaryMoltres: ; 149e8 (05:49e8) store_list_pointer wAICardListRetreatBonus, .list_retreat store_list_pointer wAICardListEnergyBonus, .list_energy ret -; 0x14a81 AIDoTurn_LegendaryMoltres: ; 14a81 (5:4a81) ; initialize variables diff --git a/src/engine/deck_ai/decks/legendary_ronald.asm b/src/engine/deck_ai/decks/legendary_ronald.asm index 6b77ebb..5272f81 100644 --- a/src/engine/deck_ai/decks/legendary_ronald.asm +++ b/src/engine/deck_ai/decks/legendary_ronald.asm @@ -9,7 +9,6 @@ AIActionTable_LegendaryRonald: ; 1546f (5:546f) .do_turn ; 1547b (5:547b) call AIDoTurn_LegendaryRonald ret -; 0x1547f .start_duel ; 1547f (5:547f) call InitAIDuelVars @@ -19,22 +18,18 @@ AIActionTable_LegendaryRonald: ; 1546f (5:546f) ret nc call AIPlayInitialBasicCards ret -; 0x15490 .forced_switch ; 15490 (5:5490) call AIDecideBenchPokemonToSwitchTo ret -; 0x15494 .ko_switch ; 15494 (5:5494) call AIDecideBenchPokemonToSwitchTo ret -; 0x15498 .take_prize ; 15498 (5:5498) call AIPickPrizeCards ret -; 0x1549c .list_arena ; 1549c (5:549c) db KANGASKHAN @@ -94,7 +89,6 @@ AIActionTable_LegendaryRonald: ; 1546f (5:546f) ; missing store_list_pointer wAICardListRetreatBonus, .list_retreat store_list_pointer wAICardListEnergyBonus, .list_energy ret -; 0x15507 AIDoTurn_LegendaryRonald: ; 15507 (5:5507) ; initialize variables diff --git a/src/engine/deck_ai/decks/legendary_zapdos.asm b/src/engine/deck_ai/decks/legendary_zapdos.asm index 20b1f8f..3a74ac6 100644 --- a/src/engine/deck_ai/decks/legendary_zapdos.asm +++ b/src/engine/deck_ai/decks/legendary_zapdos.asm @@ -9,7 +9,6 @@ AIActionTable_LegendaryZapdos: ; 14b0f (05:4b0f) .do_turn ; 14b1b (5:4b1b) call AIDoTurn_LegendaryZapdos ret -; 0x14b1f .start_duel ; 14b1f (5:4b1f) call InitAIDuelVars @@ -19,22 +18,18 @@ AIActionTable_LegendaryZapdos: ; 14b0f (05:4b0f) ret nc call AIPlayInitialBasicCards ret -; 0x14b30 .forced_switch ; 14b30 (5:4b30) call AIDecideBenchPokemonToSwitchTo ret -; 0x14b34 .ko_switch ; 14b34 (5:4b34) call AIDecideBenchPokemonToSwitchTo ret -; 0x14b38 .take_prize ; 14b38 (5:4b38) call AIPickPrizeCards ret -; 0x14b3c .list_arena ; 14b3c (5:4b3c) db ELECTABUZZ2 @@ -83,7 +78,6 @@ AIActionTable_LegendaryZapdos: ; 14b0f (05:4b0f) ; missing store_list_pointer wAICardListRetreatBonus, .list_retreat store_list_pointer wAICardListEnergyBonus, .list_energy ret -; 0x14b9a AIDoTurn_LegendaryZapdos: ; 14b9a (5:4b9a) ; initialize variables diff --git a/src/engine/deck_ai/decks/powerful_ronald.asm b/src/engine/deck_ai/decks/powerful_ronald.asm index 760d66f..9f1b0f3 100644 --- a/src/engine/deck_ai/decks/powerful_ronald.asm +++ b/src/engine/deck_ai/decks/powerful_ronald.asm @@ -9,7 +9,6 @@ AIActionTable_PowerfulRonald: ; 1534b (5:534b) .do_turn ; 15357 (5:5357) call AIMainTurnLogic ret -; 0x1535b .start_duel ; 1535b (5:535b) call InitAIDuelVars @@ -19,22 +18,18 @@ AIActionTable_PowerfulRonald: ; 1534b (5:534b) ret nc call AIPlayInitialBasicCards ret -; 0x1536c .forced_switch ; 1536c (5:536c) call AIDecideBenchPokemonToSwitchTo ret -; 0x15370 .ko_switch ; 15370 (5:5370) call AIDecideBenchPokemonToSwitchTo ret -; 0x15374 .take_prize ; 15374 (5:5374) call AIPickPrizeCards ret -; 0x15378 .list_arena ; 15378 (5:5378) db KANGASKHAN diff --git a/src/engine/deck_ai/decks/rock_crusher.asm b/src/engine/deck_ai/decks/rock_crusher.asm index 9cd3cff..7e5cb0a 100644 --- a/src/engine/deck_ai/decks/rock_crusher.asm +++ b/src/engine/deck_ai/decks/rock_crusher.asm @@ -9,7 +9,6 @@ AIActionTable_RockCrusher: ; 14f0e (5:4f0e) .do_turn ; 14f1a (5:4f1a) call AIMainTurnLogic ret -; 0x14f1e .start_duel ; 14f1e (5:4f1e) call InitAIDuelVars @@ -19,22 +18,18 @@ AIActionTable_RockCrusher: ; 14f0e (5:4f0e) ret nc call AIPlayInitialBasicCards ret -; 0x14f2f .forced_switch ; 14f2f (5:4f2f) call AIDecideBenchPokemonToSwitchTo ret -; 0x14f33 .ko_switch ; 14f33 (5:4f33) call AIDecideBenchPokemonToSwitchTo ret -; 0x14f37 .take_prize ; 14f37 (5:4f37) call AIPickPrizeCards ret -; 0x14f3b .list_arena ; 14f3b (5:4f3b) db RHYHORN diff --git a/src/engine/deck_ai/decks/sams_practice.asm b/src/engine/deck_ai/decks/sams_practice.asm index c402e49..b7642a8 100644 --- a/src/engine/deck_ai/decks/sams_practice.asm +++ b/src/engine/deck_ai/decks/sams_practice.asm @@ -17,12 +17,10 @@ AIActionTable_SamPractice: ; 147bd (05:47bd) .scripted_1 ; use scripted actions instead call AIPerformSciptedTurn ret -; 0x147d6 .start_duel ; 147d6 (5:47d6) call SetSamsStartingPlayArea ret -; 0x147da .forced_switch ; 147da (5:47da) call IsAIPracticeScriptedTurn @@ -32,7 +30,6 @@ AIActionTable_SamPractice: ; 147bd (05:47bd) .scripted_2 call PickRandomBenchPokemon ret -; 0x147e7 .ko_switch: ; 147e7 (5:47e7) call IsAIPracticeScriptedTurn @@ -42,12 +39,10 @@ AIActionTable_SamPractice: ; 147bd (05:47bd) .scripted_3 call GetPlayAreaLocationOfRaticateOrRattata ret -; 0x147f4 .take_prize: ; 147f4 (5:47f4) call AIPickPrizeCards ret -; 0x147f8 ; returns carry if number of turns ; the AI has taken >= 7. @@ -59,7 +54,6 @@ IsAIPracticeScriptedTurn: ; 147f8 (5:47f8) cp 7 ccf ret -; 0x14801 ; places one Machop from the hand to the Play Area ; and sets the number of prizes to 2. @@ -79,7 +73,6 @@ SetSamsStartingPlayArea: ; 14801 (5:4801) ld a, 2 ld [wDuelInitialPrizes], a ret -; 0x1481f ; outputs in a Play Area location of Raticate or Rattata ; in the Bench. If neither is found, just output PLAY_AREA_BENCH_1. @@ -98,7 +91,6 @@ GetPlayAreaLocationOfRaticateOrRattata: ; 1481f (5:481f) .found ldh [hTempPlayAreaLocation_ff9d], a ret -; 0x1483a ; has AI execute some scripted actions depending on Duel turn. AIPerformSciptedTurn: ; 1483a (5:483a) @@ -121,7 +113,6 @@ AIPerformSciptedTurn: ; 1483a (5:483a) ld a, OPPACTION_FINISH_NO_ATTACK bank1call AIMakeDecision ret -; 0x1485a .scripted_actions_list ; 1485a (05:485a) dw .turn_1 @@ -131,14 +122,12 @@ AIPerformSciptedTurn: ; 1483a (5:483a) dw .turn_5 dw .turn_6 dw .turn_7 -; 0x14868 .turn_1 ; 14868 (5:4868) ld d, MACHOP ld e, FIGHTING_ENERGY call AIAttachEnergyInHandToCardInPlayArea ret -; 0x14870 .turn_2 ; 14870 (5:4870) ld a, RATTATA @@ -150,7 +139,6 @@ AIPerformSciptedTurn: ; 1483a (5:483a) ld e, FIGHTING_ENERGY call AIAttachEnergyInHandToCardInPlayArea ret -; 0x14884 .turn_3 ; 14884 (5:4884) ld a, RATTATA @@ -166,14 +154,12 @@ AIPerformSciptedTurn: ; 1483a (5:483a) ld e, LIGHTNING_ENERGY call AIAttachEnergyInHandToCardInPlayArea ret -; 0x148a1 .turn_4 ; 148a1 (5:48a1) ld d, RATICATE ld e, LIGHTNING_ENERGY call AIAttachEnergyInHandToCardInPlayArea ret -; 0x148a9 .turn_5 ; 148a9 (5:48a9) ld a, MACHOP @@ -205,14 +191,12 @@ AIPerformSciptedTurn: ; 1483a (5:483a) .retreat call AITryToRetreat ret -; 0x148cc .turn_6 ; 148cc (5:48cc) ld d, MACHOP ld e, FIGHTING_ENERGY call AIAttachEnergyInHandToCardInPlayArea ret -; 0x148d4 .turn_7 ; 148d4 (5:48d4) ld d, MACHOP diff --git a/src/engine/deck_ai/decks/strange_psyshock.asm b/src/engine/deck_ai/decks/strange_psyshock.asm index 2421a8b..1ab948c 100644 --- a/src/engine/deck_ai/decks/strange_psyshock.asm +++ b/src/engine/deck_ai/decks/strange_psyshock.asm @@ -9,7 +9,6 @@ AIActionTable_StrangePsyshock: ; 15122 (5:5122) .do_turn ; 1512e (5:512e) call AIMainTurnLogic ret -; 0x15132 .start_duel ; 15132 (5:5132) call InitAIDuelVars @@ -19,22 +18,18 @@ AIActionTable_StrangePsyshock: ; 15122 (5:5122) ret nc call AIPlayInitialBasicCards ret -; 0x15143 .forced_switch ; 15143 (5:5143) call AIDecideBenchPokemonToSwitchTo ret -; 0x15147 .ko_switch ; 15147 (5:5147) call AIDecideBenchPokemonToSwitchTo ret -; 0x1514b .take_prize ; 1514b (5:514b) call AIPickPrizeCards ret -; 0x1514f .list_arena ; 1514f (5:514f) db KANGASKHAN diff --git a/src/engine/deck_ai/decks/wonders_of_science.asm b/src/engine/deck_ai/decks/wonders_of_science.asm index 19c0051..24ad09d 100644 --- a/src/engine/deck_ai/decks/wonders_of_science.asm +++ b/src/engine/deck_ai/decks/wonders_of_science.asm @@ -9,7 +9,6 @@ AIActionTable_WondersOfScience: ; 151ad (5:51ad) .do_turn ; 151b9 (5:51b9) call AIMainTurnLogic ret -; 0x151bd .start_duel ; 151bd (5:51bd) call InitAIDuelVars @@ -19,22 +18,18 @@ AIActionTable_WondersOfScience: ; 151ad (5:51ad) ret nc call AIPlayInitialBasicCards ret -; 0x151ce .forced_switch ; 151ce (5:51ce) call AIDecideBenchPokemonToSwitchTo ret -; 0x151d2 .ko_switch ; 151d2 (5:51d2) call AIDecideBenchPokemonToSwitchTo ret -; 0x151d6 .take_prize ; 151d6 (5:51d6) call AIPickPrizeCards ret -; 0x151da .list_arena ; 151da (5:51da) db MEWTWO1 diff --git a/src/engine/deck_ai/decks/zapping_selfdestruct.asm b/src/engine/deck_ai/decks/zapping_selfdestruct.asm index a0a0669..b924061 100644 --- a/src/engine/deck_ai/decks/zapping_selfdestruct.asm +++ b/src/engine/deck_ai/decks/zapping_selfdestruct.asm @@ -9,7 +9,6 @@ AIActionTable_ZappingSelfdestruct: ; 15019 (5:5019) .do_turn ; 15025 (5:5025) call AIMainTurnLogic ret -; 0x15029 .start_duel ; 15029 (5:5029) call InitAIDuelVars @@ -19,22 +18,18 @@ AIActionTable_ZappingSelfdestruct: ; 15019 (5:5019) ret nc call AIPlayInitialBasicCards ret -; 0x1503a .forced_switch ; 1503a (5:503a) call AIDecideBenchPokemonToSwitchTo ret -; 0x1503e .ko_switch ; 1503e (5:503e) call AIDecideBenchPokemonToSwitchTo ret -; 0x15042 .take_prize ; 15042 (5:5042) call AIPickPrizeCards ret -; 0x15046 .list_arena ; 15046 (5:5046) db KANGASKHAN diff --git a/src/engine/effect_functions.asm b/src/engine/effect_functions.asm index ffc6c4d..89d5dc6 100644 --- a/src/engine/effect_functions.asm +++ b/src/engine/effect_functions.asm @@ -83,21 +83,17 @@ ApplyStatusEffect: inc [hl] scf ret -; 0x2c07e TossCoin_BankB: ; 2c07e (b:407e) call TossCoin ret -; 0x2c082 TossCoinATimes_BankB: ; 2c082 (b:4082) call TossCoinATimes ret -; 0x2c086 CommentedOut_2c086: ; 2c086 (b:4086) ret -; 0x2c087 Func_2c087: ; 2c087 (b:4087) xor a @@ -116,19 +112,16 @@ Func_2c08c: call SerialSend8Bytes call TossCoinATimes ret -; 0x2c09c SetNoEffectFromStatus: ; 2c09c (b:409c) ld a, EFFECT_FAILED_NO_EFFECT ld [wEffectFailed], a ret -; 0x2c0a2 SetWasUnsuccessful: ; 2c0a2 (b:40a2) ld a, EFFECT_FAILED_UNSUCCESSFUL ld [wEffectFailed], a ret -; 0x2c0a8 Func_2c0a8: ; 2c0a8 (b:40a8) ldh a, [hTemp_ffa0] @@ -143,14 +136,12 @@ Func_2c0a8: ; 2c0a8 (b:40a8) ldh [hTemp_ffa0], a ld a, c ret -; 0x2c0bd Func_2c0bd: ; 2c0bd (b:40bd) call ExchangeRNG bank1call Func_4f2d call ShuffleDeck ret -; 0x2c0c7 Func_2c0c7: ; 2c0c7 (b:40c7) ld a, DUELVARS_DUELIST_TYPE @@ -162,7 +153,6 @@ Func_2c0c7: ; 2c0c7 (b:40c7) .player scf ret -; 0x2c0d4 ; Sets some flags for AI use ; if target poisoned @@ -199,7 +189,6 @@ Func_2c0e9: ; 2c0e9 (b:40e9) add [hl] ld [hl], a ret -; 0x2c0fb ; Sets some flags for AI use ; [wDamage] <- a @@ -214,7 +203,6 @@ Func_2c0fb: ; 2c0fb (b:40fb) ld a, e ld [wAIMaxDamage], a ret -; 0x2c10b Func_2c10b: ; 2c10b (b:410b) ldh [hTempPlayAreaLocation_ff9d], a @@ -222,7 +210,6 @@ Func_2c10b: ; 2c10b (b:410b) bank1call PrintPlayAreaCardList_EnableLCD bank1call Func_6194 ret -; 0x2c117 ; deal damage to all the turn holder's benched Pokemon ; input: a = amount of damage to deal to each Pokemon @@ -243,7 +230,6 @@ DealDamageToAllBenchedPokemon: ; 2c117 (b:4117) dec c jr nz, .loop ret -; 0x2c12e Func_2c12e: ; 2c12e (b:412e) ld [wLoadedMoveAnimation], a @@ -255,7 +241,6 @@ Func_2c12e: ; 2c12e (b:412e) bank1call PlayMoveAnimation bank1call WaitMoveAnimation ret -; 0x2c140 ; apply a status condition of type 1 identified by register a to the target ApplySubstatus1ToDefendingCard: ; 2c140 (b:4140) @@ -265,7 +250,6 @@ ApplySubstatus1ToDefendingCard: ; 2c140 (b:4140) pop af ld [hli], a ret -; 0x2c149 ; apply a status condition of type 2 identified by register a to the target, ; unless prevented by wNoDamageOrEffect @@ -290,7 +274,6 @@ ApplySubstatus2ToDefendingCard: ; 2c149 (b:4149) or h call nz, DrawWideTextBox_PrintText ret -; 0x2c166 ; overwrites in wDamage, wAIMinDamage and wAIMaxDamage ; with the value in a. @@ -336,7 +319,6 @@ HandleSwitchDefendingPokemonEffect: ; 2c1ec (b:41ec) inc a ld [wccef], a ret -; 0x2c216 ; returns carry if Defending has No Damage or Effect ; if so, print its appropriate text. @@ -483,7 +465,6 @@ SpitPoison_AIEffect: ; 2c6f0 (b:46f0) ld a, 5 lb de, 0, 10 jp Func_2c0fb -; 0x2c6f8 ; If heads, defending Pokemon becomes poisoned SpitPoison_Poison50PercentEffect: ; 2c6f8 (b:46f8) @@ -494,7 +475,6 @@ SpitPoison_Poison50PercentEffect: ; 2c6f8 (b:46f8) ld [wLoadedMoveAnimation], a call SetNoEffectFromStatus ret -; 0x2c70a ; outputs in hTemp_ffa0 the result of the coin toss ; (0 = tails, 1 = heads) and, in case it was heads, @@ -522,7 +502,6 @@ TerrorStrike_50PercentSelectSwitchPokemon: ; 2c70a (b:470a) ldh a, [hTempPlayAreaLocation_ff9d] ldh [hTempPlayAreaLocation_ffa1], a ret -; 0x2c726 ; if coin toss was heads and it's possible, ; switch Defending Pokemon @@ -533,13 +512,11 @@ TerrorStrike_SwitchDefendingPokemon: ; 2c726 (b:4726) ldh a, [hTempPlayAreaLocation_ffa1] call HandleSwitchDefendingPokemonEffect ret -; 0x2c730 PoisonFang_AIEffect: ; 2c730 (b:4730) ld a, 10 lb de, 10, 10 jp Func_2c0d4 -; 0x2c738 WeepinbellPoisonPowder_AIEffect: ; 2c738 (b:4738) ld a, 5 @@ -557,13 +534,11 @@ AcidEffect: ; 2c77e (b:477e) ld a, SUBSTATUS2_UNABLE_RETREAT call ApplySubstatus2ToDefendingCard ret -; 0x2c78b GloomPoisonPowder_AIEffect: ; 2c78b (b:478b) ld a, 10 lb de, 10, 10 jp Func_2c0d4 -; 0x2c793 ; Defending Pokemon and user become confused FoulOdorEffect: ; 2c793 (b:4793) @@ -572,7 +547,6 @@ FoulOdorEffect: ; 2c793 (b:4793) call ConfusionEffect call SwapTurn ret -; 0x2c7a0 ; If heads, prevent all damage done to user next turn KakunaStiffenEffect: ; 2c7a0 (b:47a0) @@ -584,7 +558,6 @@ KakunaStiffenEffect: ; 2c7a0 (b:47a0) ld a, SUBSTATUS1_NO_DAMAGE_STIFFEN call ApplySubstatus1ToDefendingCard ret -; 0x2c7b4 KakunaPoisonPowder_AIEffect: ; 2c7b4 (b:47b4) ld a, 5 @@ -602,7 +575,6 @@ SwordsDanceEffect: ; 2c7d0 (b:47d0) ld a, SUBSTATUS1_NEXT_TURN_DOUBLE_DAMAGE call ApplySubstatus1ToDefendingCard ret -; 0x2c7dc ; If heads, defending Pokemon becomes confused ZubatSupersonicEffect: ; 2c7dc (b:47dc) @@ -617,7 +589,6 @@ Twineedle_AIEffect: ; 2c7ed (b:47ed) ld a, 30 lb de, 0, 60 jp Func_2c0fb -; 0x2c7f5 ; Flip 2 coins; deal 30x number of heads Twineedle_MultiplierEffect: ; 2c7f5 (b:47f5) @@ -640,7 +611,6 @@ FoulGas_AIEffect: ; 2c822 (b:4822) ld a, 5 lb de, 0, 10 jp Func_2c0e9 -; 0x2c82a ; If heads, defending Pokemon becomes poisoned. If tails, defending Pokemon becomes confused FoulGas_PoisonOrConfusionEffect: ; 2c82a (b:482a) @@ -648,7 +618,6 @@ FoulGas_PoisonOrConfusionEffect: ; 2c82a (b:482a) call TossCoin_BankB jp c, PoisonEffect jp ConfusionEffect -; 0x2c836 ; an exact copy of KakunaStiffenEffect ; If heads, prevent all damage done to user next turn @@ -682,7 +651,6 @@ BigEggsplosion_AIEffect: ; 2c925 (b:4925) xor a ld [wAIMinDamage], a ret -; 0x2c944 ; Flip coins equal to attached energies; deal 20x number of heads BigEggsplosion_MultiplierEffect: ; 2c944 (b:4944) @@ -711,13 +679,11 @@ SetDamageToATimes20: ; 2c958 (b:4958) ld a, h ld [wDamage + 1], a ret -; 0x2c96b Thrash_AIEffect: ; 2c96b (b:496b) ld a, 35 lb de, 30, 40 jp Func_2c0fb -; 0x2c973 ; If heads 10 more damage; if tails, 10 damage to itself Thrash_ModifierEffect: ; 2c973 (b:4973) @@ -728,7 +694,6 @@ Thrash_ModifierEffect: ; 2c973 (b:4973) ld a, 10 call AddToDamage ret -; 0x2c982 Func_2c982: ; 2c982 (b:4982) ldh a, [hTemp_ffa0] @@ -737,13 +702,11 @@ Func_2c982: ; 2c982 (b:4982) ld a, 10 call Func_1955 ret -; 0x2c98c Toxic_AIEffect: ; 2c98c (b:498c) ld a, 20 lb de, 20, 20 jp Func_2c0e9 -; 0x2c994 ; Defending Pokémon becomes poisoned, but takes 20 damage (double poisoned) Toxic_DoublePoisonEffect: ; 2c994 (b:4994) diff --git a/src/engine/home.asm b/src/engine/home.asm index 78817f3..2335a89 100644 --- a/src/engine/home.asm +++ b/src/engine/home.asm @@ -861,7 +861,6 @@ CallIndirect: ; 05b6 (0:05b6) CallHL: ; 05c1 (0:05c1) jp hl -; 0x5c2 ; converts the two-digit BCD number provided in a to text (ascii) format, ; writes them to [wStringBuffer] and [wStringBuffer + 1], and to the BGMap0 address at bc @@ -882,7 +881,6 @@ WriteTwoDigitBCDNumber: ; 05c2 (0:05c2) pop bc pop hl ret -; 0x5db ; converts the one-digit BCD number provided in the lower nybble of a to text ; (ascii) format, and writes it to [wStringBuffer] and to the BGMap0 address at bc @@ -903,7 +901,6 @@ WriteOneDigitBCDNumber: ; 05db (0:05db) pop bc pop hl ret -; 0x5f4 ; converts the four-digit BCD number provided in h and l to text (ascii) format, ; writes them to [wStringBuffer] through [wStringBuffer + 3], and to the BGMap0 address at bc @@ -929,7 +926,6 @@ WriteFourDigitBCDNumber: ; 05f4 (0:05f4) pop bc pop hl ret -; 0x614 ; given two BCD digits in the two nybbles of register a, ; write them in text (ascii) format to hl (most significant nybble first). @@ -952,7 +948,6 @@ WriteBCDDigitInTextFormat: .write_num ld [hli], a ret -; 0x627 ; converts the one-byte number at a to text (ascii) format, ; and writes it to [wStringBuffer] and the BGMap0 address at bc @@ -978,7 +973,6 @@ WriteOneByteNumber: ; 0627 (0:0627) pop hl pop bc ret -; 0x650 ; converts the two-byte number at hl to text (ascii) format, ; and writes it to [wStringBuffer] and the BGMap0 address at bc @@ -993,7 +987,6 @@ WriteTwoByteNumber: ; 0650 (0:0650) call JPHblankCopyDataHLtoDE pop bc ret -; 0x663 ; convert the number at hl to text (ascii) format and write it to de TwoByteNumberToText: ; 0663 (0:0663) @@ -1027,7 +1020,6 @@ TwoByteNumberToText: ; 0663 (0:0663) sbc b ld h, a ret -; 0x695 ; reads structs: ; x (1 byte), y (1 byte), data (n bytes), $00 @@ -1040,7 +1032,6 @@ WriteDataBlocksToBGMap0: ; 0695 (0:0695) bit 7, [hl] ; check for $ff jr z, WriteDataBlocksToBGMap0 ret -; 0x69d ; reads struct: ; x (1 byte), y (1 byte), data (n bytes), $00 @@ -1079,7 +1070,6 @@ WriteDataBlockToBGMap0: ; 069d (0:069d) ld b, 0 add hl, bc ; point to next structure ret -; 0x6c3 ; writes a to [v*BGMap0 + BG_MAP_WIDTH * c + b] WriteByteToBGMap0: ; 06c3 (0:06c3) @@ -1119,7 +1109,6 @@ HblankWriteByteToBGMap0: ; 06d9 pop de pop hl ret -; 0x6ee ; copy a bytes of data from hl to vBGMap0 address pointed to by coord at bc CopyDataToBGMap0: ; 06ee (0:06ee) @@ -1133,7 +1122,6 @@ CopyDataToBGMap0: ; 06ee (0:06ee) call SafeCopyDataHLtoDE pop bc ret -; 0x6fc ; copy b bytes of data from hl to de ; if LCD on, copy during h-blank only @@ -1150,7 +1138,6 @@ SafeCopyDataHLtoDE: ; 6fc (0:6fc) ret JPHblankCopyDataHLtoDE: ; 0709 (0:0709) jp HblankCopyDataHLtoDE -; 0x70c ; copy c bytes of data from hl to de, b times. ; used to copy gfx data with c = TILE_SIZE @@ -1247,7 +1234,6 @@ BankpushROM: ; 0745 (0:0745) call BankswitchROM pop bc ret -; 0x76f ; switch to rombank a, ; return old rombank id on top-of-stack @@ -1277,7 +1263,6 @@ BankpushROM2: ; 076f (0:076f) call BankswitchROM pop bc ret -; 0x78e ; restore rombank from top-of-stack BankpopROM: ; 078e (0:078e) @@ -1355,7 +1340,6 @@ BankswitchVRAM: ; 07d6 (0:07d6) ldh [hBankVRAM], a ld [rVBK], a ret -; 0x7db ; switch to CGB Normal Speed Mode if playing on CGB and current mode is Double Speed Mode SwitchToCGBNormalSpeed: ; 7db (0:7db) @@ -1488,7 +1472,6 @@ HtimesL: ; 0879 (0:0879) jr nz, .asm_883 pop de ret -; 0x88f ; return a random number between 0 and a (exclusive) in a Random: ; 088f (0:088f) @@ -1500,7 +1483,6 @@ Random: ; 088f (0:088f) ld a, h pop hl ret -; 0x89b ; get the next random numbers of the wRNG1 and wRNG2 sequences UpdateRNGSources: ; 089b (0:089b) @@ -1657,7 +1639,6 @@ Func_08ef: ; 08ef (0:08ef) inc hl ld a, [hli] jr .asm_93c -; 0x950 ; set attributes for [hl] sprites starting from wOAM + [wOAMOffset] / 4 ; return carry if reached end of wOAM before finishing @@ -1701,7 +1682,6 @@ SetManyObjectsAttributes: ; 950 (0:950) pop hl scf jr .done -; 0x97f ; for the sprite at wOAM + [wOAMOffset] / 4, set its attributes from registers e, d, c, b ; return carry if [wOAMOffset] > 40 * 4 (beyond the end of wOAM) @@ -1729,7 +1709,6 @@ SetOneObjectAttributes: ; 097f (0:097f) pop hl scf ret -; 0x99c ; set the Y Position and X Position of all sprites in wOAM to $00 ZeroObjectPositions: ; 099c (0:099c) @@ -1791,7 +1770,6 @@ Bank1Call_FarCall_Common: ; 09ce (0:09ce) pop de pop hl ret -; 0x9dc ; switch to the ROM bank at sp+4 SwitchToBankAtSP: ; 9dc (0:9dc) @@ -1805,7 +1783,6 @@ SwitchToBankAtSP: ; 9dc (0:9dc) inc sp inc sp ret -; 0x9e9 ; RST28 ; this function affects the stack so that it returns @@ -2097,7 +2074,6 @@ Func_0bcb: ; 0bcb (0:0bcb) call SendSGB ei ret -; 0xc08 ; loops 63000 * bc cycles (~15 * bc ms) Wait: ; 0c08 (0:0c08) @@ -2159,7 +2135,6 @@ HblankCopyDataDEtoHL: ; 0c32 (0:0c32) jr nz, .loop pop bc ret -; 0xc4b ; returns a *= 10 ATimes10: ; 0c4b (0:0c4b) @@ -2171,7 +2146,6 @@ ATimes10: ; 0c4b (0:0c4b) add a pop de ret -; 0xc53 ; returns hl *= 10 HLTimes10: ; 0c53 (0:0c53) @@ -2186,7 +2160,6 @@ HLTimes10: ; 0c53 (0:0c53) add hl, hl pop de ret -; 0xc5f ; returns a /= 10 ; returns carry if a % 10 >= 5 @@ -2201,7 +2174,6 @@ ADividedBy10: ; 0c5f (0:0c5f) ld a, e pop de ret -; 0xc6c ; Save a pointer to a list, given at de, to wListPointer SetListPointer: ; 0c6c (0:0c6c) @@ -2212,7 +2184,6 @@ SetListPointer: ; 0c6c (0:0c6c) ld [hl], d pop hl ret -; 0xc75 ; Return the current element of the list at wListPointer, ; and advance the list to the next element @@ -2234,7 +2205,6 @@ SetListToNextPosition: ; 0c7f (0:0c7f) pop de pop hl ret -; 0xc85 ; Set the current element of the list at wListPointer to a, ; and advance the list to the next element @@ -2248,7 +2218,6 @@ SetNextElementOfList: ; 0c85 (0:0c85) ld [de], a inc de jr SetListToNextPosition -; 0xc91 ; called at roughly 240Hz by TimerHandler SerialTimerHandler: ; 0c91 (0:0c91) @@ -2286,7 +2255,6 @@ SerialTimerHandler: ; 0c91 (0:0c91) .clear_timeout_counter ld [hl], $0 ret -; 0xcc5 Func_0cc5: ; 0cc5 (0:0cc5) ld hl, wSerialRecvCounter @@ -2346,7 +2314,6 @@ Func_0cc5: ; 0cc5 (0:0cc5) ld [wSerialOp], a scf ret -; 0xd26 SerialHandler: ; 0d26 (0:0d26) push af @@ -2679,7 +2646,6 @@ SerialSendBytes: ; 0ebf (0:0ebf) pop bc scf ret -; 0xed5 ; receive bc bytes in wSerialRecvBuf and save them to hl SerialRecvBytes: ; 0ed5 (0:0ed5) @@ -2706,7 +2672,6 @@ SerialRecvBytes: ; 0ed5 (0:0ed5) pop bc scf ret -; 0xef1 Func_0ef1: ; 0ef1 (0:0ef1) ld de, wcb79 @@ -2726,7 +2691,6 @@ Func_0ef1: ; 0ef1 (0:0ef1) ld [de], a or a ret -; 0xf05 Func_0f05: ; 0f05 (0:0f05) push hl @@ -2747,7 +2711,6 @@ Func_0f05: ; 0f05 (0:0f05) push hl scf ret -; 0xf1d Func_0f1d: ; 0f1d (0:0f1d) ld a, [wSerialFlags] @@ -2765,7 +2728,6 @@ Func_0f1d: ; 0f1d (0:0f1d) ld sp, hl scf ret -; 0xf35 ; load the number at wSerialFlags (error code?) to TxRam3, print ; TransmissionErrorText, exit the duel, and reset serial registers. @@ -2834,7 +2796,6 @@ SetOppAction_SerialSendDuelData: ; 0f7f (0:0f7f) pop bc pop hl ret -; 0xf9b ; receive 10 bytes of data from wSerialRecvBuf and store them into hOppActionTableIndex, ; hTempCardIndex_ff9f, hTemp_ffa0, and hTempPlayAreaLocation_ffa1, @@ -2849,7 +2810,6 @@ SerialRecvDuelData: ; 0f9b (0:0f9b) pop bc pop hl ret -; 0xfac ; serial send 8 bytes at f, a, l, h, e, d, c, b ; only during a duel against a link opponent @@ -2902,7 +2862,6 @@ SerialSend8Bytes: ; 0fac (0:0fac) pop hl pop af ret -; 0xfe9 ; serial recv 8 bytes to f, a, l, h, e, d, c, b SerialRecv8Bytes: ; 0fe9 (0:0fe9) @@ -2932,7 +2891,6 @@ SerialRecv8Bytes: ; 0fe9 (0:0fe9) pop hl pop af ret -; 0x100b ; save duel state to SRAM ; called between each two-player turn, just after player draws card (ROM bank 1 loaded) @@ -3038,7 +2996,6 @@ CopyDeckData: ; 1072 (0:1072) debug_ret scf ret -; 0x10aa ; return, in register a, the amount of prizes that the turn holder has not yet drawn CountPrizes: ; 10aa (0:10aa) @@ -3055,7 +3012,6 @@ CountPrizes: ; 10aa (0:10aa) jr nz, .count_loop pop hl ret -; 0x10bc ; shuffles the turn holder's deck ; if less than 60 cards remain in the deck, it makes sure that the rest are ignored @@ -3097,7 +3053,6 @@ DrawCardFromDeck: ; 10cf (0:10cf) pop hl scf ret -; 0x10e8 ; add a card to the top of the turn holder's deck ; the card is identified by register a, which contains the deck index (0-59) of the card @@ -3117,7 +3072,6 @@ ReturnCardToDeck: ; 10e8 (0:10e8) ld a, l pop hl ret -; 0x10fc ; search a card in the turn holder's deck, extract it, and set its location to ; CARD_LOCATION_JUST_DRAWN. AddCardToHand is meant to be called next. @@ -3155,7 +3109,6 @@ SearchCardInDeckAndAddToHand: ; 10fc (0:10fc) pop hl pop af ret -; 0x1123 ; adds a card to the turn holder's hand and increments the number of cards in the hand ; the card is identified by register a, which contains the deck index (0-59) of the card @@ -3181,7 +3134,6 @@ AddCardToHand: ; 1123 (0:1123) pop hl pop af ret -; 0x1139 ; removes a card from the turn holder's hand and decrements the number of cards in the hand ; the card is identified by register a, which contains the deck index (0-59) of the card @@ -3220,7 +3172,6 @@ RemoveCardFromHand: ; 1139 (0:1139) pop hl pop af ret -; 0x1160 ; moves a card to the turn holder's discard pile, as long as it is in the hand ; the card is identified by register a, which contains the deck index (0-59) of the card @@ -3252,7 +3203,6 @@ PutCardInDiscardPile: ; 116a (0:116a) pop hl pop af ret -; 0x1182 ; search a card in the turn holder's discard pile, extract it, and set its location to ; CARD_LOCATION_JUST_DRAWN. AddCardToHand is meant to be called next. @@ -3288,7 +3238,6 @@ MoveDiscardPileCardToHand: ; 1182 (0:1182) pop de pop hl ret -; 0x11a5 ; return in the z flag whether turn holder's prize a (0-7) has been drawn or not ; z: drawn, nz: not drawn @@ -3308,7 +3257,6 @@ CheckPrizeTaken: ; 11a5 (0:11a5) PowersOf2: db $01, $02, $04, $08, $10, $20, $40, $80 -; 0x11bf ; fill wDuelTempList with the turn holder's discard pile cards (their 0-59 deck indexes) ; return carry if the turn holder has no cards in the discard pile @@ -3338,7 +3286,6 @@ CreateDiscardPileCardList: ; 11bf (0:11bf) ret nz scf ret -; 0x11df ; fill wDuelTempList with the turn holder's remaining deck cards (their 0-59 deck indexes) ; return carry if the turn holder has no cards left in the deck @@ -3374,7 +3321,6 @@ CreateDeckCardList: ; 11df (0:11df) ld [wDuelTempList], a scf ret -; 0x120a ; fill wDuelTempList with the turn holder's energy cards ; in the arena or in a bench slot (their 0-59 deck indexes). @@ -3415,7 +3361,6 @@ CreateArenaOrBenchEnergyCardList: ; 120a (0:120a) .no_energies_found scf ret -; 0x123b ; fill wDuelTempList with the turn holder's hand cards (their 0-59 deck indexes) ; return carry if the turn holder has no cards in hand @@ -3446,7 +3391,6 @@ CreateHandCardList: ; 123b (0:123b) ret nz scf ret -; 0x1258 ; sort the turn holder's hand cards by ID (highest to lowest ID) ; makes use of wDuelTempList @@ -3469,7 +3413,6 @@ SortHandCardsByID: ; 1258 (0:1258) dec b jr nz, .loop2 ret -; 0x1271 ; returns: ; b = turn holder's number of cards in hand (DUELVARS_NUMBER_OF_CARDS_IN_HAND) @@ -3524,7 +3467,6 @@ ShuffleCards: ; 127f (0:127f) pop de pop hl ret -; 0x12a3 ; sort a $ff-terminated list of deck index cards by ID (lowest to highest ID). ; the list is wDuelTempList. @@ -3608,7 +3550,6 @@ SortCardsInListByID_CheckForListTerminator: ; 12ef (0:12ef) bit 7, [hl] ; $ff is the list terminator jr z, SortCardsInListByID ret -; 0x12fa ; returns, in register bc, the id of the card with the deck index specified in register a ; preserves hl @@ -3619,7 +3560,6 @@ GetCardIDFromDeckIndex_bc: ; 12fa (0:12fa) ld b, $0 pop hl ret -; 0x1303 ; return [wDuelTempList + a] in a and in hTempCardIndex_ff98 GetCardInDuelTempList_OnlyDeckIndex: ; 1303 (0:1303) @@ -3634,7 +3574,6 @@ GetCardInDuelTempList_OnlyDeckIndex: ; 1303 (0:1303) pop de pop hl ret -; 0x1312 ; given the deck index (0-59) of a card in [wDuelTempList + a], return: ; - the id of the card with that deck index in register de @@ -3651,7 +3590,6 @@ GetCardInDuelTempList: ; 1312 (0:1312) pop hl ldh a, [hTempCardIndex_ff98] ret -; 0x1324 ; returns, in register de, the id of the card with the deck index (0-59) specified by register a ; preserves af and hl @@ -3664,7 +3602,6 @@ GetCardIDFromDeckIndex: ; 1324 (0:1324) pop hl pop af ret -; 0x132f ; remove card c from wDuelTempList (it contains a $ff-terminated list of deck indexes) RemoveCardFromDuelTempList: ; 132f (0:132f) @@ -3698,7 +3635,6 @@ RemoveCardFromDuelTempList: ; 132f (0:132f) pop de pop hl ret -; 0x1351 ; return the number of cards in wDuelTempList in a CountCardsInDuelTempList: ; 1351 (0:1351) @@ -3715,7 +3651,6 @@ CountCardsInDuelTempList: ; 1351 (0:1351) pop bc pop hl ret -; 0x1362 ; returns, in register a, the id of the card with the deck index (0-59) specified in register a _GetCardIDFromDeckIndex: ; 1362 (0:1362) @@ -3766,7 +3701,6 @@ LoadCardDataToBuffer2_FromDeckIndex: ; 138c (0:138c) pop de pop hl ret -; 0x13a2 ; evolve a turn holder's Pokemon card in the play area slot determined by hTempPlayAreaLocation_ff9d ; into another turn holder's Pokemon card identifier by it's deck index (0-59) in hTempCardIndex_ff98. @@ -3826,7 +3760,6 @@ EvolvePokemonCard: ; 13a2 (0:13a2) ; never executed scf ret -; 0x13f7 ; check if the turn holder's Pokemon card at e can evolve into the turn holder's Pokemon card d. ; e is the play area location offset (PLAY_AREA_*) of the Pokemon trying to evolve. @@ -3869,7 +3802,6 @@ CheckIfCanEvolveInto: ; 13f7 (0:13f7) xor a scf ret -; 0x142b ; check if the turn holder's Pokemon card at e can evolve this turn, and is a basic ; Pokemon card that whose second stage evolution is the turn holder's Pokemon card d. @@ -3912,7 +3844,6 @@ CheckIfCanEvolveInto_BasicToStage2: ; 142b (0:142b) xor a scf ret -; 0x1461 ; clear the status, all substatuses, and temporary duelvars of the turn holder's ; arena Pokemon. called when sending a new Pokemon into the arena. @@ -3945,7 +3876,6 @@ ClearAllStatusConditions: ; 1461 (0:1461) ld [hl], a pop hl ret -; 0x1485 ; Removes a Pokemon card from the hand and places it in the arena or first available bench slot. ; If the Pokemon is placed in the arena, the status conditions of the player's arena card are zeroed. @@ -4006,7 +3936,6 @@ PutHandPokemonCardInPlayArea: ; 1485 (0:1485) pop af scf ret -; 0x14d2 ; Removes a card from the hand and changes its location to arena or bench. Given that ; DUELVARS_ARENA_CARD or DUELVARS_BENCH aren't affected, this function is meant for energy and trainer cards. @@ -4022,7 +3951,6 @@ PutHandCardInPlayArea: ; 14d2 (0:14d2) or CARD_LOCATION_PLAY_AREA ld [hl], a ret -; 0x14dd ; move the Pokemon card of the turn holder in the ; PLAY_AREA_* location given in e to the discard pile @@ -4046,7 +3974,6 @@ MovePlayAreaCardToDiscardPile: ; 14dd (0:14dd) cp DECK_SIZE jr c, .next_card ret -; 0x14f8 ; init a turn holder's play area slot to empty ; which slot (arena or benchx) is determined by the play area location offset (PLAY_AREA_*) in e @@ -4071,7 +3998,6 @@ EmptyPlayAreaSlot: ; 14f8 (0:14f8) ld l, a ld [hl], d ret -; 0x151e ; shift play area Pokemon of both players to the first available play area (arena + benchx) slots ShiftAllPokemonToFirstPlayAreaSlots: ; 151e (0:151e) @@ -4080,7 +4006,6 @@ ShiftAllPokemonToFirstPlayAreaSlots: ; 151e (0:151e) call ShiftTurnPokemonToFirstPlayAreaSlots call SwapTurn ret -; 0x152b ; shift play area Pokemon of the turn holder to the first available play area (arena + benchx) slots ShiftTurnPokemonToFirstPlayAreaSlots: ; 152b (0:152b) @@ -4099,7 +4024,6 @@ ShiftTurnPokemonToFirstPlayAreaSlots: ; 152b (0:152b) cp MAX_PLAY_AREA_POKEMON jr nz, .next_play_area_slot ret -; 0x1543 ; swap the data of the turn holder's arena Pokemon card with the ; data of the turn holder's Pokemon card in play area e. @@ -4178,7 +4102,6 @@ SwapPlayAreaPokemon: ; 1548 (0:1548) pop af ld [hl], a ret -; 0x159f ; Find which and how many energy cards are attached to the turn holder's Pokemon card in the arena, ; or a Pokemon card in the bench, depending on the value of register e. @@ -4248,7 +4171,6 @@ GetPlayAreaCardAttachedEnergies: ; 159f (0:159f) pop de pop hl ret -; 0x15ef ; returns in a how many times card e can be found in location b ; e = card id to search @@ -4299,7 +4221,6 @@ GetNonTurnDuelistVariable: ; 1611 (0:1611) .ok ld a, [hl] ret -; 0x161e ; when playing a Pokemon card, initializes some variables according to the ; card played, and checks if the played card has Pokemon Power to show it to @@ -4374,7 +4295,6 @@ Func_161e: ; 161e (0:161e) ld a, EFFECTCMDTYPE_PKMN_POWER_TRIGGER call TryExecuteEffectCommandFunction ret -; 0x16ad ; copies, given a card identified by register a (card ID): ; - e into wSelectedAttack and d into hTempCardIndex_ff9f @@ -4714,7 +4634,6 @@ CheckSelfConfusionDamage: ; 18d7 (0:18d7) .no_confusion_damage or a ret -; 0x18f9 ; play the trainer card with deck index at hTempCardIndex_ff98. ; a trainer card is like a move effect, with its own effect commands. @@ -4756,7 +4675,6 @@ PlayTrainerCard: ; 18f9 (0:18f9) .done or a ret -; 0x1944 ; loads the effect commands of a (trainer or energy) card with deck index (0-59) at hTempCardIndex_ff9f ; into wLoadedMoveEffectCommands. in practice, only used for trainer cards @@ -4771,7 +4689,6 @@ LoadNonPokemonCardEffectCommands: ; 1944 (0:1944) ld a, [hl] ld [de], a ret -; 0x1955 Func_1955: ; 1955 (0:1955) push af @@ -5044,7 +4961,6 @@ PrintKnockedOut: ; 1ad3 (0:1ad3) jr nz, .wait_frames scf ret -; 0x1af3 ; deal damage to turn holder's Pokemon card at play area location at b (PLAY_AREA_*). ; damage to deal is given in de. @@ -5140,7 +5056,6 @@ DealDamageToPlayAreaPokemon: ; 1af3 (0:1af3) pop de pop hl ret -; 0x1b8d ; draw duel main scene, then print the "<Pokemon Lvxx>'s <attack>" text ; The Pokemon's name is the turn holder's arena Pokemon, and the @@ -5217,7 +5132,6 @@ Func_1bca: ; 1bca (0:1bca) call DrawWideTextBox_PrintText scf ret -; 0x1c05 ; return in a the retreat cost of the turn holder's arena or bench Pokemon ; given the PLAY_AREA_* value in hTempPlayAreaLocation_ff9d @@ -5228,7 +5142,6 @@ GetPlayAreaCardRetreatCost: ; 1c05 (0:1c05) call LoadCardDataToBuffer1_FromDeckIndex call GetLoadedCard1RetreatCost ret -; 0x1c13 ; move the turn holder's card with ID at de to the discard pile ; if it's currently in the arena. @@ -5258,7 +5171,6 @@ MoveCardToDiscardPileIfInArena: ; 1c13 (0:1c13) cp DECK_SIZE jr c, .next_card ret -; 0x1c35 ; calculate damage of card at CARD_LOCATION_* in e ; return the result in a @@ -5280,7 +5192,6 @@ GetCardDamage: ; 1c35 (0:1c35) pop de pop hl ret -; 0x1c50 ; check if a flag of wLoadedMove is set ; input: @@ -5316,7 +5227,6 @@ CheckLoadedMoveFlag: ; 1c50 (0:1c50) pop de pop hl ret -; 0x1c72 ; returns [hWhoseTurn] <-- ([hWhoseTurn] ^ $1) ; As a side effect, this also returns a duelist variable in a similar manner to @@ -5559,7 +5469,6 @@ RemoveCardFromCollection: ; 1d91 (0:1d91) call DisableSRAM pop hl ret -; 0x1da4 ; return the amount of different cards that the player has collected in d ; return NUM_CARDS in e, minus 1 if VENUSAUR1 or MEW2 has not been collected (minus 2 if neither) @@ -5590,7 +5499,6 @@ GetCardAlbumProgress: ; 1da4 (0:1da4) call DisableSRAM pop hl ret -; 0x1dca ; copy c bytes of data from de to hl ; if LCD on, copy during h-blank only @@ -5974,7 +5882,6 @@ FillRectangle: ; 1f5f (0:1f5f) add sp, $24 pop de ret -; 0x1f96 Func_1f96: ; 1f96 (0:1f96) add sp, -10 @@ -6108,7 +6015,6 @@ Func_1f96: ; 1f96 (0:1f96) add sp, 10 scf ret -; 0x2046 Func_2046: ; 2046 (0:2046) ld hl, sp+3 @@ -6140,7 +6046,6 @@ Func_2057: ; 2057 (0:2057) ld a, e call HblankWriteByteToBGMap0 ret -; 0x2066 ; loads the four tiles of the card set 2 icon constant provided in register a ; returns carry if the specified set does not have an icon @@ -6174,7 +6079,6 @@ LoadDuelDrawCardsScreenTiles: ; 208d (0:208d) ld de, v0Tiles1 + $74 tiles ld b, $08 jp CopyFontsOrDuelGraphicsTiles -; 0x2098 ; loads the 8 tiles that make up the border of the main duel menu as well as the border ; of a large card picture (displayed after drawing the card or placing it in the arena). @@ -6183,7 +6087,6 @@ LoadCardOrDuelMenuBorderTiles: ; 2098 (0:2098) ld de, v0Tiles1 + $50 tiles ld b, $08 jr CopyFontsOrDuelGraphicsTiles -; 0x20a2 ; loads the graphics of a card type header, used to display a picture of a card after drawing it ; or placing it in the arena. register e determines which header (TRAINER, ENERGY, PoKéMoN) @@ -6195,7 +6098,6 @@ LoadCardTypeHeaderTiles: ; 20a2 (0:20a2) ld de, v0Tiles1 + $60 tiles ld b, $10 jr CopyFontsOrDuelGraphicsTiles -; 0x20b0 ; loads the symbols that are displayed near the names of a list of cards in the hand or discard pile LoadDuelCardSymbolTiles: ; 20b0 (0:20b0) @@ -6286,7 +6188,6 @@ CopyFontsOrDuelGraphicsTiles: ; 2121 (0:2121) call CopyGfxData call BankpopROM ret -; 0x212f ; this function copies gfx data into sram Func_212f: ; 212f (0:212f) @@ -6315,7 +6216,6 @@ Func_212f: ; 212f (0:212f) ld de, $b100 ld b, $30 jr CopyFontsOrDuelGraphicsTiles -; 0x2167 ; load the graphics and draw the duel box message given a BOXMSC_* constant in a DrawDuelBoxMessage: ; 2167 (0:2167) @@ -6335,7 +6235,6 @@ DrawDuelBoxMessage: ; 2167 (0:2167) lb bc, 10, 4 lb de, 5, 4 jp FillRectangle -; 0x2189 ; load the tiles for the latin, katakana, and hiragana fonts into VRAM ; from gfx/fonts/full_width/3.1bpp and gfx/fonts/full_width/4.t3.1bpp @@ -6355,7 +6254,6 @@ LoadFullWidthFontTiles: ; 2189 (0:2189) call Copy1bppTiles call BankpopROM ret -; 0x21ab ; copy 128 1bpp tiles from de to hl as 2bpp Copy1bppTiles: ; 21ab (0:21ab) @@ -6372,7 +6270,6 @@ Copy1bppTiles: ; 21ab (0:21ab) dec b jr nz, .tile_loop ret -; 0x21ba ; similar to ProcessText except it calls InitTextPrinting first ; with the first two bytes of hl being used to set hTextBGMap0Address. @@ -6843,7 +6740,6 @@ GetTextLengthInHalfTiles: ; 23d3 (0:23d3) pop de pop hl ret -; 0x23fd ; copy text of maximum length a (in tiles) from hl to de, then terminate ; the text with TX_END if it doesn't contain it already. @@ -6926,7 +6822,6 @@ CopyTextData: ; 23fd (0:23fd) pop bc or a ret -; 0x245d ; convert the number at hl to TX_SYMBOL text format and write it to wStringBuffer ; replace leading zeros with SYM_SPACE @@ -7185,7 +7080,6 @@ GetFullWidthFontTileOffset: ; 256d (0:256d) add hl, hl add hl, bc ret -; 0x2589 ; pointers to VRAM? Unknown_2589: ; 2589 (0:2589) @@ -7238,7 +7132,6 @@ Unknown_2589: ; 2589 (0:2589) dw $98fc dw $9940 dw $ffff -; 0x25ea ; initializes parameters for a card list (e.g. list of hand cards in a duel, or booster pack cards) ; input: @@ -7276,7 +7169,6 @@ InitializeCardListParameters: ; 25ea (0:25ea) ld a, 1 ld [wYDisplacementBetweenMenuItems], a ret -; 0x2626 ; similar to HandleMenuInput, but conveniently returns parameters related to the ; state of the list in a, d, and e if A or B were pressed. also returns carry @@ -7292,7 +7184,6 @@ HandleCardListInput: ; 2626 (0:2626) ldh a, [hCurMenuItem] scf ret -; 0x2636 ; initializes parameters for a menu, given the 8 bytes starting at hl, ; which are loaded to the following addresses: @@ -7544,7 +7435,6 @@ HandleDuelMenuInput: ; 271a (0:271a) ld e, a or a ret -; 0x278d DuelMenuCursorCoords: ; 278d (0:278d) db 2, 14 ; Hand @@ -7645,7 +7535,6 @@ ReloadCardListItems: jr nz, .next_card .done ret -; 0x2827 ; reload a list of cards, except don't print their names Func_2827: ; 2827 (0:2827) @@ -7655,7 +7544,6 @@ Func_2827: ; 2827 (0:2827) xor a ldh [hffb0], a ret -; 0x2832 ; convert the number at a to TX_SYMBOL text format and write it to wDefaultText ; if the first digit is a 0, delete it and shift the number one tile to the left @@ -7670,7 +7558,6 @@ OneByteNumberToTxSymbol_TrimLeadingZerosAndAlign: ; 2832 (0:2832) ld [hl], SYM_SPACE .not_zero ret -; 0x283f ; this function is always loaded to wMenuFunctionPointer by PrintCardListItems ; takes care of things like handling page scrolling and calling the function at wListFunctionPointer @@ -7840,7 +7727,6 @@ CardListMenuFunction: ; 283f (0:283f) ldh [hCurMenuItem], a scf ret -; 0x296a ; convert the number at a to TX_SYMBOL text format and write it to wDefaultText ; replace leading zeros with SYM_SPACE @@ -7851,7 +7737,6 @@ OneByteNumberToTxSymbol_TrimLeadingZeros: ; 296a (0:296a) ret nz ld [hl], SYM_SPACE ret -; 0x2974 ; convert the number at a to TX_SYMBOL text format and write it to wDefaultText OneByteNumberToTxSymbol: ; 2974 (0:2974) @@ -7869,7 +7754,6 @@ OneByteNumberToTxSymbol: ; 2974 (0:2974) ld [hl], SYM_SPACE pop hl ret -; 0x2988 ; translate the TYPE_* constant in wLoadedCard1Type to an index for CardSymbolTable CardTypeToSymbolID: ; 2988 (0:2988) @@ -7888,7 +7772,6 @@ CardTypeToSymbolID: ; 2988 (0:2988) ld a, [wLoadedCard1Stage] ; different symbol for each evolution stage add 8 ret -; 0x299f ; return the entry in CardSymbolTable of the TYPE_* constant in wLoadedCard1Type ; also return the first byte of said entry (starting tile number) in a @@ -7901,7 +7784,6 @@ GetCardSymbolData: ; 299f (0:299f) add hl, bc ld a, [hl] ret -; 0x29ac ; draw, at de, the 2x2 tile card symbol associated to the TYPE_* constant in wLoadedCard1Type DrawCardSymbol: ; 29ac (0:29ac) @@ -7934,7 +7816,6 @@ DrawCardSymbol: ; 29ac (0:29ac) pop de pop hl ret -; 0x29dd CardSymbolTable: ; starting tile number, cgb palette (grey, yellow/red, green/blue, pink/orange) @@ -7956,7 +7837,6 @@ CardSymbolTable: CopyCardNameAndLevel: ; 29f5 (0:29f5) farcall _CopyCardNameAndLevel ret -; 0x29fa ; sets cursor parameters for navigating in a text box, but using ; default values for the cursor tile (SYM_CURSOR_R) and the tile behind it (SYM_SPACE). @@ -8004,14 +7884,12 @@ SetCursorParametersForTextBox: ; 2a1a (0:2a1a) ld [hl], c ; wTileBehindCursor ld [wCursorBlinkCounter], a ret -; 0x2a30 ; draw a 20x6 text box aligned to the bottom of the screen, ; print the text at hl without letter delay, and wait for A or B pressed DrawWideTextBox_PrintTextNoDelay_Wait: ; 2a30 (0:2a30) call DrawWideTextBox_PrintTextNoDelay jp WaitForWideTextBoxInput -; 0x2a36 ; draw a 20x6 text box aligned to the bottom of the screen ; and print the text at hl without letter delay @@ -8134,7 +8012,6 @@ TwoItemHorizontalMenu: ; 2ad0 (0:2ad0) ld [wCurMenuItem], a call EnableLCD jp HandleYesOrNoMenu.refresh_menu -; 0x2aeb YesOrNoMenuWithText_SetCursorToYes: ; 2aeb (0:2aeb) ld a, $01 @@ -8225,13 +8102,11 @@ PrintYesOrNoItems: ; 2b66 (0:2b66) ldtx hl, YesOrNoText call InitTextPrinting_ProcessTextFromID ret -; 0x2b70 ContinueDuel: ; 2b70 (0:2b70) ld a, BANK(_ContinueDuel) call BankswitchROM jp _ContinueDuel -; 0x2b78 ; loads opponent deck at wOpponentDeckID to wOpponentDeck, and initializes wPlayerDuelistType. ; on a duel against Sam, also loads PRACTICE_PLAYER_DECK to wPlayerDeck. @@ -8400,7 +8275,6 @@ ProcessTextFromID: ; 2c29 (0:2c29) pop af call BankswitchROM ret -; 0x2c37 ; return, in a, the number of lines of the text given in hl as an ID ; this is calculated by counting the amount of '\n' characters and adding 1 to the result @@ -8436,7 +8310,6 @@ CountLinesOfTextFromID: ; 2c37 (0:2c37) pop de pop hl ret -; 0x2c62 ; call PrintScrollableText with text box label, then wait for the ; player to press A or B to advance the printed text @@ -8864,7 +8737,6 @@ CopyText: ; 2e89 (0:2e89) cp OPPONENT_TURN jp z, CopyOpponentName jp CopyPlayerName -; 0x2ea9 ; copy text of maximum length a (in tiles) from its ID at hl to de, ; then terminate the text with TX_END if it doesn't contain it already. @@ -8880,7 +8752,6 @@ CopyTextData_FromTextID: ; 2ea9 (0:2ea9) pop af call BankswitchROM ret -; 0x2ebb ; text id (usually of a card name) for TX_RAM2 LoadTxRam2: ; 2ebb (0:2ebb) @@ -8897,7 +8768,6 @@ LoadTxRam3: ; 2ec4 (0:2ec4) ld a, h ld [wTxRam3 + 1], a ret -; 0x2ecd ; load data of card with text id of name at de to wLoadedCard1 LoadCardDataToBuffer1_FromName: ; 2ecd (0:2ecd) @@ -8944,7 +8814,6 @@ LoadCardDataToBuffer1_FromName: ; 2ecd (0:2ecd) .done call BankpopROM ret -; 0x2f0a ; load data of card with id at e to wLoadedCard2 LoadCardDataToBuffer2_FromCardID: ; 2f0a (0:2f0a) @@ -9721,7 +9590,6 @@ HandleDamageReductionExceptSubstatus2: ; 3269 (0:3269) ld e, l ld d, h ret -; 0x32f7 ; check for Invisible Wall, Kabuto Armor, NShield, or Transparency, in order to ; possibly reduce or make zero the damage at de. @@ -9743,7 +9611,6 @@ HandleDamageReductionOrNoDamageFromPkmnPowerEffects: ; 32f7 (0:32f7) ; if carry was set due to NShield or Transparency, damage is 0 ld de, 0 ret -; 0x3317 ; when MACHAMP is damaged, if its Strikes Back is active, the ; attacking Pokemon (turn holder's arena Pokemon) takes 10 damage. @@ -9806,7 +9673,6 @@ HandleStrikesBack_AgainstDamagingMove: ; 3317 (0:3317) pop de pop hl ret -; 0x337f ; return carry if NShield or Transparency activate (if MEW1 or HAUNTER1 is ; the turn holder's arena Pokemon), and print their corresponding text if so @@ -9848,7 +9714,6 @@ HandleNShieldAndTransparency: ; 337f (0:337f) ld [wNoDamageOrEffect], a ldtx hl, NoDamageOrEffectDueToTransparencyText jr .print_text -; 0x33c1 ; return carry if the turn holder's arena Pokemon is under a condition that makes ; it unable to attack. also return in hl the text id to be displayed @@ -10010,7 +9875,6 @@ HandleTransparency: ; 348a (0:348a) ldtx hl, NoDamageOrEffectDueToTransparencyText scf ret -; 0x34b7 ; return carry and return the appropriate text id in hl if the target has an ; special status or power that prevents any damage or effect done to it this turn @@ -10039,7 +9903,6 @@ CheckNoDamageOrEffect: ; 34b7 (0:34b7) ld hl, $0000 scf ret -; 0x34d8 NoDamageOrEffectTextIDTable: ; 34d8 (0:34d8) tx NoDamageOrEffectDueToAgilityText ; NO_DAMAGE_OR_EFFECT_AGILITY @@ -10047,7 +9910,6 @@ NoDamageOrEffectTextIDTable: ; 34d8 (0:34d8) tx NoDamageOrEffectDueToFlyText ; NO_DAMAGE_OR_EFFECT_FLY tx NoDamageOrEffectDueToTransparencyText ; NO_DAMAGE_OR_EFFECT_TRANSPARENCY tx NoDamageOrEffectDueToNShieldText ; NO_DAMAGE_OR_EFFECT_NSHIELD -; 0x34e2 ; return carry if turn holder has Omanyte and its Clairvoyance Pkmn Power is active IsClairvoyanceActive: ; 34e2 (0:34e2) @@ -10152,7 +10014,6 @@ CountPokemonIDInPlayArea: ; 3525 (0:3525) pop de pop hl ret -; 0x356a ; return, in a, the retreat cost of the card in wLoadedCard1, ; adjusting for any Dodrio's Retreat Aid Pkmn Power that is active. @@ -10187,7 +10048,6 @@ GetLoadedCard1RetreatCost: ; 356a (0:356a) ret nc xor a ret -; 0x3597 ; return carry if the turn holder's arena Pokemon is affected by Acid and can't retreat CheckCantRetreatDueToAcid: ; 3597 (0:3597) @@ -10203,7 +10063,6 @@ CheckCantRetreatDueToAcid: ; 3597 (0:3597) ldtx hl, UnableToRetreatDueToAcidText scf ret -; 0x35a9 ; return carry if the turn holder is affected by Headache and trainer cards can't be used CheckCantUseTrainerDueToHeadache: ; 35a9 (0:35a9) @@ -10215,7 +10074,6 @@ CheckCantUseTrainerDueToHeadache: ; 35a9 (0:35a9) ldtx hl, UnableToUseTrainerDueToHeadacheText scf ret -; 0x35b7 ; return carry if any duelist has Aerodactyl and its Prehistoric Power Pkmn Power is active IsPrehistoricPowerActive: ; 35b7 (0:35b7) @@ -10227,7 +10085,6 @@ IsPrehistoricPowerActive: ; 35b7 (0:35b7) ldtx hl, UnableToEvolveDueToPrehistoricPowerText ccf ret -; 0x35c7 ; clears some SUBSTATUS2 conditions from the turn holder's active Pokemon. ; more specifically, those conditions that reduce the damage from an attack @@ -10251,7 +10108,6 @@ ClearDamageReductionSubstatus2: ; 35c7 (0:35c7) .zero ld [hl], 0 ret -; 0x35e6 ; clears the SUBSTATUS1 and updates the double damage condition of the player about to start his turn UpdateSubstatusConditions_StartOfTurn: ; 35e6 (0:35e6) @@ -10284,7 +10140,6 @@ UpdateSubstatusConditions_EndOfTurn: ; 35fa (0:35fa) ret z res SUBSTATUS3_THIS_TURN_DOUBLE_DAMAGE, [hl] ret -; 0x3615 ; return carry if turn holder has Blastoise and its Rain Dance Pkmn Power is active IsRainDanceActive: ; 3615 (0:3615) @@ -10295,7 +10150,6 @@ IsRainDanceActive: ; 3615 (0:3615) call CountPokemonIDInBothPlayAreas ccf ret -; 0x3622 ; return carry if card at [hTempCardIndex_ff98] is a water energy card AND ; if card at [hTempPlayAreaLocation_ff9d] is a water Pokemon card. @@ -10314,7 +10168,6 @@ CheckRainDanceScenario: ; 3622 (0:3622) .done or a ret -; 0x363b ; if the defending (non-turn) card's HP is 0 and the attacking (turn) card's HP ; is not, the attacking card faints if it was affected by destiny bond @@ -10354,7 +10207,6 @@ HandleDestinyBondSubstatus: ; 363b (0:363b) ldtx hl, KnockedOutDueToDestinyBondText call DrawWideTextBox_WaitForInput ret -; 0x367b ; when MACHAMP is damaged, if its Strikes Back is active, the ; attacking Pokemon (turn holder's arena Pokemon) takes 10 damage. @@ -10410,7 +10262,6 @@ ApplyStrikesBack_AgainstResidualMove: ; 36a2 (0:36a2) call DrawDuelHUDs scf ret -; 0x36d9 ; if the id of the card provided in register a as a deck index is MUK, ; clear the changed type of all arena and bench Pokemon @@ -10432,7 +10283,6 @@ ClearChangedTypesIfMuk: ; 36d9 (0:36d9) dec c jr nz, .zero_changed_types_loop ret -; 0x36f6 ; return the turn holder's arena card's color in a, accounting for Venomoth's Shift Pokemon Power if active GetArenaCardColor: ; 36f6 (0:36f6) @@ -10473,7 +10323,6 @@ GetPlayAreaCardColor: ; 36f7 (0:36f7) pop hl and $f ret -; 0x3729 ; return in a the weakness of the turn holder's arena or benchx Pokemon given the PLAY_AREA_* value in a ; if a == 0 and [DUELVARS_ARENA_CARD_CHANGED_WEAKNESS] != 0, @@ -10499,7 +10348,6 @@ GetCardWeakness: call LoadCardDataToBuffer2_FromDeckIndex ld a, [wLoadedCard2Weakness] ret -; 0x3743 ; return in a the resistance of the turn holder's arena or benchx Pokemon given the PLAY_AREA_* value in a ; if a == 0 and [DUELVARS_ARENA_CARD_CHANGED_RESISTANCE] != 0, @@ -10525,7 +10373,6 @@ GetCardResistance: call LoadCardDataToBuffer2_FromDeckIndex ld a, [wLoadedCard2Resistance] ret -; 0x375d ; this function checks if turn holder's CHARIZARD energy burn is active, and if so, turns ; all energies at wAttachedEnergies except double colorless energies into fire energies @@ -10549,7 +10396,6 @@ HandleEnergyBurn: ; 375d (0:375d) ld a, [wTotalAttachedEnergies] ld [wAttachedEnergies], a ret -; 0x377f SetupSound: ; 377f (0:377f) farcall _SetupSound @@ -10584,7 +10430,6 @@ PauseSong: ; 379b (0:379b) ResumeSong: ; 37a0 (0:37a0) farcall _ResumeSong ret -; 0x37a5 Func_37a5: ; 37a5 (0:37a5) ldh a, [hBankROM] @@ -10606,7 +10451,6 @@ Func_37a5: ; 37a5 (0:37a5) pop af call BankswitchROM ret -; 0x37c5 Func_37c5: ; 37c5 (0:37c5) ld c, $08 @@ -10666,7 +10510,6 @@ Func_37c5: ; 37c5 (0:37c5) dec c jr nz, .asm_37c7 ret -; 0x380e Func_380e: ; 380e (0:380e) ld a, [wd0c1] @@ -10829,7 +10672,6 @@ GetPermissionOfMapPosition: ; 3927 (0:3927) ld a, [hl] pop hl ret -; 0x392e ; set to a the permission byte corresponding to the current map's x,y coordinates at bc SetPermissionOfMapPosition: ; 392e (0:392e) @@ -10840,7 +10682,6 @@ SetPermissionOfMapPosition: ; 392e (0:392e) ld [hl], a pop hl ret -; 0x3937 ; set the permission byte corresponding to the current map's x,y coordinates at bc ; to the value of register a anded by its current value @@ -10858,7 +10699,6 @@ UpdatePermissionOfMapPosition: ; 3937 (0:3937) pop bc pop hl ret -; 0x3946 ; returns in hl the address within wPermissionMap that corresponds to ; the current map's x,y coordinates at bc @@ -10982,7 +10822,6 @@ FindLoadedNPC: ; 39c3 (0:39c3) pop bc pop hl ret -; 0x39ea Func_39ea: ; 39ea (0:39ea) push bc @@ -10997,7 +10836,6 @@ Func_39ea: ; 39ea (0:39ea) ld a, c pop bc ret -; 0x39fc Func_39fc: ; 39fc (0:39fc) push hl @@ -11048,17 +10886,14 @@ Func_3a3b: ; 3a3b (0:3a3b) Func_3a40: ; 3a40 (0:3a40) farcall Func_11430 ret -; 0x3a45 Func_3a45: ; 3a45 (0:3a45) farcall Func_11343 ret -; 0x3a4a Func_3a4a: ; 3a4a (0:3a4a) farcall Func_115a3 ret -; 0x3a4f Func_3a4f: ; 3a4f (0:3a4f) push af @@ -11072,7 +10907,6 @@ Func_3a4f: ; 3a4f (0:3a4f) pop bc pop af ret -; 0x3a5e HandleMoveModeAPress: ; 3a5e (0:3a5e) ldh a, [hBankROM] @@ -11167,12 +11001,10 @@ GetMapScriptPointer: ; 3abd (0:3abd) ccf pop bc ret -; 0x3ae8 Func_3ae8: ; 3ae8 (0:3ae8) farcall Func_11f4e ret -; 0x3aed ; finds a Script from the first byte and puts the next two bytes (usually arguments?) into cb RunOverworldScript: ; 3aed (0:3aed) @@ -11201,7 +11033,6 @@ RunOverworldScript: ; 3aed (0:3aed) call BankswitchROM pop bc jp hl -; 0x3b11 Func_3b11: ; 3b11 (0:3b11) ldh a, [hBankROM] @@ -11212,7 +11043,6 @@ Func_3b11: ; 3b11 (0:3b11) pop af call BankswitchROM ret -; 0x3b21 Func_3b21: ; 3b21 (0:3b21) ldh a, [hBankROM] @@ -11294,7 +11124,6 @@ Func_3b6a: ; 3b6a (0:3b6a) pop af call BankswitchROM ret -; 0x3ba2 Func_3ba2: ; 3ba2 (0:3ba2) ldh a, [hBankROM] @@ -11306,7 +11135,6 @@ Func_3ba2: ; 3ba2 (0:3ba2) pop af call BankswitchROM ret -; 0x3bb5 Func_3bb5: ; 3bb5 (0:3bb5) xor a @@ -11322,7 +11150,6 @@ Func_3bb5: ; 3bb5 (0:3bb5) ld a, $80 ld [wd4c0], a ret -; 0x3bd2 ; writes from hl the pointer to the function to be called by DoFrame SetDoFrameFunction: ; 3bd2 (0:3bd2) @@ -11338,7 +11165,6 @@ ResetDoFrameFunction: ; 3bdb (0:3bdb) call SetDoFrameFunction pop hl ret -; 0x3be4 Func_3be4: ; 3be4 (0:3be4) ldh a, [hBankROM] @@ -11349,7 +11175,6 @@ Func_3be4: ; 3be4 (0:3be4) pop af call BankswitchROM ret -; 0x3bf5 ; Copies bc bytes from [wTempPointer] to de CopyBankedDataToDE: ; 3bf5 (0:3bf5) @@ -11367,7 +11192,6 @@ CopyBankedDataToDE: ; 3bf5 (0:3bf5) pop af call BankswitchROM ret -; 0x3c10 ; fill bc bytes of data at hl with a FillMemoryWithA: ; 3c10 (0:3c10) @@ -11386,7 +11210,6 @@ FillMemoryWithA: ; 3c10 (0:3c10) pop de pop hl ret -; 0x3c1f ; fill 2*bc bytes of data at hl with d,e FillMemoryWithDE: ; 3c1f (0:3c1f) @@ -11404,7 +11227,6 @@ FillMemoryWithDE: ; 3c1f (0:3c1f) pop bc pop hl ret -; 0x3c2d Func_3c2d: ; 3c2d (0:3c2d) push hl @@ -11424,15 +11246,12 @@ Func_3c2d: ; 3c2d (0:3c2d) pop af pop hl ret -; 0x3c45 CallHL2: ; 3c45 (0:3c45) jp hl -; 0x3c46 CallBC: ; 3c46 (0:3c46) retbc -; 0x3c48 DoFrameIfLCDEnabled: ; 3c48 (0:3c48) push af @@ -11485,7 +11304,6 @@ DivideBCbyDE: ; 3c5a (0:3c5a) CallPlaySong: ; 3c83 (0:3c83) call PlaySong ret -; 0x3c87 Func_3c87: ; 3c87 (0:3c87) push af @@ -11495,7 +11313,6 @@ Func_3c87: ; 3c87 (0:3c87) call WaitForSongToFinish call ResumeSong ret -; 0x3c96 WaitForSongToFinish: ; 3c96 (0:3c96) call DoFrameIfLCDEnabled @@ -11528,7 +11345,6 @@ Func_3cb4: ; 3cb4 (0:3cb4) pop af call BankswitchROM ret -; 0x3cc4 ; refresh sprites? Func_3cc4: ; 3cc4 (0:3cc4) @@ -11643,7 +11459,6 @@ Func_3cc4: ; 3cc4 (0:3cc4) pop af call BankswitchROM ret -; 0x3d72 Func_3d72: ; 3d72 (0:3d72) ldh a, [hBankROM] @@ -11724,7 +11539,6 @@ GetSpriteAnimBufferProperty_SpriteInA: add hl, bc pop bc ret -; 0x3ddb Func_3ddb: ; 3ddb (0:3ddb) push hl @@ -11735,7 +11549,6 @@ Func_3ddb: ; 3ddb (0:3ddb) pop bc pop hl ret -; 0x3de7 Func_3de7: ; 3de7 (0:3de7) push hl @@ -11746,7 +11559,6 @@ Func_3de7: ; 3de7 (0:3de7) pop bc pop hl ret -; 0x3df3 Func_3df3: ; 3df3 (0:3df3) push af @@ -11765,7 +11577,6 @@ Func_3df3: ; 3df3 (0:3df3) pop af ld a, [wd61b] ret -; 0x3e10 ; draws player's portrait at b,c Func_3e10: ; 3e10 (0:3e10) @@ -11790,7 +11601,6 @@ Func_3e2a: ; 3e2a (0:3e2a) ld [wd61e], a ld a, $63 jr Func_3e17 -; 0x3e31 Func_3e31: ; 3e31 (0:3e31) ldh a, [hBankROM] @@ -11802,7 +11612,6 @@ Func_3e31: ; 3e31 (0:3e31) pop af call BankswitchROM ret -; 0x3e44 ; something window scroll Func_3e44: ; 3e44 (0:3e44) @@ -11860,7 +11669,6 @@ Func_3e44: ; 3e44 (0:3e44) pop hl pop af ret -; 0x3ea6 ; apply background scroll for lines 0 to 96 using the values at BGScrollData ; skip if wApplyBGScroll is non-0 @@ -11915,7 +11723,6 @@ ApplyBackgroundScroll: ; 3ea6 (0:3ea6) pop hl pop af ret -; 0x3ef8 BGScrollData: ; 3ef8 (0:3ef8) db 0, 0, 0, 1, 1, 1, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3 @@ -11951,7 +11758,6 @@ GetNextBackgroundScroll: ; 3f38 (0:3f38) sra a .done ret -; 0x3f5a ; enable lcdc interrupt on LYC=LC coincidence EnableInt_LYCoincidence: ; 3f5a (0:3f5a) @@ -11963,7 +11769,6 @@ EnableInt_LYCoincidence: ; 3f5a (0:3f5a) set INT_LCD_STAT, [hl] pop hl ret -; 0x3f68 ; disable lcdc interrupt and the LYC=LC coincidence trigger DisableInt_LYCoincidence: ; 3f68 (0:3f68) @@ -11975,7 +11780,6 @@ DisableInt_LYCoincidence: ; 3f68 (0:3f68) res INT_LCD_STAT, [hl] pop hl ret -; 0x3f76 rept $6a db $ff |