some battle animation stuff

This commit is contained in:
YamaArashi 2015-07-12 15:51:04 -07:00
parent 8a80f2c852
commit a957bb1540
4 changed files with 56 additions and 51 deletions

View file

@ -1292,12 +1292,12 @@ AnimationSlideMonUp: ; 7927a (1e:527a)
ld c, $7
ld a, [H_WHOSETURN]
and a
ld hl, wTileMap + $79
ld de, wTileMap + $65
hlCoord 1, 6
deCoord 1, 5
ld a, $30
jr z, .asm_79291
ld hl, wTileMap + $20
ld de, wTileMap + $c
hlCoord 12, 1
deCoord 12, 0
ld a, $ff
.asm_79291
ld [wd09f], a
@ -1345,16 +1345,16 @@ _AnimationSlideMonUp: ; 792bf (1e:52bf)
call CopyData
pop de
pop hl
ld bc, $0028
ld bc, SCREEN_WIDTH * 2
add hl, bc
pop bc
dec b
jr nz, .asm_792c4
ld a, [H_WHOSETURN]
and a
ld hl, wTileMap + $dd
hlCoord 1, 11
jr z, .asm_792e2
ld hl, wTileMap + $84
hlCoord 12, 6
.asm_792e2
ld a, [wd09f]
inc a
@ -1513,11 +1513,11 @@ AnimationShakeBackAndForth: ; 793b1 (1e:53b1)
; The mon's sprite disappears after this animation.
ld a, [H_WHOSETURN]
and a
ld hl, wTileMap + $64
ld de, wTileMap + $66
hlCoord 0, 5
deCoord 2, 5
jr z, .asm_793c2
ld hl, wTileMap + $b
ld de, wTileMap + $d
hlCoord 11, 0
deCoord 13, 0
.asm_793c2
xor a
@ -2061,23 +2061,24 @@ CopySlowbroSpriteData: ; 7973f (1e:573f)
ld a, BANK(SlowbroSprite)
jp FarCopyData2
Func_79747: ; 79747 (1e:5747)
HideSubstituteShowMonAnim: ; 79747 (1e:5747)
ld a, [H_WHOSETURN]
and a
ld hl, wccf7
ld hl, wPlayerMonMinimized
ld a, [W_PLAYERBATTSTATUS2]
jr z, .asm_79758
ld hl, wccf3
jr z, .next1
ld hl, wEnemyMonMinimized
ld a, [W_ENEMYBATTSTATUS2]
.asm_79758
.next1
push hl
bit 4, a
jr nz, .asm_79762
; if the substitute broke, slide it down, else slide it offscreen horizontally
bit HasSubstituteUp, a
jr nz, .substituteStillUp
call AnimationSlideMonDown
jr .asm_79765
.asm_79762
jr .next2
.substituteStillUp
call AnimationSlideMonOut
.asm_79765
.next2
pop hl
ld a, [hl]
and a
@ -2085,7 +2086,7 @@ Func_79747: ; 79747 (1e:5747)
call AnimationFlashMonPic
jp AnimationShowMonPic
Func_79771: ; 79771 (1e:5771)
ReshowSubstituteAnim: ; 79771 (1e:5771)
call AnimationSlideMonOut
call AnimationSubstitute
jp AnimationShowMonPic

View file

@ -848,7 +848,7 @@ FaintEnemyPokemon: ; 0x3c567
ld [hl], a
ld [W_ENEMYDISABLEDMOVE], a
ld [wEnemyDisabledMoveNumber], a
ld [wccf3], a
ld [wEnemyMonMinimized], a
ld hl, wPlayerUsedMove
ld [hli], a
ld [hl], a
@ -1376,7 +1376,7 @@ EnemySendOutFirstMon: ; 3c92a (f:492a)
ld [hl],a
ld [W_ENEMYDISABLEDMOVE],a
ld [wEnemyDisabledMoveNumber],a
ld [wccf3],a
ld [wEnemyMonMinimized],a
ld hl,wPlayerUsedMove
ld [hli],a
ld [hl],a
@ -1826,7 +1826,7 @@ SendOutMon: ; 3cc91 (f:4c91)
ld [hl], a
ld [W_PLAYERDISABLEDMOVE], a
ld [wPlayerDisabledMoveNumber], a
ld [wccf7], a
ld [wPlayerMonMinimized], a
ld b, $1
call GoPAL_SET
ld hl, W_ENEMYBATTSTATUS1
@ -2448,7 +2448,7 @@ PartyMenuOrRockOrRun:
ld hl, AnimationSubstitute
jr nz, .doEnemyMonAnimation
; enemy mon doesn't have substitute
ld a, [wccf3]
ld a, [wEnemyMonMinimized]
and a ; has the enemy mon used Minimise?
ld hl, AnimationMinimizeMon
jr nz, .doEnemyMonAnimation
@ -3215,9 +3215,9 @@ getPlayerAnimationType
playPlayerMoveAnimation
push af
ld a,[W_PLAYERBATTSTATUS2]
bit 4,a
ld hl,Func_79747
ld b,BANK(Func_79747)
bit HasSubstituteUp,a
ld hl,HideSubstituteShowMonAnim
ld b,BANK(HideSubstituteShowMonAnim)
call nz,Bankswitch
pop af
ld [wAnimationType],a
@ -3226,9 +3226,9 @@ playPlayerMoveAnimation
call HandleExplodingAnimation
call DrawPlayerHUDAndHPBar
ld a,[W_PLAYERBATTSTATUS2]
bit 4,a
ld hl,Func_79771
ld b,BANK(Func_79771)
bit HasSubstituteUp,a
ld hl,ReshowSubstituteAnim
ld b,BANK(ReshowSubstituteAnim)
call nz,Bankswitch
jr MirrorMoveCheck
playerCheckIfFlyOrChargeEffect
@ -5089,7 +5089,7 @@ AttackSubstitute: ; 3e25e (f:625e)
ld a,[H_WHOSETURN]
xor a,$01
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
ld a,[H_WHOSETURN]
xor a,$01
@ -5767,8 +5767,8 @@ playEnemyMoveAnimation: ; 3e7a4 (f:67a4)
push af
ld a, [W_ENEMYBATTSTATUS2]
bit HasSubstituteUp, a ; does mon have a substitute?
ld hl, Func_79747
ld b, BANK(Func_79747)
ld hl, HideSubstituteShowMonAnim
ld b, BANK(HideSubstituteShowMonAnim)
call nz, Bankswitch
pop af
ld [wAnimationType], a
@ -5778,8 +5778,8 @@ playEnemyMoveAnimation: ; 3e7a4 (f:67a4)
call DrawEnemyHUDAndHPBar
ld a, [W_ENEMYBATTSTATUS2]
bit HasSubstituteUp, a ; does mon have a substitute?
ld hl, Func_79771
ld b, BANK(Func_79771)
ld hl, ReshowSubstituteAnim
ld b, BANK(ReshowSubstituteAnim)
call nz, Bankswitch ; slide the substitute's sprite out
jr EnemyCheckIfMirrorMoveEffect
@ -7657,24 +7657,26 @@ UpdateStatDone: ; 3f4ca (f:74ca)
call PrintStatText
ld hl, W_PLAYERBATTSTATUS2
ld de, W_PLAYERMOVENUM
ld bc, wccf7
ld bc, wPlayerMonMinimized
ld a, [H_WHOSETURN]
and a
jr z, .asm_3f4e6
ld hl, W_ENEMYBATTSTATUS2
ld de, W_ENEMYMOVENUM
ld bc, wccf3
ld bc, wEnemyMonMinimized
.asm_3f4e6
ld a, [de]
cp MINIMIZE
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 bc
ld hl, Func_79747
ld b, BANK(Func_79747)
ld hl, HideSubstituteShowMonAnim
ld b, BANK(HideSubstituteShowMonAnim)
push de
call nz, Bankswitch ; play Minimize animation unless there's Substitute involved
call nz, Bankswitch
pop de
.asm_3f4f9
call PlayCurrentMoveAnimation
@ -7684,8 +7686,8 @@ UpdateStatDone: ; 3f4ca (f:74ca)
pop bc
ld a, $1
ld [bc], a
ld hl, Func_79771
ld b, BANK(Func_79771)
ld hl, ReshowSubstituteAnim
ld b, BANK(ReshowSubstituteAnim)
pop af
call nz, Bankswitch
.applyBadgeBoostsAndStatusPenalties

View file

@ -26,8 +26,8 @@ TransformEffect_: ; 3bab1 (e:7ab1)
; animation(s) played are different if target has Substitute up
bit HasSubstituteUp, [hl]
push af
ld hl, Func_79747
ld b, BANK(Func_79747)
ld hl, HideSubstituteShowMonAnim
ld b, BANK(HideSubstituteShowMonAnim)
call nz, Bankswitch
ld a, [W_OPTIONS]
add a
@ -38,8 +38,8 @@ TransformEffect_: ; 3bab1 (e:7ab1)
ld b, BANK(AnimationTransformMon)
.gotAnimToPlay
call Bankswitch
ld hl, Func_79771
ld b, BANK(Func_79771)
ld hl, ReshowSubstituteAnim
ld b, BANK(ReshowSubstituteAnim)
pop af
call nz, Bankswitch
pop bc

View file

@ -445,7 +445,7 @@ wccf0:: ds 1 ; used as a check if a mon fainted
wPlayerUsedMove:: ds 1 ; ccf1
wEnemyUsedMove:: ds 1 ; ccf2
wccf3:: ds 1 ; used with the move minimize
wEnemyMonMinimized:: ds 1 ; ccf3
wMoveDidntMiss:: ds 1 ; ccf4
@ -454,7 +454,9 @@ wPartyFoughtCurrentEnemyFlags:: ; ccf5
flag_array 6
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