BattleCommand labels copied from macros

This commit is contained in:
PikalaxALT 2015-11-06 14:45:10 -05:00
parent f0830f084f
commit 46e66077a5
22 changed files with 549 additions and 542 deletions

View File

@ -1783,8 +1783,8 @@ AI_Smart_PriorityHit: ; 38d5a
ld [hBattleTurn], a
push hl
callab EnemyAttackDamage
callab BattleCommand_DamageCalcWithStats
callab BattleCommand_CalcDamageTypeMultiplier
callab BattleCommand_DamageCalc
callab BattleCommand_Stab
pop hl
ld a, [CurDamage + 1]
ld c, a
@ -3375,13 +3375,13 @@ AIDamageCalc: ; 393e7
ld hl, .ConstantDamageEffects
call IsInArray
jr nc, .asm_39400
callab BattleCommand3f
callab BattleCommand_ConstantDamage
ret
.asm_39400
callab EnemyAttackDamage
callab BattleCommand_DamageCalcWithStats
callab BattleCommand_CalcDamageTypeMultiplier
callab BattleCommand_DamageCalc
callab BattleCommand_Stab
ret
.ConstantDamageEffects

View File

@ -417,14 +417,14 @@ Function3c27c: ; 3c27c
ld [hl], a
ld [AttackMissed], a
ld [EffectFailed], a
callba BattleCommand77
callba BattleCommand_AttackUp2
pop af
pop hl
ld [hl], a
call GetItemName
ld hl, BattleText_UsersStringBuffer1Activated
call StdBattleTextBox
callab BattleCommand8c
callab BattleCommand_StatMessageUser
pop af
bit SUBSTATUS_CONFUSED, a
ret nz
@ -4238,7 +4238,7 @@ Function3db5f: ; 3db5f
call WaitBGMap
xor a
ld [hBGMapMode], a
call Function3f43d
call GetMonBackpic
xor a
ld [$ffad], a
ld [wd0d2], a
@ -4748,7 +4748,7 @@ endr
ld a, [hli]
ld h, [hl]
ld l, a
ld a, BANK(BattleCommand70)
ld a, BANK(BattleCommand_AttackUp)
rst FarCall
pop bc
pop de
@ -4761,7 +4761,7 @@ endr
call GetItemName
ld hl, BattleText_UsersStringBuffer1Activated
call StdBattleTextBox
callab BattleCommand8c
callab BattleCommand_StatMessageUser
ret
.asm_3def9
@ -4771,13 +4771,13 @@ endr
; 3defc
.data_3defc
dbw HELD_ATTACK_UP, BattleCommand70
dbw HELD_DEFENSE_UP, BattleCommand71
dbw HELD_SPEED_UP, BattleCommand72
dbw HELD_SP_ATTACK_UP, BattleCommand73
dbw HELD_SP_DEFENSE_UP, BattleCommand74
dbw HELD_ACCURACY_UP, BattleCommand75
dbw HELD_EVASION_UP, BattleCommand76
dbw HELD_ATTACK_UP, BattleCommand_AttackUp
dbw HELD_DEFENSE_UP, BattleCommand_DefenseUp
dbw HELD_SPEED_UP, BattleCommand_SpeedUp
dbw HELD_SP_ATTACK_UP, BattleCommand_SpecialAttackUp
dbw HELD_SP_DEFENSE_UP, BattleCommand_SpecialDefenseUp
dbw HELD_ACCURACY_UP, BattleCommand_AccuracyUp
dbw HELD_EVASION_UP, BattleCommand_EvasionUp
db $ff
; 3df12
@ -5251,7 +5251,7 @@ BattleMenu_Pack: ; 3e1c7
call ClearPalettes
call DelayFrame
call Function3ed9f
call Function3f43d
call GetMonBackpic
call Function3f47c
call ExitMenu
call WaitBGMap
@ -5284,7 +5284,7 @@ Function3e234: ; 3e234
ld a, [BattleType]
cp BATTLETYPE_TUTORIAL
jr z, .asm_3e25d
call Function3f43d
call GetMonBackpic
.asm_3e25d
call Function3f47c
@ -8356,7 +8356,7 @@ Function3f41c: ; 3f41c
ret
; 3f43d
Function3f43d: ; 3f43d
GetMonBackpic: ; 3f43d
ld a, [PlayerSubStatus4]
bit SUBSTATUS_SUBSTITUTE, a
ld hl, BattleAnimCmd_DD

View File

@ -1,180 +1,183 @@
dw 0 ; padding
BattleCommandPointers: ; 3fd28
dw BattleCommand01 ; 34084
dw BattleCommand02 ; 343db
dw BattleCommand03 ; 34541
dw BattleCommand04 ; 34555
dw BattleCommand05 ; 34631
dw BattleCommand06 ; 352dc
dw BattleCommand_CalcDamageTypeMultiplier ; 346d2 - 07
dw BattleCommand08 ; 34cfd
dw BattleCommand09 ; 34d32
dw BattleCommand_CheckTurn ; 34084
dw BattleCommand_CheckObedience ; 343db
dw BattleCommand_UsedMoveText ; 34541
dw BattleCommand_DoTurn ; 34555
dw BattleCommand_Critical ; 34631
dw BattleCommand_DamageStats ; 352dc
dw BattleCommand_Stab ; 346d2 - 07
dw BattleCommand_DamageVariation ; 34cfd
dw BattleCommand_CheckHit ; 34d32
dw BattleCommand0a ; 34eee
dw BattleCommand0b ; 34f60
dw BattleCommand0c ; 35004
dw BattleCommand0d ; 35023
dw BattleCommand0e ; 3505e
dw BattleCommand0f ; 35175
dw BattleCommand10 ; 351ad
dw BattleCommand11 ; 351c0
dw BattleCommand12 ; 35250
dw BattleCommand13 ; 35eee
dw BattleCommand14 ; 35e5c
dw BattleCommand15 ; 35fff
dw BattleCommand16 ; 36008
dw BattleCommand17 ; 3608c
dw BattleCommand18 ; 36102
dw BattleCommand19 ; 36165
dw BattleCommand1a ; 37380
dw BattleCommand1b ; 373c9
dw BattleCommand1c ; 361e4
dw BattleCommand1d ; 362e3
dw BattleCommand1e ; 3705c
dw BattleCommand1f ; 3707f
dw BattleCommand20 ; 3710e
dw BattleCommand21 ; 36671
dw BattleCommand22 ; 366e5
dw BattleCommand23 ; 3680f
dw BattleCommand24 ; 369b6
dw BattleCommand25 ; 36aa0
dw BattleCommand26 ; 36af3
dw BattleCommand27 ; 36cb2
dw BattleCommand28 ; 36c7e
dw BattleCommand29 ; 36c98
dw BattleCommand2a ; 36d3b
dw BattleCommand2b ; 36d1d
dw BattleCommand2c ; 3713e
dw BattleCommand2d ; 371cd
dw BattleCommand2e ; 372fc
dw BattleCommand2f ; 35f2c
dw BattleCommand30 ; 36dc7
dw BattleCommand31 ; 36e7c
dw BattleCommand32 ; 36f0b
dw BattleCommand33 ; 36f46
dw BattleCommand34 ; 37418
dw BattleCommand35 ; 36f9d
dw BattleCommand36 ; 36fe1
dw BattleCommand37 ; 36fed
dw BattleCommand38 ; 37e85
dw BattleCommand39 ; 36b4d
dw BattleCommand3a ; 36b3a
dw BattleCommand3b ; 36c2d
dw BattleCommand_ResultText ; 35023
dw BattleCommand_CheckFaint ; 3505e
dw BattleCommand_CriticalText ; 35175
dw BattleCommand_SuperEffectiveText ; 351ad
dw BattleCommand_CheckDestinyBond ; 351c0
dw BattleCommand_BuildOpponentRage ; 35250
dw BattleCommand_PoisonTarget ; 35eee
dw BattleCommand_SleepTarget ; 35e5c
dw BattleCommand_DrainTarget ; 35fff
dw BattleCommand_EatDream ; 36008
dw BattleCommand_BurnTarget ; 3608c
dw BattleCommand_FreezeTarget ; 36102
dw BattleCommand_ParalyzeTarget ; 36165
dw BattleCommand_SelfDestruct ; 37380
dw BattleCommand_MirrorMove ; 373c9
dw BattleCommand_StatUp ; 361e4
dw BattleCommand_StatDown ; 362e3
dw BattleCommand_PayDay ; 3705c
dw BattleCommand_Conversion ; 3707f
dw BattleCommand_ResetStats ; 3710e
dw BattleCommand_StoreEnergy ; 36671
dw BattleCommand_UnleashEnergy ; 366e5
dw BattleCommand_ForceSwitch ; 3680f
dw BattleCommand_EndLoop ; 369b6
dw BattleCommand_FlinchTarget ; 36aa0
dw BattleCommand_OHKO ; 36af3
dw BattleCommand_Recoil ; 36cb2
dw BattleCommand_Mist ; 36c7e
dw BattleCommand_FocusEnergy ; 36c98
dw BattleCommand_Confuse ; 36d3b
dw BattleCommand_ConfuseTarget ; 36d1d
dw BattleCommand_Heal ; 3713e
dw BattleCommand_Transform ; 371cd
dw BattleCommand_Screen ; 372fc
dw BattleCommand_Poison ; 35f2c
dw BattleCommand_Paralyze ; 36dc7
dw BattleCommand_Substitute ; 36e7c
dw BattleCommand_RechargeNextTurn ; 36f0b
dw BattleCommand_Mimic ; 36f46
dw BattleCommand_Metronome ; 37418
dw BattleCommand_LeechSeed ; 36f9d
dw BattleCommand_Splash ; 36fe1
dw BattleCommand_Disable ; 36fed
dw BattleCommand_ClearText ; 37e85
dw BattleCommand_Charge ; 36b4d
dw BattleCommand_CheckCharge ; 36b3a
dw BattleCommand_TrapTarget ; 36c2d
dw BattleCommand3c ; 36c2c
dw BattleCommand3d ; 36751
dw BattleCommand3e ; 3671a
dw BattleCommand3f ; 35726
dw BattleCommand40 ; 35813
dw BattleCommand41 ; 35864
dw BattleCommand42 ; 35926
dw BattleCommand43 ; 359d0
dw BattleCommand44 ; 359e6
dw BattleCommand45 ; 35a53
dw BattleCommand46 ; 35a74
dw BattleCommand47 ; 35b16
dw BattleCommand48 ; 35b33
dw BattleCommand49 ; 35bff
dw BattleCommand4a ; 35c0f
dw BattleCommand4b ; 35c94
dw BattleCommand4c ; 35cc9
dw BattleCommand4d ; 36ac9
dw BattleCommand4e ; 346b2
dw BattleCommand4f ; 346cd
dw BattleCommand50 ; 37492
dw BattleCommand51 ; 37517
dw BattleCommand52 ; 37536
dw BattleCommand53 ; 37563
dw BattleCommand54 ; 37588
dw BattleCommand55 ; 37618
dw BattleCommand56 ; 37683
dw BattleCommand57 ; 376a0
dw BattleCommand58 ; 376c2
dw BattleCommand59 ; 376f8
dw BattleCommand5a ; 3766f
dw BattleCommand5b ; 37718
dw BattleCommand5c ; 37734
dw BattleCommand_Rampage ; 36751
dw BattleCommand_CheckRampage ; 3671a
dw BattleCommand_ConstantDamage ; 35726
dw BattleCommand_Counter ; 35813
dw BattleCommand_Encore ; 35864
dw BattleCommand_PainSplit ; 35926
dw BattleCommand_Snore ; 359d0
dw BattleCommand_Conversion2 ; 359e6
dw BattleCommand_LockOn ; 35a53
dw BattleCommand_Sketch ; 35a74
dw BattleCommand_DefrostOpponent ; 35b16
dw BattleCommand_SleepTalk ; 35b33
dw BattleCommand_DestinyBond ; 35bff
dw BattleCommand_Spite ; 35c0f
dw BattleCommand_FalseSwipe ; 35c94
dw BattleCommand_HealBell ; 35cc9
dw BattleCommand_KingsRock ; 36ac9
dw BattleCommand_TripleKick ; 346b2
dw BattleCommand_KickCounter ; 346cd
dw BattleCommand_Thief ; 37492
dw BattleCommand_ArenaTrap ; 37517
dw BattleCommand_Nightmare ; 37536
dw BattleCommand_Defrost ; 37563
dw BattleCommand_Curse ; 37588
dw BattleCommand_Protect ; 37618
dw BattleCommand_Spikes ; 37683
dw BattleCommand_Foresight ; 376a0
dw BattleCommand_PerishSong ; 376c2
dw BattleCommand_StartSandstorm ; 376f8
dw BattleCommand_Endure ; 3766f
dw BattleCommand_CheckCurl ; 37718
dw BattleCommand_RolloutPower ; 37734
dw BattleCommand5d ; 37791
dw BattleCommand5e ; 37792
dw BattleCommand5f ; 377ce
dw BattleCommand60 ; 3784b
dw BattleCommand61 ; 37874
dw BattleCommand_DamageCalcWithStats ; 35612 - 62
dw BattleCommand63 ; 3790e
dw BattleCommand64 ; 37939
dw BattleCommand65 ; 37972
dw BattleCommand66 ; 37991
dw BattleCommand67 ; 379c9
dw BattleCommand68 ; 37b1d
dw BattleCommand69 ; 37b39
dw BattleCommand6a ; 37b74
dw BattleCommand6b ; 37b78
dw BattleCommand6c ; 37b7c
dw BattleCommand6d ; 37be8
dw BattleCommand6e ; 37bf4
dw BattleCommand6f ; 37c07
dw BattleCommand70 ; 361ac
dw BattleCommand71 ; 361b0
dw BattleCommand72 ; 361b4
dw BattleCommand73 ; 361b8
dw BattleCommand74 ; 361bc
dw BattleCommand75 ; 361c0
dw BattleCommand76 ; 361c4
dw BattleCommand77 ; 361c8
dw BattleCommand78 ; 361cc
dw BattleCommand79 ; 361d0
dw BattleCommand7a ; 361d4
dw BattleCommand7b ; 361d8
dw BattleCommand7c ; 361dc
dw BattleCommand7d ; 361e0
dw BattleCommand7e ; 362ad
dw BattleCommand7f ; 362b1
dw BattleCommand80 ; 362b5
dw BattleCommand81 ; 362b9
dw BattleCommand82 ; 362bd
dw BattleCommand83 ; 362c1
dw BattleCommand84 ; 362c5
dw BattleCommand85 ; 362c9
dw BattleCommand86 ; 362cd
dw BattleCommand87 ; 362d1
dw BattleCommand88 ; 362d5
dw BattleCommand89 ; 362d9
dw BattleCommand8a ; 362dd
dw BattleCommand8b ; 362e1
dw BattleCommand8c ; 363b8
dw BattleCommand8d ; 363e9
dw BattleCommand8e ; 3644c
dw BattleCommand8f ; 3646a
dw BattleCommand90 ; 34ecc
dw BattleCommand_FuryCutter ; 37792
dw BattleCommand_Attract ; 377ce
dw BattleCommand_HappinessPower ; 3784b
dw BattleCommand_Present ; 37874
dw BattleCommand_DamageCalc ; 35612 - 62
dw BattleCommand_FrustrationPower ; 3790e
dw BattleCommand_Safeguard ; 37939
dw BattleCommand_CheckSafeguard ; 37972
dw BattleCommand_GetMagnitude ; 37991
dw BattleCommand_BatonPass ; 379c9
dw BattleCommand_Pursuit ; 37b1d
dw BattleCommand_ClearHazards ; 37b39
dw BattleCommand_HealMorn ; 37b74
dw BattleCommand_HealDay ; 37b78
dw BattleCommand_HealNite ; 37b7c
dw BattleCommand_HiddenPower ; 37be8
dw BattleCommand_StartRain ; 37bf4
dw BattleCommand_StartSun ; 37c07
dw BattleCommand_AttackUp ; 361ac
dw BattleCommand_DefenseUp ; 361b0
dw BattleCommand_SpeedUp ; 361b4
dw BattleCommand_SpecialAttackUp ; 361b8
dw BattleCommand_SpecialDefenseUp ; 361bc
dw BattleCommand_AccuracyUp ; 361c0
dw BattleCommand_EvasionUp ; 361c4
dw BattleCommand_AttackUp2 ; 361c8
dw BattleCommand_DefenseUp2 ; 361cc
dw BattleCommand_SpeedUp2 ; 361d0
dw BattleCommand_SpecialAttackUp2 ; 361d4
dw BattleCommand_SpecialDefenseUp2 ; 361d8
dw BattleCommand_AccuracyUp2 ; 361dc
dw BattleCommand_EvasionUp2 ; 361e0
dw BattleCommand_AttackDown ; 362ad
dw BattleCommand_DefenseDown ; 362b1
dw BattleCommand_SpeedDown ; 362b5
dw BattleCommand_SpecialAttackDown ; 362b9
dw BattleCommand_SpecialDefenseDown ; 362bd
dw BattleCommand_AccuracyDown ; 362c1
dw BattleCommand_EvasionDown ; 362c5
dw BattleCommand_AttackDown2 ; 362c9
dw BattleCommand_DefenseDown2 ; 362cd
dw BattleCommand_SpeedDown2 ; 362d1
dw BattleCommand_SpecialAttackDown2 ; 362d5
dw BattleCommand_SpecialDefenseDown2 ; 362d9
dw BattleCommand_AccuracyDown2 ; 362dd
dw BattleCommand_EvasionDown2 ; 362e1
dw BattleCommand_StatMessageUser ; 363b8
dw BattleCommand_StatMessageTarget ; 363e9
dw BattleCommand_StatUpFailText ; 3644c
dw BattleCommand_StatDownFailText ; 3646a
dw BattleCommand_EffectChance ; 34ecc
dw BattleCommand91 ; 34fdb
dw BattleCommand92 ; 34fd1
dw BattleCommand_SwitchTurn ; 34ffd - 93
dw BattleCommand94 ; 36a82
dw BattleCommand95 ; 37c1a
dw BattleCommand96 ; 37c55
dw BattleCommand97 ; 36f1d
dw BattleCommand98 ; 36f25
dw BattleCommand99 ; 36f2f
dw BattleCommand9a ; 37c95
dw BattleCommand9b ; 37d0d
dw BattleCommand9c ; 37d34
dw BattleCommand9d ; 37ce6
dw BattleCommand9e ; 37d02
dw BattleCommand9f ; 37d94
dw BattleCommanda0 ; 36778
dw BattleCommanda1 ; 35461
dw BattleCommanda2 ; 3527b
dw BattleCommand_FakeOut ; 36a82
dw BattleCommand_BellyDrum ; 37c1a
dw BattleCommand_PsychUp ; 37c55
dw BattleCommand_Rage ; 36f1d
dw BattleCommand_DoubleFlyingDamage ; 36f25
dw BattleCommand_DoubleUndergroundDamage ; 36f2f
dw BattleCommand_MirrorCoat ; 37c95
dw BattleCommand_CheckFutureSight ; 37d0d
dw BattleCommand_FutureSight ; 37d34
dw BattleCommand_DoubleMinimizeDamage ; 37ce6
dw BattleCommand_SkipSunCharge ; 37d02
dw BattleCommand_ThunderAccuracy ; 37d94
dw BattleCommand_Teleport ; 36778
dw BattleCommand_BeatUp ; 35461
dw BattleCommand_RageDamage ; 3527b
dw BattleCommanda3 ; 34833
dw BattleCommanda4 ; 36500
dw BattleCommand_AllStatsUp ; 36500
dw BattleCommanda5 ; 35165
dw BattleCommanda6 ; 365af
dw BattleCommanda7 ; 365c3
dw BattleCommanda8 ; 355b5
dw BattleCommand_IfAttackMissedResetDamage ; 355d5 - a9
dw BattleCommandaa ; 37e80
dw BattleCommandab ; 34f57
dw BattleCommandac ; 3658f
dw BattleCommandad ; 351a5
dw BattleCommandae ; 35197
dw BattleCommandaf ; 365a7
dw BattleCommand_ClearMissDamage ; 355d5 - a9
dw BattleCommand_MoveDelay ; 37e80
dw BattleCommand_HitTarget ; 34f57
dw BattleCommand_TriStatusChance ; 3658f
dw BattleCommand_SuperEffectiveLoopText ; 351a5
dw BattleCommand_StartLoop ; 35197
dw BattleCommand_Curl ; 365a7
; 3fe86

File diff suppressed because it is too large Load Diff

View File

@ -1,4 +1,4 @@
BattleCommand54: ; 37588
BattleCommand_Curse: ; 37588
; curse
ld de, BattleMonType1
@ -45,14 +45,14 @@ BattleCommand54: ; 37588
ld a, $2
call Function36532
call BattleCommand_SwitchTurn
call BattleCommand8d
call BattleCommand_StatMessageTarget
call ResetMiss
call BattleCommand_SwitchTurn
call BattleCommand70
call BattleCommand8c
call BattleCommand_AttackUp
call BattleCommand_StatMessageUser
call ResetMiss
call BattleCommand71
jp BattleCommand8c
call BattleCommand_DefenseUp
jp BattleCommand_StatMessageUser
.ghost

View File

@ -1,4 +1,4 @@
BattleCommand5a: ; 3766f
BattleCommand_Endure: ; 3766f
; endure
; Endure shares code with Protect. See protect.asm.

View File

@ -1,4 +1,4 @@
BattleCommand57: ; 376a0
BattleCommand_Foresight: ; 376a0
; foresight
ld a, [AttackMissed]

View File

@ -1,4 +1,4 @@
BattleCommand34: ; 37418
BattleCommand_Metronome: ; 37418
; metronome
call Function372d8

View File

@ -1,4 +1,4 @@
BattleCommand1b: ; 373c9
BattleCommand_MirrorMove: ; 373c9
; mirrormove
call Function372d8
@ -47,6 +47,6 @@ BattleCommand1b: ; 373c9
ld [wc689], a
.done
call BattleCommandaa
call BattleCommand_MoveDelay
jp ResetTurn
; 37418

View File

@ -1,4 +1,4 @@
BattleCommand52: ; 37536
BattleCommand_Nightmare: ; 37536
; nightmare
; Can't hit an absent opponent.

View File

@ -1,4 +1,4 @@
BattleCommand58: ; 376c2
BattleCommand_PerishSong: ; 376c2
; perishsong

View File

@ -1,4 +1,4 @@
BattleCommand55: ; 37618
BattleCommand_Protect: ; 37618
; protect
call ProtectChance
ret c

View File

@ -1,7 +1,7 @@
MAX_ROLLOUT_COUNT EQU 5
BattleCommand5b: ; 37718
BattleCommand_CheckCurl: ; 37718
; checkcurl
ld de, PlayerRolloutCount
@ -25,7 +25,7 @@ BattleCommand5b: ; 37718
; 37734
BattleCommand5c: ; 37734
BattleCommand_RolloutPower: ; 37734
; rolloutpower
ld a, BATTLE_VARS_STATUS

View File

@ -1,4 +1,4 @@
BattleCommand59: ; 376f8
BattleCommand_StartSandstorm: ; 376f8
; startsandstorm
ld a, [Weather]

View File

@ -1,4 +1,4 @@
BattleCommand56: ; 37683
BattleCommand_Spikes: ; 37683
; spikes
ld hl, EnemyScreens

View File

@ -1,4 +1,4 @@
BattleCommand50: ; 37492
BattleCommand_Thief: ; 37492
; thief
ld a, [hBattleTurn]

View File

@ -106,7 +106,7 @@ endr
; based on the new type, but keep base power.
ld a, d
push af
callba BattleCommand06 ; damagestats
callba BattleCommand_DamageStats ; damagestats
pop af
ld d, a
ret

View File

@ -54,7 +54,7 @@ PredefPointers:: ; 856b
add_predef UpdateEnemyHUD
add_predef StartBattle
add_predef FillInExpBar
add_predef Function3f43d ; $18
add_predef GetMonBackpic ; $18
add_predef Function3f47c
add_predef LearnLevelMoves
add_predef FillMoves

View File

@ -102,7 +102,7 @@ FlagAction:: ; 0x2e76
; 0x2ead
Function2ead:: ; 2ead
CheckReceivedDex:: ; 2ead
ld de, ENGINE_POKEDEX
ld b, CHECK_FLAG
callba EngineFlagAction

View File

@ -210,11 +210,11 @@ LoveBall:
ParkBall: ; e8a2
ld a, [wBattleMode]
dec a
jp nz, Functionf7a0
jp nz, UseBallInTrainerBattle
ld a, [PartyCount]
cp PARTY_LENGTH
jr nz, .asm_e8c0
jr nz, .room_in_party
ld a, BANK(sBoxCount)
call GetSRAMBank
@ -223,9 +223,9 @@ ParkBall: ; e8a2
call CloseSRAM
jp z, Ball_BoxIsFullMessage
.asm_e8c0
.room_in_party
xor a
ld [wc64e], a
ld [wCaughtMon], a
ld a, [CurItem]
cp PARK_BALL
call nz, Functionedfa
@ -239,38 +239,38 @@ ParkBall: ; e8a2
ld b, a
ld a, [BattleType]
cp BATTLETYPE_TUTORIAL
jp z, .asm_e99c
jp z, .catch_without_fail
ld a, [CurItem]
cp MASTER_BALL
jp z, .asm_e99c
jp z, .catch_without_fail
ld a, [CurItem]
ld c, a
ld hl, BallMultiplierFunctionTable
.asm_e8f2
.get_multiplier_loop
ld a, [hli]
cp $ff
jr z, .asm_e906
jr z, .skip_or_return_from_ball_fn
cp c
jr z, .asm_e8fe
jr z, .call_ball_function
rept 2
inc hl
endr
jr .asm_e8f2
jr .get_multiplier_loop
.asm_e8fe
.call_ball_function
ld a, [hli]
ld h, [hl]
ld l, a
ld de, .asm_e906
ld de, .skip_or_return_from_ball_fn
push de
jp [hl]
.asm_e906
.skip_or_return_from_ball_fn
ld a, [CurItem]
cp LEVEL_BALL
ld a, b
jp z, .asm_e98e
jp z, .skip_hp_calc
ld a, b
ld [hMultiplicand + 2], a
@ -295,7 +295,7 @@ endr
ld e, l
ld a, d
and a
jr z, .asm_e940
jr z, .okay_1
srl d
rr e
@ -308,9 +308,9 @@ endr
ld a, c
and a
jr nz, .asm_e940
jr nz, .okay_1
ld c, $1
.asm_e940
.okay_1
ld b, e
push bc
@ -350,9 +350,9 @@ endr
.addstatus
ld a, b
add c
jr nc, .asm_e977
jr nc, .max_1
ld a, $ff
.asm_e977
.max_1
ld d, a
push de
@ -375,11 +375,11 @@ endr
pop de
ld a, d
jr nz, .asm_e98e
jr nz, .skip_hp_calc
add c
jr nc, .asm_e98e
jr nc, .skip_hp_calc
ld a, $ff
.asm_e98e
.skip_hp_calc
ld b, a
ld [Buffer1], a
@ -387,22 +387,22 @@ endr
cp b
ld a, 0
jr z, .asm_e99c
jr nc, .asm_e99f
jr z, .catch_without_fail
jr nc, .fail_to_catch
.asm_e99c
.catch_without_fail
ld a, [EnemyMonSpecies]
.asm_e99f
ld [wc64e], a
.fail_to_catch
ld [wCaughtMon], a
ld c, 20
call DelayFrames
ld a, [CurItem]
cp POKE_BALL + 1 ; Assumes Master/Ultra/Great come before
jr c, .asm_e9b0
jr c, .not_kurt_ball
ld a, POKE_BALL
.asm_e9b0
.not_kurt_ball
ld [wc689], a
ld de, ANIM_THROW_POKE_BALL
@ -416,23 +416,23 @@ endr
ld [wcfca], a
predef PlayBattleAnim
ld a, [wc64e]
ld a, [wCaughtMon]
and a
jr nz, .asm_e9f5
jr nz, .caught
ld a, [Buffer2]
cp $1
ld hl, UnknownText_0xedb5
jp z, .asm_ebdc
jp z, .shake_and_break_free
cp $2
ld hl, UnknownText_0xedba
jp z, .asm_ebdc
jp z, .shake_and_break_free
cp $3
ld hl, UnknownText_0xedbf
jp z, .asm_ebdc
jp z, .shake_and_break_free
cp $4
ld hl, UnknownText_0xedc4
jp z, .asm_ebdc
.asm_e9f5
jp z, .shake_and_break_free
.caught
ld hl, EnemyMonStatus
ld a, [hli]
@ -492,29 +492,29 @@ endr
ld hl, EnemySubStatus5
bit SUBSTATUS_TRANSFORMED, [hl]
jr nz, .asm_ea67
ld hl, wc735
jr nz, .Transformed
ld hl, wCaughtMonMoves
ld de, EnemyMonMoves
ld bc, NUM_MOVES
call CopyBytes
ld hl, wc739
ld hl, wCaughtMonPP
ld de, EnemyMonPP
ld bc, NUM_MOVES
call CopyBytes
.asm_ea67
.Transformed
ld a, [EnemyMonSpecies]
ld [wc64e], a
ld [wCaughtMon], a
ld [CurPartySpecies], a
ld [wd265], a
ld a, [BattleType]
cp BATTLETYPE_TUTORIAL
jp z, .asm_ebd9
jp z, .FinishTutorial
callba MobileFn_10607f
ld hl, UnknownText_0xedc9
ld hl, Text_GotchaMonWasCaught
call PrintText
call ClearSprites
@ -530,10 +530,10 @@ endr
call SetSeenAndCaughtMon
pop af
and a
jr nz, .asm_eab7
jr nz, .skip_pokedex
call Function2ead
jr z, .asm_eab7
call CheckReceivedDex
jr z, .skip_pokedex
ld hl, UnknownText_0xedf0
call PrintText
@ -544,19 +544,19 @@ endr
ld [wd265], a
predef Functionfb877
.asm_eab7
.skip_pokedex
ld a, [BattleType]
cp BATTLETYPE_CONTEST
jp z, .asm_ebd1
jp z, .catch_bug_contest_mon
cp BATTLETYPE_CELEBI
jr nz, .asm_eac8
jr nz, .not_celebi
ld hl, wBattleResult
set 6, [hl]
.asm_eac8
.not_celebi
ld a, [PartyCount]
cp PARTY_LENGTH
jr z, .asm_eb3c
jr z, .SendToPC
xor a ; PARTYMON
ld [MonType], a
@ -568,7 +568,7 @@ endr
ld a, [CurItem]
cp FRIEND_BALL
jr nz, .asm_eaf8
jr nz, .SkipPartyMonFriendBall
ld a, [PartyCount]
dec a
@ -578,7 +578,7 @@ endr
ld a, FRIEND_BALL_HAPPINESS
ld [hl], a
.asm_eaf8
.SkipPartyMonFriendBall
ld hl, UnknownText_0xedf5
call PrintText
@ -588,7 +588,7 @@ endr
call GetPokemonName
call YesNoBox
jp c, .asm_ebe2
jp c, .return_from_capture
ld a, [PartyCount]
dec a
@ -613,9 +613,9 @@ endr
ld de, StringBuffer1
call InitName
jp .asm_ebe2
jp .return_from_capture
.asm_eb3c
.SendToPC
call ClearSprites
predef SentPkmnIntoBox
@ -627,17 +627,17 @@ endr
ld a, [sBoxCount]
cp MONS_PER_BOX
jr nz, .asm_eb5b
jr nz, .BoxNotFullYet
ld hl, wBattleResult
set 7, [hl]
.asm_eb5b
.BoxNotFullYet
ld a, [CurItem]
cp FRIEND_BALL
jr nz, .asm_eb67
jr nz, .SkipBoxMonFriendBall
; Bug: overwrites the happiness of the first mon in the box!
ld a, FRIEND_BALL_HAPPINESS
ld [sBoxMon1Happiness], a
.asm_eb67
.SkipBoxMonFriendBall
call CloseSRAM
ld hl, UnknownText_0xedf5
@ -648,7 +648,7 @@ endr
call GetPokemonName
call YesNoBox
jr c, .asm_ebaf
jr c, .SkipBoxMonNickname
xor a
ld [CurPartyMon], a
@ -672,7 +672,7 @@ endr
call CloseSRAM
.asm_ebaf
.SkipBoxMonNickname
ld a, BANK(sBoxMonNicknames)
call GetSRAMBank
@ -688,20 +688,20 @@ endr
call FadeToWhite
call LoadStandardFont
jr .asm_ebe2
jr .return_from_capture
.asm_ebd1
.catch_bug_contest_mon
callba BugContest_SetCaughtContestMon
jr .asm_ebe2
jr .return_from_capture
.asm_ebd9
ld hl, UnknownText_0xedc9
.FinishTutorial
ld hl, Text_GotchaMonWasCaught
.asm_ebdc
.shake_and_break_free
call PrintText
call ClearSprites
.asm_ebe2
.return_from_capture
ld a, [BattleType]
cp BATTLETYPE_TUTORIAL
ret z
@ -710,7 +710,7 @@ endr
cp BATTLETYPE_CONTEST
jr z, .used_park_ball
ld a, [wc64e]
ld a, [wCaughtMon]
and a
jr z, .toss
@ -733,16 +733,16 @@ endr
BallMultiplierFunctionTable:
; table of routines that increase or decrease the catch rate based on
; which ball is used in a certain situation.
dbw ULTRA_BALL, UltraBallMultiplier
dbw GREAT_BALL, GreatBallMultiplier
dbw 8, SafariBallMultiplier ; Safari Ball, leftover from RBY
dbw HEAVY_BALL, HeavyBallMultiplier
dbw LEVEL_BALL, LevelBallMultiplier
dbw LURE_BALL, LureBallMultiplier
dbw FAST_BALL, FastBallMultiplier
dbw MOON_BALL, MoonBallMultiplier
dbw LOVE_BALL, LoveBallMultiplier
dbw PARK_BALL, ParkBallMultiplier
dbw ULTRA_BALL, UltraBallMultiplier
dbw GREAT_BALL, GreatBallMultiplier
dbw SAFARI_BALL, SafariBallMultiplier ; Safari Ball, leftover from RBY
dbw HEAVY_BALL, HeavyBallMultiplier
dbw LEVEL_BALL, LevelBallMultiplier
dbw LURE_BALL, LureBallMultiplier
dbw FAST_BALL, FastBallMultiplier
dbw MOON_BALL, MoonBallMultiplier
dbw LOVE_BALL, LoveBallMultiplier
dbw PARK_BALL, ParkBallMultiplier
db $ff
UltraBallMultiplier:
@ -1128,7 +1128,7 @@ UnknownText_0xedc4: ; 0xedc4
db "@"
; 0xedc9
UnknownText_0xedc9: ; 0xedc9
Text_GotchaMonWasCaught: ; 0xedc9
; Gotcha! @ was caught!@ @
text_jump UnknownText_0x1c5b17
start_asm
@ -1213,7 +1213,7 @@ SunStone: ; ee0f
and a
jr z, .asm_ee35
jp Functionf795
jp UseDisposableItem
.asm_ee35
call WontHaveAnyEffectMessage
@ -1270,7 +1270,7 @@ Calcium: ; ee3d
ld c, HAPPINESS_USEDITEM
callba ChangeHappiness
jp Functionf795
jp UseDisposableItem
Functionee83: ; ee83
@ -1450,7 +1450,7 @@ RareCandy: ; ef14
ld [wd1e9], a
callba Function421d8
jp Functionf795
jp UseDisposableItem
; efad
@ -1520,7 +1520,7 @@ Functionefda: ; efda (3:6fda)
call Functionf030
call Play_SFX_FULL_HEAL
call Functionf279
call Functionf795
call UseDisposableItem
ld a, $0
ret
@ -1695,7 +1695,7 @@ Functionf0d6: ; f0d6
ld a, $f7
ld [PartyMenuActionText], a
call Functionf279
call Functionf795
call UseDisposableItem
ld a, 0
ret
; f128
@ -1735,7 +1735,7 @@ Functionf144: ; f144
ld a, $f5
ld [PartyMenuActionText], a
call Functionf279
call Functionf795
call UseDisposableItem
ld a, 0
ret
; f16a
@ -1827,7 +1827,7 @@ Functionf1a9: ; f1a9 (3:71a9)
ld a, $f5
ld [PartyMenuActionText], a
call Functionf279
call Functionf795
call UseDisposableItem
ld a, 0
ret
@ -2234,7 +2234,7 @@ EscapeRope: ; f44f
ld a, [wd0ec]
cp 1
call z, Functionf795
call z, UseDisposableItem
ret
; f462
@ -2344,8 +2344,8 @@ endr
callba CheckIfStatCanBeRaised
call WaitSFX
callba BattleCommand8c
callba BattleCommand8e
callba BattleCommand_StatMessageUser
callba BattleCommand_StatUpFailText
ld a, [CurBattleMon]
ld [CurPartyMon], a
@ -2599,7 +2599,7 @@ Mysteryberry: ; f5bf
Functionf64c: ; f64c
call ClearPalettes
jp Functionf795
jp UseDisposableItem
; f652
Functionf652: ; f652
@ -2805,7 +2805,7 @@ SacredAsh: ; f753
ld a, [wd0ec]
cp $1
ret nz
call Functionf795
call UseDisposableItem
ret
; f763
@ -2825,7 +2825,7 @@ Function_0xf769: ; f769
ld hl, UnknownText_0xf778
call PrintText
jp Functionf795
jp UseDisposableItem
; f778
UnknownText_0xf778: ; 0xf778
@ -2944,14 +2944,14 @@ Functionf789: ; f789
; fallthrough
; f795
Functionf795: ; f795
UseDisposableItem: ; f795
ld hl, NumItems
ld a, 1
ld [wItemQuantityChangeBuffer], a
jp TossItem
; f7a0
Functionf7a0: ; f7a0
UseBallInTrainerBattle: ; f7a0
call Functionedfa
ld de, ANIM_THROW_POKE_BALL
ld a, e
@ -2967,7 +2967,7 @@ Functionf7a0: ; f7a0
call PrintText
ld hl, DontBeAThiefText
call PrintText
jr Functionf795
jr UseDisposableItem
; f7ca
WontHaveAnyEffect_NotUsedMessage: ; f7ca

View File

@ -16375,7 +16375,7 @@ PokemonCenterPC: ; 1559a
; 1563e
Function1563e: ; 1563e
call Function2ead
call CheckReceivedDex
jr nz, .asm_15646
ld a, $0
ret
@ -25054,7 +25054,7 @@ Function2715c: ; 2715c
ld a, [BattleType]
cp BATTLETYPE_TUTORIAL
jr z, .gettutorialbackpic
callba Function3f43d
callba GetMonBackpic
jr .continue
.gettutorialbackpic

View File

@ -454,7 +454,9 @@ wc64c::
ds 1
wc64d:: ds 1
wc64e:: ds 2
wCaughtMon::
wc64e:: ds 1
ds 1
wEnemyTrainerItem1:: ds 1
wEnemyTrainerItem2:: ds 1
wc652:: ds 4
@ -831,8 +833,10 @@ wc734::
BattleEnded:: ; c734
ds 1
wCaughtMonMoves::
wc735:: ds 1
wc736:: ds 3
wCaughtMonPP::
wc739:: ds 4
wc73d:: ds 1
wc73e:: ds 1