mirror of
https://github.com/pret/poketcg2.git
synced 2026-03-21 17:45:06 -05:00
Fill gap in bank 5
the same function as in TCG1
This commit is contained in:
parent
8038ab1f30
commit
460a7c4d9b
|
|
@ -9203,9 +9203,29 @@ CheckIfAnyAttackKnocksOutDefendingCard:
|
|||
ret nz
|
||||
scf
|
||||
ret
|
||||
; 0x179aa
|
||||
|
||||
SECTION "Bank 5@79c2", ROMX[$79c2], BANK[$5]
|
||||
; 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 wSelectedAttack.
|
||||
CheckIfAnyDefendingPokemonAttackDealsSameDamageAsHP:
|
||||
xor a ; FIRST_ATTACK_OR_PKMN_POWER
|
||||
call .CheckDamage
|
||||
ret c
|
||||
ld a, SECOND_ATTACK
|
||||
|
||||
.CheckDamage:
|
||||
call EstimateDamage_FromDefendingPokemon
|
||||
ldh a, [hTempPlayAreaLocation_ff9d]
|
||||
add DUELVARS_ARENA_CARD_HP
|
||||
get_turn_duelist_var
|
||||
ld hl, wDamage
|
||||
sub [hl]
|
||||
jr z, .true
|
||||
ret
|
||||
.true
|
||||
scf
|
||||
ret
|
||||
|
||||
; checks AI scores for all benched Pokémon
|
||||
; returns the location of the card with highest score
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user