comment and relabel more battle functions

This commit is contained in:
yenatch 2014-01-01 08:09:15 -05:00
parent a18cab495d
commit 4dbf0d44e0
12 changed files with 300 additions and 258 deletions

View File

@ -28,11 +28,10 @@ Function3c000: ; 3c000
ld a, [InLinkBattle] ld a, [InLinkBattle]
and a and a
jr z, .asm_3c031 jr z, .asm_3c031
ld a, [$ffcb] ld a, [$ffcb]
cp $2 cp $2
.data_3c02f jr z, .asm_3c04c
db $28
db $1b
.asm_3c031 .asm_3c031
ld a, [IsInBattle] ld a, [IsInBattle]
@ -40,14 +39,16 @@ Function3c000: ; 3c000
jr z, .asm_3c047 jr z, .asm_3c047
xor a xor a
ld [$c718], a ld [$c718], a
call Function3d834 call NewEnemyMonStatus
call Function3d867 call ResetEnemyStatLevels
call Function3dc18 call BreakAttraction
call Function3d4e1 call Function3d4e1
.asm_3c047 .asm_3c047
ld c, $28 ld c, 40
call DelayFrames call DelayFrames
.asm_3c04c
call Function309d call Function309d
call Function3d873 call Function3d873
ld a, d ld a, d
@ -87,15 +88,15 @@ Function3c000: ; 3c000
call Function309d call Function309d
call Function3d57a call Function3d57a
call Function3da0d call Function3da0d
call Function3dab1 call ResetPlayerStatLevels
call Function3f26d call Function3f26d
call Function3dbde call NewBattleMonStatus
call Function3dc18 call BreakAttraction
call Function3db5f call Function3db5f
call EmptyBattleTextBox call EmptyBattleTextBox
call Function309d call Function309d
call SetPlayerTurn call SetPlayerTurn
call Function3dc23 call SpikesDamage
ld a, [InLinkBattle] ld a, [InLinkBattle]
and a and a
jr z, .asm_3c0df jr z, .asm_3c0df
@ -104,12 +105,12 @@ Function3c000: ; 3c000
jr nz, .asm_3c0df jr nz, .asm_3c0df
xor a xor a
ld [$c718], a ld [$c718], a
call Function3d834 call NewEnemyMonStatus
call Function3d867 call ResetEnemyStatLevels
call Function3dc18 call BreakAttraction
call Function3d4e1 call Function3d4e1
call SetEnemyTurn call SetEnemyTurn
call Function3dc23 call SpikesDamage
.asm_3c0df .asm_3c0df
jp Function3c12f jp Function3c12f
@ -470,7 +471,7 @@ Function3c314: ; 3c314
.asm_3c34c .asm_3c34c
callab Function3846c callab Function3846c
call SetEnemyTurn call SetEnemyTurn
call Function3dc23 call SpikesDamage
jp Function3c3f3 jp Function3c3f3
.asm_3c35b .asm_3c35b
@ -668,7 +669,7 @@ Function3c434: ; 3c434
cp $74 cp $74
jr z, .asm_3c4c9 jr z, .asm_3c4c9
xor a xor a
ld [$c679], a ld [PlayerProtectCount], a
jr .asm_3c4c9 jr .asm_3c4c9
.asm_3c4b5 .asm_3c4b5
@ -678,7 +679,7 @@ Function3c434: ; 3c434
.asm_3c4ba .asm_3c4ba
xor a xor a
ld [PlayerFuryCutterCount], a ld [PlayerFuryCutterCount], a
ld [$c679], a ld [PlayerProtectCount], a
ld [$c72b], a ld [$c72b], a
ld hl, PlayerSubStatus4 ld hl, PlayerSubStatus4
res 6, [hl] res 6, [hl]
@ -691,7 +692,7 @@ Function3c434: ; 3c434
.asm_3c4ce .asm_3c4ce
xor a xor a
ld [PlayerFuryCutterCount], a ld [PlayerFuryCutterCount], a
ld [$c679], a ld [PlayerProtectCount], a
ld [$c72b], a ld [$c72b], a
ld hl, PlayerSubStatus4 ld hl, PlayerSubStatus4
res 6, [hl] res 6, [hl]
@ -2144,14 +2145,14 @@ Function3cdca: ; 3cdca
call ClearBox call ClearBox
call Function3d2b3 call Function3d2b3
ld a, $1 ld a, $1
call Function3cf78 call EnemyPartyMonEntrance
jr .asm_3cdfc jr .asm_3cdfc
.asm_3cde6 .asm_3cde6
ld a, [CurPartyMon] ld a, [CurPartyMon]
push af push af
ld a, $1 ld a, $1
call Function3cf78 call EnemyPartyMonEntrance
call ClearSprites call ClearSprites
call Function309d call Function309d
pop af pop af
@ -2183,8 +2184,8 @@ Function3ce01: ; 3ce01
ld hl, EnemyDamageTaken ld hl, EnemyDamageTaken
ld [hli], a ld [hli], a
ld [hl], a ld [hl], a
call Function3d834 call NewEnemyMonStatus
call Function3dc18 call BreakAttraction
ld a, [IsInBattle] ld a, [IsInBattle]
dec a dec a
jr z, .asm_3ce2f jr z, .asm_3ce2f
@ -2382,18 +2383,18 @@ Function3cf4a: ; 3cf4a
ld a, [hli] ld a, [hli]
or [hl] or [hl]
ld a, $0 ld a, $0
jr nz, Function3cf78 jr nz, EnemyPartyMonEntrance
inc a inc a
ret ret
; 3cf78 ; 3cf78
Function3cf78: ; 3cf78 EnemyPartyMonEntrance: ; 3cf78
push af push af
xor a xor a
ld [$c718], a ld [$c718], a
call Function3d834 call NewEnemyMonStatus
call Function3d867 call ResetEnemyStatLevels
call Function3dc18 call BreakAttraction
pop af pop af
and a and a
jr nz, .asm_3cf8f jr nz, .asm_3cf8f
@ -2406,7 +2407,7 @@ Function3cf78: ; 3cf78
.asm_3cf92 .asm_3cf92
call Function3d57a call Function3d57a
call SetEnemyTurn call SetEnemyTurn
call Function3dc23 call SpikesDamage
xor a xor a
ld [EnemyMoveAnimation], a ld [EnemyMoveAnimation], a
ld [$d0ec], a ld [$d0ec], a
@ -2834,7 +2835,7 @@ Function3d227: ; 3d227
call EmptyBattleTextBox call EmptyBattleTextBox
call Function1d6e call Function1d6e
call Function3d2f7 call Function3d2f7
call Function3d362 call ForcePickPartyMonInBattle
ld a, [InLinkBattle] ld a, [InLinkBattle]
and a and a
jr z, .asm_3d241 jr z, .asm_3d241
@ -2873,7 +2874,7 @@ Function3d227: ; 3d227
ld [CurBattleMon], a ld [CurBattleMon], a
call Function3d581 call Function3d581
call Function3da0d call Function3da0d
call Function3dab1 call ResetPlayerStatLevels
call ClearPalettes call ClearPalettes
call DelayFrame call DelayFrame
call Function3eda6 call Function3eda6
@ -2881,13 +2882,13 @@ Function3d227: ; 3d227
call ClearSGB call ClearSGB
call Function32f9 call Function32f9
call Function3f26d call Function3f26d
call Function3dbde call NewBattleMonStatus
call Function3dc18 call BreakAttraction
call Function3db5f call Function3db5f
call EmptyBattleTextBox call EmptyBattleTextBox
call Function309d call Function309d
call SetPlayerTurn call SetPlayerTurn
call Function3dc23 call SpikesDamage
ld a, $1 ld a, $1
and a and a
ld c, a ld c, a
@ -2901,15 +2902,15 @@ Function3d2b3: ; 3d2b3
ld [CurBattleMon], a ld [CurBattleMon], a
call Function3d581 call Function3d581
call Function3da0d call Function3da0d
call Function3dab1 call ResetPlayerStatLevels
call Function3f26d call Function3f26d
call Function3dbde call NewBattleMonStatus
call Function3dc18 call BreakAttraction
call Function3db5f call Function3db5f
call EmptyBattleTextBox call EmptyBattleTextBox
call Function309d call Function309d
call SetPlayerTurn call SetPlayerTurn
jp Function3dc23 jp SpikesDamage
; 3d2e0 ; 3d2e0
@ -2965,9 +2966,9 @@ Function3d329: ; 3d329
ret ret
; 3d33c ; 3d33c
Function3d33c: ; 3d33c PickPartyMonInBattle: ; 3d33c
.asm_3d33c .asm_3d33c
ld a, $2 ld a, $2 ; Which PKMN?
ld [PartyMenuActionText], a ld [PartyMenuActionText], a
call Function3d313 call Function3d313
call Function3d329 call Function3d329
@ -2978,52 +2979,58 @@ Function3d33c: ; 3d33c
ret ret
; 3d34f ; 3d34f
Function3d34f: ; 3d34f SwitchMonAlreadyOut: ; 3d34f
ld hl, CurBattleMon ld hl, CurBattleMon
ld a, [CurPartyMon] ld a, [CurPartyMon]
cp [hl] cp [hl]
jr nz, .asm_3d360 jr nz, .notout
ld hl, BattleText_0x80c0d ld hl, BattleText_0x80c0d
call StdBattleTextBox call StdBattleTextBox
scf scf
ret ret
.asm_3d360 .notout
xor a xor a
ret ret
; 3d362 ; 3d362
Function3d362: ; 3d362 ForcePickPartyMonInBattle: ; 3d362
.asm_3d362 ; Can't back out.
call Function3d33c
.pick
call PickPartyMonInBattle
ret nc ret nc
call Function3d2e0 call Function3d2e0
ret c ret c
ld de, SFX_WRONG ld de, SFX_WRONG
call PlaySFX call PlaySFX
call WaitSFX call WaitSFX
jr .asm_3d362 jr .pick
; 3d375 ; 3d375
PickSwitchMonInBattle: ; 3d375
Function3d375: ; 3d375 .pick
.asm_3d375 call PickPartyMonInBattle
call Function3d33c
ret c ret c
call Function3d34f call SwitchMonAlreadyOut
jr c, .asm_3d375 jr c, .pick
xor a xor a
ret ret
; 3d380 ; 3d380
Function3d380: ; 3d380 ForcePickSwitchMonInBattle: ; 3d380
.asm_3d380 ; Can't back out.
call Function3d362
.pick
call ForcePickPartyMonInBattle
call Function3d2e0 call Function3d2e0
ret c ret c
call Function3d34f call SwitchMonAlreadyOut
jr c, .asm_3d380 jr c, .pick
xor a xor a
ret ret
; 3d38e ; 3d38e
@ -3244,10 +3251,10 @@ Function3d4c3: ; 3d4c3
ld b, a ld b, a
call Function3d6ca call Function3d6ca
call Function3d7a0 call Function3d7a0
call Function3d834 call NewEnemyMonStatus
call Function3d867 call ResetEnemyStatLevels
call Function3d7c7 call Function3d7c7
call Function3dc18 call BreakAttraction
call Function3d57a call Function3d57a
ret ret
; 3d4e1 ; 3d4e1
@ -3628,7 +3635,7 @@ Function3d74b: ; 3d74b
dec a dec a
jr nz, .asm_3d79a jr nz, .asm_3d79a
call Function3d2f7 call Function3d2f7
call Function3d375 call PickSwitchMonInBattle
jr c, .asm_3d791 jr c, .asm_3d791
ld a, [CurBattleMon] ld a, [CurBattleMon]
ld [$c71a], a ld [$c71a], a
@ -3725,7 +3732,7 @@ Function3d7c7: ; 3d7c7
ret ret
; 3d834 ; 3d834
Function3d834: ; 3d834 NewEnemyMonStatus: ; 3d834
xor a xor a
ld [LastEnemyCounterMove], a ld [LastEnemyCounterMove], a
ld [LastPlayerCounterMove], a ld [LastPlayerCounterMove], a
@ -3750,14 +3757,14 @@ Function3d834: ; 3d834
ret ret
; 3d867 ; 3d867
Function3d867: ; 3d867 ResetEnemyStatLevels: ; 3d867
ld a, $7 ld a, 7
ld b, $8 ld b, 8
ld hl, EnemyAtkLevel ld hl, EnemyStatLevels
.asm_3d86e .loop
ld [hli], a ld [hli], a
dec b dec b
jr nz, .asm_3d86e jr nz, .loop
ret ret
; 3d873 ; 3d873
@ -4076,14 +4083,14 @@ Function3da97: ; 3da97
jp GetPartyLocation jp GetPartyLocation
; 3dab1 ; 3dab1
Function3dab1: ; 3dab1 ResetPlayerStatLevels: ; 3dab1
ld a, $7 ld a, 7
ld b, $8 ld b, 8
ld hl, PlayerAtkLevel ld hl, PlayerStatLevels
.asm_3dab8 .loop
ld [hli], a ld [hli], a
dec b dec b
jr nz, .asm_3dab8 jr nz, .loop
ret ret
; 3dabd ; 3dabd
@ -4150,9 +4157,9 @@ Function3db32: ; 3db32
ld [CurBattleMon], a ld [CurBattleMon], a
call Function3d581 call Function3d581
call Function3da0d call Function3da0d
call Function3dab1 call ResetPlayerStatLevels
call Function3dbde call NewBattleMonStatus
call Function3dc18 call BreakAttraction
call Function3db5f call Function3db5f
call EmptyBattleTextBox call EmptyBattleTextBox
call Function309d call Function309d
@ -4220,7 +4227,7 @@ Function3db5f: ; 3db5f
ret ret
; 3dbde ; 3dbde
Function3dbde: ; 3dbde NewBattleMonStatus: ; 3dbde
xor a xor a
ld [LastEnemyCounterMove], a ld [LastEnemyCounterMove], a
ld [LastPlayerCounterMove], a ld [LastPlayerCounterMove], a
@ -4238,7 +4245,7 @@ Function3dbde: ; 3dbde
ld [hl], a ld [hl], a
ld [PlayerDisableCount], a ld [PlayerDisableCount], a
ld [PlayerFuryCutterCount], a ld [PlayerFuryCutterCount], a
ld [$c679], a ld [PlayerProtectCount], a
ld [$c72b], a ld [$c72b], a
ld [DisabledMove], a ld [DisabledMove], a
ld [$c6fe], a ld [$c6fe], a
@ -4246,50 +4253,56 @@ Function3dbde: ; 3dbde
ld [$c730], a ld [$c730], a
ld [PlayerTurnsTaken], a ld [PlayerTurnsTaken], a
ld hl, EnemySubStatus5 ld hl, EnemySubStatus5
res 7, [hl] res SUBSTATUS_CANT_RUN, [hl]
ret ret
; 3dc18 ; 3dc18
Function3dc18: ; 3dc18 BreakAttraction: ; 3dc18
ld hl, PlayerSubStatus1 ld hl, PlayerSubStatus1
res 7, [hl] res SUBSTATUS_IN_LOVE, [hl]
ld hl, EnemySubStatus1 ld hl, EnemySubStatus1
res 7, [hl] res SUBSTATUS_IN_LOVE, [hl]
ret ret
; 3dc23 ; 3dc23
Function3dc23: ; 3dc23 SpikesDamage: ; 3dc23
ld hl, PlayerScreens ld hl, PlayerScreens
ld de, BattleMonType1 ld de, BattleMonType1
ld bc, Function3df48 ld bc, Function3df48
ld a, [hBattleTurn] ld a, [hBattleTurn]
and a and a
jr z, .asm_3dc3a jr z, .ok
ld hl, EnemyScreens ld hl, EnemyScreens
ld de, EnemyMonType1 ld de, EnemyMonType1
ld bc, Function3e036 ld bc, Function3e036
.ok
.asm_3dc3a bit SCREENS_SPIKES, [hl]
bit 0, [hl]
ret z ret z
; Flying-types aren't affected by Spikes.
ld a, [de] ld a, [de]
cp $2 cp FLYING
ret z ret z
inc de inc de
ld a, [de] ld a, [de]
cp $2 cp FLYING
ret z ret z
push bc push bc
ld hl, BattleText_0x80bae
ld hl, BattleText_0x80bae ; "hurt by SPIKES!"
call StdBattleTextBox call StdBattleTextBox
call GetEighthMaxHP call GetEighthMaxHP
call Function3cc39 call Function3cc39
pop hl
call Function3dc5a
jp WaitBGMap
; 3dc5a
Function3dc5a: ; 3dc5a pop hl
call .hl
jp WaitBGMap
.hl
jp [hl] jp [hl]
; 3dc5b ; 3dc5b
@ -5375,7 +5388,7 @@ Function3e3ad: ; 3e3ad
jr nz, .asm_3e3cf jr nz, .asm_3e3cf
.asm_3e3ca .asm_3e3ca
call Function3e40b call BattleMonEntrance
and a and a
ret ret
@ -5396,14 +5409,14 @@ Function3e3ad: ; 3e3ad
ld a, [$ffcb] ld a, [$ffcb]
cp $1 cp $1
jr z, .asm_3e3f7 jr z, .asm_3e3f7
call Function3e40b call BattleMonEntrance
call Function3e3ff call Function3e3ff
and a and a
ret ret
.asm_3e3f7 .asm_3e3f7
call Function3e3ff call Function3e3ff
call Function3e40b call BattleMonEntrance
and a and a
ret ret
; 3e3ff ; 3e3ff
@ -5411,48 +5424,54 @@ Function3e3ad: ; 3e3ad
Function3e3ff: ; 3e3ff Function3e3ff: ; 3e3ff
callab Function3846c callab Function3846c
call SetEnemyTurn call SetEnemyTurn
jp Function3dc23 jp SpikesDamage
; 3e40b ; 3e40b
Function3e40b: ; 3e40b BattleMonEntrance: ; 3e40b
call Function3f2f4 call Function3f2f4
ld c, $32
ld c, 50
call DelayFrames call DelayFrames
ld hl, PlayerSubStatus4 ld hl, PlayerSubStatus4
res 6, [hl] res SUBSTATUS_RAGE, [hl]
call SetEnemyTurn call SetEnemyTurn
call Function3dc5b call Function3dc5b
jr c, .asm_3e423 jr c, .asm_3e423
call Function3dce6 call Function3dce6
.asm_3e423 .asm_3e423
ld hl, $c535
ld bc, $050b hlcoord 9, 7
lb bc, 5, 11
call ClearBox call ClearBox
ld a, [CurBattleMon] ld a, [CurBattleMon]
ld [CurPartyMon], a ld [CurPartyMon], a
call Function3d581 call Function3d581
call Function3da0d call Function3da0d
call Function3dab1 call ResetPlayerStatLevels
call Function3f26d call Function3f26d
call Function3dbde call NewBattleMonStatus
call Function3dc18 call BreakAttraction
call Function3db5f call Function3db5f
call EmptyBattleTextBox call EmptyBattleTextBox
call Function309d call Function309d
call SetPlayerTurn call SetPlayerTurn
call Function3dc23 call SpikesDamage
ld a, $2 ld a, $2
ld [$cfa9], a ld [$cfa9], a
ret ret
; 3e459 ; 3e459
Function3e459: ; 3e459 PassedBattleMonEntrance: ; 3e459
ld c, $32 ld c, 50
call DelayFrames call DelayFrames
ld hl, $c535
ld bc, $050b hlcoord 9, 7
lb bc, 5, 11
call ClearBox call ClearBox
ld a, [CurPartyMon] ld a, [CurPartyMon]
ld [CurBattleMon], a ld [CurBattleMon], a
call Function3d581 call Function3d581
@ -5464,7 +5483,7 @@ Function3e459: ; 3e459
call EmptyBattleTextBox call EmptyBattleTextBox
call Function309d call Function309d
call SetPlayerTurn call SetPlayerTurn
jp Function3dc23 jp SpikesDamage
; 3e489 ; 3e489

View File

@ -2715,6 +2715,7 @@ BattleCommand90: ; 34ecc
BattleCommand0a: ; 34eee BattleCommand0a: ; 34eee
; lowersub
ld a, BATTLE_VARS_SUBSTATUS4 ld a, BATTLE_VARS_SUBSTATUS4
call GetBattleVar call GetBattleVar
@ -2755,7 +2756,7 @@ BattleCommand0a: ; 34eee
ld [FXAnimIDHi], a ld [FXAnimIDHi], a
inc a inc a
ld [$c689], a ld [$c689], a
ld a, $a4 ld a, SUBSTITUTE
jp Function37e44 jp Function37e44
.asm_34f36 .asm_34f36
@ -2908,6 +2909,8 @@ BattleCommand93: ; 34ffd
BattleCommand0c: ; 35004 BattleCommand0c: ; 35004
; raisesub
ld a, BATTLE_VARS_SUBSTATUS4 ld a, BATTLE_VARS_SUBSTATUS4
call GetBattleVar call GetBattleVar
bit SUBSTATUS_SUBSTITUTE, a bit SUBSTATUS_SUBSTITUTE, a
@ -2921,7 +2924,7 @@ BattleCommand0c: ; 35004
ld [FXAnimIDHi], a ld [FXAnimIDHi], a
ld a, $2 ld a, $2
ld [$c689], a ld [$c689], a
ld a, $a4 ld a, SUBSTITUTE
jp Function37e44 jp Function37e44
; 35023 ; 35023
@ -4621,7 +4624,7 @@ BattleCommand41: ; 35864
ld de, EnemyMoveStruct ld de, EnemyMoveStruct
call GetMoveData call GetMoveData
.asm_3591a .asm_3591a
call Function37e01 call AnimateCurrentMove
ld hl, GotAnEncoreText ld hl, GotAnEncoreText
jp StdBattleTextBox jp StdBattleTextBox
@ -4641,7 +4644,7 @@ BattleCommand42: ; 35926
jp nz, Function359cd jp nz, Function359cd
call CheckSubstituteOpp call CheckSubstituteOpp
jp nz, Function359cd jp nz, Function359cd
call Function37e01 call AnimateCurrentMove
ld hl, $c63f ld hl, $c63f
ld de, EnemyMonMaxHPLo ld de, EnemyMonMaxHPLo
call .asm_3597d call .asm_3597d
@ -4774,7 +4777,7 @@ BattleCommand44: ; 359e6
pop hl pop hl
cp CURSE_T cp CURSE_T
jr z, .asm_35a50 ; 35a0b $43 jr z, .asm_35a50 ; 35a0b $43
call Function37e01 call AnimateCurrentMove
call SwitchTurn call SwitchTurn
.asm_35a13 .asm_35a13
@ -4828,13 +4831,13 @@ BattleCommand45: ; 35a53
ld a, BATTLE_VARS_SUBSTATUS5_OPP ld a, BATTLE_VARS_SUBSTATUS5_OPP
call _GetBattleVar call _GetBattleVar
set SUBSTATUS_LOCK_ON, [hl] set SUBSTATUS_LOCK_ON, [hl]
call Function37e01 call AnimateCurrentMove
ld hl, TookAimText ld hl, TookAimText
jp StdBattleTextBox jp StdBattleTextBox
.asm_35a6e .asm_35a6e
call Function37e77 call AnimateFailedMove
jp PrintDidntAffect jp PrintDidntAffect
; 35a74 ; 35a74
@ -4846,7 +4849,7 @@ BattleCommand46: ; 35a74
ld a, [InLinkBattle] ld a, [InLinkBattle]
and a and a
jr z, .asm_35a83 ; 35a7b $6 jr z, .asm_35a83 ; 35a7b $6
call Function37e77 call AnimateFailedMove
jp PrintNothingHappened jp PrintNothingHappened
.asm_35a83 .asm_35a83
call CheckSubstituteOpp call CheckSubstituteOpp
@ -4931,13 +4934,13 @@ BattleCommand46: ; 35a74
ld [hl], a ld [hl], a
.asm_35b04 .asm_35b04
call GetMoveName call GetMoveName
call Function37e01 call AnimateCurrentMove
ld hl, SketchedText ld hl, SketchedText
jp StdBattleTextBox jp StdBattleTextBox
.asm_35b10 .asm_35b10
call Function37e77 call AnimateFailedMove
jp PrintDidntAffect jp PrintDidntAffect
; 35b16 ; 35b16
@ -4948,7 +4951,7 @@ BattleCommand47: ; 35b16
; If the opponent isn't frozen, raise Attack one stage. ; If the opponent isn't frozen, raise Attack one stage.
; If the opponent is frozen, thaw them and raise Accuracy two stages. ; If the opponent is frozen, thaw them and raise Accuracy two stages.
call Function37e01 call AnimateCurrentMove
ld a, BATTLE_VARS_STATUS_OPP ld a, BATTLE_VARS_STATUS_OPP
call _GetBattleVar call _GetBattleVar
@ -5036,7 +5039,7 @@ BattleCommand48: ; 35b33
call UpdateMoveData call UpdateMoveData
jp ResetTurn jp ResetTurn
.asm_35ba3 .asm_35ba3
call Function37e77 call AnimateFailedMove
jp TryPrintButItFailed jp TryPrintButItFailed
.asm_35ba9 .asm_35ba9
@ -5123,7 +5126,7 @@ BattleCommand49: ; 35bff
ld a, BATTLE_VARS_SUBSTATUS5 ld a, BATTLE_VARS_SUBSTATUS5
call _GetBattleVar call _GetBattleVar
set 6, [hl] set 6, [hl]
call Function37e01 call AnimateCurrentMove
ld hl, DestinyBondEffectText ld hl, DestinyBondEffectText
jp StdBattleTextBox jp StdBattleTextBox
; 35c0f ; 35c0f
@ -5205,7 +5208,7 @@ BattleCommand4a: ; 35c0f
ld [hl], e ld [hl], e
.asm_35c82 .asm_35c82
push de push de
call Function37e01 call AnimateCurrentMove
pop de pop de
ld a, d ld a, d
ld [$d265], a ld [$d265], a
@ -5285,7 +5288,7 @@ BattleCommand4c: ; 35cc9
add hl, bc add hl, bc
dec d dec d
jr nz, .asm_35ce9 jr nz, .asm_35ce9
call Function37e01 call AnimateCurrentMove
ld hl, BellChimedText ld hl, BellChimedText
call StdBattleTextBox call StdBattleTextBox
@ -5560,7 +5563,7 @@ BattleCommand14: ; 35e5c
call CheckSubstituteOpp call CheckSubstituteOpp
jr nz, .asm_35ec6 jr nz, .asm_35ec6
call Function37e01 call AnimateCurrentMove
ld b, $7 ld b, $7
ld a, [$cfc0] ld a, [$cfc0]
and a and a
@ -5588,7 +5591,7 @@ BattleCommand14: ; 35e5c
.asm_35ec6 .asm_35ec6
push hl push hl
call Function37e77 call AnimateFailedMove
pop hl pop hl
jp StdBattleTextBox jp StdBattleTextBox
; 35ece ; 35ece
@ -5735,14 +5738,14 @@ BattleCommand2f: ; 35f2c
.asm_35fb8 .asm_35fb8
push hl push hl
call Function37e77 call AnimateFailedMove
pop hl pop hl
jp StdBattleTextBox jp StdBattleTextBox
; 35fc0 ; 35fc0
Function35fc0: ; 35fc0 Function35fc0: ; 35fc0
call Function37e01 call AnimateCurrentMove
call Function35ff5 call Function35ff5
jp RefreshBattleHuds jp RefreshBattleHuds
; 35fc9 ; 35fc9
@ -7036,7 +7039,7 @@ BattleCommand22: ; 366e5
ld [bc], a ld [bc], a
ld a, $1 ld a, $1
ld [$c689], a ld [$c689], a
call Function37e01 call AnimateCurrentMove
jp EndMoveEffect jp EndMoveEffect
; 3671a ; 3671a
@ -7147,7 +7150,7 @@ BattleCommanda0: ; 36778
jr nc, .asm_367df ; 367b7 $26 jr nc, .asm_367df ; 367b7 $26
.asm_367b9 .asm_367b9
call Function37e77 call AnimateFailedMove
jp PrintButItFailed jp PrintButItFailed
.asm_367bf .asm_367bf
@ -7255,7 +7258,7 @@ BattleCommand23: ; 3680f
call UpdateEnemyMonInParty call UpdateEnemyMonInParty
ld a, $1 ld a, $1
ld [$c689], a ld [$c689], a
call Function37e01 call AnimateCurrentMove
ld c, $14 ld c, $14
call DelayFrames call DelayFrames
ld hl, $c4a1 ld hl, $c4a1
@ -7291,7 +7294,7 @@ BattleCommand23: ; 3680f
ld hl, DraggedOutText ld hl, DraggedOutText
call StdBattleTextBox call StdBattleTextBox
ld hl, Function3dc23 ld hl, SpikesDamage
jp CallBattleCore jp CallBattleCore
.asm_368ca .asm_368ca
@ -7349,7 +7352,7 @@ BattleCommand23: ; 3680f
call UpdateBattleMonInParty call UpdateBattleMonInParty
ld a, $1 ld a, $1
ld [$c689], a ld [$c689], a
call Function37e01 call AnimateCurrentMove
ld c, $14 ld c, $14
call DelayFrames call DelayFrames
ld hl, $c535 ld hl, $c535
@ -7388,7 +7391,7 @@ BattleCommand23: ; 3680f
ld hl, DraggedOutText ld hl, DraggedOutText
call StdBattleTextBox call StdBattleTextBox
ld hl, Function3dc23 ld hl, SpikesDamage
jp CallBattleCore jp CallBattleCore
.asm_36969 .asm_36969
@ -7402,7 +7405,7 @@ BattleCommand23: ; 3680f
call Function36804 call Function36804
ld a, $1 ld a, $1
ld [$c689], a ld [$c689], a
call Function37e01 call AnimateCurrentMove
ld c, $14 ld c, $14
call DelayFrames call DelayFrames
pop af pop af
@ -7944,11 +7947,11 @@ BattleCommand28: ; 36c7e
bit 1, [hl] bit 1, [hl]
jr nz, .asm_36c92 ; 36c85 $b jr nz, .asm_36c92 ; 36c85 $b
set 1, [hl] set 1, [hl]
call Function37e01 call AnimateCurrentMove
ld hl, MistText ld hl, MistText
jp StdBattleTextBox jp StdBattleTextBox
.asm_36c92 .asm_36c92
call Function37e77 call AnimateFailedMove
jp PrintButItFailed jp PrintButItFailed
; 36c98 ; 36c98
@ -7961,11 +7964,11 @@ BattleCommand29: ; 36c98
bit 2, [hl] bit 2, [hl]
jr nz, .asm_36cac ; 36c9f $b jr nz, .asm_36cac ; 36c9f $b
set 2, [hl] set 2, [hl]
call Function37e01 call AnimateCurrentMove
ld hl, GettingPumpedText ld hl, GettingPumpedText
jp StdBattleTextBox jp StdBattleTextBox
.asm_36cac .asm_36cac
call Function37e77 call AnimateFailedMove
jp PrintButItFailed jp PrintButItFailed
; 36cb2 ; 36cb2
@ -8067,7 +8070,7 @@ BattleCommand2a: ; 36d3b
ld a, [hl] ld a, [hl]
ld [$d265], a ld [$d265], a
call GetItemName call GetItemName
call Function37e77 call AnimateFailedMove
ld hl, ProtectedByText ld hl, ProtectedByText
jp StdBattleTextBox jp StdBattleTextBox
@ -8076,7 +8079,7 @@ BattleCommand2a: ; 36d3b
call _GetBattleVar call _GetBattleVar
bit 7, [hl] bit 7, [hl]
jr z, .asm_36d65 jr z, .asm_36d65
call Function37e77 call AnimateFailedMove
ld hl, AlreadyConfusedText ld hl, AlreadyConfusedText
jp StdBattleTextBox jp StdBattleTextBox
@ -8114,7 +8117,7 @@ Function36d70: ; 36d70
jr z, .asm_36d99 jr z, .asm_36d99
cp EFFECT_SWAGGER cp EFFECT_SWAGGER
jr z, .asm_36d99 jr z, .asm_36d99
call Function37e01 call AnimateCurrentMove
.asm_36d99 .asm_36d99
ld de, $0103 ld de, $0103
@ -8164,7 +8167,7 @@ BattleCommand30: ; 36dc7
ld a, [hl] ld a, [hl]
ld [$d265], a ld [$d265], a
call GetItemName call GetItemName
call Function37e77 call AnimateFailedMove
ld hl, ProtectedByText ld hl, ProtectedByText
jp StdBattleTextBox jp StdBattleTextBox
.asm_36def .asm_36def
@ -8195,7 +8198,7 @@ BattleCommand30: ; 36dc7
jr nz, .asm_36e52 ; 36e1f $31 jr nz, .asm_36e52 ; 36e1f $31
ld c, $1e ld c, $1e
call DelayFrames call DelayFrames
call Function37e01 call AnimateCurrentMove
ld a, $1 ld a, $1
ld [$ffd4], a ld [$ffd4], a
ld a, BATTLE_VARS_STATUS_OPP ld a, BATTLE_VARS_STATUS_OPP
@ -8209,13 +8212,13 @@ BattleCommand30: ; 36dc7
ld hl, Function3dde9 ld hl, Function3dde9
jp CallBattleCore jp CallBattleCore
.asm_36e49 .asm_36e49
call Function37e77 call AnimateFailedMove
ld hl, AlreadyParalyzedText ld hl, AlreadyParalyzedText
jp StdBattleTextBox jp StdBattleTextBox
.asm_36e52 .asm_36e52
jp PrintDidntAffect2 jp PrintDidntAffect2
.asm_36e55 .asm_36e55
call Function37e77 call AnimateFailedMove
jp PrintDoesntAffect jp PrintDoesntAffect
; 36e5b ; 36e5b
@ -8445,7 +8448,7 @@ BattleCommand33: ; 36f46
add hl, bc add hl, bc
ld [hl], $5 ld [hl], $5
call GetMoveName call GetMoveName
call Function37e01 call AnimateCurrentMove
ld hl, LearnedMoveText ld hl, LearnedMoveText
jp StdBattleTextBox jp StdBattleTextBox
.asm_36f9a .asm_36f9a
@ -8478,21 +8481,21 @@ BattleCommand35: ; 36f9d
bit 7, [hl] bit 7, [hl]
jr nz, .asm_36fd8 ; 36fc5 $11 jr nz, .asm_36fd8 ; 36fc5 $11
set 7, [hl] set 7, [hl]
call Function37e01 call AnimateCurrentMove
ld hl, WasSeededText ld hl, WasSeededText
jp StdBattleTextBox jp StdBattleTextBox
.asm_36fd2 .asm_36fd2
call Function37e77 call AnimateFailedMove
jp PrintDoesntAffect jp PrintDoesntAffect
.asm_36fd8 .asm_36fd8
call Function37e77 call AnimateFailedMove
ld hl, EvadedText ld hl, EvadedText
jp StdBattleTextBox jp StdBattleTextBox
; 36fe1 ; 36fe1
BattleCommand36: ; 36fe1 BattleCommand36: ; 36fe1
call Function37e01 call AnimateCurrentMove
callba Function1060e5 callba Function1060e5
jp PrintNothingHappened jp PrintNothingHappened
; 36fed ; 36fed
@ -8548,7 +8551,7 @@ BattleCommand37: ; 36fed
swap c swap c
add c add c
ld [de], a ld [de], a
call Function37e01 call AnimateCurrentMove
ld hl, DisabledMove ld hl, DisabledMove
ld a, [hBattleTurn] ld a, [hBattleTurn]
and a and a
@ -8656,7 +8659,7 @@ BattleCommand1f: ; 3707f
inc hl inc hl
jr .asm_370bd ; 370d1 $ea jr .asm_370bd ; 370d1 $ea
.asm_370d3 .asm_370d3
call Function37e77 call AnimateFailedMove
jp PrintButItFailed jp PrintButItFailed
.asm_370d9 .asm_370d9
call BattleRandom call BattleRandom
@ -8684,7 +8687,7 @@ BattleCommand1f: ; 3707f
ld [de], a ld [de], a
ld [$d265], a ld [$d265], a
callba GetTypeName callba GetTypeName
call Function37e01 call AnimateCurrentMove
ld hl, TransformedTypeText ld hl, TransformedTypeText
jp StdBattleTextBox jp StdBattleTextBox
; 3710e ; 3710e
@ -8710,7 +8713,7 @@ BattleCommand20: ; 3710e
pop af pop af
ld [hBattleTurn], a ld [hBattleTurn], a
call Function37e01 call AnimateCurrentMove
ld hl, EliminatedStatsText ld hl, EliminatedStatsText
jp StdBattleTextBox jp StdBattleTextBox
@ -8788,7 +8791,7 @@ BattleCommand2c: ; 3713e
ld hl, GetMaxHP ld hl, GetMaxHP
call CallBattleCore call CallBattleCore
.asm_371a9 .asm_371a9
call Function37e01 call AnimateCurrentMove
call SwitchTurn call SwitchTurn
ld hl, Function3ccef ld hl, Function3ccef
call CallBattleCore call CallBattleCore
@ -8799,7 +8802,7 @@ BattleCommand2c: ; 3713e
jp StdBattleTextBox jp StdBattleTextBox
.asm_371c4 .asm_371c4
call Function37e77 call AnimateFailedMove
ld hl, HPIsFullText ld hl, HPIsFullText
jp StdBattleTextBox jp StdBattleTextBox
; 371cd ; 371cd
@ -8833,7 +8836,7 @@ BattleCommand2d: ; 371cd
ld a, BATTLE_VARS_SUBSTATUS5 ld a, BATTLE_VARS_SUBSTATUS5
call _GetBattleVar call _GetBattleVar
set 3, [hl] set 3, [hl]
call Function372e7 call ResetActorDisable
ld hl, BattleMonSpecies ld hl, BattleMonSpecies
ld de, EnemyMonSpecies ld de, EnemyMonSpecies
ld a, [hBattleTurn] ld a, [hBattleTurn]
@ -8960,7 +8963,7 @@ BattleSideCopy: ; 372c6
Function372d2: ; 372d2 Function372d2: ; 372d2
call Function37e77 call AnimateFailedMove
jp PrintButItFailed jp PrintButItFailed
; 372d8 ; 372d8
@ -8979,7 +8982,7 @@ Function372d8: ; 372d8
; 372e7 ; 372e7
Function372e7: ; 372e7 ResetActorDisable: ; 372e7
ld a, [hBattleTurn] ld a, [hBattleTurn]
and a and a
jr z, .player jr z, .player
@ -9035,11 +9038,11 @@ BattleCommand2e: ; 372fc
ld hl, ReflectEffectText ld hl, ReflectEffectText
.asm_37331 .asm_37331
call Function37e01 call AnimateCurrentMove
jp StdBattleTextBox jp StdBattleTextBox
.asm_37337 .asm_37337
call Function37e77 call AnimateFailedMove
jp PrintButItFailed jp PrintButItFailed
; 3733d ; 3733d
@ -9075,7 +9078,7 @@ PrintButItFailed: ; 3734e
Function37354: ; 37354 Function37354: ; 37354
call Function37e77 call AnimateFailedMove
; fallthrough ; fallthrough
; 37357 ; 37357
@ -9094,7 +9097,7 @@ PrintDidntAffect: ; 37360
PrintDidntAffect2: ; 37366 PrintDidntAffect2: ; 37366
call Function37e77 call AnimateFailedMove
ld hl, DidntAffect1Text ; 'it didn't affect' ld hl, DidntAffect1Text ; 'it didn't affect'
ld de, DidntAffect2Text ; 'it didn't affect' ld de, DidntAffect2Text ; 'it didn't affect'
jp Function35157 jp Function35157
@ -9216,12 +9219,12 @@ BattleCommand51: ; 37517
; Otherwise trap the opponent. ; Otherwise trap the opponent.
set SUBSTATUS_CANT_RUN, [hl] set SUBSTATUS_CANT_RUN, [hl]
call Function37e01 call AnimateCurrentMove
ld hl, CantEscapeNowText ld hl, CantEscapeNowText
jp StdBattleTextBox jp StdBattleTextBox
.failed .failed
call Function37e77 call AnimateFailedMove
jp PrintButItFailed jp PrintButItFailed
; 37536 ; 37536
@ -9361,7 +9364,7 @@ BattleCommand5f: ; 377ce
jr nz, .asm_377f2 jr nz, .asm_377f2
set 7, [hl] set 7, [hl]
call Function37e01 call AnimateCurrentMove
; 'fell in love!' ; 'fell in love!'
ld hl, FellInLoveText ld hl, FellInLoveText
@ -9474,10 +9477,10 @@ BattleCommand61: ; 37874
.asm_37889 .asm_37889
ld a, [$d265] ld a, [$d265]
and a and a
jp z, Function37e77 jp z, AnimateFailedMove
ld a, [AttackMissed] ld a, [AttackMissed]
and a and a
jp nz, Function37e77 jp nz, AnimateFailedMove
push bc push bc
call BattleRandom call BattleRandom
ld b, a ld b, a
@ -9503,7 +9506,7 @@ BattleCommand61: ; 37874
pop bc pop bc
ld a, $3 ld a, $3
ld [$c689], a ld [$c689], a
call Function37e01 call AnimateCurrentMove
call SwitchTurn call SwitchTurn
ld hl, AICheckPlayerMaxHP ld hl, AICheckPlayerMaxHP
ld a, [hBattleTurn] ld a, [hBattleTurn]
@ -9529,7 +9532,7 @@ BattleCommand61: ; 37874
call SwitchTurn call SwitchTurn
call Function37ed5 call Function37ed5
jr nc, .asm_37904 ; 378f9 $9 jr nc, .asm_37904 ; 378f9 $9
call Function37e77 call AnimateFailedMove
ld hl, RefusedGiftText ld hl, RefusedGiftText
call StdBattleTextBox call StdBattleTextBox
.asm_37904 .asm_37904
@ -9589,11 +9592,11 @@ BattleCommand64: ; 37939
set 2, [hl] set 2, [hl]
ld a, $5 ld a, $5
ld [de], a ld [de], a
call Function37e01 call AnimateCurrentMove
ld hl, CoveredByVeilText ld hl, CoveredByVeilText
jp StdBattleTextBox jp StdBattleTextBox
.asm_3795c .asm_3795c
call Function37e77 call AnimateFailedMove
jp PrintButItFailed jp PrintButItFailed
; 37962 ; 37962
@ -9678,74 +9681,81 @@ BattleCommand67: ; 379c9
and a and a
jp nz, .Enemy jp nz, .Enemy
call Function37ae9
jp z, Function37aab ; Need something to switch to
call CheckAnyOtherAlivePartyMons
jp z, FailedBatonPass
call UpdateBattleMonInParty call UpdateBattleMonInParty
call Function37e01 call AnimateCurrentMove
ld c, 50 ld c, 50
call DelayFrames call DelayFrames
; Transition into switchmon menu
call Function1d6e call Function1d6e
callba Function3d2f7 callba Function3d2f7
callba Function3d380
callba ForcePickSwitchMonInBattle
; Return to battle scene
call ClearPalettes call ClearPalettes
callba Function3ed9f callba Function3ed9f
call Function1c17 call Function1c17
call ClearSprites call ClearSprites
hlcoord 1, 0 hlcoord 1, 0
lb bc, 4, 10 lb bc, 4, 10
call ClearBox call ClearBox
ld b, 1 ld b, 1
call GetSGBLayout call GetSGBLayout
call Function32f9 call Function32f9
call Function37a67 call Function37a67
; Mobile link battles handle entrances differently
callba Function3d2e0 callba Function3d2e0
jp c, EndMoveEffect jp c, EndMoveEffect
ld hl, Function3e459 ld hl, PassedBattleMonEntrance
call CallBattleCore call CallBattleCore
call Function37ab1
call ResetBatonPassStatus
ret ret
.Enemy .Enemy
; Wildmons don't have anything to switch to
ld a, [IsInBattle] ld a, [IsInBattle]
dec a dec a
jp z, Function37aab jp z, FailedBatonPass
call Function37af6 call CheckAnyOtherAliveEnemyMons
jp z, Function37aab jp z, FailedBatonPass
call UpdateEnemyMonInParty call UpdateEnemyMonInParty
call Function37e01 call AnimateCurrentMove
call Function37a82 call Function37a82
; Mobile link battles handle entrances differently
callba Function3d2e0 callba Function3d2e0
jp c, EndMoveEffect jp c, EndMoveEffect
; Passed enemy PartyMon entrance
xor a xor a
ld [$c718], a ld [$c718], a
ld hl, Function3d517 ld hl, Function3d517
call CallBattleCore call CallBattleCore
ld hl, Function3d57a ld hl, Function3d57a
call CallBattleCore call CallBattleCore
ld a, 1 ld a, 1
ld [$d265], a ld [$d265], a
ld hl, Function3ecab ld hl, Function3ecab
call CallBattleCore call CallBattleCore
ld hl, Function3dc23 ld hl, SpikesDamage
call CallBattleCore call CallBattleCore
jr Function37ab1 jr ResetBatonPassStatus
; 37a67 ; 37a67
@ -9758,20 +9768,17 @@ Function37a67: ; 37a67
ld [$d0ec], a ld [$d0ec], a
call Function1d6e call Function1d6e
ld hl, Function3e8e4 ld hl, Function3e8e4
call CallBattleCore call CallBattleCore
call Function1c17 call Function1c17
xor a xor a
ld [$d0ec], a ld [$d0ec], a
ret ret
; 37a82 ; 37a82
Function37a82; 37a82 Function37a82: ; 37a82
ld a, [InLinkBattle] ld a, [InLinkBattle]
and a and a
ret z ret z
@ -9779,54 +9786,65 @@ Function37a82; 37a82
call Function1d6e call Function1d6e
ld hl, Function3e8e4 ld hl, Function3e8e4
call CallBattleCore call CallBattleCore
ld a, [OTPartyCount] ld a, [OTPartyCount]
add $4 add 4
ld b, a ld b, a
ld a, [$d430] ld a, [$d430]
cp $4 cp 4
jr c, .asm_37aa0 jr c, .asm_37aa0
cp b cp b
jr c, .asm_37aa8 jr c, .asm_37aa8
.asm_37aa0 .asm_37aa0
ld a, [CurOTMon] ld a, [CurOTMon]
add $4 add 4
ld [$d430], a ld [$d430], a
.asm_37aa8 .asm_37aa8
jp $1c17 jp Function1c17
; 37aab ; 37aab
Function37aab: ; 37aab FailedBatonPass: ; 37aab
call Function37e77 call AnimateFailedMove
jp PrintButItFailed jp PrintButItFailed
; 37ab1 ; 37ab1
Function37ab1: ; 37ab1 ResetBatonPassStatus: ; 37ab1
; Reset status changes that aren't passed by Baton Pass.
; Nightmare isn't passed.
ld a, BATTLE_VARS_STATUS ld a, BATTLE_VARS_STATUS
call GetBattleVar call GetBattleVar
and 7 and SLP
jr nz, .asm_37ac1 jr nz, .ok
ld a, BATTLE_VARS_SUBSTATUS1 ld a, BATTLE_VARS_SUBSTATUS1
call _GetBattleVar call _GetBattleVar
res 0, [hl] res SUBSTATUS_NIGHTMARE, [hl]
.ok
.asm_37ac1 ; Disable isn't passed.
call Function372e7 call ResetActorDisable
; Attraction isn't passed.
ld hl, PlayerSubStatus1 ld hl, PlayerSubStatus1
res 7, [hl] res SUBSTATUS_IN_LOVE, [hl]
ld hl, EnemySubStatus1 ld hl, EnemySubStatus1
res 7, [hl] res SUBSTATUS_IN_LOVE, [hl]
ld hl, PlayerSubStatus5 ld hl, PlayerSubStatus5
ld a, BATTLE_VARS_SUBSTATUS5 ld a, BATTLE_VARS_SUBSTATUS5
call _GetBattleVar call _GetBattleVar
res 3, [hl] res 3, [hl]
res 4, [hl] res 4, [hl]
; New mon hasn't used a move yet.
ld a, BATTLE_VARS_LAST_MOVE ld a, BATTLE_VARS_LAST_MOVE
call _GetBattleVar call _GetBattleVar
ld [hl], 0 ld [hl], 0
xor a xor a
ld [$c730], a ld [$c730], a
ld [$c731], a ld [$c731], a
@ -9834,17 +9852,17 @@ Function37ab1: ; 37ab1
; 37ae9 ; 37ae9
Function37ae9: ; 37ae9 CheckAnyOtherAlivePartyMons: ; 37ae9
ld hl, PartyMon1CurHP ld hl, PartyMon1CurHP
ld a, [PartyCount] ld a, [PartyCount]
ld d, a ld d, a
ld a, [CurBattleMon] ld a, [CurBattleMon]
ld e, a ld e, a
jr Function37b01 jr CheckAnyOtherAliveMons
; 37af6 ; 37af6
Function37af6: ; 37af6 CheckAnyOtherAliveEnemyMons: ; 37af6
ld hl, OTPartyMon1CurHP ld hl, OTPartyMon1CurHP
ld a, [OTPartyCount] ld a, [OTPartyCount]
ld d, a ld d, a
@ -9854,17 +9872,21 @@ Function37af6: ; 37af6
; fallthrough ; fallthrough
; 37b01 ; 37b01
Function37b01: ; 37b01 CheckAnyOtherAliveMons: ; 37b01
; Check for nonzero HP starting from partymon
; HP at hl for d partymons, besides current mon e.
; Return nz if any are alive.
xor a xor a
ld b, a ld b, a
ld c, a ld c, a
.asm_37b04 .loop
ld a, c ld a, c
cp d cp d
jr z, .asm_37b1a jr z, .done
cp e cp e
jr z, .asm_37b11 jr z, .next
ld a, [hli] ld a, [hli]
or b or b
@ -9872,15 +9894,16 @@ Function37b01: ; 37b01
ld a, [hld] ld a, [hld]
or b or b
ld b, a ld b, a
.asm_37b11
.next
push bc push bc
ld bc, $30 ld bc, PartyMon2 - PartyMon1
add hl, bc add hl, bc
pop bc pop bc
inc c inc c
jr .asm_37b04 jr .loop
.asm_37b1a .done
ld a, b ld a, b
and a and a
ret ret
@ -10021,7 +10044,7 @@ BattleCommand6a6c: ; 37b7e
ld a, BANK(GetMaxHP) ld a, BANK(GetMaxHP)
rst FarCall rst FarCall
call Function37e01 call AnimateCurrentMove
call SwitchTurn call SwitchTurn
callab Function3ccef callab Function3ccef
@ -10034,7 +10057,7 @@ BattleCommand6a6c: ; 37b7e
jp StdBattleTextBox jp StdBattleTextBox
.Full .Full
call Function37e77 call AnimateFailedMove
; 'hp is full!' ; 'hp is full!'
ld hl, HPIsFullText ld hl, HPIsFullText
@ -10065,7 +10088,7 @@ BattleCommand6e: ; 37bf4
ld [Weather], a ld [Weather], a
ld a, 5 ld a, 5
ld [WeatherCount], a ld [WeatherCount], a
call Function37e01 call AnimateCurrentMove
ld hl, DownpourText ld hl, DownpourText
jp StdBattleTextBox jp StdBattleTextBox
; 37c07 ; 37c07
@ -10077,7 +10100,7 @@ BattleCommand6f: ; 37c07
ld [Weather], a ld [Weather], a
ld a, 5 ld a, 5
ld [WeatherCount], a ld [WeatherCount], a
call Function37e01 call AnimateCurrentMove
ld hl, SunGotBrightText ld hl, SunGotBrightText
jp StdBattleTextBox jp StdBattleTextBox
; 37c1a ; 37c1a
@ -10096,7 +10119,7 @@ BattleCommand95: ; 37c1a
jr nc, .asm_37c4f jr nc, .asm_37c4f
push bc push bc
call Function37e01 call AnimateCurrentMove
pop bc pop bc
callab Function3cc3f callab Function3cc3f
call UpdateUserInParty call UpdateUserInParty
@ -10112,7 +10135,7 @@ BattleCommand95: ; 37c1a
ld hl, BellyDrumText ld hl, BellyDrumText
jp StdBattleTextBox jp StdBattleTextBox
.asm_37c4f .asm_37c4f
call Function37e77 call AnimateFailedMove
jp PrintButItFailed jp PrintButItFailed
; 37c55 ; 37c55
@ -10139,7 +10162,7 @@ BattleCommand96: ; 37c55
dec b dec b
jr nz, .asm_37c67 ; 37c6d $f8 jr nz, .asm_37c67 ; 37c6d $f8
pop hl pop hl
call Function37e77 call AnimateFailedMove
jp PrintButItFailed jp PrintButItFailed
.asm_37c76 .asm_37c76
pop hl pop hl
@ -10158,7 +10181,7 @@ BattleCommand96: ; 37c55
.asm_37c89 .asm_37c89
call Function365fd call Function365fd
.asm_37c8c .asm_37c8c
call Function37e01 call AnimateCurrentMove
ld hl, CopiedStatsText ld hl, CopiedStatsText
jp StdBattleTextBox jp StdBattleTextBox
; 37c95 ; 37c95
@ -10328,7 +10351,7 @@ BattleCommand9c: ; 37d34
.asm_37d87 .asm_37d87
pop bc pop bc
call ResetDamage call ResetDamage
call Function37e77 call AnimateFailedMove
call PrintButItFailed call PrintButItFailed
jp EndMoveEffect jp EndMoveEffect
; 37d94 ; 37d94
@ -10427,7 +10450,7 @@ Function37de9: ; 37de9
; 37e01 ; 37e01
Function37e01: ; 37e01 AnimateCurrentMove: ; 37e01
push hl push hl
push de push de
push bc push bc
@ -10533,7 +10556,7 @@ CallBattleCore: ; 37e73
; 37e77 ; 37e77
Function37e77: ; 37e77 AnimateFailedMove: ; 37e77
call BattleCommand0a call BattleCommand0a
call BattleCommandaa call BattleCommandaa
jp BattleCommand0c jp BattleCommand0c

View File

@ -41,7 +41,7 @@ BattleCommand54: ; 37588
ld a, $1 ld a, $1
ld [$c689], a ld [$c689], a
call Function37e01 call AnimateCurrentMove
ld a, $2 ld a, $2
call Function36532 call Function36532
call SwitchTurn call SwitchTurn
@ -71,7 +71,7 @@ BattleCommand54: ; 37588
jr nz, .failed jr nz, .failed
set 1, [hl] set 1, [hl]
call Function37e01 call AnimateCurrentMove
ld hl, GetHalfMaxHP ld hl, GetHalfMaxHP
call CallBattleCore call CallBattleCore
ld hl, Function3cc3f ld hl, Function3cc3f
@ -81,7 +81,7 @@ BattleCommand54: ; 37588
jp StdBattleTextBox jp StdBattleTextBox
.failed .failed
call Function37e77 call AnimateFailedMove
jp PrintButItFailed jp PrintButItFailed
@ -91,7 +91,7 @@ BattleCommand54: ; 37588
ld b, $8 ; ABILITY ld b, $8 ; ABILITY
call GetStatName call GetStatName
call Function37e77 call AnimateFailedMove
ld hl, WontRiseAnymoreText ld hl, WontRiseAnymoreText
jp StdBattleTextBox jp StdBattleTextBox
; 37618 ; 37618

View File

@ -10,7 +10,7 @@ BattleCommand5a: ; 3766f
call _GetBattleVar call _GetBattleVar
set SUBSTATUS_ENDURE, [hl] set SUBSTATUS_ENDURE, [hl]
call Function37e01 call AnimateCurrentMove
ld hl, BracedItselfText ld hl, BracedItselfText
jp StdBattleTextBox jp StdBattleTextBox

View File

@ -14,7 +14,7 @@ BattleCommand57: ; 376a0
jr nz, .failed jr nz, .failed
set SUBSTATUS_IDENTIFIED, [hl] set SUBSTATUS_IDENTIFIED, [hl]
call Function37e01 call AnimateCurrentMove
ld hl, IdentifiedText ld hl, IdentifiedText
jp StdBattleTextBox jp StdBattleTextBox

View File

@ -15,7 +15,7 @@ BattleCommand1b: ; 373c9
jr nz, .use jr nz, .use
.failed .failed
call Function37e77 call AnimateFailedMove
ld hl, MirrorMoveFailedText ld hl, MirrorMoveFailedText
call StdBattleTextBox call StdBattleTextBox

View File

@ -28,12 +28,12 @@ BattleCommand52: ; 37536
; Otherwise give the opponent a nightmare. ; Otherwise give the opponent a nightmare.
set SUBSTATUS_NIGHTMARE, [hl] set SUBSTATUS_NIGHTMARE, [hl]
call Function37e01 call AnimateCurrentMove
ld hl, StartedNightmareText ld hl, StartedNightmareText
jp StdBattleTextBox jp StdBattleTextBox
.failed .failed
call Function37e77 call AnimateFailedMove
jp PrintButItFailed jp PrintButItFailed
; 37563 ; 37563

View File

@ -30,12 +30,12 @@ BattleCommand58: ; 376c2
ld [EnemyPerishCount], a ld [EnemyPerishCount], a
.done .done
call Function37e01 call AnimateCurrentMove
ld hl, StartPerishText ld hl, StartPerishText
jp StdBattleTextBox jp StdBattleTextBox
.failed .failed
call Function37e77 call AnimateFailedMove
jp PrintButItFailed jp PrintButItFailed
; 376f8 ; 376f8

View File

@ -7,7 +7,7 @@ BattleCommand55: ; 37618
call _GetBattleVar call _GetBattleVar
set SUBSTATUS_PROTECT, [hl] set SUBSTATUS_PROTECT, [hl]
call Function37e01 call AnimateCurrentMove
ld hl, ProtectedItselfText ld hl, ProtectedItselfText
jp StdBattleTextBox jp StdBattleTextBox
@ -73,7 +73,7 @@ ProtectChance: ; 3762c
.failed .failed
xor a xor a
ld [de], a ld [de], a
call Function37e77 call AnimateFailedMove
call PrintButItFailed call PrintButItFailed
scf scf
ret ret

View File

@ -9,12 +9,12 @@ BattleCommand59: ; 376f8
ld [Weather], a ld [Weather], a
ld a, 5 ld a, 5
ld [WeatherCount], a ld [WeatherCount], a
call Function37e01 call AnimateCurrentMove
ld hl, SandstormBrewedText ld hl, SandstormBrewedText
jp StdBattleTextBox jp StdBattleTextBox
.failed .failed
call Function37e77 call AnimateFailedMove
jp PrintButItFailed jp PrintButItFailed
; 37718 ; 37718

View File

@ -17,7 +17,7 @@ BattleCommand56: ; 37683
set SCREENS_SPIKES, [hl] set SCREENS_SPIKES, [hl]
call Function37e01 call AnimateCurrentMove
ld hl, SpikesText ld hl, SpikesText
jp StdBattleTextBox jp StdBattleTextBox

View File

@ -36789,7 +36789,7 @@ ClearBattleRAM: ; 2ef18
xor a xor a
call ByteFill call ByteFill
callab Function3d867 callab ResetEnemyStatLevels
call Function1fbf call Function1fbf
@ -37438,8 +37438,8 @@ Function3846c: ; 3846c
.asm_384a3 .asm_384a3
ld a, $1 ld a, $1
ld [$d264], a ld [$d264], a
callab Function3d834 callab NewEnemyMonStatus
callab Function3d867 callab ResetEnemyStatLevels
ld hl, PlayerSubStatus1 ld hl, PlayerSubStatus1
res 7, [hl] res 7, [hl]
callba Function3d4e1 callba Function3d4e1