From 3f7b6ca3575d8663dc18013e927ce9b1b3c0a7a0 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Thu, 28 Apr 2022 09:04:16 -0400 Subject: [PATCH 1/3] Remove spurious space in battle_anim_scripts.s --- data/battle_anim_scripts.s | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data/battle_anim_scripts.s b/data/battle_anim_scripts.s index 1cfc5230c0..35ad7cde05 100644 --- a/data/battle_anim_scripts.s +++ b/data/battle_anim_scripts.s @@ -5645,7 +5645,7 @@ HydroPumpBeams: createsprite gHydroPumpOrbSpriteTemplate, ANIM_ATTACKER, 3, 10, 10, 0, -16 delay 1 return -HydroPumpHitSplats : +HydroPumpHitSplats: createsprite gWaterHitSplatSpriteTemplate, ANIM_ATTACKER, 4, 0, 15, ANIM_TARGET, 1 createsprite gWaterHitSplatSpriteTemplate, ANIM_ATTACKER, 4, 0, -15, ANIM_TARGET, 1 return From ff936c15e1a5ca4e07e9d52cecc0f140cffd3a27 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Thu, 28 Apr 2022 13:46:23 -0400 Subject: [PATCH 2/3] Sync arg descriptions from FireRed https://github.com/pret/pokefirered/pull/501 --- data/battle_anim_scripts.s | 144 ++++++++++++++++---------------- include/constants/battle_anim.h | 13 ++- ld_script_modern.txt | 1 + 3 files changed, 82 insertions(+), 76 deletions(-) diff --git a/data/battle_anim_scripts.s b/data/battle_anim_scripts.s index 35ad7cde05..b4fdd4b1c1 100644 --- a/data/battle_anim_scripts.s +++ b/data/battle_anim_scripts.s @@ -1458,11 +1458,11 @@ FuryCutterStrongest: Move_SELF_DESTRUCT: loadspritegfx ANIM_TAG_EXPLOSION createvisualtask AnimTask_BlendBattleAnimPal, 10, 2, 1, 0, 9, RGB_RED - createvisualtask AnimTask_ShakeMon2, 5, 4, 6, 0, 38, 1 - createvisualtask AnimTask_ShakeMon2, 5, 5, 6, 0, 38, 1 - createvisualtask AnimTask_ShakeMon2, 5, 6, 6, 0, 38, 1 - createvisualtask AnimTask_ShakeMon2, 5, 7, 6, 0, 38, 1 - createvisualtask AnimTask_ShakeMon2, 5, 8, 6, 0, 38, 1 + createvisualtask AnimTask_ShakeMon2, 5, ANIM_PLAYER_LEFT, 6, 0, 38, 1 + createvisualtask AnimTask_ShakeMon2, 5, ANIM_PLAYER_RIGHT, 6, 0, 38, 1 + createvisualtask AnimTask_ShakeMon2, 5, ANIM_OPPONENT_LEFT, 6, 0, 38, 1 + createvisualtask AnimTask_ShakeMon2, 5, ANIM_OPPONENT_RIGHT, 6, 0, 38, 1 + createvisualtask AnimTask_ShakeMon2, 5, ANIM_ATTACKER_FORCE, 6, 0, 38, 1 call SelfDestructExplode call SelfDestructExplode waitforvisualfinish @@ -1624,11 +1624,11 @@ RisingWaterHitEffect: Move_EXPLOSION: loadspritegfx ANIM_TAG_EXPLOSION createsprite gComplexPaletteBlendSpriteTemplate, ANIM_ATTACKER, 2, 1, 8, 9, RGB(26, 8, 8), 8, RGB_BLACK, 8 - createvisualtask AnimTask_ShakeMon2, 5, 4, 8, 0, 40, 1 - createvisualtask AnimTask_ShakeMon2, 5, 5, 8, 0, 40, 1 - createvisualtask AnimTask_ShakeMon2, 5, 6, 8, 0, 40, 1 - createvisualtask AnimTask_ShakeMon2, 5, 7, 8, 0, 40, 1 - createvisualtask AnimTask_ShakeMon2, 5, 8, 8, 0, 40, 1 + createvisualtask AnimTask_ShakeMon2, 5, ANIM_PLAYER_LEFT, 8, 0, 40, 1 + createvisualtask AnimTask_ShakeMon2, 5, ANIM_PLAYER_RIGHT, 8, 0, 40, 1 + createvisualtask AnimTask_ShakeMon2, 5, ANIM_OPPONENT_LEFT, 8, 0, 40, 1 + createvisualtask AnimTask_ShakeMon2, 5, ANIM_OPPONENT_RIGHT, 8, 0, 40, 1 + createvisualtask AnimTask_ShakeMon2, 5, ANIM_ATTACKER_FORCE, 8, 0, 40, 1 call Explosion1 call Explosion1 waitforvisualfinish @@ -1657,12 +1657,12 @@ Explosion1: Move_DEFENSE_CURL: loadspritegfx ANIM_TAG_ECLIPSING_ORB loopsewithpan SE_M_TRI_ATTACK, SOUND_PAN_ATTACKER, 18, 3 - createvisualtask AnimTask_SetGrayscaleOrOriginalPal, 5, ANIM_ATTACKER, 0 + createvisualtask AnimTask_SetGrayscaleOrOriginalPal, 5, ANIM_ATTACKER, FALSE createvisualtask AnimTask_DefenseCurlDeformMon, 5 waitforvisualfinish createsprite gEclipsingOrbSpriteTemplate, ANIM_ATTACKER, 2, 0, 6, 0, 1 waitforvisualfinish - createvisualtask AnimTask_SetGrayscaleOrOriginalPal, 5, ANIM_ATTACKER, 1 + createvisualtask AnimTask_SetGrayscaleOrOriginalPal, 5, ANIM_ATTACKER, TRUE waitforvisualfinish end @@ -1709,7 +1709,7 @@ Frustration_Continue: Frustration_Strongest: playsewithpan SE_M_DRAGON_RAGE, SOUND_PAN_ATTACKER createvisualtask AnimTask_ShakeMon2, 5, ANIM_ATTACKER, 1, 0, 15, 1 - createvisualtask AnimTask_BlendBattleAnimPal, 10, 2, 3, 0, 9, 31 + createvisualtask AnimTask_BlendBattleAnimPal, 10, 2, 3, 0, 9, RGB_RED waitforvisualfinish delay 20 playsewithpan SE_M_SWAGGER2, SOUND_PAN_ATTACKER @@ -1740,12 +1740,12 @@ Frustration_Strongest: createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 3, 18, -18, ANIM_TARGET, 0 playsewithpan SE_M_COMET_PUNCH, SOUND_PAN_TARGET waitforvisualfinish - createvisualtask AnimTask_BlendBattleAnimPal, 10, 2, 3, 9, 0, 31 + createvisualtask AnimTask_BlendBattleAnimPal, 10, 2, 3, 9, 0, RGB_RED goto Frustration_Continue Frustration_Strong: playsewithpan SE_M_DRAGON_RAGE, SOUND_PAN_ATTACKER createvisualtask AnimTask_ShakeMon2, 5, ANIM_ATTACKER, 1, 0, 15, 1 - createvisualtask AnimTask_BlendBattleAnimPal, 10, 2, 3, 0, 9, 31 + createvisualtask AnimTask_BlendBattleAnimPal, 10, 2, 3, 0, 9, RGB_RED waitforvisualfinish delay 20 playsewithpan SE_M_SWAGGER2, SOUND_PAN_ATTACKER @@ -1766,7 +1766,7 @@ Frustration_Strong: createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 3, -12, -6, ANIM_TARGET, 1 createvisualtask AnimTask_ShakeMon2, 5, ANIM_TARGET, 4, 0, 6, 1 waitforvisualfinish - createvisualtask AnimTask_BlendBattleAnimPal, 10, 2, 3, 9, 0, 31 + createvisualtask AnimTask_BlendBattleAnimPal, 10, 2, 3, 9, 0, RGB_RED goto Frustration_Continue Frustration_Medium: playsewithpan SE_M_SWAGGER2, SOUND_PAN_ATTACKER @@ -2597,8 +2597,8 @@ Move_LOW_KICK: end Move_EARTHQUAKE: - createvisualtask AnimTask_HorizontalShake, 5, (MAX_BATTLERS_COUNT + 1), 10, 50 - createvisualtask AnimTask_HorizontalShake, 5, MAX_BATTLERS_COUNT, 10, 50 + createvisualtask AnimTask_HorizontalShake, 5, ANIM_PLAYER_RIGHT, 10, 50 + createvisualtask AnimTask_HorizontalShake, 5, ANIM_PLAYER_LEFT, 10, 50 playsewithpan SE_M_EARTHQUAKE, 0 delay 10 createsprite gComplexPaletteBlendSpriteTemplate, ANIM_ATTACKER, 2, 1, 3, 1, RGB_BLACK, 14, RGB_WHITE, 14 @@ -2608,7 +2608,7 @@ Move_EARTHQUAKE: Move_FISSURE: loadspritegfx ANIM_TAG_MUD_SAND - createvisualtask AnimTask_HorizontalShake, 3, (MAX_BATTLERS_COUNT + 1), 10, 50 + createvisualtask AnimTask_HorizontalShake, 3, ANIM_PLAYER_RIGHT, 10, 50 createvisualtask AnimTask_HorizontalShake, 3, ANIM_TARGET, 10, 50 playsewithpan SE_M_EARTHQUAKE, SOUND_PAN_TARGET delay 8 @@ -2953,7 +2953,7 @@ SkyAttackSetUpAgainstPartner: delay 20 createvisualtask AnimTask_BlendBattleAnimPal, 10, 2, 1, 15, 0, RGB_WHITE waitforvisualfinish - createvisualtask AnimTask_BlendBattleAnimPalExclude, 10, 4, 1, 8, 0, RGB_BLACK + createvisualtask AnimTask_BlendBattleAnimPalExclude, 10, ANIM_PLAYER_LEFT, 1, 8, 0, RGB_BLACK waitforvisualfinish clearmonbg ANIM_DEF_PARTNER blendoff @@ -3182,15 +3182,15 @@ Move_DESTINY_BOND: playsewithpan SE_M_CONFUSE_RAY, SOUND_PAN_ATTACKER delay 48 createvisualtask AnimTask_ShakeMonInPlace, 2, ANIM_ATTACKER, 2, 0, 24, 1 - createvisualtask AnimTask_BlendBattleAnimPalExclude, 2, 6, 1, 0, 12, RGB(29, 29, 29) + createvisualtask AnimTask_BlendBattleAnimPalExclude, 2, ANIM_OPPONENT_LEFT, 1, 0, 12, RGB(29, 29, 29) delay 24 - createvisualtask AnimTask_BlendBattleAnimPalExclude, 2, 6, 1, 12, 0, RGB(29, 29, 29) + createvisualtask AnimTask_BlendBattleAnimPalExclude, 2, ANIM_OPPONENT_LEFT, 1, 12, 0, RGB(29, 29, 29) playsewithpan SE_M_NIGHTMARE, SOUND_PAN_TARGET waitforvisualfinish restorebg waitbgfadein blendoff - clearmonbg 5 + clearmonbg ANIM_PLAYER_RIGHT end Move_ENDURE: @@ -3323,13 +3323,13 @@ Move_MAGNITUDE: MagnitudeEnd: end MagnitudeRegular: - createvisualtask AnimTask_HorizontalShake, 5, (MAX_BATTLERS_COUNT + 1), 0, 50 - createvisualtask AnimTask_HorizontalShake, 5, MAX_BATTLERS_COUNT, 0, 50 + createvisualtask AnimTask_HorizontalShake, 5, ANIM_PLAYER_RIGHT, 0, 50 + createvisualtask AnimTask_HorizontalShake, 5, ANIM_PLAYER_LEFT, 0, 50 loopsewithpan SE_M_STRENGTH, SOUND_PAN_TARGET, 8, 10 goto MagnitudeEnd MagnitudeIntense: - createvisualtask AnimTask_HorizontalShake, 5, (MAX_BATTLERS_COUNT + 1), 0, 50 - createvisualtask AnimTask_HorizontalShake, 5, MAX_BATTLERS_COUNT, 0, 50 + createvisualtask AnimTask_HorizontalShake, 5, ANIM_PLAYER_RIGHT, 0, 50 + createvisualtask AnimTask_HorizontalShake, 5, ANIM_PLAYER_LEFT, 0, 50 loopsewithpan SE_M_STRENGTH, SOUND_PAN_TARGET, 8, 10 delay 10 createsprite gComplexPaletteBlendSpriteTemplate, ANIM_ATTACKER, 2, 1, 3, 1, RGB_BLACK, 14, RGB_WHITE, 14 @@ -3814,8 +3814,8 @@ Move_ERUPTION: createsprite gEruptionFallingRockSpriteTemplate, ANIM_ATTACKER, 40, 110, -32, 64, 50, 0 createsprite gEruptionFallingRockSpriteTemplate, ANIM_ATTACKER, 40, 60, -32, 80, 70, 1 delay 22 - createvisualtask AnimTask_HorizontalShake, 5, (MAX_BATTLERS_COUNT + 1), 8, 60 - createvisualtask AnimTask_HorizontalShake, 5, MAX_BATTLERS_COUNT, 8, 60 + createvisualtask AnimTask_HorizontalShake, 5, ANIM_PLAYER_RIGHT, 8, 60 + createvisualtask AnimTask_HorizontalShake, 5, ANIM_PLAYER_LEFT, 8, 60 loopsewithpan SE_M_ROCK_THROW, SOUND_PAN_TARGET, 16, 12 delay 80 createsprite gSimplePaletteBlendSpriteTemplate, ANIM_ATTACKER, 40, 31, 4, 4, 0, RGB_RED @@ -3845,7 +3845,7 @@ Move_IMPRISON: waitforvisualfinish delay 4 createsprite gRedXSpriteTemplate, ANIM_ATTACKER, 5, ANIM_ATTACKER, 40 - createvisualtask AnimTask_HorizontalShake, 5, MAX_BATTLERS_COUNT, 1, 10 + createvisualtask AnimTask_HorizontalShake, 5, ANIM_PLAYER_LEFT, 1, 10 playsewithpan SE_M_HYPER_BEAM, SOUND_PAN_ATTACKER clearmonbg ANIM_DEF_PARTNER call UnsetPsychicBackground @@ -3915,27 +3915,27 @@ Move_LUSTER_PURGE: playsewithpan SE_M_SOLAR_BEAM, SOUND_PAN_ATTACKER createsprite gLusterPurgeCircleSpriteTemplate, ANIM_ATTACKER, 41, 0, 0, 0, 0 delay 20 - createvisualtask AnimTask_BlendBattleAnimPalExclude, 5, 5, 2, 0, 16, RGB_WHITEALPHA + createvisualtask AnimTask_BlendBattleAnimPalExclude, 5, ANIM_PLAYER_RIGHT, 2, 0, 16, RGB_WHITEALPHA createvisualtask AnimTask_BlendParticle, 5, ANIM_TAG_WHITE_CIRCLE_OF_LIGHT, 2, 0, 16, RGB_WHITEALPHA waitforvisualfinish createvisualtask AnimTask_BlendParticle, 5, ANIM_TAG_IMPACT, 0, 12, 12, RGB(0, 0, 23) waitforvisualfinish - createsprite gRandomPosHitSplatSpriteTemplate, ANIM_TARGET, 3, 1, 2 + createsprite gRandomPosHitSplatSpriteTemplate, ANIM_TARGET, 3, ANIM_TARGET, 2 createvisualtask SoundTask_PlaySE1WithPanning, 5, SE_M_HYPER_BEAM, SOUND_PAN_TARGET delay 3 - createsprite gRandomPosHitSplatSpriteTemplate, ANIM_TARGET, 3, 1, 2 + createsprite gRandomPosHitSplatSpriteTemplate, ANIM_TARGET, 3, ANIM_TARGET, 2 createvisualtask SoundTask_PlaySE1WithPanning, 5, SE_M_HYPER_BEAM, SOUND_PAN_TARGET delay 3 - createsprite gRandomPosHitSplatSpriteTemplate, ANIM_TARGET, 3, 1, 2 + createsprite gRandomPosHitSplatSpriteTemplate, ANIM_TARGET, 3, ANIM_TARGET, 2 createvisualtask SoundTask_PlaySE1WithPanning, 5, SE_M_HYPER_BEAM, SOUND_PAN_TARGET delay 3 - createsprite gRandomPosHitSplatSpriteTemplate, ANIM_TARGET, 3, 1, 2 + createsprite gRandomPosHitSplatSpriteTemplate, ANIM_TARGET, 3, ANIM_TARGET, 2 createvisualtask SoundTask_PlaySE1WithPanning, 5, SE_M_HYPER_BEAM, SOUND_PAN_TARGET delay 3 - createsprite gRandomPosHitSplatSpriteTemplate, ANIM_TARGET, 3, 1, 2 + createsprite gRandomPosHitSplatSpriteTemplate, ANIM_TARGET, 3, ANIM_TARGET, 2 createvisualtask SoundTask_PlaySE1WithPanning, 5, SE_M_HYPER_BEAM, SOUND_PAN_TARGET delay 3 - createsprite gRandomPosHitSplatSpriteTemplate, ANIM_TARGET, 3, 1, 2 + createsprite gRandomPosHitSplatSpriteTemplate, ANIM_TARGET, 3, ANIM_TARGET, 2 createvisualtask SoundTask_PlaySE1WithPanning, 5, SE_M_HYPER_BEAM, SOUND_PAN_TARGET waitforvisualfinish createvisualtask AnimTask_BlendBattleAnimPalExclude, 5, 5, 2, 16, 0, RGB_WHITEALPHA @@ -4360,7 +4360,7 @@ Move_AERIAL_ACE: Move_IRON_DEFENSE: loopsewithpan SE_SHINY, SOUND_PAN_ATTACKER, 28, 2 - createvisualtask AnimTask_MetallicShine, 5, 0, 0, 0 + createvisualtask AnimTask_MetallicShine, 5, 0, 0, RGB_BLACK createsprite gComplexPaletteBlendSpriteTemplate, ANIM_ATTACKER, 2, 1, 8, 2, RGB_WHITEALPHA, 14, RGB_WHITEALPHA, 0 waitforvisualfinish end @@ -4373,7 +4373,7 @@ Move_BLOCK: Move_HOWL: loadspritegfx ANIM_TAG_NOISE_LINE - createvisualtask AnimTask_DeepInhale, 2, 0 + createvisualtask AnimTask_DeepInhale, 2, ANIM_ATTACKER delay 12 call RoarEffect createvisualtask SoundTask_PlayCryHighPitch, 2, ANIM_ATTACKER, 3 @@ -4572,7 +4572,7 @@ Move_SHOCK_WAVE: Move_HARDEN: loopsewithpan SE_M_HARDEN, SOUND_PAN_ATTACKER, 28, 2 - createvisualtask AnimTask_MetallicShine, 5, 0, 0, 0 + createvisualtask AnimTask_MetallicShine, 5, 0, 0, RGB_BLACK waitforvisualfinish end @@ -5269,14 +5269,14 @@ Move_DRAGON_RAGE: Move_RAIN_DANCE: loadspritegfx ANIM_TAG_RAIN_DROPS playsewithpan SE_M_RAIN_DANCE, SOUND_PAN_ATTACKER - createvisualtask AnimTask_BlendBattleAnimPal, 10, 0x781, 2, 0, 4, RGB_BLACK + createvisualtask AnimTask_BlendBattleAnimPal, 10, 1 | (0xF << 7), 2, 0, 4, RGB_BLACK waitforvisualfinish createvisualtask AnimTask_CreateRaindrops, 2, 0, 3, 120 createvisualtask AnimTask_CreateRaindrops, 2, 0, 3, 120 delay 120 delay 30 waitforvisualfinish - createvisualtask AnimTask_BlendBattleAnimPal, 10, 0x781, 2, 4, 0, RGB_BLACK + createvisualtask AnimTask_BlendBattleAnimPal, 10, 1 | (0xF << 7), 2, 4, 0, RGB_BLACK waitforvisualfinish end @@ -6721,7 +6721,7 @@ Move_SUNNY_DAY: loadspritegfx ANIM_TAG_SUNLIGHT monbg ANIM_ATK_PARTNER setalpha 13, 3 - createvisualtask AnimTask_BlendBattleAnimPal, 10, 0x781, 1, 0, 6, RGB_WHITE + createvisualtask AnimTask_BlendBattleAnimPal, 10, 1 | (0xF << 7), 1, 0, 6, RGB_WHITE waitforvisualfinish panse_adjustnone SE_M_PETAL_DANCE, SOUND_PAN_ATTACKER, SOUND_PAN_TARGET, +1, 0 call SunnyDayLightRay @@ -6729,7 +6729,7 @@ Move_SUNNY_DAY: call SunnyDayLightRay call SunnyDayLightRay waitforvisualfinish - createvisualtask AnimTask_BlendBattleAnimPal, 10, 0x781, 1, 6, 0, RGB_WHITE + createvisualtask AnimTask_BlendBattleAnimPal, 10, 1 | (0xF << 7), 1, 6, 0, RGB_WHITE waitforvisualfinish clearmonbg ANIM_ATK_PARTNER blendoff @@ -6945,9 +6945,9 @@ Move_HAZE: playsewithpan SE_M_HAZE, 0 createvisualtask AnimTask_HazeScrollingFog, 5 delay 30 - createvisualtask AnimTask_BlendBattleAnimPal, 10, 0x780, 2, 0, 16, RGB_BLACK + createvisualtask AnimTask_BlendBattleAnimPal, 10, 0 | (0xF << 7), 2, 0, 16, RGB_BLACK delay 90 - createvisualtask AnimTask_BlendBattleAnimPal, 10, 0x780, 1, 16, 0, RGB_BLACK + createvisualtask AnimTask_BlendBattleAnimPal, 10, 0 | (0xF << 7), 1, 16, 0, RGB_BLACK end Move_FIRE_PUNCH: @@ -7219,7 +7219,7 @@ Move_STEEL_WING: loadspritegfx ANIM_TAG_GUST loadspritegfx ANIM_TAG_IMPACT loopsewithpan SE_M_HARDEN, SOUND_PAN_ATTACKER, 28, 2 - createvisualtask AnimTask_MetallicShine, 5, 0, 0, 0 + createvisualtask AnimTask_MetallicShine, 5, 0, 0, RGB_BLACK waitforvisualfinish monbg ANIM_DEF_PARTNER splitbgprio ANIM_TARGET @@ -7245,7 +7245,7 @@ Move_STEEL_WING: Move_IRON_TAIL: loadspritegfx ANIM_TAG_IMPACT loopsewithpan SE_M_HARDEN, SOUND_PAN_ATTACKER, 28, 2 - createvisualtask AnimTask_MetallicShine, 5, 1, 0, 0 + createvisualtask AnimTask_MetallicShine, 5, 1, 0, RGB_BLACK waitforvisualfinish monbg ANIM_TARGET setalpha 12, 8 @@ -7255,7 +7255,7 @@ Move_IRON_TAIL: createvisualtask AnimTask_ShakeMon, 2, ANIM_TARGET, 3, 0, 6, 1 playsewithpan SE_M_VITAL_THROW2, SOUND_PAN_TARGET waitforvisualfinish - createvisualtask AnimTask_SetGrayscaleOrOriginalPal, 5, ANIM_ATTACKER, 1 + createvisualtask AnimTask_SetGrayscaleOrOriginalPal, 5, ANIM_ATTACKER, TRUE clearmonbg ANIM_TARGET blendoff waitforvisualfinish @@ -7275,7 +7275,7 @@ Move_POISON_TAIL: createvisualtask AnimTask_ShakeMon, 2, ANIM_TARGET, 3, 0, 6, 1 playsewithpan SE_M_VITAL_THROW2, SOUND_PAN_TARGET waitforvisualfinish - createvisualtask AnimTask_SetGrayscaleOrOriginalPal, 5, ANIM_ATTACKER, 1 + createvisualtask AnimTask_SetGrayscaleOrOriginalPal, 5, ANIM_ATTACKER, TRUE clearmonbg ANIM_TARGET blendoff call PoisonBubblesEffect @@ -7285,7 +7285,7 @@ Move_POISON_TAIL: Move_METAL_CLAW: loadspritegfx ANIM_TAG_CLAW_SLASH loopsewithpan SE_M_HARDEN, SOUND_PAN_ATTACKER, 28, 2 - createvisualtask AnimTask_MetallicShine, 5, 0, 0, 0 + createvisualtask AnimTask_MetallicShine, 5, 0, 0, RGB_BLACK waitforvisualfinish createsprite gHorizontalLungeSpriteTemplate, ANIM_ATTACKER, 2, 6, 4 delay 2 @@ -7740,12 +7740,12 @@ Move_HEAL_BELL: unloadspritegfx ANIM_TAG_SPARKLE_2 loadspritegfx ANIM_TAG_THIN_RING playsewithpan SE_SHINY, SOUND_PAN_ATTACKER - createvisualtask AnimTask_BlendBattleAnimPalExclude, 10, 4, 3, 10, 0, RGB(12, 24, 30) + createvisualtask AnimTask_BlendBattleAnimPalExclude, 10, ANIM_PLAYER_LEFT, 3, 10, 0, RGB(12, 24, 30) createvisualtask AnimTask_BlendBattleAnimPal, 10, 10, 3, 10, 0, RGB_WHITE createsprite gBlendThinRingExpandingSpriteTemplate, ANIM_ATTACKER, 16, 0, 0, 0, 1 end HealBellRing: - createvisualtask AnimTask_BlendBattleAnimPalExclude, 10, 4, 3, 8, 0, RGB(12, 24, 30) + createvisualtask AnimTask_BlendBattleAnimPalExclude, 10, ANIM_PLAYER_LEFT, 3, 8, 0, RGB(12, 24, 30) createvisualtask AnimTask_BlendBattleAnimPal, 10, 10, 3, 2, 10, RGB_WHITE createsprite gThinRingExpandingSpriteTemplate, ANIM_ATTACKER, 40, 0, -24, 0, 1 playsewithpan SE_M_HEAL_BELL, SOUND_PAN_ATTACKER @@ -7947,16 +7947,16 @@ Move_PERISH_SONG: panse SE_M_PERISH_SONG, SOUND_PAN_ATTACKER, SOUND_PAN_TARGET, +2, 0 delay 80 createsprite gSimplePaletteBlendSpriteTemplate, ANIM_ATTACKER, 2, 1, 3, 0, 16, RGB_BLACK - createvisualtask AnimTask_SetGrayscaleOrOriginalPal, 5, 4, 0 - createvisualtask AnimTask_SetGrayscaleOrOriginalPal, 5, 5, 0 - createvisualtask AnimTask_SetGrayscaleOrOriginalPal, 5, 6, 0 - createvisualtask AnimTask_SetGrayscaleOrOriginalPal, 5, 7, 0 + createvisualtask AnimTask_SetGrayscaleOrOriginalPal, 5, ANIM_PLAYER_LEFT, FALSE + createvisualtask AnimTask_SetGrayscaleOrOriginalPal, 5, ANIM_PLAYER_RIGHT, FALSE + createvisualtask AnimTask_SetGrayscaleOrOriginalPal, 5, ANIM_OPPONENT_LEFT, FALSE + createvisualtask AnimTask_SetGrayscaleOrOriginalPal, 5, ANIM_OPPONENT_RIGHT, FALSE delay 100 createsprite gSimplePaletteBlendSpriteTemplate, ANIM_ATTACKER, 2, 1, 3, 16, 0, RGB_BLACK - createvisualtask AnimTask_SetGrayscaleOrOriginalPal, 5, 4, 1 - createvisualtask AnimTask_SetGrayscaleOrOriginalPal, 5, 5, 1 - createvisualtask AnimTask_SetGrayscaleOrOriginalPal, 5, 6, 1 - createvisualtask AnimTask_SetGrayscaleOrOriginalPal, 5, 7, 1 + createvisualtask AnimTask_SetGrayscaleOrOriginalPal, 5, ANIM_PLAYER_LEFT, TRUE + createvisualtask AnimTask_SetGrayscaleOrOriginalPal, 5, ANIM_PLAYER_RIGHT, TRUE + createvisualtask AnimTask_SetGrayscaleOrOriginalPal, 5, ANIM_OPPONENT_LEFT, TRUE + createvisualtask AnimTask_SetGrayscaleOrOriginalPal, 5, ANIM_OPPONENT_RIGHT, TRUE waitforvisualfinish end @@ -8102,7 +8102,7 @@ Move_ENCORE: loadspritegfx ANIM_TAG_SPOTLIGHT loadspritegfx ANIM_TAG_TAG_HAND createvisualtask AnimTask_CreateSpotlight, 2 - createvisualtask AnimTask_HardwarePaletteFade, 2, 248, 3, 0, 10, 0 + createvisualtask AnimTask_HardwarePaletteFade, 2, BLDCNT_TGT1_BG3 | BLDCNT_TGT1_OBJ | BLDCNT_TGT1_BD | BLDCNT_EFFECT_DARKEN, 3, 0, 10, FALSE waitforvisualfinish createsprite gSpotlightSpriteTemplate, ANIM_TARGET, 2, 0, -8 createsprite gClappingHandSpriteTemplate, ANIM_ATTACKER, 2, -2, 0, 0, 0, 9 @@ -8113,7 +8113,7 @@ Move_ENCORE: createvisualtask SoundTask_PlaySE2WithPanning, 5, SE_M_ENCORE2, SOUND_PAN_TARGET createvisualtask AnimTask_SwayMon, 5, 1, 8, 1536, 5, ANIM_TARGET waitforvisualfinish - createvisualtask AnimTask_HardwarePaletteFade, 2, 248, 3, 10, 0, 1 + createvisualtask AnimTask_HardwarePaletteFade, 2, BLDCNT_TGT1_BG3 | BLDCNT_TGT1_OBJ | BLDCNT_TGT1_BD | BLDCNT_EFFECT_DARKEN, 3, 10, 0, TRUE waitforvisualfinish createvisualtask AnimTask_RemoveSpotlight, 2 end @@ -8288,7 +8288,7 @@ Move_MORNING_SUN: loadspritegfx ANIM_TAG_BLUE_STAR createvisualtask AnimTask_MorningSunLightBeam, 5 delay 8 - createvisualtask AnimTask_BlendBattleAnimPal, 10, 0x781, 8, 0, 12, RGB_WHITE + createvisualtask AnimTask_BlendBattleAnimPal, 10, 1 | (0xF << 7), 8, 0, 12, RGB_WHITE delay 14 call MorningSunStar call MorningSunStar @@ -8305,7 +8305,7 @@ Move_MORNING_SUN: call MorningSunStar call MorningSunStar call MorningSunStar - createvisualtask AnimTask_BlendBattleAnimPal, 10, 0x781, 3, 12, 0, RGB_WHITE + createvisualtask AnimTask_BlendBattleAnimPal, 10, 1 | (0xF << 7), 3, 12, 0, RGB_WHITE waitforvisualfinish waitsound call HealingEffect @@ -8364,7 +8364,7 @@ Move_HYPER_BEAM: delay 30 createsoundtask SoundTask_LoopSEAdjustPanning, SE_M_HYPER_BEAM2, SOUND_PAN_ATTACKER, SOUND_PAN_TARGET, 1, 15, 0, 5 createvisualtask AnimTask_ShakeMon, 2, ANIM_ATTACKER, 0, 4, 50, 1 - createvisualtask AnimTask_FlashAnimTagWithColor, 2, ANIM_TAG_ORBS, 1, 12, RGB(31, 0, 0), 16, 0, 0 + createvisualtask AnimTask_FlashAnimTagWithColor, 2, ANIM_TAG_ORBS, 1, 12, RGB_RED, 16, 0, 0 call HyperBeamOrbs call HyperBeamOrbs call HyperBeamOrbs @@ -8408,7 +8408,7 @@ Move_FLATTER: loadspritegfx ANIM_TAG_CONFETTI createvisualtask SoundTask_PlaySE2WithPanning, 5, SE_M_ENCORE2, SOUND_PAN_TARGET createvisualtask AnimTask_CreateSpotlight, 2 - createvisualtask AnimTask_HardwarePaletteFade, 2, 248, 3, 0, 10, 0 + createvisualtask AnimTask_HardwarePaletteFade, 2, BLDCNT_TGT1_BG3 | BLDCNT_TGT1_OBJ | BLDCNT_TGT1_BD | BLDCNT_EFFECT_DARKEN, 3, 0, 10, FALSE waitforvisualfinish createsprite gFlatterSpotlightSpriteTemplate, ANIM_TARGET, 2, 0, -8, 80 delay 0 @@ -8439,7 +8439,7 @@ Move_FLATTER: delay 5 createvisualtask SoundTask_PlaySE1WithPanning, 5, SE_M_FLATTER, SOUND_PAN_TARGET waitforvisualfinish - createvisualtask AnimTask_HardwarePaletteFade, 2, 248, 3, 10, 0, 1 + createvisualtask AnimTask_HardwarePaletteFade, 2, BLDCNT_TGT1_BG3 | BLDCNT_TGT1_OBJ | BLDCNT_TGT1_BD | BLDCNT_EFFECT_DARKEN, 3, 10, 0, TRUE waitforvisualfinish createvisualtask AnimTask_RemoveSpotlight, 2 end @@ -9680,10 +9680,10 @@ Move_TWISTER: createvisualtask AnimTask_ShakeMonInPlace, 2, ANIM_TARGET, 3, 0, 12, 1 createvisualtask AnimTask_ShakeMonInPlace, 2, ANIM_DEF_PARTNER, 3, 0, 12, 1 delay 4 - createsprite gRandomPosHitSplatSpriteTemplate, ANIM_TARGET, 3, 1, 3 + createsprite gRandomPosHitSplatSpriteTemplate, ANIM_TARGET, 3, ANIM_TARGET, 3 playsewithpan SE_M_COMET_PUNCH, SOUND_PAN_TARGET delay 4 - createsprite gRandomPosHitSplatSpriteTemplate, ANIM_TARGET, 3, 1, 3 + createsprite gRandomPosHitSplatSpriteTemplate, ANIM_TARGET, 3, ANIM_TARGET, 3 playsewithpan SE_M_COMET_PUNCH, SOUND_PAN_TARGET delay 4 createsprite gBasicHitSplatSpriteTemplate, ANIM_TARGET, 3, 32, 20, ANIM_TARGET, 3 @@ -10505,13 +10505,13 @@ General_FocusBand: General_Rain: loadspritegfx ANIM_TAG_RAIN_DROPS playsewithpan SE_M_RAIN_DANCE, SOUND_PAN_ATTACKER - createvisualtask AnimTask_BlendBattleAnimPal, 10, 0x781, 2, 0, 4, RGB_BLACK + createvisualtask AnimTask_BlendBattleAnimPal, 10, 1 | (0xF << 7), 2, 0, 4, RGB_BLACK waitforvisualfinish createvisualtask AnimTask_CreateRaindrops, 2, 0, 3, 60 createvisualtask AnimTask_CreateRaindrops, 2, 0, 3, 60 delay 50 waitforvisualfinish - createvisualtask AnimTask_BlendBattleAnimPal, 10, 0x781, 2, 4, 0, RGB_BLACK + createvisualtask AnimTask_BlendBattleAnimPal, 10, 1 | (0xF << 7), 2, 4, 0, RGB_BLACK waitforvisualfinish end diff --git a/include/constants/battle_anim.h b/include/constants/battle_anim.h index 2ff9318be0..e478c396a7 100644 --- a/include/constants/battle_anim.h +++ b/include/constants/battle_anim.h @@ -298,10 +298,15 @@ #define ANIM_TAG_BLUE_RING_2 (ANIM_SPRITES_START + 288) // battlers -#define ANIM_ATTACKER 0 -#define ANIM_TARGET 1 -#define ANIM_ATK_PARTNER 2 -#define ANIM_DEF_PARTNER 3 +#define ANIM_ATTACKER 0 +#define ANIM_TARGET 1 +#define ANIM_ATK_PARTNER 2 +#define ANIM_DEF_PARTNER 3 +#define ANIM_PLAYER_LEFT 4 +#define ANIM_PLAYER_RIGHT 5 +#define ANIM_OPPONENT_LEFT 6 +#define ANIM_OPPONENT_RIGHT 7 +#define ANIM_ATTACKER_FORCE 8 // stereo panning constants [0-255] // diff --git a/ld_script_modern.txt b/ld_script_modern.txt index a988fe0cd5..a5977db7b1 100644 --- a/ld_script_modern.txt +++ b/ld_script_modern.txt @@ -49,6 +49,7 @@ SECTIONS { ALIGN(4) { src/rom_header.o(.text*); + src/rom_header_gf.o(.text*); src/*.o(.text*); gflib/*.o(.text*); asm/*.o(.text*); From b7d92e85373b0014487a13aa4f849240f4b0c9d7 Mon Sep 17 00:00:00 2001 From: GriffinR Date: Wed, 18 Jan 2023 12:11:09 -0500 Subject: [PATCH 3/3] Revert incorrect constant usage, add new correct ones --- data/battle_anim_scripts.s | 34 ++++++++++++++++----------------- include/constants/battle_anim.h | 12 +++++++----- src/battle_anim_dark.c | 8 ++++---- src/battle_anim_mon_movement.c | 10 +++++----- 4 files changed, 33 insertions(+), 31 deletions(-) diff --git a/data/battle_anim_scripts.s b/data/battle_anim_scripts.s index 9568a3e5c0..4519761845 100644 --- a/data/battle_anim_scripts.s +++ b/data/battle_anim_scripts.s @@ -2597,8 +2597,8 @@ Move_LOW_KICK: end Move_EARTHQUAKE: - createvisualtask AnimTask_HorizontalShake, 5, ANIM_PLAYER_RIGHT, 10, 50 - createvisualtask AnimTask_HorizontalShake, 5, ANIM_PLAYER_LEFT, 10, 50 + createvisualtask AnimTask_HorizontalShake, 5, (MAX_BATTLERS_COUNT + 1), 10, 50 + createvisualtask AnimTask_HorizontalShake, 5, MAX_BATTLERS_COUNT, 10, 50 playsewithpan SE_M_EARTHQUAKE, 0 delay 10 createsprite gComplexPaletteBlendSpriteTemplate, ANIM_ATTACKER, 2, F_PAL_BG, 3, 1, RGB_BLACK, 14, RGB_WHITE, 14 @@ -2608,7 +2608,7 @@ Move_EARTHQUAKE: Move_FISSURE: loadspritegfx ANIM_TAG_MUD_SAND - createvisualtask AnimTask_HorizontalShake, 3, ANIM_PLAYER_RIGHT, 10, 50 + createvisualtask AnimTask_HorizontalShake, 3, (MAX_BATTLERS_COUNT + 1), 10, 50 createvisualtask AnimTask_HorizontalShake, 3, ANIM_TARGET, 10, 50 playsewithpan SE_M_EARTHQUAKE, SOUND_PAN_TARGET delay 8 @@ -2953,7 +2953,7 @@ SkyAttackSetUpAgainstPartner: delay 20 createvisualtask AnimTask_BlendBattleAnimPal, 10, F_PAL_ATTACKER, 1, 15, 0, RGB_WHITE waitforvisualfinish - createvisualtask AnimTask_BlendBattleAnimPalExclude, 10, ANIM_PLAYER_LEFT, 1, 8, 0, RGB_BLACK + createvisualtask AnimTask_BlendBattleAnimPalExclude, 10, 4, 1, 8, 0, RGB_BLACK waitforvisualfinish clearmonbg ANIM_DEF_PARTNER blendoff @@ -3182,15 +3182,15 @@ Move_DESTINY_BOND: playsewithpan SE_M_CONFUSE_RAY, SOUND_PAN_ATTACKER delay 48 createvisualtask AnimTask_ShakeMonInPlace, 2, ANIM_ATTACKER, 2, 0, 24, 1 - createvisualtask AnimTask_BlendBattleAnimPalExclude, 2, ANIM_OPPONENT_LEFT, 1, 0, 12, RGB(29, 29, 29) + createvisualtask AnimTask_BlendBattleAnimPalExclude, 2, 6, 1, 0, 12, RGB(29, 29, 29) delay 24 - createvisualtask AnimTask_BlendBattleAnimPalExclude, 2, ANIM_OPPONENT_LEFT, 1, 12, 0, RGB(29, 29, 29) + createvisualtask AnimTask_BlendBattleAnimPalExclude, 2, 6, 1, 12, 0, RGB(29, 29, 29) playsewithpan SE_M_NIGHTMARE, SOUND_PAN_TARGET waitforvisualfinish restorebg waitbgfadein blendoff - clearmonbg ANIM_PLAYER_RIGHT + clearmonbg 5 end Move_ENDURE: @@ -3323,13 +3323,13 @@ Move_MAGNITUDE: MagnitudeEnd: end MagnitudeRegular: - createvisualtask AnimTask_HorizontalShake, 5, ANIM_PLAYER_RIGHT, 0, 50 - createvisualtask AnimTask_HorizontalShake, 5, ANIM_PLAYER_LEFT, 0, 50 + createvisualtask AnimTask_HorizontalShake, 5, (MAX_BATTLERS_COUNT + 1), 0, 50 + createvisualtask AnimTask_HorizontalShake, 5, MAX_BATTLERS_COUNT, 0, 50 loopsewithpan SE_M_STRENGTH, SOUND_PAN_TARGET, 8, 10 goto MagnitudeEnd MagnitudeIntense: - createvisualtask AnimTask_HorizontalShake, 5, ANIM_PLAYER_RIGHT, 0, 50 - createvisualtask AnimTask_HorizontalShake, 5, ANIM_PLAYER_LEFT, 0, 50 + createvisualtask AnimTask_HorizontalShake, 5, (MAX_BATTLERS_COUNT + 1), 0, 50 + createvisualtask AnimTask_HorizontalShake, 5, MAX_BATTLERS_COUNT, 0, 50 loopsewithpan SE_M_STRENGTH, SOUND_PAN_TARGET, 8, 10 delay 10 createsprite gComplexPaletteBlendSpriteTemplate, ANIM_ATTACKER, 2, F_PAL_BG, 3, 1, RGB_BLACK, 14, RGB_WHITE, 14 @@ -3814,8 +3814,8 @@ Move_ERUPTION: createsprite gEruptionFallingRockSpriteTemplate, ANIM_ATTACKER, 40, 110, -32, 64, 50, 0 createsprite gEruptionFallingRockSpriteTemplate, ANIM_ATTACKER, 40, 60, -32, 80, 70, 1 delay 22 - createvisualtask AnimTask_HorizontalShake, 5, ANIM_PLAYER_RIGHT, 8, 60 - createvisualtask AnimTask_HorizontalShake, 5, ANIM_PLAYER_LEFT, 8, 60 + createvisualtask AnimTask_HorizontalShake, 5, (MAX_BATTLERS_COUNT + 1), 8, 60 + createvisualtask AnimTask_HorizontalShake, 5, MAX_BATTLERS_COUNT, 8, 60 loopsewithpan SE_M_ROCK_THROW, SOUND_PAN_TARGET, 16, 12 delay 80 createsprite gSimplePaletteBlendSpriteTemplate, ANIM_ATTACKER, 40, F_PAL_BG | F_PAL_BATTLERS, 4, 4, 0, RGB_RED @@ -3845,7 +3845,7 @@ Move_IMPRISON: waitforvisualfinish delay 4 createsprite gRedXSpriteTemplate, ANIM_ATTACKER, 5, ANIM_ATTACKER, 40 - createvisualtask AnimTask_HorizontalShake, 5, ANIM_PLAYER_LEFT, 1, 10 + createvisualtask AnimTask_HorizontalShake, 5, MAX_BATTLERS_COUNT, 1, 10 playsewithpan SE_M_HYPER_BEAM, SOUND_PAN_ATTACKER clearmonbg ANIM_DEF_PARTNER call UnsetPsychicBackground @@ -3915,7 +3915,7 @@ Move_LUSTER_PURGE: playsewithpan SE_M_SOLAR_BEAM, SOUND_PAN_ATTACKER createsprite gLusterPurgeCircleSpriteTemplate, ANIM_ATTACKER, 41, 0, 0, 0, 0 delay 20 - createvisualtask AnimTask_BlendBattleAnimPalExclude, 5, ANIM_PLAYER_RIGHT, 2, 0, 16, RGB_WHITEALPHA + createvisualtask AnimTask_BlendBattleAnimPalExclude, 5, 5, 2, 0, 16, RGB_WHITEALPHA createvisualtask AnimTask_BlendParticle, 5, ANIM_TAG_WHITE_CIRCLE_OF_LIGHT, 2, 0, 16, RGB_WHITEALPHA waitforvisualfinish createvisualtask AnimTask_BlendParticle, 5, ANIM_TAG_IMPACT, 0, 12, 12, RGB(0, 0, 23) @@ -7740,12 +7740,12 @@ Move_HEAL_BELL: unloadspritegfx ANIM_TAG_SPARKLE_2 loadspritegfx ANIM_TAG_THIN_RING playsewithpan SE_SHINY, SOUND_PAN_ATTACKER - createvisualtask AnimTask_BlendBattleAnimPalExclude, 10, ANIM_PLAYER_LEFT, 3, 10, 0, RGB(12, 24, 30) + createvisualtask AnimTask_BlendBattleAnimPalExclude, 10, 4, 3, 10, 0, RGB(12, 24, 30) createvisualtask AnimTask_BlendBattleAnimPal, 10, F_PAL_ATK_SIDE, 3, 10, 0, RGB_WHITE createsprite gBlendThinRingExpandingSpriteTemplate, ANIM_ATTACKER, 16, 0, 0, 0, 1 end HealBellRing: - createvisualtask AnimTask_BlendBattleAnimPalExclude, 10, ANIM_PLAYER_LEFT, 3, 8, 0, RGB(12, 24, 30) + createvisualtask AnimTask_BlendBattleAnimPalExclude, 10, 4, 3, 8, 0, RGB(12, 24, 30) createvisualtask AnimTask_BlendBattleAnimPal, 10, F_PAL_ATK_SIDE, 3, 2, 10, RGB_WHITE createsprite gThinRingExpandingSpriteTemplate, ANIM_ATTACKER, 40, 0, -24, 0, 1 playsewithpan SE_M_HEAL_BELL, SOUND_PAN_ATTACKER diff --git a/include/constants/battle_anim.h b/include/constants/battle_anim.h index 3952f8acde..c1cb42a41d 100644 --- a/include/constants/battle_anim.h +++ b/include/constants/battle_anim.h @@ -302,11 +302,13 @@ #define ANIM_TARGET 1 #define ANIM_ATK_PARTNER 2 #define ANIM_DEF_PARTNER 3 -#define ANIM_PLAYER_LEFT 4 -#define ANIM_PLAYER_RIGHT 5 -#define ANIM_OPPONENT_LEFT 6 -#define ANIM_OPPONENT_RIGHT 7 -#define ANIM_ATTACKER_FORCE 8 + +// Below are used by AnimTask_ShakeMon2 and AnimTask_SetGrayscaleOrOriginalPal +#define ANIM_PLAYER_LEFT (MAX_BATTLERS_COUNT + 0) +#define ANIM_PLAYER_RIGHT (MAX_BATTLERS_COUNT + 1) +#define ANIM_OPPONENT_LEFT (MAX_BATTLERS_COUNT + 2) +#define ANIM_OPPONENT_RIGHT (MAX_BATTLERS_COUNT + 3) +#define ANIM_ATTACKER_FORCE (MAX_BATTLERS_COUNT + 4) // stereo panning constants [0-255] // diff --git a/src/battle_anim_dark.c b/src/battle_anim_dark.c index deedccc6a9..03df99e135 100644 --- a/src/battle_anim_dark.c +++ b/src/battle_anim_dark.c @@ -943,19 +943,19 @@ void AnimTask_SetGrayscaleOrOriginalPal(u8 taskId) case ANIM_DEF_PARTNER: spriteId = GetAnimBattlerSpriteId(gBattleAnimArgs[0]); break; - case 4: + case ANIM_PLAYER_LEFT: position = B_POSITION_PLAYER_LEFT; calcSpriteId = TRUE; break; - case 5: + case ANIM_PLAYER_RIGHT: position = B_POSITION_PLAYER_RIGHT; calcSpriteId = TRUE; break; - case 6: + case ANIM_OPPONENT_LEFT: position = B_POSITION_OPPONENT_LEFT; calcSpriteId = TRUE; break; - case 7: + case ANIM_OPPONENT_RIGHT: position = B_POSITION_OPPONENT_RIGHT; calcSpriteId = TRUE; break; diff --git a/src/battle_anim_mon_movement.c b/src/battle_anim_mon_movement.c index 8a11c2c5b5..247aba1a42 100644 --- a/src/battle_anim_mon_movement.c +++ b/src/battle_anim_mon_movement.c @@ -164,20 +164,20 @@ void AnimTask_ShakeMon2(u8 taskId) if (spriteId == SPRITE_NONE) abort = TRUE; } - else if (gBattleAnimArgs[0] != 8) + else if (gBattleAnimArgs[0] != ANIM_ATTACKER_FORCE) { switch (gBattleAnimArgs[0]) { - case 4: + case ANIM_PLAYER_LEFT: battlerId = GetBattlerAtPosition(B_POSITION_PLAYER_LEFT); break; - case 5: + case ANIM_PLAYER_RIGHT: battlerId = GetBattlerAtPosition(B_POSITION_PLAYER_RIGHT); break; - case 6: + case ANIM_OPPONENT_LEFT: battlerId = GetBattlerAtPosition(B_POSITION_OPPONENT_LEFT); break; - case 7: + case ANIM_OPPONENT_RIGHT: default: battlerId = GetBattlerAtPosition(B_POSITION_OPPONENT_RIGHT); break;