diff options
Diffstat (limited to 'src/engine')
-rw-r--r-- | src/engine/bank01.asm | 394 | ||||
-rw-r--r-- | src/engine/bank05.asm | 730 | ||||
-rw-r--r-- | src/engine/bank06.asm | 6 | ||||
-rw-r--r-- | src/engine/bank08.asm | 148 | ||||
-rw-r--r-- | src/engine/deck_ai/decks/legendary_articuno.asm | 10 | ||||
-rw-r--r-- | src/engine/deck_ai/decks/sams_practice.asm | 2 | ||||
-rw-r--r-- | src/engine/effect_functions.asm | 162 | ||||
-rw-r--r-- | src/engine/home.asm | 142 |
8 files changed, 797 insertions, 797 deletions
diff --git a/src/engine/bank01.asm b/src/engine/bank01.asm index 03c5e96..8bf9ab2 100644 --- a/src/engine/bank01.asm +++ b/src/engine/bank01.asm @@ -351,7 +351,7 @@ DuelMainInterface: ; 426d (1:426d) call AIDoAction_Turn ld a, $ff ld [wPlayerAttackingCardIndex], a - ld [wPlayerAttackingMoveIndex], a + ld [wPlayerAttackingAttackIndex], a ret PrintDuelMenuAndHandleInput: ; 4295 (1:4295) @@ -1043,7 +1043,7 @@ DuelMenu_Attack: ; 46fc (1:46fc) xor a ld [wSelectedDuelSubMenuItem], a .try_open_attack_menu - call PrintAndLoadMovesToDuelTempList + call PrintAndLoadAttacksToDuelTempList or a jr nz, .open_attack_menu ldtx hl, NoSelectableAttackText @@ -1067,13 +1067,13 @@ DuelMenu_Attack: ; 46fc (1:46fc) call DoFrame ldh a, [hKeysPressed] and START - jr nz, .display_selected_move_info + jr nz, .display_selected_attack_info call HandleMenuInput jr nc, .wait_for_input cp -1 ; was B pressed? jp z, PrintDuelMenuAndHandleInput ld [wSelectedDuelSubMenuItem], a - call CheckIfEnoughEnergiesToMove + call CheckIfEnoughEnergiesToAttack jr nc, .enough_energy ldtx hl, NotEnoughEnergyCardsText call DrawWideTextBox_WaitForInput @@ -1089,7 +1089,7 @@ DuelMenu_Attack: ; 46fc (1:46fc) ld d, [hl] ; card's deck index (0 to 59) inc hl ld e, [hl] ; attack index (0 or 1) - call CopyMoveDataAndDamage_FromDeckIndex + call CopyAttackDataAndDamage_FromDeckIndex call HandleAmnesiaSubstatus jr c, .cannot_use_due_to_amnesia ld a, PRACTICEDUEL_VERIFY_PLAYER_TURN_ACTIONS @@ -1104,14 +1104,14 @@ DuelMenu_Attack: ; 46fc (1:46fc) call DrawWideTextBox_WaitForInput jr .try_open_attack_menu -.display_selected_move_info - call OpenMovePage +.display_selected_attack_info + call OpenAttackPage call DrawDuelMainScene jp .try_open_attack_menu -; draw the move page of the card at wLoadedCard1 and of the move selected in the Attack +; draw the attack page of the card at wLoadedCard1 and of the attack selected in the Attack ; menu by hCurMenuItem, and listen for input in order to switch the page or to exit. -OpenMovePage: ; 478b (1:478b) +OpenAttackPage: ; 478b (1:478b) ld a, CARDPAGE_POKEMON_OVERVIEW ld [wCardPageNumber], a xor a @@ -1136,23 +1136,23 @@ OpenMovePage: ; 478b (1:478b) add hl, de ld a, [hl] or a - jr nz, .move_2 - xor a ; MOVEPAGE_MOVE1_1 - jr .move_1 + jr nz, .attack_2 + xor a ; ATTACKPAGE_ATTACK1_1 + jr .attack_1 -.move_2 - ld a, MOVEPAGE_MOVE2_1 +.attack_2 + ld a, ATTACKPAGE_ATTACK2_1 -.move_1 - ld [wMovePageNumber], a +.attack_1 + ld [wAttackPageNumber], a .open_page - call DisplayMovePage + call DisplayAttackPage call EnableLCD .loop call DoFrame - ; switch page (see SwitchMovePage) if Right or Left pressed + ; switch page (see SwitchAttackPage) if Right or Left pressed ldh a, [hDPadHeld] and D_RIGHT | D_LEFT jr nz, .open_page @@ -1170,64 +1170,64 @@ AttackMenuParameters: ; 47e4 (1:47e4) db SYM_SPACE ; tile behind cursor dw NULL ; function pointer if non-0 -; display the card page with id at wMovePageNumber of wLoadedCard1 -DisplayMovePage: ; 47ec (1:47ec) - ld a, [wMovePageNumber] - ld hl, MovePageDisplayPointerTable +; display the card page with id at wAttackPageNumber of wLoadedCard1 +DisplayAttackPage: ; 47ec (1:47ec) + ld a, [wAttackPageNumber] + ld hl, AttackPageDisplayPointerTable jp JumpToFunctionInTable -MovePageDisplayPointerTable: ; 47f5 (1:47f5) - dw DisplayMovePage_Move1Page1 ; MOVEPAGE_MOVE1_1 - dw DisplayMovePage_Move1Page2 ; MOVEPAGE_MOVE1_2 - dw DisplayMovePage_Move2Page1 ; MOVEPAGE_MOVE2_1 - dw DisplayMovePage_Move2Page2 ; MOVEPAGE_MOVE2_2 - -; display MOVEPAGE_MOVE1_1 -DisplayMovePage_Move1Page1: ; 47fd (1:47fd) - call DisplayCardPage_PokemonMove1Page1 - jr SwitchMovePage - -; display MOVEPAGE_MOVE1_2 if it exists. otherwise return in order -; to switch back to MOVEPAGE_MOVE1_1 and display it instead. -DisplayMovePage_Move1Page2: ; 4802 (1:4802) - ld hl, wLoadedCard1Move1Description + 2 +AttackPageDisplayPointerTable: ; 47f5 (1:47f5) + dw DisplayAttackPage_Attack1Page1 ; ATTACKPAGE_ATTACK1_1 + dw DisplayAttackPage_Attack1Page2 ; ATTACKPAGE_ATTACK1_2 + dw DisplayAttackPage_Attack2Page1 ; ATTACKPAGE_ATTACK2_1 + dw DisplayAttackPage_Attack2Page2 ; ATTACKPAGE_ATTACK2_2 + +; display ATTACKPAGE_ATTACK1_1 +DisplayAttackPage_Attack1Page1: ; 47fd (1:47fd) + call DisplayCardPage_PokemonAttack1Page1 + jr SwitchAttackPage + +; display ATTACKPAGE_ATTACK1_2 if it exists. otherwise return in order +; to switch back to ATTACKPAGE_ATTACK1_1 and display it instead. +DisplayAttackPage_Attack1Page2: ; 4802 (1:4802) + ld hl, wLoadedCard1Atk1Description + 2 ld a, [hli] or [hl] ret z - call DisplayCardPage_PokemonMove1Page2 - jr SwitchMovePage - -; display MOVEPAGE_MOVE2_1 -DisplayMovePage_Move2Page1: ; 480d (1:480d) - call DisplayCardPage_PokemonMove2Page1 - jr SwitchMovePage - -; display MOVEPAGE_MOVE2_2 if it exists. otherwise return in order -; to switch back to MOVEPAGE_MOVE2_1 and display it instead. -DisplayMovePage_Move2Page2: ; 4812 (1:4812) - ld hl, wLoadedCard1Move2Description + 2 + call DisplayCardPage_PokemonAttack1Page2 + jr SwitchAttackPage + +; display ATTACKPAGE_ATTACK2_1 +DisplayAttackPage_Attack2Page1: ; 480d (1:480d) + call DisplayCardPage_PokemonAttack2Page1 + jr SwitchAttackPage + +; display ATTACKPAGE_ATTACK2_2 if it exists. otherwise return in order +; to switch back to ATTACKPAGE_ATTACK2_1 and display it instead. +DisplayAttackPage_Attack2Page2: ; 4812 (1:4812) + ld hl, wLoadedCard1Atk2Description + 2 ld a, [hli] or [hl] ret z - call DisplayCardPage_PokemonMove2Page2 + call DisplayCardPage_PokemonAttack2Page2 ; fallthrough -; switch to MOVEPAGE_MOVE*_2 if in MOVEPAGE_MOVE*_1 and vice versa. -; sets the next move page to switch to if Right or Left are pressed. -SwitchMovePage: ; 481b (1:481b) - ld hl, wMovePageNumber +; switch to ATTACKPAGE_ATTACK*_2 if in ATTACKPAGE_ATTACK*_1 and vice versa. +; sets the next attack page to switch to if Right or Left are pressed. +SwitchAttackPage: ; 481b (1:481b) + ld hl, wAttackPageNumber ld a, $01 xor [hl] ld [hl], a ret -; given the card at hTempCardIndex_ff98, for each non-empty, non-Pokemon Power moveslot, -; prints its information at lines 13 (first move, if any), and 15 (second move, if any) +; given the card at hTempCardIndex_ff98, for each non-empty, non-Pokemon Power attack slot, +; prints its information at lines 13 (first attack, if any), and 15 (second attack, if any) ; also, copies zero, one, or both of the following to wDuelTempList, $ff terminated: -; if pokemon's first moveslot isn't empty or a Pokemon Power: <card_index>, 0 -; if pokemon's second moveslot isn't empty or a Pokemon Power: <card_index>, 1 +; if pokemon's first attack slot isn't empty or a Pokemon Power: <card_index>, 0 +; if pokemon's second attack slot isn't empty or a Pokemon Power: <card_index>, 1 ; return the amount of non-empty, non-Pokemon Power attacks in a. -PrintAndLoadMovesToDuelTempList: ; 4823 (1:4823) +PrintAndLoadAttacksToDuelTempList: ; 4823 (1:4823) call DrawWideTextBox ld a, DUELVARS_ARENA_CARD call GetTurnDuelistVariable @@ -1238,9 +1238,9 @@ PrintAndLoadMovesToDuelTempList: ; 4823 (1:4823) ld hl, wDuelTempList xor a ld [wCardPageNumber], a - ld de, wLoadedCard1Move1Name - call CheckMoveslotEmptyOrPokemonPower - jr c, .check_second_moveslot + ld de, wLoadedCard1Atk1Name + call CheckAttackSlotEmptyOrPokemonPower + jr c, .check_second_atk_slot ldh a, [hTempCardIndex_ff98] ld [hli], a xor a @@ -1249,16 +1249,16 @@ PrintAndLoadMovesToDuelTempList: ; 4823 (1:4823) push hl push bc ld e, b - ld hl, wLoadedCard1Move1Name - call PrintMoveOrPkmnPowerInformation + ld hl, wLoadedCard1Atk1Name + call PrintAttackOrPkmnPowerInformation pop bc pop hl inc b inc b ; 15 -.check_second_moveslot - ld de, wLoadedCard1Move2Name - call CheckMoveslotEmptyOrPokemonPower +.check_second_atk_slot + ld de, wLoadedCard1Atk2Name + call CheckAttackSlotEmptyOrPokemonPower jr c, .done ldh a, [hTempCardIndex_ff98] ld [hli], a @@ -1268,8 +1268,8 @@ PrintAndLoadMovesToDuelTempList: ; 4823 (1:4823) push hl push bc ld e, b - ld hl, wLoadedCard1Move2Name - call PrintMoveOrPkmnPowerInformation + ld hl, wLoadedCard1Atk2Name + call PrintAttackOrPkmnPowerInformation pop bc pop hl @@ -1277,9 +1277,9 @@ PrintAndLoadMovesToDuelTempList: ; 4823 (1:4823) ld a, c ret -; given de = wLoadedCard*Move*Name, return carry if the move is a -; Pkmn Power or if the moveslot is empty. -CheckMoveslotEmptyOrPokemonPower: ; 4872 (1:4872) +; given de = wLoadedCard*Atk*Name, return carry if the attack is a +; Pkmn Power or if the attack slot is empty. +CheckAttackSlotEmptyOrPokemonPower: ; 4872 (1:4872) push hl push de push bc @@ -1288,27 +1288,27 @@ CheckMoveslotEmptyOrPokemonPower: ; 4872 (1:4872) inc de ld a, [de] or c - jr z, .return_no_move_found - ld hl, CARD_DATA_MOVE1_CATEGORY - (CARD_DATA_MOVE1_NAME + 1) + jr z, .return_no_atk_found + ld hl, CARD_DATA_ATTACK1_CATEGORY - (CARD_DATA_ATTACK1_NAME + 1) add hl, de ld a, [hl] and $ff ^ RESIDUAL cp POKEMON_POWER - jr z, .return_no_move_found + jr z, .return_no_atk_found or a .return pop bc pop de pop hl ret -.return_no_move_found +.return_no_atk_found scf jr .return ; check if the arena pokemon card has enough energy attached to it -; in order to use the selected move. +; in order to use the selected attack. ; returns: carry if not enough energy, nc if enough energy. -CheckIfEnoughEnergiesToMove: ; 488f (1:488f) +CheckIfEnoughEnergiesToAttack: ; 488f (1:488f) push hl push bc ld e, PLAY_AREA_ARENA @@ -1323,36 +1323,36 @@ CheckIfEnoughEnergiesToMove: ; 488f (1:488f) ld d, [hl] ; card's deck index (0 to 59) inc hl ld e, [hl] ; attack index (0 or 1) - call _CheckIfEnoughEnergiesToMove + call _CheckIfEnoughEnergiesToAttack pop bc pop hl ret -; check if a pokemon card has enough energy attached to it in order to use a move +; check if a pokemon card has enough energy attached to it in order to use an attack ; input: ; d = deck index of card (0 to 59) ; e = attack index (0 or 1) ; wAttachedEnergies and wTotalAttachedEnergies ; returns: carry if not enough energy, nc if enough energy. -_CheckIfEnoughEnergiesToMove: ; 48ac (1:48ac) +_CheckIfEnoughEnergiesToAttack: ; 48ac (1:48ac) push de ld a, d call LoadCardDataToBuffer1_FromDeckIndex pop bc push bc - ld de, wLoadedCard1Move1EnergyCost + ld de, wLoadedCard1Atk1EnergyCost ld a, c or a - jr z, .got_move - ld de, wLoadedCard1Move2EnergyCost + jr z, .got_atk + ld de, wLoadedCard1Atk2EnergyCost -.got_move - ld hl, CARD_DATA_MOVE1_NAME - CARD_DATA_MOVE1_ENERGY_COST +.got_atk + ld hl, CARD_DATA_ATTACK1_NAME - CARD_DATA_ATTACK1_ENERGY_COST add hl, de ld a, [hli] or [hl] jr z, .not_usable_or_not_enough_energies - ld hl, CARD_DATA_MOVE1_CATEGORY - CARD_DATA_MOVE1_ENERGY_COST + ld hl, CARD_DATA_ATTACK1_CATEGORY - CARD_DATA_ATTACK1_ENERGY_COST add hl, de ld a, [hl] cp POKEMON_POWER @@ -1394,7 +1394,7 @@ _CheckIfEnoughEnergiesToMove: ; 48ac (1:48ac) ; 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 -; to use the move. Return carry if not enough energy, nc if enough energy. +; to use the attack. Return carry if not enough energy, nc if enough energy. CheckIfEnoughEnergiesOfType: ; 4900 (1:4900) and $f push af @@ -3781,10 +3781,10 @@ LoadSelectedCardGfx: ; 58aa (1:58aa) CardPageDisplayPointerTable: ; 58c2 (1:58c2) dw DrawDuelMainScene dw DisplayCardPage_PokemonOverview ; CARDPAGE_POKEMON_OVERVIEW - dw DisplayCardPage_PokemonMove1Page1 ; CARDPAGE_POKEMON_MOVE1_1 - dw DisplayCardPage_PokemonMove1Page2 ; CARDPAGE_POKEMON_MOVE1_2 - dw DisplayCardPage_PokemonMove2Page1 ; CARDPAGE_POKEMON_MOVE2_1 - dw DisplayCardPage_PokemonMove2Page2 ; CARDPAGE_POKEMON_MOVE2_2 + dw DisplayCardPage_PokemonAttack1Page1 ; CARDPAGE_POKEMON_ATTACK1_1 + dw DisplayCardPage_PokemonAttack1Page2 ; CARDPAGE_POKEMON_ATTACK1_2 + dw DisplayCardPage_PokemonAttack2Page1 ; CARDPAGE_POKEMON_ATTACK2_1 + dw DisplayCardPage_PokemonAttack2Page2 ; CARDPAGE_POKEMON_ATTACK2_2 dw DisplayCardPage_PokemonDescription ; CARDPAGE_POKEMON_DESCRIPTION dw DrawDuelMainScene dw DrawDuelMainScene @@ -3869,10 +3869,10 @@ SwitchCardPage: ; 5930 (1:5930) CardPageSwitchPointerTable: ; 5936 (1:5936) dw CardPageSwitch_00 dw CardPageSwitch_PokemonOverviewOrDescription ; CARDPAGE_POKEMON_OVERVIEW - dw CardPageSwitch_PokemonMove1Page1 ; CARDPAGE_POKEMON_MOVE1_1 - dw CardPageSwitch_PokemonMove1Page2 ; CARDPAGE_POKEMON_MOVE1_2 - dw CardPageSwitch_PokemonMove2Page1 ; CARDPAGE_POKEMON_MOVE2_1 - dw CardPageSwitch_PokemonMove2Page2 ; CARDPAGE_POKEMON_MOVE2_2 + dw CardPageSwitch_PokemonAttack1Page1 ; CARDPAGE_POKEMON_ATTACK1_1 + dw CardPageSwitch_PokemonAttack1Page2 ; CARDPAGE_POKEMON_ATTACK1_2 + dw CardPageSwitch_PokemonAttack2Page1 ; CARDPAGE_POKEMON_ATTACK2_1 + dw CardPageSwitch_PokemonAttack2Page2 ; CARDPAGE_POKEMON_ATTACK2_2 dw CardPageSwitch_PokemonOverviewOrDescription ; CARDPAGE_POKEMON_DESCRIPTION dw CardPageSwitch_PokemonEnd dw CardPageSwitch_08 @@ -3896,28 +3896,28 @@ CardPageSwitch_PokemonOverviewOrDescription: ; 595a (1:595a) or a ret ; nz -; return with current page if [wLoadedCard1Move1Name] non-0 -; (if card has at least one move) -CardPageSwitch_PokemonMove1Page1: ; 595e (1:595e) - ld hl, wLoadedCard1Move1Name +; return with current page if [wLoadedCard1Atk1Name] non-0 +; (if card has at least one attack) +CardPageSwitch_PokemonAttack1Page1: ; 595e (1:595e) + ld hl, wLoadedCard1Atk1Name jr CheckCardPageExists -; return with current page if [wLoadedCard1Move1Description + 2] non-0 -; (if card's first move has a two-page description) -CardPageSwitch_PokemonMove1Page2: ; 5963 (1:5963) - ld hl, wLoadedCard1Move1Description + 2 +; return with current page if [wLoadedCard1Atk1Description + 2] non-0 +; (if card's first attack has a two-page description) +CardPageSwitch_PokemonAttack1Page2: ; 5963 (1:5963) + ld hl, wLoadedCard1Atk1Description + 2 jr CheckCardPageExists -; return with current page if [wLoadedCard1Move2Name] non-0 -; (if card has two moves) -CardPageSwitch_PokemonMove2Page1: ; 5968 (1:5968) - ld hl, wLoadedCard1Move2Name +; return with current page if [wLoadedCard1Atk2Name] non-0 +; (if card has two attacks) +CardPageSwitch_PokemonAttack2Page1: ; 5968 (1:5968) + ld hl, wLoadedCard1Atk2Name jr CheckCardPageExists -; return with current page if [wLoadedCard1Move1Description + 2] non-0 -; (if card's second move has a two-page description) -CardPageSwitch_PokemonMove2Page2: ; 596d (1:596d) - ld hl, wLoadedCard1Move2Description + 2 +; return with current page if [wLoadedCard1Atk1Description + 2] non-0 +; (if card's second attack has a two-page description) +CardPageSwitch_PokemonAttack2Page2: ; 596d (1:596d) + ld hl, wLoadedCard1Atk2Description + 2 ; fallthrough CheckCardPageExists: ; 5970 (1:5970) @@ -4369,17 +4369,17 @@ DisplayCardPage_PokemonOverview: ; 5b7d (1:5b7d) lb bc, 16, 16 ld a, [wLoadedCard1PokedexNumber] call WriteTwoByteNumberInTxSymbolFormat - ; print the name, damage, and energy cost of each move and/or Pokemon power that exists - ; first move at 5,10 and second at 5,12 + ; print the name, damage, and energy cost of each attack and/or Pokemon power that exists + ; first attack at 5,10 and second at 5,12 lb bc, 5, 10 ld e, c - ld hl, wLoadedCard1Move1Name - call PrintMoveOrPkmnPowerInformation + ld hl, wLoadedCard1Atk1Name + call PrintAttackOrPkmnPowerInformation inc c inc c ; 12 ld e, c - ld hl, wLoadedCard1Move2Name - call PrintMoveOrPkmnPowerInformation + ld hl, wLoadedCard1Atk2Name + call PrintAttackOrPkmnPowerInformation ; print the retreat cost (some amount of colorless energies) at 8,14 inc c inc c ; 14 @@ -4422,12 +4422,12 @@ DisplayCardPage_PokemonOverview: ; 5b7d (1:5b7d) call PrintCardPageWeaknessesOrResistances ret -; displays the name, damage, and energy cost of a move or Pokemon power. +; displays the name, damage, and energy cost of an attack or Pokemon power. ; used in the Attack menu and in the card page of a Pokemon. ; input: - ; hl: pointer to move 1 name in a move_data_struct (which can be inside at card_data_struct) + ; hl: pointer to attack 1 name in a atk_data_struct (which can be inside at card_data_struct) ; e: Y coordinate to start printing the data at -PrintMoveOrPkmnPowerInformation: ; 5c33 (1:5c33) +PrintAttackOrPkmnPowerInformation: ; 5c33 (1:5c33) ld a, [hli] or [hl] ret z @@ -4447,10 +4447,10 @@ PrintMoveOrPkmnPowerInformation: ; 5c33 (1:5c33) ld a, [hli] or [hl] jr z, .print_damage - ; if in Attack menu and move 1 description exists, print at 18,e: + ; if in Attack menu and attack 1 description exists, print at 18,e: ld b, 18 ld c, e - ld a, SYM_MOVE_DESCR + ld a, SYM_ATK_DESCR call WriteByteToBGMap0 .print_damage inc hl @@ -4460,7 +4460,7 @@ PrintMoveOrPkmnPowerInformation: ; 5c33 (1:5c33) ld a, [hl] or a jr z, .print_category - ; print move damage at 15,(e+1) if non-0 + ; print attack damage at 15,(e+1) if non-0 ld b, 15 ; unless damage has three digits, this is effectively 16 ld c, e inc c @@ -4482,7 +4482,7 @@ PrintMoveOrPkmnPowerInformation: ; 5c33 (1:5c33) call WriteByteToBGMap0 jr .print_energy_cost .print_energy_cost - ld bc, CARD_DATA_MOVE1_ENERGY_COST - CARD_DATA_MOVE1_CATEGORY + ld bc, CARD_DATA_ATTACK1_ENERGY_COST - CARD_DATA_ATTACK1_CATEGORY add hl, bc ld c, e ld b, 2 ; bc = 2, e @@ -4548,7 +4548,7 @@ PrintCardPageWeaknessesOrResistances: ; 5cac (1:5cac) ret ; prints surrounding box, card name at 5,1, type, set 2, and rarity. -; used in all CARDPAGE_POKEMON_* and MOVEPAGE_*, except in +; used in all CARDPAGE_POKEMON_* and ATTACKPAGE_*, except in ; CARDPAGE_POKEMON_OVERVIEW when wCardPageType is CARDPAGETYPE_PLAY_AREA. PrintPokemonCardPageGenericInformation: ; 5cc4 (1:5cc4) call DrawCardPageSurroundingBox @@ -4599,50 +4599,50 @@ CardPageNoTextTileData: ; 5d1a (1:5d1a) db 15, 16, SYM_No, 0 db $ff -DisplayCardPage_PokemonMove1Page1: ; 5d1f (1:5d1f) - ld hl, wLoadedCard1Move1Name - ld de, wLoadedCard1Move1Description - jr DisplayPokemonMoveCardPage +DisplayCardPage_PokemonAttack1Page1: ; 5d1f (1:5d1f) + ld hl, wLoadedCard1Atk1Name + ld de, wLoadedCard1Atk1Description + jr DisplayPokemonAttackCardPage -DisplayCardPage_PokemonMove1Page2: ; 5d27 (1:5d27) - ld hl, wLoadedCard1Move1Name - ld de, wLoadedCard1Move1Description + 2 - jr DisplayPokemonMoveCardPage +DisplayCardPage_PokemonAttack1Page2: ; 5d27 (1:5d27) + ld hl, wLoadedCard1Atk1Name + ld de, wLoadedCard1Atk1Description + 2 + jr DisplayPokemonAttackCardPage -DisplayCardPage_PokemonMove2Page1: ; 5d2f (1:5d2f) - ld hl, wLoadedCard1Move2Name - ld de, wLoadedCard1Move2Description - jr DisplayPokemonMoveCardPage +DisplayCardPage_PokemonAttack2Page1: ; 5d2f (1:5d2f) + ld hl, wLoadedCard1Atk2Name + ld de, wLoadedCard1Atk2Description + jr DisplayPokemonAttackCardPage -DisplayCardPage_PokemonMove2Page2: ; 5d37 (1:5d37) - ld hl, wLoadedCard1Move2Name - ld de, wLoadedCard1Move2Description + 2 +DisplayCardPage_PokemonAttack2Page2: ; 5d37 (1:5d37) + ld hl, wLoadedCard1Atk2Name + ld de, wLoadedCard1Atk2Description + 2 ; fallthrough ; input: - ; hl = address of the move's name (text id) - ; de = address of the move's description (either first or second text id) -DisplayPokemonMoveCardPage: ; 5d3d (1:5d3d) + ; hl = address of the attack's name (text id) + ; de = address of the attack's description (either first or second text id) +DisplayPokemonAttackCardPage: ; 5d3d (1:5d3d) push de push hl ; print surrounding box, card name at 5,1, type, set 2, and rarity call PrintPokemonCardPageGenericInformation - ; print name, damage, and energy cost of move or Pokemon power starting at line 2 + ; print name, damage, and energy cost of attack or Pokemon power starting at line 2 ld e, 2 pop hl - call PrintMoveOrPkmnPowerInformation + call PrintAttackOrPkmnPowerInformation pop hl ; fallthrough -; print, if non-null, the description of the trainer card, energy card, move, +; print, if non-null, the description of the trainer card, energy card, attack, ; or Pokemon power, given as a pointer to text id in hl, starting from 1,11 -PrintMoveOrNonPokemonCardDescription: ; 5d49 (1:5d49) +PrintAttackOrNonPokemonCardDescription: ; 5d49 (1:5d49) ld a, [hli] or [hl] ret z dec hl lb de, 1, 11 - call PrintMoveOrCardDescription + call PrintAttackOrCardDescription ret DisplayCardPage_PokemonDescription: ; 5d54 (1:5d54) @@ -4793,7 +4793,7 @@ DisplayEnergyOrTrainerCardPage: ; 5e2d (1:5e2d) ; print the set 2 icon and rarity symbol of the card call DrawCardPageSet2AndRarityIcons pop hl - call PrintMoveOrNonPokemonCardDescription + call PrintAttackOrNonPokemonCardDescription ret ; display the card details of the card in wLoadedCard1 @@ -5742,7 +5742,7 @@ Func_6435: ldh [hTempCardIndex_ff98], a ld d, a ld e, $00 - call CopyMoveDataAndDamage_FromDeckIndex + call CopyAttackDataAndDamage_FromDeckIndex call DisplayUsePokemonPowerScreen ld a, EFFECTCMDTYPE_INITIAL_EFFECT_1 call TryExecuteEffectCommandFunction @@ -5798,7 +5798,7 @@ Func_64b0: ; 64b0 (1:64b0) call PrintPlayAreaCardHeader call PrintPlayAreaCardLocation call Func_64fc - ld a, [wLoadedCard1Move1Category] + ld a, [wLoadedCard1Atk1Category] call SetNextElementOfList pop bc pop hl @@ -5812,14 +5812,14 @@ Func_64b0: ; 64b0 (1:64b0) ; 0x64fc Func_64fc: ; 64fc (1:64fc) - ld a, [wLoadedCard1Move1Category] + ld a, [wLoadedCard1Atk1Category] cp POKEMON_POWER ret nz ld a, [wCurPlayAreaY] inc a ld e, a ld d, $04 - ld hl, wLoadedCard1Move1Name + ld hl, wLoadedCard1Atk1Name call InitTextPrinting_ProcessTextFromPointerToID ret ; 0x6510 @@ -5840,17 +5840,17 @@ DisplayUsePokemonPowerScreen: ; 6510 (1:6510) call PrintPlayAreaCardInformationAndLocation lb de, 1, 4 call InitTextPrinting - ld hl, wLoadedCard1Move1Name + ld hl, wLoadedCard1Atk1Name call InitTextPrinting_ProcessTextFromPointerToID lb de, 1, 6 - ld hl, wLoadedCard1Move1Description - call PrintMoveOrCardDescription + ld hl, wLoadedCard1Atk1Description + call PrintAttackOrCardDescription ret -; print the description of a move, a Pokemon power, or a trainer or energy card +; print the description of an attack, a Pokemon power, or a trainer or energy card ; x,y coordinates of where to start printing the text are given at de ; don't separate lines of text -PrintMoveOrCardDescription: ; 653e (1:653e) +PrintAttackOrCardDescription: ; 653e (1:653e) call SetNoLineSeparation ld a, [hli] ld h, [hl] @@ -6029,8 +6029,8 @@ DrawHPBar: ; 6614 (1:6614) ret ; when an opponent's Pokemon card attacks, this displays a screen -; containing the description and information of the used move -DisplayOpponentUsedMoveScreen: ; 6635 (1:6635) +; containing the description and information of the used attack +DisplayOpponentUsedAttackScreen: ; 6635 (1:6635) call ZeroObjectPositionsAndToggleOAMCopy call EmptyScreen call LoadDuelCardSymbolTiles @@ -6041,17 +6041,17 @@ DisplayOpponentUsedMoveScreen: ; 6635 (1:6635) call LoadCardDataToBuffer1_FromCardID ld a, CARDPAGE_POKEMON_OVERVIEW ld [wCardPageNumber], a - ld hl, wLoadedCard1Move1Name + ld hl, wLoadedCard1Atk1Name ld a, [wSelectedAttack] or a - jr z, .first_move - ld hl, wLoadedCard1Move2Name -.first_move + jr z, .first_atk + ld hl, wLoadedCard1Atk2Name +.first_atk ld e, 1 - call PrintMoveOrPkmnPowerInformation + call PrintAttackOrPkmnPowerInformation lb de, 1, 4 - ld hl, wLoadedMoveDescription - call PrintMoveOrCardDescription + ld hl, wLoadedAttackDescription + call PrintAttackOrCardDescription ret ; display card detail when a trainer card is used, and print "Used xxx" @@ -6699,7 +6699,7 @@ OppAction_BeginUseAttack: ; 6a4e (1:6a4e) ld d, a ldh a, [hTemp_ffa0] ld e, a - call CopyMoveDataAndDamage_FromDeckIndex + call CopyAttackDataAndDamage_FromDeckIndex call Func_16f6 ld a, $01 ld [wSkipDuelistIsThinkingDelay], a @@ -6735,7 +6735,7 @@ OppAction_UseAttack: ; 6a8c (1:6a8c) call TryExecuteEffectCommandFunction call CheckSelfConfusionDamage jr c, .confusion_damage - call DisplayOpponentUsedMoveScreen + call DisplayOpponentUsedAttackScreen call PrintPokemonsAttackText call WaitForWideTextBoxInput call ExchangeRNG @@ -6775,13 +6775,13 @@ OppAction_UsePokemonPower: ; 6ad9 (1:6ad9) ldh a, [hTempCardIndex_ff9f] ld d, a ld e, $00 - call CopyMoveDataAndDamage_FromDeckIndex + call CopyAttackDataAndDamage_FromDeckIndex ldh a, [hTemp_ffa0] ldh [hTempPlayAreaLocation_ff9d], a call DisplayUsePokemonPowerScreen ldh a, [hTempCardIndex_ff9f] call LoadCardNameToTxRam2 - ld hl, wLoadedMoveName + ld hl, wLoadedAttackName ld a, [hli] ld [wTxRam2_b], a ld a, [hl] @@ -6846,12 +6846,12 @@ OppAction_UseMetronomeAttack: ; 6b3e (1:6b3e) call SerialRecv8Bytes push bc call SwapTurn - call CopyMoveDataAndDamage_FromDeckIndex + call CopyAttackDataAndDamage_FromDeckIndex call SwapTurn ldh a, [hTempCardIndex_ff9f] ld [wPlayerAttackingCardIndex], a ld a, [wSelectedAttack] - ld [wPlayerAttackingMoveIndex], a + ld [wPlayerAttackingAttackIndex], a ld a, [wTempCardID_ccc2] ld [wPlayerAttackingCardID], a call Func_16f6 @@ -7236,13 +7236,13 @@ ConvertSpecialTrainerCardToPokemon: ; 6d84 (1:6d84) .trainer_to_pkmn_data db 10 ; CARD_DATA_HP - ds $07 ; CARD_DATA_MOVE1_NAME - (CARD_DATA_HP + 1) - tx DiscardName ; CARD_DATA_MOVE1_NAME - tx DiscardDescription ; CARD_DATA_MOVE1_DESCRIPTION - ds $03 ; CARD_DATA_MOVE1_CATEGORY - (CARD_DATA_MOVE1_DESCRIPTION + 2) - db POKEMON_POWER ; CARD_DATA_MOVE1_CATEGORY - dw TrainerCardAsPokemonEffectCommands ; CARD_DATA_MOVE1_EFFECT_COMMANDS - ds $18 ; CARD_DATA_RETREAT_COST - (CARD_DATA_MOVE1_EFFECT_COMMANDS + 2) + ds $07 ; CARD_DATA_ATTACK1_NAME - (CARD_DATA_HP + 1) + tx DiscardName ; CARD_DATA_ATTACK1_NAME + tx DiscardDescription ; CARD_DATA_ATTACK1_DESCRIPTION + ds $03 ; CARD_DATA_ATTACK1_CATEGORY - (CARD_DATA_ATTACK1_DESCRIPTION + 2) + db POKEMON_POWER ; CARD_DATA_ATTACK1_CATEGORY + dw TrainerCardAsPokemonEffectCommands ; CARD_DATA_ATTACK1_EFFECT_COMMANDS + ds $18 ; CARD_DATA_RETREAT_COST - (CARD_DATA_ATTACK1_EFFECT_COMMANDS + 2) db UNABLE_RETREAT ; CARD_DATA_RETREAT_COST ds $0d ; PKMN_CARD_DATA_LENGTH - (CARD_DATA_RETREAT_COST + 1) @@ -7595,7 +7595,7 @@ PrintThereWasNoEffectFromStatusText: ; 700a (1:700a) ld a, [wNoEffectFromWhichStatus] or a jr nz, .status - ld hl, wLoadedMoveName + ld hl, wLoadedAttackName ld a, [hli] ld h, [hl] ld l, a @@ -7717,7 +7717,7 @@ InitVariablesToBeginDuel: ; 70aa (1:70aa) ld a, $ff ld [wcc0f], a ld [wPlayerAttackingCardIndex], a - ld [wPlayerAttackingMoveIndex], a + ld [wPlayerAttackingAttackIndex], a call EnableSRAM ld a, [s0a009] ld [wSkipDelayAllowed], a @@ -7860,10 +7860,10 @@ TakeAPrizes: ; 7161 (1:7161) ld [hl], b ret -; clear the non-turn holder's duelvars starting at DUELVARS_ARENA_CARD_DISABLED_MOVE_INDEX +; clear the non-turn holder's duelvars starting at DUELVARS_ARENA_CARD_DISABLED_ATTACK_INDEX ; these duelvars only last a two-player turn at most. ClearNonTurnTemporaryDuelvars: ; 717a (1:717a) - ld a, DUELVARS_ARENA_CARD_DISABLED_MOVE_INDEX + ld a, DUELVARS_ARENA_CARD_DISABLED_ATTACK_INDEX call GetNonTurnDuelistVariable xor a ld [hli], a @@ -8320,7 +8320,7 @@ Func_741a: ; 741a (1:741a) ld e, ATK_ANIM_IMAKUNI_CONFUSION .got_anim ld a, e - ld [wLoadedMoveAnimation], a + ld [wLoadedAttackAnimation], a xor a ld [wDuelAnimLocationParam], a push hl @@ -8336,8 +8336,8 @@ Func_741a: ; 741a (1:741a) PlayAttackAnimation_DealAttackDamageSimple: ; 7469 (1:7469) push hl push de - call PlayMoveAnimation - call WaitMoveAnimation + call PlayAttackAnimation + call WaitAttackAnimation pop de pop hl call SubtractHP @@ -8351,9 +8351,9 @@ PlayAttackAnimation_DealAttackDamageSimple: ; 7469 (1:7469) pop hl ret -; if [wLoadedMoveAnimation] != 0, wait until the animation is over -WaitMoveAnimation: ; 7484 (1:7484) - ld a, [wLoadedMoveAnimation] +; if [wLoadedAttackAnimation] != 0, wait until the animation is over +WaitAttackAnimation: ; 7484 (1:7484) + ld a, [wLoadedAttackAnimation] or a ret z push de @@ -8364,12 +8364,12 @@ WaitMoveAnimation: ; 7484 (1:7484) pop de ret -; play move animation +; play attack animation ; input: -; - [wLoadedMoveAnimation]: animation to play -; - de: damage dealt by the move (to display the animation with the number) +; - [wLoadedAttackAnimation]: animation to play +; - de: damage dealt by the attack (to display the animation with the number) ; - c: a wDamageEffectiveness constant (to print WEAK or RESIST if necessary) -PlayMoveAnimation: ; 7494 (1:7494) +PlayAttackAnimation: ; 7494 (1:7494) ldh a, [hWhoseTurn] push af push hl @@ -8396,14 +8396,14 @@ PlayMoveAnimation: ; 7494 (1:7494) ld [hl], d ; if damage >= 70, ATK_ANIM_HIT becomes ATK_ANIM_BIG_HIT - ld a, [wLoadedMoveAnimation] + ld a, [wLoadedAttackAnimation] cp ATK_ANIM_HIT jr nz, .got_anim ld a, e cp 70 jr c, .got_anim ld a, ATK_ANIM_BIG_HIT - ld [wLoadedMoveAnimation], a + ld [wLoadedAttackAnimation], a .got_anim farcall PlayAttackAnimationCommands diff --git a/src/engine/bank05.asm b/src/engine/bank05.asm index a1c6f0d..81964a9 100644 --- a/src/engine/bank05.asm +++ b/src/engine/bank05.asm @@ -44,20 +44,20 @@ AIActionTable_Unreferenced: ; 1406a (5:406a) ret ; returns carry if damage dealt from any of -; a card's moves KOs defending Pokémon -; outputs index of the move that KOs +; a card's attacks KOs defending Pokémon +; outputs index of the attack that KOs ; input: ; [hTempPlayAreaLocation_ff9d] = location of attacking card to consider ; output: -; [wSelectedAttack] = move index that KOs -CheckIfAnyMoveKnocksOutDefendingCard: ; 140ae (5:40ae) - xor a ; first move - call CheckIfMoveKnocksOutDefendingCard +; [wSelectedAttack] = attack index that KOs +CheckIfAnyAttackKnocksOutDefendingCard: ; 140ae (5:40ae) + xor a ; first attack + call CheckIfAttackKnocksOutDefendingCard ret c - ld a, $01 ; second move + ld a, SECOND_ATTACK ; fallthrough -CheckIfMoveKnocksOutDefendingCard: ; 140b5 (5:40b5) +CheckIfAttackKnocksOutDefendingCard: ; 140b5 (5:40b5) call EstimateDamage_VersusDefendingCard ld a, DUELVARS_ARENA_CARD_HP call GetNonTurnDuelistVariable @@ -71,7 +71,7 @@ CheckIfMoveKnocksOutDefendingCard: ; 140b5 (5:40b5) ; returns carry if any of the defending Pokémon's attacks ; brings card at hTempPlayAreaLocation_ff9d down ; to exactly 0 HP. -; outputs that attack index in wSelectedMove. +; outputs that attack index in wSelectedAttack. CheckIfAnyDefendingPokemonAttackDealsSameDamageAsHP: ; 140c5 (5:40c5) xor a ; FIRST_ATTACK_OR_PKMN_POWER call .check_damage @@ -183,7 +183,7 @@ AITryUseAttack: ; 14145 (5:4145) call GetTurnDuelistVariable ldh [hTempCardIndex_ff9f], a ld d, a - call CopyMoveDataAndDamage_FromDeckIndex + call CopyAttackDataAndDamage_FromDeckIndex ld a, OPPACTION_BEGIN_ATTACK bank1call AIMakeDecision ret c @@ -199,7 +199,7 @@ AITryUseAttack: ; 14145 (5:4145) ld a, DUELVARS_ARENA_CARD call GetTurnDuelistVariable ld d, a - call CopyMoveDataAndDamage_FromDeckIndex + call CopyAttackDataAndDamage_FromDeckIndex ld a, OPPACTION_USE_ATTACK bank1call AIMakeDecision ret c @@ -214,7 +214,7 @@ AITryUseAttack: ; 14145 (5:4145) ; - deck index in a corresponds to a double colorless energy card; ; - card type in wTempCardType is colorless; ; - card ID in wTempCardID is a Pokémon card that has -; moves that require energy other than its color and +; attacks that require energy other than its color and ; the deck index in a corresponds to that energy type; ; - card ID is Eevee and a corresponds to an energy type ; of water, fire or lightning; @@ -380,11 +380,11 @@ AIPlayInitialBasicCards: ; 14226 (5:4226) jr .check_for_next_card ; returns carry if Pokémon at hTempPlayAreaLocation_ff9d -; can't use a move or if that selected move doesn't have enough energy +; can't use an attack or if that selected attack doesn't have enough energy ; input: ; [hTempPlayAreaLocation_ff9d] = location of Pokémon card -; [wSelectedAttack] = selected move to examine -CheckIfSelectedMoveIsUnusable: ; 1424b (5:424b) +; [wSelectedAttack] = selected attack to examine +CheckIfSelectedAttackIsUnusable: ; 1424b (5:424b) ldh a, [hTempPlayAreaLocation_ff9d] or a jr nz, .bench @@ -399,7 +399,7 @@ CheckIfSelectedMoveIsUnusable: ; 1424b (5:424b) ld d, a ld a, [wSelectedAttack] ld e, a - call CopyMoveDataAndDamage_FromDeckIndex + call CopyAttackDataAndDamage_FromDeckIndex call HandleAmnesiaSubstatus ret c ld a, EFFECTCMDTYPE_INITIAL_EFFECT_1 @@ -409,22 +409,22 @@ CheckIfSelectedMoveIsUnusable: ; 1424b (5:424b) .bench call CheckEnergyNeededForAttack ret c ; can't be used - ld a, MOVE_FLAG2_ADDRESS | FLAG_2_BIT_5_F - call CheckLoadedMoveFlag + ld a, ATTACK_FLAG2_ADDRESS | FLAG_2_BIT_5_F + call CheckLoadedAttackFlag ret -; load selected move from Pokémon in hTempPlayAreaLocation_ff9d -; and checks if there is enough energy to execute the selected move +; load selected attack from Pokémon in hTempPlayAreaLocation_ff9d +; and checks if there is enough energy to execute the selected attack ; input: ; [hTempPlayAreaLocation_ff9d] = location of Pokémon card -; [wSelectedAttack] = selected move to examine +; [wSelectedAttack] = selected attack to examine ; output: ; b = basic energy still needed ; c = colorless energy still needed -; e = output of ConvertColorToEnergyCardID, or $0 if not a move -; carry set if no move +; e = output of ConvertColorToEnergyCardID, or $0 if not an attack +; carry set if no attack ; OR if it's a Pokémon Power -; OR if not enough energy for move +; OR if not enough energy for attack CheckEnergyNeededForAttack: ; 14279 (5:4279) ldh a, [hTempPlayAreaLocation_ff9d] add DUELVARS_ARENA_CARD @@ -432,12 +432,12 @@ CheckEnergyNeededForAttack: ; 14279 (5:4279) ld d, a ld a, [wSelectedAttack] ld e, a - call CopyMoveDataAndDamage_FromDeckIndex - ld hl, wLoadedMoveName + call CopyAttackDataAndDamage_FromDeckIndex + ld hl, wLoadedAttackName ld a, [hli] or [hl] jr z, .no_attack - ld a, [wLoadedMoveCategory] + ld a, [wLoadedAttackCategory] cp POKEMON_POWER jr nz, .is_attack .no_attack @@ -453,12 +453,12 @@ CheckEnergyNeededForAttack: ; 14279 (5:4279) bank1call HandleEnergyBurn xor a - ld [wTempLoadedMoveEnergyCost], a - ld [wTempLoadedMoveEnergyNeededAmount], a - ld [wTempLoadedMoveEnergyNeededType], a + ld [wTempLoadedAttackEnergyCost], a + ld [wTempLoadedAttackEnergyNeededAmount], a + ld [wTempLoadedAttackEnergyNeededType], a ld hl, wAttachedEnergies - ld de, wLoadedMoveEnergyCost + ld de, wLoadedAttackEnergyCost ld b, 0 ld c, (NUM_TYPES / 2) - 1 @@ -475,11 +475,11 @@ CheckEnergyNeededForAttack: ; 14279 (5:4279) ; running CheckIfEnoughParticularAttachedEnergy back to back like this ; overwrites the results of a previous call of this function, -; however, no move in the game has energy requirements for two +; however, no attack in the game has energy requirements for two ; different energy types (excluding colorless), so this routine ; will always just return the result for one type of basic energy, ; while all others will necessarily have an energy cost of 0 -; if moves are added to the game with energy requirements of +; if attacks are added to the game with energy requirements of ; two different basic energy types, then this routine only accounts ; for the type with the highest index @@ -488,8 +488,8 @@ CheckEnergyNeededForAttack: ; 14279 (5:4279) swap a and %00001111 ld b, a ; colorless energy still needed - ld a, [wTempLoadedMoveEnergyCost] - ld hl, wTempLoadedMoveEnergyNeededAmount + ld a, [wTempLoadedAttackEnergyCost] + ld hl, wTempLoadedAttackEnergyNeededAmount sub [hl] ld c, a ; basic energy still needed ld a, [wTotalAttachedEnergies] @@ -497,7 +497,7 @@ CheckEnergyNeededForAttack: ; 14279 (5:4279) sub b jr c, .not_enough - ld a, [wTempLoadedMoveEnergyNeededAmount] + ld a, [wTempLoadedAttackEnergyNeededAmount] or a ret z @@ -508,22 +508,22 @@ CheckEnergyNeededForAttack: ; 14279 (5:4279) cpl inc a ld c, a ; colorless energy still needed - ld a, [wTempLoadedMoveEnergyNeededAmount] + ld a, [wTempLoadedAttackEnergyNeededAmount] ld b, a ; basic energy still needed - ld a, [wTempLoadedMoveEnergyNeededType] + ld a, [wTempLoadedAttackEnergyNeededType] call ConvertColorToEnergyCardID ld e, a ld d, 0 scf ret -; takes as input the energy cost of a move for a +; takes as input the energy cost of an attack for a ; particular energy, stored in the lower nibble of a -; if the move costs some amount of this energy, the lower nibble of a != 0, -; and this amount is stored in wTempLoadedMoveEnergyCost +; if the attack costs some amount of this energy, the lower nibble of a != 0, +; and this amount is stored in wTempLoadedAttackEnergyCost ; sets carry flag if not enough energy of this type attached ; input: -; a = this energy cost of move (lower nibble) +; a = this energy cost of attack (lower nibble) ; [hl] = attached energy ; output: ; carry set if not enough of this energy type attached @@ -537,15 +537,15 @@ CheckIfEnoughParticularAttachedEnergy: ; 142f4 (5:42f4) ret .check - ld [wTempLoadedMoveEnergyCost], a + ld [wTempLoadedAttackEnergyCost], a sub [hl] jr z, .has_enough jr c, .has_enough ; not enough energy - ld [wTempLoadedMoveEnergyNeededAmount], a + ld [wTempLoadedAttackEnergyNeededAmount], a ld a, b - ld [wTempLoadedMoveEnergyNeededType], a + ld [wTempLoadedAttackEnergyNeededType], a inc hl inc b scf @@ -732,9 +732,9 @@ LookForCardIDInHand: ; 143bf (5:43bf) ret ; stores in wDamage, wAIMinDamage and wAIMaxDamage the calculated damage -; done to the defending Pokémon by a given card and move +; done to the defending Pokémon by a given card and attack ; input: -; a = move index to take into account +; a = attack index to take into account ; [hTempPlayAreaLocation_ff9d] = location of attacking card to consider EstimateDamage_VersusDefendingCard: ; 143e5 (5:43e5) ld [wSelectedAttack], a @@ -743,8 +743,8 @@ EstimateDamage_VersusDefendingCard: ; 143e5 (5:43e5) add DUELVARS_ARENA_CARD call GetTurnDuelistVariable ld d, a - call CopyMoveDataAndDamage_FromDeckIndex - ld a, [wLoadedMoveCategory] + call CopyAttackDataAndDamage_FromDeckIndex + ld a, [wLoadedAttackCategory] cp POKEMON_POWER jr nz, .is_attack @@ -761,9 +761,9 @@ EstimateDamage_VersusDefendingCard: ; 143e5 (5:43e5) ret .is_attack -; set wAIMinDamage and wAIMaxDamage to damage of move +; set wAIMinDamage and wAIMaxDamage to damage of attack ; these values take into account the range of damage -; that the move can span (e.g. min and max number of hits) +; that the attack can span (e.g. min and max number of hits) ld a, [wDamage] ld [wAIMinDamage], a ld [wAIMaxDamage], a @@ -944,9 +944,9 @@ _CalculateDamage_VersusDefendingPokemon: ; 14462 (5:4462) ; stores in wDamage, wAIMinDamage and wAIMaxDamage the calculated damage ; done to the Pokémon at hTempPlayAreaLocation_ff9d -; by the defending Pokémon, using the move index at a +; by the defending Pokémon, using the attack index at a ; input: -; a = move index +; a = attack index ; [hTempPlayAreaLocation_ff9d] = location of card to calculate ; damage as the receiver EstimateDamage_FromDefendingPokemon: ; 1450b (5:450b) @@ -956,9 +956,9 @@ EstimateDamage_FromDefendingPokemon: ; 1450b (5:450b) ld a, DUELVARS_ARENA_CARD call GetTurnDuelistVariable ld d, a - call CopyMoveDataAndDamage_FromDeckIndex + call CopyAttackDataAndDamage_FromDeckIndex call SwapTurn - ld a, [wLoadedMoveCategory] + ld a, [wLoadedAttackCategory] cp POKEMON_POWER jr nz, .is_attack @@ -975,9 +975,9 @@ EstimateDamage_FromDefendingPokemon: ; 1450b (5:450b) ret .is_attack -; set wAIMinDamage and wAIMaxDamage to damage of move +; set wAIMinDamage and wAIMaxDamage to damage of attack ; these values take into account the range of damage -; that the move can span (e.g. min and max number of hits) +; that the attack can span (e.g. min and max number of hits) ld a, [wDamage] ld [wAIMinDamage], a ld [wAIMaxDamage], a @@ -1315,7 +1315,7 @@ InitAITurnVars: ; 15649 (5:5649) ; checks if the Player used an attack last turn ; and if it was the second attack of their card. - ld a, [wPlayerAttackingMoveIndex] + ld a, [wPlayerAttackingAttackIndex] cp $ff jr z, .check_flag or a @@ -1387,20 +1387,20 @@ InitAITurnVars: ; 15649 (5:5649) .done ret -; load selected move from Pokémon in hTempPlayAreaLocation_ff9d, +; load selected attack from Pokémon in hTempPlayAreaLocation_ff9d, ; gets an energy card to discard and subsequently -; check if there is enough energy to execute the selected move +; check if there is enough energy to execute the selected attack ; after removing that attached energy card. ; input: ; [hTempPlayAreaLocation_ff9d] = location of Pokémon card -; [wSelectedAttack] = selected move to examine +; [wSelectedAttack] = selected attack to examine ; output: ; b = basic energy still needed ; c = colorless energy still needed -; e = output of ConvertColorToEnergyCardID, or $0 if not a move -; carry set if no move +; e = output of ConvertColorToEnergyCardID, or $0 if not an attack +; carry set if no attack ; OR if it's a Pokémon Power -; OR if not enough energy for move +; OR if not enough energy for attack CheckEnergyNeededForAttackAfterDiscard: ; 156c3 (5:56c3) ldh a, [hTempPlayAreaLocation_ff9d] add DUELVARS_ARENA_CARD @@ -1408,12 +1408,12 @@ CheckEnergyNeededForAttackAfterDiscard: ; 156c3 (5:56c3) ld d, a ld a, [wSelectedAttack] ld e, a - call CopyMoveDataAndDamage_FromDeckIndex - ld hl, wLoadedMoveName + call CopyAttackDataAndDamage_FromDeckIndex + ld hl, wLoadedAttackName ld a, [hli] or [hl] jr z, .no_attack - ld a, [wLoadedMoveCategory] + ld a, [wLoadedAttackCategory] cp POKEMON_POWER jr nz, .is_attack .no_attack @@ -1452,11 +1452,11 @@ CheckEnergyNeededForAttackAfterDiscard: ; 156c3 (5:56c3) .asm_1570c bank1call HandleEnergyBurn xor a - ld [wTempLoadedMoveEnergyCost], a - ld [wTempLoadedMoveEnergyNeededAmount], a - ld [wTempLoadedMoveEnergyNeededType], a + ld [wTempLoadedAttackEnergyCost], a + ld [wTempLoadedAttackEnergyNeededAmount], a + ld [wTempLoadedAttackEnergyNeededType], a ld hl, wAttachedEnergies - ld de, wLoadedMoveEnergyCost + ld de, wLoadedAttackEnergyCost ld b, 0 ld c, (NUM_TYPES / 2) - 1 .loop @@ -1474,8 +1474,8 @@ CheckEnergyNeededForAttackAfterDiscard: ; 156c3 (5:56c3) swap a and $0f ld b, a ; colorless energy still needed - ld a, [wTempLoadedMoveEnergyCost] - ld hl, wTempLoadedMoveEnergyNeededAmount + ld a, [wTempLoadedAttackEnergyCost] + ld hl, wTempLoadedAttackEnergyNeededAmount sub [hl] ld c, a ; basic energy still needed ld a, [wTotalAttachedEnergies] @@ -1483,7 +1483,7 @@ CheckEnergyNeededForAttackAfterDiscard: ; 156c3 (5:56c3) sub b jr c, .not_enough_energy - ld a, [wTempLoadedMoveEnergyNeededAmount] + ld a, [wTempLoadedAttackEnergyNeededAmount] or a ret z @@ -1494,9 +1494,9 @@ CheckEnergyNeededForAttackAfterDiscard: ; 156c3 (5:56c3) cpl inc a ld c, a ; colorless energy still needed - ld a, [wTempLoadedMoveEnergyNeededAmount] + ld a, [wTempLoadedAttackEnergyNeededAmount] ld b, a ; basic energy still needed - ld a, [wTempLoadedMoveEnergyNeededType] + ld a, [wTempLoadedAttackEnergyNeededType] call ConvertColorToEnergyCardID ld e, a ld d, 0 @@ -1827,14 +1827,14 @@ AIDecideWhetherToRetreat: ; 158b2 (5:58b2) .check_ko_1 xor a ldh [hTempPlayAreaLocation_ff9d], a - call CheckIfAnyMoveKnocksOutDefendingCard + call CheckIfAnyAttackKnocksOutDefendingCard jr nc, .active_cant_ko_1 - call CheckIfSelectedMoveIsUnusable - jp nc, .active_cant_use_move - call LookForEnergyNeededForMoveInHand + call CheckIfSelectedAttackIsUnusable + jp nc, .active_cant_use_atk + call LookForEnergyNeededForAttackInHand jr nc, .active_cant_ko_1 -.active_cant_use_move +.active_cant_use_atk ld a, 5 call SubFromAIScore ld a, [wAIOpponentPrizeCount] @@ -2028,11 +2028,11 @@ AIDecideWhetherToRetreat: ; 158b2 (5:58b2) ldh [hTempPlayAreaLocation_ff9d], a push hl push bc - call CheckIfAnyMoveKnocksOutDefendingCard + call CheckIfAnyAttackKnocksOutDefendingCard jr nc, .no_ko - call CheckIfSelectedMoveIsUnusable + call CheckIfSelectedAttackIsUnusable jr nc, .success - call LookForEnergyNeededForMoveInHand + call LookForEnergyNeededForAttackInHand jr c, .success .no_ko pop bc @@ -2057,9 +2057,9 @@ AIDecideWhetherToRetreat: ; 158b2 (5:58b2) xor a ldh [hTempPlayAreaLocation_ff9d], a - call CheckIfAnyMoveKnocksOutDefendingCard + call CheckIfAnyAttackKnocksOutDefendingCard jr nc, .active_cant_ko_2 - call CheckIfSelectedMoveIsUnusable + call CheckIfSelectedAttackIsUnusable jp nc, .check_defending_id .active_cant_ko_2 ld a, 40 @@ -2113,7 +2113,7 @@ AIDecideWhetherToRetreat: ; 158b2 (5:58b2) ; subtract from wAIScore if retreat cost is larger than 1 ; then check if any cards have at least half HP, -; are final evolutions and can use second move in the bench +; are final evolutions and can use second attack in the bench ; and adds to wAIScore if the active Pokémon doesn't meet ; these conditions .check_retreat_cost @@ -2134,7 +2134,7 @@ AIDecideWhetherToRetreat: ; 158b2 (5:58b2) call SubFromAIScore .one_or_none - call CheckIfArenaCardIsAtHalfHPCanEvolveAndUseSecondMove + call CheckIfArenaCardIsAtHalfHPCanEvolveAndUseSecondAttack jr c, .check_defending_can_ko call CountNumberOfSetUpBenchPokemon cp 2 @@ -2223,7 +2223,7 @@ AIDecideWhetherToRetreat: ; 158b2 (5:58b2) jr nc, .loop_ko_3 jr .set_carry -; if player's turn and loaded move is not a Pokémon Power OR +; if player's turn and loaded attack is not a Pokémon Power OR ; if opponent's turn and wcddb == 0 ; set wcdda's bit 7 flag Func_15b54: ; 15b54 (5:5b54) @@ -2234,7 +2234,7 @@ Func_15b54: ; 15b54 (5:5b54) jr z, .opponent ; player - ld a, [wLoadedMoveCategory] + ld a, [wLoadedAttackCategory] cp POKEMON_POWER ret z jr .set_flag @@ -2283,10 +2283,10 @@ AIDecideBenchPokemonToSwitchTo: ; 15b72 (5:5b72) ; check if card can KO defending Pokémon ; if it can, raise AI score ; if on last prize card, raise AI score again - call CheckIfAnyMoveKnocksOutDefendingCard - jr nc, .check_can_use_moves - call CheckIfSelectedMoveIsUnusable - jr c, .check_can_use_moves + call CheckIfAnyAttackKnocksOutDefendingCard + jr nc, .check_can_use_atks + call CheckIfSelectedAttackIsUnusable + jr c, .check_can_use_atks ld a, 10 call AddToAIScore ld a, [wcdda] @@ -2298,16 +2298,16 @@ AIDecideBenchPokemonToSwitchTo: ; 15b72 (5:5b72) ld a, 10 call AddToAIScore -; calculates damage of both moves +; calculates damage of both attacks ; to raise AI score accordingly -.check_can_use_moves +.check_can_use_atks xor a ld [wSelectedAttack], a - call CheckIfSelectedMoveIsUnusable + call CheckIfSelectedAttackIsUnusable call nc, .HandleAttackDamageScore ld a, $01 ld [wSelectedAttack], a - call CheckIfSelectedMoveIsUnusable + call CheckIfSelectedAttackIsUnusable call nc, .HandleAttackDamageScore jr .check_energy_card @@ -2862,10 +2862,10 @@ AIDecidePlayPokemonCard: ; 15eae (5:5eae) call AddToAIScore ; if energy cards are found in hand -; for this card's moves, raise AI score +; for this card's attacks, raise AI score .check_energy_cards ld a, [wTempAIPokemonCard] - call GetMovesEnergyCostBits + call GetAttacksEnergyCostBits call CheckEnergyFlagsNeededInList jr nc, .check_evolution_hand ld a, 20 @@ -2966,22 +2966,22 @@ AIDecideEvolution: ; 15f4c (5:5f4c) ld [wAIScore], a call Func_16120 -; check if the card can use any moves -; and if any of those moves can KO +; check if the card can use any attacks +; and if any of those attacks can KO xor a ld [wSelectedAttack], a - call CheckIfSelectedMoveIsUnusable + call CheckIfSelectedAttackIsUnusable jr nc, .can_attack ld a, $01 ld [wSelectedAttack], a - call CheckIfSelectedMoveIsUnusable + call CheckIfSelectedAttackIsUnusable jr c, .cant_attack_or_ko .can_attack ld a, $01 ld [wCurCardCanAttack], a - call CheckIfAnyMoveKnocksOutDefendingCard + call CheckIfAnyAttackKnocksOutDefendingCard jr nc, .check_evolution_attacks - call CheckIfSelectedMoveIsUnusable + call CheckIfSelectedAttackIsUnusable jr c, .check_evolution_attacks ld a, $01 ld [wCurCardCanKO], a @@ -3004,11 +3004,11 @@ AIDecideEvolution: ; 15f4c (5:5f4c) ld [hl], a xor a ld [wSelectedAttack], a - call CheckIfSelectedMoveIsUnusable + call CheckIfSelectedAttackIsUnusable jr nc, .evolution_can_attack ld a, $01 ld [wSelectedAttack], a - call CheckIfSelectedMoveIsUnusable + call CheckIfSelectedAttackIsUnusable jr c, .evolution_cant_attack .evolution_can_attack ld a, 5 @@ -3038,9 +3038,9 @@ AIDecideEvolution: ; 15f4c (5:5f4c) ld a, [wTempAI] or a jr nz, .check_defending_can_ko_evolution - call CheckIfAnyMoveKnocksOutDefendingCard + call CheckIfAnyAttackKnocksOutDefendingCard jr nc, .evolution_cant_ko - call CheckIfSelectedMoveIsUnusable + call CheckIfSelectedAttackIsUnusable jr c, .evolution_cant_ko ld a, 5 call AddToAIScore @@ -3365,7 +3365,7 @@ Func_161d5: ; 161d5 (5:61d5) call CheckIfActiveCardCanKnockOut jr c, .subtract - call CheckIfActivePokemonCanUseAnyNonResidualMove + call CheckIfActivePokemonCanUseAnyNonResidualAttack jr nc, .subtract call AIDecideWhetherToRetreat jr c, .subtract @@ -3383,9 +3383,9 @@ Func_161d5: ; 161d5 (5:61d5) call GetTurnDuelistVariable ld d, a ld e, $00 - call CopyMoveDataAndDamage_FromDeckIndex + call CopyAttackDataAndDamage_FromDeckIndex call SwapTurn - ld a, [wLoadedMoveCategory] + ld a, [wLoadedAttackCategory] cp POKEMON_POWER jr z, .check_muk_and_snorlax @@ -3466,9 +3466,9 @@ CheckDamageToMrMime: ; 16270 (5:6270) CheckIfActiveCardCanKnockOut: ; 1628f (5:628f) xor a ldh [hTempPlayAreaLocation_ff9d], a - call CheckIfAnyMoveKnocksOutDefendingCard + call CheckIfAnyAttackKnocksOutDefendingCard jr nc, .fail - call CheckIfSelectedMoveIsUnusable + call CheckIfSelectedAttackIsUnusable jp c, .fail scf ret @@ -3479,24 +3479,24 @@ CheckIfActiveCardCanKnockOut: ; 1628f (5:628f) ; outputs carry if any of the active Pokémon attacks ; can be used and are not residual -CheckIfActivePokemonCanUseAnyNonResidualMove: ; 162a1 (5:62a1) +CheckIfActivePokemonCanUseAnyNonResidualAttack: ; 162a1 (5:62a1) xor a ; active card ldh [hTempPlayAreaLocation_ff9d], a -; first move +; first atk ld [wSelectedAttack], a - call CheckIfSelectedMoveIsUnusable - jr c, .next_move - ld a, [wLoadedMoveCategory] + call CheckIfSelectedAttackIsUnusable + jr c, .next_atk + ld a, [wLoadedAttackCategory] and RESIDUAL jr z, .ok -.next_move -; second move +.next_atk +; second atk ld a, $01 ld [wSelectedAttack], a - call CheckIfSelectedMoveIsUnusable + call CheckIfSelectedAttackIsUnusable jr c, .fail - ld a, [wLoadedMoveCategory] + ld a, [wLoadedAttackCategory] and RESIDUAL jr z, .ok .fail @@ -3508,7 +3508,7 @@ CheckIfActivePokemonCanUseAnyNonResidualMove: ; 162a1 (5:62a1) ret ; looks for energy card(s) in hand depending on -; what is needed for selected card, for both moves +; what is needed for selected card, for both attacks ; - if one basic energy is required, look for that energy; ; - if one colorless is required, create a list at wDuelTempList ; of all energy cards; @@ -3517,7 +3517,7 @@ CheckIfActivePokemonCanUseAnyNonResidualMove: ; 162a1 (5:62a1) ; input: ; [hTempPlayAreaLocation_ff9d] = location of Pokémon card LookForEnergyNeededInHand: ; 162c8 (5:62c8) - xor a ; first move + xor a ; first attack ld [wSelectedAttack], a call CheckEnergyNeededForAttack ld a, b @@ -3531,7 +3531,7 @@ LookForEnergyNeededInHand: ; 162c8 (5:62c8) jr z, .two_colorless .second_attack - ld a, $01 ; second move + ld a, SECOND_ATTACK ld [wSelectedAttack], a call CheckEnergyNeededForAttack ld a, b @@ -3569,7 +3569,7 @@ LookForEnergyNeededInHand: ; 162c8 (5:62c8) jr .no_carry ; looks for energy card(s) in hand depending on -; what is needed for selected card and move +; what is needed for selected card and attack ; - if one basic energy is required, look for that energy; ; - if one colorless is required, create a list at wDuelTempList ; of all energy cards; @@ -3577,8 +3577,8 @@ LookForEnergyNeededInHand: ; 162c8 (5:62c8) ; return carry if successful in finding card ; input: ; [hTempPlayAreaLocation_ff9d] = location of Pokémon card -; [wSelectedAttack] = selected move to examine -LookForEnergyNeededForMoveInHand: ; 16311 (5:6311) +; [wSelectedAttack] = selected attack to examine +LookForEnergyNeededForAttackInHand: ; 16311 (5:6311) call CheckEnergyNeededForAttack ld a, b add c @@ -3738,7 +3738,7 @@ CheckEnergyFlagsNeededInList: ; 1637b (5:637b) or a ret -; returns in a the energy cost of both moves from card index in a +; returns in a the energy cost of both attacks from card index in a ; represented by energy flags ; i.e. each bit represents a different energy type cost ; if any colorless energy is required, all bits are set @@ -3746,25 +3746,25 @@ CheckEnergyFlagsNeededInList: ; 1637b (5:637b) ; a = card index ; output: ; a = bits of each energy requirement -GetMovesEnergyCostBits: ; 163c9 (5:63c9) +GetAttacksEnergyCostBits: ; 163c9 (5:63c9) call LoadCardDataToBuffer2_FromDeckIndex - ld hl, wLoadedCard2Move1EnergyCost + ld hl, wLoadedCard2Atk1EnergyCost call GetEnergyCostBits ld b, a push bc - ld hl, wLoadedCard2Move2EnergyCost + ld hl, wLoadedCard2Atk2EnergyCost call GetEnergyCostBits pop bc or b ret -; returns in a the energy cost of a move in [hl] +; returns in a the energy cost of an attack in [hl] ; represented by energy flags ; i.e. each bit represents a different energy type cost ; if any colorless energy is required, all bits are set ; input: -; [hl] = Loaded card move energy cost +; [hl] = Loaded card attack energy cost ; output: ; a = bits of each energy requirement GetEnergyCostBits: ; 163dd (5:63dd) @@ -4048,7 +4048,7 @@ AIProcessEnergyCards: ; 164fc (5:64fc) add DUELVARS_ARENA_CARD call GetTurnDuelistVariable ld [wCurCardCanAttack], a - call GetMovesEnergyCostBits + call GetAttacksEnergyCostBits ld hl, wDuelTempList call CheckEnergyFlagsNeededInList jp nc, .store_score @@ -4247,12 +4247,12 @@ AIProcessEnergyCards: ; 164fc (5:64fc) ld a, 1 call AddToAIScore -; add AI score for both moves, +; add AI score for both attacks, ; according to their energy requirements. - xor a ; first move - call DetermineAIScoreOfMoveEnergyRequirement - ld a, $01 ; second move - call DetermineAIScoreOfMoveEnergyRequirement + xor a ; first attack + call DetermineAIScoreOfAttackEnergyRequirement + ld a, SECOND_ATTACK + call DetermineAIScoreOfAttackEnergyRequirement ; store bench score for this card. .store_score @@ -4293,25 +4293,25 @@ AIProcessEnergyCards: ; 164fc (5:64fc) or a ret -; checks score related to selected move, +; checks score related to selected attack, ; in order to determine whether to play energy card. ; the AI score is increased/decreased accordingly. ; input: -; [wSelectedAttack] = move to check. -DetermineAIScoreOfMoveEnergyRequirement: ; 16695 (5:6695) +; [wSelectedAttack] = attack to check. +DetermineAIScoreOfAttackEnergyRequirement: ; 16695 (5:6695) ld [wSelectedAttack], a call CheckEnergyNeededForAttack jp c, .not_enough_energy - ld a, MOVE_FLAG2_ADDRESS | ATTACHED_ENERGY_BOOST_F - call CheckLoadedMoveFlag + ld a, ATTACK_FLAG2_ADDRESS | ATTACHED_ENERGY_BOOST_F + call CheckLoadedAttackFlag jr c, .attached_energy_boost - ld a, MOVE_FLAG2_ADDRESS | DISCARD_ENERGY_F - call CheckLoadedMoveFlag + ld a, ATTACK_FLAG2_ADDRESS | DISCARD_ENERGY_F + call CheckLoadedAttackFlag jr c, .discard_energy jp .check_evolution .attached_energy_boost - ld a, [wLoadedMoveEffectParam] + ld a, [wLoadedAttackEffectParam] cp MAX_ENERGY_BOOST_IS_LIMITED jr z, .check_surplus_energy @@ -4321,7 +4321,7 @@ DetermineAIScoreOfMoveEnergyRequirement: ; 16695 (5:6695) jp .check_evolution .check_surplus_energy - call CheckIfNoSurplusEnergyForMove + call CheckIfNoSurplusEnergyForAttack jr c, .asm_166cd cp 3 ; check how much surplus energy jr c, .asm_166cd @@ -4335,12 +4335,12 @@ DetermineAIScoreOfMoveEnergyRequirement: ; 16695 (5:6695) ld a, 2 call AddToAIScore -; check whether move has ATTACHED_ENERGY_BOOST flag +; check whether attack has ATTACHED_ENERGY_BOOST flag ; and add to AI score if attaching another energy ; will KO defending Pokémon. ; add more to score if this is currently active Pokémon. - ld a, MOVE_FLAG2_ADDRESS | ATTACHED_ENERGY_BOOST_F - call CheckLoadedMoveFlag + ld a, ATTACK_FLAG2_ADDRESS | ATTACHED_ENERGY_BOOST_F + call CheckLoadedAttackFlag jp nc, .check_evolution ld a, [wSelectedAttack] call EstimateDamage_VersusDefendingCard @@ -4369,7 +4369,7 @@ DetermineAIScoreOfMoveEnergyRequirement: ; 16695 (5:6695) call AddToAIScore jr .check_evolution -; checks if there is surplus energy for move +; checks if there is surplus energy for attack ; that discards attached energy card. ; if current card is Zapdos2, don't add to score. ; if there is no surplus energy, encourage playing energy. @@ -4377,13 +4377,13 @@ DetermineAIScoreOfMoveEnergyRequirement: ; 16695 (5:6695) ld a, [wLoadedCard1ID] cp ZAPDOS2 jr z, .check_evolution - call CheckIfNoSurplusEnergyForMove + call CheckIfNoSurplusEnergyForAttack jr c, .asm_166cd jr .asm_166c5 .not_enough_energy - ld a, MOVE_FLAG2_ADDRESS | FLAG_2_BIT_5_F - call CheckLoadedMoveFlag + ld a, ATTACK_FLAG2_ADDRESS | FLAG_2_BIT_5_F + call CheckLoadedAttackFlag jr nc, .check_color_needed ld a, 5 call SubFromAIScore @@ -4407,7 +4407,7 @@ DetermineAIScoreOfMoveEnergyRequirement: ; 16695 (5:6695) ld a, 3 call AddToAIScore -; if only one energy card is needed for move, +; if only one energy card is needed for attack, ; encourage playing energy card. .check_total_needed ld a, b @@ -4417,7 +4417,7 @@ DetermineAIScoreOfMoveEnergyRequirement: ; 16695 (5:6695) ld a, 3 call AddToAIScore -; if the move KOs player and this is the active card, add to AI score. +; if the attack KOs player and this is the active card, add to AI score. ldh a, [hTempPlayAreaLocation_ff9d] or a jr nz, .check_evolution @@ -4427,9 +4427,9 @@ DetermineAIScoreOfMoveEnergyRequirement: ; 16695 (5:6695) call GetNonTurnDuelistVariable ld hl, wDamage sub [hl] - jr z, .move_kos_defending + jr z, .atk_kos_defending jr nc, .check_evolution -.move_kos_defending +.atk_kos_defending ld a, 20 call AddToAIScore @@ -4464,8 +4464,8 @@ DetermineAIScoreOfMoveEnergyRequirement: ; 16695 (5:6695) ; if a colorless card is needed, increase AI score. call CheckEnergyNeededForAttack jr nc, .done - ld a, MOVE_FLAG2_ADDRESS | FLAG_2_BIT_5_F - call CheckLoadedMoveFlag + ld a, ATTACK_FLAG2_ADDRESS | FLAG_2_BIT_5_F + call CheckLoadedAttackFlag jr c, .done ld a, b or a @@ -4571,8 +4571,8 @@ FindPlayAreaCardWithHighestAIScore: ; 167b5 (5:67b5) ; returns carry if there's an evolution card ; that can evolve card in hTempPlayAreaLocation_ff9d, -; and that card needs energy to use wSelectedMove. -CheckIfEvolutionNeedsEnergyForMove: ; 16805 (5:6805) +; and that card needs energy to use wSelectedAttack. +CheckIfEvolutionNeedsEnergyForAttack: ; 16805 (5:6805) call CreateHandCardList ldh a, [hTempPlayAreaLocation_ff9d] add DUELVARS_ARENA_CARD @@ -4618,7 +4618,7 @@ CheckIfEvolutionNeedsEnergyForMove: ; 16805 (5:6805) ; c = 1 if only needs colorless energy, 0 otherwise; ; carry set if not Zapdos2's Thunderbolt attack. GetEnergyCardForDiscardOrEnergyBoostAttack: ; 1683b (5:683b) -; load card ID and check selected move index. +; load card ID and check selected attack index. ldh a, [hTempPlayAreaLocation_ff9d] add DUELVARS_ARENA_CARD call GetTurnDuelistVariable @@ -4639,12 +4639,12 @@ GetEnergyCardForDiscardOrEnergyBoostAttack: ; 1683b (5:683b) jr z, .charizard_or_exeggutor cp EXEGGUTOR jr z, .charizard_or_exeggutor - ld hl, wLoadedCard2Move2EnergyCost + ld hl, wLoadedCard2Atk2EnergyCost jr .fire .first_attack - ld hl, wLoadedCard2Move1EnergyCost + ld hl, wLoadedCard2Atk1EnergyCost -; check which energy color the move requires, +; check which energy color the attack requires, ; and load in e the card ID of corresponding energy card, ; then return carry flag set. .fire @@ -4744,34 +4744,34 @@ AITryToPlayEnergyCard: ; 1689f (5:689f) xor a ; FIRST_ATTACK_OR_PKMN_POWER ld [wSelectedAttack], a call CheckEnergyNeededForAttack - ld a, MOVE_FLAG2_ADDRESS | ATTACHED_ENERGY_BOOST_F - call CheckLoadedMoveFlag + ld a, ATTACK_FLAG2_ADDRESS | ATTACHED_ENERGY_BOOST_F + call CheckLoadedAttackFlag jr c, .energy_boost_or_discard_energy - ld a, MOVE_FLAG2_ADDRESS | DISCARD_ENERGY_F - call CheckLoadedMoveFlag + ld a, ATTACK_FLAG2_ADDRESS | DISCARD_ENERGY_F + call CheckLoadedAttackFlag jr c, .energy_boost_or_discard_energy ld a, SECOND_ATTACK ld [wSelectedAttack], a call CheckEnergyNeededForAttack - ld a, MOVE_FLAG2_ADDRESS | ATTACHED_ENERGY_BOOST_F - call CheckLoadedMoveFlag + ld a, ATTACK_FLAG2_ADDRESS | ATTACHED_ENERGY_BOOST_F + call CheckLoadedAttackFlag jr c, .energy_boost_or_discard_energy - ld a, MOVE_FLAG2_ADDRESS | DISCARD_ENERGY_F - call CheckLoadedMoveFlag + ld a, ATTACK_FLAG2_ADDRESS | DISCARD_ENERGY_F + call CheckLoadedAttackFlag jr c, .energy_boost_or_discard_energy ; if none of the attacks have those flags, do an additional ; check to ascertain whether evolution card needs energy ; to use second attack. Return if all these checks fail. - call CheckIfEvolutionNeedsEnergyForMove + call CheckIfEvolutionNeedsEnergyForAttack ret nc call CreateEnergyCardListFromHand jr .check_deck ; for attacks that discard energy or get boost for -; additional energy cards, get the energy card ID required by move. -; if it's Zapdos2's Thunderbolt move, return. +; additional energy cards, get the energy card ID required by attack. +; if it's Zapdos2's Thunderbolt attack, return. .energy_boost_or_discard_energy call GetEnergyCardForDiscardOrEnergyBoostAttack ret nc @@ -4867,7 +4867,7 @@ AITryToPlayEnergyCard: ; 1689f (5:689f) ; check if playing certain decks so that AI can decide whether to play ; double colorless to some specific cards. -; these are cards that do not need double colorless to any of their moves +; these are cards that do not need double colorless to any of their attacks ; but are required by their evolutions. ; return carry if there's a double colorless in hand to attach ; and it's one of the card IDs from these decks. @@ -5089,8 +5089,8 @@ AIProcessAttacks: ; 169fc (5:69fc) .check_damage_bench ; check if it can otherwise damage player's bench - ld a, MOVE_FLAG1_ADDRESS | DAMAGE_TO_OPPONENT_BENCH_F - call CheckLoadedMoveFlag + ld a, ATTACK_FLAG1_ADDRESS | DAMAGE_TO_OPPONENT_BENCH_F + call CheckLoadedAttackFlag jr c, .can_damage ; cannot damage either Defending Pokemon or Bench @@ -5132,7 +5132,7 @@ GetAIScoreOfAttack: ; 16a86 (5:6a86) xor a ldh [hTempPlayAreaLocation_ff9d], a - call CheckIfSelectedMoveIsUnusable + call CheckIfSelectedAttackIsUnusable jr nc, .usable ; return zero AI score. @@ -5158,9 +5158,9 @@ GetAIScoreOfAttack: ; 16a86 (5:6a86) ld [wTempNonTurnDuelistCardID], a ; handle the case where the player has No Damage substatus. -; in the case the player does, check if this move +; in the case the player does, check if this attack ; has a residual effect, or if it can damage the opposing bench. -; If none of those are true, render the move unusable. +; If none of those are true, render the attack unusable. ; also if it's a PKMN power, consider it unusable as well. bank1call HandleNoDamageOrEffectSubstatus call SwapTurn @@ -5171,17 +5171,17 @@ GetAIScoreOfAttack: ; 16a86 (5:6a86) ld [wAICannotDamage], a ld a, [wSelectedAttack] call EstimateDamage_VersusDefendingCard - ld a, [wLoadedMoveCategory] + ld a, [wLoadedAttackCategory] cp POKEMON_POWER jr z, .unusable and RESIDUAL jr nz, .check_if_can_ko - ld a, MOVE_FLAG1_ADDRESS | DAMAGE_TO_OPPONENT_BENCH_F - call CheckLoadedMoveFlag + ld a, ATTACK_FLAG1_ADDRESS | DAMAGE_TO_OPPONENT_BENCH_F + call CheckLoadedAttackFlag jr nc, .unusable -; calculate damage to player to check if move can KO. -; encourage move if it's able to KO. +; calculate damage to player to check if attack can KO. +; encourage attack if it's able to KO. .check_if_can_ko ld a, [wSelectedAttack] call EstimateDamage_VersusDefendingCard @@ -5196,14 +5196,14 @@ GetAIScoreOfAttack: ; 16a86 (5:6a86) ld a, 20 call AddToAIScore -; raise AI score by the number of damage counters that this move deals. +; raise AI score by the number of damage counters that this attack deals. ; if no damage is dealt, subtract AI score. in case wDamage is zero -; but wMaxDamage is not, then encourage move afterwards. +; but wMaxDamage is not, then encourage attack afterwards. ; otherwise, if wMaxDamage is also zero, check for damage against -; player's bench, and encourage move in case there is. +; player's bench, and encourage attack in case there is. .check_damage xor a - ld [wAIMoveIsNonDamaging], a + ld [wAIAttackIsNonDamaging], a ld a, [wDamage] ld [wTempAI], a or a @@ -5213,7 +5213,7 @@ GetAIScoreOfAttack: ; 16a86 (5:6a86) jr .check_recoil .no_damage ld a, $01 - ld [wAIMoveIsNonDamaging], a + ld [wAIAttackIsNonDamaging], a call SubFromAIScore ld a, [wAIMaxDamage] or a @@ -5221,26 +5221,26 @@ GetAIScoreOfAttack: ; 16a86 (5:6a86) ld a, 2 call AddToAIScore xor a - ld [wAIMoveIsNonDamaging], a + ld [wAIAttackIsNonDamaging], a .no_max_damage - ld a, MOVE_FLAG1_ADDRESS | DAMAGE_TO_OPPONENT_BENCH_F - call CheckLoadedMoveFlag + ld a, ATTACK_FLAG1_ADDRESS | DAMAGE_TO_OPPONENT_BENCH_F + call CheckLoadedAttackFlag jr nc, .check_recoil ld a, 2 call AddToAIScore -; handle recoil moves (low and high recoil). +; handle recoil attacks (low and high recoil). .check_recoil - ld a, MOVE_FLAG1_ADDRESS | LOW_RECOIL_F - call CheckLoadedMoveFlag + ld a, ATTACK_FLAG1_ADDRESS | LOW_RECOIL_F + call CheckLoadedAttackFlag jr c, .is_recoil - ld a, MOVE_FLAG1_ADDRESS | HIGH_RECOIL_F - call CheckLoadedMoveFlag + ld a, ATTACK_FLAG1_ADDRESS | HIGH_RECOIL_F + call CheckLoadedAttackFlag jp nc, .check_defending_can_ko .is_recoil ; sub from AI score number of damage counters - ; that move deals to itself. - ld a, [wLoadedMoveEffectParam] + ; that attack deals to itself. + ld a, [wLoadedAttackEffectParam] or a jp z, .check_defending_can_ko ld [wDamage], a @@ -5250,8 +5250,8 @@ GetAIScoreOfAttack: ; 16a86 (5:6a86) call SubFromAIScore push de - ld a, MOVE_FLAG1_ADDRESS | HIGH_RECOIL_F - call CheckLoadedMoveFlag + ld a, ATTACK_FLAG1_ADDRESS | HIGH_RECOIL_F + call CheckLoadedAttackFlag pop de jr c, .high_recoil @@ -5266,14 +5266,14 @@ GetAIScoreOfAttack: ; 16a86 (5:6a86) call SubFromAIScore .high_recoil - ; dismiss this move if no benched Pokémon + ; dismiss this attack if no benched Pokémon ld a, DUELVARS_NUMBER_OF_POKEMON_IN_PLAY_AREA call GetTurnDuelistVariable cp 2 - jr c, .dismiss_high_recoil_move + jr c, .dismiss_high_recoil_atk ; has benched Pokémon -; here the AI handles high recoil moves differently +; here the AI handles high recoil attacks differently ; depending on what deck it's playing. ld a, [wOpponentDeckID] cp ROCK_CRUSHER_DECK_ID @@ -5281,23 +5281,23 @@ GetAIScoreOfAttack: ; 16a86 (5:6a86) cp ZAPPING_SELFDESTRUCT_DECK_ID jr z, .zapping_selfdestruct_deck cp BOOM_BOOM_SELFDESTRUCT_DECK_ID - jr z, .encourage_high_recoil_move + jr z, .encourage_high_recoil_atk ; Boom Boom Selfdestruct deck always encourages cp POWER_GENERATOR_DECK_ID jr nz, .high_recoil_generic_checks ; Power Generator deck always dismisses -.dismiss_high_recoil_move +.dismiss_high_recoil_atk xor a ld [wAIScore], a jp .done -.encourage_high_recoil_move +.encourage_high_recoil_atk ld a, 20 call AddToAIScore jp .done -; Zapping Selfdestruct deck only uses this move +; Zapping Selfdestruct deck only uses this attack ; if number of cards in deck >= 30 and ; HP of active card is < half max HP. .zapping_selfdestruct_deck @@ -5323,30 +5323,30 @@ GetAIScoreOfAttack: ; 16a86 (5:6a86) add b ld b, a ; 20 bench damage if not Magnemite1 -; if this move causes player to win the duel by -; knocking out own Pokémon, dismiss move. +; if this attack causes player to win the duel by +; knocking out own Pokémon, dismiss attack. ld a, 1 ; count active Pokémon as KO'd call .check_if_kos_bench - jr c, .dismiss_high_recoil_move - jr .encourage_high_recoil_move + jr c, .dismiss_high_recoil_atk + jr .encourage_high_recoil_atk -; Rock Crusher Deck only uses this move if -; prize count is below 4 and move wins (or potentially draws) the duel, +; Rock Crusher Deck only uses this attack if +; prize count is below 4 and attack wins (or potentially draws) the duel, ; (i.e. at least gets KOs equal to prize cards left). .rock_crusher_deck call CountPrizes cp 4 - jr nc, .dismiss_high_recoil_move + jr nc, .dismiss_high_recoil_atk ; prize count < 4 ld b, 20 ; damage dealt to bench call SwapTurn xor a call .check_if_kos_bench call SwapTurn - jr c, .encourage_high_recoil_move + jr c, .encourage_high_recoil_atk ; generic checks for all other deck IDs. -; encourage move if it wins (or potentially draws) the duel, +; encourage attack if it wins (or potentially draws) the duel, ; (i.e. at least gets KOs equal to prize cards left). ; dismiss it if it causes the player to win. .high_recoil_generic_checks @@ -5382,12 +5382,12 @@ GetAIScoreOfAttack: ; 16a86 (5:6a86) pop bc jr nc, .count_own_ko_bench -; move causes player to draw all prize cards +; attack causes player to draw all prize cards xor a ld [wAIScore], a jp .done -; move causes CPU to draw all prize cards +; attack causes CPU to draw all prize cards .wins_the_duel ld a, 20 call AddToAIScore @@ -5410,15 +5410,15 @@ GetAIScoreOfAttack: ; 16a86 (5:6a86) jr .check_defending_can_ko ; local function that gets called to determine damage to -; benched Pokémon caused by a HIGH_RECOIL move. -; return carry if using move causes number of benched Pokémon KOs +; benched Pokémon caused by a HIGH_RECOIL attack. +; return carry if using attack causes number of benched Pokémon KOs ; equal to or larger than remaining prize cards. ; this function is independent on duelist turn, so whatever ; turn it is when this is called, it's that duelist's ; bench/prize cards that get checked. ; input: ; a = initial number of KO's beside benched Pokémon, -; so that if the active Pokémon is KO'd by the move, +; so that if the active Pokémon is KO'd by the attack, ; this counts towards the prize cards collected ; b = damage dealt to bench Pokémon .check_if_kos_bench @@ -5458,8 +5458,8 @@ GetAIScoreOfAttack: ; 16a86 (5:6a86) scf ret -; if defending card can KO, encourage move -; unless move is non-damaging. +; if defending card can KO, encourage attack +; unless attack is non-damaging. .check_defending_can_ko ld a, [wSelectedAttack] push af @@ -5470,13 +5470,13 @@ GetAIScoreOfAttack: ; 16a86 (5:6a86) jr nc, .check_discard ld a, 5 call AddToAIScore - ld a, [wAIMoveIsNonDamaging] + ld a, [wAIAttackIsNonDamaging] or a jr z, .check_discard ld a, 5 call SubFromAIScore -; subtract from AI score if this move requires +; subtract from AI score if this attack requires ; discarding any energy cards. .check_discard ld a, [wSelectedAttack] @@ -5484,49 +5484,49 @@ GetAIScoreOfAttack: ; 16a86 (5:6a86) ld a, DUELVARS_ARENA_CARD call GetTurnDuelistVariable ld d, a - call CopyMoveDataAndDamage_FromDeckIndex - ld a, MOVE_FLAG2_ADDRESS | DISCARD_ENERGY_F - call CheckLoadedMoveFlag + call CopyAttackDataAndDamage_FromDeckIndex + ld a, ATTACK_FLAG2_ADDRESS | DISCARD_ENERGY_F + call CheckLoadedAttackFlag jr nc, .asm_16ca6 ld a, 1 call SubFromAIScore - ld a, [wLoadedMoveEffectParam] + ld a, [wLoadedAttackEffectParam] call SubFromAIScore .asm_16ca6 - ld a, MOVE_FLAG2_ADDRESS | FLAG_2_BIT_6_F - call CheckLoadedMoveFlag + ld a, ATTACK_FLAG2_ADDRESS | FLAG_2_BIT_6_F + call CheckLoadedAttackFlag jr nc, .check_nullify_flag - ld a, [wLoadedMoveEffectParam] + ld a, [wLoadedAttackEffectParam] call AddToAIScore -; encourage move if it has a nullify or weaken attack effect. +; encourage attack if it has a nullify or weaken attack effect. .check_nullify_flag - ld a, MOVE_FLAG2_ADDRESS | NULLIFY_OR_WEAKEN_ATTACK_F - call CheckLoadedMoveFlag + ld a, ATTACK_FLAG2_ADDRESS | NULLIFY_OR_WEAKEN_ATTACK_F + call CheckLoadedAttackFlag jr nc, .check_draw_flag ld a, 1 call AddToAIScore -; encourage move if it has an effect to draw a card. +; encourage attack if it has an effect to draw a card. .check_draw_flag - ld a, MOVE_FLAG1_ADDRESS | DRAW_CARD_F - call CheckLoadedMoveFlag + ld a, ATTACK_FLAG1_ADDRESS | DRAW_CARD_F + call CheckLoadedAttackFlag jr nc, .check_heal_flag ld a, 1 call AddToAIScore .check_heal_flag - ld a, MOVE_FLAG2_ADDRESS | HEAL_USER_F - call CheckLoadedMoveFlag + ld a, ATTACK_FLAG2_ADDRESS | HEAL_USER_F + call CheckLoadedAttackFlag jr nc, .check_status_effect - ld a, [wLoadedMoveEffectParam] + ld a, [wLoadedAttackEffectParam] cp 1 jr z, .tally_heal_score ld a, [wTempAI] call CalculateByteTensDigit ld b, a - ld a, [wLoadedMoveEffectParam] + ld a, [wLoadedAttackEffectParam] cp 3 jr z, .asm_16cec srl b @@ -5545,7 +5545,7 @@ GetAIScoreOfAttack: ; 16a86 (5:6a86) call GetCardDamageAndMaxHP call CalculateByteTensDigit pop bc - cp b ; wLoadedMoveEffectParam + cp b ; wLoadedAttackEffectParam jr c, .add_heal_score ld a, b .add_heal_score @@ -5566,22 +5566,22 @@ GetAIScoreOfAttack: ; 16a86 (5:6a86) call GetNonTurnDuelistVariable ld [wTempAI], a -; encourage a poison inflicting move if opposing Pokémon +; encourage a poison inflicting attack if opposing Pokémon ; isn't (doubly) poisoned already. ; if opposing Pokémon is only poisoned and not double poisoned, -; and this move has FLAG_2_BIT_6 set, discourage it +; and this attack has FLAG_2_BIT_6 set, discourage it ; (possibly to make Nidoking's Toxic attack less likely to be chosen ; if the other Pokémon is poisoned.) - ld a, MOVE_FLAG1_ADDRESS | INFLICT_POISON_F - call CheckLoadedMoveFlag + ld a, ATTACK_FLAG1_ADDRESS | INFLICT_POISON_F + call CheckLoadedAttackFlag jr nc, .check_sleep ld a, [wTempAI] and DOUBLE_POISONED jr z, .add_poison_score and $40 ; only double poisoned? jr z, .check_sleep - ld a, MOVE_FLAG2_ADDRESS | FLAG_2_BIT_6_F - call CheckLoadedMoveFlag + ld a, ATTACK_FLAG2_ADDRESS | FLAG_2_BIT_6_F + call CheckLoadedAttackFlag jr nc, .check_sleep ld a, 2 call SubFromAIScore @@ -5590,10 +5590,10 @@ GetAIScoreOfAttack: ; 16a86 (5:6a86) ld a, 2 call AddToAIScore -; encourage sleep-inducing move if other Pokémon isn't asleep. +; encourage sleep-inducing attack if other Pokémon isn't asleep. .check_sleep - ld a, MOVE_FLAG1_ADDRESS | INFLICT_SLEEP_F - call CheckLoadedMoveFlag + ld a, ATTACK_FLAG1_ADDRESS | INFLICT_SLEEP_F + call CheckLoadedAttackFlag jr nc, .check_paralysis ld a, [wTempAI] and CNF_SLP_PRZ @@ -5602,11 +5602,11 @@ GetAIScoreOfAttack: ; 16a86 (5:6a86) ld a, 1 call AddToAIScore -; encourage paralysis-inducing move if other Pokémon isn't asleep. -; otherwise, if other Pokémon is asleep, discourage move. +; encourage paralysis-inducing attack if other Pokémon isn't asleep. +; otherwise, if other Pokémon is asleep, discourage attack. .check_paralysis - ld a, MOVE_FLAG1_ADDRESS | INFLICT_PARALYSIS_F - call CheckLoadedMoveFlag + ld a, ATTACK_FLAG1_ADDRESS | INFLICT_PARALYSIS_F + call CheckLoadedAttackFlag jr nc, .check_confusion ld a, [wTempAI] and CNF_SLP_PRZ @@ -5619,13 +5619,13 @@ GetAIScoreOfAttack: ; 16a86 (5:6a86) ld a, 1 call SubFromAIScore -; encourage confuse-inducing move if other Pokémon isn't asleep +; encourage confuse-inducing attack if other Pokémon isn't asleep ; or confused already. ; otherwise, if other Pokémon is asleep or confused, -; discourage move instead. +; discourage attack instead. .check_confusion - ld a, MOVE_FLAG1_ADDRESS | INFLICT_CONFUSION_F - call CheckLoadedMoveFlag + ld a, ATTACK_FLAG1_ADDRESS | INFLICT_CONFUSION_F + call CheckLoadedAttackFlag jr nc, .check_if_confused ld a, [wTempAI] and CNF_SLP_PRZ @@ -5652,13 +5652,13 @@ GetAIScoreOfAttack: ; 16a86 (5:6a86) ld a, 1 call SubFromAIScore -; flag3_bit1 marks moves that the AI handles individually. -; each move has its own checks and modifies AI score accordingly. +; flag3_bit1 marks attacks that the AI handles individually. +; each attack has its own checks and modifies AI score accordingly. .handle_flag3_bit1 - ld a, MOVE_FLAG3_ADDRESS | FLAG_3_BIT_1_F - call CheckLoadedMoveFlag + ld a, ATTACK_FLAG3_ADDRESS | FLAG_3_BIT_1_F + call CheckLoadedAttackFlag jr nc, .done - call HandleSpecialAIMoves + call HandleSpecialAIAttacks cp $80 jr c, .negative_score sub $80 @@ -5673,13 +5673,13 @@ GetAIScoreOfAttack: ; 16a86 (5:6a86) .done ret -; this function handles moves with the FLAG_3_BIT_1 set, -; and makes specific checks in each of these moves +; this function handles attacks with the FLAG_3_BIT_1 set, +; and makes specific checks in each of these attacks ; to either return a positive score (value above $80) ; or a negative score (value below $80). ; input: -; hTempPlayAreaLocation_ff9d = location of card with move. -HandleSpecialAIMoves: ; 16dcd (5:6dcd) +; hTempPlayAreaLocation_ff9d = location of card with attack. +HandleSpecialAIAttacks: ; 16dcd (5:6dcd) ldh a, [hTempPlayAreaLocation_ff9d] add DUELVARS_ARENA_CARD call GetTurnDuelistVariable @@ -5739,11 +5739,11 @@ HandleSpecialAIMoves: ; 16dcd (5:6dcd) HandleCallForFamily: ; 16e3e (5:6e3e) ld a, CARD_LOCATION_DECK call CheckIfAnyCardIDinLocation - jr nc, HandleSpecialAIMoves.zero + jr nc, HandleSpecialAIAttacks.zero ld a, DUELVARS_NUMBER_OF_POKEMON_IN_PLAY_AREA call GetTurnDuelistVariable cp MAX_BENCH_POKEMON - jr nc, HandleSpecialAIMoves.zero + jr nc, HandleSpecialAIAttacks.zero ld b, a ld a, MAX_BENCH_POKEMON sub b @@ -5760,12 +5760,12 @@ HandleNidoranFCallForFamily: ; 16e55 (5:6e55) ld e, NIDORANF ld a, CARD_LOCATION_DECK call CheckIfAnyCardIDinLocation - jr nc, HandleSpecialAIMoves.zero + jr nc, HandleSpecialAIAttacks.zero .found ld a, DUELVARS_NUMBER_OF_POKEMON_IN_PLAY_AREA call GetTurnDuelistVariable cp MAX_PLAY_AREA_POKEMON - jr nc, HandleSpecialAIMoves.zero + jr nc, HandleSpecialAIAttacks.zero ld b, a ld a, MAX_PLAY_AREA_POKEMON sub b @@ -5792,12 +5792,12 @@ HandleMarowak1CallForFriend: ; 16e77 (5:6e77) ld a, CARD_LOCATION_DECK call CheckIfAnyCardIDinLocation jr c, .found - jr HandleSpecialAIMoves.zero + jr HandleSpecialAIAttacks.zero .found ld a, DUELVARS_NUMBER_OF_POKEMON_IN_PLAY_AREA call GetTurnDuelistVariable cp MAX_BENCH_POKEMON - jr nc, HandleSpecialAIMoves.zero + jr nc, HandleSpecialAIAttacks.zero ld b, a ld a, MAX_BENCH_POKEMON sub b @@ -5808,11 +5808,11 @@ HandleMarowak1CallForFriend: ; 16e77 (5:6e77) ; return a score of $80 + slots available in bench. HandleJigglypuff2FriendshipSong: ; 16ead (5:6ead) call CheckIfAnyBasicPokemonInDeck - jr nc, HandleSpecialAIMoves.zero + jr nc, HandleSpecialAIAttacks.zero ld a, DUELVARS_NUMBER_OF_POKEMON_IN_PLAY_AREA call GetTurnDuelistVariable cp MAX_PLAY_AREA_POKEMON - jr nc, HandleSpecialAIMoves.zero + jr nc, HandleSpecialAIAttacks.zero ld b, a ld a, MAX_PLAY_AREA_POKEMON sub b @@ -5822,28 +5822,28 @@ HandleJigglypuff2FriendshipSong: ; 16ead (5:6ead) ; if AI decides to retreat, return a score of $80 + 10. HandleExeggutorTeleport: ; 16ec2 (5:6ec2) call AIDecideWhetherToRetreat - jp nc, HandleSpecialAIMoves.zero + jp nc, HandleSpecialAIAttacks.zero ld a, $8a ret ; tests for the following conditions: ; - player is under No Damage substatus; -; - second move is unusable; -; - second move deals no damage; +; - second attack is unusable; +; - second attack deals no damage; ; if any are true, returns score of $80 + 5. HandleSwordsDanceAndFocusEnergy: ; 16ecb (5:6ecb) ld a, [wAICannotDamage] or a jr nz, .success - ld a, $01 ; second move + ld a, SECOND_ATTACK ld [wSelectedAttack], a - call CheckIfSelectedMoveIsUnusable + call CheckIfSelectedAttackIsUnusable jr c, .success - ld a, $01 ; second move + ld a, SECOND_ATTACK call EstimateDamage_VersusDefendingCard ld a, [wDamage] or a - jp nz, HandleSpecialAIMoves.zero + jp nz, HandleSpecialAIAttacks.zero .success ld a, $85 ret @@ -5869,21 +5869,21 @@ HandleElectrode2ChainLightning: ; 16eea (5:6eea) pop bc cp b jr nz, .loop - jp HandleSpecialAIMoves.zero + jp HandleSpecialAIAttacks.zero .success ld a, $82 ret HandleMew3DevolutionBeam: ; 16f0f (5:6f0f) call LookForCardThatIsKnockedOutOnDevolution - jp nc, HandleSpecialAIMoves.zero + jp nc, HandleSpecialAIAttacks.zero ld a, $85 ret ; first checks if card is confused, and if so return 0. ; then checks number of Pokémon in bench that are viable to use: -; - if that number is < 2 and this move is Conversion 1 OR -; - if that number is >= 2 and this move is Conversion 2 +; - if that number is < 2 and this attack is Conversion 1 OR +; - if that number is >= 2 and this attack is Conversion 2 ; then return score of $80 + 2. ; otherwise return score of $80 + 1. HandlePorygonConversion: ; 16f18 (5:6f18) @@ -5891,7 +5891,7 @@ HandlePorygonConversion: ; 16f18 (5:6f18) call GetTurnDuelistVariable and CNF_SLP_PRZ cp CONFUSED - jp z, HandleSpecialAIMoves.zero + jp z, HandleSpecialAIAttacks.zero ld a, [wSelectedAttack] or a @@ -5921,16 +5921,16 @@ HandleEnergyAbsorption: ; 16f41 (5:6f41) ld e, PSYCHIC_ENERGY ld a, CARD_LOCATION_DISCARD_PILE call CheckIfAnyCardIDinLocation - jp nc, HandleSpecialAIMoves.zero + jp nc, HandleSpecialAIAttacks.zero ld a, $82 ret ; if player has cards in hand, AI calls Random: -; - 1/3 chance to encourage move regardless; -; - 1/3 chance to dismiss move regardless; +; - 1/3 chance to encourage attack regardless; +; - 1/3 chance to dismiss attack regardless; ; - 1/3 change to make some checks to player's hand. ; AI tallies number of basic cards in hand, and if this -; number is >= 2, encourage move. +; number is >= 2, encourage attack. ; otherwise, if it finds an evolution card in hand that ; can evolve a card in player's deck, encourage. ; if encouraged, returns a score of $80 + 3. @@ -5988,7 +5988,7 @@ HandleNinetalesMixUp: ; 16f4e (5:6f4e) .loop_play_area ld a, [hli] cp $ff - jp z, HandleSpecialAIMoves.zero + jp z, HandleSpecialAIAttacks.zero push hl call SwapTurn call CheckForEvolutionInList @@ -6005,17 +6005,17 @@ HandleZapdos3BigThunder: ; 16fb8 (5:6fb8) ld a, $83 ret -; dismiss move if cards in deck <= 20. +; dismiss attack if cards in deck <= 20. ; otherwise return a score of $80 + 0. HandleKangaskhanFetch: ; 16fbb (5:6fbb) ld a, DUELVARS_NUMBER_OF_CARDS_NOT_IN_DECK call GetTurnDuelistVariable cp 41 - jp nc, HandleSpecialAIMoves.zero + jp nc, HandleSpecialAIAttacks.zero ld a, $80 ret -; dismiss move if number of own benched cards which would +; dismiss attack if number of own benched cards which would ; be KOd is greater than or equal to the number ; of prize cards left for player. HandleDugtrioEarthquake: ; 16fc8 (5:6fc8) @@ -6041,8 +6041,8 @@ HandleDugtrioEarthquake: ; 16fc8 (5:6fc8) call CountPrizes pop de cp d - jp c, HandleSpecialAIMoves.zero - jp z, HandleSpecialAIMoves.zero + jp c, HandleSpecialAIAttacks.zero + jp z, HandleSpecialAIAttacks.zero ld a, $80 ret @@ -6052,13 +6052,13 @@ HandleElectrode1EnergySpike: ; 16ff2 (5:6ff2) ld a, CARD_LOCATION_DECK ld e, LIGHTNING_ENERGY call CheckIfAnyCardIDinLocation - jp nc, HandleSpecialAIMoves.zero + jp nc, HandleSpecialAIAttacks.zero call AIProcessButDontPlayEnergy_SkipEvolution - jp nc, HandleSpecialAIMoves.zero + jp nc, HandleSpecialAIAttacks.zero ld a, $83 ret -; only incentivize move if player's active card, +; only incentivize attack if player's active card, ; has any energy cards attached, and if so, ; return a score of $80 + 3. HandleHyperBeam: ; 17005 (5:7005) @@ -6101,19 +6101,19 @@ CheckWhetherToSwitchToFirstAttack: ; 17019 (5:7019) ; second attack can ko, check its flag. ; in case its effect is to heal user or nullify/weaken damage -; next turn, keep second move as the option. +; next turn, keep second attack as the option. ; otherwise switch to the first attack. .check_flag ld a, DUELVARS_ARENA_CARD call GetTurnDuelistVariable ld d, a - ld e, $01 ; second attack - call CopyMoveDataAndDamage_FromDeckIndex - ld a, MOVE_FLAG2_ADDRESS | HEAL_USER_F - call CheckLoadedMoveFlag + ld e, SECOND_ATTACK + call CopyAttackDataAndDamage_FromDeckIndex + ld a, ATTACK_FLAG2_ADDRESS | HEAL_USER_F + call CheckLoadedAttackFlag jr c, .keep_second_attack - ld a, MOVE_FLAG2_ADDRESS | NULLIFY_OR_WEAKEN_ATTACK_F - call CheckLoadedMoveFlag + ld a, ATTACK_FLAG2_ADDRESS | NULLIFY_OR_WEAKEN_ATTACK_F + call CheckLoadedAttackFlag jr c, .keep_second_attack ; switch to first attack xor a @@ -6220,8 +6220,8 @@ LookForCardThatIsKnockedOutOnDevolution: ; 17080 (5:7080) ; - arena card HP >= half max HP ; - arena card Unknown2's 4 bit is not set or ; is set but there's no evolution of card in hand/deck -; - arena card can use second move -CheckIfArenaCardIsAtHalfHPCanEvolveAndUseSecondMove: ; 170c9 (5:70c9) +; - arena card can use second attack +CheckIfArenaCardIsAtHalfHPCanEvolveAndUseSecondAttack: ; 170c9 (5:70c9) ld a, DUELVARS_ARENA_CARD call GetTurnDuelistVariable ld d, a @@ -6246,10 +6246,10 @@ CheckIfArenaCardIsAtHalfHPCanEvolveAndUseSecondMove: ; 170c9 (5:70c9) .check_second_attack xor a ; active card ldh [hTempPlayAreaLocation_ff9d], a - ld a, $01 ; second move + ld a, SECOND_ATTACK ld [wSelectedAttack], a push hl - call CheckIfSelectedMoveIsUnusable + call CheckIfSelectedAttackIsUnusable pop hl jr c, .no_carry scf @@ -6263,7 +6263,7 @@ CheckIfArenaCardIsAtHalfHPCanEvolveAndUseSecondMove: ; 170c9 (5:70c9) ; - card HP > half max HP ; - card Unknown2's 4 bit is not set or ; is set but there's no evolution of card in hand/deck -; - card can use second move +; - card can use second attack ; Outputs the number of Pokémon in bench ; that meet these requirements in a ; and returns carry if at least one is found @@ -6320,11 +6320,11 @@ CountNumberOfSetUpBenchPokemon: ; 17101 (5:7101) .check_second_attack ld a, c ldh [hTempPlayAreaLocation_ff9d], a - ld a, $01 ; second move + ld a, SECOND_ATTACK ld [wSelectedAttack], a push bc push hl - call CheckIfSelectedMoveIsUnusable + call CheckIfSelectedAttackIsUnusable pop hl pop bc jr c, .next @@ -6416,7 +6416,7 @@ AISelectSpecialAttackParameters: ; 17161 (5:7161) ; find any energy card different from ; the one found by CheckIfAnyCardIDinLocation. -; since using this move requires a Psychic energy card, +; since using this attack requires a Psychic energy card, ; and another one is in hTemp_ffa0, ; then any other energy card would account ; for the Energy Cost of Psyburn. @@ -6477,26 +6477,26 @@ AISelectSpecialAttackParameters: ; 17161 (5:7161) ; return carry if Pokémon at play area location ; in hTempPlayAreaLocation_ff9d does not have -; energy required for the move index in wSelectedAttack +; energy required for the attack index in wSelectedAttack ; or has exactly the same amount of energy needed ; input: ; [hTempPlayAreaLocation_ff9d] = play area location -; [wSelectedAttack] = move index to check +; [wSelectedAttack] = attack index to check ; output: ; a = number of extra energy cards attached -CheckIfNoSurplusEnergyForMove: ; 171fb (5:71fb) +CheckIfNoSurplusEnergyForAttack: ; 171fb (5:71fb) ldh a, [hTempPlayAreaLocation_ff9d] add DUELVARS_ARENA_CARD call GetTurnDuelistVariable ld d, a ld a, [wSelectedAttack] ld e, a - call CopyMoveDataAndDamage_FromDeckIndex - ld hl, wLoadedMoveName + call CopyAttackDataAndDamage_FromDeckIndex + ld hl, wLoadedAttackName ld a, [hli] or [hl] jr z, .not_attack - ld a, [wLoadedMoveCategory] + ld a, [wLoadedAttackCategory] cp POKEMON_POWER jr nz, .is_attack .not_attack @@ -6509,11 +6509,11 @@ CheckIfNoSurplusEnergyForMove: ; 171fb (5:71fb) call GetPlayAreaCardAttachedEnergies bank1call HandleEnergyBurn xor a - ld [wTempLoadedMoveEnergyCost], a - ld [wTempLoadedMoveEnergyNeededAmount], a - ld [wTempLoadedMoveEnergyNeededType], a + ld [wTempLoadedAttackEnergyCost], a + ld [wTempLoadedAttackEnergyNeededAmount], a + ld [wTempLoadedAttackEnergyNeededType], a ld hl, wAttachedEnergies - ld de, wLoadedMoveEnergyCost + ld de, wLoadedAttackEnergyCost ld b, 0 ld c, (NUM_TYPES / 2) - 1 .loop @@ -6532,7 +6532,7 @@ CheckIfNoSurplusEnergyForMove: ; 171fb (5:71fb) swap a and %00001111 ld b, a - ld hl, wTempLoadedMoveEnergyCost + ld hl, wTempLoadedAttackEnergyCost ld a, [wTotalAttachedEnergies] sub [hl] sub b @@ -6545,14 +6545,14 @@ CheckIfNoSurplusEnergyForMove: ; 171fb (5:71fb) scf ret -; takes as input the energy cost of a move for a +; takes as input the energy cost of an attack for a ; particular energy, stored in the lower nibble of a -; if the move costs some amount of this energy, the lower nibble of a != 0, -; and this amount is stored in wTempLoadedMoveEnergyCost +; if the attack costs some amount of this energy, the lower nibble of a != 0, +; and this amount is stored in wTempLoadedAttackEnergyCost ; also adds the amount of energy still needed -; to wTempLoadedMoveEnergyNeededAmount +; to wTempLoadedAttackEnergyNeededAmount ; input: -; a = this energy cost of move (lower nibble) +; a = this energy cost of attack (lower nibble) ; [hl] = attached energy ; output: ; carry set if not enough of this energy type attached @@ -6565,17 +6565,17 @@ CalculateParticularAttachedEnergyNeeded: ; 17258 (5:7258) ret .check - ld [wTempLoadedMoveEnergyCost], a + ld [wTempLoadedAttackEnergyCost], a sub [hl] jr z, .done jr nc, .done push bc - ld a, [wTempLoadedMoveEnergyCost] + ld a, [wTempLoadedAttackEnergyCost] ld b, a ld a, [hl] sub b pop bc - ld [wTempLoadedMoveEnergyNeededAmount], a + ld [wTempLoadedAttackEnergyNeededAmount], a jr .done ; return carry if there is a card that @@ -6799,14 +6799,14 @@ SetUpBossStartingHandAndDeck: ; 172af (5:72af) ret ; returns carry if Pokemon at PLAY_AREA* in a -; can damage defending Pokémon with any of its moves +; can damage defending Pokémon with any of its attacks ; input: ; a = location of card to check CheckIfCanDamageDefendingPokemon: ; 17383 (5:7383) ldh [hTempPlayAreaLocation_ff9d], a - xor a ; first move + xor a ; first attack ld [wSelectedAttack], a - call CheckIfSelectedMoveIsUnusable + call CheckIfSelectedAttackIsUnusable jr c, .second_attack xor a call EstimateDamage_VersusDefendingCard @@ -6815,9 +6815,9 @@ CheckIfCanDamageDefendingPokemon: ; 17383 (5:7383) jr nz, .set_carry .second_attack - ld a, $01 ; second move + ld a, SECOND_ATTACK ld [wSelectedAttack], a - call CheckIfSelectedMoveIsUnusable + call CheckIfSelectedAttackIsUnusable jr c, .no_carry ld a, $01 call EstimateDamage_VersusDefendingCard @@ -6833,27 +6833,27 @@ CheckIfCanDamageDefendingPokemon: ; 17383 (5:7383) ret ; checks if defending Pokémon can knock out -; card at hTempPlayAreaLocation_ff9d with any of its moves +; card at hTempPlayAreaLocation_ff9d with any of its attacks ; and if so, stores the damage to wce00 and wce01 -; sets carry if any on the moves knocks out +; sets carry if any on the attacks knocks out ; also outputs the largest damage dealt in a ; input: ; [hTempPlayAreaLocation_ff9d] = location of card to check ; output: -; a = largest damage of both moves +; a = largest damage of both attacks ; carry set if can knock out CheckIfDefendingPokemonCanKnockOut: ; 173b1 (5:73b1) - xor a ; first move + xor a ; first attack ld [wce00], a ld [wce01], a - call CheckIfDefendingPokemonCanKnockOutWithMove + call CheckIfDefendingPokemonCanKnockOutWithAttack jr nc, .second_attack ld a, [wDamage] ld [wce00], a .second_attack - ld a, $01 ; second move - call CheckIfDefendingPokemonCanKnockOutWithMove + ld a, SECOND_ATTACK + call CheckIfDefendingPokemonCanKnockOutWithAttack jr nc, .return_if_neither_kos ld a, [wDamage] ld [wce01], a @@ -6878,23 +6878,23 @@ CheckIfDefendingPokemonCanKnockOut: ; 173b1 (5:73b1) ; return carry if defending Pokémon can knock out ; card at hTempPlayAreaLocation_ff9d ; input: -; a = move index +; a = attack index ; [hTempPlayAreaLocation_ff9d] = location of card to check -CheckIfDefendingPokemonCanKnockOutWithMove: ; 173e4 (5:73e4) +CheckIfDefendingPokemonCanKnockOutWithAttack: ; 173e4 (5:73e4) ld [wSelectedAttack], a ldh a, [hTempPlayAreaLocation_ff9d] push af xor a ldh [hTempPlayAreaLocation_ff9d], a call SwapTurn - call CheckIfSelectedMoveIsUnusable + call CheckIfSelectedAttackIsUnusable call SwapTurn pop bc ld a, b ldh [hTempPlayAreaLocation_ff9d], a jr c, .done -; player's active Pokémon can use move +; player's active Pokémon can use attack ld a, [wSelectedAttack] call EstimateDamage_FromDefendingPokemon ldh a, [hTempPlayAreaLocation_ff9d] @@ -7000,12 +7000,12 @@ AIChooseRandomlyNotToDoAction: ; 1743b (5:743b) ; checks if any bench Pokémon has same ID ; as input, and sets carry if it has more than -; half health and can use its second move +; half health and can use its second attack ; input: ; a = card ID to check for ; output: ; carry set if the above requirements are met -CheckForBenchIDAtHalfHPAndCanUseSecondMove: ; 17474 (5:7474) +CheckForBenchIDAtHalfHPAndCanUseSecondAttack: ; 17474 (5:7474) ld [wcdf9], a ldh a, [hTempPlayAreaLocation_ff9d] ld d, a @@ -7046,10 +7046,10 @@ CheckForBenchIDAtHalfHPAndCanUseSecondMove: ; 17474 (5:7474) ld a, c ldh [hTempPlayAreaLocation_ff9d], a - ld a, $01 ; second move + ld a, SECOND_ATTACK ld [wSelectedAttack], a push bc - call CheckIfSelectedMoveIsUnusable + call CheckIfSelectedAttackIsUnusable pop bc jr c, .loop inc b diff --git a/src/engine/bank06.asm b/src/engine/bank06.asm index 5c8fbda..fb5b6b6 100644 --- a/src/engine/bank06.asm +++ b/src/engine/bank06.asm @@ -1052,9 +1052,9 @@ Func_18661: ; 18661 (6:4661) INCLUDE "data/effect_commands.asm" ; reads the animation commands from PointerTable_AttackAnimation -; of attack in wLoadedMoveAnimation and plays them +; of attack in wLoadedAttackAnimation and plays them PlayAttackAnimationCommands: ; 18f9c (6:4f9c) - ld a, [wLoadedMoveAnimation] + ld a, [wLoadedAttackAnimation] or a ret z @@ -1333,7 +1333,7 @@ PrintDamageText: ; 19132 (6:5132) push hl push bc push de - ld a, [wLoadedMoveAnimation] + ld a, [wLoadedAttackAnimation] cp ATK_ANIM_HEAL jr z, .skip cp ATK_ANIM_HEALING_WIND_PLAY_AREA diff --git a/src/engine/bank08.asm b/src/engine/bank08.asm index cfcc178..22c5199 100644 --- a/src/engine/bank08.asm +++ b/src/engine/bank08.asm @@ -216,7 +216,7 @@ AIPlay_Potion: ; 201b5 (8:41b5) ; check if defending Pokémon can KO active card ; next turn after using Potion. ; if it cannot, return carry. -; also take into account whether move is high recoil. +; also take into account whether attack is high recoil. AIDecide_Potion1: ; 201d1 (8:41d1) farcall AIDecideWhetherToRetreat jr c, .no_carry @@ -360,18 +360,18 @@ AIDecide_Potion2: ; 20204 (8:4204) push de xor a ; FIRST_ATTACK_OR_PKMN_POWER ld [wSelectedAttack], a - farcall CheckIfSelectedMoveIsUnusable + farcall CheckIfSelectedAttackIsUnusable jr c, .second_attack - ld a, MOVE_FLAG3_ADDRESS | BOOST_IF_TAKEN_DAMAGE_F - call CheckLoadedMoveFlag + ld a, ATTACK_FLAG3_ADDRESS | BOOST_IF_TAKEN_DAMAGE_F + call CheckLoadedAttackFlag jr c, .set_carry .second_attack ld a, SECOND_ATTACK ld [wSelectedAttack], a - farcall CheckIfSelectedMoveIsUnusable + farcall CheckIfSelectedAttackIsUnusable jr c, .false - ld a, MOVE_FLAG3_ADDRESS | BOOST_IF_TAKEN_DAMAGE_F - call CheckLoadedMoveFlag + ld a, ATTACK_FLAG3_ADDRESS | BOOST_IF_TAKEN_DAMAGE_F + call CheckLoadedAttackFlag jr c, .set_carry .false pop de @@ -406,7 +406,7 @@ AIPlay_SuperPotion: ; 202a8 (8:42a8) ; any energy cards attached, check if defending Pokémon can KO ; active card next turn after using Super Potion. ; if it cannot, return carry. -; also take into account whether move is high recoil. +; also take into account whether attack is high recoil. AIDecide_SuperPotion1: ; 202cc (8:42cc) farcall AIDecideWhetherToRetreat jr c, .no_carry @@ -576,18 +576,18 @@ AIDecide_SuperPotion2: ; 2030f (8:430f) push de xor a ; FIRST_ATTACK_OR_PKMN_POWER ld [wSelectedAttack], a - farcall CheckIfSelectedMoveIsUnusable + farcall CheckIfSelectedAttackIsUnusable jr c, .second_attack_1 - ld a, MOVE_FLAG3_ADDRESS | BOOST_IF_TAKEN_DAMAGE_F - call CheckLoadedMoveFlag + ld a, ATTACK_FLAG3_ADDRESS | BOOST_IF_TAKEN_DAMAGE_F + call CheckLoadedAttackFlag jr c, .true_1 .second_attack_1 ld a, SECOND_ATTACK ld [wSelectedAttack], a - farcall CheckIfSelectedMoveIsUnusable + farcall CheckIfSelectedAttackIsUnusable jr c, .false_1 - ld a, MOVE_FLAG3_ADDRESS | BOOST_IF_TAKEN_DAMAGE_F - call CheckLoadedMoveFlag + ld a, ATTACK_FLAG3_ADDRESS | BOOST_IF_TAKEN_DAMAGE_F + call CheckLoadedAttackFlag jr c, .true_1 .false_1 pop de @@ -647,21 +647,21 @@ AIPlay_Defender: ; 203f8 (8:43f8) AIDecide_Defender1: ; 20406 (8:4406) xor a ; PLAY_AREA_ARENA ldh [hTempPlayAreaLocation_ff9d], a - farcall CheckIfAnyMoveKnocksOutDefendingCard + farcall CheckIfAnyAttackKnocksOutDefendingCard jr nc, .cannot_ko - farcall CheckIfSelectedMoveIsUnusable + farcall CheckIfSelectedAttackIsUnusable jr nc, .no_carry - farcall LookForEnergyNeededForMoveInHand + farcall LookForEnergyNeededForAttackInHand jr c, .no_carry .cannot_ko ; check if any of the defending Pokémon's attacks deal ; damage exactly equal to current HP, and if so, -; only continue if that move is useable. +; only continue if that attack is useable. farcall CheckIfAnyDefendingPokemonAttackDealsSameDamageAsHP jr nc, .no_carry call SwapTurn - farcall CheckIfSelectedMoveIsUnusable + farcall CheckIfSelectedAttackIsUnusable call SwapTurn jr c, .no_carry @@ -680,13 +680,13 @@ AIDecide_Defender1: ; 20406 (8:4406) ld [wSelectedAttack], a push de call SwapTurn - farcall CheckIfSelectedMoveIsUnusable + farcall CheckIfSelectedAttackIsUnusable call SwapTurn pop de jr c, .switch_back ; the other attack is useable. -; compare its damage to the selected move. +; compare its damage to the selected attack. ld a, [wSelectedAttack] push de farcall EstimateDamage_FromDefendingPokemon @@ -695,8 +695,8 @@ AIDecide_Defender1: ; 20406 (8:4406) cp d jr nc, .subtract -; in case the non-selected move is useable -; and deals less damage than the selected move, +; in case the non-selected attack is useable +; and deals less damage than the selected attack, ; switch back to the other attack. .switch_back ld a, [wSelectedAttack] @@ -729,11 +729,11 @@ AIDecide_Defender1: ; 20406 (8:4406) ; return carry if using Defender prevents Pokémon ; from being knocked out by an attack with recoil. AIDecide_Defender2: ; 20486 (8:4486) - ld a, MOVE_FLAG1_ADDRESS | HIGH_RECOIL_F - call CheckLoadedMoveFlag + ld a, ATTACK_FLAG1_ADDRESS | HIGH_RECOIL_F + call CheckLoadedAttackFlag jr c, .recoil - ld a, MOVE_FLAG1_ADDRESS | LOW_RECOIL_F - call CheckLoadedMoveFlag + ld a, ATTACK_FLAG1_ADDRESS | LOW_RECOIL_F + call CheckLoadedAttackFlag jr c, .recoil or a ret @@ -746,10 +746,10 @@ AIDecide_Defender2: ; 20486 (8:4486) or a jr nz, .second_attack ; first attack - ld a, [wLoadedCard2Move1EffectParam] + ld a, [wLoadedCard2Atk1EffectParam] jr .check_weak .second_attack - ld a, [wLoadedCard2Move2EffectParam] + ld a, [wLoadedCard2Atk2EffectParam] ; double recoil damage if card is weak to its own color. .check_weak @@ -826,11 +826,11 @@ AIDecide_Pluspower1: ; 20501 (8:4501) ; if there's an attack that can, only continue ; if it's unusable and there's no card in hand ; to fulfill its energy cost. - farcall CheckIfAnyMoveKnocksOutDefendingCard + farcall CheckIfAnyAttackKnocksOutDefendingCard jr nc, .cannot_ko - farcall CheckIfSelectedMoveIsUnusable + farcall CheckIfSelectedAttackIsUnusable jr nc, .no_carry - farcall LookForEnergyNeededForMoveInHand + farcall LookForEnergyNeededForAttackInHand jr c, .no_carry ; cannot use an attack that knocks out. @@ -886,10 +886,10 @@ AIDecide_Pluspower1: ; 20501 (8:4501) scf ret -; return carry if move is useable and KOs +; return carry if attack is useable and KOs ; defending Pokémon with Pluspower boost. .check_ko_with_pluspower ; 20562 (8:4562) - farcall CheckIfSelectedMoveIsUnusable + farcall CheckIfSelectedAttackIsUnusable jr c, .unusable ld a, [wSelectedAttack] farcall EstimateDamage_VersusDefendingCard @@ -933,7 +933,7 @@ AIDecide_Pluspower1: ; 20501 (8:4501) ret ; returns carry 7/10 of the time -; if selected move is useable, can't KO without Pluspower boost +; if selected attack is useable, can't KO without Pluspower boost ; can damage Mr. Mime even with Pluspower boost ; and has a minimum damage > 0. ; outputs in a the attack to use. @@ -971,9 +971,9 @@ AIDecide_Pluspower2: ; 205a5 (8:45a5) scf ret -; return carry if move is useable but cannot KO. +; return carry if attack is useable but cannot KO. .check_can_ko ; 205d7 (8:45d7) - farcall CheckIfSelectedMoveIsUnusable + farcall CheckIfSelectedAttackIsUnusable jr c, .unusable ld a, [wSelectedAttack] farcall EstimateDamage_VersusDefendingCard @@ -992,9 +992,9 @@ AIDecide_Pluspower2: ; 205a5 (8:45a5) ret ; return carry 7/10 of the time if -; move is useable and minimum damage > 0. +; attack is useable and minimum damage > 0. .check_random ; 205f6 (8:45f6) - farcall CheckIfSelectedMoveIsUnusable + farcall CheckIfSelectedAttackIsUnusable jr c, .unusable ld a, [wSelectedAttack] farcall EstimateDamage_VersusDefendingCard @@ -1094,16 +1094,16 @@ AIDecide_GustOfWind: ; 2067e (8:467e) and AI_FLAG_USED_GUST_OF_WIND ret nz - farcall CheckIfActivePokemonCanUseAnyNonResidualMove - ret nc ; no non-residual move can be used + farcall CheckIfActivePokemonCanUseAnyNonResidualAttack + ret nc ; no non-residual attack can be used xor a ; PLAY_AREA_ARENA ldh [hTempPlayAreaLocation_ff9d], a - farcall CheckIfAnyMoveKnocksOutDefendingCard + farcall CheckIfAnyAttackKnocksOutDefendingCard jr nc, .check_id ; if can't KO - farcall CheckIfSelectedMoveIsUnusable - jr nc, .no_carry ; if KO move is useable - farcall LookForEnergyNeededForMoveInHand + farcall CheckIfSelectedAttackIsUnusable + jr nc, .no_carry ; if KO attack is useable + farcall LookForEnergyNeededForAttackInHand jr c, .no_carry ; if energy card is in hand .check_id @@ -1275,10 +1275,10 @@ AIDecide_GustOfWind: ; 2067e (8:467e) ld a, DUELVARS_ARENA_CARD call GetTurnDuelistVariable ld d, a - call CopyMoveDataAndDamage_FromDeckIndex - ld a, [wLoadedMoveCategory] + call CopyAttackDataAndDamage_FromDeckIndex + ld a, [wLoadedAttackCategory] - ; skip if move is a Power or has 0 damage + ; skip if attack is a Power or has 0 damage cp POKEMON_POWER jr z, .no_damage ld a, [wDamage] @@ -1330,9 +1330,9 @@ AIDecide_GustOfWind: ; 2067e (8:467e) ldh [hTempPlayAreaLocation_ff9d], a call .CheckIfAnyAttackKnocksOut jr nc, .next - farcall CheckIfSelectedMoveIsUnusable + farcall CheckIfSelectedAttackIsUnusable jr nc, .found - farcall LookForEnergyNeededForMoveInHand + farcall LookForEnergyNeededForAttackInHand jr c, .found ; the following two local routines can be condensed into one @@ -1488,11 +1488,11 @@ AIDecide_EnergyRemoval: ; 20895 (8:4895) ; active card to remove its attached energy xor a ; PLAY_AREA_ARENA ldh [hTempPlayAreaLocation_ff9d], a - farcall CheckIfAnyMoveKnocksOutDefendingCard + farcall CheckIfAnyAttackKnocksOutDefendingCard jr nc, .cannot_ko - farcall CheckIfSelectedMoveIsUnusable + farcall CheckIfSelectedAttackIsUnusable jr nc, .can_ko - farcall LookForEnergyNeededForMoveInHand + farcall LookForEnergyNeededForAttackInHand jr nc, .cannot_ko .can_ko @@ -1627,7 +1627,7 @@ AIDecide_EnergyRemoval: ; 20895 (8:4895) ; but second attack has enough energy to be used ; check if there's surplus energy for attack and, if so, return carry .check_surplus - farcall CheckIfNoSurplusEnergyForMove + farcall CheckIfNoSurplusEnergyForAttack pop de ccf ret @@ -1755,11 +1755,11 @@ AIDecide_SuperEnergyRemoval: ; 209bc (8:49bc) ; active card to remove its attached energy xor a ; PLAY_AREA_ARENA ldh [hTempPlayAreaLocation_ff9d], a - farcall CheckIfAnyMoveKnocksOutDefendingCard + farcall CheckIfAnyAttackKnocksOutDefendingCard jr nc, .cannot_ko - farcall CheckIfSelectedMoveIsUnusable + farcall CheckIfSelectedAttackIsUnusable jr nc, .can_ko - farcall LookForEnergyNeededForMoveInHand + farcall LookForEnergyNeededForAttackInHand jr nc, .cannot_ko .can_ko @@ -1911,7 +1911,7 @@ AIDecide_SuperEnergyRemoval: ; 209bc (8:49bc) ; check if there's surplus energy for attack and, if so, ; return carry if this surplus energy is at least 2 .check_surplus - farcall CheckIfNoSurplusEnergyForMove + farcall CheckIfNoSurplusEnergyForAttack cp 2 jr c, .enough_energy pop de @@ -3144,11 +3144,11 @@ AIDecide_PokemonCenter: ; 210eb (8:50eb) ldh [hTempPlayAreaLocation_ff9d], a ; return if active Pokemon can KO player's card. - farcall CheckIfAnyMoveKnocksOutDefendingCard + farcall CheckIfAnyAttackKnocksOutDefendingCard jr nc, .start - farcall CheckIfSelectedMoveIsUnusable + farcall CheckIfSelectedAttackIsUnusable jr nc, .no_carry - farcall LookForEnergyNeededForMoveInHand + farcall LookForEnergyNeededForAttackInHand jr c, .no_carry .start @@ -4018,11 +4018,11 @@ AIDecide_ScoopUp: ; 21506 (8:5506) ; if it can KO the defending Pokemon this turn, ; return no carry. - farcall CheckIfAnyMoveKnocksOutDefendingCard + farcall CheckIfAnyAttackKnocksOutDefendingCard jr nc, .cannot_ko - farcall CheckIfSelectedMoveIsUnusable + farcall CheckIfSelectedAttackIsUnusable jr nc, .no_carry - farcall LookForEnergyNeededForMoveInHand + farcall LookForEnergyNeededForAttackInHand jr c, .no_carry .cannot_ko @@ -4120,11 +4120,11 @@ AIDecide_ScoopUp: ; 21506 (8:5506) ; if it can KO the defending Pokemon this turn, ; return no carry. - farcall CheckIfAnyMoveKnocksOutDefendingCard + farcall CheckIfAnyAttackKnocksOutDefendingCard jr nc, .check_ko - farcall CheckIfSelectedMoveIsUnusable + farcall CheckIfSelectedAttackIsUnusable jr nc, .no_carry - farcall LookForEnergyNeededForMoveInHand + farcall LookForEnergyNeededForAttackInHand jr c, .no_carry .check_ko farcall CheckIfDefendingPokemonCanKnockOut @@ -6504,7 +6504,7 @@ AIEnergyTransTransferEnergyToBench: ; 222ca (8:62ca) ldh [hTempCardIndex_ff9f], a ld d, a ld e, FIRST_ATTACK_OR_PKMN_POWER - call CopyMoveDataAndDamage_FromDeckIndex + call CopyAttackDataAndDamage_FromDeckIndex ld a, OPPACTION_6B15 bank1call AIMakeDecision jr .loop_energy @@ -6560,8 +6560,8 @@ HandleAIPkmnPowers: ; 2237f (8:637f) ld a, c ldh [hTempPlayAreaLocation_ff9d], a ld e, FIRST_ATTACK_OR_PKMN_POWER - call CopyMoveDataAndDamage_FromDeckIndex - ld a, [wLoadedMoveCategory] + call CopyAttackDataAndDamage_FromDeckIndex + ld a, [wLoadedAttackCategory] cp POKEMON_POWER jr z, .execute_effect pop bc @@ -8303,7 +8303,7 @@ FindDuplicatePokemonCards: ; 22b6f (8:6b6f) or a ret -; return carry flag if move is not high recoil. +; return carry flag if attack is not high recoil. Func_22bad: ; 22bad (8:6bad) farcall AIProcessButDontUseAttack ret nc @@ -8312,9 +8312,9 @@ Func_22bad: ; 22bad (8:6bad) ld a, DUELVARS_ARENA_CARD call GetTurnDuelistVariable ld d, a - call CopyMoveDataAndDamage_FromDeckIndex - ld a, MOVE_FLAG1_ADDRESS | HIGH_RECOIL_F - call CheckLoadedMoveFlag + call CopyAttackDataAndDamage_FromDeckIndex + ld a, ATTACK_FLAG1_ADDRESS | HIGH_RECOIL_F + call CheckLoadedAttackFlag ccf ret diff --git a/src/engine/deck_ai/decks/legendary_articuno.asm b/src/engine/deck_ai/decks/legendary_articuno.asm index 562e7c5..6b3b9f8 100644 --- a/src/engine/deck_ai/decks/legendary_articuno.asm +++ b/src/engine/deck_ai/decks/legendary_articuno.asm @@ -91,18 +91,18 @@ ScoreLegendaryArticunoCards: ; 14c91 (5:4c91) ; player prizes >= 3 ; if Lapras has more than half HP and -; can use second move, check next for Articuno +; can use second attack, check next for Articuno ; otherwise, check if Articuno or Dewgong -; have more than half HP and can use second move +; have more than half HP and can use second attack ; and if so, the next Pokémon to check is Lapras ld a, LAPRAS - call CheckForBenchIDAtHalfHPAndCanUseSecondMove + call CheckForBenchIDAtHalfHPAndCanUseSecondAttack jr c, .articuno ld a, ARTICUNO1 - call CheckForBenchIDAtHalfHPAndCanUseSecondMove + call CheckForBenchIDAtHalfHPAndCanUseSecondAttack jr c, .lapras ld a, DEWGONG - call CheckForBenchIDAtHalfHPAndCanUseSecondMove + call CheckForBenchIDAtHalfHPAndCanUseSecondAttack jr c, .lapras jr .articuno diff --git a/src/engine/deck_ai/decks/sams_practice.asm b/src/engine/deck_ai/decks/sams_practice.asm index 10ce811..b92253d 100644 --- a/src/engine/deck_ai/decks/sams_practice.asm +++ b/src/engine/deck_ai/decks/sams_practice.asm @@ -104,7 +104,7 @@ AIPerformScriptedTurn: ; 1483a (5:483a) xor a ldh [hTempPlayAreaLocation_ff9d], a ld [wSelectedAttack], a - call CheckIfSelectedMoveIsUnusable + call CheckIfSelectedAttackIsUnusable jr c, .unusable call AITryUseAttack ret diff --git a/src/engine/effect_functions.asm b/src/engine/effect_functions.asm index 45e71a2..daaf402 100644 --- a/src/engine/effect_functions.asm +++ b/src/engine/effect_functions.asm @@ -241,14 +241,14 @@ DealDamageToAllBenchedPokemon: ; 2c117 (b:4117) ret Func_2c12e: ; 2c12e (b:412e) - ld [wLoadedMoveAnimation], a + ld [wLoadedAttackAnimation], a ldh a, [hTempPlayAreaLocation_ff9d] ld b, a ld c, $0 ; neither WEAKNESS nor RESISTANCE ldh a, [hWhoseTurn] ld h, a - bank1call PlayMoveAnimation - bank1call WaitMoveAnimation + bank1call PlayAttackAnimation + bank1call WaitAttackAnimation ret ; apply a status condition of type 1 identified by register a to the target @@ -478,9 +478,9 @@ ApplyAndAnimateHPRecovery: ; 2c221 (b:4221) ; load correct animation push de ld a, ATK_ANIM_HEAL - ld [wLoadedMoveAnimation], a + ld [wLoadedAttackAnimation], a ld bc, $01 ; arrow - bank1call PlayMoveAnimation + bank1call PlayAttackAnimation ; compare HP to be restored with max HP ; if HP to be restored would cause HP to @@ -506,7 +506,7 @@ ApplyAndAnimateHPRecovery: ; 2c221 (b:4221) .skip_cap ld [hl], e ; apply new HP to arena card - bank1call WaitMoveAnimation + bank1call WaitAttackAnimation ret ; 0x2c25b @@ -818,7 +818,7 @@ HandleDefendingPokemonAttackSelection: ; 2c391 (b:4391) ldh [hCurSelectionItem], a .start - bank1call PrintAndLoadMovesToDuelTempList + bank1call PrintAndLoadAttacksToDuelTempList push af ldh a, [hCurSelectionItem] ld hl, .menu_parameters @@ -833,13 +833,13 @@ HandleDefendingPokemonAttackSelection: ; 2c391 (b:4391) bit B_BUTTON_F, a jr nz, .set_carry and START - jr nz, .open_move_page + jr nz, .open_atk_page call HandleMenuInput jr nc, .loop_input cp -1 jr z, .loop_input -; a move was selected +; an attack was selected ldh a, [hCurMenuItem] add a ld e, a @@ -858,13 +858,13 @@ HandleDefendingPokemonAttackSelection: ; 2c391 (b:4391) scf ret -.open_move_page +.open_atk_page ldh a, [hCurMenuItem] ldh [hCurSelectionItem], a ld a, DUELVARS_ARENA_CARD call GetTurnDuelistVariable call LoadCardDataToBuffer1_FromDeckIndex - bank1call OpenMovePage + bank1call OpenAttackPage call SwapTurn bank1call DrawDuelMainScene call SwapTurn @@ -887,11 +887,11 @@ HandleDefendingPokemonAttackSelection: ; 2c391 (b:4391) GetAttackName: ; 2c3fc (b:43fc) ld a, d call LoadCardDataToBuffer1_FromDeckIndex - ld hl, wLoadedCard1Move1Name + ld hl, wLoadedCard1Atk1Name inc e dec e jr z, .load_name - ld hl, wLoadedCard1Move2Name + ld hl, wLoadedCard1Atk2Name .load_name ld a, [hli] ld h, [hl] @@ -906,10 +906,10 @@ CheckIfDefendingPokemonHasAnyAttack: ; 2c40e (b:440e) ld a, DUELVARS_ARENA_CARD call GetTurnDuelistVariable call LoadCardDataToBuffer2_FromDeckIndex - ld a, [wLoadedCard2Move1Category] + ld a, [wLoadedCard2Atk1Category] cp POKEMON_POWER jr nz, .has_attack - ld hl, wLoadedCard2Move2Name + ld hl, wLoadedCard2Atk2Name ld a, [hli] or [hl] jr nz, .has_attack @@ -1021,12 +1021,12 @@ DuelistSelectForcedSwitch: ; 2c487 (b:4487) bank1call AIDoAction_ForcedSwitch call SwapTurn - ld a, [wPlayerAttackingMoveIndex] + ld a, [wPlayerAttackingAttackIndex] ld e, a ld a, [wPlayerAttackingCardIndex] ld d, a ld a, [wPlayerAttackingCardID] - call CopyMoveDataAndDamage_FromCardID + call CopyAttackDataAndDamage_FromCardID call Func_16f6 ret @@ -1142,18 +1142,18 @@ AIPickAttackForAmnesia: ; 2c532 (b:4532) ld d, a call LoadCardDataToBuffer2_FromDeckIndex ; if has no attack 1 name, return - ld hl, wLoadedCard2Move1Name + ld hl, wLoadedCard2Atk1Name ld a, [hli] or [hl] jr z, .chosen ; if Defending Pokemon has enough energy for second attack, choose it ld e, SECOND_ATTACK - bank1call _CheckIfEnoughEnergiesToMove + bank1call _CheckIfEnoughEnergiesToAttack jr nc, .chosen ; otherwise if first attack isn't a Pkmn Power, choose it instead. ld e, FIRST_ATTACK_OR_PKMN_POWER - ld a, [wLoadedCard2Move1Category] + ld a, [wLoadedCard2Atk1Category] cp POKEMON_POWER jr nz, .chosen ; if it is a Pkmn Power, choose second attack. @@ -1467,7 +1467,7 @@ SpitPoison_Poison50PercentEffect: ; 2c6f8 (b:46f8) call TossCoin_BankB jp c, PoisonEffect ld a, ATK_ANIM_SPIT_POISON_SUCCESS - ld [wLoadedMoveAnimation], a + ld [wLoadedAttackAnimation], a call SetNoEffectFromStatus ret @@ -1591,7 +1591,7 @@ KakunaStiffenEffect: ; 2c7a0 (b:47a0) call TossCoin_BankB jp nc, SetWasUnsuccessful ld a, ATK_ANIM_PROTECT - ld [wLoadedMoveAnimation], a + ld [wLoadedAttackAnimation], a ld a, SUBSTATUS1_NO_DAMAGE_STIFFEN call ApplySubstatus1ToDefendingCard ret @@ -1700,7 +1700,7 @@ MetapodStiffenEffect: ; 2c836 (b:4836) call TossCoin_BankB jp nc, SetWasUnsuccessful ld a, ATK_ANIM_PROTECT - ld [wLoadedMoveAnimation], a + ld [wLoadedAttackAnimation], a ld a, SUBSTATUS1_NO_DAMAGE_STIFFEN call ApplySubstatus1ToDefendingCard ret @@ -2111,7 +2111,7 @@ HornHazard_NoDamage50PercentEffect: ; 2ca96 (b:4a96) ret .heads ld a, ATK_ANIM_HIT - ld [wLoadedMoveAnimation], a + ld [wLoadedAttackAnimation], a ret ; 0x2caac @@ -2798,15 +2798,15 @@ SolarPower_CheckUse: ; 2ce53 (b:4e53) SolarPower_RemoveStatusEffect: ; 2ce82 (b:4e82) ld a, ATK_ANIM_HEAL_BOTH_SIDES - ld [wLoadedMoveAnimation], a + ld [wLoadedAttackAnimation], a bank1call Func_7415 ldh a, [hTempPlayAreaLocation_ff9d] ld b, a ld c, $00 ldh a, [hWhoseTurn] ld h, a - bank1call PlayMoveAnimation - bank1call WaitMoveAnimation + bank1call PlayAttackAnimation + bank1call WaitAttackAnimation ldh a, [hTemp_ffa0] add DUELVARS_ARENA_CARD_FLAGS @@ -2941,7 +2941,7 @@ WartortleWithdrawEffect: ; 2cf32 (b:4f32) call TossCoin_BankB jp nc, SetWasUnsuccessful ld a, ATK_ANIM_PROTECT - ld [wLoadedMoveAnimation], a + ld [wLoadedAttackAnimation], a ld a, SUBSTATUS1_NO_DAMAGE_10 call ApplySubstatus1ToDefendingCard ret @@ -3181,7 +3181,7 @@ SeadraAgilityEffect: ; 2d08b (b:508b) call TossCoin_BankB ret nc ; return if tails ld a, ATK_ANIM_AGILITY_PROTECT - ld [wLoadedMoveAnimation], a + ld [wLoadedAttackAnimation], a ld a, SUBSTATUS1_AGILITY call ApplySubstatus1ToDefendingCard ret @@ -3198,7 +3198,7 @@ HideInShellEffect: ; 2d0a4 (b:50a4) call TossCoin_BankB jp nc, SetWasUnsuccessful ld a, ATK_ANIM_PROTECT - ld [wLoadedMoveAnimation], a + ld [wLoadedAttackAnimation], a ld a, SUBSTATUS1_NO_DAMAGE_11 call ApplySubstatus1ToDefendingCard ret @@ -3282,7 +3282,7 @@ SquirtleWithdrawEffect: ; 2d120 (b:5120) call TossCoin_BankB jp nc, SetWasUnsuccessful ld a, ATK_ANIM_PROTECT - ld [wLoadedMoveAnimation], a + ld [wLoadedAttackAnimation], a ld a, SUBSTATUS1_NO_DAMAGE_10 call ApplySubstatus1ToDefendingCard ret @@ -3312,10 +3312,10 @@ PoliwhirlAmnesia_CheckAttacks: ; 2d149 (b:5149) ld a, DUELVARS_ARENA_CARD call GetTurnDuelistVariable call LoadCardDataToBuffer2_FromDeckIndex - ld a, [wLoadedCard2Move1Category] + ld a, [wLoadedCard2Atk1Category] cp POKEMON_POWER jr nz, .has_attack - ld hl, wLoadedCard2Move2Name + ld hl, wLoadedCard2Atk2Name ld a, [hli] or [hl] jr nz, .has_attack @@ -3365,7 +3365,7 @@ ApplyAmnesiaToAttack: ; 2d18a (b:518a) ret nz ; no effect ; set selected attack as disabled - ld a, DUELVARS_ARENA_CARD_DISABLED_MOVE_INDEX + ld a, DUELVARS_ARENA_CARD_DISABLED_ATTACK_INDEX call GetNonTurnDuelistVariable ldh a, [hTemp_ffa0] ld [hl], a @@ -3377,7 +3377,7 @@ ApplyAmnesiaToAttack: ; 2d18a (b:518a) ret c ; return if Player ; the rest of the routine if for Opponent -; to announce which move was used for Amnesia. +; to announce which attack was used for Amnesia. call SwapTurn ld a, DUELVARS_ARENA_CARD call GetTurnDuelistVariable @@ -3474,13 +3474,13 @@ PoliwagWaterGunEffect: ; 2d227 (b:5227) ClampEffect: ; 2d22d (b:522d) ld a, ATK_ANIM_HIT_EFFECT - ld [wLoadedMoveAnimation], a + ld [wLoadedAttackAnimation], a ldtx de, SuccessCheckIfHeadsAttackIsSuccessfulText call TossCoin_BankB jp c, ParalysisEffect ; unsuccessful xor a ; ATK_ANIM_NONE - ld [wLoadedMoveAnimation], a + ld [wLoadedAttackAnimation], a call SetDefiniteDamage call SetWasUnsuccessful ret @@ -3634,9 +3634,9 @@ Quickfreeze_Paralysis50PercentEffect: ; 2d2f3 (b:52f3) ld c, $00 ldh a, [hWhoseTurn] ld h, a - bank1call PlayMoveAnimation + bank1call PlayAttackAnimation bank1call Func_741a - bank1call WaitMoveAnimation + bank1call WaitAttackAnimation bank1call Func_6df1 bank1call DrawDuelHUDs bank1call Func_1bca @@ -3817,7 +3817,7 @@ RapidashAgilityEffect: ; 2d413 (b:5413) call TossCoin_BankB ret nc ; return if tails ld a, ATK_ANIM_AGILITY_PROTECT - ld [wLoadedMoveAnimation], a + ld [wLoadedAttackAnimation], a ld a, SUBSTATUS1_AGILITY call ApplySubstatus1ToDefendingCard ret @@ -4044,7 +4044,7 @@ Moltres1DiveBomb_Success50PercentEffect: ; 2d52b (b:552b) ret .heads ld a, ATK_ANIM_DIVE_BOMB - ld [wLoadedMoveAnimation], a + ld [wLoadedAttackAnimation], a ret ; 0x2d541 @@ -4413,7 +4413,7 @@ Firegiver_AddToHandEffect: ; 2d6c2 (b:56c2) ld d, ATK_ANIM_FIREGIVER_OPP .player_1 ld a, d - ld [wLoadedMoveAnimation], a + ld [wLoadedAttackAnimation], a ; start loop for adding Energy cards to hand ldh a, [hCurSelectionItem] @@ -4425,14 +4425,14 @@ Firegiver_AddToHandEffect: ; 2d6c2 (b:56c2) ld bc, $0 ldh a, [hWhoseTurn] ld h, a - bank1call PlayMoveAnimation - bank1call WaitMoveAnimation + bank1call PlayAttackAnimation + bank1call WaitAttackAnimation ; load correct coordinates to update the number of cards ; in hand and deck during animation. lb bc, 18, 7 ; x, y for hand number ld e, 3 ; y for deck number - ld a, [wLoadedMoveAnimation] + ld a, [wLoadedAttackAnimation] cp ATK_ANIM_FIREGIVER_PLAYER jr z, .player_2 lb bc, 4, 5 ; x, y for hand number @@ -4489,7 +4489,7 @@ Moltres2DiveBomb_Success50PercentEffect: ; 2d776 (b:5776) ret .heads ld a, ATK_ANIM_DIVE_BOMB - ld [wLoadedMoveAnimation], a + ld [wLoadedAttackAnimation], a ret ; 0x2d78c @@ -5493,7 +5493,7 @@ DevolutionBeam_AISelectEffect: ; 2dc9e (b:5c9e) DevolutionBeam_LoadAnimation: ; 2dcb6 (b:5cb6) xor a ; ATK_ANIM_NONE - ld [wLoadedMoveAnimation], a + ld [wLoadedAttackAnimation], a ret ; 0x2dcbb @@ -5518,14 +5518,14 @@ DevolutionBeam_DevolveEffect: ; 2dcbb (b:5cbb) .DevolvePokemon ld a, ATK_ANIM_DEVOLUTION_BEAM - ld [wLoadedMoveAnimation], a + ld [wLoadedAttackAnimation], a ldh a, [hTempPlayAreaLocation_ffa1] ld b, a ld c, $00 ldh a, [hWhoseTurn] ld h, a - bank1call PlayMoveAnimation - bank1call WaitMoveAnimation + bank1call PlayAttackAnimation + bank1call WaitAttackAnimation ; load selected card's data ldh a, [hTempPlayAreaLocation_ffa1] @@ -5924,7 +5924,7 @@ SpacingOut_Success50PercentEffect: ; 2dee0 (b:5ee0) ldh [hTemp_ffa0], a jp nc, SetWasUnsuccessful ld a, ATK_ANIM_RECOVER - ld [wLoadedMoveAnimation], a + ld [wLoadedAttackAnimation], a ret ; 0x2def1 @@ -6153,7 +6153,7 @@ MysteryAttack_RandomEffect: ; 2e009 (b:6009) .no_damage ld a, ATK_ANIM_GLOW_EFFECT - ld [wLoadedMoveAnimation], a + ld [wLoadedAttackAnimation], a xor a call SetDefiniteDamage call SetNoEffectFromStatus @@ -6235,7 +6235,7 @@ TantrumEffect: ; 2e099 (b:6099) ret c ; return if heads ; confuse Pokemon ld a, ATK_ANIM_MULTIPLE_SLASH - ld [wLoadedMoveAnimation], a + ld [wLoadedAttackAnimation], a call SwapTurn call ConfusionEffect call SwapTurn @@ -6506,7 +6506,7 @@ LeerEffect: ; 2e21d (b:621d) call TossCoin_BankB jp nc, SetWasUnsuccessful ld a, ATK_ANIM_LEER - ld [wLoadedMoveAnimation], a + ld [wLoadedAttackAnimation], a ld a, SUBSTATUS2_LEER call ApplySubstatus2ToDefendingCard ret @@ -7002,13 +7002,13 @@ Fly_Success50PercentEffect: ; 2e4fc (b:64fc) call TossCoin_BankB jr c, .heads xor a ; ATK_ANIM_NONE - ld [wLoadedMoveAnimation], a + ld [wLoadedAttackAnimation], a call SetDefiniteDamage call SetWasUnsuccessful ret .heads ld a, ATK_ANIM_AGILITY_PROTECT - ld [wLoadedMoveAnimation], a + ld [wLoadedAttackAnimation], a ld a, SUBSTATUS1_FLY call ApplySubstatus1ToDefendingCard ret @@ -7154,7 +7154,7 @@ RaichuAgilityEffect: ; 2e5dc (b:65dc) call TossCoin_BankB ret nc ; skip if got tails ld a, ATK_ANIM_AGILITY_PROTECT - ld [wLoadedMoveAnimation], a + ld [wLoadedAttackAnimation], a ld a, SUBSTATUS1_AGILITY call ApplySubstatus1ToDefendingCard ret @@ -7507,7 +7507,7 @@ RandomlyDamagePlayAreaPokemon: ; 2e78d (b:678d) .damage ld a, ATK_ANIM_THUNDER_PLAY_AREA - ld [wLoadedMoveAnimation], a + ld [wLoadedAttackAnimation], a call DealDamageToPlayAreaPokemon ret @@ -7819,7 +7819,7 @@ TailWagEffect: ; 2e94e (b:694e) call TossCoin_BankB jp nc, SetWasUnsuccessful ld a, ATK_ANIM_LURE - ld [wLoadedMoveAnimation], a + ld [wLoadedAttackAnimation], a ld a, SUBSTATUS2_TAIL_WAG call ApplySubstatus2ToDefendingCard ret @@ -7965,7 +7965,7 @@ MirrorMoveEffects: ; 2e98c (b:698c) or [hl] jr z, .no_damage ld a, ATK_ANIM_HIT - ld [wLoadedMoveAnimation], a + ld [wLoadedAttackAnimation], a .no_damage inc hl inc hl ; DUELVARS_ARENA_CARD_LAST_TURN_STATUS @@ -8095,7 +8095,7 @@ FearowAgilityEffect: ; 2eab8 (b:6ab8) call TossCoin_BankB ret nc ld a, ATK_ANIM_AGILITY_PROTECT - ld [wLoadedMoveAnimation], a + ld [wLoadedAttackAnimation], a ld a, SUBSTATUS1_AGILITY call ApplySubstatus1ToDefendingCard ret @@ -8556,16 +8556,16 @@ HandlePlayerMetronomeEffect: ; 2ed18 (b:6d18) ; the attack that is loaded, which is Metronome. ; if equal, then cannot select it. ; (i.e. cannot use Metronome with Metronome.) - ld hl, wLoadedMoveName + ld hl, wLoadedAttackName ld a, [hli] ld h, [hl] ld l, a push hl call SwapTurn - call CopyMoveDataAndDamage_FromDeckIndex + call CopyAttackDataAndDamage_FromDeckIndex call SwapTurn pop de - ld hl, wLoadedMoveName + ld hl, wLoadedAttackName ld a, e cp [hl] jr nz, .try_use @@ -8607,7 +8607,7 @@ HandlePlayerMetronomeEffect: ; 2ed18 (b:6d18) ldh a, [hTempCardIndex_ff9f] ld [wPlayerAttackingCardIndex], a ld a, [wSelectedAttack] - ld [wPlayerAttackingMoveIndex], a + ld [wPlayerAttackingAttackIndex], a ld a, [wTempCardID_ccc2] ld [wPlayerAttackingCardID], a or a @@ -8832,10 +8832,10 @@ AISelectConversionColor: ; 2ee7f (b:6e7f) cp COLORLESS jr z, .skip_pkmn_atk ; skip colorless Pokemon ld e, FIRST_ATTACK_OR_PKMN_POWER - bank1call _CheckIfEnoughEnergiesToMove + bank1call _CheckIfEnoughEnergiesToAttack jr nc, .found ld e, SECOND_ATTACK - bank1call _CheckIfEnoughEnergiesToMove + bank1call _CheckIfEnoughEnergiesToAttack jr nc, .found .skip_pkmn_atk pop de @@ -8891,7 +8891,7 @@ ScrunchEffect: ; 2eee7 (b:6ee7) call TossCoin_BankB jp nc, SetWasUnsuccessful ld a, ATK_ANIM_SCRUNCH - ld [wLoadedMoveAnimation], a + ld [wLoadedAttackAnimation], a ld a, SUBSTATUS1_NO_DAMAGE_17 call ApplySubstatus1ToDefendingCard ret @@ -8973,10 +8973,10 @@ HealingWind_PlayAreaHealEffect: ; 2ef53 (b:6f53) ld c, $00 ldh a, [hWhoseTurn] ld h, a - bank1call PlayMoveAnimation - bank1call WaitMoveAnimation + bank1call PlayAttackAnimation + bank1call WaitAttackAnimation ld a, ATK_ANIM_HEALING_WIND_PLAY_AREA - ld [wLoadedMoveAnimation], a + ld [wLoadedAttackAnimation], a ld a, DUELVARS_NUMBER_OF_POKEMON_IN_PLAY_AREA @@ -9011,8 +9011,8 @@ HealingWind_PlayAreaHealEffect: ; 2ef53 (b:6f53) ld c, $01 ldh a, [hWhoseTurn] ld h, a - bank1call PlayMoveAnimation - bank1call WaitMoveAnimation + bank1call PlayAttackAnimation + bank1call WaitAttackAnimation .next_pkmn pop de inc e @@ -9079,7 +9079,7 @@ CatPunchEffect: ; 2efe0 (b:6fe0) call PickRandomPlayAreaCard ld b, a ld a, ATK_ANIM_CAT_PUNCH_PLAY_AREA - ld [wLoadedMoveAnimation], a + ld [wLoadedAttackAnimation], a ld de, 20 call DealDamageToPlayAreaPokemon call SwapTurn @@ -9235,7 +9235,7 @@ SlicingWindEffect: ; 2f0bf (b:70bf) Gale_LoadAnimation: ; 2f0d0 (b:70d0) ld a, ATK_ANIM_GALE - ld [wLoadedMoveAnimation], a + ld [wLoadedAttackAnimation], a ret ; 0x2f0d6 @@ -11757,13 +11757,13 @@ GustOfWind_SwitchEffect: ; 2fe90 (b:7e90) ; input: ; a = attack animation to play Func_2fea9: ; 2fea9 (b:7ea9) - ld [wLoadedMoveAnimation], a + ld [wLoadedAttackAnimation], a bank1call Func_7415 ld bc, $0 ldh a, [hWhoseTurn] ld h, a - bank1call PlayMoveAnimation - bank1call WaitMoveAnimation + bank1call PlayAttackAnimation + bank1call WaitAttackAnimation ret ; 0x2febc @@ -11781,14 +11781,14 @@ HealPlayAreaCardHP: ; 2febc (b:7ebc) push de bank1call Func_7415 ld a, ATK_ANIM_HEALING_WIND_PLAY_AREA - ld [wLoadedMoveAnimation], a + ld [wLoadedAttackAnimation], a ldh a, [hTempPlayAreaLocation_ff9d] ld b, a ld c, $01 ldh a, [hWhoseTurn] ld h, a - bank1call PlayMoveAnimation - bank1call WaitMoveAnimation + bank1call PlayAttackAnimation + bank1call WaitAttackAnimation pop hl ; print Pokemon card name and damage healed diff --git a/src/engine/home.asm b/src/engine/home.asm index 2ac0f78..959f35c 100644 --- a/src/engine/home.asm +++ b/src/engine/home.asm @@ -3871,7 +3871,7 @@ ClearAllStatusConditions: ; 1461 (0:1461) ld [hl], a ld l, DUELVARS_ARENA_CARD_SUBSTATUS3 res SUBSTATUS3_THIS_TURN_DOUBLE_DAMAGE, [hl] - ld l, DUELVARS_ARENA_CARD_DISABLED_MOVE_INDEX + ld l, DUELVARS_ARENA_CARD_DISABLED_ATTACK_INDEX ld [hli], a ld [hli], a ld [hli], a @@ -4237,14 +4237,14 @@ Func_161e: ; 161e (0:161e) ldh a, [hTempCardIndex_ff98] ld d, a ld e, $00 - call CopyMoveDataAndDamage_FromDeckIndex + call CopyAttackDataAndDamage_FromDeckIndex call Func_16f6 ldh a, [hTempCardIndex_ff98] ldh [hTempCardIndex_ff9f], a call GetCardIDFromDeckIndex ld a, e ld [wTempTurnDuelistCardID], a - ld a, [wLoadedMoveCategory] + ld a, [wLoadedAttackCategory] cp POKEMON_POWER ret nz call DisplayUsePokemonPowerScreen @@ -4271,7 +4271,7 @@ Func_161e: ; 161e (0:161e) ret .use_pokemon_power - ld hl, wLoadedMoveEffectCommands + ld hl, wLoadedAttackEffectCommands ld a, [hli] ld h, [hl] ld l, a @@ -4288,7 +4288,7 @@ Func_161e: ; 161e (0:161e) ld [hli], a ld a, [de] ld [hli], a - ld de, wLoadedMoveName + ld de, wLoadedAttackName ld a, [de] inc de ld [hli], a @@ -4304,10 +4304,10 @@ Func_161e: ; 161e (0:161e) ; copies, given a card identified by register a (card ID): ; - e into wSelectedAttack and d into hTempCardIndex_ff9f -; - Move1 (if e == 0) or Move2 (if e == 1) data into wLoadedMove -; - Also from that move, its Damage field into wDamage +; - Attack1 (if e == 0) or Attack2 (if e == 1) data into wLoadedAttack +; - Also from that attack, its Damage field into wDamage ; finally, clears wNoDamageOrEffect and wDealtDamage -CopyMoveDataAndDamage_FromCardID: ; 16ad (0:16ad) +CopyAttackDataAndDamage_FromCardID: ; 16ad (0:16ad) push de push af ld a, e @@ -4319,14 +4319,14 @@ CopyMoveDataAndDamage_FromCardID: ; 16ad (0:16ad) ld d, $00 call LoadCardDataToBuffer1_FromCardID pop de - jr CopyMoveDataAndDamage + jr CopyAttackDataAndDamage ; copies, given a card identified by register d (0-59 deck index): ; - e into wSelectedAttack and d into hTempCardIndex_ff9f -; - Move1 (if e == 0) or Move2 (if e == 1) data into wLoadedMove -; - Also from that move, its Damage field into wDamage +; - Attack1 (if e == 0) or Attack2 (if e == 1) data into wLoadedAttack +; - Also from that attack, its Damage field into wDamage ; finally, clears wNoDamageOrEffect and wDealtDamage -CopyMoveDataAndDamage_FromDeckIndex: ; 16c0 (0:16c0) +CopyAttackDataAndDamage_FromDeckIndex: ; 16c0 (0:16c0) ld a, e ld [wSelectedAttack], a ld a, d @@ -4334,23 +4334,23 @@ CopyMoveDataAndDamage_FromDeckIndex: ; 16c0 (0:16c0) call LoadCardDataToBuffer1_FromDeckIndex ; fallthrough -CopyMoveDataAndDamage: ; 16ca (0:16ca) +CopyAttackDataAndDamage: ; 16ca (0:16ca) ld a, [wLoadedCard1ID] ld [wTempCardID_ccc2], a - ld hl, wLoadedCard1Move1 + ld hl, wLoadedCard1Atk1 dec e - jr nz, .got_move - ld hl, wLoadedCard1Move2 -.got_move - ld de, wLoadedMove - ld c, CARD_DATA_MOVE2 - CARD_DATA_MOVE1 + jr nz, .got_atk + ld hl, wLoadedCard1Atk2 +.got_atk + ld de, wLoadedAttack + ld c, CARD_DATA_ATTACK2 - CARD_DATA_ATTACK1 .copy_loop ld a, [hli] ld [de], a inc de dec c jr nz, .copy_loop - ld a, [wLoadedMoveDamage] + ld a, [wLoadedAttackDamage] ld hl, wDamage ld [hli], a xor a @@ -4393,12 +4393,12 @@ Func_16f6: ; 16f6 (0:16f6) ; Use an attack (from DuelMenu_Attack) or a Pokemon Power (from DuelMenu_PkmnPower) UseAttackOrPokemonPower: ; 1730 (0:1730) ld a, [wSelectedAttack] - ld [wPlayerAttackingMoveIndex], a + ld [wPlayerAttackingAttackIndex], a ldh a, [hTempCardIndex_ff9f] ld [wPlayerAttackingCardIndex], a ld a, [wTempCardID_ccc2] ld [wPlayerAttackingCardID], a - ld a, [wLoadedMoveCategory] + ld a, [wLoadedAttackCategory] cp POKEMON_POWER jp z, UsePokemonPower call Func_16f6 @@ -4437,7 +4437,7 @@ UseAttackOrPokemonPower: ; 1730 (0:1730) PlayAttackAnimation_DealAttackDamage: ; 179a (0:179a) call Func_7415 - ld a, [wLoadedMoveCategory] + ld a, [wLoadedAttackCategory] and RESIDUAL jr nz, .deal_damage call SwapTurn @@ -4461,9 +4461,9 @@ PlayAttackAnimation_DealAttackDamage: ; 179a (0:179a) call GetNonTurnDuelistVariable push de push hl - call PlayMoveAnimation + call PlayAttackAnimation call Func_741a - call WaitMoveAnimation + call WaitAttackAnimation pop hl pop de call SubtractHP @@ -4494,7 +4494,7 @@ Func_17fb: ; 17fb (0:17fb) call TryExecuteEffectCommandFunction pop af ld [wTempNonTurnDuelistCardID], a - call HandleStrikesBack_AgainstResidualMove + call HandleStrikesBack_AgainstResidualAttack bank1call Func_6df1 call Func_1bb4 bank1call Func_7195 @@ -4530,7 +4530,7 @@ HandleConfusionDamageToSelf: ; 1828 (0:1828) ldtx hl, DamageToSelfDueToConfusionText call DrawWideTextBox_PrintText ld a, ATK_ANIM_CONFUSION_HIT - ld [wLoadedMoveAnimation], a + ld [wLoadedAttackAnimation], a ld a, 20 ; damage call DealConfusionDamageToSelf call Func_1bb4 @@ -4574,7 +4574,7 @@ SendAttackDataToLinkOpponent: ; 1874 (0:1874) ld [wccec], a ld a, [wPlayerAttackingCardIndex] ldh [hTempCardIndex_ff9f], a - ld a, [wPlayerAttackingMoveIndex] + ld a, [wPlayerAttackingAttackIndex] ldh [hTemp_ffa0], a ld a, OPPACTION_BEGIN_ATTACK call SetOppAction_SerialSendDuelData @@ -4586,7 +4586,7 @@ SendAttackDataToLinkOpponent: ; 1874 (0:1874) ret Func_189d: ; 189d (0:189d) - ld a, [wLoadedMoveCategory] + ld a, [wLoadedAttackCategory] bit RESIDUAL_F, a ret nz ld a, [wNoDamageOrEffect] @@ -4642,7 +4642,7 @@ CheckSelfConfusionDamage: ; 18d7 (0:18d7) ret ; play the trainer card with deck index at hTempCardIndex_ff98. -; a trainer card is like a move effect, with its own effect commands. +; a trainer card is like an attack effect, with its own effect commands. ; return nc if the card was played, carry if it wasn't. PlayTrainerCard: ; 18f9 (0:18f9) call CheckCantUseTrainerDueToHeadache @@ -4683,12 +4683,12 @@ PlayTrainerCard: ; 18f9 (0:18f9) ret ; 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 +; into wLoadedAttackEffectCommands. in practice, only used for trainer cards LoadNonPokemonCardEffectCommands: ; 1944 (0:1944) ldh a, [hTempCardIndex_ff9f] call LoadCardDataToBuffer1_FromDeckIndex ld hl, wLoadedCard1EffectCommands - ld de, wLoadedMoveEffectCommands + ld de, wLoadedAttackEffectCommands ld a, [hli] ld [de], a inc de @@ -4701,12 +4701,12 @@ LoadNonPokemonCardEffectCommands: ; 1944 (0:1944) DealRecoilDamageToSelf: ; 1955 (0:1955) push af ld a, ATK_ANIM_RECOIL_HIT - ld [wLoadedMoveAnimation], a + ld [wLoadedAttackAnimation], a pop af ; fallthrough ; Make turn holder deal A damage to self due to confusion -; display animation at wLoadedMoveAnimation +; display animation at wLoadedAttackAnimation DealConfusionDamageToSelf: ; 195c (0:195c) ld hl, wDamage ld [hli], a @@ -4978,14 +4978,14 @@ PrintKnockedOut: ; 1ad3 (0:1ad3) ; instead of the main duel interface with regular attack animation. DealDamageToPlayAreaPokemon_RegularAnim: ; 1af3 (0:1af3) ld a, ATK_ANIM_BENCH_HIT - ld [wLoadedMoveAnimation], a + ld [wLoadedAttackAnimation], a ; fallthrough ; deal damage to turn holder's Pokemon card at play area location at b (PLAY_AREA_*). ; damage to deal is given in de. ; shows the defending player's play area screen when dealing the damage ; instead of the main duel interface. -; plays animation that is loaded in wLoadedMoveAnimation. +; plays animation that is loaded in wLoadedAttackAnimation. DealDamageToPlayAreaPokemon: ; 1af8 (0:1af8) ld a, b ld [wTempPlayAreaLocation_cceb], a @@ -5023,7 +5023,7 @@ DealDamageToPlayAreaPokemon: ; 1af8 (0:1af8) call ApplyAttachedPluspower call SwapTurn .next - ld a, [wLoadedMoveCategory] + ld a, [wLoadedAttackCategory] cp POKEMON_POWER jr z, .skip_defender ld a, [wTempPlayAreaLocation_cceb] @@ -5069,7 +5069,7 @@ DealDamageToPlayAreaPokemon: ; 1af8 (0:1af8) call PrintKnockedOutIfHLZero pop de .skip_knocked_out - call HandleStrikesBack_AgainstDamagingMove + call HandleStrikesBack_AgainstDamagingAttack pop bc pop de pop hl @@ -5077,14 +5077,14 @@ DealDamageToPlayAreaPokemon: ; 1af8 (0:1af8) ; 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 -; attack's name is taken from wLoadedMoveName. +; attack's name is taken from wLoadedAttackName. DrawDuelMainScene_PrintPokemonsAttackText: ; 1b8d (0:1b8d) bank1call DrawDuelMainScene ; fallthrough ; print the "<Pokemon Lvxx>'s <attack>" text ; The Pokemon's name is the turn holder's arena Pokemon, and the -; attack's name is taken from wLoadedMoveName. +; attack's name is taken from wLoadedAttackName. PrintPokemonsAttackText: ; 1b90 (0:1b90) ld a, DUELVARS_ARENA_CARD call GetTurnDuelistVariable @@ -5097,9 +5097,9 @@ PrintPokemonsAttackText: ; 1b90 (0:1b90) xor a ld [hli], a ld [hli], a - ld a, [wLoadedMoveName] + ld a, [wLoadedAttackName] ld [hli], a ; wTxRam2_b - ld a, [wLoadedMoveName + 1] + ld a, [wLoadedAttackName + 1] ld [hli], a ldtx hl, PokemonsAttackText call DrawWideTextBox_PrintText @@ -5134,7 +5134,7 @@ Func_1bca: ; 1bca (0:1bca) ld [hl], $0 ld hl, $0000 call LoadTxRam2 - ld hl, wLoadedMoveName + ld hl, wLoadedAttackName ld de, wTxRam2_b ld a, [hli] ld [de], a @@ -5215,13 +5215,13 @@ GetCardDamageAndMaxHP: ; 1c35 (0:1c35) pop hl ret -; check if a flag of wLoadedMove is set +; check if a flag of wLoadedAttack is set ; input: ; a = %fffffbbb, where - ; fffff = flag address counting from wLoadedMoveFlag1 + ; fffff = flag address counting from wLoadedAttackFlag1 ; bbb = flag bit ; return carry if the flag is set -CheckLoadedMoveFlag: ; 1c50 (0:1c50) +CheckLoadedAttackFlag: ; 1c50 (0:1c50) push hl push de push bc @@ -5238,12 +5238,12 @@ CheckLoadedMoveFlag: ; 1c50 (0:1c50) rra and $1f ld e, a ; %000fffff - ld hl, wLoadedMoveFlag1 + ld hl, wLoadedAttackFlag1 add hl, de ld a, [hl] and b jr z, .done - scf ; set carry if the move has this flag set + scf ; set carry if the attack has this flag set .done pop bc pop de @@ -9006,15 +9006,15 @@ CopyFontsOrDuelGraphicsTiles2: ; 2fcb (0:2fcb) call BankpopROM ret -; Checks if the command type at a is one of the commands of the move or +; Checks if the command type at a is one of the commands of the attack or ; card effect currently in use, and executes its associated function if so. ; input: ; a = command type to check - ; [wLoadedMoveEffectCommands] = pointer to list of commands of current move or trainer card + ; [wLoadedAttackEffectCommands] = pointer to list of commands of current attack or trainer card TryExecuteEffectCommandFunction: ; 2fd9 (0:2fd9) push af - ; grab pointer to command list from wLoadedMoveEffectCommands - ld hl, wLoadedMoveEffectCommands + ; grab pointer to command list from wLoadedAttackEffectCommands + ld hl, wLoadedAttackEffectCommands ld a, [hli] ld h, [hl] ld l, a @@ -9044,7 +9044,7 @@ TryExecuteEffectCommandFunction: ; 2fd9 (0:2fd9) ; input: ; a = command type to check - ; hl = list of commands of current move or trainer card + ; hl = list of commands of current attack or trainer card ; return nc if command type matching a is found, carry otherwise CheckMatchingCommand: ; 2ffe (0:2ffe) ld c, a @@ -9553,7 +9553,7 @@ HandleDamageReductionExceptSubstatus2: ; 3269 (0:3269) call CheckCannotUseDueToStatus ret c .pkmn_power - ld a, [wLoadedMoveCategory] + ld a, [wLoadedAttackCategory] cp POKEMON_POWER ret z ld a, [wTempNonTurnDuelistCardID] @@ -9594,7 +9594,7 @@ HandleDamageReductionExceptSubstatus2: ; 3269 (0:3269) ld d, h ret .prevent_less_than_30_damage - ld a, [wLoadedMoveCategory] + ld a, [wLoadedAttackCategory] cp POKEMON_POWER ret z ld bc, 30 @@ -9616,7 +9616,7 @@ HandleDamageReductionExceptSubstatus2: ; 3269 (0:3269) ; check for Invisible Wall, Kabuto Armor, NShield, or Transparency, in order to ; possibly reduce or make zero the damage at de. HandleDamageReductionOrNoDamageFromPkmnPowerEffects: ; 32f7 (0:32f7) - ld a, [wLoadedMoveCategory] + ld a, [wLoadedAttackCategory] cp POKEMON_POWER ret z ld a, MUK @@ -9637,8 +9637,8 @@ HandleDamageReductionOrNoDamageFromPkmnPowerEffects: ; 32f7 (0:32f7) ; when MACHAMP is damaged, if its Strikes Back is active, the ; attacking Pokemon (turn holder's arena Pokemon) takes 10 damage. ; ignore if damage taken at de is 0. -; used to bounce back a damaging move. -HandleStrikesBack_AgainstDamagingMove: ; 3317 (0:3317) +; used to bounce back a damaging attack. +HandleStrikesBack_AgainstDamagingAttack: ; 3317 (0:3317) ld a, e or d ret z @@ -9651,7 +9651,7 @@ HandleStrikesBack_AgainstDamagingMove: ; 3317 (0:3317) ld a, MUK call CountPokemonIDInBothPlayAreas ret c - ld a, [wLoadedMoveCategory] ; category of attack used + ld a, [wLoadedAttackCategory] ; category of attack used cp POKEMON_POWER ret z ld a, [wTempPlayAreaLocation_cceb] ; defending Pokemon's PLAY_AREA_* @@ -9760,7 +9760,7 @@ HandleCantAttackSubstatus: ; 33c1 (0:33c1) ret ; return carry if the turn holder's arena Pokemon cannot use -; selected move at wSelectedAttack due to amnesia +; selected attack at wSelectedAttack due to amnesia HandleAmnesiaSubstatus: ; 33e1 (0:33e1) ld a, DUELVARS_ARENA_CARD_SUBSTATUS2 call GetTurnDuelistVariable @@ -9770,15 +9770,15 @@ HandleAmnesiaSubstatus: ; 33e1 (0:33e1) .check_amnesia cp SUBSTATUS2_AMNESIA jr z, .affected_by_amnesia -.not_the_disabled_move +.not_the_disabled_atk or a ret .affected_by_amnesia - ld a, DUELVARS_ARENA_CARD_DISABLED_MOVE_INDEX + ld a, DUELVARS_ARENA_CARD_DISABLED_ATTACK_INDEX call GetTurnDuelistVariable ld a, [wSelectedAttack] cp [hl] - jr nz, .not_the_disabled_move + jr nz, .not_the_disabled_atk ldtx hl, UnableToUseAttackDueToAmnesiaText scf ret @@ -9823,7 +9823,7 @@ CheckSandAttackOrSmokescreenSubstatus: ; 3414 (0:3414) HandleNoDamageOrEffectSubstatus: ; 3432 (0:3432) xor a ld [wNoDamageOrEffect], a - ld a, [wLoadedMoveCategory] + ld a, [wLoadedAttackCategory] cp POKEMON_POWER ret z ld a, DUELVARS_ARENA_CARD_SUBSTATUS1 @@ -9881,7 +9881,7 @@ HandleTransparency: ; 348a (0:348a) or a ret .transparency - ld a, [wLoadedMoveCategory] + ld a, [wLoadedAttackCategory] cp POKEMON_POWER jr z, .done ; Transparency has no effect against Pkmn Powers ld a, [wTempPlayAreaLocation_cceb] @@ -9944,7 +9944,7 @@ IsClairvoyanceActive: ; 34e2 (0:34e2) ret ; returns carry if turn holder's arena card is paralyzed, asleep, confused, -; and/or toxic gas in play, meaning that move and/or pkmn power cannot be used +; and/or toxic gas in play, meaning that attack and/or pkmn power cannot be used CheckCannotUseDueToStatus: ; 34ef (0:34ef) xor a @@ -10232,14 +10232,14 @@ HandleDestinyBondSubstatus: ; 363b (0:363b) ; when MACHAMP is damaged, if its Strikes Back is active, the ; attacking Pokemon (turn holder's arena Pokemon) takes 10 damage. -; used to bounce back a move of the RESIDUAL category -HandleStrikesBack_AgainstResidualMove: ; 367b (0:367b) +; used to bounce back an attack of the RESIDUAL category +HandleStrikesBack_AgainstResidualAttack: ; 367b (0:367b) ld a, [wTempNonTurnDuelistCardID] cp MACHAMP jr z, .strikes_back ret .strikes_back - ld a, [wLoadedMoveCategory] + ld a, [wLoadedAttackCategory] and RESIDUAL ret nz ld a, [wDealtDamage] @@ -10250,11 +10250,11 @@ HandleStrikesBack_AgainstResidualMove: ; 367b (0:367b) call SwapTurn ret c ld hl, 10 ; damage to be dealt to attacker - call ApplyStrikesBack_AgainstResidualMove + call ApplyStrikesBack_AgainstResidualAttack call nc, WaitForWideTextBoxInput ret -ApplyStrikesBack_AgainstResidualMove: ; 36a2 (0:36a2) +ApplyStrikesBack_AgainstResidualAttack: ; 36a2 (0:36a2) push hl call LoadTxRam3 ld a, [wTempTurnDuelistCardID] |