mirror of
https://gitlab.com/xCrystal/pokecrystal-board.git
synced 2024-11-16 11:27:33 -08:00
Some work on battle animations
This commit is contained in:
parent
59d67a44be
commit
93ab6985d2
@ -40,7 +40,7 @@ _PlayBattleAnim: ; cc0e4
|
|||||||
push af
|
push af
|
||||||
|
|
||||||
ld [hl], c
|
ld [hl], c
|
||||||
call Functioncc11c
|
call BattleAnimRunScript
|
||||||
|
|
||||||
pop af
|
pop af
|
||||||
ld [hVBlank], a
|
ld [hVBlank], a
|
||||||
@ -55,17 +55,17 @@ _PlayBattleAnim: ; cc0e4
|
|||||||
ret
|
ret
|
||||||
; cc11c
|
; cc11c
|
||||||
|
|
||||||
Functioncc11c: ; cc11c
|
BattleAnimRunScript: ; cc11c
|
||||||
|
|
||||||
ld a, [FXAnimIDHi]
|
ld a, [FXAnimIDHi]
|
||||||
and a
|
and a
|
||||||
jr nz, .asm_cc156
|
jr nz, .hi_byte
|
||||||
|
|
||||||
callba CheckBattleScene
|
callba CheckBattleScene
|
||||||
jr c, .asm_cc141
|
jr c, .disabled
|
||||||
|
|
||||||
call BattleAnimClearHud
|
call BattleAnimClearHud
|
||||||
call Functioncc163
|
call RunBattleAnimScript
|
||||||
|
|
||||||
call BattleAnimAssignPals
|
call BattleAnimAssignPals
|
||||||
call BattleAnimRequestPals
|
call BattleAnimRequestPals
|
||||||
@ -76,31 +76,31 @@ Functioncc11c: ; cc11c
|
|||||||
call BattleAnimDelayFrame
|
call BattleAnimDelayFrame
|
||||||
call BattleAnimRestoreHuds
|
call BattleAnimRestoreHuds
|
||||||
|
|
||||||
.asm_cc141
|
.disabled
|
||||||
ld a, [wcfca]
|
ld a, [wcfca]
|
||||||
and a
|
and a
|
||||||
jr z, .asm_cc15f
|
jr z, .done
|
||||||
|
|
||||||
ld l, a
|
ld l, a
|
||||||
ld h, 0
|
ld h, 0
|
||||||
ld de, $10e
|
ld de, ANIM_MISS
|
||||||
add hl, de
|
add hl, de
|
||||||
ld a, l
|
ld a, l
|
||||||
ld [FXAnimIDLo], a
|
ld [FXAnimIDLo], a
|
||||||
ld a, h
|
ld a, h
|
||||||
ld [FXAnimIDHi], a
|
ld [FXAnimIDHi], a
|
||||||
|
|
||||||
.asm_cc156
|
.hi_byte
|
||||||
call WaitSFX
|
call WaitSFX
|
||||||
call Functioncc881
|
call Functioncc881
|
||||||
call Functioncc163
|
call RunBattleAnimScript
|
||||||
|
|
||||||
.asm_cc15f
|
.done
|
||||||
call Functioncc8f6
|
call Functioncc8f6
|
||||||
ret
|
ret
|
||||||
; cc163
|
; cc163
|
||||||
|
|
||||||
Functioncc163: ; cc163
|
RunBattleAnimScript: ; cc163
|
||||||
|
|
||||||
call Functioncc8d3
|
call Functioncc8d3
|
||||||
|
|
||||||
@ -257,11 +257,11 @@ Functioncc23d: ; cc23d
|
|||||||
|
|
||||||
ld a, [BattleAnimFlags]
|
ld a, [BattleAnimFlags]
|
||||||
bit 3, a
|
bit 3, a
|
||||||
jr z, .asm_cc254
|
jr z, .skip
|
||||||
|
|
||||||
ld hl, Sprites + 3
|
ld hl, Sprites + 3
|
||||||
ld c, (SpritesEnd - Sprites) / 4
|
ld c, (SpritesEnd - Sprites) / 4
|
||||||
.asm_cc249
|
.loop
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
and $f0
|
and $f0
|
||||||
ld [hli], a
|
ld [hli], a
|
||||||
@ -269,71 +269,71 @@ rept 3
|
|||||||
inc hl
|
inc hl
|
||||||
endr
|
endr
|
||||||
dec c
|
dec c
|
||||||
jr nz, .asm_cc249
|
jr nz, .loop
|
||||||
ret
|
ret
|
||||||
|
|
||||||
.asm_cc254
|
.skip
|
||||||
ld hl, Sprites
|
ld hl, Sprites
|
||||||
ld c, SpritesEnd - Sprites
|
ld c, SpritesEnd - Sprites
|
||||||
xor a
|
xor a
|
||||||
.asm_cc25a
|
.loop2
|
||||||
ld [hli], a
|
ld [hli], a
|
||||||
dec c
|
dec c
|
||||||
jr nz, .asm_cc25a
|
jr nz, .loop2
|
||||||
ret
|
ret
|
||||||
; cc25f
|
; cc25f
|
||||||
|
|
||||||
Functioncc25f: ; cc25f
|
Functioncc25f: ; cc25f
|
||||||
call Functioncc267
|
call .CheckTimer
|
||||||
ret nc
|
ret nc
|
||||||
call Functioncc275
|
call .RunScript
|
||||||
ret
|
ret
|
||||||
; cc267
|
; cc267
|
||||||
|
|
||||||
Functioncc267: ; cc267
|
.CheckTimer: ; cc267
|
||||||
ld a, [BattleAnimDuration]
|
ld a, [BattleAnimDuration]
|
||||||
and a
|
and a
|
||||||
jr z, .asm_cc273
|
jr z, .done
|
||||||
|
|
||||||
dec a
|
dec a
|
||||||
ld [BattleAnimDuration], a
|
ld [BattleAnimDuration], a
|
||||||
and a
|
and a
|
||||||
ret
|
ret
|
||||||
|
|
||||||
.asm_cc273
|
.done
|
||||||
scf
|
scf
|
||||||
ret
|
ret
|
||||||
; cc275
|
; cc275
|
||||||
|
|
||||||
Functioncc275: ; cc275
|
.RunScript: ; cc275
|
||||||
|
.loop
|
||||||
call GetBattleAnimByte
|
call GetBattleAnimByte
|
||||||
|
|
||||||
cp $ff
|
cp $ff
|
||||||
jr nz, .asm_cc286
|
jr nz, .not_done_with_anim
|
||||||
|
|
||||||
; Return from a subroutine.
|
; Return from a subroutine.
|
||||||
ld hl, BattleAnimFlags
|
ld hl, BattleAnimFlags
|
||||||
bit 1, [hl]
|
bit 1, [hl]
|
||||||
jr nz, .asm_cc28e
|
jr nz, .do_anim
|
||||||
|
|
||||||
set 0, [hl]
|
set 0, [hl]
|
||||||
ret
|
ret
|
||||||
|
|
||||||
.asm_cc286
|
.not_done_with_anim
|
||||||
cp $d0
|
cp $d0
|
||||||
jr nc, .asm_cc28e
|
jr nc, .do_anim
|
||||||
|
|
||||||
ld [BattleAnimDuration], a
|
ld [BattleAnimDuration], a
|
||||||
ret
|
ret
|
||||||
|
|
||||||
.asm_cc28e
|
.do_anim
|
||||||
call Functioncc293
|
call .DoCommand
|
||||||
|
|
||||||
jr Functioncc275
|
jr .loop
|
||||||
; cc293
|
; cc293
|
||||||
|
|
||||||
Functioncc293: ; cc293
|
.DoCommand: ; cc293
|
||||||
; Execute battle animation command in [BattleAnimByte].
|
; Execute battle animation command in [BattleAnimByte].
|
||||||
ld a, [BattleAnimByte]
|
ld a, [BattleAnimByte]
|
||||||
sub $d0
|
sub $d0
|
||||||
@ -1332,11 +1332,11 @@ Datacc871: ; cc871
|
|||||||
Functioncc881: ; cc881
|
Functioncc881: ; cc881
|
||||||
ld a, [wcfca]
|
ld a, [wcfca]
|
||||||
cp $1
|
cp $1
|
||||||
jr z, .asm_cc88b
|
jr z, .okay
|
||||||
cp $4
|
cp $4
|
||||||
ret nz
|
ret nz
|
||||||
|
|
||||||
.asm_cc88b
|
.okay
|
||||||
ld a, [TypeModifier]
|
ld a, [TypeModifier]
|
||||||
and $7f
|
and $7f
|
||||||
ret z
|
ret z
|
||||||
@ -1358,41 +1358,43 @@ Functioncc881: ; cc881
|
|||||||
BattleAnimAssignPals: ; cc8a4
|
BattleAnimAssignPals: ; cc8a4
|
||||||
ld a, [hCGB]
|
ld a, [hCGB]
|
||||||
and a
|
and a
|
||||||
jr nz, .asm_cc8be
|
jr nz, .cgb
|
||||||
ld a, [hSGB]
|
ld a, [hSGB]
|
||||||
and a
|
and a
|
||||||
ld a, $e0
|
ld a, %11100000
|
||||||
jr z, .asm_cc8b2
|
jr z, .sgb
|
||||||
ld a, $f0
|
ld a, %11110000
|
||||||
|
|
||||||
.asm_cc8b2
|
.sgb
|
||||||
ld [wcfc8], a
|
ld [wcfc8], a
|
||||||
ld a, $e4
|
ld a, %11100100
|
||||||
ld [wcfc7], a
|
ld [wcfc7], a
|
||||||
ld [wcfc9], a
|
ld [wcfc9], a
|
||||||
ret
|
ret
|
||||||
|
|
||||||
.asm_cc8be
|
.cgb
|
||||||
ld a, $e4
|
ld a, %11100100
|
||||||
ld [wcfc7], a
|
ld [wcfc7], a
|
||||||
ld [wcfc8], a
|
ld [wcfc8], a
|
||||||
ld [wcfc9], a
|
ld [wcfc9], a
|
||||||
call DmgToCgbBGPals
|
call DmgToCgbBGPals
|
||||||
ld de, $e4e4
|
lb de, %11100100, %11100100
|
||||||
call DmgToCgbObjPals
|
call DmgToCgbObjPals
|
||||||
ret
|
ret
|
||||||
; cc8d3
|
; cc8d3
|
||||||
|
|
||||||
Functioncc8d3: ; cc8d3
|
Functioncc8d3: ; cc8d3
|
||||||
|
; Clear animation block
|
||||||
ld hl, LYOverrides
|
ld hl, LYOverrides
|
||||||
ld bc, $0354
|
ld bc, wBattleAnimEnd - LYOverrides
|
||||||
.asm_cc8d9
|
.loop
|
||||||
ld [hl], $0
|
ld [hl], $0
|
||||||
inc hl
|
inc hl
|
||||||
dec bc
|
dec bc
|
||||||
ld a, c
|
ld a, c
|
||||||
or b
|
or b
|
||||||
jr nz, .asm_cc8d9
|
jr nz, .loop
|
||||||
|
|
||||||
ld hl, FXAnimIDLo
|
ld hl, FXAnimIDLo
|
||||||
ld e, [hl]
|
ld e, [hl]
|
||||||
inc hl
|
inc hl
|
||||||
@ -1401,7 +1403,7 @@ Functioncc8d3: ; cc8d3
|
|||||||
rept 2
|
rept 2
|
||||||
add hl, de
|
add hl, de
|
||||||
endr
|
endr
|
||||||
call Function3ae1
|
call GetBattleAnimPointer
|
||||||
call BattleAnimAssignPals
|
call BattleAnimAssignPals
|
||||||
call BattleAnimDelayFrame
|
call BattleAnimDelayFrame
|
||||||
ret
|
ret
|
||||||
@ -1409,12 +1411,12 @@ endr
|
|||||||
|
|
||||||
Functioncc8f6: ; cc8f6
|
Functioncc8f6: ; cc8f6
|
||||||
call WaitTop
|
call WaitTop
|
||||||
ld a, $e4
|
ld a, %11100100
|
||||||
ld [wcfc7], a
|
ld [wcfc7], a
|
||||||
ld [wcfc8], a
|
ld [wcfc8], a
|
||||||
ld [wcfc9], a
|
ld [wcfc9], a
|
||||||
call DmgToCgbBGPals
|
call DmgToCgbBGPals
|
||||||
ld de, $e4e4
|
lb de, %11100100, %11100100
|
||||||
call DmgToCgbObjPals
|
call DmgToCgbObjPals
|
||||||
xor a
|
xor a
|
||||||
ld [hSCX], a
|
ld [hSCX], a
|
||||||
|
@ -255,6 +255,7 @@ BattleAnimations:: ; c906f
|
|||||||
dw BattleAnim_253
|
dw BattleAnim_253
|
||||||
dw BattleAnim_254
|
dw BattleAnim_254
|
||||||
dw BattleAnim_SweetScent2
|
dw BattleAnim_SweetScent2
|
||||||
|
; $100
|
||||||
dw BattleAnim_ThrowPokeBall
|
dw BattleAnim_ThrowPokeBall
|
||||||
dw BattleAnim_SendOutMon
|
dw BattleAnim_SendOutMon
|
||||||
dw BattleAnim_ReturnMon
|
dw BattleAnim_ReturnMon
|
||||||
|
@ -2022,7 +2022,7 @@ Function3ccc2: ; 3ccc2
|
|||||||
ret
|
ret
|
||||||
; 3ccde
|
; 3ccde
|
||||||
|
|
||||||
Function3ccde: ; 3ccde
|
CheckUserHasEnoughHP: ; 3ccde
|
||||||
ld hl, BattleMonHP + 1
|
ld hl, BattleMonHP + 1
|
||||||
ld a, [hBattleTurn]
|
ld a, [hBattleTurn]
|
||||||
and a
|
and a
|
||||||
@ -3740,7 +3740,7 @@ Function3d7a0: ; 3d7a0
|
|||||||
lb bc, 4, 10
|
lb bc, 4, 10
|
||||||
call ClearBox
|
call ClearBox
|
||||||
call WaitBGMap
|
call WaitBGMap
|
||||||
jp Function3ee27
|
jp FinishBattleAnim
|
||||||
; 3d7b8
|
; 3d7b8
|
||||||
|
|
||||||
Function_BattleTextEnemySentOut: ; 3d7b8
|
Function_BattleTextEnemySentOut: ; 3d7b8
|
||||||
@ -4253,7 +4253,7 @@ SendOutPlayerMon: ; 3db5f
|
|||||||
ld [hBGMapMode], a
|
ld [hBGMapMode], a
|
||||||
call GetMonBackpic
|
call GetMonBackpic
|
||||||
xor a
|
xor a
|
||||||
ld [$ffad], a
|
ld [hFillBox], a
|
||||||
ld [wd0d2], a
|
ld [wd0d2], a
|
||||||
ld [CurMoveNum], a
|
ld [CurMoveNum], a
|
||||||
ld [TypeModifier], a
|
ld [TypeModifier], a
|
||||||
@ -4262,7 +4262,7 @@ SendOutPlayerMon: ; 3db5f
|
|||||||
ld [LastPlayerCounterMove], a
|
ld [LastPlayerCounterMove], a
|
||||||
ld [LastPlayerMove], a
|
ld [LastPlayerMove], a
|
||||||
call CheckAmuletCoin
|
call CheckAmuletCoin
|
||||||
call Function3ee27
|
call FinishBattleAnim
|
||||||
xor a
|
xor a
|
||||||
ld [wEnemyWrapCount], a
|
ld [wEnemyWrapCount], a
|
||||||
call SetPlayerTurn
|
call SetPlayerTurn
|
||||||
@ -5132,7 +5132,7 @@ Function3e12e: ; 3e12e
|
|||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
cp b
|
cp b
|
||||||
ret z
|
ret z
|
||||||
jp Function3ee27
|
jp FinishBattleAnim
|
||||||
; 3e138
|
; 3e138
|
||||||
|
|
||||||
Function3e138: ; 3e138
|
Function3e138: ; 3e138
|
||||||
@ -5269,7 +5269,7 @@ BattleMenu_Pack: ; 3e1c7
|
|||||||
call GetMonFrontpic
|
call GetMonFrontpic
|
||||||
call ExitMenu
|
call ExitMenu
|
||||||
call WaitBGMap
|
call WaitBGMap
|
||||||
call Function3ee27
|
call FinishBattleAnim
|
||||||
call LoadTileMapToTempTileMap
|
call LoadTileMapToTempTileMap
|
||||||
jp BattleMenu
|
jp BattleMenu
|
||||||
; 3e22b
|
; 3e22b
|
||||||
@ -5309,7 +5309,7 @@ Function3e234: ; 3e234
|
|||||||
call WaitBGMap
|
call WaitBGMap
|
||||||
call LoadTileMapToTempTileMap
|
call LoadTileMapToTempTileMap
|
||||||
call ResetTextRelatedRAM
|
call ResetTextRelatedRAM
|
||||||
call Function3ee27
|
call FinishBattleAnim
|
||||||
and a
|
and a
|
||||||
ret
|
ret
|
||||||
|
|
||||||
@ -6873,7 +6873,7 @@ Function3ebc7: ; 3ebc7
|
|||||||
Function3ebd8: ; 3ebd8
|
Function3ebd8: ; 3ebd8
|
||||||
xor a
|
xor a
|
||||||
ld [TempEnemyMonSpecies], a
|
ld [TempEnemyMonSpecies], a
|
||||||
call Function3ee27
|
call FinishBattleAnim
|
||||||
ld a, [OtherTrainerClass]
|
ld a, [OtherTrainerClass]
|
||||||
ld [TrainerClass], a
|
ld [TrainerClass], a
|
||||||
ld de, VTiles2
|
ld de, VTiles2
|
||||||
@ -7368,7 +7368,7 @@ Call_PlayBattleAnim: ; 3ee17
|
|||||||
predef_jump PlayBattleAnim
|
predef_jump PlayBattleAnim
|
||||||
; 3ee27
|
; 3ee27
|
||||||
|
|
||||||
Function3ee27: ; 3ee27
|
FinishBattleAnim: ; 3ee27
|
||||||
push af
|
push af
|
||||||
push bc
|
push bc
|
||||||
push de
|
push de
|
||||||
@ -8377,7 +8377,7 @@ GetMonBackpic: ; 3f43d
|
|||||||
ld a, [PlayerSubStatus4]
|
ld a, [PlayerSubStatus4]
|
||||||
bit SUBSTATUS_SUBSTITUTE, a
|
bit SUBSTATUS_SUBSTITUTE, a
|
||||||
ld hl, BattleAnimCmd_DD
|
ld hl, BattleAnimCmd_DD
|
||||||
jr nz, Function3f46f
|
jr nz, Function3f46f ; substitute
|
||||||
|
|
||||||
Function3f447: ; 3f447
|
Function3f447: ; 3f447
|
||||||
ld a, [wc6fe]
|
ld a, [wc6fe]
|
||||||
@ -8576,7 +8576,7 @@ InitEnemyTrainer: ; 3f594
|
|||||||
ld de, VTiles2
|
ld de, VTiles2
|
||||||
callab GetTrainerPic
|
callab GetTrainerPic
|
||||||
xor a
|
xor a
|
||||||
ld [$ffad], a
|
ld [hFillBox], a
|
||||||
dec a
|
dec a
|
||||||
ld [wc6e6], a
|
ld [wc6e6], a
|
||||||
hlcoord 12, 0
|
hlcoord 12, 0
|
||||||
@ -8641,7 +8641,7 @@ InitEnemyWildmon: ; 3f607
|
|||||||
predef Function5108b
|
predef Function5108b
|
||||||
xor a
|
xor a
|
||||||
ld [TrainerClass], a
|
ld [TrainerClass], a
|
||||||
ld [$ffad], a
|
ld [hFillBox], a
|
||||||
hlcoord 12, 0
|
hlcoord 12, 0
|
||||||
lb bc, 7, 7
|
lb bc, 7, 7
|
||||||
predef FillBox
|
predef FillBox
|
||||||
@ -9400,7 +9400,7 @@ Function3fb6c: ; 3fb6c
|
|||||||
ld a, $1
|
ld a, $1
|
||||||
ld [hBGMapMode], a
|
ld [hBGMapMode], a
|
||||||
ld a, $31
|
ld a, $31
|
||||||
ld [$ffad], a
|
ld [hFillBox], a
|
||||||
hlcoord 2, 6
|
hlcoord 2, 6
|
||||||
lb bc, 6, 6
|
lb bc, 6, 6
|
||||||
predef FillBox
|
predef FillBox
|
||||||
@ -9494,7 +9494,7 @@ CopyBackpic: ; 3fc30
|
|||||||
ld [rSVBK], a
|
ld [rSVBK], a
|
||||||
call Function3fc5b
|
call Function3fc5b
|
||||||
ld a, $31
|
ld a, $31
|
||||||
ld [$ffad], a
|
ld [hFillBox], a
|
||||||
hlcoord 2, 6
|
hlcoord 2, 6
|
||||||
lb bc, 6, 6
|
lb bc, 6, 6
|
||||||
predef FillBox
|
predef FillBox
|
||||||
|
@ -13,7 +13,7 @@ BattleCommandPointers: ; 3fd28
|
|||||||
dw BattleCommand_LowerSub ; 34eee
|
dw BattleCommand_LowerSub ; 34eee
|
||||||
dw BattleCommand_HitTargetNoSub ; 34f60
|
dw BattleCommand_HitTargetNoSub ; 34f60
|
||||||
dw BattleCommand_RaiseSub ; 35004
|
dw BattleCommand_RaiseSub ; 35004
|
||||||
dw BattleCommand_ResultText ; 35023
|
dw BattleCommand_FailureText ; 35023
|
||||||
dw BattleCommand_CheckFaint ; 3505e
|
dw BattleCommand_CheckFaint ; 3505e
|
||||||
dw BattleCommand_CriticalText ; 35175
|
dw BattleCommand_CriticalText ; 35175
|
||||||
dw BattleCommand_SuperEffectiveText ; 351ad
|
dw BattleCommand_SuperEffectiveText ; 351ad
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -20,7 +20,7 @@ BattleCommand_Attract: ; 377ce
|
|||||||
jp StdBattleTextBox
|
jp StdBattleTextBox
|
||||||
|
|
||||||
.failed
|
.failed
|
||||||
jp Function37354
|
jp FailAttract
|
||||||
; 377f5
|
; 377f5
|
||||||
|
|
||||||
|
|
||||||
|
@ -19,5 +19,5 @@ BattleCommand_Foresight: ; 376a0
|
|||||||
jp StdBattleTextBox
|
jp StdBattleTextBox
|
||||||
|
|
||||||
.failed
|
.failed
|
||||||
jp Function37354
|
jp FailForesight
|
||||||
; 376c2
|
; 376c2
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
BattleCommand_Metronome: ; 37418
|
BattleCommand_Metronome: ; 37418
|
||||||
; metronome
|
; metronome
|
||||||
|
|
||||||
call Function372d8
|
call ClearLastMove
|
||||||
call Function34548
|
call CheckUserIsCharging
|
||||||
jr nz, .asm_3742b
|
jr nz, .asm_3742b
|
||||||
|
|
||||||
ld a, [wKickCounter]
|
ld a, [wKickCounter]
|
||||||
@ -12,7 +12,7 @@ BattleCommand_Metronome: ; 37418
|
|||||||
ld [wKickCounter], a
|
ld [wKickCounter], a
|
||||||
|
|
||||||
.asm_3742b
|
.asm_3742b
|
||||||
call PlayPlayerMoveAnim_ClearHiID
|
call LoadMoveAnim
|
||||||
|
|
||||||
.GetMove
|
.GetMove
|
||||||
call BattleRandom
|
call BattleRandom
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
BattleCommand_MirrorMove: ; 373c9
|
BattleCommand_MirrorMove: ; 373c9
|
||||||
; mirrormove
|
; mirrormove
|
||||||
|
|
||||||
call Function372d8
|
call ClearLastMove
|
||||||
|
|
||||||
ld a, BATTLE_VARS_MOVE
|
ld a, BATTLE_VARS_MOVE
|
||||||
call GetBattleVarAddr
|
call GetBattleVarAddr
|
||||||
@ -37,7 +37,7 @@ BattleCommand_MirrorMove: ; 373c9
|
|||||||
call GetMoveData
|
call GetMoveData
|
||||||
call GetMoveName
|
call GetMoveName
|
||||||
call CopyName1
|
call CopyName1
|
||||||
call Function34548
|
call CheckUserIsCharging
|
||||||
jr nz, .done
|
jr nz, .done
|
||||||
|
|
||||||
ld a, [wKickCounter]
|
ld a, [wKickCounter]
|
||||||
|
@ -23,7 +23,7 @@ ProtectChance: ; 3762c
|
|||||||
ld de, EnemyProtectCount
|
ld de, EnemyProtectCount
|
||||||
.asm_37637
|
.asm_37637
|
||||||
|
|
||||||
call Function36abf
|
call CheckOpponentWentFirst
|
||||||
jr nz, .failed
|
jr nz, .failed
|
||||||
|
|
||||||
; Can't have a substitute.
|
; Can't have a substitute.
|
||||||
|
@ -23,5 +23,5 @@ BattleCommand_Spikes: ; 37683
|
|||||||
jp StdBattleTextBox
|
jp StdBattleTextBox
|
||||||
|
|
||||||
.failed
|
.failed
|
||||||
jp Function37354
|
jp FailSpikes
|
||||||
; 376a0
|
; 376a0
|
||||||
|
@ -1,50 +1,50 @@
|
|||||||
Functionfbd54: ; fbd54
|
_DisappearUser: ; fbd54
|
||||||
xor a
|
xor a
|
||||||
ld [hBGMapMode], a ; $ff00+$d4
|
ld [hBGMapMode], a ; $ff00+$d4
|
||||||
ld a, [hBattleTurn] ; $ff00+$e4
|
ld a, [hBattleTurn] ; $ff00+$e4
|
||||||
and a
|
and a
|
||||||
jr z, .asm_fbd61
|
jr z, .player
|
||||||
call Functionfbd96
|
call GetEnemyFrontpicCoords
|
||||||
jr .asm_fbd64
|
jr .okay
|
||||||
.asm_fbd61
|
.player
|
||||||
call Functionfbd9d
|
call GetPlayerBackpicCoords
|
||||||
.asm_fbd64
|
.okay
|
||||||
call ClearBox
|
call ClearBox
|
||||||
jr Functionfbd91
|
jr FinishAppearDisappearUser
|
||||||
|
|
||||||
Functionfbd69: ; fbd69 (3e:7d69)
|
_AppearUserRaiseSub: ; fbd69 (3e:7d69)
|
||||||
callba BattleCommand_RaiseSubNoAnim
|
callba BattleCommand_RaiseSubNoAnim
|
||||||
jr Functionfbd77
|
jr AppearUser
|
||||||
|
|
||||||
Functionfbd71: ; fbd71 (3e:7d71)
|
_AppearUserLowerSub: ; fbd71 (3e:7d71)
|
||||||
callba BattleCommand_LowerSubNoAnim
|
callba BattleCommand_LowerSubNoAnim
|
||||||
|
|
||||||
Functionfbd77: ; fbd77 (3e:7d77)
|
AppearUser: ; fbd77 (3e:7d77)
|
||||||
xor a
|
xor a
|
||||||
ld [hBGMapMode], a ; $ff00+$d4
|
ld [hBGMapMode], a ; $ff00+$d4
|
||||||
ld a, [hBattleTurn] ; $ff00+$e4
|
ld a, [hBattleTurn] ; $ff00+$e4
|
||||||
and a
|
and a
|
||||||
jr z, .asm_fbd85
|
jr z, .player
|
||||||
call Functionfbd96
|
call GetEnemyFrontpicCoords
|
||||||
xor a
|
xor a
|
||||||
jr .asm_fbd8a
|
jr .okay
|
||||||
.asm_fbd85
|
.player
|
||||||
call Functionfbd9d
|
call GetPlayerBackpicCoords
|
||||||
ld a, $31
|
ld a, $31
|
||||||
.asm_fbd8a
|
.okay
|
||||||
ld [$ffad], a
|
ld [hFillBox], a
|
||||||
predef FillBox
|
predef FillBox
|
||||||
Functionfbd91: ; fbd91 (3e:7d91)
|
FinishAppearDisappearUser: ; fbd91 (3e:7d91)
|
||||||
ld a, $1
|
ld a, $1
|
||||||
ld [hBGMapMode], a ; $ff00+$d4
|
ld [hBGMapMode], a ; $ff00+$d4
|
||||||
ret
|
ret
|
||||||
|
|
||||||
Functionfbd96: ; fbd96 (3e:7d96)
|
GetEnemyFrontpicCoords: ; fbd96 (3e:7d96)
|
||||||
hlcoord 12, 0
|
hlcoord 12, 0
|
||||||
lb bc, 7, 7
|
lb bc, 7, 7
|
||||||
ret
|
ret
|
||||||
|
|
||||||
Functionfbd9d: ; fbd9d (3e:7d9d)
|
GetPlayerBackpicCoords: ; fbd9d (3e:7d9d)
|
||||||
hlcoord 2, 6
|
hlcoord 2, 6
|
||||||
lb bc, 6, 6
|
lb bc, 6, 6
|
||||||
ret
|
ret
|
||||||
@ -62,7 +62,7 @@ DoWeatherModifiers: ; fbda4
|
|||||||
ld a, [de]
|
ld a, [de]
|
||||||
inc de
|
inc de
|
||||||
cp $ff
|
cp $ff
|
||||||
jr z, .asm_fbdc0
|
jr z, .done_weather_types
|
||||||
|
|
||||||
cp b
|
cp b
|
||||||
jr nz, .NextWeatherType
|
jr nz, .NextWeatherType
|
||||||
@ -78,7 +78,7 @@ endr
|
|||||||
jr .CheckWeatherType
|
jr .CheckWeatherType
|
||||||
|
|
||||||
|
|
||||||
.asm_fbdc0
|
.done_weather_types
|
||||||
ld de, .WeatherMoveModifiers
|
ld de, .WeatherMoveModifiers
|
||||||
|
|
||||||
ld a, BATTLE_VARS_MOVE_EFFECT
|
ld a, BATTLE_VARS_MOVE_EFFECT
|
||||||
@ -217,10 +217,10 @@ DoBadgeTypeBoosts: ; fbe24
|
|||||||
|
|
||||||
ld a, e
|
ld a, e
|
||||||
or d
|
or d
|
||||||
jr nz, .asm_fbe6f
|
jr nz, .done_min
|
||||||
ld e, 1
|
ld e, 1
|
||||||
|
|
||||||
.asm_fbe6f
|
.done_min
|
||||||
add hl, de
|
add hl, de
|
||||||
jr nc, .Update
|
jr nc, .Update
|
||||||
|
|
||||||
|
@ -44,7 +44,7 @@ NormalHit:
|
|||||||
damagevariation
|
damagevariation
|
||||||
checkhit
|
checkhit
|
||||||
hittarget
|
hittarget
|
||||||
resulttext
|
failuretext
|
||||||
checkfaint
|
checkfaint
|
||||||
criticaltext
|
criticaltext
|
||||||
supereffectivetext
|
supereffectivetext
|
||||||
@ -83,7 +83,7 @@ PoisonHit:
|
|||||||
checkhit
|
checkhit
|
||||||
effectchance
|
effectchance
|
||||||
hittarget
|
hittarget
|
||||||
resulttext
|
failuretext
|
||||||
checkfaint
|
checkfaint
|
||||||
criticaltext
|
criticaltext
|
||||||
supereffectivetext
|
supereffectivetext
|
||||||
@ -107,7 +107,7 @@ LeechHit:
|
|||||||
damagevariation
|
damagevariation
|
||||||
checkhit
|
checkhit
|
||||||
hittarget
|
hittarget
|
||||||
resulttext
|
failuretext
|
||||||
checkfaint
|
checkfaint
|
||||||
criticaltext
|
criticaltext
|
||||||
supereffectivetext
|
supereffectivetext
|
||||||
@ -133,7 +133,7 @@ BurnHit:
|
|||||||
checkhit
|
checkhit
|
||||||
effectchance
|
effectchance
|
||||||
hittarget
|
hittarget
|
||||||
resulttext
|
failuretext
|
||||||
checkfaint
|
checkfaint
|
||||||
criticaltext
|
criticaltext
|
||||||
supereffectivetext
|
supereffectivetext
|
||||||
@ -158,7 +158,7 @@ FreezeHit:
|
|||||||
checkhit
|
checkhit
|
||||||
effectchance
|
effectchance
|
||||||
hittarget
|
hittarget
|
||||||
resulttext
|
failuretext
|
||||||
checkfaint
|
checkfaint
|
||||||
criticaltext
|
criticaltext
|
||||||
supereffectivetext
|
supereffectivetext
|
||||||
@ -187,7 +187,7 @@ ParalyzeHit:
|
|||||||
checkhit
|
checkhit
|
||||||
effectchance
|
effectchance
|
||||||
hittarget
|
hittarget
|
||||||
resulttext
|
failuretext
|
||||||
checkfaint
|
checkfaint
|
||||||
criticaltext
|
criticaltext
|
||||||
supereffectivetext
|
supereffectivetext
|
||||||
@ -209,7 +209,7 @@ Explosion:
|
|||||||
checkhit
|
checkhit
|
||||||
selfdestruct
|
selfdestruct
|
||||||
hittargetnosub
|
hittargetnosub
|
||||||
resulttext
|
failuretext
|
||||||
checkfaint
|
checkfaint
|
||||||
criticaltext
|
criticaltext
|
||||||
supereffectivetext
|
supereffectivetext
|
||||||
@ -229,7 +229,7 @@ DreamEater:
|
|||||||
damagevariation
|
damagevariation
|
||||||
checkhit
|
checkhit
|
||||||
hittarget
|
hittarget
|
||||||
resulttext
|
failuretext
|
||||||
checkfaint
|
checkfaint
|
||||||
criticaltext
|
criticaltext
|
||||||
supereffectivetext
|
supereffectivetext
|
||||||
@ -634,7 +634,7 @@ AttackDownHit:
|
|||||||
checkhit
|
checkhit
|
||||||
effectchance
|
effectchance
|
||||||
hittarget
|
hittarget
|
||||||
resulttext
|
failuretext
|
||||||
checkfaint
|
checkfaint
|
||||||
criticaltext
|
criticaltext
|
||||||
supereffectivetext
|
supereffectivetext
|
||||||
@ -659,7 +659,7 @@ DefenseDownHit:
|
|||||||
checkhit
|
checkhit
|
||||||
effectchance
|
effectchance
|
||||||
hittarget
|
hittarget
|
||||||
resulttext
|
failuretext
|
||||||
checkfaint
|
checkfaint
|
||||||
criticaltext
|
criticaltext
|
||||||
supereffectivetext
|
supereffectivetext
|
||||||
@ -686,7 +686,7 @@ SpeedDownHit:
|
|||||||
checkhit
|
checkhit
|
||||||
effectchance
|
effectchance
|
||||||
hittarget
|
hittarget
|
||||||
resulttext
|
failuretext
|
||||||
checkfaint
|
checkfaint
|
||||||
criticaltext
|
criticaltext
|
||||||
supereffectivetext
|
supereffectivetext
|
||||||
@ -708,7 +708,7 @@ SpecialAttackDownHit:
|
|||||||
checkhit
|
checkhit
|
||||||
effectchance
|
effectchance
|
||||||
hittarget
|
hittarget
|
||||||
resulttext
|
failuretext
|
||||||
checkfaint
|
checkfaint
|
||||||
criticaltext
|
criticaltext
|
||||||
supereffectivetext
|
supereffectivetext
|
||||||
@ -733,7 +733,7 @@ SpecialDefenseDownHit:
|
|||||||
checkhit
|
checkhit
|
||||||
effectchance
|
effectchance
|
||||||
hittarget
|
hittarget
|
||||||
resulttext
|
failuretext
|
||||||
checkfaint
|
checkfaint
|
||||||
criticaltext
|
criticaltext
|
||||||
supereffectivetext
|
supereffectivetext
|
||||||
@ -757,7 +757,7 @@ AccuracyDownHit:
|
|||||||
checkhit
|
checkhit
|
||||||
effectchance
|
effectchance
|
||||||
hittarget
|
hittarget
|
||||||
resulttext
|
failuretext
|
||||||
checkfaint
|
checkfaint
|
||||||
criticaltext
|
criticaltext
|
||||||
supereffectivetext
|
supereffectivetext
|
||||||
@ -779,7 +779,7 @@ EvasionDownHit:
|
|||||||
checkhit
|
checkhit
|
||||||
effectchance
|
effectchance
|
||||||
hittarget
|
hittarget
|
||||||
resulttext
|
failuretext
|
||||||
checkfaint
|
checkfaint
|
||||||
criticaltext
|
criticaltext
|
||||||
supereffectivetext
|
supereffectivetext
|
||||||
@ -802,7 +802,7 @@ DefenseUpHit:
|
|||||||
checkhit
|
checkhit
|
||||||
effectchance
|
effectchance
|
||||||
hittarget
|
hittarget
|
||||||
resulttext
|
failuretext
|
||||||
checkfaint
|
checkfaint
|
||||||
criticaltext
|
criticaltext
|
||||||
supereffectivetext
|
supereffectivetext
|
||||||
@ -825,7 +825,7 @@ AttackUpHit:
|
|||||||
checkhit
|
checkhit
|
||||||
effectchance
|
effectchance
|
||||||
hittarget
|
hittarget
|
||||||
resulttext
|
failuretext
|
||||||
checkfaint
|
checkfaint
|
||||||
criticaltext
|
criticaltext
|
||||||
supereffectivetext
|
supereffectivetext
|
||||||
@ -848,7 +848,7 @@ AllUpHit:
|
|||||||
checkhit
|
checkhit
|
||||||
effectchance
|
effectchance
|
||||||
hittarget
|
hittarget
|
||||||
resulttext
|
failuretext
|
||||||
checkfaint
|
checkfaint
|
||||||
criticaltext
|
criticaltext
|
||||||
supereffectivetext
|
supereffectivetext
|
||||||
@ -868,7 +868,7 @@ PayDay:
|
|||||||
damagevariation
|
damagevariation
|
||||||
checkhit
|
checkhit
|
||||||
hittarget
|
hittarget
|
||||||
resulttext
|
failuretext
|
||||||
checkfaint
|
checkfaint
|
||||||
criticaltext
|
criticaltext
|
||||||
supereffectivetext
|
supereffectivetext
|
||||||
@ -925,7 +925,7 @@ Rampage:
|
|||||||
damagevariation
|
damagevariation
|
||||||
clearmissdamage
|
clearmissdamage
|
||||||
hittarget
|
hittarget
|
||||||
resulttext
|
failuretext
|
||||||
checkfaint
|
checkfaint
|
||||||
criticaltext
|
criticaltext
|
||||||
supereffectivetext
|
supereffectivetext
|
||||||
@ -967,7 +967,7 @@ MultiHit:
|
|||||||
damagevariation
|
damagevariation
|
||||||
clearmissdamage
|
clearmissdamage
|
||||||
hittargetnosub
|
hittargetnosub
|
||||||
resulttext
|
failuretext
|
||||||
checkfaint
|
checkfaint
|
||||||
criticaltext
|
criticaltext
|
||||||
cleartext
|
cleartext
|
||||||
@ -995,7 +995,7 @@ PoisonMultiHit:
|
|||||||
damagevariation
|
damagevariation
|
||||||
clearmissdamage
|
clearmissdamage
|
||||||
hittargetnosub
|
hittargetnosub
|
||||||
resulttext
|
failuretext
|
||||||
checkfaint
|
checkfaint
|
||||||
criticaltext
|
criticaltext
|
||||||
cleartext
|
cleartext
|
||||||
@ -1027,7 +1027,7 @@ FlinchHit:
|
|||||||
checkhit
|
checkhit
|
||||||
effectchance
|
effectchance
|
||||||
hittarget
|
hittarget
|
||||||
resulttext
|
failuretext
|
||||||
checkfaint
|
checkfaint
|
||||||
criticaltext
|
criticaltext
|
||||||
supereffectivetext
|
supereffectivetext
|
||||||
@ -1046,7 +1046,7 @@ OHKOHit:
|
|||||||
stab
|
stab
|
||||||
ohko
|
ohko
|
||||||
hittarget
|
hittarget
|
||||||
resulttext
|
failuretext
|
||||||
checkfaint
|
checkfaint
|
||||||
criticaltext
|
criticaltext
|
||||||
supereffectivetext
|
supereffectivetext
|
||||||
@ -1069,7 +1069,7 @@ RecoilHit:
|
|||||||
damagevariation
|
damagevariation
|
||||||
checkhit
|
checkhit
|
||||||
hittarget
|
hittarget
|
||||||
resulttext
|
failuretext
|
||||||
checkfaint
|
checkfaint
|
||||||
criticaltext
|
criticaltext
|
||||||
supereffectivetext
|
supereffectivetext
|
||||||
@ -1122,7 +1122,7 @@ ConfuseHit:
|
|||||||
checkhit
|
checkhit
|
||||||
effectchance
|
effectchance
|
||||||
hittarget
|
hittarget
|
||||||
resulttext
|
failuretext
|
||||||
checkfaint
|
checkfaint
|
||||||
criticaltext
|
criticaltext
|
||||||
supereffectivetext
|
supereffectivetext
|
||||||
@ -1169,7 +1169,7 @@ TriAttack:
|
|||||||
damagevariation
|
damagevariation
|
||||||
checkhit
|
checkhit
|
||||||
hittarget
|
hittarget
|
||||||
resulttext
|
failuretext
|
||||||
checkfaint
|
checkfaint
|
||||||
criticaltext
|
criticaltext
|
||||||
supereffectivetext
|
supereffectivetext
|
||||||
@ -1218,7 +1218,7 @@ SkyAttack:
|
|||||||
checkhit
|
checkhit
|
||||||
effectchance
|
effectchance
|
||||||
hittarget
|
hittarget
|
||||||
resulttext
|
failuretext
|
||||||
checkfaint
|
checkfaint
|
||||||
criticaltext
|
criticaltext
|
||||||
supereffectivetext
|
supereffectivetext
|
||||||
@ -1246,7 +1246,7 @@ HyperBeam:
|
|||||||
damagevariation
|
damagevariation
|
||||||
checkhit
|
checkhit
|
||||||
hittarget
|
hittarget
|
||||||
resulttext
|
failuretext
|
||||||
checkfaint
|
checkfaint
|
||||||
criticaltext
|
criticaltext
|
||||||
supereffectivetext
|
supereffectivetext
|
||||||
@ -1267,7 +1267,7 @@ Rage:
|
|||||||
ragedamage
|
ragedamage
|
||||||
damagevariation
|
damagevariation
|
||||||
hittarget
|
hittarget
|
||||||
resulttext
|
failuretext
|
||||||
rage
|
rage
|
||||||
checkfaint
|
checkfaint
|
||||||
criticaltext
|
criticaltext
|
||||||
@ -1328,7 +1328,7 @@ RazorWind:
|
|||||||
damagevariation
|
damagevariation
|
||||||
checkhit
|
checkhit
|
||||||
hittarget
|
hittarget
|
||||||
resulttext
|
failuretext
|
||||||
checkfaint
|
checkfaint
|
||||||
criticaltext
|
criticaltext
|
||||||
supereffectivetext
|
supereffectivetext
|
||||||
@ -1352,7 +1352,7 @@ Dig:
|
|||||||
checkhit
|
checkhit
|
||||||
hittargetnosub
|
hittargetnosub
|
||||||
raisesub
|
raisesub
|
||||||
resulttext
|
failuretext
|
||||||
checkfaint
|
checkfaint
|
||||||
criticaltext
|
criticaltext
|
||||||
supereffectivetext
|
supereffectivetext
|
||||||
@ -1377,7 +1377,7 @@ Whirlpool:
|
|||||||
damagevariation
|
damagevariation
|
||||||
clearmissdamage
|
clearmissdamage
|
||||||
hittarget
|
hittarget
|
||||||
resulttext
|
failuretext
|
||||||
checkfaint
|
checkfaint
|
||||||
criticaltext
|
criticaltext
|
||||||
supereffectivetext
|
supereffectivetext
|
||||||
@ -1400,7 +1400,7 @@ StaticDamage:
|
|||||||
checkhit
|
checkhit
|
||||||
resettypematchup
|
resettypematchup
|
||||||
hittarget
|
hittarget
|
||||||
resulttext
|
failuretext
|
||||||
checkfaint
|
checkfaint
|
||||||
checkdestinybond
|
checkdestinybond
|
||||||
buildopponentrage
|
buildopponentrage
|
||||||
@ -1416,7 +1416,7 @@ Reversal:
|
|||||||
stab
|
stab
|
||||||
checkhit
|
checkhit
|
||||||
hittarget
|
hittarget
|
||||||
resulttext
|
failuretext
|
||||||
checkfaint
|
checkfaint
|
||||||
supereffectivetext
|
supereffectivetext
|
||||||
checkdestinybond
|
checkdestinybond
|
||||||
@ -1430,7 +1430,7 @@ Counter:
|
|||||||
doturn
|
doturn
|
||||||
counter
|
counter
|
||||||
hittarget
|
hittarget
|
||||||
resulttext
|
failuretext
|
||||||
checkfaint
|
checkfaint
|
||||||
checkdestinybond
|
checkdestinybond
|
||||||
buildopponentrage
|
buildopponentrage
|
||||||
@ -1466,7 +1466,7 @@ Snore:
|
|||||||
effectchance
|
effectchance
|
||||||
snore
|
snore
|
||||||
hittarget
|
hittarget
|
||||||
resulttext
|
failuretext
|
||||||
checkfaint
|
checkfaint
|
||||||
criticaltext
|
criticaltext
|
||||||
supereffectivetext
|
supereffectivetext
|
||||||
@ -1541,7 +1541,7 @@ FalseSwipe:
|
|||||||
falseswipe
|
falseswipe
|
||||||
checkhit
|
checkhit
|
||||||
hittarget
|
hittarget
|
||||||
resulttext
|
failuretext
|
||||||
checkfaint
|
checkfaint
|
||||||
criticaltext
|
criticaltext
|
||||||
supereffectivetext
|
supereffectivetext
|
||||||
@ -1572,7 +1572,7 @@ TripleKick:
|
|||||||
damagevariation
|
damagevariation
|
||||||
clearmissdamage
|
clearmissdamage
|
||||||
hittargetnosub
|
hittargetnosub
|
||||||
resulttext
|
failuretext
|
||||||
checkfaint
|
checkfaint
|
||||||
criticaltext
|
criticaltext
|
||||||
cleartext
|
cleartext
|
||||||
@ -1597,7 +1597,7 @@ Thief:
|
|||||||
checkhit
|
checkhit
|
||||||
effectchance
|
effectchance
|
||||||
hittarget
|
hittarget
|
||||||
resulttext
|
failuretext
|
||||||
checkfaint
|
checkfaint
|
||||||
criticaltext
|
criticaltext
|
||||||
supereffectivetext
|
supereffectivetext
|
||||||
@ -1634,7 +1634,7 @@ FlameWheel:
|
|||||||
checkhit
|
checkhit
|
||||||
effectchance
|
effectchance
|
||||||
hittarget
|
hittarget
|
||||||
resulttext
|
failuretext
|
||||||
checkfaint
|
checkfaint
|
||||||
criticaltext
|
criticaltext
|
||||||
supereffectivetext
|
supereffectivetext
|
||||||
@ -1708,7 +1708,7 @@ Rollout:
|
|||||||
rolloutpower
|
rolloutpower
|
||||||
damagevariation
|
damagevariation
|
||||||
hittarget
|
hittarget
|
||||||
resulttext
|
failuretext
|
||||||
checkfaint
|
checkfaint
|
||||||
criticaltext
|
criticaltext
|
||||||
supereffectivetext
|
supereffectivetext
|
||||||
@ -1728,7 +1728,7 @@ Swagger:
|
|||||||
lowersub
|
lowersub
|
||||||
statupanim
|
statupanim
|
||||||
raisesub
|
raisesub
|
||||||
resulttext
|
failuretext
|
||||||
switchturn
|
switchturn
|
||||||
statupmessage
|
statupmessage
|
||||||
switchturn
|
switchturn
|
||||||
@ -1747,7 +1747,7 @@ FuryCutter:
|
|||||||
furycutter
|
furycutter
|
||||||
damagevariation
|
damagevariation
|
||||||
hittarget
|
hittarget
|
||||||
resulttext
|
failuretext
|
||||||
checkfaint
|
checkfaint
|
||||||
criticaltext
|
criticaltext
|
||||||
supereffectivetext
|
supereffectivetext
|
||||||
@ -1776,7 +1776,7 @@ Return:
|
|||||||
damagevariation
|
damagevariation
|
||||||
checkhit
|
checkhit
|
||||||
hittarget
|
hittarget
|
||||||
resulttext
|
failuretext
|
||||||
checkfaint
|
checkfaint
|
||||||
criticaltext
|
criticaltext
|
||||||
supereffectivetext
|
supereffectivetext
|
||||||
@ -1797,7 +1797,7 @@ Present:
|
|||||||
stab
|
stab
|
||||||
damagevariation
|
damagevariation
|
||||||
clearmissdamage
|
clearmissdamage
|
||||||
resulttext
|
failuretext
|
||||||
checkfaint
|
checkfaint
|
||||||
criticaltext
|
criticaltext
|
||||||
supereffectivetext
|
supereffectivetext
|
||||||
@ -1818,7 +1818,7 @@ Frustration:
|
|||||||
damagevariation
|
damagevariation
|
||||||
checkhit
|
checkhit
|
||||||
hittarget
|
hittarget
|
||||||
resulttext
|
failuretext
|
||||||
checkfaint
|
checkfaint
|
||||||
criticaltext
|
criticaltext
|
||||||
supereffectivetext
|
supereffectivetext
|
||||||
@ -1846,7 +1846,7 @@ SacredFire:
|
|||||||
checkhit
|
checkhit
|
||||||
effectchance
|
effectchance
|
||||||
hittarget
|
hittarget
|
||||||
resulttext
|
failuretext
|
||||||
checkfaint
|
checkfaint
|
||||||
criticaltext
|
criticaltext
|
||||||
supereffectivetext
|
supereffectivetext
|
||||||
@ -1869,7 +1869,7 @@ Magnitude:
|
|||||||
checkhit
|
checkhit
|
||||||
doubleundergrounddamage
|
doubleundergrounddamage
|
||||||
hittarget
|
hittarget
|
||||||
resulttext
|
failuretext
|
||||||
checkfaint
|
checkfaint
|
||||||
criticaltext
|
criticaltext
|
||||||
supereffectivetext
|
supereffectivetext
|
||||||
@ -1897,7 +1897,7 @@ Pursuit:
|
|||||||
pursuit
|
pursuit
|
||||||
checkhit
|
checkhit
|
||||||
hittarget
|
hittarget
|
||||||
resulttext
|
failuretext
|
||||||
checkfaint
|
checkfaint
|
||||||
criticaltext
|
criticaltext
|
||||||
supereffectivetext
|
supereffectivetext
|
||||||
@ -1917,7 +1917,7 @@ RapidSpin:
|
|||||||
damagevariation
|
damagevariation
|
||||||
checkhit
|
checkhit
|
||||||
hittarget
|
hittarget
|
||||||
resulttext
|
failuretext
|
||||||
checkfaint
|
checkfaint
|
||||||
criticaltext
|
criticaltext
|
||||||
supereffectivetext
|
supereffectivetext
|
||||||
@ -1959,7 +1959,7 @@ HiddenPower:
|
|||||||
damagevariation
|
damagevariation
|
||||||
checkhit
|
checkhit
|
||||||
hittarget
|
hittarget
|
||||||
resulttext
|
failuretext
|
||||||
checkfaint
|
checkfaint
|
||||||
criticaltext
|
criticaltext
|
||||||
supereffectivetext
|
supereffectivetext
|
||||||
@ -1989,7 +1989,7 @@ FakeOut:
|
|||||||
checkhit
|
checkhit
|
||||||
fakeout
|
fakeout
|
||||||
hittarget
|
hittarget
|
||||||
resulttext
|
failuretext
|
||||||
endmove
|
endmove
|
||||||
|
|
||||||
BellyDrum:
|
BellyDrum:
|
||||||
@ -2012,7 +2012,7 @@ MirrorCoat:
|
|||||||
doturn
|
doturn
|
||||||
mirrorcoat
|
mirrorcoat
|
||||||
hittarget
|
hittarget
|
||||||
resulttext
|
failuretext
|
||||||
checkfaint
|
checkfaint
|
||||||
checkdestinybond
|
checkdestinybond
|
||||||
buildopponentrage
|
buildopponentrage
|
||||||
@ -2032,7 +2032,7 @@ SkullBash:
|
|||||||
damagevariation
|
damagevariation
|
||||||
checkhit
|
checkhit
|
||||||
hittarget
|
hittarget
|
||||||
resulttext
|
failuretext
|
||||||
checkfaint
|
checkfaint
|
||||||
criticaltext
|
criticaltext
|
||||||
supereffectivetext
|
supereffectivetext
|
||||||
@ -2057,7 +2057,7 @@ Twister:
|
|||||||
checkhit
|
checkhit
|
||||||
effectchance
|
effectchance
|
||||||
hittarget
|
hittarget
|
||||||
resulttext
|
failuretext
|
||||||
checkfaint
|
checkfaint
|
||||||
criticaltext
|
criticaltext
|
||||||
supereffectivetext
|
supereffectivetext
|
||||||
@ -2079,7 +2079,7 @@ Earthquake:
|
|||||||
checkhit
|
checkhit
|
||||||
effectchance
|
effectchance
|
||||||
hittarget
|
hittarget
|
||||||
resulttext
|
failuretext
|
||||||
checkfaint
|
checkfaint
|
||||||
criticaltext
|
criticaltext
|
||||||
supereffectivetext
|
supereffectivetext
|
||||||
@ -2098,7 +2098,7 @@ FutureSight:
|
|||||||
damagevariation
|
damagevariation
|
||||||
checkhit
|
checkhit
|
||||||
hittargetnosub
|
hittargetnosub
|
||||||
resulttext
|
failuretext
|
||||||
checkfaint
|
checkfaint
|
||||||
checkdestinybond
|
checkdestinybond
|
||||||
buildopponentrage
|
buildopponentrage
|
||||||
@ -2116,7 +2116,7 @@ Gust:
|
|||||||
doubleflyingdamage
|
doubleflyingdamage
|
||||||
checkhit
|
checkhit
|
||||||
hittarget
|
hittarget
|
||||||
resulttext
|
failuretext
|
||||||
checkfaint
|
checkfaint
|
||||||
criticaltext
|
criticaltext
|
||||||
supereffectivetext
|
supereffectivetext
|
||||||
@ -2137,7 +2137,7 @@ Stomp:
|
|||||||
checkhit
|
checkhit
|
||||||
effectchance
|
effectchance
|
||||||
hittarget
|
hittarget
|
||||||
resulttext
|
failuretext
|
||||||
checkfaint
|
checkfaint
|
||||||
criticaltext
|
criticaltext
|
||||||
supereffectivetext
|
supereffectivetext
|
||||||
@ -2160,7 +2160,7 @@ Solarbeam:
|
|||||||
damagevariation
|
damagevariation
|
||||||
checkhit
|
checkhit
|
||||||
hittarget
|
hittarget
|
||||||
resulttext
|
failuretext
|
||||||
checkfaint
|
checkfaint
|
||||||
criticaltext
|
criticaltext
|
||||||
supereffectivetext
|
supereffectivetext
|
||||||
@ -2182,7 +2182,7 @@ Thunder:
|
|||||||
stab
|
stab
|
||||||
damagevariation
|
damagevariation
|
||||||
hittarget
|
hittarget
|
||||||
resulttext
|
failuretext
|
||||||
checkfaint
|
checkfaint
|
||||||
criticaltext
|
criticaltext
|
||||||
supereffectivetext
|
supereffectivetext
|
||||||
@ -2212,7 +2212,7 @@ BeatUp:
|
|||||||
damagevariation
|
damagevariation
|
||||||
clearmissdamage
|
clearmissdamage
|
||||||
hittargetnosub
|
hittargetnosub
|
||||||
resulttext
|
failuretext
|
||||||
checkfaint
|
checkfaint
|
||||||
criticaltext
|
criticaltext
|
||||||
cleartext
|
cleartext
|
||||||
|
@ -1,26 +1,3 @@
|
|||||||
ANIM_SWEET_SCENT_2 EQU 255 ; unused?
|
|
||||||
ANIM_THROW_POKE_BALL EQU 256
|
|
||||||
ANIM_SEND_OUT_MON EQU 257 ; seems to also cover shiny
|
|
||||||
ANIM_RETURN_MON EQU 258
|
|
||||||
ANIM_CONFUSED EQU 259
|
|
||||||
ANIM_SLP EQU 260
|
|
||||||
ANIM_BRN EQU 261
|
|
||||||
ANIM_PSN EQU 262
|
|
||||||
ANIM_SAP EQU 263
|
|
||||||
ANIM_FRZ EQU 264
|
|
||||||
ANIM_PAR EQU 265
|
|
||||||
ANIM_IN_LOVE EQU 266
|
|
||||||
ANIM_IN_SANDSTORM EQU 267
|
|
||||||
ANIM_IN_NIGHTMARE EQU 268
|
|
||||||
ANIM_IN_WHIRLPOOL EQU 269
|
|
||||||
ANIM_MISS EQU 270
|
|
||||||
ANIM_ENEMY_DAMAGE EQU 271
|
|
||||||
ANIM_ENEMY_STAT_DOWN EQU 272 ; vibrate horizontally
|
|
||||||
ANIM_PLAYER_STAT_DOWN EQU 273 ; wobble horizontally
|
|
||||||
ANIM_PLAYER_DAMAGE EQU 274
|
|
||||||
ANIM_WOBBLE EQU 275
|
|
||||||
ANIM_SHAKE EQU 276
|
|
||||||
ANIM_HIT_CONFUSION EQU 277
|
|
||||||
|
|
||||||
ANIM_OBJ_BURNED EQU $10
|
ANIM_OBJ_BURNED EQU $10
|
||||||
ANIM_OBJ_FROZEN EQU $2a
|
ANIM_OBJ_FROZEN EQU $2a
|
||||||
@ -71,3 +48,53 @@ ANIM_BG_WOBBLE_MON EQU $34
|
|||||||
const ANIM_MON_UNUSED ; 6
|
const ANIM_MON_UNUSED ; 6
|
||||||
const ANIM_MON_EGG1 ; 7
|
const ANIM_MON_EGG1 ; 7
|
||||||
const ANIM_MON_EGG2 ; 8
|
const ANIM_MON_EGG2 ; 8
|
||||||
|
|
||||||
|
const_value SET $d0
|
||||||
|
const BATTLEANIM_D0
|
||||||
|
const BATTLEANIM_D1
|
||||||
|
const BATTLEANIM_D2
|
||||||
|
const BATTLEANIM_D3
|
||||||
|
const BATTLEANIM_D4
|
||||||
|
const BATTLEANIM_D5
|
||||||
|
const BATTLEANIM_D6
|
||||||
|
const BATTLEANIM_D7
|
||||||
|
const BATTLEANIM_D8
|
||||||
|
const BATTLEANIM_D9
|
||||||
|
const BATTLEANIM_DA
|
||||||
|
const BATTLEANIM_DB
|
||||||
|
const BATTLEANIM_DC
|
||||||
|
const BATTLEANIM_DD
|
||||||
|
const BATTLEANIM_DE
|
||||||
|
const BATTLEANIM_DF
|
||||||
|
const BATTLEANIM_E0
|
||||||
|
const BATTLEANIM_E1
|
||||||
|
const BATTLEANIM_E2
|
||||||
|
const BATTLEANIM_E3
|
||||||
|
const BATTLEANIM_E4
|
||||||
|
const BATTLEANIM_E5
|
||||||
|
const BATTLEANIM_E6
|
||||||
|
const BATTLEANIM_E7
|
||||||
|
const BATTLEANIM_E8
|
||||||
|
const BATTLEANIM_E9
|
||||||
|
const BATTLEANIM_EA
|
||||||
|
const BATTLEANIM_EB
|
||||||
|
const BATTLEANIM_EC
|
||||||
|
const BATTLEANIM_ED
|
||||||
|
const BATTLEANIM_EE
|
||||||
|
const BATTLEANIM_EF
|
||||||
|
const BATTLEANIM_F0
|
||||||
|
const BATTLEANIM_F1
|
||||||
|
const BATTLEANIM_F2
|
||||||
|
const BATTLEANIM_F3
|
||||||
|
const BATTLEANIM_F4
|
||||||
|
const BATTLEANIM_F5
|
||||||
|
const BATTLEANIM_F6
|
||||||
|
const BATTLEANIM_F7
|
||||||
|
const BATTLEANIM_F8
|
||||||
|
const BATTLEANIM_F9
|
||||||
|
const BATTLEANIM_FA
|
||||||
|
const BATTLEANIM_FB
|
||||||
|
const BATTLEANIM_FC
|
||||||
|
const BATTLEANIM_FD
|
||||||
|
const BATTLEANIM_FE
|
||||||
|
const BATTLEANIM_FF
|
||||||
|
@ -256,3 +256,44 @@
|
|||||||
const_value SET const_value + -1
|
const_value SET const_value + -1
|
||||||
|
|
||||||
const NUM_ATTACKS ; $fb
|
const NUM_ATTACKS ; $fb
|
||||||
|
|
||||||
|
; Battle animations use the same constants
|
||||||
|
; as the moves up to this point.
|
||||||
|
const ANIM_FC ; $fc
|
||||||
|
const ANIM_FD ; $fd
|
||||||
|
const ANIM_FE ; $fe
|
||||||
|
const ANIM_SWEET_SCENT_2 ; $ff
|
||||||
|
const ANIM_THROW_POKE_BALL ; $100
|
||||||
|
const ANIM_SEND_OUT_MON ; $101
|
||||||
|
const ANIM_RETURN_MON ; $102
|
||||||
|
const ANIM_CONFUSED ; $103
|
||||||
|
const ANIM_SLP ; $104
|
||||||
|
const ANIM_BRN ; $105
|
||||||
|
const ANIM_PSN ; $106
|
||||||
|
const ANIM_SAP ; $107
|
||||||
|
const ANIM_FRZ ; $108
|
||||||
|
const ANIM_PAR ; $109
|
||||||
|
const ANIM_IN_LOVE ; $10a
|
||||||
|
const ANIM_IN_SANDSTORM ; $10b
|
||||||
|
const ANIM_IN_NIGHTMARE ; $10c
|
||||||
|
const ANIM_IN_WHIRLPOOL ; $10d
|
||||||
|
; battle anims
|
||||||
|
const ANIM_MISS ; $10e
|
||||||
|
const ANIM_ENEMY_DAMAGE ; $10f
|
||||||
|
const ANIM_ENEMY_STAT_DOWN ; $110
|
||||||
|
const ANIM_PLAYER_STAT_DOWN ; $111
|
||||||
|
const ANIM_PLAYER_DAMAGE ; $112
|
||||||
|
const ANIM_WOBBLE ; $113
|
||||||
|
const ANIM_SHAKE ; $114
|
||||||
|
const ANIM_HIT_CONFUSION ; $115
|
||||||
|
|
||||||
|
; wcfca uses offsets from ANIM_MISS
|
||||||
|
const_def
|
||||||
|
const BATTLEANIM_NONE
|
||||||
|
const BATTLEANIM_ENEMY_DAMAGE
|
||||||
|
const BATTLEANIM_ENEMY_STAT_DOWN
|
||||||
|
const BATTLEANIM_PLAYER_STAT_DOWN
|
||||||
|
const BATTLEANIM_PLAYER_DAMAGE
|
||||||
|
const BATTLEANIM_WOBBLE
|
||||||
|
const BATTLEANIM_SHAKE
|
||||||
|
const BATTLEANIM_HIT_CONFUSION
|
@ -366,7 +366,7 @@ ParseCredits: ; 1099aa
|
|||||||
; First, let's clear the current text display,
|
; First, let's clear the current text display,
|
||||||
; starting from line 5.
|
; starting from line 5.
|
||||||
xor a
|
xor a
|
||||||
ld [$ffd4], a
|
ld [hBGMapMode], a
|
||||||
hlcoord 0, 5
|
hlcoord 0, 5
|
||||||
ld bc, 20 * 12
|
ld bc, 20 * 12
|
||||||
ld a, " "
|
ld a, " "
|
||||||
@ -479,9 +479,9 @@ endr
|
|||||||
ld [CreditsTimer], a
|
ld [CreditsTimer], a
|
||||||
|
|
||||||
xor a
|
xor a
|
||||||
ld [$ffd5], a
|
ld [hBGMapThird], a
|
||||||
ld a, 1
|
ld a, 1
|
||||||
ld [$ffd4], a
|
ld [hBGMapMode], a
|
||||||
|
|
||||||
.done
|
.done
|
||||||
jp Function109951
|
jp Function109951
|
||||||
|
@ -440,14 +440,14 @@ Script_closetext: ; 0x96ed9
|
|||||||
Script_keeptextopen: ; 0x96edc
|
Script_keeptextopen: ; 0x96edc
|
||||||
; script command 0x55
|
; script command 0x55
|
||||||
|
|
||||||
ld a, [$ffd8]
|
ld a, [hOAMUpdate]
|
||||||
push af
|
push af
|
||||||
ld a, $1
|
ld a, $1
|
||||||
ld [$ffd8], a
|
ld [hOAMUpdate], a
|
||||||
call WaitBGMap
|
call WaitBGMap
|
||||||
call KeepTextOpen
|
call KeepTextOpen
|
||||||
pop af
|
pop af
|
||||||
ld [$ffd8], a
|
ld [hOAMUpdate], a
|
||||||
ret
|
ret
|
||||||
; 0x96eed
|
; 0x96eed
|
||||||
|
|
||||||
|
53
home.asm
53
home.asm
@ -1724,7 +1724,7 @@ Function378b:: ; 378b
|
|||||||
predef GetFrontpic
|
predef GetFrontpic
|
||||||
pop hl
|
pop hl
|
||||||
xor a
|
xor a
|
||||||
ld [$ffad], a
|
ld [hFillBox], a
|
||||||
lb bc, 7, 7
|
lb bc, 7, 7
|
||||||
predef FillBox
|
predef FillBox
|
||||||
xor a
|
xor a
|
||||||
@ -1991,57 +1991,6 @@ Function392d:: ; 392d
|
|||||||
|
|
||||||
INCLUDE "home/battle.asm"
|
INCLUDE "home/battle.asm"
|
||||||
|
|
||||||
|
|
||||||
Function3ae1:: ; 3ae1
|
|
||||||
|
|
||||||
GLOBAL BattleAnimations
|
|
||||||
GLOBAL BattleAnimCommands
|
|
||||||
|
|
||||||
ld a, BANK(BattleAnimations)
|
|
||||||
rst Bankswitch
|
|
||||||
|
|
||||||
ld a, [hli]
|
|
||||||
ld [BattleAnimAddress], a
|
|
||||||
ld a, [hl]
|
|
||||||
ld [BattleAnimAddress + 1], a
|
|
||||||
|
|
||||||
ld a, BANK(BattleAnimCommands)
|
|
||||||
rst Bankswitch
|
|
||||||
|
|
||||||
ret
|
|
||||||
; 3af0
|
|
||||||
|
|
||||||
GetBattleAnimByte:: ; 3af0
|
|
||||||
|
|
||||||
push hl
|
|
||||||
push de
|
|
||||||
|
|
||||||
ld hl, BattleAnimAddress
|
|
||||||
ld e, [hl]
|
|
||||||
inc hl
|
|
||||||
ld d, [hl]
|
|
||||||
|
|
||||||
ld a, BANK(BattleAnimations)
|
|
||||||
rst Bankswitch
|
|
||||||
|
|
||||||
ld a, [de]
|
|
||||||
ld [BattleAnimByte], a
|
|
||||||
inc de
|
|
||||||
|
|
||||||
ld a, BANK(BattleAnimCommands)
|
|
||||||
rst Bankswitch
|
|
||||||
|
|
||||||
ld [hl], d
|
|
||||||
dec hl
|
|
||||||
ld [hl], e
|
|
||||||
|
|
||||||
pop de
|
|
||||||
pop hl
|
|
||||||
|
|
||||||
ld a, [BattleAnimByte]
|
|
||||||
ret
|
|
||||||
; 3b0c
|
|
||||||
|
|
||||||
Function3b0c:: ; 3b0c
|
Function3b0c:: ; 3b0c
|
||||||
|
|
||||||
ld a, [hLCDStatCustom]
|
ld a, [hLCDStatCustom]
|
||||||
|
@ -309,3 +309,53 @@ GLOBAL BattleText
|
|||||||
rst Bankswitch
|
rst Bankswitch
|
||||||
ret
|
ret
|
||||||
; 3ae1
|
; 3ae1
|
||||||
|
|
||||||
|
GetBattleAnimPointer:: ; 3ae1
|
||||||
|
|
||||||
|
GLOBAL BattleAnimations
|
||||||
|
GLOBAL BattleAnimCommands
|
||||||
|
|
||||||
|
ld a, BANK(BattleAnimations)
|
||||||
|
rst Bankswitch
|
||||||
|
|
||||||
|
ld a, [hli]
|
||||||
|
ld [BattleAnimAddress], a
|
||||||
|
ld a, [hl]
|
||||||
|
ld [BattleAnimAddress + 1], a
|
||||||
|
|
||||||
|
ld a, BANK(BattleAnimCommands)
|
||||||
|
rst Bankswitch
|
||||||
|
|
||||||
|
ret
|
||||||
|
; 3af0
|
||||||
|
|
||||||
|
GetBattleAnimByte:: ; 3af0
|
||||||
|
|
||||||
|
push hl
|
||||||
|
push de
|
||||||
|
|
||||||
|
ld hl, BattleAnimAddress
|
||||||
|
ld e, [hl]
|
||||||
|
inc hl
|
||||||
|
ld d, [hl]
|
||||||
|
|
||||||
|
ld a, BANK(BattleAnimations)
|
||||||
|
rst Bankswitch
|
||||||
|
|
||||||
|
ld a, [de]
|
||||||
|
ld [BattleAnimByte], a
|
||||||
|
inc de
|
||||||
|
|
||||||
|
ld a, BANK(BattleAnimCommands)
|
||||||
|
rst Bankswitch
|
||||||
|
|
||||||
|
ld [hl], d
|
||||||
|
dec hl
|
||||||
|
ld [hl], e
|
||||||
|
|
||||||
|
pop de
|
||||||
|
pop hl
|
||||||
|
|
||||||
|
ld a, [BattleAnimByte]
|
||||||
|
ret
|
||||||
|
; 3b0c
|
||||||
|
10
home/map.asm
10
home/map.asm
@ -124,9 +124,10 @@ LoadMapPart:: ; 217a
|
|||||||
; 2198
|
; 2198
|
||||||
|
|
||||||
LoadMetatiles:: ; 2198
|
LoadMetatiles:: ; 2198
|
||||||
|
; de <- wd194
|
||||||
ld a, [wd194]
|
ld a, [wd194]
|
||||||
ld e, a
|
ld e, a
|
||||||
ld a, [wd195]
|
ld a, [wd194 + 1]
|
||||||
ld d, a
|
ld d, a
|
||||||
ld hl, wMisc
|
ld hl, wMisc
|
||||||
ld b, 5 ; SCREEN_WIDTH / 4
|
ld b, 5 ; SCREEN_WIDTH / 4
|
||||||
@ -163,20 +164,21 @@ endr
|
|||||||
ld h, a
|
ld h, a
|
||||||
|
|
||||||
rept 3
|
rept 3
|
||||||
|
; copy 4 bytes from hl to de
|
||||||
rept 4
|
rept 4
|
||||||
ld a, [hli]
|
ld a, [hli]
|
||||||
ld [de], a
|
ld [de], a
|
||||||
inc de
|
inc de
|
||||||
endr
|
endr
|
||||||
|
; next row
|
||||||
ld a, e
|
ld a, e
|
||||||
add 5 * 4
|
add SCREEN_WIDTH
|
||||||
ld e, a
|
ld e, a
|
||||||
jr nc, .next\@
|
jr nc, .next\@
|
||||||
inc d
|
inc d
|
||||||
.next\@
|
.next\@
|
||||||
endr
|
endr
|
||||||
|
; copy 4 more bytes from hl to de
|
||||||
rept 4
|
rept 4
|
||||||
ld a, [hli]
|
ld a, [hli]
|
||||||
ld [de], a
|
ld [de], a
|
||||||
|
@ -79,7 +79,7 @@ DmgToCgbBGPals:: ; c9f
|
|||||||
ld [rBGP], a
|
ld [rBGP], a
|
||||||
push af
|
push af
|
||||||
|
|
||||||
; Don't need to be here if CGB
|
; Don't need to be here if DMG
|
||||||
ld a, [hCGB]
|
ld a, [hCGB]
|
||||||
and a
|
and a
|
||||||
jr z, .end
|
jr z, .end
|
||||||
|
2
hram.asm
2
hram.asm
@ -32,6 +32,8 @@ hJoyDown EQU $ffa8
|
|||||||
hJoyLast EQU $ffa9
|
hJoyLast EQU $ffa9
|
||||||
hInMenu EQU $ffaa
|
hInMenu EQU $ffaa
|
||||||
|
|
||||||
|
hFillBox EQU $ffad
|
||||||
|
|
||||||
hMapObjectIndexBuffer EQU $ffaf
|
hMapObjectIndexBuffer EQU $ffaf
|
||||||
hObjectStructIndexBuffer EQU $ffb0
|
hObjectStructIndexBuffer EQU $ffb0
|
||||||
|
|
||||||
|
@ -225,7 +225,7 @@ ParkBall: ; e8a2
|
|||||||
|
|
||||||
.room_in_party
|
.room_in_party
|
||||||
xor a
|
xor a
|
||||||
ld [wCaughtMon], a
|
ld [wWildMon], a
|
||||||
ld a, [CurItem]
|
ld a, [CurItem]
|
||||||
cp PARK_BALL
|
cp PARK_BALL
|
||||||
call nz, Functionedfa
|
call nz, Functionedfa
|
||||||
@ -394,7 +394,7 @@ endr
|
|||||||
ld a, [EnemyMonSpecies]
|
ld a, [EnemyMonSpecies]
|
||||||
|
|
||||||
.fail_to_catch
|
.fail_to_catch
|
||||||
ld [wCaughtMon], a
|
ld [wWildMon], a
|
||||||
ld c, 20
|
ld c, 20
|
||||||
call DelayFrames
|
call DelayFrames
|
||||||
|
|
||||||
@ -416,7 +416,7 @@ endr
|
|||||||
ld [wcfca], a
|
ld [wcfca], a
|
||||||
predef PlayBattleAnim
|
predef PlayBattleAnim
|
||||||
|
|
||||||
ld a, [wCaughtMon]
|
ld a, [wWildMon]
|
||||||
and a
|
and a
|
||||||
jr nz, .caught
|
jr nz, .caught
|
||||||
ld a, [Buffer2]
|
ld a, [Buffer2]
|
||||||
@ -493,19 +493,19 @@ endr
|
|||||||
ld hl, EnemySubStatus5
|
ld hl, EnemySubStatus5
|
||||||
bit SUBSTATUS_TRANSFORMED, [hl]
|
bit SUBSTATUS_TRANSFORMED, [hl]
|
||||||
jr nz, .Transformed
|
jr nz, .Transformed
|
||||||
ld hl, wCaughtMonMoves
|
ld hl, wWildMonMoves
|
||||||
ld de, EnemyMonMoves
|
ld de, EnemyMonMoves
|
||||||
ld bc, NUM_MOVES
|
ld bc, NUM_MOVES
|
||||||
call CopyBytes
|
call CopyBytes
|
||||||
|
|
||||||
ld hl, wCaughtMonPP
|
ld hl, wWildMonPP
|
||||||
ld de, EnemyMonPP
|
ld de, EnemyMonPP
|
||||||
ld bc, NUM_MOVES
|
ld bc, NUM_MOVES
|
||||||
call CopyBytes
|
call CopyBytes
|
||||||
.Transformed
|
.Transformed
|
||||||
|
|
||||||
ld a, [EnemyMonSpecies]
|
ld a, [EnemyMonSpecies]
|
||||||
ld [wCaughtMon], a
|
ld [wWildMon], a
|
||||||
ld [CurPartySpecies], a
|
ld [CurPartySpecies], a
|
||||||
ld [wd265], a
|
ld [wd265], a
|
||||||
ld a, [BattleType]
|
ld a, [BattleType]
|
||||||
@ -710,7 +710,7 @@ endr
|
|||||||
cp BATTLETYPE_CONTEST
|
cp BATTLETYPE_CONTEST
|
||||||
jr z, .used_park_ball
|
jr z, .used_park_ball
|
||||||
|
|
||||||
ld a, [wCaughtMon]
|
ld a, [wWildMon]
|
||||||
and a
|
and a
|
||||||
jr z, .toss
|
jr z, .toss
|
||||||
|
|
||||||
|
@ -17,7 +17,7 @@ endm
|
|||||||
command lowersub
|
command lowersub
|
||||||
command hittargetnosub
|
command hittargetnosub
|
||||||
command raisesub
|
command raisesub
|
||||||
command resulttext
|
command failuretext
|
||||||
command checkfaint
|
command checkfaint
|
||||||
command criticaltext
|
command criticaltext
|
||||||
command supereffectivetext
|
command supereffectivetext
|
||||||
|
182
main.asm
182
main.asm
@ -1001,7 +1001,7 @@ Function619c: ; 619c
|
|||||||
ld de, VTiles2
|
ld de, VTiles2
|
||||||
callba GetTrainerPic
|
callba GetTrainerPic
|
||||||
xor a
|
xor a
|
||||||
ld [$ffad], a
|
ld [hFillBox], a
|
||||||
hlcoord 6, 4
|
hlcoord 6, 4
|
||||||
lb bc, 7, 7
|
lb bc, 7, 7
|
||||||
predef FillBox
|
predef FillBox
|
||||||
@ -1013,7 +1013,7 @@ ShrinkFrame: ; 61b4
|
|||||||
ld c, $31
|
ld c, $31
|
||||||
predef DecompressPredef
|
predef DecompressPredef
|
||||||
xor a
|
xor a
|
||||||
ld [$ffad], a
|
ld [hFillBox], a
|
||||||
hlcoord 6, 4
|
hlcoord 6, 4
|
||||||
lb bc, 7, 7
|
lb bc, 7, 7
|
||||||
predef FillBox
|
predef FillBox
|
||||||
@ -7487,11 +7487,11 @@ Functiond5fe: ; d5fe (3:55fe)
|
|||||||
cp $2
|
cp $2
|
||||||
jr nz, .asm_d61c
|
jr nz, .asm_d61c
|
||||||
ld [hl], $0
|
ld [hl], $0
|
||||||
call Functiond61d
|
call .Incrementwd194
|
||||||
.asm_d61c
|
.asm_d61c
|
||||||
ret
|
ret
|
||||||
|
|
||||||
Functiond61d: ; d61d (3:561d)
|
.Incrementwd194: ; d61d (3:561d)
|
||||||
ld hl, wd194
|
ld hl, wd194
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
add $1
|
add $1
|
||||||
@ -7757,14 +7757,14 @@ Functiond784: ; d784
|
|||||||
and a
|
and a
|
||||||
ret z
|
ret z
|
||||||
cp $1
|
cp $1
|
||||||
jr z, .asm_d792
|
jr z, .load_15
|
||||||
ld de, $16
|
ld de, $16
|
||||||
jr .asm_d795
|
jr .loaded_de
|
||||||
|
|
||||||
.asm_d792
|
.load_15
|
||||||
ld de, $15
|
ld de, $15
|
||||||
|
|
||||||
.asm_d795
|
.loaded_de
|
||||||
push hl
|
push hl
|
||||||
add hl, de
|
add hl, de
|
||||||
ld a, " "
|
ld a, " "
|
||||||
@ -7799,39 +7799,39 @@ Functiond7b4: ; d7b4
|
|||||||
Functiond7c9: ; d7c9
|
Functiond7c9: ; d7c9
|
||||||
ld a, [hCGB]
|
ld a, [hCGB]
|
||||||
and a
|
and a
|
||||||
jr nz, .asm_d7d5
|
jr nz, .cgb
|
||||||
call DelayFrame
|
call DelayFrame
|
||||||
call DelayFrame
|
call DelayFrame
|
||||||
ret
|
ret
|
||||||
|
|
||||||
.asm_d7d5
|
.cgb
|
||||||
ld a, [wd10a]
|
ld a, [wd10a]
|
||||||
and a
|
and a
|
||||||
jr z, .asm_d829
|
jr z, .load_0
|
||||||
cp $1
|
cp $1
|
||||||
jr z, .asm_d82d
|
jr z, .load_1
|
||||||
ld a, [CurPartyMon]
|
ld a, [CurPartyMon]
|
||||||
cp $3
|
cp $3
|
||||||
jr nc, .asm_d7ea
|
jr nc, .c_is_1
|
||||||
ld c, $0
|
ld c, $0
|
||||||
jr .asm_d7ec
|
jr .c_is_0
|
||||||
|
|
||||||
.asm_d7ea
|
.c_is_1
|
||||||
ld c, $1
|
ld c, $1
|
||||||
|
|
||||||
.asm_d7ec
|
.c_is_0
|
||||||
push af
|
push af
|
||||||
cp $2
|
cp $2
|
||||||
jr z, .asm_d7ff
|
jr z, .skip_delay
|
||||||
cp $5
|
cp $5
|
||||||
jr z, .asm_d7ff
|
jr z, .skip_delay
|
||||||
ld a, $2
|
ld a, $2
|
||||||
ld [hBGMapMode], a
|
ld [hBGMapMode], a
|
||||||
ld a, c
|
ld a, c
|
||||||
ld [hBGMapThird], a
|
ld [hBGMapThird], a
|
||||||
call DelayFrame
|
call DelayFrame
|
||||||
|
|
||||||
.asm_d7ff
|
.skip_delay
|
||||||
ld a, $1
|
ld a, $1
|
||||||
ld [hBGMapMode], a
|
ld [hBGMapMode], a
|
||||||
ld a, c
|
ld a, c
|
||||||
@ -7839,12 +7839,12 @@ Functiond7c9: ; d7c9
|
|||||||
call DelayFrame
|
call DelayFrame
|
||||||
pop af
|
pop af
|
||||||
cp $2
|
cp $2
|
||||||
jr z, .asm_d813
|
jr z, .two_frames
|
||||||
cp $5
|
cp $5
|
||||||
jr z, .asm_d813
|
jr z, .two_frames
|
||||||
ret
|
ret
|
||||||
|
|
||||||
.asm_d813
|
.two_frames
|
||||||
inc c
|
inc c
|
||||||
ld a, $2
|
ld a, $2
|
||||||
ld [hBGMapMode], a
|
ld [hBGMapMode], a
|
||||||
@ -7858,14 +7858,14 @@ Functiond7c9: ; d7c9
|
|||||||
call DelayFrame
|
call DelayFrame
|
||||||
ret
|
ret
|
||||||
|
|
||||||
.asm_d829
|
.load_0
|
||||||
ld c, $0
|
ld c, $0
|
||||||
jr .asm_d82f
|
jr .finish
|
||||||
|
|
||||||
.asm_d82d
|
.load_1
|
||||||
ld c, $1
|
ld c, $1
|
||||||
|
|
||||||
.asm_d82f
|
.finish
|
||||||
call DelayFrame
|
call DelayFrame
|
||||||
ld a, c
|
ld a, c
|
||||||
ld [hBGMapThird], a
|
ld [hBGMapThird], a
|
||||||
@ -7880,23 +7880,23 @@ Functiond839: ; d839
|
|||||||
ld hl, 0
|
ld hl, 0
|
||||||
ld a, [wd1f1]
|
ld a, [wd1f1]
|
||||||
cp $30
|
cp $30
|
||||||
jr nc, .asm_d885
|
jr nc, .coppy_buffer
|
||||||
and a
|
and a
|
||||||
jr z, .asm_d880
|
jr z, .return_zero
|
||||||
call AddNTimes
|
call AddNTimes
|
||||||
ld b, $0
|
ld b, $0
|
||||||
.asm_d851
|
.loop
|
||||||
ld a, l
|
ld a, l
|
||||||
sub $30
|
sub $30
|
||||||
ld l, a
|
ld l, a
|
||||||
ld a, h
|
ld a, h
|
||||||
sbc $0
|
sbc $0
|
||||||
ld h, a
|
ld h, a
|
||||||
jr c, .asm_d85e
|
jr c, .done
|
||||||
inc b
|
inc b
|
||||||
jr .asm_d851
|
jr .loop
|
||||||
|
|
||||||
.asm_d85e
|
.done
|
||||||
push bc
|
push bc
|
||||||
ld bc, $80
|
ld bc, $80
|
||||||
add hl, bc
|
add hl, bc
|
||||||
@ -7907,28 +7907,28 @@ Functiond839: ; d839
|
|||||||
ld a, h
|
ld a, h
|
||||||
sbc $0
|
sbc $0
|
||||||
ld h, a
|
ld h, a
|
||||||
jr c, .asm_d86f
|
jr c, .no_carry
|
||||||
inc b
|
inc b
|
||||||
|
|
||||||
.asm_d86f
|
.no_carry
|
||||||
ld a, [wd1f5]
|
ld a, [wd1f5]
|
||||||
cp b
|
cp b
|
||||||
jr nc, .asm_d87c
|
jr nc, .finish
|
||||||
ld a, [wd1f6]
|
ld a, [wd1f6]
|
||||||
cp b
|
cp b
|
||||||
jr c, .asm_d87c
|
jr c, .finish
|
||||||
ld a, b
|
ld a, b
|
||||||
|
|
||||||
.asm_d87c
|
.finish
|
||||||
ld [wd1ec], a
|
ld [wd1ec], a
|
||||||
ret
|
ret
|
||||||
|
|
||||||
.asm_d880
|
.return_zero
|
||||||
xor a
|
xor a
|
||||||
ld [wd1ec], a
|
ld [wd1ec], a
|
||||||
ret
|
ret
|
||||||
|
|
||||||
.asm_d885
|
.coppy_buffer
|
||||||
ld a, [Buffer1]
|
ld a, [Buffer1]
|
||||||
ld [wd1ec], a
|
ld [wd1ec], a
|
||||||
ret
|
ret
|
||||||
@ -8262,10 +8262,10 @@ endr
|
|||||||
FillPP: ; da6d
|
FillPP: ; da6d
|
||||||
push bc
|
push bc
|
||||||
ld b, NUM_MOVES
|
ld b, NUM_MOVES
|
||||||
.asm_da70
|
.loop
|
||||||
ld a, [hli]
|
ld a, [hli]
|
||||||
and a
|
and a
|
||||||
jr z, .asm_da8f
|
jr z, .next
|
||||||
dec a
|
dec a
|
||||||
push hl
|
push hl
|
||||||
push de
|
push de
|
||||||
@ -8281,11 +8281,11 @@ FillPP: ; da6d
|
|||||||
pop hl
|
pop hl
|
||||||
ld a, [StringBuffer1 + MOVE_PP]
|
ld a, [StringBuffer1 + MOVE_PP]
|
||||||
|
|
||||||
.asm_da8f
|
.next
|
||||||
ld [de], a
|
ld [de], a
|
||||||
inc de
|
inc de
|
||||||
dec b
|
dec b
|
||||||
jr nz, .asm_da70
|
jr nz, .loop
|
||||||
pop bc
|
pop bc
|
||||||
ret
|
ret
|
||||||
; da96
|
; da96
|
||||||
@ -8396,13 +8396,13 @@ SentGetPkmnIntoFromBox: ; db3f
|
|||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
cp MONS_PER_BOX
|
cp MONS_PER_BOX
|
||||||
jr nz, .there_is_room
|
jr nz, .there_is_room
|
||||||
jp CloseSRAM_And_SetCFlag
|
jp CloseSRAM_And_SetCarryFlag
|
||||||
|
|
||||||
.check_IfPartyIsFull
|
.check_IfPartyIsFull
|
||||||
ld hl, PartyCount
|
ld hl, PartyCount
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
cp PARTY_LENGTH
|
cp PARTY_LENGTH
|
||||||
jp z, CloseSRAM_And_SetCFlag
|
jp z, CloseSRAM_And_SetCarryFlag
|
||||||
|
|
||||||
.there_is_room
|
.there_is_room
|
||||||
inc a
|
inc a
|
||||||
@ -8529,7 +8529,7 @@ SentGetPkmnIntoFromBox: ; db3f
|
|||||||
cp PC_DEPOSIT
|
cp PC_DEPOSIT
|
||||||
jr z, .took_out_of_box
|
jr z, .took_out_of_box
|
||||||
cp DAYCARE_DEPOSIT
|
cp DAYCARE_DEPOSIT
|
||||||
jp z, .CloseSRAM_And_ClearCFlag
|
jp z, .CloseSRAM_And_ClearCarryFlag
|
||||||
|
|
||||||
push hl
|
push hl
|
||||||
srl a
|
srl a
|
||||||
@ -8560,7 +8560,7 @@ SentGetPkmnIntoFromBox: ; db3f
|
|||||||
|
|
||||||
ld a, [wPokemonWithdrawDepositParameter]
|
ld a, [wPokemonWithdrawDepositParameter]
|
||||||
and a
|
and a
|
||||||
jr nz, .CloseSRAM_And_ClearCFlag
|
jr nz, .CloseSRAM_And_ClearCarryFlag
|
||||||
ld hl, MON_STATUS
|
ld hl, MON_STATUS
|
||||||
add hl, bc
|
add hl, bc
|
||||||
xor a
|
xor a
|
||||||
@ -8580,14 +8580,14 @@ endr
|
|||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
inc de
|
inc de
|
||||||
ld [de], a
|
ld [de], a
|
||||||
jr .CloseSRAM_And_ClearCFlag
|
jr .CloseSRAM_And_ClearCarryFlag
|
||||||
|
|
||||||
.egg
|
.egg
|
||||||
xor a
|
xor a
|
||||||
ld [de], a
|
ld [de], a
|
||||||
inc de
|
inc de
|
||||||
ld [de], a
|
ld [de], a
|
||||||
jr .CloseSRAM_And_ClearCFlag
|
jr .CloseSRAM_And_ClearCarryFlag
|
||||||
|
|
||||||
.took_out_of_box
|
.took_out_of_box
|
||||||
ld a, [sBoxCount]
|
ld a, [sBoxCount]
|
||||||
@ -8595,13 +8595,13 @@ endr
|
|||||||
ld b, a
|
ld b, a
|
||||||
call Functiondcb6
|
call Functiondcb6
|
||||||
|
|
||||||
.CloseSRAM_And_ClearCFlag
|
.CloseSRAM_And_ClearCarryFlag
|
||||||
call CloseSRAM
|
call CloseSRAM
|
||||||
and a
|
and a
|
||||||
ret
|
ret
|
||||||
; dcb1
|
; dcb1
|
||||||
|
|
||||||
CloseSRAM_And_SetCFlag: ; dcb1
|
CloseSRAM_And_SetCarryFlag: ; dcb1
|
||||||
call CloseSRAM
|
call CloseSRAM
|
||||||
scf
|
scf
|
||||||
ret
|
ret
|
||||||
@ -19131,7 +19131,7 @@ Function16cc8: ; 16cc8
|
|||||||
call Function16cff
|
call Function16cff
|
||||||
hlcoord 1, 6
|
hlcoord 1, 6
|
||||||
xor a
|
xor a
|
||||||
ld [$ffad], a
|
ld [hFillBox], a
|
||||||
lb bc, 7, 7
|
lb bc, 7, 7
|
||||||
predef FillBox
|
predef FillBox
|
||||||
ld de, VTiles2 tile $31
|
ld de, VTiles2 tile $31
|
||||||
@ -19213,7 +19213,7 @@ Function16dac: ; 16dac
|
|||||||
call ByteFill
|
call ByteFill
|
||||||
hlcoord 7, 11
|
hlcoord 7, 11
|
||||||
ld a, $31
|
ld a, $31
|
||||||
ld [$ffad], a
|
ld [hFillBox], a
|
||||||
lb bc, 7, 7
|
lb bc, 7, 7
|
||||||
predef FillBox
|
predef FillBox
|
||||||
ret
|
ret
|
||||||
@ -19950,7 +19950,7 @@ Function17254: ; 17254 (5:7254)
|
|||||||
ld a, b
|
ld a, b
|
||||||
ld [hBGMapAddress + 1], a
|
ld [hBGMapAddress + 1], a
|
||||||
ld a, c
|
ld a, c
|
||||||
ld [$ffad], a
|
ld [hFillBox], a
|
||||||
lb bc, 7, 7
|
lb bc, 7, 7
|
||||||
predef FillBox
|
predef FillBox
|
||||||
pop af
|
pop af
|
||||||
@ -20832,7 +20832,7 @@ Pokepic:: ; 244e3
|
|||||||
ld c, a
|
ld c, a
|
||||||
call GetTileCoord
|
call GetTileCoord
|
||||||
ld a, $80
|
ld a, $80
|
||||||
ld [$ffad], a
|
ld [hFillBox], a
|
||||||
lb bc, 7, 7
|
lb bc, 7, 7
|
||||||
predef FillBox
|
predef FillBox
|
||||||
call WaitBGMap
|
call WaitBGMap
|
||||||
@ -22991,7 +22991,7 @@ Function25299: ; 25299 (9:5299)
|
|||||||
hlcoord 14, 1
|
hlcoord 14, 1
|
||||||
lb bc, 5, 7
|
lb bc, 5, 7
|
||||||
xor a
|
xor a
|
||||||
ld [$ffad], a
|
ld [hFillBox], a
|
||||||
predef FillBox
|
predef FillBox
|
||||||
ret
|
ret
|
||||||
; 252ec (9:52ec)
|
; 252ec (9:52ec)
|
||||||
@ -28076,7 +28076,7 @@ Function294c3: ; 294c3
|
|||||||
call Function297cf
|
call Function297cf
|
||||||
hlcoord 7, 2
|
hlcoord 7, 2
|
||||||
xor a
|
xor a
|
||||||
ld [$ffad], a
|
ld [hFillBox], a
|
||||||
lb bc, 7, 7
|
lb bc, 7, 7
|
||||||
predef FillBox
|
predef FillBox
|
||||||
call WaitBGMap
|
call WaitBGMap
|
||||||
@ -32294,7 +32294,7 @@ endr
|
|||||||
|
|
||||||
FillBox: ; 2ef6e
|
FillBox: ; 2ef6e
|
||||||
; Fill wc2c6-aligned box width b height c
|
; Fill wc2c6-aligned box width b height c
|
||||||
; with iterating tile starting from $ffad at hl.
|
; with iterating tile starting from hFillBox at hl.
|
||||||
; Predef $13
|
; Predef $13
|
||||||
|
|
||||||
ld de, 20
|
ld de, 20
|
||||||
@ -32303,7 +32303,7 @@ FillBox: ; 2ef6e
|
|||||||
and a
|
and a
|
||||||
jr nz, .left
|
jr nz, .left
|
||||||
|
|
||||||
ld a, [$ffad]
|
ld a, [hFillBox]
|
||||||
.x1
|
.x1
|
||||||
push bc
|
push bc
|
||||||
push hl
|
push hl
|
||||||
@ -32330,7 +32330,7 @@ FillBox: ; 2ef6e
|
|||||||
add hl, bc
|
add hl, bc
|
||||||
pop bc
|
pop bc
|
||||||
|
|
||||||
ld a, [$ffad]
|
ld a, [hFillBox]
|
||||||
.x2
|
.x2
|
||||||
push bc
|
push bc
|
||||||
push hl
|
push hl
|
||||||
@ -48128,7 +48128,7 @@ Function81adb: ; 81adb
|
|||||||
ld de, VTiles2 tile $31
|
ld de, VTiles2 tile $31
|
||||||
predef GetBackpic
|
predef GetBackpic
|
||||||
ld a, $31
|
ld a, $31
|
||||||
ld [$ffad], a
|
ld [hFillBox], a
|
||||||
hlcoord 2, 4
|
hlcoord 2, 4
|
||||||
lb bc, 6, 6
|
lb bc, 6, 6
|
||||||
predef FillBox
|
predef FillBox
|
||||||
@ -48160,7 +48160,7 @@ Function81adb: ; 81adb
|
|||||||
callab GetTrainerPic
|
callab GetTrainerPic
|
||||||
xor a
|
xor a
|
||||||
ld [TempEnemyMonSpecies], a
|
ld [TempEnemyMonSpecies], a
|
||||||
ld [$ffad], a
|
ld [hFillBox], a
|
||||||
hlcoord 2, 3
|
hlcoord 2, 3
|
||||||
lb bc, 7, 7
|
lb bc, 7, 7
|
||||||
predef FillBox
|
predef FillBox
|
||||||
@ -50997,7 +50997,7 @@ endr
|
|||||||
ld de, VTiles2 tile $31
|
ld de, VTiles2 tile $31
|
||||||
predef GetBackpic
|
predef GetBackpic
|
||||||
ld a, $31
|
ld a, $31
|
||||||
ld [$ffad], a
|
ld [hFillBox], a
|
||||||
hlcoord 6, 6
|
hlcoord 6, 6
|
||||||
lb bc, 6, 6
|
lb bc, 6, 6
|
||||||
predef FillBox
|
predef FillBox
|
||||||
@ -51295,7 +51295,7 @@ Function86810: ; 86810
|
|||||||
call ByteFill
|
call ByteFill
|
||||||
callba GetPlayerBackpic
|
callba GetPlayerBackpic
|
||||||
ld a, $31
|
ld a, $31
|
||||||
ld [$ffad], a
|
ld [hFillBox], a
|
||||||
hlcoord 6, 6
|
hlcoord 6, 6
|
||||||
lb bc, 6, 6
|
lb bc, 6, 6
|
||||||
predef FillBox
|
predef FillBox
|
||||||
@ -51319,7 +51319,7 @@ Function86810: ; 86810
|
|||||||
call ByteFill
|
call ByteFill
|
||||||
callba Function88840
|
callba Function88840
|
||||||
xor a
|
xor a
|
||||||
ld [$ffad], a
|
ld [hFillBox], a
|
||||||
hlcoord 12, 5
|
hlcoord 12, 5
|
||||||
lb bc, 7, 7
|
lb bc, 7, 7
|
||||||
predef FillBox
|
predef FillBox
|
||||||
@ -51635,7 +51635,7 @@ DrawIntroPlayerPic: ; 88874
|
|||||||
|
|
||||||
; Draw
|
; Draw
|
||||||
xor a
|
xor a
|
||||||
ld [$ffad], a
|
ld [hFillBox], a
|
||||||
hlcoord 6, 4
|
hlcoord 6, 4
|
||||||
lb bc, 7, 7
|
lb bc, 7, 7
|
||||||
predef FillBox
|
predef FillBox
|
||||||
@ -52482,7 +52482,7 @@ Function8ce14: ; 8ce14
|
|||||||
|
|
||||||
Function8ce19: ; 8ce19
|
Function8ce19: ; 8ce19
|
||||||
ld d, $55
|
ld d, $55
|
||||||
ld a, [wd195]
|
ld a, [wd194 + 1]
|
||||||
ld e, a
|
ld e, a
|
||||||
ld b, $15
|
ld b, $15
|
||||||
ld a, [rSVBK]
|
ld a, [rSVBK]
|
||||||
@ -75652,22 +75652,22 @@ EnterWestConnection: ; 1045ed
|
|||||||
ld h, [hl]
|
ld h, [hl]
|
||||||
ld l, a
|
ld l, a
|
||||||
srl c
|
srl c
|
||||||
jr z, .asm_10461e
|
jr z, .skip_to_load
|
||||||
ld a, [WestConnectedMapWidth]
|
ld a, [WestConnectedMapWidth]
|
||||||
add 6
|
add 6
|
||||||
ld e, a
|
ld e, a
|
||||||
ld d, 0
|
ld d, 0
|
||||||
|
|
||||||
.asm_10461a
|
.loop
|
||||||
add hl, de
|
add hl, de
|
||||||
dec c
|
dec c
|
||||||
jr nz, .asm_10461a
|
jr nz, .loop
|
||||||
|
|
||||||
.asm_10461e
|
.skip_to_load
|
||||||
ld a, l
|
ld a, l
|
||||||
ld [wd194], a
|
ld [wd194], a
|
||||||
ld a, h
|
ld a, h
|
||||||
ld [wd195], a
|
ld [wd194 + 1], a
|
||||||
jp EnteredConnection
|
jp EnteredConnection
|
||||||
; 104629
|
; 104629
|
||||||
|
|
||||||
@ -75689,22 +75689,22 @@ EnterEastConnection: ; 104629
|
|||||||
ld h, [hl]
|
ld h, [hl]
|
||||||
ld l, a
|
ld l, a
|
||||||
srl c
|
srl c
|
||||||
jr z, .asm_10465a
|
jr z, .skip_to_load
|
||||||
ld a, [EastConnectedMapWidth]
|
ld a, [EastConnectedMapWidth]
|
||||||
add 6
|
add 6
|
||||||
ld e, a
|
ld e, a
|
||||||
ld d, 0
|
ld d, 0
|
||||||
|
|
||||||
.asm_104656
|
.loop
|
||||||
add hl, de
|
add hl, de
|
||||||
dec c
|
dec c
|
||||||
jr nz, .asm_104656
|
jr nz, .loop
|
||||||
|
|
||||||
.asm_10465a
|
.skip_to_load
|
||||||
ld a, l
|
ld a, l
|
||||||
ld [wd194], a
|
ld [wd194], a
|
||||||
ld a, h
|
ld a, h
|
||||||
ld [wd195], a
|
ld [wd194 + 1], a
|
||||||
jp EnteredConnection
|
jp EnteredConnection
|
||||||
; 104665
|
; 104665
|
||||||
|
|
||||||
@ -75731,7 +75731,7 @@ EnterNorthConnection: ; 104665
|
|||||||
ld a, l
|
ld a, l
|
||||||
ld [wd194], a
|
ld [wd194], a
|
||||||
ld a, h
|
ld a, h
|
||||||
ld [wd195], a
|
ld [wd194 + 1], a
|
||||||
jp EnteredConnection
|
jp EnteredConnection
|
||||||
; 104696
|
; 104696
|
||||||
|
|
||||||
@ -75758,7 +75758,7 @@ EnterSouthConnection: ; 104696
|
|||||||
ld a, l
|
ld a, l
|
||||||
ld [wd194], a
|
ld [wd194], a
|
||||||
ld a, h
|
ld a, h
|
||||||
ld [wd195], a
|
ld [wd194 + 1], a
|
||||||
; fallthrough
|
; fallthrough
|
||||||
; 1046c4
|
; 1046c4
|
||||||
|
|
||||||
@ -75994,16 +75994,16 @@ GetCoordOfUpperLeftCorner:: ; 10486d
|
|||||||
ld hl, OverworldMap
|
ld hl, OverworldMap
|
||||||
ld a, [XCoord]
|
ld a, [XCoord]
|
||||||
bit 0, a
|
bit 0, a
|
||||||
jr nz, .asm_10487d
|
jr nz, .increment_then_halve1
|
||||||
srl a
|
srl a
|
||||||
add $1
|
add $1
|
||||||
jr .asm_104881
|
jr .resume
|
||||||
|
|
||||||
.asm_10487d
|
.increment_then_halve1
|
||||||
add $1
|
add $1
|
||||||
srl a
|
srl a
|
||||||
|
|
||||||
.asm_104881
|
.resume
|
||||||
ld c, a
|
ld c, a
|
||||||
ld b, $0
|
ld b, $0
|
||||||
add hl, bc
|
add hl, bc
|
||||||
@ -76013,21 +76013,21 @@ GetCoordOfUpperLeftCorner:: ; 10486d
|
|||||||
ld b, $0
|
ld b, $0
|
||||||
ld a, [YCoord]
|
ld a, [YCoord]
|
||||||
bit 0, a
|
bit 0, a
|
||||||
jr nz, .asm_10489a
|
jr nz, .increment_then_halve2
|
||||||
srl a
|
srl a
|
||||||
add $1
|
add $1
|
||||||
jr .asm_10489e
|
jr .resume2
|
||||||
|
|
||||||
.asm_10489a
|
.increment_then_halve2
|
||||||
add $1
|
add $1
|
||||||
srl a
|
srl a
|
||||||
|
|
||||||
.asm_10489e
|
.resume2
|
||||||
call AddNTimes
|
call AddNTimes
|
||||||
ld a, l
|
ld a, l
|
||||||
ld [wd194], a
|
ld [wd194], a
|
||||||
ld a, h
|
ld a, h
|
||||||
ld [wd195], a
|
ld [wd194 + 1], a
|
||||||
ld a, [YCoord]
|
ld a, [YCoord]
|
||||||
and $1
|
and $1
|
||||||
ld [wd196], a
|
ld [wd196], a
|
||||||
@ -77777,7 +77777,7 @@ UsedMoveText: ; 105db9
|
|||||||
ld [wd265], a
|
ld [wd265], a
|
||||||
|
|
||||||
push hl
|
push hl
|
||||||
callba Function34548
|
callba CheckUserIsCharging
|
||||||
pop hl
|
pop hl
|
||||||
jr nz, .grammar
|
jr nz, .grammar
|
||||||
|
|
||||||
@ -79228,14 +79228,14 @@ INCLUDE "text/phone/extra3.asm"
|
|||||||
|
|
||||||
SECTION "bank5E", ROMX, BANK[$5E]
|
SECTION "bank5E", ROMX, BANK[$5E]
|
||||||
|
|
||||||
Function178000:
|
_UpdateBattleHUDs:
|
||||||
callba DrawPlayerHUD
|
callba DrawPlayerHUD
|
||||||
ld hl, PlayerHPPal
|
ld hl, PlayerHPPal
|
||||||
call SetHPPal
|
call SetHPPal
|
||||||
callba DrawEnemyHUD
|
callba DrawEnemyHUD
|
||||||
ld hl, EnemyHPPal
|
ld hl, EnemyHPPal
|
||||||
call SetHPPal
|
call SetHPPal
|
||||||
callba Function3ee27
|
callba FinishBattleAnim
|
||||||
ret
|
ret
|
||||||
; 17801f (5e:401f)
|
; 17801f (5e:401f)
|
||||||
|
|
||||||
|
@ -1253,7 +1253,7 @@ Function897d5: ; 897d5
|
|||||||
|
|
||||||
.asm_897f3
|
.asm_897f3
|
||||||
ld a, $37
|
ld a, $37
|
||||||
ld [$ffad], a
|
ld [hFillBox], a
|
||||||
hlcoord 12, 3
|
hlcoord 12, 3
|
||||||
lb bc, 7, 7
|
lb bc, 7, 7
|
||||||
predef FillBox
|
predef FillBox
|
||||||
|
@ -1618,7 +1618,7 @@ Function100a09: ; 100a09
|
|||||||
|
|
||||||
call Function100a87
|
call Function100a87
|
||||||
call Function100da5
|
call Function100da5
|
||||||
callba Function3ee27
|
callba FinishBattleAnim
|
||||||
jr .asm_100a2d
|
jr .asm_100a2d
|
||||||
|
|
||||||
.asm_100a2a
|
.asm_100a2a
|
||||||
|
@ -1210,7 +1210,7 @@ asm_108966
|
|||||||
call Function108ac8
|
call Function108ac8
|
||||||
hlcoord 7, 2
|
hlcoord 7, 2
|
||||||
xor a
|
xor a
|
||||||
ld [$ffad], a
|
ld [hFillBox], a
|
||||||
ld bc, $0707
|
ld bc, $0707
|
||||||
predef FillBox
|
predef FillBox
|
||||||
call WaitBGMap
|
call WaitBGMap
|
||||||
@ -1224,7 +1224,7 @@ Function10898a: ; 10898a
|
|||||||
call Function108ac8
|
call Function108ac8
|
||||||
hlcoord 7, 2
|
hlcoord 7, 2
|
||||||
xor a
|
xor a
|
||||||
ld [$ffad], a
|
ld [hFillBox], a
|
||||||
ld bc, $0707
|
ld bc, $0707
|
||||||
predef FillBox
|
predef FillBox
|
||||||
call WaitBGMap
|
call WaitBGMap
|
||||||
|
25
wram.asm
25
wram.asm
@ -473,7 +473,7 @@ wc64c::
|
|||||||
ds 1
|
ds 1
|
||||||
|
|
||||||
wc64d:: ds 1
|
wc64d:: ds 1
|
||||||
wCaughtMon::
|
wWildMon::
|
||||||
wc64e:: ds 1
|
wc64e:: ds 1
|
||||||
ds 1
|
ds 1
|
||||||
wEnemyTrainerItem1:: ds 1
|
wEnemyTrainerItem1:: ds 1
|
||||||
@ -635,7 +635,8 @@ BattleScriptBuffer:: ; c68a
|
|||||||
BattleScriptBufferLoc:: ; c6b2
|
BattleScriptBufferLoc:: ; c6b2
|
||||||
ds 2
|
ds 2
|
||||||
|
|
||||||
wc6b4:: ds 2
|
wTurnEnded:: ds 1
|
||||||
|
ds 1
|
||||||
|
|
||||||
PlayerStats:: ; c6b6
|
PlayerStats:: ; c6b6
|
||||||
ds 10
|
ds 10
|
||||||
@ -862,10 +863,10 @@ wc734::
|
|||||||
BattleEnded:: ; c734
|
BattleEnded:: ; c734
|
||||||
ds 1
|
ds 1
|
||||||
|
|
||||||
wCaughtMonMoves::
|
wWildMonMoves::
|
||||||
wc735:: ds 1
|
wc735:: ds 1
|
||||||
wc736:: ds 3
|
wc736:: ds 3
|
||||||
wCaughtMonPP::
|
wWildMonPP::
|
||||||
wc739:: ds 4
|
wc739:: ds 4
|
||||||
wc73d:: ds 1
|
wc73d:: ds 1
|
||||||
wc73e:: ds 1
|
wc73e:: ds 1
|
||||||
@ -1627,7 +1628,11 @@ wd151:: ds 1
|
|||||||
wd152:: ds 1
|
wd152:: ds 1
|
||||||
wd153:: ds 1
|
wd153:: ds 1
|
||||||
|
|
||||||
UsedSprites:: ; d154
|
UsedSprites:: ds 64
|
||||||
|
UsedSpritesEnd::
|
||||||
|
ds UsedSprites - @
|
||||||
|
|
||||||
|
wd154:: ; d154
|
||||||
ds 31 ; 64
|
ds 31 ; 64
|
||||||
|
|
||||||
wd173:: ds 1
|
wd173:: ds 1
|
||||||
@ -1639,9 +1644,7 @@ wd182:: ds 1
|
|||||||
wd191:: ds 1
|
wd191:: ds 1
|
||||||
wd192:: ds 1
|
wd192:: ds 1
|
||||||
wd193:: ds 1
|
wd193:: ds 1
|
||||||
UsedSpritesEnd::
|
wd194:: dw
|
||||||
wd194:: ds 1
|
|
||||||
wd195:: ds 1
|
|
||||||
wd196:: ds 1
|
wd196:: ds 1
|
||||||
wd197:: ds 2
|
wd197:: ds 2
|
||||||
wd199:: ds 1
|
wd199:: ds 1
|
||||||
@ -2731,7 +2734,7 @@ OBPals:: ds 8 * 8 ; d0c0
|
|||||||
|
|
||||||
LYOverrides:: ; d100
|
LYOverrides:: ; d100
|
||||||
ds SCREEN_HEIGHT_PX
|
ds SCREEN_HEIGHT_PX
|
||||||
LYOverridesEnd::
|
LYOverridesEnd:: ; d190
|
||||||
|
|
||||||
ds 1
|
ds 1
|
||||||
w5_d191:: ds 1
|
w5_d191:: ds 1
|
||||||
@ -2781,7 +2784,9 @@ w5_d418:: ds 1
|
|||||||
BattleAnimTemps:: ; d419
|
BattleAnimTemps:: ; d419
|
||||||
ds 8
|
ds 8
|
||||||
ds 1
|
ds 1
|
||||||
w5_d422:: ds $40
|
w5_d422:: ds $32
|
||||||
|
wBattleAnimEnd::
|
||||||
|
ds $e
|
||||||
|
|
||||||
|
|
||||||
SECTION "WRAM 6", WRAMX, BANK [6]
|
SECTION "WRAM 6", WRAMX, BANK [6]
|
||||||
|
Loading…
Reference in New Issue
Block a user