diff --git a/data/battle_anim_scripts.s b/data/battle_anim_scripts.s index 06a24c5928..03b317dc73 100644 --- a/data/battle_anim_scripts.s +++ b/data/battle_anim_scripts.s @@ -21119,7 +21119,11 @@ Move_POISON_GAS: createsprite gPoisonGasCloudSpriteTemplate, ANIM_TARGET, 0, 64, 0, 0, -32, -6, 4192, 1072, 0 delay 40 loopsewithpan SE_M_MIST, SOUND_PAN_TARGET, 28, 6 +.if B_UPDATED_MOVE_DATA >= GEN_5 + createvisualtask AnimTask_BlendColorCycle, 2, F_PAL_DEF_SIDE, 6, 2, 0, 12, RGB(26, 0, 26) +.else createvisualtask AnimTask_BlendColorCycle, 2, F_PAL_TARGET, 6, 2, 0, 12, RGB(26, 0, 26) +.endif waitforvisualfinish blendoff clearmonbg ANIM_DEF_PARTNER diff --git a/src/battle_anim_ice.c b/src/battle_anim_ice.c index 3712fb7271..44c1a4f22c 100644 --- a/src/battle_anim_ice.c +++ b/src/battle_anim_ice.c @@ -1289,6 +1289,18 @@ static void InitPoisonGasCloudAnim(struct Sprite *sprite) sprite->x = GetBattlerSpriteCoord(gBattleAnimAttacker, BATTLER_COORD_X_2); sprite->y = GetBattlerSpriteCoord(gBattleAnimAttacker, BATTLER_COORD_Y_PIC_OFFSET); + +#if B_UPDATED_MOVE_DATA >= GEN_5 + { + s16 x, y; + SetAverageBattlerPositions(gBattleAnimTarget, gBattleAnimArgs[7], &x, &y); + sprite->data[1] = sprite->x + gBattleAnimArgs[1]; + sprite->data[2] = x + gBattleAnimArgs[3]; + sprite->data[3] = sprite->y + gBattleAnimArgs[2]; + sprite->data[4] = y + gBattleAnimArgs[4]; + sprite->data[7] |= GetBattlerSpriteBGPriority(gBattleAnimTarget) << 8; + } +#else if (gBattleAnimArgs[7]) { sprite->data[1] = sprite->x + gBattleAnimArgs[1]; @@ -1305,6 +1317,7 @@ static void InitPoisonGasCloudAnim(struct Sprite *sprite) sprite->data[4] = GetBattlerSpriteCoord(gBattleAnimTarget, BATTLER_COORD_Y) + gBattleAnimArgs[4]; sprite->data[7] |= GetBattlerSpriteBGPriority(gBattleAnimTarget) << 8; } +#endif if (IsContest()) { @@ -1333,8 +1346,14 @@ static void MovePoisonGasCloud(struct Sprite *sprite) if (sprite->data[0] <= 0) { + #if B_UPDATED_MOVE_DATA >= GEN_5 + s16 x, y; + SetAverageBattlerPositions(gBattleAnimTarget, 0, &x, &y); + sprite->x = x; + #else + sprite->x = GetBattlerSpriteCoord(gBattleAnimTarget, BATTLER_COORD_X); + #endif sprite->data[0] = 80; - sprite->x = GetBattlerSpriteCoord(gBattleAnimTarget, BATTLER_COORD_X); sprite->data[1] = sprite->x; sprite->data[2] = sprite->x; sprite->y += sprite->y2;