Fix Poison Gas Anim for MOVE_TARGET_BOTH (#2608)
* poison gas anim handles MOVE_TARGET_BOTH * fix sprite position fields * fix it again --------- Co-authored-by: ghoulslash <pokevoyager0@gmail.com>
This commit is contained in:
parent
04ce8ec213
commit
0c4c3fbbb7
2 changed files with 24 additions and 1 deletions
|
@ -21119,7 +21119,11 @@ Move_POISON_GAS:
|
||||||
createsprite gPoisonGasCloudSpriteTemplate, ANIM_TARGET, 0, 64, 0, 0, -32, -6, 4192, 1072, 0
|
createsprite gPoisonGasCloudSpriteTemplate, ANIM_TARGET, 0, 64, 0, 0, -32, -6, 4192, 1072, 0
|
||||||
delay 40
|
delay 40
|
||||||
loopsewithpan SE_M_MIST, SOUND_PAN_TARGET, 28, 6
|
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)
|
createvisualtask AnimTask_BlendColorCycle, 2, F_PAL_TARGET, 6, 2, 0, 12, RGB(26, 0, 26)
|
||||||
|
.endif
|
||||||
waitforvisualfinish
|
waitforvisualfinish
|
||||||
blendoff
|
blendoff
|
||||||
clearmonbg ANIM_DEF_PARTNER
|
clearmonbg ANIM_DEF_PARTNER
|
||||||
|
|
|
@ -1289,6 +1289,18 @@ static void InitPoisonGasCloudAnim(struct Sprite *sprite)
|
||||||
|
|
||||||
sprite->x = GetBattlerSpriteCoord(gBattleAnimAttacker, BATTLER_COORD_X_2);
|
sprite->x = GetBattlerSpriteCoord(gBattleAnimAttacker, BATTLER_COORD_X_2);
|
||||||
sprite->y = GetBattlerSpriteCoord(gBattleAnimAttacker, BATTLER_COORD_Y_PIC_OFFSET);
|
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])
|
if (gBattleAnimArgs[7])
|
||||||
{
|
{
|
||||||
sprite->data[1] = sprite->x + gBattleAnimArgs[1];
|
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[4] = GetBattlerSpriteCoord(gBattleAnimTarget, BATTLER_COORD_Y) + gBattleAnimArgs[4];
|
||||||
sprite->data[7] |= GetBattlerSpriteBGPriority(gBattleAnimTarget) << 8;
|
sprite->data[7] |= GetBattlerSpriteBGPriority(gBattleAnimTarget) << 8;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
if (IsContest())
|
if (IsContest())
|
||||||
{
|
{
|
||||||
|
@ -1333,8 +1346,14 @@ static void MovePoisonGasCloud(struct Sprite *sprite)
|
||||||
|
|
||||||
if (sprite->data[0] <= 0)
|
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->data[0] = 80;
|
||||||
sprite->x = GetBattlerSpriteCoord(gBattleAnimTarget, BATTLER_COORD_X);
|
|
||||||
sprite->data[1] = sprite->x;
|
sprite->data[1] = sprite->x;
|
||||||
sprite->data[2] = sprite->x;
|
sprite->data[2] = sprite->x;
|
||||||
sprite->y += sprite->y2;
|
sprite->y += sprite->y2;
|
||||||
|
|
Loading…
Reference in a new issue