aboutsummaryrefslogtreecommitdiffstats
path: root/engine
diff options
context:
space:
mode:
authorBlueZangoose <113498143+BlueZangoose@users.noreply.github.com>2023-11-22 00:52:53 +0000
committerGitHub <noreply@github.com>2023-11-21 19:52:53 -0500
commit9827190aea7ce6a6f30d6a0c04eda34934cbd35e (patch)
treed0350957af625443210c33ea3bf5beb5236a94ee /engine
parentUpdate install instructions for Arch Linux (diff)
downloadpokeyellow-9827190aea7ce6a6f30d6a0c04eda34934cbd35e.tar.gz
pokeyellow-9827190aea7ce6a6f30d6a0c04eda34934cbd35e.tar.xz
pokeyellow-9827190aea7ce6a6f30d6a0c04eda34934cbd35e.zip
Use MEGA_PUNCH constant in explosion animation routine (#434)
* Use MEGA_PUNCH constant in explosion animation routine * Add AnimationType constants and assert --------- Co-authored-by: vulcandth <vulcandth@gmail.com>
Diffstat (limited to 'engine')
-rw-r--r--engine/battle/core.asm14
-rw-r--r--engine/battle/effects.asm4
2 files changed, 10 insertions, 8 deletions
diff --git a/engine/battle/core.asm b/engine/battle/core.asm
index f976674a..19ebdfcf 100644
--- a/engine/battle/core.asm
+++ b/engine/battle/core.asm
@@ -3154,9 +3154,9 @@ handleIfPlayerMoveMissed:
getPlayerAnimationType:
ld a, [wPlayerMoveEffect]
and a
- ld a, 4 ; move has no effect other than dealing damage
+ ld a, ANIMATIONTYPE_BLINK_ENEMY_MON_SPRITE ; move has no effect other than dealing damage
jr z, playPlayerMoveAnimation
- ld a, 5 ; move has effect
+ ld a, ANIMATIONTYPE_SHAKE_SCREEN_HORIZONTALLY_LIGHT ; move has effect
playPlayerMoveAnimation:
push af
ld a, [wPlayerBattleStatus2]
@@ -5681,9 +5681,9 @@ handleIfEnemyMoveMissed:
GetEnemyAnimationType:
ld a, [wEnemyMoveEffect]
and a
- ld a, $1
+ ld a, ANIMATIONTYPE_SHAKE_SCREEN_VERTICALLY
jr z, playEnemyMoveAnimation
- ld a, $2
+ ld a, ANIMATIONTYPE_SHAKE_SCREEN_HORIZONTALLY_HEAVY
jr playEnemyMoveAnimation
handleExplosionMiss:
call SwapPlayerAndEnemyLevels
@@ -6752,9 +6752,11 @@ HandleExplodingAnimation:
ld a, [wMoveMissed]
and a
ret nz
- ld a, 5
+ ld a, ANIMATIONTYPE_SHAKE_SCREEN_HORIZONTALLY_LIGHT
ld [wAnimationType], a
-
+ assert ANIMATIONTYPE_SHAKE_SCREEN_HORIZONTALLY_LIGHT == MEGA_PUNCH
+ ; ld a, MEGA_PUNCH
+; fallthrough
PlayMoveAnimation:
ld [wAnimationID], a
vc_hook_red Reduce_move_anim_flashing_Confusion
diff --git a/engine/battle/effects.asm b/engine/battle/effects.asm
index e89d19f3..b94b12d2 100644
--- a/engine/battle/effects.asm
+++ b/engine/battle/effects.asm
@@ -1460,9 +1460,9 @@ PlayBattleAnimation2:
ld [wAnimationID], a
ldh a, [hWhoseTurn]
and a
- ld a, $6
+ ld a, ANIMATIONTYPE_SHAKE_SCREEN_HORIZONTALLY_SLOW_2
jr z, .storeAnimationType
- ld a, $3
+ ld a, ANIMATIONTYPE_SHAKE_SCREEN_HORIZONTALLY_SLOW
.storeAnimationType
ld [wAnimationType], a
jp PlayBattleAnimationGotID