2015-11-23 13:04:53 -08:00
const_def
const SEER_INTRO
const SEER_CANT_TELL
const SEER_MET_AT
const SEER_TIME_LEVEL
const SEER_TRADED
const SEER_CANCEL
const SEER_EGG
const SEER_LEVEL_ONLY
const_def
const SEERACTION_MET
const SEERACTION_TRADED
const SEERACTION_CANT_TELL_1
const SEERACTION_CANT_TELL_2
const SEERACTION_LEVEL_ONLY
2013-12-22 14:19:54 -08:00
SpecialPokeSeer: ; 4f0bc
ld a , SEER_INTRO
call PrintSeerText
2015-10-17 09:58:26 -07:00
call JoyWaitAorB
2013-12-22 14:19:54 -08:00
ld b , $ 6
2017-12-24 09:47:30 -08:00
farcall SelectMonFromParty
2013-12-22 14:19:54 -08:00
jr c , .cancel
ld a , [ CurPartySpecies ]
cp EGG
jr z , .egg
call IsAPokemon
jr c , .no_mon
call ReadCaughtData
call SeerAction
ret
.cancel
ld a , SEER_CANCEL
call PrintSeerText
ret
.no_mon
ret
.egg
ld a , SEER_EGG
call PrintSeerText
ret
; 4f0ee
SeerAction: ; 4f0ee
2015-11-23 13:04:53 -08:00
ld a , [ wSeerAction ]
2013-12-22 14:19:54 -08:00
ld hl , SeerActions
rst JumpTable
ret
; 4f0f6
SeerActions: ; 4f0f6
dw SeerAction0
dw SeerAction1
dw SeerAction2
dw SeerAction3
dw SeerAction4
; 4f100
SeerAction0: ; 4f100
ld a , SEER_MET_AT
call PrintSeerText
ld a , SEER_TIME_LEVEL
call PrintSeerText
call SeerAdvice
ret
; 4f10e
SeerAction1: ; 4f10e
call GetCaughtOT
ld a , SEER_TRADED
call PrintSeerText
ld a , SEER_TIME_LEVEL
call PrintSeerText
call SeerAdvice
ret
; 4f11f
SeerAction2: ; 4f11f
ld a , SEER_CANT_TELL
call PrintSeerText
ret
; 4f125
SeerAction3: ; 4f125
ld a , SEER_CANT_TELL
call PrintSeerText
ret
; 4f12b
SeerAction4: ; 4f12b
ld a , SEER_LEVEL_ONLY
call PrintSeerText
call SeerAdvice
ret
; 4f134
ReadCaughtData: ; 4f134
2015-11-04 08:19:58 -08:00
ld a , MON_CAUGHTDATA
2013-12-22 14:19:54 -08:00
call GetPartyParamLocation
ld a , [ hli ]
2015-11-23 13:04:53 -08:00
ld [ wSeerCaughtData ], a
2013-12-22 14:19:54 -08:00
ld a , [ hld ]
2015-11-23 13:04:53 -08:00
ld [ wSeerCaughtGender ], a
2013-12-22 14:19:54 -08:00
or [ hl ]
2015-11-23 13:04:53 -08:00
jr z , .error
2013-12-22 14:19:54 -08:00
2015-11-23 13:04:53 -08:00
ld a , SEERACTION_TRADED
ld [ wSeerAction ], a
2013-12-22 14:19:54 -08:00
2015-11-04 08:19:58 -08:00
ld a , MON_ID
2013-12-22 14:19:54 -08:00
call GetPartyParamLocation
ld a , [ PlayerID ]
cp [ hl ]
2015-11-23 13:04:53 -08:00
jr nz , .traded
2013-12-22 14:19:54 -08:00
inc hl
2015-02-08 00:03:32 -08:00
ld a , [ PlayerID + 1 ]
2015-11-23 13:04:53 -08:00
; cp [hl]
jr nz , .traded
2013-12-22 14:19:54 -08:00
2015-11-23 13:04:53 -08:00
ld a , SEERACTION_MET
ld [ wSeerAction ], a
2013-12-22 14:19:54 -08:00
2015-11-23 13:04:53 -08:00
.traded
2013-12-22 14:19:54 -08:00
call GetCaughtLevel
call GetCaughtOT
call GetCaughtName
call GetCaughtTime
call GetCaughtLocation
and a
ret
2015-11-23 13:04:53 -08:00
.error
ld a , SEERACTION_CANT_TELL_1
ld [ wSeerAction ], a
2013-12-22 14:19:54 -08:00
ret
; 4f176
GetCaughtName: ; 4f176
ld a , [ CurPartyMon ]
2014-06-12 18:32:42 -07:00
ld hl , PartyMonNicknames
2013-12-22 14:19:54 -08:00
ld bc , PKMN_NAME_LENGTH
call AddNTimes
2015-11-23 13:04:53 -08:00
ld de , wSeerNickname
2013-12-22 14:19:54 -08:00
ld bc , PKMN_NAME_LENGTH
call CopyBytes
ret
; 4f18c
GetCaughtLevel: ; 4f18c
ld a , "@"
2015-11-23 13:04:53 -08:00
ld hl , wSeerCaughtLevelString
2013-12-22 14:19:54 -08:00
ld bc , 4
call Byte Fill
; caught level
2016-03-01 19:31:21 -08:00
; Limited to between 1 and 63 for some reason.
2015-11-23 13:04:53 -08:00
ld a , [ wSeerCaughtData ]
2013-12-22 14:19:54 -08:00
and $ 3 f
jr z , .unknown
cp 1 ; hatched from an egg
jr nz , .print
2016-02-11 19:53:00 -08:00
ld a , EGG_LEVEL ; egg hatch level
2013-12-22 14:19:54 -08:00
.print
2015-11-23 13:04:53 -08:00
ld [ wSeerCaughtLevel ], a
ld hl , wSeerCaughtLevelString
ld de , wSeerCaughtLevel
2015-10-10 14:03:04 -07:00
lb bc , PRINTNUM_RIGHTALIGN | 1 , 3
2013-12-22 14:19:54 -08:00
call PrintNum
ret
.unknown
2015-11-23 13:04:53 -08:00
ld de , wSeerCaughtLevelString
2013-12-22 14:19:54 -08:00
ld hl , .unknown_level
ld bc , 4
call CopyBytes
ret
; 4f1c1
.unknown_level ; 4f1c1
db "???@"
; 4f1c5
GetCaughtTime: ; 4f1c5
2015-11-23 13:04:53 -08:00
ld a , [ wSeerCaughtData ]
2013-12-22 14:19:54 -08:00
and $ c0
jr z , .none
rlca
rlca
dec a
ld hl , .times
call GetNthString
ld d , h
ld e , l
2015-11-23 13:04:53 -08:00
ld hl , wSeerTimeOfDay
2013-12-22 14:19:54 -08:00
call CopyName2
and a
ret
.none
2015-11-23 13:04:53 -08:00
ld de , wSeerTimeOfDay
2013-12-22 14:19:54 -08:00
call UnknownCaughtData
ret
; 4f1e6
.times ; 4f1e6
db "Morning@"
db "Day@"
db "Night@"
; 4f1f8
UnknownCaughtData: ; 4f1f8
ld hl , .unknown
2015-11-23 13:04:53 -08:00
ld bc , NAME_LENGTH
2013-12-22 14:19:54 -08:00
call CopyBytes
ret
; 4f202
.unknown ; 4f202
db "Unknown@"
; 4f20a
GetCaughtLocation: ; 4f20a
2015-11-23 13:04:53 -08:00
ld a , [ wSeerCaughtGender ]
2013-12-22 14:19:54 -08:00
and $ 7 f
2015-11-23 13:04:53 -08:00
jr z , .Unknown
2013-12-22 14:19:54 -08:00
cp $ 7 f
2015-11-23 13:04:53 -08:00
jr z , .event
2013-12-22 14:19:54 -08:00
cp $ 7 e
2015-11-23 13:04:53 -08:00
jr z , .fail
2013-12-22 14:19:54 -08:00
ld e , a
2017-12-24 09:47:30 -08:00
farcall GetLandmarkName
2013-12-22 14:19:54 -08:00
ld hl , StringBuffer1
2015-11-23 13:04:53 -08:00
ld de , wSeerCaughtLocation
ld bc , 17
2013-12-22 14:19:54 -08:00
call CopyBytes
and a
ret
2016-04-10 11:42:14 -07:00
.Unknown:
2015-11-23 13:04:53 -08:00
ld de , wSeerCaughtLocation
2013-12-22 14:19:54 -08:00
jp UnknownCaughtData
2015-11-23 13:04:53 -08:00
.event
ld a , SEERACTION_LEVEL_ONLY
ld [ wSeerAction ], a
2013-12-22 14:19:54 -08:00
scf
ret
2015-11-23 13:04:53 -08:00
.fail
ld a , SEERACTION_CANT_TELL_2
ld [ wSeerAction ], a
2013-12-22 14:19:54 -08:00
scf
ret
; 4f242
GetCaughtOT: ; 4f242
ld a , [ CurPartyMon ]
2014-06-12 18:32:42 -07:00
ld hl , PartyMonOT
ld bc , NAME_LENGTH
2013-12-22 14:19:54 -08:00
call AddNTimes
2015-11-23 13:04:53 -08:00
ld de , wSeerOTName
ld bc , NAME_LENGTH
2013-12-22 14:19:54 -08:00
call CopyBytes
2015-11-23 13:04:53 -08:00
; this routine is useless in Western localizations
2013-12-22 14:19:54 -08:00
ld hl , .male
2015-11-23 13:04:53 -08:00
ld a , [ wSeerCaughtGender ]
2013-12-22 14:19:54 -08:00
bit 7 , a
2015-11-23 13:04:53 -08:00
jr z , .got_grammar
2013-12-22 14:19:54 -08:00
ld hl , .female
2015-11-23 13:04:53 -08:00
.got_grammar
ld de , wSeerOTNameGrammar
2013-12-22 14:19:54 -08:00
ld a , "@"
ld [ de ], a
ret
; 4f26b
.male ; 4f26b
db "@"
.female ; 4f26c
db "@"
; 4f26d
PrintSeerText: ; 4f26d
ld e , a
ld d , 0
ld hl , SeerTexts
add hl , de
2016-05-04 08:46:23 -07:00
add hl , de
2013-12-22 14:19:54 -08:00
ld a , [ hli ]
ld h , [ hl ]
ld l , a
call PrintText
ret
; 4f27c
SeerTexts: ; 4f27c
dw SeerIntroText
dw SeerCantTellText
dw SeerMetAtText
dw SeerTimeLevelText
dw SeerTradedText
dw SeerCancelText
dw SeerEggText
dw SeerLevelOnlyText
; 4f28c
SeerIntroText: ; 0x4f28c
; I see all. I know all… Certainly, I know of your #MON!
text_jump UnknownText_0x1c475f
db "@"
; 0x4f291
SeerCantTellText: ; 0x4f291
; Whaaaat? I can't tell a thing! How could I not know of this?
text_jump UnknownText_0x1c4797
db "@"
; 0x4f296
SeerMetAtText: ; 0x4f296
; Hm… I see you met @ here: @ !
text_jump UnknownText_0x1c47d4
db "@"
; 0x4f29b
SeerTimeLevelText: ; 0x4f29b
; The time was @ ! Its level was @ ! Am I good or what?
text_jump UnknownText_0x1c47fa
db "@"
; 0x4f2a0
SeerTradedText: ; 0x4f2a0
; Hm… @ came from @ in a trade? @ was where @ met @ !
text_jump UnknownText_0x1c4837
db "@"
; 0x4f2a5
SeerLevelOnlyText: ; 0x4f2a5
; What!? Incredible! I don't understand how, but it is incredible! You are special. I can't tell where you met it, but it was at level @ . Am I good or what?
text_jump UnknownText_0x1c487f
db "@"
; 0x4f2aa
SeerEggText: ; 0x4f2aa
; Hey! That's an EGG! You can't say that you've met it yet…
text_jump UnknownText_0x1c491d
db "@"
; 0x4f2af
SeerCancelText: ; 0x4f2af
; Fufufu! I saw that you'd do nothing!
text_jump UnknownText_0x1c4955
db "@"
; 0x4f2b4
SeerAdvice: ; 4f2b4
2015-11-04 08:19:58 -08:00
ld a , MON_LEVEL
2013-12-22 14:19:54 -08:00
call GetPartyParamLocation
2015-11-23 13:04:53 -08:00
ld a , [ wSeerCaughtLevel ]
2013-12-22 14:19:54 -08:00
ld c , a
ld a , [ hl ]
sub c
ld c , a
ld hl , SeerAdviceTexts
ld de , 3
.next
cp [ hl ]
jr c , .print
jr z , .print
add hl , de
jr .next
.print
inc hl
ld a , [ hli ]
ld h , [ hl ]
ld l , a
call PrintText
ret
; 4f2d6
SeerAdviceTexts: ; 4f2d6
; level, text
db w 9 , SeerAdvice1
db w 29 , SeerAdvice2
db w 59 , SeerAdvice3
db w 89 , SeerAdvice4
db w 100 , SeerAdvice5
db w 255 , SeerAdvice1
; 4f2e8
SeerAdvice1: ; 0x4f2e8
; Incidentally… It would be wise to raise your #MON with a little more care.
text_jump UnknownText_0x1c497a
db "@"
; 0x4f2ed
SeerAdvice2: ; 0x4f2ed
; Incidentally… It seems to have grown a little. @ seems to be becoming more confident.
text_jump UnknownText_0x1c49c6
db "@"
; 0x4f2f2
SeerAdvice3: ; 0x4f2f2
; Incidentally… @ has grown. It's gained much strength.
text_jump UnknownText_0x1c4a21
db "@"
; 0x4f2f7
SeerAdvice4: ; 0x4f2f7
; Incidentally… It certainly has grown mighty! This @ must have come through numerous #MON battles. It looks brimming with confidence.
text_jump UnknownText_0x1c4a5b
db "@"
; 0x4f2fc
SeerAdvice5: ; 0x4f2fc
; Incidentally… I'm impressed by your dedication. It's been a long time since I've seen a #MON as mighty as this @ . I'm sure that seeing @ in battle would excite anyone.
text_jump UnknownText_0x1c4ae5
db "@"
; 0x4f301
GetCaughtGender: ; 4f301
2015-11-04 08:19:58 -08:00
ld hl , MON_CAUGHTGENDER
2013-12-22 14:19:54 -08:00
add hl , bc
ld a , [ hl ]
and $ 7 f
jr z , .genderless
cp $ 7 f
jr z , .genderless
ld a , [ hl ]
and $ 80
jr nz , .male
ld c , 1
ret
.male
ld c , 2
ret
.genderless
ld c , 0
ret
; 4f31c