diff --git a/data/battle_anim_scripts.s b/data/battle_anim_scripts.s index 994bc5cc1..ada08afc5 100644 --- a/data/battle_anim_scripts.s +++ b/data/battle_anim_scripts.s @@ -13940,47 +13940,62 @@ Move_ETERNA_BEAM:: goto Move_HYPER_BEAM Move_STEEL_BEAM:: + loadspritegfx ANIM_TAG_CLAW_SLASH + loopsewithpan SE_M_HARDEN, SOUND_PAN_ATTACKER, 28, 2 + createvisualtask AnimTask_MetallicShine, 5, 0, 0, 0 + delay 48 loadspritegfx ANIM_TAG_ELECTRIC_ORBS loadspritegfx ANIM_TAG_GUST - loadspritegfx ANIM_TAG_SPIKES - launchtask AnimTask_BlendBattleAnimPal 0xa 0x5 ANIM_PAL_BG 0x0 0x0 0x10 0x6B59 @To gray launchtask AnimTask_ElectricChargingParticles 0x2 0x4 0x0 0x14 0x0 0x2 - playsewithpan SE_M_CHARGE, SOUND_PAN_ATTACKER - delay 0x14 - loopsewithpan SE_M_HARDEN, SOUND_PAN_ATTACKER, 0x9, 15 - launchtask AnimTask_ShakeMon 0x2 0x5 ANIM_ATTACKER 0x0 0x4 72 0x1 - call SteelBeamShards - call SteelBeamShards - launchtemplate gSlideMonToOffsetSpriteTemplate 0x2 0x5 ANIM_TARGET, -30, 0x0 TRUE 145 - call SteelBeamShards - call SteelBeamShards - call SteelBeamShards - call SteelBeamShards - call SteelBeamShards - call SteelBeamShards - call SteelBeamShards - call SteelBeamShards - call SteelBeamShards - call SteelBeamShards - call SteelBeamShards - call SteelBeamShards - call SteelBeamShards - call SteelBeamShards - call SteelBeamShards - call SteelBeamShards - waitforvisualfinish - launchtemplate gSlideMonToOriginalPosSpriteTemplate 0x2 0x3 ANIM_TARGET 0x0 0x6 - launchtask AnimTask_BlendBattleAnimPal 0xa 0x5 ANIM_PAL_BG 0x1 0xE 0x0 0x6B59 @From gray + loadspritegfx ANIM_TAG_STEEL_BEAM + call SetSteelBeamBackground + panse_1B SE_M_SOLAR_BEAM, SOUND_PAN_ATTACKER, SOUND_PAN_TARGET, +2, 0 + createvisualtask AnimTask_CreateSmallSteelBeamOrbs, 5 + createsprite gSteelBeamBigOrbSpriteTemplate, ANIM_TARGET, 3, 15, 0, 20, 0 + delay 4 + createsprite gSteelBeamBigOrbSpriteTemplate, ANIM_TARGET, 3, 15, 0, 20, 1 + delay 4 + createvisualtask AnimTask_BlendBattleAnimPal, 10, 4, 1, 0, 10, RGB(24, 24, 48) + createsprite gSteelBeamBigOrbSpriteTemplate, ANIM_TARGET, 3, 15, 0, 20, 2 + delay 4 + createvisualtask AnimTask_ShakeMon2, 5, ANIM_TARGET, 2, 0, 65, 1 + createsprite gSteelBeamBigOrbSpriteTemplate, ANIM_TARGET, 3, 15, 0, 20, 3 + delay 4 + createsprite gSteelBeamBigOrbSpriteTemplate, ANIM_TARGET, 3, 15, 0, 20, 4 + delay 4 + createsprite gSteelBeamBigOrbSpriteTemplate, ANIM_TARGET, 3, 15, 0, 20, 5 + delay 4 + createsprite gSteelBeamBigOrbSpriteTemplate, ANIM_TARGET, 3, 15, 0, 20, 6 + delay 4 + call SteelBeam_Continuity + call SteelBeam_Continuity waitforvisualfinish + createvisualtask AnimTask_BlendBattleAnimPal, 10, 4, 1, 10, 0, RGB(24, 24, 48) + call UnsetHighSpeedBg end -SteelBeamShards: - launchtemplate gSteelBeamSpikeShardTemplate 0x80, 0x5 0xf 0xf 0x14 0x0 0x0 - launchtemplate gSteelBeamSpikeShardTemplate 0x80, 0x5 0xf 0xf 0x14 0xa 0x5 - launchtemplate gSteelBeamSpikeShardTemplate 0x80, 0x5 0xf 0xf 0x14 0xfff6 0xfffb - delay 0x2 - launchtemplate gSteelBeamSpikeShardTemplate 0x80, 0x5 0xf 0xf 0x14 0x14 0xa - launchtemplate gSteelBeamSpikeShardTemplate 0x80, 0x5 0xf 0xf 0x14 0xffec 0xfff6 - delay 0x2 +SteelBeam_Continuity: + createsprite gSteelBeamBigOrbSpriteTemplate, ANIM_TARGET, 3, 15, 0, 20, 0 + delay 4 + createsprite gSteelBeamBigOrbSpriteTemplate, ANIM_TARGET, 3, 15, 0, 20, 1 + delay 4 + createsprite gSteelBeamBigOrbSpriteTemplate, ANIM_TARGET, 3, 15, 0, 20, 2 + delay 4 + createsprite gSteelBeamBigOrbSpriteTemplate, ANIM_TARGET, 3, 15, 0, 20, 3 + delay 4 + createsprite gSteelBeamBigOrbSpriteTemplate, ANIM_TARGET, 3, 15, 0, 20, 4 + delay 4 + createsprite gSteelBeamBigOrbSpriteTemplate, ANIM_TARGET, 3, 15, 0, 20, 5 + delay 4 + createsprite gSteelBeamBigOrbSpriteTemplate, ANIM_TARGET, 3, 15, 0, 20, 6 + delay 4 + return +SetSteelBeamBackground: + createvisualtask AnimTask_GetAttackerSide, 2 + jumprettrue SetSteelBeamBgPlayer + fadetobg BG_STEEL_BEAM_OPPONENT + goto SetHighSpeedBgFade +SetSteelBeamBgPlayer: + fadetobg BG_STEEL_BEAM_PLAYER Move_EXPANDING_FORCE:: end @to do: diff --git a/graphics/battle_anims/backgrounds/new/steel_beam_bg.pal b/graphics/battle_anims/backgrounds/new/steel_beam_bg.pal new file mode 100644 index 000000000..428e564c2 --- /dev/null +++ b/graphics/battle_anims/backgrounds/new/steel_beam_bg.pal @@ -0,0 +1,19 @@ +JASC-PAL +0100 +16 +0 0 0 +184 192 224 +168 176 208 +144 152 192 +112 120 168 +96 104 160 +88 96 144 +80 88 136 +72 80 120 +64 72 112 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 diff --git a/graphics/battle_anims/sprites/new/steel_beam.pal b/graphics/battle_anims/sprites/new/steel_beam.pal new file mode 100644 index 000000000..f9448fcdd --- /dev/null +++ b/graphics/battle_anims/sprites/new/steel_beam.pal @@ -0,0 +1,19 @@ +JASC-PAL +0100 +16 +0 0 0 +112 120 208 +128 136 216 +144 152 224 +160 168 232 +176 184 240 +192 200 248 +208 216 248 +248 248 248 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +248 192 216 +248 248 168 +0 0 0 diff --git a/include/constants/battle_anim.h b/include/constants/battle_anim.h index 7fd515bdf..e67e63e5e 100644 --- a/include/constants/battle_anim.h +++ b/include/constants/battle_anim.h @@ -394,6 +394,7 @@ #define ANIM_TAG_ALPHA_SYMBOL (ANIM_SPRITES_START + 382) #define ANIM_TAG_OMEGA_SYMBOL (ANIM_SPRITES_START + 383) #define ANIM_TAG_PRIMAL_PARTICLES (ANIM_SPRITES_START + 384) +#define ANIM_TAG_STEEL_BEAM (ANIM_SPRITES_START + 385) // battlers #define ANIM_ATTACKER 0 @@ -495,6 +496,8 @@ #define BG_HYPER_BEAM 75 #define BG_DYNAMAX_CANNON 76 #define BG_AURA_SPHERE 77 +#define BG_STEEL_BEAM_OPPONENT 78 +#define BG_STEEL_BEAM_PLAYER 79 // table ids for general animations (gBattleAnims_General) #define B_ANIM_CASTFORM_CHANGE 0 diff --git a/include/graphics.h b/include/graphics.h index 5c2150f4a..e99dc0979 100644 --- a/include/graphics.h +++ b/include/graphics.h @@ -5089,7 +5089,8 @@ extern const u32 gBattleAnimBgTilemap_ZMoveActivate[]; extern const u32 gBattleAnimBgImage_ZMoveMountain[]; extern const u32 gBattleAnimBgPalette_ZMoveMountain[]; extern const u32 gBattleAnimBgTilemap_ZMoveMountain[]; - +extern const u32 gBattleAnimSpritePal_SteelBeam[]; +extern const u32 gBattleAnimBgPalette_SteelBeam[]; extern const u32 gMetalShineGfx[]; extern const u32 gMetalShinePalette[]; diff --git a/src/battle_anim.c b/src/battle_anim.c index 551979e70..1a41a8d32 100644 --- a/src/battle_anim.c +++ b/src/battle_anim.c @@ -1567,6 +1567,7 @@ const struct CompressedSpriteSheet gBattleAnimPicTable[] = {gBattleAnimSpriteGfx_AlphaSymbol, 0x0200, ANIM_TAG_ALPHA_SYMBOL}, {gBattleAnimSpriteGfx_OmegaSymbol, 0x0200, ANIM_TAG_OMEGA_SYMBOL}, {gBattleAnimSpriteGfx_PrimalParticles, 0x0180, ANIM_TAG_PRIMAL_PARTICLES}, + {gBattleAnimSpriteGfx_Orbs, 0x0180, ANIM_TAG_STEEL_BEAM}, }; const struct CompressedSpritePalette gBattleAnimPaletteTable[] = @@ -2017,6 +2018,7 @@ const struct CompressedSpritePalette gBattleAnimPaletteTable[] = {gBattleAnimSpritePal_AlphaSymbol, ANIM_TAG_ALPHA_SYMBOL}, {gBattleAnimSpritePal_OmegaSymbol, ANIM_TAG_OMEGA_SYMBOL}, {gBattleAnimSpritePal_PrimalParticles, ANIM_TAG_PRIMAL_PARTICLES}, + {gBattleAnimSpritePal_SteelBeam, ANIM_TAG_STEEL_BEAM}, }; const struct BattleAnimBackground gBattleAnimBackgroundTable[] = @@ -2100,6 +2102,8 @@ const struct BattleAnimBackground gBattleAnimBackgroundTable[] = [BG_HYPER_BEAM] = {gBattleAnimBgImage_HydroCannon, gBattleAnimBgPalette_HyperBeam, gBattleAnimBgTilemap_HydroCannon}, [BG_DYNAMAX_CANNON] = {gBattleAnimBgImage_HydroCannon, gBattleAnimBgPalette_DynamaxCannon, gBattleAnimBgTilemap_HydroCannon}, [BG_AURA_SPHERE] = {gBattleAnimBgImage_FocusBlast, gBattleAnimBgPalette_AuraSphere, gBattleAnimBgTilemap_FocusBlast}, + [BG_STEEL_BEAM_OPPONENT] = {gBattleAnimBgImage_Highspeed, gBattleAnimBgPalette_SteelBeam, gBattleAnimBgTilemap_HighspeedOpponent}, + [BG_STEEL_BEAM_PLAYER] = {gBattleAnimBgImage_Highspeed, gBattleAnimBgPalette_SteelBeam, gBattleAnimBgTilemap_HighspeedPlayer}, }; static void (* const sScriptCmdTable[])(void) = diff --git a/src/battle_anim_effects_1.c b/src/battle_anim_effects_1.c index 24b873ac7..3498346f2 100644 --- a/src/battle_anim_effects_1.c +++ b/src/battle_anim_effects_1.c @@ -6803,3 +6803,42 @@ void AnimTask_CompressTargetHorizontally(u8 taskId) PrepareAffineAnimInTaskData(task, spriteId, sCompressTargetHorizontallyAffineAnimCmds); task->func = AnimTask_CompressTargetStep; } + +const struct SpriteTemplate gSteelBeamBigOrbSpriteTemplate = +{ + .tileTag = ANIM_TAG_STEEL_BEAM, + .paletteTag = ANIM_TAG_STEEL_BEAM, + .oam = &gOamData_AffineOff_ObjNormal_8x8, + .anims = gSolarbeamBigOrbAnimTable, + .images = NULL, + .affineAnims = gDummySpriteAffineAnimTable, + .callback = AnimSolarbeamBigOrb, +}; + +const struct SpriteTemplate gSteelBeamSmallOrbSpriteTemplate = +{ + .tileTag = ANIM_TAG_STEEL_BEAM, + .paletteTag = ANIM_TAG_STEEL_BEAM, + .oam = &gOamData_AffineOff_ObjNormal_8x8, + .anims = gSolarbeamSmallOrbAnimTable, + .images = NULL, + .affineAnims = gDummySpriteAffineAnimTable, + .callback = AnimSolarbeamSmallOrb, +}; + +void AnimTask_CreateSmallSteelBeamOrbs(u8 taskId) +{ + if (--gTasks[taskId].data[0] == -1) + { + gTasks[taskId].data[1]++; + gTasks[taskId].data[0] = 6; + gBattleAnimArgs[0] = 15; + gBattleAnimArgs[1] = 0; + gBattleAnimArgs[2] = 80; + gBattleAnimArgs[3] = 0; + CreateSpriteAndAnimate(&gSteelBeamSmallOrbSpriteTemplate, 0, 0, GetBattlerSpriteSubpriority(gBattleAnimTarget) + 1); + } + + if (gTasks[taskId].data[1] == 15) + DestroyAnimVisualTask(taskId); +} diff --git a/src/graphics.c b/src/graphics.c index 4cbc4b334..2d0ff9a5c 100644 --- a/src/graphics.c +++ b/src/graphics.c @@ -1591,6 +1591,8 @@ const u32 gBattleAnimBgImage_ZMoveMountain[] = INCBIN_U32("graphics/battle_anims const u32 gBattleAnimBgPalette_ZMoveMountain[] = INCBIN_U32("graphics/battle_anims/backgrounds/new/zmove_mountain.gbapal.lz"); const u32 gBattleAnimBgTilemap_ZMoveMountain[] = INCBIN_U32("graphics/battle_anims/backgrounds/new/zmove_mountain.bin"); +const u32 gBattleAnimSpritePal_SteelBeam[] = INCBIN_U32("graphics/battle_anims/sprites/new/steel_beam.gbapal.lz"); +const u32 gBattleAnimBgPalette_SteelBeam[] = INCBIN_U32("graphics/battle_anims/backgrounds/new/steel_beam_bg.gbapal.lz"); // misc const u32 gUnknown_E6BC04[] = INCBIN_U32("graphics/unknown/unknown_E6BC04.bin.lz");