mirror of
https://gitlab.com/xCrystal/pokecrystal-board.git
synced 2024-09-09 09:51:34 -07:00
32ed487a47
# Conflicts: # audio/engine.asm # constants/gfx_constants.asm # constants/map_data_constants.asm # constants/pokemon_data_constants.asm # constants/sprite_constants.asm # constants/wram_constants.asm # data/maps/data.asm # engine/battle/ai/scoring.asm # engine/battle/core.asm # engine/battle/effect_commands.asm # engine/battle/misc.asm # engine/battle_anims/getpokeballwobble.asm # engine/breeding.asm # engine/buy_sell_toss.asm # engine/decorations.asm # engine/events/battle_tower/battle_tower.asm # engine/events/battle_tower/rules.asm # engine/events/buena.asm # engine/events/bug_contest/contest_2.asm # engine/events/daycare.asm # engine/events/dratini.asm # engine/events/halloffame.asm # engine/events/happiness_egg.asm # engine/events/kurt.asm # engine/events/lucky_number.asm # engine/events/magnet_train.asm # engine/events/overworld.asm # engine/events/pokerus/pokerus.asm # engine/events/print_unown.asm # engine/events/print_unown_2.asm # engine/events/unown_walls.asm # engine/item_effects.asm # engine/link.asm # engine/mon_menu.asm # engine/player_object.asm # engine/routines/playslowcry.asm # engine/scripting.asm # engine/search.asm # engine/search2.asm # engine/specials.asm # engine/start_menu.asm # engine/timeset.asm # home/battle_vars.asm # home/map.asm # maps/GoldenrodUndergroundSwitchRoomEntrances.asm # maps/IlexForest.asm # maps/KrissHouse2F.asm # maps/Route39Barn.asm # mobile/mobile_12_2.asm # mobile/mobile_40.asm # mobile/mobile_5f.asm # wram.asm
167 lines
2.5 KiB
NASM
167 lines
2.5 KiB
NASM
MoveDeletion:
|
|
ld hl, .IntroText
|
|
call PrintText
|
|
call YesNoBox
|
|
jr c, .declined
|
|
ld hl, .AskWhichMonText
|
|
call PrintText
|
|
farcall SelectMonFromParty
|
|
jr c, .declined
|
|
ld a, [wCurPartySpecies]
|
|
cp EGG
|
|
jr z, .egg
|
|
ld a, [wCurPartyMon]
|
|
ld hl, wPartyMon1Moves + 1
|
|
ld bc, PARTYMON_STRUCT_LENGTH
|
|
call AddNTimes
|
|
ld a, [hl]
|
|
and a
|
|
jr z, .onlyonemove
|
|
ld hl, .AskWhichMoveText
|
|
call PrintText
|
|
call LoadStandardMenuHeader
|
|
farcall ChooseMoveToDelete
|
|
push af
|
|
call ReturnToMapWithSpeechTextbox
|
|
pop af
|
|
jr c, .declined
|
|
ld a, [wMenuCursorY]
|
|
push af
|
|
ld a, [wCurSpecies]
|
|
ld [wd265], a
|
|
call GetMoveName
|
|
ld hl, .ConfirmDeleteText
|
|
call PrintText
|
|
call YesNoBox
|
|
pop bc
|
|
jr c, .declined
|
|
call .DeleteMove
|
|
call WaitSFX
|
|
ld de, SFX_MOVE_DELETED
|
|
call PlaySFX
|
|
call WaitSFX
|
|
ld hl, .MoveDeletedText
|
|
call PrintText
|
|
ret
|
|
|
|
.egg
|
|
ld hl, .EggText
|
|
call PrintText
|
|
ret
|
|
|
|
.declined
|
|
ld hl, .DeclinedDeletionText
|
|
call PrintText
|
|
ret
|
|
|
|
.onlyonemove
|
|
ld hl, .OnlyOneMoveText
|
|
call PrintText
|
|
ret
|
|
|
|
.OnlyOneMoveText: ; 0x2c5d1
|
|
; That #MON knows only one move.
|
|
text_jump UnknownText_0x1c5eba
|
|
db "@"
|
|
; 0x2c5d6
|
|
|
|
.ConfirmDeleteText: ; 0x2c5d6
|
|
; Oh, make it forget @ ?
|
|
text_jump UnknownText_0x1c5eda
|
|
db "@"
|
|
; 0x2c5db
|
|
|
|
.MoveDeletedText: ; 0x2c5db
|
|
; Done! Your #MON forgot the move.
|
|
text_jump UnknownText_0x1c5ef5
|
|
db "@"
|
|
; 0x2c5e0
|
|
|
|
.EggText: ; 0x2c5e0
|
|
; An EGG doesn't know any moves!
|
|
text_jump UnknownText_0x1c5f17
|
|
db "@"
|
|
; 0x2c5e5
|
|
|
|
.DeclinedDeletionText: ; 0x2c5e5
|
|
; No? Come visit me again.
|
|
text_jump UnknownText_0x1c5f36
|
|
db "@"
|
|
; 0x2c5ea
|
|
|
|
.AskWhichMoveText: ; 0x2c5ea
|
|
; Which move should it forget, then?
|
|
text_jump UnknownText_0x1c5f50
|
|
db "@"
|
|
; 0x2c5ef
|
|
|
|
.IntroText: ; 0x2c5ef
|
|
; Um… Oh, yes, I'm the MOVE DELETER. I can make #MON forget moves. Shall I make a #MON forget?
|
|
text_jump UnknownText_0x1c5f74
|
|
db "@"
|
|
; 0x2c5f4
|
|
|
|
.AskWhichMonText: ; 0x2c5f4
|
|
; Which #MON?
|
|
text_jump UnknownText_0x1c5fd1
|
|
db "@"
|
|
; 0x2c5f9
|
|
|
|
.DeleteMove: ; 2c5f9
|
|
ld a, b
|
|
push bc
|
|
dec a
|
|
ld c, a
|
|
ld b, 0
|
|
ld hl, wPartyMon1Moves
|
|
add hl, bc
|
|
ld a, [wCurPartyMon]
|
|
ld bc, PARTYMON_STRUCT_LENGTH
|
|
call AddNTimes
|
|
pop bc
|
|
push bc
|
|
inc b
|
|
.loop
|
|
ld a, b
|
|
cp NUM_MOVES + 1
|
|
jr z, .okay
|
|
inc hl
|
|
ld a, [hld]
|
|
ld [hl], a
|
|
inc hl
|
|
inc b
|
|
jr .loop
|
|
|
|
.okay
|
|
xor a
|
|
ld [hl], a
|
|
pop bc
|
|
|
|
ld a, b
|
|
push bc
|
|
dec a
|
|
ld c, a
|
|
ld b, 0
|
|
ld hl, wPartyMon1PP
|
|
add hl, bc
|
|
ld a, [wCurPartyMon]
|
|
ld bc, PARTYMON_STRUCT_LENGTH
|
|
call AddNTimes
|
|
pop bc
|
|
inc b
|
|
.loop2
|
|
ld a, b
|
|
cp NUM_MOVES + 1
|
|
jr z, .done
|
|
inc hl
|
|
ld a, [hld]
|
|
ld [hl], a
|
|
inc hl
|
|
inc b
|
|
jr .loop2
|
|
|
|
.done
|
|
xor a
|
|
ld [hl], a
|
|
ret
|