Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- FindNest:
- ; Parameters:
- ; e: 0 = Johto, 1 = Kanto
- ; wNamedObjectIndex: species
- hlcoord 0, 0
- ld bc, SCREEN_WIDTH * SCREEN_HEIGHT
- xor a
- call ByteFill
- ld a, e
- and a
- jr nz, .kanto
- decoord 0, 0
- ld hl, JohtoGrassWildMons
- call .FindGrass
- ld hl, JohtoWaterWildMons
- call .FindWater
- call .RoamMon1
- call .RoamMon2
- ret
- .kanto
- decoord 0, 0
- ld hl, KantoGrassWildMons
- call .FindGrass
- ld hl, KantoWaterWildMons
- jp .FindWater
- .FindGrass:
- ld a, [hl]
- cp -1
- ret z
- push hl
- ld a, [hli]
- ld b, a
- ld a, [hli]
- ld c, a
- inc hl
- inc hl
- inc hl
- ld a, NUM_GRASSMON * 3
- call .SearchMapForMon
- jr nc, .next_grass
- ld [de], a
- inc de
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement