2018-06-24 07:09:41 -07:00
|
|
|
Special::
|
2015-02-11 15:09:35 -08:00
|
|
|
; Run script special de.
|
|
|
|
ld hl, SpecialsPointers
|
2017-12-08 21:50:59 -08:00
|
|
|
add hl, de
|
|
|
|
add hl, de
|
|
|
|
add hl, de
|
2015-02-11 15:09:35 -08:00
|
|
|
ld b, [hl]
|
|
|
|
inc hl
|
|
|
|
ld a, [hli]
|
|
|
|
ld h, [hl]
|
|
|
|
ld l, a
|
|
|
|
ld a, b
|
|
|
|
rst FarCall
|
|
|
|
ret
|
|
|
|
|
2020-07-22 17:24:53 -07:00
|
|
|
INCLUDE "data/events/special_pointers.asm"
|
2015-02-11 15:09:35 -08:00
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
DummySpecial_c224:
|
2015-02-11 15:09:35 -08:00
|
|
|
ret
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
SetPlayerPalette:
|
2018-01-23 14:39:09 -08:00
|
|
|
ld a, [wScriptVar]
|
2015-02-11 15:09:35 -08:00
|
|
|
ld d, a
|
2018-01-24 08:12:02 -08:00
|
|
|
farcall _SetPlayerPalette
|
2015-02-11 15:09:35 -08:00
|
|
|
ret
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
GameCornerPrizeMonCheckDex:
|
2018-01-23 14:39:09 -08:00
|
|
|
ld a, [wScriptVar]
|
2015-02-11 15:09:35 -08:00
|
|
|
dec a
|
|
|
|
call CheckCaughtMon
|
|
|
|
ret nz
|
2018-01-23 14:39:09 -08:00
|
|
|
ld a, [wScriptVar]
|
2015-02-11 15:09:35 -08:00
|
|
|
dec a
|
|
|
|
call SetSeenAndCaughtMon
|
|
|
|
call FadeToMenu
|
2018-01-23 14:39:09 -08:00
|
|
|
ld a, [wScriptVar]
|
2018-07-28 16:27:34 -07:00
|
|
|
ld [wNamedObjectIndexBuffer], a
|
2018-01-16 11:30:10 -08:00
|
|
|
farcall NewPokedexEntry
|
2015-11-17 14:56:49 -08:00
|
|
|
call ExitAllMenus
|
2015-02-11 15:09:35 -08:00
|
|
|
ret
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
UnusedSetSeenMon:
|
2018-01-23 14:39:09 -08:00
|
|
|
ld a, [wScriptVar]
|
2015-02-11 15:09:35 -08:00
|
|
|
dec a
|
|
|
|
call SetSeenMon
|
|
|
|
ret
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
FindPartyMonAboveLevel:
|
2018-01-23 14:39:09 -08:00
|
|
|
ld a, [wScriptVar]
|
2015-02-11 15:09:35 -08:00
|
|
|
ld b, a
|
2018-02-25 16:23:01 -08:00
|
|
|
farcall _FindPartyMonAboveLevel
|
2015-10-01 13:55:24 -07:00
|
|
|
jr z, FoundNone
|
|
|
|
jr FoundOne
|
2015-02-11 15:09:35 -08:00
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
FindPartyMonAtLeastThatHappy:
|
2018-01-23 14:39:09 -08:00
|
|
|
ld a, [wScriptVar]
|
2015-02-11 15:09:35 -08:00
|
|
|
ld b, a
|
2018-01-24 08:12:02 -08:00
|
|
|
farcall _FindPartyMonAtLeastThatHappy
|
2015-10-01 13:55:24 -07:00
|
|
|
jr z, FoundNone
|
|
|
|
jr FoundOne
|
2015-02-11 15:09:35 -08:00
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
FindPartyMonThatSpecies:
|
2018-01-23 14:39:09 -08:00
|
|
|
ld a, [wScriptVar]
|
2015-02-11 15:09:35 -08:00
|
|
|
ld b, a
|
2018-01-24 08:12:02 -08:00
|
|
|
farcall _FindPartyMonThatSpecies
|
2015-10-01 13:55:24 -07:00
|
|
|
jr z, FoundNone
|
|
|
|
jr FoundOne
|
2015-02-11 15:09:35 -08:00
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
FindPartyMonThatSpeciesYourTrainerID:
|
2018-01-23 14:39:09 -08:00
|
|
|
ld a, [wScriptVar]
|
2015-02-11 15:09:35 -08:00
|
|
|
ld b, a
|
2018-01-24 08:12:02 -08:00
|
|
|
farcall _FindPartyMonThatSpeciesYourTrainerID
|
2015-10-01 13:55:24 -07:00
|
|
|
jr z, FoundNone
|
|
|
|
jr FoundOne
|
2015-02-11 15:09:35 -08:00
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
FoundOne:
|
2015-12-11 08:50:49 -08:00
|
|
|
ld a, TRUE
|
2018-01-23 14:39:09 -08:00
|
|
|
ld [wScriptVar], a
|
2015-02-11 15:09:35 -08:00
|
|
|
ret
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
FoundNone:
|
2015-02-11 15:09:35 -08:00
|
|
|
xor a
|
2018-01-23 14:39:09 -08:00
|
|
|
ld [wScriptVar], a
|
2015-02-11 15:09:35 -08:00
|
|
|
ret
|
|
|
|
|
2018-06-24 17:10:37 -07:00
|
|
|
NameRival:
|
2018-09-16 13:02:58 -07:00
|
|
|
ld b, NAME_RIVAL
|
2018-01-23 14:39:09 -08:00
|
|
|
ld de, wRivalName
|
2017-12-24 09:47:30 -08:00
|
|
|
farcall _NamingScreen
|
2015-02-11 15:09:35 -08:00
|
|
|
; default to "SILVER"
|
2018-01-23 14:39:09 -08:00
|
|
|
ld hl, wRivalName
|
2018-06-01 00:04:36 -07:00
|
|
|
ld de, .default
|
2015-02-11 15:09:35 -08:00
|
|
|
call InitName
|
|
|
|
ret
|
|
|
|
|
2018-06-01 00:04:36 -07:00
|
|
|
.default
|
2015-02-11 15:09:35 -08:00
|
|
|
db "SILVER@"
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
NameRater:
|
2018-01-24 08:12:02 -08:00
|
|
|
farcall _NameRater
|
2015-02-11 15:09:35 -08:00
|
|
|
ret
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
OverworldTownMap:
|
2015-02-11 15:09:35 -08:00
|
|
|
call FadeToMenu
|
2017-12-24 09:47:30 -08:00
|
|
|
farcall _TownMap
|
2015-11-17 14:56:49 -08:00
|
|
|
call ExitAllMenus
|
2015-02-11 15:09:35 -08:00
|
|
|
ret
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
UnownPrinter:
|
2015-02-11 15:09:35 -08:00
|
|
|
call FadeToMenu
|
2018-01-24 08:12:02 -08:00
|
|
|
farcall _UnownPrinter
|
2015-11-17 14:56:49 -08:00
|
|
|
call ExitAllMenus
|
2015-02-11 15:09:35 -08:00
|
|
|
ret
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
DisplayLinkRecord:
|
2015-02-11 15:09:35 -08:00
|
|
|
call FadeToMenu
|
2018-01-24 08:12:02 -08:00
|
|
|
farcall _DisplayLinkRecord
|
2015-11-17 14:56:49 -08:00
|
|
|
call ExitAllMenus
|
2015-02-11 15:09:35 -08:00
|
|
|
ret
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
PlayersHousePC:
|
2015-02-11 15:09:35 -08:00
|
|
|
xor a
|
2018-01-23 14:39:09 -08:00
|
|
|
ld [wScriptVar], a
|
2018-01-22 16:10:09 -08:00
|
|
|
farcall _PlayersHousePC
|
2015-02-11 15:09:35 -08:00
|
|
|
ld a, c
|
2018-01-23 14:39:09 -08:00
|
|
|
ld [wScriptVar], a
|
2015-02-11 15:09:35 -08:00
|
|
|
ret
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
CheckMysteryGift:
|
2015-10-04 11:14:51 -07:00
|
|
|
ld a, BANK(sMysteryGiftItem)
|
2020-06-17 14:03:38 -07:00
|
|
|
call OpenSRAM
|
2015-10-04 11:14:51 -07:00
|
|
|
ld a, [sMysteryGiftItem]
|
2015-02-11 15:09:35 -08:00
|
|
|
and a
|
2015-07-16 15:10:10 -07:00
|
|
|
jr z, .no
|
2015-02-11 15:09:35 -08:00
|
|
|
inc a
|
|
|
|
|
2015-07-16 15:10:10 -07:00
|
|
|
.no
|
2018-01-23 14:39:09 -08:00
|
|
|
ld [wScriptVar], a
|
2015-02-11 15:09:35 -08:00
|
|
|
call CloseSRAM
|
|
|
|
ret
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
GetMysteryGiftItem:
|
2015-10-04 11:14:51 -07:00
|
|
|
ld a, BANK(sMysteryGiftItem)
|
2020-06-17 14:03:38 -07:00
|
|
|
call OpenSRAM
|
2015-10-04 11:14:51 -07:00
|
|
|
ld a, [sMysteryGiftItem]
|
2018-01-23 14:39:09 -08:00
|
|
|
ld [wCurItem], a
|
2015-12-11 08:50:49 -08:00
|
|
|
ld a, 1
|
2015-11-01 15:13:31 -08:00
|
|
|
ld [wItemQuantityChangeBuffer], a
|
2018-01-23 14:39:09 -08:00
|
|
|
ld hl, wNumItems
|
2015-02-11 15:09:35 -08:00
|
|
|
call ReceiveItem
|
2015-12-11 08:50:49 -08:00
|
|
|
jr nc, .no_room
|
2015-02-11 15:09:35 -08:00
|
|
|
xor a
|
2015-10-04 11:14:51 -07:00
|
|
|
ld [sMysteryGiftItem], a
|
2015-02-11 15:09:35 -08:00
|
|
|
call CloseSRAM
|
2018-01-23 14:39:09 -08:00
|
|
|
ld a, [wCurItem]
|
2018-07-28 16:27:34 -07:00
|
|
|
ld [wNamedObjectIndexBuffer], a
|
2015-02-11 15:09:35 -08:00
|
|
|
call GetItemName
|
2015-10-04 11:14:51 -07:00
|
|
|
ld hl, .ReceiveItemText
|
2015-02-11 15:09:35 -08:00
|
|
|
call PrintText
|
2015-12-11 08:50:49 -08:00
|
|
|
ld a, TRUE
|
2018-01-23 14:39:09 -08:00
|
|
|
ld [wScriptVar], a
|
2015-02-11 15:09:35 -08:00
|
|
|
ret
|
|
|
|
|
2015-12-11 08:50:49 -08:00
|
|
|
.no_room
|
2015-02-11 15:09:35 -08:00
|
|
|
call CloseSRAM
|
|
|
|
xor a
|
2018-01-23 14:39:09 -08:00
|
|
|
ld [wScriptVar], a
|
2015-02-11 15:09:35 -08:00
|
|
|
ret
|
|
|
|
|
2018-06-24 17:10:37 -07:00
|
|
|
.ReceiveItemText:
|
2019-03-10 17:43:34 -07:00
|
|
|
text_far _ReceiveItemText
|
2018-11-17 10:33:03 -08:00
|
|
|
text_end
|
2015-02-11 15:09:35 -08:00
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
BugContestJudging:
|
2018-01-15 07:55:44 -08:00
|
|
|
farcall _BugContestJudging
|
2015-02-11 15:09:35 -08:00
|
|
|
ld a, b
|
2018-01-23 14:39:09 -08:00
|
|
|
ld [wScriptVar], a
|
2015-02-11 15:09:35 -08:00
|
|
|
ret
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
MapRadio:
|
2018-01-23 14:39:09 -08:00
|
|
|
ld a, [wScriptVar]
|
2015-02-11 15:09:35 -08:00
|
|
|
ld e, a
|
2017-12-24 09:47:30 -08:00
|
|
|
farcall PlayRadio
|
2015-02-11 15:09:35 -08:00
|
|
|
ret
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
UnownPuzzle:
|
2015-02-11 15:09:35 -08:00
|
|
|
call FadeToMenu
|
2018-01-24 08:12:02 -08:00
|
|
|
farcall _UnownPuzzle
|
2015-12-11 08:33:14 -08:00
|
|
|
ld a, [wSolvedUnownPuzzle]
|
2018-01-23 14:39:09 -08:00
|
|
|
ld [wScriptVar], a
|
2015-11-17 14:56:49 -08:00
|
|
|
call ExitAllMenus
|
2015-02-11 15:09:35 -08:00
|
|
|
ret
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
SlotMachine:
|
2018-01-24 08:17:05 -08:00
|
|
|
call CheckCoinsAndCoinCase
|
2015-02-11 15:09:35 -08:00
|
|
|
ret c
|
2015-07-20 15:59:26 -07:00
|
|
|
ld a, BANK(_SlotMachine)
|
|
|
|
ld hl, _SlotMachine
|
2018-01-24 08:17:05 -08:00
|
|
|
call StartGameCornerGame
|
2015-02-11 15:09:35 -08:00
|
|
|
ret
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
CardFlip:
|
2018-01-24 08:17:05 -08:00
|
|
|
call CheckCoinsAndCoinCase
|
2015-02-11 15:09:35 -08:00
|
|
|
ret c
|
2015-07-20 15:59:26 -07:00
|
|
|
ld a, BANK(_CardFlip)
|
|
|
|
ld hl, _CardFlip
|
2018-01-24 08:17:05 -08:00
|
|
|
call StartGameCornerGame
|
2015-02-11 15:09:35 -08:00
|
|
|
ret
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
DummyNonfunctionalGameCornerGame:
|
2018-01-24 08:17:05 -08:00
|
|
|
call CheckCoinsAndCoinCase
|
2015-02-11 15:09:35 -08:00
|
|
|
ret c
|
2015-07-20 15:59:26 -07:00
|
|
|
ld a, BANK(_DummyGame)
|
|
|
|
ld hl, _DummyGame
|
2018-01-24 08:17:05 -08:00
|
|
|
call StartGameCornerGame
|
2015-02-11 15:09:35 -08:00
|
|
|
ret
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
StartGameCornerGame:
|
2015-11-01 09:44:30 -08:00
|
|
|
call FarQueueScript
|
2015-02-11 15:09:35 -08:00
|
|
|
call FadeToMenu
|
2015-11-01 09:44:30 -08:00
|
|
|
ld hl, wQueuedScriptBank
|
2015-02-11 15:09:35 -08:00
|
|
|
ld a, [hli]
|
|
|
|
push af
|
|
|
|
ld a, [hli]
|
|
|
|
ld h, [hl]
|
|
|
|
ld l, a
|
|
|
|
pop af
|
|
|
|
rst FarCall
|
2015-11-17 14:56:49 -08:00
|
|
|
call ExitAllMenus
|
2015-02-11 15:09:35 -08:00
|
|
|
ret
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
CheckCoinsAndCoinCase:
|
2018-01-23 13:45:34 -08:00
|
|
|
ld hl, wCoins
|
2015-02-11 15:09:35 -08:00
|
|
|
ld a, [hli]
|
|
|
|
or [hl]
|
2015-12-11 08:50:49 -08:00
|
|
|
jr z, .no_coins
|
2015-02-11 15:09:35 -08:00
|
|
|
ld a, COIN_CASE
|
2018-01-23 14:39:09 -08:00
|
|
|
ld [wCurItem], a
|
|
|
|
ld hl, wNumItems
|
2015-02-11 15:09:35 -08:00
|
|
|
call CheckItem
|
2015-12-11 08:50:49 -08:00
|
|
|
jr nc, .no_coin_case
|
2015-02-11 15:09:35 -08:00
|
|
|
and a
|
|
|
|
ret
|
|
|
|
|
2015-12-11 08:50:49 -08:00
|
|
|
.no_coins
|
|
|
|
ld hl, .NoCoinsText
|
|
|
|
jr .print
|
2015-02-11 15:09:35 -08:00
|
|
|
|
2015-12-11 08:50:49 -08:00
|
|
|
.no_coin_case
|
|
|
|
ld hl, .NoCoinCaseText
|
2015-02-11 15:09:35 -08:00
|
|
|
|
2015-12-11 08:50:49 -08:00
|
|
|
.print
|
2015-02-11 15:09:35 -08:00
|
|
|
call PrintText
|
|
|
|
scf
|
|
|
|
ret
|
|
|
|
|
2018-06-24 17:10:37 -07:00
|
|
|
.NoCoinsText:
|
2019-03-10 17:43:34 -07:00
|
|
|
text_far _NoCoinsText
|
2018-11-17 10:33:03 -08:00
|
|
|
text_end
|
2015-02-11 15:09:35 -08:00
|
|
|
|
2018-06-24 17:10:37 -07:00
|
|
|
.NoCoinCaseText:
|
2019-03-10 17:43:34 -07:00
|
|
|
text_far _NoCoinCaseText
|
2018-11-17 10:33:03 -08:00
|
|
|
text_end
|
2015-02-11 15:09:35 -08:00
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
ClearBGPalettesBufferScreen:
|
2015-11-11 20:38:57 -08:00
|
|
|
call ClearBGPalettes
|
2015-07-15 12:48:44 -07:00
|
|
|
call BufferScreen
|
2015-02-11 15:09:35 -08:00
|
|
|
ret
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
ScriptReturnCarry:
|
2015-02-11 15:09:35 -08:00
|
|
|
jr c, .carry
|
|
|
|
xor a
|
2018-01-23 14:39:09 -08:00
|
|
|
ld [wScriptVar], a
|
2015-02-11 15:09:35 -08:00
|
|
|
ret
|
|
|
|
.carry
|
|
|
|
ld a, 1
|
2018-01-23 14:39:09 -08:00
|
|
|
ld [wScriptVar], a
|
2015-02-11 15:09:35 -08:00
|
|
|
ret
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
UnusedCheckUnusedTwoDayTimer:
|
2017-12-24 09:47:30 -08:00
|
|
|
farcall CheckUnusedTwoDayTimer
|
2015-10-24 07:34:19 -07:00
|
|
|
ld a, [wUnusedTwoDayTimer]
|
2018-01-23 14:39:09 -08:00
|
|
|
ld [wScriptVar], a
|
2015-02-11 15:09:35 -08:00
|
|
|
ret
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
ActivateFishingSwarm:
|
2018-01-23 14:39:09 -08:00
|
|
|
ld a, [wScriptVar]
|
2015-10-16 10:35:43 -07:00
|
|
|
ld [wFishingSwarmFlag], a
|
2015-02-11 15:09:35 -08:00
|
|
|
ret
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
StoreSwarmMapIndices::
|
2015-02-11 15:09:35 -08:00
|
|
|
ld a, c
|
|
|
|
and a
|
2015-12-09 08:38:40 -08:00
|
|
|
jr nz, .yanma
|
2015-07-15 12:48:44 -07:00
|
|
|
; swarm dark cave violet entrance
|
2015-02-11 15:09:35 -08:00
|
|
|
ld a, d
|
2015-12-09 08:38:40 -08:00
|
|
|
ld [wDunsparceMapGroup], a
|
2015-02-11 15:09:35 -08:00
|
|
|
ld a, e
|
2015-12-09 08:38:40 -08:00
|
|
|
ld [wDunsparceMapNumber], a
|
2015-02-11 15:09:35 -08:00
|
|
|
ret
|
|
|
|
|
2015-12-09 08:38:40 -08:00
|
|
|
.yanma
|
2015-02-11 15:09:35 -08:00
|
|
|
ld a, d
|
2015-12-09 08:38:40 -08:00
|
|
|
ld [wYanmaMapGroup], a
|
2015-02-11 15:09:35 -08:00
|
|
|
ld a, e
|
2015-12-09 08:38:40 -08:00
|
|
|
ld [wYanmaMapNumber], a
|
2015-02-11 15:09:35 -08:00
|
|
|
ret
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
CheckPokerus:
|
2015-02-11 15:09:35 -08:00
|
|
|
; Check if a monster in your party has Pokerus
|
2018-01-24 08:12:02 -08:00
|
|
|
farcall _CheckPokerus
|
2015-02-11 15:09:35 -08:00
|
|
|
jp ScriptReturnCarry
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
ResetLuckyNumberShowFlag:
|
2017-12-24 09:47:30 -08:00
|
|
|
farcall RestartLuckyNumberCountdown
|
2015-10-10 14:03:04 -07:00
|
|
|
ld hl, wLuckyNumberShowFlag
|
2018-01-22 11:34:55 -08:00
|
|
|
res LUCKYNUMBERSHOW_GAME_OVER_F, [hl]
|
2017-12-24 09:47:30 -08:00
|
|
|
farcall LoadOrRegenerateLuckyIDNumber
|
2015-02-11 15:09:35 -08:00
|
|
|
ret
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
CheckLuckyNumberShowFlag:
|
2018-01-24 08:12:02 -08:00
|
|
|
farcall _CheckLuckyNumberShowFlag
|
2015-02-11 15:09:35 -08:00
|
|
|
jp ScriptReturnCarry
|
|
|
|
|
2018-06-24 17:10:37 -07:00
|
|
|
SnorlaxAwake:
|
2015-02-11 15:09:35 -08:00
|
|
|
; Check if the Poké Flute channel is playing, and if the player is standing
|
|
|
|
; next to Snorlax.
|
|
|
|
|
|
|
|
; outputs:
|
2018-01-23 14:39:09 -08:00
|
|
|
; wScriptVar is 1 if the conditions are met, otherwise 0.
|
2015-02-11 15:09:35 -08:00
|
|
|
|
|
|
|
; check background music
|
|
|
|
ld a, [wMapMusic]
|
|
|
|
cp MUSIC_POKE_FLUTE_CHANNEL
|
|
|
|
jr nz, .nope
|
|
|
|
|
2018-01-23 14:39:09 -08:00
|
|
|
ld a, [wXCoord]
|
2015-02-11 15:09:35 -08:00
|
|
|
ld b, a
|
2018-01-23 14:39:09 -08:00
|
|
|
ld a, [wYCoord]
|
2015-02-11 15:09:35 -08:00
|
|
|
ld c, a
|
|
|
|
|
|
|
|
ld hl, .ProximityCoords
|
|
|
|
.loop
|
|
|
|
ld a, [hli]
|
2015-12-11 08:50:49 -08:00
|
|
|
cp -1
|
2015-02-11 15:09:35 -08:00
|
|
|
jr z, .nope
|
|
|
|
cp b
|
|
|
|
jr nz, .nextcoord
|
|
|
|
ld a, [hli]
|
|
|
|
cp c
|
|
|
|
jr nz, .loop
|
|
|
|
|
2015-12-11 08:50:49 -08:00
|
|
|
ld a, TRUE
|
2015-02-11 15:09:35 -08:00
|
|
|
jr .done
|
|
|
|
|
|
|
|
.nextcoord
|
|
|
|
inc hl
|
|
|
|
jr .loop
|
|
|
|
|
|
|
|
.nope
|
|
|
|
xor a
|
|
|
|
.done
|
2018-01-23 14:39:09 -08:00
|
|
|
ld [wScriptVar], a
|
2015-02-11 15:09:35 -08:00
|
|
|
ret
|
|
|
|
|
2016-04-10 11:42:14 -07:00
|
|
|
.ProximityCoords:
|
2015-02-11 15:09:35 -08:00
|
|
|
; x, y
|
|
|
|
db 33, 8 ; left
|
|
|
|
db 34, 10 ; below
|
|
|
|
db 35, 10 ; below
|
|
|
|
db 36, 8 ; right
|
|
|
|
db 36, 9 ; right
|
2015-12-11 08:50:49 -08:00
|
|
|
db -1
|
2015-02-11 15:09:35 -08:00
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
PlayCurMonCry:
|
2018-01-23 14:39:09 -08:00
|
|
|
ld a, [wCurPartySpecies]
|
2018-01-16 20:47:45 -08:00
|
|
|
jp PlayMonCry
|
2015-02-11 15:09:35 -08:00
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
GameboyCheck:
|
2018-08-25 11:28:22 -07:00
|
|
|
ldh a, [hCGB]
|
2015-02-11 15:09:35 -08:00
|
|
|
and a
|
|
|
|
jr nz, .cgb
|
|
|
|
|
2018-08-25 11:28:22 -07:00
|
|
|
ldh a, [hSGB]
|
2015-02-11 15:09:35 -08:00
|
|
|
and a
|
|
|
|
jr nz, .sgb
|
|
|
|
|
|
|
|
.gb
|
2018-01-11 22:40:20 -08:00
|
|
|
xor a ; GBCHECK_GB
|
2015-02-11 15:09:35 -08:00
|
|
|
jr .done
|
|
|
|
.sgb
|
2018-01-11 22:40:20 -08:00
|
|
|
ld a, GBCHECK_SGB
|
2015-02-11 15:09:35 -08:00
|
|
|
jr .done
|
|
|
|
.cgb
|
2018-01-11 22:40:20 -08:00
|
|
|
ld a, GBCHECK_CGB
|
2015-02-11 15:09:35 -08:00
|
|
|
.done
|
2018-01-23 14:39:09 -08:00
|
|
|
ld [wScriptVar], a
|
2015-02-11 15:09:35 -08:00
|
|
|
ret
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
FadeOutMusic:
|
2017-12-25 10:40:10 -08:00
|
|
|
ld a, LOW(MUSIC_NONE)
|
2018-01-23 14:39:09 -08:00
|
|
|
ld [wMusicFadeID], a
|
2017-12-25 10:40:10 -08:00
|
|
|
ld a, HIGH(MUSIC_NONE)
|
2018-01-23 14:39:09 -08:00
|
|
|
ld [wMusicFadeID + 1], a
|
2015-02-11 15:09:35 -08:00
|
|
|
ld a, $2
|
2018-01-23 14:39:09 -08:00
|
|
|
ld [wMusicFade], a
|
2015-02-11 15:09:35 -08:00
|
|
|
ret
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
Diploma:
|
2015-02-11 15:09:35 -08:00
|
|
|
call FadeToMenu
|
2017-12-24 09:47:30 -08:00
|
|
|
farcall _Diploma
|
2015-11-17 14:56:49 -08:00
|
|
|
call ExitAllMenus
|
2015-02-11 15:09:35 -08:00
|
|
|
ret
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
PrintDiploma:
|
2015-02-11 15:09:35 -08:00
|
|
|
call FadeToMenu
|
2017-12-24 09:47:30 -08:00
|
|
|
farcall _PrintDiploma
|
2015-11-17 14:56:49 -08:00
|
|
|
call ExitAllMenus
|
2015-02-11 15:09:35 -08:00
|
|
|
ret
|
|
|
|
|
2018-06-24 17:10:37 -07:00
|
|
|
TrainerHouse:
|
2015-10-04 11:14:51 -07:00
|
|
|
ld a, BANK(sMysteryGiftTrainerHouseFlag)
|
2020-06-17 14:03:38 -07:00
|
|
|
call OpenSRAM
|
2015-10-04 11:14:51 -07:00
|
|
|
ld a, [sMysteryGiftTrainerHouseFlag]
|
2018-01-23 14:39:09 -08:00
|
|
|
ld [wScriptVar], a
|
2015-02-11 15:09:35 -08:00
|
|
|
jp CloseSRAM
|