Heart Swap Move Animation (#5460)
This commit is contained in:
parent
feeccb9198
commit
708f64247f
8 changed files with 157 additions and 1 deletions
|
@ -934,6 +934,44 @@ gBattleAnimMove_ToxicSpikes::
|
||||||
end
|
end
|
||||||
|
|
||||||
gBattleAnimMove_HeartSwap::
|
gBattleAnimMove_HeartSwap::
|
||||||
|
loadspritegfx ANIM_TAG_RED_HEART
|
||||||
|
loadspritegfx ANIM_TAG_PINKVIO_ORB
|
||||||
|
loadspritegfx ANIM_TAG_SPARKLE_2
|
||||||
|
createvisualtask AnimTask_BlendBattleAnimPal, 10, F_PAL_BG, 3, 0, 8, RGB(31, 24, 26)
|
||||||
|
createvisualtask AnimTask_HeartSwap, 3, ANIM_TARGET
|
||||||
|
createvisualtask AnimTask_BlendMonInAndOut, 5, ANIM_TARGET, RGB_WHITE, 12, 3, 1
|
||||||
|
loopsewithpan SE_M_TAIL_WHIP, SOUND_PAN_ATTACKER, 10, 8
|
||||||
|
delay 16
|
||||||
|
createvisualtask AnimTask_HeartSwap, 3, ANIM_ATTACKER
|
||||||
|
createvisualtask AnimTask_BlendMonInAndOut, 5, ANIM_ATTACKER, RGB_WHITE, 12, 3, 1
|
||||||
|
waitforvisualfinish
|
||||||
|
createsprite gGrantingStarsSpriteTemplate, ANIM_ATTACKER, 2, -15, 0, 0, 0, 32, 60
|
||||||
|
createsprite gGrantingStarsSpriteTemplate, ANIM_TARGET, 2, -15, 0, 0, 0, 32, 60
|
||||||
|
delay 8
|
||||||
|
createsprite gGrantingStarsSpriteTemplate, ANIM_ATTACKER, 2, 12, -5, 0, 0, 32, 60
|
||||||
|
createsprite gGrantingStarsSpriteTemplate, ANIM_TARGET, 2, 12, -5, 0, 0, 32, 60
|
||||||
|
delay 4
|
||||||
|
playsewithpan SE_SHINY, SOUND_PAN_ATTACKER
|
||||||
|
createvisualtask AnimTask_BlendMonInAndOut, 5, ANIM_ATTACKER, RGB(31, 25, 27), 12, 3, 1
|
||||||
|
createvisualtask AnimTask_ScaleMonAndRestore, 5, -3, -3, 16, ANIM_ATTACKER, 0
|
||||||
|
createvisualtask AnimTask_BlendMonInAndOut, 5, ANIM_TARGET, RGB(31, 25, 27), 12, 3, 1
|
||||||
|
createvisualtask AnimTask_ScaleMonAndRestore, 5, -3, -3, 16, ANIM_TARGET, 0
|
||||||
|
createsprite gRedHeartBurstSpriteTemplate, ANIM_TARGET, 3, 160, -32
|
||||||
|
createsprite gRedHeartBurstSpriteTemplate, ANIM_TARGET, 3, -256, -40
|
||||||
|
createsprite gRedHeartBurstSpriteTemplate, ANIM_TARGET, 3, 128, -16
|
||||||
|
createvisualtask AnimTask_BlendBattleAnimPal, 10, F_PAL_BG, 3, 8, 0, RGB(31, 24, 26)
|
||||||
|
createsprite gRedHeartCharmSpriteTemplate, ANIM_ATTACKER, 3, 0, 20
|
||||||
|
playsewithpan SE_M_MORNING_SUN, SOUND_PAN_ATTACKER
|
||||||
|
delay 15
|
||||||
|
createsprite gRedHeartCharmSpriteTemplate, ANIM_ATTACKER, 3, -20, 20
|
||||||
|
playsewithpan SE_M_CHARM, SOUND_PAN_ATTACKER
|
||||||
|
delay 15
|
||||||
|
createsprite gRedHeartCharmSpriteTemplate, ANIM_ATTACKER, 3, 20, 20
|
||||||
|
playsewithpan SE_M_CHARM, SOUND_PAN_ATTACKER
|
||||||
|
waitforvisualfinish
|
||||||
|
clearmonbg ANIM_ATTACKER
|
||||||
|
clearmonbg ANIM_TARGET
|
||||||
|
blendoff
|
||||||
end
|
end
|
||||||
|
|
||||||
gBattleAnimMove_AquaRing::
|
gBattleAnimMove_AquaRing::
|
||||||
|
|
BIN
graphics/battle_anims/sprites/pinkvio_orb.png
Normal file
BIN
graphics/battle_anims/sprites/pinkvio_orb.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 4.9 KiB |
|
@ -416,6 +416,7 @@
|
||||||
#define ANIM_TAG_BEAM (ANIM_SPRITES_START + 402)
|
#define ANIM_TAG_BEAM (ANIM_SPRITES_START + 402)
|
||||||
#define ANIM_TAG_RED_EXPLOSION (ANIM_SPRITES_START + 403)
|
#define ANIM_TAG_RED_EXPLOSION (ANIM_SPRITES_START + 403)
|
||||||
#define ANIM_TAG_PURPLE_CHAIN (ANIM_SPRITES_START + 404)
|
#define ANIM_TAG_PURPLE_CHAIN (ANIM_SPRITES_START + 404)
|
||||||
|
#define ANIM_TAG_PINKVIO_ORB (ANIM_SPRITES_START + 405)
|
||||||
|
|
||||||
// battlers
|
// battlers
|
||||||
#define ANIM_ATTACKER 0
|
#define ANIM_ATTACKER 0
|
||||||
|
|
|
@ -2887,6 +2887,8 @@ extern const u32 gBattleAnimSpritePal_IvyCudgelGrass[];
|
||||||
extern const u32 gBattleAnimSpritePal_IvyCudgelFire[];
|
extern const u32 gBattleAnimSpritePal_IvyCudgelFire[];
|
||||||
extern const u32 gBattleAnimSpritePal_IvyCudgelRock[];
|
extern const u32 gBattleAnimSpritePal_IvyCudgelRock[];
|
||||||
extern const u32 gBattleAnimSpritePal_IvyCudgelWater[];
|
extern const u32 gBattleAnimSpritePal_IvyCudgelWater[];
|
||||||
|
extern const u32 gBattleAnimSpriteGfx_PinkVioletOrb[];
|
||||||
|
extern const u32 gBattleAnimSpritePal_PinkVioletOrb[];
|
||||||
|
|
||||||
extern const u32 gBattleAnimBgImage_Dark[];
|
extern const u32 gBattleAnimBgImage_Dark[];
|
||||||
extern const u32 gBattleAnimBgImage_Ghost[];
|
extern const u32 gBattleAnimBgImage_Ghost[];
|
||||||
|
|
|
@ -953,6 +953,18 @@ const struct SpriteTemplate gRedHeartRisingSpriteTemplate =
|
||||||
.callback = AnimRedHeartRising,
|
.callback = AnimRedHeartRising,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// New struct that's just a copy of 'gMagentaHeartSpriteTemplate', without need to make new anim tags
|
||||||
|
const struct SpriteTemplate gRedHeartCharmSpriteTemplate =
|
||||||
|
{
|
||||||
|
.tileTag = ANIM_TAG_RED_HEART,
|
||||||
|
.paletteTag = ANIM_TAG_RED_HEART,
|
||||||
|
.oam = &gOamData_AffineOff_ObjNormal_16x16,
|
||||||
|
.anims = gDummySpriteAnimTable,
|
||||||
|
.images = NULL,
|
||||||
|
.affineAnims = gDummySpriteAffineAnimTable,
|
||||||
|
.callback = AnimMagentaHeart,
|
||||||
|
};
|
||||||
|
|
||||||
const union AffineAnimCmd gHiddenPowerOrbAffineAnimCmds[] =
|
const union AffineAnimCmd gHiddenPowerOrbAffineAnimCmds[] =
|
||||||
{
|
{
|
||||||
AFFINEANIMCMD_FRAME(0x80, 0x80, 0, 0),
|
AFFINEANIMCMD_FRAME(0x80, 0x80, 0, 0),
|
||||||
|
|
|
@ -25,6 +25,7 @@ static void AnimTask_MeditateStretchAttacker_Step(u8);
|
||||||
static void AnimTask_Teleport_Step(u8);
|
static void AnimTask_Teleport_Step(u8);
|
||||||
static void AnimTask_ImprisonOrbs_Step(u8);
|
static void AnimTask_ImprisonOrbs_Step(u8);
|
||||||
static void AnimTask_SkillSwap_Step(u8);
|
static void AnimTask_SkillSwap_Step(u8);
|
||||||
|
static void AnimTask_HeartSwap_Step(u8);
|
||||||
static void AnimTask_ExtrasensoryDistortion_Step(u8);
|
static void AnimTask_ExtrasensoryDistortion_Step(u8);
|
||||||
static void AnimTask_TransparentCloneGrowAndShrink_Step(u8);
|
static void AnimTask_TransparentCloneGrowAndShrink_Step(u8);
|
||||||
static void AnimateZenHeadbutt(struct Sprite *sprite);
|
static void AnimateZenHeadbutt(struct Sprite *sprite);
|
||||||
|
@ -359,6 +360,18 @@ const struct SpriteTemplate gSkillSwapOrbSpriteTemplate =
|
||||||
.callback = AnimSkillSwapOrb,
|
.callback = AnimSkillSwapOrb,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// Pink version of the Skill Swap orbs
|
||||||
|
const struct SpriteTemplate gHeartSwapOrbSpriteTemplate =
|
||||||
|
{
|
||||||
|
.tileTag = ANIM_TAG_PINKVIO_ORB,
|
||||||
|
.paletteTag = ANIM_TAG_PINKVIO_ORB,
|
||||||
|
.oam = &gOamData_AffineNormal_ObjNormal_16x16,
|
||||||
|
.anims = gDummySpriteAnimTable,
|
||||||
|
.images = NULL,
|
||||||
|
.affineAnims = sAffineAnims_SkillSwapOrb,
|
||||||
|
.callback = AnimSkillSwapOrb,
|
||||||
|
};
|
||||||
|
|
||||||
static const union AffineAnimCmd sAffineAnim_LusterPurgeCircle[] =
|
static const union AffineAnimCmd sAffineAnim_LusterPurgeCircle[] =
|
||||||
{
|
{
|
||||||
AFFINEANIMCMD_FRAME(0x20, 0x20, 0, 0),
|
AFFINEANIMCMD_FRAME(0x20, 0x20, 0, 0),
|
||||||
|
@ -1001,7 +1014,7 @@ void AnimTask_SkillSwap(u8 taskId)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (gBattleAnimArgs[0] == 1)
|
if (gBattleAnimArgs[0] == ANIM_TARGET)
|
||||||
{
|
{
|
||||||
task->data[10] = -10;
|
task->data[10] = -10;
|
||||||
task->data[11] = GetBattlerSpriteCoordAttr(gBattleAnimTarget, BATTLER_COORD_ATTR_LEFT) + 8;
|
task->data[11] = GetBattlerSpriteCoordAttr(gBattleAnimTarget, BATTLER_COORD_ATTR_LEFT) + 8;
|
||||||
|
@ -1023,6 +1036,55 @@ void AnimTask_SkillSwap(u8 taskId)
|
||||||
task->func = AnimTask_SkillSwap_Step;
|
task->func = AnimTask_SkillSwap_Step;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Copy of Skill Swap's function to get position of the user and target
|
||||||
|
// arg 0: move target
|
||||||
|
void AnimTask_HeartSwap(u8 taskId)
|
||||||
|
{
|
||||||
|
struct Task *task = &gTasks[taskId];
|
||||||
|
|
||||||
|
if (IsContest())
|
||||||
|
{
|
||||||
|
if (gBattleAnimArgs[0] == ANIM_TARGET)
|
||||||
|
{
|
||||||
|
task->data[10] = -10;
|
||||||
|
task->data[11] = GetBattlerSpriteCoordAttr(gBattleAnimTarget, BATTLER_COORD_ATTR_RIGHT) - 8;
|
||||||
|
task->data[12] = GetBattlerSpriteCoordAttr(gBattleAnimTarget, BATTLER_COORD_ATTR_TOP) + 8;
|
||||||
|
task->data[13] = GetBattlerSpriteCoordAttr(gBattleAnimAttacker, BATTLER_COORD_ATTR_RIGHT) - 8;
|
||||||
|
task->data[14] = GetBattlerSpriteCoordAttr(gBattleAnimAttacker, BATTLER_COORD_ATTR_TOP) + 8;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
task->data[10] = 10;
|
||||||
|
task->data[11] = GetBattlerSpriteCoordAttr(gBattleAnimAttacker, BATTLER_COORD_ATTR_LEFT) + 8;
|
||||||
|
task->data[12] = GetBattlerSpriteCoordAttr(gBattleAnimAttacker, BATTLER_COORD_ATTR_BOTTOM) - 8;
|
||||||
|
task->data[13] = GetBattlerSpriteCoordAttr(gBattleAnimTarget, BATTLER_COORD_ATTR_LEFT) + 8;
|
||||||
|
task->data[14] = GetBattlerSpriteCoordAttr(gBattleAnimTarget, BATTLER_COORD_ATTR_BOTTOM) - 8;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (gBattleAnimArgs[0] == ANIM_TARGET)
|
||||||
|
{
|
||||||
|
task->data[10] = -10;
|
||||||
|
task->data[11] = GetBattlerSpriteCoordAttr(gBattleAnimTarget, BATTLER_COORD_ATTR_LEFT) + 8;
|
||||||
|
task->data[12] = GetBattlerSpriteCoordAttr(gBattleAnimTarget, BATTLER_COORD_ATTR_TOP) + 8;
|
||||||
|
task->data[13] = GetBattlerSpriteCoordAttr(gBattleAnimAttacker, BATTLER_COORD_ATTR_LEFT) + 8;
|
||||||
|
task->data[14] = GetBattlerSpriteCoordAttr(gBattleAnimAttacker, BATTLER_COORD_ATTR_TOP) + 8;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
task->data[10] = 10;
|
||||||
|
task->data[11] = GetBattlerSpriteCoordAttr(gBattleAnimAttacker, BATTLER_COORD_ATTR_RIGHT) - 8;
|
||||||
|
task->data[12] = GetBattlerSpriteCoordAttr(gBattleAnimAttacker, BATTLER_COORD_ATTR_BOTTOM) - 8;
|
||||||
|
task->data[13] = GetBattlerSpriteCoordAttr(gBattleAnimTarget, BATTLER_COORD_ATTR_RIGHT) - 8;
|
||||||
|
task->data[14] = GetBattlerSpriteCoordAttr(gBattleAnimTarget, BATTLER_COORD_ATTR_BOTTOM) - 8;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
task->data[1] = 6;
|
||||||
|
task->func = AnimTask_HeartSwap_Step;
|
||||||
|
}
|
||||||
|
|
||||||
static void AnimTask_SkillSwap_Step(u8 taskId)
|
static void AnimTask_SkillSwap_Step(u8 taskId)
|
||||||
{
|
{
|
||||||
u8 spriteId;
|
u8 spriteId;
|
||||||
|
@ -1057,6 +1119,42 @@ static void AnimTask_SkillSwap_Step(u8 taskId)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Copy of Skill Swap's function to vault the series of orbs between the user and target
|
||||||
|
// CreateSprite modified so it uses the pink orbs instead of the blue/green ones
|
||||||
|
static void AnimTask_HeartSwap_Step(u8 taskId)
|
||||||
|
{
|
||||||
|
u8 spriteId;
|
||||||
|
struct Task *task = &gTasks[taskId];
|
||||||
|
|
||||||
|
switch (task->data[0])
|
||||||
|
{
|
||||||
|
case 0:
|
||||||
|
if (++task->data[1] > 6)
|
||||||
|
{
|
||||||
|
task->data[1] = 0;
|
||||||
|
spriteId = CreateSprite(&gHeartSwapOrbSpriteTemplate, task->data[11], task->data[12], 0);
|
||||||
|
if (spriteId != MAX_SPRITES)
|
||||||
|
{
|
||||||
|
gSprites[spriteId].data[0] = 16;
|
||||||
|
gSprites[spriteId].data[2] = task->data[13];
|
||||||
|
gSprites[spriteId].data[4] = task->data[14];
|
||||||
|
gSprites[spriteId].data[5] = task->data[10];
|
||||||
|
|
||||||
|
InitAnimArcTranslation(&gSprites[spriteId]);
|
||||||
|
StartSpriteAffineAnim(&gSprites[spriteId], task->data[2] & 3);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (++task->data[2] == 12)
|
||||||
|
task->data[0]++;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
if (++task->data[1] > 17)
|
||||||
|
DestroyAnimVisualTask(taskId);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
static void AnimSkillSwapOrb(struct Sprite *sprite)
|
static void AnimSkillSwapOrb(struct Sprite *sprite)
|
||||||
{
|
{
|
||||||
if (TranslateAnimHorizontalArc(sprite))
|
if (TranslateAnimHorizontalArc(sprite))
|
||||||
|
|
|
@ -1465,6 +1465,7 @@ const struct CompressedSpriteSheet gBattleAnimPicTable[] =
|
||||||
{gBattleAnimSpriteGfx_RedExplosion, 0x0800, ANIM_TAG_RED_EXPLOSION},
|
{gBattleAnimSpriteGfx_RedExplosion, 0x0800, ANIM_TAG_RED_EXPLOSION},
|
||||||
{gBattleAnimSpriteGfx_Beam, 0x0800, ANIM_TAG_BEAM},
|
{gBattleAnimSpriteGfx_Beam, 0x0800, ANIM_TAG_BEAM},
|
||||||
{gBattleAnimSpriteGfx_PurpleChain, 0x1000, ANIM_TAG_PURPLE_CHAIN},
|
{gBattleAnimSpriteGfx_PurpleChain, 0x1000, ANIM_TAG_PURPLE_CHAIN},
|
||||||
|
{gBattleAnimSpriteGfx_PinkVioletOrb, 0x0080, ANIM_TAG_PINKVIO_ORB},
|
||||||
};
|
};
|
||||||
|
|
||||||
const struct CompressedSpritePalette gBattleAnimPaletteTable[] =
|
const struct CompressedSpritePalette gBattleAnimPaletteTable[] =
|
||||||
|
@ -1931,6 +1932,7 @@ const struct CompressedSpritePalette gBattleAnimPaletteTable[] =
|
||||||
{gBattleAnimSpritePal_RedExplosion, ANIM_TAG_RED_EXPLOSION},
|
{gBattleAnimSpritePal_RedExplosion, ANIM_TAG_RED_EXPLOSION},
|
||||||
{gBattleAnimSpritePal_Beam, ANIM_TAG_BEAM},
|
{gBattleAnimSpritePal_Beam, ANIM_TAG_BEAM},
|
||||||
{gBattleAnimSpritePal_PurpleChain, ANIM_TAG_PURPLE_CHAIN},
|
{gBattleAnimSpritePal_PurpleChain, ANIM_TAG_PURPLE_CHAIN},
|
||||||
|
{gBattleAnimSpritePal_PinkVioletOrb, ANIM_TAG_PINKVIO_ORB},
|
||||||
};
|
};
|
||||||
|
|
||||||
const struct BattleAnimBackground gBattleAnimBackgroundTable[] =
|
const struct BattleAnimBackground gBattleAnimBackgroundTable[] =
|
||||||
|
|
|
@ -1263,6 +1263,9 @@ const u32 gBattleAnimSpriteGfx_XSign[] = INCBIN_U32("graphics/battle_anims/sprit
|
||||||
const u32 gBattleAnimSpriteGfx_BluegreenOrb[] = INCBIN_U32("graphics/battle_anims/sprites/bluegreen_orb.4bpp.lz");
|
const u32 gBattleAnimSpriteGfx_BluegreenOrb[] = INCBIN_U32("graphics/battle_anims/sprites/bluegreen_orb.4bpp.lz");
|
||||||
const u32 gBattleAnimSpritePal_BluegreenOrb[] = INCBIN_U32("graphics/battle_anims/sprites/bluegreen_orb.gbapal.lz");
|
const u32 gBattleAnimSpritePal_BluegreenOrb[] = INCBIN_U32("graphics/battle_anims/sprites/bluegreen_orb.gbapal.lz");
|
||||||
|
|
||||||
|
const u32 gBattleAnimSpriteGfx_PinkVioletOrb[] = INCBIN_U32("graphics/battle_anims/sprites/pinkvio_orb.4bpp.lz");
|
||||||
|
const u32 gBattleAnimSpritePal_PinkVioletOrb[] = INCBIN_U32("graphics/battle_anims/sprites/pinkvio_orb.gbapal.lz");
|
||||||
|
|
||||||
const u32 gBattleAnimSpriteGfx_PawPrint[] = INCBIN_U32("graphics/battle_anims/sprites/paw_print.4bpp.lz");
|
const u32 gBattleAnimSpriteGfx_PawPrint[] = INCBIN_U32("graphics/battle_anims/sprites/paw_print.4bpp.lz");
|
||||||
const u32 gBattleAnimSpritePal_PawPrint[] = INCBIN_U32("graphics/battle_anims/sprites/paw_print.gbapal.lz");
|
const u32 gBattleAnimSpritePal_PawPrint[] = INCBIN_U32("graphics/battle_anims/sprites/paw_print.gbapal.lz");
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue