2014-05-26 21:04:56 +00:00
|
|
|
; checks if the mon in wWhichPokemon already knows the move in wd0e0
|
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
|
2014-05-22 22:13:20 +00:00
|
|
|
ld bc, $2c
|
|
|
|
call AddNTimes
|
2014-05-26 21:04:56 +00:00
|
|
|
ld a, [wd0e0]
|
2014-05-22 22:13:20 +00:00
|
|
|
ld b, a
|
|
|
|
ld c, $4 ; nubmer of moves
|
|
|
|
.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 "@"
|