2018-01-24 08:17:05 -08:00
|
|
|
MoveDeletion:
|
2015-12-19 11:48:30 -08:00
|
|
|
ld hl, .IntroText
|
2015-02-11 13:20:22 -08:00
|
|
|
call PrintText
|
|
|
|
call YesNoBox
|
2015-12-19 11:48:30 -08:00
|
|
|
jr c, .declined
|
|
|
|
ld hl, .AskWhichMonText
|
2015-02-11 13:20:22 -08:00
|
|
|
call PrintText
|
2017-12-24 09:47:30 -08:00
|
|
|
farcall SelectMonFromParty
|
2015-12-19 11:48:30 -08:00
|
|
|
jr c, .declined
|
2018-01-23 14:39:09 -08:00
|
|
|
ld a, [wCurPartySpecies]
|
2015-02-11 13:20:22 -08:00
|
|
|
cp EGG
|
2015-12-19 11:48:30 -08:00
|
|
|
jr z, .egg
|
2018-01-23 14:39:09 -08:00
|
|
|
ld a, [wCurPartyMon]
|
|
|
|
ld hl, wPartyMon1Moves + 1
|
2015-11-04 08:19:58 -08:00
|
|
|
ld bc, PARTYMON_STRUCT_LENGTH
|
2015-02-11 13:20:22 -08:00
|
|
|
call AddNTimes
|
|
|
|
ld a, [hl]
|
|
|
|
and a
|
2015-12-19 11:48:30 -08:00
|
|
|
jr z, .onlyonemove
|
|
|
|
ld hl, .AskWhichMoveText
|
2015-02-11 13:20:22 -08:00
|
|
|
call PrintText
|
2018-01-23 13:08:43 -08:00
|
|
|
call LoadStandardMenuHeader
|
2017-12-24 09:47:30 -08:00
|
|
|
farcall ChooseMoveToDelete
|
2015-02-11 13:20:22 -08:00
|
|
|
push af
|
2015-12-18 17:07:09 -08:00
|
|
|
call ReturnToMapWithSpeechTextbox
|
2015-02-11 13:20:22 -08:00
|
|
|
pop af
|
2015-12-19 11:48:30 -08:00
|
|
|
jr c, .declined
|
2015-12-15 15:59:49 -08:00
|
|
|
ld a, [wMenuCursorY]
|
2015-02-11 13:20:22 -08:00
|
|
|
push af
|
2018-07-29 13:04:38 -07:00
|
|
|
ld a, [wCurSpecies]
|
2018-07-28 16:27:34 -07:00
|
|
|
ld [wNamedObjectIndexBuffer], a
|
2015-02-11 13:20:22 -08:00
|
|
|
call GetMoveName
|
2015-12-19 11:48:30 -08:00
|
|
|
ld hl, .ConfirmDeleteText
|
2015-02-11 13:20:22 -08:00
|
|
|
call PrintText
|
|
|
|
call YesNoBox
|
|
|
|
pop bc
|
2015-12-19 11:48:30 -08:00
|
|
|
jr c, .declined
|
|
|
|
call .DeleteMove
|
2015-02-11 13:20:22 -08:00
|
|
|
call WaitSFX
|
|
|
|
ld de, SFX_MOVE_DELETED
|
|
|
|
call PlaySFX
|
|
|
|
call WaitSFX
|
2015-12-19 11:48:30 -08:00
|
|
|
ld hl, .MoveDeletedText
|
2015-02-11 13:20:22 -08:00
|
|
|
call PrintText
|
|
|
|
ret
|
|
|
|
|
2015-12-19 11:48:30 -08:00
|
|
|
.egg
|
|
|
|
ld hl, .EggText
|
2015-02-11 13:20:22 -08:00
|
|
|
call PrintText
|
|
|
|
ret
|
|
|
|
|
2015-12-19 11:48:30 -08:00
|
|
|
.declined
|
|
|
|
ld hl, .DeclinedDeletionText
|
2015-02-11 13:20:22 -08:00
|
|
|
call PrintText
|
|
|
|
ret
|
|
|
|
|
2015-12-19 11:48:30 -08:00
|
|
|
.onlyonemove
|
|
|
|
ld hl, .OnlyOneMoveText
|
2015-02-11 13:20:22 -08:00
|
|
|
call PrintText
|
|
|
|
ret
|
|
|
|
|
2018-06-24 17:10:37 -07:00
|
|
|
.OnlyOneMoveText:
|
2015-02-11 13:20:22 -08:00
|
|
|
; That #MON knows only one move.
|
2018-10-28 09:16:55 -07:00
|
|
|
text_far UnknownText_0x1c5eba
|
2018-11-17 10:33:03 -08:00
|
|
|
text_end
|
2015-02-11 13:20:22 -08:00
|
|
|
|
2018-06-24 17:10:37 -07:00
|
|
|
.ConfirmDeleteText:
|
2015-02-11 13:20:22 -08:00
|
|
|
; Oh, make it forget @ ?
|
2018-10-28 09:16:55 -07:00
|
|
|
text_far UnknownText_0x1c5eda
|
2018-11-17 10:33:03 -08:00
|
|
|
text_end
|
2015-02-11 13:20:22 -08:00
|
|
|
|
2018-06-24 17:10:37 -07:00
|
|
|
.MoveDeletedText:
|
2015-02-11 13:20:22 -08:00
|
|
|
; Done! Your #MON forgot the move.
|
2018-10-28 09:16:55 -07:00
|
|
|
text_far UnknownText_0x1c5ef5
|
2018-11-17 10:33:03 -08:00
|
|
|
text_end
|
2015-02-11 13:20:22 -08:00
|
|
|
|
2018-06-24 17:10:37 -07:00
|
|
|
.EggText:
|
2015-02-11 13:20:22 -08:00
|
|
|
; An EGG doesn't know any moves!
|
2018-10-28 09:16:55 -07:00
|
|
|
text_far UnknownText_0x1c5f17
|
2018-11-17 10:33:03 -08:00
|
|
|
text_end
|
2015-02-11 13:20:22 -08:00
|
|
|
|
2018-06-24 17:10:37 -07:00
|
|
|
.DeclinedDeletionText:
|
2015-02-11 13:20:22 -08:00
|
|
|
; No? Come visit me again.
|
2018-10-28 09:16:55 -07:00
|
|
|
text_far UnknownText_0x1c5f36
|
2018-11-17 10:33:03 -08:00
|
|
|
text_end
|
2015-02-11 13:20:22 -08:00
|
|
|
|
2018-06-24 17:10:37 -07:00
|
|
|
.AskWhichMoveText:
|
2015-02-11 13:20:22 -08:00
|
|
|
; Which move should it forget, then?
|
2018-10-28 09:16:55 -07:00
|
|
|
text_far UnknownText_0x1c5f50
|
2018-11-17 10:33:03 -08:00
|
|
|
text_end
|
2015-02-11 13:20:22 -08:00
|
|
|
|
2018-06-24 17:10:37 -07:00
|
|
|
.IntroText:
|
2015-02-11 13:20:22 -08:00
|
|
|
; Um… Oh, yes, I'm the MOVE DELETER. I can make #MON forget moves. Shall I make a #MON forget?
|
2018-10-28 09:16:55 -07:00
|
|
|
text_far UnknownText_0x1c5f74
|
2018-11-17 10:33:03 -08:00
|
|
|
text_end
|
2015-02-11 13:20:22 -08:00
|
|
|
|
2018-06-24 17:10:37 -07:00
|
|
|
.AskWhichMonText:
|
2015-02-11 13:20:22 -08:00
|
|
|
; Which #MON?
|
2018-10-28 09:16:55 -07:00
|
|
|
text_far UnknownText_0x1c5fd1
|
2018-11-17 10:33:03 -08:00
|
|
|
text_end
|
2015-02-11 13:20:22 -08:00
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
.DeleteMove:
|
2015-02-11 13:20:22 -08:00
|
|
|
ld a, b
|
|
|
|
push bc
|
|
|
|
dec a
|
|
|
|
ld c, a
|
|
|
|
ld b, 0
|
2018-01-23 14:39:09 -08:00
|
|
|
ld hl, wPartyMon1Moves
|
2015-02-11 13:20:22 -08:00
|
|
|
add hl, bc
|
2018-01-23 14:39:09 -08:00
|
|
|
ld a, [wCurPartyMon]
|
2015-11-04 08:19:58 -08:00
|
|
|
ld bc, PARTYMON_STRUCT_LENGTH
|
2015-02-11 13:20:22 -08:00
|
|
|
call AddNTimes
|
|
|
|
pop bc
|
|
|
|
push bc
|
|
|
|
inc b
|
2015-12-19 11:48:30 -08:00
|
|
|
.loop
|
2015-02-11 13:20:22 -08:00
|
|
|
ld a, b
|
|
|
|
cp NUM_MOVES + 1
|
2015-12-19 11:48:30 -08:00
|
|
|
jr z, .okay
|
2015-02-11 13:20:22 -08:00
|
|
|
inc hl
|
|
|
|
ld a, [hld]
|
|
|
|
ld [hl], a
|
|
|
|
inc hl
|
|
|
|
inc b
|
2015-12-19 11:48:30 -08:00
|
|
|
jr .loop
|
2015-02-11 13:20:22 -08:00
|
|
|
|
2015-12-19 11:48:30 -08:00
|
|
|
.okay
|
2015-02-11 13:20:22 -08:00
|
|
|
xor a
|
|
|
|
ld [hl], a
|
|
|
|
pop bc
|
|
|
|
|
|
|
|
ld a, b
|
|
|
|
push bc
|
|
|
|
dec a
|
|
|
|
ld c, a
|
|
|
|
ld b, 0
|
2018-01-23 14:39:09 -08:00
|
|
|
ld hl, wPartyMon1PP
|
2015-02-11 13:20:22 -08:00
|
|
|
add hl, bc
|
2018-01-23 14:39:09 -08:00
|
|
|
ld a, [wCurPartyMon]
|
2015-11-04 08:19:58 -08:00
|
|
|
ld bc, PARTYMON_STRUCT_LENGTH
|
2015-02-11 13:20:22 -08:00
|
|
|
call AddNTimes
|
|
|
|
pop bc
|
|
|
|
inc b
|
2015-12-19 11:48:30 -08:00
|
|
|
.loop2
|
2015-02-11 13:20:22 -08:00
|
|
|
ld a, b
|
|
|
|
cp NUM_MOVES + 1
|
2015-12-19 11:48:30 -08:00
|
|
|
jr z, .done
|
2015-02-11 13:20:22 -08:00
|
|
|
inc hl
|
|
|
|
ld a, [hld]
|
|
|
|
ld [hl], a
|
|
|
|
inc hl
|
|
|
|
inc b
|
2015-12-19 11:48:30 -08:00
|
|
|
jr .loop2
|
2015-02-11 13:20:22 -08:00
|
|
|
|
2015-12-19 11:48:30 -08:00
|
|
|
.done
|
2015-02-11 13:20:22 -08:00
|
|
|
xor a
|
|
|
|
ld [hl], a
|
|
|
|
ret
|