diff --git a/data/battle_anim_scripts.s b/data/battle_anim_scripts.s index 0d05554f2..619629f09 100644 --- a/data/battle_anim_scripts.s +++ b/data/battle_anim_scripts.s @@ -1144,6 +1144,7 @@ Move_FLING: Move_PSYCHO_SHIFT: loadspritegfx ANIM_TAG_ELECTRIC_ORBS + loadspritegfx ANIM_TAG_HOLLOW_ORB loadspritegfx ANIM_TAG_CIRCLE_OF_LIGHT loadspritegfx ANIM_TAG_THIN_RING monbg ANIM_ATTACKER @@ -1275,7 +1276,7 @@ Move_POWER_TRICK: end Move_GASTRO_ACID: - loadspritegfx ANIM_TAG_POISON_BUBBLE + loadspritegfx ANIM_TAG_GREEN_POISON_BUBBLE monbg ANIM_DEF_PARTNER createsprite gGreenPoisonBubble, ANIM_TARGET, 2, 20, 0, 40, 1, 0, 0 playsewithpan SE_W145C, SOUND_PAN_ATTACKER @@ -1308,6 +1309,30 @@ Move_GASTRO_ACID: end Move_LUCKY_CHANT: + loadspritegfx ANIM_TAG_GOLD_STARS + monbg ANIM_DEF_PARTNER + setalpha 12, 8 + playsewithpan SE_W080, SOUND_PAN_ATTACKER + createsprite gLuckyChantBigStarsSpriteTemplate, 2, 4, 0, -18, 8, 140 + createsprite gLuckyChantSmallStarsSpriteTemplate, 2, 4, 16, -18, 8, 100 + createsprite gLuckyChantSmallStarsSpriteTemplate, 2, 4, -16, -18, 8, 100 + delay 15 + createsprite gLuckyChantBigStarsSpriteTemplate 2, 4, 0, -18, 8, 140 + createsprite gLuckyChantSmallStarsSpriteTemplate, 2, 4, 32, -18, 8, 100 + createsprite gLuckyChantSmallStarsSpriteTemplate, 2, 4, -32, -18, 8, 100 + delay 15 + createsprite gLuckyChantBigStarsSpriteTemplate 2, 4, 0, -18, 8, 140 + createsprite gLuckyChantSmallStarsSpriteTemplate, 2, 4, 24, -18, 8, 100 + createsprite gLuckyChantSmallStarsSpriteTemplate, 2, 4, -18, -18, 8, 100 + delay 30 + createsprite gLuckyChantSmallStarsSpriteTemplate, 2, 4, 16, -18, 0, 100 + createsprite gLuckyChantSmallStarsSpriteTemplate, 2, 4, -16, -18, 0, 100 + delay 30 + createsprite gLuckyChantSmallStarsSpriteTemplate, 2, 4, 20, -16, 14, 80 + waitforvisualfinish + clearmonbg ANIM_DEF_PARTNER + blendoff + unloadspritegfx ANIM_TAG_GOLD_STARS end Move_ME_FIRST: @@ -1420,9 +1445,64 @@ Move_GUARD_SWAP: end Move_PUNISHMENT: + loadspritegfx ANIM_TAG_SCRATCH + loadspritegfx ANIM_TAG_POISON_BUBBLE + monbg ANIM_TARGET + setalpha 12, 8 + playsewithpan 155, SOUND_PAN_TARGET + createsprite gPunishmentSpriteTemplate, 2, 4, 0, 0, 1, 0 + createvisualtask AnimTask_ShakeMon, 2, 5, ANIM_TARGET, 3, 0, 6, 1 + waitforvisualfinish + clearmonbg ANIM_TARGET + blendoff + waitforvisualfinish + loadspritegfx ANIM_TAG_IMPACT + monbg ANIM_TARGET + setalpha 12, 8 + playsewithpan SE_W003, SOUND_PAN_TARGET + createsprite gPunishmentImpactSpriteTemplate 2, 4, 0, 0, 1, 2, + createvisualtask AnimTask_ShakeMon 2, 5, ANIM_TARGET, 3, 0, 6, 1 + waitforvisualfinish + clearmonbg ANIM_TARGET + blendoff end Move_LAST_RESORT: + fadetobg BG_COSMIC + waitbgfadeout + createvisualtask sub_8117660, 2, 4, 0, 128, 0, -1 + waitbgfadein + loadspritegfx ANIM_TAG_IMPACT + playsewithpan SE_W129, SOUND_PAN_ATTACKER + createsprite gComplexPaletteBlendSpriteTemplate, 2, 7, 2, 4, 2, RGB(31, 31, 31), 10, 0, 0 + waitforvisualfinish + delay 10 + playsewithpan SE_W207, SOUND_PAN_ATTACKER + waitplaysewithpan SE_W207, SOUND_PAN_ATTACKER, 8 + createvisualtask AnimTask_TranslateMonEllipticalRespectSide, 2, 0, 18, 6, 2, 4 + waitforvisualfinish + createsprite gSimplePaletteBlendSpriteTemplate, 2, 5, 1, 0, 16, 16, RGB(31, 31, 31) + createsprite gSlideMonToOffsetSpriteTemplate, 2, 5, 0, 20, 0, 0, 4, + delay 3 + waitforvisualfinish + playsewithpan SE_W025B, SOUND_PAN_TARGET + createsprite gBasicHitSplatSpriteTemplate, 132, 4, -10, 0, 1, 0 + createsprite gSlideMonToOffsetSpriteTemplate, 2, 5, 1, -32, 0, 0, 3 + waitforvisualfinish + createvisualtask sub_80D6134, 2, 4, 8, -256, 0, 0 + createvisualtask sub_80D6134, 2, 4, 8, -256, 1, 0 + createvisualtask AnimTask_ShakeMonInPlace, 2, 5, 0, 4, 0, 12, 1 + createvisualtask AnimTask_ShakeMonInPlace, 2, 5, 1, 4, 0, 12, 1 + createsprite gSimplePaletteBlendSpriteTemplate, 2, 5, 1, 2, 16, 0, RGB(31, 31, 31) + waitforvisualfinish + createvisualtask sub_80D6134, 2, 4, 8, -256, 0, 1 + createvisualtask sub_80D6134, 2, 4, 8, -256, 1, 1 + waitforvisualfinish + createsprite gSlideMonToOriginalPosSpriteTemplate, 2, 3, 0, 0, 5 + delay 3 + createsprite gSlideMonToOriginalPosSpriteTemplate, 2, 3, 1, 0, 7 + waitforvisualfinish + call UnsetHighSpeedBg end Move_WORRY_SEED: @@ -1440,6 +1520,16 @@ Move_WORRY_SEED: end Move_SUCKER_PUNCH: + loadspritegfx ANIM_TAG_POISON_JAB + loadspritegfx ANIM_TAG_IMPACT + createsprite gSlideMonToOffsetSpriteTemplate, 2, 5, 0, 20, 0, 0, 4 + createsprite gSuckerPunchSpriteTemplate, 130, 6, -18, 5, 40, 8, 160, 0 + delay 4 + createsprite gBasicHitSplatSpriteTemplate, 130, 4, -8, 8, 1, 2 + createvisualtask sub_80D6134, 2, 4, 6, 384, 1, 2 + playsewithpan SE_W233B, SOUND_PAN_TARGET + waitforvisualfinish + createsprite gSlideMonToOriginalPosSpriteTemplate, 2, 3, 0, 1, 4 end Move_TOXIC_SPIKES: @@ -1466,9 +1556,90 @@ Move_HEART_SWAP: end Move_AQUA_RING: + loadspritegfx ANIM_TAG_BLUE_STAR + loadspritegfx ANIM_TAG_SMALL_BUBBLES + loadspritegfx ANIM_TAG_ICE_CRYSTALS + loadspritegfx ANIM_TAG_GUARD_RING + monbg ANIM_ATK_PARTNER + setalpha 12, 8 + createvisualtask AnimTask_ShakeMon, 5, 5, ANIM_ATTACKER, 0, 2, 23, 1 + delay 5 + playsewithpan SE_W152, SOUND_PAN_ATTACKER + createsprite gUnknown_08595238, 2, 4, 10, 10, 25, 0 + delay 4 + playsewithpan SE_W152, SOUND_PAN_ATTACKER + createsprite gUnknown_08595238, 2, 4, -15, 0, 25, 0 + delay 4 + playsewithpan SE_W152, SOUND_PAN_ATTACKER + createsprite gUnknown_08595238, 2, 4, 20, 10, 25, 0 + delay 4 + playsewithpan SE_W152, SOUND_PAN_ATTACKER + createsprite gUnknown_08595238, 2, 4, 0, -10, 25, 0 + delay 4 + playsewithpan SE_W152, SOUND_PAN_ATTACKER + createsprite gUnknown_08595238, 2, 4, -10, 15, 25, 0 + delay 4 + playsewithpan SE_W152, SOUND_PAN_ATTACKER + createsprite gUnknown_08595238, 2, 4, 25, 20, 25, 0 + delay 4 + playsewithpan SE_W152, SOUND_PAN_ATTACKER + createsprite gUnknown_08595238, 2, 4, -20, 20, 25, 0 + delay 4 + playsewithpan SE_W152, SOUND_PAN_ATTACKER + createsprite gUnknown_08595238, 2, 4, 12, 0, 25, 0 + setalpha 8, 8 + playsewithpan SE_W208, SOUND_PAN_ATTACKER, + createsprite gUnknown_08593C64, 2, 0 + delay 4 + createsprite gUnknown_08593C64, 2, 0 + delay 4 + createsprite gUnknown_08593C64, 2, 0 + waitforvisualfinish + playsewithpan SE_REAPOKE, SOUND_PAN_ATTACKER + createvisualtask sub_8115A04, 2, 10, 0, 2, 10, RGB(31, 31, 31) + waitforvisualfinish + clearmonbg ANIM_ATK_PARTNER + blendoff + delay 1 + call HealingEffect + waitforvisualfinish end Move_MAGNET_RISE: + loadspritegfx ANIM_TAG_IMPACT + loadspritegfx ANIM_TAG_SPARK_2 + delay 0 + createvisualtask sub_8115A04 2, 31, -31, 1, 5, 5, RGB(31, 31, 20) + playsewithpan SE_W085B, SOUND_PAN_ATTACKER + createvisualtask AnimTask_WindUpLunge, 5, 7, 0, -12, 4, 10, 10, 12, 6 + createsprite gBattleAnimSpriteTemplate_859574C, 0, 7, 32, 24, 190, 12, 0, 1, 0 + delay 0 + createsprite gBattleAnimSpriteTemplate_859574C, 0, 7, 80, 24, 22, 12, 0, 1, 0 + createsprite gBattleAnimSpriteTemplate_859574C, 0, 7, 156, 24, 121, 13, 0, 1, 1 + delay 0 + playsewithpan SE_W085B, SOUND_PAN_ATTACKER + delay 4 + createsprite gBattleAnimSpriteTemplate_859574C, 0, 7, 100, 24, 60, 10, 0, 1, 0 + createsprite gBattleAnimSpriteTemplate_859574C, 0, 7, 170, 24, 42, 11, 0, 1, 1 + delay 0 + createsprite gBattleAnimSpriteTemplate_859574C, 0, 7, 238, 24, 165, 10, 0, 1, 1 + delay 0 + createsprite gBattleAnimSpriteTemplate_859574C, 0, 7, 32, 24, 190, 12, 0, 1, 0 + delay 0 + createsprite gBattleAnimSpriteTemplate_859574C, 0, 7, 80, 24, 22, 12, 0, 1, 0 + createsprite gBattleAnimSpriteTemplate_859574C, 0, 7, 156, 24, 121, 13, 0, 1, 1 + delay 0 + createsprite gBattleAnimSpriteTemplate_859574C, 0, 7, 100, 24, 60, 10, 0, 1, 0 + createsprite gBattleAnimSpriteTemplate_859574C, 0, 7, 170, 24, 42, 11, 0, 1, 1 + delay 0 + createsprite gBattleAnimSpriteTemplate_859574C, 0, 7, 238, 24, 165, 10, 0, 1, 1 + delay 0 + createvisualtask sub_8115A04, 2, 31, -31, 1, 0, 0, RGB(31, 31, 20) + delay 20 + createvisualtask sub_8115A04, 2, 31, -31, 1, 7, 7, RGB(31, 31, 20) + waitforvisualfinish + createvisualtask sub_8115A04, 2, 31, -31, 1, 0, 0, RGB(31, 31, 20) + waitforvisualfinish end Move_FLARE_BLITZ: @@ -1549,6 +1720,21 @@ Move_FLARE_BLITZ: end Move_FORCE_PALM: + loadspritegfx ANIM_TAG_SHADOW_BALL + loadspritegfx ANIM_TAG_HANDS_AND_FEET + loadspritegfx ANIM_TAG_IMPACT + monbg ANIM_DEF_PARTNER + monbgprio_28 ANIM_TARGET + setalpha 12, 8 + playsewithpan SE_W104, SOUND_PAN_TARGET + createsprite gUnknown_08595E68, 2, 8, -16, 0, 0, 0, 10, 1, 3, 0 + waitforvisualfinish + playsewithpan SE_W004, SOUND_PAN_TARGET + createsprite gForcePalmSpriteTemplate 3, 4, 0, 0, 1, 2 + createvisualtask AnimTask_ShakeMon, 5, 5, ANIM_TARGET, 4, 0, 6, 1 + waitforvisualfinish + clearmonbg ANIM_DEF_PARTNER + blendoff end Move_AURA_SPHERE: @@ -1716,6 +1902,57 @@ Move_NIGHT_SLASH: end Move_AQUA_TAIL: + loadspritegfx ANIM_TAG_WATER_IMPACT + loadspritegfx ANIM_TAG_SMALL_BUBBLES + loadspritegfx ANIM_TAG_ICE_CRYSTALS + monbg ANIM_DEF_PARTNER + setalpha 12, 8 + createvisualtask AnimTask_ShakeMon, 5, 5, ANIM_ATTACKER, 0, 2, 23, 1 + delay 5 + playsewithpan SE_W152, SOUND_PAN_ATTACKER + createsprite gUnknown_08595238, 2, 4, 10, 10, 25, 0 + delay 4 + playsewithpan SE_W152, SOUND_PAN_ATTACKER + createsprite gUnknown_08595238, 2, 4, -16, 0, 25, 0 + delay 4 + playsewithpan SE_W152, SOUND_PAN_ATTACKER + createsprite gUnknown_08595238, 2, 4, 20, 10, 25, 0 + delay 4 + playsewithpan SE_W152, SOUND_PAN_ATTACKER + createsprite gUnknown_08595238, 2, 4, 0, -10, 25, 0 + delay 4 + playsewithpan SE_W152, SOUND_PAN_ATTACKER + createsprite gUnknown_08595238, 2, 4, -10, 15, 25, 0 + delay 4 + playsewithpan SE_W152, SOUND_PAN_ATTACKER + createsprite gUnknown_08595238, 2, 4, 25, 20, 25, 0 + delay 4 + playsewithpan SE_W152, SOUND_PAN_ATTACKER + createsprite gUnknown_08595238, 2, 4, -20, 20, 25, 0 + delay 4 + playsewithpan SE_W152, SOUND_PAN_ATTACKER + createsprite gUnknown_08595238, 2, 4, 12, 0, 25, 0 + waitforvisualfinish + loadspritegfx ANIM_TAG_SLAM_HIT_2 + loadspritegfx ANIM_TAG_IMPACT + createsprite gHorizontalLungeSpriteTemplate, 2, 2, 4, 6 + delay 4 + playsewithpan SE_W233, SOUND_PAN_TARGET + createsprite gAquaTailKnockOffSpriteTemplate, 130, 2, -16, -16 + delay 8 + createsprite gComplexPaletteBlendSpriteTemplate, 2, 7, 31, 5, 1, RGB(31, 31, 31), 10, 0, 0 + createsprite gAquaTailHitSpriteTemplate, 131, 4, 0, 0, 1, 2 + playsewithpan SE_W004, SOUND_PAN_TARGET + createsprite gSlideMonToOffsetSpriteTemplate, 2, 5, 1, -12, 10, 0, 3 + createsprite gSlideMonToOriginalPosSpriteTemplate, 2, 3, 0, 0, 5 + delay 3 + createvisualtask AnimTask_ShakeMonInPlace, 2, 5, 1, 0, 3, 6, 1 + delay 5 + createsprite gSlideMonToOriginalPosSpriteTemplate, 2, 3, 1, 0, 6 + delay 10 + waitforvisualfinish + clearmonbg ANIM_DEF_PARTNER + blendoff end Move_SEED_BOMB: @@ -1826,12 +2063,99 @@ Move_BUG_BUZZ: end Move_DRAGON_PULSE: - end + createsprite gSimplePaletteBlendSpriteTemplate, 2, 5, 1, 1, 0, 7, 0 + waitforvisualfinish + loadspritegfx ANIM_TAG_DRAGON_PULSE + playsewithpan SE_W060, SOUND_PAN_ATTACKER + createsoundtask sub_8158C58, 7, 200, -64, SOUND_PAN_TARGET, 3, 4, 0, 15 + call DragonPulseParticle + call DragonPulseParticle + createvisualtask AnimTask_SwayMon, 5, 5, 0, 6, 51200, 4, 1 + createvisualtask sub_8115A04, 2, 6, 4, 2, 2, 0, 12, RGB(30, 10, 13) + call DragonPulseParticle + call DragonPulseParticle + call DragonPulseParticle + call DragonPulseParticle + call DragonPulseParticle + call DragonPulseParticle + call DragonPulseParticle + call DragonPulseParticle + call DragonPulseParticle + waitforvisualfinish + delay 1 + createsprite gSimplePaletteBlendSpriteTemplate, 2, 5, 1, 1, 7, 0, 0 + waitforvisualfinish + clearmonbg ANIM_DEF_PARTNER + blendoff + end +DragonPulseParticle: + createsprite gDragonPulseSpriteTemplate, 130, 6, 16, 0, 0, 0, 13, 0 + delay 4 + return Move_DRAGON_RUSH: + loadspritegfx ANIM_TAG_SLAM_HIT_2 + loadspritegfx ANIM_TAG_IMPACT + loadspritegfx ANIM_TAG_ROCKS + loadspritegfx ANIM_TAG_RED_HEART + createsprite gHorizontalLungeSpriteTemplate, 2, 2, 4, 6 + delay 4 + playsewithpan SE_W233, SOUND_PAN_TARGET + createsprite gDragonRushSpriteTemplate, 131, 2, -16, -16 + delay 8 + createsprite gComplexPaletteBlendSpriteTemplate, 2, 7, 31, 5, 1, RGB(31, 31, 31), 10, 0, 0 + createsprite gBasicHitSplatSpriteTemplate, 3, 4, 0, 0, 1, 1 + createvisualtask AnimTask_ShakeMon, 2, 5, ANIM_TARGET, 3, 0, 5, 1 + waitforvisualfinish + playsewithpan 131, SOUND_PAN_TARGET + createsprite gUnknown_08596B1C, 2, 6, 0, 0, 20, 24, 14, 2 + createsprite gUnknown_08596B1C, 2, 6, 5, 0, -20, 24, 14, 1 + createsprite gUnknown_08596B1C, 2, 6, 0, 5, 20, -24, 14, 2 + createsprite gUnknown_08596B1C, 2, 6, -5, 0, 20, 24, 14, 2 + createsprite gUnknown_08596B1C, 2, 6, 0, -5, 30, 18, 8, 2 + createsprite gUnknown_08596B1C, 2, 6, 0, 0, 30, -18, 8, 2 + createsprite gUnknown_08596B1C, 2, 6, 0, 0, -30, 18, 8, 2 + createsprite gUnknown_08596B1C, 2, 6, 0, 0, -30, -18, 8, 2 + createvisualtask AnimTask_ShakeMon, 2, 5, ANIM_TARGET, 0, 3, 7, 1 + waitforvisualfinish + clearmonbg ANIM_DEF_PARTNER + blendoff end Move_POWER_GEM: + createsprite gSimplePaletteBlendSpriteTemplate, 2, 5, 1, 1, 0, 7, 0 + waitforvisualfinish + loadspritegfx ANIM_TAG_POWER_GEM + playsewithpan 152, SOUND_PAN_ATTACKER + createvisualtask AnimTask_ScaleMonAndRestore, 5, -7, -7, 11, 0, 0 + waitforvisualfinish + delay 30 + createvisualtask AnimTask_BlendMonInAndOut 5, 5, 0, RGB(31, 31, 31), 12, 5, 1 + delay 4 + createvisualtask AnimTask_ScaleMonAndRestore, 5, -7, -7, 11, 0, 0 + playsewithpan SE_W179, SOUND_PAN_ATTACKER + createsprite gPowerGemOrbSpriteTemplate 2, 2, 26, 0 + createsprite gPowerGemOrbSpriteTemplate 2, 2, 26, 42 + createsprite gPowerGemOrbSpriteTemplate 2, 2, 26, 84 + createsprite gPowerGemOrbSpriteTemplate 2, 2, 26, 126 + createsprite gPowerGemOrbSpriteTemplate 2, 2, 26, 168 + createsprite gPowerGemOrbSpriteTemplate 2, 2, 26, 210 + delay 52 + setarg 7, -1 + playsewithpan SE_W115, SOUND_PAN_ATTACKER + createvisualtask AnimTask_ScaleMonAndRestore, 5, -7, -7, 11, 0, 0 + createsprite gPowerGemScatterSpriteTemplate 130, 1, 0 + createsprite gPowerGemScatterSpriteTemplate 130, 1, 32 + createsprite gPowerGemScatterSpriteTemplate 130, 1, 64 + createsprite gPowerGemScatterSpriteTemplate 130, 1, 96 + createsprite gPowerGemScatterSpriteTemplate 130, 1, 128 + createsprite gPowerGemScatterSpriteTemplate 130, 1, 160 + createsprite gPowerGemScatterSpriteTemplate 130, 1, SOUND_PAN_ATTACKER + createsprite gPowerGemScatterSpriteTemplate 130, 1, 224 + waitforvisualfinish + clearmonbg ANIM_DEF_PARTNER + createsprite gSimplePaletteBlendSpriteTemplate 2, 5, 1, 1, 7, 0, 0 + blendoff end Move_DRAIN_PUNCH: @@ -1856,7 +2180,24 @@ Move_DRAIN_PUNCH: end Move_VACUUM_WAVE: - end + loadspritegfx ANIM_TAG_IMPACT + loadspritegfx ANIM_TAG_HANDS_AND_FEET + monbg ANIM_ATK_PARTNER + createvisualtask AnimTask_GetAttackerSide, 2, 0 + waitbgfadein + delay 0 + setalpha 9, 8 + createvisualtask sub_80A8BC4, 2, 2, RGB(8, 9, 24), 17 + playsewithpan SE_W026, SOUND_PAN_ATTACKER + delay 6 + createsprite gBasicHitSplatSpriteTemplate 131, 4, 0, 0, 1, 1 + createsprite gFistFootSpriteTemplate 132, 5, 0, 0, 8, 1, 0 + playsewithpan SE_W004, SOUND_PAN_TARGET + createvisualtask AnimTask_ShakeMon 2, 5, ANIM_TARGET, 3, 0, 6, 1 + waitforvisualfinish + clearmonbg ANIM_ATK_PARTNER + blendoff + end Move_FOCUS_BLAST: loadspritegfx ANIM_TAG_CIRCLE_OF_LIGHT @@ -1920,16 +2261,135 @@ Move_BRAVE_BIRD: end Move_EARTH_POWER: + loadspritegfx ANIM_TAG_SMALL_EMBER + loadspritegfx ANIM_TAG_FIRE_PLUME + createvisualtask sub_81152DC, 3, 5, 10, 50 + createvisualtask sub_81152DC, 3, 1, 10, 50 + playsewithpan SE_W089, SOUND_PAN_TARGET + delay 40 + loopsewithpan 145, SOUND_PAN_TARGET 11, 3 + createvisualtask AnimTask_ShakeMon 5, 5, ANIM_TARGET, 0, 3, 25, 1 + createsprite gUnknown_08596F28, 194, 3, 1, 5, 0 + delay 1 + createsprite gUnknown_08596F28, 194, 3, 1, -10, -15 + delay 1 + createsprite gUnknown_08596F28, 130, 3, 1, 0, 25 + delay 1 + createsprite gUnknown_08596F28, 194, 3, 1, 15, 5 + delay 1 + createsprite gUnknown_08596F28, 194, 3, 1, -25, 0 + delay 1 + createsprite gUnknown_08596F28, 130, 3, 1, 30, 30 + delay 1 + createsprite gUnknown_08596F28, 130, 3, 1, -27, 25 + delay 1 + createsprite gUnknown_08596F28, 194, 3, 1, 0, 8 + waitforvisualfinish + createsprite gSlideMonToOriginalPosSpriteTemplate, 194, 3, 0, 0, 4 + waitforvisualfinish end Move_SWITCHEROO: + fadetobg BG_DARK + waitbgfadein + loadspritegfx ANIM_TAG_ITEM_BAG + loadspritegfx ANIM_TAG_SPEED_DUST + createsprite gTrickBagSpriteTemplate, 2, 2, -39, 80 + createsprite gTrickBagSpriteTemplate, 2, 2, -39, 208 + delay 16 + playsewithpan SE_W166, 0 + createvisualtask sub_8106020, 3, 0 + createvisualtask sub_81060B0, 3, 0 + delay 30 + playsewithpan SE_W104, 0 + delay 24 + playsewithpan SE_W104, 0 + delay 16 + playsewithpan SE_W104, 0 + delay 16 + playsewithpan SE_W104, 0 + delay 16 + playsewithpan SE_W104, 0 + delay 16 + playsewithpan SE_W104, 0 + delay 16 + playsewithpan SE_W213, 0 + createvisualtask AnimTask_ShakeMon, 3, 5, ANIM_ATTACKER, 5, 0, 7, 2 + createvisualtask AnimTask_ShakeMon, 3, 5, ANIM_TARGET, 5, 0, 7, 2 + waitforvisualfinish + restorebg + waitbgfadein end Move_GIGA_IMPACT: - end + loadspritegfx ANIM_TAG_IMPACT + monbg ANIM_DEF_PARTNER + setalpha 12, 8 + playsewithpan SE_W036, SOUND_PAN_ATTACKER + createsprite gVerticalDipSpriteTemplate, ANIM_ATTACKER, 2, 6, 1, ANIM_ATTACKER + waitforvisualfinish + delay 11 + createsprite gSlideMonToOffsetSpriteTemplate, ANIM_ATTACKER, 2, 0, 26, 0, 0, 5 + delay 6 + @monbg ANIM_DEF_PARTNER + @setalpha 12, 8 + @createvisualtask AnimTask_WindUpLunge, 5, 7, 0, -18, 8, 23, 10, 40, 10 + @delay 35 + createsprite gComplexPaletteBlendSpriteTemplate, 2, 7, 31, 3, 1, 0, 10, 0, 0 + createsprite gBasicHitSplatSpriteTemplate, 4, 4, -10, 0, 1, 0 + playsewithpan SE_W025B, SOUND_PAN_TARGET + call GigaImpactAction + delay 1 + createsprite gSlideMonToOffsetSpriteTemplate 2, 5, 1, -16, 0, 0, 4 + waitforvisualfinish + createvisualtask AnimTask_ShakeMonInPlace 2, 5, 1, 4, 0, 12, 1 + waitforvisualfinish + delay 2 + createsprite gSlideMonToOriginalPosSpriteTemplate 2, 3, 0, 0, 5 + delay 3 + createsprite gSlideMonToOriginalPosSpriteTemplate 2, 3, 1, 0, 6 + waitforvisualfinish + clearmonbg ANIM_DEF_PARTNER + blendoff + restorebg + waitbgfadein + end +GigaImpactAction: + delay 2, + createvisualtask AnimTask_IsContest, 2, 0 + jumpargeq 7, 1, GigaImpactBgContest + createvisualtask AnimTask_IsTargetPlayerSide, 2, 0 + jumpargeq 7, 0, GigaImpactBgOpponent + jumpargeq 7, 1, GigaImpactBgPlayer +GigaImpactBgContest: + changebg BG_GIGA_IMPACT_CONTEST + goto GigaImpactReturnToEnd +GigaImpactReturnToEnd: + return +GigaImpactBgOpponent: + changebg BG_GIGA_IMPACT_OPPONENT + goto GigaImpactReturnToEnd +GigaImpactBgPlayer: + changebg BG_GIGA_IMPACT_PLAYER + return Move_NASTY_PLOT: - end + loadspritegfx ANIM_TAG_AMNESIA + call NastyPlotAction + delay 8 + createsprite gUnknown_08596744, 20, 0 + playsewithpan SE_W118, SOUND_PAN_ATTACKER, + delay 54 + loopsewithpan SE_W118, SOUND_PAN_ATTACKER, 16, 3 + waitforvisualfinish + call UnsetPsychicBg + end +NastyPlotAction: + fadetobg BG_DARK + waitbgfadeout + createvisualtask sub_815A5C8, 5, 0 + waitbgfadein + return Move_BULLET_PUNCH: loadspritegfx ANIM_TAG_IMPACT @@ -1986,8 +2446,56 @@ Move_BULLET_PUNCH: end Move_AVALANCHE: + loadspritegfx ANIM_TAG_ROCKS + loadspritegfx ANIM_TAG_ICE_CHUNK + monbg ANIM_DEF_PARTNER + createsprite gBattleAnimSpriteTemplate_85972D8, 2, 4, 7, 1, 11, 1 + createsprite gAvalancheSpriteTemplate, 130, 4, -5, 1, -5, 1 + playsewithpan SE_W088, SOUND_PAN_TARGET + delay 2 + createsprite gAvalancheSpriteTemplate, 130, 4, 5, 0, 6, 1 + playsewithpan SE_W088, SOUND_PAN_TARGET + delay 2 + createsprite gAvalancheSpriteTemplate, 130, 4, 19, 1, 10, 1 + playsewithpan SE_W088, SOUND_PAN_TARGET + delay 2 + createsprite gAvalancheSpriteTemplate 130, 4, -17, 2, -20, 1 + playsewithpan SE_W088, SOUND_PAN_TARGET + createvisualtask AnimTask_ShakeMon, 2, 5, ANIM_TARGET, 0, 5, 50, 1 + createvisualtask AnimTask_ShakeMon, 2, 5, ANIM_DEF_PARTNER, 0, 5, 50, 1 + delay 2 + call SnowSlide1 + call SnowSlide1 + waitforvisualfinish + clearmonbg ANIM_DEF_PARTNER end - +SnowSlide1: + createsprite gAvalancheSpriteTemplate, ANIM_TARGET, 2, -20, 0, -10, 1 + playsewithpan SE_W088, SOUND_PAN_TARGET + delay 2 + createsprite gAvalancheSpriteTemplate, ANIM_TARGET, 2, 28, 1, 10, 1 + playsewithpan SE_W088, SOUND_PAN_TARGET + delay 2 + createsprite gAvalancheSpriteTemplate, ANIM_TARGET, 2, -10, 1, -5, 1 + playsewithpan SE_W088, SOUND_PAN_TARGET + delay 2 + createsprite gAvalancheSpriteTemplate, ANIM_TARGET, 2, 10, 0, 6, 1 + playsewithpan SE_W088, SOUND_PAN_TARGET + delay 2 + createsprite gAvalancheSpriteTemplate, ANIM_TARGET, 2, 24, 1, 10, 1 + playsewithpan SE_W088, SOUND_PAN_TARGET + delay 2 + createsprite gAvalancheSpriteTemplate, ANIM_TARGET, 2, -32, 2, -10, 1 + playsewithpan SE_W088, SOUND_PAN_TARGET + delay 2 + createsprite gAvalancheSpriteTemplate, ANIM_TARGET, 2, -20, 0, -10, 1 + playsewithpan SE_W088, SOUND_PAN_TARGET + delay 2 + createsprite gAvalancheSpriteTemplate, ANIM_TARGET, 2, 30, 2, 10, 1 + playsewithpan SE_W088, SOUND_PAN_TARGET + delay 2 + return + Move_ICE_SHARD: monbg ANIM_TARGET monbgprio_28 ANIM_TARGET @@ -2025,6 +2533,28 @@ Move_ICE_SHARD: end Move_SHADOW_CLAW: + createsprite gSimplePaletteBlendSpriteTemplate 2, 5, 1, 1, 0, 7, 0 + waitforvisualfinish + loadspritegfx ANIM_TAG_BLUE_LIGHT_WALL + loadspritegfx ANIM_TAG_CLAW_SLASH + loadspritegfx ANIM_TAG_TORN_METAL + monbg ANIM_TARGET + setalpha 12, 8 + createsprite gHorizontalLungeSpriteTemplate 2, 2, 6, 4 + delay 4 + createvisualtask AnimTask_ShakeMon2 2, 5, 1, 2, 0, 18, 1 + createsprite gBattleAnimSpriteTemplate_8597138, 130, 3, -10, -10, 0 + createsprite gBattleAnimSpriteTemplate_8597138, 130, 3, -10, 10, 0 + playsewithpan 136, SOUND_PAN_TARGET + delay 12, + createsprite gBattleAnimSpriteTemplate_8597138, 130, 3, 10, -10, 1 + createsprite gBattleAnimSpriteTemplate_8597138, 130, 3, 10, 10, 1 + playsewithpan 136, SOUND_PAN_TARGET + waitforvisualfinish + createsprite gSimplePaletteBlendSpriteTemplate 2, 5, 1, 1, 7, 0, 0 + waitforvisualfinish + clearmonbg ANIM_DEF_PARTNER + blendoff end Move_THUNDER_FANG: @@ -2203,33 +2733,257 @@ Move_MUD_BOMB: end Move_PSYCHO_CUT: + loadspritegfx ANIM_TAG_SPIRAL + loadspritegfx ANIM_TAG_PSYCHO_CUT + monbg ANIM_ATK_PARTNER + createsprite gPsychoCutSpiralSpriteTemplate, 2, 4, 0, 0, 0, 0 + createvisualtask sub_8116620, 10, 1, 0, 4, 4, RGB_BLACK + createvisualtask sub_8116620, 9, 5, 2, 2, 10, 0, RGB(20, 12, 23) + createvisualtask sub_8116620, 9, 2, 2, 10, 0, RGB(20, 12, 23) + delay 30 + clearmonbg ANIM_ATK_PARTNER + blendoff + waitforvisualfinish + monbg ANIM_TARGET + monbgprio_28 ANIM_TARGET + setalpha 12, 8 + playsewithpan 160, SOUND_PAN_ATTACKER, + createsprite gPsychoCutSpriteTemplate, 130, 5, 20, 0, -8, 0, 20 + waitforvisualfinish + clearmonbg ANIM_TARGET end Move_ZEN_HEADBUTT: + loadspritegfx ANIM_TAG_CIRCLE_OF_LIGHT + loadspritegfx ANIM_TAG_WATER_IMPACT + monbg ANIM_ATTACKER + setalpha 12, 8 + createsprite gSimplePaletteBlendSpriteTemplate, 2, 5, 1, 2, 0, 4, 0 + waitforvisualfinish + createsprite gZenHeadbuttSpriteTemplate, 66, 1, 0 + delay 18, + playsewithpan SE_W234, SOUND_PAN_ATTACKER + waitforvisualfinish + delay 2, + playsewithpan SE_W029, SOUND_PAN_ATTACKER + loadspritegfx ANIM_TAG_IMPACT + createsprite gUnknown_08592CD8, 2, 1, 0 + playsewithpan SE_W029, SOUND_PAN_ATTACKER + waitforvisualfinish + delay 2 + createsprite gUnknown_08592CD8, 2, 1, 1 + waitforvisualfinish + createvisualtask AnimTask_ShakeMonInPlace, 2, 5, 0, 2, 0, 4, 1 + createvisualtask AnimTask_ShakeMon, 2, 5, ANIM_TARGET, 5, 0, 6, 1 + createsprite gUnknown_08592CD8, 2, 1, 2 + createsprite gAquaTailHitSpriteTemplate, 131, 4, 0, 0, 1, 1 + playsewithpan SE_W233B, SOUND_PAN_TARGET + waitforvisualfinish + createsprite gSimplePaletteBlendSpriteTemplate, 2, 5, 1, 4, 4, 0, 0 + clearmonbg ANIM_ATTACKER + blendoff + delay 1 end Move_MIRROR_SHOT: + loopsewithpan SE_W231, SOUND_PAN_ATTACKER, 28, 2 + createvisualtask AnimTask_MetallicShine, 5, 1, 0, 0 + waitforvisualfinish + loadspritegfx ANIM_TAG_IMPACT + loadspritegfx ANIM_TAG_WHITE_CIRCLE_OF_LIGHT + createvisualtask sub_8116664, 5, 5, 5, 2, 0, 10, -1 + createvisualtask AnimTask_BlendParticle, 5, ANIM_TAG_IMPACT, 0, 12, 12, RGB(21, 21, 21) + waitforvisualfinish + createsprite gUnknown_085973A0, 131, 2, 1, 2 + createvisualtask sub_8159210, 5, 2, 215, 63 + delay 3 + createsprite gUnknown_085973A0, 131, 2, 1, 2 + createvisualtask sub_8159210, 5, 2, 215, 63 + delay 3 + createsprite gUnknown_085973A0, 131, 2, 1, 2 + createvisualtask sub_8159210, 5, 2, 215, 63 + delay 3 + createsprite gUnknown_085973A0, 131, 2, 1, 2 + createvisualtask sub_8159210, 5, 2, 215, 63 + delay 3 + createsprite gUnknown_085973A0, 131, 2, 1, 2 + createvisualtask sub_8159210, 5, 2, 215, 63 + delay 3 + createsprite gUnknown_085973A0, 131, 2, 1, 2 + createvisualtask sub_8159210, 5, 2, 215, 63 + waitforvisualfinish + createvisualtask sub_8116664, 5, 5, 2, 16, 0, RGB_WHITEALPHA + createvisualtask sub_81152DC, 5, 1, 5, 14 + waitforvisualfinish + clearmonbg ANIM_ATTACKER + blendoff end Move_FLASH_CANNON: end Move_ROCK_CLIMB: + createvisualtask AnimTask_Splash, 2, 2, ANIM_ATTACKER, 3 + delay 8 + loopsewithpan SE_W039, SOUND_PAN_ATTACKER, 38, 3 + waitforvisualfinish + loadspritegfx ANIM_TAG_IMPACT + loadspritegfx ANIM_TAG_MUD_SAND + loadspritegfx ANIM_TAG_ROCKS + monbg ANIM_DEF_PARTNER + monbgprio_28 ANIM_TARGET + setalpha 12, 8 + createvisualtask sub_8110F74, 2, 0 + waitforvisualfinish + createvisualtask sub_80D6388, 2, 5, 0, 1, 30, 1, RGB(0, 16, 1) + createsprite gBasicHitSplatSpriteTemplate, 131, 4, -15, 8, 1, 1 + playsewithpan SE_W233B, SOUND_PAN_TARGET + delay 1 + playsewithpan SE_W233B, SOUND_PAN_TARGET + createsprite gBasicHitSplatSpriteTemplate, 131, 4, -5, -12, 1, 1 + delay 1 + playsewithpan SE_W233B, SOUND_PAN_TARGET + createsprite gBasicHitSplatSpriteTemplate, 131, 4, 0, -32, 1, 1 + delay 1 + playsewithpan SE_W233B, SOUND_PAN_TARGET + createsprite gBasicHitSplatSpriteTemplate, 131, 4, 5, -52, 1, 1 + createsprite gSlideMonToOffsetSpriteTemplate, 2, 5, 1, -25, 16, 1, 4 + delay 4 + createvisualtask AnimTask_ShakeMonInPlace, 2, 5, 1, 0, 3, 6, 1 + delay 30 + createsprite gSlideMonToOriginalPosSpriteTemplate, 2, 3, 0, 0, 6 + delay 4 + createsprite gSlideMonToOriginalPosSpriteTemplate, 2, 3, 1, 0, 6, + clearmonbg ANIM_DEF_PARTNER + blendoff end Move_DEFOG: - end + loadspritegfx ANIM_TAG_WHITE_CIRCLE_OF_LIGHT + monbg ANIM_ATTACKER + setalpha 12, 8 + playsewithpan SE_W076, SOUND_PAN_ATTACKER + createsprite gUnknown_08596898, ANIM_ATTACKER, 41, 0, 0, 0, 0 + delay 20 + createvisualtask sub_8116664, 5, 5, 2, 0, 16, -1 + createvisualtask AnimTask_BlendParticle, 5, ANIM_TAG_WHITE_CIRCLE_OF_LIGHT, 2, 0, 16, -1 + waitforvisualfinish + waitforvisualfinish + delay 16 + createvisualtask sub_8116664, 5, 5, 2, 16, 0, -1 + waitforvisualfinish + clearmonbg ANIM_ATTACKER + blendoff + end Move_TRICK_ROOM: + fadetobg BG_TRICK_ROOM + waitbgfadein + call Growth1 + waitforvisualfinish + delay 32 + blendoff + clearmonbg ANIM_DEF_PARTNER + restorebg + waitbgfadein end Move_DRACO_METEOR: + loadspritegfx ANIM_TAG_WARM_ROCK + loadspritegfx ANIM_TAG_GOLD_STARS + loadspritegfx ANIM_TAG_IMPACT + loadspritegfx ANIM_TAG_ICE_SPIKES + playsewithpan SE_W268, SOUND_PAN_TARGET + fadetobg BG_COSMIC + waitbgfadein + waitforvisualfinish + createsprite gDracoMeteorSmashSpriteTemplate, 131, 5, -47, -63, 72, 32, 30 + delay 10 + createsprite gDracoMeteorSmashSpriteTemplate, 131, 5, -111, -63, 8, 32, 30 + delay 40 + createsprite gDracoMetorSpriteTemplate, 131, 4, 0, 0, 0, 30 + createsprite gDracoMeteorSmashSpriteTemplate, 131, 5, -79, -63, 40, 32, 30 + delay 20 + playsewithpan SE_W088, SOUND_PAN_TARGET + delay 10 + restorebg + waitbgfadein + waitforvisualfinish end Move_DISCHARGE: + loadspritegfx ANIM_TAG_IMPACT + loadspritegfx ANIM_TAG_SPARK_2 + delay 0 + createvisualtask sub_8115A04, 2, 3, -31, 1, 5, 5, RGB(31, 31, 20) + playsewithpan SE_W085B, SOUND_PAN_ATTACKER + createsprite gBattleAnimSpriteTemplate_859574C, ANIM_ATTACKER, 0, 32, 24, 190, 12, 0, 1, 0 + delay 0 + createsprite gBattleAnimSpriteTemplate_859574C, ANIM_ATTACKER, 0, 80, 24, 22, 12, 0, 1, 0 + createsprite gBattleAnimSpriteTemplate_859574C, ANIM_ATTACKER, 0, 156, 24, 121, 13, 0, 1, 1 + delay 0 + createvisualtask sub_8115A04, 2, 3, -31, 1, 0, 0, RGB(31, 31, 20) + delay 10 + createvisualtask sub_8115A04 2, 3, -31, 1, 5, 5, RGB(31, 31, 20) + playsewithpan SE_W085B, SOUND_PAN_ATTACKER + createsprite gBattleAnimSpriteTemplate_859574C, ANIM_ATTACKER, 0, 100, 24, 60, 10, 0, 1, 0 + createsprite gBattleAnimSpriteTemplate_859574C, ANIM_ATTACKER, 0, 170, 24, 42, 11, 0, 1, 1 + loadspritegfx ANIM_TAG_WHITE_CIRCLE_OF_LIGHT + loadspritegfx ANIM_TAG_IMPACT + waitbgfadein + monbg ANIM_ATTACKER + setalpha 12, 8 + playsewithpan SE_W076, SOUND_PAN_ATTACKER + createsprite gUnknown_08596898, ANIM_ATTACKER, 41, 0, 0, 0, 0 + delay 20 + createvisualtask sub_8116664, 5, 5, 2, 0, 16, RGB_WHITEALPHA + createvisualtask AnimTask_BlendParticle, 5, ANIM_TAG_WHITE_CIRCLE_OF_LIGHT, 2, 0, 16, RGB_WHITEALPHA + waitforvisualfinish + createvisualtask AnimTask_BlendParticle, 5, ANIM_TAG_IMPACT, 0, 12, 12, RGB(0, 0, 23) + waitforvisualfinish + createsprite gUnknown_085973A0, ANIM_TARGET, 3, 1, 2 + createvisualtask sub_8159210, 5, 215, SOUND_PAN_TARGET + delay 3 + createsprite gUnknown_085973A0, ANIM_TARGET, 3, 1, 2 + createvisualtask sub_8159210, 5, 215, SOUND_PAN_TARGET + delay 3 + createsprite gUnknown_085973A0, ANIM_TARGET, 3, 1, 2 + createvisualtask sub_8159210, 5, 215, SOUND_PAN_TARGET + delay 3 + createsprite gUnknown_085973A0, ANIM_TARGET, 3, 1, 2 + createvisualtask sub_8159210, 5, 215, SOUND_PAN_TARGET + delay 3 + createsprite gUnknown_085973A0, ANIM_TARGET, 3, 1, 2 + createvisualtask sub_8159210, 5, 215, SOUND_PAN_TARGET + delay 3 + createsprite gUnknown_085973A0, ANIM_TARGET, 3, 1, 2 + createvisualtask sub_8159210, 5, 215, SOUND_PAN_TARGET + waitforvisualfinish + createvisualtask sub_8116664, 5, 5, 2, 16, 0, RGB_WHITEALPHA + createvisualtask sub_81152DC, 5, 1, 5, 14 + waitforvisualfinish + clearmonbg ANIM_ATTACKER + blendoff + call ElectricityEffect + waitforvisualfinish end Move_LAVA_PLUME: + loadspritegfx ANIM_TAG_FIRE_PLUME + loopsewithpan 152, SOUND_PAN_ATTACKER, 9, 2 + createvisualtask sub_8115A04, 2, 2, 2, 2, 0, 11, 31 + createvisualtask AnimTask_ShakeMon2 2, 5, 0, 1, 0, 32, 1 + waitforvisualfinish + createsprite gLavaPlumeSpriteTemplate, 130, 1, 0 + createsprite gLavaPlumeSpriteTemplate, 130, 1, 32 + createsprite gLavaPlumeSpriteTemplate, 130, 1, 64 + createsprite gLavaPlumeSpriteTemplate, 130, 1, 96 + createsprite gLavaPlumeSpriteTemplate, 130, 1, 128 + createsprite gLavaPlumeSpriteTemplate, 130, 1, 160 + createsprite gLavaPlumeSpriteTemplate, 130, 1, SOUND_PAN_ATTACKER + createsprite gLavaPlumeSpriteTemplate, 130, 1, 224 + playsewithpan SE_W221, SOUND_PAN_ATTACKER + waitforvisualfinish end Move_LEAF_STORM: @@ -2359,6 +3113,49 @@ Move_POWER_WHIP: end Move_ROCK_WRECKER: + jumpargeq 7, 1, RockWrecker_1 + fadetobg BG_ROCK_WRECKER + waitbgfadeout + createvisualtask sub_8117660, 5, -1024, 0, 1, -1 + goto RockWrecker_2 +RockWrecker_1: + fadetobg BG_ROCK_WRECKER + waitbgfadeout + createvisualtask sub_8117660, 5, -1024, 0, 0, -1 + loadspritegfx ANIM_TAG_ROCKS + loadspritegfx ANIM_TAG_IMPACT + createsprite gHorizontalLungeSpriteTemplate, 2, 2, 4, 6 + delay 3 + playsewithpan SE_W207, SOUND_PAN_ATTACKER + createsprite gUnknown_08596C98, 130, 6, 16, 0, 0, 0, 25, 257 + waitforvisualfinish + createsprite gBasicHitSplatSpriteTemplate, 131, 4, 0, 0, 1, 1 + playsewithpan SE_W088 SOUND_PAN_TARGET + createsprite gUnknown_08596B1C, 130, 6, 0, 0, 20, 24, 14, 2 + createvisualtask AnimTask_ShakeMon, 2, 5, ANIM_TARGET, 3, 0, 5, 1 + createsprite gUnknown_08596B1C, 130, 6, 5, 0, -20, 24, 14, 1 + createsprite gUnknown_08596B1C, 130, 6, 0, 5, 20, -18, 14, 2 + createsprite gUnknown_08596B1C, 130, 6, -5, 0, -20, -18, 14, 2 + waitforvisualfinish + call UnsetPsychicBg + end +RockWrecker_2: + loadspritegfx ANIM_TAG_ROCKS + loadspritegfx ANIM_TAG_IMPACT + createsprite gHorizontalLungeSpriteTemplate, 2, 2, 4, 6 + delay 3 + playsewithpan SE_W207, SOUND_PAN_ATTACKER + createsprite gUnknown_08596C98, 130, 6, 16, 0, 0, 0, 25, 257 + waitforvisualfinish + createsprite gBasicHitSplatSpriteTemplate, 131, 4, 0, 0, 1, 1 + playsewithpan SE_W088 SOUND_PAN_TARGET + createsprite gUnknown_08596B1C 130, 6, 0, 0, 20, 24, 14, 2 + createvisualtask AnimTask_ShakeMon, 2, 5, ANIM_TARGET, 3, 0, 5, 1 + createsprite gUnknown_08596B1C 130, 6, 5, 0, -20, 24, 14, 1 + createsprite gUnknown_08596B1C 130, 6, 0, 5, 20, -18, 14, 2 + createsprite gUnknown_08596B1C 130, 6, -5, 0, -20, -18, 14, 2 + waitforvisualfinish + call UnsetPsychicBg end Move_CROSS_POISON: @@ -2378,7 +3175,55 @@ Move_CROSS_POISON: end Move_GUNK_SHOT: - end + loadspritegfx ANIM_TAG_WATER_ORB + loadspritegfx ANIM_TAG_POISON_BUBBLE + loadspritegfx ANIM_TAG_WATER_IMPACT + loadspritegfx ANIM_TAG_POISON_BUBBLE + monbg ANIM_DEF_PARTNER + monbgprio_28 ANIM_TARGET + setalpha 12, 8 + createvisualtask AnimTask_ShakeMon 5, 5, ANIM_ATTACKER, 0, 2, 40, 1 + delay 6 + panse_1B SE_W056, SOUND_PAN_ATTACKER, SOUND_PAN_TARGET, 2, 0 + createvisualtask sub_81076C8, 5, 1, 100 + call GunkShotParticles + call GunkShotParticles + call GunkShotParticles + createvisualtask AnimTask_ShakeMon, 5, 5, ANIM_TARGET, 3, 0, 27, 1 + loopsewithpan SE_W145C, SOUND_PAN_TARGET, 3, 15 + call GunkShotImpact + call GunkShotParticles + call GunkShotParticles + call GunkShotImpact + call GunkShotParticles + call GunkShotParticles + call GunkShotImpact + call GunkShotParticles + call GunkShotParticles + call GunkShotImpact + call GunkShotParticles + call GunkShotParticles + call GunkShotImpact + delay 1 + delay 1 + call GunkShotImpact + call PoisonBubblesEffect + waitforvisualfinish + clearmonbg ANIM_DEF_PARTNER + blendoff + end +GunkShotParticles: + createsprite gGunkShoParticlesSpriteTemplate, 3, 4, 10, 10, 0, 16 + createsprite gGunkShoParticlesSpriteTemplate, 3, 4, 10, 10, 0, -16 + delay 1 + createsprite gGunkShoParticlesSpriteTemplate, 3, 4, 10, 10, 0, 16 + createsprite gGunkShoParticlesSpriteTemplate, 3, 4, 10, 10, 0, -16 + delay 1 + return +GunkShotImpact: + createsprite gGunkShotImpactSpriteTemplate, 4, 4, 0, 15, 1, 1 + createsprite gGunkShotImpactSpriteTemplate, 4, 4, 0, -15, 1, 1 + return Move_IRON_HEAD: loadspritegfx ANIM_TAG_GUST @@ -2403,18 +3248,173 @@ Move_IRON_HEAD: end Move_MAGNET_BOMB: + loadspritegfx ANIM_TAG_IMPACT + loadspritegfx ANIM_TAG_SPARK_2 + delay 0 + playsewithpan 119, 192 + createsprite gBattleAnimSpriteTemplate_859574C, 0, 7, 32, 24, 190, 12, 0, 1, 0 + delay 0 + createsprite gBattleAnimSpriteTemplate_859574C, 0, 7, 80, 24, 22, 12, 0, 1, 0 + createsprite gBattleAnimSpriteTemplate_859574C, 0, 7, 156, 24, 121, 13, 0, 1, 1 + delay 0 + playsewithpan 119, 192 + createsprite gBattleAnimSpriteTemplate_859574C 0, 7, 100, 24, 60, 10, 0, 1, 0 + createsprite gBattleAnimSpriteTemplate_859574C 0, 7, 170, 24, 42, 11, 0, 1, 1 + delay 0 + createsprite gBattleAnimSpriteTemplate_859574C 0, 7, 238, 24, 165, 10, 0, 1, 1 + delay 0 + loadspritegfx ANIM_TAG_RED_ORB + playsewithpan 152, SOUND_PAN_ATTACKER + createvisualtask AnimTask_ScaleMonAndRestore, 5, -7, -7, 11, ANIM_ATTACKER, 0 + waitforvisualfinish + delay 30 + createvisualtask AnimTask_BlendMonInAndOut, 5, ANIM_ATTACKER, RGB(19, 31, 31), 12, 5, 1 + delay 4 + createvisualtask AnimTask_ScaleMonAndRestore, 5, -7, -7, 11, ANIM_ATTACKER, 0 + playsewithpan 217, SOUND_PAN_ATTACKER + createsprite gHiddenPowerOrbSpriteTemplate, ANIM_ATTACKER, 2, 26, 0 + createsprite gHiddenPowerOrbSpriteTemplate, ANIM_ATTACKER, 2, 26, 42 + createsprite gHiddenPowerOrbSpriteTemplate, ANIM_ATTACKER, 2, 26, 84 + createsprite gHiddenPowerOrbSpriteTemplate, ANIM_ATTACKER, 2, 26, 126 + createsprite gHiddenPowerOrbSpriteTemplate, ANIM_ATTACKER, 2, 26, 168 + createsprite gHiddenPowerOrbSpriteTemplate, ANIM_ATTACKER, 2, 26, 210 + delay 52 + setarg 7, -1 + playsewithpan 207, SOUND_PAN_ATTACKER + createvisualtask AnimTask_ScaleMonAndRestore, 5, -7, -7, 11, ANIM_ATTACKER, 0 + createsprite gHiddenPowerOrbScatterSpriteTemplate, ANIM_TARGET, 2, 0 + createsprite gHiddenPowerOrbScatterSpriteTemplate, ANIM_TARGET, 2, 32 + createsprite gHiddenPowerOrbScatterSpriteTemplate, ANIM_TARGET, 2, 64 + createsprite gHiddenPowerOrbScatterSpriteTemplate, ANIM_TARGET, 2, 96 + createsprite gHiddenPowerOrbScatterSpriteTemplate, ANIM_TARGET, 2, 128 + createsprite gHiddenPowerOrbScatterSpriteTemplate, ANIM_TARGET, 2, 160 + createsprite gHiddenPowerOrbScatterSpriteTemplate, ANIM_TARGET, 2, 192 + createsprite gHiddenPowerOrbScatterSpriteTemplate, ANIM_TARGET, 2, 224 + loadspritegfx ANIM_TAG_GRAY_SMOKE + loadspritegfx ANIM_TAG_BLACK_BALL + playsewithpan 177, 63 + createsprite gUnknown_08592E30, 130, 4, 8, 8, 1, 0 + delay 2 + createsprite gUnknown_08592E30, 130, 4, -8, -8, 1, 0 + delay 2 + createsprite gUnknown_08592E30, 130, 4, 8, -8, 1, 0 + delay 2 + createsprite gUnknown_08592E30, 130, 4, -8, 8, 1, 0 + waitforvisualfinish + playsewithpan 177, 63 + createsprite gUnknown_08592E30, 130, 4, 8, 8, 1, 0 + delay 2 + createsprite gUnknown_08592E30, 130, 4, -8, -8, 1, 0 + delay 2 + createsprite gUnknown_08592E30, 130, 4, 8, -8, 1, 0 + delay 2 + createsprite gUnknown_08592E30, 130, 4, -8, 8, 1, 0 + waitforvisualfinish end Move_STONE_EDGE: + loadspritegfx ANIM_TAG_STONE_EDGE + loadspritegfx ANIM_TAG_IMPACT + playsewithpan SE_W088 SOUND_PAN_TARGET + createsprite gStoneEdgeSpriteTemplate, 130, 7, 0, 28, 528, 30, 13, 50, 1 + delay 2 + createsprite gStoneEdgeSpriteTemplate, 130, 7, 0, 32, 480, 20, 16, -46, 1 + delay 2 + loopsewithpan 131, SOUND_PAN_TARGET 24, 3 + createsprite gStoneEdgeSpriteTemplate, 130, 7, 0, 33, 576, 20, 8, 42, 1 + delay 2 + createsprite gStoneEdgeSpriteTemplate, 130, 7, 0, 31, 400, 25, 11, -42, 1 + delay 2 + createsprite gStoneEdgeSpriteTemplate, 130, 7, 0, 28, 512, 25, 16, 46, 1 + delay 2 + createsprite gStoneEdgeSpriteTemplate, 130, 7, 0, 33, 464, 30, 15, 49, 1 + delay 2 + createsprite gStoneEdgeSpriteTemplate, 130, 7, 0, 28, 528, 30, 13, 50, 1 + delay 2 + createsprite gStoneEdgeSpriteTemplate, 130, 7, 0, 32, 480, 20, 16, -46, 1 + delay 2 + createsprite gStoneEdgeSpriteTemplate, 130, 7, 0, 33, 576, 20, 8, 42, 1 + delay 2 + createsprite gStoneEdgeSpriteTemplate, 130, 7, 0, 31, 400, 25, 11, -42, 1 + delay 2 + createsprite gStoneEdgeSpriteTemplate, 130, 7, 0, 28, 512, 25, 16, 46, 1 + delay 2 + createsprite gStoneEdgeSpriteTemplate, 130, 7, 0, 33, 464, 30, 15, 49, 1 + delay 2 + createsprite gStoneEdgeSpriteTemplate, 130, 7, 0, 28, 528, 30, 13, 50, 1 + delay 2 + createsprite gStoneEdgeSpriteTemplate, 130, 7, 0, 32, 480, 20, 16, -46, 1 + delay 2 + createsprite gStoneEdgeSpriteTemplate, 130, 7, 0, 33, 576, 20, 8, 42, 1 + delay 2 + createsprite gStoneEdgeSpriteTemplate, 130, 7, 0, 31, 400, 25, 11, -42, 1 + delay 2 + createsprite gStoneEdgeSpriteTemplate, 130, 7, 0, 28, 512, 25, 16, 46, 1 + delay 2 + createsprite gStoneEdgeSpriteTemplate, 130, 7, 0, 33, 464, 30, 15, 49, 1 + delay 2 + createsprite gBasicHitSplatSpriteTemplate, 131, 4, -32, -16, 1, 3 + playsewithpan SE_W004, SOUND_PAN_TARGET + createvisualtask AnimTask_ShakeMonInPlace, 2, 5, 1, 3, 0, 12, 1 + createvisualtask AnimTask_ShakeMonInPlace, 2, 5, 3, 3, 0, 12, 1 + delay 4 + createsprite gUnknown_085973A0, 131, 2, 1, 3 + playsewithpan SE_W004, SOUND_PAN_TARGET + delay 4 + createsprite gUnknown_085973A0, 131, 2, 1, 3 + playsewithpan SE_W004, SOUND_PAN_TARGET + delay 4 + createsprite gBasicHitSplatSpriteTemplate, 131, 4, 32, 20, 1, 3 + playsewithpan SE_W004, SOUND_PAN_TARGET + waitforvisualfinish + clearmonbg ANIM_DEF_PARTNER + blendoff end Move_CAPTIVATE: + loadspritegfx ANIM_TAG_MAGENTA_HEART + loadspritegfx ANIM_TAG_SPARKLE_2 + createvisualtask AnimTask_RockMonBackAndForth, 5, 3, 0, 2, 0 + createsprite gMagentaHeartSpriteTemplate, 3, 2, 0, 20 + playsewithpan SE_W204, SOUND_PAN_ATTACKER + delay 15 + createsprite gMagentaHeartSpriteTemplate, 3, 2, -20, 20 + playsewithpan SE_W204, SOUND_PAN_ATTACKER + delay 15 + createsprite gMagentaHeartSpriteTemplate, 3, 2, 20, 20 + playsewithpan 228, SOUND_PAN_ATTACKER, + call GrantingStarsEffect + waitforvisualfinish end - + Move_STEALTH_ROCK: + loadspritegfx ANIM_TAG_STEALTH_ROCK + monbg ANIM_DEF_PARTNER + playsewithpan SE_W026, SOUND_PAN_ATTACKER + waitplaysewithpan SE_W030, SOUND_PAN_TARGET, 28 + createsprite gStealthRockSpriteTemplate, ANIM_TARGET, 2, 20, 0, 0, 24, 30 + delay 10 + playsewithpan SE_W026, SOUND_PAN_ATTACKER + waitplaysewithpan SE_W030, SOUND_PAN_TARGET, 28 + createsprite gStealthRockSpriteTemplate, ANIM_TARGET, 2, 20, 0, -24, 24, 30 + delay 10 + waitplaysewithpan SE_W030, SOUND_PAN_TARGET, 28 + createsprite gStealthRockSpriteTemplate, ANIM_TARGET, 2, 20, 0, 24, 24, 30 + waitforvisualfinish + clearmonbg ANIM_DEF_PARTNER end Move_GRASS_KNOT: + loadspritegfx ANIM_TAG_RAZOR_LEAF + loadspritegfx ANIM_TAG_IMPACT + createsprite gSlideMonToOffsetSpriteTemplate, 2, 5, 0, 20, 0, 0, 4 + createsprite gGrassKnotSpriteTemplate, 130, 6, -18, 19, 40, 8, 160, 0 + delay 4 + createsprite gBasicHitSplatSpriteTemplate, 130, 4, -8, 8, 1, 2 + createvisualtask sub_80D6134, 2, 4, 6, 384, 1, 2 + playsewithpan SE_W233B SOUND_PAN_TARGET + waitforvisualfinish + createsprite gSlideMonToOriginalPosSpriteTemplate, 2, 3, 0, 1, 4 end Move_CHATTER: @@ -2427,27 +3427,258 @@ Move_BUG_BITE: end Move_CHARGE_BEAM: + loadspritegfx ANIM_TAG_IMPACT + loadspritegfx ANIM_TAG_SPARK_2 + delay 0 + createvisualtask sub_8115A04, 2, 3, -31, 1, 5, 5, RGB(31, 31, 20) + playsewithpan SE_W085B, SOUND_PAN_ATTACKER + createsprite gBattleAnimSpriteTemplate_859574C, 0, 7, 32, 24, 190, 12, 0, 1, 0 + delay 0 + createsprite gBattleAnimSpriteTemplate_859574C, 0, 7, 80, 24, 22, 12, 0, 1, 0 + createsprite gBattleAnimSpriteTemplate_859574C, 0, 7, 156, 24, 121, 13, 0, 1, 1 + delay 0 + createvisualtask sub_8115A04, 2, 3, -31, 1, 0, 0, RGB(31, 31, 20) + delay 10 + createvisualtask sub_8115A04, 2, 3, -31, 1, 5, 5, RGB(31, 31, 20) + playsewithpan SE_W085B, SOUND_PAN_ATTACKER + createsprite gBattleAnimSpriteTemplate_859574C, 0, 7, 100, 24, 60, 10, 0, 1, 0 + createsprite gBattleAnimSpriteTemplate_859574C, 0, 7, 170, 24, 42, 11, 0, 1, 1 + delay 0 + createsprite gBattleAnimSpriteTemplate_859574C, 0, 7, 238, 24, 165, 10, 0, 1, 1 + delay 0 + createvisualtask sub_8115A04, 2, 3, -31, 1, 0, 0, RGB(31, 31, 20) + delay 20 + playsewithpan SE_W085B, SOUND_PAN_ATTACKER + createsprite gBattleAnimSpriteTemplate_85957F8, 4, 8, 0, 0, 32, 12, 0, 20, 0, 0 + createsprite gBattleAnimSpriteTemplate_85957F8, 4, 8, 0, 0, 32, 12, 64, 20, 1, 0 + createsprite gBattleAnimSpriteTemplate_85957F8, 4, 8, 0, 0, 32, 12, 128, 20, 0, 0 + createsprite gBattleAnimSpriteTemplate_85957F8, 4, 8, 0, 0, 32, 12, SOUND_PAN_ATTACKER, 20, 2, 0 + createsprite gBattleAnimSpriteTemplate_85957F8, 4, 8, 0, 0, 16, 12, 32, 20, 0, 0 + createsprite gBattleAnimSpriteTemplate_85957F8, 4, 8, 0, 0, 16, 12, 96, 20, 1, 0 + createsprite gBattleAnimSpriteTemplate_85957F8, 4, 8, 0, 0, 16, 12, 160, 20, 0, 0 + createsprite gBattleAnimSpriteTemplate_85957F8, 4, 8, 0, 0, 16, 12, 224, 20, 2, 0 + delay 4 + waitforvisualfinish + createvisualtask sub_8115A04, 2, 3, -31, 1, 0, 0, RGB(31, 31, 20) + waitforvisualfinish + loadspritegfx ANIM_TAG_BLACK_BALL_2 + loadspritegfx ANIM_TAG_SPARK_2 + playsewithpan SE_W086, SOUND_PAN_ATTACKER + createsprite gUnknown_08595764, 131, 6, 10, 0, 0, 0, 30, 0 + createsprite gUnknown_08595790, 132, 7, 10, 0, 16, 30, 0, 40, 0 + createsprite gUnknown_08595790, 132, 7, 10, 0, 16, 30, 64, 40, 1 + createsprite gUnknown_08595790, 132, 7, 10, 0, 16, 30, 128, 40, 0 + createsprite gUnknown_08595790, 132, 7, 10, 0, 16, 30, SOUND_PAN_ATTACKER, 40, 2 + createsprite gUnknown_08595790, 132, 7, 10, 0, 8, 30, 32, 40, 0 + createsprite gUnknown_08595790, 132, 7, 10, 0, 8, 30, 96, 40, 1 + createsprite gUnknown_08595790, 132, 7, 10, 0, 8, 30, 160, 40, 0 + createsprite gUnknown_08595790, 132, 7, 10, 0, 8, 30, 224, 40, 2 + waitforvisualfinish + createvisualtask AnimTask_ShakeMon2, 2, 5, 1, 4, 0, 5, 1 + delay 15 + waitplaysewithpan SE_W085B, SOUND_PAN_TARGET 19 + call ElectricityEffect + waitforvisualfinish end Move_WOOD_HAMMER: end Move_AQUA_JET: + loadspritegfx ANIM_TAG_SPARKLE_6 + loadspritegfx ANIM_TAG_ROUND_SHADOW + loadspritegfx ANIM_TAG_SPLASH + playsewithpan SE_W029, SOUND_PAN_ATTACKER + createsprite gUnknown_08596490, 2, 4, 0, 0, 13, 336 + waitforvisualfinish + playsewithpan SE_W291, SOUND_PAN_ATTACKER + createsprite gUnknown_085964CC, 3, 1, 0 + call DiveSetUp1 + call DiveSetUp1 + call DiveSetUp1 + call DiveSetUp1 + call DiveSetUp1 + loadspritegfx ANIM_TAG_WATER_IMPACT + loadspritegfx ANIM_TAG_SMALL_BUBBLES + monbg ANIM_DEF_PARTNER + setalpha 12, 8 + playsewithpan SE_W153, SOUND_PAN_TARGET + createsprite gUnknown_085964CC, 131, 1, 1 + call DiveAttack1 + call DiveAttack1 + call DiveAttack1 + call DiveAttack1 + call DiveAttack1 + delay 12 + call UnderWaterAttack1 + waitforvisualfinish + visible 0 + clearmonbg ANIM_DEF_PARTNER + blendoff end Move_ATTACK_ORDER: + loadspritegfx ANIM_TAG_ATTACK_ORDER + loadspritegfx ANIM_TAG_IMPACT + loadspritegfx ANIM_TAG_ROCKS + monbg ANIM_DEF_PARTNER + monbgprio_28 ANIM_TARGET + playsewithpan SE_W230, SOUND_PAN_TARGET + createsprite gAttackOrderParticleSpriteTemplate, ANIM_TARGET, 5, 120, 70, 5, 70, 30 + delay 1 + createsprite gAttackOrderParticleSpriteTemplate, ANIM_TARGET, 5, 120, 55, 6, 60, 25 + delay 1 + createsprite gAttackOrderParticleSpriteTemplate, ANIM_TARGET, 5, 120, 60, 7, 60, 30 + createsprite gAttackOrderParticleSpriteTemplate, ANIM_TARGET, 5, 120, 55, 10, 60, 30 + delay 3 + createsprite gAttackOrderParticleSpriteTemplate, ANIM_TARGET, 5, 100, 50, 4, 50, 26 + delay 1 + createsprite gAttackOrderParticleSpriteTemplate, ANIM_TARGET, 5, 105, 25, 8, 60, 20 + delay 1 + createsprite gAttackOrderParticleSpriteTemplate, ANIM_TARGET, 5, 120, 40, 10, 48, 30 + delay 3 + createsprite gAttackOrderParticleSpriteTemplate, ANIM_TARGET, 5, 120, 30, 6, 45, 25 + createsprite gAttackOrderParticleSpriteTemplate, ANIM_TARGET, 5, 120, 35, 10, 60, 30 + delay 3 + createsprite gAttackOrderParticleSpriteTemplate, ANIM_TARGET, 5, 105, 20, 8, 40, 0 + delay 3 + createsprite gAttackOrderParticleSpriteTemplate, ANIM_TARGET, 5, 20, 255, 15, 32, 0 + createsprite gAttackOrderParticleSpriteTemplate, ANIM_TARGET, 5, 110, 10, 8, 32, 20 + waitforvisualfinish + createsprite gBasicHitSplatSpriteTemplate 131, 4, -32, -16, 1, 3 + playsewithpan SE_W004, SOUND_PAN_TARGET + createvisualtask AnimTask_ShakeMonInPlace, 2, 5, 1, 3, 0, 12, 1 + createvisualtask AnimTask_ShakeMonInPlace, 2, 5, 1, 3, 0, 12, 1 + delay 4 + createsprite gUnknown_085973A0 131, 2, 1, 3 + playsewithpan SE_W004, SOUND_PAN_TARGET + delay 4 + createsprite gUnknown_085973A0 131, 2, 1, 3 + playsewithpan SE_W004, SOUND_PAN_TARGET + delay 4 + createsprite gBasicHitSplatSpriteTemplate 131, 4, 32, 20, 1, 3 + playsewithpan SE_W004, SOUND_PAN_TARGET + waitforvisualfinish + clearmonbg ANIM_DEF_PARTNER + blendoff end Move_DEFEND_ORDER: + loadspritegfx ANIM_TAG_ATTACK_ORDER + loadspritegfx ANIM_TAG_IMPACT + loadspritegfx ANIM_TAG_ROCKS + monbg ANIM_DEF_PARTNER + monbgprio_28 ANIM_TARGET + playsewithpan SE_W230, SOUND_PAN_TARGET + createsprite gAttackOrderParticleSpriteTemplate, 130, 5, 120, 70, 5, 70, 30 + delay 1 + createsprite gAttackOrderParticleSpriteTemplate, 130, 5, 115, 55, 6, 60, 25 + delay 1 + createsprite gAttackOrderParticleSpriteTemplate, 130, 5, 115, 60, 7, 60, 30 + createsprite gAttackOrderParticleSpriteTemplate, 130, 5, 115, 55, 10, 60, 30 + delay 3 + createsprite gAttackOrderParticleSpriteTemplate, 130, 5, 100, 50, 4, 50, 26 + delay 1 + createsprite gAttackOrderParticleSpriteTemplate, 130, 5, 105, 25, 8, 60, 20 + delay 1 + createsprite gAttackOrderParticleSpriteTemplate, 130, 5, 115, 40, 10, 48, 30 + delay 3 + createsprite gAttackOrderParticleSpriteTemplate, 130, 5, 120, 30, 6, 45, 25 + createsprite gAttackOrderParticleSpriteTemplate, 130, 5, 115, 35, 10, 60, 30 + delay 3 + createsprite gAttackOrderParticleSpriteTemplate, 130, 5, 105, 20, 8, 40, 0 + delay 3 + createsprite gAttackOrderParticleSpriteTemplate, 130, 5, 20, 255, 15, 32, 0 + createsprite gAttackOrderParticleSpriteTemplate, 130, 5, 110, 10, 8, 32, 20 + waitforvisualfinish + loadspritegfx ANIM_TAG_BLUE_STAR + waitforvisualfinish + clearmonbg ANIM_ATK_PARTNER + blendoff + delay 1 + call BideSetUp + waitforvisualfinish end Move_HEAL_ORDER: + loadspritegfx ANIM_TAG_ATTACK_ORDER + loadspritegfx ANIM_TAG_IMPACT + loadspritegfx ANIM_TAG_ROCKS + monbg ANIM_DEF_PARTNER + monbgprio_28 ANIM_TARGET + playsewithpan SE_W230, SOUND_PAN_TARGET + createsprite gAttackOrderParticleSpriteTemplate, 130, 5, 120, 70, 5, 70, 30 + delay 1 + createsprite gAttackOrderParticleSpriteTemplate, 130, 5, 115, 55, 6, 60, 25 + delay 1 + createsprite gAttackOrderParticleSpriteTemplate, 130, 5, 115, 60, 7, 60, 30 + createsprite gAttackOrderParticleSpriteTemplate, 130, 5, 115, 55, 10, 60, 30 + delay 3 + createsprite gAttackOrderParticleSpriteTemplate, 130, 5, 100, 50, 4, 50, 26 + delay 1 + createsprite gAttackOrderParticleSpriteTemplate, 130, 5, 105, 25, 8, 60, 20 + delay 1 + createsprite gAttackOrderParticleSpriteTemplate, 130, 5, 115, 40, 10, 48, 30 + delay 3 + createsprite gAttackOrderParticleSpriteTemplate, 130, 5, 120, 30, 6, 45, 25 + createsprite gAttackOrderParticleSpriteTemplate, 130, 5, 115, 35, 10, 60, 30 + delay 3 + createsprite gAttackOrderParticleSpriteTemplate, 130, 5, 105, 20, 8, 40, 0 + delay 3 + createsprite gAttackOrderParticleSpriteTemplate, 130, 5, 20, 255, 15, 32, 0 + createsprite gAttackOrderParticleSpriteTemplate, 130, 5, 110, 10, 8, 32, 20 + waitforvisualfinish + loadspritegfx ANIM_TAG_BLUE_STAR + waitforvisualfinish + clearmonbg ANIM_ATK_PARTNER + blendoff + delay 1 + call HealingEffect + waitforvisualfinish end Move_HEAD_SMASH: + loadspritegfx ANIM_TAG_IMPACT + call SetImpactBackground + createsprite gUnknown_08592CD8, ANIM_ATTACKER, 2, 0 + playsewithpan SE_W036, SOUND_PAN_ATTACKER + waitforvisualfinish + delay 2 + createsprite gUnknown_08592CD8, 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 gUnknown_08592CD8, ANIM_ATTACKER, 2, 2 + createsprite gUnknown_085973E8, ANIM_TARGET, 3, 0, 0, 1, 1 + loopsewithpan SE_W025B, SOUND_PAN_TARGET, 8, 3 + waitforvisualfinish + clearmonbg ANIM_TARGET + blendoff + delay 2 + restorebg + waitbgfadein end Move_DOUBLE_HIT: + loadspritegfx ANIM_TAG_IMPACT + monbg ANIM_TARGET + setalpha 12, 8 + createsprite gHorizontalLungeSpriteTemplate, 2, 2, 4, 4 + delay 6 + createsprite gBasicHitSplatSpriteTemplate, 2, 4, 0, 0, 1, 2 + createvisualtask AnimTask_ShakeMon, 2, 5, ANIM_TARGET, 3, 0, 6, 1 + playsewithpan SE_W004, SOUND_PAN_TARGET + delay 8 + waitforvisualfinish + createsprite gHorizontalLungeSpriteTemplate, 2, 2, 4, 4, + delay 6 + createsprite gBasicHitSplatSpriteTemplate, 2, 4, 0, 0, 1, 2 + createvisualtask AnimTask_ShakeMon, 2, 5, ANIM_TARGET, 3, 0, 6, 1 + playsewithpan SE_W004, SOUND_PAN_TARGET + delay 8 + waitforvisualfinish + clearmonbg ANIM_TARGET + blendoff end Move_ROAR_OF_TIME: @@ -2457,12 +3688,72 @@ Move_SPECIAL_REND: end Move_LUNAR_DANCE: + loadspritegfx ANIM_TAG_MOON + loadspritegfx ANIM_TAG_GREEN_SPARKLE + loadspritegfx ANIM_TAG_HOLLOW_ORB + setalpha 0, 16 + createsprite gSimplePaletteBlendSpriteTemplate, 2, 5, 1, 1, 0, 16, 0 + waitforvisualfinish + createsprite gUnknown_08592EBC, 2, 2, 120, 56 + createvisualtask sub_80A7A74, 3, 5, 0, 16, 16, 0, 1 + playsewithpan 211, 0 + delay 30 + createsprite gBattleAnimSpriteTemplate_8592EEC, 40, 2, -12, 0 + delay 30 + createsprite gBattleAnimSpriteTemplate_8592EEC, 40, 2, -18, 0 + delay 30 + createsprite gBattleAnimSpriteTemplate_8592EEC, 40, 2, 21, 0 + delay 30 + createsprite gBattleAnimSpriteTemplate_8592EEC, 40, 2, 0, 0 + delay 30 + createsprite gBattleAnimSpriteTemplate_8592EEC, 40, 2, 10, 0 + delay 20 + createvisualtask sub_81025C0, 2, 0 + createvisualtask sub_81133E8, 5, 0 + playsewithpan 203, SOUND_PAN_ATTACKER + delay 8 + createvisualtask sub_80A7CB4, 5, 5, ANIM_TAG_HOLLOW_ORB, RGB(0, 0, 19), 14, 0, 3 + createsprite gUnknown_08596F98, 2, 1, 0 + createsprite gUnknown_08596F98, 2, 1, 43 + createsprite gUnknown_08596F98, 2, 1, 85 + createsprite gUnknown_08596F98, 2, 1, 128 + createsprite gUnknown_08596F98, 2, 1, 170 + createsprite gUnknown_08596F98, 2, 1, 213 + delay 30 + playsewithpan 203, SOUND_PAN_ATTACKER + delay 30 + playsewithpan 203, SOUND_PAN_ATTACKER + waitforvisualfinish + clearmonbg ANIM_ATTACKER + delay 1 end Move_CRUSH_GRIP: end Move_MAGMA_STORM: + loadspritegfx ANIM_TAG_SMALL_EMBER + fadetobg BG_MAGMA_STORM @Add new bg + waitbgfadeout + createvisualtask sub_811152C, 3 + playsewithpan SE_W221B, SOUND_PAN_TARGET + loopsewithpan SE_W221B, SOUND_PAN_TARGET, 5, 8 + createvisualtask sub_8111590, 3 + createvisualtask AnimTask_ShakeMon, 5, 5, ANIM_TARGET, 0, 2, 47, 1 + createvisualtask sub_8115A04, 2, 6, 4, 2, 2, 0, 12, RGB(22, 9, 7) + call FireSpinEffect + call FireSpinEffect + createvisualtask sub_8115A04, 2, 6, 4, 2, 2, 0, 12, RGB(22, 9, 7) + call FireSpinEffect + call FireSpinEffect + createvisualtask sub_8115A04, 2, 6, 4, 2, 2, 0, 12, RGB(22, 9, 7) + call FireSpinEffect + restorebg + waitbgfadeout + setarg 7, 0xFFF + waitbgfadein + clearmonbg ANIM_DEF_PARTNER + blendoff end Move_DARK_VOID: @@ -2472,10 +3763,115 @@ Move_SEED_FLARE: end Move_OMINOUS_WIND: + loadspritegfx ANIM_TAG_SPARKLE_6 + panse_1B 132, SOUND_PAN_ATTACKER, SOUND_PAN_TARGET 2, 0 + playsewithpan 228, 0 + delay 0 + monbg ANIM_DEF_PARTNER + @bankBG_over_partnerBG + delay 0 + createvisualtask sub_8116664, 10, 5, 1, 0, 0, 0, 0 + delay 0 + createvisualtask AnimTask_GetAttackerSide, 2, 0 + jumpargeq 7, 1, OminousWindFadeToBg + fadetobg BG_GHOST + waitbgfadeout + createvisualtask sub_8117660, 5, RGB(0, 16, 1), 0, 0, -1 + goto OminousWindHit +OminousWindFadeToBg: + fadetobg BG_GHOST + waitbgfadeout + createvisualtask sub_8117660, 5, -1535, 0, 0, -1 + goto OminousWindHit +OminousWindHit: + delay 0 + createvisualtask sub_8116620, 10, 1, 0, 4, 4, RGB_BLACK + waitbgfadein + createsprite gUnknown_08592830, ANIM_TARGET, 66, -32, 16, 0, 6, 2, 3, 1 + createsprite gUnknown_08592830, ANIM_TARGET, 66, -8, 18, 64, 3, 2, 2, 1 + createsprite gUnknown_08592830, ANIM_ATTACKER, 120, -24, 18, 90, 5, 1, 2, 1 + createsprite gUnknown_08592830, ANIM_ATTACKER, 120, -40, 14, 128, 4, 1, 2, 1 + delay 0 + createsprite gUnknown_08592848, ANIM_TARGET, 66, -32, 16, 0, 6, 2, 3, 1 + createsprite gUnknown_08592848, ANIM_TARGET, 66, -8, 18, 64, 3, 2, 2, 1 + createsprite gUnknown_08592848, ANIM_ATTACKER, 120, -24, 18, 90, 5, 1, 2, 1 + createsprite gUnknown_08592848, ANIM_ATTACKER, 120, -40, 14, 128, 4, 1, 2, 1 + delay 0 + createsprite gUnknown_08592860, ANIM_TARGET, 66, -32, 16, 0, 6, 2, 3, 1 + createsprite gUnknown_08592860, ANIM_TARGET, 66, -8, 18, 64, 3, 2, 2, 1 + createsprite gUnknown_08592860, ANIM_ATTACKER, 120, -24, 18, 90, 5, 1, 2, 1 + createsprite gUnknown_08592860, ANIM_ATTACKER, 120, -40, 14, 128, 4, 1, 2, 1 + delay 6 + createsprite gUnknown_08592830, ANIM_TARGET, 66, -4, 16, 0, 6, 1, 2, 1 + createsprite gUnknown_08592830, ANIM_TARGET, 66, -16, 12, 192, 5, 2, 3, 1 + delay 0 + createsprite gUnknown_08592848, ANIM_TARGET, 66, -4, 16, 0, 6, 1, 2, 1 + createsprite gUnknown_08592848, ANIM_TARGET, 66, -16, 12, 192, 5, 2, 3, 1 + delay 0 + createsprite gUnknown_08592860, ANIM_TARGET, 66, -4, 16, 0, 6, 1, 2, 1 + createsprite gUnknown_08592860, ANIM_TARGET, 66, -16, 12, 192, 5, 2, 3, 1 + waitforvisualfinish + playsewithpan SE_W016B, SOUND_PAN_TARGET + clearmonbg ANIM_DEF_PARTNER + delay 0 + restorebg + waitbgfadeout + createvisualtask sub_8116664, 10, 1, 0, 4, 0, RGB_BLACK + setarg 7, -1 + waitbgfadein end Move_SHADOW_FORCE: - end + loadspritegfx ANIM_TAG_ROUND_SHADOW + loadspritegfx ANIM_TAG_IMPACT + choosetwoturnanim ShadowForcePrep ShadowForceAttack +ShadowForceWaitEnd: + waitforvisualfinish + end +ShadowForcePrep: + playsewithpan 190, SOUND_PAN_ATTACKER, + createsprite gSimplePaletteBlendSpriteTemplate 2, 5, 1, 3, 0, 16, 0 + createvisualtask AnimTask_SetGreyscaleOrOriginalPal, 5, 2, 0 + createvisualtask AnimTask_SetGreyscaleOrOriginalPal, 5, 2, 0 + createvisualtask AnimTask_SetGreyscaleOrOriginalPal, 5, 2, 0 + createvisualtask AnimTask_SetGreyscaleOrOriginalPal, 5, 2, 0 + createvisualtask AnimTask_TranslateMonEllipticalRespectSide, 2, 0, 18, 6, 1, 3 + createvisualtask sub_81136E8, 2, 1, 1 + delay 80 + createsprite gSimplePaletteBlendSpriteTemplate 2, 5, 1, 3, 16, 0, 0 + createvisualtask AnimTask_SetGreyscaleOrOriginalPal, 5, 2, 1 + createvisualtask AnimTask_SetGreyscaleOrOriginalPal, 5, 2, 1 + createvisualtask AnimTask_SetGreyscaleOrOriginalPal, 5, 2, 1 + createvisualtask AnimTask_SetGreyscaleOrOriginalPal, 5, 2, 1 + waitforvisualfinish + clearmonbg ANIM_ATTACKER + invisible 0 + delay 1 + goto ShadowForceWaitEnd +ShadowForceAttack: + monbg ANIM_ATTACKER + monbgprio_28 ANIM_ATTACKER + playsewithpan SE_W060, SOUND_PAN_ATTACKER + call ShadowForceBg + waitbgfadein + delay 10 + playsewithpan SOUND_PAN_ATTACKER, 192 + createvisualtask sub_811188C, 5, 1, 85 + delay 70 + createvisualtask AnimTask_ShakeMon2 2, 5, 1, 2, 0, 12, 1 + createvisualtask sub_8115A04 2, 6, 4, 0, 2, 0, 13, 0 + waitforvisualfinish + clearmonbg ANIM_ATTACKER + delay 1 + call UnsetPsychicBg + waitbgfadein + goto ShadowForceWaitEnd +ShadowForceBg: + fadetobg BG_DARK + waitbgfadeout + createvisualtask sub_815A5C8, 5, 0 + waitbgfadein + return Move_HONE_CLAWS: end diff --git a/graphics/battle_anims/backgrounds/giga_impact.pal b/graphics/battle_anims/backgrounds/giga_impact.pal new file mode 100644 index 000000000..944174076 --- /dev/null +++ b/graphics/battle_anims/backgrounds/giga_impact.pal @@ -0,0 +1,19 @@ +JASC-PAL +0100 +16 +0 0 0 +255 214 0 +255 197 0 +255 173 0 +255 165 0 +148 90 222 +255 107 0 +255 132 0 +255 148 0 +255 156 41 +0 0 0 +0 90 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 diff --git a/graphics/battle_anims/backgrounds/magma_storm.pal b/graphics/battle_anims/backgrounds/magma_storm.pal new file mode 100644 index 000000000..944174076 --- /dev/null +++ b/graphics/battle_anims/backgrounds/magma_storm.pal @@ -0,0 +1,19 @@ +JASC-PAL +0100 +16 +0 0 0 +255 214 0 +255 197 0 +255 173 0 +255 165 0 +148 90 222 +255 107 0 +255 132 0 +255 148 0 +255 156 41 +0 0 0 +0 90 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 diff --git a/graphics/battle_anims/backgrounds/rock_wrecker.png b/graphics/battle_anims/backgrounds/rock_wrecker.png new file mode 100644 index 000000000..ca50da7b7 Binary files /dev/null and b/graphics/battle_anims/backgrounds/rock_wrecker.png differ diff --git a/graphics/battle_anims/backgrounds/rock_wrecker_map.bin b/graphics/battle_anims/backgrounds/rock_wrecker_map.bin new file mode 100644 index 000000000..d5e97d7d0 Binary files /dev/null and b/graphics/battle_anims/backgrounds/rock_wrecker_map.bin differ diff --git a/graphics/battle_anims/backgrounds/trick_room.png b/graphics/battle_anims/backgrounds/trick_room.png new file mode 100644 index 000000000..99eda69bf Binary files /dev/null and b/graphics/battle_anims/backgrounds/trick_room.png differ diff --git a/graphics/battle_anims/backgrounds/trick_room_map.bin b/graphics/battle_anims/backgrounds/trick_room_map.bin new file mode 100644 index 000000000..3d0041baa Binary files /dev/null and b/graphics/battle_anims/backgrounds/trick_room_map.bin differ diff --git a/graphics/battle_anims/sprites/attack_order.png b/graphics/battle_anims/sprites/attack_order.png new file mode 100644 index 000000000..18531b830 Binary files /dev/null and b/graphics/battle_anims/sprites/attack_order.png differ diff --git a/graphics/battle_anims/sprites/dragon_pulse.png b/graphics/battle_anims/sprites/dragon_pulse.png new file mode 100644 index 000000000..cc6e28bc3 Binary files /dev/null and b/graphics/battle_anims/sprites/dragon_pulse.png differ diff --git a/graphics/battle_anims/sprites/poison_jab.png b/graphics/battle_anims/sprites/poison_jab.png new file mode 100644 index 000000000..e7871a2c9 Binary files /dev/null and b/graphics/battle_anims/sprites/poison_jab.png differ diff --git a/graphics/battle_anims/sprites/power_gem.png b/graphics/battle_anims/sprites/power_gem.png new file mode 100644 index 000000000..8d9ad469e Binary files /dev/null and b/graphics/battle_anims/sprites/power_gem.png differ diff --git a/graphics/battle_anims/sprites/psycho_cut.png b/graphics/battle_anims/sprites/psycho_cut.png new file mode 100644 index 000000000..3eb1de7d2 Binary files /dev/null and b/graphics/battle_anims/sprites/psycho_cut.png differ diff --git a/graphics/battle_anims/sprites/stealth_rock.png b/graphics/battle_anims/sprites/stealth_rock.png new file mode 100644 index 000000000..8b38ae1c1 Binary files /dev/null and b/graphics/battle_anims/sprites/stealth_rock.png differ diff --git a/graphics/battle_anims/sprites/stone_edge.png b/graphics/battle_anims/sprites/stone_edge.png new file mode 100644 index 000000000..44f678d8d Binary files /dev/null and b/graphics/battle_anims/sprites/stone_edge.png differ diff --git a/graphics/battle_anims/sprites/wood_hammer.png b/graphics/battle_anims/sprites/wood_hammer.png new file mode 100644 index 000000000..5768605f8 Binary files /dev/null and b/graphics/battle_anims/sprites/wood_hammer.png differ diff --git a/include/constants/battle_anim.h b/include/constants/battle_anim.h index cf0fa16f7..b7496f5a6 100644 --- a/include/constants/battle_anim.h +++ b/include/constants/battle_anim.h @@ -312,6 +312,15 @@ #define ANIM_TAG_COLORED_ORBS (ANIM_SPRITES_START + 302) #define ANIM_TAG_WORRY_SEED (ANIM_SPRITES_START + 303) #define ANIM_TAG_SMALL_CLOUD (ANIM_SPRITES_START + 304) +#define ANIM_TAG_ATTACK_ORDER (ANIM_SPRITES_START + 305) +#define ANIM_TAG_DRAGON_PULSE (ANIM_SPRITES_START + 306) +#define ANIM_TAG_WOOD_HAMMER (ANIM_SPRITES_START + 307) +#define ANIM_TAG_PSYCHO_CUT (ANIM_SPRITES_START + 308) +#define ANIM_TAG_POWER_GEM (ANIM_SPRITES_START + 309) +#define ANIM_TAG_STONE_EDGE (ANIM_SPRITES_START + 310) +#define ANIM_TAG_STEALTH_ROCK (ANIM_SPRITES_START + 311) +#define ANIM_TAG_POISON_JAB (ANIM_SPRITES_START + 312) +#define ANIM_TAG_GREEN_POISON_BUBBLE (ANIM_SPRITES_START + 313) // battlers #define ANIM_ATTACKER 0 @@ -361,6 +370,12 @@ #define BG_SOLARBEAM_OPPONENT 24 #define BG_SOLARBEAM_PLAYER 25 #define BG_SOLARBEAM_CONTESTS 26 +#define BG_MAGMA_STORM 27 +#define BG_GIGA_IMPACT_OPPONENT 28 +#define BG_GIGA_IMPACT_PLAYER 29 +#define BG_GIGA_IMPACT_CONTEST 30 +#define BG_TRICK_ROOM 31 +#define BG_ROCK_WRECKER 32 // table ids for general animations #define B_ANIM_CASTFORM_CHANGE 0x0 diff --git a/include/graphics.h b/include/graphics.h index ad8eaf376..6e5420a64 100644 --- a/include/graphics.h +++ b/include/graphics.h @@ -4418,6 +4418,14 @@ extern const u32 gBattleAnimSpriteGfx_WringOut[]; extern const u32 gBattleAnimSpriteGfx_ColoredOrbs[]; extern const u32 gBattleAnimSpriteGfx_WorrySeed[]; extern const u32 gBattleAnimSpriteGfx_SmallCloud[]; +extern const u32 gBattleAnimSpriteGfx_AttackOrder[]; +extern const u32 gBattleAnimSpriteGfx_DragonPulse[]; +extern const u32 gBattleAnimSpriteGfx_WoodHammer[]; +extern const u32 gBattleAnimSpriteGfx_PsychoCut[]; +extern const u32 gBattleAnimSpriteGfx_PowerGem[]; +extern const u32 gBattleAnimSpriteGfx_StoneEdge[]; +extern const u32 gBattleAnimSpriteGfx_StealthRock[]; +extern const u32 gBattleAnimSpriteGfx_PoisonJab[]; extern const u32 gBattleAnimSpritePal_Bone[]; extern const u32 gBattleAnimSpritePal_Spark[]; @@ -4710,6 +4718,14 @@ extern const u32 gBattleAnimSpritePal_WringOut[]; extern const u32 gBattleAnimSpritePal_ColoredOrbs[]; extern const u32 gBattleAnimSpritePal_WorrySeed[]; extern const u32 gBattleAnimSpritePal_SmallCloud[]; +extern const u32 gBattleAnimSpritePal_AttackOrder[]; +extern const u32 gBattleAnimSpritePal_DragonPulse[]; +extern const u32 gBattleAnimSpritePal_WoodHammer[]; +extern const u32 gBattleAnimSpritePal_PsychoCut[]; +extern const u32 gBattleAnimSpritePal_PowerGem[]; +extern const u32 gBattleAnimSpritePal_StoneEdge[]; +extern const u32 gBattleAnimSpritePal_StealthRock[]; +extern const u32 gBattleAnimSpritePal_PoisonJab[]; extern const u32 gBattleAnimBgImage_Dark[]; extern const u32 gBattleAnimBgImage_Ghost[]; @@ -4724,6 +4740,8 @@ extern const u32 gBattleAnimBgImage_Cosmic[]; extern const u32 gBattleAnimBgImage_InAir[]; extern const u32 gBattleAnimBgImage_Aurora[]; extern const u32 gBattleAnimBgImage_Fissure[]; +extern const u32 gBattleAnimBgImage_TrickRoom[]; +extern const u32 gBattleAnimBgImage_RockWrecker[]; extern const u32 gBattleAnimBgPalette_Dark[]; extern const u32 gBattleAnimBgPalette_Ghost[]; extern const u32 gBattleAnimBgPalette_Psychic[]; @@ -4740,6 +4758,10 @@ extern const u32 gBattleAnimBgPalette_Aurora[]; extern const u32 gBattleAnimBgPalette_Fissure[]; extern const u32 gBattleAnimBgPalette_Bug[]; extern const u32 gBattleAnimBgPalette_Solarbeam[]; +extern const u32 gBattleAnimBgPalette_MagmaStorm[]; +extern const u32 gBattleAnimBgPalette_GigaImpact[]; +extern const u32 gBattleAnimBgPalette_TrickRoom[]; +extern const u32 gBattleAnimBgPalette_RockWrecker[]; extern const u32 gBattleAnimBgTilemap_Dark[]; extern const u32 gBattleAnimBgTilemap_Ghost[]; extern const u32 gBattleAnimBgTilemap_Psychic[]; @@ -4750,6 +4772,8 @@ extern const u32 gBattleAnimBgTilemap_Drill[]; extern const u32 gBattleAnimBgTilemap_DrillContests[]; extern const u32 gBattleAnimBgTilemap_HighspeedOpponent[]; extern const u32 gBattleAnimBgTilemap_HighspeedPlayer[]; +extern const u32 gBattleAnimBgTilemap_TrickRoom[]; +extern const u32 gBattleAnimBgTilemap_RockWrecker[]; extern const u32 gUnknown_08C2A634[]; extern const u32 gUnknown_08C2A6D4[]; extern const u32 gUnknown_08C2A6EC[]; diff --git a/src/battle_anim.c b/src/battle_anim.c index 0d4f4bf79..02adcc104 100644 --- a/src/battle_anim.c +++ b/src/battle_anim.c @@ -1430,6 +1430,15 @@ const struct CompressedSpriteSheet gBattleAnimPicTable[] = {gBattleAnimSpriteGfx_ColoredOrbs, 0x0300, ANIM_TAG_COLORED_ORBS}, {gBattleAnimSpriteGfx_WorrySeed, 0x0080, ANIM_TAG_WORRY_SEED}, {gBattleAnimSpriteGfx_SmallCloud, 0x0080, ANIM_TAG_SMALL_CLOUD}, + {gBattleAnimSpriteGfx_AttackOrder, 0x0480, ANIM_TAG_ATTACK_ORDER}, + {gBattleAnimSpriteGfx_DragonPulse, 0x0100, ANIM_TAG_DRAGON_PULSE}, + {gBattleAnimSpriteGfx_WoodHammer, 0x0C00, ANIM_TAG_WOOD_HAMMER}, + {gBattleAnimSpriteGfx_PsychoCut, 0x0200, ANIM_TAG_PSYCHO_CUT}, + {gBattleAnimSpriteGfx_PowerGem, 0x0080, ANIM_TAG_POWER_GEM}, + {gBattleAnimSpriteGfx_StoneEdge, 0x0A00, ANIM_TAG_STONE_EDGE}, + {gBattleAnimSpriteGfx_StealthRock, 0x0080, ANIM_TAG_STEALTH_ROCK}, + {gBattleAnimSpriteGfx_PoisonJab, 0x0080, ANIM_TAG_POISON_JAB}, + {gBattleAnimSpriteGfx_PoisonBubble, 0x0180, ANIM_TAG_GREEN_POISON_BUBBLE}, }; const struct CompressedSpritePalette gBattleAnimPaletteTable[] = @@ -1739,6 +1748,15 @@ const struct CompressedSpritePalette gBattleAnimPaletteTable[] = {gBattleAnimSpritePal_ColoredOrbs, ANIM_TAG_COLORED_ORBS}, {gBattleAnimSpritePal_WorrySeed, ANIM_TAG_WORRY_SEED}, {gBattleAnimSpritePal_SmallCloud, ANIM_TAG_SMALL_CLOUD}, + {gBattleAnimSpritePal_AttackOrder, ANIM_TAG_ATTACK_ORDER}, + {gBattleAnimSpritePal_DragonPulse, ANIM_TAG_DRAGON_PULSE}, + {gBattleAnimSpritePal_WoodHammer, ANIM_TAG_WOOD_HAMMER}, + {gBattleAnimSpritePal_PsychoCut, ANIM_TAG_PSYCHO_CUT}, + {gBattleAnimSpritePal_PowerGem, ANIM_TAG_POWER_GEM}, + {gBattleAnimSpritePal_StoneEdge, ANIM_TAG_STONE_EDGE}, + {gBattleAnimSpritePal_StealthRock, ANIM_TAG_STEALTH_ROCK}, + {gBattleAnimSpritePal_PoisonJab, ANIM_TAG_POISON_JAB}, + {gBattleAnimSpritePal_Vine, ANIM_TAG_GREEN_POISON_BUBBLE}, }; const struct BattleAnimBackground gBattleAnimBackgroundTable[] = @@ -1770,6 +1788,12 @@ const struct BattleAnimBackground gBattleAnimBackgroundTable[] = [BG_SOLARBEAM_OPPONENT] = {gBattleAnimBgImage_Impact, gBattleAnimBgPalette_Solarbeam, gBattleAnimBgTilemap_ImpactOpponent}, [BG_SOLARBEAM_PLAYER] = {gBattleAnimBgImage_Impact, gBattleAnimBgPalette_Solarbeam, gBattleAnimBgTilemap_ImpactPlayer}, [BG_SOLARBEAM_CONTESTS] = {gBattleAnimBgImage_Impact, gBattleAnimBgPalette_Solarbeam, gBattleAnimBgTilemap_ImpactContests}, + [BG_MAGMA_STORM] = {gBattleAnimBgImage_InAir, gBattleAnimBgPalette_MagmaStorm, gBattleAnimBgTilemap_InAir}, + [BG_GIGA_IMPACT_OPPONENT] = {gBattleAnimBgImage_Impact, gBattleAnimBgPalette_GigaImpact, gBattleAnimBgTilemap_ImpactOpponent}, + [BG_GIGA_IMPACT_PLAYER] = {gBattleAnimBgImage_Impact, gBattleAnimBgPalette_GigaImpact, gBattleAnimBgTilemap_ImpactPlayer}, + [BG_GIGA_IMPACT_CONTEST] = {gBattleAnimBgImage_Impact, gBattleAnimBgPalette_GigaImpact, gBattleAnimBgTilemap_ImpactContests}, + [BG_TRICK_ROOM] = {gBattleAnimBgImage_TrickRoom, gBattleAnimBgPalette_TrickRoom, gBattleAnimBgTilemap_TrickRoom}, + [BG_ROCK_WRECKER] = {gBattleAnimBgImage_RockWrecker, gBattleAnimBgPalette_RockWrecker, gBattleAnimBgTilemap_RockWrecker}, }; static void (* const sScriptCmdTable[])(void) = diff --git a/src/battle_anim_effects_1.c b/src/battle_anim_effects_1.c index e731fbf3f..7b0cc45c5 100644 --- a/src/battle_anim_effects_1.c +++ b/src/battle_anim_effects_1.c @@ -162,6 +162,10 @@ static void AnimMoveAccupressure(struct Sprite* sprite); static void AnimMoveWringOut(struct Sprite* sprite); static void AnimMoveWorrySeed(struct Sprite* sprite); static void AnimMoveSmallCloud(struct Sprite* sprite); +static void AnimGrassKnotStep(struct Sprite *sprite); +void AnimGrassKnot(struct Sprite *sprite); +void AnimWoodHammerSmall(struct Sprite *sprite); +void AnimWoodHammerBig(struct Sprite *sprite); const union AnimCmd gUnknown_085920F0[] = { @@ -793,6 +797,17 @@ const struct SpriteTemplate gTwisterLeafParticleSpriteTemplate = .callback = AnimMoveTwisterParticle, }; +const struct SpriteTemplate gAttackOrderParticleSpriteTemplate = +{ + .tileTag = ANIM_TAG_ATTACK_ORDER, + .paletteTag = ANIM_TAG_ATTACK_ORDER, + .oam = &gUnknown_0852490C, + .anims = gUnknown_08592388, + .images = NULL, + .affineAnims = gDummySpriteAffineAnimTable, + .callback = AnimMoveTwisterParticle, +}; + const union AnimCmd gUnknown_085923C0[] = { ANIMCMD_FRAME(0, 3), @@ -2699,6 +2714,194 @@ const struct SpriteTemplate gNightSlashRightSpriteTemplate = .callback = AnimNightSlash, }; +const struct SpriteTemplate gLuckyChantBigStarsSpriteTemplate = +{ + .tileTag = ANIM_TAG_GOLD_STARS, + .paletteTag = ANIM_TAG_GOLD_STARS, + .oam = &gUnknown_0852490C, + .anims = gUnknown_08592314, + .images = NULL, + .affineAnims = gDummySpriteAffineAnimTable, + .callback = AnimPetalDanceBigFlower, +}; + +const struct SpriteTemplate gLuckyChantSmallStarsSpriteTemplate = +{ + .tileTag = ANIM_TAG_GOLD_STARS, + .paletteTag = ANIM_TAG_GOLD_STARS, + .oam = &gUnknown_08524904, + .anims = gUnknown_08592318, + .images = NULL, + .affineAnims = gDummySpriteAffineAnimTable, + .callback = AnimPetalDanceSmallFlower, +}; + +const union AnimCmd gWoodHammerBigAnimCmd_1[] = +{ + ANIMCMD_FRAME(0, 1), + ANIMCMD_END, +}; + +const union AnimCmd gWoodHammerBigAnimCmd_2[] = +{ + ANIMCMD_FRAME(16, 1), + ANIMCMD_END, +}; + +const union AnimCmd *const gWoodHammerBigAnims[] = +{ + gWoodHammerBigAnimCmd_1, + gWoodHammerBigAnimCmd_2, +}; + +const union AffineAnimCmd gWoodHammerBigAffineAnimCmd_1[] = +{ + AFFINEANIMCMD_FRAME(0x0, 0x0, -5, 5), + AFFINEANIMCMD_JUMP(0), +}; + +const union AffineAnimCmd gWoodHammerBigAffineAnimCmd_2[] = +{ + AFFINEANIMCMD_FRAME(0x0, 0x0, 5, 5), + AFFINEANIMCMD_JUMP(0), +}; + +const union AffineAnimCmd *const gWoodHammerBigAffineAnims[] = +{ + gWoodHammerBigAffineAnimCmd_1, + gWoodHammerBigAffineAnimCmd_2, +}; + +const union AnimCmd gWoodHammerSmallAnimCmd_1[] = +{ + ANIMCMD_FRAME(32, 1), + ANIMCMD_END, +}; + +const union AnimCmd gWoodHammerSmallAnimCmd_2[] = +{ + ANIMCMD_FRAME(48, 1), + ANIMCMD_END, +}; + +const union AnimCmd gWoodHammerSmallAnimCmd_3[] = +{ + ANIMCMD_FRAME(64, 1), + ANIMCMD_END, +}; + +const union AnimCmd *const gWoodHammerSmallAnims[] = +{ + gWoodHammerSmallAnimCmd_1, + gWoodHammerSmallAnimCmd_2, + gWoodHammerSmallAnimCmd_3, +}; + +const struct SpriteTemplate gGrassKnotSpriteTemplate = +{ + .tileTag = ANIM_TAG_RAZOR_LEAF, + .paletteTag = ANIM_TAG_RAZOR_LEAF, + .oam = &gUnknown_08524934, + .anims = gUnknown_085923D4, + .images = NULL, + .affineAnims = gDummySpriteAffineAnimTable, + .callback = AnimGrassKnot, +}; + +const struct SpriteTemplate gWoodHammerBigSpriteTemplate = +{ + .tileTag = ANIM_TAG_WOOD_HAMMER, + .paletteTag = ANIM_TAG_WOOD_HAMMER, + .oam = &gUnknown_08524974, + .anims = gWoodHammerBigAnims, + .images = NULL, + .affineAnims = gWoodHammerBigAffineAnims, + .callback = AnimWoodHammerBig, +}; + +const struct SpriteTemplate gWoodHammerSmallSpriteTemplate = +{ + .tileTag = ANIM_TAG_WOOD_HAMMER, + .paletteTag = ANIM_TAG_WOOD_HAMMER, + .oam = &gUnknown_08524914, + .anims = gWoodHammerSmallAnims, + .images = NULL, + .affineAnims = gDummySpriteAffineAnimTable, + .callback = AnimWoodHammerSmall, +}; + +void AnimGrassKnot(struct Sprite *sprite) +{ + if (BATTLE_PARTNER(gBattleAnimAttacker) == gBattleAnimTarget && GetBattlerPosition(gBattleAnimTarget) < B_POSITION_PLAYER_RIGHT) + gBattleAnimArgs[0] *= -1; + + InitSpritePosToAnimTarget(sprite, TRUE); + + if (GetBattlerSide(gBattleAnimAttacker) != B_SIDE_PLAYER) + gBattleAnimArgs[2] = -gBattleAnimArgs[2]; + + sprite->data[0] = gBattleAnimArgs[3]; + sprite->data[1] = sprite->pos1.x; + sprite->data[2] = sprite->pos1.x + gBattleAnimArgs[2]; + sprite->data[3] = sprite->pos1.y; + sprite->data[4] = sprite->pos1.y; + + InitAnimLinearTranslation(sprite); + + sprite->data[5] = gBattleAnimArgs[5]; + sprite->data[6] = gBattleAnimArgs[4]; + sprite->data[7] = 0; + + sprite->callback = AnimGrassKnotStep; +} + +static void AnimGrassKnotStep(struct Sprite *sprite) +{ + if (!AnimTranslateLinear(sprite)) + { + sprite->pos2.y += Sin(sprite->data[7] >> 8, sprite->data[5]); + sprite->data[7] += sprite->data[6]; + } + else + { + DestroyAnimSprite(sprite); + } +} + +void AnimWoodHammerBig(struct Sprite *sprite) +{ + if (GetBattlerSide(gBattleAnimAttacker) == B_SIDE_OPPONENT) + StartSpriteAffineAnim(sprite, 1); + + TranslateAnimSpriteToTargetMonLocation(sprite); +} + +void AnimWoodHammerSmall(struct Sprite *sprite) +{ + StartSpriteAnim(sprite, gBattleAnimArgs[5]); + AnimateSprite(sprite); + + if (GetBattlerSide(gBattleAnimAttacker) != B_SIDE_PLAYER) + sprite->pos1.x -= gBattleAnimArgs[0]; + else + sprite->pos1.x += gBattleAnimArgs[0]; + + sprite->pos1.y += gBattleAnimArgs[1]; + + sprite->data[0] = gBattleAnimArgs[4]; + sprite->data[1] = sprite->pos1.x; + sprite->data[2] = sprite->pos1.x + gBattleAnimArgs[2]; + sprite->data[3] = sprite->pos1.y; + sprite->data[4] = sprite->pos1.y + gBattleAnimArgs[3]; + + InitSpriteDataForLinearTranslation(sprite); + sprite->data[3] = 0; + sprite->data[4] = 0; + + sprite->callback = TranslateSpriteLinearFixedPoint; + StoreSpriteCallbackInData6(sprite, DestroySpriteAndMatrix); +} + // Animates the falling particles that horizontally wave back and forth. // Used by Sleep Powder, Stun Spore, and Poison Powder. // arg 0: initial x pixel offset diff --git a/src/battle_anim_effects_3.c b/src/battle_anim_effects_3.c index 116aa6ae7..4e21be72c 100755 --- a/src/battle_anim_effects_3.c +++ b/src/battle_anim_effects_3.c @@ -4708,6 +4708,17 @@ static void AnimForesightMagnifyingGlassStep(struct Sprite *sprite) } } +const struct SpriteTemplate gDracoMeteorSmashSpriteTemplate = +{ + .tileTag = ANIM_TAG_WARM_ROCK, + .paletteTag = ANIM_TAG_WARM_ROCK, + .oam = &gUnknown_08524914,//&gUnknown_0852490C, + .anims = gDummySpriteAnimTable, + .images = NULL, + .affineAnims = gDummySpriteAffineAnimTable, + .callback = AnimMeteorMashStar, +}; + static void AnimMeteorMashStarStep(struct Sprite *sprite) { sprite->pos2.x = ((sprite->data[2] - sprite->data[0]) * sprite->data[5]) / sprite->data[4]; diff --git a/src/dark.c b/src/dark.c index 482c09c04..bc8f4afb3 100644 --- a/src/dark.c +++ b/src/dark.c @@ -24,6 +24,7 @@ static void sub_81140C8(u8); static void sub_8114244(struct Task *); static void sub_8114374(u8); static void sub_8114748(u8); +void AnimPunishment(struct Sprite *sprite); const struct SpriteTemplate gUnknown_08596FC8 = { @@ -186,6 +187,90 @@ const struct SpriteTemplate gBattleAnimSpriteTemplate_8597138 = .callback = sub_81144BC, }; +const union AffineAnimCmd gPunishmentImpactAffineAnimCmd_1[] = +{ + AFFINEANIMCMD_FRAME(0x0, 0x0, 0, 8), + AFFINEANIMCMD_END, +}; + +const union AffineAnimCmd gPunishmentImpactAffineAnimCmd_2[] = +{ + AFFINEANIMCMD_FRAME(0xD8, 0xD8, 0, 0), + AFFINEANIMCMD_FRAME(0x0, 0x0, 0, 8), + AFFINEANIMCMD_END, +}; + +const union AffineAnimCmd gPunishmentImpactAffineAnimCmd_3[] = +{ + AFFINEANIMCMD_FRAME(0xB0, 0xB0, 0, 0), + AFFINEANIMCMD_FRAME(0x0, 0x0, 0, 8), + AFFINEANIMCMD_END, +}; + +const union AffineAnimCmd gPunishmentImpactAffineAnimCmd_4[] = +{ + AFFINEANIMCMD_FRAME(0x80, 0x80, 0, 0), + AFFINEANIMCMD_FRAME(0x0, 0x0, 0, 8), + AFFINEANIMCMD_END, +}; + +const union AffineAnimCmd *const gPunishmentImpactAffineAnim[] = +{ + gPunishmentImpactAffineAnimCmd_1, + gPunishmentImpactAffineAnimCmd_2, + gPunishmentImpactAffineAnimCmd_3, + gPunishmentImpactAffineAnimCmd_4, +}; + +const union AnimCmd gPunishmentAnimCmd[] = +{ + ANIMCMD_FRAME(0, 4), + ANIMCMD_FRAME(16, 4), + ANIMCMD_FRAME(32, 4), + ANIMCMD_FRAME(48, 4), + ANIMCMD_FRAME(64, 4), + ANIMCMD_END, +}; + +const union AnimCmd *const gPunishmentAnim[] = +{ + gPunishmentAnimCmd, +}; + +const struct SpriteTemplate gPunishmentSpriteTemplate = +{ + .tileTag = ANIM_TAG_SCRATCH, + .paletteTag = ANIM_TAG_POISON_BUBBLE, + .oam = &gUnknown_08524974, + .anims = gPunishmentAnim, + .images = NULL, + .affineAnims = gDummySpriteAffineAnimTable, + .callback = sub_80A77C8, +}; + +const struct SpriteTemplate gPunishmentImpactSpriteTemplate = +{ + .tileTag = ANIM_TAG_IMPACT, + .paletteTag = ANIM_TAG_POISON_BUBBLE, + .oam = &gUnknown_08524974,//gUnknown_08524A94, + .anims = gDummySpriteAnimTable, + .images = NULL, + .affineAnims = gPunishmentImpactAffineAnim, + .callback = AnimPunishment, +}; + +void AnimPunishment(struct Sprite *sprite) +{ + StartSpriteAffineAnim(sprite, gBattleAnimArgs[3]); + if (gBattleAnimArgs[2] == 0) + InitSpritePosToAnimAttacker(sprite, 1); + else + InitSpritePosToAnimTarget(sprite, TRUE); + + sprite->callback = RunStoredCallbackWhenAffineAnimEnds; + StoreSpriteCallbackInData6(sprite, DestroyAnimSprite); +} + void sub_81136E8(u8 taskId) { int battler; diff --git a/src/dragon.c b/src/dragon.c index befaf52e7..a1b6c4c0f 100644 --- a/src/dragon.c +++ b/src/dragon.c @@ -14,6 +14,9 @@ static void sub_81132E0(struct Sprite *); static void sub_81134B8(u8); static void sub_8113574(struct Task *); static void sub_811369C(struct Sprite *); +static void AnimDragonRushStep(struct Sprite *sprite); +void AnimSpinningDracoMeteor(struct Sprite *sprite); +static void AnimSpinningDracoMeteorFinish(struct Sprite *sprite); EWRAM_DATA static u16 gUnknown_0203A100[7] = {0}; @@ -187,6 +190,136 @@ const struct SpriteTemplate gUnknown_08596FB0 = .callback = sub_81135EC, }; +const union AnimCmd gDragonRushAnimCmds[] = +{ + ANIMCMD_FRAME(0, 4), + ANIMCMD_FRAME(64, 4), + ANIMCMD_END, +}; + +const union AnimCmd *const gDragonRushAnimTable[] = +{ + gDragonRushAnimCmds, +}; + +const union AffineAnimCmd gDragonRushAffineanimCmds1[] = +{ + AFFINEANIMCMD_FRAME(0x100, 0x100, 0, 0), + AFFINEANIMCMD_FRAME(0, 0, -4, 8), + AFFINEANIMCMD_END, +}; + +const union AffineAnimCmd gDragonRushAffineanimCmds2[] = +{ + AFFINEANIMCMD_FRAME(-0x100, 0x100, 0, 0), + AFFINEANIMCMD_FRAME(0, 0, 4, 8), + AFFINEANIMCMD_END, +}; + +const union AffineAnimCmd *const gDragonRushAffineAnimTable[] = +{ + gDragonRushAffineanimCmds1, + gDragonRushAffineanimCmds2, +}; + +const union AnimCmd gDracoMeteorAnimTable[] = +{ + ANIMCMD_FRAME(0, 1), + ANIMCMD_END, +}; + +const union AnimCmd *const gDracoMeteorAnimCmd[] = +{ + gDracoMeteorAnimTable, +}; + +const union AffineAnimCmd gDracoMeteorAffineAnimCmd[] = +{ + AFFINEANIMCMD_FRAME(0x100, 0x100, 0, 0), + AFFINEANIMCMD_FRAME(0xFFF8, 0xFFF8, 20, 1), + AFFINEANIMCMD_JUMP(1), +}; + +const union AffineAnimCmd *const gDracoMeteorAffineAnims[] = +{ + gDracoMeteorAffineAnimCmd, +}; + +const struct SpriteTemplate gDragonRushSpriteTemplate = +{ + .tileTag = ANIM_TAG_SLAM_HIT_2, + .paletteTag = ANIM_TAG_RED_HEART, + .oam = &gUnknown_0852497C, + .anims = gDragonRushAnimTable, + .images = NULL, + .affineAnims = gDragonRushAffineAnimTable, + .callback = AnimDragonRushStep, +}; + +const struct SpriteTemplate gDracoMetorSpriteTemplate = +{ + .tileTag = ANIM_TAG_IMPACT, + .paletteTag = ANIM_TAG_IMPACT, + .oam = &gUnknown_085249D4, + .anims = gDracoMeteorAnimCmd, + .images = NULL, + .affineAnims = gDracoMeteorAffineAnims, + .callback = AnimSpinningDracoMeteor, +}; + +const struct SpriteTemplate gDragonPulseSpriteTemplate = +{ + .tileTag = ANIM_TAG_DRAGON_PULSE, + .paletteTag = ANIM_TAG_DRAGON_PULSE, + .oam = &gUnknown_08524954, + .anims = gDummySpriteAnimTable, + .images = NULL, + .affineAnims = gDummySpriteAffineAnimTable, + .callback = TranslateAnimSpriteToTargetMonLocation, +}; + +static void AnimDragonRushStep(struct Sprite *sprite) +{ + // These two cases are identical. + if (GetBattlerSide(gBattleAnimTarget) == B_SIDE_PLAYER) + { + sprite->data[1] += sprite->data[0]; + sprite->data[1] &= 0xFF; + } + else + { + sprite->data[1] += sprite->data[0]; + sprite->data[1] &= 0xFF; + } + + sprite->pos2.x = Cos(sprite->data[1], 20); + sprite->pos2.y = Sin(sprite->data[1], 20); + if (sprite->animEnded) + DestroyAnimSprite(sprite); + + sprite->data[2]++; +} + +static void AnimSpinningDracoMeteorFinish(struct Sprite *sprite) +{ + StartSpriteAffineAnim(sprite, 0); + sprite->affineAnimPaused = 1; + sprite->data[0] = 20; + + sprite->callback = WaitAnimForDuration; + StoreSpriteCallbackInData6(sprite, DestroyAnimSprite); +} + +void AnimSpinningDracoMeteor(struct Sprite *sprite) +{ + InitSpritePosToAnimTarget(sprite, TRUE); + StartSpriteAnim(sprite, gBattleAnimArgs[2]); + sprite->data[0] = gBattleAnimArgs[3]; + + sprite->callback = WaitAnimForDuration; + StoreSpriteCallbackInData6(sprite, AnimSpinningDracoMeteorFinish); +} + void sub_8113064(struct Sprite *sprite) { sprite->pos1.x = GetBattlerSpriteCoord(gBattleAnimAttacker, 2); diff --git a/src/fight.c b/src/fight.c index 17589c480..fd0cf66b8 100644 --- a/src/fight.c +++ b/src/fight.c @@ -35,6 +35,7 @@ static void sub_810D5DC(struct Sprite *); static void sub_810D6A8(struct Sprite *); static void sub_810D770(struct Sprite *); static void sub_810D830(struct Sprite *); +void forcePalmAnimCallback(struct Sprite *sprite); extern struct SpriteTemplate gBasicHitSplatSpriteTemplate; @@ -436,6 +437,64 @@ const struct SpriteTemplate gAuraSphereBlast = .callback = sub_810D874, }; +const union AffineAnimCmd gForcePalmAffineAnimCmd_1[] = +{ + AFFINEANIMCMD_FRAME(0x0, 0x0, 0, 8), + AFFINEANIMCMD_END, +}; + +const union AffineAnimCmd gForcePalmAffineAnimCmd_2[] = +{ + AFFINEANIMCMD_FRAME(0xD8, 0xD8, 0, 0), + AFFINEANIMCMD_FRAME(0x0, 0x0, 0, 8), + AFFINEANIMCMD_END, +}; + +const union AffineAnimCmd gForcePalmAffineAnimCmd_3[] = +{ + AFFINEANIMCMD_FRAME(0xB0, 0xB0, 0, 0), + AFFINEANIMCMD_FRAME(0x0, 0x0, 0, 8), + AFFINEANIMCMD_END, +}; + +const union AffineAnimCmd gForcePalmAffineAnimCmd_4[] = +{ + AFFINEANIMCMD_FRAME(0x80, 0x80, 0, 0), + AFFINEANIMCMD_FRAME(0x0, 0x0, 0, 8), + AFFINEANIMCMD_END, +}; + +const union AffineAnimCmd *const gForcePalmAffineAnims[] = +{ + gForcePalmAffineAnimCmd_1, + gForcePalmAffineAnimCmd_2, + gForcePalmAffineAnimCmd_3, + gForcePalmAffineAnimCmd_4, +}; + +const struct SpriteTemplate gForcePalmSpriteTemplate = +{ + .tileTag = ANIM_TAG_IMPACT, + .paletteTag = ANIM_TAG_SHADOW_BALL, + .oam = &gUnknown_08524A94, + .anims = gDummySpriteAnimTable, + .images = NULL, + .affineAnims = gForcePalmAffineAnims, + .callback = forcePalmAnimCallback, +}; + +void forcePalmAnimCallback(struct Sprite *sprite) +{ + StartSpriteAffineAnim(sprite, gBattleAnimArgs[3]); + if (gBattleAnimArgs[2] == 0) + InitSpritePosToAnimAttacker(sprite, 1); + else + InitSpritePosToAnimTarget(sprite, TRUE); + + sprite->callback = RunStoredCallbackWhenAffineAnimEnds; + StoreSpriteCallbackInData6(sprite, DestroyAnimSprite); +} + void unc_080B08A0(struct Sprite *sprite) { SetAnimSpriteInitialXOffset(sprite, gBattleAnimArgs[0]); diff --git a/src/fire.c b/src/fire.c index 969d16a41..aee7e1d01 100644 --- a/src/fire.c +++ b/src/fire.c @@ -38,6 +38,8 @@ static void sub_8109AFC(struct Sprite *); static void sub_8109C4C(struct Sprite *); static void sub_8109CB0(struct Sprite *); static void sub_8109E2C(u8 taskId); +static void AnimLavaPlumeOrbitScatterStep(struct Sprite *sprite); +void AnimLavaPlumeOrbitScatter(struct Sprite *sprite); const union AnimCmd gUnknown_08595340[] = { @@ -480,6 +482,46 @@ const s8 gUnknown_08595694[16] = -1, 0, 1, 0, -1, 1, 0, -1, 0, 1, 0, -1, 0, 1, 0, 1, }; +const union AffineAnimCmd gLavaPlumeAffineAnimCmd[] = +{ + AFFINEANIMCMD_FRAME(0x80, 0x80, 0, 0), + AFFINEANIMCMD_FRAME(0x8, 0x8, 0, 1), + AFFINEANIMCMD_JUMP(1), +}; + +const union AffineAnimCmd *const gLavaPlumeAffineAnims[] = +{ + gLavaPlumeAffineAnimCmd, +}; + +const struct SpriteTemplate gLavaPlumeSpriteTemplate = +{ + .tileTag = ANIM_TAG_FIRE_PLUME, + .paletteTag = ANIM_TAG_FIRE_PLUME, + .oam = &gUnknown_08524914, + .anims = gUnknown_085953D8, + .images = NULL, + .affineAnims = gLavaPlumeAffineAnims, + .callback = AnimLavaPlumeOrbitScatter, +}; + +void AnimLavaPlumeOrbitScatter(struct Sprite *sprite) +{ + sprite->pos1.x = GetBattlerSpriteCoord(gBattleAnimAttacker, 2); + sprite->pos1.y = GetBattlerSpriteCoord(gBattleAnimAttacker, 3); + sprite->data[0] = Sin(gBattleAnimArgs[0], 10); + sprite->data[1] = Cos(gBattleAnimArgs[0], 7); + sprite->callback = AnimLavaPlumeOrbitScatterStep; +} + +static void AnimLavaPlumeOrbitScatterStep(struct Sprite *sprite) +{ + sprite->pos2.x += sprite->data[0]; + sprite->pos2.y += sprite->data[1]; + if (sprite->pos1.x + sprite->pos2.x + 16 > 272u || sprite->pos1.y + sprite->pos2.y > 160 || sprite->pos1.y + sprite->pos2.y < -16) + DestroyAnimSprite(sprite); +} + static void sub_8108EC8(struct Sprite *sprite) { sprite->data[0] = gBattleAnimArgs[0]; diff --git a/src/graphics.c b/src/graphics.c index 7a31edea5..d44adce41 100644 --- a/src/graphics.c +++ b/src/graphics.c @@ -175,6 +175,30 @@ const u32 gBattleAnimSpritePal_WorrySeed[] = INCBIN_U32("graphics/battle_anims/s const u32 gBattleAnimSpriteGfx_SmallCloud[] = INCBIN_U32("graphics/battle_anims/sprites/small_cloud.4bpp.lz"); const u32 gBattleAnimSpritePal_SmallCloud[] = INCBIN_U32("graphics/battle_anims/sprites/small_cloud.gbapal.lz"); +const u32 gBattleAnimSpriteGfx_AttackOrder[] = INCBIN_U32("graphics/battle_anims/sprites/attack_order.4bpp.lz"); +const u32 gBattleAnimSpritePal_AttackOrder[] = INCBIN_U32("graphics/battle_anims/sprites/attack_order.gbapal.lz"); + +const u32 gBattleAnimSpriteGfx_DragonPulse[] = INCBIN_U32("graphics/battle_anims/sprites/dragon_pulse.4bpp.lz"); +const u32 gBattleAnimSpritePal_DragonPulse[] = INCBIN_U32("graphics/battle_anims/sprites/dragon_pulse.gbapal.lz"); + +const u32 gBattleAnimSpriteGfx_WoodHammer[] = INCBIN_U32("graphics/battle_anims/sprites/wood_hammer.4bpp.lz"); +const u32 gBattleAnimSpritePal_WoodHammer[] = INCBIN_U32("graphics/battle_anims/sprites/wood_hammer.gbapal.lz"); + +const u32 gBattleAnimSpriteGfx_PsychoCut[] = INCBIN_U32("graphics/battle_anims/sprites/psycho_cut.4bpp.lz"); +const u32 gBattleAnimSpritePal_PsychoCut[] = INCBIN_U32("graphics/battle_anims/sprites/psycho_cut.gbapal.lz"); + +const u32 gBattleAnimSpriteGfx_PowerGem[] = INCBIN_U32("graphics/battle_anims/sprites/power_gem.4bpp.lz"); +const u32 gBattleAnimSpritePal_PowerGem[] = INCBIN_U32("graphics/battle_anims/sprites/power_gem.gbapal.lz"); + +const u32 gBattleAnimSpriteGfx_StoneEdge[] = INCBIN_U32("graphics/battle_anims/sprites/stone_edge.4bpp.lz"); +const u32 gBattleAnimSpritePal_StoneEdge[] = INCBIN_U32("graphics/battle_anims/sprites/stone_edge.gbapal.lz"); + +const u32 gBattleAnimSpriteGfx_StealthRock[] = INCBIN_U32("graphics/battle_anims/sprites/stealth_rock.4bpp.lz"); +const u32 gBattleAnimSpritePal_StealthRock[] = INCBIN_U32("graphics/battle_anims/sprites/stealth_rock.gbapal.lz"); + +const u32 gBattleAnimSpriteGfx_PoisonJab[] = INCBIN_U32("graphics/battle_anims/sprites/poison_jab.4bpp.lz"); +const u32 gBattleAnimSpritePal_PoisonJab[] = INCBIN_U32("graphics/battle_anims/sprites/poison_jab.gbapal.lz"); + const u32 gUnknownGfx_C06D98[] = INCBIN_U32("graphics/unknown/unknown_C06D98.4bpp.lz"); const u32 gUnknownPal_C06D98[] = INCBIN_U32("graphics/unknown/unknown_C06D98.gbapal.lz"); const u32 gUnknownPal_C06D98_2[] = INCBIN_U32("graphics/unknown/unknown_C06D98_2.gbapal.lz"); @@ -1121,6 +1145,18 @@ const u32 gBattleAnimSpritePal_WhipHit[] = INCBIN_U32("graphics/battle_anims/spr const u32 gBattleAnimBgPalette_Solarbeam[] = INCBIN_U32("graphics/battle_anims/backgrounds/solarbeam.gbapal.lz"); +const u32 gBattleAnimBgPalette_MagmaStorm[] = INCBIN_U32("graphics/battle_anims/backgrounds/magma_storm.gbapal.lz"); + +const u32 gBattleAnimBgPalette_GigaImpact[] = INCBIN_U32("graphics/battle_anims/backgrounds/giga_impact.gbapal.lz"); + +const u32 gBattleAnimBgImage_TrickRoom[] = INCBIN_U32("graphics/battle_anims/backgrounds/trick_room.4bpp.lz"); +const u32 gBattleAnimBgPalette_TrickRoom[] = INCBIN_U32("graphics/battle_anims/backgrounds/trick_room.gbapal.lz"); +const u32 gBattleAnimBgTilemap_TrickRoom[] = INCBIN_U32("graphics/battle_anims/backgrounds/trick_room_map.bin.lz"); + +const u32 gBattleAnimBgImage_RockWrecker[] = INCBIN_U32("graphics/battle_anims/backgrounds/rock_wrecker.4bpp.lz"); +const u32 gBattleAnimBgPalette_RockWrecker[] = INCBIN_U32("graphics/battle_anims/backgrounds/rock_wrecker.gbapal.lz"); +const u32 gBattleAnimBgTilemap_RockWrecker[] = INCBIN_U32("graphics/battle_anims/backgrounds/rock_wrecker_map.bin.lz"); + const u32 gUnknown_E6BC04[] = INCBIN_U32("graphics/unknown/unknown_E6BC04.bin.lz"); const u32 sBlenderCenterGfx[] = INCBIN_U32("graphics/berry_blender/center.8bpp.lz"); diff --git a/src/ice.c b/src/ice.c index 8f0c97d82..5ed5b37ad 100644 --- a/src/ice.c +++ b/src/ice.c @@ -48,6 +48,8 @@ void AnimTask_Haze2(u8); void AnimTask_OverlayFogTiles(u8); void AnimTask_Hail2(u8); bool8 GenerateHailParticle(u8 hailStructId, u8 affineAnimNum, u8 taskId, u8 c); +static void AvalancheAnim_Step2(struct Sprite *sprite); +void AvalancheAnim_Step(struct Sprite *sprite); const union AnimCmd gUnknown_08595A48[] = { @@ -522,6 +524,80 @@ const struct SpriteTemplate gUnknown_08595DFC = .callback = InitIceBallParticle, }; +const union AnimCmd gAvalancheAnimTable_1[] = +{ + ANIMCMD_FRAME(32, 1), + ANIMCMD_END, +}; + +const union AnimCmd gAvalancheAnimTable_2[] = +{ + ANIMCMD_FRAME(48, 1), + ANIMCMD_END, +}; + +const union AnimCmd gAvalancheAnimTable_3[] = +{ + ANIMCMD_FRAME(64, 1), + ANIMCMD_END, +}; + +const union AnimCmd *const gAvalancheAnimCmd[] = +{ + gAvalancheAnimTable_1, + gAvalancheAnimTable_2, + gAvalancheAnimTable_3, +}; + +const struct SpriteTemplate gAvalancheSpriteTemplate = +{ + .tileTag = ANIM_TAG_ROCKS, + .paletteTag = ANIM_TAG_ICE_CHUNK, + .oam = &gUnknown_08524914, + .anims = gAvalancheAnimCmd, + .images = NULL, + .affineAnims = gDummySpriteAffineAnimTable, + .callback = AvalancheAnim_Step, +}; + +void AvalancheAnim_Step(struct Sprite *sprite) +{ + if (gBattleAnimArgs[3] != 0) + SetAverageBattlerPositions(gBattleAnimTarget, 0, &sprite->pos1.x, &sprite->pos1.y); + + sprite->pos1.x += gBattleAnimArgs[0]; + sprite->pos1.y += 14; + + StartSpriteAnim(sprite, gBattleAnimArgs[1]); + AnimateSprite(sprite); + + sprite->data[0] = 0; + sprite->data[1] = 0; + sprite->data[2] = 4; + sprite->data[3] = 16; + sprite->data[4] = -70; + sprite->data[5] = gBattleAnimArgs[2]; + + StoreSpriteCallbackInData6(sprite, AvalancheAnim_Step2); + sprite->callback = TranslateSpriteInEllipseOverDuration; + sprite->callback(sprite); +} + +static void AvalancheAnim_Step2(struct Sprite *sprite) +{ + sprite->pos1.x += sprite->data[5]; + + sprite->data[0] = 192; + sprite->data[1] = sprite->data[5]; + sprite->data[2] = 4; + sprite->data[3] = 32; + sprite->data[4] = -24; + + StoreSpriteCallbackInData6(sprite, DestroySpriteAndMatrix); + sprite->callback = TranslateSpriteInEllipseOverDuration; + sprite->callback(sprite); +} + // probably unused static void sub_810B6C4(struct Sprite *sprite) { diff --git a/src/poison.c b/src/poison.c index 85779dd5e..794098ec2 100644 --- a/src/poison.c +++ b/src/poison.c @@ -12,6 +12,11 @@ static void sub_810DC10(struct Sprite *); static void sub_810DCB4(struct Sprite *); static void sub_810DD24(struct Sprite *); static void AnimBubbleEffectStep(struct Sprite *); +static void AnimSuckerPunchStep(struct Sprite *sprite); +void AnimSuckerPunch(struct Sprite *sprite); +void AnimGunkShotParticlesStep(struct Sprite *sprite); +void AnimGunkShotParticles(struct Sprite *sprite); +void AnimGunkShotImpact(struct Sprite *sprite); extern const union AnimCmd *const gUnknown_08595200[]; @@ -189,8 +194,8 @@ const struct SpriteTemplate gWaterBubbleSpriteTemplate = const struct SpriteTemplate gGreenPoisonDrip = { - .tileTag = ANIM_TAG_POISON_BUBBLE, - .paletteTag = ANIM_TAG_VINE, + .tileTag = ANIM_TAG_GREEN_POISON_BUBBLE, + .paletteTag = ANIM_TAG_GREEN_POISON_BUBBLE, .oam = &gUnknown_085249CC, .anims = gUnknown_08596168, .images = NULL, @@ -200,8 +205,8 @@ const struct SpriteTemplate gGreenPoisonDrip = const struct SpriteTemplate gGreenPoisonBubble = { - .tileTag = ANIM_TAG_POISON_BUBBLE, - .paletteTag = ANIM_TAG_VINE, + .tileTag = ANIM_TAG_GREEN_POISON_BUBBLE, + .paletteTag = ANIM_TAG_GREEN_POISON_BUBBLE, .oam = &gUnknown_085249CC, .anims = gUnknown_08596164, .images = NULL, @@ -209,6 +214,195 @@ const struct SpriteTemplate gGreenPoisonBubble = .callback = sub_810DC2C, }; +const union AnimCmd gSuckerPunchAnimCmd[] = +{ + ANIMCMD_FRAME(0, 3), + ANIMCMD_FRAME(0, 3, .hFlip = TRUE), + ANIMCMD_FRAME(0, 3, .vFlip = TRUE, .hFlip = TRUE), + ANIMCMD_FRAME(0, 3, .vFlip = TRUE), + ANIMCMD_JUMP(0), +}; + +const union AnimCmd *const gSuckerPunchAnim[] = +{ + gSuckerPunchAnimCmd, +}; + +const union AnimCmd gGunkShotParticlesAnimCmd[] = +{ + ANIMCMD_FRAME(0, 1), + ANIMCMD_FRAME(4, 1), + ANIMCMD_FRAME(8, 1), + ANIMCMD_FRAME(12, 1), + ANIMCMD_JUMP(0), +}; + +const union AnimCmd *const gGunkShotParticlesAnims[] = +{ + gGunkShotParticlesAnimCmd, +}; + +const union AffineAnimCmd gSuckerPunchImpactAffineAnimCmd_1[] = +{ + AFFINEANIMCMD_FRAME(0x0, 0x0, 0, 8), + AFFINEANIMCMD_END, +}; + +const union AffineAnimCmd gSuckerPunchImpactAffineAnimCmd_2[] = +{ + AFFINEANIMCMD_FRAME(0xD8, 0xD8, 0, 0), + AFFINEANIMCMD_FRAME(0x0, 0x0, 0, 8), + AFFINEANIMCMD_END, +}; + +const union AffineAnimCmd gSuckerPunchImpactAffineAnimCmd_3[] = +{ + AFFINEANIMCMD_FRAME(0xB0, 0xB0, 0, 0), + AFFINEANIMCMD_FRAME(0x0, 0x0, 0, 8), + AFFINEANIMCMD_END, +}; + +const union AffineAnimCmd gSuckerPunchImpactAffineAnimCmd_4[] = +{ + AFFINEANIMCMD_FRAME(0x80, 0x80, 0, 0), + AFFINEANIMCMD_FRAME(0x0, 0x0, 0, 8), + AFFINEANIMCMD_END, +}; + +const union AffineAnimCmd *const gSuckerPunchImpactAffineAnim[] = +{ + gSuckerPunchImpactAffineAnimCmd_1, + gSuckerPunchImpactAffineAnimCmd_2, + gSuckerPunchImpactAffineAnimCmd_3, + gSuckerPunchImpactAffineAnimCmd_4, +}; + +const struct SpriteTemplate gSuckerPunchSpriteTemplate = +{ + .tileTag = ANIM_TAG_POISON_JAB, + .paletteTag = ANIM_TAG_POISON_JAB, + .oam = &gUnknown_0852496C, + .anims = gSuckerPunchAnim, + .images = NULL, + .affineAnims = gDummySpriteAffineAnimTable, + .callback = AnimSuckerPunch, +}; + +const struct SpriteTemplate gGunkShoParticlesSpriteTemplate = +{ + .tileTag = ANIM_TAG_WATER_ORB, + .paletteTag = ANIM_TAG_POISON_BUBBLE, + .oam = &gUnknown_08524A2C, + .anims = gGunkShotParticlesAnims, + .images = NULL, + .affineAnims = gDummySpriteAffineAnimTable, + .callback = AnimGunkShotParticles, +}; + +const struct SpriteTemplate gGunkShotImpactSpriteTemplate = +{ + .tileTag = ANIM_TAG_WATER_IMPACT, + .paletteTag = ANIM_TAG_POISON_BUBBLE, + .oam = &gUnknown_08524A94, + .anims = gDummySpriteAnimTable, + .images = NULL, + .affineAnims = gSuckerPunchImpactAffineAnim, + .callback = AnimGunkShotImpact, +}; + +void AnimGunkShotImpact(struct Sprite *sprite) +{ + StartSpriteAffineAnim(sprite, gBattleAnimArgs[3]); + if (gBattleAnimArgs[2] == 0) + InitSpritePosToAnimAttacker(sprite, 1); + else + InitSpritePosToAnimTarget(sprite, TRUE); + + sprite->callback = RunStoredCallbackWhenAffineAnimEnds; + StoreSpriteCallbackInData6(sprite, DestroyAnimSprite); +} + +void AnimGunkShotParticles(struct Sprite *sprite) +{ + u16 retArg; + + InitSpritePosToAnimAttacker(sprite, TRUE); + sprite->data[0] = 30; + sprite->data[1] = sprite->pos1.x; + sprite->data[2] = GetBattlerSpriteCoord(gBattleAnimTarget, 2); + sprite->data[3] = sprite->pos1.y; + sprite->data[4] = GetBattlerSpriteCoord(gBattleAnimTarget, 3); + InitAnimLinearTranslation(sprite); + sprite->data[5] = 0xD200 / sprite->data[0]; + sprite->data[7] = gBattleAnimArgs[3]; + retArg = gBattleAnimArgs[ARG_RET_ID]; + if (gBattleAnimArgs[ARG_RET_ID] > 127) + { + sprite->data[6] = (retArg - 127) * 256; + sprite->data[7] = -sprite->data[7]; + } + else + { + sprite->data[6] = retArg * 256; + } + sprite->callback = AnimGunkShotParticlesStep; + sprite->callback(sprite); +} + +void AnimGunkShotParticlesStep(struct Sprite *sprite) +{ + if (AnimTranslateLinear(sprite)) + DestroyAnimSprite(sprite); + sprite->pos2.y += Sin(sprite->data[6] >> 8, sprite->data[7]); + if ((sprite->data[6] + sprite->data[5]) >> 8 > 127) + { + sprite->data[6] = 0; + sprite->data[7] = -sprite->data[7]; + } + else + { + sprite->data[6] += sprite->data[5]; + } +} + +void AnimSuckerPunch(struct Sprite *sprite) +{ + if (BATTLE_PARTNER(gBattleAnimAttacker) == gBattleAnimTarget && GetBattlerPosition(gBattleAnimTarget) < B_POSITION_PLAYER_RIGHT) + gBattleAnimArgs[0] *= -1; + + InitSpritePosToAnimTarget(sprite, TRUE); + + if (GetBattlerSide(gBattleAnimAttacker) != B_SIDE_PLAYER) + gBattleAnimArgs[2] = -gBattleAnimArgs[2]; + + sprite->data[0] = gBattleAnimArgs[3]; + sprite->data[1] = sprite->pos1.x; + sprite->data[2] = sprite->pos1.x + gBattleAnimArgs[2]; + sprite->data[3] = sprite->pos1.y; + sprite->data[4] = sprite->pos1.y; + + InitAnimLinearTranslation(sprite); + + sprite->data[5] = gBattleAnimArgs[5]; + sprite->data[6] = gBattleAnimArgs[4]; + sprite->data[7] = 0; + + sprite->callback = AnimSuckerPunchStep; +} + +static void AnimSuckerPunchStep(struct Sprite *sprite) +{ + if (!AnimTranslateLinear(sprite)) + { + sprite->pos2.y += Sin(sprite->data[7] >> 8, sprite->data[5]); + sprite->data[7] += sprite->data[6]; + } + else + { + DestroyAnimSprite(sprite); + } +} + void sub_810DBAC(struct Sprite *sprite) { if (!gBattleAnimArgs[3]) diff --git a/src/psychic.c b/src/psychic.c index 6f808b547..467516a18 100644 --- a/src/psychic.c +++ b/src/psychic.c @@ -28,6 +28,8 @@ static void sub_810F9D4(u8); static void sub_810FD3C(u8); static void sub_810FF34(u8); static void sub_8110134(u8); +void AnimateZenHeadbutt(struct Sprite *sprite); +void AnimPsychoCut(struct Sprite *sprite); const union AffineAnimCmd gUnknown_0859652C[] = { @@ -419,6 +421,122 @@ const struct SpriteTemplate gUnknown_08596920 = .callback = sub_8110240, }; +const union AffineAnimCmd gZenHeadbuttAffineAnimCmd[] = +{ + AFFINEANIMCMD_FRAME(0x10, 0x10, 0, 0), + AFFINEANIMCMD_FRAME(0x8, 0x8, 0, 18), + AFFINEANIMCMD_LOOP(0), + AFFINEANIMCMD_FRAME(0xFFFB, 0xFFFB, 0, 8), + AFFINEANIMCMD_FRAME(0x5, 0x5, 0, 8), + AFFINEANIMCMD_LOOP(5), + AFFINEANIMCMD_END, +}; + +const union AffineAnimCmd *const gZenHeadbuttAffineAnims[] = +{ + gZenHeadbuttAffineAnimCmd, +}; + +const struct SpriteTemplate gZenHeadbuttSpriteTemplate = +{ + .tileTag = ANIM_TAG_CIRCLE_OF_LIGHT, + .paletteTag = ANIM_TAG_WATER_IMPACT, + .oam = &gUnknown_08524A9C, + .anims = gDummySpriteAnimTable, + .images = NULL, + .affineAnims = gZenHeadbuttAffineAnims, + .callback = AnimateZenHeadbutt, +}; + +const struct SpriteTemplate gPsychoCutSpiralSpriteTemplate = +{ + .tileTag = ANIM_TAG_SPIRAL, + .paletteTag = ANIM_TAG_PSYCHO_CUT, + .oam = &gUnknown_08524A9C, + .anims = gDummySpriteAnimTable, + .images = NULL, + .affineAnims = gUnknown_08596544, + .callback = sub_80A77C8, +}; + +const struct SpriteTemplate gPsychoCutSpriteTemplate = +{ + .tileTag = ANIM_TAG_PSYCHO_CUT, + .paletteTag = ANIM_TAG_PSYCHO_CUT, + .oam = &gUnknown_08524974, + .anims = gDummySpriteAnimTable, + .images = NULL, + .affineAnims = gDummySpriteAffineAnimTable, + .callback = AnimPsychoCut, +}; + +void AnimPsychoCut(struct Sprite *sprite) +{ + s16 lVarX, lVarY; + u16 rot; + + if (IsContest()) + { + gBattleAnimArgs[2] = -gBattleAnimArgs[2]; + } + else + { + if (GetBattlerSide(gBattleAnimAttacker)) + { + gBattleAnimArgs[2] = -gBattleAnimArgs[2]; + gBattleAnimArgs[1] = -gBattleAnimArgs[1]; + gBattleAnimArgs[3] = -gBattleAnimArgs[3]; + } + } + + if (!IsContest() && GetBattlerSide(gBattleAnimAttacker) == GetBattlerSide(gBattleAnimTarget)) + { + if (GetBattlerPosition(gBattleAnimTarget) == B_POSITION_PLAYER_LEFT + || GetBattlerPosition(gBattleAnimTarget) == B_POSITION_OPPONENT_LEFT) + { + s16 temp1, temp2; + + temp1 = gBattleAnimArgs[2]; + gBattleAnimArgs[2] = -temp1; + + temp2 = gBattleAnimArgs[0]; + gBattleAnimArgs[0] = -temp2; + } + } + + InitSpritePosToAnimAttacker(sprite, 1); + + lVarX = GetBattlerSpriteCoord(gBattleAnimTarget, 2) + gBattleAnimArgs[2]; + lVarY = GetBattlerSpriteCoord(gBattleAnimTarget, 3) + gBattleAnimArgs[3]; + rot = ArcTan2Neg(lVarX - sprite->pos1.x, lVarY - sprite->pos1.y); + rot += 0xC000; + TrySetSpriteRotScale(sprite, FALSE, 0x100, 0x100, rot); + + sprite->data[0] = gBattleAnimArgs[4]; + sprite->data[2] = lVarX; + sprite->data[4] = lVarY; + + sprite->callback = StartAnimLinearTranslation; + StoreSpriteCallbackInData6(sprite, DestroyAnimSprite); +} + +void AnimateZenHeadbutt(struct Sprite *sprite) +{ + if (gBattleAnimArgs[0] == 0) + { + sprite->pos1.x = GetBattlerSpriteCoord(gBattleAnimAttacker, 2); + sprite->pos1.y = GetBattlerSpriteCoord(gBattleAnimAttacker, 3) + 18; + } + else + { + sprite->pos1.x = GetBattlerSpriteCoord(gBattleAnimTarget, 2); + sprite->pos1.y = GetBattlerSpriteCoord(gBattleAnimTarget, 3) + 18; + } + + StoreSpriteCallbackInData6(sprite, DestroySpriteAndMatrix); + sprite->callback = RunStoredCallbackWhenAffineAnimEnds; +} + void sub_810F1EC(struct Sprite *sprite) { u8 isContest = IsContest(); diff --git a/src/rock.c b/src/rock.c index f05816362..0907a016a 100644 --- a/src/rock.c +++ b/src/rock.c @@ -29,6 +29,13 @@ static void sub_8111214(struct Task *task); static u8 sub_811135C(void); static void sub_81113C8(struct Sprite *sprite); static void sub_811149C(struct Sprite *sprite); +static void AnimPowerGemOrbitFastStep(struct Sprite *sprite); +void AnimPowerGemOrbitFast(struct Sprite *sprite); +static void AnimPowerGemScatterStep(struct Sprite *sprite); +void AnimPowerGemScatter(struct Sprite *sprite); +static void AnimStealthRockStep2(struct Sprite *sprite); +static void AnimStealthRockStep(struct Sprite *sprite); +void AnimStealthRock(struct Sprite *sprite); const union AnimCmd gUnknown_08596AE0[] = { @@ -305,6 +312,179 @@ const struct SpriteTemplate gUnknown_08596CE0 = .callback = sub_80A8EE4, }; +const union AffineAnimCmd gPowerGemScatterAffineAnimCmd[] = +{ + AFFINEANIMCMD_FRAME(0x80, 0x80, 0, 0), + AFFINEANIMCMD_FRAME(0x8, 0x8, 0, 1), + AFFINEANIMCMD_JUMP(1), +}; + +const union AffineAnimCmd *const gPowerGemScatterAffineAnims[] = +{ + gPowerGemScatterAffineAnimCmd, +}; + +const union AffineAnimCmd gPowerGemOrbAffineAnimCmd[] = +{ + AFFINEANIMCMD_FRAME(0x80, 0x80, 0, 0), + AFFINEANIMCMD_FRAME(0x8, 0x8, 0, 1), + AFFINEANIMCMD_JUMP(1), +}; + +const union AffineAnimCmd *const gPowerGemOrbAffineAnims[] = +{ + gPowerGemOrbAffineAnimCmd, +}; + +const struct SpriteTemplate gPowerGemScatterSpriteTemplate = +{ + .tileTag = ANIM_TAG_POWER_GEM, + .paletteTag = ANIM_TAG_POWER_GEM, + .oam = &gUnknown_085249CC, + .anims = gDummySpriteAnimTable, + .images = NULL, + .affineAnims = gPowerGemScatterAffineAnims, + .callback = AnimPowerGemScatter, +}; + +const struct SpriteTemplate gPowerGemOrbSpriteTemplate = +{ + .tileTag = ANIM_TAG_POWER_GEM, + .paletteTag = ANIM_TAG_POWER_GEM, + .oam = &gUnknown_0852496C, + .anims = gDummySpriteAnimTable, + .images = NULL, + .affineAnims = gPowerGemOrbAffineAnims, + .callback = AnimPowerGemOrbitFast, +}; + +const struct SpriteTemplate gStoneEdgeSpriteTemplate = +{ + .tileTag = ANIM_TAG_STONE_EDGE, + .paletteTag = ANIM_TAG_STONE_EDGE, + .oam = &gUnknown_08524914, + .anims = gUnknown_085954D0, + .images = NULL, + .affineAnims = gDummySpriteAffineAnimTable, + .callback = sub_8110B38, +}; + +const struct SpriteTemplate gStealthRockSpriteTemplate = +{ + .tileTag = ANIM_TAG_STEALTH_ROCK, + .paletteTag = ANIM_TAG_STEALTH_ROCK, + .oam = &gUnknown_0852490C, + .anims = gDummySpriteAnimTable, + .images = NULL, + .affineAnims = gDummySpriteAffineAnimTable, + .callback = AnimStealthRock, +}; + +void AnimStealthRock(struct Sprite *sprite) +{ + u16 x; + u16 y; + + InitSpritePosToAnimAttacker(sprite, TRUE); + SetAverageBattlerPositions(gBattleAnimTarget, FALSE, &x, &y); + + if (GetBattlerSide(gBattleAnimAttacker) != B_SIDE_PLAYER) + gBattleAnimArgs[2] = -gBattleAnimArgs[2]; + + sprite->data[0] = gBattleAnimArgs[4]; + sprite->data[2] = x + gBattleAnimArgs[2]; + sprite->data[4] = y + gBattleAnimArgs[3]; + sprite->data[5] = -50; + + InitAnimArcTranslation(sprite); + sprite->callback = AnimStealthRockStep; +} + +static void AnimStealthRockStep(struct Sprite *sprite) +{ + if (TranslateAnimHorizontalArc(sprite)) + { + sprite->data[0] = 30; + sprite->data[1] = 0; + sprite->callback = WaitAnimForDuration; + StoreSpriteCallbackInData6(sprite, AnimStealthRockStep2); + } +} + +static void AnimStealthRockStep2(struct Sprite *sprite) +{ + if (sprite->data[1] & 1) + sprite->invisible ^= 1; + + if (++sprite->data[1] == 16) + DestroyAnimSprite(sprite); +} + +void AnimPowerGemScatter(struct Sprite *sprite) +{ + sprite->pos1.x = GetBattlerSpriteCoord(gBattleAnimAttacker, 2); + sprite->pos1.y = GetBattlerSpriteCoord(gBattleAnimAttacker, 3); + sprite->data[0] = Sin(gBattleAnimArgs[0], 10); + sprite->data[1] = Cos(gBattleAnimArgs[0], 7); + sprite->callback = AnimPowerGemScatterStep; +} + +static void AnimPowerGemScatterStep(struct Sprite *sprite) +{ + sprite->pos2.x += sprite->data[0]; + sprite->pos2.y += sprite->data[1]; + if (sprite->pos1.x + sprite->pos2.x + 16 > 272u || sprite->pos1.y + sprite->pos2.y > 160 || sprite->pos1.y + sprite->pos2.y < -16) + DestroyAnimSprite(sprite); +} + +void AnimPowerGemOrbitFast(struct Sprite *sprite) +{ + sprite->pos1.x = GetBattlerSpriteCoord(gBattleAnimAttacker, 2); + sprite->pos1.y = GetBattlerSpriteCoord(gBattleAnimAttacker, 3); + sprite->affineAnimPaused = 1; + sprite->data[0] = gBattleAnimArgs[0]; + sprite->data[1] = gBattleAnimArgs[1]; + sprite->data[7] = GetBattlerSpriteSubpriority(gBattleAnimAttacker); + sprite->callback = AnimPowerGemOrbitFastStep; + sprite->callback(sprite); +} + +static void AnimPowerGemOrbitFastStep(struct Sprite *sprite) +{ + if (sprite->data[1] >= 64 && sprite->data[1] <= 191) + sprite->subpriority = sprite->data[7] + 1; + else + sprite->subpriority = sprite->data[7] - 1; + + sprite->pos2.x = Sin(sprite->data[1], sprite->data[2] >> 8); + sprite->pos2.y = Cos(sprite->data[1], sprite->data[3] >> 8); + sprite->data[1] = (sprite->data[1] + 9) & 0xFF; + switch (sprite->data[5]) + { + case 1: + sprite->data[2] -= 0x400; + sprite->data[3] -= 0x100; + if (++sprite->data[4] == sprite->data[0]) + { + sprite->data[5] = 2; + return; + } + break; + case 0: + sprite->data[2] += 0x400; + sprite->data[3] += 0x100; + if (++sprite->data[4] == sprite->data[0]) + { + sprite->data[4] = 0; + sprite->data[5] = 1; + } + break; + } + + if ((u16)gBattleAnimArgs[7] == 0xFFFF) + DestroyAnimSprite(sprite); +} + void sub_81109F0(struct Sprite *sprite) { if (gBattleAnimArgs[3] != 0) diff --git a/src/water.c b/src/water.c index 4480c3f43..9d3ecb5fa 100644 --- a/src/water.c +++ b/src/water.c @@ -53,6 +53,9 @@ void sub_8108408(struct Task*, u8); void sub_810871C(struct Task*, u8); void sub_8108AC0(struct Task*); void sub_8108D54(struct Sprite*, int, int); +void AnimAquaTail(struct Sprite *sprite); +static void AnimKnockOffAquaTailStep(struct Sprite *sprite); +void AnimKnockOffAquaTail(struct Sprite *sprite); extern const union AffineAnimCmd *const gUnknown_08593420[]; extern const union AffineAnimCmd *const gUnknown_08596208[]; @@ -480,6 +483,140 @@ const struct SpriteTemplate gUnknown_08595328 = extern const struct SpriteTemplate gUnknown_08597388; +const union AffineAnimCmd gAquaTailHitAffineAnimCmd_1[] = +{ + AFFINEANIMCMD_FRAME(0x0, 0x0, 0, 8), + AFFINEANIMCMD_END, +}; + +const union AffineAnimCmd gAquaTailHitAffineAnimCmd_2[] = +{ + AFFINEANIMCMD_FRAME(0xD8, 0xD8, 0, 0), + AFFINEANIMCMD_FRAME(0x0, 0x0, 0, 8), + AFFINEANIMCMD_END, +}; + +const union AffineAnimCmd gAquaTailHitAffineAnimCmd_3[] = +{ + AFFINEANIMCMD_FRAME(0xB0, 0xB0, 0, 0), + AFFINEANIMCMD_FRAME(0x0, 0x0, 0, 8), + AFFINEANIMCMD_END, +}; + +const union AffineAnimCmd gAquaTailHitAffineAnimCmd_4[] = +{ + AFFINEANIMCMD_FRAME(0x80, 0x80, 0, 0), + AFFINEANIMCMD_FRAME(0x0, 0x0, 0, 8), + AFFINEANIMCMD_END, +}; + +const union AffineAnimCmd *const gAquaTailHitAffineAnims[] = +{ + gAquaTailHitAffineAnimCmd_1, + gAquaTailHitAffineAnimCmd_2, + gAquaTailHitAffineAnimCmd_3, + gAquaTailHitAffineAnimCmd_4, +}; + +const union AnimCmd gKnockOffAquaTailAnimCmd[] = +{ + ANIMCMD_FRAME(0, 4), + ANIMCMD_FRAME(64, 4), + ANIMCMD_END, +}; + +const union AnimCmd *const gKnockOffAquaTailAnim[] = +{ + gKnockOffAquaTailAnimCmd, +}; + +const union AffineAnimCmd gKnockOffAquaTailAffineanimCmd_1[] = +{ + AFFINEANIMCMD_FRAME(0x100, 0x100, 0, 0), + AFFINEANIMCMD_FRAME(0, 0, -4, 8), + AFFINEANIMCMD_END, +}; + +const union AffineAnimCmd gKnockOffAquaTailAffineanimCmd_2[] = +{ + AFFINEANIMCMD_FRAME(-0x100, 0x100, 0, 0), + AFFINEANIMCMD_FRAME(0, 0, 4, 8), + AFFINEANIMCMD_END, +}; + +const union AffineAnimCmd *const gKnockOffAquaTailAffineAnim[] = +{ + gKnockOffAquaTailAffineanimCmd_1, + gKnockOffAquaTailAffineanimCmd_2, +}; + +const struct SpriteTemplate gAquaTailKnockOffSpriteTemplate = +{ + .tileTag = ANIM_TAG_SLAM_HIT_2, + .paletteTag = ANIM_TAG_WATER_IMPACT, + .oam = &gUnknown_0852497C, + .anims = gKnockOffAquaTailAnim, + .images = NULL, + .affineAnims = gKnockOffAquaTailAffineAnim, + .callback = AnimKnockOffAquaTail, +}; + +const struct SpriteTemplate gAquaTailHitSpriteTemplate = +{ + .tileTag = ANIM_TAG_IMPACT, + .paletteTag = ANIM_TAG_WATER_IMPACT, + .oam = &gUnknown_08524A94, + .anims = gDummySpriteAnimTable, + .images = NULL, + .affineAnims = gAquaTailHitAffineAnims, + .callback = AnimAquaTail, +}; + +void AnimAquaTail(struct Sprite *sprite) +{ + StartSpriteAffineAnim(sprite, gBattleAnimArgs[3]); + if (gBattleAnimArgs[2] == 0) + InitSpritePosToAnimAttacker(sprite, 1); + else + InitSpritePosToAnimTarget(sprite, TRUE); + + sprite->callback = RunStoredCallbackWhenAffineAnimEnds; + StoreSpriteCallbackInData6(sprite, DestroyAnimSprite); +} + +void AnimKnockOffAquaTail(struct Sprite *sprite) +{ + if (GetBattlerSide(gBattleAnimTarget) == B_SIDE_PLAYER) + { + sprite->pos1.x -= gBattleAnimArgs[0]; + sprite->pos1.y += gBattleAnimArgs[1]; + sprite->data[0] = -11; + sprite->data[1] = 192; + StartSpriteAffineAnim(sprite, 1); + } + else + { + sprite->data[0] = 11; + sprite->data[1] = 192; + sprite->pos1.x += gBattleAnimArgs[0]; + sprite->pos1.y += gBattleAnimArgs[1]; + } + + sprite->callback = AnimKnockOffAquaTailStep; +} + +static void AnimKnockOffAquaTailStep(struct Sprite *sprite) +{ + sprite->data[1] += sprite->data[0]; + sprite->data[1] &= 0xFF; + sprite->pos2.x = Cos(sprite->data[1], 20); + sprite->pos2.y = Sin(sprite->data[1], 20); + if (sprite->animEnded) + DestroyAnimSprite(sprite); + + sprite->data[2]++; +} + void AnimTask_CreateRaindrops(u8 taskId) { u8 x, y;