summaryrefslogtreecommitdiff
path: root/engine/battle
diff options
context:
space:
mode:
Diffstat (limited to 'engine/battle')
-rwxr-xr-xengine/battle/animations.asm10
-rw-r--r--engine/battle/battle_transitions.asm155
-rw-r--r--engine/battle/common_text.asm66
-rwxr-xr-xengine/battle/core.asm281
-rw-r--r--engine/battle/decrement_pp.asm4
-rw-r--r--engine/battle/get_trainer_name.asm11
-rw-r--r--engine/battle/ghost_marowak_anim.asm9
-rw-r--r--engine/battle/init_battle_variables.asm2
-rw-r--r--engine/battle/link_battle_versus_text.asm5
-rw-r--r--engine/battle/moveEffects/focus_energy_effect.asm4
-rw-r--r--engine/battle/moveEffects/heal_effect.asm14
-rw-r--r--engine/battle/moveEffects/mist_effect.asm4
-rw-r--r--engine/battle/moveEffects/one_hit_ko_effect.asm4
-rw-r--r--engine/battle/moveEffects/paralyze_effect.asm2
-rw-r--r--engine/battle/moveEffects/pay_day_effect.asm4
-rw-r--r--engine/battle/moveEffects/reflect_light_screen_effect.asm14
-rw-r--r--engine/battle/moveEffects/transform_effect.asm15
-rwxr-xr-xengine/battle/safari_zone.asm16
-rw-r--r--engine/battle/scroll_draw_trainer_pic.asm4
-rw-r--r--engine/battle/unused_stats_functions.asm4
20 files changed, 224 insertions, 404 deletions
diff --git a/engine/battle/animations.asm b/engine/battle/animations.asm
index 6d0f0e5f..626eea9e 100755
--- a/engine/battle/animations.asm
+++ b/engine/battle/animations.asm
@@ -367,15 +367,7 @@ AnimationTileset2: ; 786ee (1e:46ee)
INCBIN "gfx/attack_anim_2.2bpp"
SlotMachineTiles2: ; 78bde (1e:4bde)
-IF DEF(_RED)
- INCBIN "gfx/red/slotmachine2.2bpp"
-ENDC
-IF DEF(_BLUE)
- INCBIN "gfx/blue/slotmachine2.2bpp"
-ENDC
-IF DEF(_YELLOW)
- INCBIN "gfx/yellow/slotmachine2.2bpp"
-ENDC
+ INCBIN "gfx/slotmachine2.2bpp"
MoveAnimation: ; 78d5e (1e:4d5e)
push hl
diff --git a/engine/battle/battle_transitions.asm b/engine/battle/battle_transitions.asm
index 9a5f62b1..642d457b 100644
--- a/engine/battle/battle_transitions.asm
+++ b/engine/battle/battle_transitions.asm
@@ -1,5 +1,5 @@
-BattleTransition: ; 7096d (1c:496d)
- ld a, 1
+BattleTransition: ; 709d7 (1c:49d7)
+ ld a, $1
ld [H_AUTOBGTRANSFERENABLED], a
call Delay3
xor a
@@ -70,7 +70,7 @@ BattleTransition: ; 7096d (1c:496d)
; bit 0: set if trainer battle
; bit 1: set if enemy is at least 3 levels higher than player
; bit 2: set if dungeon map
-BattleTransitions: ; 709d2 (1c:49d2)
+BattleTransitions: ; 70a3c (1c:4a3c)
dw BattleTransition_DoubleCircle ; %000
dw BattleTransition_Spiral ; %001
dw BattleTransition_Circle ; %010
@@ -80,7 +80,7 @@ BattleTransitions: ; 709d2 (1c:49d2)
dw BattleTransition_VerticalStripes ; %110
dw BattleTransition_Split ; %111
-GetBattleTransitionID_WildOrTrainer: ; 709e2 (1c:49e2)
+GetBattleTransitionID_WildOrTrainer: ; 70a4c (1c:4a4c)
ld a, [W_CUROPPONENT]
cp 200
jr nc, .trainer
@@ -90,7 +90,7 @@ GetBattleTransitionID_WildOrTrainer: ; 709e2 (1c:49e2)
set 0, c
ret
-GetBattleTransitionID_CompareLevels: ; 709ef (1c:49ef)
+GetBattleTransitionID_CompareLevels: ; 70a59 (1c:4a59)
ld hl, wPartyMon1HP
.faintedLoop
ld a, [hli]
@@ -121,7 +121,7 @@ GetBattleTransitionID_CompareLevels: ; 709ef (1c:49ef)
; fails to recognize VICTORY_ROAD_2, VICTORY_ROAD_3, all ROCKET_HIDEOUT maps,
; MANSION_1, SEAFOAM_ISLANDS_[2-5], POWER_PLANT, DIGLETTS_CAVE
; and SILPH_CO_[9-11]F as dungeon maps
-GetBattleTransitionID_IsDungeonMap: ; 70a19 (1c:4a19)
+GetBattleTransitionID_IsDungeonMap: ; 70a83 (1c:4a83)
ld a, [W_CURMAP]
ld e, a
ld hl, DungeonMaps1
@@ -153,7 +153,7 @@ GetBattleTransitionID_IsDungeonMap: ; 70a19 (1c:4a19)
; GetBattleTransitionID_IsDungeonMap checks if W_CURMAP
; is equal to one of these maps
-DungeonMaps1: ; 70a3f (1c:4a3f)
+DungeonMaps1: ; 70aa9 (1c:4aa9)
db VIRIDIAN_FOREST
db ROCK_TUNNEL_1
db SEAFOAM_ISLANDS_1
@@ -162,7 +162,7 @@ DungeonMaps1: ; 70a3f (1c:4a3f)
; GetBattleTransitionID_IsDungeonMap checks if W_CURMAP
; is in between or equal to each pair of maps
-DungeonMaps2: ; 70a44 (1c:4a44)
+DungeonMaps2: ; 70aac (1c:4aac)
; all MT_MOON maps
db MT_MOON_1
db MT_MOON_3
@@ -181,29 +181,37 @@ DungeonMaps2: ; 70a44 (1c:4a44)
db UNKNOWN_DUNGEON_1
db $FF
-LoadBattleTransitionTile: ; 70a4d (1c:4a4d)
+LoadBattleTransitionTile: ; 70ab7 (1c:4ab7)
ld hl, vChars1 + $7f0
ld de, BattleTransitionTile
lb bc, BANK(BattleTransitionTile), (BattleTransitionTileEnd - BattleTransitionTile) / $10
jp CopyVideoData
-BattleTransitionTile: ; 70a59 (1c:4a59)
+BattleTransitionTile: ; 70ac3 (1c:4ac3)
INCBIN "gfx/battle_transition.2bpp"
BattleTransitionTileEnd:
-BattleTransition_BlackScreen: ; 70a69 (1c:4a69)
+BattleTransition_BlackScreen: ; 70ad3 (1c:4ad3)
ld a, $ff
ld [rBGP], a
ld [rOBP0], a
ld [rOBP1], a
+ call Func_3021
+ call Func_3040
+ call Func_3061
ret
; for non-dungeon trainer battles
; called regardless of mon levels, but does an
; outward spiral if enemy is at least 3 levels
; higher than player and does an inward spiral otherwise
+<<<<<<< HEAD
+BattleTransition_Spiral: ; 70ae5 (1c:4ae5)
+ ld a, [wcd47]
+=======
BattleTransition_Spiral: ; 70a72 (1c:4a72)
ld a, [wBattleTransitionSpiralDirection]
+>>>>>>> 1a987d1e1ab96ca9553d4253c72858057332a03a
and a
jr z, .outwardSpiral
call BattleTransition_InwardSpiral
@@ -235,12 +243,21 @@ BattleTransition_Spiral: ; 70a72 (1c:4a72)
ld [wOutwardSpiralTileMapPointer], a
ret
+<<<<<<< HEAD
+BattleTransition_InwardSpiral: ; 70b1d (1c:4b1d)
+ ld a, $7
+ ld [wWhichTrade], a
+ ld hl, wTileMap
+ ld c, $11
+ ld de, $14
+=======
BattleTransition_InwardSpiral: ; 70aaa (1c:4aaa)
ld a, 7
ld [wInwardSpiralUpdateScreenCounter], a
coord hl, 0, 0
ld c, SCREEN_HEIGHT - 1
ld de, SCREEN_WIDTH
+>>>>>>> 1a987d1e1ab96ca9553d4253c72858057332a03a
call BattleTransition_InwardSpiral_
inc c
jr .skip
@@ -253,7 +270,11 @@ BattleTransition_InwardSpiral: ; 70aaa (1c:4aaa)
call BattleTransition_InwardSpiral_
dec c
dec c
+<<<<<<< HEAD
+ ld de, -$14
+=======
ld de, -SCREEN_WIDTH
+>>>>>>> 1a987d1e1ab96ca9553d4253c72858057332a03a
call BattleTransition_InwardSpiral_
inc c
ld de, -1
@@ -265,7 +286,7 @@ BattleTransition_InwardSpiral: ; 70aaa (1c:4aaa)
jr nz, .loop
ret
-BattleTransition_InwardSpiral_: ; 70ae0 (1c:4ae0)
+BattleTransition_InwardSpiral_: ; 70b53 (1c:4b53)
push bc
.loop
ld [hl], $ff
@@ -284,10 +305,17 @@ BattleTransition_InwardSpiral_: ; 70ae0 (1c:4ae0)
pop bc
ret
+<<<<<<< HEAD
+BattleTransition_OutwardSpiral_: ; 70b6c (1c:4b6c)
+ ld bc, -$14
+ ld de, $14
+ ld a, [wd09b]
+=======
BattleTransition_OutwardSpiral_: ; 70af9 (1c:4af9)
ld bc, -SCREEN_WIDTH
ld de, SCREEN_WIDTH
ld a, [wOutwardSpiralTileMapPointer + 1]
+>>>>>>> 1a987d1e1ab96ca9553d4253c72858057332a03a
ld l, a
ld a, [wOutwardSpiralTileMapPointer]
ld h, a
@@ -352,14 +380,19 @@ BattleTransition_OutwardSpiral_: ; 70af9 (1c:4af9)
jr .done
FlashScreen:
-BattleTransition_FlashScreen_: ; 70b5d (1c:4b5d)
+BattleTransition_FlashScreen_: ; 70be8 (1c:4be8s)
ld hl, BattleTransition_FlashScreenPalettes
.loop
ld a, [hli]
cp $1
jr z, .done
ld [rBGP], a
+<<<<<<< HEAD
+ call Func_3021
+ ld c, $2
+=======
ld c, 2
+>>>>>>> 1a987d1e1ab96ca9553d4253c72858057332a03a
call DelayFrames
jr .loop
.done
@@ -367,28 +400,45 @@ BattleTransition_FlashScreen_: ; 70b5d (1c:4b5d)
jr nz, BattleTransition_FlashScreen_
ret
-BattleTransition_FlashScreenPalettes: ; 70b72 (1c:4b72)
+BattleTransition_FlashScreenPalettes: ; 70be8 (1c:4be8)
db $F9,$FE,$FF,$FE,$F9,$E4,$90,$40,$00,$40,$90,$E4
db $01 ; terminator
; used for low level trainer dungeon battles
+<<<<<<< HEAD
+BattleTransition_Shrink: ; 70bf4 (1c:4bf4)
+ ld c, $9
+=======
BattleTransition_Shrink: ; 70b7f (1c:4b7f)
ld c, SCREEN_HEIGHT / 2
+>>>>>>> 1a987d1e1ab96ca9553d4253c72858057332a03a
.loop
push bc
xor a
ld [H_AUTOBGTRANSFERENABLED], a
+<<<<<<< HEAD
+ hlCoord 0, 7
+ deCoord 0, 8
+ ld bc, -$28
+=======
coord hl, 0, 7
coord de, 0, 8
ld bc, -SCREEN_WIDTH * 2
+>>>>>>> 1a987d1e1ab96ca9553d4253c72858057332a03a
call BattleTransition_CopyTiles1
coord hl, 0, 10
coord de, 0, 9
ld bc, SCREEN_WIDTH * 2
call BattleTransition_CopyTiles1
+<<<<<<< HEAD
+ hlCoord 8, 0
+ deCoord 9, 0
+ ld bc, -$2
+=======
coord hl, 8, 0
coord de, 9, 0
ld bc, -2
+>>>>>>> 1a987d1e1ab96ca9553d4253c72858057332a03a
call BattleTransition_CopyTiles2
coord hl, 11, 0
coord de, 10, 0
@@ -406,23 +456,40 @@ BattleTransition_Shrink: ; 70b7f (1c:4b7f)
jp DelayFrames
; used for high level trainer dungeon battles
+<<<<<<< HEAD
+BattleTransition_Split: ; 70c40 (1c:4c40)
+ ld c, $9
+=======
BattleTransition_Split: ; 70bca (1c:4bca)
ld c, SCREEN_HEIGHT / 2
+>>>>>>> 1a987d1e1ab96ca9553d4253c72858057332a03a
xor a
ld [H_AUTOBGTRANSFERENABLED], a
.loop
push bc
+<<<<<<< HEAD
+ hlCoord 0, 16
+ deCoord 0, 17
+ ld bc, -$28
+=======
coord hl, 0, 16
coord de, 0, 17
ld bc, -SCREEN_WIDTH * 2
+>>>>>>> 1a987d1e1ab96ca9553d4253c72858057332a03a
call BattleTransition_CopyTiles1
coord hl, 0, 1
coord de, 0, 0
ld bc, SCREEN_WIDTH * 2
call BattleTransition_CopyTiles1
+<<<<<<< HEAD
+ hlCoord 18, 0
+ deCoord 19, 0
+ ld bc, -$2
+=======
coord hl, 18, 0
coord de, 19, 0
ld bc, -2
+>>>>>>> 1a987d1e1ab96ca9553d4253c72858057332a03a
call BattleTransition_CopyTiles2
coord hl, 1, 0
coord de, 0, 0
@@ -437,7 +504,7 @@ BattleTransition_Split: ; 70bca (1c:4bca)
ld c, 10
jp DelayFrames
-BattleTransition_CopyTiles1: ; 70c12 (1c:4c12)
+BattleTransition_CopyTiles1: ; 70c88 (1c:4c88)
ld a, c
ld [wBattleTransitionCopyTilesOffset], a
ld a, b
@@ -469,7 +536,7 @@ BattleTransition_CopyTiles1: ; 70c12 (1c:4c12)
jr nz, .loop2
ret
-BattleTransition_CopyTiles2: ; 70c3f (1c:4c3f)
+BattleTransition_CopyTiles2: ; 70cb5 (1c:4c3f)
ld a, c
ld [wBattleTransitionCopyTilesOffset], a
ld a, b
@@ -519,10 +586,17 @@ BattleTransition_CopyTiles2: ; 70c3f (1c:4c3f)
ret
; used for high level wild dungeon battles
+<<<<<<< HEAD
+BattleTransition_VerticalStripes: ; 70cf4 (1c:4cf4)
+ ld c, $12
+ ld hl, wTileMap
+ deCoord 1, 17
+=======
BattleTransition_VerticalStripes: ; 70c7e (1c:4c7e)
ld c, SCREEN_HEIGHT
coord hl, 0, 0
coord de, 1, 17
+>>>>>>> 1a987d1e1ab96ca9553d4253c72858057332a03a
xor a
ld [H_AUTOBGTRANSFERENABLED], a
.loop
@@ -547,8 +621,13 @@ BattleTransition_VerticalStripes: ; 70c7e (1c:4c7e)
jr nz, .loop
jp BattleTransition_BlackScreen
+<<<<<<< HEAD
+BattleTransition_VerticalStripes_: ; 70d20 (1c:4d20)
+ ld c, $a
+=======
BattleTransition_VerticalStripes_: ; 70caa (1c:4caa)
ld c, SCREEN_WIDTH / 2
+>>>>>>> 1a987d1e1ab96ca9553d4253c72858057332a03a
.loop
ld [hl], $ff
inc hl
@@ -558,10 +637,17 @@ BattleTransition_VerticalStripes_: ; 70caa (1c:4caa)
ret
; used for low level wild dungeon battles
+<<<<<<< HEAD
+BattleTransition_HorizontalStripes: ; 70d2a (1c:4d2a)
+ ld c, $14
+ ld hl, wTileMap
+ deCoord 19, 1
+=======
BattleTransition_HorizontalStripes: ; 70cb4 (1c:4cb4)
ld c, SCREEN_WIDTH
coord hl, 0, 0
coord de, 19, 1
+>>>>>>> 1a987d1e1ab96ca9553d4253c72858057332a03a
xor a
ld [H_AUTOBGTRANSFERENABLED], a
.loop
@@ -582,9 +668,15 @@ BattleTransition_HorizontalStripes: ; 70cb4 (1c:4cb4)
jr nz, .loop
jp BattleTransition_BlackScreen
+<<<<<<< HEAD
+BattleTransition_HorizontalStripes_: ; 70d4e (1c:4d4e)
+ ld c, $9
+ ld de, $28
+=======
BattleTransition_HorizontalStripes_: ; 70cd8 (1c:4cd8)
ld c, SCREEN_HEIGHT / 2
ld de, SCREEN_WIDTH * 2
+>>>>>>> 1a987d1e1ab96ca9553d4253c72858057332a03a
.loop
ld [hl], $ff
add hl, de
@@ -595,7 +687,7 @@ BattleTransition_HorizontalStripes_: ; 70cd8 (1c:4cd8)
; used for high level wild non-dungeon battles
; makes one full circle around the screen
; by animating each half circle one at a time
-BattleTransition_Circle: ; 70ce4 (1c:4ce4)
+BattleTransition_Circle: ; 70d5a (1c:4d5a)
call BattleTransition_FlashScreen
lb bc, 0, SCREEN_WIDTH / 2
ld hl, BattleTransition_HalfCircle1
@@ -606,14 +698,14 @@ BattleTransition_Circle: ; 70ce4 (1c:4ce4)
call BattleTransition_Circle_Sub1
jp BattleTransition_BlackScreen
-BattleTransition_FlashScreen: ; 70cfd (1c:4cfd)
+BattleTransition_FlashScreen: ; 70d73 (1c:4d73)
ld b, $3
call BattleTransition_FlashScreen_
xor a
ld [H_AUTOBGTRANSFERENABLED], a
ret
-BattleTransition_Circle_Sub1: ; 70d06 (1c:4d06)
+BattleTransition_Circle_Sub1: ; 70d7c (1c:4d7c)
push bc
push hl
ld a, b
@@ -627,8 +719,13 @@ BattleTransition_Circle_Sub1: ; 70d06 (1c:4d06)
jr nz, BattleTransition_Circle_Sub1
ret
+<<<<<<< HEAD
+BattleTransition_TransferDelay3: ; 70d8f (1c:4d8f)
+ ld a, $1
+=======
BattleTransition_TransferDelay3: ; 70d19 (1c:4d19)
ld a, 1
+>>>>>>> 1a987d1e1ab96ca9553d4253c72858057332a03a
ld [H_AUTOBGTRANSFERENABLED], a
call Delay3
xor a
@@ -638,7 +735,7 @@ BattleTransition_TransferDelay3: ; 70d19 (1c:4d19)
; used for low level wild non-dungeon battles
; makes two half circles around the screen
; by animating both half circles at the same time
-BattleTransition_DoubleCircle: ; 70d24 (1c:4d24)
+BattleTransition_DoubleCircle: ; 70d9a (1c:4d9a)
call BattleTransition_FlashScreen
ld c, SCREEN_WIDTH / 2
ld hl, BattleTransition_HalfCircle1
@@ -666,7 +763,7 @@ BattleTransition_DoubleCircle: ; 70d24 (1c:4d24)
jr nz, .loop
jp BattleTransition_BlackScreen
-BattleTransition_Circle_Sub2: ; 70d50 (1c:4d50)
+BattleTransition_Circle_Sub2: ; 70dc6 (1c:4dc6)
ld [wBattleTransitionCircleScreenQuadrantY], a
ld a, [hli]
ld [wBattleTransitionCircleScreenQuadrantX], a
@@ -679,7 +776,7 @@ BattleTransition_Circle_Sub2: ; 70d50 (1c:4d50)
ld l, a
jp BattleTransition_Circle_Sub3
-BattleTransition_HalfCircle1: ; 70d61 (1c:4d61)
+BattleTransition_HalfCircle1: ; 70dd7 (1c:4dd7)
db $01
dw BattleTransition_CircleData1
dwCoord 18, 6
@@ -720,7 +817,7 @@ BattleTransition_HalfCircle1: ; 70d61 (1c:4d61)
dw BattleTransition_CircleData1
dwCoord 1, 6
-BattleTransition_HalfCircle2: ; 70d93 (1c:4d93)
+BattleTransition_HalfCircle2: ; 70d93 (1c:4e09)
db $00
dw BattleTransition_CircleData1
dwCoord 1, 11
@@ -761,7 +858,7 @@ BattleTransition_HalfCircle2: ; 70d93 (1c:4d93)
dw BattleTransition_CircleData1
dwCoord 18, 11
-BattleTransition_Circle_Sub3: ; 70dc5 (1c:4dc5)
+BattleTransition_Circle_Sub3: ; 70e3b (1c:4e3b)
push hl
ld a, [de]
ld c, a
@@ -806,17 +903,17 @@ BattleTransition_Circle_Sub3: ; 70dc5 (1c:4dc5)
jr nz, .loop2
jr BattleTransition_Circle_Sub3
-BattleTransition_CircleData1: ; 70dfe (1c:4dfe)
+BattleTransition_CircleData1: ; 70e74 (1c:4e74)
db $02,$03,$05,$04,$09,$FF
-BattleTransition_CircleData2: ; 70e04 (1c:4e04)
+BattleTransition_CircleData2: ; 70e7a (1c:4e7a)
db $01,$01,$02,$02,$04,$02,$04,$02,$03,$FF
-BattleTransition_CircleData3: ; 70e0e (1c:4e0e)
+BattleTransition_CircleData3: ; 70e84 (1c:4e84)
db $02,$01,$03,$01,$04,$01,$04,$01,$04,$01,$03,$01,$02,$01,$01,$01,$01,$FF
-BattleTransition_CircleData4: ; 70e20 (1c:4e20)
+BattleTransition_CircleData4: ; 70e97 (1c:4e97)
db $04,$01,$04,$00,$03,$01,$03,$00,$02,$01,$02,$00,$01,$FF
-BattleTransition_CircleData5: ; 70e2e (1c:4e2e)
+BattleTransition_CircleData5: ; 70ea3 (1c:4ea3)
db $04,$00,$03,$00,$03,$00,$02,$00,$02,$00,$01,$00,$01,$00,$01,$FF
diff --git a/engine/battle/common_text.asm b/engine/battle/common_text.asm
index a1afcb75..e3c7e1fa 100644
--- a/engine/battle/common_text.asm
+++ b/engine/battle/common_text.asm
@@ -1,5 +1,5 @@
-PrintBeginningBattleText: ; 58d99 (16:4d99)
- ld a, [W_ISINBATTLE]
+PrintBeginningBattleText: ; f4000 (3d:4000)
+ ld a, [W_ISINBATTLE] ; W_ISINBATTLE
dec a
jr nz, .trainerBattle
ld a, [W_CURMAP]
@@ -8,8 +8,20 @@ PrintBeginningBattleText: ; 58d99 (16:4d99)
cp LAVENDER_HOUSE_1
jr c, .pokemonTower
.notPokemonTower
+ ld a,[W_BATTLETYPE]
+ cp $4 ; new battle type?
+ jr nz,.notnewbattletype
+ callab Func_fd0d0
+ ld e,$24
+ jr c,.asm_f4026
+ ld e,$a
+.asm_f4026
+ callab Func_f0000
+ jr .continue
+.notnewbattletype
ld a, [wEnemyMonSpecies2]
call PlayCry
+.continue
ld hl, WildMonAppearedText
ld a, [W_MOVEMISSED]
and a
@@ -23,9 +35,13 @@ PrintBeginningBattleText: ; 58d99 (16:4d99)
call DelayFrames
ld hl, TrainerWantsToFightText
.wildBattle
+ ld a, [W_BATTLETYPE]
+ and a
+ jr nz, .doNotDrawPokeballs
push hl
callab DrawAllPokeballs
pop hl
+.doNotDrawPokeballs
call PrintText
jr .done
.pokemonTower
@@ -63,38 +79,38 @@ PrintBeginningBattleText: ; 58d99 (16:4d99)
xor a
ld [wFrequencyModifier], a
ld a, $80
- ld [wTempoModifier], a
- ld a, SFX_SILPH_SCOPE
+ ld [wc0f2], a
+ ld a, $e9 ; (SFX_08_77 - SFX_Headers_08) / 3
call PlaySound
jp WaitForSoundToFinish
.done
ret
-WildMonAppearedText: ; 58e3b (16:4e3b)
+WildMonAppearedText: ; f40c7 (3d:40c7)
TX_FAR _WildMonAppearedText
db "@"
-HookedMonAttackedText: ; 58e40 (16:4e40)
+HookedMonAttackedText: ; f40cc (3d:40cc)
TX_FAR _HookedMonAttackedText
db "@"
-EnemyAppearedText: ; 58e45 (16:4e45)
+EnemyAppearedText: ; f40d1 (3d:40d1)
TX_FAR _EnemyAppearedText
db "@"
-TrainerWantsToFightText: ; 58e4a (16:4e4a)
+TrainerWantsToFightText: ; f40d6 (3d:40d6)
TX_FAR _TrainerWantsToFightText
db "@"
-UnveiledGhostText: ; 58e4f (16:4e4f)
+UnveiledGhostText: ; f40db (3d:40db)
TX_FAR _UnveiledGhostText
db "@"
-GhostCantBeIDdText: ; 58e54 (16:4e54)
+GhostCantBeIDdText: ; f40e0 (3d:40e0)
TX_FAR _GhostCantBeIDdText
db "@"
-PrintSendOutMonMessage: ; 58e59 (16:4e59)
+PrintSendOutMonMessage: ; f40e0 (3d:40e5)
ld hl, wEnemyMonHP
ld a, [hli]
or [hl]
@@ -126,7 +142,7 @@ PrintSendOutMonMessage: ; 58e59 (16:4e59)
ld a, [H_QUOTIENT + 3] ; a = (enemy mon current HP * 25) / (enemy max HP / 4); this approximates the current percentage of max HP
ld hl, GoText ; 70% or greater
cp 70
- jr nc, .printText
+ jr nc, .printText
ld hl, DoItText ; 40% - 69%
cp 40
jr nc, .printText
@@ -137,38 +153,38 @@ PrintSendOutMonMessage: ; 58e59 (16:4e59)
.printText
jp PrintText
-GoText: ; 58eae (16:4eae)
+GoText: ; f413a (3d:413a)
TX_FAR _GoText
TX_ASM
jr PrintPlayerMon1Text
-DoItText: ; 58eb5 (16:4eb5)
+DoItText: ; f4141 (3d:4141)
TX_FAR _DoItText
TX_ASM
jr PrintPlayerMon1Text
-GetmText: ; 58ebc (16:4ebc)
+GetmText: ; f4148 (3d:4148)
TX_FAR _GetmText
TX_ASM
jr PrintPlayerMon1Text
-EnemysWeakText: ; 58ec3 (16:4ec3)
+EnemysWeakText: ; f414f (3d:414f)
TX_FAR _EnemysWeakText
TX_ASM
-PrintPlayerMon1Text:
+PrintPlayerMon1Text: ; f4154 (3d:4154)
ld hl, PlayerMon1Text
ret
-PlayerMon1Text: ; 58ecc (16:4ecc)
+PlayerMon1Text: ; f4158 (3d:4158)
TX_FAR _PlayerMon1Text
db "@"
-RetreatMon: ; 58ed1 (16:4ed1)
+RetreatMon: ; f415d (3d:415d)
ld hl, PlayerMon2Text
jp PrintText
-PlayerMon2Text: ; 58ed7 (16:4ed7)
+PlayerMon2Text: ; f4163 (3d:4163)
TX_FAR _PlayerMon2Text
TX_ASM
push de
@@ -219,25 +235,25 @@ PlayerMon2Text: ; 58ed7 (16:4ed7)
ld hl, GoodText ; HP went down 70% or more
ret
-EnoughText: ; 58f25 (16:4f25)
+EnoughText: ; f41b1 (3d:41b1)
TX_FAR _EnoughText
TX_ASM
jr PrintComeBackText
-OKExclamationText: ; 58f2c (16:4f2c)
+OKExclamationText: ; f41b8 (3d:41b8)
TX_FAR _OKExclamationText
TX_ASM
jr PrintComeBackText
-GoodText: ; 58f33 (16:4f33)
+GoodText: ; f41bf (3d:41bf)
TX_FAR _GoodText
TX_ASM
jr PrintComeBackText
-PrintComeBackText: ; 58f3a (16:4f3a)
+PrintComeBackText: ; f41c6 (3d:41c6)
ld hl, ComeBackText
ret
-ComeBackText: ; 58f3e (16:4f3e)
+ComeBackText: ; f41ca (3d:41ca)
TX_FAR _ComeBackText
db "@"
diff --git a/engine/battle/core.asm b/engine/battle/core.asm
index 0b534dda..8a46c705 100755
--- a/engine/battle/core.asm
+++ b/engine/battle/core.asm
@@ -2982,11 +2982,7 @@ PrintMenuItem: ; 3d4b6 (f:54b6)
jp Delay3
DisabledText: ; 3d555 (f:5555)
-IF DEF(_YELLOW)
db "Disabled!@"
-ELSE
- db "disabled!@"
-ENDC
TypeText: ; 3d55f (f:555f)
db "TYPE@"
@@ -6836,168 +6832,6 @@ PlayMoveAnimation: ; 3ef07 (f:6f07)
call Delay3
predef_jump MoveAnimation
-InitBattle: ; 3ef12 (f:6f12)
- ld a, [W_CUROPPONENT]
- and a
- jr z, DetermineWildOpponent
-
-InitOpponent: ; 3ef18 (f:6f18)
- ld a, [W_CUROPPONENT]
- ld [wcf91], a
- ld [wEnemyMonSpecies2], a
- jr InitBattleCommon
-
-DetermineWildOpponent: ; 3ef23 (f:6f23)
- ld a, [wd732]
- bit 1, a
- jr z, .asm_3ef2f
- ld a, [hJoyHeld]
- bit 1, a ; B button pressed?
- ret nz
-.asm_3ef2f
- ld a, [wNumberOfNoRandomBattleStepsLeft]
- and a
- ret nz
- callab TryDoWildEncounter
- ret nz
-InitBattleCommon: ; 3ef3d (f:6f3d)
- ld a, [wMapPalOffset]
- push af
- ld hl, wLetterPrintingDelayFlags
- ld a, [hl]
- push af
- res 1, [hl]
- callab InitBattleVariables
- ld a, [wEnemyMonSpecies2]
- sub 200
- jp c, InitWildBattle
- ld [W_TRAINERCLASS], a
- call GetTrainerInformation
- callab ReadTrainer
- call DoBattleTransitionAndInitBattleVariables
- call _LoadTrainerPic
- xor a
- ld [wEnemyMonSpecies2], a
- ld [hStartTileID], a
- dec a
- ld [wAICount], a
- coord hl, 12, 0
- predef CopyUncompressedPicToTilemap
- ld a, $ff
- ld [wEnemyMonPartyPos], a
- ld a, $2
- ld [W_ISINBATTLE], a
- jp _InitBattleCommon
-
-InitWildBattle: ; 3ef8b (f:6f8b)
- ld a, $1
- ld [W_ISINBATTLE], a
- call LoadEnemyMonData
- call DoBattleTransitionAndInitBattleVariables
- ld a, [W_CUROPPONENT]
- cp MAROWAK
- jr z, .isGhost
- call IsGhostBattle
- jr nz, .isNoGhost
-.isGhost
- ld hl, W_MONHSPRITEDIM
- ld a, $66
- ld [hli], a ; write sprite dimensions
- ld bc, GhostPic
- ld a, c
- ld [hli], a ; write front sprite pointer
- ld [hl], b
- ld hl, wEnemyMonNick ; set name to "GHOST"
- ld a, "G"
- ld [hli], a
- ld a, "H"
- ld [hli], a
- ld a, "O"
- ld [hli], a
- ld a, "S"
- ld [hli], a
- ld a, "T"
- ld [hli], a
- ld [hl], "@"
- ld a, [wcf91]
- push af
- ld a, MON_GHOST
- ld [wcf91], a
- ld de, vFrontPic
- call LoadMonFrontSprite ; load ghost sprite
- pop af
- ld [wcf91], a
- jr .spriteLoaded
-.isNoGhost
- ld de, vFrontPic
- call LoadMonFrontSprite ; load mon sprite
-.spriteLoaded
- xor a
- ld [W_TRAINERCLASS], a
- ld [hStartTileID], a
- coord hl, 12, 0
- predef CopyUncompressedPicToTilemap
-
-; common code that executes after init battle code specific to trainer or wild battles
-_InitBattleCommon: ; 3efeb (f:6feb)
- ld b, SET_PAL_BATTLE_BLACK
- call RunPaletteCommand
- call SlidePlayerAndEnemySilhouettesOnScreen
- xor a
- ld [H_AUTOBGTRANSFERENABLED], a
- ld hl, .emptyString
- call PrintText
- call SaveScreenTilesToBuffer1
- call ClearScreen
- ld a, $98
- ld [H_AUTOBGTRANSFERDEST + 1], a
- ld a, $1
- ld [H_AUTOBGTRANSFERENABLED], a
- call Delay3
- ld a, $9c
- ld [H_AUTOBGTRANSFERDEST + 1], a
- call LoadScreenTilesFromBuffer1
- coord hl, 9, 7
- lb bc, 5, 10
- call ClearScreenArea
- coord hl, 1, 0
- lb bc, 4, 10
- call ClearScreenArea
- call ClearSprites
- ld a, [W_ISINBATTLE]
- dec a ; is it a wild battle?
- call z, DrawEnemyHUDAndHPBar ; draw enemy HUD and HP bar if it's a wild battle
- call StartBattle
- callab EndOfBattle
- pop af
- ld [wLetterPrintingDelayFlags], a
- pop af
- ld [wMapPalOffset], a
- ld a, [wSavedTilesetType]
- ld [hTilesetType], a
- scf
- ret
-.emptyString
- db "@"
-
-_LoadTrainerPic: ; 3f04b (f:704b)
-; wd033-wd034 contain pointer to pic
- ld a, [wTrainerPicPointer]
- ld e, a
- ld a, [wTrainerPicPointer + 1]
- ld d, a ; de contains pointer to trainer pic
- ld a, [wLinkState]
- and a
- ld a, Bank(TrainerPics) ; this is where all the trainer pics are (not counting Red's)
- jr z, .loadSprite
- ld a, Bank(RedPicFront)
-.loadSprite
- call UncompressSpriteFromDE
- ld de, vFrontPic
- ld a, $77
- ld c, a
- jp LoadUncompressedSpriteData
-
; unreferenced
ResetCryModifiers: ; 3f069 (f:7069)
xor a
@@ -7005,121 +6839,6 @@ ResetCryModifiers: ; 3f069 (f:7069)
ld [wTempoModifier], a
jp PlaySound
-; animates the mon "growing" out of the pokeball
-AnimateSendingOutMon: ; 3f073 (f:7073)
- ld a, [wPredefRegisters]
- ld h, a
- ld a, [wPredefRegisters + 1]
- ld l, a
- ld a, [hStartTileID]
- ld [hBaseTileID], a
- ld b, $4c
- ld a, [W_ISINBATTLE]
- and a
- jr z, .notInBattle
- add b
- ld [hl], a
- call Delay3
- ld bc, -(SCREEN_WIDTH * 2 + 1)
- add hl, bc
- ld a, 1
- ld [wDownscaledMonSize], a
- lb bc, 3, 3
- predef CopyDownscaledMonTiles
- ld c, 4
- call DelayFrames
- ld bc, -(SCREEN_WIDTH * 2 + 1)
- add hl, bc
- xor a
- ld [wDownscaledMonSize], a
- lb bc, 5, 5
- predef CopyDownscaledMonTiles
- ld c, 5
- call DelayFrames
- ld bc, -(SCREEN_WIDTH * 2 + 1)
- jr .next
-.notInBattle
- ld bc, -(SCREEN_WIDTH * 6 + 3)
-.next
- add hl, bc
- ld a, [hBaseTileID]
- add $31
- jr CopyUncompressedPicToHL
-
-CopyUncompressedPicToTilemap: ; 3f0c6 (f:70c6)
- ld a, [wPredefRegisters]
- ld h, a
- ld a, [wPredefRegisters + 1]
- ld l, a
- ld a, [hStartTileID]
-CopyUncompressedPicToHL: ; 3f0d0 (f:70d0)
- lb bc, 7, 7
- ld de, SCREEN_WIDTH
- push af
- ld a, [W_SPRITEFLIPPED]
- and a
- jr nz, .flipped
- pop af
-.loop
- push bc
- push hl
-.innerLoop
- ld [hl], a
- add hl, de
- inc a
- dec c
- jr nz, .innerLoop
- pop hl
- inc hl
- pop bc
- dec b
- jr nz, .loop
- ret
-
-.flipped
- push bc
- ld b, 0
- dec c
- add hl, bc
- pop bc
- pop af
-.flippedLoop
- push bc
- push hl
-.flippedInnerLoop
- ld [hl], a
- add hl, de
- inc a
- dec c
- jr nz, .flippedInnerLoop
- pop hl
- dec hl
- pop bc
- dec b
- jr nz, .flippedLoop
- ret
-
-LoadMonBackPic: ; 3f103 (f:7103)
-; Assumes the monster's attributes have
-; been loaded with GetMonHeader.
- ld a, [wBattleMonSpecies2]
- ld [wcf91], a
- coord hl, 1, 5
- ld b, 7
- ld c, 8
- call ClearScreenArea
- ld hl, W_MONHBACKSPRITE - W_MONHEADER
- call UncompressMonSprite
- predef ScaleSpriteByTwo
- ld de, vBackPic
- call InterlaceMergeSpriteBuffers ; combine the two buffers to a single 2bpp sprite
- ld hl, vSprites
- ld de, vBackPic
- ld c, (2*SPRITEBUFFERSIZE)/16 ; count of 16-byte chunks to be copied
- ld a, [H_LOADEDROMBANK]
- ld b, a
- jp CopyVideoData
-
JumpMoveEffect: ; 3f132 (f:7132)
call _JumpMoveEffect
ld b, $1
diff --git a/engine/battle/decrement_pp.asm b/engine/battle/decrement_pp.asm
index 7345c5c1..c6a9f2b5 100644
--- a/engine/battle/decrement_pp.asm
+++ b/engine/battle/decrement_pp.asm
@@ -1,4 +1,4 @@
-DecrementPP: ; 68000 (1a:4000)
+DecrementPP: ; f42db (3d:42db)
; after using a move, decrement pp in battle and (if not transformed?) in party
ld a, [de]
cp a, STRUGGLE
@@ -33,7 +33,7 @@ DecrementPP: ; 68000 (1a:4000)
ld a, [wPlayerMonNumber] ; which mon in party is active
ld bc, wPartyMon2 - wPartyMon1
call AddNTimes ; calculate address of the mon to modify
-.DecrementPP
+.DecrementPP ; f4301 (3d:4301)
ld a, [wPlayerMoveListIndex] ; which move (0, 1, 2, 3) did we use?
ld c, a
ld b, 0
diff --git a/engine/battle/get_trainer_name.asm b/engine/battle/get_trainer_name.asm
index 961f25cf..d393b800 100644
--- a/engine/battle/get_trainer_name.asm
+++ b/engine/battle/get_trainer_name.asm
@@ -1,16 +1,16 @@
-GetTrainerName_: ; 13a58 (4:7a58)
+GetTrainerName_: ; f67a5 (3d:67a5)
ld hl, W_GRASSRATE
ld a, [wLinkState]
and a
- jr nz, .rival
+ jr nz, .foundName
ld hl, W_RIVALNAME
ld a, [W_TRAINERCLASS]
cp SONY1
- jr z, .rival
+ jr z, .foundName
cp SONY2
- jr z, .rival
+ jr z, .foundName
cp SONY3
- jr z, .rival
+ jr z, .foundName
ld [wd0b5], a
ld a, TRAINER_NAME
ld [wNameListType], a
@@ -18,6 +18,7 @@ GetTrainerName_: ; 13a58 (4:7a58)
ld [wPredefBank], a
call GetName
ld hl, wcd6d
+.foundName
.rival
ld de, W_TRAINERNAME
ld bc, $d
diff --git a/engine/battle/ghost_marowak_anim.asm b/engine/battle/ghost_marowak_anim.asm
index d76f3f41..719fcf0a 100644
--- a/engine/battle/ghost_marowak_anim.asm
+++ b/engine/battle/ghost_marowak_anim.asm
@@ -1,7 +1,8 @@
-MarowakAnim: ; 708ca (1c:48ca)
+MarowakAnim: ; 7092b (1c:492b)
; animate the ghost being unveiled as a Marowak
ld a, $e4
ld [rOBP1], a
+ call Func_3061
call CopyMonPicFromBGToSpriteVRAM ; cover the BG ghost pic with a sprite ghost pic that looks the same
; now that the ghost pic is being displayed using sprites, clear the ghost pic from the BG tilemap
coord hl, 12, 0
@@ -27,6 +28,7 @@ MarowakAnim: ; 708ca (1c:48ca)
sla a
sla a
ld [rOBP1], a
+ call Func_3061
jr nz, .fadeOutGhostLoop
call ClearSprites
call CopyMonPicFromBGToSpriteVRAM ; copy Marowak pic from BG to sprite VRAM
@@ -40,6 +42,7 @@ MarowakAnim: ; 708ca (1c:48ca)
srl b
rra
ld [rOBP1], a
+ call Func_3061
ld a, b
and a
jr nz, .fadeInMarowakLoop
@@ -49,7 +52,7 @@ MarowakAnim: ; 708ca (1c:48ca)
jp ClearSprites
; copies a mon pic's from background VRAM to sprite VRAM and sets up OAM
-CopyMonPicFromBGToSpriteVRAM: ; 7092a (1c:492a)
+CopyMonPicFromBGToSpriteVRAM: ; 70994 (1c:4994)
ld de, vFrontPic
ld hl, vSprites
ld bc, 7 * 7
@@ -74,7 +77,7 @@ CopyMonPicFromBGToSpriteVRAM: ; 7092a (1c:492a)
ld [hli], a
ld a, d
ld [hli], a
- ld a, $10 ; use OBP1
+ ld a, $14 ; use OBP1
ld [hli], a
inc d
dec c
diff --git a/engine/battle/init_battle_variables.asm b/engine/battle/init_battle_variables.asm
index 6a4cd771..78f4ad22 100644
--- a/engine/battle/init_battle_variables.asm
+++ b/engine/battle/init_battle_variables.asm
@@ -1,4 +1,4 @@
-InitBattleVariables: ; 525af (14:65af)
+InitBattleVariables: ; f6236 (3d:6236)
ld a, [hTilesetType]
ld [wSavedTilesetType], a
xor a
diff --git a/engine/battle/link_battle_versus_text.asm b/engine/battle/link_battle_versus_text.asm
index dfb2fe35..9849cc9a 100644
--- a/engine/battle/link_battle_versus_text.asm
+++ b/engine/battle/link_battle_versus_text.asm
@@ -1,9 +1,8 @@
; display "[player] VS [enemy]" text box with pokeballs representing their parties next to the names
-DisplayLinkBattleVersusTextBox: ; 372d6 (d:72d6)
+DisplayLinkBattleVersusTextBox: ; f41cf (3d:41cf)
call LoadTextBoxTilePatterns
coord hl, 3, 4
- ld b, $7
- ld c, $c
+ ld bc, $70c
call TextBoxBorder
coord hl, 4, 5
ld de, wPlayerName
diff --git a/engine/battle/moveEffects/focus_energy_effect.asm b/engine/battle/moveEffects/focus_energy_effect.asm
index b8a783e4..e88d065a 100644
--- a/engine/battle/moveEffects/focus_energy_effect.asm
+++ b/engine/battle/moveEffects/focus_energy_effect.asm
@@ -1,4 +1,4 @@
-FocusEnergyEffect_: ; 27f86 (9:7f86)
+FocusEnergyEffect_: ; f628b (3d:628b)
ld hl, W_PLAYERBATTSTATUS2
ld a, [H_WHOSETURN]
and a
@@ -16,7 +16,7 @@ FocusEnergyEffect_: ; 27f86 (9:7f86)
call DelayFrames
jpab PrintButItFailedText_
-GettingPumpedText: ; 27fb3 (9:7fb3)
+GettingPumpedText: ; f62b5 (3d:62b5)
db $0a
TX_FAR _GettingPumpedText
db "@"
diff --git a/engine/battle/moveEffects/heal_effect.asm b/engine/battle/moveEffects/heal_effect.asm
index cea63a1f..dbce6ebb 100644
--- a/engine/battle/moveEffects/heal_effect.asm
+++ b/engine/battle/moveEffects/heal_effect.asm
@@ -1,4 +1,4 @@
-HealEffect_: ; 3b9ec (e:79ec)
+HealEffect_: ; f62ba (3d:62ba)
ld a, [H_WHOSETURN]
and a
ld de, wBattleMonHP
@@ -86,7 +86,7 @@ HealEffect_: ; 3b9ec (e:79ec)
ld [wHPBarNewHP], a
.playAnim
ld hl, PlayCurrentMoveAnimation
- call BankswitchEtoF
+ call Bankswitch3DtoF
ld a, [H_WHOSETURN]
and a
coord hl, 10, 9
@@ -98,23 +98,23 @@ HealEffect_: ; 3b9ec (e:79ec)
ld [wHPBarType], a
predef UpdateHPBar2
ld hl, DrawHUDsAndHPBars
- call BankswitchEtoF
+ call Bankswitch3DtoF
ld hl, RegainedHealthText
jp PrintText
.failed
ld c, 50
call DelayFrames
ld hl, PrintButItFailedText_
- jp BankswitchEtoF
+ jp Bankswitch3DtoF
-StartedSleepingEffect: ; 3baa2 (e:7aa2)
+StartedSleepingEffect: ; f6370 (3d:6370)
TX_FAR _StartedSleepingEffect
db "@"
-FellAsleepBecameHealthyText: ; 3baa7 (e:7aa7)
+FellAsleepBecameHealthyText: ; f6375 (3d:6375)
TX_FAR _FellAsleepBecameHealthyText
db "@"
-RegainedHealthText: ; 3baac (e:7aac)
+RegainedHealthText: ; f637a (3d:637a)
TX_FAR _RegainedHealthText
db "@"
diff --git a/engine/battle/moveEffects/mist_effect.asm b/engine/battle/moveEffects/mist_effect.asm
index 1f8e40b0..5d7669f8 100644
--- a/engine/battle/moveEffects/mist_effect.asm
+++ b/engine/battle/moveEffects/mist_effect.asm
@@ -1,4 +1,4 @@
-MistEffect_: ; 33f2b (c:7f2b)
+MistEffect_: ; f64ac (3d:64ac)
ld hl, W_PLAYERBATTSTATUS2
ld a, [H_WHOSETURN]
and a
@@ -14,6 +14,6 @@ MistEffect_: ; 33f2b (c:7f2b)
.mistAlreadyInUse
jpab PrintButItFailedText_
-ShroudedInMistText: ; 33f52 (c:7f52)
+ShroudedInMistText: ; f64d3 (3d:64d3)
TX_FAR _ShroudedInMistText
db "@"
diff --git a/engine/battle/moveEffects/one_hit_ko_effect.asm b/engine/battle/moveEffects/one_hit_ko_effect.asm
index 907db80c..c1dde6ff 100644
--- a/engine/battle/moveEffects/one_hit_ko_effect.asm
+++ b/engine/battle/moveEffects/one_hit_ko_effect.asm
@@ -1,5 +1,5 @@
-OneHitKOEffect_: ; 33f57 (c:7f57)
- ld hl, W_DAMAGE
+OneHitKOEffect_: ; f64db (3d:64db)
+ ld hl, W_DAMAGE
xor a
ld [hli], a
ld [hl], a ; set the damage output to zero
diff --git a/engine/battle/moveEffects/paralyze_effect.asm b/engine/battle/moveEffects/paralyze_effect.asm
index 658b0c50..3e0cf062 100644
--- a/engine/battle/moveEffects/paralyze_effect.asm
+++ b/engine/battle/moveEffects/paralyze_effect.asm
@@ -1,4 +1,4 @@
-ParalyzeEffect_: ; 52601 (14:6601)
+ParalyzeEffect_: ; f6562 (3d:6562)
ld hl, wEnemyMonStatus
ld de, W_PLAYERMOVETYPE
ld a, [H_WHOSETURN]
diff --git a/engine/battle/moveEffects/pay_day_effect.asm b/engine/battle/moveEffects/pay_day_effect.asm
index 26e69ef5..2fa6b53f 100644
--- a/engine/battle/moveEffects/pay_day_effect.asm
+++ b/engine/battle/moveEffects/pay_day_effect.asm
@@ -1,4 +1,4 @@
-PayDayEffect_ ; 2feb8 (b:7eb8)
+PayDayEffect_ ; f6511 (3d:6511)
xor a
ld hl, wcd6d
ld [hli], a
@@ -40,6 +40,6 @@ PayDayEffect_ ; 2feb8 (b:7eb8)
ld hl, CoinsScatteredText
jp PrintText
-CoinsScatteredText: ; 2ff04 (b:7f04)
+CoinsScatteredText: ; f655d (3d:655d)
TX_FAR _CoinsScatteredText
db "@"
diff --git a/engine/battle/moveEffects/reflect_light_screen_effect.asm b/engine/battle/moveEffects/reflect_light_screen_effect.asm
index df34827f..ee053670 100644
--- a/engine/battle/moveEffects/reflect_light_screen_effect.asm
+++ b/engine/battle/moveEffects/reflect_light_screen_effect.asm
@@ -1,4 +1,4 @@
-ReflectLightScreenEffect_: ; 3bb97 (e:7b97)
+ReflectLightScreenEffect_: ; f645d (3d:645d)
ld hl, W_PLAYERBATTSTATUS3
ld de, W_PLAYERMOVEEFFECT
ld a, [H_WHOSETURN]
@@ -23,23 +23,23 @@ ReflectLightScreenEffect_: ; 3bb97 (e:7b97)
.playAnim
push hl
ld hl, PlayCurrentMoveAnimation
- call BankswitchEtoF
+ call Bankswitch3DtoF
pop hl
jp PrintText
.moveFailed
ld c, 50
call DelayFrames
ld hl, PrintButItFailedText_
- jp BankswitchEtoF
+ jp Bankswitch3DtoF
-LightScreenProtectedText: ; 3bbd7 (e:7bd7)
+LightScreenProtectedText: ; f649d (3d:649d)
TX_FAR _LightScreenProtectedText
db "@"
-ReflectGainedArmorText: ; 3bbdc (e:7bdc)
+ReflectGainedArmorText: ; f64a2 (3d:64a2)
TX_FAR _ReflectGainedArmorText
db "@"
-BankswitchEtoF: ; 3bbe1 (e:7be1)
- ld b, BANK(BattleCore)
+Bankswitch3DtoF: ; f64a7 (3d:64a7)
+ ld b, $f ; BANK(BattleCore)
jp Bankswitch
diff --git a/engine/battle/moveEffects/transform_effect.asm b/engine/battle/moveEffects/transform_effect.asm
index 6a40eda2..fef6f7aa 100644
--- a/engine/battle/moveEffects/transform_effect.asm
+++ b/engine/battle/moveEffects/transform_effect.asm
@@ -1,4 +1,4 @@
-TransformEffect_: ; 3bab1 (e:7ab1)
+TransformEffect_: ; f637f (3d:637f)
ld hl, wBattleMonSpecies
ld de, wEnemyMonSpecies
ld bc, W_ENEMYBATTSTATUS3
@@ -100,18 +100,11 @@ TransformEffect_: ; 3bab1 (e:7ab1)
and a
jr z, .lessThanFourMoves
ld a, $5
- ld [de], a
- inc de
- dec b
- jr nz, .copyPPLoop
- jr .copyStats
.lessThanFourMoves
-; 0 PP for blank moves
- xor a
ld [de], a
inc de
dec b
- jr nz, .lessThanFourMoves
+ jr nz, .copyPPLoop
.copyStats
; original (unmodified) stats and stat mods
pop hl
@@ -141,8 +134,8 @@ TransformEffect_: ; 3bab1 (e:7ab1)
.failed
ld hl, PrintButItFailedText_
- jp BankswitchEtoF
+ jp Bankswitch3DtoF
-TransformedText: ; 3bb92 (e:7b92)
+TransformedText: ; f6458 (3d:6458)
TX_FAR _TransformedText
db "@"
diff --git a/engine/battle/safari_zone.asm b/engine/battle/safari_zone.asm
index 6b0e2220..00627d74 100755
--- a/engine/battle/safari_zone.asm
+++ b/engine/battle/safari_zone.asm
@@ -1,19 +1,19 @@
-PrintSafariZoneBattleText: ; 4277 (1:4277)
+PrintSafariZoneBattleText: ; 4111 (1:4111)
ld hl, wSafariBaitFactor
ld a, [hl]
and a
- jr z, .asm_4284
+ jr z, .asm_411e
dec [hl]
ld hl, SafariZoneEatingText
- jr .asm_429f
-.asm_4284
+ jr .asm_4138
+.asm_411e
dec hl
ld a, [hl]
and a
ret z
dec [hl]
ld hl, SafariZoneAngryText
- jr nz, .asm_429f
+ jr nz, .asm_4138
push hl
ld a, [wEnemyMonSpecies]
ld [wd0b5], a
@@ -21,16 +21,16 @@ PrintSafariZoneBattleText: ; 4277 (1:4277)
ld a, [W_MONHCATCHRATE]
ld [wEnemyMonCatchRate], a
pop hl
-.asm_429f
+.asm_4138
push hl
call LoadScreenTilesFromBuffer1
pop hl
jp PrintText
-SafariZoneEatingText: ; 42a7 (1:42a7)
+SafariZoneEatingText: ; 4141 (1:4141)
TX_FAR _SafariZoneEatingText
db "@"
-SafariZoneAngryText: ; 42ac (1:42ac)
+SafariZoneAngryText: ; 4146 (1:4146)
TX_FAR _SafariZoneAngryText
db "@"
diff --git a/engine/battle/scroll_draw_trainer_pic.asm b/engine/battle/scroll_draw_trainer_pic.asm
index 5949208c..e5e66b38 100644
--- a/engine/battle/scroll_draw_trainer_pic.asm
+++ b/engine/battle/scroll_draw_trainer_pic.asm
@@ -1,4 +1,4 @@
-_ScrollTrainerPicAfterBattle: ; 396d3 (e:56d3)
+_ScrollTrainerPicAfterBattle: ; f4259 (e:f4259)
; Load the enemy trainer's pic and scrolls it into
; the screen from the right.
xor a
@@ -32,7 +32,7 @@ _ScrollTrainerPicAfterBattle: ; 396d3 (e:56d3)
jr .scrollLoop
; write one 7-tile column of the trainer pic to the tilemap
-DrawTrainerPicColumn: ; 39707 (e:5707)
+DrawTrainerPicColumn: ; f428d (3d:428d)
push hl
push de
push bc
diff --git a/engine/battle/unused_stats_functions.asm b/engine/battle/unused_stats_functions.asm
index 23ddbc20..5b2e5e0e 100644
--- a/engine/battle/unused_stats_functions.asm
+++ b/engine/battle/unused_stats_functions.asm
@@ -1,5 +1,5 @@
; does nothing since no stats are ever selected (barring glitches)
-DoubleSelectedStats: ; 39680 (e:5680)
+DoubleSelectedStats: ; f4206 (3d:4206)
ld a, [H_WHOSETURN]
and a
ld a, [wPlayerStatsToDouble]
@@ -29,7 +29,7 @@ DoubleSelectedStats: ; 39680 (e:5680)
ret
; does nothing since no stats are ever selected (barring glitches)
-HalveSelectedStats: ; 396a7 (e:56a7)
+HalveSelectedStats: ; f422d (3d:422d)
ld a, [H_WHOSETURN]
and a
ld a, [wPlayerStatsToHalve]