added tera animations

This commit is contained in:
cawtds
2024-06-18 19:24:32 +02:00
parent 57686b5aed
commit d02b8bd3e1
9 changed files with 166 additions and 6 deletions

View File

@@ -82,8 +82,8 @@ gBattleAnims_General::
.4byte General_MonHit @ TODO: B_ANIM_MAGIC_ROOM
.4byte General_MonHit @ TODO: B_ANIM_TAILWIND
.4byte General_MonHit @ TODO: B_ANIM_FOG_CONTINUES
.4byte General_MonHit @ TODO: B_ANIM_TERA_CHARGE
.4byte General_MonHit @ TODO: B_ANIM_TERA_ACTIVATE
.4byte General_TeraCharge @ TODO: B_ANIM_TERA_CHARGE
.4byte General_TeraActivate @ TODO: B_ANIM_TERA_ACTIVATE
.4byte General_MonScared @ B_ANIM_MON_SCARED
.4byte General_GhostGetOut @ B_ANIM_GHOST_GET_OUT
.4byte General_SilphScoped @ B_ANIM_SILPH_SCOPED
@@ -11363,6 +11363,17 @@ General_RestoreBg:
waitbgfadein
end
RainbowEndureEffect:
createsprite gBlueEndureEnergySpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0xffe8, 0x1a, 0x2
delay 0x3
createsprite gEndureEnergySpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0xe, 0x1c, 0x1 @Red Buff
delay 0x3
createsprite gGreenEndureEnergySpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0xfffb, 0xa, 0x2
delay 0x3
createsprite gYellowEndureEnergySpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0x1c, 0x1a, 0x3
delay 0x3
return
General_SlideOffScreen:
createvisualtask AnimTask_SlideOffScreen, 5, ANIM_TARGET, 3
waitforvisualfinish
@@ -11415,6 +11426,53 @@ MegaEvolutionParticles:
delay 3
return
General_TeraCharge:
loadspritegfx ANIM_TAG_TERA_CRYSTAL
loadspritegfx ANIM_TAG_TERA_SHATTER
loadspritegfx ANIM_TAG_FOCUS_ENERGY
loadspritegfx ANIM_TAG_WHIP_HIT @green color
loadspritegfx ANIM_TAG_SWEAT_BEAD @blue color
loadspritegfx ANIM_TAG_PAW_PRINT @yellow color
monbg ANIM_ATTACKER
setalpha 12, 8
playsewithpan SE_M_DRAGON_RAGE, SOUND_PAN_ATTACKER
createvisualtask AnimTask_BlendColorCycle, 2, F_PAL_ATTACKER, 0, 6, 0, 11, RGB_RED
call RainbowEndureEffect
call RainbowEndureEffect
call RainbowEndureEffect
call RainbowEndureEffect
call RainbowEndureEffect
waitforvisualfinish
playsewithpan SE_M_SOLAR_BEAM, SOUND_PAN_ATTACKER
createsprite gTeraCrystalSpriteTemplate, ANIM_ATTACKER, 41, 0, 0, 0, 0
delay 20
createvisualtask AnimTask_BlendBattleAnimPalExclude, 5, 5, 2, 0, 16, RGB_WHITEALPHA
waitforvisualfinish
createvisualtask AnimTask_TransformMon, 2, 1, 0
call TeraChargeParticles
playsewithpan SE_M_BRICK_BREAK, SOUND_PAN_ATTACKER
clearmonbg ANIM_ATK_PARTNER
blendoff
end
TeraChargeParticles:
createsprite gTeraCrystalSpreadSpriteTemplate, ANIM_TARGET, 0, 0, -5, 8
createsprite gTeraCrystalSpreadSpriteTemplate, ANIM_TARGET, 0, 1, 5, 9
createsprite gTeraCrystalSpreadSpriteTemplate, ANIM_TARGET, 0, 2, 5, -8
createsprite gTeraCrystalSpreadSpriteTemplate, ANIM_TARGET, 0, 2, -5, -8
createsprite gTeraCrystalSpreadSpriteTemplate, ANIM_TARGET, 0, 1, -10, 0
createsprite gTeraCrystalSpreadSpriteTemplate, ANIM_TARGET, 0, 0, 10, 0
return
General_TeraActivate:
createvisualtask AnimTask_BlendBattleAnimPalExclude, 5, 5, 2, 16, 0, RGB_WHITEALPHA
createvisualtask AnimTask_HorizontalShake, 5, ANIM_TARGET, 5, 14
waitforvisualfinish
createvisualtask SoundTask_PlayNormalCry, 0
clearmonbg ANIM_ATK_PARTNER
blendoff
end
General_UltraBurst::
loadspritegfx ANIM_TAG_ULTRA_BURST_SYMBOL
loadspritegfx ANIM_TAG_SPARK_2 @spark

Binary file not shown.

After

Width:  |  Height:  |  Size: 1011 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 439 B

View File

@@ -302,6 +302,8 @@
#define ANIM_TAG_MEGA_PARTICLES (ANIM_SPRITES_START + 291)
#define ANIM_TAG_ULTRA_BURST_SYMBOL (ANIM_SPRITES_START + 292)
#define ANIM_TAG_STRAIGHT_BEAM (ANIM_SPRITES_START + 293)
#define ANIM_TAG_TERA_CRYSTAL (ANIM_SPRITES_START + 294)
#define ANIM_TAG_TERA_SHATTER (ANIM_SPRITES_START + 295)
// battlers
#define ANIM_ATTACKER 0

View File

@@ -5511,5 +5511,9 @@ extern const u32 gBattleAnimSpriteGfx_MegaParticles[];
extern const u32 gBattleAnimSpritePal_MegaParticles[];
extern const u32 gBattleAnimSpriteGfx_MegaSymbol[];
extern const u32 gBattleAnimSpritePal_MegaSymbol[];
extern const u32 gBattleAnimSpriteGfx_TeraCrystal[];
extern const u32 gBattleAnimSpritePal_TeraCrystal[];
extern const u32 gBattleAnimSpriteGfx_TeraShatter[];
extern const u32 gBattleAnimSpritePal_TeraShatter[];
#endif //GUARD_GRAPHICS_H

View File

@@ -1652,7 +1652,7 @@ const struct SpriteTemplate gFalseSwipePositionedSliceSpriteTemplate =
.callback = AnimFalseSwipePositionedSlice,
};
static const union AnimCmd sEndureEnergyAnimCmds[] =
static const union AnimCmd gEndureEnergyAnimCmds[] =
{
ANIMCMD_FRAME(0, 4),
ANIMCMD_FRAME(8, 12),
@@ -1661,9 +1661,9 @@ static const union AnimCmd sEndureEnergyAnimCmds[] =
ANIMCMD_END,
};
static const union AnimCmd *const sEndureEnergyAnimTable[] =
static const union AnimCmd *const gEndureEnergyAnimTable[] =
{
sEndureEnergyAnimCmds,
gEndureEnergyAnimCmds,
};
const struct SpriteTemplate gEndureEnergySpriteTemplate =
@@ -1671,7 +1671,40 @@ const struct SpriteTemplate gEndureEnergySpriteTemplate =
.tileTag = ANIM_TAG_FOCUS_ENERGY,
.paletteTag = ANIM_TAG_FOCUS_ENERGY,
.oam = &gOamData_AffineOff_ObjNormal_16x32,
.anims = sEndureEnergyAnimTable,
.anims = gEndureEnergyAnimTable,
.images = NULL,
.affineAnims = gDummySpriteAffineAnimTable,
.callback = AnimEndureEnergy,
};
const struct SpriteTemplate gBlueEndureEnergySpriteTemplate =
{
.tileTag = ANIM_TAG_FOCUS_ENERGY,
.paletteTag = ANIM_TAG_SWEAT_BEAD,
.oam = &gOamData_AffineOff_ObjNormal_16x32,
.anims = gEndureEnergyAnimTable,
.images = NULL,
.affineAnims = gDummySpriteAffineAnimTable,
.callback = AnimEndureEnergy,
};
const struct SpriteTemplate gGreenEndureEnergySpriteTemplate =
{
.tileTag = ANIM_TAG_FOCUS_ENERGY,
.paletteTag = ANIM_TAG_WHIP_HIT,
.oam = &gOamData_AffineOff_ObjNormal_16x32,
.anims = gEndureEnergyAnimTable,
.images = NULL,
.affineAnims = gDummySpriteAffineAnimTable,
.callback = AnimEndureEnergy,
};
const struct SpriteTemplate gYellowEndureEnergySpriteTemplate =
{
.tileTag = ANIM_TAG_FOCUS_ENERGY,
.paletteTag = ANIM_TAG_PAW_PRINT,
.oam = &gOamData_AffineOff_ObjNormal_16x32,
.anims = gEndureEnergyAnimTable,
.images = NULL,
.affineAnims = gDummySpriteAffineAnimTable,
.callback = AnimEndureEnergy,

View File

@@ -109,6 +109,8 @@ static void AnimAssistPawprint(struct Sprite *);
static void AnimMeteorMashStar(struct Sprite *);
static void AnimUnusedItemBagSteal(struct Sprite *);
static void AnimKnockOffStrike(struct Sprite *);
static void AnimTask_TeraCrystalShatter(struct Sprite *);
static void AnimTask_TeraCrystalShatter_Step(struct Sprite *);
static const union AnimCmd sScratchAnimCmds[] =
{
@@ -1202,6 +1204,57 @@ const struct SpriteTemplate gMegaSymbolSpriteTemplate =
.callback = AnimGhostStatusSprite,
};
const struct SpriteTemplate gTeraCrystalSpriteTemplate =
{
.tileTag = ANIM_TAG_TERA_CRYSTAL,
.paletteTag = ANIM_TAG_TERA_CRYSTAL,
.oam = &gOamData_AffineDouble_ObjBlend_64x64,
.anims = gDummySpriteAnimTable,
.images = NULL,
.affineAnims = gAffineAnims_LusterPurgeCircle,
.callback = AnimSpriteOnMonPos,
};
const struct SpriteTemplate gTeraCrystalSpreadSpriteTemplate =
{
.tileTag = ANIM_TAG_TERA_SHATTER,
.paletteTag = ANIM_TAG_TERA_SHATTER,
.oam = &gOamData_AffineOff_ObjNormal_16x16,
.anims = gDummySpriteAnimTable,
.images = NULL,
.affineAnims = gDummySpriteAffineAnimTable,
.callback = AnimTask_TeraCrystalShatter,
};
// Task data for AnimTask_TeraCrystalShatter
#define tCounter data[0]
#define tDX data[6]
#define tDY data[7]
static void AnimTask_TeraCrystalShatter(struct Sprite *sprite)
{
sprite->x = GetBattlerSpriteCoord(gBattleAnimTarget, BATTLER_COORD_X);
sprite->y = GetBattlerSpriteCoord(gBattleAnimTarget, BATTLER_COORD_Y);
sprite->oam.tileNum += gBattleAnimArgs[0] * 4;
sprite->tCounter = 0;
sprite->tDX = gBattleAnimArgs[1];
sprite->tDY = gBattleAnimArgs[2];
sprite->callback = AnimTask_TeraCrystalShatter_Step;
}
static void AnimTask_TeraCrystalShatter_Step(struct Sprite *sprite)
{
sprite->x += sprite->tDX;
sprite->y += sprite->tDY;
if (++sprite->tCounter > 15)
DestroyAnimSprite(sprite);
}
#undef tCounter
static void AnimBlackSmoke(struct Sprite *sprite)
{
sprite->x += gBattleAnimArgs[0];

View File

@@ -1303,6 +1303,8 @@ const struct CompressedSpriteSheet gBattleAnimPicTable[] =
{gBattleAnimSpriteGfx_MegaParticles, 0x0180, ANIM_TAG_MEGA_PARTICLES},
{gBattleAnimSpriteGfx_NecrozmaStar, 0x200, ANIM_TAG_ULTRA_BURST_SYMBOL},
{gBattleAnimSpriteGfx_StraightBeam, 0x180, ANIM_TAG_STRAIGHT_BEAM},
{gBattleAnimSpriteGfx_TeraCrystal, 0x800, ANIM_TAG_TERA_CRYSTAL},
{gBattleAnimSpriteGfx_TeraShatter, 0x0180, ANIM_TAG_TERA_SHATTER},
};
const struct CompressedSpritePalette gBattleAnimPaletteTable[] =
@@ -1601,6 +1603,8 @@ const struct CompressedSpritePalette gBattleAnimPaletteTable[] =
{gBattleAnimSpritePal_MegaParticles, ANIM_TAG_MEGA_PARTICLES},
{gBattleAnimSpritePal_NecrozmaStar, ANIM_TAG_ULTRA_BURST_SYMBOL},
{gBattleAnimSpritePal_StraightBeam, ANIM_TAG_STRAIGHT_BEAM},
{gBattleAnimSpritePal_TeraCrystal, ANIM_TAG_TERA_CRYSTAL},
{gBattleAnimSpritePal_TeraShatter, ANIM_TAG_TERA_SHATTER},
};
const struct BattleAnimBackground gBattleAnimBackgroundTable[] =

View File

@@ -33,6 +33,12 @@ const u32 gBattleAnimSpritePal_MegaSymbol[] = INCBIN_U32("graphics/battle_anims/
const u32 gBattleAnimSpriteGfx_NecrozmaStar[] = INCBIN_U32("graphics/battle_anims/sprites/necrozma_star.4bpp.lz");
const u32 gBattleAnimSpritePal_NecrozmaStar[] = INCBIN_U32("graphics/battle_anims/sprites/necrozma_star.gbapal.lz");
const u32 gBattleAnimSpriteGfx_TeraCrystal[] = INCBIN_U32("graphics/battle_anims/sprites/tera_crystal.4bpp.lz");
const u32 gBattleAnimSpritePal_TeraCrystal[] = INCBIN_U32("graphics/battle_anims/sprites/tera_crystal.gbapal.lz");
const u32 gBattleAnimSpriteGfx_TeraShatter[] = INCBIN_U32("graphics/battle_anims/sprites/tera_shatter.4bpp.lz");
const u32 gBattleAnimSpritePal_TeraShatter[] = INCBIN_U32("graphics/battle_anims/sprites/tera_shatter.gbapal.lz");
const u32 gBattleAnimSpriteGfx_Bubble[] = INCBIN_U32("graphics/battle_anims/sprites/bubble.4bpp.lz");
const u32 gBattleAnimSpriteGfx_Bone[] = INCBIN_U32("graphics/battle_anims/sprites/bone.4bpp.lz");