Add Poison Jab animation

This commit is contained in:
Marcus Huderle 2018-12-20 11:58:21 -06:00
parent 0369780db9
commit ecda59a406
7 changed files with 92 additions and 0 deletions

View File

@ -1386,6 +1386,7 @@ Move_ROCK_POLISH:
createsprite gRockPolishStreakSpriteTemplate, ANIM_ATTACKER, 2, -21, -16
delay 2
waitforvisualfinish
playsewithpan SE_W213, SOUND_PAN_ATTACKER
createsprite gRockPolishSparkleSpriteTemplate, ANIM_ATTACKER, 2, -20, 9
createsprite gRockPolishSparkleSpriteTemplate, ANIM_ATTACKER, 2, -10, -15
createsprite gRockPolishSparkleSpriteTemplate, ANIM_ATTACKER, 2, 1, 17
@ -1409,6 +1410,54 @@ Move_ROCK_POLISH:
end
Move_POISON_JAB:
loadspritegfx ANIM_TAG_PURPLE_JAB
loadspritegfx ANIM_TAG_IMPACT
setalpha 12, 8
createsprite gPoisonJabProjectileSpriteTemplate, ANIM_TARGET, 2, 3, -31, 10
delay 2
createsprite gPoisonJabProjectileSpriteTemplate, ANIM_TARGET, 2, -18, -25, 10
delay 2
createsprite gPoisonJabProjectileSpriteTemplate, ANIM_TARGET, 2, 27, 17, 10
delay 2
createsprite gPoisonJabProjectileSpriteTemplate, ANIM_TARGET, 2, -26, 18, 10
delay 2
createsprite gPoisonJabProjectileSpriteTemplate, ANIM_TARGET, 2, 10, 30, 10
delay 2
createsprite gBasicHitSplatSpriteTemplate, ANIM_TARGET, 3, -7, 4, 1, 3
playsewithpan SE_W004, SOUND_PAN_TARGET
createsprite gPoisonJabProjectileSpriteTemplate, ANIM_TARGET, 2, -17, -27, 10
delay 2
createsprite gBasicHitSplatSpriteTemplate, ANIM_TARGET, 3, -4, -6, 1, 3
playsewithpan SE_W004, SOUND_PAN_TARGET
createsprite gPoisonJabProjectileSpriteTemplate, ANIM_TARGET, 2, 2, 31, 10
createvisualtask AnimTask_SwayMon, 5, 0, 3, 0x2000, 6, ANIM_TARGET
createvisualtask AnimTask_BlendMonInAndOut, 5, ANIM_TARGET, RGB(16, 0, 16), 12, 0, 1
delay 2
createsprite gBasicHitSplatSpriteTemplate, ANIM_TARGET, 3, 6, 4, 1, 3
playsewithpan SE_W004, SOUND_PAN_TARGET
createsprite gPoisonJabProjectileSpriteTemplate, ANIM_TARGET, 2, 15, -27, 10
delay 2
createsprite gBasicHitSplatSpriteTemplate, ANIM_TARGET, 3, -6, 8, 1, 3
playsewithpan SE_W004, SOUND_PAN_TARGET
createsprite gPoisonJabProjectileSpriteTemplate, ANIM_TARGET, 2, -31, -2, 10
delay 2
createsprite gBasicHitSplatSpriteTemplate, ANIM_TARGET, 3, 12, 6, 1, 3
playsewithpan SE_W004, SOUND_PAN_TARGET
createsprite gPoisonJabProjectileSpriteTemplate, ANIM_TARGET, 2, -26, -18, 10
delay 2
createsprite gBasicHitSplatSpriteTemplate, ANIM_TARGET, 3, -6, -8, 1, 3
playsewithpan SE_W004, SOUND_PAN_TARGET
delay 2
createsprite gBasicHitSplatSpriteTemplate, ANIM_TARGET, 3, 0, 8, 1, 3
playsewithpan SE_W004, SOUND_PAN_TARGET
delay 2
createsprite gBasicHitSplatSpriteTemplate, ANIM_TARGET, 3, -8, 0, 1, 3
playsewithpan SE_W004, SOUND_PAN_TARGET
delay 2
createsprite gBasicHitSplatSpriteTemplate, ANIM_TARGET, 3, -7, -5, 1, 3
playsewithpan SE_W004, SOUND_PAN_TARGET
waitforvisualfinish
blendoff
end
Move_DARK_PULSE:

Binary file not shown.

After

Width:  |  Height:  |  Size: 282 B

View File

@ -297,6 +297,7 @@
#define ANIM_TAG_WHIP_HIT (ANIM_SPRITES_START + 287)
#define ANIM_TAG_BLUE_RING_2 (ANIM_SPRITES_START + 288)
#define ANIM_TAG_WHITE_STREAK (ANIM_SPRITES_START + 289)
#define ANIM_TAG_PURPLE_JAB (ANIM_SPRITES_START + 290)
// battlers
#define ANIM_ATTACKER 0

View File

@ -4374,6 +4374,7 @@ extern const u32 gBattleAnimSpriteSheet_283[];
extern const u32 gBattleAnimSpriteSheet_284[];
extern const u32 gBattleAnimSpriteSheet_285[];
extern const u32 gBattleAnimSpriteSheet_289[];
extern const u32 gBattleAnimSpriteSheet_290[];
extern const u32 gBattleAnimSpritePalette_000[];
extern const u32 gBattleAnimSpritePalette_001[];
@ -4650,6 +4651,7 @@ extern const u32 gBattleAnimSpritePalette_286[];
extern const u32 gBattleAnimSpritePalette_287[];
extern const u32 gBattleAnimSpritePalette_288[];
extern const u32 gBattleAnimSpritePalette_289[];
extern const u32 gBattleAnimSpritePalette_290[];
extern const u32 gBattleAnimBackgroundImage_00[];
extern const u32 gBattleAnimBackgroundImage_02[];

View File

@ -1058,6 +1058,7 @@ const struct CompressedSpriteSheet gBattleAnimPicTable[] =
{gBattleAnimSpriteSheet_056, 0x1000, ANIM_TAG_WHIP_HIT},
{gBattleAnimSpriteSheet_163, 0x0100, ANIM_TAG_BLUE_RING_2},
{gBattleAnimSpriteSheet_289, 0x1000, ANIM_TAG_WHITE_STREAK},
{gBattleAnimSpriteSheet_290, 0x800, ANIM_TAG_PURPLE_JAB},
};
@ -1353,6 +1354,7 @@ const struct CompressedSpritePalette gBattleAnimPaletteTable[] =
{gBattleAnimSpritePalette_287, ANIM_TAG_WHIP_HIT},
{gBattleAnimSpritePalette_288, ANIM_TAG_BLUE_RING_2},
{gBattleAnimSpritePalette_289, ANIM_TAG_WHITE_STREAK},
{gBattleAnimSpritePalette_290, ANIM_TAG_PURPLE_JAB},
};
const struct BattleAnimBackground gBattleAnimBackgroundTable[] =

View File

@ -2107,6 +2107,7 @@ const struct SpriteTemplate gPowerOrbs_Float =
void AnimRockPolishStreak(struct Sprite *);
void AnimRockPolishSparkle(struct Sprite *);
void AnimPoisonJabProjectile(struct Sprite *);
const union AnimCmd gRockPolishStreak_AnimCmd[] =
{
@ -2298,3 +2299,37 @@ void AnimRockPolishSparkle(struct Sprite *sprite)
StoreSpriteCallbackInData6(sprite, move_anim_8074EE0);
sprite->callback = sub_80A67D8;
}
const struct SpriteTemplate gPoisonJabProjectileSpriteTemplate =
{
.tileTag = ANIM_TAG_PURPLE_JAB,
.paletteTag = ANIM_TAG_PURPLE_JAB,
.oam = &gUnknown_08524B14,
.anims = gDummySpriteAnimTable,
.images = NULL,
.affineAnims = gDummySpriteAffineAnimTable,
.callback = AnimPoisonJabProjectile,
};
// Moves a projectile towards the center of the target mon. The sprite is rotated to look
// like it's traveling along that path.
// arg 0: initial x pixel offset
// arg 1: initial y pixel offset
// arg 2: duration
void AnimPoisonJabProjectile(struct Sprite *sprite)
{
s16 targetXPos;
s16 targetYPos;
u16 rotation;
sub_80A6980(sprite, TRUE);
targetXPos = GetBattlerSpriteCoord(gBattleAnimTarget, BATTLER_COORD_X_2);
targetYPos = GetBattlerSpriteCoord(gBattleAnimTarget, BATTLER_COORD_3);
rotation = ArcTan2Neg(targetXPos - sprite->pos1.x, targetYPos - sprite->pos1.y);
sub_80A73E0(sprite, FALSE, 0x100, 0x100, rotation);
sprite->data[0] = gBattleAnimArgs[2];
sprite->data[2] = targetXPos;
sprite->data[4] = targetYPos;
sprite->callback = StartAnimLinearTranslation;
StoreSpriteCallbackInData6(sprite, DestroyAnimSprite);
}

View File

@ -568,6 +568,9 @@ const u32 gBattleAnimSpritePalette_288[] = INCBIN_U32("graphics/battle_anims/spr
const u32 gBattleAnimSpriteSheet_289[] = INCBIN_U32("graphics/battle_anims/sprites/289.4bpp.lz");
const u32 gBattleAnimSpritePalette_289[] = INCBIN_U32("graphics/battle_anims/sprites/289.gbapal.lz");
const u32 gBattleAnimSpriteSheet_290[] = INCBIN_U32("graphics/battle_anims/sprites/290.4bpp.lz");
const u32 gBattleAnimSpritePalette_290[] = INCBIN_U32("graphics/battle_anims/sprites/290.gbapal.lz");
const u32 gBattleAnimSpritePalette_164[] = INCBIN_U32("graphics/battle_anims/sprites/164.gbapal.lz");
const u32 gBattleAnimSpritePalette_165[] = INCBIN_U32("graphics/battle_anims/sprites/165.gbapal.lz");