Improve Electro Ball animation

This commit is contained in:
DizzyEggg 2020-06-26 13:58:34 +02:00
parent 548a43f8d9
commit 219a43304a
2 changed files with 39 additions and 11 deletions

View File

@ -4834,31 +4834,29 @@ Move_SYCHRONOISE:
Move_ELECTRO_BALL:
loadspritegfx ANIM_TAG_SPARK_2 @yelow
loadspritegfx ANIM_TAG_CIRCLE_OF_LIGHT @charge
monbg 0x0
loadspritegfx ANIM_TAG_FLASH_CANNON_BALL @ball
monbg ANIM_TARGET
setalpha 12, 8
playsewithpan SE_W268, SOUND_PAN_ATTACKER
launchtemplate gGrowingChargeOrbSpriteTemplate 0x2 0x1 0x0
createsprite gGrowingChargeOrb2SpriteTemplate, ANIM_ATTACKER, 2, 0
delay 0x19
playsewithpan SE_W268, SOUND_PAN_ATTACKER
delay 0x14
playsewithpan SE_W268, SOUND_PAN_ATTACKER
delay 0xF
playsewithpan SE_W268, SOUND_PAN_ATTACKER
delay 0xA
delay 0x6
loopsewithpan SE_W268, 0xC, 0x6, 0x5
waitforvisualfinish
loadspritegfx ANIM_TAG_FLASH_CANNON_BALL @ball
launchtemplate gElectroBallCannonBallTemplate, ANIM_TARGET, 2, 0x10, 0x10, 0x8
createsprite gElectroBallCannonBallTemplate, ANIM_TARGET, 2, 16, 16, 8
waitforvisualfinish
playsewithpan SE_W028, SOUND_PAN_TARGET
createvisualtask AnimTask_ShakeMon2, 0x2, 0x1, 0x4, 0x0, 0x8, 0x1
createvisualtask AnimTask_ShakeMon2, 0x2, ANIM_TARGET, 0x4, 0x0, 0x8, 0x1
call ElectricityEffect
waitforvisualfinish
clearmonbg 0x0
clearmonbg ANIM_TARGET
blendoff
end
Move_SOAK:
loadspritegfx ANIM_TAG_SMALL_BUBBLES

View File

@ -342,6 +342,19 @@ static const union AffineAnimCmd sAffineAnim_GrowingElectricOrb_2[] =
AFFINEANIMCMD_END,
};
static const union AffineAnimCmd sAffineAnim_GrowingElectricOrb_4[] =
{
AFFINEANIMCMD_FRAME(5, 5, 0, 0),
AFFINEANIMCMD_FRAME(0x2, 0x2, 0, 20),
AFFINEANIMCMD_FRAME(0x3, 0x3, 0, 15),
AFFINEANIMCMD_FRAME(0x1, 0x1, 0, 25),
AFFINEANIMCMD_FRAME(0xFFFC, 0xFFFC, 0, 5),
AFFINEANIMCMD_FRAME(0x3, 0x3, 0, 5),
AFFINEANIMCMD_FRAME(0xFFFB, 0xFFFB, 0, 5),
AFFINEANIMCMD_FRAME(0x4, 0x4, 0, 5),
AFFINEANIMCMD_END
};
const union AffineAnimCmd *const gAffineAnims_GrowingElectricOrb[] =
{
sAffineAnim_GrowingElectricOrb_0,
@ -349,6 +362,11 @@ const union AffineAnimCmd *const gAffineAnims_GrowingElectricOrb[] =
sAffineAnim_GrowingElectricOrb_2,
};
const union AffineAnimCmd *const gAffineAnims_GrowingElectricOrb2[] =
{
sAffineAnim_GrowingElectricOrb_4,
};
const struct SpriteTemplate gGrowingChargeOrbSpriteTemplate =
{
.tileTag = ANIM_TAG_CIRCLE_OF_LIGHT,
@ -360,6 +378,18 @@ const struct SpriteTemplate gGrowingChargeOrbSpriteTemplate =
.callback = AnimGrowingChargeOrb,
};
// For Electro Ball - smaller orb.
const struct SpriteTemplate gGrowingChargeOrb2SpriteTemplate =
{
.tileTag = ANIM_TAG_CIRCLE_OF_LIGHT,
.paletteTag = ANIM_TAG_CIRCLE_OF_LIGHT,
.oam = &gOamData_AffineNormal_ObjBlend_64x64,
.anims = gDummySpriteAnimTable,
.images = NULL,
.affineAnims = gAffineAnims_GrowingElectricOrb2,
.callback = AnimGrowingChargeOrb,
};
static const union AnimCmd sAnim_ElectricPuff[] =
{
ANIMCMD_FRAME(0, 3),
@ -848,8 +878,8 @@ void AnimThunderWave(struct Sprite *sprite)
spriteId = CreateSprite(&gThunderWaveSpriteTemplate, sprite->pos1.x + 32, sprite->pos1.y, sprite->subpriority);
else
spriteId = CreateSprite(&gAnchorShotChainTemplate, sprite->pos1.x + 32, sprite->pos1.y, sprite->subpriority);
gSprites[spriteId].oam.tileNum += 8;
gAnimVisualTaskCount++;
gSprites[spriteId].callback = AnimThunderWave_Step;
@ -909,7 +939,7 @@ static void AnimTask_ElectricChargingParticles_Step(u8 taskId)
spriteId = CreateSprite(&gLightOfRuinGrayChargeTemplate, task->data[14], task->data[15], 2);
else
spriteId = CreateSprite(&gElectricChargingParticlesSpriteTemplate, task->data[14], task->data[15], 2);
if (spriteId != MAX_SPRITES)
{
struct Sprite *sprite = &gSprites[spriteId];