Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added Ivy Cudgel Animation #5034

Merged
merged 4 commits into from
Jul 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions asm/macros/battle_anim_script.inc
Original file line number Diff line number Diff line change
Expand Up @@ -315,6 +315,12 @@
.Lsprite_\@_2:
.endm

.macro jumpifmovetypeequal type:req, jumpInstr:req
.byte 0x33
.byte \type
.4byte \jumpInstr
.endm

@ useful macros
.macro jumpreteq value:req, ptr:req
jumpargeq ARG_RET_ID, \value, \ptr
Expand Down
53 changes: 52 additions & 1 deletion data/battle_anim_scripts.s
Original file line number Diff line number Diff line change
Expand Up @@ -17844,6 +17844,58 @@ ElectroShotUnleash:
blendoff
end

Move_IVY_CUDGEL::
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
createsprite gIvyCudgelSpriteTemplate, ANIM_TARGET, 2
delay 60
createvisualtask AnimTask_ShakeMonInPlace, 2, ANIM_ATTACKER, 3, 0, 12, 4
delay 18
createvisualtask AnimTask_SquishTarget, 0x2
delay 6
call WoodHammerImpact
waitforvisualfinish
end
IvyCudgelFire:
loadspritegfx ANIM_TAG_IVY_CUDGEL_FIRE
createsprite gIvyCudgelFireSpriteTemplate, ANIM_TARGET, 2
delay 60
createvisualtask AnimTask_ShakeMonInPlace, 2, ANIM_ATTACKER, 3, 0, 12, 4
delay 18
createvisualtask AnimTask_SquishTarget, 0x2
delay 6
call WoodHammerImpact
waitforvisualfinish
end
IvyCudgelRock:
loadspritegfx ANIM_TAG_IVY_CUDGEL_ROCK
hedara90 marked this conversation as resolved.
Show resolved Hide resolved
createsprite gIvyCudgelRockSpriteTemplate, ANIM_TARGET, 2
delay 60
createvisualtask AnimTask_ShakeMonInPlace, 2, ANIM_ATTACKER, 3, 0, 12, 4
delay 18
createvisualtask AnimTask_SquishTarget, 0x2
delay 6
call WoodHammerImpact
waitforvisualfinish
end
IvyCudgelWater:
loadspritegfx ANIM_TAG_IVY_CUDGEL_WATER
createsprite gIvyCudgelWaterSpriteTemplate, ANIM_TARGET, 2
delay 60
createvisualtask AnimTask_ShakeMonInPlace, 2, ANIM_ATTACKER, 3, 0, 12, 4
delay 18
createvisualtask AnimTask_SquishTarget, 0x2
delay 6
call WoodHammerImpact
waitforvisualfinish
end
Move_TERA_BLAST::
Move_AXE_KICK::
Move_ORDER_UP::
Expand Down Expand Up @@ -17875,7 +17927,6 @@ Move_MAGICAL_TORQUE::
Move_PSYBLADE::
Move_BLOOD_MOON::
Move_MATCHA_GOTCHA::
Move_IVY_CUDGEL::
Move_TERA_STARSTORM::
Move_FICKLE_BEAM::
Move_THUNDERCLAP::
Expand Down
Binary file added graphics/battle_anims/sprites/cudgel.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified graphics/pokemon/ogerpon/back.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified graphics/pokemon/ogerpon/cornerstone/back.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified graphics/pokemon/ogerpon/cornerstone/front.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions graphics/pokemon/ogerpon/cornerstone/normal.pal
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ JASC-PAL
0100
15
148 209 161
0 0 0
42 44 41
21 158 7
0 0 0
74 76 73
25 27 24
61 113 53
25 27 24
109 99 108
133 139 139
53 134 168
Expand Down
4 changes: 2 additions & 2 deletions graphics/pokemon/ogerpon/cornerstone/shiny.pal
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ JASC-PAL
0100
15
148 209 161
0 0 0
42 44 41
21 158 7
0 0 0
74 76 73
25 27 24
61 113 53
25 27 24
109 99 108
133 139 139
53 134 168
Expand Down
Binary file modified graphics/pokemon/ogerpon/front.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified graphics/pokemon/ogerpon/hearthflame/back.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified graphics/pokemon/ogerpon/hearthflame/front.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 7 additions & 7 deletions graphics/pokemon/ogerpon/hearthflame/normal.pal
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,18 @@ JASC-PAL
0100
16
148 210 164
156 153 172
131 28 24
0 0 0
41 44 41
16 157 0
230 60 49
57 113 49
49 133 172
131 28 24
213 230 246
41 44 41
255 198 74
172 105 32
16 157 0
57 113 49
156 153 172
49 190 230
0 0 0
164 52 49
74 76 74
189 137 90
230 60 49
14 changes: 7 additions & 7 deletions graphics/pokemon/ogerpon/hearthflame/shiny.pal
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,18 @@ JASC-PAL
0100
16
148 210 164
156 153 172
131 28 24
0 0 0
41 44 41
16 157 0
230 60 49
57 113 49
49 133 172
131 28 24
213 230 246
41 44 41
255 198 74
124 162 56
16 157 0
57 113 49
156 153 172
49 190 230
0 0 0
164 52 49
74 76 74
189 137 90
230 60 49
10 changes: 5 additions & 5 deletions graphics/pokemon/ogerpon/normal.pal
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@ JASC-PAL
0100
15
148 209 161
42 44 41
0 1 0
42 44 41
21 158 7
27 70 15
0 164 153
61 113 53
17 106 68
21 158 7
83 133 90
74 76 73
61 97 53
175 216 159
251 253 250
139 99 57
0 164 153
120 81 39
219 157 92
83 133 90
10 changes: 5 additions & 5 deletions graphics/pokemon/ogerpon/shiny.pal
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@ JASC-PAL
0100
15
148 209 161
42 44 41
0 1 0
42 44 41
21 158 7
27 70 15
0 164 153
61 113 53
17 106 68
21 158 7
83 133 90
74 76 73
61 97 53
175 216 159
251 253 250
139 99 57
0 164 153
124 162 56
219 157 92
83 133 90
Binary file modified graphics/pokemon/ogerpon/wellspring/back.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified graphics/pokemon/ogerpon/wellspring/front.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 3 additions & 3 deletions graphics/pokemon/ogerpon/wellspring/normal.pal
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ JASC-PAL
0100
16
148 209 161
0 0 0
42 44 41
21 158 7
74 76 73
0 0 0
61 113 53
11 64 121
61 113 53
74 76 73
15 90 170
0 126 229
53 134 168
Expand Down
6 changes: 3 additions & 3 deletions graphics/pokemon/ogerpon/wellspring/shiny.pal
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ JASC-PAL
0100
16
148 209 161
0 0 0
42 44 41
21 158 7
74 76 73
0 0 0
61 113 53
11 64 121
61 113 53
74 76 73
15 90 170
0 126 229
53 134 168
Expand Down
4 changes: 4 additions & 0 deletions include/constants/battle_anim.h
Original file line number Diff line number Diff line change
Expand Up @@ -405,6 +405,10 @@
#define ANIM_TAG_SYRUP_SHELL_YELLOW (ANIM_SPRITES_START + 391)
#define ANIM_TAG_SYRUP_SPLAT_RED (ANIM_SPRITES_START + 392)
#define ANIM_TAG_SYRUP_SPLAT_YELLOW (ANIM_SPRITES_START + 393)
#define ANIM_TAG_IVY_CUDGEL_GRASS (ANIM_SPRITES_START + 394)
#define ANIM_TAG_IVY_CUDGEL_FIRE (ANIM_SPRITES_START + 395)
#define ANIM_TAG_IVY_CUDGEL_ROCK (ANIM_SPRITES_START + 396)
#define ANIM_TAG_IVY_CUDGEL_WATER (ANIM_SPRITES_START + 397)

// battlers
#define ANIM_ATTACKER 0
Expand Down
5 changes: 5 additions & 0 deletions include/graphics.h
Original file line number Diff line number Diff line change
Expand Up @@ -2865,6 +2865,11 @@ extern const u32 gBattleAnimSpriteGfx_SyrupShell[];
extern const u32 gBattleAnimSpriteGfx_SyrupSplat[];
extern const u32 gBattleAnimSpritePal_SyrupRed[];
extern const u32 gBattleAnimSpritePal_SyrupYellow[];
extern const u32 gBattleAnimSpriteGfx_IvyCudgel[];
extern const u32 gBattleAnimSpritePal_IvyCudgelGrass[];
extern const u32 gBattleAnimSpritePal_IvyCudgelFire[];
extern const u32 gBattleAnimSpritePal_IvyCudgelRock[];
extern const u32 gBattleAnimSpritePal_IvyCudgelWater[];

extern const u32 gBattleAnimBgImage_Dark[];
extern const u32 gBattleAnimBgImage_Ghost[];
Expand Down
15 changes: 15 additions & 0 deletions src/battle_anim.c
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ static void Cmd_stopsound(void);
static void Cmd_createvisualtaskontargets(void);
static void Cmd_createspriteontargets(void);
static void Cmd_createspriteontargets_onpos(void);
static void Cmd_jumpifmovetypeequal(void);
static void RunAnimScriptCommand(void);
static void Task_UpdateMonBg(u8 taskId);
static void FlipBattlerBgTiles(void);
Expand Down Expand Up @@ -177,6 +178,7 @@ static void (* const sScriptCmdTable[])(void) =
Cmd_createvisualtaskontargets, // 0x30
Cmd_createspriteontargets, // 0x31
Cmd_createspriteontargets_onpos, // 0x32
Cmd_jumpifmovetypeequal, // 0x33
};

void ClearBattleAnimationVars(void)
Expand Down Expand Up @@ -2136,3 +2138,16 @@ static void Cmd_stopsound(void)
m4aMPlayStop(&gMPlayInfo_SE2);
sBattleAnimScriptPtr++;
}

static void Cmd_jumpifmovetypeequal(void)
{
u8 moveType;
const u8 *type = sBattleAnimScriptPtr + 1;
sBattleAnimScriptPtr += 2;
GET_MOVE_TYPE(gCurrentMove, moveType);

if (*type != moveType)
sBattleAnimScriptPtr += 4;
else
sBattleAnimScriptPtr = T2_READ_PTR(sBattleAnimScriptPtr);
}
44 changes: 44 additions & 0 deletions src/battle_anim_effects_1.c
Original file line number Diff line number Diff line change
Expand Up @@ -2958,6 +2958,50 @@ const struct SpriteTemplate gWoodHammerHammerSpriteTemplate =
.callback = AnimWoodHammerHammer,
};

const struct SpriteTemplate gIvyCudgelSpriteTemplate =
{
.tileTag = ANIM_TAG_IVY_CUDGEL_GRASS,
.paletteTag = ANIM_TAG_IVY_CUDGEL_GRASS,
.oam = &gOamData_AffineDouble_ObjNormal_64x64,
.anims = gDummySpriteAnimTable,
.images = NULL,
.affineAnims = gWoodHammerHammerAffineAnims,
.callback = AnimWoodHammerHammer,
};

const struct SpriteTemplate gIvyCudgelFireSpriteTemplate =
{
.tileTag = ANIM_TAG_IVY_CUDGEL_GRASS,
.paletteTag = ANIM_TAG_IVY_CUDGEL_FIRE,
.oam = &gOamData_AffineDouble_ObjNormal_64x64,
.anims = gDummySpriteAnimTable,
.images = NULL,
.affineAnims = gWoodHammerHammerAffineAnims,
.callback = AnimWoodHammerHammer,
};

const struct SpriteTemplate gIvyCudgelRockSpriteTemplate =
{
.tileTag = ANIM_TAG_IVY_CUDGEL_GRASS,
.paletteTag = ANIM_TAG_IVY_CUDGEL_ROCK,
.oam = &gOamData_AffineDouble_ObjNormal_64x64,
.anims = gDummySpriteAnimTable,
.images = NULL,
.affineAnims = gWoodHammerHammerAffineAnims,
.callback = AnimWoodHammerHammer,
};

const struct SpriteTemplate gIvyCudgelWaterSpriteTemplate =
{
.tileTag = ANIM_TAG_IVY_CUDGEL_GRASS,
.paletteTag = ANIM_TAG_IVY_CUDGEL_WATER,
.oam = &gOamData_AffineDouble_ObjNormal_64x64,
.anims = gDummySpriteAnimTable,
.images = NULL,
.affineAnims = gWoodHammerHammerAffineAnims,
.callback = AnimWoodHammerHammer,
};

const struct SpriteTemplate gJudgmentGrayOutwardSpikesTemplate =
{
.tileTag = ANIM_TAG_GREEN_SPIKE,
Expand Down
5 changes: 5 additions & 0 deletions src/data/battle_anim.h
Original file line number Diff line number Diff line change
Expand Up @@ -1454,6 +1454,7 @@ const struct CompressedSpriteSheet gBattleAnimPicTable[] =
{gBattleAnimSpriteGfx_SyrupShell, 0x2000, ANIM_TAG_SYRUP_SHELL_YELLOW},
{gBattleAnimSpriteGfx_SyrupSplat, 0x400, ANIM_TAG_SYRUP_SPLAT_RED},
{gBattleAnimSpriteGfx_SyrupSplat, 0x400, ANIM_TAG_SYRUP_SPLAT_YELLOW},
{gBattleAnimSpriteGfx_IvyCudgel, 0x800, ANIM_TAG_IVY_CUDGEL_GRASS},
};

const struct CompressedSpritePalette gBattleAnimPaletteTable[] =
Expand Down Expand Up @@ -1909,6 +1910,10 @@ const struct CompressedSpritePalette gBattleAnimPaletteTable[] =
{gBattleAnimSpritePal_SyrupYellow, ANIM_TAG_SYRUP_SHELL_YELLOW},
{gBattleAnimSpritePal_SyrupRed, ANIM_TAG_SYRUP_SPLAT_RED},
{gBattleAnimSpritePal_SyrupYellow, ANIM_TAG_SYRUP_SPLAT_YELLOW},
{gBattleAnimSpritePal_IvyCudgelGrass, ANIM_TAG_IVY_CUDGEL_GRASS},
{gBattleAnimSpritePal_IvyCudgelFire, ANIM_TAG_IVY_CUDGEL_FIRE},
{gBattleAnimSpritePal_IvyCudgelRock, ANIM_TAG_IVY_CUDGEL_ROCK},
{gBattleAnimSpritePal_IvyCudgelWater, ANIM_TAG_IVY_CUDGEL_WATER},
};

const struct BattleAnimBackground gBattleAnimBackgroundTable[] =
Expand Down
6 changes: 6 additions & 0 deletions src/graphics.c
Original file line number Diff line number Diff line change
Expand Up @@ -457,6 +457,12 @@ const u32 gBattleAnimSpriteGfx_SyrupSplat[] = INCBIN_U32("graphics/battle_anims/
const u32 gBattleAnimSpritePal_SyrupRed[] = INCBIN_U32("graphics/battle_anims/sprites/syrup_red.gbapal.lz");
const u32 gBattleAnimSpritePal_SyrupYellow[] = INCBIN_U32("graphics/battle_anims/sprites/syrup_yellow.gbapal.lz");

const u32 gBattleAnimSpriteGfx_IvyCudgel[] = INCBIN_U32("graphics/battle_anims/sprites/cudgel.4bpp.lz");
const u32 gBattleAnimSpritePal_IvyCudgelGrass[] = INCBIN_U32("graphics/pokemon/ogerpon/normal.gbapal.lz");
const u32 gBattleAnimSpritePal_IvyCudgelFire[] = INCBIN_U32("graphics/pokemon/ogerpon/hearthflame/normal.gbapal.lz");
const u32 gBattleAnimSpritePal_IvyCudgelRock[] = INCBIN_U32("graphics/pokemon/ogerpon/cornerstone/normal.gbapal.lz");
const u32 gBattleAnimSpritePal_IvyCudgelWater[] = INCBIN_U32("graphics/pokemon/ogerpon/wellspring/normal.gbapal.lz");

// old battle interface data, unused

const u32 gOldBattleInterfaceGfx[] = INCBIN_U32("graphics/unused/obi1.4bpp.lz");
Expand Down
Loading