summaryrefslogtreecommitdiff
path: root/engine
diff options
context:
space:
mode:
Diffstat (limited to 'engine')
-rwxr-xr-xengine/battle/end_of_battle.asm14
-rw-r--r--engine/battle/wild_encounters.asm11
2 files changed, 14 insertions, 11 deletions
diff --git a/engine/battle/end_of_battle.asm b/engine/battle/end_of_battle.asm
index 2f84c6fe..5782b274 100755
--- a/engine/battle/end_of_battle.asm
+++ b/engine/battle/end_of_battle.asm
@@ -1,4 +1,4 @@
-EndOfBattle: ; 137aa (4:77aa)
+EndOfBattle: ; 13765 (4:7765)
ld a, [wLinkState]
cp LINK_STATE_BATTLING
jr nz, .notLinkBattle
@@ -10,6 +10,8 @@ EndOfBattle: ; 137aa (4:77aa)
ld a, [wEnemyMonStatus]
ld [hl], a
call ClearScreen
+ ld b, SET_PAL_OVERWORLD
+ call RunPaletteCommand
callab DisplayLinkBattleVersusTextBox
ld a, [wBattleResult]
cp $1
@@ -43,6 +45,8 @@ EndOfBattle: ; 137aa (4:77aa)
xor a
ld [wForceEvolution], a
predef EvolutionAfterBattle
+ ld d, $82
+ callab Func_fce5a
.resetVariables
xor a
ld [wLowHealthAlarm], a ;disable low health alarm
@@ -74,15 +78,15 @@ EndOfBattle: ; 137aa (4:77aa)
ld [wDestinationWarpID], a
ret
-YouWinText: ; 13853 (4:7853)
+YouWinText: ; 1381d (4:781d)
db "YOU WIN@"
-YouLoseText: ; 1385b (4:785b)
+YouLoseText: ; 13825 (4:7825)
db "YOU LOSE@"
-DrawText: ; 13864 (4:7864)
+DrawText: ; 1382e (4:782e)
db " DRAW@"
-PickUpPayDayMoneyText: ; 1386b (4:786b)
+PickUpPayDayMoneyText: ; 13835 (4:7835)
TX_FAR _PickUpPayDayMoneyText
db "@"
diff --git a/engine/battle/wild_encounters.asm b/engine/battle/wild_encounters.asm
index 044f7ea5..f2f2f457 100644
--- a/engine/battle/wild_encounters.asm
+++ b/engine/battle/wild_encounters.asm
@@ -1,6 +1,6 @@
; try to initiate a wild pokemon encounter
; returns success in Z
-TryDoWildEncounter: ; 13870 (4:7870)
+TryDoWildEncounter: ; 1383a (4:783a)
ld a, [wNPCMovementScriptPointerTableNum]
and a
ret nz
@@ -24,8 +24,9 @@ TryDoWildEncounter: ; 13870 (4:7870)
ld [wRepelRemainingSteps], a
.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
+; is the bottom left tile (8,9) of the half-block we're standing in a grass/water tile?
+; note that by using the bottom left tile, this prevents the "left-shore" tiles from generating grass encounters
+ coord hl, 8, 9
ld c, [hl]
ld a, [wGrassTile]
cp c
@@ -68,8 +69,6 @@ TryDoWildEncounter: ; 13870 (4:7870)
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
-; since the bottom right tile of a "left shore" half-block is $14 but the bottom left tile is not,
-; "left shore" half-blocks (such as the one in the east coast of Cinnabar) load grass encounters.
.gotWildEncounterType
ld b, 0
add hl, bc
@@ -101,7 +100,7 @@ TryDoWildEncounter: ; 13870 (4:7870)
xor a
ret
-WildMonEncounterSlotChances: ; 13918 (4:7918)
+WildMonEncounterSlotChances: ; 138e2 (4:78e2)
; There are 10 slots for wild pokemon, and this is the table that defines how common each of
; those 10 slots is. A random number is generated and then the first byte of each pair in this
; table is compared against that random number. If the random number is less than or equal