From 80ec67482e590b438534ce33f2fdb5d12ca9d007 Mon Sep 17 00:00:00 2001 From: Alex <93446519+AlexOn1ine@users.noreply.github.com> Date: Thu, 14 Sep 2023 20:31:18 +0200 Subject: [PATCH] Bitter Blade and Double Shock animations (#3310) --- data/battle_anim_scripts.s | 78 +++++++++++++++++++++++++++++++++++++- src/battle_anim_new.c | 42 ++++++++++++-------- 2 files changed, 103 insertions(+), 17 deletions(-) diff --git a/data/battle_anim_scripts.s b/data/battle_anim_scripts.s index e9b7c538f..4997f56d2 100644 --- a/data/battle_anim_scripts.s +++ b/data/battle_anim_scripts.s @@ -16382,6 +16382,82 @@ TakeHeartRings: delay 0x4 return +Move_BITTER_BLADE:: + loadspritegfx ANIM_TAG_FOCUS_ENERGY + loadspritegfx ANIM_TAG_CLAW_SLASH + loadspritegfx ANIM_TAG_POISON_BUBBLE + loadspritegfx ANIM_TAG_ORBS + loadspritegfx ANIM_TAG_BLUE_STAR + loadspritegfx ANIM_TAG_IMPACT + monbg ANIM_DEF_PARTNER + splitbgprio_foes ANIM_TARGET + createsprite gSimplePaletteBlendSpriteTemplate, ANIM_ATTACKER, 0, 1, 3, 0, 12, RGB(14, 6, 24) + playsewithpan SE_M_DRAGON_RAGE, SOUND_PAN_ATTACKER + waitforvisualfinish + call EndureEffect + delay 8 + call EndureEffect + delay 8 + call EndureEffect + waitforvisualfinish + delay 3 + playsewithpan SE_M_RAZOR_WIND, SOUND_PAN_TARGET + createsprite gBitterBladeImpactTemplate ANIM_TARGET, 1, 0x0, 0xa, 0x0, 0xFF00, 0xA + delay 2 + createvisualtask AnimTask_ShakeMon, 0x2, 0x1, 0x0, 0x3, 0xa, 0x1 + waitforvisualfinish + delay 3 + call GigaDrainAbsorbEffect + waitforvisualfinish + delay 15 + call HealingEffect + waitforvisualfinish + createsprite gSimplePaletteBlendSpriteTemplate, ANIM_ATTACKER, 0, 1, 3, 12, 0, RGB(14, 6, 24) + waitforvisualfinish + clearmonbg ANIM_DEF_PARTNER + blendoff + end + +Move_DOUBLE_SHOCK:: + loadspritegfx ANIM_TAG_ELECTRIC_ORBS + loadspritegfx ANIM_TAG_CIRCLE_OF_LIGHT + loadspritegfx ANIM_TAG_LIGHTNING + monbg ANIM_TARGET + setalpha 12, 8 + createsprite gSimplePaletteBlendSpriteTemplate, ANIM_ATTACKER, 0, 1, 3, 0, 12, RGB_BLACK + waitforvisualfinish + createvisualtask AnimTask_ElectricChargingParticles, 0x2, ANIM_ATTACKER, 30, 0, 3 @;Amount, Slowness, Slowness, Compaction + playsewithpan SE_M_CHARGE, SOUND_PAN_ATTACKER + delay 12 + createsprite gGrowingShockWaveOrbSpriteTemplate, ANIM_ATTACKER, 0, 0x0 + waitforvisualfinish + delay 1 + createsprite gSimplePaletteBlendSpriteTemplate, ANIM_ATTACKER, 2, F_PAL_BG, 2, 16, 0, RGB_BLACK + delay 1 + waitforvisualfinish + playsewithpan SE_M_TRI_ATTACK2, SOUND_PAN_TARGET + createvisualtask AnimTask_InvertScreenColor, 2, 0x1 | 0x2 | 0x4 + delay 1 + createsprite gLightningSpriteTemplate, ANIM_TARGET, 6, -16, -32 + createsprite gLightningSpriteTemplate, ANIM_TARGET, 2, 24, -32 + delay 1 + createsprite gLightningSpriteTemplate, ANIM_TARGET, 2, -16, -16 + createsprite gLightningSpriteTemplate, ANIM_TARGET, 2, 24, -16 + delay 1 + createsprite gLightningSpriteTemplate, ANIM_TARGET, 6, -16, 16 + createsprite gLightningSpriteTemplate, ANIM_TARGET, 2, 24, 16 + delay 1 + playsewithpan SE_M_TRI_ATTACK2, SOUND_PAN_TARGET + createvisualtask AnimTask_InvertScreenColor, 2, 0x1 | 0x2 | 0x4 + delay 2 + createvisualtask AnimTask_ShakeMon, 2, ANIM_TARGET, 0, 3, 15, 1 + createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 3, 0, 0, ANIM_TARGET, 2 + delay 1 + waitforvisualfinish + clearmonbg ANIM_TARGET + blendoff + end + Move_TERA_BLAST:: Move_AXE_KICK:: Move_LAST_RESPECTS:: @@ -16418,8 +16494,6 @@ Move_HYPER_DRILL:: Move_TWIN_BEAM:: Move_RAGE_FIST:: Move_ARMOR_CANNON:: -Move_BITTER_BLADE:: -Move_DOUBLE_SHOCK:: Move_GIGATON_HAMMER:: Move_COMEUPPANCE:: Move_AQUA_CUTTER:: diff --git a/src/battle_anim_new.c b/src/battle_anim_new.c index 966887b25..1f04e0169 100644 --- a/src/battle_anim_new.c +++ b/src/battle_anim_new.c @@ -4151,7 +4151,7 @@ const struct SpriteTemplate gSkitterSmackImpactTemplate = }; // triple axel -const struct SpriteTemplate gTripleAxelIceCrystalSpriteTemplate = +const struct SpriteTemplate gTripleAxelIceCrystalSpriteTemplate = { .tileTag = ANIM_TAG_ICE_CRYSTALS, .paletteTag = ANIM_TAG_ICE_CRYSTALS, @@ -4173,7 +4173,7 @@ static const union AffineAnimCmd* const sSpriteAffineAnimTable_WingAttackFeather { sSpriteAffineAnim_WingAttackFeather, }; -const struct SpriteTemplate gDualWingbeatFeatherSpriteTemplate = +const struct SpriteTemplate gDualWingbeatFeatherSpriteTemplate = { .tileTag = ANIM_TAG_WHITE_FEATHER, .paletteTag = ANIM_TAG_WHITE_FEATHER, @@ -4192,7 +4192,7 @@ const struct SpriteTemplate gSpriteTemplate_LargeCrossImpact = { .anims = gDummySpriteAnimTable, .images = NULL, .affineAnims = sSpriteAffineAnimTable_LargeHailRock, - .callback = AnimCrossImpact + .callback = AnimCrossImpact }; // expanding force @@ -4464,7 +4464,7 @@ const struct SpriteTemplate gSpriteTemplate_GlacialLance = { .anims = gDummySpriteAnimTable, .images = NULL, .affineAnims = sSpriteAffineAnimTable_GlacialLance, - .callback = SpriteCB_GlacialLance + .callback = SpriteCB_GlacialLance }; // eerie spell @@ -4611,7 +4611,7 @@ const struct SpriteTemplate gSpriteTemplate_HeadlongRushImpact = { .images = NULL, .affineAnims = sSpriteAffineAnimTable_DrainPunchFist, .callback = AnimHitSplatBasic -}; +}; const struct SpriteTemplate gSpriteTemplate_MaxQuakeDirtGeyser = { .tileTag = ANIM_TAG_MUD_SAND, .paletteTag = ANIM_TAG_MUD_SAND, @@ -4696,7 +4696,7 @@ const struct SpriteTemplate gSpriteTemplate_CeaselessEdgeSlash = { .anims = gSlashSliceAnimTable, .images = NULL, .affineAnims = gDummySpriteAffineAnimTable, - .callback = SpriteCB_FlippableSlash + .callback = SpriteCB_FlippableSlash }; // wildbolt storm @@ -4758,7 +4758,7 @@ const struct SpriteTemplate gSpriteTemplate_BitterMaliceRing = { .anims = gDummySpriteAnimTable, .images = NULL, .affineAnims = gAffineAnims_ShadowBall, - .callback = AnimParticleInVortex + .callback = AnimParticleInVortex }; //ultra burst @@ -7175,6 +7175,18 @@ const struct SpriteTemplate gSoulStealZStarSpriteTemplate = .callback = AnimCrossImpact }; +// Bitter Blade +const struct SpriteTemplate gBitterBladeImpactTemplate = +{ + .tileTag = ANIM_TAG_CLAW_SLASH, + .paletteTag = ANIM_TAG_POISON_BUBBLE, + .oam = &gOamData_AffineOff_ObjNormal_32x32, + .anims = gAnims_ClawSlash, + .images = NULL, + .affineAnims = gDummySpriteAffineAnimTable, + .callback = AnimClawSlash +}; + // functions //general void AnimTask_IsTargetPartner(u8 taskId) @@ -8297,7 +8309,7 @@ void AnimTask_AllBattlersVisible(u8 taskId) { spriteId = gBattlerSpriteIds[i]; if (IsBattlerSpriteVisible(i) && spriteId != 0xFF) - gSprites[spriteId].invisible = FALSE; + gSprites[spriteId].invisible = FALSE; } DestroyAnimVisualTask(taskId); @@ -8693,7 +8705,7 @@ void SpriteCB_HorizontalSliceStep(struct Sprite *sprite) static void SpriteCB_LashOutStrike(struct Sprite* sprite) { bool8 flip = GetBattlerSide(gBattleAnimTarget) == B_SIDE_PLAYER; - + if (gBattleAnimArgs[2]) flip ^= 1; @@ -8871,7 +8883,7 @@ static void SpriteCB_SteelRoller(struct Sprite* sprite) sprite->x2 = gBattleAnimArgs[0]; sprite->y2 += gBattleAnimArgs[1]; - + sprite->data[4] = gBattleAnimArgs[3]; //Left/Right distance sprite->data[5] = gBattleAnimArgs[4]; //Left/Right speed @@ -8930,10 +8942,10 @@ static void SpriteCB_DragonEnergyShot(struct Sprite* sprite) else { y = 0; - + if (IsBattlerSpritePresent(def1)) y = GetBattlerSpriteCoord(def1, BATTLER_COORD_Y_PIC_OFFSET); - + if (IsBattlerSpritePresent(def2)) y += GetBattlerSpriteCoord(def2, BATTLER_COORD_Y_PIC_OFFSET); @@ -9018,13 +9030,13 @@ static void SpriteCB_GlacialLance(struct Sprite* sprite) { u8 def1 = gBattleAnimTarget; u8 def2 = BATTLE_PARTNER(def1); - + InitSpritePosToAnimAttacker(sprite, TRUE); sprite->data[5] = gBattleAnimArgs[4]; sprite->data[6] = gBattleAnimArgs[5]; - + sprite->data[0] = gBattleAnimArgs[6]; - + if (!IsDoubleBattle() || IsAlly(gBattleAnimAttacker, gBattleAnimTarget)) { sprite->data[2] = GetBattlerSpriteCoord(def1, BATTLER_COORD_X_2) + gBattleAnimArgs[2]; //Converge on target