2015-02-08 08:17:03 +00:00
|
|
|
; checks if the mon in [wWhichPokemon] already knows the move in [wMoveNum]
|
2014-05-22 22:13:20 +00:00
|
|
|
CheckIfMoveIsKnown: ; 2fe18 (b:7e18)
|
|
|
|
ld a, [wWhichPokemon]
|
2014-06-14 11:12:40 +00:00
|
|
|
ld hl, wPartyMon1Moves
|
2015-02-08 08:17:03 +00:00
|
|
|
ld bc, wPartyMon2 - wPartyMon1
|
2014-05-22 22:13:20 +00:00
|
|
|
call AddNTimes
|
2015-02-08 08:17:03 +00:00
|
|
|
ld a, [wMoveNum]
|
2014-05-22 22:13:20 +00:00
|
|
|
ld b, a
|
2015-02-08 08:17:03 +00:00
|
|
|
ld c, NUM_MOVES
|
2014-05-22 22:13:20 +00:00
|
|
|
.loop
|
|
|
|
ld a, [hli]
|
|
|
|
cp b
|
|
|
|
jr z, .alreadyKnown ; found a match
|
|
|
|
dec c
|
|
|
|
jr nz, .loop
|
|
|
|
and a
|
|
|
|
ret
|
|
|
|
.alreadyKnown
|
|
|
|
ld hl, AlreadyKnowsText
|
|
|
|
call PrintText
|
|
|
|
scf
|
|
|
|
ret
|
|
|
|
|
|
|
|
AlreadyKnowsText: ; 2fe3b (b:7e3b)
|
|
|
|
TX_FAR _AlreadyKnowsText
|
|
|
|
db "@"
|