poke seer special

This commit is contained in:
yenatch 2013-12-22 17:17:33 -05:00
parent a15bd15e2a
commit 4d1091f8d9
3 changed files with 261 additions and 130 deletions

View File

@ -27,7 +27,6 @@ SPECIAL_RUINCHAMBERWALL EQU $0087
SPECIAL_HOOHCHAMBER EQU $008d SPECIAL_HOOHCHAMBER EQU $008d
SPECIAL_CELEBI EQU $008f SPECIAL_CELEBI EQU $008f
SPECIAL_AFTERCELEBI EQU $0090 SPECIAL_AFTERCELEBI EQU $0090
SPECIAL_POKESEER EQU $0091 SPECIAL_POKESEER EQU $0091

384
main.asm
View File

@ -7963,7 +7963,7 @@ SpecialsPointers: ; c029
dbw BANK(Function102142), Function102142 dbw BANK(Function102142), Function102142
dbw BANK(Function4989a), Function4989a dbw BANK(Function4989a), Function4989a
dbw BANK(Function49bf9), Function49bf9 dbw BANK(Function49bf9), Function49bf9
dbw BANK(Function4f0bc), Function4f0bc dbw BANK(SpecialPokeSeer), SpecialPokeSeer
dbw BANK(Function8af6b), Function8af6b dbw BANK(Function8af6b), Function8af6b
dbw BANK(Function8afd4), Function8afd4 dbw BANK(Function8afd4), Function8afd4
dbw BANK(SpecialDratini),SpecialDratini dbw BANK(SpecialDratini),SpecialDratini
@ -33303,7 +33303,7 @@ Function28b87: ; 28b87
call GetPartyLocation call GetPartyLocation
ld b, h ld b, h
ld c, l ld c, l
callba Function4f301 callba GetCaughtGender
ld a, c ld a, c
ld [$c701], a ld [$c701], a
ld hl, $d26b ld hl, $d26b
@ -33342,7 +33342,7 @@ Function28b87: ; 28b87
call GetPartyLocation call GetPartyLocation
ld b, h ld b, h
ld c, l ld c, l
callba Function4f301 callba GetCaughtGender
ld a, c ld a, c
ld [$c733], a ld [$c733], a
ld a, [DefaultFlypoint] ld a, [DefaultFlypoint]
@ -50438,91 +50438,105 @@ CheckBattleScene: ; 4ea44
INCLUDE "misc/gbc_only.asm" INCLUDE "misc/gbc_only.asm"
Function4f0bc: ; 4f0bc SEER_INTRO EQU 0
ld a, $0 SEER_CANT_TELL EQU 1
call Function4f26d SEER_MET_AT EQU 2
SEER_TIME_LEVEL EQU 3
SEER_TRADED EQU 4
SEER_CANCEL EQU 5
SEER_EGG EQU 6
SEER_LEVEL_ONLY EQU 7
SpecialPokeSeer: ; 4f0bc
ld a, SEER_INTRO
call PrintSeerText
call Functiona36 call Functiona36
ld b, $6 ld b, $6
callba Function50000 callba Function50000
jr c, .asm_4f0e1 jr c, .cancel
ld a, [CurPartySpecies] ld a, [CurPartySpecies]
cp $fd cp EGG
jr z, .asm_4f0e8 jr z, .egg
call IsAPokemon call IsAPokemon
jr c, .asm_4f0e7 jr c, .no_mon
call Function4f134
call Function4f0ee call ReadCaughtData
call SeerAction
ret ret
.asm_4f0e1 .cancel
ld a, $5 ld a, SEER_CANCEL
call Function4f26d call PrintSeerText
ret ret
.asm_4f0e7 .no_mon
ret ret
.asm_4f0e8 .egg
ld a, $6 ld a, SEER_EGG
call Function4f26d call PrintSeerText
ret ret
; 4f0ee ; 4f0ee
Function4f0ee: ; 4f0ee
ld a, [DefaultFlypoint] SeerAction: ; 4f0ee
ld hl, $70f6 ld a, [$d002]
ld hl, SeerActions
rst JumpTable rst JumpTable
ret ret
; 4f0f6 ; 4f0f6
Table4f0f6: ; 4f0f6 SeerActions: ; 4f0f6
dw Function4f100 dw SeerAction0
dw Function4f10e dw SeerAction1
dw Function4f11f dw SeerAction2
dw Function4f125 dw SeerAction3
dw Function4f12b dw SeerAction4
; 4f100 ; 4f100
Function4f100: ; 4f100 SeerAction0: ; 4f100
ld a, $2 ld a, SEER_MET_AT
call Function4f26d call PrintSeerText
ld a, $3 ld a, SEER_TIME_LEVEL
call Function4f26d call PrintSeerText
call Function4f2b4 call SeerAdvice
ret ret
; 4f10e ; 4f10e
Function4f10e: ; 4f10e SeerAction1: ; 4f10e
call Function4f242 call GetCaughtOT
ld a, $4 ld a, SEER_TRADED
call Function4f26d call PrintSeerText
ld a, $3 ld a, SEER_TIME_LEVEL
call Function4f26d call PrintSeerText
call Function4f2b4 call SeerAdvice
ret ret
; 4f11f ; 4f11f
Function4f11f: ; 4f11f SeerAction2: ; 4f11f
ld a, $1 ld a, SEER_CANT_TELL
call Function4f26d call PrintSeerText
ret ret
; 4f125 ; 4f125
Function4f125: ; 4f125 SeerAction3: ; 4f125
ld a, $1 ld a, SEER_CANT_TELL
call Function4f26d call PrintSeerText
ret ret
; 4f12b ; 4f12b
Function4f12b: ; 4f12b SeerAction4: ; 4f12b
ld a, $7 ld a, SEER_LEVEL_ONLY
call Function4f26d call PrintSeerText
call Function4f2b4 call SeerAdvice
ret ret
; 4f134 ; 4f134
Function4f134: ; 4f134 ReadCaughtData: ; 4f134
ld a, $1d ld a, PartyMon1CaughtData - PartyMon1
call GetPartyParamLocation call GetPartyParamLocation
ld a, [hli] ld a, [hli]
ld [$d03b], a ld [$d03b], a
@ -50530,58 +50544,64 @@ Function4f134: ; 4f134
ld [$d03c], a ld [$d03c], a
or [hl] or [hl]
jr z, .asm_4f170 jr z, .asm_4f170
ld a, $1
ld [DefaultFlypoint], a ld a, 1
ld a, $6 ld [$d002], a
ld a, PartyMon1ID - PartyMon1
call GetPartyParamLocation call GetPartyParamLocation
ld a, [PlayerID] ld a, [PlayerID]
cp [hl] cp [hl]
jr nz, .asm_4f15f jr nz, .asm_4f15f
inc hl inc hl
ld a, [$d47c] ld a, [$d47c]
jr nz, .asm_4f15f jr nz, .asm_4f15f
ld a, $0
ld [DefaultFlypoint], a ld a, 0
ld [$d002], a
.asm_4f15f .asm_4f15f
call Function4f18c call GetCaughtLevel
call Function4f242 call GetCaughtOT
call Function4f176 call GetCaughtName
call Function4f1c5 call GetCaughtTime
call Function4f20a call GetCaughtLocation
and a and a
ret ret
.asm_4f170 .asm_4f170
ld a, $2 ld a, 2
ld [DefaultFlypoint], a ld [$d002], a
ret ret
; 4f176 ; 4f176
Function4f176: ; 4f176 GetCaughtName: ; 4f176
ld a, [CurPartyMon] ld a, [CurPartyMon]
ld hl, PartyMon1Nickname ld hl, PartyMon1Nickname
ld bc, $000b ld bc, PKMN_NAME_LENGTH
call AddNTimes call AddNTimes
ld de, $d003 ld de, $d003
ld bc, $000b ld bc, PKMN_NAME_LENGTH
call CopyBytes call CopyBytes
ret ret
; 4f18c ; 4f18c
Function4f18c: ; 4f18c GetCaughtLevel: ; 4f18c
ld a, $50 ld a, "@"
ld hl, $d036 ld hl, $d036
ld bc, $0004 ld bc, 4
call ByteFill call ByteFill
; caught level
ld a, [$d03b] ld a, [$d03b]
and $3f and $3f
jr z, .asm_4f1b4 jr z, .unknown
cp $1 cp 1 ; hatched from an egg
jr nz, .asm_4f1a4 jr nz, .print
ld a, $5 ld a, 5 ; egg hatch level
.asm_4f1a4 .print
ld [$d03a], a ld [$d03a], a
ld hl, $d036 ld hl, $d036
ld de, $d03a ld de, $d03a
@ -50589,24 +50609,27 @@ Function4f18c: ; 4f18c
call PrintNum call PrintNum
ret ret
.asm_4f1b4 .unknown
ld de, $d036 ld de, $d036
ld hl, $71c1 ld hl, .unknown_level
ld bc, $0004 ld bc, 4
call CopyBytes call CopyBytes
ret ret
; 4f1c1 ; 4f1c1
INCBIN "baserom.gbc",$4f1c1,$4f1c5 - $4f1c1 .unknown_level ; 4f1c1
db "???@"
; 4f1c5
Function4f1c5: ; 4f1c5 GetCaughtTime: ; 4f1c5
ld a, [$d03b] ld a, [$d03b]
and $c0 and $c0
jr z, .asm_4f1df jr z, .none
rlca rlca
rlca rlca
dec a dec a
ld hl, $71e6 ld hl, .times
call GetNthString call GetNthString
ld d, h ld d, h
ld e, l ld e, l
@ -50615,24 +50638,30 @@ Function4f1c5: ; 4f1c5
and a and a
ret ret
.asm_4f1df .none
ld de, $d01f ld de, $d01f
call Function4f1f8 call UnknownCaughtData
ret ret
; 4f1e6 ; 4f1e6
INCBIN "baserom.gbc",$4f1e6,$4f1f8 - $4f1e6 .times ; 4f1e6
db "Morning@"
db "Day@"
db "Night@"
; 4f1f8
Function4f1f8: ; 4f1f8 UnknownCaughtData: ; 4f1f8
ld hl, $7202 ld hl, .unknown
ld bc, $000b ld bc, $000b
call CopyBytes call CopyBytes
ret ret
; 4f202 ; 4f202
INCBIN "baserom.gbc",$4f202,$4f20a - $4f202 .unknown ; 4f202
db "Unknown@"
; 4f20a
Function4f20a: ; 4f20a GetCaughtLocation: ; 4f20a
ld a, [$d03c] ld a, [$d03c]
and $7f and $7f
jr z, .asm_4f22e jr z, .asm_4f22e
@ -50651,22 +50680,22 @@ Function4f20a: ; 4f20a
.asm_4f22e .asm_4f22e
ld de, $d00e ld de, $d00e
jp Function4f1f8 jp UnknownCaughtData
.asm_4f234 .asm_4f234
ld a, $4 ld a, $4
ld [DefaultFlypoint], a ld [$d002], a
scf scf
ret ret
.asm_4f23b .asm_4f23b
ld a, $3 ld a, $3
ld [DefaultFlypoint], a ld [$d002], a
scf scf
ret ret
; 4f242 ; 4f242
Function4f242: ; 4f242 GetCaughtOT: ; 4f242
ld a, [CurPartyMon] ld a, [CurPartyMon]
ld hl, PartyMon1OT ld hl, PartyMon1OT
ld bc, $000b ld bc, $000b
@ -50674,25 +50703,29 @@ Function4f242: ; 4f242
ld de, $d02a ld de, $d02a
ld bc, $000b ld bc, $000b
call CopyBytes call CopyBytes
ld hl, $726b ld hl, .male
ld a, [$d03c] ld a, [$d03c]
bit 7, a bit 7, a
jr z, .asm_4f264 jr z, .asm_4f264
ld hl, $726c ld hl, .female
.asm_4f264 .asm_4f264
ld de, $d035 ld de, $d035
ld a, $50 ld a, "@"
ld [de], a ld [de], a
ret ret
; 4f26b ; 4f26b
INCBIN "baserom.gbc",$4f26b,$4f26d - $4f26b .male ; 4f26b
db "@"
.female ; 4f26c
db "@"
; 4f26d
Function4f26d: ; 4f26d PrintSeerText: ; 4f26d
ld e, a ld e, a
ld d, $0 ld d, 0
ld hl, $727c ld hl, SeerTexts
add hl, de add hl, de
add hl, de add hl, de
ld a, [hli] ld a, [hli]
@ -50702,26 +50735,85 @@ Function4f26d: ; 4f26d
ret ret
; 4f27c ; 4f27c
INCBIN "baserom.gbc",$4f27c,$4f2b4 - $4f27c SeerTexts: ; 4f27c
dw SeerIntroText
dw SeerCantTellText
dw SeerMetAtText
dw SeerTimeLevelText
dw SeerTradedText
dw SeerCancelText
dw SeerEggText
dw SeerLevelOnlyText
; 4f28c
Function4f2b4: ; 4f2b4 SeerIntroText: ; 0x4f28c
ld a, $1f ; 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
ld a, PartyMon1Level - PartyMon1
call GetPartyParamLocation call GetPartyParamLocation
ld a, [$d03a] ld a, [$d03a]
ld c, a ld c, a
ld a, [hl] ld a, [hl]
sub c sub c
ld c, a ld c, a
ld hl, $72d6
ld de, $0003
.asm_4f2c6
cp [hl]
jr c, .asm_4f2ce
jr z, .asm_4f2ce
add hl, de
jr .asm_4f2c6
.asm_4f2ce ld hl, SeerAdviceTexts
ld de, 3
.next
cp [hl]
jr c, .print
jr z, .print
add hl, de
jr .next
.print
inc hl inc hl
ld a, [hli] ld a, [hli]
ld h, [hl] ld h, [hl]
@ -50730,29 +50822,69 @@ Function4f2b4: ; 4f2b4
ret ret
; 4f2d6 ; 4f2d6
INCBIN "baserom.gbc",$4f2d6,$4f301 - $4f2d6 SeerAdviceTexts: ; 4f2d6
; level, text
dbw 9, SeerAdvice1
dbw 29, SeerAdvice2
dbw 59, SeerAdvice3
dbw 89, SeerAdvice4
dbw 100, SeerAdvice5
dbw 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
Function4f301: ; 4f301 GetCaughtGender: ; 4f301
ld hl, $001e ld hl, PartyMon1CaughtGender - PartyMon1
add hl, bc add hl, bc
ld a, [hl] ld a, [hl]
and $7f and $7f
jr z, .asm_4f319 jr z, .genderless
cp $7f cp $7f
jr z, .asm_4f319 jr z, .genderless
ld a, [hl] ld a, [hl]
and $80 and $80
jr nz, .asm_4f316 jr nz, .male
ld c, $1 ld c, 1
ret ret
.asm_4f316 .male
ld c, $2 ld c, 2
ret ret
.asm_4f319 .genderless
ld c, $0 ld c, 0
ret ret
; 4f31c ; 4f31c
@ -82528,7 +82660,7 @@ Functionfcc63: ; fcc63
call Functionfcdd7 call Functionfcdd7
ld b, h ld b, h
ld c, l ld c, l
callba Function4f301 callba GetCaughtGender
ld a, c ld a, c
ld [$c701], a ld [$c701], a
ld e, $0 ld e, $0
@ -92647,7 +92779,7 @@ Function11b7e5: ; 11b7e5
ld a, [hl] ld a, [hl]
ld [$c730], a ld [$c730], a
ld bc, EnemyMovePP ld bc, EnemyMovePP
callba Function4f301 callba GetCaughtGender
ld a, c ld a, c
ld [$c733], a ld [$c733], a
call SpeechTextBox call SpeechTextBox

View File

@ -6,10 +6,10 @@ PokeSeersHouse_MapScriptHeader: ; 0x9e36c
db 0 db 0
; 0x9e36e ; 0x9e36e
GrannyScript_0x9e36e: ; 0x9e36e SeerScript: ; 0x9e36e
faceplayer faceplayer
loadfont loadfont
special $0091 special SPECIAL_POKESEER
closetext closetext
loadmovesprites loadmovesprites
end end
@ -32,6 +32,6 @@ PokeSeersHouse_MapEventHeader: ; 0x9e376
; people-events ; people-events
db 1 db 1
person_event SPRITE_GRANNY, 7, 6, $6, $0, 255, 255, $80, 0, GrannyScript_0x9e36e, $ffff person_event SPRITE_GRANNY, 7, 6, $6, $0, 255, 255, $80, 0, SeerScript, $ffff
; 0x9e393 ; 0x9e393