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
|
||||
ld hl, JohtoGrassWildMons
|
||||
|
||||
; Old Nihon Check from 2023.
|
||||
; Testing new method.
|
||||
; Nihon Check
|
||||
; Basically, conditionally load Nihon or Kanto into de, depending on region check.
|
||||
; 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 is INCREDIBLY suboptimal. Consider revising.
|
||||
; As of 3rd Nov '23, this works correctly for Johto and Kanto, but Nihon routes will return nothing.
|
||||
call IsInJohto ; Run IsInJohto
|
||||
cp 1 ; If we're in Kanto...
|
||||
jr z, .skip ; Skip the splicing.
|
||||
ld de, NihonGrassWildMons ; No? Splice in Nihon.
|
||||
jr .skip2 ; Now skip loading Kanto.
|
||||
.skip ; If you skip here, you're in Kanto.
|
||||
ld de, KantoGrassWildMons ; So take this as normal.
|
||||
; fallthrough
|
||||
.skip2 ; If you skip here, you're in Nihon or Johto.
|
||||
; call IsInJohto ; Run IsInJohto
|
||||
; cp 1 ; If we're in Kanto...
|
||||
; jr z, .skip ; Skip the splicing.
|
||||
; ld de, NihonGrassWildMons ; No? Splice in Nihon.
|
||||
; jr .skip2 ; Now skip loading Kanto.
|
||||
;.skip ; If you skip here, you're in Kanto.
|
||||
; ld de, KantoGrassWildMons ; So take this as normal.
|
||||
; ; fallthrough
|
||||
;.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.
|
||||
ld bc, GRASS_WILDDATA_LENGTH
|
||||
|
@ -450,16 +459,13 @@ _WaterWildmonLookup:
|
|||
ld hl, JohtoWaterWildMons
|
||||
|
||||
; Nihon Check 2
|
||||
call IsInJohto
|
||||
cp 1
|
||||
jr z, .skip
|
||||
ld de, NihonWaterWildMons
|
||||
jr .skip2
|
||||
.skip
|
||||
call GetWorldMapLocation
|
||||
cp NIHON_LANDMARK
|
||||
jr z, .skip2
|
||||
ld de, KantoWaterWildMons
|
||||
; fallthrough
|
||||
.skip2
|
||||
|
||||
|
||||
call _JohtoWildmonCheck
|
||||
ld bc, WATER_WILDDATA_LENGTH
|
||||
jr _NormalWildmonOK
|
||||
|
@ -474,8 +480,10 @@ _JohtoWildmonCheck:
|
|||
call IsInJohto ; Check if we're in Johto or not.
|
||||
and a ; Are we?
|
||||
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 l, e ; and e.
|
||||
|
||||
ret ; Therefore, you'll take either Kanto or Nihon wild data.
|
||||
|
||||
_SwarmWildmonCheck:
|
||||
|
|
Loading…
Reference in a new issue