diff options
author | Daniel Harding <33dannye@gmail.com> | 2020-05-09 15:48:23 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-09 15:48:23 -0500 |
commit | 6c74edb245a25feaf202f9ee101774be9155bf48 (patch) | |
tree | 87cff8607c4017080d979c8f1b566fdd1dc722f0 /src/engine/bank01.asm | |
parent | 53bab0a246719227b1558dfce636e7d0b21d6db0 (diff) | |
parent | f3019aa045a2caaff8fee39a81c0dc2f75233837 (diff) |
Merge pull request #69 from ElectroDeoxys/master
Deck AI routines (bank 5)
Diffstat (limited to 'src/engine/bank01.asm')
-rw-r--r-- | src/engine/bank01.asm | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/src/engine/bank01.asm b/src/engine/bank01.asm index 51fb0ef..090ecf0 100644 --- a/src/engine/bank01.asm +++ b/src/engine/bank01.asm @@ -353,7 +353,7 @@ DuelMainInterface: ; 426d (1:426d) ld [wSkipDuelistIsThinkingDelay], a ldtx hl, DuelistIsThinkingText call DrawWideTextBox_PrintTextNoDelay - call Func_2bbf + call AIDoAction_Turn ld a, $ff ld [wPlayerAttackingCardIndex], a ld [wPlayerAttackingMoveIndex], a @@ -1967,7 +1967,7 @@ ChooseInitialArenaAndBenchPokemon: ; 4cd5 (1:4cd5) ; AI opponent's turn push af push hl - call Func_2bc3 + call AIDoAction_StartDuel pop hl pop af ld [hl], a @@ -3720,7 +3720,7 @@ Func_57df: ; 57df (1:57df) Func_5805: ; 5805 (1:5805) call Func_3b31 - ld a, [wccc8] + ld a, [wNumberPrizeCardsToTake] ld l, a ld h, $00 call LoadTxRam3 @@ -3731,7 +3731,7 @@ Func_5805: ; 5805 (1:5805) ldtx hl, WillDrawNPrizesText call DrawWideTextBox_WaitForInput - ld a, [wccc8] + ld a, [wNumberPrizeCardsToTake] call Func_310a ld hl, hTemp_ffa0 ld d, [hl] @@ -3757,7 +3757,7 @@ Func_5805: ; 5805 (1:5805) call GetTurnDuelistVariable cp DUELIST_TYPE_LINK_OPP jr z, .link_opponent - call Func_2bd7 + call AIDoAction_TakePrize ld c, DECK_SIZE .asm_5858 call DoFrame @@ -3775,7 +3775,7 @@ Func_5805: ; 5805 (1:5805) call nz, AddCardToHand .asm_586f ld a, [wcbfc] - ld hl, wccc8 + ld hl, wNumberPrizeCardsToTake cp [hl] jr nc, .asm_587e ld l, a @@ -6835,6 +6835,7 @@ OppAction_ExecutePokemonPowerEffect: ; 6b07 (1:6b07) ret ; 0x6b15 +; execute the EFFECTCMDTYPE_AFTER_DAMAGE command of the used Pokemon Power OppAction_6b15: ; 6b15 (1:6b15) ld a, EFFECTCMDTYPE_AFTER_DAMAGE call TryExecuteEffectCommandFunction @@ -7491,7 +7492,7 @@ ReplaceKnockedOutPokemon: ; 6f23 (1:6f23) .opponent cp DUELIST_TYPE_LINK_OPP jr z, .link_opponent - call Func_2bcf + call AIDoAction_KOSwitch ldh a, [hTemp_ffa0] ldh [hTempPlayAreaLocation_ff9d], a jr .replace_pokemon @@ -7524,7 +7525,7 @@ Func_6fa5: ; 6fa5 (1:6fa5) ret ; 0x6fc7 -; return in wccc8 the amount of Pokemon in the turn holder's +; return in wNumberPrizeCardsToTake the amount of Pokemon in the turn holder's ; play area that are still there despite having 0 HP. ; that is, the number of Pokemon that have just been knocked out. ; Clefairy Doll and Mysterious Fossil don't count. @@ -7557,7 +7558,7 @@ CountKnockedOutPokemon: ; 6fc7 (1:6fc7) dec c jr nz, .loop ld a, b - ld [wccc8], a + ld [wNumberPrizeCardsToTake], a or a ret z scf |