mirror of
https://github.com/thornAvery/jep-hack.git
synced 2025-09-16 10:13:24 +12:00
fixed shiny palette on pokedex new entry + gamecorner
This commit is contained in:
parent
7a8d406605
commit
bc42af64c5
|
@ -69,6 +69,7 @@ SpecialsPointers::
|
||||||
add_special UpdateSprites ; bank 0
|
add_special UpdateSprites ; bank 0
|
||||||
add_special UpdatePlayerSprite ; bank 0
|
add_special UpdatePlayerSprite ; bank 0
|
||||||
add_special GameCornerPrizeMonCheckDex
|
add_special GameCornerPrizeMonCheckDex
|
||||||
|
add_special GameCornerPrizeMonShowDex
|
||||||
add_special UnusedSetSeenMon ; unused
|
add_special UnusedSetSeenMon ; unused
|
||||||
add_special WaitSFX ; bank 0
|
add_special WaitSFX ; bank 0
|
||||||
add_special PlayMapMusic ; bank 0
|
add_special PlayMapMusic ; bank 0
|
||||||
|
|
|
@ -236,17 +236,26 @@ SetPlayerPalette:
|
||||||
ret
|
ret
|
||||||
|
|
||||||
GameCornerPrizeMonCheckDex:
|
GameCornerPrizeMonCheckDex:
|
||||||
|
xor a
|
||||||
|
ld [wPokedexShinyToggle], a
|
||||||
|
ld [wWasMonCaught], a
|
||||||
ld a, [wScriptVar]
|
ld a, [wScriptVar]
|
||||||
call CheckCaughtMon
|
call CheckCaughtMon
|
||||||
ret nz
|
ret nz
|
||||||
ld a, [wScriptVar]
|
ld a, 1
|
||||||
call SetSeenAndCaughtMon
|
ld [wWasMonCaught], a
|
||||||
|
ret
|
||||||
|
|
||||||
|
GameCornerPrizeMonShowDex:
|
||||||
|
ld a, [wWasMonCaught]
|
||||||
|
cp 0
|
||||||
|
ret z
|
||||||
call FadeToMenu
|
call FadeToMenu
|
||||||
ld a, [wScriptVar]
|
ld a, [wScriptVar]
|
||||||
ld [wNamedObjectIndex], a
|
ld [wNamedObjectIndex], a
|
||||||
farcall NewPokedexEntry
|
farcall NewPokedexEntry
|
||||||
call ExitAllMenus
|
call ExitAllMenus
|
||||||
ret
|
ret
|
||||||
|
|
||||||
UnusedSetSeenMon:
|
UnusedSetSeenMon:
|
||||||
ld a, [wScriptVar]
|
ld a, [wScriptVar]
|
||||||
|
|
|
@ -532,6 +532,15 @@ PokeBallEffect:
|
||||||
|
|
||||||
ld a, [wEnemyMonSpecies]
|
ld a, [wEnemyMonSpecies]
|
||||||
ld [wTempSpecies], a
|
ld [wTempSpecies], a
|
||||||
|
farcall BattleCheckEnemyShininess
|
||||||
|
jp c, .shiny
|
||||||
|
xor a
|
||||||
|
jp .shinycont
|
||||||
|
.shiny
|
||||||
|
xor a
|
||||||
|
inc a
|
||||||
|
.shinycont
|
||||||
|
ld [wPokedexShinyToggle], a
|
||||||
predef NewPokedexEntry
|
predef NewPokedexEntry
|
||||||
|
|
||||||
.skip_pokedex
|
.skip_pokedex
|
||||||
|
|
|
@ -1,13 +1,4 @@
|
||||||
NewPokedexEntry:
|
NewPokedexEntry:
|
||||||
farcall BattleCheckEnemyShininess
|
|
||||||
jp c, .shiny
|
|
||||||
xor a
|
|
||||||
jp .cont
|
|
||||||
.shiny
|
|
||||||
xor a
|
|
||||||
inc a
|
|
||||||
.cont
|
|
||||||
ld [wPokedexShinyToggle], a
|
|
||||||
ldh a, [hMapAnims]
|
ldh a, [hMapAnims]
|
||||||
push af
|
push af
|
||||||
xor a
|
xor a
|
||||||
|
|
|
@ -210,8 +210,24 @@ endr
|
||||||
inc de
|
inc de
|
||||||
ld a, c
|
ld a, c
|
||||||
ld [de], a
|
ld [de], a
|
||||||
inc de
|
|
||||||
|
|
||||||
|
; Set Shininess for New Dex Entry
|
||||||
|
dec de
|
||||||
|
ld b, d
|
||||||
|
ld c, e
|
||||||
|
farcall CheckShininess
|
||||||
|
jp c, .shiny
|
||||||
|
xor a
|
||||||
|
jp .shinycont
|
||||||
|
.shiny
|
||||||
|
xor a
|
||||||
|
inc a
|
||||||
|
.shinycont
|
||||||
|
ld [wPokedexShinyToggle], a
|
||||||
|
; Unclobber de
|
||||||
|
inc de
|
||||||
|
inc de
|
||||||
|
|
||||||
; Initialize PP.
|
; Initialize PP.
|
||||||
push hl
|
push hl
|
||||||
push de
|
push de
|
||||||
|
|
|
@ -190,6 +190,8 @@ GoldenrodGameCornerPrizeMonVendorScript:
|
||||||
loadmonindex 1, ABRA
|
loadmonindex 1, ABRA
|
||||||
special GameCornerPrizeMonCheckDex
|
special GameCornerPrizeMonCheckDex
|
||||||
givepoke ABRA, 5
|
givepoke ABRA, 5
|
||||||
|
loadmonindex 1, ABRA
|
||||||
|
special GameCornerPrizeMonShowDex
|
||||||
takecoins GOLDENRODGAMECORNER_ABRA_COINS
|
takecoins GOLDENRODGAMECORNER_ABRA_COINS
|
||||||
sjump .loop
|
sjump .loop
|
||||||
|
|
||||||
|
@ -208,6 +210,8 @@ GoldenrodGameCornerPrizeMonVendorScript:
|
||||||
loadmonindex 2, CUBONE
|
loadmonindex 2, CUBONE
|
||||||
special GameCornerPrizeMonCheckDex
|
special GameCornerPrizeMonCheckDex
|
||||||
givepoke CUBONE, 15
|
givepoke CUBONE, 15
|
||||||
|
loadmonindex 2, CUBONE
|
||||||
|
special GameCornerPrizeMonShowDex
|
||||||
takecoins GOLDENRODGAMECORNER_CUBONE_COINS
|
takecoins GOLDENRODGAMECORNER_CUBONE_COINS
|
||||||
sjump .loop
|
sjump .loop
|
||||||
|
|
||||||
|
@ -226,6 +230,8 @@ GoldenrodGameCornerPrizeMonVendorScript:
|
||||||
loadmonindex 3, WOBBUFFET
|
loadmonindex 3, WOBBUFFET
|
||||||
special GameCornerPrizeMonCheckDex
|
special GameCornerPrizeMonCheckDex
|
||||||
givepoke WOBBUFFET, 15
|
givepoke WOBBUFFET, 15
|
||||||
|
loadmonindex 3, WOBBUFFET
|
||||||
|
special GameCornerPrizeMonShowDex
|
||||||
takecoins GOLDENRODGAMECORNER_WOBBUFFET_COINS
|
takecoins GOLDENRODGAMECORNER_WOBBUFFET_COINS
|
||||||
sjump .loop
|
sjump .loop
|
||||||
|
|
||||||
|
|
|
@ -739,6 +739,7 @@ wPokedexDisplayNumber:: dw
|
||||||
wDexLastSeenIndex:: db ; index into wPokedexSeen containing the last non-zero value
|
wDexLastSeenIndex:: db ; index into wPokedexSeen containing the last non-zero value
|
||||||
wDexLastSeenValue:: db ; value at index
|
wDexLastSeenValue:: db ; value at index
|
||||||
wDexTempCounter:: dw
|
wDexTempCounter:: dw
|
||||||
|
wWasMonCaught:: db ; for use with givepoke
|
||||||
wPokedexDataEnd::
|
wPokedexDataEnd::
|
||||||
|
|
||||||
wPrevDexEntry:: dw
|
wPrevDexEntry:: dw
|
||||||
|
|
Loading…
Reference in a new issue