diff --git a/data/battle_anim_scripts.s b/data/battle_anim_scripts.s index 2f1a3cb73c..fdc7a59e4e 100644 --- a/data/battle_anim_scripts.s +++ b/data/battle_anim_scripts.s @@ -17630,9 +17630,30 @@ Move_MALIGNANT_CHAIN:: waitforvisualfinish end +Move_POPULATION_BOMB:: + loadspritegfx ANIM_TAG_CUT + monbg ANIM_TARGET + setalpha 12, 8 + playsewithpan SE_M_CUT, SOUND_PAN_TARGET + createvisualtask AnimTask_RandomBool, 2 + jumpretfalse PopulationBombSliceRight + jumprettrue PopulationBombSliceLeft +PopulationBombSliceRight: + createsprite gCuttingSliceSpriteTemplate, ANIM_ATTACKER, 2, 40, -32, 0 + goto PopulationBombContinue +PopulationBombSliceLeft: + createsprite gCuttingSliceSpriteTemplate, ANIM_ATTACKER, 2, 40, -32, 1 +PopulationBombContinue: + delay 5 + createvisualtask AnimTask_ShakeMon, 2, ANIM_TARGET, 0, 3, 10, 1 + waitforvisualfinish + clearmonbg ANIM_TARGET + blendoff + waitforvisualfinish + end + Move_TERA_BLAST:: Move_ORDER_UP:: -Move_POPULATION_BOMB:: Move_GLAIVE_RUSH:: Move_REVIVAL_BLESSING:: Move_SALT_CURE:: diff --git a/src/battle_anim_new.c b/src/battle_anim_new.c index a704a73f40..fd821250fc 100644 --- a/src/battle_anim_new.c +++ b/src/battle_anim_new.c @@ -9285,3 +9285,13 @@ static void AnimMakingItRain(struct Sprite *sprite) sprite->callback = TranslateSpriteInEllipse; sprite->callback(sprite); } + +void AnimTask_RandomBool(u8 taskId) +{ + if (RandomPercentage(RNG_NONE, 50)) + gBattleAnimArgs[ARG_RET_ID] = TRUE; + else + gBattleAnimArgs[ARG_RET_ID] = FALSE; + + DestroyAnimVisualTask(taskId); +}