mirror of
https://github.com/thornAvery/kep-hack.git
synced 2026-02-22 07:02:17 +13:00
No more W_
This commit is contained in:
parent
1ee9fb408c
commit
38065a744d
190 changed files with 2202 additions and 2202 deletions
|
|
@ -27,9 +27,9 @@ TryDoWildEncounter: ; 13870 (4:7870)
|
|||
; is the bottom right tile (9,9) of the half-block we're standing in a grass/water tile?
|
||||
coord hl, 9, 9
|
||||
ld c, [hl]
|
||||
ld a, [W_GRASSTILE]
|
||||
ld a, [wGrassTile]
|
||||
cp c
|
||||
ld a, [W_GRASSRATE]
|
||||
ld a, [wGrassRate]
|
||||
jr z, .CanEncounter
|
||||
ld a, $14 ; in all tilesets with a water tile, this is its id
|
||||
cp c
|
||||
|
|
@ -38,13 +38,13 @@ TryDoWildEncounter: ; 13870 (4:7870)
|
|||
; even if not in grass/water, standing anywhere we can encounter pokemon
|
||||
; so long as the map is "indoor" and has wild pokemon defined.
|
||||
; ...as long as it's not Viridian Forest or Safari Zone.
|
||||
ld a, [W_CURMAP]
|
||||
ld a, [wCurMap]
|
||||
cp REDS_HOUSE_1F ; is this an indoor map?
|
||||
jr c, .CantEncounter2
|
||||
ld a, [W_CURMAPTILESET]
|
||||
ld a, [wCurMapTileset]
|
||||
cp FOREST ; Viridian Forest/Safari Zone
|
||||
jr z, .CantEncounter2
|
||||
ld a, [W_GRASSRATE]
|
||||
ld a, [wGrassRate]
|
||||
.CanEncounter
|
||||
; compare encounter chance with a random number to determine if there will be an encounter
|
||||
ld b, a
|
||||
|
|
@ -63,7 +63,7 @@ TryDoWildEncounter: ; 13870 (4:7870)
|
|||
.gotEncounterSlot
|
||||
; determine which wild pokemon (grass or water) can appear in the half-block we're standing in
|
||||
ld c, [hl]
|
||||
ld hl, W_GRASSMONS
|
||||
ld hl, wGrassMons
|
||||
aCoord 8, 9
|
||||
cp $14 ; is the bottom left tile (8,9) of the half-block we're standing in a water tile?
|
||||
jr nz, .gotWildEncounterType ; else, it's treated as a grass tile by default
|
||||
|
|
@ -74,7 +74,7 @@ TryDoWildEncounter: ; 13870 (4:7870)
|
|||
ld b, 0
|
||||
add hl, bc
|
||||
ld a, [hli]
|
||||
ld [W_CURENEMYLVL], a
|
||||
ld [wCurEnemyLVL], a
|
||||
ld a, [hl]
|
||||
ld [wcf91], a
|
||||
ld [wEnemyMonSpecies2], a
|
||||
|
|
@ -83,7 +83,7 @@ TryDoWildEncounter: ; 13870 (4:7870)
|
|||
jr z, .willEncounter
|
||||
ld a, [wPartyMon1Level]
|
||||
ld b, a
|
||||
ld a, [W_CURENEMYLVL]
|
||||
ld a, [wCurEnemyLVL]
|
||||
cp b
|
||||
jr c, .CantEncounter2 ; repel prevents encounters if the leading party mon's level is higher than the wild mon
|
||||
jr .willEncounter
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue