Mud bomb and Shadow Sneak Animations
This commit is contained in:
parent
6a186b5d5a
commit
e7f8186ccc
2 changed files with 145 additions and 2 deletions
|
@ -134,7 +134,7 @@ gBattleAnims_Moves::
|
||||||
.4byte Move_FOCUS_ENERGY
|
.4byte Move_FOCUS_ENERGY
|
||||||
.4byte Move_BIDE
|
.4byte Move_BIDE
|
||||||
.4byte Move_METRONOME
|
.4byte Move_METRONOME
|
||||||
.4byte Move_MIRROR_MOVE @ doesn't have an actual animation
|
.4byte Move_MIRROR_MOVE @ doesn´t have an actual animation
|
||||||
.4byte Move_SELF_DESTRUCT
|
.4byte Move_SELF_DESTRUCT
|
||||||
.4byte Move_EGG_BOMB
|
.4byte Move_EGG_BOMB
|
||||||
.4byte Move_LICK
|
.4byte Move_LICK
|
||||||
|
@ -1885,11 +1885,80 @@ Move_FIRE_FANG:
|
||||||
end
|
end
|
||||||
|
|
||||||
Move_SHADOW_SNEAK:
|
Move_SHADOW_SNEAK:
|
||||||
|
loadspritegfx ANIM_TAG_LICK
|
||||||
|
setalpha 0, 16
|
||||||
|
delay 1
|
||||||
|
createvisualtask sub_81143C0, 2
|
||||||
|
delay 1
|
||||||
|
createvisualtask sub_8113BAC, 5
|
||||||
|
playsewithpan SE_W060, SOUND_PAN_ATTACKER
|
||||||
|
delay 48
|
||||||
|
playsewithpan SE_W060B, SOUND_PAN_ATTACKER
|
||||||
|
waitforvisualfinish
|
||||||
|
createvisualtask sub_8114470, 2
|
||||||
|
setalpha 0, 16
|
||||||
|
delay 1
|
||||||
|
playsewithpan SE_W122, SOUND_PAN_TARGET
|
||||||
|
createsprite gUnknown_08596D8C, ANIM_TARGET, 2, 0, 0
|
||||||
|
createvisualtask AnimTask_ShakeMon2, 2, ANIM_TARGET, 1, 0, 16, 1
|
||||||
|
waitforvisualfinish
|
||||||
|
clearmonbg_23 ANIM_TARGET
|
||||||
|
delay 1
|
||||||
|
blendoff
|
||||||
|
delay 1
|
||||||
end
|
end
|
||||||
|
|
||||||
Move_MUD_BOMB:
|
Move_MUD_BOMB:
|
||||||
|
loadspritegfx ANIM_TAG_MUD_SAND
|
||||||
|
playsewithpan SE_W145C, SOUND_PAN_ATTACKER
|
||||||
|
createsprite gMudBombToss, ANIM_TARGET, 2, 20, 0, 0, 0, 35, -25
|
||||||
|
delay 5
|
||||||
|
playsewithpan SE_W145C, SOUND_PAN_ATTACKER
|
||||||
|
createsprite gMudBombToss, ANIM_TARGET, 2, 20, 0, 0, 0, 35, -25
|
||||||
|
delay 5
|
||||||
|
playsewithpan SE_W145C, SOUND_PAN_ATTACKER
|
||||||
|
createsprite gMudBombToss, ANIM_TARGET, 2, 20, 0, 0, 0, 35, -25
|
||||||
|
delay 5
|
||||||
|
playsewithpan SE_W145C, SOUND_PAN_ATTACKER
|
||||||
|
createsprite gMudBombToss, ANIM_TARGET, 2, 20, 0, 0, 0, 35, -25
|
||||||
|
delay 11
|
||||||
|
createvisualtask AnimTask_ShakeMon, 5, ANIM_TARGET, 3, 0, 5, 1
|
||||||
|
createsprite gMudBombSplash, ANIM_TARGET, 2, 42, 27, 20
|
||||||
|
createsprite gMudBombSplash, ANIM_TARGET, 2, 42, 27, 20
|
||||||
|
createsprite gMudBombSplash, ANIM_TARGET, 2, -27, 44, 20
|
||||||
|
createsprite gMudBombSplash, ANIM_TARGET, 2, 39, -28, 20
|
||||||
|
createsprite gMudBombSplash, ANIM_TARGET, 2, -42, -42, 20
|
||||||
|
playsewithpan SE_W233B, SOUND_PAN_TARGET
|
||||||
|
delay 5
|
||||||
|
createvisualtask AnimTask_ShakeMon, 5, ANIM_TARGET, 3, 0, 5, 1
|
||||||
|
createsprite gMudBombSplash, ANIM_TARGET, 2, 0, 40, 20
|
||||||
|
createsprite gMudBombSplash, ANIM_TARGET, 2, -8, -44, 20
|
||||||
|
createsprite gMudBombSplash, ANIM_TARGET, 2, -46, -28, 20
|
||||||
|
createsprite gMudBombSplash, ANIM_TARGET, 2, 46, 9, 20
|
||||||
|
playsewithpan SE_W088, SOUND_PAN_TARGET
|
||||||
|
delay 5
|
||||||
|
createvisualtask AnimTask_ShakeMon, 5, ANIM_TARGET, 3, 0, 5, 1
|
||||||
|
createsprite gMudBombSplash, ANIM_TARGET, 2, 42, 0, 20
|
||||||
|
createsprite gMudBombSplash, ANIM_TARGET, 2, -43, -12, 20
|
||||||
|
createsprite gMudBombSplash, ANIM_TARGET, 2, 16, -46, 20
|
||||||
|
createsprite gMudBombSplash, ANIM_TARGET, 2, -16, 44, 20
|
||||||
|
playsewithpan SE_W088, SOUND_PAN_TARGET
|
||||||
|
delay 5
|
||||||
|
createvisualtask AnimTask_ShakeMon, 5, ANIM_TARGET, 3, 0, 5, 1
|
||||||
|
createsprite gMudBombSplash, ANIM_TARGET, 2, 0, 40, 20
|
||||||
|
createsprite gMudBombSplash, ANIM_TARGET, 2, -8, -44, 20
|
||||||
|
createsprite gMudBombSplash, ANIM_TARGET, 2, -46, -28, 20
|
||||||
|
createsprite gMudBombSplash, ANIM_TARGET, 2, 46, 9, 20
|
||||||
|
playsewithpan SE_W088, SOUND_PAN_TARGET
|
||||||
|
delay 5
|
||||||
|
createvisualtask AnimTask_ShakeMon, 5, ANIM_TARGET, 3, 0, 5, 1
|
||||||
|
createsprite gMudBombSplash, ANIM_TARGET, 2, 42, 0, 20
|
||||||
|
createsprite gMudBombSplash, ANIM_TARGET, 2, -43, -12, 20
|
||||||
|
createsprite gMudBombSplash, ANIM_TARGET, 2, 16, -46, 20
|
||||||
|
createsprite gMudBombSplash, ANIM_TARGET, 2, -16, 44, 20
|
||||||
|
waitforvisualfinish
|
||||||
end
|
end
|
||||||
|
|
||||||
Move_PSYCHO_CUT:
|
Move_PSYCHO_CUT:
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
74
src/ground.c
74
src/ground.c
|
@ -12,10 +12,14 @@ void AnimDirtScatter(struct Sprite *);
|
||||||
void AnimMudSportDirt(struct Sprite *);
|
void AnimMudSportDirt(struct Sprite *);
|
||||||
void AnimFissureDirtPlumeParticle(struct Sprite *);
|
void AnimFissureDirtPlumeParticle(struct Sprite *);
|
||||||
void AnimDigDirtMound(struct Sprite *);
|
void AnimDigDirtMound(struct Sprite *);
|
||||||
|
void MudBombParticles(struct Sprite *);
|
||||||
|
void MudBombBall(struct Sprite *);
|
||||||
static void AnimBonemerangProjectileStep(struct Sprite *);
|
static void AnimBonemerangProjectileStep(struct Sprite *);
|
||||||
static void AnimBonemerangProjectileEnd(struct Sprite *);
|
static void AnimBonemerangProjectileEnd(struct Sprite *);
|
||||||
static void AnimMudSportDirtRising(struct Sprite *);
|
static void AnimMudSportDirtRising(struct Sprite *);
|
||||||
static void AnimMudSportDirtFalling(struct Sprite *);
|
static void AnimMudSportDirtFalling(struct Sprite *);
|
||||||
|
static void MudBombParticles_Callback(struct Sprite *);
|
||||||
|
static void MudBombBall_Callback(struct Sprite *);
|
||||||
static void sub_8114CFC(u8);
|
static void sub_8114CFC(u8);
|
||||||
static void sub_8114EB4(u8);
|
static void sub_8114EB4(u8);
|
||||||
static void sub_8114F54(u8);
|
static void sub_8114F54(u8);
|
||||||
|
@ -27,6 +31,7 @@ static void sub_81154A4(u8);
|
||||||
static void sub_8115588(struct Task *);
|
static void sub_8115588(struct Task *);
|
||||||
static void sub_81156D0(u8);
|
static void sub_81156D0(u8);
|
||||||
|
|
||||||
|
|
||||||
const union AffineAnimCmd gUnknown_08597150[] =
|
const union AffineAnimCmd gUnknown_08597150[] =
|
||||||
{
|
{
|
||||||
AFFINEANIMCMD_FRAME(0x0, 0x0, 15, 1),
|
AFFINEANIMCMD_FRAME(0x0, 0x0, 15, 1),
|
||||||
|
@ -137,6 +142,28 @@ const struct SpriteTemplate gUnknown_08597214 =
|
||||||
.callback = AnimDigDirtMound,
|
.callback = AnimDigDirtMound,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const struct SpriteTemplate gMudBombSplash =
|
||||||
|
{
|
||||||
|
.tileTag = ANIM_TAG_MUD_SAND,
|
||||||
|
.paletteTag = ANIM_TAG_MUD_SAND,
|
||||||
|
.oam = &gUnknown_08524904,
|
||||||
|
.anims = gDummySpriteAnimTable,
|
||||||
|
.images = NULL,
|
||||||
|
.affineAnims = gDummySpriteAffineAnimTable,
|
||||||
|
.callback = MudBombParticles,
|
||||||
|
};
|
||||||
|
|
||||||
|
const struct SpriteTemplate gMudBombToss =
|
||||||
|
{
|
||||||
|
.tileTag = ANIM_TAG_MUD_SAND ,
|
||||||
|
.paletteTag = ANIM_TAG_MUD_SAND,
|
||||||
|
.oam = &gUnknown_0852490C,
|
||||||
|
.anims = gUnknown_085971C8,
|
||||||
|
.images = NULL,
|
||||||
|
.affineAnims = gDummySpriteAffineAnimTable,
|
||||||
|
.callback = MudBombBall,
|
||||||
|
};
|
||||||
|
|
||||||
// Moves a bone projectile towards the target mon, which moves like
|
// Moves a bone projectile towards the target mon, which moves like
|
||||||
// a boomerang. After hitting the target mon, it comes back to the user.
|
// a boomerang. After hitting the target mon, it comes back to the user.
|
||||||
void AnimBonemerangProjectile(struct Sprite *sprite)
|
void AnimBonemerangProjectile(struct Sprite *sprite)
|
||||||
|
@ -557,6 +584,53 @@ void AnimDigDirtMound(struct Sprite *sprite)
|
||||||
sprite->callback = WaitAnimForDuration;
|
sprite->callback = WaitAnimForDuration;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//Lifted from sludge bomb
|
||||||
|
void MudBombParticles(struct Sprite *sprite)
|
||||||
|
{
|
||||||
|
sprite->data[0] = gBattleAnimArgs[2];
|
||||||
|
sprite->data[1] = sprite->pos1.x;
|
||||||
|
sprite->data[2] = sprite->pos1.x + gBattleAnimArgs[0];
|
||||||
|
sprite->data[3] = sprite->pos1.y;
|
||||||
|
sprite->data[4] = sprite->pos1.y + gBattleAnimArgs[1];
|
||||||
|
|
||||||
|
InitSpriteDataForLinearTranslation(sprite);
|
||||||
|
|
||||||
|
sprite->data[5] = sprite->data[1] / gBattleAnimArgs[2];
|
||||||
|
sprite->data[6] = sprite->data[2] / gBattleAnimArgs[2];
|
||||||
|
|
||||||
|
sprite->callback = MudBombParticles_Callback;
|
||||||
|
}
|
||||||
|
//also lifted from sludge bomb
|
||||||
|
static void MudBombParticles_Callback(struct Sprite *sprite)
|
||||||
|
{
|
||||||
|
TranslateSpriteLinearFixedPoint(sprite);
|
||||||
|
|
||||||
|
sprite->data[1] -= sprite->data[5];
|
||||||
|
sprite->data[2] -= sprite->data[6];
|
||||||
|
|
||||||
|
if (!sprite->data[0])
|
||||||
|
DestroyAnimSprite(sprite);
|
||||||
|
}
|
||||||
|
//lifted from smokescreen
|
||||||
|
void MudBombBall(struct Sprite *sprite)
|
||||||
|
{
|
||||||
|
InitSpritePosToAnimAttacker(sprite, 1);
|
||||||
|
if (GetBattlerSide(gBattleAnimAttacker))
|
||||||
|
gBattleAnimArgs[2] = -gBattleAnimArgs[2];
|
||||||
|
sprite->data[0] = gBattleAnimArgs[4];
|
||||||
|
sprite->data[2] = GetBattlerSpriteCoord(gBattleAnimTarget, BATTLER_COORD_X_2) + gBattleAnimArgs[2];
|
||||||
|
sprite->data[4] = GetBattlerSpriteCoord(gBattleAnimTarget, BATTLER_COORD_Y_PIC_OFFSET) + gBattleAnimArgs[3];
|
||||||
|
sprite->data[5] = gBattleAnimArgs[5];
|
||||||
|
InitAnimArcTranslation(sprite);
|
||||||
|
|
||||||
|
sprite->callback = MudBombBall_Callback;
|
||||||
|
}
|
||||||
|
//Also lifted form smokescreen
|
||||||
|
static void MudBombBall_Callback(struct Sprite *sprite)
|
||||||
|
{
|
||||||
|
if (TranslateAnimHorizontalArc(sprite))
|
||||||
|
DestroyAnimSprite(sprite);
|
||||||
|
}
|
||||||
void sub_81152DC(u8 taskId)
|
void sub_81152DC(u8 taskId)
|
||||||
{
|
{
|
||||||
u16 i;
|
u16 i;
|
||||||
|
|
Loading…
Reference in a new issue