Tera starstorm (#6073)

Co-authored-by: Hedara <hedara90@gmail.com>
This commit is contained in:
hedara90 2025-01-26 11:08:46 +01:00 committed by GitHub
parent 6a3d95b422
commit e1e3bcfa91
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
8 changed files with 308 additions and 1 deletions

View File

@ -18066,6 +18066,155 @@ PopulationBombContinue:
gBattleAnimMove_RevivalBlessing::
goto gBattleAnimMove_LunarBlessing
gBattleAnimMove_TeraStarstorm::
loadspritegfx ANIM_TAG_STARSTORM
loadspritegfx ANIM_TAG_YELLOW_STAR
loadspritegfx ANIM_TAG_IMPACT
fadetobg BG_COSMIC
waitbgfadein
playsewithpan SE_FALL, SOUND_PAN_ATTACKER
call TeraStarstormCreateBeam
delay 2
call TeraStarstormCreateBeam
delay 2
call TeraStarstormCreateBeam
delay 2
call TeraStarstormCreateBeam
delay 2
call TeraStarstormCreateBeam
delay 2
call TeraStarstormCreateBeam
delay 2
call TeraStarstormCreateBeam
delay 2
call TeraStarstormCreateBeam
delay 2
call TeraStarstormCreateBeam
delay 2
jumpifmovetypeequal TYPE_STELLAR, TeraStarstormStellar
goto TeraStarstormSingle
TeraStarstormStellar:
jumpifdoublebattle TeraStarstormDouble
TeraStarstormSingle:
createsprite gTeraStarSpriteTemplate, ANIM_BATTLER, 3, 0, 0, 10, 0, 30, 0, 1
delay 3
createsprite gTeraStarSpriteTemplate, ANIM_BATTLER, 3, 0, 0, 0, 0, 30, 0, 1
delay 2
createsprite gTeraStarSpriteTemplate, ANIM_BATTLER, 3, 0, 0, -10, 0, 30, 0, 1
delay 3
createsprite gTeraStarSpriteTemplate, ANIM_BATTLER, 3, 0, 0, 5, -5, 30, 0, 1
delay 2
createsprite gTeraStarSpriteTemplate, ANIM_BATTLER, 3, 0, 0, 5, 5, 30, 0, 1
delay 3
playsewithpan SE_M_ICY_WIND, SOUND_PAN_TARGET
createvisualtask AnimTask_ShakeMon, 2, ANIM_TARGET, 5, 5, 1, 1
createsprite gTeraStarSpriteTemplate, ANIM_BATTLER, 3, 0, 0, -5, 5, 30, 0, 1
delay 2
createsprite gTeraStarSpriteTemplate, ANIM_BATTLER, 3, 0, 0, 10, -5, 30, 0, 1
delay 3
playsewithpan SE_M_ICY_WIND, SOUND_PAN_TARGET
createvisualtask AnimTask_ShakeMon, 2, ANIM_TARGET, 5, 5, 1, 1
createsprite gTeraStarSpriteTemplate, ANIM_BATTLER, 3, 0, 0, 0, 0, 30, 0, 1
delay 2
createsprite gTeraStarSpriteTemplate, ANIM_BATTLER, 3, 0, 0, -10, 5, 30, 0, 1
delay 3
playsewithpan SE_M_ICY_WIND, SOUND_PAN_TARGET
createvisualtask AnimTask_ShakeMon, 2, ANIM_TARGET, 5, 5, 1, 1
createsprite gTeraStarSpriteTemplate, ANIM_BATTLER, 3, 0, 0, 5, -5, 30, 0, 1
delay 2
createsprite gTeraStarSpriteTemplate, ANIM_BATTLER, 3, 0, 0, 5, 5, 30, 0, 1
delay 3
createsprite gTeraStarSpriteTemplate, ANIM_BATTLER, 3, 0, 0, -5, 5, 30, 0, 1
playsewithpan SE_M_ICY_WIND, SOUND_PAN_TARGET
createvisualtask AnimTask_ShakeMon, 2, ANIM_TARGET, 5, 5, 1, 1
delay 5
playsewithpan SE_M_ICY_WIND, SOUND_PAN_TARGET
createvisualtask AnimTask_ShakeMon, 2, ANIM_TARGET, 5, 5, 1, 1
delay 5
playsewithpan SE_M_ICY_WIND, SOUND_PAN_TARGET
createvisualtask AnimTask_ShakeMon, 2, ANIM_TARGET, 5, 5, 1, 1
waitforvisualfinish
restorebg
waitbgfadeout
end
TeraStarstormDouble:
createsprite gTeraStarSpriteTemplate, ANIM_BATTLER, 3, 0, 0, 10, 0, 30, 0, 1
createsprite gTeraStarSpriteTemplate, ANIM_BATTLER, 3, 0, 0, 10, 0, 30, 1, 1
delay 2
createsprite gTeraStarSpriteTemplate, ANIM_BATTLER, 3, 0, 0, 0, 0, 30, 0, 1
createsprite gTeraStarSpriteTemplate, ANIM_BATTLER, 3, 0, 0, 0, 0, 30, 1, 1
delay 3
createsprite gTeraStarSpriteTemplate, ANIM_BATTLER, 3, 0, 0, -10, 0, 30, 0, 1
createsprite gTeraStarSpriteTemplate, ANIM_BATTLER, 3, 0, 0, -10, 0, 30, 1, 1
delay 2
createsprite gTeraStarSpriteTemplate, ANIM_BATTLER, 3, 0, 0, 5, -5, 30, 0, 1
createsprite gTeraStarSpriteTemplate, ANIM_BATTLER, 3, 0, 0, 5, -5, 30, 1, 1
delay 3
createsprite gTeraStarSpriteTemplate, ANIM_BATTLER, 3, 0, 0, 5, 5, 30, 0, 1
createsprite gTeraStarSpriteTemplate, ANIM_BATTLER, 3, 0, 0, 5, 5, 30, 1, 1
delay 2
createsprite gTeraStarSpriteTemplate, ANIM_BATTLER, 3, 0, 0, -5, 5, 30, 0, 1
createsprite gTeraStarSpriteTemplate, ANIM_BATTLER, 3, 0, 0, -5, 5, 30, 1, 1
delay 3
createsprite gTeraStarSpriteTemplate, ANIM_BATTLER, 3, 0, 0, -5, 10, 30, 0, 1
createsprite gTeraStarSpriteTemplate, ANIM_BATTLER, 3, 0, 0, -5, 10, 30, 1, 1
playsewithpan SE_M_ICY_WIND, SOUND_PAN_TARGET
createvisualtask AnimTask_ShakeMon, 2, ANIM_TARGET, 5, 5, 1, 1
createvisualtask AnimTask_ShakeMon, 2, ANIM_DEF_PARTNER, 5, 5, 1, 1
delay 2
createsprite gTeraStarSpriteTemplate, ANIM_BATTLER, 3, 0, 0, 10, 0, 30, 0, 1
createsprite gTeraStarSpriteTemplate, ANIM_BATTLER, 3, 0, 0, 10, 0, 30, 1, 1
delay 3
createsprite gTeraStarSpriteTemplate, ANIM_BATTLER, 3, 0, 0, 0, 0, 30, 0, 1
createsprite gTeraStarSpriteTemplate, ANIM_BATTLER, 3, 0, 0, 0, 0, 30, 1, 1
playsewithpan SE_M_ICY_WIND, SOUND_PAN_TARGET
createvisualtask AnimTask_ShakeMon, 2, ANIM_TARGET, 5, 5, 1, 1
createvisualtask AnimTask_ShakeMon, 2, ANIM_DEF_PARTNER, 5, 5, 1, 1
delay 2
createsprite gTeraStarSpriteTemplate, ANIM_BATTLER, 3, 0, 0, -10, 0, 30, 0, 1
createsprite gTeraStarSpriteTemplate, ANIM_BATTLER, 3, 0, 0, -10, 0, 30, 1, 1
delay 3
createsprite gTeraStarSpriteTemplate, ANIM_BATTLER, 3, 0, 0, 5, -5, 30, 0, 1
createsprite gTeraStarSpriteTemplate, ANIM_BATTLER, 3, 0, 0, 5, -5, 30, 1, 1
playsewithpan SE_M_ICY_WIND, SOUND_PAN_TARGET
createvisualtask AnimTask_ShakeMon, 2, ANIM_TARGET, 5, 5, 1, 1
createvisualtask AnimTask_ShakeMon, 2, ANIM_DEF_PARTNER, 5, 5, 1, 1
delay 2
createsprite gTeraStarSpriteTemplate, ANIM_BATTLER, 3, 0, 0, 5, 5, 30, 0, 1
createsprite gTeraStarSpriteTemplate, ANIM_BATTLER, 3, 0, 0, 5, 5, 30, 1, 1
delay 3
createsprite gTeraStarSpriteTemplate, ANIM_BATTLER, 3, 0, 0, -5, 5, 30, 0, 1
createsprite gTeraStarSpriteTemplate, ANIM_BATTLER, 3, 0, 0, -5, 5, 30, 1, 1
playsewithpan SE_M_ICY_WIND, SOUND_PAN_TARGET
createvisualtask AnimTask_ShakeMon, 2, ANIM_TARGET, 5, 5, 1, 1
createvisualtask AnimTask_ShakeMon, 2, ANIM_DEF_PARTNER, 5, 5, 1, 1
delay 5
playsewithpan SE_M_ICY_WIND, SOUND_PAN_TARGET
createvisualtask AnimTask_ShakeMon, 2, ANIM_TARGET, 5, 5, 1, 1
createvisualtask AnimTask_ShakeMon, 2, ANIM_DEF_PARTNER, 5, 5, 1, 1
delay 5
playsewithpan SE_M_ICY_WIND, SOUND_PAN_TARGET
createvisualtask AnimTask_ShakeMon, 2, ANIM_TARGET, 5, 5, 1, 1
createvisualtask AnimTask_ShakeMon, 2, ANIM_DEF_PARTNER, 5, 5, 1, 1
delay 5
playsewithpan SE_M_ICY_WIND, SOUND_PAN_TARGET
createvisualtask AnimTask_ShakeMon, 2, ANIM_TARGET, 5, 5, 1, 1
createvisualtask AnimTask_ShakeMon, 2, ANIM_DEF_PARTNER, 5, 5, 1, 1
waitforvisualfinish
restorebg
waitbgfadeout
end
TeraStarstormCreateBeam::
createsprite gTeraStarstormBeamSpriteTemplate, ANIM_BATTLER, 1, -3, 1, 0, 0, 20
createsprite gTeraStarstormBeamSpriteTemplate, ANIM_BATTLER, 1, 1, 0, 0, 0, 20
createsprite gTeraStarstormBeamSpriteTemplate, ANIM_BATTLER, 1, 3, -1, 0, 0, 20
createsprite gTeraStarstormBeamSpriteTemplate, ANIM_BATTLER, 1, -2, 0, 0, 0, 20
createsprite gTeraStarstormBeamSpriteTemplate, ANIM_BATTLER, 1, 0, 1, 0, 0, 20
createsprite gTeraStarstormBeamSpriteTemplate, ANIM_BATTLER, 1, -1, -1, 0, 0, 20
createsprite gTeraStarstormBeamSpriteTemplate, ANIM_BATTLER, 1, 2, 0, 0, 0, 20
return
gBattleAnimMove_TeraBlast::
gBattleAnimMove_OrderUp::
gBattleAnimMove_GlaiveRush::
@ -18083,7 +18232,6 @@ gBattleAnimMove_CombatTorque::
gBattleAnimMove_MagicalTorque::
gBattleAnimMove_Psyblade::
gBattleAnimMove_MatchaGotcha::
gBattleAnimMove_TeraStarstorm::
gBattleAnimMove_MightyCleave::
gBattleAnimMove_TachyonCutter::
gBattleAnimMove_SupercellSlam::

Binary file not shown.

After

Width:  |  Height:  |  Size: 300 B

View File

@ -267,6 +267,7 @@ void AnimConversion(struct Sprite *sprite);
void AnimCuttingSlice(struct Sprite *sprite);
void AnimThoughtBubble(struct Sprite *sprite);
void AnimTranslateLinearSingleSineWave(struct Sprite *sprite);
void AnimTeraStarstormStars(struct Sprite *sprite);
void AnimGrantingStars(struct Sprite *sprite);
void AnimFollowMeFinger(struct Sprite *sprite);
extern const union AnimCmd *const gRazorLeafParticleAnimTable[];

View File

@ -417,6 +417,7 @@
#define ANIM_TAG_RED_EXPLOSION (ANIM_SPRITES_START + 403)
#define ANIM_TAG_PURPLE_CHAIN (ANIM_SPRITES_START + 404)
#define ANIM_TAG_PINKVIO_ORB (ANIM_SPRITES_START + 405)
#define ANIM_TAG_STARSTORM (ANIM_SPRITES_START + 406)
// battlers
#define ANIM_ATTACKER 0

View File

@ -2893,6 +2893,8 @@ extern const u32 gBattleAnimSpritePal_IvyCudgelRock[];
extern const u32 gBattleAnimSpritePal_IvyCudgelWater[];
extern const u32 gBattleAnimSpriteGfx_PinkVioletOrb[];
extern const u32 gBattleAnimSpritePal_PinkVioletOrb[];
extern const u32 gBattleAnimSpriteGfx_TeraStarstormBeam[];
extern const u32 gBattleAnimSpritePal_TeraStarstormBeam[];
extern const u32 gBattleAnimBgImage_Dark[];
extern const u32 gBattleAnimBgImage_Ghost[];

View File

@ -30,6 +30,9 @@ static void AnimPetalDanceSmallFlower_Step(struct Sprite *);
static void AnimRazorLeafParticle(struct Sprite *);
static void AnimRazorLeafParticle_Step1(struct Sprite *);
static void AnimRazorLeafParticle_Step2(struct Sprite *);
static void AnimTeraStarstormBeam(struct Sprite *sprite);
static void AnimTeraStarstormBeam_Step(struct Sprite *);
static void AnimTeraStarstormStars_Step(struct Sprite *);
static void AnimLeechSeed(struct Sprite *);
static void AnimLeechSeed_Step(struct Sprite *);
static void AnimLeechSeedSprouts(struct Sprite *);
@ -3989,6 +3992,153 @@ static void AnimRazorLeafParticle_Step2(struct Sprite *sprite)
DestroyAnimSprite(sprite);
}
static const union AnimCmd sAnim_TeraStarstormBeamRing_0[] =
{
ANIMCMD_FRAME(0, 1),
ANIMCMD_END,
};
static const union AnimCmd sAnim_TeraStarstormBeamRing_1[] =
{
ANIMCMD_FRAME(4, 1),
ANIMCMD_END,
};
static const union AnimCmd *const sAnims_TeraStarstormBeamRing[] =
{
sAnim_TeraStarstormBeamRing_0,
sAnim_TeraStarstormBeamRing_1,
};
static const union AffineAnimCmd sAffineAnim_TeraStarstormBeamRing[] =
{
AFFINEANIMCMD_FRAME(0x0, 0x0, 0, 1),
AFFINEANIMCMD_FRAME(0x60, 0x60, 0, 1),
AFFINEANIMCMD_END,
};
static const union AffineAnimCmd *const sAffineAnims_TeraStarstormBeamRing[] =
{
sAffineAnim_TeraStarstormBeamRing,
};
const struct SpriteTemplate gTeraStarstormBeamSpriteTemplate =
{
.tileTag = ANIM_TAG_STARSTORM,
.paletteTag = ANIM_TAG_STARSTORM,
.oam = &gOamData_AffineOff_ObjNormal_16x32,
.anims = gDummySpriteAnimTable,
.images = NULL,
.affineAnims = gDummySpriteAffineAnimTable,
.callback = AnimTeraStarstormBeam,
};
// arg0: start offset x
// arg1: start offset y
// arg2: end offset x
// arg3: end offset y
// arg4: duration
static void AnimTeraStarstormBeam(struct Sprite *sprite)
{
gBattleAnimArgs[0] += 4;
gBattleAnimArgs[1] -= 30;
InitSpritePosToAnimAttacker(sprite, TRUE);
sprite->data[0] = gBattleAnimArgs[4];
sprite->data[3] = 0;
sprite->data[4] = -70;
InitAnimLinearTranslation(sprite);
sprite->callback = AnimTeraStarstormBeam_Step;
sprite->affineAnimPaused = TRUE;
sprite->callback(sprite);
}
static void AnimTeraStarstormBeam_Step(struct Sprite *sprite)
{
if (AnimTranslateLinear(sprite))
DestroyAnimSprite(sprite);
}
const union AffineAnimCmd gTeraStarAffineAnimCmds[] = {
AFFINEANIMCMD_FRAME(0, 0, 0, 1),
AFFINEANIMCMD_JUMP(0),
};
const union AffineAnimCmd *const gTeraStarAffineAnimTable[] = {
gTeraStarAffineAnimCmds,
};
// arg0: start offset x
// arg1: start offset y
// arg2: end offset x
// arg3: end offset y
// arg4: duration
// arg5: target partner
// arg6: ?????
const struct SpriteTemplate gTeraStarSpriteTemplate =
{
.tileTag = ANIM_TAG_YELLOW_STAR,
.paletteTag = ANIM_TAG_YELLOW_STAR,
.oam = &gOamData_AffineNormal_ObjNormal_32x32,
.anims = gDummySpriteAnimTable,
.images = NULL,
.affineAnims = gTeraStarAffineAnimTable,
.callback = AnimTeraStarstormStars,
};
void AnimTeraStarstormStars(struct Sprite *sprite)
{
gBattleAnimArgs[0] += 4;
gBattleAnimArgs[1] -= 100;
InitSpritePosToAnimAttacker(sprite, TRUE);
sprite->data[0] = gBattleAnimArgs[4];
sprite->data[1] = sprite->x;
sprite->data[3] = sprite->y;
if (gBattleAnimArgs[5] == 1)
{
u32 targetPartner;
if (GetBattlerSide(gBattleAnimTarget) == B_SIDE_PLAYER)
{
if (gBattleAnimTarget == 0)
targetPartner = 2;
else
targetPartner = 0;
}
else
{
if (gBattleAnimTarget == 1)
targetPartner = 3;
else
targetPartner = 1;
}
sprite->data[2] = GetBattlerSpriteCoord(targetPartner, BATTLER_COORD_X_2) + gBattleAnimArgs[2] ;
sprite->data[4] = GetBattlerSpriteCoord(targetPartner, BATTLER_COORD_Y_PIC_OFFSET) + gBattleAnimArgs[3];
}
else
{
sprite->data[2] = GetBattlerSpriteCoord(gBattleAnimTarget, BATTLER_COORD_X_2) + gBattleAnimArgs[2] ;
sprite->data[4] = GetBattlerSpriteCoord(gBattleAnimTarget, BATTLER_COORD_Y_PIC_OFFSET) + gBattleAnimArgs[3];
}
InitAnimLinearTranslation(sprite);
sprite->callback = AnimTeraStarstormStars_Step;
sprite->affineAnimPaused = TRUE;
sprite->callback(sprite);
}
static void AnimTeraStarstormStars_Step(struct Sprite *sprite)
{
if (AnimTranslateLinear(sprite))
DestroyAnimSprite(sprite);
if ((u16)gBattleAnimArgs[7] == 0xFFFF)
{
StartSpriteAnim(sprite, 1);
sprite->affineAnimPaused = FALSE;
}
}
// Animates a sprite that moves linearly from one location to another, with a
// single-cycle sine wave added to the y position along the way.
// Used by Razor Leaf and Magical Leaf.

View File

@ -1466,6 +1466,7 @@ const struct CompressedSpriteSheet gBattleAnimPicTable[] =
{gBattleAnimSpriteGfx_Beam, 0x0800, ANIM_TAG_BEAM},
{gBattleAnimSpriteGfx_PurpleChain, 0x1000, ANIM_TAG_PURPLE_CHAIN},
{gBattleAnimSpriteGfx_PinkVioletOrb, 0x0080, ANIM_TAG_PINKVIO_ORB},
{gBattleAnimSpriteGfx_TeraStarstormBeam, 0x200, ANIM_TAG_STARSTORM},
};
const struct CompressedSpritePalette gBattleAnimPaletteTable[] =
@ -1933,6 +1934,7 @@ const struct CompressedSpritePalette gBattleAnimPaletteTable[] =
{gBattleAnimSpritePal_Beam, ANIM_TAG_BEAM},
{gBattleAnimSpritePal_PurpleChain, ANIM_TAG_PURPLE_CHAIN},
{gBattleAnimSpritePal_PinkVioletOrb, ANIM_TAG_PINKVIO_ORB},
{gBattleAnimSpritePal_TeraStarstormBeam, ANIM_TAG_STARSTORM},
};
const struct BattleAnimBackground gBattleAnimBackgroundTable[] =

View File

@ -1287,6 +1287,9 @@ const u32 gBattleAnimSpritePal_Meteor[] = INCBIN_U32("graphics/battle_anims/spri
const u32 gBattleAnimSpriteGfx_FlatRock[] = INCBIN_U32("graphics/battle_anims/sprites/flat_rock.4bpp.lz");
const u32 gBattleAnimSpritePal_FlatRock[] = INCBIN_U32("graphics/battle_anims/sprites/flat_rock.gbapal.lz");
const u32 gBattleAnimSpriteGfx_TeraStarstormBeam[] = INCBIN_U32("graphics/battle_anims/sprites/starstorm_beam.4bpp.lz");
const u32 gBattleAnimSpritePal_TeraStarstormBeam[] = INCBIN_U32("graphics/battle_anims/sprites/starstorm_beam.gbapal.lz");
const u32 gBattleAnimUnusedPal_Unknown2[] = INCBIN_U32("graphics/battle_anims/unused/unknown_2.gbapal.lz");
#include "data/graphics/trainers.h"