diff --git a/data/battle_anim_scripts.s b/data/battle_anim_scripts.s index 8eaff7c07f..4519761845 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, F_PAL_ATTACKER, 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, F_PAL_BG, 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 @@ -3920,22 +3920,22 @@ Move_LUSTER_PURGE: 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, F_PAL_BG, 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 @@ -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 @@ -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 @@ -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, F_PAL_BG, 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, F_PAL_BG, 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 @@ -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 diff --git a/include/constants/battle_anim.h b/include/constants/battle_anim.h index 00ad083eb5..c1cb42a41d 100644 --- a/include/constants/battle_anim.h +++ b/include/constants/battle_anim.h @@ -298,10 +298,17 @@ #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 + +// 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;