From 6c0878b5fe5f7bc6430d3660528460f286d27ab7 Mon Sep 17 00:00:00 2001 From: Evan Date: Tue, 24 Nov 2020 17:21:59 -0500 Subject: [PATCH] infestation between turn anim --- data/battle_anim_scripts.s | 20 ++++++++++++++++++++ include/constants/battle_anim.h | 1 + src/battle_anim_throw.c | 2 ++ 3 files changed, 23 insertions(+) diff --git a/data/battle_anim_scripts.s b/data/battle_anim_scripts.s index 70ed22c9e..431ca8e2e 100644 --- a/data/battle_anim_scripts.s +++ b/data/battle_anim_scripts.s @@ -23929,6 +23929,7 @@ General_TurnTrap: jumpargeq 0, TRAP_ANIM_WHIRLPOOL, Status_Whirlpool jumpargeq 0, TRAP_ANIM_CLAMP, Status_Clamp jumpargeq 0, TRAP_ANIM_SAND_TOMB, Status_SandTomb + jumpargeq 0, TRAP_ANIM_INFESTATION, Status_Infestation goto Status_BindWrap Status_BindWrap: loadspritegfx ANIM_TAG_TENDRILS @@ -24002,6 +24003,25 @@ Status_SandTomb: stopsound end +Status_Infestation: + loadspritegfx ANIM_TAG_HANDS_AND_FEET @black color + loadspritegfx ANIM_TAG_SMALL_BUBBLES @circle particles + monbg ANIM_DEF_PARTNER + monbgprio_28 ANIM_TARGET + createvisualtask AnimTask_BlendBattleAnimPal, 10, ANIM_PAL_DEF, 0x2, 0x0, 0x9, 0x7320 + launchtask AnimTask_ShakeMon 0x2 0x5 ANIM_TARGET 0x3 0x0 0x4f 0x1 + loopsewithpan SE_M_CHARGE, SOUND_PAN_ATTACKER, 0x0, 0x4F + call InfestationVortex + call InfestationVortex + call InfestationVortex + call InfestationVortex + call InfestationVortex + waitforvisualfinish + launchtask AnimTask_BlendBattleAnimPal 0xA 0x5 ANIM_PAL_DEF 0x2 0x9 0x0 0x7320 + waitforvisualfinish + clearmonbg ANIM_DEF_PARTNER + end + General_HeldItemEffect: loadspritegfx ANIM_TAG_THIN_RING loadspritegfx ANIM_TAG_SPARKLE_2 diff --git a/include/constants/battle_anim.h b/include/constants/battle_anim.h index 871aa1e35..633f0ae8a 100644 --- a/include/constants/battle_anim.h +++ b/include/constants/battle_anim.h @@ -558,6 +558,7 @@ #define TRAP_ANIM_WHIRLPOOL 2 #define TRAP_ANIM_CLAMP 3 #define TRAP_ANIM_SAND_TOMB 4 +#define TRAP_ANIM_INFESTATION 5 // Weather defines for battle animation scripts. #define ANIM_WEATHER_NONE 0 diff --git a/src/battle_anim_throw.c b/src/battle_anim_throw.c index ad3270235..c8c2b9e6a 100755 --- a/src/battle_anim_throw.c +++ b/src/battle_anim_throw.c @@ -2494,6 +2494,8 @@ void AnimTask_GetTrappedMoveAnimId(u8 taskId) gBattleAnimArgs[0] = TRAP_ANIM_CLAMP; else if (gBattleSpritesDataPtr->animationData->animArg == MOVE_SAND_TOMB) gBattleAnimArgs[0] = TRAP_ANIM_SAND_TOMB; + else if (gBattleSpritesDataPtr->animationData->animArg == MOVE_INFESTATION) + gBattleAnimArgs[0] = TRAP_ANIM_INFESTATION; else gBattleAnimArgs[0] = TRAP_ANIM_BIND;