Skip to content

Commit

Permalink
Add Axe Kick animation (#5039)
Browse files Browse the repository at this point in the history
  • Loading branch information
hedara90 authored Jul 28, 2024
2 parents 1cf2592 + 904d592 commit b54226d
Show file tree
Hide file tree
Showing 2 changed files with 58 additions and 15 deletions.
45 changes: 30 additions & 15 deletions data/battle_anim_scripts.s
Original file line number Diff line number Diff line change
Expand Up @@ -17423,7 +17423,7 @@ Move_LAST_RESPECTS::
restorebg
waitbgfadein
end

Move_TIDY_UP::
loadspritegfx ANIM_TAG_PINK_CLOUD
monbg ANIM_ATTACKER
Expand All @@ -17444,7 +17444,7 @@ Move_TIDY_UP::
clearmonbg ANIM_ATTACKER
blendoff
end

Move_KOWTOW_CLEAVE::
loadspritegfx ANIM_TAG_SLASH
loadspritegfx ANIM_TAG_CROSS_IMPACT
Expand Down Expand Up @@ -17738,7 +17738,7 @@ Move_HYDRO_STEAM::
createvisualtask AnimTask_BlendBattleAnimPal, 10, F_PAL_TARGET, 3, 9, 0, RGB_RED
waitforvisualfinish
end

Move_POUNCE::
loadspritegfx ANIM_TAG_IMPACT
monbg ANIM_TARGET
Expand Down Expand Up @@ -17845,15 +17845,15 @@ ElectroShotUnleash:
end

Move_IVY_CUDGEL::
loadspritegfx ANIM_TAG_IVY_CUDGEL_GRASS
loadspritegfx ANIM_TAG_IVY_CUDGEL_GRASS
loadspritegfx ANIM_TAG_WOOD_HAMMER
loadspritegfx ANIM_TAG_WOOD_HAMMER_HAMMER
loadspritegfx ANIM_TAG_IMPACT
playsewithpan SE_M_SWAGGER, SOUND_PAN_ATTACKER
createvisualtask AnimTask_TranslateMonEllipticalRespectSide, 2, ANIM_ATTACKER, 12, 4, 2, 4
jumpifmovetypeequal TYPE_FIRE, IvyCudgelFire
jumpifmovetypeequal TYPE_ROCK, IvyCudgelRock
jumpifmovetypeequal TYPE_WATER, IvyCudgelWater
jumpifmovetypeequal TYPE_FIRE, IvyCudgelFire
jumpifmovetypeequal TYPE_ROCK, IvyCudgelRock
jumpifmovetypeequal TYPE_WATER, IvyCudgelWater
createsprite gIvyCudgelSpriteTemplate, ANIM_TARGET, 2
delay 60
createvisualtask AnimTask_ShakeMonInPlace, 2, ANIM_ATTACKER, 3, 0, 12, 4
Expand All @@ -17862,9 +17862,9 @@ Move_IVY_CUDGEL::
delay 6
call WoodHammerImpact
waitforvisualfinish
end
end
IvyCudgelFire:
loadspritegfx ANIM_TAG_IVY_CUDGEL_FIRE
loadspritegfx ANIM_TAG_IVY_CUDGEL_FIRE
createsprite gIvyCudgelFireSpriteTemplate, ANIM_TARGET, 2
delay 60
createvisualtask AnimTask_ShakeMonInPlace, 2, ANIM_ATTACKER, 3, 0, 12, 4
Expand All @@ -17873,9 +17873,9 @@ IvyCudgelFire:
delay 6
call WoodHammerImpact
waitforvisualfinish
end
end
IvyCudgelRock:
loadspritegfx ANIM_TAG_IVY_CUDGEL_ROCK
loadspritegfx ANIM_TAG_IVY_CUDGEL_ROCK
createsprite gIvyCudgelRockSpriteTemplate, ANIM_TARGET, 2
delay 60
createvisualtask AnimTask_ShakeMonInPlace, 2, ANIM_ATTACKER, 3, 0, 12, 4
Expand All @@ -17884,9 +17884,9 @@ IvyCudgelRock:
delay 6
call WoodHammerImpact
waitforvisualfinish
end
end
IvyCudgelWater:
loadspritegfx ANIM_TAG_IVY_CUDGEL_WATER
loadspritegfx ANIM_TAG_IVY_CUDGEL_WATER
createsprite gIvyCudgelWaterSpriteTemplate, ANIM_TARGET, 2
delay 60
createvisualtask AnimTask_ShakeMonInPlace, 2, ANIM_ATTACKER, 3, 0, 12, 4
Expand All @@ -17895,9 +17895,24 @@ IvyCudgelWater:
delay 6
call WoodHammerImpact
waitforvisualfinish
end
Move_TERA_BLAST::
end

Move_AXE_KICK::
loadspritegfx ANIM_TAG_HANDS_AND_FEET
loadspritegfx ANIM_TAG_IMPACT
playsewithpan SE_M_JUMP_KICK, SOUND_PAN_ATTACKER
createsprite gSlideMonToOffsetSpriteTemplate, ANIM_ATTACKER, 2, 0, 20, 0, 0, 4
delay 7
createsprite gAxeKickSpriteTemplate, ANIM_TARGET, 3
delay 2
playsewithpan SE_M_COMET_PUNCH, SOUND_PAN_TARGET
createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 1, 0, 0, ANIM_TARGET, 1
createvisualtask AnimTask_SquishTargetShort, 2
waitforvisualfinish
createsprite gSlideMonToOriginalPosSpriteTemplate, ANIM_ATTACKER, 2, 0, 1, 4
end

Move_TERA_BLAST::
Move_ORDER_UP::
Move_SPICY_EXTRACT::
Move_SPIN_OUT::
Expand Down
28 changes: 28 additions & 0 deletions src/battle_anim_new.c
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,14 @@ static const union AffineAnimCmd sSquishTargetAffineAnimCmds[] =
AFFINEANIMCMD_END,
};

static const union AffineAnimCmd sSquishTargetShortAffineAnimCmds[] =
{
AFFINEANIMCMD_FRAME(0, 64, 0, 4), //Flatten
AFFINEANIMCMD_FRAME(0, 0, 0, 16),
AFFINEANIMCMD_FRAME(0, -64, 0, 4),
AFFINEANIMCMD_END,
};

// GEN 4
// shadow sneak
const struct SpriteTemplate gShadowSneakImpactSpriteTemplate =
Expand Down Expand Up @@ -4771,6 +4779,17 @@ const struct SpriteTemplate gUltraBurstSymbolSpriteTemplate =
.callback = AnimSpriteOnMonPos
};

const struct SpriteTemplate gAxeKickSpriteTemplate =
{
.tileTag = ANIM_TAG_HANDS_AND_FEET,
.paletteTag = ANIM_TAG_HANDS_AND_FEET,
.oam = &gOamData_AffineOff_ObjNormal_32x32,
.anims = &gAnims_HandsAndFeet[2],
.images = NULL,
.affineAnims = gDummySpriteAffineAnimTable,
.callback = AnimBounceBallLand,
};

// Z MOVES
//activate
const struct SpriteTemplate gZMoveSymbolSpriteTemplate =
Expand Down Expand Up @@ -8514,6 +8533,15 @@ void AnimTask_SquishTarget(u8 taskId)
task->func = AnimTask_WaitAffineAnim;
}

void AnimTask_SquishTargetShort(u8 taskId)
{
struct Task* task = &gTasks[taskId];
u8 spriteId = GetAnimBattlerSpriteId(ANIM_TARGET);

PrepareAffineAnimInTaskData(task, spriteId, sSquishTargetShortAffineAnimCmds);
task->func = AnimTask_WaitAffineAnim;
}

void CoreEnforcerLoadBeamTarget(struct Sprite *sprite)
{
sprite->data[0] = gBattleAnimArgs[2];
Expand Down

0 comments on commit b54226d

Please sign in to comment.