From 4fbe519ba921b6369874b70700540eb792c914d9 Mon Sep 17 00:00:00 2001 From: Alex <93446519+AlexOn1ine@users.noreply.github.com> Date: Mon, 6 Nov 2023 12:31:43 +0100 Subject: [PATCH] Move animations. Credits to Captain-Ford (#3529) Co-authored-by: DizzyEggg <16259973+DizzyEggg@users.noreply.github.com> --- data/battle_anim_scripts.s | 356 ++++++++++++++++++++++++++++-------- src/battle_anim_effects_1.c | 87 ++++++--- src/battle_anim_water.c | 22 +++ 3 files changed, 365 insertions(+), 100 deletions(-) diff --git a/data/battle_anim_scripts.s b/data/battle_anim_scripts.s index 7983f8c23fde..4d726954cbae 100755 --- a/data/battle_anim_scripts.s +++ b/data/battle_anim_scripts.s @@ -4063,58 +4063,57 @@ Move_BUG_BITE: end Move_CHARGE_BEAM: - loadspritegfx ANIM_TAG_BLACK_BALL_2 + loadspritegfx ANIM_TAG_ELECTRIC_ORBS + loadspritegfx ANIM_TAG_CIRCLE_OF_LIGHT + loadspritegfx ANIM_TAG_ELECTRICITY loadspritegfx ANIM_TAG_SPARK_2 - delay 0 - createvisualtask AnimTask_BlendColorCycle, 2, (F_PAL_BG | F_PAL_ATTACKER), -31, 1, 5, 5, RGB(31, 31, 22) - playsewithpan SE_M_THUNDERBOLT2, SOUND_PAN_ATTACKER - createsprite gSparkElectricitySpriteTemplate, ANIM_ATTACKER, 0, 32, 24, 190, 12, 0, 1, 0 - delay 0 - createsprite gSparkElectricitySpriteTemplate, ANIM_ATTACKER, 0, 80, 24, 22, 12, 0, 1, 0 - createsprite gSparkElectricitySpriteTemplate, ANIM_ATTACKER, 0, 156, 24, 121, 13, 0, 1, 1 - delay 0 - createvisualtask AnimTask_BlendColorCycle, 2, (F_PAL_BG | F_PAL_ATTACKER), -31, 1, 0, 0, RGB(31, 31, 22) - delay 10 - createvisualtask AnimTask_BlendColorCycle, 2, (F_PAL_BG | F_PAL_ATTACKER), -31, 1, 5, 5, RGB(31, 31, 22) - playsewithpan SE_M_THUNDERBOLT2, SOUND_PAN_ATTACKER - createsprite gSparkElectricitySpriteTemplate, ANIM_ATTACKER, 0, 100, 24, 60, 10, 0, 1, 0 - createsprite gSparkElectricitySpriteTemplate, ANIM_ATTACKER, 0, 170, 24, 42, 11, 0, 1, 1 - delay 0 - createsprite gSparkElectricitySpriteTemplate, ANIM_ATTACKER, 0, 238, 24, 165, 10, 0, 1, 1 - delay 0 - createvisualtask AnimTask_BlendColorCycle, 2, (F_PAL_BG | F_PAL_ATTACKER), -31, 1, 0, 0, RGB(31, 31, 22) - delay 20 - createvisualtask AnimTask_BlendColorCycle, 2, (F_PAL_BG | F_PAL_ATTACKER), -31, 1, 7, 7, RGB(31, 31, 22) - playsewithpan SE_M_THUNDERBOLT2, SOUND_PAN_ATTACKER - createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_ATTACKER, 4, 0, 0, 32, 12, 0, 20, 0, 0 - createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_ATTACKER, 4, 0, 0, 32, 12, 64, 20, 1, 0 - createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_ATTACKER, 4, 0, 0, 32, 12, 128, 20, 0, 0 - createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_ATTACKER, 4, 0, 0, 32, 12, 192, 20, 2, 0 - createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_ATTACKER, 4, 0, 0, 16, 12, 32, 20, 0, 0 - createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_ATTACKER, 4, 0, 0, 16, 12, 96, 20, 1, 0 - createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_ATTACKER, 4, 0, 0, 16, 12, 160, 20, 0, 0 - createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_ATTACKER, 4, 0, 0, 16, 12, 224, 20, 2, 0 - delay 4 - waitforvisualfinish - createvisualtask AnimTask_BlendColorCycle, 2, (F_PAL_BG | F_PAL_ATTACKER), -31, 1, 0, 0, RGB(31, 31, 22) - playsewithpan SE_M_THUNDER_WAVE, SOUND_PAN_ATTACKER - createsprite gZapCannonBallSpriteTemplate, ANIM_TARGET, 3, 10, 0, 0, 0, 30, 0 - createsprite gZapCannonSparkSpriteTemplate, ANIM_TARGET, 4, 10, 0, 16, 30, 0, 40, 0 - createsprite gZapCannonSparkSpriteTemplate, ANIM_TARGET, 4, 10, 0, 16, 30, 64, 40, 1 - createsprite gZapCannonSparkSpriteTemplate, ANIM_TARGET, 4, 10, 0, 16, 30, 128, 40, 0 - createsprite gZapCannonSparkSpriteTemplate, ANIM_TARGET, 4, 10, 0, 16, 30, 192, 40, 2 - createsprite gZapCannonSparkSpriteTemplate, ANIM_TARGET, 4, 10, 0, 8, 30, 32, 40, 0 - createsprite gZapCannonSparkSpriteTemplate, ANIM_TARGET, 4, 10, 0, 8, 30, 96, 40, 1 - createsprite gZapCannonSparkSpriteTemplate, ANIM_TARGET, 4, 10, 0, 8, 30, 160, 40, 0 - createsprite gZapCannonSparkSpriteTemplate, ANIM_TARGET, 4, 10, 0, 8, 30, 224, 40, 2 + setalpha 12, 8 + createsprite gSimplePaletteBlendSpriteTemplate, ANIM_ATTACKER, 2, F_PAL_BG, 2, 0, 4, RGB_BLACK waitforvisualfinish - createvisualtask AnimTask_ShakeMon2, 2, ANIM_TARGET, 4, 0, 5, 1 - delay 15 - waitplaysewithpan SE_M_THUNDERBOLT2, SOUND_PAN_TARGET, 19 - call ElectricityEffect + createvisualtask AnimTask_ElectricChargingParticles, 2, ANIM_ATTACKER, 20, 0, 2 + playsewithpan SE_M_CHARGE, SOUND_PAN_ATTACKER + delay 12 + createsprite gGrowingShockWaveOrbSpriteTemplate, ANIM_ATTACKER, 2 + createvisualtask AnimTask_BlendBattleAnimPal, 10, F_PAL_ATTACKER, 2, 0, 11, RGB(31, 31, 22) + delay 50 + createsoundtask SoundTask_LoopSEAdjustPanning, SE_M_THUNDERBOLT2, SOUND_PAN_ATTACKER, SOUND_PAN_TARGET, 1, 16, 0, 5 + createvisualtask AnimTask_ShakeMon, 2, ANIM_ATTACKER, 0, 4, 50, 1 + call SparkBeam + call SparkBeam + call SparkBeam + call SparkBeam + call SparkBeam + createvisualtask AnimTask_ShakeMon2, 2, ANIM_TARGET, 4, 0, 50, 1 + createvisualtask AnimTask_BlendBattleAnimPal, 10, F_PAL_ATTACKER, 2, 11, 0, RGB(31, 31, 22) + createvisualtask AnimTask_BlendBattleAnimPal, 10, F_PAL_TARGET, 2, 0, 11, RGB(31, 31, 22) + call SparkBeam + call SparkBeam + call SparkBeam + call SparkBeam + call SparkBeam + call SparkBeam + call SparkBeam + call SparkBeam + call SparkBeam + call SparkBeam + call SparkBeam + call SparkBeam + call SparkBeam + call SparkBeam + delay 20 + createvisualtask AnimTask_BlendBattleAnimPal, 10, F_PAL_TARGET, 2, 11, 0, RGB(31, 31, 22) waitforvisualfinish + createsprite gSimplePaletteBlendSpriteTemplate, ANIM_ATTACKER, 2, F_PAL_BG, 4, 4, 0, RGB_BLACK + blendoff end +SparkBeam: + createsprite gSparkBeamSpriteTemplate, ANIM_ATTACKER, 3, 0, 0, 0, 0 + delay 1 + createsprite gSparkBeamSpriteTemplate, ANIM_ATTACKER, 3, 0, 0, 0, 0 + delay 1 + return + Move_WOOD_HAMMER: loadspritegfx ANIM_TAG_WOOD_HAMMER loadspritegfx ANIM_TAG_WOOD_HAMMER_HAMMER @@ -4299,22 +4298,22 @@ Move_HEAL_ORDER: Move_HEAD_SMASH: loadspritegfx ANIM_TAG_IMPACT - call SetImpactBackground - createsprite gBowMonSpriteTemplate, ANIM_ATTACKER, 2, 0 + loadspritegfx ANIM_TAG_ROCKS + createvisualtask AnimTask_SkullBashPosition, 2, 0 playsewithpan SE_M_TAKE_DOWN, SOUND_PAN_ATTACKER waitforvisualfinish - delay 2 - createsprite gBowMonSpriteTemplate, ANIM_ATTACKER, 2, 1 - waitforvisualfinish - createvisualtask AnimTask_ShakeMonInPlace, 2, ANIM_ATTACKER, 2, 0, 4, 1 - createvisualtask AnimTask_ShakeMon, 2, ANIM_TARGET, 5, 0, 6, 1 - createsprite gBowMonSpriteTemplate, ANIM_ATTACKER, 2, 2 - createsprite gFlashingHitSplatSpriteTemplate, ANIM_TARGET, 3, 0, 0, 1, 1 - loopsewithpan SE_M_MEGA_KICK2, SOUND_PAN_TARGET, 8, 3 + playse SE_BANG + call SetImpactBackground + createvisualtask AnimTask_ShakeMonInPlace, 2, ANIM_ATTACKER, 2, 0, 40, 1 + createvisualtask AnimTask_ShakeMonInPlace, 2, ANIM_TARGET, 10, 0, 40, 1 + createsprite gFlashingHitSplatSpriteTemplate, ANIM_TARGET, 4, 0, 0, ANIM_TARGET, 0 + playsewithpan SE_M_ROCK_THROW, SOUND_PAN_TARGET + createsprite gRockScatterSpriteTemplate, ANIM_TARGET, 2, -12, 32, 3, 4 + createsprite gRockScatterSpriteTemplate, ANIM_TARGET, 2, 8, 31, 2, 2 + createsprite gRockScatterSpriteTemplate, ANIM_TARGET, 2, -4, 28, 2, 3 + createsprite gRockScatterSpriteTemplate, ANIM_TARGET, 2, 12, 30, 4, 3 waitforvisualfinish - clearmonbg ANIM_TARGET - blendoff - delay 2 + createvisualtask AnimTask_SkullBashPosition, 2, 1 restorebg waitbgfadein end @@ -4863,19 +4862,82 @@ Move_WONDER_ROOM:: end Move_PSYSHOCK: + loadspritegfx ANIM_TAG_RED_ORB_2 + loadspritegfx ANIM_TAG_POISON_JAB + loadspritegfx ANIM_TAG_GRAY_SMOKE + loadspritegfx ANIM_TAG_WISP_FIRE monbg ANIM_TARGET setalpha 8, 8 + playsewithpan SE_M_SUPERSONIC, SOUND_PAN_ATTACKER createvisualtask AnimTask_ShakeMon2, 2, ANIM_ATTACKER, 1, 0, 10, 1 - createvisualtask AnimTask_BlendColorCycle, 2, F_PAL_ATTACKER, 0, 2, 0, 8, RGB(31, 23, 0) + createvisualtask AnimTask_BlendColorCycle, 2, F_PAL_ATTACKER, 0, 2, 0, 8, RGB_WHITE waitforvisualfinish - loopsewithpan SE_M_SUPERSONIC, SOUND_PAN_TARGET, 10, 3 - createvisualtask AnimTask_ShakeMon, 2, ANIM_TARGET, 5, 0, 15, 1 - createvisualtask AnimTask_ScaleMonAndRestore, 5, -6, -6, 15, ANIM_TARGET, 1 + delay 10 + call PsyshockConverge waitforvisualfinish clearmonbg ANIM_TARGET blendoff end +PsyshockConverge: + createsprite gPsyshockOrbSpriteTemplate, ANIM_TARGET, 2, 40, 40, 16 + playsewithpan SE_M_SWIFT, SOUND_PAN_TARGET + delay 2 + createsprite gPsyshockOrbSpriteTemplate, ANIM_TARGET, 2, -40, -40, 16 + playsewithpan SE_M_SWIFT, SOUND_PAN_TARGET + delay 2 + createsprite gPsyshockOrbSpriteTemplate, ANIM_TARGET, 2, 0, 40, 16 + playsewithpan SE_M_SWIFT, SOUND_PAN_TARGET + delay 2 + createsprite gPsyshockOrbSpriteTemplate, ANIM_TARGET, 2, 0, -40, 16 + playsewithpan SE_M_SWIFT, SOUND_PAN_TARGET + delay 2 + createsprite gPsyshockOrbSpriteTemplate, ANIM_TARGET, 2, 40, -20, 16 + playsewithpan SE_M_SWIFT, SOUND_PAN_TARGET + delay 2 + createsprite gPsyshockOrbSpriteTemplate, ANIM_TARGET, 2, 40, 20, 16 + playsewithpan SE_M_SWIFT, SOUND_PAN_TARGET + delay 2 + createsprite gPsyshockOrbSpriteTemplate, ANIM_TARGET, 2, -40, -20, 16 + playsewithpan SE_M_SWIFT, SOUND_PAN_TARGET + delay 2 + createsprite gPsyshockOrbSpriteTemplate, ANIM_TARGET, 2, -40, 20, 16 + playsewithpan SE_M_SWIFT, SOUND_PAN_TARGET + delay 2 + createsprite gPsyshockOrbSpriteTemplate, ANIM_TARGET, 2, -20, 30, 16 + playsewithpan SE_M_SWIFT, SOUND_PAN_TARGET + delay 2 + createsprite gPsyshockOrbSpriteTemplate, ANIM_TARGET, 2, 20, -30, 16 + playsewithpan SE_M_SWIFT, SOUND_PAN_TARGET + delay 2 + createsprite gPsyshockOrbSpriteTemplate, ANIM_TARGET, 2, -20, -30, 16 + playsewithpan SE_M_SWIFT, SOUND_PAN_TARGET + delay 2 + createsprite gPsyshockOrbSpriteTemplate, ANIM_TARGET, 2, 20, 30, 16 + playsewithpan SE_M_SWIFT, SOUND_PAN_TARGET + delay 2 + createsprite gPsyshockOrbSpriteTemplate, ANIM_TARGET, 2, -40, 0, 16 + playsewithpan SE_M_SWIFT, SOUND_PAN_TARGET + delay 2 + createsprite gPsyshockOrbSpriteTemplate, ANIM_TARGET, 2, 40, 0, 16 + playsewithpan SE_M_SWIFT, SOUND_PAN_TARGET + delay 6 + createvisualtask AnimTask_ShakeMon, 2, ANIM_TARGET, 5, 0, 15, 1 + createvisualtask AnimTask_BlendMonInAndOut, 5, ANIM_TARGET, RGB_WHITE, 12, 0, 1 + createsprite gPsyshockSmokeSpriteTemplate, ANIM_TARGET, 2, 8, 8, 1, 0 + playsewithpan SE_M_SWAGGER, SOUND_PAN_TARGET + delay 2 + createsprite gPsyshockSmokeSpriteTemplate, ANIM_TARGET, 2, -8, -8, 1, 0 + playsewithpan SE_M_SWAGGER, SOUND_PAN_TARGET + delay 2 + createsprite gPsyshockSmokeSpriteTemplate, ANIM_TARGET, 2, 8, -8, 1, 0 + playsewithpan SE_M_SWAGGER, SOUND_PAN_TARGET + delay 2 + createsprite gPsyshockSmokeSpriteTemplate, ANIM_TARGET, 2, -8, 8, 1, 0 + playsewithpan SE_M_SWAGGER, SOUND_PAN_TARGET + delay 2 + return + Move_VENOSHOCK: loadspritegfx ANIM_TAG_POISON_BUBBLE loadspritegfx ANIM_TAG_TOXIC_BUBBLE @@ -5804,23 +5866,79 @@ Move_QUASH: Move_ACROBATICS: loadspritegfx ANIM_TAG_ROUND_SHADOW + loadspritegfx ANIM_TAG_WHITE_STREAK loadspritegfx ANIM_TAG_IMPACT monbg ANIM_TARGET setalpha 12, 8 playsewithpan SE_M_FLY, SOUND_PAN_ATTACKER createsprite gFlyBallUpSpriteTemplate, ANIM_ATTACKER, 2, 0, 0, 13, 336 waitforvisualfinish - playsewithpan SE_M_SWAGGER, SOUND_PAN_TARGET - createsprite gBounceBallLandSpriteTemplate, ANIM_TARGET, 3 - delay 7 - playsewithpan SE_M_MEGA_KICK2, SOUND_PAN_TARGET - createsprite gBasicHitSplatSpriteTemplate, ANIM_TARGET, 2, 0, 0, 1, 0 - createvisualtask AnimTask_ShakeMon, 5, ANIM_TARGET, 0, 5, 11, 1 + call SetSkyBg + call AcrobaticsSlashes waitforvisualfinish clearmonbg ANIM_TARGET - blendoff + visible ANIM_ATTACKER + call UnsetSkyBg end +AcrobaticsSlashes: + createvisualtask AnimTask_ShakeMon2, 2, ANIM_TARGET, 4, 0, 40, 1 + createsprite gAcrobaticsSlashesSpriteTemplate, ANIM_TARGET, 2, -10, 3 + playsewithpan SE_M_CUT, SOUND_PAN_TARGET + delay 1 + createsprite gAcrobaticsSlashesSpriteTemplate, ANIM_TARGET, 2, 24, -19 + playsewithpan SE_M_CUT, SOUND_PAN_TARGET + delay 1 + createsprite gAcrobaticsSlashesSpriteTemplate, ANIM_TARGET, 2, -28, -15 + playsewithpan SE_M_CUT, SOUND_PAN_TARGET + delay 2 + createsprite gAcrobaticsSlashesSpriteTemplate, ANIM_TARGET, 2, -6, -30 + playsewithpan SE_M_CUT, SOUND_PAN_TARGET + delay 1 + createsprite gAcrobaticsSlashesSpriteTemplate, ANIM_TARGET, 2, -20, 6 + playsewithpan SE_M_CUT, SOUND_PAN_TARGET + delay 1 + createsprite gAcrobaticsSlashesSpriteTemplate, ANIM_TARGET, 2, 28, 2 + playsewithpan SE_M_CUT, SOUND_PAN_TARGET + delay 2 + createsprite gAcrobaticsSlashesSpriteTemplate, ANIM_TARGET, 2, -14, -25 + playsewithpan SE_M_CUT, SOUND_PAN_TARGET + delay 1 + createsprite gAcrobaticsSlashesSpriteTemplate, ANIM_TARGET, 2, 9, -2 + playsewithpan SE_M_CUT, SOUND_PAN_TARGET + delay 2 + createsprite gAcrobaticsSlashesSpriteTemplate, ANIM_TARGET, 2, -1, 0 + playsewithpan SE_M_CUT, SOUND_PAN_TARGET + delay 1 + createsprite gAcrobaticsSlashesSpriteTemplate, ANIM_TARGET, 2, 21, 4 + playsewithpan SE_M_CUT, SOUND_PAN_TARGET + delay 2 + createsprite gAcrobaticsSlashesSpriteTemplate, ANIM_TARGET, 2, 28, 20 + playsewithpan SE_M_CUT, SOUND_PAN_TARGET + delay 2 + createsprite gAcrobaticsSlashesSpriteTemplate, ANIM_TARGET, 2, -7, 24 + playsewithpan SE_M_CUT, SOUND_PAN_TARGET + delay 2 + createsprite gAcrobaticsSlashesSpriteTemplate, ANIM_TARGET, 2, -11, 1 + playsewithpan SE_M_CUT, SOUND_PAN_TARGET + delay 2 + createsprite gAcrobaticsSlashesSpriteTemplate, ANIM_TARGET, 2, 12, -18 + playsewithpan SE_M_CUT, SOUND_PAN_TARGET + delay 2 + createsprite gAcrobaticsSlashesSpriteTemplate, ANIM_TARGET, 2, -21, -14 + playsewithpan SE_M_CUT, SOUND_PAN_TARGET + delay 1 + createsprite gAcrobaticsSlashesSpriteTemplate, ANIM_TARGET, 2, -29, 7 + playsewithpan SE_M_CUT, SOUND_PAN_TARGET + delay 2 + createsprite gAcrobaticsSlashesSpriteTemplate, ANIM_TARGET, 2, 15, 28 + playsewithpan SE_M_CUT, SOUND_PAN_TARGET + delay 1 + createsprite gAcrobaticsSlashesSpriteTemplate, ANIM_TARGET, 2, -21, -16 + playsewithpan SE_M_CUT, SOUND_PAN_TARGET + delay 2 + return + Move_REFLECT_TYPE: loadspritegfx ANIM_TAG_GUARD_RING @ring around user loadspritegfx ANIM_TAG_ICE_CHUNK @blue green color @@ -8315,17 +8433,99 @@ Move_FELL_STINGER: end Move_PHANTOM_FORCE: - choosetwoturnanim PhantomForceSetUp, PhantomForceUnleash -PhantomForceEnd: + loadspritegfx ANIM_TAG_ROUND_SHADOW + loadspritegfx ANIM_TAG_IMPACT + choosetwoturnanim PhantomForcePrep PhantomForceAttack +PhantomForceWaitEnd: + waitforvisualfinish + restorebg + waitbgfadein end -PhantomForceSetUp: +PhantomForcePrep: + monbg ANIM_ATTACKER + fadetobg BG_GHOST + waitbgfadein + delay 0 + playsewithpan SE_M_FAINT_ATTACK, SOUND_PAN_ATTACKER + createvisualtask AnimTask_TranslateMonEllipticalRespectSide, 2, ANIM_ATTACKER, 18, 6, 1, 3 + createvisualtask AnimTask_AttackerFadeToInvisible, 2, 1 + waitforvisualfinish + clearmonbg ANIM_ATTACKER invisible ANIM_ATTACKER - goto PhantomForceEnd -PhantomForceUnleash: - visible ANIM_ATTACKER - goto PhantomForceEnd + delay 1 + goto PhantomForceWaitEnd +PhantomForceAttack: + loadspritegfx ANIM_TAG_PURPLE_FLAME + loadspritegfx ANIM_TAG_WHITE_SHADOW @Destiny Bond + monbg ANIM_ATTACKER + splitbgprio ANIM_ATTACKER + fadetobg BG_GHOST + waitbgfadein + delay 1 + createvisualtask AnimTask_BlendParticle, 5, ANIM_TAG_IMPACT, 0, 12, 12, RGB(0, 0, 23) + setalpha 12, 8 + waitforvisualfinish + delay 10 + playsewithpan SE_M_PSYBEAM, SOUND_PAN_ATTACKER + createvisualtask AnimTask_PurpleFlamesOnTarget, 0x3 + createvisualtask AnimTask_DestinyBondWhiteShadow, 0x5, 0x0, 0x30 + delay 30 + createvisualtask AnimTask_BlendParticle, 5, ANIM_TAG_IMPACT, 0, 12, 12, RGB(0, 0, 23) + waitforvisualfinish + createsprite gRandomPosHitSplatSpriteTemplate, ANIM_TARGET, 3, ANIM_TARGET, 2 + createsprite gRandomPosHitSplatSpriteTemplate, ANIM_TARGET, 3, ANIM_TARGET, 2 + createsprite gRandomPosHitSplatSpriteTemplate, ANIM_TARGET, 3, ANIM_TARGET, 2 + createvisualtask SoundTask_PlaySE1WithPanning, 5, 215, SOUND_PAN_TARGET + delay 3 + createsprite gRandomPosHitSplatSpriteTemplate, ANIM_TARGET, 3, ANIM_TARGET, 2 + createsprite gRandomPosHitSplatSpriteTemplate, ANIM_TARGET, 3, ANIM_DEF_PARTNER, 2 + createsprite gRandomPosHitSplatSpriteTemplate, ANIM_TARGET, 3, ANIM_ATK_PARTNER, 2 + createvisualtask SoundTask_PlaySE1WithPanning, 5, 215, SOUND_PAN_TARGET + delay 3 + createsprite gRandomPosHitSplatSpriteTemplate, ANIM_TARGET, 3, ANIM_TARGET, 2 + createsprite gRandomPosHitSplatSpriteTemplate, ANIM_TARGET, 3, ANIM_DEF_PARTNER, 2 + createsprite gRandomPosHitSplatSpriteTemplate, ANIM_TARGET, 3, ANIM_ATK_PARTNER, 2 + createvisualtask SoundTask_PlaySE1WithPanning, 5, 215, SOUND_PAN_TARGET + delay 3 + createvisualtask AnimTask_ShakeMon2, 2, ANIM_TARGET, 2, 0, 12, 1 + createvisualtask AnimTask_BlendColorCycle, 2, F_PAL_TARGET, 0, 2, 0, 13, RGB_PURPLE + waitforvisualfinish + delay 1 + playsewithpan SOUND_PAN_ATTACKER, 192 + createvisualtask AnimTask_NightShadeClone, 5, 10 + waitforvisualfinish + clearmonbg ANIM_ATTACKER + delay 1 + goto PhantomForceWaitEnd +PhantomForceBg: + fadetobg BG_DARK + waitbgfadeout + createvisualtask AnimTask_FadeScreenToWhite, 5 + waitbgfadein + return Move_TRICK_OR_TREAT: + loadspritegfx ANIM_TAG_EYE_SPARKLE + loadspritegfx ANIM_TAG_GHOSTLY_SPIRIT + fadetobg BG_NIGHTMARE + waitbgfadein + delay 10 + playsewithpan SE_M_PSYBEAM, SOUND_PAN_ATTACKER + createvisualtask AnimTask_ShakeMon2, 2, ANIM_ATTACKER, 1, 0, 10, 1 + createvisualtask AnimTask_BlendColorCycle, 2, F_PAL_ATTACKER, 0, 2, 0, 8, RGB(10, 2, 19) + waitforvisualfinish + playsewithpan SE_M_LEER, SOUND_PAN_ATTACKER + createvisualtask AnimTask_ScaryFace, 5 + delay 13 + waitforvisualfinish + createvisualtask AnimTask_BlendColorCycle, 2, F_PAL_TARGET, 2, 2, 0, 12, RGB(10, 2, 19) @;Deep purple + playsewithpan SE_M_NIGHTMARE, SOUND_PAN_TARGET + createsprite gCurseGhostSpriteTemplate, ANIM_TARGET, 2 + createvisualtask AnimTask_ShakeMon2, 2, ANIM_TARGET, 2, 0, 14, 1 + waitforvisualfinish + clearmonbg ANIM_TARGET + restorebg + waitbgfadein end Move_NOBLE_ROAR: diff --git a/src/battle_anim_effects_1.c b/src/battle_anim_effects_1.c index d8addec01cc5..b79c94a6a342 100755 --- a/src/battle_anim_effects_1.c +++ b/src/battle_anim_effects_1.c @@ -158,6 +158,7 @@ static void AnimRockPolishSparkle(struct Sprite *); static void AnimPoisonJabProjectile(struct Sprite *); static void AnimNightSlash(struct Sprite *); static void AnimPluck(struct Sprite *); +static void AnimAcrobaticsSlashes(struct Sprite *); const union AnimCmd gPowderParticlesAnimCmds[] = { @@ -3006,6 +3007,61 @@ const struct SpriteTemplate gSeedFlareGreenCirclesTemplate = .callback = AnimPowerAbsorptionOrb }; +const struct SpriteTemplate gSteelBeamBigOrbSpriteTemplate = +{ + .tileTag = ANIM_TAG_STEEL_BEAM, + .paletteTag = ANIM_TAG_STEEL_BEAM, + .oam = &gOamData_AffineOff_ObjNormal_8x8, + .anims = gSolarBeamBigOrbAnimTable, + .images = NULL, + .affineAnims = gDummySpriteAffineAnimTable, + .callback = AnimSolarBeamBigOrb, +}; + +const struct SpriteTemplate gSteelBeamSmallOrbSpriteTemplate = +{ + .tileTag = ANIM_TAG_STEEL_BEAM, + .paletteTag = ANIM_TAG_STEEL_BEAM, + .oam = &gOamData_AffineOff_ObjNormal_8x8, + .anims = gSolarBeamSmallOrbAnimTable, + .images = NULL, + .affineAnims = gDummySpriteAffineAnimTable, + .callback = AnimSolarBeamSmallOrb, +}; + +const struct SpriteTemplate gAcrobaticsSlashesSpriteTemplate = +{ + .tileTag = ANIM_TAG_WHITE_STREAK, + .paletteTag = ANIM_TAG_WHITE_STREAK, + .oam = &gOamData_AffineDouble_ObjBlend_32x8, + .anims = gRockPolishStreak_AnimCmds, + .images = NULL, + .affineAnims = gRockPolishStreak_AffineAnimCmds, + .callback = AnimAcrobaticsSlashes, +}; + +const struct SpriteTemplate gPsyshockOrbSpriteTemplate = +{ + .tileTag = ANIM_TAG_RED_ORB_2, + .paletteTag = ANIM_TAG_POISON_JAB, + .oam = &gOamData_AffineOff_ObjNormal_8x8, + .anims = gDummySpriteAnimTable, + .images = NULL, + .affineAnims = gDummySpriteAffineAnimTable, + .callback = AnimPoisonJabProjectile, +}; + +const struct SpriteTemplate gPsyshockSmokeSpriteTemplate = +{ + .tileTag = ANIM_TAG_GRAY_SMOKE, + .paletteTag = ANIM_TAG_WISP_FIRE, + .oam = &gOamData_AffineOff_ObjNormal_32x32, + .anims = gOctazookaAnimTable, + .images = NULL, + .affineAnims = gDummySpriteAffineAnimTable, + .callback = AnimSpriteOnMonPos, +}; + // functions static void AnimGrassKnot(struct Sprite *sprite) { @@ -6971,28 +7027,6 @@ void AnimTask_CompressTargetHorizontally(u8 taskId) task->func = AnimTask_CompressTargetStep; } -const struct SpriteTemplate gSteelBeamBigOrbSpriteTemplate = -{ - .tileTag = ANIM_TAG_STEEL_BEAM, - .paletteTag = ANIM_TAG_STEEL_BEAM, - .oam = &gOamData_AffineOff_ObjNormal_8x8, - .anims = gSolarBeamBigOrbAnimTable, - .images = NULL, - .affineAnims = gDummySpriteAffineAnimTable, - .callback = AnimSolarBeamBigOrb, -}; - -const struct SpriteTemplate gSteelBeamSmallOrbSpriteTemplate = -{ - .tileTag = ANIM_TAG_STEEL_BEAM, - .paletteTag = ANIM_TAG_STEEL_BEAM, - .oam = &gOamData_AffineOff_ObjNormal_8x8, - .anims = gSolarBeamSmallOrbAnimTable, - .images = NULL, - .affineAnims = gDummySpriteAffineAnimTable, - .callback = AnimSolarBeamSmallOrb, -}; - void AnimTask_CreateSmallSteelBeamOrbs(u8 taskId) { if (--gTasks[taskId].data[0] == -1) @@ -7009,3 +7043,12 @@ void AnimTask_CreateSmallSteelBeamOrbs(u8 taskId) if (gTasks[taskId].data[1] == 15) DestroyAnimVisualTask(taskId); } + +static void AnimAcrobaticsSlashes(struct Sprite *sprite) +{ + int affineAnimNum = Random2() % ARRAY_COUNT(gRockPolishStreak_AffineAnimCmds); + InitSpritePosToAnimTarget(sprite, TRUE); + StartSpriteAffineAnim(sprite, affineAnimNum); + StoreSpriteCallbackInData6(sprite, DestroySpriteAndMatrix); + sprite->callback = RunStoredCallbackWhenAnimEnds; +} diff --git a/src/battle_anim_water.c b/src/battle_anim_water.c index e4044efe6543..159b27dec923 100755 --- a/src/battle_anim_water.c +++ b/src/battle_anim_water.c @@ -584,6 +584,28 @@ const struct SpriteTemplate gAquaTailHitSpriteTemplate = .callback = AnimAquaTail, }; +static const union AnimCmd sAnimCmdAnimatedSpark2[] = { + ANIMCMD_FRAME((8 * 8) / (16 * 16) * 0, 8), + ANIMCMD_FRAME((8 * 8) / (16 * 16) * 1, 8), + ANIMCMD_FRAME((8 * 8) / (16 * 16) * 2, 8), + ANIMCMD_JUMP(0) +}; + +static const union AnimCmd *const sAnimCmdTable_AnimatedSpark2[] = { + sAnimCmdAnimatedSpark2, +}; + +const struct SpriteTemplate gSparkBeamSpriteTemplate = +{ + .tileTag = ANIM_TAG_SPARK_2, + .paletteTag = ANIM_TAG_SPARK_2, + .oam = &gOamData_AffineOff_ObjNormal_16x16, + .anims = sAnimCmdTable_AnimatedSpark2, + .images = NULL, + .affineAnims = gDummySpriteAffineAnimTable, + .callback = AnimToTargetInSinWave, +}; + static void AnimAquaTail(struct Sprite *sprite) { StartSpriteAffineAnim(sprite, gBattleAnimArgs[3]);