aboutsummaryrefslogtreecommitdiffstats
path: root/engine/battle/wild_encounters.asm
diff options
context:
space:
mode:
authorSylvie <35663410+Rangi42@users.noreply.github.com>2024-07-16 13:02:54 -0400
committerGitHub <noreply@github.com>2024-07-16 13:02:54 -0400
commit8fafca714c07500d1d87bba224f12cf9cc2c8789 (patch)
tree273ca88fcfcd80df9c318c9cb8d17a1f7aa240cb /engine/battle/wild_encounters.asm
parentBuild with RGBDS 0.8.0, though it is not yet required (diff)
downloadpokeyellow-8fafca714c07500d1d87bba224f12cf9cc2c8789.tar.gz
pokeyellow-8fafca714c07500d1d87bba224f12cf9cc2c8789.tar.xz
pokeyellow-8fafca714c07500d1d87bba224f12cf9cc2c8789.zip
Identify various flag labels and bit constants (#454)
Diffstat (limited to 'engine/battle/wild_encounters.asm')
-rw-r--r--engine/battle/wild_encounters.asm8
1 files changed, 4 insertions, 4 deletions
diff --git a/engine/battle/wild_encounters.asm b/engine/battle/wild_encounters.asm
index 8c9c1529..eede46ed 100644
--- a/engine/battle/wild_encounters.asm
+++ b/engine/battle/wild_encounters.asm
@@ -4,8 +4,8 @@ TryDoWildEncounter:
ld a, [wNPCMovementScriptPointerTableNum]
and a
ret nz
- ld a, [wd736]
- and a
+ ld a, [wMovementFlags]
+ and a ; is player exiting a door, jumping over a ledge, or fishing?
ret nz
callfar IsPlayerStandingOnDoorTileOrWarpTile
jr nc, .notStandingOnDoorOrWarpTile
@@ -74,7 +74,7 @@ TryDoWildEncounter:
ld b, 0
add hl, bc
ld a, [hli]
- ld [wCurEnemyLVL], a
+ ld [wCurEnemyLevel], a
ld a, [hl]
ld [wcf91], a
ld [wEnemyMonSpecies2], a
@@ -83,7 +83,7 @@ TryDoWildEncounter:
jr z, .willEncounter
ld a, [wPartyMon1Level]
ld b, a
- ld a, [wCurEnemyLVL]
+ ld a, [wCurEnemyLevel]
cp b
jr c, .CantEncounter2 ; repel prevents encounters if the leading party mon's level is higher than the wild mon
jr .willEncounter