diff --git a/asm/macros/battle_anim_script.inc b/asm/macros/battle_anim_script.inc index 742cdb2f26d4..367428eb5039 100644 --- a/asm/macros/battle_anim_script.inc +++ b/asm/macros/battle_anim_script.inc @@ -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 diff --git a/data/battle_anim_scripts.s b/data/battle_anim_scripts.s index aa62732c7d05..cd656c2be95e 100644 --- a/data/battle_anim_scripts.s +++ b/data/battle_anim_scripts.s @@ -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 + 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:: @@ -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:: diff --git a/graphics/battle_anims/sprites/cudgel.png b/graphics/battle_anims/sprites/cudgel.png new file mode 100644 index 000000000000..a43b450adc55 Binary files /dev/null and b/graphics/battle_anims/sprites/cudgel.png differ diff --git a/graphics/pokemon/ogerpon/back.png b/graphics/pokemon/ogerpon/back.png index 29ad3c09b2a7..75f309fd67ce 100644 Binary files a/graphics/pokemon/ogerpon/back.png and b/graphics/pokemon/ogerpon/back.png differ diff --git a/graphics/pokemon/ogerpon/cornerstone/back.png b/graphics/pokemon/ogerpon/cornerstone/back.png index 39170fd75708..7e40fee557b8 100644 Binary files a/graphics/pokemon/ogerpon/cornerstone/back.png and b/graphics/pokemon/ogerpon/cornerstone/back.png differ diff --git a/graphics/pokemon/ogerpon/cornerstone/front.png b/graphics/pokemon/ogerpon/cornerstone/front.png index 6bca5e915c01..8e96be70e7c8 100644 Binary files a/graphics/pokemon/ogerpon/cornerstone/front.png and b/graphics/pokemon/ogerpon/cornerstone/front.png differ diff --git a/graphics/pokemon/ogerpon/cornerstone/normal.pal b/graphics/pokemon/ogerpon/cornerstone/normal.pal index 057bd48dcccb..852898a6b705 100644 --- a/graphics/pokemon/ogerpon/cornerstone/normal.pal +++ b/graphics/pokemon/ogerpon/cornerstone/normal.pal @@ -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 diff --git a/graphics/pokemon/ogerpon/cornerstone/shiny.pal b/graphics/pokemon/ogerpon/cornerstone/shiny.pal index b4d7d151955a..c4956ce77495 100644 --- a/graphics/pokemon/ogerpon/cornerstone/shiny.pal +++ b/graphics/pokemon/ogerpon/cornerstone/shiny.pal @@ -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 diff --git a/graphics/pokemon/ogerpon/front.png b/graphics/pokemon/ogerpon/front.png index 5fa971f87352..dec38ef0b850 100644 Binary files a/graphics/pokemon/ogerpon/front.png and b/graphics/pokemon/ogerpon/front.png differ diff --git a/graphics/pokemon/ogerpon/hearthflame/back.png b/graphics/pokemon/ogerpon/hearthflame/back.png index 19d665687009..d6d927f19d5a 100644 Binary files a/graphics/pokemon/ogerpon/hearthflame/back.png and b/graphics/pokemon/ogerpon/hearthflame/back.png differ diff --git a/graphics/pokemon/ogerpon/hearthflame/front.png b/graphics/pokemon/ogerpon/hearthflame/front.png index 036ea37f328f..d8b9cb7b2346 100644 Binary files a/graphics/pokemon/ogerpon/hearthflame/front.png and b/graphics/pokemon/ogerpon/hearthflame/front.png differ diff --git a/graphics/pokemon/ogerpon/hearthflame/normal.pal b/graphics/pokemon/ogerpon/hearthflame/normal.pal index 637556660ada..3f478af8aae5 100644 --- a/graphics/pokemon/ogerpon/hearthflame/normal.pal +++ b/graphics/pokemon/ogerpon/hearthflame/normal.pal @@ -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 diff --git a/graphics/pokemon/ogerpon/hearthflame/shiny.pal b/graphics/pokemon/ogerpon/hearthflame/shiny.pal index f874367b4bc2..fee0f8de7b0f 100644 --- a/graphics/pokemon/ogerpon/hearthflame/shiny.pal +++ b/graphics/pokemon/ogerpon/hearthflame/shiny.pal @@ -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 diff --git a/graphics/pokemon/ogerpon/normal.pal b/graphics/pokemon/ogerpon/normal.pal index 8f715fd815b0..a1ac4baf96b9 100644 --- a/graphics/pokemon/ogerpon/normal.pal +++ b/graphics/pokemon/ogerpon/normal.pal @@ -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 diff --git a/graphics/pokemon/ogerpon/shiny.pal b/graphics/pokemon/ogerpon/shiny.pal index a96c55d35d88..08c751ebdad3 100644 --- a/graphics/pokemon/ogerpon/shiny.pal +++ b/graphics/pokemon/ogerpon/shiny.pal @@ -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 diff --git a/graphics/pokemon/ogerpon/wellspring/back.png b/graphics/pokemon/ogerpon/wellspring/back.png index f1d5276baa7e..87d82032f475 100644 Binary files a/graphics/pokemon/ogerpon/wellspring/back.png and b/graphics/pokemon/ogerpon/wellspring/back.png differ diff --git a/graphics/pokemon/ogerpon/wellspring/front.png b/graphics/pokemon/ogerpon/wellspring/front.png index 5263ce2f1ebb..77ffb489a53d 100644 Binary files a/graphics/pokemon/ogerpon/wellspring/front.png and b/graphics/pokemon/ogerpon/wellspring/front.png differ diff --git a/graphics/pokemon/ogerpon/wellspring/normal.pal b/graphics/pokemon/ogerpon/wellspring/normal.pal index 4b22619be413..db40508a52bb 100644 --- a/graphics/pokemon/ogerpon/wellspring/normal.pal +++ b/graphics/pokemon/ogerpon/wellspring/normal.pal @@ -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 diff --git a/graphics/pokemon/ogerpon/wellspring/shiny.pal b/graphics/pokemon/ogerpon/wellspring/shiny.pal index bca722c95d81..7c44d3352d90 100644 --- a/graphics/pokemon/ogerpon/wellspring/shiny.pal +++ b/graphics/pokemon/ogerpon/wellspring/shiny.pal @@ -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 diff --git a/include/constants/battle_anim.h b/include/constants/battle_anim.h index 8bc09ba530db..8e225e2bc86f 100644 --- a/include/constants/battle_anim.h +++ b/include/constants/battle_anim.h @@ -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 diff --git a/include/graphics.h b/include/graphics.h index 2ec513bf910d..db91f253cc43 100644 --- a/include/graphics.h +++ b/include/graphics.h @@ -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[]; diff --git a/src/battle_anim.c b/src/battle_anim.c index 77f16cd3d788..f869dc1eae6a 100644 --- a/src/battle_anim.c +++ b/src/battle_anim.c @@ -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); @@ -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) @@ -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); +} diff --git a/src/battle_anim_effects_1.c b/src/battle_anim_effects_1.c index abcdd44c357d..f3cb387dd2a2 100644 --- a/src/battle_anim_effects_1.c +++ b/src/battle_anim_effects_1.c @@ -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, diff --git a/src/data/battle_anim.h b/src/data/battle_anim.h index 77b61584cad8..af46c1983ee6 100644 --- a/src/data/battle_anim.h +++ b/src/data/battle_anim.h @@ -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[] = @@ -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[] = diff --git a/src/graphics.c b/src/graphics.c index fee3ead0c860..bd9c73e864f8 100644 --- a/src/graphics.c +++ b/src/graphics.c @@ -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");