summaryrefslogtreecommitdiff
path: root/battle
diff options
context:
space:
mode:
Diffstat (limited to 'battle')
-rw-r--r--battle/ai/items.asm36
-rwxr-xr-xbattle/ai/move.asm2
-rwxr-xr-xbattle/ai/redundant.asm4
-rw-r--r--battle/ai/scoring.asm46
-rw-r--r--battle/anim_commands.asm14
-rw-r--r--battle/bg_effects.asm6
-rw-r--r--battle/core.asm246
-rw-r--r--battle/effect_commands.asm70
-rwxr-xr-xbattle/effects/attract.asm4
-rw-r--r--battle/effects/thief.asm4
-rw-r--r--battle/hidden_power.asm2
-rwxr-xr-xbattle/link_result.asm2
-rw-r--r--battle/misc.asm4
-rwxr-xr-xbattle/objects/engine.asm4
-rwxr-xr-xbattle/trainer_huds.asm2
-rwxr-xr-xbattle/used_move_text.asm2
16 files changed, 224 insertions, 224 deletions
diff --git a/battle/ai/items.asm b/battle/ai/items.asm
index 5346bf8f2..09595077a 100644
--- a/battle/ai/items.asm
+++ b/battle/ai/items.asm
@@ -9,7 +9,7 @@ AI_SwitchOrTryItem: ; 38000
and a
ret nz
- callba CheckEnemyLockedIn
+ farcall CheckEnemyLockedIn
ret nz
ld a, [PlayerSubStatus5]
@@ -44,7 +44,7 @@ DontSwitch: ; 38041
; 38045
SwitchOften: ; 38045
- callab CheckAbleToSwitch
+ callfar CheckAbleToSwitch
ld a, [wEnemySwitchMonParam]
and $f0
jp z, DontSwitch
@@ -80,7 +80,7 @@ SwitchOften: ; 38045
; 38083
SwitchRarely: ; 38083
- callab CheckAbleToSwitch
+ callfar CheckAbleToSwitch
ld a, [wEnemySwitchMonParam]
and $f0
jp z, DontSwitch
@@ -115,7 +115,7 @@ SwitchRarely: ; 38083
; 380c1
SwitchSometimes: ; 380c1
- callab CheckAbleToSwitch
+ callfar CheckAbleToSwitch
ld a, [wEnemySwitchMonParam]
and $f0
jp z, DontSwitch
@@ -358,12 +358,12 @@ AI_Items: ; 39196
ld a, [bc]
bit CONTEXT_USE_F, a
jr nz, .CheckHalfOrQuarterHP
- callab AICheckEnemyHalfHP
+ callfar AICheckEnemyHalfHP
jp c, .DontUse
ld a, [bc]
bit UNKNOWN_USE_F, a
jp nz, .CheckQuarterHP
- callab AICheckEnemyQuarterHP
+ callfar AICheckEnemyQuarterHP
jp nc, .UseHealItem
call Random
cp 1 + 50 percent
@@ -371,7 +371,7 @@ AI_Items: ; 39196
jp .DontUse
.CheckQuarterHP: ; 38254 (e:4254)
- callab AICheckEnemyQuarterHP
+ callfar AICheckEnemyQuarterHP
jp c, .DontUse
call Random
cp -1 + 20 percent
@@ -379,9 +379,9 @@ AI_Items: ; 39196
jr .UseHealItem
.CheckHalfOrQuarterHP: ; 38267 (e:4267)
- callab AICheckEnemyHalfHP
+ callfar AICheckEnemyHalfHP
jp c, .DontUse
- callab AICheckEnemyQuarterHP
+ callfar AICheckEnemyQuarterHP
jp nc, .UseHealItem
call Random
cp -1 + 20 percent
@@ -416,7 +416,7 @@ AI_Items: ; 39196
; 382ae
.asm_382ae ; This appears to be unused
- callab AICheckEnemyMaxHP
+ callfar AICheckEnemyMaxHP
jr c, .dont_use
push bc
ld de, EnemyMonMaxHP + 1
@@ -433,7 +433,7 @@ AI_Items: ; 39196
ld a, c
cp b
jp c, .check_50_percent
- callab AICheckEnemyQuarterHP
+ callfar AICheckEnemyQuarterHP
jr c, .check_40_percent
.check_50_percent
@@ -545,7 +545,7 @@ AI_Items: ; 39196
AIUpdateHUD: ; 38387
call UpdateEnemyMonInParty
- callba UpdateEnemyHUD
+ farcall UpdateEnemyHUD
ld a, $1
ld [hBGMapMode], a
ld hl, wEnemyItemState
@@ -705,7 +705,7 @@ AI_Switch: ; 3846c
res SUBSTATUS_RAGE, [hl]
xor a
ld [hBattleTurn], a
- callab PursuitSwitch
+ callfar PursuitSwitch
push af
ld a, [CurOTMon]
@@ -726,12 +726,12 @@ AI_Switch: ; 3846c
.skiptext
ld a, 1
ld [wBattleHasJustStarted], a
- callab NewEnemyMonStatus
- callab ResetEnemyStatLevels
+ callfar NewEnemyMonStatus
+ callfar ResetEnemyStatLevels
ld hl, PlayerSubStatus1
res SUBSTATUS_IN_LOVE, [hl]
- callba EnemySwitch
- callba ResetBattleParticipants
+ farcall EnemySwitch
+ farcall ResetBattleParticipants
xor a
ld [wBattleHasJustStarted], a
ld a, [wLinkMode]
@@ -851,7 +851,7 @@ EnemyUsedXItem:
push bc
call PrintText_UsedItemOn
pop bc
- callba CheckIfStatCanBeRaised
+ farcall CheckIfStatCanBeRaised
jp AIUpdateHUD
; 38568
diff --git a/battle/ai/move.asm b/battle/ai/move.asm
index 6e5aca358..11586c0da 100755
--- a/battle/ai/move.asm
+++ b/battle/ai/move.asm
@@ -12,7 +12,7 @@ AIChooseMove: ; 440ce
ret nz
; No use picking a move if there's no choice.
- callba CheckEnemyLockedIn
+ farcall CheckEnemyLockedIn
ret nz
diff --git a/battle/ai/redundant.asm b/battle/ai/redundant.asm
index e3dda8c4b..2e8f7c6df 100755
--- a/battle/ai/redundant.asm
+++ b/battle/ai/redundant.asm
@@ -141,7 +141,7 @@ AI_Redundant: ; 2c41a
jr .NotRedundant
.Attract: ; 2c4fe
- callba CheckOppositeGender
+ farcall CheckOppositeGender
jr c, .Redundant
ld a, [PlayerSubStatus1]
bit SUBSTATUS_IN_LOVE, a
@@ -184,7 +184,7 @@ AI_Redundant: ; 2c41a
.MorningSun:
.Synthesis:
.Moonlight: ; 2c539
- callba AICheckEnemyMaxHP
+ farcall AICheckEnemyMaxHP
jr nc, .NotRedundant
.Teleport:
diff --git a/battle/ai/scoring.asm b/battle/ai/scoring.asm
index 4e462656c..6391e3b29 100644
--- a/battle/ai/scoring.asm
+++ b/battle/ai/scoring.asm
@@ -29,7 +29,7 @@ AI_Basic: ; 38591
push hl
push de
push bc
- callba AI_Redundant
+ farcall AI_Redundant
pop bc
pop de
pop hl
@@ -176,7 +176,7 @@ AI_Types: ; 38635
push de
ld a, 1
ld [hBattleTurn], a
- callab BattleCheckTypeMatchup
+ callfar BattleCheckTypeMatchup
pop de
pop bc
pop hl
@@ -429,7 +429,7 @@ AI_Smart_LeechHit: ; 387f7
push hl
ld a, 1
ld [hBattleTurn], a
- callab BattleCheckTypeMatchup
+ callfar BattleCheckTypeMatchup
pop hl
; 60% chance to discourage this move if not very effective.
@@ -510,7 +510,7 @@ AI_Smart_LockOn: ; 3881d
push hl
push bc
- callba BattleCheckTypeMatchup
+ farcall BattleCheckTypeMatchup
ld a, [wd265]
cp $a
pop bc
@@ -572,7 +572,7 @@ AI_Smart_Selfdestruct: ; 388a6
; Unless this is the enemy's last Pokemon...
push hl
- callba FindAliveEnemyMons
+ farcall FindAliveEnemyMons
pop hl
jr nc, .asm_388b7
@@ -970,7 +970,7 @@ AI_Smart_ForceSwitch: ; 38a2a
; Consider player's type(s) if its moves are unknown.
push hl
- callab CheckPlayerMoveTypeMatchups
+ callfar CheckPlayerMoveTypeMatchups
ld a, [wEnemyAISwitchScore]
cp 10 ; neutral
pop hl
@@ -1368,7 +1368,7 @@ AI_Smart_Mimic: ; 38ba8
ld a, $1
ld [hBattleTurn], a
- callab BattleCheckTypeMatchup
+ callfar BattleCheckTypeMatchup
ld a, [wd265]
cp $a
@@ -1763,9 +1763,9 @@ AI_Smart_PriorityHit: ; 38d5a
ld a, $1
ld [hBattleTurn], a
push hl
- callab EnemyAttackDamage
- callab BattleCommand_DamageCalc
- callab BattleCommand_Stab
+ callfar EnemyAttackDamage
+ callfar BattleCommand_DamageCalc
+ callfar BattleCommand_Stab
pop hl
ld a, [CurDamage + 1]
ld c, a
@@ -1811,7 +1811,7 @@ AI_Smart_Conversion2: ; 38d98
xor a
ld [hBattleTurn], a
- callab BattleCheckTypeMatchup
+ callfar BattleCheckTypeMatchup
ld a, [wd265]
cp $a
@@ -1890,7 +1890,7 @@ AI_Smart_MeanLook: ; 38dfb
; Otherwise, discourage this move unless the player only has not very effective moves against the enemy.
push hl
- callab CheckPlayerMoveTypeMatchups
+ callfar CheckPlayerMoveTypeMatchups
ld a, [wEnemyAISwitchScore]
cp $b ; not very effective
pop hl
@@ -2008,7 +2008,7 @@ AI_Smart_Curse: ; 38e5c
jp nz, AIDiscourageMove
push hl
- callba FindAliveEnemyMons
+ farcall FindAliveEnemyMons
pop hl
jr nc, .asm_38eb0
@@ -2137,7 +2137,7 @@ AI_Smart_Foresight: ; 38f1d
AI_Smart_PerishSong: ; 38f4a
push hl
- callab FindAliveEnemyMons
+ callfar FindAliveEnemyMons
pop hl
jr c, .no
@@ -2146,7 +2146,7 @@ AI_Smart_PerishSong: ; 38f4a
jr nz, .yes
push hl
- callab CheckPlayerMoveTypeMatchups
+ callfar CheckPlayerMoveTypeMatchups
ld a, [wEnemyAISwitchScore]
cp 10 ; 1.0
pop hl
@@ -2404,7 +2404,7 @@ AI_Smart_BatonPass: ; 39062
; Consider player's type(s) if its moves are unknown.
push hl
- callab CheckPlayerMoveTypeMatchups
+ callfar CheckPlayerMoveTypeMatchups
ld a, [wEnemyAISwitchScore]
cp 10 ; neutral
pop hl
@@ -2466,8 +2466,8 @@ AI_Smart_HiddenPower: ; 3909e
ld [hBattleTurn], a
; Calculate Hidden Power's type and base power based on enemy's DVs.
- callab HiddenPowerDamage
- callab BattleCheckTypeMatchup
+ callfar HiddenPowerDamage
+ callfar BattleCheckTypeMatchup
pop hl
; Discourage Hidden Power if not very effective.
@@ -3336,13 +3336,13 @@ AIDamageCalc: ; 393e7
ld hl, .ConstantDamageEffects
call IsInArray
jr nc, .asm_39400
- callab BattleCommand_ConstantDamage
+ callfar BattleCommand_ConstantDamage
ret
.asm_39400
- callab EnemyAttackDamage
- callab BattleCommand_DamageCalc
- callab BattleCommand_Stab
+ callfar EnemyAttackDamage
+ callfar BattleCommand_DamageCalc
+ callfar BattleCommand_Stab
ret
.ConstantDamageEffects:
@@ -3459,7 +3459,7 @@ AI_Status: ; 39453
push de
ld a, 1
ld [hBattleTurn], a
- callab BattleCheckTypeMatchup
+ callfar BattleCheckTypeMatchup
pop de
pop bc
pop hl
diff --git a/battle/anim_commands.asm b/battle/anim_commands.asm
index 530f30d2b..561d509d7 100644
--- a/battle/anim_commands.asm
+++ b/battle/anim_commands.asm
@@ -61,7 +61,7 @@ BattleAnimRunScript: ; cc11c
and a
jr nz, .hi_byte
- callba CheckBattleScene
+ farcall CheckBattleScene
jr c, .disabled
call BattleAnimClearHud
@@ -169,7 +169,7 @@ BattleAnimRestoreHuds: ; cc1bb
ld hl, UpdateBattleHuds
ld a, BANK(UpdatePlayerHUD)
- rst FarCall ; Why the heck is this a callab?
+ rst FarCall ; Why not "call UpdateBattleHuds"?
pop af
ld [rSVBK], a
@@ -907,7 +907,7 @@ BattleAnimCmd_PlayerHeadObj: ; cc57e (33:457e)
ret
BattleAnimCmd_CheckPokeball: ; cc5d0 (33:45d0)
- callab GetPokeBallWobble
+ callfar GetPokeBallWobble
ld a, c
ld [BattleAnimVar], a
ret
@@ -1128,11 +1128,11 @@ BattleAnimCmd_DropSub: ; cc750 (33:4750)
and a
jr z, .player
- callab DropEnemySub
+ callfar DropEnemySub
jr .done
.player
- callab DropPlayerSub
+ callfar DropPlayerSub
.done
pop af
@@ -1221,7 +1221,7 @@ BattleAnimCmd_Sound: ; cc7cd (33:47cd)
call GetBattleAnimByte
ld e, a
ld d, 0
- callab PlayStereoSFX
+ callfar PlayStereoSFX
ret
; cc7f8 (33:47f8)
@@ -1311,7 +1311,7 @@ endr
ld a, 1
ld [wStereoPanningMask], a
- callab _PlayCryHeader
+ callfar _PlayCryHeader
.done
pop af
diff --git a/battle/bg_effects.asm b/battle/bg_effects.asm
index fdb27af13..cfd342df7 100644
--- a/battle/bg_effects.asm
+++ b/battle/bg_effects.asm
@@ -550,7 +550,7 @@ BattleBGEffect_HeadFollow: ; c8281 (32:4281)
ret
_QueueBattleAnimation: ; c82ee (32:42ee)
- callab QueueBattleAnimation
+ callfar QueueBattleAnimation
ret
BattleBGEffect_27: ; c82f5 (32:42f5)
@@ -2944,13 +2944,13 @@ BattleBGEffects_CheckSGB: ; c9059 (32:5059)
BattleBGEffects_Sine: ; c905d (32:505d)
ld e, a
- callab BattleAnim_Sine_e
+ callfar BattleAnim_Sine_e
ld a, e
ret
BattleBGEffects_Cosine: ; c9066 (32:5066)
ld e, a
- callab BattleAnim_Cosine_e
+ callfar BattleAnim_Cosine_e
ld a, e
ret
diff --git a/battle/core.asm b/battle/core.asm
index 438c08f08..593caf649 100644
--- a/battle/core.asm
+++ b/battle/core.asm
@@ -175,13 +175,13 @@ BattleTurn: ; 3c12f
call HandleBerserkGene
call UpdateBattleMonInParty
- callba AIChooseMove
+ farcall AIChooseMove
call IsMobileBattle
jr nz, .not_disconnected
- callba Function100da5
- callba StartMobileInactivityTimer
- callba Function100dd8
+ farcall Function100da5
+ farcall StartMobileInactivityTimer
+ farcall Function100dd8
jp c, .quit
.not_disconnected
@@ -377,7 +377,7 @@ HandleBerserkGene: ; 3c27c
.go
push de
push bc
- callab GetUserItem
+ callfar GetUserItem
ld a, [hl]
ld [wd265], a
sub BERSERK_GENE
@@ -405,14 +405,14 @@ HandleBerserkGene: ; 3c27c
ld [hl], a
ld [AttackMissed], a
ld [EffectFailed], a
- callba BattleCommand_AttackUp2
+ farcall BattleCommand_AttackUp2
pop af
pop hl
ld [hl], a
call GetItemName
ld hl, BattleText_UsersStringBuffer1Activated
call StdBattleTextBox
- callab BattleCommand_StatUpMessage
+ callfar BattleCommand_StatUpMessage
pop af
bit SUBSTATUS_CONFUSED, a
ret nz
@@ -473,7 +473,7 @@ DetermineMoveOrder: ; 3c314
jp .player_first
.switch
- callab AI_Switch
+ callfar AI_Switch
call SetEnemyTurn
call SpikesDamage
jp .enemy_first
@@ -489,9 +489,9 @@ DetermineMoveOrder: ; 3c314
.equal_priority
call SetPlayerTurn
- callab GetUserItem
+ callfar GetUserItem
push bc
- callab GetOpponentItem
+ callfar GetOpponentItem
pop de
ld a, d
cp HELD_QUICK_CLAW
@@ -651,7 +651,7 @@ ParsePlayerAction: ; 3c434
.encored
call SetPlayerTurn
- callab UpdateMoveData
+ callfar UpdateMoveData
xor a
ld [wPlayerCharging], a
ld a, [wPlayerMoveStruct + MOVE_EFFECT]
@@ -894,7 +894,7 @@ Battle_EnemyFirst: ; 3c5fe
call SetEnemyTurn
ld a, $1
ld [wEnemyGoesFirst], a
- callab AI_SwitchOrTryItem
+ callfar AI_SwitchOrTryItem
jr c, .switch_item
call EnemyTurn_EndOpponentProtectEndureDestinyBond
call CheckMobileBattleError
@@ -935,7 +935,7 @@ Battle_PlayerFirst: ; 3c664
xor a
ld [wEnemyGoesFirst], a
call SetEnemyTurn
- callab AI_SwitchOrTryItem
+ callfar AI_SwitchOrTryItem
push af
call PlayerTurn_EndOpponentProtectEndureDestinyBond
pop bc
@@ -984,14 +984,14 @@ Battle_PlayerFirst: ; 3c664
PlayerTurn_EndOpponentProtectEndureDestinyBond: ; 3c6cf
call SetPlayerTurn
call EndUserDestinyBond
- callab DoPlayerTurn
+ callfar DoPlayerTurn
jp EndOpponentProtectEndureDestinyBond
; 3c6de
EnemyTurn_EndOpponentProtectEndureDestinyBond: ; 3c6de
call SetEnemyTurn
call EndUserDestinyBond
- callab DoEnemyTurn
+ callfar DoEnemyTurn
jp EndOpponentProtectEndureDestinyBond
; 3c6ed
@@ -1323,7 +1323,7 @@ HandleLeftovers: ; 3c8eb
call SetPlayerTurn
.do_it
- callab GetUserItem
+ callfar GetUserItem
ld a, [hl]
ld [wd265], a
call GetItemName
@@ -1373,7 +1373,7 @@ HandleMysteryberry: ; 3c93c
call SetPlayerTurn
.do_it
- callab GetUserItem
+ callfar GetUserItem
ld a, b
cp HELD_RESTORE_PP
jr nz, .quit
@@ -1470,7 +1470,7 @@ HandleMysteryberry: ; 3c93c
add b
ld [de], a
.skip_checks
- callab GetUserItem
+ callfar GetUserItem
ld a, [hl]
ld [wd265], a
xor a
@@ -1536,13 +1536,13 @@ HandleFutureSight: ; 3ca26
ld a, FUTURE_SIGHT
ld [hl], a
- callab UpdateMoveData
+ callfar UpdateMoveData
xor a
ld [AttackMissed], a
ld [AlreadyDisobeyed], a
ld a, 10
ld [TypeModifier], a
- callab DoMove
+ callfar DoMove
xor a
ld [CurDamage], a
ld [CurDamage + 1], a
@@ -2359,7 +2359,7 @@ HandleEnemySwitch: ; 3cf4a
ld e, HP_BAR_LENGTH_PX
call UpdateHPPal
call WaitBGMap
- callba EnemySwitch_TrainerHud
+ farcall EnemySwitch_TrainerHud
ld a, [wLinkMode]
and a
jr z, .not_linked
@@ -2417,7 +2417,7 @@ WinTrainerBattle: ; 3cfa4
and a
ld a, b
call z, PlayVictoryMusic
- callab Battle_GetTrainerName
+ callfar Battle_GetTrainerName
ld hl, BattleText_EnemyWasDefeated
call StdBattleTextBox
@@ -2452,7 +2452,7 @@ WinTrainerBattle: ; 3cfa4
ld c, 40
call DelayFrames
ld c, $4 ; win
- callba Mobile_PrintOpponentBattleMessage
+ farcall Mobile_PrintOpponentBattleMessage
ret
.battle_tower
@@ -2461,7 +2461,7 @@ WinTrainerBattle: ; 3cfa4
call DelayFrames
call EmptyBattleTextBox
ld c, $3
- callba BattleTowerText
+ farcall BattleTowerText
call WaitPressAorB_BlinkCursor
ld hl, wPayDayMoney
ld a, [hli]
@@ -2589,7 +2589,7 @@ AddBattleMoneyToAccount: ; 3d0be
push bc
ld b, h
ld c, l
- callba TrainerRankings_AddToBattlePayouts
+ farcall TrainerRankings_AddToBattlePayouts
pop bc
pop hl
.loop
@@ -2783,7 +2783,7 @@ PlayerMonFaintHappinessMod: ; 3d1aa
.got_param
ld a, [CurBattleMon]
ld [CurPartyMon], a
- callab ChangeHappiness
+ callfar ChangeHappiness
ld a, [wBattleResult]
and %11000000
add $1
@@ -2932,16 +2932,16 @@ IsMobileBattle: ; 3d2f1
SetUpBattlePartyMenu_NoLoop: ; 3d2f7
call ClearBGPalettes
SetUpBattlePartyMenu: ; switch to fullscreen menu?
- callba LoadPartyMenuGFX
- callba InitPartyMenuWithCancel
- callba InitPartyMenuBGPal7
- callba InitPartyMenuGFX
+ farcall LoadPartyMenuGFX
+ farcall InitPartyMenuWithCancel
+ farcall InitPartyMenuBGPal7
+ farcall InitPartyMenuGFX
ret
; 3d313
JumpToPartyMenuAndPrintText: ; 3d313
- callba WritePartyMenuTilemap
- callba PrintPartyMenuText
+ farcall WritePartyMenuTilemap
+ farcall PrintPartyMenuText
call WaitBGMap
call SetPalettes
call DelayFrame
@@ -2951,11 +2951,11 @@ JumpToPartyMenuAndPrintText: ; 3d313
SelectBattleMon: ; 3d329
call IsMobileBattle
jr z, .mobile
- callba PartyMenuSelect
+ farcall PartyMenuSelect
ret
.mobile
- callba Mobile_PartyMenuSelect
+ farcall Mobile_PartyMenuSelect
ret
; 3d33c
@@ -3067,7 +3067,7 @@ LostBattle: ; 3d38e
call EmptyBattleTextBox
ld c, 2
- callba BattleTowerText
+ farcall BattleTowerText
call WaitPressAorB_BlinkCursor
call ClearTileMap
call ClearBGPalettes
@@ -3118,7 +3118,7 @@ LostBattle: ; 3d38e
call DelayFrames
ld c, $3 ; lost
- callba Mobile_PrintOpponentBattleMessage
+ farcall Mobile_PrintOpponentBattleMessage
scf
ret
; 3d432
@@ -3424,7 +3424,7 @@ LookUpTheEffectivenessOfEveryMove: ; 3d5d7
ld a, BANK(Moves)
call FarCopyBytes
call SetEnemyTurn
- callab BattleCheckTypeMatchup
+ callfar BattleCheckTypeMatchup
pop bc
pop de
pop hl
@@ -3460,13 +3460,13 @@ IsThePlayerPkmnTypesEffectiveAgainstOTPkmn: ; 3d618
ld a, [BattleMonType1]
ld [wPlayerMoveStruct + MOVE_TYPE], a
call SetPlayerTurn
- callab BattleCheckTypeMatchup
+ callfar BattleCheckTypeMatchup
ld a, [wd265]
cp 10 + 1 ; 1.0 + 0.1
jr nc, .super_effective
ld a, [BattleMonType2]
ld [wPlayerMoveStruct + MOVE_TYPE], a
- callab BattleCheckTypeMatchup
+ callfar BattleCheckTypeMatchup
ld a, [wd265]
cp 10 + 1 ; 1.0 + 0.1
jr nc, .super_effective
@@ -3608,7 +3608,7 @@ CheckWhetherToAskSwitch: ; 3d714
push af
ld a, [CurBattleMon]
ld [CurPartyMon], a
- callba CheckCurPartyMonFainted
+ farcall CheckCurPartyMonFainted
pop bc
ld a, b
ld [CurPartyMon], a
@@ -3624,7 +3624,7 @@ CheckWhetherToAskSwitch: ; 3d714
OfferSwitch: ; 3d74b
ld a, [CurPartyMon]
push af
- callab Battle_GetTrainerName
+ callfar Battle_GetTrainerName
ld hl, BattleText_EnemyIsAboutToUseWillPlayerChangePkmn
call StdBattleTextBox
lb bc, 1, 7
@@ -3675,7 +3675,7 @@ ClearEnemyMonBox: ; 3d7a0
; 3d7b8
Function_BattleTextEnemySentOut: ; 3d7b8
- callab Battle_GetTrainerName
+ callfar Battle_GetTrainerName
ld hl, BattleText_EnemySentOut
call StdBattleTextBox
jp WaitBGMap
@@ -3707,9 +3707,9 @@ Function_SetEnemyPkmnAndSendOutAnimation: ; 3d7c7
.not_shiny
ld bc, TempMonSpecies
- callba CheckFaintedFrzSlp
+ farcall CheckFaintedFrzSlp
jr c, .skip_cry
- callba CheckBattleScene
+ farcall CheckBattleScene
jr c, .cry_no_anim
hlcoord 12, 0
ld d, $0
@@ -3851,7 +3851,7 @@ TryToRunAwayFromBattle: ; 3d8b3
ld a, [BattleMonItem]
ld [wd265], a
ld b, a
- callab GetItemHeldEffect
+ callfar GetItemHeldEffect
ld a, b
cp HELD_ESCAPE
pop de
@@ -4054,7 +4054,7 @@ BattleCheckEnemyShininess: ; 3da79
BattleCheckShininess: ; 3da7c
ld b, h
ld c, l
- callab CheckShininess
+ callfar CheckShininess
ret
; 3da85
@@ -4208,7 +4208,7 @@ SendOutPlayerMon: ; 3db5f
call GetPartyParamLocation
ld b, h
ld c, l
- callba CheckFaintedFrzSlp
+ farcall CheckFaintedFrzSlp
jr c, .statused
ld a, $f0
ld [CryTracks], a
@@ -4418,7 +4418,7 @@ HandleHealingItems: ; 3dcf9
; 3dd2f
HandleHPHealingItem: ; 3dd2f
- callab GetOpponentItem
+ callfar GetOpponentItem
ld a, b
cp HELD_BERRY
ret nz
@@ -4502,11 +4502,11 @@ HandleHPHealingItem: ; 3dd2f
predef AnimateHPBar
UseOpponentItem:
call RefreshBattleHuds
- callab GetOpponentItem
+ callfar GetOpponentItem
ld a, [hl]
ld [wNamedObjectIndexBuffer], a
call GetItemName
- callab ConsumeHeldItem
+ callfar ConsumeHeldItem
ld hl, RecoveredUsingText
jp StdBattleTextBox
; 3ddc8
@@ -4531,7 +4531,7 @@ ItemRecoveryAnim: ; 3ddc8
; 3dde9
UseHeldStatusHealingItem: ; 3dde9
- callab GetOpponentItem
+ callfar GetOpponentItem
ld hl, .Statuses
.loop
ld a, [hli]
@@ -4600,7 +4600,7 @@ UseConfusionHealingItem: ; 3de51
call GetBattleVar
bit SUBSTATUS_CONFUSED, a
ret z
- callab GetOpponentItem
+ callfar GetOpponentItem
ld a, b
cp HELD_HEAL_CONFUSION
jr z, .heal_status
@@ -4667,7 +4667,7 @@ HandleStatBoostingHeldItems: ; 3de97
push bc
ld a, [bc]
ld b, a
- callab GetItemHeldEffect
+ callfar GetItemHeldEffect
ld hl, .StatUpItems
.loop
ld a, [hli]
@@ -4699,7 +4699,7 @@ HandleStatBoostingHeldItems: ; 3de97
call GetItemName
ld hl, BattleText_UsersStringBuffer1Activated
call StdBattleTextBox
- callab BattleCommand_StatUpMessage
+ callfar BattleCommand_StatUpMessage
ret
.finish
@@ -4774,7 +4774,7 @@ DrawPlayerHUD: ; 3df58
lb bc, 5, 11
call ClearBox
- callba DrawPlayerHUDBorder
+ farcall DrawPlayerHUDBorder
hlcoord 18, 9
ld [hl], $73 ; vertical bar
@@ -4867,7 +4867,7 @@ PrintPlayerHUD: ; 3dfbf
ld a, TEMPMON
ld [MonType], a
- callab GetGender
+ callfar GetGender
ld a, " "
jr c, .got_gender_char
ld a, "♂"
@@ -4916,7 +4916,7 @@ DrawEnemyHUD: ; 3e043
lb bc, 4, 11
call ClearBox
- callba DrawEnemyHUDBorder
+ farcall DrawEnemyHUDBorder
ld a, [TempEnemyMonSpecies]
ld [CurSpecies], a
@@ -4945,7 +4945,7 @@ DrawEnemyHUD: ; 3e043
ld a, TEMPMON
ld [MonType], a
- callab GetGender
+ callfar GetGender
ld a, " "
jr c, .got_gender
ld a, "♂"
@@ -5080,7 +5080,7 @@ BattleMenu: ; 3e139
ld a, [BattleType]
cp BATTLETYPE_CONTEST
jr nz, .not_contest
- callba ContestBattleMenu
+ farcall ContestBattleMenu
jr .next
.not_contest
@@ -5088,7 +5088,7 @@ BattleMenu: ; 3e139
ld a, [InputType]
or a
jr z, .skip_dude_pack_select
- callba _DudeAutoInput_DownA
+ farcall _DudeAutoInput_DownA
.skip_dude_pack_select
call LoadBattleMenu2
ret c
@@ -5120,12 +5120,12 @@ LoadBattleMenu2: ; 3e19b
call IsMobileBattle
jr z, .mobile
- callba LoadBattleMenu
+ farcall LoadBattleMenu
and a
ret
.mobile
- callba Function100b12
+ farcall Function100b12
ld a, [wcd2b]
and a
ret z
@@ -5159,14 +5159,14 @@ BattleMenu_Pack: ; 3e1c7
cp BATTLETYPE_CONTEST
jr z, .contest
- callba BattlePack
+ farcall BattlePack
ld a, [wPlayerAction]
and a
jr z, .didnt_use_item
jr .got_item
.tutorial
- callba TutorialPack
+ farcall TutorialPack
ld a, POKE_BALL
ld [CurItem], a
call DoItemEffect
@@ -5204,7 +5204,7 @@ BattleMenu_Pack: ; 3e1c7
ld a, [wWildMon]
and a
jr nz, .run
- callab CheckItemPocket
+ callfar CheckItemPocket
ld a, [wItemAttributeParamBuffer]
cp BALL
jr z, .ball
@@ -5259,7 +5259,7 @@ BattleMenuPKMN_Loop:
call SelectBattleMon
jr c, .Cancel
.loop
- callba FreezeMonIcons
+ farcall FreezeMonIcons
call .GetMenu
jr c, .PressedB
call PlaceHollowCursor
@@ -5298,11 +5298,11 @@ BattleMenuPKMN_Loop:
.GetMenu: ; 3e2f5
call IsMobileBattle
jr z, .mobile
- callba BattleMonMenu
+ farcall BattleMonMenu
ret
.mobile
- callba MobileBattleMonMenu
+ farcall MobileBattleMonMenu
ret
; 3e308
@@ -5325,7 +5325,7 @@ Battle_StatsScreen: ; 3e308
call LowVolume
xor a ; PARTYMON
ld [MonType], a
- callba BattleStatsScreenInit
+ farcall BattleStatsScreenInit
call MaxVolume
call DisableLCD
@@ -5434,7 +5434,7 @@ PlayerSwitch: ; 3e3ad
; 3e3ff
EnemyMonEntrance: ; 3e3ff
- callab AI_Switch
+ callfar AI_Switch
call SetEnemyTurn
jp SpikesDamage
; 3e40b
@@ -5517,7 +5517,7 @@ BattleMenu_Run: ; 3e489
CheckAmuletCoin: ; 3e4a8
ld a, [BattleMonItem]
ld b, a
- callab GetItemHeldEffect
+ callfar GetItemHeldEffect
ld a, b
cp HELD_AMULET_COIN
ret nz
@@ -5529,7 +5529,7 @@ CheckAmuletCoin: ; 3e4a8
MoveSelectionScreen: ; 3e4bc
call IsMobileBattle
jr nz, .not_mobile
- callba MobileMoveSelectionScreen
+ farcall MobileMoveSelectionScreen
ret
.not_mobile
@@ -5884,7 +5884,7 @@ MoveInfoBox: ; 3e6c8
ld [CurPartyMon], a
ld a, WILDMON
ld [MonType], a
- callab GetMaxPPOfMove
+ callfar GetMaxPPOfMove
ld hl, wMenuCursorY
ld c, [hl]
@@ -5904,7 +5904,7 @@ MoveInfoBox: ; 3e6c8
hlcoord 7, 11
ld [hl], "/"
- callab UpdateMoveData
+ callfar UpdateMoveData
ld a, [wPlayerMoveStruct + MOVE_ANIM]
ld b, a
hlcoord 2, 10
@@ -6104,7 +6104,7 @@ ParseEnemyAction: ; 3e7c1
.skip_load
call SetEnemyTurn
- callab UpdateMoveData
+ callfar UpdateMoveData
call CheckEnemyLockedIn
jr nz, .raging
xor a
@@ -6167,7 +6167,7 @@ CheckEnemyLockedIn: ; 3e8d1
; 3e8e4
LinkBattleSendReceiveAction: ; 3e8e4
- callba _LinkBattleSendReceiveAction
+ farcall _LinkBattleSendReceiveAction
ret
; 3e8eb
@@ -6276,7 +6276,7 @@ LoadEnemyMon: ; 3e8eb
; All trainers have preset DVs, determined by class
; See GetTrainerDVs for more on that
- callba GetTrainerDVs
+ farcall GetTrainerDVs
; These are the DVs we'll use if we're actually in a trainer battle
ld a, [wBattleMode]
dec a
@@ -6380,7 +6380,7 @@ LoadEnemyMon: ; 3e8eb
; Get Magikarp's length
ld de, EnemyMonDVs
ld bc, PlayerID
- callab CalcMagikarpLength
+ callfar CalcMagikarpLength
; We're clear if the length is < 1536
ld a, [wMagikarpLength]
@@ -6780,7 +6780,7 @@ BattleWinSlideInEnemyTrainerFrontpic: ; 3ebd8
ld a, [OtherTrainerClass]
ld [TrainerClass], a
ld de, VTiles2
- callab GetTrainerPic
+ callfar GetTrainerPic
hlcoord 19, 0
ld c, 0
@@ -7144,12 +7144,12 @@ BoostStat: ; 3ed7c
; 3ed9f
_LoadBattleFontsHPBar: ; 3ed9f
- callab LoadBattleFontsHPBar
+ callfar LoadBattleFontsHPBar
ret
; 3eda6
_LoadHPBar: ; 3eda6
- callab LoadHPBar
+ callfar LoadHPBar
ret
; 3edad
@@ -7455,7 +7455,7 @@ GiveExperiencePoints: ; 3ee3b
call GetBaseData
push bc
ld d, MAX_LEVEL
- callab CalcExpAtLevel
+ callfar CalcExpAtLevel
pop bc
ld hl, MON_STAT_EXP - 1
add hl, bc
@@ -7484,7 +7484,7 @@ GiveExperiencePoints: ; 3ee3b
xor a ; PARTYMON
ld [MonType], a
predef CopyPkmnToTempMon
- callab CalcLevel
+ callfar CalcLevel
pop bc
ld hl, MON_LEVEL
add hl, bc
@@ -7571,16 +7571,16 @@ GiveExperiencePoints: ; 3ee3b
xor a
ld [wd265], a
call ApplyStatLevelMultiplierOnAllStats
- callab ApplyStatusEffectOnPlayerStats
- callab BadgeStatBoosts
- callab UpdatePlayerHUD
+ callfar ApplyStatusEffectOnPlayerStats
+ callfar BadgeStatBoosts
+ callfar UpdatePlayerHUD
call EmptyBattleTextBox
call LoadTileMapToTempTileMap
ld a, $1
ld [hBGMapMode], a
.skip_animation
- callba LevelUpHappinessMod
+ farcall LevelUpHappinessMod
ld a, [CurBattleMon]
ld b, a
ld a, [CurPartyMon]
@@ -7781,7 +7781,7 @@ AnimateExpBar: ; 3f136
.NoOverflow:
ld d, MAX_LEVEL
- callab CalcExpAtLevel
+ callfar CalcExpAtLevel
ld a, [hProduct + 1]
ld b, a
ld a, [hProduct + 2]
@@ -7804,7 +7804,7 @@ AnimateExpBar: ; 3f136
ld [hld], a
.AlreadyAtMaxExp:
- callab CalcLevel
+ callfar CalcLevel
ld a, d
pop bc
pop de
@@ -7836,7 +7836,7 @@ AnimateExpBar: ; 3f136
call TerminateExpBarSound
ld de, SFX_HIT_END_OF_EXP_BAR
call PlaySFX
- callba AnimateEndOfExpBar
+ farcall AnimateEndOfExpBar
call WaitSFX
ld hl, BattleText_StringBuffer1GrewToLevel
call StdBattleTextBox
@@ -8142,7 +8142,7 @@ CalcExpBar: ; 3f39c
push de
ld d, b
push de
- callab CalcExpAtLevel
+ callfar CalcExpAtLevel
pop de
; exp at current level gets pushed to the stack
ld hl, hMultiplicand
@@ -8154,7 +8154,7 @@ CalcExpBar: ; 3f39c
push af
; next level
inc d
- callab CalcExpAtLevel
+ callfar CalcExpAtLevel
; back up the next level exp, and subtract the two levels
ld hl, hMultiplicand + 2
ld a, [hl]
@@ -8369,18 +8369,18 @@ _DoBattle: ; 3f4d9
; 3f4dd
BattleIntro: ; 3f4dd
- callba TrainerRankings_Battles ; mobile
+ farcall TrainerRankings_Battles ; mobile
call LoadTrainerOrWildMonPic
xor a
ld [TempBattleMonSpecies], a
ld [wBattleMenuCursorBuffer], a
xor a
ld [hMapAnims], a
- callba PlayBattleMusic
- callba ShowLinkBattleParticipants
- callba FindFirstAliveMonAndStartBattle
+ farcall PlayBattleMusic
+ farcall ShowLinkBattleParticipants
+ farcall FindFirstAliveMonAndStartBattle
call DisableSpriteUpdates
- callba ClearBattleRAM
+ farcall ClearBattleRAM
call InitEnemy
call BackUpVBGMap2
ld b, SCGB_BATTLE_GRAYSCALE
@@ -8454,11 +8454,11 @@ BackUpVBGMap2: ; 3f568
InitEnemyTrainer: ; 3f594
ld [TrainerClass], a
- callba TrainerRankings_TrainerBattles
+ farcall TrainerRankings_TrainerBattles
xor a
ld [TempEnemyMonSpecies], a
- callab GetTrainerAttributes
- callab ReadTrainerParty
+ callfar GetTrainerAttributes
+ callfar ReadTrainerParty
ld a, [TrainerClass]
cp RIVAL1
@@ -8468,7 +8468,7 @@ InitEnemyTrainer: ; 3f594
.ok
ld de, VTiles2
- callab GetTrainerPic
+ callfar GetTrainerPic
xor a
ld [hGraphicStartTile], a
dec a
@@ -8495,7 +8495,7 @@ InitEnemyTrainer: ; 3f594
or [hl]
jr z, .skipfaintedmon
ld c, HAPPINESS_GYMBATTLE
- callab ChangeHappiness
+ callfar ChangeHappiness
.skipfaintedmon
pop bc
dec b
@@ -8510,7 +8510,7 @@ InitEnemyTrainer: ; 3f594
InitEnemyWildmon: ; 3f607
ld a, WILD_BATTLE
ld [wBattleMode], a
- callba TrainerRankings_WildBattles
+ farcall TrainerRankings_WildBattles
call LoadEnemyMon
ld hl, EnemyMonMoves
ld de, wWildMonMoves
@@ -8619,7 +8619,7 @@ ExitBattle: ; 3f69e
xor a
ld [wForceEvolution], a
predef EvolveAfterBattle
- callba GivePokerusAndConvertBerries
+ farcall GivePokerusAndConvertBerries
ret
; 3f6d0
@@ -8693,20 +8693,20 @@ CheckPayDay: ; 3f71d
; 3f759
ShowLinkBattleParticipantsAfterEnd: ; 3f759
- callba TrainerRankings_LinkBattles
- callba BackupMobileEventIndex
+ farcall TrainerRankings_LinkBattles
+ farcall BackupMobileEventIndex
ld a, [CurOTMon]
ld hl, OTPartyMon1Status
call GetPartyLocation
ld a, [EnemyMonStatus]
ld [hl], a
call ClearTileMap
- callba _ShowLinkBattleParticipants
+ farcall _ShowLinkBattleParticipants
ret
; 3f77c
DisplayLinkBattleResult: ; 3f77c
- callba CheckMobileBattleError
+ farcall CheckMobileBattleError
jp c, .Mobile_InvalidBattle
call IsMobileBattle2
jr nz, .proceed
@@ -8715,7 +8715,7 @@ DisplayLinkBattleResult: ; 3f77c
bit 4, [hl]
jr z, .proceed
- callba DetermineLinkBattleResult
+ farcall DetermineLinkBattleResult
.proceed
ld a, [wBattleResult]
@@ -8723,24 +8723,24 @@ DisplayLinkBattleResult: ; 3f77c
cp $1
jr c, .victory
jr z, .loss
- callba TrainerRankings_ColosseumDraws
+ farcall TrainerRankings_ColosseumDraws
ld de, .Draw
jr .store_result
.victory
- callba TrainerRankings_ColosseumWins
+ farcall TrainerRankings_ColosseumWins
ld de, .Win
jr .store_result
.loss
- callba TrainerRankings_ColosseumLosses
+ farcall TrainerRankings_ColosseumLosses
ld de, .Lose
jr .store_result
.store_result
hlcoord 6, 8
call PlaceString
- callba BackupMobileEventIndex
+ farcall BackupMobileEventIndex
ld c, 200
call DelayFrames
@@ -8977,7 +8977,7 @@ BattleEnd_HandleRoamMons: ; 3f998
ret nz
.update_roam_mons
- callab UpdateRoamMons
+ callfar UpdateRoamMons
ret
; 3f9d1
@@ -9269,7 +9269,7 @@ InitBattleDisplay: ; 3fb6c
ld b, 4
ld c, 18
call TextBox
- callba MobileTextBorder
+ farcall MobileTextBorder
hlcoord 1, 5
lb bc, 3, 7
call ClearBox
@@ -9285,7 +9285,7 @@ InitBattleDisplay: ; 3fb6c
call WaitBGMap
xor a
ld [hBGMapMode], a
- callba BattleIntroSlidingPics
+ farcall BattleIntroSlidingPics
ld a, $1
ld [hBGMapMode], a
ld a, $31
@@ -9354,7 +9354,7 @@ GetTrainerBackpic: ; 3fbff
jr z, .Chris
; It's a girl.
- callba GetKrisBackpic
+ farcall GetKrisBackpic
ret
.Chris:
@@ -9439,7 +9439,7 @@ BattleStartMessage: ; 3fc8b
ld c, 20
call DelayFrames
- callba Battle_GetTrainerName
+ farcall Battle_GetTrainerName
ld hl, WantsToBattleText
jr .PlaceBattleStartText
@@ -9458,10 +9458,10 @@ BattleStartMessage: ; 3fc8b
call Call_PlayBattleAnim
.not_shiny
- callba CheckSleepingTreeMon
+ farcall CheckSleepingTreeMon
jr c, .skip_cry
- callba CheckBattleScene
+ farcall CheckBattleScene
jr c, .cry_no_anim
hlcoord 12, 0
@@ -9481,7 +9481,7 @@ BattleStartMessage: ; 3fc8b
cp BATTLETYPE_FISH
jr nz, .NotFishing
- callba TrainerRankings_HookedEncounters
+ farcall TrainerRankings_HookedEncounters
ld hl, HookedPokemonAttackedText
jr .PlaceBattleStartText
@@ -9497,7 +9497,7 @@ BattleStartMessage: ; 3fc8b
.PlaceBattleStartText:
push hl
- callba BattleStart_TrainerHuds
+ farcall BattleStart_TrainerHuds
pop hl
call StdBattleTextBox
@@ -9505,7 +9505,7 @@ BattleStartMessage: ; 3fc8b
ret nz
ld c, $2 ; start
- callba Mobile_PrintOpponentBattleMessage
+ farcall Mobile_PrintOpponentBattleMessage
ret
; 3fd26
diff --git a/battle/effect_commands.asm b/battle/effect_commands.asm
index 57e4c574f..d04da6b52 100644
--- a/battle/effect_commands.asm
+++ b/battle/effect_commands.asm
@@ -1016,7 +1016,7 @@ IgnoreSleepOnly: ; 3451f
BattleCommand_UsedMoveText: ; 34541
; usedmovetext
- callba DisplayUsedMoveText
+ farcall DisplayUsedMoveText
ret
; 34548
@@ -1385,14 +1385,14 @@ BattleCommand_Stab: ; 346d2
push hl
push de
push bc
- callba DoWeatherModifiers
+ farcall DoWeatherModifiers
pop bc
pop de
pop hl
push de
push bc
- callba DoBadgeTypeBoosts
+ farcall DoBadgeTypeBoosts
pop bc
pop de
@@ -3862,7 +3862,7 @@ BattleCommand_Counter: ; 35813
ret z
ld b, a
- callab GetMoveEffect
+ callfar GetMoveEffect
ld a, b
cp EFFECT_COUNTER
ret z
@@ -4068,7 +4068,7 @@ BattleCommand_PainSplit: ; 35926
call ResetDamage
hlcoord 2, 2
predef AnimateHPBar
- callba _UpdateBattleHUDs
+ farcall _UpdateBattleHUDs
ld hl, SharedPainText
jp StdBattleTextBox
@@ -4518,7 +4518,7 @@ BattleCommand_SleepTalk: ; 35b33
push bc
ld b, a
- callab GetMoveEffect
+ callfar GetMoveEffect
ld a, b
pop bc
@@ -4747,7 +4747,7 @@ PlayFXAnimID: ; 35d08
ld c, 3
call DelayFrames
- callab PlayBattleAnim
+ callfar PlayBattleAnim
ret
@@ -5017,7 +5017,7 @@ BattleCommand_SleepTarget: ; 35e5c
ld hl, FellAsleepText
call StdBattleTextBox
- callba UseHeldStatusHealingItem
+ farcall UseHeldStatusHealingItem
jp z, OpponentCantMove
ret
@@ -5094,7 +5094,7 @@ BattleCommand_PoisonTarget: ; 35eee
ld hl, WasPoisonedText
call StdBattleTextBox
- callba UseHeldStatusHealingItem
+ farcall UseHeldStatusHealingItem
ret
; 35f2c
@@ -5179,7 +5179,7 @@ BattleCommand_Poison: ; 35f2c
call StdBattleTextBox
.finished
- callba UseHeldStatusHealingItem
+ farcall UseHeldStatusHealingItem
ret
.failed
@@ -5382,7 +5382,7 @@ BattleCommand_BurnTarget: ; 3608c
ld hl, WasBurnedText
call StdBattleTextBox
- callba UseHeldStatusHealingItem
+ farcall UseHeldStatusHealingItem
ret
; 360dd
@@ -5455,7 +5455,7 @@ BattleCommand_FreezeTarget: ; 36102
ld hl, WasFrozenText
call StdBattleTextBox
- callba UseHeldStatusHealingItem
+ farcall UseHeldStatusHealingItem
ret nz
call OpponentCantMove
@@ -6816,7 +6816,7 @@ BattleCommand_ForceSwitch: ; 3680f
ld a, d
inc a
ld [wEnemySwitchMonIndex], a
- callab ForceEnemySwitch
+ callfar ForceEnemySwitch
ld hl, DraggedOutText
call StdBattleTextBox
@@ -8081,7 +8081,7 @@ BattleCommand_LeechSeed: ; 36f9d
BattleCommand_Splash: ; 36fe1
call AnimateCurrentMove
- callba TrainerRankings_Splash
+ farcall TrainerRankings_Splash
jp PrintNothingHappened
; 36fed
@@ -8285,7 +8285,7 @@ BattleCommand_Conversion: ; 3707f
inc de
ld [de], a
ld [wNamedObjectIndexBuffer], a
- callba GetTypeName
+ farcall GetTypeName
call AnimateCurrentMove
ld hl, TransformedTypeText
jp StdBattleTextBox
@@ -8608,7 +8608,7 @@ CheckSubstituteOpp: ; 37378
BattleCommand_Selfdestruct: ; 37380
- callba TrainerRankings_Selfdestruct
+ farcall TrainerRankings_Selfdestruct
ld a, BATTLEANIM_PLAYER_DAMAGE
ld [wNumHits], a
ld c, 3
@@ -8632,8 +8632,8 @@ BattleCommand_Selfdestruct: ; 37380
res SUBSTATUS_DESTINY_BOND, [hl]
call _CheckBattleScene
ret nc
- callba DrawPlayerHUD
- callba DrawEnemyHUD
+ farcall DrawPlayerHUD
+ farcall DrawEnemyHUD
call WaitBGMap
jp RefreshBattleHuds
@@ -9032,13 +9032,13 @@ BattleCommand_BatonPass: ; 379c9
; Transition into switchmon menu
call LoadStandardMenuDataHeader
- callba SetUpBattlePartyMenu_NoLoop
+ farcall SetUpBattlePartyMenu_NoLoop
- callba ForcePickSwitchMonInBattle
+ farcall ForcePickSwitchMonInBattle
; Return to battle scene
call ClearPalettes
- callba _LoadBattleFontsHPBar
+ farcall _LoadBattleFontsHPBar
call CloseWindow
call ClearSprites
hlcoord 1, 0
@@ -9050,7 +9050,7 @@ BattleCommand_BatonPass: ; 379c9
call BatonPass_LinkPlayerSwitch
; Mobile link battles handle entrances differently
- callba CheckMobileBattleError
+ farcall CheckMobileBattleError
jp c, EndMoveEffect
ld hl, PassedBattleMonEntrance
@@ -9075,7 +9075,7 @@ BattleCommand_BatonPass: ; 379c9
call BatonPass_LinkEnemySwitch
; Mobile link battles handle entrances differently
- callba CheckMobileBattleError
+ farcall CheckMobileBattleError
jp c, EndMoveEffect
; Passed enemy PartyMon entrance
@@ -9403,7 +9403,7 @@ BattleCommand_TimeBasedHealContinue: ; 37b7e
call AnimateCurrentMove
call BattleCommand_SwitchTurn
- callab RestoreHP
+ callfar RestoreHP
call BattleCommand_SwitchTurn
call UpdateUserInParty
@@ -9433,7 +9433,7 @@ BattleCommand_HiddenPower: ; 37be8
ld a, [AttackMissed]
and a
ret nz
- callba HiddenPowerDamage
+ farcall HiddenPowerDamage
ret
; 37bf4
@@ -9475,14 +9475,14 @@ BattleCommand_BellyDrum: ; 37c1a
and a
jr nz, .failed
- callab GetHalfMaxHP
- callab CheckUserHasEnoughHP
+ callfar GetHalfMaxHP
+ callfar CheckUserHasEnoughHP
jr nc, .failed
push bc
call AnimateCurrentMove
pop bc
- callab SubtractHPFromUser
+ callfar SubtractHPFromUser
call UpdateUserInParty
ld a, 5
@@ -9568,7 +9568,7 @@ BattleCommand_MirrorCoat: ; 37c95
ret z
ld b, a
- callab GetMoveEffect
+ callfar GetMoveEffect
ld a, b
cp EFFECT_MIRROR_COAT
ret z
@@ -9914,7 +9914,7 @@ PlayUserBattleAnim: ; 37e47
push hl
push de
push bc
- callab PlayBattleAnim
+ callfar PlayBattleAnim
pop bc
pop de
pop hl
@@ -9936,7 +9936,7 @@ PlayOpponentBattleAnim: ; 37e54
push bc
call BattleCommand_SwitchTurn
- callab PlayBattleAnim
+ callfar PlayBattleAnim
call BattleCommand_SwitchTurn
pop bc
@@ -10035,21 +10035,21 @@ GetMoveByte: ; 37ebb
DisappearUser: ; 37ec0
- callba _DisappearUser
+ farcall _DisappearUser
ret
; 37ec7
AppearUserLowerSub: ; 37ec7
- callba _AppearUserLowerSub
+ farcall _AppearUserLowerSub
ret
; 37ece
AppearUserRaiseSub: ; 37ece
- callba _AppearUserRaiseSub
+ farcall _AppearUserRaiseSub
ret
; 37ed5
@@ -10060,7 +10060,7 @@ _CheckBattleScene: ; 37ed5
push hl
push de
push bc
- callba CheckBattleScene
+ farcall CheckBattleScene
pop bc
pop de
pop hl
diff --git a/battle/effects/attract.asm b/battle/effects/attract.asm
index f1bc590eb..0a6d7c975 100755
--- a/battle/effects/attract.asm
+++ b/battle/effects/attract.asm
@@ -35,7 +35,7 @@ CheckOppositeGender: ; 377f5
xor a
ld [MonType], a
- callba GetGender
+ farcall GetGender
jr c, .genderless_samegender
ld b, 1
@@ -58,7 +58,7 @@ CheckOppositeGender: ; 377f5
ld [TempMonDVs + 1], a
ld a, 3
ld [MonType], a
- callba GetGender
+ farcall GetGender
pop bc
jr c, .genderless_samegender
diff --git a/battle/effects/thief.asm b/battle/effects/thief.asm
index f344edef9..6d32d68d4 100644
--- a/battle/effects/thief.asm
+++ b/battle/effects/thief.asm
@@ -23,7 +23,7 @@ BattleCommand_Thief: ; 37492
ld [wd265], a
ld d, a
- callba ItemIsMail
+ farcall ItemIsMail
ret c
ld a, [EffectFailed]
@@ -71,7 +71,7 @@ BattleCommand_Thief: ; 37492
ld [wd265], a
ld d, a
- callba ItemIsMail
+ farcall ItemIsMail
ret c
ld a, [EffectFailed]
diff --git a/battle/hidden_power.asm b/battle/hidden_power.asm
index 184c597d0..c75a67ab3 100644
--- a/battle/hidden_power.asm
+++ b/battle/hidden_power.asm
@@ -104,7 +104,7 @@ HiddenPowerDamage: ; fbced
; based on the new type, but keep base power.
ld a, d
push af
- callba BattleCommand_DamageStats ; damagestats
+ farcall BattleCommand_DamageStats ; damagestats
pop af
ld d, a
ret
diff --git a/battle/link_result.asm b/battle/link_result.asm
index 5739bbdc0..cf6102acc 100755
--- a/battle/link_result.asm
+++ b/battle/link_result.asm
@@ -1,5 +1,5 @@
DetermineLinkBattleResult: ; 2b930
- callba UpdateEnemyMonInParty
+ farcall UpdateEnemyMonInParty
ld hl, PartyMon1HP
call .CountMonsRemaining
push bc
diff --git a/battle/misc.asm b/battle/misc.asm
index 0fed74e38..b05dc8071 100644
--- a/battle/misc.asm
+++ b/battle/misc.asm
@@ -13,11 +13,11 @@ _DisappearUser: ; fbd54
jr FinishAppearDisappearUser
_AppearUserRaiseSub: ; fbd69 (3e:7d69)
- callba BattleCommand_RaiseSubNoAnim
+ farcall BattleCommand_RaiseSubNoAnim
jr AppearUser
_AppearUserLowerSub: ; fbd71 (3e:7d71)
- callba BattleCommand_LowerSubNoAnim
+ farcall BattleCommand_LowerSubNoAnim
AppearUser: ; fbd77 (3e:7d77)
xor a
diff --git a/battle/objects/engine.asm b/battle/objects/engine.asm
index 9e6c3329a..6a4f86902 100755
--- a/battle/objects/engine.asm
+++ b/battle/objects/engine.asm
@@ -302,13 +302,13 @@ GetBattleAnimTileOffset: ; ccb31 (33:4b31)
ret
_ExecuteBGEffects: ; ccb48
- callab ExecuteBGEffects
+ callfar ExecuteBGEffects
ret
; ccb4f
_QueueBGEffect: ; ccb4f (33:4b4f)
- callab QueueBGEffect
+ callfar QueueBGEffect
ret
; ccb56 (33:4b56)
diff --git a/battle/trainer_huds.asm b/battle/trainer_huds.asm
index 60be946fa..9efe08414 100755
--- a/battle/trainer_huds.asm
+++ b/battle/trainer_huds.asm
@@ -259,7 +259,7 @@ _ShowLinkBattleParticipants: ; 2c1b2
ld a, "<BOLD_V>"
ld [hli], a
ld [hl], "<BOLD_S>"
- callba LinkBattle_TrainerHuds ; no need to callba
+ farcall LinkBattle_TrainerHuds ; no need to farcall
ld b, SCGB_DIPLOMA
call GetSGBLayout
call SetPalettes
diff --git a/battle/used_move_text.asm b/battle/used_move_text.asm
index 5b7fcef1a..ea2351005 100755
--- a/battle/used_move_text.asm
+++ b/battle/used_move_text.asm
@@ -32,7 +32,7 @@ UsedMoveText: ; 105db9
ld [wd265], a
push hl
- callba CheckUserIsCharging
+ farcall CheckUserIsCharging
pop hl
jr nz, .grammar