pokecrystal-board/engine/pokemon/knows_move.asm
mid-kid 940256569b text_jump → text_far
The previous name for this was rather misleading. It isn't an actual
jump like you'd expect the `jp` instruction to behave as. Instead, it
behaves more like a `farcall`.
This also makes it consistent with its current command ID name of
`TX_FAR`.
2018-11-05 22:26:18 +01:00

26 lines
311 B
NASM

KnowsMove:
ld a, MON_MOVES
call GetPartyParamLocation
ld a, [wPutativeTMHMMove]
ld b, a
ld c, NUM_MOVES
.loop
ld a, [hli]
cp b
jr z, .knows_move
dec c
jr nz, .loop
and a
ret
.knows_move
ld hl, .Text_knows
call PrintText
scf
ret
.Text_knows:
; knows @ .
text_far UnknownText_0x1c5ea8
db "@"