Fix Gastro Acid animation

This commit is contained in:
DizzyEggg 2020-06-26 22:20:00 +02:00
parent 04833ef6cf
commit db715335c3
2 changed files with 18 additions and 16 deletions

View File

@ -1382,31 +1382,30 @@ Move_POWER_TRICK:
Move_GASTRO_ACID:
loadspritegfx ANIM_TAG_GREEN_POISON_BUBBLE
monbg ANIM_DEF_PARTNER
createsprite gGreenPoisonBubble, ANIM_TARGET, 2, 20, 0, 40, 1, 0, 0
createsprite gGreenPoisonBubble, ANIM_TARGET, 2, 20, 0, 40, 1, 0, 0, FALSE
playsewithpan SE_W145C, SOUND_PAN_ATTACKER
delay 5
createsprite gGreenPoisonBubble, ANIM_TARGET, 2, 20, 0, 40, 1, 24, 0
createsprite gGreenPoisonBubble, ANIM_TARGET, 2, 20, 0, 40, 1, 24, 0, FALSE
playsewithpan SE_W145C, SOUND_PAN_ATTACKER
delay 5
createsprite gGreenPoisonBubble, ANIM_TARGET, 2, 20, 0, 40, 1, -24, 0
createsprite gGreenPoisonBubble, ANIM_TARGET, 2, 20, 0, 40, 1, -24, 0, FALSE
playsewithpan SE_W145C, SOUND_PAN_ATTACKER
delay 15
createvisualtask AnimTask_ShakeMon2, 5, ANIM_TARGET, 2, 0, 10, 1
createvisualtask AnimTask_ShakeMon2, 5, ANIM_DEF_PARTNER, 2, 0, 10, 1
createvisualtask AnimTask_BlendColorCycle, 2, 20, 2, 2, 0, 12, RGB(30, 0, 31)
createsprite gGreenPoisonDrip, ANIM_TARGET, 2, 0, -22, 0, 15, 55
createvisualtask AnimTask_BlendColorCycle, 2, ANIM_PAL_DEF, 2, 2, 0, 12, RGB(30, 0, 31)
createsprite gGreenPoisonDrip, ANIM_TARGET, 2, 0, -22, 0, 15, 55, FALSE
playsewithpan SE_W145, SOUND_PAN_TARGET
delay 10
createsprite gGreenPoisonDrip, ANIM_TARGET, 2, -26, -24, 0, 15, 55
createsprite gGreenPoisonDrip, ANIM_TARGET, 2, -26, -24, 0, 15, 55, FALSE
playsewithpan SE_W145, SOUND_PAN_TARGET
delay 10
createsprite gGreenPoisonDrip, ANIM_TARGET, 2, 15, -27, 0, 15, 50
createsprite gGreenPoisonDrip, ANIM_TARGET, 2, 15, -27, 0, 15, 50, FALSE
playsewithpan SE_W145, SOUND_PAN_TARGET
delay 10
createsprite gGreenPoisonDrip, ANIM_TARGET, 2, -15, -17, 0, 10, 45
createsprite gGreenPoisonDrip, ANIM_TARGET, 2, -15, -17, 0, 10, 45, FALSE
playsewithpan SE_W145, SOUND_PAN_TARGET
delay 10
createsprite gGreenPoisonDrip, ANIM_TARGET, 2, 27, -22, 0, 15, 50
createsprite gGreenPoisonDrip, ANIM_TARGET, 2, 27, -22, 0, 15, 50, FALSE
playsewithpan SE_W145, SOUND_PAN_TARGET
waitforvisualfinish
clearmonbg ANIM_DEF_PARTNER
@ -4962,7 +4961,7 @@ Move_LOW_SWEEP:
Move_ACID_SPRAY:
loadspritegfx ANIM_TAG_POISON_BUBBLE
monbg ANIM_TARGET
createsprite gAcidPoisonBubbleSpriteTemplate, ANIM_TARGET, 2, 20, 0, 40, 1, 0, -20
createsprite gAcidPoisonBubbleSpriteTemplate, ANIM_TARGET, 2, 20, 0, 40, 1, 0, -20, FALSE
playsewithpan SE_W145C, SOUND_PAN_ATTACKER
delay 33
createvisualtask AnimTask_ShakeMon2, 5, ANIM_TARGET, 2, 0, 10, 1
@ -19544,13 +19543,13 @@ SludgeBombProjectile:
Move_ACID:
loadspritegfx ANIM_TAG_POISON_BUBBLE
monbg ANIM_DEF_PARTNER
createsprite gAcidPoisonBubbleSpriteTemplate, ANIM_TARGET, 2, 20, 0, 40, 1, 0, 0
createsprite gAcidPoisonBubbleSpriteTemplate, ANIM_TARGET, 2, 20, 0, 40, 1, 0, 0, TRUE
playsewithpan SE_W145C, SOUND_PAN_ATTACKER
delay 5
createsprite gAcidPoisonBubbleSpriteTemplate, ANIM_TARGET, 2, 20, 0, 40, 1, 24, 0
createsprite gAcidPoisonBubbleSpriteTemplate, ANIM_TARGET, 2, 20, 0, 40, 1, 24, 0, TRUE
playsewithpan SE_W145C, SOUND_PAN_ATTACKER
delay 5
createsprite gAcidPoisonBubbleSpriteTemplate, ANIM_TARGET, 2, 20, 0, 40, 1, -24, 0
createsprite gAcidPoisonBubbleSpriteTemplate, ANIM_TARGET, 2, 20, 0, 40, 1, -24, 0, TRUE
playsewithpan SE_W145C, SOUND_PAN_ATTACKER
delay 15
createvisualtask AnimTask_ShakeMon2, 5, ANIM_TARGET, 2, 0, 10, 1

View File

@ -424,12 +424,15 @@ static void AnimSludgeProjectile_Step(struct Sprite *sprite)
static void AnimAcidPoisonBubble(struct Sprite *sprite)
{
s16 l1, l2;
s16 l1 = 0, l2 = 0;
if (!gBattleAnimArgs[3])
StartSpriteAnim(sprite, 2);
InitSpritePosToAnimAttacker(sprite, 1);
SetAverageBattlerPositions(gBattleAnimTarget, 1, &l1, &l2);
if (gBattleAnimArgs[6])
SetAverageBattlerPositions(gBattleAnimTarget, 1, &l1, &l2);
else
l1 = GetBattlerSpriteCoord(gBattleAnimTarget, BATTLER_COORD_X_2), l2 = GetBattlerSpriteCoord(gBattleAnimTarget, BATTLER_COORD_Y_PIC_OFFSET);
if (GetBattlerSide(gBattleAnimAttacker))
gBattleAnimArgs[4] = -gBattleAnimArgs[4];