2018-01-16 19:30:10 +00:00
|
|
|
CanLearnTMHMMove: ; 11639
|
2018-01-23 22:39:09 +00:00
|
|
|
ld a, [wCurPartySpecies]
|
|
|
|
ld [wCurSpecies], a
|
2015-11-11 21:11:08 +00:00
|
|
|
call GetBaseData
|
2018-01-23 22:39:09 +00:00
|
|
|
ld hl, wBaseTMHM
|
2015-11-11 21:11:08 +00:00
|
|
|
push hl
|
|
|
|
|
2015-12-02 18:24:18 +00:00
|
|
|
ld a, [wPutativeTMHMMove]
|
2015-11-11 21:11:08 +00:00
|
|
|
ld b, a
|
|
|
|
ld c, 0
|
|
|
|
ld hl, TMHMMoves
|
|
|
|
.loop
|
|
|
|
ld a, [hli]
|
|
|
|
and a
|
|
|
|
jr z, .end
|
|
|
|
cp b
|
|
|
|
jr z, .asm_11659
|
|
|
|
inc c
|
|
|
|
jr .loop
|
|
|
|
|
|
|
|
.asm_11659
|
|
|
|
pop hl
|
|
|
|
ld b, CHECK_FLAG
|
|
|
|
push de
|
|
|
|
ld d, 0
|
2018-01-16 19:30:10 +00:00
|
|
|
predef SmallFarFlagAction
|
2015-11-11 21:11:08 +00:00
|
|
|
pop de
|
|
|
|
ret
|
|
|
|
|
|
|
|
.end
|
|
|
|
pop hl
|
|
|
|
ld c, 0
|
|
|
|
ret
|
|
|
|
; 1166a
|
|
|
|
|
2018-01-16 19:30:10 +00:00
|
|
|
GetTMHMMove: ; 1166a
|
2015-11-11 21:11:08 +00:00
|
|
|
ld a, [wd265]
|
|
|
|
dec a
|
|
|
|
ld hl, TMHMMoves
|
|
|
|
ld b, 0
|
|
|
|
ld c, a
|
|
|
|
add hl, bc
|
|
|
|
ld a, [hl]
|
|
|
|
ld [wd265], a
|
|
|
|
ret
|
|
|
|
; 1167a
|
|
|
|
|
2017-12-12 03:44:25 +00:00
|
|
|
|
2017-12-26 22:47:05 +00:00
|
|
|
INCLUDE "data/moves/tmhm_moves.asm"
|