callba/callab → farcall/callfar

This commit is contained in:
Remy Oukaour
2017-12-24 12:47:30 -05:00
parent d787c66374
commit c66d195089
170 changed files with 1751 additions and 1751 deletions

View File

@@ -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

View File

@@ -12,7 +12,7 @@ AIChooseMove: ; 440ce
ret nz
; No use picking a move if there's no choice.
callba CheckEnemyLockedIn
farcall CheckEnemyLockedIn
ret nz

View File

@@ -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:

View File

@@ -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