2018-06-24 14:09:41 +00:00
|
|
|
CanLearnTMHMMove:
|
2018-03-25 14:18:33 +00:00
|
|
|
ld a, [wCurPartySpecies]
|
|
|
|
ld [wCurSpecies], a
|
|
|
|
call GetBaseData
|
|
|
|
ld hl, wBaseTMHM
|
|
|
|
push hl
|
|
|
|
|
|
|
|
ld a, [wPutativeTMHMMove]
|
|
|
|
ld b, a
|
|
|
|
ld c, 0
|
|
|
|
ld hl, TMHMMoves
|
|
|
|
.loop
|
|
|
|
ld a, [hli]
|
|
|
|
and a
|
|
|
|
jr z, .end
|
|
|
|
cp b
|
2020-06-17 14:39:17 +00:00
|
|
|
jr z, .found
|
2018-03-25 14:18:33 +00:00
|
|
|
inc c
|
|
|
|
jr .loop
|
|
|
|
|
2020-06-17 14:39:17 +00:00
|
|
|
.found
|
2018-03-25 14:18:33 +00:00
|
|
|
pop hl
|
|
|
|
ld b, CHECK_FLAG
|
|
|
|
push de
|
|
|
|
ld d, 0
|
|
|
|
predef SmallFarFlagAction
|
|
|
|
pop de
|
|
|
|
ret
|
|
|
|
|
|
|
|
.end
|
|
|
|
pop hl
|
|
|
|
ld c, 0
|
|
|
|
ret
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
GetTMHMMove:
|
2018-07-28 23:27:34 +00:00
|
|
|
ld a, [wTempTMHM]
|
2018-03-25 14:18:33 +00:00
|
|
|
dec a
|
|
|
|
ld hl, TMHMMoves
|
|
|
|
ld b, 0
|
|
|
|
ld c, a
|
|
|
|
add hl, bc
|
|
|
|
ld a, [hl]
|
2018-07-28 23:27:34 +00:00
|
|
|
ld [wTempTMHM], a
|
2018-03-25 14:18:33 +00:00
|
|
|
ret
|
|
|
|
|
|
|
|
INCLUDE "data/moves/tmhm_moves.asm"
|