pokecrystal/mobile/mobile_12_2.asm

900 lines
11 KiB
NASM
Raw Normal View History

2018-06-24 14:09:41 +00:00
MobileCheckOwnMonAnywhere:
2015-12-07 03:36:09 +00:00
; Like CheckOwnMonAnywhere, but only check for species.
; OT/ID don't matter.
2018-01-23 22:39:09 +00:00
ld a, [wPartyCount]
2015-12-07 03:36:09 +00:00
and a
ret z
ld d, a
ld e, 0
2018-01-23 22:39:09 +00:00
ld hl, wPartyMon1Species
ld bc, wPartyMonOTs
2015-12-07 03:36:09 +00:00
.asm_4a851
call .CheckMatch
ret c
push bc
ld bc, PARTYMON_STRUCT_LENGTH
add hl, bc
pop bc
2019-11-24 01:56:22 +00:00
call .AdvanceOTName
2015-12-07 03:36:09 +00:00
dec d
jr nz, .asm_4a851
ld a, BANK(sBoxCount)
call OpenSRAM
2015-12-07 03:36:09 +00:00
ld a, [sBoxCount]
and a
jr z, .asm_4a888
ld d, a
ld hl, sBoxMon1Species
ld bc, sBoxMonOTs
2015-12-07 03:36:09 +00:00
.asm_4a873
call .CheckMatch
jr nc, .asm_4a87c
call CloseSRAM
ret
.asm_4a87c
push bc
ld bc, BOXMON_STRUCT_LENGTH
add hl, bc
pop bc
2019-11-24 01:56:22 +00:00
call .AdvanceOTName
2015-12-07 03:36:09 +00:00
dec d
jr nz, .asm_4a873
.asm_4a888
call CloseSRAM
ld c, 0
.asm_4a88d
ld a, [wCurBox]
and $f
cp c
jr z, .asm_4a8d1
ld hl, .BoxAddresses
2015-12-07 03:36:09 +00:00
ld b, 0
add hl, bc
add hl, bc
add hl, bc
2015-12-07 03:36:09 +00:00
ld a, [hli]
call OpenSRAM
2015-12-07 03:36:09 +00:00
ld a, [hli]
ld h, [hl]
ld l, a
ld a, [hl]
and a
jr z, .asm_4a8d1
push bc
push hl
ld de, sBoxMons - sBoxCount
add hl, de
ld d, h
ld e, l
pop hl
push de
ld de, sBoxMonOTs - sBoxCount
2015-12-07 03:36:09 +00:00
add hl, de
ld b, h
ld c, l
pop hl
ld d, a
.asm_4a8ba
call .CheckMatch
jr nc, .asm_4a8c4
pop bc
call CloseSRAM
ret
.asm_4a8c4
push bc
ld bc, BOXMON_STRUCT_LENGTH
add hl, bc
pop bc
2019-11-24 01:56:22 +00:00
call .AdvanceOTName
2015-12-07 03:36:09 +00:00
dec d
jr nz, .asm_4a8ba
pop bc
.asm_4a8d1
inc c
ld a, c
cp NUM_BOXES
jr c, .asm_4a88d
call CloseSRAM
and a
ret
2018-06-24 14:09:41 +00:00
.CheckMatch:
2015-12-07 03:36:09 +00:00
push bc
push hl
push de
ld d, b
ld e, c
2018-01-23 22:39:09 +00:00
ld a, [wScriptVar]
2015-12-07 03:36:09 +00:00
ld b, [hl]
cp b
jr nz, .no_match
jr .match
.no_match
pop de
pop hl
pop bc
and a
ret
.match
pop de
pop hl
pop bc
scf
ret
.BoxAddresses:
table_width 3, MobileCheckOwnMonAnywhere.BoxAddresses
2015-12-07 03:36:09 +00:00
dba sBox1
dba sBox2
dba sBox3
dba sBox4
dba sBox5
dba sBox6
dba sBox7
dba sBox8
dba sBox9
dba sBox10
dba sBox11
dba sBox12
dba sBox13
dba sBox14
assert_table_length NUM_BOXES
2015-12-07 03:36:09 +00:00
2019-11-24 01:56:22 +00:00
.AdvanceOTName:
2015-12-07 03:36:09 +00:00
push hl
ld hl, NAME_LENGTH
add hl, bc
ld b, h
ld c, l
pop hl
ret
2018-06-24 14:09:41 +00:00
UnusedFindItemInPCOrBag:
2018-01-23 22:39:09 +00:00
ld a, [wScriptVar]
ld [wCurItem], a
2019-03-18 15:43:58 +00:00
ld hl, wNumPCItems
2015-12-07 03:36:09 +00:00
call CheckItem
jr c, .found
2018-01-23 22:39:09 +00:00
ld a, [wScriptVar]
ld [wCurItem], a
ld hl, wNumItems
2015-12-07 03:36:09 +00:00
call CheckItem
jr c, .found
xor a
2018-01-23 22:39:09 +00:00
ld [wScriptVar], a
2015-12-07 03:36:09 +00:00
ret
.found
ld a, 1
2018-01-23 22:39:09 +00:00
ld [wScriptVar], a
2015-12-07 03:36:09 +00:00
ret
2018-06-24 14:09:41 +00:00
Function4a94e:
2015-12-07 03:36:09 +00:00
call FadeToMenu
ld a, -1
ld hl, wd002
ld bc, 3
call ByteFill
xor a
ld [wd018], a
ld [wd019], a
ld b, SCGB_PACKPALS
2015-12-07 03:36:09 +00:00
call GetSGBLayout
call SetPalettes
call Function4aa22
jr c, .asm_4a985
jr z, .asm_4a9a1
jr .asm_4a97b
.asm_4a974
call Function4aa25
jr c, .asm_4a985
jr z, .asm_4a9a1
.asm_4a97b
call Function4ac58
ld hl, wd019
res 1, [hl]
jr .asm_4a974
.asm_4a985
ld a, [wd018]
and a
jr nz, .asm_4a990
call Function4aba8
jr c, .asm_4a974
.asm_4a990
call CloseSubmenu
ld hl, wd002
ld a, -1
ld bc, 3
call ByteFill
scf
jr .asm_4a9af
.asm_4a9a1
call Function4a9c3
jr c, .asm_4a9b0
call Function4a9d7
jr c, .asm_4a974
call CloseSubmenu
and a
.asm_4a9af
ret
.asm_4a9b0
ld de, SFX_WRONG
call PlaySFX
2021-02-05 17:44:21 +00:00
ld hl, MobilePickThreeMonForBattleText
2015-12-07 03:36:09 +00:00
call PrintText
jr .asm_4a974
2021-02-05 17:44:21 +00:00
MobilePickThreeMonForBattleText:
text_far _MobilePickThreeMonForBattleText
text_end
2015-12-07 03:36:09 +00:00
2018-06-24 14:09:41 +00:00
Function4a9c3:
2015-12-07 03:36:09 +00:00
ld hl, wd002
ld a, $ff
cp [hl]
jr z, .asm_4a9d5
inc hl
cp [hl]
jr z, .asm_4a9d5
inc hl
cp [hl]
jr z, .asm_4a9d5
and a
ret
.asm_4a9d5
scf
ret
2018-06-24 14:09:41 +00:00
Function4a9d7:
2015-12-07 03:36:09 +00:00
ld a, [wd002]
2018-01-23 22:39:09 +00:00
ld hl, wPartyMonNicknames
call GetNickname
2015-12-07 03:36:09 +00:00
ld h, d
ld l, e
ld de, wMobileParticipant1Nickname
ld bc, NAME_LENGTH_JAPANESE
2015-12-07 03:36:09 +00:00
call CopyBytes
ld a, [wd003]
2018-01-23 22:39:09 +00:00
ld hl, wPartyMonNicknames
call GetNickname
2015-12-07 03:36:09 +00:00
ld h, d
ld l, e
ld de, wMobileParticipant2Nickname
ld bc, NAME_LENGTH_JAPANESE
2015-12-07 03:36:09 +00:00
call CopyBytes
ld a, [wd004]
2018-01-23 22:39:09 +00:00
ld hl, wPartyMonNicknames
call GetNickname
2015-12-07 03:36:09 +00:00
ld h, d
ld l, e
ld de, wMobileParticipant3Nickname
ld bc, NAME_LENGTH_JAPANESE
2015-12-07 03:36:09 +00:00
call CopyBytes
ld hl, MobileUseTheseThreeMonText
2015-12-07 03:36:09 +00:00
call PrintText
call YesNoBox
ret
MobileUseTheseThreeMonText:
text_far _MobileUseTheseThreeMonText
text_end
2015-12-07 03:36:09 +00:00
2018-06-24 14:09:41 +00:00
Function4aa22:
2015-12-07 03:36:09 +00:00
call ClearBGPalettes
2018-06-24 14:09:41 +00:00
Function4aa25:
2017-12-24 17:47:30 +00:00
farcall LoadPartyMenuGFX
farcall InitPartyMenuWithCancel
2015-12-07 03:36:09 +00:00
call Function4aad3
2018-06-24 14:09:41 +00:00
Function4aa34:
ld a, PARTYMENUACTION_MOBILE
2018-01-23 22:39:09 +00:00
ld [wPartyMenuActionText], a
2017-12-24 17:47:30 +00:00
farcall WritePartyMenuTilemap
2015-12-07 03:36:09 +00:00
xor a
2018-01-23 22:39:09 +00:00
ld [wPartyMenuActionText], a
2017-12-24 17:47:30 +00:00
farcall PrintPartyMenuText
2015-12-07 03:36:09 +00:00
call Function4aab6
call WaitBGMap
call SetPalettes
call DelayFrame
call Function4ab1a
jr z, .asm_4aa66
push af
call Function4aafb
jr c, .asm_4aa67
call Function4ab06
jr c, .asm_4aa67
pop af
.asm_4aa66
ret
.asm_4aa67
ld hl, wd019
set 1, [hl]
pop af
ret
Function4aa6e: ; unreferenced
2015-12-07 03:36:09 +00:00
pop af
ld de, SFX_WRONG
call PlaySFX
call WaitSFX
jr Function4aa34
2018-06-24 14:09:41 +00:00
Function4aa7a:
2015-12-07 03:36:09 +00:00
ld hl, wd002
ld d, $3
.loop
ld e, PARTY_LENGTH
ld a, [hli]
push de
push hl
cp -1
jr z, .done
ld hl, wSpriteAnimationStructs
inc a
ld d, a
.inner_loop
ld a, [hl]
and a
jr z, .next
cp d
jr z, .same_as_d
jr .next
ld a, $3
jr .proceed
.same_as_d
ld a, $2
.proceed
push hl
ld c, l
ld b, h
ld hl, $2
add hl, bc
ld [hl], a
pop hl
.next
ld bc, $10
add hl, bc
dec e
jr nz, .inner_loop
pop hl
pop de
dec d
jr nz, .loop
jr .finished
.done
pop hl
pop de
.finished
ret
2018-06-24 14:09:41 +00:00
Function4aab6:
2015-12-07 03:36:09 +00:00
ld hl, wd002
ld d, $3
.loop
ld a, [hli]
cp -1
jr z, .done
push de
push hl
hlcoord 0, 1
ld bc, $28
call AddNTimes
ld [hl], $ec
pop hl
pop de
dec d
jr nz, .loop
.done
ret
2018-06-24 14:09:41 +00:00
Function4aad3:
2018-01-23 22:39:09 +00:00
ld hl, wPartyCount
2015-12-07 03:36:09 +00:00
ld a, [hli]
and a
ret z ; Nothing in your party
ld c, a
xor a
ldh [hObjectStructIndex], a
2015-12-07 03:36:09 +00:00
.loop
push bc
push hl
ld e, MONICON_PARTYMENU
2017-12-24 17:47:30 +00:00
farcall LoadMenuMonIcon
ldh a, [hObjectStructIndex]
2015-12-07 03:36:09 +00:00
inc a
ldh [hObjectStructIndex], a
2015-12-07 03:36:09 +00:00
pop hl
pop bc
dec c
jr nz, .loop
call Function4aa7a
2017-12-24 17:47:30 +00:00
farcall PlaySpriteAnimations
2015-12-07 03:36:09 +00:00
ret
2018-06-24 14:09:41 +00:00
Function4aafb:
2018-01-23 22:39:09 +00:00
ld a, [wCurPartySpecies]
2015-12-07 03:36:09 +00:00
cp EGG
jr z, .egg
and a
ret
.egg
scf
ret
2018-06-24 14:09:41 +00:00
Function4ab06:
2018-01-23 22:39:09 +00:00
ld a, [wCurPartyMon]
2015-12-07 03:36:09 +00:00
ld bc, PARTYMON_STRUCT_LENGTH
2018-01-23 22:39:09 +00:00
ld hl, wPartyMon1HP
2015-12-07 03:36:09 +00:00
call AddNTimes
ld a, [hli]
ld b, a
ld a, [hl]
or b
jr nz, .NotFainted
scf
.NotFainted:
2015-12-07 03:36:09 +00:00
ret
2018-06-24 14:09:41 +00:00
Function4ab1a:
2015-12-07 03:36:09 +00:00
.asm_4ab1a
ld a, $fb
ld [wMenuJoypadFilter], a
2015-12-07 03:36:09 +00:00
ld a, $26
2015-12-21 19:10:16 +00:00
ld [w2DMenuCursorOffsets], a
2015-12-07 03:36:09 +00:00
ld a, $2
ld [w2DMenuNumCols], a
2015-12-07 03:36:09 +00:00
call Function4adf7
2015-12-15 23:59:49 +00:00
call StaticMenuJoypad
2015-12-07 03:36:09 +00:00
call Function4abc3
jr c, .asm_4ab1a
push af
call Function4ab99
2015-12-18 03:31:16 +00:00
call nc, PlaceHollowCursor
2015-12-07 03:36:09 +00:00
pop af
bit 1, a
jr nz, .asm_4ab6d
2018-01-23 22:39:09 +00:00
ld a, [wPartyCount]
2015-12-07 03:36:09 +00:00
inc a
ld b, a
2015-12-15 23:59:49 +00:00
ld a, [wMenuCursorY]
2015-12-23 19:00:29 +00:00
ld [wPartyMenuCursor], a
2015-12-07 03:36:09 +00:00
cp b
jr z, .asm_4ab7e
2015-12-15 23:59:49 +00:00
ld a, [wMenuCursorY]
2015-12-07 03:36:09 +00:00
dec a
2018-01-23 22:39:09 +00:00
ld [wCurPartyMon], a
2015-12-07 03:36:09 +00:00
ld c, a
ld b, 0
2018-01-23 22:39:09 +00:00
ld hl, wPartySpecies
2015-12-07 03:36:09 +00:00
add hl, bc
ld a, [hl]
2018-01-23 22:39:09 +00:00
ld [wCurPartySpecies], a
2015-12-07 03:36:09 +00:00
ld de, SFX_READ_TEXT_2
call PlaySFX
call WaitSFX
ld a, $1
and a
ret
.asm_4ab6d
2015-12-15 23:59:49 +00:00
ld a, [wMenuCursorY]
2015-12-23 19:00:29 +00:00
ld [wPartyMenuCursor], a
2015-12-07 03:36:09 +00:00
.asm_4ab73
ld de, SFX_READ_TEXT_2
call PlaySFX
call WaitSFX
scf
ret
.asm_4ab7e
ld a, $1
ld [wd018], a
2015-12-15 23:59:49 +00:00
ld a, [wMenuCursorX]
2015-12-07 03:36:09 +00:00
cp $2
jr z, .asm_4ab73
ld de, SFX_READ_TEXT_2
call PlaySFX
call WaitSFX
xor a
ld [wd018], a
and a
ret
2018-06-24 14:09:41 +00:00
Function4ab99:
2015-12-07 03:36:09 +00:00
bit 1, a
jr z, .asm_4aba6
ld a, [wd002]
cp $ff
jr z, .asm_4aba6
scf
ret
.asm_4aba6
and a
ret
2018-06-24 14:09:41 +00:00
Function4aba8:
2015-12-07 03:36:09 +00:00
ld hl, wd004
ld a, [hl]
cp $ff
jr nz, .asm_4abbe
dec hl
ld a, [hl]
cp $ff
jr nz, .asm_4abbe
dec hl
ld a, [hl]
cp $ff
jr nz, .asm_4abbe
and a
ret
.asm_4abbe
ld a, $ff
ld [hl], a
scf
ret
2018-06-24 14:09:41 +00:00
Function4abc3:
2015-12-07 03:36:09 +00:00
bit 3, a
jr z, .asm_4abd5
2018-01-23 22:39:09 +00:00
ld a, [wPartyCount]
2015-12-07 03:36:09 +00:00
inc a
2015-12-15 23:59:49 +00:00
ld [wMenuCursorY], a
2015-12-07 03:36:09 +00:00
ld a, $1
2015-12-15 23:59:49 +00:00
ld [wMenuCursorX], a
2015-12-07 03:36:09 +00:00
jr .asm_4ac29
.asm_4abd5
bit 6, a
jr z, .asm_4abeb
2015-12-15 23:59:49 +00:00
ld a, [wMenuCursorY]
ld [wMenuCursorY], a
2015-12-07 03:36:09 +00:00
and a
jr nz, .asm_4ac29
2018-01-23 22:39:09 +00:00
ld a, [wPartyCount]
2015-12-07 03:36:09 +00:00
inc a
2015-12-15 23:59:49 +00:00
ld [wMenuCursorY], a
2015-12-07 03:36:09 +00:00
jr .asm_4ac29
.asm_4abeb
bit 7, a
jr z, .asm_4ac08
2015-12-15 23:59:49 +00:00
ld a, [wMenuCursorY]
ld [wMenuCursorY], a
2018-01-23 22:39:09 +00:00
ld a, [wPartyCount]
2015-12-07 03:36:09 +00:00
inc a
inc a
2015-12-07 03:36:09 +00:00
ld b, a
2015-12-15 23:59:49 +00:00
ld a, [wMenuCursorY]
2015-12-07 03:36:09 +00:00
cp b
jr nz, .asm_4ac29
ld a, $1
2015-12-15 23:59:49 +00:00
ld [wMenuCursorY], a
2015-12-07 03:36:09 +00:00
jr .asm_4ac29
.asm_4ac08
bit 4, a
jr nz, .asm_4ac10
bit 5, a
jr z, .asm_4ac56
.asm_4ac10
2015-12-15 23:59:49 +00:00
ld a, [wMenuCursorY]
2015-12-07 03:36:09 +00:00
ld b, a
2018-01-23 22:39:09 +00:00
ld a, [wPartyCount]
2015-12-07 03:36:09 +00:00
inc a
cp b
jr nz, .asm_4ac29
2015-12-15 23:59:49 +00:00
ld a, [wMenuCursorX]
2015-12-07 03:36:09 +00:00
cp $1
jr z, .asm_4ac26
ld a, $1
jr .asm_4ac29
.asm_4ac26
2015-12-15 23:59:49 +00:00
ld [wMenuCursorX], a
2015-12-07 03:36:09 +00:00
.asm_4ac29
hlcoord 0, 1
lb bc, 13, 1
call ClearBox
call Function4aab6
2018-01-23 22:39:09 +00:00
ld a, [wPartyCount]
2015-12-07 03:36:09 +00:00
hlcoord 6, 1
.asm_4ac3b
ld bc, $28
add hl, bc
dec a
jr nz, .asm_4ac3b
ld [hl], $7f
2015-12-15 23:59:49 +00:00
ld a, [wMenuCursorY]
2015-12-07 03:36:09 +00:00
ld b, a
2018-01-23 22:39:09 +00:00
ld a, [wPartyCount]
2015-12-07 03:36:09 +00:00
inc a
cp b
jr z, .asm_4ac54
ld a, $1
2015-12-15 23:59:49 +00:00
ld [wMenuCursorX], a
2015-12-07 03:36:09 +00:00
.asm_4ac54
scf
ret
.asm_4ac56
and a
ret
2018-06-24 14:09:41 +00:00
Function4ac58:
2015-12-07 03:36:09 +00:00
lb bc, 2, 18
hlcoord 1, 15
call ClearBox
2017-12-24 17:47:30 +00:00
farcall FreezeMonIcons
ld hl, MenuHeader_0x4aca2
call LoadMenuHeader
2015-12-07 03:36:09 +00:00
ld hl, wd019
bit 1, [hl]
jr z, .asm_4ac89
hlcoord 11, 13
ld b, $3
ld c, $7
2019-04-08 12:15:10 +00:00
call Textbox
2015-12-07 03:36:09 +00:00
hlcoord 13, 14
ld de, String_4ada7
call PlaceString
jr .asm_4ac96
.asm_4ac89
hlcoord 11, 9
ld b, $7
ld c, $7
2019-04-08 12:15:10 +00:00
call Textbox
2015-12-07 03:36:09 +00:00
call Function4ad68
.asm_4ac96
ld a, $1
ldh [hBGMapMode], a
2015-12-07 03:36:09 +00:00
call Function4acaa
call ExitMenu
and a
ret
MenuHeader_0x4aca2:
db MENU_BACKUP_TILES ; flags
menu_coords 11, 9, SCREEN_WIDTH - 1, SCREEN_HEIGHT - 1
2015-12-07 03:36:09 +00:00
dw NULL
db 1 ; default option
2018-06-24 14:09:41 +00:00
Function4acaa:
2015-12-07 03:36:09 +00:00
.asm_4acaa
ld a, $a0
ld [wMenuDataFlags], a
2015-12-07 03:36:09 +00:00
ld a, [wd019]
bit 1, a
jr z, .asm_4acc2
ld a, $2
ld [wMenuDataItems], a
2015-12-07 03:36:09 +00:00
ld a, $c
ld [wMenuBorderTopCoord], a
jr .asm_4accc
.asm_4acc2
ld a, $4
ld [wMenuDataItems], a
2015-12-07 03:36:09 +00:00
ld a, $8
ld [wMenuBorderTopCoord], a
.asm_4accc
ld a, $b
ld [wMenuBorderLeftCoord], a
ld a, $1
ld [wMenuCursorPosition], a
2015-12-15 23:59:49 +00:00
call InitVerticalMenuCursor
ld hl, w2DMenuFlags1
2015-12-07 03:36:09 +00:00
set 6, [hl]
2015-12-15 23:59:49 +00:00
call StaticMenuJoypad
2015-12-07 03:36:09 +00:00
ld de, SFX_READ_TEXT_2
call PlaySFX
ldh a, [hJoyPressed]
2015-12-07 03:36:09 +00:00
bit 0, a
jr nz, .asm_4acf4
bit 1, a
jr nz, .asm_4acf3
jr .asm_4acaa
.asm_4acf3
ret
.asm_4acf4
ld a, [wd019]
bit 1, a
jr nz, .asm_4ad0e
2015-12-15 23:59:49 +00:00
ld a, [wMenuCursorY]
2015-12-07 03:36:09 +00:00
cp $1
jr z, Function4ad17
cp $2
jp z, Function4ad56
cp $3
jp z, Function4ad60
jr .asm_4acf3
.asm_4ad0e
2015-12-15 23:59:49 +00:00
ld a, [wMenuCursorY]
2015-12-07 03:36:09 +00:00
cp $1
jr z, Function4ad56
jr .asm_4acf3
2018-06-24 14:09:41 +00:00
Function4ad17:
2015-12-07 03:36:09 +00:00
call Function4adb2
jr z, .asm_4ad4a
ld hl, wd002
ld a, $ff
cp [hl]
jr z, .asm_4ad39
inc hl
cp [hl]
jr z, .asm_4ad39
inc hl
cp [hl]
jr z, .asm_4ad39
ld de, SFX_WRONG
call WaitPlaySFX
ld hl, MobileOnlyThreeMonMayEnterText
2015-12-07 03:36:09 +00:00
call PrintText
ret
.asm_4ad39
2018-01-23 22:39:09 +00:00
ld a, [wCurPartyMon]
2015-12-07 03:36:09 +00:00
ld [hl], a
call Function4a9c3
ret c
ld a, [wd019]
set 0, a
ld [wd019], a
ret
.asm_4ad4a
ld a, $ff
ld [hl], a
call Function4adc2
ret
MobileOnlyThreeMonMayEnterText:
text_far _MobileOnlyThreeMonMayEnterText
text_end
2015-12-07 03:36:09 +00:00
2018-06-24 14:09:41 +00:00
Function4ad56:
2017-12-24 17:47:30 +00:00
farcall OpenPartyStats
2015-12-11 21:59:40 +00:00
call WaitBGMap2
2015-12-07 03:36:09 +00:00
ret
2018-06-24 14:09:41 +00:00
Function4ad60:
2017-12-24 17:47:30 +00:00
farcall ManagePokemonMoves
2015-12-07 03:36:09 +00:00
ret
Function4ad67: ; unreferenced
2015-12-07 03:36:09 +00:00
ret
2018-06-24 14:09:41 +00:00
Function4ad68:
2015-12-07 03:36:09 +00:00
hlcoord 13, 12
ld de, String_4ad88
call PlaceString
call Function4adb2
jr c, .asm_4ad7e
hlcoord 13, 10
ld de, String_4ada0
jr .asm_4ad84
.asm_4ad7e
hlcoord 13, 10
ld de, String_4ad9a
.asm_4ad84
call PlaceString
ret
2018-06-24 14:09:41 +00:00
String_4ad88:
2015-12-07 03:36:09 +00:00
db "つよさをみる"
next "つかえるわざ"
next "もどる@"
2018-06-24 14:09:41 +00:00
String_4ad9a:
2015-12-07 03:36:09 +00:00
db "さんかする@"
2018-06-24 14:09:41 +00:00
String_4ada0:
2015-12-07 03:36:09 +00:00
db "さんかしない@"
2018-06-24 14:09:41 +00:00
String_4ada7:
2015-12-07 03:36:09 +00:00
db "つよさをみる"
next "もどる@" ; BACK
2018-06-24 14:09:41 +00:00
Function4adb2:
2015-12-07 03:36:09 +00:00
ld hl, wd002
2018-01-23 22:39:09 +00:00
ld a, [wCurPartyMon]
2015-12-07 03:36:09 +00:00
cp [hl]
ret z
inc hl
cp [hl]
ret z
inc hl
cp [hl]
ret z
scf
ret
2018-06-24 14:09:41 +00:00
Function4adc2:
2015-12-07 03:36:09 +00:00
ld a, [wd002]
cp $ff
jr nz, .skip
ld a, [wd003]
cp $ff
jr nz, .skip2
ld a, [wd004]
ld [wd002], a
ld a, $ff
ld [wd004], a
jr .skip
.skip2
ld [wd002], a
ld a, $ff
ld [wd003], a
.skip
ld a, [wd003]
cp $ff
ret nz
ld b, a
ld a, [wd004]
ld [wd003], a
ld a, b
ld [wd004], a
ret
2018-06-24 14:09:41 +00:00
Function4adf7:
2015-12-07 03:36:09 +00:00
ld a, [wd019]
bit 0, a
ret z
2018-01-23 22:39:09 +00:00
ld a, [wPartyCount]
2015-12-07 03:36:09 +00:00
inc a
2015-12-15 23:59:49 +00:00
ld [wMenuCursorY], a
2015-12-07 03:36:09 +00:00
ld a, $1
2015-12-15 23:59:49 +00:00
ld [wMenuCursorX], a
2015-12-07 03:36:09 +00:00
ld a, [wd019]
res 0, a
ld [wd019], a
ret