2015-11-23 21:04:53 +00: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 22:19:54 +00:00
2018-06-24 14:09:41 +00:00
PokeSeer:
2013-12-22 22:19:54 +00:00
ld a , SEER_INTRO
call PrintSeerText
2015-10-17 16:58:26 +00:00
call JoyWaitAorB
2013-12-22 22:19:54 +00:00
2018-01-11 17:00:01 +00:00
ld b , PARTY_LENGTH
2017-12-24 17:47:30 +00:00
farcall SelectMonFromParty
2013-12-22 22:19:54 +00:00
jr c , .cancel
2018-01-23 22:39:09 +00:00
ld a , [ wCurPartySpecies ]
2013-12-22 22:19:54 +00:00
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
2018-06-24 14:09:41 +00:00
SeerAction:
2015-11-23 21:04:53 +00:00
ld a , [ wSeerAction ]
2013-12-22 22:19:54 +00:00
ld hl , SeerActions
rst JumpTable
ret
2018-06-24 14:09:41 +00:00
SeerActions:
2013-12-22 22:19:54 +00:00
dw SeerAction0
dw SeerAction1
dw SeerAction2
dw SeerAction3
dw SeerAction4
2018-06-24 14:09:41 +00:00
SeerAction0:
2013-12-22 22:19:54 +00:00
ld a , SEER_MET_AT
call PrintSeerText
ld a , SEER_TIME_LEVEL
call PrintSeerText
call SeerAdvice
ret
2018-06-24 14:09:41 +00:00
SeerAction1:
2013-12-22 22:19:54 +00:00
call GetCaughtOT
ld a , SEER_TRADED
call PrintSeerText
ld a , SEER_TIME_LEVEL
call PrintSeerText
call SeerAdvice
ret
2018-06-24 14:09:41 +00:00
SeerAction2:
2013-12-22 22:19:54 +00:00
ld a , SEER_CANT_TELL
call PrintSeerText
ret
2018-06-24 14:09:41 +00:00
SeerAction3:
2013-12-22 22:19:54 +00:00
ld a , SEER_CANT_TELL
call PrintSeerText
ret
2018-06-24 14:09:41 +00:00
SeerAction4:
2013-12-22 22:19:54 +00:00
ld a , SEER_LEVEL_ONLY
call PrintSeerText
call SeerAdvice
ret
2018-06-24 14:09:41 +00:00
ReadCaughtData:
2015-11-04 16:19:58 +00:00
ld a , MON_CAUGHTDATA
2013-12-22 22:19:54 +00:00
call GetPartyParamLocation
ld a , [ hli ]
2015-11-23 21:04:53 +00:00
ld [ wSeerCaughtData ], a
2013-12-22 22:19:54 +00:00
ld a , [ hld ]
2015-11-23 21:04:53 +00:00
ld [ wSeerCaughtGender ], a
2013-12-22 22:19:54 +00:00
or [ hl ]
2015-11-23 21:04:53 +00:00
jr z , .error
2013-12-22 22:19:54 +00:00
2015-11-23 21:04:53 +00:00
ld a , SEERACTION_TRADED
ld [ wSeerAction ], a
2013-12-22 22:19:54 +00:00
2015-11-04 16:19:58 +00:00
ld a , MON_ID
2013-12-22 22:19:54 +00:00
call GetPartyParamLocation
2018-01-23 22:39:09 +00:00
ld a , [ wPlayerID ]
2013-12-22 22:19:54 +00:00
cp [ hl ]
2015-11-23 21:04:53 +00:00
jr nz , .traded
2013-12-22 22:19:54 +00:00
inc hl
2018-01-23 22:39:09 +00:00
ld a , [ wPlayerID + 1 ]
2015-11-23 21:04:53 +00:00
; cp [hl]
jr nz , .traded
2013-12-22 22:19:54 +00:00
2015-11-23 21:04:53 +00:00
ld a , SEERACTION_MET
ld [ wSeerAction ], a
2013-12-22 22:19:54 +00:00
2015-11-23 21:04:53 +00:00
.traded
2013-12-22 22:19:54 +00:00
call GetCaughtLevel
call GetCaughtOT
call GetCaughtName
call GetCaughtTime
call GetCaughtLocation
and a
ret
2015-11-23 21:04:53 +00:00
.error
ld a , SEERACTION_CANT_TELL_1
ld [ wSeerAction ], a
2013-12-22 22:19:54 +00:00
ret
2018-06-24 14:09:41 +00:00
GetCaughtName:
2018-01-23 22:39:09 +00:00
ld a , [ wCurPartyMon ]
ld hl , wPartyMonNicknames
2018-01-20 17:25:55 +00:00
ld bc , MON_NAME_LENGTH
2013-12-22 22:19:54 +00:00
call AddNTimes
2015-11-23 21:04:53 +00:00
ld de , wSeerNickname
2018-01-20 17:25:55 +00:00
ld bc , MON_NAME_LENGTH
2013-12-22 22:19:54 +00:00
call CopyBytes
ret
2018-06-24 14:09:41 +00:00
GetCaughtLevel:
2013-12-22 22:19:54 +00:00
ld a , "@"
2015-11-23 21:04:53 +00:00
ld hl , wSeerCaughtLevelString
2013-12-22 22:19:54 +00:00
ld bc , 4
call Byte Fill
; caught level
2018-01-11 17:00:01 +00:00
; Limited to between 1 and 63 since it's a 6-bit quantity.
2015-11-23 21:04:53 +00:00
ld a , [ wSeerCaughtData ]
2018-01-11 17:00:01 +00:00
and CAUGHT_LEVEL_MASK
2013-12-22 22:19:54 +00:00
jr z , .unknown
2018-01-11 17:00:01 +00:00
cp CAUGHT_EGG_LEVEL ; egg marker value
2013-12-22 22:19:54 +00:00
jr nz , .print
2016-02-12 03:53:00 +00:00
ld a , EGG_LEVEL ; egg hatch level
2013-12-22 22:19:54 +00:00
.print
2015-11-23 21:04:53 +00:00
ld [ wSeerCaughtLevel ], a
ld hl , wSeerCaughtLevelString
ld de , wSeerCaughtLevel
2015-10-10 21:03:04 +00:00
lb bc , PRINTNUM_RIGHTALIGN | 1 , 3
2013-12-22 22:19:54 +00:00
call PrintNum
ret
.unknown
2015-11-23 21:04:53 +00:00
ld de , wSeerCaughtLevelString
2013-12-22 22:19:54 +00:00
ld hl , .unknown_level
ld bc , 4
call CopyBytes
ret
2018-06-24 14:09:41 +00:00
.unknown_level
2013-12-22 22:19:54 +00:00
db "???@"
2018-06-24 14:09:41 +00:00
GetCaughtTime:
2015-11-23 21:04:53 +00:00
ld a , [ wSeerCaughtData ]
2018-01-11 17:00:01 +00:00
and CAUGHT_TIME_MASK
2013-12-22 22:19:54 +00:00
jr z , .none
rlca
rlca
dec a
ld hl , .times
call GetNthString
ld d , h
ld e , l
2015-11-23 21:04:53 +00:00
ld hl , wSeerTimeOfDay
2013-12-22 22:19:54 +00:00
call CopyName2
and a
ret
.none
2015-11-23 21:04:53 +00:00
ld de , wSeerTimeOfDay
2013-12-22 22:19:54 +00:00
call UnknownCaughtData
ret
2018-06-24 14:09:41 +00:00
.times
2013-12-22 22:19:54 +00:00
db "Morning@"
db "Day@"
db "Night@"
2018-06-24 14:09:41 +00:00
UnknownCaughtData:
2013-12-22 22:19:54 +00:00
ld hl , .unknown
2015-11-23 21:04:53 +00:00
ld bc , NAME_LENGTH
2013-12-22 22:19:54 +00:00
call CopyBytes
ret
2018-06-24 14:09:41 +00:00
.unknown
2013-12-22 22:19:54 +00:00
db "Unknown@"
2018-06-24 14:09:41 +00:00
GetCaughtLocation:
2015-11-23 21:04:53 +00:00
ld a , [ wSeerCaughtGender ]
2018-01-11 17:00:01 +00:00
and CAUGHT_LOCATION_MASK
2015-11-23 21:04:53 +00:00
jr z , .Unknown
2018-01-11 17:00:01 +00:00
cp EVENT_LOCATION
2015-11-23 21:04:53 +00:00
jr z , .event
2018-01-11 17:00:01 +00:00
cp GIFT_LOCATION
2015-11-23 21:04:53 +00:00
jr z , .fail
2013-12-22 22:19:54 +00:00
ld e , a
2017-12-24 17:47:30 +00:00
farcall GetLandmarkName
2018-01-23 22:39:09 +00:00
ld hl , wStringBuffer1
2015-11-23 21:04:53 +00:00
ld de , wSeerCaughtLocation
ld bc , 17
2013-12-22 22:19:54 +00:00
call CopyBytes
and a
ret
2016-04-10 18:42:14 +00:00
.Unknown:
2015-11-23 21:04:53 +00:00
ld de , wSeerCaughtLocation
2013-12-22 22:19:54 +00:00
jp UnknownCaughtData
2015-11-23 21:04:53 +00:00
.event
ld a , SEERACTION_LEVEL_ONLY
ld [ wSeerAction ], a
2013-12-22 22:19:54 +00:00
scf
ret
2015-11-23 21:04:53 +00:00
.fail
ld a , SEERACTION_CANT_TELL_2
ld [ wSeerAction ], a
2013-12-22 22:19:54 +00:00
scf
ret
2018-06-24 14:09:41 +00:00
GetCaughtOT:
2018-01-23 22:39:09 +00:00
ld a , [ wCurPartyMon ]
ld hl , wPartyMonOT
2014-06-13 01:32:42 +00:00
ld bc , NAME_LENGTH
2013-12-22 22:19:54 +00:00
call AddNTimes
2015-11-23 21:04:53 +00:00
ld de , wSeerOTName
ld bc , NAME_LENGTH
2013-12-22 22:19:54 +00:00
call CopyBytes
2015-11-23 21:04:53 +00:00
; this routine is useless in Western localizations
2013-12-22 22:19:54 +00:00
ld hl , .male
2015-11-23 21:04:53 +00:00
ld a , [ wSeerCaughtGender ]
2013-12-22 22:19:54 +00:00
bit 7 , a
2015-11-23 21:04:53 +00:00
jr z , .got_grammar
2013-12-22 22:19:54 +00:00
ld hl , .female
2015-11-23 21:04:53 +00:00
.got_grammar
ld de , wSeerOTNameGrammar
2013-12-22 22:19:54 +00:00
ld a , "@"
ld [ de ], a
ret
2018-06-24 14:09:41 +00:00
.male
2013-12-22 22:19:54 +00:00
db "@"
2018-06-24 14:09:41 +00:00
.female
2013-12-22 22:19:54 +00:00
db "@"
2018-06-24 14:09:41 +00:00
PrintSeerText:
2013-12-22 22:19:54 +00:00
ld e , a
ld d , 0
ld hl , SeerTexts
add hl , de
2016-05-04 15:46:23 +00:00
add hl , de
2013-12-22 22:19:54 +00:00
ld a , [ hli ]
ld h , [ hl ]
ld l , a
call PrintText
ret
2018-06-24 14:09:41 +00:00
SeerTexts:
2013-12-22 22:19:54 +00:00
dw SeerIntroText
dw SeerCantTellText
dw SeerMetAtText
dw SeerTimeLevelText
dw SeerTradedText
dw SeerCancelText
dw SeerEggText
dw SeerLevelOnlyText
2018-06-25 00:10:37 +00:00
SeerIntroText:
2013-12-22 22:19:54 +00:00
; I see all. I know all… Certainly, I know of your #MON!
2018-10-28 16:16:55 +00:00
text_far UnknownText_0x1c475f
2018-11-17 18:33:03 +00:00
text_end
2013-12-22 22:19:54 +00:00
2018-06-25 00:10:37 +00:00
SeerCantTellText:
2013-12-22 22:19:54 +00:00
; Whaaaat? I can't tell a thing! How could I not know of this?
2018-10-28 16:16:55 +00:00
text_far UnknownText_0x1c4797
2018-11-17 18:33:03 +00:00
text_end
2013-12-22 22:19:54 +00:00
2018-06-25 00:10:37 +00:00
SeerMetAtText:
2013-12-22 22:19:54 +00:00
; Hm… I see you met @ here: @ !
2018-10-28 16:16:55 +00:00
text_far UnknownText_0x1c47d4
2018-11-17 18:33:03 +00:00
text_end
2013-12-22 22:19:54 +00:00
2018-06-25 00:10:37 +00:00
SeerTimeLevelText:
2013-12-22 22:19:54 +00:00
; The time was @ ! Its level was @ ! Am I good or what?
2018-10-28 16:16:55 +00:00
text_far UnknownText_0x1c47fa
2018-11-17 18:33:03 +00:00
text_end
2013-12-22 22:19:54 +00:00
2018-06-25 00:10:37 +00:00
SeerTradedText:
2013-12-22 22:19:54 +00:00
; Hm… @ came from @ in a trade? @ was where @ met @ !
2018-10-28 16:16:55 +00:00
text_far UnknownText_0x1c4837
2018-11-17 18:33:03 +00:00
text_end
2013-12-22 22:19:54 +00:00
2018-06-25 00:10:37 +00:00
SeerLevelOnlyText:
2013-12-22 22:19:54 +00:00
; 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?
2018-10-28 16:16:55 +00:00
text_far UnknownText_0x1c487f
2018-11-17 18:33:03 +00:00
text_end
2013-12-22 22:19:54 +00:00
2018-06-25 00:10:37 +00:00
SeerEggText:
2013-12-22 22:19:54 +00:00
; Hey! That's an EGG! You can't say that you've met it yet…
2018-10-28 16:16:55 +00:00
text_far UnknownText_0x1c491d
2018-11-17 18:33:03 +00:00
text_end
2013-12-22 22:19:54 +00:00
2018-06-25 00:10:37 +00:00
SeerCancelText:
2013-12-22 22:19:54 +00:00
; Fufufu! I saw that you'd do nothing!
2018-10-28 16:16:55 +00:00
text_far UnknownText_0x1c4955
2018-11-17 18:33:03 +00:00
text_end
2013-12-22 22:19:54 +00:00
2018-06-24 14:09:41 +00:00
SeerAdvice:
2015-11-04 16:19:58 +00:00
ld a , MON_LEVEL
2013-12-22 22:19:54 +00:00
call GetPartyParamLocation
2015-11-23 21:04:53 +00:00
ld a , [ wSeerCaughtLevel ]
2013-12-22 22:19:54 +00: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
2018-06-24 14:09:41 +00:00
SeerAdviceTexts:
2013-12-22 22:19:54 +00:00
; 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
2018-06-25 00:10:37 +00:00
SeerAdvice1:
2013-12-22 22:19:54 +00:00
; Incidentally… It would be wise to raise your #MON with a little more care.
2018-10-28 16:16:55 +00:00
text_far UnknownText_0x1c497a
2018-11-17 18:33:03 +00:00
text_end
2013-12-22 22:19:54 +00:00
2018-06-25 00:10:37 +00:00
SeerAdvice2:
2013-12-22 22:19:54 +00:00
; Incidentally… It seems to have grown a little. @ seems to be becoming more confident.
2018-10-28 16:16:55 +00:00
text_far UnknownText_0x1c49c6
2018-11-17 18:33:03 +00:00
text_end
2013-12-22 22:19:54 +00:00
2018-06-25 00:10:37 +00:00
SeerAdvice3:
2013-12-22 22:19:54 +00:00
; Incidentally… @ has grown. It's gained much strength.
2018-10-28 16:16:55 +00:00
text_far UnknownText_0x1c4a21
2018-11-17 18:33:03 +00:00
text_end
2013-12-22 22:19:54 +00:00
2018-06-25 00:10:37 +00:00
SeerAdvice4:
2013-12-22 22:19:54 +00:00
; Incidentally… It certainly has grown mighty! This @ must have come through numerous #MON battles. It looks brimming with confidence.
2018-10-28 16:16:55 +00:00
text_far UnknownText_0x1c4a5b
2018-11-17 18:33:03 +00:00
text_end
2013-12-22 22:19:54 +00:00
2018-06-25 00:10:37 +00:00
SeerAdvice5:
2013-12-22 22:19:54 +00:00
; 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.
2018-10-28 16:16:55 +00:00
text_far UnknownText_0x1c4ae5
2018-11-17 18:33:03 +00:00
text_end
2013-12-22 22:19:54 +00:00
2018-06-24 14:09:41 +00:00
GetCaughtGender:
2015-11-04 16:19:58 +00:00
ld hl , MON_CAUGHTGENDER
2013-12-22 22:19:54 +00:00
add hl , bc
ld a , [ hl ]
2018-01-11 17:00:01 +00:00
and CAUGHT_LOCATION_MASK
2013-12-22 22:19:54 +00:00
jr z , .genderless
2018-01-11 17:00:01 +00:00
cp EVENT_LOCATION
2013-12-22 22:19:54 +00:00
jr z , .genderless
ld a , [ hl ]
2018-01-11 17:00:01 +00:00
and CAUGHT_GENDER_MASK
2013-12-22 22:19:54 +00:00
jr nz , .male
2018-01-11 17:00:01 +00:00
ld c , CAUGHT_BY_GIRL
2013-12-22 22:19:54 +00:00
ret
.male
2018-01-11 17:00:01 +00:00
ld c , CAUGHT_BY_BOY
2013-12-22 22:19:54 +00:00
ret
.genderless
2018-01-11 17:00:01 +00:00
ld c , CAUGHT_BY_UNKNOWN
2013-12-22 22:19:54 +00:00
ret