Merge pull request #1832 from Blackforest92/battle_engine

Alternate fix to Steel Beam
This commit is contained in:
ghoulslash 2021-10-30 09:19:54 -04:00 committed by GitHub
commit eedd255b18
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 139 additions and 37 deletions

View File

@ -13940,47 +13940,62 @@ Move_ETERNA_BEAM::
goto Move_HYPER_BEAM goto Move_HYPER_BEAM
Move_STEEL_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_ELECTRIC_ORBS
loadspritegfx ANIM_TAG_GUST 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 launchtask AnimTask_ElectricChargingParticles 0x2 0x4 0x0 0x14 0x0 0x2
playsewithpan SE_M_CHARGE, SOUND_PAN_ATTACKER loadspritegfx ANIM_TAG_STEEL_BEAM
delay 0x14 call SetSteelBeamBackground
loopsewithpan SE_M_HARDEN, SOUND_PAN_ATTACKER, 0x9, 15 panse_1B SE_M_SOLAR_BEAM, SOUND_PAN_ATTACKER, SOUND_PAN_TARGET, +2, 0
launchtask AnimTask_ShakeMon 0x2 0x5 ANIM_ATTACKER 0x0 0x4 72 0x1 createvisualtask AnimTask_CreateSmallSteelBeamOrbs, 5
call SteelBeamShards createsprite gSteelBeamBigOrbSpriteTemplate, ANIM_TARGET, 3, 15, 0, 20, 0
call SteelBeamShards delay 4
launchtemplate gSlideMonToOffsetSpriteTemplate 0x2 0x5 ANIM_TARGET, -30, 0x0 TRUE 145 createsprite gSteelBeamBigOrbSpriteTemplate, ANIM_TARGET, 3, 15, 0, 20, 1
call SteelBeamShards delay 4
call SteelBeamShards createvisualtask AnimTask_BlendBattleAnimPal, 10, 4, 1, 0, 10, RGB(24, 24, 48)
call SteelBeamShards createsprite gSteelBeamBigOrbSpriteTemplate, ANIM_TARGET, 3, 15, 0, 20, 2
call SteelBeamShards delay 4
call SteelBeamShards createvisualtask AnimTask_ShakeMon2, 5, ANIM_TARGET, 2, 0, 65, 1
call SteelBeamShards createsprite gSteelBeamBigOrbSpriteTemplate, ANIM_TARGET, 3, 15, 0, 20, 3
call SteelBeamShards delay 4
call SteelBeamShards createsprite gSteelBeamBigOrbSpriteTemplate, ANIM_TARGET, 3, 15, 0, 20, 4
call SteelBeamShards delay 4
call SteelBeamShards createsprite gSteelBeamBigOrbSpriteTemplate, ANIM_TARGET, 3, 15, 0, 20, 5
call SteelBeamShards delay 4
call SteelBeamShards createsprite gSteelBeamBigOrbSpriteTemplate, ANIM_TARGET, 3, 15, 0, 20, 6
call SteelBeamShards delay 4
call SteelBeamShards call SteelBeam_Continuity
call SteelBeamShards call SteelBeam_Continuity
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
waitforvisualfinish waitforvisualfinish
createvisualtask AnimTask_BlendBattleAnimPal, 10, 4, 1, 10, 0, RGB(24, 24, 48)
call UnsetHighSpeedBg
end end
SteelBeamShards: SteelBeam_Continuity:
launchtemplate gSteelBeamSpikeShardTemplate 0x80, 0x5 0xf 0xf 0x14 0x0 0x0 createsprite gSteelBeamBigOrbSpriteTemplate, ANIM_TARGET, 3, 15, 0, 20, 0
launchtemplate gSteelBeamSpikeShardTemplate 0x80, 0x5 0xf 0xf 0x14 0xa 0x5 delay 4
launchtemplate gSteelBeamSpikeShardTemplate 0x80, 0x5 0xf 0xf 0x14 0xfff6 0xfffb createsprite gSteelBeamBigOrbSpriteTemplate, ANIM_TARGET, 3, 15, 0, 20, 1
delay 0x2 delay 4
launchtemplate gSteelBeamSpikeShardTemplate 0x80, 0x5 0xf 0xf 0x14 0x14 0xa createsprite gSteelBeamBigOrbSpriteTemplate, ANIM_TARGET, 3, 15, 0, 20, 2
launchtemplate gSteelBeamSpikeShardTemplate 0x80, 0x5 0xf 0xf 0x14 0xffec 0xfff6 delay 4
delay 0x2 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:: Move_EXPANDING_FORCE::
end @to do: end @to do:

View File

@ -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

View File

@ -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

View File

@ -394,6 +394,7 @@
#define ANIM_TAG_ALPHA_SYMBOL (ANIM_SPRITES_START + 382) #define ANIM_TAG_ALPHA_SYMBOL (ANIM_SPRITES_START + 382)
#define ANIM_TAG_OMEGA_SYMBOL (ANIM_SPRITES_START + 383) #define ANIM_TAG_OMEGA_SYMBOL (ANIM_SPRITES_START + 383)
#define ANIM_TAG_PRIMAL_PARTICLES (ANIM_SPRITES_START + 384) #define ANIM_TAG_PRIMAL_PARTICLES (ANIM_SPRITES_START + 384)
#define ANIM_TAG_STEEL_BEAM (ANIM_SPRITES_START + 385)
// battlers // battlers
#define ANIM_ATTACKER 0 #define ANIM_ATTACKER 0
@ -495,6 +496,8 @@
#define BG_HYPER_BEAM 75 #define BG_HYPER_BEAM 75
#define BG_DYNAMAX_CANNON 76 #define BG_DYNAMAX_CANNON 76
#define BG_AURA_SPHERE 77 #define BG_AURA_SPHERE 77
#define BG_STEEL_BEAM_OPPONENT 78
#define BG_STEEL_BEAM_PLAYER 79
// table ids for general animations (gBattleAnims_General) // table ids for general animations (gBattleAnims_General)
#define B_ANIM_CASTFORM_CHANGE 0 #define B_ANIM_CASTFORM_CHANGE 0

View File

@ -5089,7 +5089,8 @@ extern const u32 gBattleAnimBgTilemap_ZMoveActivate[];
extern const u32 gBattleAnimBgImage_ZMoveMountain[]; extern const u32 gBattleAnimBgImage_ZMoveMountain[];
extern const u32 gBattleAnimBgPalette_ZMoveMountain[]; extern const u32 gBattleAnimBgPalette_ZMoveMountain[];
extern const u32 gBattleAnimBgTilemap_ZMoveMountain[]; extern const u32 gBattleAnimBgTilemap_ZMoveMountain[];
extern const u32 gBattleAnimSpritePal_SteelBeam[];
extern const u32 gBattleAnimBgPalette_SteelBeam[];
extern const u32 gMetalShineGfx[]; extern const u32 gMetalShineGfx[];
extern const u32 gMetalShinePalette[]; extern const u32 gMetalShinePalette[];

View File

@ -1567,6 +1567,7 @@ const struct CompressedSpriteSheet gBattleAnimPicTable[] =
{gBattleAnimSpriteGfx_AlphaSymbol, 0x0200, ANIM_TAG_ALPHA_SYMBOL}, {gBattleAnimSpriteGfx_AlphaSymbol, 0x0200, ANIM_TAG_ALPHA_SYMBOL},
{gBattleAnimSpriteGfx_OmegaSymbol, 0x0200, ANIM_TAG_OMEGA_SYMBOL}, {gBattleAnimSpriteGfx_OmegaSymbol, 0x0200, ANIM_TAG_OMEGA_SYMBOL},
{gBattleAnimSpriteGfx_PrimalParticles, 0x0180, ANIM_TAG_PRIMAL_PARTICLES}, {gBattleAnimSpriteGfx_PrimalParticles, 0x0180, ANIM_TAG_PRIMAL_PARTICLES},
{gBattleAnimSpriteGfx_Orbs, 0x0180, ANIM_TAG_STEEL_BEAM},
}; };
const struct CompressedSpritePalette gBattleAnimPaletteTable[] = const struct CompressedSpritePalette gBattleAnimPaletteTable[] =
@ -2017,6 +2018,7 @@ const struct CompressedSpritePalette gBattleAnimPaletteTable[] =
{gBattleAnimSpritePal_AlphaSymbol, ANIM_TAG_ALPHA_SYMBOL}, {gBattleAnimSpritePal_AlphaSymbol, ANIM_TAG_ALPHA_SYMBOL},
{gBattleAnimSpritePal_OmegaSymbol, ANIM_TAG_OMEGA_SYMBOL}, {gBattleAnimSpritePal_OmegaSymbol, ANIM_TAG_OMEGA_SYMBOL},
{gBattleAnimSpritePal_PrimalParticles, ANIM_TAG_PRIMAL_PARTICLES}, {gBattleAnimSpritePal_PrimalParticles, ANIM_TAG_PRIMAL_PARTICLES},
{gBattleAnimSpritePal_SteelBeam, ANIM_TAG_STEEL_BEAM},
}; };
const struct BattleAnimBackground gBattleAnimBackgroundTable[] = const struct BattleAnimBackground gBattleAnimBackgroundTable[] =
@ -2100,6 +2102,8 @@ const struct BattleAnimBackground gBattleAnimBackgroundTable[] =
[BG_HYPER_BEAM] = {gBattleAnimBgImage_HydroCannon, gBattleAnimBgPalette_HyperBeam, gBattleAnimBgTilemap_HydroCannon}, [BG_HYPER_BEAM] = {gBattleAnimBgImage_HydroCannon, gBattleAnimBgPalette_HyperBeam, gBattleAnimBgTilemap_HydroCannon},
[BG_DYNAMAX_CANNON] = {gBattleAnimBgImage_HydroCannon, gBattleAnimBgPalette_DynamaxCannon, gBattleAnimBgTilemap_HydroCannon}, [BG_DYNAMAX_CANNON] = {gBattleAnimBgImage_HydroCannon, gBattleAnimBgPalette_DynamaxCannon, gBattleAnimBgTilemap_HydroCannon},
[BG_AURA_SPHERE] = {gBattleAnimBgImage_FocusBlast, gBattleAnimBgPalette_AuraSphere, gBattleAnimBgTilemap_FocusBlast}, [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) = static void (* const sScriptCmdTable[])(void) =

View File

@ -6803,3 +6803,42 @@ void AnimTask_CompressTargetHorizontally(u8 taskId)
PrepareAffineAnimInTaskData(task, spriteId, sCompressTargetHorizontallyAffineAnimCmds); PrepareAffineAnimInTaskData(task, spriteId, sCompressTargetHorizontallyAffineAnimCmds);
task->func = AnimTask_CompressTargetStep; 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);
}

View File

@ -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 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 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 // misc
const u32 gUnknown_E6BC04[] = INCBIN_U32("graphics/unknown/unknown_E6BC04.bin.lz"); const u32 gUnknown_E6BC04[] = INCBIN_U32("graphics/unknown/unknown_E6BC04.bin.lz");