mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2025-01-26 21:33:53 +01:00
Fix Gravity's animation
This commit is contained in:
parent
339f297949
commit
e2f14d43db
@ -863,6 +863,7 @@ Move_ROOST:
|
||||
Move_GRAVITY:
|
||||
fadetobg BG_COSMIC
|
||||
waitbgfadein
|
||||
createvisualtask AnimTask_SetAnimTargetToAttackerOpposite, 1
|
||||
playsewithpan SE_M_TAKE_DOWN, SOUND_PAN_ATTACKER
|
||||
createvisualtask AnimTask_ShakeAndSinkMon, 5, ANIM_ATTACKER, 2, 0, 96, 30
|
||||
createvisualtask AnimTask_ShakeAndSinkMon, 5, ANIM_DEF_PARTNER, 2, 0, 96, 30
|
||||
|
@ -321,6 +321,12 @@ static void AnimTask_ShakeMonInPlace_Step(u8 taskId)
|
||||
void AnimTask_ShakeAndSinkMon(u8 taskId)
|
||||
{
|
||||
u8 spriteId = GetAnimBattlerSpriteId(gBattleAnimArgs[0]);
|
||||
|
||||
if (spriteId == SPRITE_NONE)
|
||||
{
|
||||
DestroyAnimVisualTask(taskId);
|
||||
return;
|
||||
}
|
||||
gSprites[spriteId].pos2.x = gBattleAnimArgs[1];
|
||||
gTasks[taskId].data[0] = spriteId;
|
||||
gTasks[taskId].data[1] = gBattleAnimArgs[1];
|
||||
|
@ -1084,3 +1084,9 @@ void AnimTask_SetInvisible(u8 taskId)
|
||||
gSprites[spriteId].invisible = gBattleSpritesDataPtr->battlerData[battlerId].invisible = gBattleAnimArgs[1];
|
||||
DestroyAnimVisualTask(taskId);
|
||||
}
|
||||
|
||||
void AnimTask_SetAnimTargetToAttackerOpposite(u8 taskId)
|
||||
{
|
||||
gBattleAnimTarget = BATTLE_OPPOSITE(gBattleAnimAttacker);
|
||||
DestroyAnimVisualTask(taskId);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user