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

Syrup Bomb move and special speed drop anim, Credits to Dat.H A #3474

Merged
merged 8 commits into from
Oct 27, 2023
Merged
Show file tree
Hide file tree
Changes from 6 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
109 changes: 108 additions & 1 deletion data/battle_anim_scripts.s
Original file line number Diff line number Diff line change
Expand Up @@ -1009,6 +1009,7 @@ gBattleAnims_General::
.4byte General_SaltCureDamage @ B_ANIM_SALT_CURE_DAMAGE
.4byte General_DynamaxGrowth @ B_ANIM_DYNAMAX_GROWTH
.4byte General_SetWeather @ B_ANIM_MAX_SET_WEATHER
.4byte General_SyrupBombSpeedDrop @ B_ANIM_SYRUP_BOMB_SPEED_DROP

.align 2
gBattleAnims_Special::
Expand Down Expand Up @@ -16524,6 +16525,113 @@ Move_DOUBLE_SHOCK::
blendoff
end

Move_SYRUP_BOMB::
createvisualtask AnimTask_SyrupBomb, 0x5
jumpargeq 0x0, FALSE, Move_SYRUP_BOMB_RED
jumpargeq 0x0, TRUE, Move_SYRUP_BOMB_YELLOW

@ Credits to Dat.H A
Move_SYRUP_BOMB_RED:
loadspritegfx ANIM_TAG_SYRUP_BLOB_RED
loadspritegfx ANIM_TAG_SYRUP_SPLAT_RED
loadspritegfx ANIM_TAG_SYRUP_SHELL_RED
call SyrupBombProjectileRed
call SyrupBombProjectileRed
call SyrupBombProjectileRed
call SyrupBombProjectileRed
call SyrupBombProjectileRed
call SyrupBombProjectileRed
call SyrupBombProjectileRed
call SyrupBombProjectileRed
call SyrupBombProjectileRed
call SyrupBombProjectileRed
createvisualtask AnimTask_ShakeMon2, 5, ANIM_TARGET, 3, 0, 15, 1
createvisualtask AnimTask_BlendColorCycle, 2, F_PAL_TARGET, 1, 2, 0, 12, RGB(20, 3, 3)
createsprite gSyrupBombRedHitParticleSpriteTemplate, ANIM_TARGET, 2, 42, 27, 20
createsprite gSyrupBombRedHitParticleSpriteTemplate, ANIM_TARGET, 2, -27, 44, 20
createsprite gSyrupBombRedHitParticleSpriteTemplate, ANIM_TARGET, 2, 39, -28, 20
createsprite gSyrupBombRedHitParticleSpriteTemplate, ANIM_TARGET, 2, -42, -42, 20
playsewithpan SE_M_DIG, SOUND_PAN_TARGET
delay 5
createsprite gSyrupBombRedShellSpriteTemplate, ANIM_TARGET, 1, ANIM_TARGET, 100
createsprite gSyrupBombRedHitParticleSpriteTemplate, ANIM_TARGET, 2, 0, 40, 20
createsprite gSyrupBombRedHitParticleSpriteTemplate, ANIM_TARGET, 2, -8, -44, 20
createsprite gSyrupBombRedHitParticleSpriteTemplate, ANIM_TARGET, 2, -46, -28, 20
createsprite gSyrupBombRedHitParticleSpriteTemplate, ANIM_TARGET, 2, 46, 9, 20
playsewithpan SE_M_DIG, SOUND_PAN_TARGET
delay 5
waitsound
waitforvisualfinish
end
SyrupBombProjectileRed:
playsewithpan SE_M_BUBBLE3, SOUND_PAN_ATTACKER
createsprite gSyrupRedProjectileSpriteTemplate, ANIM_TARGET, 2, 20, 0, 40, 0
delay 3
return

Move_SYRUP_BOMB_YELLOW:
loadspritegfx ANIM_TAG_SYRUP_BLOB_YELLOW
loadspritegfx ANIM_TAG_SYRUP_SPLAT_YELLOW
loadspritegfx ANIM_TAG_SYRUP_SHELL_YELLOW
call SyrupBombProjectileYellow
call SyrupBombProjectileYellow
call SyrupBombProjectileYellow
call SyrupBombProjectileYellow
call SyrupBombProjectileYellow
call SyrupBombProjectileYellow
call SyrupBombProjectileYellow
call SyrupBombProjectileYellow
call SyrupBombProjectileYellow
call SyrupBombProjectileYellow
createvisualtask AnimTask_ShakeMon2, 5, ANIM_TARGET, 3, 0, 15, 1
createvisualtask AnimTask_BlendColorCycle, 2, F_PAL_TARGET, 1, 2, 0, 12, RGB(23, 13, 1)
createsprite gSyrupBombYellowHitParticleSpriteTemplate, ANIM_TARGET, 2, 42, 27, 20
createsprite gSyrupBombYellowHitParticleSpriteTemplate, ANIM_TARGET, 2, -27, 44, 20
createsprite gSyrupBombYellowHitParticleSpriteTemplate, ANIM_TARGET, 2, 39, -28, 20
createsprite gSyrupBombYellowHitParticleSpriteTemplate, ANIM_TARGET, 2, -42, -42, 20
playsewithpan SE_M_DIG, SOUND_PAN_TARGET
delay 5
createsprite gSyrupBombYellowShellSpriteTemplate, ANIM_TARGET, 1, ANIM_TARGET, 100
createsprite gSyrupBombYellowHitParticleSpriteTemplate, ANIM_TARGET, 2, 0, 40, 20
createsprite gSyrupBombYellowHitParticleSpriteTemplate, ANIM_TARGET, 2, -8, -44, 20
createsprite gSyrupBombYellowHitParticleSpriteTemplate, ANIM_TARGET, 2, -46, -28, 20
createsprite gSyrupBombYellowHitParticleSpriteTemplate, ANIM_TARGET, 2, 46, 9, 20
playsewithpan SE_M_DIG, SOUND_PAN_TARGET
delay 5
waitsound
waitforvisualfinish
end
SyrupBombProjectileYellow:
playsewithpan SE_M_BUBBLE3, SOUND_PAN_ATTACKER
createsprite gSyrupYellowProjectileSpriteTemplate, ANIM_TARGET, 2, 20, 0, 40, 0
delay 3
return

General_SyrupBombSpeedDrop::
createvisualtask AnimTask_StickySyrup, 0x5
jumpargeq 0x0, FALSE, SyrupBombSpeedDropRed
jumpargeq 0x0, TRUE, SyrupBombSpeedDropYellow

SyrupBombSpeedDropRed:
loadspritegfx ANIM_TAG_SYRUP_BLOB_RED
loadspritegfx ANIM_TAG_SYRUP_SHELL_RED
loopsewithpan SE_M_TOXIC, SOUND_PAN_TARGET, 13, 6
createvisualtask AnimTask_ShakeMon2, 5, ANIM_TARGET, 3, 0, 15, 1
createvisualtask AnimTask_BlendColorCycle, 2, F_PAL_TARGET, 1, 2, 0, 12, RGB(20, 3, 3)
createsprite gSyrupBombRedShellBSpriteTemplate, ANIM_TARGET, 1, ANIM_TARGET, 60
waitforvisualfinish
end

SyrupBombSpeedDropYellow:
loadspritegfx ANIM_TAG_SYRUP_BLOB_YELLOW
loadspritegfx ANIM_TAG_SYRUP_SHELL_YELLOW
loopsewithpan SE_M_TOXIC, SOUND_PAN_TARGET, 13, 6
createvisualtask AnimTask_ShakeMon2, 5, ANIM_TARGET, 3, 0, 15, 1
createvisualtask AnimTask_BlendColorCycle, 2, F_PAL_TARGET, 1, 2, 0, 12, RGB(23, 13, 1)
createsprite gSyrupBombYellowShellBSpriteTemplate, ANIM_TARGET, 1, ANIM_TARGET, 60
waitforvisualfinish
end

Move_TERA_BLAST::
Move_AXE_KICK::
Move_LAST_RESPECTS::
Expand Down Expand Up @@ -16572,7 +16680,6 @@ Move_PSYBLADE::
Move_HYDRO_STEAM::
Move_BLOOD_MOON::
Move_MATCHA_GOTCHA::
Move_SYRUP_BOMB::
Move_IVY_CUDGEL::
end @to do

Expand Down
5 changes: 3 additions & 2 deletions data/battle_scripts_1.s
Original file line number Diff line number Diff line change
Expand Up @@ -454,7 +454,8 @@ BattleScript_SyrupBombActivates::
return

BattleScript_SyrupBombEndTurn::
playstatchangeanimation BS_ATTACKER, BIT_SPEED, STAT_CHANGE_NEGATIVE
flushtextbox
playanimation BS_ATTACKER, B_ANIM_SYRUP_BOMB_SPEED_DROP
setstatchanger STAT_SPEED, 1, TRUE
statbuffchange STAT_CHANGE_ALLOW_PTR | STAT_CHANGE_NOT_PROTECT_AFFECTED, BattleScript_SyrupBombTurnDmgEnd
printfromtable gStatDownStringIds
Expand Down Expand Up @@ -7344,7 +7345,7 @@ BattleScript_StealthRockFree::
printstring STRINGID_PKMNBLEWAWAYSTEALTHROCK
waitmessage B_WAIT_TIME_LONG
return

BattleScript_SteelsurgeFree::
printstring STRINGID_PKMNBLEWAWAYSHARPSTEEL
waitmessage B_WAIT_TIME_LONG
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
19 changes: 19 additions & 0 deletions graphics/battle_anims/sprites/syrup_red.pal
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
JASC-PAL
0100
16
30 255 0
242 242 242
255 194 173
255 129 110
224 51 38
161 24 26
110 30 36
13 2 4
200 224 240
200 224 240
200 224 240
200 224 240
200 224 240
200 224 240
200 224 240
200 224 240
19 changes: 19 additions & 0 deletions graphics/battle_anims/sprites/syrup_yellow.pal
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
JASC-PAL
0100
16
30 255 0
242 242 242
255 255 168
255 235 82
255 192 0
185 104 4
107 59 19
13 2 4
200 224 240
200 224 240
200 224 240
200 224 240
200 224 240
200 224 240
200 224 240
200 224 240
1 change: 1 addition & 0 deletions include/battle.h
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ struct DisableStruct
u8 stickyWebDone:1;
u8 stealthRockDone:1;
u8 syrupBombTimer;
u8 syrupBombIsShiny:1;
u8 steelSurgeDone:1;
};

Expand Down
7 changes: 7 additions & 0 deletions include/constants/battle_anim.h
Original file line number Diff line number Diff line change
Expand Up @@ -400,6 +400,12 @@
#define ANIM_TAG_WOOD_HAMMER_HAMMER (ANIM_SPRITES_START + 386)
#define ANIM_TAG_SNOWFLAKES (ANIM_SPRITES_START + 387)

#define ANIM_TAG_SYRUP_BLOB_RED (ANIM_SPRITES_START + 388)
AlexOn1ine marked this conversation as resolved.
Show resolved Hide resolved
#define ANIM_TAG_SYRUP_SHELL_RED (ANIM_SPRITES_START + 389)
#define ANIM_TAG_SYRUP_BLOB_YELLOW (ANIM_SPRITES_START + 390)
#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)

// battlers
#define ANIM_ATTACKER 0
Expand Down Expand Up @@ -553,6 +559,7 @@
#define B_ANIM_SALT_CURE_DAMAGE 38
#define B_ANIM_DYNAMAX_GROWTH 39
#define B_ANIM_MAX_SET_WEATHER 40
#define B_ANIM_SYRUP_BOMB_SPEED_DROP 41

// special animations table (gBattleAnims_Special)
#define B_ANIM_LVL_UP 0
Expand Down
5 changes: 5 additions & 0 deletions include/graphics.h
Original file line number Diff line number Diff line change
Expand Up @@ -10349,6 +10349,11 @@ extern const u32 gBattleAnimSpriteGfx_WoodHammerHammer[];
extern const u32 gBattleAnimSpritePal_WoodHammerHammer[];
extern const u32 gBattleAnimSpriteGfx_Snowflakes[];
extern const u32 gBattleAnimSpritePal_Snowflakes[];
extern const u32 gBattleAnimSpriteGfx_SyrupBlob[];
extern const u32 gBattleAnimSpriteGfx_SyrupShell[];
extern const u32 gBattleAnimSpriteGfx_SyrupSplat[];
extern const u32 gBattleAnimSpritePal_SyrupRed[];
extern const u32 gBattleAnimSpritePal_SyrupYellow[];

extern const u32 gBattleAnimBgImage_Dark[];
extern const u32 gBattleAnimBgImage_Ghost[];
Expand Down
25 changes: 25 additions & 0 deletions src/battle_anim_new.c
Original file line number Diff line number Diff line change
Expand Up @@ -9148,3 +9148,28 @@ void AnimTask_GetWeatherToSet(u8 taskId)
}
DestroyAnimVisualTask(taskId);
}

void AnimTask_SyrupBomb(u8 taskId)
{
struct Pokemon *party = GetBattlerParty(gBattleAnimAttacker);

if (IsMonShiny(&party[gBattlerPartyIndexes[gBattleAnimAttacker]]))
{
gDisableStructs[gBattleAnimTarget].syrupBombIsShiny = TRUE;
gBattleAnimArgs[0] = TRUE;
}
else
{
gBattleAnimArgs[0] = FALSE;
}
DestroyAnimVisualTask(taskId);
AlexOn1ine marked this conversation as resolved.
Show resolved Hide resolved
}

void AnimTask_StickySyrup(u8 taskId)
{
if (gDisableStructs[gBattleAnimTarget].syrupBombIsShiny)
gBattleAnimArgs[0] = TRUE;
else
gBattleAnimArgs[0] = FALSE;
DestroyAnimVisualTask(taskId);
}
Loading
Loading