mirror of
https://github.com/thornAvery/jep-hack.git
synced 2025-09-17 02:30:50 +12:00
hrm...
this at least improves the theoretical nihon wild grass code but it still doesn't work how I want it too... I noticed that the PokeGear considers Route 49 and friends to be Kanto. Maybe there's a problem there? But at the very least, by directly comparing to a landmark, everything should be fine...any brighter people who can help? It's literally just making an if x then y work...
This commit is contained in:
parent
fc0c97f3ad
commit
5953dabd3e
|
@ -422,21 +422,30 @@ _GrassWildmonLookup:
|
||||||
ret c
|
ret c
|
||||||
ld hl, JohtoGrassWildMons
|
ld hl, JohtoGrassWildMons
|
||||||
|
|
||||||
|
; Old Nihon Check from 2023.
|
||||||
|
; Testing new method.
|
||||||
; Nihon Check
|
; Nihon Check
|
||||||
; Basically, conditionally load Nihon or Kanto into de, depending on region check.
|
; Basically, conditionally load Nihon or Kanto into de, depending on region check.
|
||||||
; IsInJohto returns 1 if Kanto, 2 if Nihon.
|
; IsInJohto returns 1 if Kanto, 2 if Nihon.
|
||||||
; This way, when _JohtoWildmonCheck loads, it'll have Nihon's spliced in if you're there.
|
; This way, when _JohtoWildmonCheck loads, it'll have Nihon's spliced in if you're there.
|
||||||
; This is INCREDIBLY suboptimal. Consider revising.
|
; This is INCREDIBLY suboptimal. Consider revising.
|
||||||
; As of 3rd Nov '23, this works correctly for Johto and Kanto, but Nihon routes will return nothing.
|
; As of 3rd Nov '23, this works correctly for Johto and Kanto, but Nihon routes will return nothing.
|
||||||
call IsInJohto ; Run IsInJohto
|
; call IsInJohto ; Run IsInJohto
|
||||||
cp 1 ; If we're in Kanto...
|
; cp 1 ; If we're in Kanto...
|
||||||
jr z, .skip ; Skip the splicing.
|
; jr z, .skip ; Skip the splicing.
|
||||||
ld de, NihonGrassWildMons ; No? Splice in Nihon.
|
; ld de, NihonGrassWildMons ; No? Splice in Nihon.
|
||||||
jr .skip2 ; Now skip loading Kanto.
|
; jr .skip2 ; Now skip loading Kanto.
|
||||||
.skip ; If you skip here, you're in Kanto.
|
;.skip ; If you skip here, you're in Kanto.
|
||||||
ld de, KantoGrassWildMons ; So take this as normal.
|
; ld de, KantoGrassWildMons ; So take this as normal.
|
||||||
; fallthrough
|
; ; fallthrough
|
||||||
.skip2 ; If you skip here, you're in Nihon or Johto.
|
;.skip2 ; If you skip here, you're in Nihon or Johto.
|
||||||
|
|
||||||
|
ld de, NihonGrassWildMons
|
||||||
|
call GetWorldMapLocation
|
||||||
|
cp NIHON_LANDMARK
|
||||||
|
jr z, .skip2
|
||||||
|
ld de, KantoGrassWildMons
|
||||||
|
.skip2
|
||||||
|
|
||||||
call _JohtoWildmonCheck ; So run this check. More commentary there.
|
call _JohtoWildmonCheck ; So run this check. More commentary there.
|
||||||
ld bc, GRASS_WILDDATA_LENGTH
|
ld bc, GRASS_WILDDATA_LENGTH
|
||||||
|
@ -450,14 +459,11 @@ _WaterWildmonLookup:
|
||||||
ld hl, JohtoWaterWildMons
|
ld hl, JohtoWaterWildMons
|
||||||
|
|
||||||
; Nihon Check 2
|
; Nihon Check 2
|
||||||
call IsInJohto
|
|
||||||
cp 1
|
|
||||||
jr z, .skip
|
|
||||||
ld de, NihonWaterWildMons
|
ld de, NihonWaterWildMons
|
||||||
jr .skip2
|
call GetWorldMapLocation
|
||||||
.skip
|
cp NIHON_LANDMARK
|
||||||
|
jr z, .skip2
|
||||||
ld de, KantoWaterWildMons
|
ld de, KantoWaterWildMons
|
||||||
; fallthrough
|
|
||||||
.skip2
|
.skip2
|
||||||
|
|
||||||
call _JohtoWildmonCheck
|
call _JohtoWildmonCheck
|
||||||
|
@ -474,8 +480,10 @@ _JohtoWildmonCheck:
|
||||||
call IsInJohto ; Check if we're in Johto or not.
|
call IsInJohto ; Check if we're in Johto or not.
|
||||||
and a ; Are we?
|
and a ; Are we?
|
||||||
ret z ; If zero, skip. This means you're in Johto, so you take what's in hl.
|
ret z ; If zero, skip. This means you're in Johto, so you take what's in hl.
|
||||||
|
|
||||||
ld h, d ; If you're not, though, you take what's in d...
|
ld h, d ; If you're not, though, you take what's in d...
|
||||||
ld l, e ; and e.
|
ld l, e ; and e.
|
||||||
|
|
||||||
ret ; Therefore, you'll take either Kanto or Nihon wild data.
|
ret ; Therefore, you'll take either Kanto or Nihon wild data.
|
||||||
|
|
||||||
_SwarmWildmonCheck:
|
_SwarmWildmonCheck:
|
||||||
|
|
Loading…
Reference in a new issue