mirror of
https://github.com/thornAvery/kep-hack.git
synced 2025-09-17 02:40:50 +12:00
some battle animation stuff
This commit is contained in:
parent
8a80f2c852
commit
a957bb1540
|
@ -1292,12 +1292,12 @@ AnimationSlideMonUp: ; 7927a (1e:527a)
|
||||||
ld c, $7
|
ld c, $7
|
||||||
ld a, [H_WHOSETURN]
|
ld a, [H_WHOSETURN]
|
||||||
and a
|
and a
|
||||||
ld hl, wTileMap + $79
|
hlCoord 1, 6
|
||||||
ld de, wTileMap + $65
|
deCoord 1, 5
|
||||||
ld a, $30
|
ld a, $30
|
||||||
jr z, .asm_79291
|
jr z, .asm_79291
|
||||||
ld hl, wTileMap + $20
|
hlCoord 12, 1
|
||||||
ld de, wTileMap + $c
|
deCoord 12, 0
|
||||||
ld a, $ff
|
ld a, $ff
|
||||||
.asm_79291
|
.asm_79291
|
||||||
ld [wd09f], a
|
ld [wd09f], a
|
||||||
|
@ -1345,16 +1345,16 @@ _AnimationSlideMonUp: ; 792bf (1e:52bf)
|
||||||
call CopyData
|
call CopyData
|
||||||
pop de
|
pop de
|
||||||
pop hl
|
pop hl
|
||||||
ld bc, $0028
|
ld bc, SCREEN_WIDTH * 2
|
||||||
add hl, bc
|
add hl, bc
|
||||||
pop bc
|
pop bc
|
||||||
dec b
|
dec b
|
||||||
jr nz, .asm_792c4
|
jr nz, .asm_792c4
|
||||||
ld a, [H_WHOSETURN]
|
ld a, [H_WHOSETURN]
|
||||||
and a
|
and a
|
||||||
ld hl, wTileMap + $dd
|
hlCoord 1, 11
|
||||||
jr z, .asm_792e2
|
jr z, .asm_792e2
|
||||||
ld hl, wTileMap + $84
|
hlCoord 12, 6
|
||||||
.asm_792e2
|
.asm_792e2
|
||||||
ld a, [wd09f]
|
ld a, [wd09f]
|
||||||
inc a
|
inc a
|
||||||
|
@ -1513,11 +1513,11 @@ AnimationShakeBackAndForth: ; 793b1 (1e:53b1)
|
||||||
; The mon's sprite disappears after this animation.
|
; The mon's sprite disappears after this animation.
|
||||||
ld a, [H_WHOSETURN]
|
ld a, [H_WHOSETURN]
|
||||||
and a
|
and a
|
||||||
ld hl, wTileMap + $64
|
hlCoord 0, 5
|
||||||
ld de, wTileMap + $66
|
deCoord 2, 5
|
||||||
jr z, .asm_793c2
|
jr z, .asm_793c2
|
||||||
ld hl, wTileMap + $b
|
hlCoord 11, 0
|
||||||
ld de, wTileMap + $d
|
deCoord 13, 0
|
||||||
|
|
||||||
.asm_793c2
|
.asm_793c2
|
||||||
xor a
|
xor a
|
||||||
|
@ -2061,23 +2061,24 @@ CopySlowbroSpriteData: ; 7973f (1e:573f)
|
||||||
ld a, BANK(SlowbroSprite)
|
ld a, BANK(SlowbroSprite)
|
||||||
jp FarCopyData2
|
jp FarCopyData2
|
||||||
|
|
||||||
Func_79747: ; 79747 (1e:5747)
|
HideSubstituteShowMonAnim: ; 79747 (1e:5747)
|
||||||
ld a, [H_WHOSETURN]
|
ld a, [H_WHOSETURN]
|
||||||
and a
|
and a
|
||||||
ld hl, wccf7
|
ld hl, wPlayerMonMinimized
|
||||||
ld a, [W_PLAYERBATTSTATUS2]
|
ld a, [W_PLAYERBATTSTATUS2]
|
||||||
jr z, .asm_79758
|
jr z, .next1
|
||||||
ld hl, wccf3
|
ld hl, wEnemyMonMinimized
|
||||||
ld a, [W_ENEMYBATTSTATUS2]
|
ld a, [W_ENEMYBATTSTATUS2]
|
||||||
.asm_79758
|
.next1
|
||||||
push hl
|
push hl
|
||||||
bit 4, a
|
; if the substitute broke, slide it down, else slide it offscreen horizontally
|
||||||
jr nz, .asm_79762
|
bit HasSubstituteUp, a
|
||||||
|
jr nz, .substituteStillUp
|
||||||
call AnimationSlideMonDown
|
call AnimationSlideMonDown
|
||||||
jr .asm_79765
|
jr .next2
|
||||||
.asm_79762
|
.substituteStillUp
|
||||||
call AnimationSlideMonOut
|
call AnimationSlideMonOut
|
||||||
.asm_79765
|
.next2
|
||||||
pop hl
|
pop hl
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
and a
|
and a
|
||||||
|
@ -2085,7 +2086,7 @@ Func_79747: ; 79747 (1e:5747)
|
||||||
call AnimationFlashMonPic
|
call AnimationFlashMonPic
|
||||||
jp AnimationShowMonPic
|
jp AnimationShowMonPic
|
||||||
|
|
||||||
Func_79771: ; 79771 (1e:5771)
|
ReshowSubstituteAnim: ; 79771 (1e:5771)
|
||||||
call AnimationSlideMonOut
|
call AnimationSlideMonOut
|
||||||
call AnimationSubstitute
|
call AnimationSubstitute
|
||||||
jp AnimationShowMonPic
|
jp AnimationShowMonPic
|
||||||
|
|
|
@ -848,7 +848,7 @@ FaintEnemyPokemon: ; 0x3c567
|
||||||
ld [hl], a
|
ld [hl], a
|
||||||
ld [W_ENEMYDISABLEDMOVE], a
|
ld [W_ENEMYDISABLEDMOVE], a
|
||||||
ld [wEnemyDisabledMoveNumber], a
|
ld [wEnemyDisabledMoveNumber], a
|
||||||
ld [wccf3], a
|
ld [wEnemyMonMinimized], a
|
||||||
ld hl, wPlayerUsedMove
|
ld hl, wPlayerUsedMove
|
||||||
ld [hli], a
|
ld [hli], a
|
||||||
ld [hl], a
|
ld [hl], a
|
||||||
|
@ -1376,7 +1376,7 @@ EnemySendOutFirstMon: ; 3c92a (f:492a)
|
||||||
ld [hl],a
|
ld [hl],a
|
||||||
ld [W_ENEMYDISABLEDMOVE],a
|
ld [W_ENEMYDISABLEDMOVE],a
|
||||||
ld [wEnemyDisabledMoveNumber],a
|
ld [wEnemyDisabledMoveNumber],a
|
||||||
ld [wccf3],a
|
ld [wEnemyMonMinimized],a
|
||||||
ld hl,wPlayerUsedMove
|
ld hl,wPlayerUsedMove
|
||||||
ld [hli],a
|
ld [hli],a
|
||||||
ld [hl],a
|
ld [hl],a
|
||||||
|
@ -1826,7 +1826,7 @@ SendOutMon: ; 3cc91 (f:4c91)
|
||||||
ld [hl], a
|
ld [hl], a
|
||||||
ld [W_PLAYERDISABLEDMOVE], a
|
ld [W_PLAYERDISABLEDMOVE], a
|
||||||
ld [wPlayerDisabledMoveNumber], a
|
ld [wPlayerDisabledMoveNumber], a
|
||||||
ld [wccf7], a
|
ld [wPlayerMonMinimized], a
|
||||||
ld b, $1
|
ld b, $1
|
||||||
call GoPAL_SET
|
call GoPAL_SET
|
||||||
ld hl, W_ENEMYBATTSTATUS1
|
ld hl, W_ENEMYBATTSTATUS1
|
||||||
|
@ -2448,7 +2448,7 @@ PartyMenuOrRockOrRun:
|
||||||
ld hl, AnimationSubstitute
|
ld hl, AnimationSubstitute
|
||||||
jr nz, .doEnemyMonAnimation
|
jr nz, .doEnemyMonAnimation
|
||||||
; enemy mon doesn't have substitute
|
; enemy mon doesn't have substitute
|
||||||
ld a, [wccf3]
|
ld a, [wEnemyMonMinimized]
|
||||||
and a ; has the enemy mon used Minimise?
|
and a ; has the enemy mon used Minimise?
|
||||||
ld hl, AnimationMinimizeMon
|
ld hl, AnimationMinimizeMon
|
||||||
jr nz, .doEnemyMonAnimation
|
jr nz, .doEnemyMonAnimation
|
||||||
|
@ -3215,9 +3215,9 @@ getPlayerAnimationType
|
||||||
playPlayerMoveAnimation
|
playPlayerMoveAnimation
|
||||||
push af
|
push af
|
||||||
ld a,[W_PLAYERBATTSTATUS2]
|
ld a,[W_PLAYERBATTSTATUS2]
|
||||||
bit 4,a
|
bit HasSubstituteUp,a
|
||||||
ld hl,Func_79747
|
ld hl,HideSubstituteShowMonAnim
|
||||||
ld b,BANK(Func_79747)
|
ld b,BANK(HideSubstituteShowMonAnim)
|
||||||
call nz,Bankswitch
|
call nz,Bankswitch
|
||||||
pop af
|
pop af
|
||||||
ld [wAnimationType],a
|
ld [wAnimationType],a
|
||||||
|
@ -3226,9 +3226,9 @@ playPlayerMoveAnimation
|
||||||
call HandleExplodingAnimation
|
call HandleExplodingAnimation
|
||||||
call DrawPlayerHUDAndHPBar
|
call DrawPlayerHUDAndHPBar
|
||||||
ld a,[W_PLAYERBATTSTATUS2]
|
ld a,[W_PLAYERBATTSTATUS2]
|
||||||
bit 4,a
|
bit HasSubstituteUp,a
|
||||||
ld hl,Func_79771
|
ld hl,ReshowSubstituteAnim
|
||||||
ld b,BANK(Func_79771)
|
ld b,BANK(ReshowSubstituteAnim)
|
||||||
call nz,Bankswitch
|
call nz,Bankswitch
|
||||||
jr MirrorMoveCheck
|
jr MirrorMoveCheck
|
||||||
playerCheckIfFlyOrChargeEffect
|
playerCheckIfFlyOrChargeEffect
|
||||||
|
@ -5089,7 +5089,7 @@ AttackSubstitute: ; 3e25e (f:625e)
|
||||||
ld a,[H_WHOSETURN]
|
ld a,[H_WHOSETURN]
|
||||||
xor a,$01
|
xor a,$01
|
||||||
ld [H_WHOSETURN],a
|
ld [H_WHOSETURN],a
|
||||||
callab Func_79747 ; animate the substitute breaking
|
callab HideSubstituteShowMonAnim ; animate the substitute breaking
|
||||||
; flip the turn back to the way it was
|
; flip the turn back to the way it was
|
||||||
ld a,[H_WHOSETURN]
|
ld a,[H_WHOSETURN]
|
||||||
xor a,$01
|
xor a,$01
|
||||||
|
@ -5767,8 +5767,8 @@ playEnemyMoveAnimation: ; 3e7a4 (f:67a4)
|
||||||
push af
|
push af
|
||||||
ld a, [W_ENEMYBATTSTATUS2]
|
ld a, [W_ENEMYBATTSTATUS2]
|
||||||
bit HasSubstituteUp, a ; does mon have a substitute?
|
bit HasSubstituteUp, a ; does mon have a substitute?
|
||||||
ld hl, Func_79747
|
ld hl, HideSubstituteShowMonAnim
|
||||||
ld b, BANK(Func_79747)
|
ld b, BANK(HideSubstituteShowMonAnim)
|
||||||
call nz, Bankswitch
|
call nz, Bankswitch
|
||||||
pop af
|
pop af
|
||||||
ld [wAnimationType], a
|
ld [wAnimationType], a
|
||||||
|
@ -5778,8 +5778,8 @@ playEnemyMoveAnimation: ; 3e7a4 (f:67a4)
|
||||||
call DrawEnemyHUDAndHPBar
|
call DrawEnemyHUDAndHPBar
|
||||||
ld a, [W_ENEMYBATTSTATUS2]
|
ld a, [W_ENEMYBATTSTATUS2]
|
||||||
bit HasSubstituteUp, a ; does mon have a substitute?
|
bit HasSubstituteUp, a ; does mon have a substitute?
|
||||||
ld hl, Func_79771
|
ld hl, ReshowSubstituteAnim
|
||||||
ld b, BANK(Func_79771)
|
ld b, BANK(ReshowSubstituteAnim)
|
||||||
call nz, Bankswitch ; slide the substitute's sprite out
|
call nz, Bankswitch ; slide the substitute's sprite out
|
||||||
jr EnemyCheckIfMirrorMoveEffect
|
jr EnemyCheckIfMirrorMoveEffect
|
||||||
|
|
||||||
|
@ -7657,24 +7657,26 @@ UpdateStatDone: ; 3f4ca (f:74ca)
|
||||||
call PrintStatText
|
call PrintStatText
|
||||||
ld hl, W_PLAYERBATTSTATUS2
|
ld hl, W_PLAYERBATTSTATUS2
|
||||||
ld de, W_PLAYERMOVENUM
|
ld de, W_PLAYERMOVENUM
|
||||||
ld bc, wccf7
|
ld bc, wPlayerMonMinimized
|
||||||
ld a, [H_WHOSETURN]
|
ld a, [H_WHOSETURN]
|
||||||
and a
|
and a
|
||||||
jr z, .asm_3f4e6
|
jr z, .asm_3f4e6
|
||||||
ld hl, W_ENEMYBATTSTATUS2
|
ld hl, W_ENEMYBATTSTATUS2
|
||||||
ld de, W_ENEMYMOVENUM
|
ld de, W_ENEMYMOVENUM
|
||||||
ld bc, wccf3
|
ld bc, wEnemyMonMinimized
|
||||||
.asm_3f4e6
|
.asm_3f4e6
|
||||||
ld a, [de]
|
ld a, [de]
|
||||||
cp MINIMIZE
|
cp MINIMIZE
|
||||||
jr nz, .asm_3f4f9
|
jr nz, .asm_3f4f9
|
||||||
bit HasSubstituteUp, [hl] ; substitute
|
; if a substitute is up, slide off the substitute and show the mon pic before
|
||||||
|
; playing the minimize animation
|
||||||
|
bit HasSubstituteUp, [hl]
|
||||||
push af
|
push af
|
||||||
push bc
|
push bc
|
||||||
ld hl, Func_79747
|
ld hl, HideSubstituteShowMonAnim
|
||||||
ld b, BANK(Func_79747)
|
ld b, BANK(HideSubstituteShowMonAnim)
|
||||||
push de
|
push de
|
||||||
call nz, Bankswitch ; play Minimize animation unless there's Substitute involved
|
call nz, Bankswitch
|
||||||
pop de
|
pop de
|
||||||
.asm_3f4f9
|
.asm_3f4f9
|
||||||
call PlayCurrentMoveAnimation
|
call PlayCurrentMoveAnimation
|
||||||
|
@ -7684,8 +7686,8 @@ UpdateStatDone: ; 3f4ca (f:74ca)
|
||||||
pop bc
|
pop bc
|
||||||
ld a, $1
|
ld a, $1
|
||||||
ld [bc], a
|
ld [bc], a
|
||||||
ld hl, Func_79771
|
ld hl, ReshowSubstituteAnim
|
||||||
ld b, BANK(Func_79771)
|
ld b, BANK(ReshowSubstituteAnim)
|
||||||
pop af
|
pop af
|
||||||
call nz, Bankswitch
|
call nz, Bankswitch
|
||||||
.applyBadgeBoostsAndStatusPenalties
|
.applyBadgeBoostsAndStatusPenalties
|
||||||
|
|
|
@ -26,8 +26,8 @@ TransformEffect_: ; 3bab1 (e:7ab1)
|
||||||
; animation(s) played are different if target has Substitute up
|
; animation(s) played are different if target has Substitute up
|
||||||
bit HasSubstituteUp, [hl]
|
bit HasSubstituteUp, [hl]
|
||||||
push af
|
push af
|
||||||
ld hl, Func_79747
|
ld hl, HideSubstituteShowMonAnim
|
||||||
ld b, BANK(Func_79747)
|
ld b, BANK(HideSubstituteShowMonAnim)
|
||||||
call nz, Bankswitch
|
call nz, Bankswitch
|
||||||
ld a, [W_OPTIONS]
|
ld a, [W_OPTIONS]
|
||||||
add a
|
add a
|
||||||
|
@ -38,8 +38,8 @@ TransformEffect_: ; 3bab1 (e:7ab1)
|
||||||
ld b, BANK(AnimationTransformMon)
|
ld b, BANK(AnimationTransformMon)
|
||||||
.gotAnimToPlay
|
.gotAnimToPlay
|
||||||
call Bankswitch
|
call Bankswitch
|
||||||
ld hl, Func_79771
|
ld hl, ReshowSubstituteAnim
|
||||||
ld b, BANK(Func_79771)
|
ld b, BANK(ReshowSubstituteAnim)
|
||||||
pop af
|
pop af
|
||||||
call nz, Bankswitch
|
call nz, Bankswitch
|
||||||
pop bc
|
pop bc
|
||||||
|
|
6
wram.asm
6
wram.asm
|
@ -445,7 +445,7 @@ wccf0:: ds 1 ; used as a check if a mon fainted
|
||||||
wPlayerUsedMove:: ds 1 ; ccf1
|
wPlayerUsedMove:: ds 1 ; ccf1
|
||||||
wEnemyUsedMove:: ds 1 ; ccf2
|
wEnemyUsedMove:: ds 1 ; ccf2
|
||||||
|
|
||||||
wccf3:: ds 1 ; used with the move minimize
|
wEnemyMonMinimized:: ds 1 ; ccf3
|
||||||
|
|
||||||
wMoveDidntMiss:: ds 1 ; ccf4
|
wMoveDidntMiss:: ds 1 ; ccf4
|
||||||
|
|
||||||
|
@ -454,7 +454,9 @@ wPartyFoughtCurrentEnemyFlags:: ; ccf5
|
||||||
flag_array 6
|
flag_array 6
|
||||||
|
|
||||||
wccf6:: ds 1 ; used in some hp bar thing
|
wccf6:: ds 1 ; used in some hp bar thing
|
||||||
wccf7:: ds 14 ; used with substitute move sliding thing? (not sure)
|
wPlayerMonMinimized:: ds 1 ; ccf7
|
||||||
|
|
||||||
|
ds 13
|
||||||
|
|
||||||
wUnknownSlotVar:: ; cd05
|
wUnknownSlotVar:: ; cd05
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue