diff options
Diffstat (limited to 'engine/battle/wild_encounters.asm')
-rw-r--r-- | engine/battle/wild_encounters.asm | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/engine/battle/wild_encounters.asm b/engine/battle/wild_encounters.asm index 9d6fcb8d..e24f9632 100644 --- a/engine/battle/wild_encounters.asm +++ b/engine/battle/wild_encounters.asm @@ -7,14 +7,14 @@ TryDoWildEncounter: ld a, [wd736] and a ret nz - callab IsPlayerStandingOnDoorTileOrWarpTile + callfar IsPlayerStandingOnDoorTileOrWarpTile jr nc, .notStandingOnDoorOrWarpTile .CantEncounter ld a, $1 and a ret .notStandingOnDoorOrWarpTile - callab IsPlayerJustOutsideMap + callfar IsPlayerJustOutsideMap jr z, .CantEncounter ld a, [wRepelRemainingSteps] and a @@ -25,7 +25,7 @@ TryDoWildEncounter: .next ; determine if wild pokemon can appear in the half-block we're standing in ; is the bottom right tile (9,9) of the half-block we're standing in a grass/water tile? - coord hl, 9, 9 + hlcoord 9, 9 ld c, [hl] ld a, [wGrassTile] cp c @@ -48,10 +48,10 @@ TryDoWildEncounter: .CanEncounter ; compare encounter chance with a random number to determine if there will be an encounter ld b, a - ld a, [hRandomAdd] + ldh a, [hRandomAdd] cp b jr nc, .CantEncounter2 - ld a, [hRandomSub] + ldh a, [hRandomSub] ld b, a ld hl, WildMonEncounterSlotChances .determineEncounterSlot @@ -64,7 +64,7 @@ TryDoWildEncounter: ; determine which wild pokemon (grass or water) can appear in the half-block we're standing in ld c, [hl] ld hl, wGrassMons - aCoord 8, 9 + lda_coord 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 ld hl, wWaterMons @@ -90,7 +90,7 @@ TryDoWildEncounter: .lastRepelStep ld [wRepelRemainingSteps], a ld a, TEXT_REPEL_WORE_OFF - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a call EnableAutoTextBoxDrawing call DisplayTextID .CantEncounter2 |