From 1de476da84b88bd977fe1bd4982b7e5f3c8f9fad Mon Sep 17 00:00:00 2001 From: SonikkuA-DatH <58025603+SonikkuA-DatH@users.noreply.github.com> Date: Sun, 28 Nov 2021 19:33:58 -0800 Subject: [PATCH 01/84] Update battle_script.inc --- asm/macros/battle_script.inc | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/asm/macros/battle_script.inc b/asm/macros/battle_script.inc index 6ba63f916..e5ba428f6 100644 --- a/asm/macros/battle_script.inc +++ b/asm/macros/battle_script.inc @@ -1924,6 +1924,31 @@ .macro shellsidearmcheck various BS_ATTACKER, VARIOUS_SHELL_SIDE_ARM_CHECK .endm + + .macro jumpifrodaffected battler:req, ptr:req + various \battler, VARIOUS_JUMP_IF_ROD + .4byte \ptr + .endm + + .macro jumpifabsorbaffected battler:req, ptr:req + various \battler, VARIOUS_JUMP_IF_ABSORB + .4byte \ptr + .endm + + .macro jumpifmotoraffected battler:req, ptr:req + various \battler, VARIOUS_JUMP_IF_MOTOR + .4byte \ptr + .endm + + .macro jumpifteanoberry ptr:req + various BS_ATTACKER, VARIOUS_TEATIME_TARGETS + .4byte \ptr + .endm + + .macro jumpifteainvulnerable battler:req, ptr:req + various \battler, VARIOUS_TEATIME_INVUL + .4byte \ptr + .endm @ helpful macros .macro setstatchanger stat:req, stages:req, down:req From c8fba3fa908e05cd7427628d83e807d1b8d03d96 Mon Sep 17 00:00:00 2001 From: SonikkuA-DatH <58025603+SonikkuA-DatH@users.noreply.github.com> Date: Sun, 28 Nov 2021 19:36:17 -0800 Subject: [PATCH 02/84] Update graphics.h --- include/graphics.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/graphics.h b/include/graphics.h index efb57bfde..bbd89686d 100644 --- a/include/graphics.h +++ b/include/graphics.h @@ -4918,6 +4918,8 @@ extern const u32 gBattleAnimSpriteGfx_Tornado[]; extern const u32 gBattleAnimSpritePal_Tornado[]; extern const u32 gBattleAnimSpriteGfx_ZMoveSymbol[]; extern const u32 gBattleAnimSpritePal_ZMoveSymbol[]; +extern const u32 gBattleAnimSpriteGfx_Teapot[]; +extern const u32 gBattleAnimSpritePal_Teapot[]; extern const u32 gBattleAnimBgImage_Dark[]; extern const u32 gBattleAnimBgImage_Ghost[]; From ca4207d497bb3add0aeebde087512a711a442c69 Mon Sep 17 00:00:00 2001 From: SonikkuA-DatH <58025603+SonikkuA-DatH@users.noreply.github.com> Date: Sun, 28 Nov 2021 19:40:55 -0800 Subject: [PATCH 03/84] Update battle_anim.h --- include/constants/battle_anim.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/constants/battle_anim.h b/include/constants/battle_anim.h index 7df75794e..7b0789fc0 100644 --- a/include/constants/battle_anim.h +++ b/include/constants/battle_anim.h @@ -395,6 +395,7 @@ #define ANIM_TAG_OMEGA_SYMBOL (ANIM_SPRITES_START + 383) #define ANIM_TAG_PRIMAL_PARTICLES (ANIM_SPRITES_START + 384) #define ANIM_TAG_STEEL_BEAM (ANIM_SPRITES_START + 385) +#define ANIM_TAG_TEAPOT (ANIM_SPRITES_START + 386) // battlers #define ANIM_ATTACKER 0 From 002556cf3f85ecc57115b69e540dfe64fb9fc213 Mon Sep 17 00:00:00 2001 From: SonikkuA-DatH <58025603+SonikkuA-DatH@users.noreply.github.com> Date: Sun, 28 Nov 2021 19:42:32 -0800 Subject: [PATCH 04/84] Update battle_script_commands.h --- include/constants/battle_script_commands.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/include/constants/battle_script_commands.h b/include/constants/battle_script_commands.h index bd16f741b..59869e65f 100644 --- a/include/constants/battle_script_commands.h +++ b/include/constants/battle_script_commands.h @@ -208,6 +208,11 @@ #define VARIOUS_SET_OCTOLOCK 135 #define VARIOUS_CUT_1_3_HP_RAISE_STATS 136 #define VARIOUS_TRY_END_NEUTRALIZING_GAS 137 +#define VARIOUS_JUMP_IF_ROD 138 +#define VARIOUS_JUMP_IF_ABSORB 139 +#define VARIOUS_JUMP_IF_MOTOR 140 +#define VARIOUS_TEATIME_INVUL 141 +#define VARIOUS_TEATIME_TARGETS 142 // Cmd_manipulatedamage #define DMG_CHANGE_SIGN 0 From 7b5dfa83afd7721d2e6f79709a8449f17555476e Mon Sep 17 00:00:00 2001 From: SonikkuA-DatH <58025603+SonikkuA-DatH@users.noreply.github.com> Date: Sun, 28 Nov 2021 19:44:02 -0800 Subject: [PATCH 05/84] Update battle_move_effects.h --- include/constants/battle_move_effects.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/include/constants/battle_move_effects.h b/include/constants/battle_move_effects.h index 3f24caf5e..2a86a7b4c 100644 --- a/include/constants/battle_move_effects.h +++ b/include/constants/battle_move_effects.h @@ -386,7 +386,9 @@ #define EFFECT_OCTOLOCK 380 #define EFFECT_CLANGOROUS_SOUL 381 #define EFFECT_BOLT_BEAK 382 +#define EFFECT_TEATIME 383 -#define NUM_BATTLE_MOVE_EFFECTS 383 + +#define NUM_BATTLE_MOVE_EFFECTS 384 #endif // GUARD_CONSTANTS_BATTLE_MOVE_EFFECTS_H From 10a870a568f73763a878a7dec9460926e36f2303 Mon Sep 17 00:00:00 2001 From: SonikkuA-DatH <58025603+SonikkuA-DatH@users.noreply.github.com> Date: Sun, 28 Nov 2021 19:45:47 -0800 Subject: [PATCH 06/84] Update battle_scripts_1.s --- data/battle_scripts_1.s | 67 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 67 insertions(+) diff --git a/data/battle_scripts_1.s b/data/battle_scripts_1.s index e9d019e43..dc8e0758b 100644 --- a/data/battle_scripts_1.s +++ b/data/battle_scripts_1.s @@ -403,6 +403,73 @@ gBattleScriptsForMoveEffects:: .4byte BattleScript_EffectOctolock @ EFFECT_OCTOLOCK .4byte BattleScript_EffectClangorousSoul @ EFFECT_CLANGOROUS_SOUL .4byte BattleScript_EffectHit @ EFFECT_BOLT_BEAK + .4byte BattleScript_EffectTeatime @ EFFECT_TEATIME + +BattleScript_EffectTeatime:: + attackcanceler + attackstring + ppreduce + jumpifteanoberry BattleScript_ButItFailed +@ at least one battler is affected + attackanimation + waitanimation +BattleScript_TeatimeLoop: +jumpifteainvulnerable BS_TARGET, BattleScript_Teatimevul +jumpifrodaffected BS_TARGET, BattleScript_Teatimerod +jumpifabsorbaffected BS_TARGET, BattleScript_Teatimesorb +jumpifmotoraffected BS_TARGET, BattleScript_Teatimemotor + orword gHitMarker, HITMARKER_NO_ANIMATIONS + setbyte sBERRY_OVERRIDE, TRUE @ override the requirements for eating berries + consumeberry BS_TARGET, TRUE @ consume the berry, then restore the item from changedItems + bicword gHitMarker, HITMARKER_NO_ANIMATIONS + setbyte sBERRY_OVERRIDE, FALSE + moveendto MOVEEND_NEXT_TARGET + jumpifnexttargetvalid BattleScript_TeatimeLoop + moveendcase MOVEEND_CLEAR_BITS + goto BattleScript_MoveEnd +BattleScript_Teatimevul: + moveendto MOVEEND_NEXT_TARGET + jumpifnexttargetvalid BattleScript_TeatimeLoop + moveendcase MOVEEND_CLEAR_BITS + goto BattleScript_MoveEnd +BattleScript_Teatimesorb: + copybyte gBattlerAbility, gBattlerTarget + call BattleScript_AbilityPopUp + moveendto MOVEEND_NEXT_TARGET + jumpifnexttargetvalid BattleScript_TeatimeLoop + moveendcase MOVEEND_CLEAR_BITS + goto BattleScript_MoveEnd +BattleScript_Teatimerod: + copybyte gBattlerAbility, gBattlerTarget + call BattleScript_AbilityPopUp + playstatchangeanimation BS_TARGET, BIT_SPATK, STAT_CHANGE_BY_TWO + setstatchanger STAT_SPATK, 1, FALSE + statbuffchange STAT_BUFF_ALLOW_PTR, BattleScript_TeatimeBuffer + jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, 0x2, BattleScript_TeatimeBuffer + printfromtable gStatUpStringIds + waitmessage 0x40 + moveendto MOVEEND_NEXT_TARGET + jumpifnexttargetvalid BattleScript_TeatimeLoop + moveendcase MOVEEND_CLEAR_BITS + goto BattleScript_MoveEnd +BattleScript_Teatimemotor: + copybyte gBattlerAbility, gBattlerTarget + call BattleScript_AbilityPopUp + playstatchangeanimation BS_TARGET, BIT_SPEED, STAT_CHANGE_BY_TWO + setstatchanger STAT_SPEED, 1, FALSE + statbuffchange STAT_BUFF_ALLOW_PTR, BattleScript_TeatimeBuffer + jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, 0x2, BattleScript_TeatimeBuffer + printfromtable gStatUpStringIds + waitmessage 0x40 + moveendto MOVEEND_NEXT_TARGET + jumpifnexttargetvalid BattleScript_TeatimeLoop + moveendcase MOVEEND_CLEAR_BITS + goto BattleScript_MoveEnd +BattleScript_TeatimeBuffer: + moveendto MOVEEND_NEXT_TARGET + jumpifnexttargetvalid BattleScript_TeatimeLoop + moveendcase MOVEEND_CLEAR_BITS + goto BattleScript_MoveEnd BattleScript_EffectShellSideArm: shellsidearmcheck From adecc77fe8c4112556134b42d4a521c520d0058f Mon Sep 17 00:00:00 2001 From: SonikkuA-DatH <58025603+SonikkuA-DatH@users.noreply.github.com> Date: Sun, 28 Nov 2021 19:47:09 -0800 Subject: [PATCH 07/84] Update battle_anim_scripts.s --- data/battle_anim_scripts.s | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/data/battle_anim_scripts.s b/data/battle_anim_scripts.s index 350ba2cc0..a96210571 100644 --- a/data/battle_anim_scripts.s +++ b/data/battle_anim_scripts.s @@ -13351,7 +13351,18 @@ Move_DRAGON_DARTS:: end Move_TEATIME:: - goto Move_MILK_DRINK + loadspritegfx ANIM_TAG_TEAPOT + loadspritegfx ANIM_TAG_THOUGHT_BUBBLE + createsprite gThoughtBubbleSpriteTemplate, ANIM_ATTACKER, 11, 0, 100 + playsewithpan SE_M_ICY_WIND, SOUND_PAN_ATTACKER + delay 6 + createsprite gTeapotSpriteTemplate, ANIM_ATTACKER, 12, 0 + createvisualtask AnimTask_RockMonBackAndForth, 5, ANIM_ATTACKER, 2, 0 + createvisualtask AnimTask_RockMonBackAndForth, 5, ANIM_ATK_PARTNER, 2, 0 + delay 24 + loopsewithpan SE_M_HEAL_BELL, SOUND_PAN_ATTACKER, 22, 3 + waitforvisualfinish + end Move_OCTOLOCK:: loadspritegfx ANIM_TAG_TENDRILS From 7fe8e956e788f7a03d17f5f6a496d41f6bbc9587 Mon Sep 17 00:00:00 2001 From: SonikkuA-DatH <58025603+SonikkuA-DatH@users.noreply.github.com> Date: Sun, 28 Nov 2021 19:49:03 -0800 Subject: [PATCH 08/84] Update battle_anim.c --- src/battle_anim.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/battle_anim.c b/src/battle_anim.c index e6152a7cf..2a4e2feea 100644 --- a/src/battle_anim.c +++ b/src/battle_anim.c @@ -1568,6 +1568,7 @@ const struct CompressedSpriteSheet gBattleAnimPicTable[] = {gBattleAnimSpriteGfx_OmegaSymbol, 0x0200, ANIM_TAG_OMEGA_SYMBOL}, {gBattleAnimSpriteGfx_PrimalParticles, 0x0180, ANIM_TAG_PRIMAL_PARTICLES}, {gBattleAnimSpriteGfx_Orbs, 0x0180, ANIM_TAG_STEEL_BEAM}, + {gBattleAnimSpriteGfx_Teapot, 0x1800, ANIM_TAG_TEAPOT}, }; const struct CompressedSpritePalette gBattleAnimPaletteTable[] = @@ -2019,6 +2020,7 @@ const struct CompressedSpritePalette gBattleAnimPaletteTable[] = {gBattleAnimSpritePal_OmegaSymbol, ANIM_TAG_OMEGA_SYMBOL}, {gBattleAnimSpritePal_PrimalParticles, ANIM_TAG_PRIMAL_PARTICLES}, {gBattleAnimSpritePal_SteelBeam, ANIM_TAG_STEEL_BEAM}, + {gBattleAnimSpritePal_Teapot, ANIM_TAG_TEAPOT}, }; const struct BattleAnimBackground gBattleAnimBackgroundTable[] = From 3c33a4b3d796391d825efb9e1149137e4d61abf9 Mon Sep 17 00:00:00 2001 From: SonikkuA-DatH <58025603+SonikkuA-DatH@users.noreply.github.com> Date: Sun, 28 Nov 2021 19:50:25 -0800 Subject: [PATCH 09/84] Update battle_anim_effects_1.c --- src/battle_anim_effects_1.c | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/src/battle_anim_effects_1.c b/src/battle_anim_effects_1.c index 3498346f2..ad2eed896 100644 --- a/src/battle_anim_effects_1.c +++ b/src/battle_anim_effects_1.c @@ -2447,6 +2447,39 @@ const struct SpriteTemplate gFollowMeFingerSpriteTemplate = .callback = AnimFollowMeFinger, }; +const union AffineAnimCmd gTeaAffineAnimCmds1[] = +{ + AFFINEANIMCMD_FRAME(0x10, 0x10, 0, 0), + AFFINEANIMCMD_FRAME(0x1E, 0x1E, 0, 8), + AFFINEANIMCMD_END, +}; + +const union AffineAnimCmd gTeaAffineAnimCmds2[] = +{ + AFFINEANIMCMD_FRAME(0x0, 0x0, -3, 11), + AFFINEANIMCMD_FRAME(0x0, 0x0, 3, 11), + AFFINEANIMCMD_LOOP(2), + AFFINEANIMCMD_FRAME(0xFFE2, 0xFFE2, 0, 8), + AFFINEANIMCMD_END, +}; + +const union AffineAnimCmd *const gTeaAffineAnimTable[] = +{ + gTeaAffineAnimCmds1, + gTeaAffineAnimCmds2, +}; + +const struct SpriteTemplate gTeapotSpriteTemplate = +{ + .tileTag = ANIM_TAG_TEAPOT, + .paletteTag = ANIM_TAG_TEAPOT, + .oam = &gOamData_AffineDouble_ObjNormal_64x64, + .anims = gDummySpriteAnimTable, + .images = NULL, + .affineAnims = gTeaAffineAnimTable, + .callback = AnimMetronomeFinger, +}; + const union AnimCmd gTauntFingerAnimCmds1[] = { ANIMCMD_FRAME(0, 1), From 1a882dddb4df0207a5bdf1a7b30ad66391be0083 Mon Sep 17 00:00:00 2001 From: SonikkuA-DatH <58025603+SonikkuA-DatH@users.noreply.github.com> Date: Sun, 28 Nov 2021 19:54:34 -0800 Subject: [PATCH 10/84] Update battle_script_commands.c --- src/battle_script_commands.c | 109 +++++++++++++++++++++++++++++++++++ 1 file changed, 109 insertions(+) diff --git a/src/battle_script_commands.c b/src/battle_script_commands.c index 4ae42cb48..d90f687ec 100644 --- a/src/battle_script_commands.c +++ b/src/battle_script_commands.c @@ -7509,6 +7509,72 @@ static bool32 IsRototillerAffected(u32 battlerId) return TRUE; } +static bool32 IsAbilityRodAffected(void) +{ + u32 moveType; + + if (gBattleStruct->dynamicMoveType == 0) + moveType = gBattleMoves[gCurrentMove].type; + else if (!(gBattleStruct->dynamicMoveType & 0x40)) + moveType = gBattleStruct->dynamicMoveType & 0x3F; + else + moveType = gBattleMoves[gCurrentMove].type; + + if (moveType == TYPE_ELECTRIC && GetBattlerAbility(gBattlerTarget) == ABILITY_LIGHTNING_ROD) { + return TRUE; + } + else { + return FALSE; + } +} + +static bool32 IsAbilityMotorAffected(void) +{ + u32 moveType; + + if (gBattleStruct->dynamicMoveType == 0) + moveType = gBattleMoves[gCurrentMove].type; + else if (!(gBattleStruct->dynamicMoveType & 0x40)) + moveType = gBattleStruct->dynamicMoveType & 0x3F; + else + moveType = gBattleMoves[gCurrentMove].type; + + if (moveType == TYPE_ELECTRIC && GetBattlerAbility(gBattlerTarget) == ABILITY_MOTOR_DRIVE) { + return TRUE; + } + else { + return FALSE; + } +} + +static bool32 IsAbilityAbsorbAffected(void) +{ + u32 moveType; + + if (gBattleStruct->dynamicMoveType == 0) + moveType = gBattleMoves[gCurrentMove].type; + else if (!(gBattleStruct->dynamicMoveType & 0x40)) + moveType = gBattleStruct->dynamicMoveType & 0x3F; + else + moveType = gBattleMoves[gCurrentMove].type; + + if (moveType == TYPE_ELECTRIC && GetBattlerAbility(gBattlerTarget) == ABILITY_VOLT_ABSORB) { + return TRUE; + } + else { + return FALSE; + } +} + +static bool32 IsTeatimeAffected(u32 battlerId) +{ + if (ItemId_GetPocket(gBattleMons[battlerId].item) != POCKET_BERRIES) + return FALSE; // Only berries + if (gStatuses3[battlerId] & STATUS3_SEMI_INVULNERABLE) + return FALSE; // Teatime doesn't affected semi-invulnerable battlers + return TRUE; +} + static void Cmd_various(void) { struct Pokemon *mon; @@ -9285,6 +9351,49 @@ static void Cmd_various(void) gBattlescriptCurrInstr += 7; return; } + case VARIOUS_TEATIME_TARGETS: + // Gets the battlers to be affected by teatime. If there are none, print 'But it failed!' + { + u32 count = 0; + for (i = 0; i < gBattlersCount; i++) + { + if (IsTeatimeAffected(i)) + { + count++; + } + } + if (count == 0) { + gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 3); // Teatime fails + } + else { + gBattlescriptCurrInstr += 7; + } + } + return; + case VARIOUS_TEATIME_INVUL: + if (ItemId_GetPocket(gBattleMons[gActiveBattler].item) == POCKET_BERRIES && !(gStatuses3[gBattlerTarget] & (STATUS3_SEMI_INVULNERABLE))) + gBattlescriptCurrInstr += 7; + else + gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 3); + return; + case VARIOUS_JUMP_IF_ROD: + if (IsAbilityRodAffected()) + gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 3); + else + gBattlescriptCurrInstr += 7; + return; + case VARIOUS_JUMP_IF_MOTOR: + if (IsAbilityMotorAffected()) + gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 3); + else + gBattlescriptCurrInstr += 7; + return; + case VARIOUS_JUMP_IF_ABSORB: + if (IsAbilityAbsorbAffected()) + gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 3); + else + gBattlescriptCurrInstr += 7; + return; } // End of switch (gBattlescriptCurrInstr[2]) gBattlescriptCurrInstr += 3; From 492f8d8f29cdc0f6975757585cbed09f7c2f3e23 Mon Sep 17 00:00:00 2001 From: SonikkuA-DatH <58025603+SonikkuA-DatH@users.noreply.github.com> Date: Sun, 28 Nov 2021 19:55:49 -0800 Subject: [PATCH 11/84] Update battle_util.c --- src/battle_util.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/battle_util.c b/src/battle_util.c index 7e2320500..e158c7e88 100644 --- a/src/battle_util.c +++ b/src/battle_util.c @@ -387,7 +387,7 @@ void HandleAction_UseMove(void) { gActiveBattler = gBattlerByTurnOrder[var]; RecordAbilityBattle(gActiveBattler, gBattleMons[gActiveBattler].ability); - if (GetBattlerAbility(gActiveBattler) == ABILITY_LIGHTNING_ROD) + if (GetBattlerAbility(gActiveBattler) == ABILITY_LIGHTNING_ROD && gCurrentMove != MOVE_TEATIME) gSpecialStatuses[gActiveBattler].lightningRodRedirected = TRUE; else if (GetBattlerAbility(gActiveBattler) == ABILITY_STORM_DRAIN) gSpecialStatuses[gActiveBattler].stormDrainRedirected = TRUE; From 5258ddcc8efef33492f7e3006d91dd46516fba55 Mon Sep 17 00:00:00 2001 From: SonikkuA-DatH <58025603+SonikkuA-DatH@users.noreply.github.com> Date: Sun, 28 Nov 2021 19:57:05 -0800 Subject: [PATCH 12/84] Update graphics.c --- src/graphics.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/graphics.c b/src/graphics.c index 1621f9d5b..b4d2c8338 100644 --- a/src/graphics.c +++ b/src/graphics.c @@ -293,6 +293,8 @@ const u32 gBattleAnimSpritePal_Tornado[] = INCBIN_U32("graphics/battle_anims/spr const u32 gBattleAnimSpriteGfx_ZMoveSymbol[] = INCBIN_U32("graphics/battle_anims/sprites/new/z_move_symbol.4bpp.lz"); const u32 gBattleAnimSpritePal_ZMoveSymbol[] = INCBIN_U32("graphics/battle_anims/sprites/new/z_move_symbol.gbapal.lz"); +const u32 gBattleAnimSpriteGfx_Teapot[] = INCBIN_U32("graphics/battle_anims/sprites/new/teapot.4bpp.lz"); +const u32 gBattleAnimSpritePal_Teapot[] = INCBIN_U32("graphics/battle_anims/sprites/new/teapot.gbapal.lz"); // Battle anims const u32 gBattleAnimSpriteGfx_Bubble[] = INCBIN_U32("graphics/battle_anims/sprites/bubble.4bpp.lz"); From ec596cf9b2fea01b686aa093021b4264055c0b3d Mon Sep 17 00:00:00 2001 From: SonikkuA-DatH <58025603+SonikkuA-DatH@users.noreply.github.com> Date: Sun, 28 Nov 2021 19:58:18 -0800 Subject: [PATCH 13/84] Update battle_moves.h Not sure why it works better with User than "All targets" --- src/data/battle_moves.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/data/battle_moves.h b/src/data/battle_moves.h index a49cf5fd8..691180afb 100644 --- a/src/data/battle_moves.h +++ b/src/data/battle_moves.h @@ -10857,13 +10857,13 @@ const struct BattleMove gBattleMoves[MOVES_COUNT] = [MOVE_TEATIME] = { - .effect = EFFECT_PLACEHOLDER, //TODO + .effect = EFFECT_TEATIME, .power = 0, .type = TYPE_NORMAL, .accuracy = 0, .pp = 10, .secondaryEffectChance = 0, - .target = MOVE_TARGET_ALL_BATTLERS, + .target = MOVE_TARGET_USER, .priority = 0, .flags = 0, .split = SPLIT_STATUS, From 9d14cb33094e3216128d7557dbd07a66d6e83833 Mon Sep 17 00:00:00 2001 From: SonikkuA-DatH <58025603+SonikkuA-DatH@users.noreply.github.com> Date: Sun, 28 Nov 2021 19:59:38 -0800 Subject: [PATCH 14/84] Add files via upload Teapot sprited by me. Based on this: https://cdn.discordapp.com/attachments/425852970689626123/914062336476708874/unknown.png --- graphics/battle_anims/sprites/new/teapot.pal | 19 +++++++++++++++++++ graphics/battle_anims/sprites/new/teapot.png | Bin 0 -> 881 bytes 2 files changed, 19 insertions(+) create mode 100644 graphics/battle_anims/sprites/new/teapot.pal create mode 100644 graphics/battle_anims/sprites/new/teapot.png diff --git a/graphics/battle_anims/sprites/new/teapot.pal b/graphics/battle_anims/sprites/new/teapot.pal new file mode 100644 index 000000000..9b59309ba --- /dev/null +++ b/graphics/battle_anims/sprites/new/teapot.pal @@ -0,0 +1,19 @@ +JASC-PAL +0100 +16 +10 247 12 +144 141 173 +255 255 255 +207 232 255 +106 104 120 +190 211 255 +166 169 214 +214 171 113 +162 119 89 +72 71 81 +251 255 211 +232 207 121 +255 255 153 +124 86 73 +0 0 0 +0 0 0 diff --git a/graphics/battle_anims/sprites/new/teapot.png b/graphics/battle_anims/sprites/new/teapot.png new file mode 100644 index 0000000000000000000000000000000000000000..6be0680dfce165621cf650c7b94fb1f8d456f83e GIT binary patch literal 881 zcmV-%1CIQOP)KYHc)rvB zrm5D}t8t=tSx84w`~TDE&w2mY4{Y$~^xY4GlY)n??Hlj=$@kv(y>kfpUw>5@x|9wq8{6py zhGFcd0z1Z5I#4Y^DnM2tmnOH(73;+P@{+v3i-)^=F#PGp7tXnLjo`3qIm4!}J(jmB zGYw9Q0b7LvG{+rvu(Jor>sEgmBUY;nA@on>`N1ZfBpveX+9)!BaLgSEd@jux@S8gO zXc)zCeCibL@L$st%Zsd6(rKVYN-7}w~#bxOC z6tJ?%*mg9%_D0cI7f0!0EHIg-#28!04!sCV0%-AC`A7rHtg{*}S^|**diR{S@ANoK zg2Vv=BLRf!j&sgc3mKz^YbY~zqycHc`F#wmY#tMGc3ZdRfQJ}Z7Eh=XBAtitz=74@%0Y}z8$xNo#aR}9f&pZ9TN?FAa89VX}Zx$%T022VS zJ*+4J&=|-vOu2xYelie%LpS;=gaj4?#&&m^*74DRLwhk$$1i1Zg2ZE40>Bh%RirFF zrOPOo1vvjOATe+(fLr0M3R`F*pbbbCz}$a-Teju>w(7CL`O|wX100)W_$2heR)cKt z_7i{>qShtA)G{gWBp!Svk9xt@fZPP-g9Jd_D<}-*6d1FG!3|xzO9JGT`wc(=O#!s% zn^{11I-W!UjzHYdq8oF%=oEkZ10=vHt;_>xfq+QU#8uPWpZ_x1JV*lopSPYdAjHf! zgiPt$vj$l2sIFGdeNHFYD-FD$BjF0fbYIem7?_(T|I76odMBJs< Date: Mon, 2 May 2022 06:04:16 +0300 Subject: [PATCH 15/84] Initial commit --- include/battle_util.h | 1 + src/battle_ai_util.c | 34 +++++++++++++++++++++++++++++----- src/battle_util.c | 14 ++++++++++---- 3 files changed, 40 insertions(+), 9 deletions(-) diff --git a/include/battle_util.h b/include/battle_util.h index d2d7ac29f..bf6d4280c 100644 --- a/include/battle_util.h +++ b/include/battle_util.h @@ -133,6 +133,7 @@ u16 CalcTypeEffectivenessMultiplier(u16 move, u8 moveType, u8 battlerAtk, u8 bat u16 CalcPartyMonTypeEffectivenessMultiplier(u16 move, u16 speciesDef, u16 abilityDef); u16 GetTypeModifier(u8 atkType, u8 defType); s32 GetStealthHazardDamage(u8 hazardType, u8 battlerId); +s32 GetStealthHazardDamageByTypesAndHP(u8 hazardType, u8 type1, u8 type2, u32 maxHp); u16 GetMegaEvolutionSpecies(u16 preEvoSpecies, u16 heldItemId); u16 GetWishMegaEvolutionSpecies(u16 preEvoSpecies, u16 moveId1, u16 moveId2, u16 moveId3, u16 moveId4); bool32 CanMegaEvolve(u8 battlerId); diff --git a/src/battle_ai_util.c b/src/battle_ai_util.c index de4271bba..79c2f7ed3 100644 --- a/src/battle_ai_util.c +++ b/src/battle_ai_util.c @@ -2437,19 +2437,43 @@ static bool32 PartyBattlerShouldAvoidHazards(u8 currBattler, u8 switchBattler) { struct Pokemon *mon = GetPartyBattlerPartyData(currBattler, switchBattler); u16 ability = GetMonAbility(mon); // we know our own party data - u16 holdEffect = GetBattlerHoldEffect(GetMonData(mon, MON_DATA_HELD_ITEM), TRUE); + u16 holdEffect; + u16 species = GetMonData(mon, MON_DATA_SPECIES); u32 flags = gSideStatuses[GetBattlerSide(currBattler)] & (SIDE_STATUS_SPIKES | SIDE_STATUS_STEALTH_ROCK | SIDE_STATUS_STICKY_WEB | SIDE_STATUS_TOXIC_SPIKES); + s32 hazardDamage = 0; + u8 type1 = gBaseStats[species].type1; + u8 type2 = gBaseStats[species].type2; + u32 maxHp = GetMonData(mon, MON_DATA_MAX_HP); if (flags == 0) return FALSE; - if (ability == ABILITY_MAGIC_GUARD || ability == ABILITY_LEVITATE - || holdEffect == HOLD_EFFECT_HEAVY_DUTY_BOOTS) + if (ability == ABILITY_MAGIC_GUARD) + return FALSE; + if (!(gFieldStatuses & STATUS_FIELD_MAGIC_ROOM || ability == ABILITY_KLUTZ)) + holdEffect = gItems[GetMonData(mon, MON_DATA_HELD_ITEM)].holdEffect; + else + holdEffect = HOLD_EFFECT_NONE; + if (holdEffect == HOLD_EFFECT_HEAVY_DUTY_BOOTS) return FALSE; - if (flags & (SIDE_STATUS_SPIKES | SIDE_STATUS_STEALTH_ROCK) && GetMonData(mon, MON_DATA_HP) < (GetMonData(mon, MON_DATA_MAX_HP) / 8)) - return TRUE; + if (flags & SIDE_STATUS_STEALTH_ROCK) + { + hazardDamage += GetStealthHazardDamageByTypesAndHP(gBattleMoves[MOVE_STEALTH_ROCK].type, type1, type2, maxHp); + } + if (flags & SIDE_STATUS_SPIKES && ((type1 != TYPE_FLYING && type2 != TYPE_FLYING + && ability != ABILITY_LEVITATE && holdEffect != HOLD_EFFECT_AIR_BALLOON) + || holdEffect == HOLD_EFFECT_IRON_BALL || gFieldStatuses & STATUS_FIELD_GRAVITY)) + { + u8 spikesDmg = maxHp / ((5 - gSideTimers[GetBattlerSide(currBattler)].spikesAmount) * 2); + if (spikesDmg == 0) + spikesDmg = 1; + hazardDamage += spikesDmg; + } + + if (hazardDamage >= GetMonData(mon, MON_DATA_HP)) + return TRUE; return FALSE; } diff --git a/src/battle_util.c b/src/battle_util.c index c0a7f2150..06b7c03d2 100644 --- a/src/battle_util.c +++ b/src/battle_util.c @@ -9216,11 +9216,8 @@ u16 GetTypeModifier(u8 atkType, u8 defType) return sTypeEffectivenessTable[atkType][defType]; } -s32 GetStealthHazardDamage(u8 hazardType, u8 battlerId) +s32 GetStealthHazardDamageByTypesAndHP(u8 hazardType, u8 type1, u8 type2, u32 maxHp) { - u8 type1 = gBattleMons[battlerId].type1; - u8 type2 = gBattleMons[battlerId].type2; - u32 maxHp = gBattleMons[battlerId].maxHP; s32 dmg = 0; u16 modifier = UQ_4_12(1.0); @@ -9263,6 +9260,15 @@ s32 GetStealthHazardDamage(u8 hazardType, u8 battlerId) return dmg; } +s32 GetStealthHazardDamage(u8 hazardType, u8 battlerId) +{ + u8 type1 = gBattleMons[battlerId].type1; + u8 type2 = gBattleMons[battlerId].type2; + u32 maxHp = gBattleMons[battlerId].maxHP; + + return GetStealthHazardDamageByTypesAndHP(hazardType, type1, type2, maxHp); +} + bool32 IsPartnerMonFromSameTrainer(u8 battlerId) { if (GetBattlerSide(battlerId) == B_SIDE_OPPONENT && gBattleTypeFlags & BATTLE_TYPE_TWO_OPPONENTS) From f96fc60ac48db813a47be8afee317ef26f35beb8 Mon Sep 17 00:00:00 2001 From: sneed Date: Mon, 2 May 2022 06:20:49 +0300 Subject: [PATCH 16/84] removed brackets --- src/battle_ai_util.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/battle_ai_util.c b/src/battle_ai_util.c index 79c2f7ed3..e9807f915 100644 --- a/src/battle_ai_util.c +++ b/src/battle_ai_util.c @@ -2458,9 +2458,7 @@ static bool32 PartyBattlerShouldAvoidHazards(u8 currBattler, u8 switchBattler) return FALSE; if (flags & SIDE_STATUS_STEALTH_ROCK) - { hazardDamage += GetStealthHazardDamageByTypesAndHP(gBattleMoves[MOVE_STEALTH_ROCK].type, type1, type2, maxHp); - } if (flags & SIDE_STATUS_SPIKES && ((type1 != TYPE_FLYING && type2 != TYPE_FLYING && ability != ABILITY_LEVITATE && holdEffect != HOLD_EFFECT_AIR_BALLOON) From 00e9d0288976e9bb91d8bdd734113833b6095c63 Mon Sep 17 00:00:00 2001 From: sneed Date: Tue, 3 May 2022 15:06:56 +0300 Subject: [PATCH 17/84] minor change --- src/battle_ai_util.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/battle_ai_util.c b/src/battle_ai_util.c index e9807f915..95419da94 100644 --- a/src/battle_ai_util.c +++ b/src/battle_ai_util.c @@ -2450,10 +2450,10 @@ static bool32 PartyBattlerShouldAvoidHazards(u8 currBattler, u8 switchBattler) if (ability == ABILITY_MAGIC_GUARD) return FALSE; - if (!(gFieldStatuses & STATUS_FIELD_MAGIC_ROOM || ability == ABILITY_KLUTZ)) - holdEffect = gItems[GetMonData(mon, MON_DATA_HELD_ITEM)].holdEffect; - else + if (gFieldStatuses & STATUS_FIELD_MAGIC_ROOM || ability == ABILITY_KLUTZ) holdEffect = HOLD_EFFECT_NONE; + else + holdEffect = gItems[GetMonData(mon, MON_DATA_HELD_ITEM)].holdEffect; if (holdEffect == HOLD_EFFECT_HEAVY_DUTY_BOOTS) return FALSE; From 653364fd71c7e8925b61b2f025e541cafa2bbb98 Mon Sep 17 00:00:00 2001 From: LOuroboros Date: Fri, 2 Dec 2022 23:01:22 -0300 Subject: [PATCH 18/84] Added the basic data for the Gen. 9 Abilities --- include/constants/abilities.h | 37 +++++++++- src/battle_debug.c | 2 +- src/data/text/abilities.h | 124 ++++++++++++++++++++++++++++++++++ 3 files changed, 161 insertions(+), 2 deletions(-) diff --git a/include/constants/abilities.h b/include/constants/abilities.h index 23b9fe2b7..94e5986f7 100644 --- a/include/constants/abilities.h +++ b/include/constants/abilities.h @@ -292,6 +292,41 @@ #define ABILITIES_COUNT_GEN8 268 -#define ABILITIES_COUNT ABILITIES_COUNT_GEN8 +// Gen 9 +#define ABILITY_LINGERING_AROMA 268 +#define ABILITY_SEED_SOWER 269 +#define ABILITY_THERMAL_EXCHANGE 270 +#define ABILITY_ANGER_SHELL 271 +#define ABILITY_PURIFYING_SALT 272 +#define ABILITY_WELL_BAKED_BODY 273 +#define ABILITY_WIND_RIDER 274 +#define ABILITY_GUARD_DOG 275 +#define ABILITY_ROCKY_PAYLOAD 276 +#define ABILITY_WIND_POWER 277 +#define ABILITY_ZERO_TO_HERO 278 +#define ABILITY_COMMANDER 279 +#define ABILITY_ELECTROMORPHOSIS 280 +#define ABILITY_PROTOSYNTHESIS 281 +#define ABILITY_QUARK_DRIVE 282 +#define ABILITY_GOOD_AS_GOLD 283 +#define ABILITY_VESSEL_OF_RUIN 284 +#define ABILITY_SWORD_OF_RUIN 285 +#define ABILITY_TABLETS_OF_RUIN 286 +#define ABILITY_BEADS_OF_RUIN 287 +#define ABILITY_ORICHALCUM_PULSE 288 +#define ABILITY_HADRON_ENGINE 289 +#define ABILITY_OPPORTUNIST 290 +#define ABILITY_CUD_CHEW 291 +#define ABILITY_SHARPNESS 292 +#define ABILITY_SUPREME_OVERLORD 293 +#define ABILITY_COSTAR 294 +#define ABILITY_TOXIC_DEBRIS 295 +#define ABILITY_ARMOR_TAIL 296 +#define ABILITY_EARTH_EATER 297 +#define ABILITY_MYCELIUM_MIGHT 298 + +#define ABILITIES_COUNT_GEN9 299 + +#define ABILITIES_COUNT ABILITIES_COUNT_GEN9 #endif // GUARD_CONSTANTS_ABILITIES_H diff --git a/src/battle_debug.c b/src/battle_debug.c index 568b9a96e..a8f975096 100644 --- a/src/battle_debug.c +++ b/src/battle_debug.c @@ -1759,7 +1759,7 @@ static void SetUpModifyArrows(struct BattleDebugMenu *data) { case LIST_ITEM_ABILITY: data->modifyArrows.minValue = 0; - data->modifyArrows.maxValue = ABILITIES_COUNT_GEN8 - 1; + data->modifyArrows.maxValue = ABILITIES_COUNT - 1; data->modifyArrows.maxDigits = 3; data->modifyArrows.modifiedValPtr = &gBattleMons[data->battlerId].ability; data->modifyArrows.typeOfVal = VAL_U16; diff --git a/src/data/text/abilities.h b/src/data/text/abilities.h index ac11b9de8..96407c340 100644 --- a/src/data/text/abilities.h +++ b/src/data/text/abilities.h @@ -254,6 +254,37 @@ static const u8 sChillingNeighDescription[] = _("KOs boost Attack stat."); static const u8 sGrimNeighDescription[] = _("KOs boost Sp. Atk stat."); static const u8 sAsOneIceRiderDescription[] = _("Unnerve and Chilling Neigh."); static const u8 sAsOneShadowRiderDescription[] = _("Unnerve and Grim Neigh."); +static const u8 sLingeringAromaDescription[] = _("Spreads with contact."); +static const u8 sSeedSowerDescription[] = _("Affects terrain when hit."); +static const u8 sThermalExchangeDescription[] = _("Fire hits up Attack."); +static const u8 sAngerShellDescription[] = _("Gets angry at half HP."); +static const u8 sPurifyingSaltDescription[] = _("Protected by pure salts."); +static const u8 sWellBakedBodyDescription[] = _("Strengthened by Fire."); +static const u8 sWindRiderDescription[] = _("Ups Attack if hit by wind."); +static const u8 sGuardDogDescription[] = _("Cannot be intimidated."); +static const u8 sRockyPayloadDescription[] = _("Powers up Rock moves."); +static const u8 sWindPowerDescription[] = _("Gets charged by wind."); +static const u8 sZeroToHeroDescription[] = _("Changes form on switch out."); +static const u8 sCommanderDescription[] = _("Commands from Dondozo."); +static const u8 sElectromorphosisDescription[] = _("Gets Charged on contact."); +static const u8 sProtosynthesisDescription[] = _("Sun boosts best stat."); +static const u8 sQuarkDriveDescription[] = _("Elec. field ups best stat."); +static const u8 sGoodAsGoldDescription[] = _("Avoids status problems."); +static const u8 sVesselOfRuinDescription[] = _("Lowers foes' sp. damage."); +static const u8 sSwordOfRuinDescription[] = _("Lowers foes' defense."); +static const u8 sTabletsOfRuinDescription[] = _("Lowers foes' damage."); +static const u8 sBeadsOfRuinDescription[] = _("Lowers foes' sp. defense."); +static const u8 sOrichalcumPulseDescription[] = _("Summons sunlight in battle."); +static const u8 sHadronEngineDescription[] = _("Field becomes Electric."); +static const u8 sOpportunistDescription[] = _("Copies foe's stat change."); +static const u8 sCudChewDescription[] = _("Eats a used berry again."); +static const u8 sSharpnessDescription[] = _("Strengthens cutting moves."); +static const u8 sSupremeOverlordDescription[] = _("Inherits fallen's strength."); +static const u8 sCostarDescription[] = _("Copies ally's stat changes."); +static const u8 sToxicDebrisDescription[] = _("Throws poison spikes if hit."); +static const u8 sArmorTailDescription[] = _("Protects from priority."); +static const u8 sEarthEaterDescription[] = _("Eats ground to heal HP."); +static const u8 sMyceliumMightDescription[] = _("Status moves never fail."); #if B_EXPANDED_ABILITY_NAMES == TRUE const u8 gAbilityNames[ABILITIES_COUNT][ABILITY_NAME_LENGTH + 1] = @@ -526,6 +557,37 @@ const u8 gAbilityNames[ABILITIES_COUNT][ABILITY_NAME_LENGTH + 1] = [ABILITY_GRIM_NEIGH] = _("Grim Neigh"), [ABILITY_AS_ONE_ICE_RIDER] = _("As One"), [ABILITY_AS_ONE_SHADOW_RIDER] = _("As One"), + [ABILITY_LINGERING_AROMA] = _("Lingering Aroma"), + [ABILITY_SEED_SOWER] = _("Seed Sower"), + [ABILITY_THERMAL_EXCHANGE] = _("Thermal Exchange"), + [ABILITY_ANGER_SHELL] = _("Anger Shell"), + [ABILITY_PURIFYING_SALT] = _("Purifying Salt"), + [ABILITY_WELL_BAKED_BODY] = _("Well-Baked Body"), + [ABILITY_WIND_RIDER] = _("Wind Rider"), + [ABILITY_GUARD_DOG] = _("Guard Dog"), + [ABILITY_ROCKY_PAYLOAD] = _("Rocky Payload"), + [ABILITY_WIND_POWER] = _("Wind Power"), + [ABILITY_ZERO_TO_HERO] = _("Zero to Hero"), + [ABILITY_COMMANDER] = _("Commander"), + [ABILITY_ELECTROMORPHOSIS] = _("Electromorphosis"), + [ABILITY_PROTOSYNTHESIS] = _("Protosynthesis"), + [ABILITY_QUARK_DRIVE] = _("Quark Drive"), + [ABILITY_GOOD_AS_GOLD] = _("Good as Gold"), + [ABILITY_VESSEL_OF_RUIN] = _("Vessel of Ruin"), + [ABILITY_SWORD_OF_RUIN] = _("Sword of Ruin"), + [ABILITY_TABLETS_OF_RUIN] = _("Tablets of Ruin"), + [ABILITY_BEADS_OF_RUIN] = _("Beads of Ruin"), + [ABILITY_ORICHALCUM_PULSE] = _("Orichalcum Pulse"), + [ABILITY_HADRON_ENGINE] = _("Hadron Engine"), + [ABILITY_OPPORTUNIST] = _("Opportunist"), + [ABILITY_CUD_CHEW] = _("Cud Chew"), + [ABILITY_SHARPNESS] = _("Sharpness"), + [ABILITY_SUPREME_OVERLORD] = _("Supreme Overlord"), + [ABILITY_COSTAR] = _("Costar"), + [ABILITY_TOXIC_DEBRIS] = _("Toxic Debris"), + [ABILITY_ARMOR_TAIL] = _("Armor Tail"), + [ABILITY_EARTH_EATER] = _("Earth Eater"), + [ABILITY_MYCELIUM_MIGHT] = _("Mycelium Might"), }; #else // 12 characters const u8 gAbilityNames[ABILITIES_COUNT][ABILITY_NAME_LENGTH + 1] = @@ -798,6 +860,37 @@ const u8 gAbilityNames[ABILITIES_COUNT][ABILITY_NAME_LENGTH + 1] = [ABILITY_GRIM_NEIGH] = _("Grim Neigh"), [ABILITY_AS_ONE_ICE_RIDER] = _("As One"), [ABILITY_AS_ONE_SHADOW_RIDER] = _("As One"), + [ABILITY_LINGERING_AROMA] = _("LngerngAroma"), + [ABILITY_SEED_SOWER] = _("Seed Sower"), + [ABILITY_THERMAL_EXCHANGE] = _("ThrmlExchnge"), + [ABILITY_ANGER_SHELL] = _("Anger Shell"), + [ABILITY_PURIFYING_SALT] = _("PurfyingSalt"), + [ABILITY_WELL_BAKED_BODY] = _("WellBakedBdy"), + [ABILITY_WIND_RIDER] = _("Wind Rider"), + [ABILITY_GUARD_DOG] = _("Guard Dog"), + [ABILITY_ROCKY_PAYLOAD] = _("RockyPayload"), + [ABILITY_WIND_POWER] = _("Wind Power"), + [ABILITY_ZERO_TO_HERO] = _("Zero to Hero"), + [ABILITY_COMMANDER] = _("Commander"), + [ABILITY_ELECTROMORPHOSIS] = _("Elecmrphosis"), + [ABILITY_PROTOSYNTHESIS] = _("Protosnthsis"), + [ABILITY_QUARK_DRIVE] = _("Quark Drive"), + [ABILITY_GOOD_AS_GOLD] = _("Good as Gold"), + [ABILITY_VESSEL_OF_RUIN] = _("VesselOfRuin"), + [ABILITY_SWORD_OF_RUIN] = _("SwordOfRuin"), + [ABILITY_TABLETS_OF_RUIN] = _("TabltsOfRuin"), + [ABILITY_BEADS_OF_RUIN] = _("BeadsOfRuin"), + [ABILITY_ORICHALCUM_PULSE] = _("OrchlcumPlse"), + [ABILITY_HADRON_ENGINE] = _("HadronEngine"), + [ABILITY_OPPORTUNIST] = _("Opportunist"), + [ABILITY_CUD_CHEW] = _("Cud Chew"), + [ABILITY_SHARPNESS] = _("Sharpness"), + [ABILITY_SUPREME_OVERLORD] = _("SuprmeOvrlrd"), + [ABILITY_COSTAR] = _("Costar"), + [ABILITY_TOXIC_DEBRIS] = _("Toxic Debris"), + [ABILITY_ARMOR_TAIL] = _("Armor Tail"), + [ABILITY_EARTH_EATER] = _("Earth Eater"), + [ABILITY_MYCELIUM_MIGHT] = _("MceliumMight"), }; #endif @@ -1071,4 +1164,35 @@ const u8 *const gAbilityDescriptionPointers[ABILITIES_COUNT] = [ABILITY_GRIM_NEIGH] = sGrimNeighDescription, [ABILITY_AS_ONE_ICE_RIDER] = sAsOneIceRiderDescription, [ABILITY_AS_ONE_SHADOW_RIDER] = sAsOneShadowRiderDescription, + [ABILITY_LINGERING_AROMA] = sLingeringAromaDescription, + [ABILITY_SEED_SOWER] = sSeedSowerDescription, + [ABILITY_THERMAL_EXCHANGE] = sThermalExchangeDescription, + [ABILITY_ANGER_SHELL] = sAngerShellDescription, + [ABILITY_PURIFYING_SALT] = sPurifyingSaltDescription, + [ABILITY_WELL_BAKED_BODY] = sWellBakedBodyDescription, + [ABILITY_WIND_RIDER] = sWindRiderDescription, + [ABILITY_GUARD_DOG] = sGuardDogDescription, + [ABILITY_ROCKY_PAYLOAD] = sRockyPayloadDescription, + [ABILITY_WIND_POWER] = sWindPowerDescription, + [ABILITY_ZERO_TO_HERO] = sZeroToHeroDescription, + [ABILITY_COMMANDER] = sCommanderDescription, + [ABILITY_ELECTROMORPHOSIS] = sElectromorphosisDescription, + [ABILITY_PROTOSYNTHESIS] = sProtosynthesisDescription, + [ABILITY_QUARK_DRIVE] = sQuarkDriveDescription, + [ABILITY_GOOD_AS_GOLD] = sGoodAsGoldDescription, + [ABILITY_VESSEL_OF_RUIN] = sVesselOfRuinDescription, + [ABILITY_SWORD_OF_RUIN] = sSwordOfRuinDescription, + [ABILITY_TABLETS_OF_RUIN] = sTabletsOfRuinDescription, + [ABILITY_BEADS_OF_RUIN] = sBeadsOfRuinDescription, + [ABILITY_ORICHALCUM_PULSE] = sOrichalcumPulseDescription, + [ABILITY_HADRON_ENGINE] = sHadronEngineDescription, + [ABILITY_OPPORTUNIST] = sOpportunistDescription, + [ABILITY_CUD_CHEW] = sCudChewDescription, + [ABILITY_SHARPNESS] = sSharpnessDescription, + [ABILITY_SUPREME_OVERLORD] = sSupremeOverlordDescription, + [ABILITY_COSTAR] = sCostarDescription, + [ABILITY_TOXIC_DEBRIS] = sToxicDebrisDescription, + [ABILITY_ARMOR_TAIL] = sArmorTailDescription, + [ABILITY_EARTH_EATER] = sEarthEaterDescription, + [ABILITY_MYCELIUM_MIGHT] = sMyceliumMightDescription, }; From 8dd3fd025fce25e417cbcfbe85d4d1a3daf7452d Mon Sep 17 00:00:00 2001 From: LOuroboros Date: Fri, 2 Dec 2022 23:04:10 -0300 Subject: [PATCH 19/84] Implemented Lingering Aroma's effect And took the chance to tweak Mummy's. --- src/battle_message.c | 2 +- src/battle_util.c | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/battle_message.c b/src/battle_message.c index 9503fbaaf..c243e3041 100644 --- a/src/battle_message.c +++ b/src/battle_message.c @@ -616,7 +616,7 @@ static const u8 sText_HealingWishCameTrue[] = _("The healing wish came true\nfor static const u8 sText_HealingWishHealed[] = _("{B_ATK_NAME_WITH_PREFIX} regained health!"); static const u8 sText_LunarDanceCameTrue[] = _("{B_ATK_NAME_WITH_PREFIX} became cloaked\nin mystical moonlight!"); static const u8 sText_CursedBodyDisabled[] = _("{B_ATK_NAME_WITH_PREFIX}'s {B_BUFF1} was disabled\nby {B_DEF_NAME_WITH_PREFIX}'s {B_DEF_ABILITY}!"); -static const u8 sText_AttackerAquiredAbility[] = _("{B_ATK_NAME_WITH_PREFIX} acquired {B_LAST_ABILITY}!"); +static const u8 sText_AttackerAquiredAbility[] = _("{B_ATK_NAME_WITH_PREFIX} acquired\n{B_LAST_ABILITY}!"); static const u8 sText_TargetStatWontGoHigher[] = _("{B_DEF_NAME_WITH_PREFIX}'s {B_BUFF1}\nwon't go higher!"); static const u8 sText_PkmnMoveBouncedViaAbility[] = _("{B_ATK_NAME_WITH_PREFIX}'s {B_CURRENT_MOVE} was\nbounced back by {B_DEF_NAME_WITH_PREFIX}'s\l{B_DEF_ABILITY}!"); static const u8 sText_ImposterTransform[] = _("{B_ATK_NAME_WITH_PREFIX} transformed into\n{B_DEF_NAME_WITH_PREFIX} using {B_LAST_ABILITY}!"); diff --git a/src/battle_util.c b/src/battle_util.c index b629c8322..72b26417c 100644 --- a/src/battle_util.c +++ b/src/battle_util.c @@ -5354,11 +5354,13 @@ u8 AbilityBattleEffects(u8 caseID, u8 battler, u16 ability, u8 special, u16 move effect++; } break; + case ABILITY_LINGERING_AROMA: case ABILITY_MUMMY: if (!(gMoveResultFlags & MOVE_RESULT_NO_EFFECT) && IsBattlerAlive(gBattlerAttacker) && TARGET_TURN_DAMAGED - && (IsMoveMakingContact(move, gBattlerAttacker))) + && IsMoveMakingContact(move, gBattlerAttacker) + && gBattleStruct->overwrittenAbilities[gBattlerAttacker] != GetBattlerAbility(gBattlerTarget)) { switch (gBattleMons[gBattlerAttacker].ability) { @@ -5374,7 +5376,7 @@ u8 AbilityBattleEffects(u8 caseID, u8 battler, u16 ability, u8 special, u16 move case ABILITY_STANCE_CHANGE: break; default: - gLastUsedAbility = gBattleMons[gBattlerAttacker].ability = gBattleStruct->overwrittenAbilities[gBattlerAttacker] = ABILITY_MUMMY; + gLastUsedAbility = gBattleMons[gBattlerAttacker].ability = gBattleStruct->overwrittenAbilities[gBattlerAttacker] = gBattleMons[gBattlerTarget].ability; BattleScriptPushCursor(); gBattlescriptCurrInstr = BattleScript_MummyActivates; effect++; From b0027cb78b52cdc7ba749a01b17df796bd90e827 Mon Sep 17 00:00:00 2001 From: LOuroboros Date: Fri, 2 Dec 2022 23:07:25 -0300 Subject: [PATCH 20/84] Implemented Seed Sower's effect --- data/battle_scripts_1.s | 9 +++++++++ include/battle_scripts.h | 1 + src/battle_util.c | 12 ++++++++++++ 3 files changed, 22 insertions(+) diff --git a/data/battle_scripts_1.s b/data/battle_scripts_1.s index 6b8067721..d807f5610 100644 --- a/data/battle_scripts_1.s +++ b/data/battle_scripts_1.s @@ -7023,6 +7023,15 @@ BattleScript_GulpMissileGorgingTargetDefenseCantGoLower: waitmessage B_WAIT_TIME_LONG return +BattleScript_SeedSowerActivates:: + pause B_WAIT_TIME_SHORT + call BattleScript_AbilityPopUp + printstring STRINGID_TERRAINBECOMESGRASSY + waitmessage B_WAIT_TIME_LONG + playanimation BS_SCRIPTING, B_ANIM_RESTORE_BG + call BattleScript_TerrainSeedLoop + return + BattleScript_PerishSongCountGoesDown:: printstring STRINGID_PKMNPERISHCOUNTFELL waitmessage B_WAIT_TIME_LONG diff --git a/include/battle_scripts.h b/include/battle_scripts.h index 23f18e3be..d9dafe5df 100644 --- a/include/battle_scripts.h +++ b/include/battle_scripts.h @@ -433,6 +433,7 @@ extern const u8 BattleScript_SymbiosisActivates[]; extern const u8 BattleScript_MultiHitPrintStrings[]; extern const u8 BattleScript_BurnUpRemoveType[]; extern const u8 BattleScript_TargetAbilityStatRaiseRet[]; +extern const u8 BattleScript_SeedSowerActivates[]; // zmoves extern const u8 BattleScript_ZMoveActivateDamaging[]; diff --git a/src/battle_util.c b/src/battle_util.c index 72b26417c..e0b3f4b1b 100644 --- a/src/battle_util.c +++ b/src/battle_util.c @@ -5723,6 +5723,18 @@ u8 AbilityBattleEffects(u8 caseID, u8 battler, u16 ability, u8 special, u16 move } } break; + case ABILITY_SEED_SOWER: + if (!(gMoveResultFlags & MOVE_RESULT_NO_EFFECT) + && !gProtectStructs[gBattlerAttacker].confusionSelfDmg + && TARGET_TURN_DAMAGED + && IsBattlerAlive(gBattlerTarget) + && TryChangeBattleTerrain(gBattlerTarget, STATUS_FIELD_GRASSY_TERRAIN, &gFieldTimers.terrainTimer)) + { + BattleScriptPushCursor(); + gBattlescriptCurrInstr = BattleScript_SeedSowerActivates; + effect++; + } + break; } break; case ABILITYEFFECT_MOVE_END_ATTACKER: // Same as above, but for attacker From be71c4ca9907fdc968e15a28b7e20dea5c8b90a6 Mon Sep 17 00:00:00 2001 From: LOuroboros Date: Sat, 3 Dec 2022 01:07:49 -0300 Subject: [PATCH 21/84] Implemented Thermal Exchange's effect --- src/battle_util.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/battle_util.c b/src/battle_util.c index e0b3f4b1b..d3275be0d 100644 --- a/src/battle_util.c +++ b/src/battle_util.c @@ -5735,6 +5735,20 @@ u8 AbilityBattleEffects(u8 caseID, u8 battler, u16 ability, u8 special, u16 move effect++; } break; + case ABILITY_THERMAL_EXCHANGE: + if (!(gMoveResultFlags & MOVE_RESULT_NO_EFFECT) + && TARGET_TURN_DAMAGED + && IsBattlerAlive(gBattlerTarget) + && CompareStat(gBattlerTarget, STAT_ATK, MAX_STAT_STAGE, CMP_LESS_THAN) + && moveType == TYPE_FIRE) + { + gEffectBattler = gBattlerTarget; + SET_STATCHANGER(STAT_ATK, 1, FALSE); + BattleScriptPushCursor(); + gBattlescriptCurrInstr = BattleScript_TargetAbilityStatRaiseRet; + effect++; + } + break; } break; case ABILITYEFFECT_MOVE_END_ATTACKER: // Same as above, but for attacker @@ -6317,6 +6331,7 @@ bool32 CanBeBurned(u8 battlerId) || ability == ABILITY_WATER_VEIL || ability == ABILITY_WATER_BUBBLE || ability == ABILITY_COMATOSE + || ability == ABILITY_THERMAL_EXCHANGE || IsAbilityStatusProtected(battlerId) || IsBattlerTerrainAffected(battlerId, STATUS_FIELD_MISTY_TERRAIN)) return FALSE; From acb9c31bd4d7747656531e7f5230ed12f0ec1cd1 Mon Sep 17 00:00:00 2001 From: LOuroboros Date: Sat, 3 Dec 2022 01:17:22 -0300 Subject: [PATCH 22/84] Implemented Anger Shell's effect --- data/battle_scripts_1.s | 44 ++++++++++++++++++++++++++++++++++++++++ include/battle.h | 1 + include/battle_scripts.h | 1 + src/battle_util.c | 14 +++++++++++++ 4 files changed, 60 insertions(+) diff --git a/data/battle_scripts_1.s b/data/battle_scripts_1.s index d807f5610..964a6d8a3 100644 --- a/data/battle_scripts_1.s +++ b/data/battle_scripts_1.s @@ -7032,6 +7032,50 @@ BattleScript_SeedSowerActivates:: call BattleScript_TerrainSeedLoop return +BattleScript_AngerShellActivates:: + call BattleScript_AbilityPopUp + jumpifstat BS_TARGET, CMP_LESS_THAN, STAT_ATK, MAX_STAT_STAGE, BattleScript_AngerShellTryDef + jumpifstat BS_TARGET, CMP_LESS_THAN, STAT_SPATK, MAX_STAT_STAGE, BattleScript_AngerShellTryDef + jumpifstat BS_TARGET, CMP_LESS_THAN, STAT_SPEED, MAX_STAT_STAGE, BattleScript_AngerShellTryDef + jumpifstat BS_TARGET, CMP_GREATER_THAN, STAT_DEF, MIN_STAT_STAGE, BattleScript_AngerShellTryDef + jumpifstat BS_TARGET, CMP_EQUAL, STAT_SPDEF, MIN_STAT_STAGE, BattleScript_ButItFailed +BattleScript_AngerShellTryDef:: + setbyte sSTAT_ANIM_PLAYED, FALSE + playstatchangeanimation BS_TARGET, BIT_DEF | BIT_SPDEF, STAT_CHANGE_NEGATIVE | STAT_CHANGE_CANT_PREVENT + setstatchanger STAT_DEF, 1, TRUE + statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_CHANGE_ALLOW_PTR | MOVE_EFFECT_CERTAIN, BattleScript_AngerShellTrySpDef + jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, B_MSG_STAT_WONT_INCREASE, BattleScript_AngerShellTrySpDef + printfromtable gStatUpStringIds + waitmessage B_WAIT_TIME_LONG +BattleScript_AngerShellTrySpDef: + setstatchanger STAT_SPDEF, 1, TRUE + statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_CHANGE_ALLOW_PTR | MOVE_EFFECT_CERTAIN, BattleScript_AngerShellTryAttack + jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, B_MSG_STAT_WONT_INCREASE, BattleScript_AngerShellTryAttack + printfromtable gStatUpStringIds + waitmessage B_WAIT_TIME_LONG +BattleScript_AngerShellTryAttack: + setbyte sSTAT_ANIM_PLAYED, FALSE + playstatchangeanimation BS_TARGET, BIT_SPATK | BIT_ATK | BIT_SPEED, STAT_CHANGE_BY_TWO + setstatchanger STAT_ATK, 1, FALSE + statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_CHANGE_ALLOW_PTR, BattleScript_AngerShellTrySpAtk + jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, B_MSG_STAT_WONT_INCREASE, BattleScript_AngerShellTrySpAtk + printfromtable gStatUpStringIds + waitmessage B_WAIT_TIME_LONG +BattleScript_AngerShellTrySpAtk: + setstatchanger STAT_SPATK, 1, FALSE + statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_CHANGE_ALLOW_PTR, BattleScript_AngerShellTrySpeed + jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, B_MSG_STAT_WONT_INCREASE, BattleScript_AngerShellTrySpeed + printfromtable gStatUpStringIds + waitmessage B_WAIT_TIME_LONG +BattleScript_AngerShellTrySpeed: + setstatchanger STAT_SPEED, 1, FALSE + statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_CHANGE_ALLOW_PTR, BattleScript_AngerShellRet + jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, B_MSG_STAT_WONT_INCREASE, BattleScript_AngerShellRet + printfromtable gStatUpStringIds + waitmessage B_WAIT_TIME_LONG +BattleScript_AngerShellRet: + return + BattleScript_PerishSongCountGoesDown:: printstring STRINGID_PKMNPERISHCOUNTFELL waitmessage B_WAIT_TIME_LONG diff --git a/include/battle.h b/include/battle.h index ebc8be057..14037b72c 100644 --- a/include/battle.h +++ b/include/battle.h @@ -652,6 +652,7 @@ struct BattleStruct u8 attackerBeforeBounce:2; u8 targetsDone[MAX_BATTLERS_COUNT]; // Each battler as a bit. u16 overwrittenAbilities[MAX_BATTLERS_COUNT]; // abilities overwritten during battle (keep separate from battle history in case of switching) + bool8 endturnAbilityDone[PARTY_SIZE][2]; // For some reason, adding a switchInAbilityDone equivalent in SpecialStatus didn't work. }; #define F_DYNAMIC_TYPE_1 (1 << 6) diff --git a/include/battle_scripts.h b/include/battle_scripts.h index d9dafe5df..462da38db 100644 --- a/include/battle_scripts.h +++ b/include/battle_scripts.h @@ -434,6 +434,7 @@ extern const u8 BattleScript_MultiHitPrintStrings[]; extern const u8 BattleScript_BurnUpRemoveType[]; extern const u8 BattleScript_TargetAbilityStatRaiseRet[]; extern const u8 BattleScript_SeedSowerActivates[]; +extern const u8 BattleScript_AngerShellActivates[]; // zmoves extern const u8 BattleScript_ZMoveActivateDamaging[]; diff --git a/src/battle_util.c b/src/battle_util.c index d3275be0d..ed425dd49 100644 --- a/src/battle_util.c +++ b/src/battle_util.c @@ -5749,6 +5749,20 @@ u8 AbilityBattleEffects(u8 caseID, u8 battler, u16 ability, u8 special, u16 move effect++; } break; + case ABILITY_ANGER_SHELL: + if (!(gMoveResultFlags & MOVE_RESULT_NO_EFFECT) + && !gProtectStructs[gBattlerAttacker].confusionSelfDmg + && TARGET_TURN_DAMAGED + && (gBattleMons[gBattlerTarget].hp <= gBattleMons[gBattlerTarget].maxHP / 2) + && !gBattleStruct->endturnAbilityDone[gBattlerPartyIndexes[gBattlerTarget]][GetBattlerSide(gBattlerTarget)]) + { + gBattleStruct->endturnAbilityDone[gBattlerPartyIndexes[gBattlerTarget]][GetBattlerSide(gBattlerTarget)] = TRUE; + gBattlerAttacker = gBattlerTarget; + BattleScriptPushCursor(); + gBattlescriptCurrInstr = BattleScript_AngerShellActivates; + effect++; + } + break; } break; case ABILITYEFFECT_MOVE_END_ATTACKER: // Same as above, but for attacker From eb082cd1a249b553e32c6d8673bd6082ca263b60 Mon Sep 17 00:00:00 2001 From: LOuroboros Date: Sat, 3 Dec 2022 01:51:11 -0300 Subject: [PATCH 23/84] Implemented Purifying Salt's effect --- data/battle_scripts_1.s | 6 ++++++ src/battle_util.c | 6 +++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/data/battle_scripts_1.s b/data/battle_scripts_1.s index 964a6d8a3..cf686fec9 100644 --- a/data/battle_scripts_1.s +++ b/data/battle_scripts_1.s @@ -3033,6 +3033,7 @@ BattleScript_EffectSleep:: jumpifstatus BS_TARGET, STATUS1_SLEEP, BattleScript_AlreadyAsleep jumpifcantmakeasleep BattleScript_CantMakeAsleep jumpifability BS_TARGET, ABILITY_COMATOSE, BattleScript_LeafGuardProtects + jumpifability BS_TARGET, ABILITY_PURIFYING_SALT, BattleScript_LeafGuardProtects jumpifflowerveil BattleScript_FlowerVeilProtects jumpifability BS_TARGET_SIDE, ABILITY_SWEET_VEIL, BattleScript_SweetVeilProtects jumpifleafguardprotected BS_TARGET, BattleScript_LeafGuardProtects @@ -3622,6 +3623,7 @@ BattleScript_EffectToxic:: ppreduce jumpifability BS_TARGET, ABILITY_IMMUNITY, BattleScript_ImmunityProtected jumpifability BS_TARGET, ABILITY_COMATOSE, BattleScript_LeafGuardProtects + jumpifability BS_TARGET, ABILITY_PURIFYING_SALT, BattleScript_LeafGuardProtects jumpifability BS_TARGET_SIDE, ABILITY_PASTEL_VEIL, BattleScript_PastelVeilProtects jumpifflowerveil BattleScript_FlowerVeilProtects jumpifleafguardprotected BS_TARGET, BattleScript_LeafGuardProtects @@ -3960,6 +3962,7 @@ BattleScript_EffectPoison:: ppreduce jumpifability BS_TARGET, ABILITY_IMMUNITY, BattleScript_ImmunityProtected jumpifability BS_TARGET, ABILITY_COMATOSE, BattleScript_LeafGuardProtects + jumpifability BS_TARGET, ABILITY_PURIFYING_SALT, BattleScript_LeafGuardProtects jumpifability BS_TARGET_SIDE, ABILITY_PASTEL_VEIL, BattleScript_PastelVeilProtects jumpifflowerveil BattleScript_FlowerVeilProtects jumpifleafguardprotected BS_TARGET, BattleScript_LeafGuardProtects @@ -3986,6 +3989,7 @@ BattleScript_EffectParalyze: ppreduce jumpifability BS_TARGET, ABILITY_LIMBER, BattleScript_LimberProtected jumpifability BS_TARGET, ABILITY_COMATOSE, BattleScript_LeafGuardProtects + jumpifability BS_TARGET, ABILITY_PURIFYING_SALT, BattleScript_LeafGuardProtects jumpifflowerveil BattleScript_FlowerVeilProtects jumpifleafguardprotected BS_TARGET, BattleScript_LeafGuardProtects jumpifshieldsdown BS_TARGET, BattleScript_LeafGuardProtects @@ -5409,6 +5413,7 @@ BattleScript_EffectWillOWisp:: jumpifability BS_TARGET, ABILITY_WATER_VEIL, BattleScript_WaterVeilPrevents jumpifability BS_TARGET, ABILITY_WATER_BUBBLE, BattleScript_WaterVeilPrevents jumpifability BS_TARGET, ABILITY_COMATOSE, BattleScript_LeafGuardProtects + jumpifability BS_TARGET, ABILITY_PURIFYING_SALT, BattleScript_LeafGuardProtects jumpifflowerveil BattleScript_FlowerVeilProtects jumpifleafguardprotected BS_TARGET, BattleScript_LeafGuardProtects jumpifshieldsdown BS_TARGET, BattleScript_LeafGuardProtects @@ -5701,6 +5706,7 @@ BattleScript_EffectYawn:: jumpifability BS_TARGET, ABILITY_VITAL_SPIRIT, BattleScript_PrintBankAbilityMadeIneffective jumpifability BS_TARGET, ABILITY_INSOMNIA, BattleScript_PrintBankAbilityMadeIneffective jumpifability BS_TARGET, ABILITY_COMATOSE, BattleScript_PrintBankAbilityMadeIneffective + jumpifability BS_TARGET, ABILITY_PURIFYING_SALT, BattleScript_LeafGuardProtects jumpifflowerveil BattleScript_FlowerVeilProtects jumpifleafguardprotected BS_TARGET, BattleScript_LeafGuardProtects jumpifshieldsdown BS_TARGET, BattleScript_LeafGuardProtects diff --git a/src/battle_util.c b/src/battle_util.c index ed425dd49..fd6374e74 100644 --- a/src/battle_util.c +++ b/src/battle_util.c @@ -8896,7 +8896,7 @@ static u32 CalcMoveBasePowerAfterModifiers(u16 move, u8 battlerAtk, u8 battlerDe #define TERRAIN_TYPE_BOOST UQ_4_12(1.5) #endif - // various effecs + // various effects if (gProtectStructs[battlerAtk].helpingHand) MulModifier(&modifier, UQ_4_12(1.5)); if (gStatuses3[battlerAtk] & STATUS3_CHARGED_UP && moveType == TYPE_ELECTRIC) @@ -9226,6 +9226,10 @@ static u32 CalcDefenseStat(u16 move, u8 battlerAtk, u8 battlerDef, u8 moveType, if (gBattleMoves[move].flags & FLAG_SOUND) MulModifier(&modifier, UQ_4_12(2.0)); break; + case ABILITY_PURIFYING_SALT: + if (gBattleMoves[move].type == TYPE_GHOST) + MulModifier(&modifier, UQ_4_12(2.0)); + break; } // ally's abilities From ca656b63b935e17de1b14f8b6de3952df6ae74c3 Mon Sep 17 00:00:00 2001 From: LOuroboros Date: Sat, 3 Dec 2022 02:04:33 -0300 Subject: [PATCH 24/84] Added Well Baked Body's effect and misc. changes -Added a modifybattlerstatstage macro to handle stat stages in battle. -Rewrote the checks inside the case ABILITYEFFECT_MOVES_BLOCK of AbilityBattleEffects. --- asm/macros/battle_script.inc | 31 ++++++++++++++++ data/battle_scripts_1.s | 12 +++++++ include/battle_scripts.h | 1 + src/battle_util.c | 68 +++++++++++++++++++----------------- 4 files changed, 80 insertions(+), 32 deletions(-) diff --git a/asm/macros/battle_script.inc b/asm/macros/battle_script.inc index 27c5a86c4..72ca567dc 100644 --- a/asm/macros/battle_script.inc +++ b/asm/macros/battle_script.inc @@ -2157,3 +2157,34 @@ .macro trysymbiosis various BS_ATTACKER, VARIOUS_TRY_SYMBIOSIS .endm + + @ Tries to increase or decrease a battler's stat's stat stage by a specified amount. If impossible, jumps to \script. + .macro modifybattlerstatstage battler:req, stat:req, mode:req, amount:req, script:req, animation:req, customString + + @ \mode parameters + INCREASE = FALSE + DECREASE = TRUE + + @ \animation parameters + ANIM_OFF = FALSE + ANIM_ON = TRUE + + setstatchanger \stat, \amount, \mode + statbuffchange STAT_CHANGE_ALLOW_PTR, \script + setgraphicalstatchangevalues + .if \animation == TRUE + playanimation \battler, B_ANIM_STATS_CHANGE, sB_ANIM_ARG1 + .endif + .ifnb \customString + printstring \customString + .else + .if \mode == DECREASE + printfromtable gStatDownStringIds + .else + .if \mode == INCREASE + printfromtable gStatUpStringIds + .endif + .endif + .endif + waitmessage B_WAIT_TIME_LONG + .endm diff --git a/data/battle_scripts_1.s b/data/battle_scripts_1.s index cf686fec9..d7aa7f53f 100644 --- a/data/battle_scripts_1.s +++ b/data/battle_scripts_1.s @@ -9800,6 +9800,18 @@ BattleScript_DarkTypePreventsPrankster:: orhalfword gMoveResultFlags, MOVE_RESULT_NO_EFFECT goto BattleScript_MoveEnd +BattleScript_WellBakedBodyActivates:: + attackstring + ppreduce + showabilitypopup BS_TARGET + pause B_WAIT_TIME_MED + printstring STRINGID_ITDOESNTAFFECT + waitmessage B_WAIT_TIME_MED + orhalfword gMoveResultFlags, MOVE_RESULT_NO_EFFECT + modifybattlerstatstage BS_TARGET, STAT_DEF, INCREASE, 1, BattleScript_WellBakedBodyEnd, ANIM_ON +BattleScript_WellBakedBodyEnd: + goto BattleScript_MoveEnd + BattleScript_PastelVeilActivates:: setbyte gBattleCommunication, 0 setbyte gBattleCommunication + 1, 0 diff --git a/include/battle_scripts.h b/include/battle_scripts.h index 462da38db..b909b9711 100644 --- a/include/battle_scripts.h +++ b/include/battle_scripts.h @@ -435,6 +435,7 @@ extern const u8 BattleScript_BurnUpRemoveType[]; extern const u8 BattleScript_TargetAbilityStatRaiseRet[]; extern const u8 BattleScript_SeedSowerActivates[]; extern const u8 BattleScript_AngerShellActivates[]; +extern const u8 BattleScript_WellBakedBodyActivates[]; // zmoves extern const u8 BattleScript_ZMoveActivateDamaging[]; diff --git a/src/battle_util.c b/src/battle_util.c index fd6374e74..8746dbbf0 100644 --- a/src/battle_util.c +++ b/src/battle_util.c @@ -5079,40 +5079,44 @@ u8 AbilityBattleEffects(u8 caseID, u8 battler, u16 ability, u8 special, u16 move } break; case ABILITYEFFECT_MOVES_BLOCK: // 2 - { - u16 moveTarget = GetBattlerMoveTargetType(battler, move); + { + u16 moveTarget = GetBattlerMoveTargetType(battler, move); + u16 battlerAbility = GetBattlerAbility(battler); + u16 targetAbility = GetBattlerAbility(gBattlerTarget); - if ((gLastUsedAbility == ABILITY_SOUNDPROOF && gBattleMoves[move].flags & FLAG_SOUND && !(moveTarget & MOVE_TARGET_USER)) - || (gLastUsedAbility == ABILITY_BULLETPROOF && gBattleMoves[move].flags & FLAG_BALLISTIC)) - { - if (gBattleMons[gBattlerAttacker].status2 & STATUS2_MULTIPLETURNS) - gHitMarker |= HITMARKER_NO_PPDEDUCT; - gBattlescriptCurrInstr = BattleScript_SoundproofProtected; - effect = 1; + if ((gLastUsedAbility == ABILITY_SOUNDPROOF && gBattleMoves[move].flags & FLAG_SOUND && !(moveTarget & MOVE_TARGET_USER)) + || (gLastUsedAbility == ABILITY_BULLETPROOF && gBattleMoves[move].flags & FLAG_BALLISTIC)) + { + if (gBattleMons[gBattlerAttacker].status2 & STATUS2_MULTIPLETURNS) + gHitMarker |= HITMARKER_NO_PPDEDUCT; + gBattlescriptCurrInstr = BattleScript_SoundproofProtected; + effect = 1; + } + else if ((gLastUsedAbility == ABILITY_DAZZLING || gLastUsedAbility == ABILITY_QUEENLY_MAJESTY || IsBattlerAlive(battler ^= BIT_FLANK)) + && (battlerAbility == ABILITY_DAZZLING || battlerAbility == ABILITY_QUEENLY_MAJESTY) + && GetChosenMovePriority(gBattlerAttacker) > 0 + && GetBattlerSide(gBattlerAttacker) != GetBattlerSide(battler)) + { + if (gBattleMons[gBattlerAttacker].status2 & STATUS2_MULTIPLETURNS) + gHitMarker |= HITMARKER_NO_PPDEDUCT; + gBattlescriptCurrInstr = BattleScript_DazzlingProtected; + effect = 1; + } + else if (BlocksPrankster(move, gBattlerAttacker, gBattlerTarget, TRUE) && !(IS_MOVE_STATUS(move) && targetAbility == ABILITY_MAGIC_BOUNCE)) + { + if (!(gBattleTypeFlags & BATTLE_TYPE_DOUBLE) || !(moveTarget & (MOVE_TARGET_BOTH | MOVE_TARGET_FOES_AND_ALLY))) + CancelMultiTurnMoves(gBattlerAttacker); // Don't cancel moves that can hit two targets bc one target might not be protected + gBattleScripting.battler = gBattlerAbility = gBattlerTarget; + gBattlescriptCurrInstr = BattleScript_DarkTypePreventsPrankster; + effect = 1; + } + else if (targetAbility == ABILITY_WELL_BAKED_BODY && gBattleMoves[gCurrentMove].type == TYPE_FIRE) + { + gBattlescriptCurrInstr = BattleScript_WellBakedBodyActivates; + effect = 1; + } + break; } - else if ((((gLastUsedAbility == ABILITY_DAZZLING || gLastUsedAbility == ABILITY_QUEENLY_MAJESTY - || (IsBattlerAlive(battler ^= BIT_FLANK) - && ((GetBattlerAbility(battler) == ABILITY_DAZZLING) || GetBattlerAbility(battler) == ABILITY_QUEENLY_MAJESTY))) - )) - && GetChosenMovePriority(gBattlerAttacker) > 0 - && GetBattlerSide(gBattlerAttacker) != GetBattlerSide(battler)) - { - if (gBattleMons[gBattlerAttacker].status2 & STATUS2_MULTIPLETURNS) - gHitMarker |= HITMARKER_NO_PPDEDUCT; - gBattlescriptCurrInstr = BattleScript_DazzlingProtected; - effect = 1; - } - else if (BlocksPrankster(move, gBattlerAttacker, gBattlerTarget, TRUE) - && !(IS_MOVE_STATUS(move) && GetBattlerAbility(gBattlerTarget) == ABILITY_MAGIC_BOUNCE)) - { - if (!(gBattleTypeFlags & BATTLE_TYPE_DOUBLE) || !(moveTarget & (MOVE_TARGET_BOTH | MOVE_TARGET_FOES_AND_ALLY))) - CancelMultiTurnMoves(gBattlerAttacker); // Don't cancel moves that can hit two targets bc one target might not be protected - gBattleScripting.battler = gBattlerAbility = gBattlerTarget; - gBattlescriptCurrInstr = BattleScript_DarkTypePreventsPrankster; - effect = 1; - } - break; - } case ABILITYEFFECT_ABSORBING: // 3 if (move != MOVE_NONE) { From 4dc44150c53855df72a70c76fa71bbbad2a041b4 Mon Sep 17 00:00:00 2001 From: LOuroboros Date: Sat, 3 Dec 2022 06:21:01 -0300 Subject: [PATCH 25/84] Implemented Wind Rider's effect --- data/battle_scripts_1.s | 31 +++++++++++++++++++++++++++++++ include/battle_scripts.h | 2 ++ include/constants/pokemon.h | 1 + src/battle_util.c | 10 ++++++++++ src/data/battle_moves.h | 32 ++++++++++++++++---------------- 5 files changed, 60 insertions(+), 16 deletions(-) diff --git a/data/battle_scripts_1.s b/data/battle_scripts_1.s index d7aa7f53f..a9e196ae8 100644 --- a/data/battle_scripts_1.s +++ b/data/battle_scripts_1.s @@ -6589,6 +6589,26 @@ BattleScript_TailwindEnds:: waitmessage B_WAIT_TIME_LONG end2 +BattleScript_WindRiderActivatesEnd2:: + setbyte gBattlerTarget, 0 +BattleScript_WindRiderLoop: + printstring STRINGID_EMPTYSTRING3 + jumpifability BS_TARGET, ABILITY_WIND_RIDER, BattleScript_WindRiderLoop_Cont + goto BattleScript_WindRiderIncrement +BattleScript_WindRiderLoop_Cont: + jumpifsideaffecting BS_TARGET, SIDE_STATUS_TAILWIND, BattleScript_WindRider_Activate + goto BattleScript_WindRiderIncrement +BattleScript_WindRider_Activate: + call BattleScript_AbilityPopUp + pause B_WAIT_TIME_MED + modifybattlerstatstage BS_TARGET, STAT_ATK, INCREASE, 1, BattleScript_WindRiderIncrement, ANIM_ON +BattleScript_WindRiderIncrement: + addbyte gBattlerTarget, 1 + jumpifbytenotequal gBattlerTarget, gBattlersCount, BattleScript_WindRiderLoop +BattleScript_WindRiderEnd: + destroyabilitypopup + end2 + BattleScript_TrickRoomEnds:: printstring STRINGID_TRICKROOMENDS waitmessage B_WAIT_TIME_LONG @@ -9812,6 +9832,17 @@ BattleScript_WellBakedBodyActivates:: BattleScript_WellBakedBodyEnd: goto BattleScript_MoveEnd +BattleScript_WindRiderActivatesMoveEnd:: + attackstring + ppreduce + showabilitypopup BS_TARGET + pause B_WAIT_TIME_MED + orhalfword gMoveResultFlags, MOVE_RESULT_NO_EFFECT + printstring STRINGID_EMPTYSTRING3 + modifybattlerstatstage BS_TARGET, STAT_ATK, INCREASE, 1, BattleScript_WindRiderActivatesMoveEnd_End, ANIM_ON +BattleScript_WindRiderActivatesMoveEnd_End: + goto BattleScript_MoveEnd + BattleScript_PastelVeilActivates:: setbyte gBattleCommunication, 0 setbyte gBattleCommunication + 1, 0 diff --git a/include/battle_scripts.h b/include/battle_scripts.h index b909b9711..4d1d750df 100644 --- a/include/battle_scripts.h +++ b/include/battle_scripts.h @@ -436,6 +436,8 @@ extern const u8 BattleScript_TargetAbilityStatRaiseRet[]; extern const u8 BattleScript_SeedSowerActivates[]; extern const u8 BattleScript_AngerShellActivates[]; extern const u8 BattleScript_WellBakedBodyActivates[]; +extern const u8 BattleScript_WindRiderActivatesEnd2[]; +extern const u8 BattleScript_WindRiderActivatesMoveEnd[]; // zmoves extern const u8 BattleScript_ZMoveActivateDamaging[]; diff --git a/include/constants/pokemon.h b/include/constants/pokemon.h index 006e2a703..8d637af30 100644 --- a/include/constants/pokemon.h +++ b/include/constants/pokemon.h @@ -235,6 +235,7 @@ #define FLAG_THAW_USER (1 << 25) #define FLAG_HIT_IN_SUBSTITUTE (1 << 26) // Hyperspace Fury #define FLAG_TWO_STRIKES (1 << 27) // A move with this flag will strike twice, and may apply its effect on each hit +#define FLAG_WIND_MOVE (1 << 28) // Split defines. #define SPLIT_PHYSICAL 0x0 diff --git a/src/battle_util.c b/src/battle_util.c index 8746dbbf0..45eecf1a1 100644 --- a/src/battle_util.c +++ b/src/battle_util.c @@ -2373,6 +2373,11 @@ u8 DoFieldEndTurnEffects(void) BattleScriptExecute(BattleScript_TailwindEnds); effect++; } + if (IsAbilityOnSide(gActiveBattler, ABILITY_WIND_RIDER)) + { + BattleScriptExecute(BattleScript_WindRiderActivatesEnd2); + effect++; + } } gBattleStruct->turnSideTracker++; if (effect != 0) @@ -5115,6 +5120,11 @@ u8 AbilityBattleEffects(u8 caseID, u8 battler, u16 ability, u8 special, u16 move gBattlescriptCurrInstr = BattleScript_WellBakedBodyActivates; effect = 1; } + else if (targetAbility == ABILITY_WIND_RIDER && gBattleMoves[gCurrentMove].flags & FLAG_WIND_MOVE && !(moveTarget & MOVE_TARGET_USER)) + { + gBattlescriptCurrInstr = BattleScript_WindRiderActivatesMoveEnd; + effect = 1; + } break; } case ABILITYEFFECT_ABSORBING: // 3 diff --git a/src/data/battle_moves.h b/src/data/battle_moves.h index 346309c55..37ba7aaff 100644 --- a/src/data/battle_moves.h +++ b/src/data/battle_moves.h @@ -272,7 +272,7 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .secondaryEffectChance = 0, .target = MOVE_TARGET_SELECTED, .priority = 0, - .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED | FLAG_DMG_2X_IN_AIR, + .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED | FLAG_DMG_2X_IN_AIR | FLAG_WIND_MOVE, .split = SPLIT_SPECIAL, .zMovePower = 100, .zMoveEffect = Z_EFFECT_NONE, @@ -298,7 +298,7 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = { #if B_UPDATED_MOVE_DATA >= GEN_6 .accuracy = 0, - .flags = FLAG_MAGIC_COAT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED, + .flags = FLAG_MAGIC_COAT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_WIND_MOVE, #elif B_UPDATED_MOVE_DATA == GEN_5 .accuracy = 100, .flags = FLAG_PROTECT_AFFECTED | FLAG_MAGIC_COAT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED, @@ -1073,7 +1073,7 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .secondaryEffectChance = 10, .target = MOVE_TARGET_BOTH, .priority = 0, - .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_SHEER_FORCE_BOOST, + .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_SHEER_FORCE_BOOST | FLAG_WIND_MOVE, .split = SPLIT_SPECIAL, .zMoveEffect = Z_EFFECT_NONE, }, @@ -3531,7 +3531,7 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .secondaryEffectChance = 100, .target = MOVE_TARGET_BOTH, .priority = 0, - .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_SHEER_FORCE_BOOST, + .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_SHEER_FORCE_BOOST | FLAG_WIND_MOVE, .split = SPLIT_SPECIAL, .zMovePower = 100, .zMoveEffect = Z_EFFECT_NONE, @@ -3633,7 +3633,7 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .secondaryEffectChance = 0, .target = MOVE_TARGET_ALL_BATTLERS, .priority = 0, - .flags = 0, + .flags = FLAG_WIND_MOVE, .split = SPLIT_STATUS, .zMovePower = 0, .zMoveEffect = Z_EFFECT_SPD_UP_1, @@ -4290,7 +4290,7 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = [MOVE_TWISTER] = { #if B_UPDATED_MOVE_DATA >= GEN_5 - .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_SHEER_FORCE_BOOST | FLAG_DMG_2X_IN_AIR, + .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_SHEER_FORCE_BOOST | FLAG_DMG_2X_IN_AIR | FLAG_WIND_MOVE, #else .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED | FLAG_SHEER_FORCE_BOOST | FLAG_DMG_2X_IN_AIR, #endif @@ -4663,7 +4663,7 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .secondaryEffectChance = 10, .target = MOVE_TARGET_BOTH, .priority = 0, - .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_SHEER_FORCE_BOOST, + .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_SHEER_FORCE_BOOST | FLAG_WIND_MOVE, .split = SPLIT_SPECIAL, .zMoveEffect = Z_EFFECT_NONE, }, @@ -5656,7 +5656,7 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .secondaryEffectChance = 0, .target = MOVE_TARGET_BOTH, .priority = 0, - .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED | FLAG_HIGH_CRIT, + .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED | FLAG_HIGH_CRIT | FLAG_WIND_MOVE, .split = SPLIT_SPECIAL, .zMoveEffect = Z_EFFECT_NONE, }, @@ -6613,7 +6613,7 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .secondaryEffectChance = 0, .target = MOVE_TARGET_USER, .priority = 0, - .flags = FLAG_SNATCH_AFFECTED, + .flags = FLAG_SNATCH_AFFECTED | FLAG_WIND_MOVE, .split = SPLIT_STATUS, .zMovePower = 0, .zMoveEffect = Z_EFFECT_BOOST_CRITS, @@ -9691,7 +9691,7 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .secondaryEffectChance = 30, .target = MOVE_TARGET_SELECTED, .priority = 0, - .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED | FLAG_SHEER_FORCE_BOOST | FLAG_DMG_IN_AIR, + .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED | FLAG_SHEER_FORCE_BOOST | FLAG_DMG_IN_AIR | FLAG_WIND_MOVE, .split = SPLIT_SPECIAL, .zMoveEffect = Z_EFFECT_NONE, }, @@ -10201,7 +10201,7 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .secondaryEffectChance = 0, .target = MOVE_TARGET_FOES_AND_ALLY, .priority = 0, - .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED, + .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED | FLAG_WIND_MOVE, .split = SPLIT_PHYSICAL, .zMovePower = 175, .zMoveEffect = Z_EFFECT_NONE, @@ -10400,7 +10400,7 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .secondaryEffectChance = 0, .target = MOVE_TARGET_SELECTED, .priority = 0, - .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED, + .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED | FLAG_WIND_MOVE, .split = SPLIT_SPECIAL, .zMovePower = 100, .zMoveEffect = Z_EFFECT_NONE, @@ -13308,7 +13308,7 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .secondaryEffectChance = 30, .target = MOVE_TARGET_SELECTED, .priority = 0, - .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED, + .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_WIND_MOVE, .split = SPLIT_SPECIAL, .zMovePower = 175, .zMoveEffect = Z_EFFECT_NONE, @@ -13548,7 +13548,7 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .secondaryEffectChance = 0, .target = MOVE_TARGET_SELECTED, .priority = 0, - .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED, + .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED | FLAG_WIND_MOVE, .split = SPLIT_SPECIAL, .zMovePower = 175, .zMoveEffect = Z_EFFECT_NONE, @@ -13564,7 +13564,7 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .secondaryEffectChance = 0, .target = MOVE_TARGET_SELECTED, .priority = 0, - .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED, + .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED | FLAG_WIND_MOVE, .split = SPLIT_SPECIAL, .zMovePower = 175, .zMoveEffect = Z_EFFECT_NONE, @@ -13580,7 +13580,7 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .secondaryEffectChance = 0, .target = MOVE_TARGET_SELECTED, .priority = 0, - .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED, + .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED | FLAG_WIND_MOVE, .split = SPLIT_SPECIAL, .zMovePower = 175, .zMoveEffect = Z_EFFECT_NONE, From c43060fbfdd2df9943c84e177d52a09663b2d0b6 Mon Sep 17 00:00:00 2001 From: LOuroboros Date: Sat, 3 Dec 2022 20:41:20 -0300 Subject: [PATCH 26/84] Tweaked BattleScript_WellBakedBodyActivates and BattleScript_WindRiderActivatesMoveEnd --- data/battle_scripts_1.s | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/data/battle_scripts_1.s b/data/battle_scripts_1.s index a9e196ae8..a70ec7cf2 100644 --- a/data/battle_scripts_1.s +++ b/data/battle_scripts_1.s @@ -9823,10 +9823,8 @@ BattleScript_DarkTypePreventsPrankster:: BattleScript_WellBakedBodyActivates:: attackstring ppreduce + pause B_WAIT_TIME_SHORT showabilitypopup BS_TARGET - pause B_WAIT_TIME_MED - printstring STRINGID_ITDOESNTAFFECT - waitmessage B_WAIT_TIME_MED orhalfword gMoveResultFlags, MOVE_RESULT_NO_EFFECT modifybattlerstatstage BS_TARGET, STAT_DEF, INCREASE, 1, BattleScript_WellBakedBodyEnd, ANIM_ON BattleScript_WellBakedBodyEnd: @@ -9835,10 +9833,9 @@ BattleScript_WellBakedBodyEnd: BattleScript_WindRiderActivatesMoveEnd:: attackstring ppreduce + pause B_WAIT_TIME_SHORT showabilitypopup BS_TARGET - pause B_WAIT_TIME_MED orhalfword gMoveResultFlags, MOVE_RESULT_NO_EFFECT - printstring STRINGID_EMPTYSTRING3 modifybattlerstatstage BS_TARGET, STAT_ATK, INCREASE, 1, BattleScript_WindRiderActivatesMoveEnd_End, ANIM_ON BattleScript_WindRiderActivatesMoveEnd_End: goto BattleScript_MoveEnd From c1e232cbf694056a6566a616f0403f07495207ff Mon Sep 17 00:00:00 2001 From: LOuroboros Date: Sat, 3 Dec 2022 20:47:30 -0300 Subject: [PATCH 27/84] Implemented Rocky Payload's effect --- src/battle_util.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/battle_util.c b/src/battle_util.c index 45eecf1a1..cdaf67b59 100644 --- a/src/battle_util.c +++ b/src/battle_util.c @@ -8726,6 +8726,10 @@ static u32 CalcMoveBasePowerAfterModifiers(u16 move, u8 battlerAtk, u8 battlerDe if (IS_MOVE_PHYSICAL(move)) MulModifier(&modifier, UQ_4_12(1.5)); break; + case ABILITY_ROCKY_PAYLOAD: + if (moveType == TYPE_ROCK) + MulModifier(&modifier, UQ_4_12(1.5)); + break; } // field abilities From 88cae380d0f2b325463e3a4e0c6d276fe62c76b0 Mon Sep 17 00:00:00 2001 From: LOuroboros Date: Sat, 3 Dec 2022 21:20:34 -0300 Subject: [PATCH 28/84] Implemented Wind Power's effect --- data/battle_scripts_1.s | 30 +++++++++++++++++++++++++++ include/battle_scripts.h | 2 ++ include/constants/battle_string_ids.h | 3 ++- src/battle_message.c | 3 ++- src/battle_util.c | 19 +++++++++++++++++ 5 files changed, 55 insertions(+), 2 deletions(-) diff --git a/data/battle_scripts_1.s b/data/battle_scripts_1.s index a70ec7cf2..f1e3902b4 100644 --- a/data/battle_scripts_1.s +++ b/data/battle_scripts_1.s @@ -6609,6 +6609,27 @@ BattleScript_WindRiderEnd: destroyabilitypopup end2 +BattleScript_WindPowerActivatesEnd2:: + setbyte gBattlerAttacker, 0 +BattleScript_WindPowerLoop: + printstring STRINGID_EMPTYSTRING3 + jumpifability BS_ATTACKER, ABILITY_WIND_POWER, BattleScript_WindPowerLoop_Cont + goto BattleScript_WindPowerIncrement +BattleScript_WindPowerLoop_Cont: + jumpifstatus3 BS_ATTACKER, STATUS3_CHARGED_UP, BattleScript_WindPowerIncrement + goto BattleScript_WindPower_Activate +BattleScript_WindPower_Activate: + call BattleScript_AbilityPopUp + setcharge + printstring STRINGID_BEINGHITCHARGEDPKMNWITHPOWER + waitmessage B_WAIT_TIME_LONG +BattleScript_WindPowerIncrement: + addbyte gBattlerAttacker, 1 + jumpifbytenotequal gBattlerAttacker, gBattlersCount, BattleScript_WindPowerLoop +BattleScript_WindPowerEnd: + destroyabilitypopup + end2 + BattleScript_TrickRoomEnds:: printstring STRINGID_TRICKROOMENDS waitmessage B_WAIT_TIME_LONG @@ -7102,6 +7123,15 @@ BattleScript_AngerShellTrySpeed: BattleScript_AngerShellRet: return +BattleScript_WindPowerActivates:: + jumpifstatus3 BS_ATTACKER, STATUS3_CHARGED_UP, BattleScript_WindPowerActivates_Ret + call BattleScript_AbilityPopUp + setcharge + printstring STRINGID_BEINGHITCHARGEDPKMNWITHPOWER + waitmessage B_WAIT_TIME_LONG +BattleScript_WindPowerActivates_Ret: + return + BattleScript_PerishSongCountGoesDown:: printstring STRINGID_PKMNPERISHCOUNTFELL waitmessage B_WAIT_TIME_LONG diff --git a/include/battle_scripts.h b/include/battle_scripts.h index 4d1d750df..5953a8c76 100644 --- a/include/battle_scripts.h +++ b/include/battle_scripts.h @@ -438,6 +438,8 @@ extern const u8 BattleScript_AngerShellActivates[]; extern const u8 BattleScript_WellBakedBodyActivates[]; extern const u8 BattleScript_WindRiderActivatesEnd2[]; extern const u8 BattleScript_WindRiderActivatesMoveEnd[]; +extern const u8 BattleScript_WindPowerActivates[]; +extern const u8 BattleScript_WindPowerActivatesEnd2[]; // zmoves extern const u8 BattleScript_ZMoveActivateDamaging[]; diff --git a/include/constants/battle_string_ids.h b/include/constants/battle_string_ids.h index 4bce51a45..70841dd9a 100644 --- a/include/constants/battle_string_ids.h +++ b/include/constants/battle_string_ids.h @@ -630,8 +630,9 @@ #define STRINGID_ATTACKERHEALEDITSBURN 628 #define STRINGID_ATTACKERMELTEDTHEICE 629 #define STRINGID_TARGETTOUGHEDITOUT 630 +#define STRINGID_BEINGHITCHARGEDPKMNWITHPOWER 631 -#define BATTLESTRINGS_COUNT 631 +#define BATTLESTRINGS_COUNT 632 // This is the string id that gBattleStringsTable starts with. // String ids before this (e.g. STRINGID_INTROMSG) are not in the table, diff --git a/src/battle_message.c b/src/battle_message.c index c243e3041..b4f2c80f0 100644 --- a/src/battle_message.c +++ b/src/battle_message.c @@ -759,10 +759,11 @@ static const u8 sText_AttackerBrokeThroughParalysis[] = _("{B_ATK_NAME_WITH_PREF static const u8 sText_AttackerHealedItsBurn[] = _("{B_ATK_NAME_WITH_PREFIX} healed its burn with\nits sheer determination!"); static const u8 sText_AttackerMeltedTheIce[] = _("{B_ATK_NAME_WITH_PREFIX} melted the ice with\nits fiery determination!"); static const u8 sText_TargetToughedItOut[] = _("{B_DEF_NAME_WITH_PREFIX} toughed it out\nto show you its best side!"); - +static const u8 sText_BeingHitChargedPkmnWithPower[] = _("Being hit by {B_CURRENT_MOVE}\ncharged {B_ATK_NAME_WITH_PREFIX} with power!"); const u8 *const gBattleStringsTable[BATTLESTRINGS_COUNT] = { + [STRINGID_BEINGHITCHARGEDPKMNWITHPOWER - BATTLESTRINGS_TABLE_START] = sText_BeingHitChargedPkmnWithPower, [STRINGID_TARGETTOUGHEDITOUT - BATTLESTRINGS_TABLE_START] = sText_TargetToughedItOut, [STRINGID_ATTACKERMELTEDTHEICE - BATTLESTRINGS_TABLE_START] = sText_AttackerMeltedTheIce, [STRINGID_ATTACKERHEALEDITSBURN - BATTLESTRINGS_TABLE_START] = sText_AttackerHealedItsBurn, diff --git a/src/battle_util.c b/src/battle_util.c index cdaf67b59..e12612fa8 100644 --- a/src/battle_util.c +++ b/src/battle_util.c @@ -2378,6 +2378,12 @@ u8 DoFieldEndTurnEffects(void) BattleScriptExecute(BattleScript_WindRiderActivatesEnd2); effect++; } + if (IsAbilityOnSide(gActiveBattler, ABILITY_WIND_POWER)) + { + gCurrentMove = MOVE_TAILWIND; + BattleScriptExecute(BattleScript_WindPowerActivatesEnd2); + effect++; + } } gBattleStruct->turnSideTracker++; if (effect != 0) @@ -5777,6 +5783,19 @@ u8 AbilityBattleEffects(u8 caseID, u8 battler, u16 ability, u8 special, u16 move effect++; } break; + case ABILITY_WIND_POWER: + if (!(gMoveResultFlags & MOVE_RESULT_NO_EFFECT) + && !gProtectStructs[gBattlerAttacker].confusionSelfDmg + && TARGET_TURN_DAMAGED + && gBattleMoves[gCurrentMove].flags & FLAG_WIND_MOVE + && IsBattlerAlive(gBattlerTarget)) + { + gBattlerAttacker = gBattlerTarget; + BattleScriptPushCursor(); + gBattlescriptCurrInstr = BattleScript_WindPowerActivates; + effect++; + } + break; } break; case ABILITYEFFECT_MOVE_END_ATTACKER: // Same as above, but for attacker From 34cafa746ce99fcf4efe6f1513ef51e9a694d6cc Mon Sep 17 00:00:00 2001 From: LOuroboros Date: Sun, 4 Dec 2022 18:55:37 -0300 Subject: [PATCH 29/84] =?UTF-8?q?Implemented=20Electromorphosis'=20effect?= =?UTF-8?q?=20Also=20added=20a=20battle=20preproc=20config=20to=20check=20?= =?UTF-8?q?if=20the=20STATUS3=5FCHARGED=5FUP=20was=20already=20applied.=20?= =?UTF-8?q?Pok=C3=A9mon=20Scarlet=20and=20Violet=20don't=20check=20if=20th?= =?UTF-8?q?is=20status=20flag=20was=20already=20applied=20on=20the=20targe?= =?UTF-8?q?t=20of=20abilities=20like=20Electromorphosis=20(and=20Wind=20Po?= =?UTF-8?q?wer=20until=20proven=20otherwise.)=20As=20a=20result,=20the=20g?= =?UTF-8?q?ame=20will=20trigger=20the=20ability=20multiple=20times=20if=20?= =?UTF-8?q?they're=20hit=20by=20a=20multihit=20move.=20This=20directive=20?= =?UTF-8?q?makes=20the=20code=20end=20the=20ability=20effect=20preemptivel?= =?UTF-8?q?y=20if=20the=20target=20does=20have=20the=20status=20flag=20app?= =?UTF-8?q?lied.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- data/battle_scripts_1.s | 2 ++ include/config/battle.h | 1 + src/battle_util.c | 1 + 3 files changed, 4 insertions(+) diff --git a/data/battle_scripts_1.s b/data/battle_scripts_1.s index f1e3902b4..01c0df71a 100644 --- a/data/battle_scripts_1.s +++ b/data/battle_scripts_1.s @@ -7124,7 +7124,9 @@ BattleScript_AngerShellRet: return BattleScript_WindPowerActivates:: +.if B_CHECK_IF_CHARGED_UP == TRUE jumpifstatus3 BS_ATTACKER, STATUS3_CHARGED_UP, BattleScript_WindPowerActivates_Ret +.endif call BattleScript_AbilityPopUp setcharge printstring STRINGID_BEINGHITCHARGEDPKMNWITHPOWER diff --git a/include/config/battle.h b/include/config/battle.h index 644f9955c..3f359a6f2 100644 --- a/include/config/battle.h +++ b/include/config/battle.h @@ -109,6 +109,7 @@ #define B_PLUS_MINUS_INTERACTION GEN_LATEST // In Gen5+, Plus and Minus can be activated with themselves and the opposite ability. Before, only the opposing ability could activate it. #define B_WEATHER_FORMS GEN_LATEST // In Gen5+, Castform and Cherrim revert to their base form upon losing their respective ability. Cherrim needs Flower Gift to swap forms. #define B_SYMBIOSIS_GEMS GEN_LATEST // In Gen7+, Symbiosis passes an item after a gem-boosted attack. Previously, items are passed before the gem-boosted attack hits, making the item effect apply. +#define B_CHECK_IF_CHARGED_UP TRUE // If set to TRUE, certain abilities such as Electromorphosis WILL check if the STATUS3_CHARGED_UP status flag is applied. // Item settings #define B_HP_BERRIES GEN_LATEST // In Gen4+, berries which restore hp activate immediately after HP drops to half. In Gen3, the effect occurs at the end of the turn. diff --git a/src/battle_util.c b/src/battle_util.c index e12612fa8..e79947b09 100644 --- a/src/battle_util.c +++ b/src/battle_util.c @@ -5784,6 +5784,7 @@ u8 AbilityBattleEffects(u8 caseID, u8 battler, u16 ability, u8 special, u16 move } break; case ABILITY_WIND_POWER: + case ABILITY_ELECTROMORPHOSIS: if (!(gMoveResultFlags & MOVE_RESULT_NO_EFFECT) && !gProtectStructs[gBattlerAttacker].confusionSelfDmg && TARGET_TURN_DAMAGED From a328088122ff3a93b5edaa59c82010b37e93a03d Mon Sep 17 00:00:00 2001 From: LOuroboros Date: Sun, 4 Dec 2022 19:18:41 -0300 Subject: [PATCH 30/84] Implemented Protosynthesis' effect Also turned GetHighestStatId into a global function since Protosynthesis' effect uses it. --- data/battle_scripts_1.s | 8 +++++++ include/battle_script_commands.h | 1 + include/battle_scripts.h | 1 + include/constants/battle_string_ids.h | 4 +++- src/battle_main.c | 3 +++ src/battle_message.c | 4 ++++ src/battle_script_commands.c | 2 +- src/battle_util.c | 34 +++++++++++++++++++++------ 8 files changed, 48 insertions(+), 9 deletions(-) diff --git a/data/battle_scripts_1.s b/data/battle_scripts_1.s index 01c0df71a..3b8f69d7b 100644 --- a/data/battle_scripts_1.s +++ b/data/battle_scripts_1.s @@ -8410,6 +8410,14 @@ BattleScript_DeltaStreamActivates:: playanimation BS_ATTACKER, B_ANIM_STRONG_WINDS end3 +BattleScript_ProtosynthesisActivates:: + call BattleScript_AbilityPopUp + printstring STRINGID_SUNLIGHTACTIVATEDABILITY + waitmessage B_WAIT_TIME_MED + printstring STRINGID_STATWASHEIGHTENED + waitmessage B_WAIT_TIME_MED + end3 + BattleScript_AttackWeakenedByStrongWinds:: pause B_WAIT_TIME_SHORT printstring STRINGID_ATTACKWEAKENEDBSTRONGWINDS diff --git a/include/battle_script_commands.h b/include/battle_script_commands.h index 44185a11a..60fd9b156 100644 --- a/include/battle_script_commands.h +++ b/include/battle_script_commands.h @@ -43,6 +43,7 @@ u16 GetNaturePowerMove(void); u16 GetSecretPowerMoveEffect(void); void StealTargetItem(u8 battlerStealer, u8 battlerItem); u8 GetCatchingBattler(void); +u32 GetHighestStatId(u32 battlerId); extern void (* const gBattleScriptingCommandsTable[])(void); extern const u8 gBattlePalaceNatureToMoveGroupLikelihood[NUM_NATURES][4]; diff --git a/include/battle_scripts.h b/include/battle_scripts.h index 5953a8c76..c614e4b67 100644 --- a/include/battle_scripts.h +++ b/include/battle_scripts.h @@ -440,6 +440,7 @@ extern const u8 BattleScript_WindRiderActivatesEnd2[]; extern const u8 BattleScript_WindRiderActivatesMoveEnd[]; extern const u8 BattleScript_WindPowerActivates[]; extern const u8 BattleScript_WindPowerActivatesEnd2[]; +extern const u8 BattleScript_ProtosynthesisActivates[]; // zmoves extern const u8 BattleScript_ZMoveActivateDamaging[]; diff --git a/include/constants/battle_string_ids.h b/include/constants/battle_string_ids.h index 70841dd9a..d4525572f 100644 --- a/include/constants/battle_string_ids.h +++ b/include/constants/battle_string_ids.h @@ -631,8 +631,10 @@ #define STRINGID_ATTACKERMELTEDTHEICE 629 #define STRINGID_TARGETTOUGHEDITOUT 630 #define STRINGID_BEINGHITCHARGEDPKMNWITHPOWER 631 +#define STRINGID_SUNLIGHTACTIVATEDABILITY 632 +#define STRINGID_STATWASHEIGHTENED 633 -#define BATTLESTRINGS_COUNT 632 +#define BATTLESTRINGS_COUNT 634 // This is the string id that gBattleStringsTable starts with. // String ids before this (e.g. STRINGID_INTROMSG) are not in the table, diff --git a/src/battle_main.c b/src/battle_main.c index 392e53268..f78822247 100644 --- a/src/battle_main.c +++ b/src/battle_main.c @@ -4482,6 +4482,7 @@ u32 GetBattlerTotalSpeedStat(u8 battlerId) u32 speed = gBattleMons[battlerId].speed; u32 ability = GetBattlerAbility(battlerId); u32 holdEffect = GetBattlerHoldEffect(battlerId, TRUE); + u32 highestStat = GetHighestStatId(battlerId); // weather abilities if (WEATHER_HAS_EFFECT) @@ -4503,6 +4504,8 @@ u32 GetBattlerTotalSpeedStat(u8 battlerId) speed *= 2; else if (ability == ABILITY_SLOW_START && gDisableStructs[battlerId].slowStartTimer != 0) speed /= 2; + else if (ability == ABILITY_PROTOSYNTHESIS && gBattleWeather & B_WEATHER_SUN && highestStat == STAT_SPEED) + speed = (speed * 150) / 100; // stat stages speed *= gStatStageRatios[gBattleMons[battlerId].statStages[STAT_SPEED]][0]; diff --git a/src/battle_message.c b/src/battle_message.c index b4f2c80f0..e8af7d625 100644 --- a/src/battle_message.c +++ b/src/battle_message.c @@ -760,9 +760,13 @@ static const u8 sText_AttackerHealedItsBurn[] = _("{B_ATK_NAME_WITH_PREFIX} heal static const u8 sText_AttackerMeltedTheIce[] = _("{B_ATK_NAME_WITH_PREFIX} melted the ice with\nits fiery determination!"); static const u8 sText_TargetToughedItOut[] = _("{B_DEF_NAME_WITH_PREFIX} toughed it out\nto show you its best side!"); static const u8 sText_BeingHitChargedPkmnWithPower[] = _("Being hit by {B_CURRENT_MOVE}\ncharged {B_ATK_NAME_WITH_PREFIX} with power!"); +static const u8 sText_SunlightActivatedAbility[] = _("The harsh sunlight activated\n{B_DEF_NAME_WITH_PREFIX}'s {B_DEF_ABILITY}!"); +static const u8 sText_StatWasHeightened[] = _("{B_DEF_NAME_WITH_PREFIX}'s {B_BUFF1} was heightened!"); const u8 *const gBattleStringsTable[BATTLESTRINGS_COUNT] = { + [STRINGID_STATWASHEIGHTENED - BATTLESTRINGS_TABLE_START] = sText_StatWasHeightened, + [STRINGID_SUNLIGHTACTIVATEDABILITY - BATTLESTRINGS_TABLE_START] = sText_SunlightActivatedAbility, [STRINGID_BEINGHITCHARGEDPKMNWITHPOWER - BATTLESTRINGS_TABLE_START] = sText_BeingHitChargedPkmnWithPower, [STRINGID_TARGETTOUGHEDITOUT - BATTLESTRINGS_TABLE_START] = sText_TargetToughedItOut, [STRINGID_ATTACKERMELTEDTHEICE - BATTLESTRINGS_TABLE_START] = sText_AttackerMeltedTheIce, diff --git a/src/battle_script_commands.c b/src/battle_script_commands.c index 09ef738df..6196ab37b 100644 --- a/src/battle_script_commands.c +++ b/src/battle_script_commands.c @@ -8098,7 +8098,7 @@ static void RecalcBattlerStats(u32 battler, struct Pokemon *mon) gBattleMons[battler].type2 = gSpeciesInfo[gBattleMons[battler].species].type2; } -static u32 GetHighestStatId(u32 battlerId) +u32 GetHighestStatId(u32 battlerId) { u32 i, highestId = STAT_ATK, highestStat = gBattleMons[battlerId].attack; diff --git a/src/battle_util.c b/src/battle_util.c index e79947b09..13c581730 100644 --- a/src/battle_util.c +++ b/src/battle_util.c @@ -4883,6 +4883,15 @@ u8 AbilityBattleEffects(u8 caseID, u8 battler, u16 ability, u8 special, u16 move effect++; } break; + case ABILITY_PROTOSYNTHESIS: + if (!gSpecialStatuses[battler].switchInAbilityDone && gBattleWeather & B_WEATHER_SUN) + { + gSpecialStatuses[battler].switchInAbilityDone = TRUE; + PREPARE_STAT_BUFFER(gBattleTextBuff1, GetHighestStatId(battler)); + BattleScriptPushCursorAndCallback(BattleScript_ProtosynthesisActivates); + effect++; + } + break; #if B_WEATHER_FORMS < GEN_5 default: if (gBattleMons[battler].species == SPECIES_CHERRIM) @@ -8632,15 +8641,19 @@ static u16 CalcMoveBasePower(u16 move, u8 battlerAtk, u8 battlerDef) static u32 CalcMoveBasePowerAfterModifiers(u16 move, u8 battlerAtk, u8 battlerDef, u8 moveType, bool32 updateFlags) { - u32 i, ability; + u32 i; u32 holdEffectAtk, holdEffectParamAtk; u16 basePower = CalcMoveBasePower(move, battlerAtk, battlerDef); u16 holdEffectModifier; u16 modifier = UQ_4_12(1.0); u32 atkSide = GET_BATTLER_SIDE(battlerAtk); + u16 atkAbility = GetBattlerAbility(battlerAtk); + u16 defAbility = GetBattlerAbility(battlerDef); + u8 atkHighestStat = GetHighestStatId(battlerAtk); + u8 defHighestStat = GetHighestStatId(battlerDef); // attacker's abilities - switch (GetBattlerAbility(battlerAtk)) + switch (atkAbility) { case ABILITY_TECHNICIAN: if (basePower <= 60) @@ -8750,11 +8763,15 @@ static u32 CalcMoveBasePowerAfterModifiers(u16 move, u8 battlerAtk, u8 battlerDe if (moveType == TYPE_ROCK) MulModifier(&modifier, UQ_4_12(1.5)); break; + case ABILITY_PROTOSYNTHESIS: + if (gBattleWeather & B_WEATHER_SUN && WEATHER_HAS_EFFECT && (atkHighestStat == STAT_ATK || atkHighestStat == STAT_SPATK)) + MulModifier(&modifier, UQ_4_12(1.3)); + break; } // field abilities if ((IsAbilityOnField(ABILITY_DARK_AURA) && moveType == TYPE_DARK) - || (IsAbilityOnField(ABILITY_FAIRY_AURA) && moveType == TYPE_FAIRY)) + || (IsAbilityOnField(ABILITY_FAIRY_AURA) && moveType == TYPE_FAIRY)) { if (IsAbilityOnField(ABILITY_AURA_BREAK)) MulModifier(&modifier, UQ_4_12(0.75)); @@ -8782,8 +8799,7 @@ static u32 CalcMoveBasePowerAfterModifiers(u16 move, u8 battlerAtk, u8 battlerDe } // target's abilities - ability = GetBattlerAbility(battlerDef); - switch (ability) + switch (defAbility) { case ABILITY_HEATPROOF: case ABILITY_WATER_BUBBLE: @@ -8791,7 +8807,7 @@ static u32 CalcMoveBasePowerAfterModifiers(u16 move, u8 battlerAtk, u8 battlerDe { MulModifier(&modifier, UQ_4_12(0.5)); if (updateFlags) - RecordAbilityBattle(battlerDef, ability); + RecordAbilityBattle(battlerDef, defAbility); } break; case ABILITY_DRY_SKIN: @@ -8803,11 +8819,15 @@ static u32 CalcMoveBasePowerAfterModifiers(u16 move, u8 battlerAtk, u8 battlerDe { MulModifier(&modifier, UQ_4_12(0.5)); if (updateFlags) - RecordAbilityBattle(battlerDef, ability); + RecordAbilityBattle(battlerDef, defAbility); } if (moveType == TYPE_FIRE) MulModifier(&modifier, UQ_4_12(2.0)); break; + case ABILITY_PROTOSYNTHESIS: + if (gBattleWeather & B_WEATHER_SUN && WEATHER_HAS_EFFECT && (defHighestStat == STAT_DEF || defHighestStat == STAT_SPDEF)) + MulModifier(&modifier, UQ_4_12(0.3)); + break; } holdEffectAtk = GetBattlerHoldEffect(battlerAtk, TRUE); From e25f843db3ac947fdfa179e2b24d7e886249f94f Mon Sep 17 00:00:00 2001 From: LOuroboros Date: Sun, 4 Dec 2022 19:35:51 -0300 Subject: [PATCH 31/84] Implemented Quark Drive's effect Also tweaked STRINGID_SUNLIGHTACTIVATEDABILITY and STRINGID_STATWASHEIGHTENED. --- data/battle_scripts_1.s | 8 ++++++++ include/battle_scripts.h | 1 + include/constants/battle_string_ids.h | 3 ++- src/battle_main.c | 2 ++ src/battle_message.c | 6 ++++-- src/battle_util.c | 17 +++++++++++++++++ 6 files changed, 34 insertions(+), 3 deletions(-) diff --git a/data/battle_scripts_1.s b/data/battle_scripts_1.s index 3b8f69d7b..2f2e6f1a8 100644 --- a/data/battle_scripts_1.s +++ b/data/battle_scripts_1.s @@ -8418,6 +8418,14 @@ BattleScript_ProtosynthesisActivates:: waitmessage B_WAIT_TIME_MED end3 +BattleScript_QuarkDriveActivates:: + call BattleScript_AbilityPopUp + printstring STRINGID_ELECTRICTERRAINACTIVATEDABILITY + waitmessage B_WAIT_TIME_MED + printstring STRINGID_STATWASHEIGHTENED + waitmessage B_WAIT_TIME_MED + end3 + BattleScript_AttackWeakenedByStrongWinds:: pause B_WAIT_TIME_SHORT printstring STRINGID_ATTACKWEAKENEDBSTRONGWINDS diff --git a/include/battle_scripts.h b/include/battle_scripts.h index c614e4b67..519c72fc4 100644 --- a/include/battle_scripts.h +++ b/include/battle_scripts.h @@ -441,6 +441,7 @@ extern const u8 BattleScript_WindRiderActivatesMoveEnd[]; extern const u8 BattleScript_WindPowerActivates[]; extern const u8 BattleScript_WindPowerActivatesEnd2[]; extern const u8 BattleScript_ProtosynthesisActivates[]; +extern const u8 BattleScript_QuarkDriveActivates[]; // zmoves extern const u8 BattleScript_ZMoveActivateDamaging[]; diff --git a/include/constants/battle_string_ids.h b/include/constants/battle_string_ids.h index d4525572f..9606c5f59 100644 --- a/include/constants/battle_string_ids.h +++ b/include/constants/battle_string_ids.h @@ -633,8 +633,9 @@ #define STRINGID_BEINGHITCHARGEDPKMNWITHPOWER 631 #define STRINGID_SUNLIGHTACTIVATEDABILITY 632 #define STRINGID_STATWASHEIGHTENED 633 +#define STRINGID_ELECTRICTERRAINACTIVATEDABILITY 634 -#define BATTLESTRINGS_COUNT 634 +#define BATTLESTRINGS_COUNT 635 // This is the string id that gBattleStringsTable starts with. // String ids before this (e.g. STRINGID_INTROMSG) are not in the table, diff --git a/src/battle_main.c b/src/battle_main.c index f78822247..42de8ac3a 100644 --- a/src/battle_main.c +++ b/src/battle_main.c @@ -4506,6 +4506,8 @@ u32 GetBattlerTotalSpeedStat(u8 battlerId) speed /= 2; else if (ability == ABILITY_PROTOSYNTHESIS && gBattleWeather & B_WEATHER_SUN && highestStat == STAT_SPEED) speed = (speed * 150) / 100; + else if (ability == ABILITY_QUARK_DRIVE && gFieldStatuses & STATUS_FIELD_ELECTRIC_TERRAIN && highestStat == STAT_SPEED) + speed = (speed * 150) / 100; // stat stages speed *= gStatStageRatios[gBattleMons[battlerId].statStages[STAT_SPEED]][0]; diff --git a/src/battle_message.c b/src/battle_message.c index e8af7d625..00275fa45 100644 --- a/src/battle_message.c +++ b/src/battle_message.c @@ -760,11 +760,13 @@ static const u8 sText_AttackerHealedItsBurn[] = _("{B_ATK_NAME_WITH_PREFIX} heal static const u8 sText_AttackerMeltedTheIce[] = _("{B_ATK_NAME_WITH_PREFIX} melted the ice with\nits fiery determination!"); static const u8 sText_TargetToughedItOut[] = _("{B_DEF_NAME_WITH_PREFIX} toughed it out\nto show you its best side!"); static const u8 sText_BeingHitChargedPkmnWithPower[] = _("Being hit by {B_CURRENT_MOVE}\ncharged {B_ATK_NAME_WITH_PREFIX} with power!"); -static const u8 sText_SunlightActivatedAbility[] = _("The harsh sunlight activated\n{B_DEF_NAME_WITH_PREFIX}'s {B_DEF_ABILITY}!"); -static const u8 sText_StatWasHeightened[] = _("{B_DEF_NAME_WITH_PREFIX}'s {B_BUFF1} was heightened!"); +static const u8 sText_SunlightActivatedAbility[] = _("The harsh sunlight activated\n{B_ATK_NAME_WITH_PREFIX}'s {B_ATK_ABILITY}!"); +static const u8 sText_StatWasHeightened[] = _("{B_ATK_NAME_WITH_PREFIX}'s {B_BUFF1} was heightened!"); +static const u8 sText_ElectricTerrainActivatedAbility[] = _("The Electric Terrain activated\n{B_ATK_NAME_WITH_PREFIX}'s {B_ATK_ABILITY}!"); const u8 *const gBattleStringsTable[BATTLESTRINGS_COUNT] = { + [STRINGID_ELECTRICTERRAINACTIVATEDABILITY - BATTLESTRINGS_TABLE_START] = sText_ElectricTerrainActivatedAbility, [STRINGID_STATWASHEIGHTENED - BATTLESTRINGS_TABLE_START] = sText_StatWasHeightened, [STRINGID_SUNLIGHTACTIVATEDABILITY - BATTLESTRINGS_TABLE_START] = sText_SunlightActivatedAbility, [STRINGID_BEINGHITCHARGEDPKMNWITHPOWER - BATTLESTRINGS_TABLE_START] = sText_BeingHitChargedPkmnWithPower, diff --git a/src/battle_util.c b/src/battle_util.c index 13c581730..aa00f1df7 100644 --- a/src/battle_util.c +++ b/src/battle_util.c @@ -4892,6 +4892,15 @@ u8 AbilityBattleEffects(u8 caseID, u8 battler, u16 ability, u8 special, u16 move effect++; } break; + case ABILITY_QUARK_DRIVE: + if (!gSpecialStatuses[battler].switchInAbilityDone && gFieldStatuses & STATUS_FIELD_ELECTRIC_TERRAIN) + { + gSpecialStatuses[battler].switchInAbilityDone = TRUE; + PREPARE_STAT_BUFFER(gBattleTextBuff1, GetHighestStatId(battler)); + BattleScriptPushCursorAndCallback(BattleScript_QuarkDriveActivates); + effect++; + } + break; #if B_WEATHER_FORMS < GEN_5 default: if (gBattleMons[battler].species == SPECIES_CHERRIM) @@ -8767,6 +8776,10 @@ static u32 CalcMoveBasePowerAfterModifiers(u16 move, u8 battlerAtk, u8 battlerDe if (gBattleWeather & B_WEATHER_SUN && WEATHER_HAS_EFFECT && (atkHighestStat == STAT_ATK || atkHighestStat == STAT_SPATK)) MulModifier(&modifier, UQ_4_12(1.3)); break; + case ABILITY_QUARK_DRIVE: + if (gFieldStatuses & STATUS_FIELD_ELECTRIC_TERRAIN && (atkHighestStat == STAT_ATK || atkHighestStat == STAT_SPATK)) + MulModifier(&modifier, UQ_4_12(1.3)); + break; } // field abilities @@ -8828,6 +8841,10 @@ static u32 CalcMoveBasePowerAfterModifiers(u16 move, u8 battlerAtk, u8 battlerDe if (gBattleWeather & B_WEATHER_SUN && WEATHER_HAS_EFFECT && (defHighestStat == STAT_DEF || defHighestStat == STAT_SPDEF)) MulModifier(&modifier, UQ_4_12(0.3)); break; + case ABILITY_QUARK_DRIVE: + if (gFieldStatuses & STATUS_FIELD_ELECTRIC_TERRAIN && (defHighestStat == STAT_DEF || defHighestStat == STAT_SPDEF)) + MulModifier(&modifier, UQ_4_12(0.3)); + break; } holdEffectAtk = GetBattlerHoldEffect(battlerAtk, TRUE); From de05c4dd56e2c16dd39185a959902f233009417e Mon Sep 17 00:00:00 2001 From: LOuroboros Date: Sun, 4 Dec 2022 20:17:14 -0300 Subject: [PATCH 32/84] Implemented Good as Gold's effect --- data/battle_scripts_1.s | 9 +++++++++ include/battle_scripts.h | 1 + src/battle_util.c | 9 +++++++++ 3 files changed, 19 insertions(+) diff --git a/data/battle_scripts_1.s b/data/battle_scripts_1.s index 2f2e6f1a8..6cf62d2f9 100644 --- a/data/battle_scripts_1.s +++ b/data/battle_scripts_1.s @@ -9888,6 +9888,15 @@ BattleScript_WindRiderActivatesMoveEnd:: BattleScript_WindRiderActivatesMoveEnd_End: goto BattleScript_MoveEnd +BattleScript_GoodAsGoldActivates:: + attackstring + ppreduce + showabilitypopup BS_TARGET + pause B_WAIT_TIME_SHORT + printstring STRINGID_ITDOESNTAFFECT + waitmessage B_WAIT_TIME_MED + goto BattleScript_MoveEnd + BattleScript_PastelVeilActivates:: setbyte gBattleCommunication, 0 setbyte gBattleCommunication + 1, 0 diff --git a/include/battle_scripts.h b/include/battle_scripts.h index 519c72fc4..960262cba 100644 --- a/include/battle_scripts.h +++ b/include/battle_scripts.h @@ -442,6 +442,7 @@ extern const u8 BattleScript_WindPowerActivates[]; extern const u8 BattleScript_WindPowerActivatesEnd2[]; extern const u8 BattleScript_ProtosynthesisActivates[]; extern const u8 BattleScript_QuarkDriveActivates[]; +extern const u8 BattleScript_GoodAsGoldActivates[]; // zmoves extern const u8 BattleScript_ZMoveActivateDamaging[]; diff --git a/src/battle_util.c b/src/battle_util.c index aa00f1df7..6c69183d0 100644 --- a/src/battle_util.c +++ b/src/battle_util.c @@ -5149,6 +5149,15 @@ u8 AbilityBattleEffects(u8 caseID, u8 battler, u16 ability, u8 special, u16 move gBattlescriptCurrInstr = BattleScript_WindRiderActivatesMoveEnd; effect = 1; } + else if (GetBattlerAbility(gBattlerTarget) == ABILITY_GOOD_AS_GOLD + && IS_MOVE_STATUS(gCurrentMove) + && !(moveTarget & MOVE_TARGET_USER) + && !(moveTarget & MOVE_TARGET_OPPONENTS_FIELD) + && !(moveTarget & MOVE_TARGET_ALL_BATTLERS)) + { + gBattlescriptCurrInstr = BattleScript_GoodAsGoldActivates; + effect = 1; + } break; } case ABILITYEFFECT_ABSORBING: // 3 From 24465858a7d3506cc66b724bf7dc6eda85e8c7a6 Mon Sep 17 00:00:00 2001 From: LOuroboros Date: Sun, 4 Dec 2022 20:24:35 -0300 Subject: [PATCH 33/84] Implemented the 4 Ruin Abilities --- data/battle_scripts_1.s | 6 ++++ include/battle_scripts.h | 1 + include/constants/battle_string_ids.h | 3 +- src/battle_message.c | 2 ++ src/battle_util.c | 48 +++++++++++++++++++++++++++ 5 files changed, 59 insertions(+), 1 deletion(-) diff --git a/data/battle_scripts_1.s b/data/battle_scripts_1.s index 6cf62d2f9..746d83230 100644 --- a/data/battle_scripts_1.s +++ b/data/battle_scripts_1.s @@ -8426,6 +8426,12 @@ BattleScript_QuarkDriveActivates:: waitmessage B_WAIT_TIME_MED end3 +BattleScript_RuinAbilityActivates:: + call BattleScript_AbilityPopUp + printstring STRINGID_ABILITYWEAKENEDFSURROUNDINGMONSSTAT + waitmessage B_WAIT_TIME_LONG + end3 + BattleScript_AttackWeakenedByStrongWinds:: pause B_WAIT_TIME_SHORT printstring STRINGID_ATTACKWEAKENEDBSTRONGWINDS diff --git a/include/battle_scripts.h b/include/battle_scripts.h index 960262cba..33138189b 100644 --- a/include/battle_scripts.h +++ b/include/battle_scripts.h @@ -443,6 +443,7 @@ extern const u8 BattleScript_WindPowerActivatesEnd2[]; extern const u8 BattleScript_ProtosynthesisActivates[]; extern const u8 BattleScript_QuarkDriveActivates[]; extern const u8 BattleScript_GoodAsGoldActivates[]; +extern const u8 BattleScript_RuinAbilityActivates[]; // zmoves extern const u8 BattleScript_ZMoveActivateDamaging[]; diff --git a/include/constants/battle_string_ids.h b/include/constants/battle_string_ids.h index 9606c5f59..9c0965bb5 100644 --- a/include/constants/battle_string_ids.h +++ b/include/constants/battle_string_ids.h @@ -634,8 +634,9 @@ #define STRINGID_SUNLIGHTACTIVATEDABILITY 632 #define STRINGID_STATWASHEIGHTENED 633 #define STRINGID_ELECTRICTERRAINACTIVATEDABILITY 634 +#define STRINGID_ABILITYWEAKENEDFSURROUNDINGMONSSTAT 635 -#define BATTLESTRINGS_COUNT 635 +#define BATTLESTRINGS_COUNT 636 // This is the string id that gBattleStringsTable starts with. // String ids before this (e.g. STRINGID_INTROMSG) are not in the table, diff --git a/src/battle_message.c b/src/battle_message.c index 00275fa45..d109e0f4e 100644 --- a/src/battle_message.c +++ b/src/battle_message.c @@ -763,9 +763,11 @@ static const u8 sText_BeingHitChargedPkmnWithPower[] = _("Being hit by {B_CURREN static const u8 sText_SunlightActivatedAbility[] = _("The harsh sunlight activated\n{B_ATK_NAME_WITH_PREFIX}'s {B_ATK_ABILITY}!"); static const u8 sText_StatWasHeightened[] = _("{B_ATK_NAME_WITH_PREFIX}'s {B_BUFF1} was heightened!"); static const u8 sText_ElectricTerrainActivatedAbility[] = _("The Electric Terrain activated\n{B_ATK_NAME_WITH_PREFIX}'s {B_ATK_ABILITY}!"); +static const u8 sText_AbilityWeakenedSurroundingMonsStat[] = _("{B_ATK_NAME_WITH_PREFIX}'s {B_ATK_ABILITY}\nweakened the {B_BUFF1} of\lall surrounding Pokémon!\p"); const u8 *const gBattleStringsTable[BATTLESTRINGS_COUNT] = { + [STRINGID_ABILITYWEAKENEDFSURROUNDINGMONSSTAT - BATTLESTRINGS_TABLE_START] = sText_AbilityWeakenedSurroundingMonsStat, [STRINGID_ELECTRICTERRAINACTIVATEDABILITY - BATTLESTRINGS_TABLE_START] = sText_ElectricTerrainActivatedAbility, [STRINGID_STATWASHEIGHTENED - BATTLESTRINGS_TABLE_START] = sText_StatWasHeightened, [STRINGID_SUNLIGHTACTIVATEDABILITY - BATTLESTRINGS_TABLE_START] = sText_SunlightActivatedAbility, diff --git a/src/battle_util.c b/src/battle_util.c index 6c69183d0..e89ea26b1 100644 --- a/src/battle_util.c +++ b/src/battle_util.c @@ -4901,6 +4901,42 @@ u8 AbilityBattleEffects(u8 caseID, u8 battler, u16 ability, u8 special, u16 move effect++; } break; + case ABILITY_VESSEL_OF_RUIN: + if (!gSpecialStatuses[battler].switchInAbilityDone) + { + PREPARE_STAT_BUFFER(gBattleTextBuff1, STAT_SPATK); + gSpecialStatuses[battler].switchInAbilityDone = TRUE; + BattleScriptPushCursorAndCallback(BattleScript_RuinAbilityActivates); + effect++; + } + break; + case ABILITY_SWORD_OF_RUIN: + if (!gSpecialStatuses[battler].switchInAbilityDone) + { + PREPARE_STAT_BUFFER(gBattleTextBuff1, STAT_DEF); + gSpecialStatuses[battler].switchInAbilityDone = TRUE; + BattleScriptPushCursorAndCallback(BattleScript_RuinAbilityActivates); + effect++; + } + break; + case ABILITY_TABLETS_OF_RUIN: + if (!gSpecialStatuses[battler].switchInAbilityDone) + { + PREPARE_STAT_BUFFER(gBattleTextBuff1, STAT_ATK); + gSpecialStatuses[battler].switchInAbilityDone = TRUE; + BattleScriptPushCursorAndCallback(BattleScript_RuinAbilityActivates); + effect++; + } + break; + case ABILITY_BEADS_OF_RUIN: + if (!gSpecialStatuses[battler].switchInAbilityDone) + { + PREPARE_STAT_BUFFER(gBattleTextBuff1, STAT_SPDEF); + gSpecialStatuses[battler].switchInAbilityDone = TRUE; + BattleScriptPushCursorAndCallback(BattleScript_RuinAbilityActivates); + effect++; + } + break; #if B_WEATHER_FORMS < GEN_5 default: if (gBattleMons[battler].species == SPECIES_CHERRIM) @@ -8801,6 +8837,18 @@ static u32 CalcMoveBasePowerAfterModifiers(u16 move, u8 battlerAtk, u8 battlerDe MulModifier(&modifier, UQ_4_12(1.33)); } + if (IsAbilityOnField(ABILITY_VESSEL_OF_RUIN) && atkAbility != ABILITY_VESSEL_OF_RUIN && IS_MOVE_SPECIAL(gCurrentMove)) + MulModifier(&modifier, UQ_4_12(0.25)); + + if (IsAbilityOnField(ABILITY_SWORD_OF_RUIN) && defAbility != ABILITY_SWORD_OF_RUIN && IS_MOVE_PHYSICAL(gCurrentMove)) + MulModifier(&modifier, UQ_4_12(0.25)); + + if (IsAbilityOnField(ABILITY_TABLETS_OF_RUIN) && atkAbility != ABILITY_TABLETS_OF_RUIN && IS_MOVE_PHYSICAL(gCurrentMove)) + MulModifier(&modifier, UQ_4_12(0.25)); + + if (IsAbilityOnField(ABILITY_BEADS_OF_RUIN) && defAbility != ABILITY_BEADS_OF_RUIN && IS_MOVE_SPECIAL(gCurrentMove)) + MulModifier(&modifier, UQ_4_12(0.25)); + // attacker partner's abilities if (IsBattlerAlive(BATTLE_PARTNER(battlerAtk))) { From dd90ab1911a270720b2b39a4637ff7b0567611f6 Mon Sep 17 00:00:00 2001 From: LOuroboros Date: Sun, 4 Dec 2022 20:39:23 -0300 Subject: [PATCH 34/84] Implemented Orichalcum Pulse's effect --- src/battle_util.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/battle_util.c b/src/battle_util.c index e89ea26b1..f4fe58ae1 100644 --- a/src/battle_util.c +++ b/src/battle_util.c @@ -4937,6 +4937,13 @@ u8 AbilityBattleEffects(u8 caseID, u8 battler, u16 ability, u8 special, u16 move effect++; } break; + case ABILITY_ORICHALCUM_PULSE: + if (TryChangeBattleWeather(battler, ENUM_WEATHER_SUN, TRUE)) + { + BattleScriptPushCursorAndCallback(BattleScript_DroughtActivates); + effect++; + } + break; #if B_WEATHER_FORMS < GEN_5 default: if (gBattleMons[battler].species == SPECIES_CHERRIM) @@ -8825,6 +8832,10 @@ static u32 CalcMoveBasePowerAfterModifiers(u16 move, u8 battlerAtk, u8 battlerDe if (gFieldStatuses & STATUS_FIELD_ELECTRIC_TERRAIN && (atkHighestStat == STAT_ATK || atkHighestStat == STAT_SPATK)) MulModifier(&modifier, UQ_4_12(1.3)); break; + case ABILITY_ORICHALCUM_PULSE: + if (gBattleWeather & B_WEATHER_SUN && WEATHER_HAS_EFFECT) + MulModifier(&modifier, UQ_4_12(1.3)); + break; } // field abilities From 18c30be8384008b63f2903d4a0ca087530c8c03a Mon Sep 17 00:00:00 2001 From: LOuroboros Date: Sun, 4 Dec 2022 20:40:34 -0300 Subject: [PATCH 35/84] Implemented Hadron Engine's effect --- src/battle_util.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/battle_util.c b/src/battle_util.c index f4fe58ae1..38504e1bb 100644 --- a/src/battle_util.c +++ b/src/battle_util.c @@ -4944,6 +4944,13 @@ u8 AbilityBattleEffects(u8 caseID, u8 battler, u16 ability, u8 special, u16 move effect++; } break; + case ABILITY_HADRON_ENGINE: + if (TryChangeBattleTerrain(battler, STATUS_FIELD_ELECTRIC_TERRAIN, &gFieldTimers.terrainTimer)) + { + BattleScriptPushCursorAndCallback(BattleScript_ElectricSurgeActivates); + effect++; + } + break; #if B_WEATHER_FORMS < GEN_5 default: if (gBattleMons[battler].species == SPECIES_CHERRIM) @@ -8836,6 +8843,10 @@ static u32 CalcMoveBasePowerAfterModifiers(u16 move, u8 battlerAtk, u8 battlerDe if (gBattleWeather & B_WEATHER_SUN && WEATHER_HAS_EFFECT) MulModifier(&modifier, UQ_4_12(1.3)); break; + case ABILITY_HADRON_ENGINE: + if (gFieldStatuses & STATUS_FIELD_ELECTRIC_TERRAIN) + MulModifier(&modifier, UQ_4_12(1.3)); + break; } // field abilities From 7c67f1ac27ad698d76754b88653e8e98739f6a29 Mon Sep 17 00:00:00 2001 From: LOuroboros Date: Mon, 5 Dec 2022 23:24:27 -0300 Subject: [PATCH 36/84] Activated Switch In abilities during weather and terrain change Abilities such as Protosynthesis and Quark Drive demand it. --- data/battle_scripts_1.s | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/data/battle_scripts_1.s b/data/battle_scripts_1.s index 746d83230..785625e32 100644 --- a/data/battle_scripts_1.s +++ b/data/battle_scripts_1.s @@ -4886,6 +4886,7 @@ BattleScript_MoveWeatherChange:: printfromtable gMoveWeatherChangeStringIds waitmessage B_WAIT_TIME_LONG call BattleScript_WeatherFormChanges + call BattleScript_ActivateSwitchInAbilities goto BattleScript_MoveEnd BattleScript_EffectSunnyDay:: @@ -8458,6 +8459,18 @@ BattleScript_TerrainSeedLoop_NextBattler: addbyte gBattlerTarget, 0x1 jumpifbytenotequal gBattlerTarget, gBattlersCount, BattleScript_TerrainSeedLoopIter restoretarget + call BattleScript_ActivateSwitchInAbilities + return + +BattleScript_ActivateSwitchInAbilities: + copybyte sBATTLER, gBattlerAttacker + setbyte gBattlerAttacker, 0 +BattleScript_ActivateSwitchInAbilities_Loop: + switchinabilities BS_ATTACKER +BattleScript_ActivateSwitchInAbilities_Increment: + addbyte gBattlerAttacker, 1 + jumpifbytenotequal gBattlerAttacker, gBattlersCount, BattleScript_ActivateSwitchInAbilities_Loop + copybyte gBattlerAttacker, sBATTLER return BattleScript_ElectricSurgeActivates:: From f96137eb5e55dbc3bba9c59f6f34218b63f09d95 Mon Sep 17 00:00:00 2001 From: LOuroboros Date: Mon, 5 Dec 2022 23:36:18 -0300 Subject: [PATCH 37/84] Implemented Cud Chew's effect --- data/battle_scripts_1.s | 11 +++++++++++ include/battle.h | 1 + include/battle_scripts.h | 1 + src/battle_util.c | 15 +++++++++++++++ 4 files changed, 28 insertions(+) diff --git a/data/battle_scripts_1.s b/data/battle_scripts_1.s index 785625e32..00fb0ba27 100644 --- a/data/battle_scripts_1.s +++ b/data/battle_scripts_1.s @@ -7656,6 +7656,17 @@ BattleScript_BallFetch:: waitmessage B_WAIT_TIME_LONG end3 +BattleScript_CudChewActivates:: + pause B_WAIT_TIME_SHORTEST + call BattleScript_AbilityPopUp + setbyte sBERRY_OVERRIDE, 1 @ override the requirements for eating berries + consumeberry BS_TARGET, FALSE + orword gHitMarker, HITMARKER_SKIP_DMG_TRACK | HITMARKER_IGNORE_SUBSTITUTE | HITMARKER_PASSIVE_DAMAGE + healthbarupdate BS_ATTACKER + datahpupdate BS_ATTACKER + setbyte sBERRY_OVERRIDE, 0 + end3 + BattleScript_TargetFormChange:: pause 5 copybyte gBattlerAbility, gBattlerTarget diff --git a/include/battle.h b/include/battle.h index 14037b72c..4b33062d3 100644 --- a/include/battle.h +++ b/include/battle.h @@ -104,6 +104,7 @@ struct DisableStruct u8 noRetreat:1; u8 tarShot:1; u8 octolock:1; + u8 cudChew:1; }; struct ProtectStruct diff --git a/include/battle_scripts.h b/include/battle_scripts.h index 33138189b..13fa5a4a6 100644 --- a/include/battle_scripts.h +++ b/include/battle_scripts.h @@ -444,6 +444,7 @@ extern const u8 BattleScript_ProtosynthesisActivates[]; extern const u8 BattleScript_QuarkDriveActivates[]; extern const u8 BattleScript_GoodAsGoldActivates[]; extern const u8 BattleScript_RuinAbilityActivates[]; +extern const u8 BattleScript_CudChewActivates[]; // zmoves extern const u8 BattleScript_ZMoveActivateDamaging[]; diff --git a/src/battle_util.c b/src/battle_util.c index 38504e1bb..7fdd63eb4 100644 --- a/src/battle_util.c +++ b/src/battle_util.c @@ -2696,6 +2696,7 @@ enum ENDTURN_THROAT_CHOP, ENDTURN_SLOW_START, ENDTURN_PLASMA_FISTS, + ENDTURN_CUD_CHEW, ENDTURN_BATTLER_COUNT }; @@ -3238,6 +3239,11 @@ u8 DoBattlerEndTurnEffects(void) gStatuses4[i] &= ~STATUS4_PLASMA_FISTS; gBattleStruct->turnEffectsTracker++; break; + case ENDTURN_CUD_CHEW: + if (GetBattlerAbility(gActiveBattler) == ABILITY_CUD_CHEW && !gDisableStructs[gActiveBattler].cudChew && GetUsedHeldItem(gActiveBattler) != ITEM_NONE) + gDisableStructs[gActiveBattler].cudChew = TRUE; + gBattleStruct->turnEffectsTracker++; + break; case ENDTURN_BATTLER_COUNT: // done gBattleStruct->turnEffectsTracker = 0; gBattleStruct->turnEffectsBattlerId++; @@ -5154,6 +5160,15 @@ u8 AbilityBattleEffects(u8 caseID, u8 battler, u16 ability, u8 special, u16 move effect++; } break; + case ABILITY_CUD_CHEW: + if (ItemId_GetPocket(GetUsedHeldItem(battler)) == POCKET_BERRIES && gDisableStructs[gActiveBattler].cudChew == TRUE) + { + gLastUsedItem = gBattleStruct->usedHeldItems[battler][GetBattlerSide(battler)]; + gBattleStruct->usedHeldItems[battler][GetBattlerSide(battler)] = ITEM_NONE; + BattleScriptPushCursorAndCallback(BattleScript_CudChewActivates); + effect++; + } + break; } } break; From 3c30e6bdc360e9949bfbeb2e7e938deb1bbf3e3f Mon Sep 17 00:00:00 2001 From: LOuroboros Date: Tue, 6 Dec 2022 01:41:06 -0300 Subject: [PATCH 38/84] Implemented Sharpness' effect --- include/constants/pokemon.h | 1 + src/battle_util.c | 4 ++++ src/data/battle_moves.h | 36 ++++++++++++++++++------------------ 3 files changed, 23 insertions(+), 18 deletions(-) diff --git a/include/constants/pokemon.h b/include/constants/pokemon.h index 8d637af30..35eca5bbc 100644 --- a/include/constants/pokemon.h +++ b/include/constants/pokemon.h @@ -236,6 +236,7 @@ #define FLAG_HIT_IN_SUBSTITUTE (1 << 26) // Hyperspace Fury #define FLAG_TWO_STRIKES (1 << 27) // A move with this flag will strike twice, and may apply its effect on each hit #define FLAG_WIND_MOVE (1 << 28) +#define FLAG_SLICING_MOVE (1 << 29) // Split defines. #define SPLIT_PHYSICAL 0x0 diff --git a/src/battle_util.c b/src/battle_util.c index 7fdd63eb4..2362a3fff 100644 --- a/src/battle_util.c +++ b/src/battle_util.c @@ -8862,6 +8862,10 @@ static u32 CalcMoveBasePowerAfterModifiers(u16 move, u8 battlerAtk, u8 battlerDe if (gFieldStatuses & STATUS_FIELD_ELECTRIC_TERRAIN) MulModifier(&modifier, UQ_4_12(1.3)); break; + case ABILITY_SHARPNESS: + if (gBattleMoves[move].flags & FLAG_SLICING_MOVE) + MulModifier(&modifier, UQ_4_12(1.5)); + break; } // field abilities diff --git a/src/data/battle_moves.h b/src/data/battle_moves.h index 37ba7aaff..b9603b882 100644 --- a/src/data/battle_moves.h +++ b/src/data/battle_moves.h @@ -256,7 +256,7 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .secondaryEffectChance = 0, .target = MOVE_TARGET_SELECTED, .priority = 0, - .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED, + .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED | FLAG_SLICING_MOVE, .split = SPLIT_PHYSICAL, .zMovePower = 100, .zMoveEffect = Z_EFFECT_NONE, @@ -1354,7 +1354,7 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .secondaryEffectChance = 0, .target = MOVE_TARGET_BOTH, .priority = 0, - .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED | FLAG_HIGH_CRIT, + .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED | FLAG_HIGH_CRIT | FLAG_SLICING_MOVE, .split = SPLIT_PHYSICAL, .zMovePower = 100, .zMoveEffect = Z_EFFECT_NONE, @@ -2922,7 +2922,7 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .secondaryEffectChance = 0, .target = MOVE_TARGET_SELECTED, .priority = 0, - .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED | FLAG_HIGH_CRIT, + .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED | FLAG_HIGH_CRIT | FLAG_SLICING_MOVE, .split = SPLIT_PHYSICAL, .zMovePower = 140, .zMoveEffect = Z_EFFECT_NONE, @@ -3805,7 +3805,7 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .secondaryEffectChance = 0, .target = MOVE_TARGET_SELECTED, .priority = 0, - .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED, + .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED | FLAG_SLICING_MOVE, .split = SPLIT_PHYSICAL, .zMovePower = 100, .zMoveEffect = Z_EFFECT_NONE, @@ -5656,7 +5656,7 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .secondaryEffectChance = 0, .target = MOVE_TARGET_BOTH, .priority = 0, - .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED | FLAG_HIGH_CRIT | FLAG_WIND_MOVE, + .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED | FLAG_HIGH_CRIT | FLAG_SLICING_MOVE | FLAG_WIND_MOVE, .split = SPLIT_SPECIAL, .zMoveEffect = Z_EFFECT_NONE, }, @@ -5989,7 +5989,7 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .secondaryEffectChance = 0, .target = MOVE_TARGET_SELECTED, .priority = 0, - .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED, + .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED | FLAG_SLICING_MOVE, .split = SPLIT_PHYSICAL, .zMovePower = 120, .zMoveEffect = Z_EFFECT_NONE, @@ -6286,7 +6286,7 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .secondaryEffectChance = 0, .target = MOVE_TARGET_SELECTED, .priority = 0, - .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED | FLAG_HIGH_CRIT, + .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED | FLAG_HIGH_CRIT | FLAG_SLICING_MOVE, .split = SPLIT_PHYSICAL, .zMoveEffect = Z_EFFECT_NONE, }, @@ -7217,7 +7217,7 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .secondaryEffectChance = 0, .target = MOVE_TARGET_SELECTED, .priority = 0, - .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED | FLAG_HIGH_CRIT, + .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED | FLAG_HIGH_CRIT | FLAG_SLICING_MOVE, .split = SPLIT_PHYSICAL, .zMovePower = 140, .zMoveEffect = Z_EFFECT_NONE, @@ -7259,7 +7259,7 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = { #if B_UPDATED_MOVE_DATA >= GEN_6 .pp = 15, - .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_SHEER_FORCE_BOOST, + .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_SHEER_FORCE_BOOST | FLAG_SLICING_MOVE, #elif B_UPDATED_MOVE_DATA == GEN_5 .pp = 20, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_SHEER_FORCE_BOOST, @@ -7289,7 +7289,7 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .secondaryEffectChance = 0, .target = MOVE_TARGET_SELECTED, .priority = 0, - .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED, + .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED | FLAG_SLICING_MOVE, .split = SPLIT_PHYSICAL, .zMovePower = 160, .zMoveEffect = Z_EFFECT_NONE, @@ -7699,7 +7699,7 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .secondaryEffectChance = 0, .target = MOVE_TARGET_SELECTED, .priority = 0, - .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED | FLAG_HIGH_CRIT, + .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED | FLAG_HIGH_CRIT | FLAG_SLICING_MOVE, .split = SPLIT_PHYSICAL, .zMovePower = 140, .zMoveEffect = Z_EFFECT_NONE, @@ -7921,7 +7921,7 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .secondaryEffectChance = 10, .target = MOVE_TARGET_SELECTED, .priority = 0, - .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED | FLAG_HIGH_CRIT | FLAG_SHEER_FORCE_BOOST, + .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED | FLAG_HIGH_CRIT | FLAG_SHEER_FORCE_BOOST | FLAG_SLICING_MOVE, .split = SPLIT_PHYSICAL, .zMovePower = 140, .zMoveEffect = Z_EFFECT_NONE, @@ -9537,7 +9537,7 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .secondaryEffectChance = 0, .target = MOVE_TARGET_SELECTED, .priority = 0, - .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED | FLAG_STAT_STAGES_IGNORED, + .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED | FLAG_STAT_STAGES_IGNORED | FLAG_SLICING_MOVE, .split = SPLIT_PHYSICAL, .zMovePower = 175, .zMoveEffect = Z_EFFECT_NONE, @@ -9553,7 +9553,7 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .secondaryEffectChance = 50, .target = MOVE_TARGET_SELECTED, .priority = 0, - .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_SHEER_FORCE_BOOST, + .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_SHEER_FORCE_BOOST | FLAG_SLICING_MOVE, .split = SPLIT_PHYSICAL, .zMovePower = 140, .zMoveEffect = Z_EFFECT_NONE, @@ -11182,7 +11182,7 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .secondaryEffectChance = 0, .target = MOVE_TARGET_SELECTED, .priority = 0, - .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED, + .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED | FLAG_SLICING_MOVE, .split = SPLIT_PHYSICAL, .zMovePower = 190, .zMoveEffect = Z_EFFECT_NONE, @@ -12509,7 +12509,7 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .secondaryEffectChance = 0, .target = MOVE_TARGET_SELECTED, .priority = 0, - .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED, + .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED | FLAG_SLICING_MOVE, .split = SPLIT_PHYSICAL, .zMovePower = 180, .zMoveEffect = Z_EFFECT_NONE, @@ -13292,7 +13292,7 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .secondaryEffectChance = 0, .target = MOVE_TARGET_USER, .priority = 0, - .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED, + .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED | FLAG_SLICING_MOVE, .split = SPLIT_PHYSICAL, .zMovePower = 120, .zMoveEffect = Z_EFFECT_NONE, @@ -13532,7 +13532,7 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .secondaryEffectChance = 0, .target = MOVE_TARGET_SELECTED, .priority = 0, - .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED, + .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED | FLAG_SLICING_MOVE, .split = SPLIT_PHYSICAL, .zMovePower = 120, .zMoveEffect = Z_EFFECT_NONE, From 7a52404fd301933302d4d63e8a63299ed90a7314 Mon Sep 17 00:00:00 2001 From: LOuroboros Date: Tue, 6 Dec 2022 02:51:13 -0300 Subject: [PATCH 39/84] Implemented Supreme Overlord's effect --- data/battle_scripts_1.s | 7 ++++++ include/battle_scripts.h | 1 + include/constants/battle_string_ids.h | 3 ++- src/battle_message.c | 2 ++ src/battle_util.c | 31 +++++++++++++++++++++++++++ 5 files changed, 43 insertions(+), 1 deletion(-) diff --git a/data/battle_scripts_1.s b/data/battle_scripts_1.s index 00fb0ba27..11f819c06 100644 --- a/data/battle_scripts_1.s +++ b/data/battle_scripts_1.s @@ -8444,6 +8444,13 @@ BattleScript_RuinAbilityActivates:: waitmessage B_WAIT_TIME_LONG end3 +BattleScript_SupremeOverlordActivates:: + pause B_WAIT_TIME_SHORT + call BattleScript_AbilityPopUp + printstring STRINGID_ATTACKERGAINEDSTRENGTHFROMTHEFALLEN + waitmessage B_WAIT_TIME_LONG + end3 + BattleScript_AttackWeakenedByStrongWinds:: pause B_WAIT_TIME_SHORT printstring STRINGID_ATTACKWEAKENEDBSTRONGWINDS diff --git a/include/battle_scripts.h b/include/battle_scripts.h index 13fa5a4a6..72db7e1f9 100644 --- a/include/battle_scripts.h +++ b/include/battle_scripts.h @@ -445,6 +445,7 @@ extern const u8 BattleScript_QuarkDriveActivates[]; extern const u8 BattleScript_GoodAsGoldActivates[]; extern const u8 BattleScript_RuinAbilityActivates[]; extern const u8 BattleScript_CudChewActivates[]; +extern const u8 BattleScript_SupremeOverlordActivates[]; // zmoves extern const u8 BattleScript_ZMoveActivateDamaging[]; diff --git a/include/constants/battle_string_ids.h b/include/constants/battle_string_ids.h index 9c0965bb5..39022d167 100644 --- a/include/constants/battle_string_ids.h +++ b/include/constants/battle_string_ids.h @@ -635,8 +635,9 @@ #define STRINGID_STATWASHEIGHTENED 633 #define STRINGID_ELECTRICTERRAINACTIVATEDABILITY 634 #define STRINGID_ABILITYWEAKENEDFSURROUNDINGMONSSTAT 635 +#define STRINGID_ATTACKERGAINEDSTRENGTHFROMTHEFALLEN 636 -#define BATTLESTRINGS_COUNT 636 +#define BATTLESTRINGS_COUNT 637 // This is the string id that gBattleStringsTable starts with. // String ids before this (e.g. STRINGID_INTROMSG) are not in the table, diff --git a/src/battle_message.c b/src/battle_message.c index d109e0f4e..7466ffa91 100644 --- a/src/battle_message.c +++ b/src/battle_message.c @@ -764,9 +764,11 @@ static const u8 sText_SunlightActivatedAbility[] = _("The harsh sunlight activat static const u8 sText_StatWasHeightened[] = _("{B_ATK_NAME_WITH_PREFIX}'s {B_BUFF1} was heightened!"); static const u8 sText_ElectricTerrainActivatedAbility[] = _("The Electric Terrain activated\n{B_ATK_NAME_WITH_PREFIX}'s {B_ATK_ABILITY}!"); static const u8 sText_AbilityWeakenedSurroundingMonsStat[] = _("{B_ATK_NAME_WITH_PREFIX}'s {B_ATK_ABILITY}\nweakened the {B_BUFF1} of\lall surrounding Pokémon!\p"); +static const u8 sText_AttackerGainedStrengthFromTheFallen[] = _("{B_ATK_NAME_WITH_PREFIX} gained strength\nfrom the fallen!"); const u8 *const gBattleStringsTable[BATTLESTRINGS_COUNT] = { + [STRINGID_ATTACKERGAINEDSTRENGTHFROMTHEFALLEN - BATTLESTRINGS_TABLE_START] = sText_AttackerGainedStrengthFromTheFallen, [STRINGID_ABILITYWEAKENEDFSURROUNDINGMONSSTAT - BATTLESTRINGS_TABLE_START] = sText_AbilityWeakenedSurroundingMonsStat, [STRINGID_ELECTRICTERRAINACTIVATEDABILITY - BATTLESTRINGS_TABLE_START] = sText_ElectricTerrainActivatedAbility, [STRINGID_STATWASHEIGHTENED - BATTLESTRINGS_TABLE_START] = sText_StatWasHeightened, diff --git a/src/battle_util.c b/src/battle_util.c index 2362a3fff..36120a756 100644 --- a/src/battle_util.c +++ b/src/battle_util.c @@ -4957,6 +4957,14 @@ u8 AbilityBattleEffects(u8 caseID, u8 battler, u16 ability, u8 special, u16 move effect++; } break; + case ABILITY_SUPREME_OVERLORD: + if (!gSpecialStatuses[battler].switchInAbilityDone && CountUsablePartyMons(battler) < PARTY_SIZE) + { + gSpecialStatuses[battler].switchInAbilityDone = TRUE; + BattleScriptPushCursorAndCallback(BattleScript_SupremeOverlordActivates); + effect++; + } + break; #if B_WEATHER_FORMS < GEN_5 default: if (gBattleMons[battler].species == SPECIES_CHERRIM) @@ -8722,6 +8730,26 @@ static u16 CalcMoveBasePower(u16 move, u8 battlerAtk, u8 battlerDef) return basePower; } +// Supreme Overlord adds a damage boost for each fainted ally. +// The first ally adds a x1.2 boost, and subsequent allies add an extra x0.1 boost each. +static u16 ApplySupremeOverlordModifier(u8 battlerId) +{ + u8 side = GetBattlerSide(battlerId); + struct Pokemon *party = (side == B_SIDE_PLAYER) ? gPlayerParty : gEnemyParty; + u8 i; + u16 modifier = UQ_4_12(1.0); + bool8 appliedFirstBoost = FALSE; + + for (i = 0; i < PARTY_SIZE; i++) + { + if (GetMonData(&party[i], MON_DATA_HP) == 0) + modifier += (!appliedFirstBoost) ? UQ_4_12(0.2) : UQ_4_12(0.1); + appliedFirstBoost = TRUE; + } + + return modifier; +} + static u32 CalcMoveBasePowerAfterModifiers(u16 move, u8 battlerAtk, u8 battlerDef, u8 moveType, bool32 updateFlags) { u32 i; @@ -8866,6 +8894,9 @@ static u32 CalcMoveBasePowerAfterModifiers(u16 move, u8 battlerAtk, u8 battlerDe if (gBattleMoves[move].flags & FLAG_SLICING_MOVE) MulModifier(&modifier, UQ_4_12(1.5)); break; + case ABILITY_SUPREME_OVERLORD: + MulModifier(&modifier, ApplySupremeOverlordModifier(battlerAtk)); + break; } // field abilities From aa051dab02328b4f58fd6570621ce588d2760ae5 Mon Sep 17 00:00:00 2001 From: LOuroboros Date: Tue, 6 Dec 2022 05:03:07 -0300 Subject: [PATCH 40/84] Implemented Costar's effect --- data/battle_scripts_1.s | 7 +++++++ include/battle_scripts.h | 1 + include/battle_util.h | 1 + src/battle_util.c | 14 ++++++++++++++ 4 files changed, 23 insertions(+) diff --git a/data/battle_scripts_1.s b/data/battle_scripts_1.s index 11f819c06..d6e0499ba 100644 --- a/data/battle_scripts_1.s +++ b/data/battle_scripts_1.s @@ -8451,6 +8451,13 @@ BattleScript_SupremeOverlordActivates:: waitmessage B_WAIT_TIME_LONG end3 +BattleScript_CostarActivates:: + pause B_WAIT_TIME_SHORT + call BattleScript_AbilityPopUp + printstring STRINGID_PKMNCOPIEDSTATCHANGES + waitmessage B_WAIT_TIME_LONG + end3 + BattleScript_AttackWeakenedByStrongWinds:: pause B_WAIT_TIME_SHORT printstring STRINGID_ATTACKWEAKENEDBSTRONGWINDS diff --git a/include/battle_scripts.h b/include/battle_scripts.h index 72db7e1f9..20575a5b6 100644 --- a/include/battle_scripts.h +++ b/include/battle_scripts.h @@ -446,6 +446,7 @@ extern const u8 BattleScript_GoodAsGoldActivates[]; extern const u8 BattleScript_RuinAbilityActivates[]; extern const u8 BattleScript_CudChewActivates[]; extern const u8 BattleScript_SupremeOverlordActivates[]; +extern const u8 BattleScript_CostarActivates[]; // zmoves extern const u8 BattleScript_ZMoveActivateDamaging[]; diff --git a/include/battle_util.h b/include/battle_util.h index 3f516daba..8922cd842 100644 --- a/include/battle_util.h +++ b/include/battle_util.h @@ -204,5 +204,6 @@ bool32 CanBeFrozen(u8 battlerId); bool32 CanBeConfused(u8 battlerId); bool32 IsBattlerTerrainAffected(u8 battlerId, u32 terrainFlag); u32 GetBattlerFriendshipScore(u8 battlerId); +u32 CountBattlerStatIncreases(u8 battlerId, bool32 countEvasionAcc); #endif // GUARD_BATTLE_UTIL_H diff --git a/src/battle_util.c b/src/battle_util.c index 36120a756..9bc5e24d4 100644 --- a/src/battle_util.c +++ b/src/battle_util.c @@ -4965,6 +4965,20 @@ u8 AbilityBattleEffects(u8 caseID, u8 battler, u16 ability, u8 special, u16 move effect++; } break; + case ABILITY_COSTAR: + if (!gSpecialStatuses[battler].switchInAbilityDone + && IsDoubleBattle() + && IsBattlerAlive(BATTLE_PARTNER(battler)) + && CountBattlerStatIncreases(BATTLE_PARTNER(battler), FALSE)) + { + gSpecialStatuses[battler].switchInAbilityDone = TRUE; + for (i = 0; i < NUM_BATTLE_STATS; i++) + gBattleMons[battler].statStages[i] = gBattleMons[BATTLE_PARTNER(battler)].statStages[i]; + gBattlerTarget = BATTLE_PARTNER(battler); + BattleScriptPushCursorAndCallback(BattleScript_CostarActivates); + effect++; + } + break; #if B_WEATHER_FORMS < GEN_5 default: if (gBattleMons[battler].species == SPECIES_CHERRIM) From a961980e0f007fbd620a954dd7d235de15fc2d38 Mon Sep 17 00:00:00 2001 From: LOuroboros Date: Tue, 6 Dec 2022 05:14:05 -0300 Subject: [PATCH 41/84] Implemented Toxic Debris' effect --- data/battle_scripts_1.s | 9 +++++++++ include/battle_scripts.h | 1 + src/battle_util.c | 14 ++++++++++++++ 3 files changed, 24 insertions(+) diff --git a/data/battle_scripts_1.s b/data/battle_scripts_1.s index d6e0499ba..d1249e384 100644 --- a/data/battle_scripts_1.s +++ b/data/battle_scripts_1.s @@ -7135,6 +7135,15 @@ BattleScript_WindPowerActivates:: BattleScript_WindPowerActivates_Ret: return +BattleScript_ToxicDebrisActivates:: + call BattleScript_AbilityPopUp + pause B_WAIT_TIME_SHORT + settoxicspikes BattleScript_ToxicDebrisRet + printstring STRINGID_POISONSPIKESSCATTERED + waitmessage B_WAIT_TIME_LONG +BattleScript_ToxicDebrisRet: + return + BattleScript_PerishSongCountGoesDown:: printstring STRINGID_PKMNPERISHCOUNTFELL waitmessage B_WAIT_TIME_LONG diff --git a/include/battle_scripts.h b/include/battle_scripts.h index 20575a5b6..2faf22260 100644 --- a/include/battle_scripts.h +++ b/include/battle_scripts.h @@ -447,6 +447,7 @@ extern const u8 BattleScript_RuinAbilityActivates[]; extern const u8 BattleScript_CudChewActivates[]; extern const u8 BattleScript_SupremeOverlordActivates[]; extern const u8 BattleScript_CostarActivates[]; +extern const u8 BattleScript_ToxicDebrisActivates[]; // zmoves extern const u8 BattleScript_ZMoveActivateDamaging[]; diff --git a/src/battle_util.c b/src/battle_util.c index 9bc5e24d4..13bd933f9 100644 --- a/src/battle_util.c +++ b/src/battle_util.c @@ -5911,6 +5911,20 @@ u8 AbilityBattleEffects(u8 caseID, u8 battler, u16 ability, u8 special, u16 move effect++; } break; + case ABILITY_TOXIC_DEBRIS: + if (!(gMoveResultFlags & MOVE_RESULT_NO_EFFECT) + && !gProtectStructs[gBattlerAttacker].confusionSelfDmg + && IS_MOVE_PHYSICAL(gCurrentMove) + && TARGET_TURN_DAMAGED + && !(gSideStatuses[gBattlerAttacker] & SIDE_STATUS_TOXIC_SPIKES) + && IsBattlerAlive(gBattlerTarget)) + { + gBattlerTarget = gBattlerAttacker; + BattleScriptPushCursor(); + gBattlescriptCurrInstr = BattleScript_ToxicDebrisActivates; + effect++; + } + break; } break; case ABILITYEFFECT_MOVE_END_ATTACKER: // Same as above, but for attacker From fa78e3b2c4a849b1367be95d7970764f6e5a3c88 Mon Sep 17 00:00:00 2001 From: LOuroboros Date: Tue, 6 Dec 2022 05:26:30 -0300 Subject: [PATCH 42/84] Implemented Armor Tail's effect --- src/battle_util.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/battle_util.c b/src/battle_util.c index 13bd933f9..aa70bd323 100644 --- a/src/battle_util.c +++ b/src/battle_util.c @@ -5208,8 +5208,8 @@ u8 AbilityBattleEffects(u8 caseID, u8 battler, u16 ability, u8 special, u16 move gBattlescriptCurrInstr = BattleScript_SoundproofProtected; effect = 1; } - else if ((gLastUsedAbility == ABILITY_DAZZLING || gLastUsedAbility == ABILITY_QUEENLY_MAJESTY || IsBattlerAlive(battler ^= BIT_FLANK)) - && (battlerAbility == ABILITY_DAZZLING || battlerAbility == ABILITY_QUEENLY_MAJESTY) + else if ((gLastUsedAbility == ABILITY_DAZZLING || gLastUsedAbility == ABILITY_QUEENLY_MAJESTY || gLastUsedAbility == ABILITY_ARMOR_TAIL || IsBattlerAlive(battler ^= BIT_FLANK)) + && (battlerAbility == ABILITY_DAZZLING || battlerAbility == ABILITY_QUEENLY_MAJESTY || battlerAbility == ABILITY_ARMOR_TAIL) && GetChosenMovePriority(gBattlerAttacker) > 0 && GetBattlerSide(gBattlerAttacker) != GetBattlerSide(battler)) { From d6b9f076817ede74d08cef6503acf0e535c16d27 Mon Sep 17 00:00:00 2001 From: LOuroboros Date: Tue, 6 Dec 2022 05:29:26 -0300 Subject: [PATCH 43/84] Implemented Earth Eater's effect --- data/battle_scripts_1.s | 12 ++++++++++++ include/battle_scripts.h | 1 + src/battle_util.c | 12 ++++++++++++ 3 files changed, 25 insertions(+) diff --git a/data/battle_scripts_1.s b/data/battle_scripts_1.s index d1249e384..67ae04374 100644 --- a/data/battle_scripts_1.s +++ b/data/battle_scripts_1.s @@ -7144,6 +7144,18 @@ BattleScript_ToxicDebrisActivates:: BattleScript_ToxicDebrisRet: return +BattleScript_EarthEaterActivates:: + call BattleScript_AbilityPopUp + pause B_WAIT_TIME_LONG + tryhealquarterhealth BS_TARGET, BattleScript_EarthEaterRet + orword gHitMarker, HITMARKER_IGNORE_SUBSTITUTE + healthbarupdate BS_TARGET + datahpupdate BS_TARGET + printstring STRINGID_PKMNREGAINEDHEALTH + waitmessage B_WAIT_TIME_LONG +BattleScript_EarthEaterRet: + return + BattleScript_PerishSongCountGoesDown:: printstring STRINGID_PKMNPERISHCOUNTFELL waitmessage B_WAIT_TIME_LONG diff --git a/include/battle_scripts.h b/include/battle_scripts.h index 2faf22260..093bc61c0 100644 --- a/include/battle_scripts.h +++ b/include/battle_scripts.h @@ -448,6 +448,7 @@ extern const u8 BattleScript_CudChewActivates[]; extern const u8 BattleScript_SupremeOverlordActivates[]; extern const u8 BattleScript_CostarActivates[]; extern const u8 BattleScript_ToxicDebrisActivates[]; +extern const u8 BattleScript_EarthEaterActivates[]; // zmoves extern const u8 BattleScript_ZMoveActivateDamaging[]; diff --git a/src/battle_util.c b/src/battle_util.c index aa70bd323..d8068ef30 100644 --- a/src/battle_util.c +++ b/src/battle_util.c @@ -5925,6 +5925,18 @@ u8 AbilityBattleEffects(u8 caseID, u8 battler, u16 ability, u8 special, u16 move effect++; } break; + case ABILITY_EARTH_EATER: + if (!(gMoveResultFlags & MOVE_RESULT_NO_EFFECT) + && !gProtectStructs[gBattlerAttacker].confusionSelfDmg + && gBattleMoves[gCurrentMove].type == TYPE_GROUND + && TARGET_TURN_DAMAGED + && IsBattlerAlive(gBattlerTarget)) + { + BattleScriptPushCursor(); + gBattlescriptCurrInstr = BattleScript_EarthEaterActivates; + effect++; + } + break; } break; case ABILITYEFFECT_MOVE_END_ATTACKER: // Same as above, but for attacker From 107ace784b16575f80aa0169a58c6b7bdad15ae2 Mon Sep 17 00:00:00 2001 From: LOuroboros Date: Tue, 6 Dec 2022 06:18:18 -0300 Subject: [PATCH 44/84] Implemented Mycelium Might's effect --- include/battle_util.h | 1 + src/battle_main.c | 4 ++++ src/battle_util.c | 16 ++++++++++++++++ 3 files changed, 21 insertions(+) diff --git a/include/battle_util.h b/include/battle_util.h index 8922cd842..6d6361fc7 100644 --- a/include/battle_util.h +++ b/include/battle_util.h @@ -205,5 +205,6 @@ bool32 CanBeConfused(u8 battlerId); bool32 IsBattlerTerrainAffected(u8 battlerId, u32 terrainFlag); u32 GetBattlerFriendshipScore(u8 battlerId); u32 CountBattlerStatIncreases(u8 battlerId, bool32 countEvasionAcc); +bool32 IsMyceliumMightOnField(void); #endif // GUARD_BATTLE_UTIL_H diff --git a/src/battle_main.c b/src/battle_main.c index 42de8ac3a..e9a88ecb6 100644 --- a/src/battle_main.c +++ b/src/battle_main.c @@ -4673,6 +4673,10 @@ u8 GetWhoStrikesFirst(u8 battler1, u8 battler2, bool8 ignoreChosenMoves) strikesFirst = 1; else if (ability2 == ABILITY_STALL && ability1 != ABILITY_STALL) strikesFirst = 0; + else if (ability1 == ABILITY_MYCELIUM_MIGHT && ability2 != ABILITY_MYCELIUM_MIGHT && IS_MOVE_STATUS(gCurrentMove)) + strikesFirst = 1; + else if (ability2 == ABILITY_MYCELIUM_MIGHT && ability1 != ABILITY_MYCELIUM_MIGHT && IS_MOVE_STATUS(gCurrentMove)) + strikesFirst = 0; else { if (speedBattler1 == speedBattler2 && Random() & 1) diff --git a/src/battle_util.c b/src/battle_util.c index d8068ef30..527fbd5d0 100644 --- a/src/battle_util.c +++ b/src/battle_util.c @@ -6338,6 +6338,19 @@ bool32 IsNeutralizingGasOnField(void) return FALSE; } +bool32 IsMyceliumMightOnField(void) +{ + u32 i; + + for (i = 0; i < gBattlersCount; i++) + { + if (IsBattlerAlive(i) && gBattleMons[i].ability == ABILITY_MYCELIUM_MIGHT && IS_MOVE_STATUS(gCurrentMove)) + return TRUE; + } + + return FALSE; +} + u32 GetBattlerAbility(u8 battlerId) { if (gStatuses3[battlerId] & STATUS3_GASTRO_ACID) @@ -6346,6 +6359,9 @@ u32 GetBattlerAbility(u8 battlerId) if (IsNeutralizingGasOnField() && !IsNeutralizingGasBannedAbility(gBattleMons[battlerId].ability)) return ABILITY_NONE; + if (IsMyceliumMightOnField()) + return ABILITY_NONE; + if ((((gBattleMons[gBattlerAttacker].ability == ABILITY_MOLD_BREAKER || gBattleMons[gBattlerAttacker].ability == ABILITY_TERAVOLT || gBattleMons[gBattlerAttacker].ability == ABILITY_TURBOBLAZE) From c287f4f016c707f0fab6ebf4bf8ce498e935c2ea Mon Sep 17 00:00:00 2001 From: LOuroboros Date: Tue, 6 Dec 2022 06:22:02 -0300 Subject: [PATCH 45/84] Updated sAbilitiesAffectedByMoldBreaker --- src/battle_util.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/battle_util.c b/src/battle_util.c index 527fbd5d0..823a40181 100644 --- a/src/battle_util.c +++ b/src/battle_util.c @@ -1064,6 +1064,11 @@ static const u8 sAbilitiesAffectedByMoldBreaker[] = [ABILITY_ICE_SCALES] = 1, [ABILITY_ICE_FACE] = 1, [ABILITY_PASTEL_VEIL] = 1, + [ABILITY_ARMOR_TAIL] = 1, + [ABILITY_EARTH_EATER] = 1, + [ABILITY_GOOD_AS_GOLD] = 1, + [ABILITY_PURIFYING_SALT] = 1, + [ABILITY_WELL_BAKED_BODY] = 1, }; static const u8 sAbilitiesNotTraced[ABILITIES_COUNT] = From a3e58b05c14e478b7e50597e520b5c0132874415 Mon Sep 17 00:00:00 2001 From: LOuroboros Date: Mon, 12 Dec 2022 20:30:25 -0300 Subject: [PATCH 46/84] Implemented Guard Dog's effect --- data/battle_scripts_1.s | 10 ++++++++++ src/battle_script_commands.c | 14 ++++++++------ 2 files changed, 18 insertions(+), 6 deletions(-) diff --git a/data/battle_scripts_1.s b/data/battle_scripts_1.s index af368ec36..61392433d 100644 --- a/data/battle_scripts_1.s +++ b/data/battle_scripts_1.s @@ -2967,6 +2967,7 @@ BattleScript_EffectHitEscape: jumpifmovehadnoeffect BattleScript_MoveEnd seteffectwithchance tryfaintmon BS_TARGET + jumpifability BS_TARGET, ABILITY_GUARD_DOG, BattleScript_MoveEnd moveendto MOVEEND_ATTACKER_VISIBLE moveendfrom MOVEEND_TARGET_VISIBLE jumpifbattleend BattleScript_HitEscapeEnd @@ -8421,6 +8422,7 @@ BattleScript_IntimidateLoop: jumpifability BS_TARGET, ABILITY_OWN_TEMPO, BattleScript_IntimidatePrevented jumpifability BS_TARGET, ABILITY_OBLIVIOUS, BattleScript_IntimidatePrevented .endif + jumpifability BS_TARGET, ABILITY_GUARD_DOG, BattleScript_IntimidateInReverse BattleScript_IntimidateEffect: copybyte sBATTLER, gBattlerTarget statbuffchange STAT_CHANGE_NOT_PROTECT_AFFECTED | MOVE_EFFECT_CERTAIN, NULL @@ -8447,6 +8449,14 @@ BattleScript_IntimidatePrevented: call BattleScript_TryAdrenalineOrb goto BattleScript_IntimidateLoopIncrement +BattleScript_IntimidateInReverse: + copybyte sBATTLER, gBattlerTarget + call BattleScript_AbilityPopUp + pause B_WAIT_TIME_SHORT + modifybattlerstatstage BS_TARGET, STAT_ATK, INCREASE, 1, BattleScript_IntimidateLoopIncrement, ANIM_ON + call BattleScript_TryAdrenalineOrb + goto BattleScript_IntimidateLoopIncrement + BattleScript_DroughtActivates:: pause B_WAIT_TIME_SHORT call BattleScript_AbilityPopUp diff --git a/src/battle_script_commands.c b/src/battle_script_commands.c index 8f616fc3f..98cee311b 100644 --- a/src/battle_script_commands.c +++ b/src/battle_script_commands.c @@ -5760,7 +5760,8 @@ static void Cmd_moveend(void) if (gCurrentMove != MOVE_DRAGON_TAIL && gCurrentMove != MOVE_CIRCLE_THROW && IsBattlerAlive(gBattlerAttacker) - && !TestSheerForceFlag(gBattlerAttacker, gCurrentMove)) + && !TestSheerForceFlag(gBattlerAttacker, gCurrentMove) + && GetBattlerAbility(gBattlerAttacker) != ABILITY_GUARD_DOG) { // Since we check if battler was damaged, we don't need to check move result. // In fact, doing so actually prevents multi-target moves from activating red card properly @@ -9135,9 +9136,10 @@ static void Cmd_various(void) break; case VARIOUS_TRY_HIT_SWITCH_TARGET: if (IsBattlerAlive(gBattlerAttacker) - && IsBattlerAlive(gBattlerTarget) - && !(gMoveResultFlags & MOVE_RESULT_NO_EFFECT) - && TARGET_TURN_DAMAGED) + && IsBattlerAlive(gBattlerTarget) + && !(gMoveResultFlags & MOVE_RESULT_NO_EFFECT) + && TARGET_TURN_DAMAGED + && GetBattlerAbility(gBattlerTarget) != ABILITY_GUARD_DOG) { gBattleScripting.switchCase = B_SWITCH_HIT; gBattlescriptCurrInstr = BattleScript_ForceRandomSwitch; @@ -11236,8 +11238,8 @@ static void Cmd_forcerandomswitch(void) } else { - // In normal wild doubles, Roar will always fail if the user's level is less than the target's. - if (gBattleMons[gBattlerAttacker].level >= gBattleMons[gBattlerTarget].level) + // In normal wild doubles, Roar will always fail if the user's level is less than the target's or if the target's ability is Guard Dog. + if (gBattleMons[gBattlerAttacker].level >= gBattleMons[gBattlerTarget].level && GetBattlerAbility(gBattlerTarget) != ABILITY_GUARD_DOG) gBattlescriptCurrInstr = BattleScript_RoarSuccessEndBattle; else gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 1); From 55ba9d83643a268d369ff6599e0c6f29d154a94d Mon Sep 17 00:00:00 2001 From: Eduardo Quezada Date: Sun, 18 Dec 2022 13:17:33 -0300 Subject: [PATCH 47/84] Fixed right Frontier move tutor not loading their move list correctly. --- data/maps/BattleFrontier_Lounge7/scripts.inc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/data/maps/BattleFrontier_Lounge7/scripts.inc b/data/maps/BattleFrontier_Lounge7/scripts.inc index 9528dd11d..467f6ba9a 100644 --- a/data/maps/BattleFrontier_Lounge7/scripts.inc +++ b/data/maps/BattleFrontier_Lounge7/scripts.inc @@ -145,6 +145,7 @@ BattleFrontier_Lounge7_EventScript_ChooseRightTutorMove:: waitmessage special ShowBattlePointsWindow setvar VAR_TEMP_E, 1 + setvar VAR_0x8004, SCROLL_MULTI_BF_MOVE_TUTOR_2 setvar VAR_0x8006, 0 special ShowScrollableMultichoice waitstate @@ -168,6 +169,7 @@ BattleFrontier_Lounge7_EventScript_ChooseNewRightTutorMove:: message BattleFrontier_Lounge7_Text_TeachWhichMove waitmessage setvar VAR_TEMP_E, 1 + setvar VAR_0x8004, SCROLL_MULTI_BF_MOVE_TUTOR_2 setvar VAR_0x8006, 1 special ShowScrollableMultichoice waitstate From 9cd8d81412456f3fc3091b4293d44f8eac4df9fb Mon Sep 17 00:00:00 2001 From: SonikkuA-DatH <58025603+SonikkuA-DatH@users.noreply.github.com> Date: Sun, 18 Dec 2022 15:37:44 -0800 Subject: [PATCH 48/84] Update battle_scripts_1.s Fixed spacing --- data/battle_scripts_1.s | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/data/battle_scripts_1.s b/data/battle_scripts_1.s index dc8e0758b..62ed5f2e1 100644 --- a/data/battle_scripts_1.s +++ b/data/battle_scripts_1.s @@ -414,10 +414,10 @@ BattleScript_EffectTeatime:: attackanimation waitanimation BattleScript_TeatimeLoop: -jumpifteainvulnerable BS_TARGET, BattleScript_Teatimevul -jumpifrodaffected BS_TARGET, BattleScript_Teatimerod -jumpifabsorbaffected BS_TARGET, BattleScript_Teatimesorb -jumpifmotoraffected BS_TARGET, BattleScript_Teatimemotor + jumpifteainvulnerable BS_TARGET, BattleScript_Teatimevul + jumpifrodaffected BS_TARGET, BattleScript_Teatimerod + jumpifabsorbaffected BS_TARGET, BattleScript_Teatimesorb + jumpifmotoraffected BS_TARGET, BattleScript_Teatimemotor orword gHitMarker, HITMARKER_NO_ANIMATIONS setbyte sBERRY_OVERRIDE, TRUE @ override the requirements for eating berries consumeberry BS_TARGET, TRUE @ consume the berry, then restore the item from changedItems @@ -426,23 +426,23 @@ jumpifmotoraffected BS_TARGET, BattleScript_Teatimemotor moveendto MOVEEND_NEXT_TARGET jumpifnexttargetvalid BattleScript_TeatimeLoop moveendcase MOVEEND_CLEAR_BITS - goto BattleScript_MoveEnd + goto BattleScript_MoveEnd BattleScript_Teatimevul: moveendto MOVEEND_NEXT_TARGET jumpifnexttargetvalid BattleScript_TeatimeLoop moveendcase MOVEEND_CLEAR_BITS - goto BattleScript_MoveEnd + goto BattleScript_MoveEnd BattleScript_Teatimesorb: copybyte gBattlerAbility, gBattlerTarget call BattleScript_AbilityPopUp moveendto MOVEEND_NEXT_TARGET jumpifnexttargetvalid BattleScript_TeatimeLoop moveendcase MOVEEND_CLEAR_BITS - goto BattleScript_MoveEnd + goto BattleScript_MoveEnd BattleScript_Teatimerod: copybyte gBattlerAbility, gBattlerTarget call BattleScript_AbilityPopUp - playstatchangeanimation BS_TARGET, BIT_SPATK, STAT_CHANGE_BY_TWO + playstatchangeanimation BS_TARGET, BIT_SPATK, STAT_CHANGE_BY_TWO setstatchanger STAT_SPATK, 1, FALSE statbuffchange STAT_BUFF_ALLOW_PTR, BattleScript_TeatimeBuffer jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, 0x2, BattleScript_TeatimeBuffer @@ -451,11 +451,11 @@ BattleScript_Teatimerod: moveendto MOVEEND_NEXT_TARGET jumpifnexttargetvalid BattleScript_TeatimeLoop moveendcase MOVEEND_CLEAR_BITS - goto BattleScript_MoveEnd + goto BattleScript_MoveEnd BattleScript_Teatimemotor: copybyte gBattlerAbility, gBattlerTarget call BattleScript_AbilityPopUp - playstatchangeanimation BS_TARGET, BIT_SPEED, STAT_CHANGE_BY_TWO + playstatchangeanimation BS_TARGET, BIT_SPEED, STAT_CHANGE_BY_TWO setstatchanger STAT_SPEED, 1, FALSE statbuffchange STAT_BUFF_ALLOW_PTR, BattleScript_TeatimeBuffer jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, 0x2, BattleScript_TeatimeBuffer @@ -464,12 +464,12 @@ BattleScript_Teatimemotor: moveendto MOVEEND_NEXT_TARGET jumpifnexttargetvalid BattleScript_TeatimeLoop moveendcase MOVEEND_CLEAR_BITS - goto BattleScript_MoveEnd + goto BattleScript_MoveEnd BattleScript_TeatimeBuffer: moveendto MOVEEND_NEXT_TARGET jumpifnexttargetvalid BattleScript_TeatimeLoop moveendcase MOVEEND_CLEAR_BITS - goto BattleScript_MoveEnd + goto BattleScript_MoveEnd BattleScript_EffectShellSideArm: shellsidearmcheck From 44b522fd1c852f1e7d9073d9c400fc62cc6952e1 Mon Sep 17 00:00:00 2001 From: SonikkuA-DatH <58025603+SonikkuA-DatH@users.noreply.github.com> Date: Sun, 18 Dec 2022 15:53:07 -0800 Subject: [PATCH 49/84] Update battle_script_commands.c Spacing --- src/battle_script_commands.c | 86 ++++++++++++++++++------------------ 1 file changed, 43 insertions(+), 43 deletions(-) diff --git a/src/battle_script_commands.c b/src/battle_script_commands.c index d90f687ec..920953f05 100644 --- a/src/battle_script_commands.c +++ b/src/battle_script_commands.c @@ -9351,49 +9351,49 @@ static void Cmd_various(void) gBattlescriptCurrInstr += 7; return; } - case VARIOUS_TEATIME_TARGETS: - // Gets the battlers to be affected by teatime. If there are none, print 'But it failed!' - { - u32 count = 0; - for (i = 0; i < gBattlersCount; i++) - { - if (IsTeatimeAffected(i)) - { - count++; - } - } - if (count == 0) { - gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 3); // Teatime fails - } - else { - gBattlescriptCurrInstr += 7; - } - } - return; - case VARIOUS_TEATIME_INVUL: - if (ItemId_GetPocket(gBattleMons[gActiveBattler].item) == POCKET_BERRIES && !(gStatuses3[gBattlerTarget] & (STATUS3_SEMI_INVULNERABLE))) - gBattlescriptCurrInstr += 7; - else - gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 3); - return; - case VARIOUS_JUMP_IF_ROD: - if (IsAbilityRodAffected()) - gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 3); - else - gBattlescriptCurrInstr += 7; - return; - case VARIOUS_JUMP_IF_MOTOR: - if (IsAbilityMotorAffected()) - gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 3); - else - gBattlescriptCurrInstr += 7; - return; - case VARIOUS_JUMP_IF_ABSORB: - if (IsAbilityAbsorbAffected()) - gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 3); - else - gBattlescriptCurrInstr += 7; - return; + case VARIOUS_TEATIME_TARGETS: + // Gets the battlers to be affected by teatime. If there are none, print 'But it failed!' + { + u32 count = 0; + for (i = 0; i < gBattlersCount; i++) + { + if (IsTeatimeAffected(i)) + { + count++; + } + } + if (count == 0) { + gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 3); // Teatime fails + } + else { + gBattlescriptCurrInstr += 7; + } + } + return; + case VARIOUS_TEATIME_INVUL: + if (ItemId_GetPocket(gBattleMons[gActiveBattler].item) == POCKET_BERRIES && !(gStatuses3[gBattlerTarget] & (STATUS3_SEMI_INVULNERABLE))) + gBattlescriptCurrInstr += 7; + else + gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 3); + return; + case VARIOUS_JUMP_IF_ROD: + if (IsAbilityRodAffected()) + gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 3); + else + gBattlescriptCurrInstr += 7; + return; + case VARIOUS_JUMP_IF_MOTOR: + if (IsAbilityMotorAffected()) + gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 3); + else + gBattlescriptCurrInstr += 7; + return; + case VARIOUS_JUMP_IF_ABSORB: + if (IsAbilityAbsorbAffected()) + gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 3); + else + gBattlescriptCurrInstr += 7; + return; } // End of switch (gBattlescriptCurrInstr[2]) gBattlescriptCurrInstr += 3; From b97a68656cded35a265caefd8c36b6ddd78dabb4 Mon Sep 17 00:00:00 2001 From: SonikkuA-DatH <58025603+SonikkuA-DatH@users.noreply.github.com> Date: Sun, 18 Dec 2022 19:14:01 -0800 Subject: [PATCH 50/84] Delete battle_anim.h Need to replace with current... --- src/data/battle_anim.h | 1988 ---------------------------------------- 1 file changed, 1988 deletions(-) delete mode 100644 src/data/battle_anim.h diff --git a/src/data/battle_anim.h b/src/data/battle_anim.h deleted file mode 100644 index e6e03f06c..000000000 --- a/src/data/battle_anim.h +++ /dev/null @@ -1,1988 +0,0 @@ -const struct OamData gOamData_AffineOff_ObjNormal_8x8 = -{ - .y = 0, - .affineMode = ST_OAM_AFFINE_OFF, - .objMode = ST_OAM_OBJ_NORMAL, - .bpp = ST_OAM_4BPP, - .shape = SPRITE_SHAPE(8x8), - .x = 0, - .size = SPRITE_SIZE(8x8), - .tileNum = 0, - .priority = 2, - .paletteNum = 0, -}; - - -const struct OamData gOamData_AffineOff_ObjNormal_16x16 = -{ - .y = 0, - .affineMode = ST_OAM_AFFINE_OFF, - .objMode = ST_OAM_OBJ_NORMAL, - .bpp = ST_OAM_4BPP, - .shape = SPRITE_SHAPE(16x16), - .x = 0, - .size = SPRITE_SIZE(16x16), - .tileNum = 0, - .priority = 2, - .paletteNum = 0, -}; - -const struct OamData gOamData_AffineOff_ObjNormal_32x32 = -{ - .y = 0, - .affineMode = ST_OAM_AFFINE_OFF, - .objMode = ST_OAM_OBJ_NORMAL, - .bpp = ST_OAM_4BPP, - .shape = SPRITE_SHAPE(32x32), - .x = 0, - .size = SPRITE_SIZE(32x32), - .tileNum = 0, - .priority = 2, - .paletteNum = 0, -}; - -const struct OamData gOamData_AffineOff_ObjNormal_64x64 = -{ - .y = 0, - .affineMode = ST_OAM_AFFINE_OFF, - .objMode = ST_OAM_OBJ_NORMAL, - .bpp = ST_OAM_4BPP, - .shape = SPRITE_SHAPE(64x64), - .x = 0, - .size = SPRITE_SIZE(64x64), - .tileNum = 0, - .priority = 2, - .paletteNum = 0, -}; - -const struct OamData gOamData_AffineOff_ObjNormal_16x8 = -{ - .y = 0, - .affineMode = ST_OAM_AFFINE_OFF, - .objMode = ST_OAM_OBJ_NORMAL, - .bpp = ST_OAM_4BPP, - .shape = SPRITE_SHAPE(16x8), - .x = 0, - .size = SPRITE_SIZE(16x8), - .tileNum = 0, - .priority = 2, - .paletteNum = 0, -}; - -const struct OamData gOamData_AffineOff_ObjNormal_32x8 = -{ - .y = 0, - .affineMode = ST_OAM_AFFINE_OFF, - .objMode = ST_OAM_OBJ_NORMAL, - .bpp = ST_OAM_4BPP, - .shape = SPRITE_SHAPE(32x8), - .x = 0, - .size = SPRITE_SIZE(32x8), - .tileNum = 0, - .priority = 2, - .paletteNum = 0, -}; - -const struct OamData gOamData_AffineOff_ObjNormal_32x16 = -{ - .y = 0, - .affineMode = ST_OAM_AFFINE_OFF, - .objMode = ST_OAM_OBJ_NORMAL, - .bpp = ST_OAM_4BPP, - .shape = SPRITE_SHAPE(32x16), - .x = 0, - .size = SPRITE_SIZE(32x16), - .tileNum = 0, - .priority = 2, - .paletteNum = 0, -}; - -const struct OamData gOamData_AffineOff_ObjNormal_64x32 = -{ - .y = 0, - .affineMode = ST_OAM_AFFINE_OFF, - .objMode = ST_OAM_OBJ_NORMAL, - .bpp = ST_OAM_4BPP, - .shape = SPRITE_SHAPE(64x32), - .x = 0, - .size = SPRITE_SIZE(64x32), - .tileNum = 0, - .priority = 2, - .paletteNum = 0, -}; - -const struct OamData gOamData_AffineOff_ObjNormal_8x16 = -{ - .y = 0, - .affineMode = ST_OAM_AFFINE_OFF, - .objMode = ST_OAM_OBJ_NORMAL, - .bpp = ST_OAM_4BPP, - .shape = SPRITE_SHAPE(8x16), - .x = 0, - .size = SPRITE_SIZE(8x16), - .tileNum = 0, - .priority = 2, - .paletteNum = 0, -}; - -const struct OamData gOamData_AffineOff_ObjNormal_8x32 = -{ - .y = 0, - .affineMode = ST_OAM_AFFINE_OFF, - .objMode = ST_OAM_OBJ_NORMAL, - .bpp = ST_OAM_4BPP, - .shape = SPRITE_SHAPE(8x32), - .x = 0, - .size = SPRITE_SIZE(8x32), - .tileNum = 0, - .priority = 2, - .paletteNum = 0, -}; - -const struct OamData gOamData_AffineOff_ObjNormal_16x32 = -{ - .y = 0, - .affineMode = ST_OAM_AFFINE_OFF, - .objMode = ST_OAM_OBJ_NORMAL, - .bpp = ST_OAM_4BPP, - .shape = SPRITE_SHAPE(16x32), - .x = 0, - .size = SPRITE_SIZE(16x32), - .tileNum = 0, - .priority = 2, - .paletteNum = 0, -}; - -const struct OamData gOamData_AffineOff_ObjNormal_32x64 = -{ - .y = 0, - .affineMode = ST_OAM_AFFINE_OFF, - .objMode = ST_OAM_OBJ_NORMAL, - .bpp = ST_OAM_4BPP, - .shape = SPRITE_SHAPE(32x64), - .x = 0, - .size = SPRITE_SIZE(32x64), - .tileNum = 0, - .priority = 2, - .paletteNum = 0, -}; - -const struct OamData gOamData_AffineNormal_ObjNormal_8x8 = -{ - .y = 0, - .affineMode = ST_OAM_AFFINE_NORMAL, - .objMode = ST_OAM_OBJ_NORMAL, - .bpp = ST_OAM_4BPP, - .shape = SPRITE_SHAPE(8x8), - .x = 0, - .size = SPRITE_SIZE(8x8), - .tileNum = 0, - .priority = 2, - .paletteNum = 0, -}; - -const struct OamData gOamData_AffineNormal_ObjNormal_16x16 = -{ - .y = 0, - .affineMode = ST_OAM_AFFINE_NORMAL, - .objMode = ST_OAM_OBJ_NORMAL, - .bpp = ST_OAM_4BPP, - .shape = SPRITE_SHAPE(16x16), - .x = 0, - .size = SPRITE_SIZE(16x16), - .tileNum = 0, - .priority = 2, - .paletteNum = 0, -}; - -const struct OamData gOamData_AffineNormal_ObjNormal_32x32 = -{ - .y = 0, - .affineMode = ST_OAM_AFFINE_NORMAL, - .objMode = ST_OAM_OBJ_NORMAL, - .bpp = ST_OAM_4BPP, - .shape = SPRITE_SHAPE(32x32), - .x = 0, - .size = SPRITE_SIZE(32x32), - .tileNum = 0, - .priority = 2, - .paletteNum = 0, -}; - -const struct OamData gOamData_AffineNormal_ObjNormal_64x64 = -{ - .y = 0, - .affineMode = ST_OAM_AFFINE_NORMAL, - .objMode = ST_OAM_OBJ_NORMAL, - .bpp = ST_OAM_4BPP, - .shape = SPRITE_SHAPE(64x64), - .x = 0, - .size = SPRITE_SIZE(64x64), - .tileNum = 0, - .priority = 2, - .paletteNum = 0, -}; - -const struct OamData gOamData_AffineNormal_ObjNormal_16x8 = -{ - .y = 0, - .affineMode = ST_OAM_AFFINE_NORMAL, - .objMode = ST_OAM_OBJ_NORMAL, - .bpp = ST_OAM_4BPP, - .shape = SPRITE_SHAPE(16x8), - .x = 0, - .size = SPRITE_SIZE(16x8), - .tileNum = 0, - .priority = 2, - .paletteNum = 0, -}; - -const struct OamData gOamData_AffineNormal_ObjNormal_32x8 = -{ - .y = 0, - .affineMode = ST_OAM_AFFINE_NORMAL, - .objMode = ST_OAM_OBJ_NORMAL, - .bpp = ST_OAM_4BPP, - .shape = SPRITE_SHAPE(32x8), - .x = 0, - .size = SPRITE_SIZE(32x8), - .tileNum = 0, - .priority = 2, - .paletteNum = 0, -}; - -const struct OamData gOamData_AffineNormal_ObjNormal_32x16 = -{ - .y = 0, - .affineMode = ST_OAM_AFFINE_NORMAL, - .objMode = ST_OAM_OBJ_NORMAL, - .bpp = ST_OAM_4BPP, - .shape = SPRITE_SHAPE(32x16), - .x = 0, - .size = SPRITE_SIZE(32x16), - .tileNum = 0, - .priority = 2, - .paletteNum = 0, -}; - -const struct OamData gOamData_AffineNormal_ObjNormal_64x32 = -{ - .y = 0, - .affineMode = ST_OAM_AFFINE_NORMAL, - .objMode = ST_OAM_OBJ_NORMAL, - .bpp = ST_OAM_4BPP, - .shape = SPRITE_SHAPE(64x32), - .x = 0, - .size = SPRITE_SIZE(64x32), - .tileNum = 0, - .priority = 2, - .paletteNum = 0, -}; - -const struct OamData gOamData_AffineNormal_ObjNormal_8x16 = -{ - .y = 0, - .affineMode = ST_OAM_AFFINE_NORMAL, - .objMode = ST_OAM_OBJ_NORMAL, - .bpp = ST_OAM_4BPP, - .shape = SPRITE_SHAPE(8x16), - .x = 0, - .size = SPRITE_SIZE(8x16), - .tileNum = 0, - .priority = 2, - .paletteNum = 0, -}; - -const struct OamData gOamData_AffineNormal_ObjNormal_8x32 = -{ - .y = 0, - .affineMode = ST_OAM_AFFINE_NORMAL, - .objMode = ST_OAM_OBJ_NORMAL, - .bpp = ST_OAM_4BPP, - .shape = SPRITE_SHAPE(8x32), - .x = 0, - .size = SPRITE_SIZE(8x32), - .tileNum = 0, - .priority = 2, - .paletteNum = 0, -}; - -const struct OamData gOamData_AffineNormal_ObjNormal_16x32 = -{ - .y = 0, - .affineMode = ST_OAM_AFFINE_NORMAL, - .objMode = ST_OAM_OBJ_NORMAL, - .bpp = ST_OAM_4BPP, - .shape = SPRITE_SHAPE(16x32), - .x = 0, - .size = SPRITE_SIZE(16x32), - .tileNum = 0, - .priority = 2, - .paletteNum = 0, -}; - -const struct OamData gOamData_AffineNormal_ObjNormal_32x64 = -{ - .y = 0, - .affineMode = ST_OAM_AFFINE_NORMAL, - .objMode = ST_OAM_OBJ_NORMAL, - .bpp = ST_OAM_4BPP, - .shape = SPRITE_SHAPE(32x64), - .x = 0, - .size = SPRITE_SIZE(32x64), - .tileNum = 0, - .priority = 2, - .paletteNum = 0, -}; - -const struct OamData gOamData_AffineDouble_ObjNormal_8x8 = -{ - .y = 0, - .affineMode = ST_OAM_AFFINE_DOUBLE, - .objMode = ST_OAM_OBJ_NORMAL, - .bpp = ST_OAM_4BPP, - .shape = SPRITE_SHAPE(8x8), - .x = 0, - .size = SPRITE_SIZE(8x8), - .tileNum = 0, - .priority = 2, - .paletteNum = 0, -}; - -const struct OamData gOamData_AffineDouble_ObjNormal_16x16 = -{ - .y = 0, - .affineMode = ST_OAM_AFFINE_DOUBLE, - .objMode = ST_OAM_OBJ_NORMAL, - .bpp = ST_OAM_4BPP, - .shape = SPRITE_SHAPE(16x16), - .x = 0, - .size = SPRITE_SIZE(16x16), - .tileNum = 0, - .priority = 2, - .paletteNum = 0, -}; - -const struct OamData gOamData_AffineDouble_ObjNormal_32x32 = -{ - .y = 0, - .affineMode = ST_OAM_AFFINE_DOUBLE, - .objMode = ST_OAM_OBJ_NORMAL, - .bpp = ST_OAM_4BPP, - .shape = SPRITE_SHAPE(32x32), - .x = 0, - .size = SPRITE_SIZE(32x32), - .tileNum = 0, - .priority = 2, - .paletteNum = 0, -}; - -const struct OamData gOamData_AffineDouble_ObjNormal_64x64 = -{ - .y = 0, - .affineMode = ST_OAM_AFFINE_DOUBLE, - .objMode = ST_OAM_OBJ_NORMAL, - .bpp = ST_OAM_4BPP, - .shape = SPRITE_SHAPE(64x64), - .x = 0, - .size = SPRITE_SIZE(64x64), - .tileNum = 0, - .priority = 2, - .paletteNum = 0, -}; - -const struct OamData gOamData_AffineDouble_ObjNormal_16x8 = -{ - .y = 0, - .affineMode = ST_OAM_AFFINE_DOUBLE, - .objMode = ST_OAM_OBJ_NORMAL, - .bpp = ST_OAM_4BPP, - .shape = SPRITE_SHAPE(16x8), - .x = 0, - .size = SPRITE_SIZE(16x8), - .tileNum = 0, - .priority = 2, - .paletteNum = 0, -}; - -const struct OamData gOamData_AffineDouble_ObjNormal_32x8 = -{ - .y = 0, - .affineMode = ST_OAM_AFFINE_DOUBLE, - .objMode = ST_OAM_OBJ_NORMAL, - .bpp = ST_OAM_4BPP, - .shape = SPRITE_SHAPE(32x8), - .x = 0, - .size = SPRITE_SIZE(32x8), - .tileNum = 0, - .priority = 2, - .paletteNum = 0, -}; - -const struct OamData gOamData_AffineDouble_ObjNormal_32x16 = -{ - .y = 0, - .affineMode = ST_OAM_AFFINE_DOUBLE, - .objMode = ST_OAM_OBJ_NORMAL, - .bpp = ST_OAM_4BPP, - .shape = SPRITE_SHAPE(32x16), - .x = 0, - .size = SPRITE_SIZE(32x16), - .tileNum = 0, - .priority = 2, - .paletteNum = 0, -}; - -const struct OamData gOamData_AffineDouble_ObjNormal_64x32 = -{ - .y = 0, - .affineMode = ST_OAM_AFFINE_DOUBLE, - .objMode = ST_OAM_OBJ_NORMAL, - .bpp = ST_OAM_4BPP, - .shape = SPRITE_SHAPE(64x32), - .x = 0, - .size = SPRITE_SIZE(64x32), - .tileNum = 0, - .priority = 2, - .paletteNum = 0, -}; - -const struct OamData gOamData_AffineDouble_ObjNormal_8x16 = -{ - .y = 0, - .affineMode = ST_OAM_AFFINE_DOUBLE, - .objMode = ST_OAM_OBJ_NORMAL, - .bpp = ST_OAM_4BPP, - .shape = SPRITE_SHAPE(8x16), - .x = 0, - .size = SPRITE_SIZE(8x16), - .tileNum = 0, - .priority = 2, - .paletteNum = 0, -}; - -const struct OamData gOamData_AffineDouble_ObjNormal_8x32 = -{ - .y = 0, - .affineMode = ST_OAM_AFFINE_DOUBLE, - .objMode = ST_OAM_OBJ_NORMAL, - .bpp = ST_OAM_4BPP, - .shape = SPRITE_SHAPE(8x32), - .x = 0, - .size = SPRITE_SIZE(8x32), - .tileNum = 0, - .priority = 2, - .paletteNum = 0, -}; - -const struct OamData gOamData_AffineDouble_ObjNormal_16x32 = -{ - .y = 0, - .affineMode = ST_OAM_AFFINE_DOUBLE, - .objMode = ST_OAM_OBJ_NORMAL, - .bpp = ST_OAM_4BPP, - .shape = SPRITE_SHAPE(16x32), - .x = 0, - .size = SPRITE_SIZE(16x32), - .tileNum = 0, - .priority = 2, - .paletteNum = 0, -}; - -const struct OamData gOamData_AffineDouble_ObjNormal_32x64 = -{ - .y = 0, - .affineMode = ST_OAM_AFFINE_DOUBLE, - .objMode = ST_OAM_OBJ_NORMAL, - .bpp = ST_OAM_4BPP, - .shape = SPRITE_SHAPE(32x64), - .x = 0, - .size = SPRITE_SIZE(32x64), - .tileNum = 0, - .priority = 2, - .paletteNum = 0, -}; - -const struct OamData gOamData_AffineOff_ObjBlend_8x8 = -{ - .y = 0, - .affineMode = ST_OAM_AFFINE_OFF, - .objMode = ST_OAM_OBJ_BLEND, - .bpp = ST_OAM_4BPP, - .shape = SPRITE_SHAPE(8x8), - .x = 0, - .size = SPRITE_SIZE(8x8), - .tileNum = 0, - .priority = 2, - .paletteNum = 0, -}; - -const struct OamData gOamData_AffineOff_ObjBlend_16x16 = -{ - .y = 0, - .affineMode = ST_OAM_AFFINE_OFF, - .objMode = ST_OAM_OBJ_BLEND, - .bpp = ST_OAM_4BPP, - .shape = SPRITE_SHAPE(16x16), - .x = 0, - .size = SPRITE_SIZE(16x16), - .tileNum = 0, - .priority = 2, - .paletteNum = 0, -}; - -const struct OamData gOamData_AffineOff_ObjBlend_32x32 = -{ - .y = 0, - .affineMode = ST_OAM_AFFINE_OFF, - .objMode = ST_OAM_OBJ_BLEND, - .bpp = ST_OAM_4BPP, - .shape = SPRITE_SHAPE(32x32), - .x = 0, - .size = SPRITE_SIZE(32x32), - .tileNum = 0, - .priority = 2, - .paletteNum = 0, -}; - -const struct OamData gOamData_AffineOff_ObjBlend_64x64 = -{ - .y = 0, - .affineMode = ST_OAM_AFFINE_OFF, - .objMode = ST_OAM_OBJ_BLEND, - .bpp = ST_OAM_4BPP, - .shape = SPRITE_SHAPE(64x64), - .x = 0, - .size = SPRITE_SIZE(64x64), - .tileNum = 0, - .priority = 2, - .paletteNum = 0, -}; - -const struct OamData gOamData_AffineOff_ObjBlend_16x8 = -{ - .y = 0, - .affineMode = ST_OAM_AFFINE_OFF, - .objMode = ST_OAM_OBJ_BLEND, - .bpp = ST_OAM_4BPP, - .shape = SPRITE_SHAPE(16x8), - .x = 0, - .size = SPRITE_SIZE(16x8), - .tileNum = 0, - .priority = 2, - .paletteNum = 0, -}; - -const struct OamData gOamData_AffineOff_ObjBlend_32x8 = -{ - .y = 0, - .affineMode = ST_OAM_AFFINE_OFF, - .objMode = ST_OAM_OBJ_BLEND, - .bpp = ST_OAM_4BPP, - .shape = SPRITE_SHAPE(32x8), - .x = 0, - .size = SPRITE_SIZE(32x8), - .tileNum = 0, - .priority = 2, - .paletteNum = 0, -}; - -const struct OamData gOamData_AffineOff_ObjBlend_32x16 = -{ - .y = 0, - .affineMode = ST_OAM_AFFINE_OFF, - .objMode = ST_OAM_OBJ_BLEND, - .bpp = ST_OAM_4BPP, - .shape = SPRITE_SHAPE(32x16), - .x = 0, - .size = SPRITE_SIZE(32x16), - .tileNum = 0, - .priority = 2, - .paletteNum = 0, -}; - -const struct OamData gOamData_AffineOff_ObjBlend_64x32 = -{ - .y = 0, - .affineMode = ST_OAM_AFFINE_OFF, - .objMode = ST_OAM_OBJ_BLEND, - .bpp = ST_OAM_4BPP, - .shape = SPRITE_SHAPE(64x32), - .x = 0, - .size = SPRITE_SIZE(64x32), - .tileNum = 0, - .priority = 2, - .paletteNum = 0, -}; - -const struct OamData gOamData_AffineOff_ObjBlend_8x16 = -{ - .y = 0, - .affineMode = ST_OAM_AFFINE_OFF, - .objMode = ST_OAM_OBJ_BLEND, - .bpp = ST_OAM_4BPP, - .shape = SPRITE_SHAPE(8x16), - .x = 0, - .size = SPRITE_SIZE(8x16), - .tileNum = 0, - .priority = 2, - .paletteNum = 0, -}; - -const struct OamData gOamData_AffineOff_ObjBlend_8x32 = -{ - .y = 0, - .affineMode = ST_OAM_AFFINE_OFF, - .objMode = ST_OAM_OBJ_BLEND, - .bpp = ST_OAM_4BPP, - .shape = SPRITE_SHAPE(8x32), - .x = 0, - .size = SPRITE_SIZE(8x32), - .tileNum = 0, - .priority = 2, - .paletteNum = 0, -}; - -const struct OamData gOamData_AffineOff_ObjBlend_16x32 = -{ - .y = 0, - .affineMode = ST_OAM_AFFINE_OFF, - .objMode = ST_OAM_OBJ_BLEND, - .bpp = ST_OAM_4BPP, - .shape = SPRITE_SHAPE(16x32), - .x = 0, - .size = SPRITE_SIZE(16x32), - .tileNum = 0, - .priority = 2, - .paletteNum = 0, -}; - -const struct OamData gOamData_AffineOff_ObjBlend_32x64 = -{ - .y = 0, - .affineMode = ST_OAM_AFFINE_OFF, - .objMode = ST_OAM_OBJ_BLEND, - .bpp = ST_OAM_4BPP, - .shape = SPRITE_SHAPE(32x64), - .x = 0, - .size = SPRITE_SIZE(32x64), - .tileNum = 0, - .priority = 2, - .paletteNum = 0, -}; - -const struct OamData gOamData_AffineNormal_ObjBlend_8x8 = -{ - .y = 0, - .affineMode = ST_OAM_AFFINE_NORMAL, - .objMode = ST_OAM_OBJ_BLEND, - .bpp = ST_OAM_4BPP, - .shape = SPRITE_SHAPE(8x8), - .x = 0, - .size = SPRITE_SIZE(8x8), - .tileNum = 0, - .priority = 2, - .paletteNum = 0, -}; - -const struct OamData gOamData_AffineNormal_ObjBlend_16x16 = -{ - .y = 0, - .affineMode = ST_OAM_AFFINE_NORMAL, - .objMode = ST_OAM_OBJ_BLEND, - .bpp = ST_OAM_4BPP, - .shape = SPRITE_SHAPE(16x16), - .x = 0, - .size = SPRITE_SIZE(16x16), - .tileNum = 0, - .priority = 2, - .paletteNum = 0, -}; - -const struct OamData gOamData_AffineNormal_ObjBlend_32x32 = -{ - .y = 0, - .affineMode = ST_OAM_AFFINE_NORMAL, - .objMode = ST_OAM_OBJ_BLEND, - .bpp = ST_OAM_4BPP, - .shape = SPRITE_SHAPE(32x32), - .x = 0, - .size = SPRITE_SIZE(32x32), - .tileNum = 0, - .priority = 2, - .paletteNum = 0, -}; - -const struct OamData gOamData_AffineNormal_ObjBlend_64x64 = -{ - .y = 0, - .affineMode = ST_OAM_AFFINE_NORMAL, - .objMode = ST_OAM_OBJ_BLEND, - .bpp = ST_OAM_4BPP, - .shape = SPRITE_SHAPE(64x64), - .x = 0, - .size = SPRITE_SIZE(64x64), - .tileNum = 0, - .priority = 2, - .paletteNum = 0, -}; - -const struct OamData gOamData_AffineNormal_ObjBlend_16x8 = -{ - .y = 0, - .affineMode = ST_OAM_AFFINE_NORMAL, - .objMode = ST_OAM_OBJ_BLEND, - .bpp = ST_OAM_4BPP, - .shape = SPRITE_SHAPE(16x8), - .x = 0, - .size = SPRITE_SIZE(16x8), - .tileNum = 0, - .priority = 2, - .paletteNum = 0, -}; - -const struct OamData gOamData_AffineNormal_ObjBlend_32x8 = -{ - .y = 0, - .affineMode = ST_OAM_AFFINE_NORMAL, - .objMode = ST_OAM_OBJ_BLEND, - .bpp = ST_OAM_4BPP, - .shape = SPRITE_SHAPE(32x8), - .x = 0, - .size = SPRITE_SIZE(32x8), - .tileNum = 0, - .priority = 2, - .paletteNum = 0, -}; - -const struct OamData gOamData_AffineNormal_ObjBlend_32x16 = -{ - .y = 0, - .affineMode = ST_OAM_AFFINE_NORMAL, - .objMode = ST_OAM_OBJ_BLEND, - .bpp = ST_OAM_4BPP, - .shape = SPRITE_SHAPE(32x16), - .x = 0, - .size = SPRITE_SIZE(32x16), - .tileNum = 0, - .priority = 2, - .paletteNum = 0, -}; - -const struct OamData gOamData_AffineNormal_ObjBlend_64x32 = -{ - .y = 0, - .affineMode = ST_OAM_AFFINE_NORMAL, - .objMode = ST_OAM_OBJ_BLEND, - .bpp = ST_OAM_4BPP, - .shape = SPRITE_SHAPE(64x32), - .x = 0, - .size = SPRITE_SIZE(64x32), - .tileNum = 0, - .priority = 2, - .paletteNum = 0, -}; - -const struct OamData gOamData_AffineNormal_ObjBlend_8x16 = -{ - .y = 0, - .affineMode = ST_OAM_AFFINE_NORMAL, - .objMode = ST_OAM_OBJ_BLEND, - .bpp = ST_OAM_4BPP, - .shape = SPRITE_SHAPE(8x16), - .x = 0, - .size = SPRITE_SIZE(8x16), - .tileNum = 0, - .priority = 2, - .paletteNum = 0, -}; - -const struct OamData gOamData_AffineNormal_ObjBlend_8x32 = -{ - .y = 0, - .affineMode = ST_OAM_AFFINE_NORMAL, - .objMode = ST_OAM_OBJ_BLEND, - .bpp = ST_OAM_4BPP, - .shape = SPRITE_SHAPE(8x32), - .x = 0, - .size = SPRITE_SIZE(8x32), - .tileNum = 0, - .priority = 2, - .paletteNum = 0, -}; - -const struct OamData gOamData_AffineNormal_ObjBlend_16x32 = -{ - .y = 0, - .affineMode = ST_OAM_AFFINE_NORMAL, - .objMode = ST_OAM_OBJ_BLEND, - .bpp = ST_OAM_4BPP, - .shape = SPRITE_SHAPE(16x32), - .x = 0, - .size = SPRITE_SIZE(16x32), - .tileNum = 0, - .priority = 2, - .paletteNum = 0, -}; - -const struct OamData gOamData_AffineNormal_ObjBlend_32x64 = -{ - .y = 0, - .affineMode = ST_OAM_AFFINE_NORMAL, - .objMode = ST_OAM_OBJ_BLEND, - .bpp = ST_OAM_4BPP, - .shape = SPRITE_SHAPE(32x64), - .x = 0, - .size = SPRITE_SIZE(32x64), - .tileNum = 0, - .priority = 2, - .paletteNum = 0, -}; - -const struct OamData gOamData_AffineDouble_ObjBlend_8x8 = -{ - .y = 0, - .affineMode = ST_OAM_AFFINE_DOUBLE, - .objMode = ST_OAM_OBJ_BLEND, - .bpp = ST_OAM_4BPP, - .shape = SPRITE_SHAPE(8x8), - .x = 0, - .size = SPRITE_SIZE(8x8), - .tileNum = 0, - .priority = 2, - .paletteNum = 0, -}; - -const struct OamData gOamData_AffineDouble_ObjBlend_16x16 = -{ - .y = 0, - .affineMode = ST_OAM_AFFINE_DOUBLE, - .objMode = ST_OAM_OBJ_BLEND, - .bpp = ST_OAM_4BPP, - .shape = SPRITE_SHAPE(16x16), - .x = 0, - .size = SPRITE_SIZE(16x16), - .tileNum = 0, - .priority = 2, - .paletteNum = 0, -}; - -const struct OamData gOamData_AffineDouble_ObjBlend_32x32 = -{ - .y = 0, - .affineMode = ST_OAM_AFFINE_DOUBLE, - .objMode = ST_OAM_OBJ_BLEND, - .bpp = ST_OAM_4BPP, - .shape = SPRITE_SHAPE(32x32), - .x = 0, - .size = SPRITE_SIZE(32x32), - .tileNum = 0, - .priority = 2, - .paletteNum = 0, -}; - -const struct OamData gOamData_AffineDouble_ObjBlend_64x64 = -{ - .y = 0, - .affineMode = ST_OAM_AFFINE_DOUBLE, - .objMode = ST_OAM_OBJ_BLEND, - .bpp = ST_OAM_4BPP, - .shape = SPRITE_SHAPE(64x64), - .x = 0, - .size = SPRITE_SIZE(64x64), - .tileNum = 0, - .priority = 2, - .paletteNum = 0, -}; - -const struct OamData gOamData_AffineDouble_ObjBlend_16x8 = -{ - .y = 0, - .affineMode = ST_OAM_AFFINE_DOUBLE, - .objMode = ST_OAM_OBJ_BLEND, - .bpp = ST_OAM_4BPP, - .shape = SPRITE_SHAPE(16x8), - .x = 0, - .size = SPRITE_SIZE(16x8), - .tileNum = 0, - .priority = 2, - .paletteNum = 0, -}; - -const struct OamData gOamData_AffineDouble_ObjBlend_32x8 = -{ - .y = 0, - .affineMode = ST_OAM_AFFINE_DOUBLE, - .objMode = ST_OAM_OBJ_BLEND, - .bpp = ST_OAM_4BPP, - .shape = SPRITE_SHAPE(32x8), - .x = 0, - .size = SPRITE_SIZE(32x8), - .tileNum = 0, - .priority = 2, - .paletteNum = 0, -}; - -const struct OamData gOamData_AffineDouble_ObjBlend_32x16 = -{ - .y = 0, - .affineMode = ST_OAM_AFFINE_DOUBLE, - .objMode = ST_OAM_OBJ_BLEND, - .bpp = ST_OAM_4BPP, - .shape = SPRITE_SHAPE(32x16), - .x = 0, - .size = SPRITE_SIZE(32x16), - .tileNum = 0, - .priority = 2, - .paletteNum = 0, -}; - -const struct OamData gOamData_AffineDouble_ObjBlend_64x32 = -{ - .y = 0, - .affineMode = ST_OAM_AFFINE_DOUBLE, - .objMode = ST_OAM_OBJ_BLEND, - .bpp = ST_OAM_4BPP, - .shape = SPRITE_SHAPE(64x32), - .x = 0, - .size = SPRITE_SIZE(64x32), - .tileNum = 0, - .priority = 2, - .paletteNum = 0, -}; - -const struct OamData gOamData_AffineDouble_ObjBlend_8x16 = -{ - .y = 0, - .affineMode = ST_OAM_AFFINE_DOUBLE, - .objMode = ST_OAM_OBJ_BLEND, - .bpp = ST_OAM_4BPP, - .shape = SPRITE_SHAPE(8x16), - .x = 0, - .size = SPRITE_SIZE(8x16), - .tileNum = 0, - .priority = 2, - .paletteNum = 0, -}; - -const struct OamData gOamData_AffineDouble_ObjBlend_8x32 = -{ - .y = 0, - .affineMode = ST_OAM_AFFINE_DOUBLE, - .objMode = ST_OAM_OBJ_BLEND, - .bpp = ST_OAM_4BPP, - .shape = SPRITE_SHAPE(8x32), - .x = 0, - .size = SPRITE_SIZE(8x32), - .tileNum = 0, - .priority = 2, - .paletteNum = 0, -}; - -const struct OamData gOamData_AffineDouble_ObjBlend_16x32 = -{ - .y = 0, - .affineMode = ST_OAM_AFFINE_DOUBLE, - .objMode = ST_OAM_OBJ_BLEND, - .bpp = ST_OAM_4BPP, - .shape = SPRITE_SHAPE(16x32), - .x = 0, - .size = SPRITE_SIZE(16x32), - .tileNum = 0, - .priority = 2, - .paletteNum = 0, -}; - -const struct OamData gOamData_AffineDouble_ObjBlend_32x64 = -{ - .y = 0, - .affineMode = ST_OAM_AFFINE_DOUBLE, - .objMode = ST_OAM_OBJ_BLEND, - .bpp = ST_OAM_4BPP, - .shape = SPRITE_SHAPE(32x64), - .x = 0, - .size = SPRITE_SIZE(32x64), - .tileNum = 0, - .priority = 2, - .paletteNum = 0, -}; - -const struct CompressedSpriteSheet gBattleAnimPicTable[] = -{ - {gBattleAnimSpriteGfx_Bone, 0x0200, ANIM_TAG_BONE}, - {gBattleAnimSpriteGfx_Spark, 0x0300, ANIM_TAG_SPARK}, - {gBattleAnimSpriteGfx_Pencil, 0x0200, ANIM_TAG_PENCIL}, - {gBattleAnimSpriteGfx_AirWave, 0x0100, ANIM_TAG_AIR_WAVE}, - {gBattleAnimSpriteGfx_Orb, 0x0200, ANIM_TAG_ORB}, -#if B_NEW_SWORD_PARTICLE - {gBattleAnimSpriteGfx_NewSword, 0x0400, ANIM_TAG_SWORD}, -#else - {gBattleAnimSpriteGfx_Sword, 0x0400, ANIM_TAG_SWORD}, -#endif -#if B_NEW_LEECH_SEED_PARTICLE - {gBattleAnimSpriteGfx_NewLeechSeed, 0x0180, ANIM_TAG_SEED}, -#else - {gBattleAnimSpriteGfx_Seed, 0x0180, ANIM_TAG_SEED}, -#endif - {gBattleAnimSpriteGfx_Explosion6, 0x0800, ANIM_TAG_EXPLOSION_6}, - {gBattleAnimSpriteGfx_PinkOrb, 0x0020, ANIM_TAG_PINK_ORB}, - {gBattleAnimSpriteGfx_Gust, 0x0400, ANIM_TAG_GUST}, - {gBattleAnimSpriteGfx_IceCube, 0x1200, ANIM_TAG_ICE_CUBE}, - {gBattleAnimSpriteGfx_Spark2, 0x0180, ANIM_TAG_SPARK_2}, - {gBattleAnimSpriteGfx_Orange, 0x0080, ANIM_TAG_ORANGE}, - {gBattleAnimSpriteGfx_YellowBall, 0x0080, ANIM_TAG_YELLOW_BALL}, - {gBattleAnimSpriteGfx_LockOn, 0x0280, ANIM_TAG_LOCK_ON}, - {gBattleAnimSpriteGfx_TiedBag, 0x0080, ANIM_TAG_TIED_BAG}, - {gBattleAnimSpriteGfx_BlackSmoke, 0x0100, ANIM_TAG_BLACK_SMOKE}, - {gBattleAnimSpriteGfx_BlackBall, 0x0020, ANIM_TAG_BLACK_BALL}, - {gBattleAnimSpriteGfx_Conversion, 0x0080, ANIM_TAG_CONVERSION}, - {gBattleAnimSpriteGfx_Glass, 0x0400, ANIM_TAG_GLASS}, - {gBattleAnimSpriteGfx_HornHit, 0x0200, ANIM_TAG_HORN_HIT}, - {gBattleAnimSpriteGfx_Hit, 0x0A00, ANIM_TAG_HIT}, - {gBattleAnimSpriteGfx_Hit, 0x0A00, ANIM_TAG_HIT_2}, - {gBattleAnimSpriteGfx_BlueShards, 0x0380, ANIM_TAG_BLUE_SHARDS}, - {gBattleAnimSpriteGfx_ClosingEye, 0x0300, ANIM_TAG_CLOSING_EYE}, - {gBattleAnimSpriteGfx_WavingHand, 0x0A00, ANIM_TAG_WAVING_HAND}, - {gBattleAnimSpriteGfx_HitDuplicate, 0x0A00, ANIM_TAG_HIT_DUPLICATE}, - {gBattleAnimSpriteGfx_Leer, 0x0A00, ANIM_TAG_LEER}, - {gBattleAnimSpriteGfx_BlueBurst, 0x0A00, ANIM_TAG_BLUE_BURST}, -#if B_NEW_EMBER_PARTICLES - {gBattleAnimSpriteGfx_NewEmbers, 0x0A00, ANIM_TAG_SMALL_EMBER}, -#else - {gBattleAnimSpriteGfx_SmallEmber, 0x0A00, ANIM_TAG_SMALL_EMBER}, -#endif - {gBattleAnimSpriteGfx_GraySmoke, 0x0A00, ANIM_TAG_GRAY_SMOKE}, - {gBattleAnimSpriteGfx_BlueStar, 0x0E00, ANIM_TAG_BLUE_STAR}, - {gBattleAnimSpriteGfx_BubbleBurst, 0x0380, ANIM_TAG_BUBBLE_BURST}, - {gBattleAnimSpriteGfx_Fire, 0x1000, ANIM_TAG_FIRE}, - {gBattleAnimSpriteGfx_SpinningFire, 0x0800, ANIM_TAG_SPINNING_FIRE}, - {gBattleAnimSpriteGfx_FirePlume, 0x0A00, ANIM_TAG_FIRE_PLUME}, - {gBattleAnimSpriteGfx_Lightning2, 0x0800, ANIM_TAG_LIGHTNING_2}, - {gBattleAnimSpriteGfx_Lightning, 0x0A00, ANIM_TAG_LIGHTNING}, - {gBattleAnimSpriteGfx_ClawSlash2, 0x0A00, ANIM_TAG_CLAW_SLASH_2}, - {gBattleAnimSpriteGfx_ClawSlash, 0x0A00, ANIM_TAG_CLAW_SLASH}, - {gBattleAnimSpriteGfx_Scratch3, 0x0A00, ANIM_TAG_SCRATCH_3}, - {gBattleAnimSpriteGfx_Scratch2, 0x0A00, ANIM_TAG_SCRATCH_2}, - {gBattleAnimSpriteGfx_BubbleBurst2, 0x0A00, ANIM_TAG_BUBBLE_BURST_2}, - {gBattleAnimSpriteGfx_IceChunk, 0x0A00, ANIM_TAG_ICE_CHUNK}, - {gBattleAnimSpriteGfx_Glass2, 0x0A00, ANIM_TAG_GLASS_2}, - {gBattleAnimSpriteGfx_PinkHeart2, 0x0A00, ANIM_TAG_PINK_HEART_2}, - {gBattleAnimSpriteGfx_SapDrip, 0x1000, ANIM_TAG_SAP_DRIP}, - {gBattleAnimSpriteGfx_SapDrip, 0x1000, ANIM_TAG_SAP_DRIP_2}, - {gBattleAnimSpriteGfx_Sparkle1, 0x1000, ANIM_TAG_SPARKLE_1}, - {gBattleAnimSpriteGfx_Sparkle1, 0x1000, ANIM_TAG_SPARKLE_2}, - {gBattleAnimSpriteGfx_HumanoidFoot, 0x0200, ANIM_TAG_HUMANOID_FOOT}, - {gBattleAnimSpriteGfx_MonsterFoot, 0x0200, ANIM_TAG_MONSTER_FOOT}, - {gBattleAnimSpriteGfx_HumanoidHand, 0x0200, ANIM_TAG_HUMANOID_HAND}, - {gBattleAnimSpriteGfx_NoiseLine, 0x0800, ANIM_TAG_NOISE_LINE}, - {gBattleAnimSpriteGfx_YellowUnk, 0x0080, ANIM_TAG_YELLOW_UNK}, - {gBattleAnimSpriteGfx_RedFist, 0x0200, ANIM_TAG_RED_FIST}, - {gBattleAnimSpriteGfx_SlamHit, 0x1000, ANIM_TAG_SLAM_HIT}, - {gBattleAnimSpriteGfx_Ring, 0x0180, ANIM_TAG_RING}, -#if NEW_ROCKS_PARTICLE - {gBattleAnimSpriteGfx_NewRocks, 0x0C00, ANIM_TAG_ROCKS}, -#else - {gBattleAnimSpriteGfx_Rocks, 0x0C00, ANIM_TAG_ROCKS}, -#endif - {gBattleAnimSpriteGfx_Z, 0x0100, ANIM_TAG_Z}, - {gBattleAnimSpriteGfx_YellowUnk2, 0x0040, ANIM_TAG_YELLOW_UNK_2}, - {gBattleAnimSpriteGfx_AirSlash, 0x0180, ANIM_TAG_AIR_SLASH}, - {gBattleAnimSpriteGfx_SpinningGreenOrbs, 0x0800, ANIM_TAG_SPINNING_GREEN_ORBS}, -#if B_NEW_LEAF_PARTICLE - {gBattleAnimSpriteGfx_NewLeaf, 0x0480, ANIM_TAG_LEAF}, -#else - {gBattleAnimSpriteGfx_Leaf, 0x0480, ANIM_TAG_LEAF}, -#endif - {gBattleAnimSpriteGfx_Finger, 0x0200, ANIM_TAG_FINGER}, - {gBattleAnimSpriteGfx_PoisonPowder, 0x0200, ANIM_TAG_POISON_POWDER}, - {gBattleAnimSpriteGfx_BrownTriangle, 0x0100, ANIM_TAG_BROWN_TRIANGLE}, - {gBattleAnimSpriteGfx_PoisonPowder, 0x0200, ANIM_TAG_SLEEP_POWDER}, - {gBattleAnimSpriteGfx_PoisonPowder, 0x0200, ANIM_TAG_STUN_SPORE}, - {gBattleAnimSpriteGfx_PoisonPowder, 0x0200, ANIM_TAG_POWDER}, - {gBattleAnimSpriteGfx_Sparkle3, 0x0200, ANIM_TAG_SPARKLE_3}, - {gBattleAnimSpriteGfx_Sparkle4, 0x0A00, ANIM_TAG_SPARKLE_4}, - {gBattleAnimSpriteGfx_MusicNotes, 0x0300, ANIM_TAG_MUSIC_NOTES}, - {gBattleAnimSpriteGfx_Duck, 0x0180, ANIM_TAG_DUCK}, - {gBattleAnimSpriteGfx_MudSand, 0x00A0, ANIM_TAG_MUD_SAND}, - {gBattleAnimSpriteGfx_Alert, 0x0700, ANIM_TAG_ALERT}, - {gBattleAnimSpriteGfx_BlueFlames, 0x0400, ANIM_TAG_BLUE_FLAMES}, - {gBattleAnimSpriteGfx_BlueFlames2, 0x0200, ANIM_TAG_BLUE_FLAMES_2}, - {gBattleAnimSpriteGfx_Shock4, 0x0300, ANIM_TAG_SHOCK_4}, - {gBattleAnimSpriteGfx_Shock, 0x0C00, ANIM_TAG_SHOCK}, - {gBattleAnimSpriteGfx_Bell2, 0x0A00, ANIM_TAG_BELL_2}, - {gBattleAnimSpriteGfx_PinkGlove, 0x0080, ANIM_TAG_PINK_GLOVE}, - {gBattleAnimSpriteGfx_BlueLines, 0x0040, ANIM_TAG_BLUE_LINES}, - {gBattleAnimSpriteGfx_Impact3, 0x0E00, ANIM_TAG_IMPACT_3}, - {gBattleAnimSpriteGfx_Impact2, 0x0E00, ANIM_TAG_IMPACT_2}, - {gBattleAnimSpriteGfx_Reticle, 0x0280, ANIM_TAG_RETICLE}, - {gBattleAnimSpriteGfx_Breath, 0x0200, ANIM_TAG_BREATH}, - {gBattleAnimSpriteGfx_Anger, 0x0080, ANIM_TAG_ANGER}, - {gBattleAnimSpriteGfx_Snowball, 0x00C0, ANIM_TAG_SNOWBALL}, - {gBattleAnimSpriteGfx_Vine, 0x0A00, ANIM_TAG_VINE}, - {gBattleAnimSpriteGfx_Sword2, 0x0200, ANIM_TAG_SWORD_2}, - {gBattleAnimSpriteGfx_Clapping, 0x0180, ANIM_TAG_CLAPPING}, - {gBattleAnimSpriteGfx_RedTube, 0x0080, ANIM_TAG_RED_TUBE}, - {gBattleAnimSpriteGfx_Amnesia, 0x1000, ANIM_TAG_AMNESIA}, - {gBattleAnimSpriteGfx_String2, 0x0A00, ANIM_TAG_STRING_2}, - {gBattleAnimSpriteGfx_Pencil2, 0x0180, ANIM_TAG_PENCIL_2}, - {gBattleAnimSpriteGfx_Petal, 0x0380, ANIM_TAG_PETAL}, - {gBattleAnimSpriteGfx_BentSpoon, 0x0C00, ANIM_TAG_BENT_SPOON}, - {gBattleAnimSpriteGfx_Web, 0x0200, ANIM_TAG_WEB}, - {gBattleAnimSpriteGfx_MilkBottle, 0x0200, ANIM_TAG_MILK_BOTTLE}, - {gBattleAnimSpriteGfx_Coin, 0x0200, ANIM_TAG_COIN}, - {gBattleAnimSpriteGfx_CrackedEgg, 0x0200, ANIM_TAG_CRACKED_EGG}, - {gBattleAnimSpriteGfx_HatchedEgg, 0x0400, ANIM_TAG_HATCHED_EGG}, - {gBattleAnimSpriteGfx_FreshEgg, 0x0080, ANIM_TAG_FRESH_EGG}, - {gBattleAnimSpriteGfx_Fangs, 0x0400, ANIM_TAG_FANGS}, - {gBattleAnimSpriteGfx_Explosion2, 0x0c00, ANIM_TAG_EXPLOSION_2}, - {gBattleAnimSpriteGfx_Explosion3, 0x0200, ANIM_TAG_EXPLOSION_3}, - {gBattleAnimSpriteGfx_WaterDroplet, 0x1000, ANIM_TAG_WATER_DROPLET}, - {gBattleAnimSpriteGfx_WaterDroplet2, 0x0a00, ANIM_TAG_WATER_DROPLET_2}, - {gBattleAnimSpriteGfx_Seed2, 0x0020, ANIM_TAG_SEED_2}, - {gBattleAnimSpriteGfx_Sprout, 0x0e00, ANIM_TAG_SPROUT}, - {gBattleAnimSpriteGfx_RedWand, 0x0080, ANIM_TAG_RED_WAND}, - {gBattleAnimSpriteGfx_PurpleGreenUnk, 0x0a00, ANIM_TAG_PURPLE_GREEN_UNK}, - {gBattleAnimSpriteGfx_WaterColumn, 0x0400, ANIM_TAG_WATER_COLUMN}, - {gBattleAnimSpriteGfx_MudUnk, 0x0200, ANIM_TAG_MUD_UNK}, - {gBattleAnimSpriteGfx_RainDrops, 0x0700, ANIM_TAG_RAIN_DROPS}, - {gBattleAnimSpriteGfx_FurySwipes, 0x0800, ANIM_TAG_FURY_SWIPES}, - {gBattleAnimSpriteGfx_Vine2, 0x0a00, ANIM_TAG_VINE_2}, - {gBattleAnimSpriteGfx_Teeth, 0x0600, ANIM_TAG_TEETH}, - {gBattleAnimSpriteGfx_Bone2, 0x0800, ANIM_TAG_BONE_2}, - {gBattleAnimSpriteGfx_WhiteBag, 0x0200, ANIM_TAG_WHITE_BAG}, - {gBattleAnimSpriteGfx_Unknown, 0x0040, ANIM_TAG_UNKNOWN}, - {gBattleAnimSpriteGfx_PurpleCoral, 0x0180, ANIM_TAG_PURPLE_CORAL}, - {gBattleAnimSpriteGfx_PurpleDroplet, 0x0600, ANIM_TAG_PURPLE_DROPLET}, - {gBattleAnimSpriteGfx_Shock2, 0x0600, ANIM_TAG_SHOCK_2}, - {gBattleAnimSpriteGfx_ClosingEye2, 0x0200, ANIM_TAG_CLOSING_EYE_2}, - {gBattleAnimSpriteGfx_MetalBall, 0x0080, ANIM_TAG_METAL_BALL}, -#if NEW_SUBSTITUTE_PARTICLE - {gBattleAnimSpriteGfx_NewSubstituteFront, 0x0200, ANIM_TAG_MONSTER_DOLL}, -#else - {gBattleAnimSpriteGfx_MonsterDoll, 0x0200, ANIM_TAG_MONSTER_DOLL}, -#endif - {gBattleAnimSpriteGfx_Whirlwind, 0x0800, ANIM_TAG_WHIRLWIND}, - {gBattleAnimSpriteGfx_Whirlwind2, 0x0080, ANIM_TAG_WHIRLWIND_2}, - {gBattleAnimSpriteGfx_Explosion4, 0x0a00, ANIM_TAG_EXPLOSION_4}, - {gBattleAnimSpriteGfx_Explosion5, 0x0280, ANIM_TAG_EXPLOSION_5}, - {gBattleAnimSpriteGfx_Tongue, 0x0280, ANIM_TAG_TONGUE}, - {gBattleAnimSpriteGfx_Smoke, 0x0100, ANIM_TAG_SMOKE}, - {gBattleAnimSpriteGfx_Smoke2, 0x0200, ANIM_TAG_SMOKE_2}, - {gBattleAnimSpriteGfx_Impact, 0x0200, ANIM_TAG_IMPACT}, - {gBattleAnimSpriteGfx_CircleImpact, 0x0020, ANIM_TAG_CIRCLE_IMPACT}, - {gBattleAnimSpriteGfx_Scratch, 0x0a00, ANIM_TAG_SCRATCH}, - {gBattleAnimSpriteGfx_Cut, 0x0800, ANIM_TAG_CUT}, -#if B_NEW_TEETH_PARTICLE - {gBattleAnimSpriteGfx_NewTeeth, 0x0800, ANIM_TAG_SHARP_TEETH}, -#else - {gBattleAnimSpriteGfx_SharpTeeth, 0x0800, ANIM_TAG_SHARP_TEETH}, -#endif - {gBattleAnimSpriteGfx_RainbowRings, 0x00c0, ANIM_TAG_RAINBOW_RINGS}, - {gBattleAnimSpriteGfx_IceCrystals, 0x01c0, ANIM_TAG_ICE_CRYSTALS}, - {gBattleAnimSpriteGfx_IceSpikes, 0x0100, ANIM_TAG_ICE_SPIKES}, -#if B_NEW_HANDS_FEET_PARTICLE - {gBattleAnimSpriteGfx_NewHandsAndFeet, 0x0800, ANIM_TAG_HANDS_AND_FEET}, -#else - {gBattleAnimSpriteGfx_HandsAndFeet, 0x0800, ANIM_TAG_HANDS_AND_FEET}, -#endif - {gBattleAnimSpriteGfx_MistCloud, 0x0200, ANIM_TAG_MIST_CLOUD}, - {gBattleAnimSpriteGfx_Clamp, 0x0800, ANIM_TAG_CLAMP}, - {gBattleAnimSpriteGfx_Bubble, 0x0180, ANIM_TAG_BUBBLE}, - {gBattleAnimSpriteGfx_Orbs, 0x0180, ANIM_TAG_ORBS}, - {gBattleAnimSpriteGfx_WaterImpact, 0x0200, ANIM_TAG_WATER_IMPACT}, - {gBattleAnimSpriteGfx_WaterOrb, 0x0200, ANIM_TAG_WATER_ORB}, - {gBattleAnimSpriteGfx_PoisonBubble, 0x0180, ANIM_TAG_POISON_BUBBLE}, - {gBattleAnimSpriteGfx_ToxicBubble, 0x0400, ANIM_TAG_TOXIC_BUBBLE}, -#if B_NEW_SPIKES_PARTICLE - {gBattleAnimSpriteGfx_NewSpikes, 0x0080, ANIM_TAG_SPIKES}, -#else - {gBattleAnimSpriteGfx_Spikes, 0x0080, ANIM_TAG_SPIKES}, -#endif - {gBattleAnimSpriteGfx_HornHit2, 0x0100, ANIM_TAG_HORN_HIT_2}, - {gBattleAnimSpriteGfx_AirWave2, 0x0100, ANIM_TAG_AIR_WAVE_2}, - {gBattleAnimSpriteGfx_SmallBubbles, 0x0140, ANIM_TAG_SMALL_BUBBLES}, -#if B_NEW_FLY_BUBBLE_PARTICLE - {gBattleAnimSpriteGfx_NewFly, 0x0800, ANIM_TAG_ROUND_SHADOW}, -#else - {gBattleAnimSpriteGfx_RoundShadow, 0x0800, ANIM_TAG_ROUND_SHADOW}, -#endif - {gBattleAnimSpriteGfx_Sunlight, 0x0200, ANIM_TAG_SUNLIGHT}, - {gBattleAnimSpriteGfx_Spore, 0x0100, ANIM_TAG_SPORE}, - {gBattleAnimSpriteGfx_Flower, 0x00a0, ANIM_TAG_FLOWER}, - {gBattleAnimSpriteGfx_RazorLeaf, 0x0100, ANIM_TAG_RAZOR_LEAF}, - {gBattleAnimSpriteGfx_Needle, 0x0080, ANIM_TAG_NEEDLE}, - {gBattleAnimSpriteGfx_WhirlwindLines, 0x0300, ANIM_TAG_WHIRLWIND_LINES}, - {gBattleAnimSpriteGfx_GoldRing, 0x0100, ANIM_TAG_GOLD_RING}, - {gBattleAnimSpriteGfx_GoldRing, 0x0100, ANIM_TAG_PURPLE_RING}, - {gBattleAnimSpriteGfx_GoldRing, 0x0100, ANIM_TAG_BLUE_RING}, - {gBattleAnimSpriteGfx_GreenLightWall, 0x0800, ANIM_TAG_GREEN_LIGHT_WALL}, - {gBattleAnimSpriteGfx_GreenLightWall, 0x0800, ANIM_TAG_BLUE_LIGHT_WALL}, - {gBattleAnimSpriteGfx_GreenLightWall, 0x0800, ANIM_TAG_RED_LIGHT_WALL}, - {gBattleAnimSpriteGfx_GreenLightWall, 0x0800, ANIM_TAG_GRAY_LIGHT_WALL}, - {gBattleAnimSpriteGfx_GreenLightWall, 0x0800, ANIM_TAG_ORANGE_LIGHT_WALL}, - {gBattleAnimSpriteGfx_BlackBall2, 0x0080, ANIM_TAG_BLACK_BALL_2}, - {gBattleAnimSpriteGfx_MistCloud, 0x0200, ANIM_TAG_PURPLE_GAS_CLOUD}, - {gBattleAnimSpriteGfx_SparkH, 0x0200, ANIM_TAG_SPARK_H}, - {gBattleAnimSpriteGfx_YellowStar, 0x0200, ANIM_TAG_YELLOW_STAR}, - {gBattleAnimSpriteGfx_LargeFreshEgg, 0x0080, ANIM_TAG_LARGE_FRESH_EGG}, - {gBattleAnimSpriteGfx_ShadowBall, 0x0200, ANIM_TAG_SHADOW_BALL}, - {gBattleAnimSpriteGfx_Lick, 0x0500, ANIM_TAG_LICK}, - {gBattleAnimSpriteGfx_VoidLines, 0x0800, ANIM_TAG_VOID_LINES}, - {gBattleAnimSpriteGfx_String, 0x0400, ANIM_TAG_STRING}, - {gBattleAnimSpriteGfx_WebThread, 0x0020, ANIM_TAG_WEB_THREAD}, - {gBattleAnimSpriteGfx_SpiderWeb, 0x0800, ANIM_TAG_SPIDER_WEB}, - {gBattleAnimSpriteGfx_Lightbulb, 0x0100, ANIM_TAG_LIGHTBULB}, - {gBattleAnimSpriteGfx_Slash, 0x0800, ANIM_TAG_SLASH}, - {gBattleAnimSpriteGfx_FocusEnergy, 0x0400, ANIM_TAG_FOCUS_ENERGY}, - {gBattleAnimSpriteGfx_SphereToCube, 0x0a00, ANIM_TAG_SPHERE_TO_CUBE}, - {gBattleAnimSpriteGfx_Tendrils, 0x1000, ANIM_TAG_TENDRILS}, -#if B_NEW_MEAN_LOOK_PARTICLE - {gBattleAnimSpriteGfx_NewEye, 0x0800, ANIM_TAG_EYE}, -#else - {gBattleAnimSpriteGfx_Eye, 0x0800, ANIM_TAG_EYE}, -#endif - {gBattleAnimSpriteGfx_WhiteShadow, 0x0400, ANIM_TAG_WHITE_SHADOW}, - {gBattleAnimSpriteGfx_TealAlert, 0x0200, ANIM_TAG_TEAL_ALERT}, - {gBattleAnimSpriteGfx_OpeningEye, 0x0800, ANIM_TAG_OPENING_EYE}, - {gBattleAnimSpriteGfx_RoundWhiteHalo, 0x0800, ANIM_TAG_ROUND_WHITE_HALO}, - {gBattleAnimSpriteGfx_FangAttack, 0x0800, ANIM_TAG_FANG_ATTACK}, - {gBattleAnimSpriteGfx_PurpleHandOutline, 0x0200, ANIM_TAG_PURPLE_HAND_OUTLINE}, - {gBattleAnimSpriteGfx_Moon, 0x0800, ANIM_TAG_MOON}, - {gBattleAnimSpriteGfx_GreenSparkle, 0x0200, ANIM_TAG_GREEN_SPARKLE}, - {gBattleAnimSpriteGfx_Spiral, 0x0800, ANIM_TAG_SPIRAL}, - {gBattleAnimSpriteGfx_SnoreZ, 0x0200, ANIM_TAG_SNORE_Z}, - {gBattleAnimSpriteGfx_Explosion, 0x0800, ANIM_TAG_EXPLOSION}, -#if B_NEW_CURSE_NAIL_PARTICLE - {gBattleAnimSpriteGfx_NewNail, 0x0400, ANIM_TAG_NAIL}, -#else - {gBattleAnimSpriteGfx_Nail, 0x0400, ANIM_TAG_NAIL}, -#endif - {gBattleAnimSpriteGfx_GhostlySpirit, 0x0200, ANIM_TAG_GHOSTLY_SPIRIT}, - {gBattleAnimSpriteGfx_WarmRock, 0x0a80, ANIM_TAG_WARM_ROCK}, - {gBattleAnimSpriteGfx_BreakingEgg, 0x0600, ANIM_TAG_BREAKING_EGG}, - {gBattleAnimSpriteGfx_ThinRing, 0x0800, ANIM_TAG_THIN_RING}, - {gBattleAnimSpriteGfx_PunchImpact, 0x0200, ANIM_TAG_PUNCH_IMPACT}, - {gBattleAnimSpriteGfx_Bell, 0x0600, ANIM_TAG_BELL}, - {gBattleAnimSpriteGfx_MusicNotes2, 0x0800, ANIM_TAG_MUSIC_NOTES_2}, - {gBattleAnimSpriteGfx_SpeedDust, 0x0180, ANIM_TAG_SPEED_DUST}, - {gBattleAnimSpriteGfx_TornMetal, 0x0800, ANIM_TAG_TORN_METAL}, - {gBattleAnimSpriteGfx_ThoughtBubble, 0x0800, ANIM_TAG_THOUGHT_BUBBLE}, - {gBattleAnimSpriteGfx_MagentaHeart, 0x0080, ANIM_TAG_MAGENTA_HEART}, - {gBattleAnimSpriteGfx_ElectricOrbs, 0x0080, ANIM_TAG_ELECTRIC_ORBS}, - {gBattleAnimSpriteGfx_CircleOfLight, 0x0800, ANIM_TAG_CIRCLE_OF_LIGHT}, - {gBattleAnimSpriteGfx_Electricity, 0x0800, ANIM_TAG_ELECTRICITY}, - {gBattleAnimSpriteGfx_Finger2, 0x0600, ANIM_TAG_FINGER_2}, - {gBattleAnimSpriteGfx_MovementWaves, 0x0600, ANIM_TAG_MOVEMENT_WAVES}, - {gBattleAnimSpriteGfx_MagentaHeart, 0x0080, ANIM_TAG_RED_HEART}, - {gBattleAnimSpriteGfx_RedOrb, 0x0080, ANIM_TAG_RED_ORB}, - {gBattleAnimSpriteGfx_EyeSparkle, 0x0180, ANIM_TAG_EYE_SPARKLE}, - {gBattleAnimSpriteGfx_MagentaHeart, 0x0080, ANIM_TAG_PINK_HEART}, - {gBattleAnimSpriteGfx_Angel, 0x0200, ANIM_TAG_ANGEL}, - {gBattleAnimSpriteGfx_Devil, 0x0400, ANIM_TAG_DEVIL}, - {gBattleAnimSpriteGfx_Swipe, 0x0a00, ANIM_TAG_SWIPE}, - {gBattleAnimSpriteGfx_Roots, 0x0800, ANIM_TAG_ROOTS}, - {gBattleAnimSpriteGfx_ItemBag, 0x0200, ANIM_TAG_ITEM_BAG}, - {gBattleAnimSpriteGfx_JaggedMusicNote, 0x0400, ANIM_TAG_JAGGED_MUSIC_NOTE}, -#if B_NEW_BATON_PASS_BALL_PARTICLE - {gBattleAnimSpriteGfx_NewPokeball, 0x0080, ANIM_TAG_POKEBALL}, -#else - {gBattleAnimSpriteGfx_Pokeball, 0x0080, ANIM_TAG_POKEBALL}, -#endif - {gBattleAnimSpriteGfx_Spotlight, 0x0800, ANIM_TAG_SPOTLIGHT}, - {gBattleAnimSpriteGfx_LetterZ, 0x0200, ANIM_TAG_LETTER_Z}, - {gBattleAnimSpriteGfx_RapidSpin, 0x0300, ANIM_TAG_RAPID_SPIN}, - {gBattleAnimSpriteGfx_TriAttackTriangle, 0x0800, ANIM_TAG_TRI_ATTACK_TRIANGLE}, - {gBattleAnimSpriteGfx_WispOrb, 0x0380, ANIM_TAG_WISP_ORB}, - {gBattleAnimSpriteGfx_WispFire, 0x0800, ANIM_TAG_WISP_FIRE}, - {gBattleAnimSpriteGfx_GoldStars, 0x00c0, ANIM_TAG_GOLD_STARS}, - {gBattleAnimSpriteGfx_EclipsingOrb, 0x0800, ANIM_TAG_ECLIPSING_ORB}, - {gBattleAnimSpriteGfx_GrayOrb, 0x0060, ANIM_TAG_GRAY_ORB}, - {gBattleAnimSpriteGfx_GrayOrb, 0x0060, ANIM_TAG_BLUE_ORB}, - {gBattleAnimSpriteGfx_GrayOrb, 0x0060, ANIM_TAG_RED_ORB_2}, - {gBattleAnimSpriteGfx_PinkPetal, 0x0080, ANIM_TAG_PINK_PETAL}, - {gBattleAnimSpriteGfx_PainSplit, 0x0180, ANIM_TAG_PAIN_SPLIT}, - {gBattleAnimSpriteGfx_Confetti, 0x0180, ANIM_TAG_CONFETTI}, -#if B_NEW_MORNING_SUN_STAR_PARTICLE - {gBattleAnimSpriteGfx_NewGreenStar, 0x0200, ANIM_TAG_GREEN_STAR}, -#else - {gBattleAnimSpriteGfx_GreenStar, 0x0200, ANIM_TAG_GREEN_STAR}, -#endif - {gBattleAnimSpriteGfx_PinkCloud, 0x0200, ANIM_TAG_PINK_CLOUD}, - {gBattleAnimSpriteGfx_SweatDrop, 0x0020, ANIM_TAG_SWEAT_DROP}, - {gBattleAnimSpriteGfx_GuardRing, 0x0400, ANIM_TAG_GUARD_RING}, - {gBattleAnimSpriteGfx_PurpleScratch, 0x0600, ANIM_TAG_PURPLE_SCRATCH}, - {gBattleAnimSpriteGfx_PurpleSwipe, 0x1000, ANIM_TAG_PURPLE_SWIPE}, - {gBattleAnimSpriteGfx_TagHand, 0x0400, ANIM_TAG_TAG_HAND}, - {gBattleAnimSpriteGfx_SmallRedEye, 0x0020, ANIM_TAG_SMALL_RED_EYE}, - {gBattleAnimSpriteGfx_HollowOrb, 0x0080, ANIM_TAG_HOLLOW_ORB}, - {gBattleAnimSpriteGfx_XSign, 0x0800, ANIM_TAG_X_SIGN}, - {gBattleAnimSpriteGfx_BluegreenOrb, 0x0080, ANIM_TAG_BLUEGREEN_ORB}, - {gBattleAnimSpriteGfx_PawPrint, 0x0200, ANIM_TAG_PAW_PRINT}, - {gBattleAnimSpriteGfx_PurpleFlame, 0x0400, ANIM_TAG_PURPLE_FLAME}, - {gBattleAnimSpriteGfx_RedBall, 0x0200, ANIM_TAG_RED_BALL}, - {gBattleAnimSpriteGfx_SmellingsaltEffect, 0x0200, ANIM_TAG_SMELLINGSALT_EFFECT}, - {gBattleAnimSpriteGfx_Meteor, 0x0800, ANIM_TAG_METEOR}, - {gBattleAnimSpriteGfx_FlatRock, 0x0280, ANIM_TAG_FLAT_ROCK}, - {gBattleAnimSpriteGfx_MagnifyingGlass, 0x0200, ANIM_TAG_MAGNIFYING_GLASS}, - {gBattleAnimSpriteGfx_WaterOrb, 0x0200, ANIM_TAG_BROWN_ORB}, - {gBattleAnimSpriteGfx_MetalSoundWaves, 0x0400, ANIM_TAG_METAL_SOUND_WAVES}, - {gBattleAnimSpriteGfx_FlyingDirt, 0x0200, ANIM_TAG_FLYING_DIRT}, - {gBattleAnimSpriteGfx_IcicleSpear, 0x0200, ANIM_TAG_ICICLE_SPEAR}, - {gBattleAnimSpriteGfx_Hail, 0x0080, ANIM_TAG_HAIL}, - {gBattleAnimSpriteGfx_GlowyRedOrb, 0x0020, ANIM_TAG_GLOWY_RED_ORB}, - {gBattleAnimSpriteGfx_GlowyRedOrb, 0x0020, ANIM_TAG_GLOWY_GREEN_ORB}, - {gBattleAnimSpriteGfx_GreenSpike, 0x0080, ANIM_TAG_GREEN_SPIKE}, - {gBattleAnimSpriteGfx_CircleOfLight, 0x0800, ANIM_TAG_WHITE_CIRCLE_OF_LIGHT}, - {gBattleAnimSpriteGfx_GlowyRedOrb, 0x0020, ANIM_TAG_GLOWY_BLUE_ORB}, - {gBattleAnimSpriteGfx_Pokeblock, 0x0080, ANIM_TAG_POKEBLOCK}, - {gBattleAnimSpriteGfx_WhiteFeather, 0x0400, ANIM_TAG_WHITE_FEATHER}, - {gBattleAnimSpriteGfx_Sparkle6, 0x0080, ANIM_TAG_SPARKLE_6}, - {gBattleAnimSpriteGfx_Splash, 0x0800, ANIM_TAG_SPLASH}, - {gBattleAnimSpriteGfx_SweatBead, 0x0020, ANIM_TAG_SWEAT_BEAD}, - {gBattleAnimSpriteGfx_Gem1, 0x0800, ANIM_TAG_GEM_1}, - {gBattleAnimSpriteGfx_Gem2, 0x0800, ANIM_TAG_GEM_2}, - {gBattleAnimSpriteGfx_Gem3, 0x0800, ANIM_TAG_GEM_3}, - {gBattleAnimSpriteGfx_SlamHit2, 0x1000, ANIM_TAG_SLAM_HIT_2}, - {gBattleAnimSpriteGfx_Recycle, 0x0800, ANIM_TAG_RECYCLE}, - {gBattleAnimSpriteGfx_RedParticles, 0x00a0, ANIM_TAG_RED_PARTICLES}, - {gBattleAnimSpriteGfx_Protect, 0x0800, ANIM_TAG_PROTECT}, - {gBattleAnimSpriteGfx_DirtMound, 0x0200, ANIM_TAG_DIRT_MOUND}, - {gBattleAnimSpriteGfx_Shock3, 0x0600, ANIM_TAG_SHOCK_3}, - {gBattleAnimSpriteGfx_WeatherBall, 0x0200, ANIM_TAG_WEATHER_BALL}, - {gBattleAnimSpriteGfx_Bird, 0x0800, ANIM_TAG_BIRD}, - {gBattleAnimSpriteGfx_CrossImpact, 0x0200, ANIM_TAG_CROSS_IMPACT}, - {gBattleAnimSpriteGfx_Slash, 0x0800, ANIM_TAG_SLASH_2}, - {gBattleAnimSpriteGfx_SlamHit, 0x1000, ANIM_TAG_WHIP_HIT}, - {gBattleAnimSpriteGfx_GoldRing, 0x0100, ANIM_TAG_BLUE_RING_2}, - {gBattleAnimSpriteGfx_WhiteStreak, 0x0200, ANIM_TAG_WHITE_STREAK}, - {gBattleAnimSpriteGfx_PurpleJab, 0x0100, ANIM_TAG_PURPLE_JAB}, - {gBattleAnimSpriteGfx_Spikes, 0x0080, ANIM_TAG_TOXIC_SPIKES}, - {gBattleAnimSpriteGfx_EnergyBall, 0x0200, ANIM_TAG_ENERGY_BALL}, - {gBattleAnimSpriteGfx_SeedBrown, 0x0080, ANIM_TAG_SEED_BROWN}, - {gBattleAnimSpriteGfx_Feint, 0x0800, ANIM_TAG_FEINT}, - {gBattleAnimSpriteGfx_MegaStone, 0x800, ANIM_TAG_MEGA_STONE}, - {gBattleAnimSpriteGfx_MegaSymbol, 0x0200, ANIM_TAG_MEGA_SYMBOL}, - {gBattleAnimSpriteGfx_MegaParticles, 0x0180, ANIM_TAG_MEGA_PARTICLES}, - {gBattleAnimSpriteGfx_TrumpCard, 0x0180, ANIM_TAG_TRUMP_CARD}, - {gBattleAnimSpriteGfx_TrumpCardParticles, 0x0060, ANIM_TAG_TRUMP_CARD_PARTICLES}, - {gBattleAnimSpriteGfx_Acupressure, 0x0200, ANIM_TAG_ACUPRESSURE}, - {gBattleAnimSpriteGfx_WringOut, 0x0200, ANIM_TAG_WRING_OUT}, - {gBattleAnimSpriteGfx_ColoredOrbs, 0x0300, ANIM_TAG_COLORED_ORBS}, - {gBattleAnimSpriteGfx_WorrySeed, 0x0080, ANIM_TAG_WORRY_SEED}, - {gBattleAnimSpriteGfx_SmallCloud, 0x0080, ANIM_TAG_SMALL_CLOUD}, - {gBattleAnimSpriteGfx_AttackOrder, 0x0480, ANIM_TAG_ATTACK_ORDER}, - {gBattleAnimSpriteGfx_DragonPulse, 0x0100, ANIM_TAG_DRAGON_PULSE}, - {gBattleAnimSpriteGfx_WoodHammer, 0x0C00, ANIM_TAG_WOOD_HAMMER}, - {gBattleAnimSpriteGfx_PsychoCut, 0x0200, ANIM_TAG_PSYCHO_CUT}, - {gBattleAnimSpriteGfx_PowerGem, 0x0080, ANIM_TAG_POWER_GEM}, - {gBattleAnimSpriteGfx_StoneEdge, 0x0A00, ANIM_TAG_STONE_EDGE}, - {gBattleAnimSpriteGfx_StealthRock, 0x0080, ANIM_TAG_STEALTH_ROCK}, - {gBattleAnimSpriteGfx_PoisonJab, 0x0080, ANIM_TAG_POISON_JAB}, - {gBattleAnimSpriteGfx_PoisonBubble, 0x0180, ANIM_TAG_GREEN_POISON_BUBBLE}, - {gBattleAnimSpriteGfx_FlashCannonBall, 0x200, ANIM_TAG_FLASH_CANNON_BALL}, - {gBattleAnimSpriteGfx_WaterGun, 0x180, ANIM_TAG_WATER_GUN}, - {gBattleAnimSpriteGfx_Punishment, 0xa00, ANIM_TAG_PUNISHMENT_BLADES}, - {gBattleAnimSpriteGfx_QuickGuard, 0x200, ANIM_TAG_QUICK_GUARD_HAND}, - {gBattleAnimSpriteGfx_ShellRight, 0x800, ANIM_TAG_SHELL_RIGHT}, - {gBattleAnimSpriteGfx_ShellLeft, 0x800, ANIM_TAG_SHELL_LEFT}, - {gBattleAnimSpriteGfx_RazorShell, 0x200, ANIM_TAG_RAZOR_SHELL}, - {gBattleAnimSpriteGfx_HydroPump, 0x200, ANIM_TAG_HYDRO_PUMP}, - {gBattleAnimSpriteGfx_Brine, 0xc00, ANIM_TAG_BRINE}, - {gBattleAnimSpriteGfx_Gear, 0x200, ANIM_TAG_GEAR}, - {gBattleAnimSpriteGfx_AssuranceHand, 0x200, ANIM_TAG_ASSURANCE_HAND}, - {gBattleAnimSpriteGfx_Fishies, 0x480, ANIM_TAG_WISHIWASHI_FISH}, - {gBattleAnimSpriteGfx_ZygardeHexes, 0x480, ANIM_TAG_ZYGARDE_HEXES}, - {gBattleAnimSpriteGfx_AuraSphere, 0x200, ANIM_TAG_AURA_SPHERE}, - {gBattleAnimSpriteGfx_OmegaStone, 0x800, ANIM_TAG_OMEGA_STONE}, - {gBattleAnimSpriteGfx_AlphaStone, 0x800, ANIM_TAG_ALPHA_STONE}, - {gBattleAnimSpriteGfx_BerryNormal, 0x400, ANIM_TAG_BERRY_NORMAL}, - {gBattleAnimSpriteGfx_BerryEaten, 0x200, ANIM_TAG_BERRY_EATEN}, - {gBattleAnimSpriteGfx_PurpleDrake, 0x800, ANIM_TAG_DRAGON_ASCENT}, - {gBattleAnimSpriteGfx_PinkDiamond, 0x40, ANIM_TAG_PINK_DIAMOND}, - {gBattleAnimSpriteGfx_SteamEruption, 0xa00, ANIM_TAG_STEAM_ERUPTION}, - {gBattleAnimSpriteGfx_Confide, 0x800, ANIM_TAG_CONFIDE}, - {gBattleAnimSpriteGfx_Arrows, 0x480, ANIM_TAG_VERTICAL_HEX}, - {NULL, 0x0, ANIM_TAG_UNAVAILABLE_1}, - {NULL, 0x0, ANIM_TAG_UNAVAILABLE_2}, - {gBattleAnimSpriteGfx_PowerTrick, 0x800, ANIM_TAG_POWER_TRICK}, - {gBattleAnimSpriteGfx_ChainLink, 0x200, ANIM_TAG_CHAIN_LINK}, - {gBattleAnimSpriteGfx_Anchor, 0x200, ANIM_TAG_ANCHOR}, - {gBattleAnimSpriteGfx_HorseshoeFist, 0x800, ANIM_TAG_HORSESHOE_SIDE_FIST}, - {gBattleAnimSpriteGfx_PurpleDrake, 0x800, ANIM_TAG_DRAGON_ASCENT_FOE}, - {gBattleAnimSpriteGfx_CraftyShield, 0x80, ANIM_TAG_CRAFTY_SHIELD}, - {gBattleAnimSpriteGfx_BlacephalonHead, 0x200, ANIM_TAG_BLACEPHALON_HEAD}, - {gBattleAnimSpriteGfx_FairyLockChains, 0x400, ANIM_TAG_FAIRY_LOCK_CHAINS}, - {gBattleAnimSpriteGfx_LightningRain, 0x700, ANIM_TAG_IONS}, - {gBattleAnimSpriteGfx_Chop, 0x200, ANIM_TAG_CHOP}, - {gBattleAnimSpriteGfx_HeartStamp, 0x400, ANIM_TAG_HEART_STAMP}, - {gBattleAnimSpriteGfx_HornLeech, 0x200, ANIM_TAG_HORN_LEECH}, - {gBattleAnimSpriteGfx_Steamroller, 0x800, ANIM_TAG_STEAMROLLER}, - {gBattleAnimSpriteGfx_HoopaHand, 0x80, ANIM_TAG_HOOPA_HAND}, - {gBattleAnimSpriteGfx_HoopaRing, 0x200, ANIM_TAG_HOOPA_RING}, - {gBattleAnimSpriteGfx_MetalBits, 0x140, ANIM_TAG_METAL_BITS}, - {gBattleAnimSpriteGfx_RocksSmall, 0x140, ANIM_TAG_SMALL_ROCK}, - {gBattleAnimSpriteGfx_SpiritShackleArrow, 0x200, ANIM_TAG_SPIRIT_ARROW}, - {gBattleAnimSpriteGfx_NecrozmaStar, 0x200, ANIM_TAG_ULTRA_BURST_SYMBOL}, - {gBattleAnimSpriteGfx_ZMoveSymbol, 0x800, ANIM_TAG_Z_MOVE_SYMBOL}, - {gBattleAnimSpriteGfx_BigRock, 0x800, ANIM_TAG_REALLY_BIG_ROCK}, - {gBattleAnimSpriteGfx_Cacoon, 0x800, ANIM_TAG_COCOON}, - {gBattleAnimSpriteGfx_Drill, 0x800, ANIM_TAG_CORKSCREW}, - {gBattleAnimSpriteGfx_GigavoltHavocSpear, 0x800, ANIM_TAG_HAVOC_SPEAR}, - {gBattleAnimSpriteGfx_PurpleDrake, 0x800, ANIM_TAG_PURPLE_DRAKE}, - {gBattleAnimSpriteGfx_MudBomb, 0x800, ANIM_TAG_MUD_BOMB}, - {gBattleAnimSpriteGfx_Branch, 0x200, ANIM_TAG_BRANCH}, - {gBattleAnimSpriteGfx_Apple, 0x200, ANIM_TAG_APPLE}, - {gBattleAnimSpriteGfx_Obstruct, 0x200, ANIM_TAG_OBSTRUCT_CROSS}, - {gBattleAnimSpriteGfx_PoisonColumn, 0x2000, ANIM_TAG_POISON_COLUMN}, - {gBattleAnimSpriteGfx_PoisonColumn, 0x2000, ANIM_TAG_GARBAGE_COLUMN}, - {gBattleAnimSpriteGfx_LargeSpike, 0x1000, ANIM_TAG_LARGE_SPIKE}, - {gBattleAnimSpriteGfx_DragonPulseRing, 0x200, ANIM_TAG_DRAGON_PULSE_RING}, - {gBattleAnimSpriteGfx_StonePillar, 0x2000, ANIM_TAG_STONE_PILLAR}, - {gBattleAnimSpriteGfx_Mushroom, 0x800, ANIM_TAG_MUSHROOM}, - {gBattleAnimSpriteGfx_GoldenApple, 0x800, ANIM_TAG_GOLDEN_APPLE}, - {gBattleAnimSpriteGfx_IceRock, 0x2800, ANIM_TAG_ICE_ROCK}, - {gBattleAnimSpriteGfx_Tornado, 0x1800, ANIM_TAG_TORNADO}, - {gBattleAnimSpriteGfx_StraightBeam, 0x180, ANIM_TAG_STRAIGHT_BEAM}, - {gBattleAnimSpriteGfx_DreepyMissile, 0x200, ANIM_TAG_DREEPY}, - {gBattleAnimSpriteGfx_IceRock, 0x1800, ANIM_TAG_ICE_ROCK_SINGLE}, - {gBattleAnimSpriteGfx_StonePillar, 0x1800, ANIM_TAG_STONE_PILLAR_MULTI}, - {gBattleAnimSpriteGfx_AlphaSymbol, 0x0200, ANIM_TAG_ALPHA_SYMBOL}, - {gBattleAnimSpriteGfx_OmegaSymbol, 0x0200, ANIM_TAG_OMEGA_SYMBOL}, - {gBattleAnimSpriteGfx_Orbs, 0x0180, ANIM_TAG_STEEL_BEAM}, - {gBattleAnimSpriteGfx_AuraSphere, 0x200, ANIM_TAG_POLTERGEIST}, -}; - -const struct CompressedSpritePalette gBattleAnimPaletteTable[] = -{ - {gBattleAnimSpritePal_Bone, ANIM_TAG_BONE}, - {gBattleAnimSpritePal_Spark, ANIM_TAG_SPARK}, - {gBattleAnimSpritePal_Pencil, ANIM_TAG_PENCIL}, - {gBattleAnimSpritePal_AirWave, ANIM_TAG_AIR_WAVE}, - {gBattleAnimSpritePal_Orb, ANIM_TAG_ORB}, -#if B_NEW_SWORD_PARTICLE - {gBattleAnimSpritePal_NewSword, ANIM_TAG_SWORD}, -#else - {gBattleAnimSpritePal_Sword, ANIM_TAG_SWORD}, -#endif -#if B_NEW_LEECH_SEED_PARTICLE - {gBattleAnimSpritePal_NewLeechSeed, ANIM_TAG_SEED}, -#else - {gBattleAnimSpritePal_Seed, ANIM_TAG_SEED}, -#endif - {gBattleAnimSpritePal_Explosion6, ANIM_TAG_EXPLOSION_6}, - {gBattleAnimSpritePal_PinkOrb, ANIM_TAG_PINK_ORB}, - {gBattleAnimSpritePal_Gust, ANIM_TAG_GUST}, - {gBattleAnimSpritePal_IceCube, ANIM_TAG_ICE_CUBE}, - {gBattleAnimSpritePal_Spark2, ANIM_TAG_SPARK_2}, - {gBattleAnimSpritePal_Orange, ANIM_TAG_ORANGE}, - {gBattleAnimSpritePal_YellowBall, ANIM_TAG_YELLOW_BALL}, - {gBattleAnimSpritePal_LockOn, ANIM_TAG_LOCK_ON}, - {gBattleAnimSpritePal_TiedBag, ANIM_TAG_TIED_BAG}, - {gBattleAnimSpritePal_BlackSmoke, ANIM_TAG_BLACK_SMOKE}, - {gBattleAnimSpritePal_BlackSmoke, ANIM_TAG_BLACK_BALL}, - {gBattleAnimSpritePal_Conversion, ANIM_TAG_CONVERSION}, - {gBattleAnimSpritePal_Glass, ANIM_TAG_GLASS}, -#if B_NEW_HORN_ATTACK_PARTICLE - {gBattleAnimSpritePal_NewHornHit, ANIM_TAG_HORN_HIT}, -#else - {gBattleAnimSpritePal_HornHit, ANIM_TAG_HORN_HIT}, -#endif - {gBattleAnimSpritePal_Hit, ANIM_TAG_HIT}, - {gBattleAnimSpritePal_Hit2, ANIM_TAG_HIT_2}, - {gBattleAnimSpritePal_BlueShards, ANIM_TAG_BLUE_SHARDS}, - {gBattleAnimSpritePal_ClosingEye, ANIM_TAG_CLOSING_EYE}, - {gBattleAnimSpritePal_WavingHand, ANIM_TAG_WAVING_HAND}, - {gBattleAnimSpritePal_HitDuplicate, ANIM_TAG_HIT_DUPLICATE}, - {gBattleAnimSpritePal_Leer, ANIM_TAG_LEER}, - {gBattleAnimSpritePal_BlueBurst, ANIM_TAG_BLUE_BURST}, -#if B_NEW_EMBER_PARTICLES - {gBattleAnimSpritePal_NewEmbers, ANIM_TAG_SMALL_EMBER}, -#else - {gBattleAnimSpritePal_SmallEmber, ANIM_TAG_SMALL_EMBER}, -#endif - {gBattleAnimSpritePal_GraySmoke, ANIM_TAG_GRAY_SMOKE}, - {gBattleAnimSpritePal_BlueStar, ANIM_TAG_BLUE_STAR}, - {gBattleAnimSpritePal_BubbleBurst, ANIM_TAG_BUBBLE_BURST}, - {gBattleAnimSpritePal_Fire, ANIM_TAG_FIRE}, - {gBattleAnimSpritePal_Fire, ANIM_TAG_SPINNING_FIRE}, - {gBattleAnimSpritePal_Fire, ANIM_TAG_FIRE_PLUME}, - {gBattleAnimSpritePal_Lightning2, ANIM_TAG_LIGHTNING_2}, - {gBattleAnimSpritePal_Lightning2, ANIM_TAG_LIGHTNING}, - {gBattleAnimSpritePal_ClawSlash2, ANIM_TAG_CLAW_SLASH_2}, - {gBattleAnimSpritePal_ClawSlash, ANIM_TAG_CLAW_SLASH}, - {gBattleAnimSpritePal_ClawSlash2, ANIM_TAG_SCRATCH_3}, - {gBattleAnimSpritePal_ClawSlash2, ANIM_TAG_SCRATCH_2}, - {gBattleAnimSpritePal_BubbleBurst2, ANIM_TAG_BUBBLE_BURST_2}, - {gBattleAnimSpritePal_IceChunk, ANIM_TAG_ICE_CHUNK}, - {gBattleAnimSpritePal_Glass2, ANIM_TAG_GLASS_2}, - {gBattleAnimSpritePal_PinkHeart2, ANIM_TAG_PINK_HEART_2}, - {gBattleAnimSpritePal_SapDrip, ANIM_TAG_SAP_DRIP}, - {gBattleAnimSpritePal_SapDrip2, ANIM_TAG_SAP_DRIP}, - {gBattleAnimSpritePal_Sparkle1, ANIM_TAG_SPARKLE_1}, - {gBattleAnimSpritePal_Sparkle2, ANIM_TAG_SPARKLE_2}, - {gBattleAnimSpritePal_HumanoidFoot, ANIM_TAG_HUMANOID_FOOT}, - {gBattleAnimSpritePal_HumanoidFoot, ANIM_TAG_MONSTER_FOOT}, - {gBattleAnimSpritePal_HumanoidFoot, ANIM_TAG_HUMANOID_HAND}, - {gBattleAnimSpritePal_HitDuplicate, ANIM_TAG_NOISE_LINE}, - {gBattleAnimSpritePal_YellowUnk, ANIM_TAG_YELLOW_UNK}, - {gBattleAnimSpritePal_HumanoidFoot, ANIM_TAG_RED_FIST}, - {gBattleAnimSpritePal_SlamHit, ANIM_TAG_SLAM_HIT}, - {gBattleAnimSpritePal_Ring, ANIM_TAG_RING}, -#if NEW_ROCKS_PARTICLE - {gBattleAnimSpritePal_NewRocks, ANIM_TAG_ROCKS}, -#else - {gBattleAnimSpritePal_Rocks, ANIM_TAG_ROCKS}, -#endif - {gBattleAnimSpritePal_Z, ANIM_TAG_Z}, - {gBattleAnimSpritePal_YellowUnk2, ANIM_TAG_YELLOW_UNK_2}, - {gBattleAnimSpritePal_AirSlash, ANIM_TAG_AIR_SLASH}, - {gBattleAnimSpritePal_SpinningGreenOrbs, ANIM_TAG_SPINNING_GREEN_ORBS}, -#if B_NEW_LEAF_PARTICLE - {gBattleAnimSpritePal_NewLeaf, ANIM_TAG_LEAF}, -#else - {gBattleAnimSpritePal_Leaf, ANIM_TAG_LEAF}, -#endif - {gBattleAnimSpritePal_Finger, ANIM_TAG_FINGER}, - {gBattleAnimSpritePal_PoisonPowder, ANIM_TAG_POISON_POWDER}, - {gBattleAnimSpritePal_BrownTriangle, ANIM_TAG_BROWN_TRIANGLE}, - {gBattleAnimSpritePal_SleepPowder, ANIM_TAG_SLEEP_POWDER}, - {gBattleAnimSpritePal_StunSpore, ANIM_TAG_STUN_SPORE}, - {gBattleAnimSpritePal_PoisonPowder, ANIM_TAG_POWDER}, - {gBattleAnimSpritePal_Sparkle3, ANIM_TAG_SPARKLE_3}, - {gBattleAnimSpritePal_Sparkle3, ANIM_TAG_SPARKLE_4}, - {gBattleAnimSpritePal_MusicNotes, ANIM_TAG_MUSIC_NOTES}, - {gBattleAnimSpritePal_Duck, ANIM_TAG_DUCK}, - {gBattleAnimSpritePal_MudSand, ANIM_TAG_MUD_SAND}, - {gBattleAnimSpritePal_Alert, ANIM_TAG_ALERT}, - {gBattleAnimSpritePal_BlueFlames, ANIM_TAG_BLUE_FLAMES}, - {gBattleAnimSpritePal_BlueFlames, ANIM_TAG_BLUE_FLAMES_2}, - {gBattleAnimSpritePal_Shock4, ANIM_TAG_SHOCK_4}, - {gBattleAnimSpritePal_Shock4, ANIM_TAG_SHOCK}, - {gBattleAnimSpritePal_Bell2, ANIM_TAG_BELL_2}, - {gBattleAnimSpritePal_PinkGlove, ANIM_TAG_PINK_GLOVE}, - {gBattleAnimSpritePal_BlueLines, ANIM_TAG_BLUE_LINES}, - {gBattleAnimSpritePal_Impact3, ANIM_TAG_IMPACT_3}, - {gBattleAnimSpritePal_Impact2, ANIM_TAG_IMPACT_2}, - {gBattleAnimSpritePal_Reticle, ANIM_TAG_RETICLE}, - {gBattleAnimSpritePal_Breath, ANIM_TAG_BREATH}, - {gBattleAnimSpritePal_Anger, ANIM_TAG_ANGER}, - {gBattleAnimSpritePal_Snowball, ANIM_TAG_SNOWBALL}, - {gBattleAnimSpritePal_Vine, ANIM_TAG_VINE}, - {gBattleAnimSpritePal_Sword2, ANIM_TAG_SWORD_2}, - {gBattleAnimSpritePal_Clapping, ANIM_TAG_CLAPPING}, - {gBattleAnimSpritePal_RedTube, ANIM_TAG_RED_TUBE}, - {gBattleAnimSpritePal_Amnesia, ANIM_TAG_AMNESIA}, - {gBattleAnimSpritePal_String2, ANIM_TAG_STRING_2}, - {gBattleAnimSpritePal_Pencil2, ANIM_TAG_PENCIL_2}, - {gBattleAnimSpritePal_Petal, ANIM_TAG_PETAL}, - {gBattleAnimSpritePal_BentSpoon, ANIM_TAG_BENT_SPOON}, - {gBattleAnimSpritePal_String2, ANIM_TAG_WEB}, - {gBattleAnimSpritePal_MilkBottle, ANIM_TAG_MILK_BOTTLE}, - {gBattleAnimSpritePal_Coin, ANIM_TAG_COIN}, - {gBattleAnimSpritePal_CrackedEgg, ANIM_TAG_CRACKED_EGG}, - {gBattleAnimSpritePal_CrackedEgg, ANIM_TAG_HATCHED_EGG}, - {gBattleAnimSpritePal_FreshEgg, ANIM_TAG_FRESH_EGG}, - {gBattleAnimSpritePal_Fangs, ANIM_TAG_FANGS}, - {gBattleAnimSpritePal_Explosion2, ANIM_TAG_EXPLOSION_2}, - {gBattleAnimSpritePal_Explosion2, ANIM_TAG_EXPLOSION_3}, - {gBattleAnimSpritePal_WaterDroplet, ANIM_TAG_WATER_DROPLET}, - {gBattleAnimSpritePal_WaterDroplet, ANIM_TAG_WATER_DROPLET_2}, - {gBattleAnimSpritePal_Seed2, ANIM_TAG_SEED_2}, - {gBattleAnimSpritePal_Seed2, ANIM_TAG_SPROUT}, - {gBattleAnimSpritePal_RedWand, ANIM_TAG_RED_WAND}, - {gBattleAnimSpritePal_PurpleGreenUnk, ANIM_TAG_PURPLE_GREEN_UNK}, - {gBattleAnimSpritePal_WaterColumn, ANIM_TAG_WATER_COLUMN}, - {gBattleAnimSpritePal_MudUnk, ANIM_TAG_MUD_UNK}, - {gBattleAnimSpritePal_RainDrops, ANIM_TAG_RAIN_DROPS}, - {gBattleAnimSpritePal_FurySwipes, ANIM_TAG_FURY_SWIPES}, - {gBattleAnimSpritePal_Vine2, ANIM_TAG_VINE_2}, - {gBattleAnimSpritePal_Teeth, ANIM_TAG_TEETH}, - {gBattleAnimSpritePal_Bone2, ANIM_TAG_BONE_2}, - {gBattleAnimSpritePal_WhiteBag, ANIM_TAG_WHITE_BAG}, - {gBattleAnimSpritePal_Unknown, ANIM_TAG_UNKNOWN}, - {gBattleAnimSpritePal_PurpleCoral, ANIM_TAG_PURPLE_CORAL}, - {gBattleAnimSpritePal_PurpleCoral, ANIM_TAG_PURPLE_DROPLET}, - {gBattleAnimSpritePal_Shock2, ANIM_TAG_SHOCK_2}, - {gBattleAnimSpritePal_ClosingEye2, ANIM_TAG_CLOSING_EYE_2}, - {gBattleAnimSpritePal_MetalBall, ANIM_TAG_METAL_BALL}, -#if NEW_SUBSTITUTE_PARTICLE - {gBattleAnimSpritePal_NewSubstituteFront, ANIM_TAG_MONSTER_DOLL}, -#else - {gBattleAnimSpritePal_MonsterDoll, ANIM_TAG_MONSTER_DOLL}, -#endif - {gBattleAnimSpritePal_Whirlwind, ANIM_TAG_WHIRLWIND}, - {gBattleAnimSpritePal_Whirlwind, ANIM_TAG_WHIRLWIND_2}, - {gBattleAnimSpritePal_Explosion4, ANIM_TAG_EXPLOSION_4}, - {gBattleAnimSpritePal_Explosion4, ANIM_TAG_EXPLOSION_5}, - {gBattleAnimSpritePal_Tongue, ANIM_TAG_TONGUE}, - {gBattleAnimSpritePal_Smoke, ANIM_TAG_SMOKE}, - {gBattleAnimSpritePal_Smoke, ANIM_TAG_SMOKE_2}, -#if B_NEW_IMPACT_PALETTE - {gBattleAnimSpritePal_NewImpact, ANIM_TAG_IMPACT}, -#else - {gBattleAnimSpritePal_Impact, ANIM_TAG_IMPACT}, -#endif - {gBattleAnimSpritePal_CircleImpact, ANIM_TAG_CIRCLE_IMPACT}, - {gBattleAnimSpritePal_Impact, ANIM_TAG_SCRATCH}, - {gBattleAnimSpritePal_Impact, ANIM_TAG_CUT}, -#if B_NEW_TEETH_PARTICLE - {gBattleAnimSpritePal_NewTeeth, ANIM_TAG_SHARP_TEETH}, -#else - {gBattleAnimSpritePal_SharpTeeth, ANIM_TAG_SHARP_TEETH}, -#endif - {gBattleAnimSpritePal_RainbowRings, ANIM_TAG_RAINBOW_RINGS}, - {gBattleAnimSpritePal_IceCrystals, ANIM_TAG_ICE_CRYSTALS}, - {gBattleAnimSpritePal_IceCrystals, ANIM_TAG_ICE_SPIKES}, -#if B_NEW_HANDS_FEET_PARTICLE - {gBattleAnimSpritePal_NewHandsAndFeet, ANIM_TAG_HANDS_AND_FEET}, -#else - {gBattleAnimSpritePal_HandsAndFeet, ANIM_TAG_HANDS_AND_FEET}, -#endif - {gBattleAnimSpritePal_MistCloud, ANIM_TAG_MIST_CLOUD}, - {gBattleAnimSpritePal_SharpTeeth, ANIM_TAG_CLAMP}, - {gBattleAnimSpritePal_RainDrops, ANIM_TAG_BUBBLE}, - {gBattleAnimSpritePal_Orbs, ANIM_TAG_ORBS}, - {gBattleAnimSpritePal_WaterImpact, ANIM_TAG_WATER_IMPACT}, - {gBattleAnimSpritePal_WaterImpact, ANIM_TAG_WATER_ORB}, - {gBattleAnimSpritePal_PoisonBubble, ANIM_TAG_POISON_BUBBLE}, - {gBattleAnimSpritePal_PoisonBubble, ANIM_TAG_TOXIC_BUBBLE}, -#if B_NEW_SPIKES_PARTICLE - {gBattleAnimSpritePal_NewSpikes, ANIM_TAG_SPIKES}, -#else - {gBattleAnimSpritePal_Spikes, ANIM_TAG_SPIKES}, -#endif - {gBattleAnimSpritePal_HornHit2, ANIM_TAG_HORN_HIT_2}, - {gBattleAnimSpritePal_AirWave2, ANIM_TAG_AIR_WAVE_2}, - {gBattleAnimSpritePal_SmallBubbles, ANIM_TAG_SMALL_BUBBLES}, -#if B_NEW_FLY_BUBBLE_PARTICLE - {gBattleAnimSpritePal_NewFly, ANIM_TAG_ROUND_SHADOW}, -#else - {gBattleAnimSpritePal_RoundShadow, ANIM_TAG_ROUND_SHADOW}, -#endif - {gBattleAnimSpritePal_Sunlight, ANIM_TAG_SUNLIGHT}, - {gBattleAnimSpritePal_Spore, ANIM_TAG_SPORE}, - {gBattleAnimSpritePal_Flower, ANIM_TAG_FLOWER}, - {gBattleAnimSpritePal_RazorLeaf, ANIM_TAG_RAZOR_LEAF}, - {gBattleAnimSpritePal_Needle, ANIM_TAG_NEEDLE}, - {gBattleAnimSpritePal_WhirlwindLines, ANIM_TAG_WHIRLWIND_LINES}, - {gBattleAnimSpritePal_GoldRing, ANIM_TAG_GOLD_RING}, - {gBattleAnimSpritePal_PurpleRing, ANIM_TAG_PURPLE_RING}, - {gBattleAnimSpritePal_BlueRing, ANIM_TAG_BLUE_RING}, - {gBattleAnimSpritePal_GreenLightWall, ANIM_TAG_GREEN_LIGHT_WALL}, - {gBattleAnimSpritePal_BlueLightWall, ANIM_TAG_BLUE_LIGHT_WALL}, - {gBattleAnimSpritePal_RedLightWall, ANIM_TAG_RED_LIGHT_WALL}, - {gBattleAnimSpritePal_GrayLightWall, ANIM_TAG_GRAY_LIGHT_WALL}, - {gBattleAnimSpritePal_OrangeLightWall, ANIM_TAG_ORANGE_LIGHT_WALL}, - {gBattleAnimSpritePal_BlackBall2, ANIM_TAG_BLACK_BALL_2}, - {gBattleAnimSpritePal_PurpleGasCloud, ANIM_TAG_PURPLE_GAS_CLOUD}, - {gBattleAnimSpritePal_Spark, ANIM_TAG_SPARK_H}, - {gBattleAnimSpritePal_YellowStar, ANIM_TAG_YELLOW_STAR}, - {gBattleAnimSpritePal_LargeFreshEgg, ANIM_TAG_LARGE_FRESH_EGG}, - {gBattleAnimSpritePal_ShadowBall, ANIM_TAG_SHADOW_BALL}, - {gBattleAnimSpritePal_Lick, ANIM_TAG_LICK}, - {gBattleAnimSpritePal_VoidLines, ANIM_TAG_VOID_LINES}, - {gBattleAnimSpritePal_String, ANIM_TAG_STRING}, - {gBattleAnimSpritePal_String, ANIM_TAG_WEB_THREAD}, - {gBattleAnimSpritePal_String, ANIM_TAG_SPIDER_WEB}, - {gBattleAnimSpritePal_Lightbulb, ANIM_TAG_LIGHTBULB}, - {gBattleAnimSpritePal_Slash, ANIM_TAG_SLASH}, - {gBattleAnimSpritePal_FocusEnergy, ANIM_TAG_FOCUS_ENERGY}, - {gBattleAnimSpritePal_SphereToCube, ANIM_TAG_SPHERE_TO_CUBE}, - {gBattleAnimSpritePal_Tendrils, ANIM_TAG_TENDRILS}, -#if B_NEW_MEAN_LOOK_PARTICLE - {gBattleAnimSpritePal_NewEye, ANIM_TAG_EYE}, -#else - {gBattleAnimSpritePal_Eye, ANIM_TAG_EYE}, -#endif - {gBattleAnimSpritePal_WhiteShadow, ANIM_TAG_WHITE_SHADOW}, - {gBattleAnimSpritePal_TealAlert, ANIM_TAG_TEAL_ALERT}, - {gBattleAnimSpritePal_OpeningEye, ANIM_TAG_OPENING_EYE}, - {gBattleAnimSpritePal_RoundWhiteHalo, ANIM_TAG_ROUND_WHITE_HALO}, - {gBattleAnimSpritePal_FangAttack, ANIM_TAG_FANG_ATTACK}, - {gBattleAnimSpritePal_PurpleHandOutline, ANIM_TAG_PURPLE_HAND_OUTLINE}, - {gBattleAnimSpritePal_Moon, ANIM_TAG_MOON}, - {gBattleAnimSpritePal_GreenSparkle, ANIM_TAG_GREEN_SPARKLE}, - {gBattleAnimSpritePal_Spiral, ANIM_TAG_SPIRAL}, - {gBattleAnimSpritePal_SnoreZ, ANIM_TAG_SNORE_Z}, - {gBattleAnimSpritePal_Explosion, ANIM_TAG_EXPLOSION}, - {gBattleAnimSpritePal_Nail, ANIM_TAG_NAIL}, - {gBattleAnimSpritePal_GhostlySpirit, ANIM_TAG_GHOSTLY_SPIRIT}, - {gBattleAnimSpritePal_WarmRock, ANIM_TAG_WARM_ROCK}, - {gBattleAnimSpritePal_BreakingEgg, ANIM_TAG_BREAKING_EGG}, - {gBattleAnimSpritePal_ThinRing, ANIM_TAG_THIN_RING}, - {gBattleAnimSpritePal_PunchImpact, ANIM_TAG_PUNCH_IMPACT}, - {gBattleAnimSpritePal_Bell, ANIM_TAG_BELL}, - {gBattleAnimSpritePal_MusicNotes2, ANIM_TAG_MUSIC_NOTES_2}, - {gBattleAnimSpritePal_SpeedDust, ANIM_TAG_SPEED_DUST}, - {gBattleAnimSpritePal_BlueLightWall, ANIM_TAG_TORN_METAL}, - {gBattleAnimSpritePal_ThoughtBubble, ANIM_TAG_THOUGHT_BUBBLE}, - {gBattleAnimSpritePal_MagentaHeart, ANIM_TAG_MAGENTA_HEART}, - {gBattleAnimSpritePal_ElectricOrbs, ANIM_TAG_ELECTRIC_ORBS}, - {gBattleAnimSpritePal_ElectricOrbs, ANIM_TAG_CIRCLE_OF_LIGHT}, - {gBattleAnimSpritePal_ElectricOrbs, ANIM_TAG_ELECTRICITY}, - {gBattleAnimSpritePal_Finger, ANIM_TAG_FINGER_2}, - {gBattleAnimSpritePal_MovementWaves, ANIM_TAG_MOVEMENT_WAVES}, - {gBattleAnimSpritePal_RedHeart, ANIM_TAG_RED_HEART}, - {gBattleAnimSpritePal_RedOrb, ANIM_TAG_RED_ORB}, - {gBattleAnimSpritePal_EyeSparkle, ANIM_TAG_EYE_SPARKLE}, - {gBattleAnimSpritePal_PinkHeart, ANIM_TAG_PINK_HEART}, - {gBattleAnimSpritePal_Angel, ANIM_TAG_ANGEL}, - {gBattleAnimSpritePal_Devil, ANIM_TAG_DEVIL}, - {gBattleAnimSpritePal_Swipe, ANIM_TAG_SWIPE}, - {gBattleAnimSpritePal_Roots, ANIM_TAG_ROOTS}, - {gBattleAnimSpritePal_ItemBag, ANIM_TAG_ITEM_BAG}, - {gBattleAnimSpritePal_JaggedMusicNote, ANIM_TAG_JAGGED_MUSIC_NOTE}, -#if B_NEW_BATON_PASS_BALL_PARTICLE - {gBattleAnimSpritePal_NewPokeball, ANIM_TAG_POKEBALL}, -#else - {gBattleAnimSpritePal_Pokeball, ANIM_TAG_POKEBALL}, -#endif - {gBattleAnimSpritePal_Pokeball, ANIM_TAG_SPOTLIGHT}, - {gBattleAnimSpritePal_LetterZ, ANIM_TAG_LETTER_Z}, - {gBattleAnimSpritePal_RapidSpin, ANIM_TAG_RAPID_SPIN}, - {gBattleAnimSpritePal_TriAttackTriangle, ANIM_TAG_TRI_ATTACK_TRIANGLE}, - {gBattleAnimSpritePal_WispOrb, ANIM_TAG_WISP_ORB}, - {gBattleAnimSpritePal_WispOrb, ANIM_TAG_WISP_FIRE}, - {gBattleAnimSpritePal_GoldStars, ANIM_TAG_GOLD_STARS}, - {gBattleAnimSpritePal_EclipsingOrb, ANIM_TAG_ECLIPSING_ORB}, - {gBattleAnimSpritePal_GrayOrb, ANIM_TAG_GRAY_ORB}, - {gBattleAnimSpritePal_BlueOrb, ANIM_TAG_BLUE_ORB}, - {gBattleAnimSpritePal_RedOrb2, ANIM_TAG_RED_ORB_2}, - {gBattleAnimSpritePal_PinkPetal, ANIM_TAG_PINK_PETAL}, - {gBattleAnimSpritePal_PainSplit, ANIM_TAG_PAIN_SPLIT}, - {gBattleAnimSpritePal_Confetti, ANIM_TAG_CONFETTI}, -#if B_NEW_MORNING_SUN_STAR_PARTICLE - {gBattleAnimSpritePal_NewGreenStar, ANIM_TAG_GREEN_STAR}, -#else - {gBattleAnimSpritePal_GreenStar, ANIM_TAG_GREEN_STAR}, -#endif - {gBattleAnimSpritePal_PinkCloud, ANIM_TAG_PINK_CLOUD}, - {gBattleAnimSpritePal_SweatDrop, ANIM_TAG_SWEAT_DROP}, - {gBattleAnimSpritePal_GuardRing, ANIM_TAG_GUARD_RING}, - {gBattleAnimSpritePal_PurpleScratch, ANIM_TAG_PURPLE_SCRATCH}, - {gBattleAnimSpritePal_PurpleScratch, ANIM_TAG_PURPLE_SWIPE}, - {gBattleAnimSpritePal_Finger, ANIM_TAG_TAG_HAND}, - {gBattleAnimSpritePal_SmallRedEye, ANIM_TAG_SMALL_RED_EYE}, - {gBattleAnimSpritePal_HollowOrb, ANIM_TAG_HOLLOW_ORB}, - {gBattleAnimSpritePal_HollowOrb, ANIM_TAG_X_SIGN}, - {gBattleAnimSpritePal_BluegreenOrb, ANIM_TAG_BLUEGREEN_ORB}, - {gBattleAnimSpritePal_PawPrint, ANIM_TAG_PAW_PRINT}, - {gBattleAnimSpritePal_PurpleFlame, ANIM_TAG_PURPLE_FLAME}, - {gBattleAnimSpritePal_RedBall, ANIM_TAG_RED_BALL}, - {gBattleAnimSpritePal_SmellingsaltEffect, ANIM_TAG_SMELLINGSALT_EFFECT}, - {gBattleAnimSpritePal_Meteor, ANIM_TAG_METEOR}, - {gBattleAnimSpritePal_FlatRock, ANIM_TAG_FLAT_ROCK}, - {gBattleAnimSpritePal_MagnifyingGlass, ANIM_TAG_MAGNIFYING_GLASS}, - {gBattleAnimSpritePal_BrownOrb, ANIM_TAG_BROWN_ORB}, - {gBattleAnimSpritePal_MetalSoundWaves, ANIM_TAG_METAL_SOUND_WAVES}, - {gBattleAnimSpritePal_FlyingDirt, ANIM_TAG_FLYING_DIRT}, - {gBattleAnimSpritePal_IcicleSpear, ANIM_TAG_ICICLE_SPEAR}, - {gBattleAnimSpritePal_Hail, ANIM_TAG_HAIL}, - {gBattleAnimSpritePal_GlowyRedOrb, ANIM_TAG_GLOWY_RED_ORB}, - {gBattleAnimSpritePal_GlowyGreenOrb, ANIM_TAG_GLOWY_GREEN_ORB}, - {gBattleAnimSpritePal_GreenSpike, ANIM_TAG_GREEN_SPIKE}, - {gBattleAnimSpritePal_WhiteCircleOfLight, ANIM_TAG_WHITE_CIRCLE_OF_LIGHT}, - {gBattleAnimSpritePal_GlowyBlueOrb, ANIM_TAG_GLOWY_BLUE_ORB}, - {gBattleAnimSpritePal_Pokeblock, ANIM_TAG_POKEBLOCK}, - {gBattleAnimSpritePal_WhiteFeather, ANIM_TAG_WHITE_FEATHER}, - {gBattleAnimSpritePal_Sparkle6, ANIM_TAG_SPARKLE_6}, - {gBattleAnimSpritePal_Splash, ANIM_TAG_SPLASH}, - {gBattleAnimSpritePal_Splash, ANIM_TAG_SWEAT_BEAD}, - {gBattleAnimSpritePal_Gem1, ANIM_TAG_GEM_1}, - {gBattleAnimSpritePal_Gem1, ANIM_TAG_GEM_2}, - {gBattleAnimSpritePal_Gem1, ANIM_TAG_GEM_3}, - {gBattleAnimSpritePal_SlamHit2, ANIM_TAG_SLAM_HIT_2}, - {gBattleAnimSpritePal_Recycle, ANIM_TAG_RECYCLE}, - {gBattleAnimSpritePal_RedParticles, ANIM_TAG_RED_PARTICLES}, - {gBattleAnimSpritePal_Protect, ANIM_TAG_PROTECT}, - {gBattleAnimSpritePal_DirtMound, ANIM_TAG_DIRT_MOUND}, - {gBattleAnimSpritePal_Shock3, ANIM_TAG_SHOCK_3}, - {gBattleAnimSpritePal_WeatherBall, ANIM_TAG_WEATHER_BALL}, - {gBattleAnimSpritePal_Bird, ANIM_TAG_BIRD}, - {gBattleAnimSpritePal_CrossImpact, ANIM_TAG_CROSS_IMPACT}, - {gBattleAnimSpritePal_Slash2, ANIM_TAG_SLASH_2}, - {gBattleAnimSpritePal_WhipHit, ANIM_TAG_WHIP_HIT}, - {gBattleAnimSpritePal_BlueRing2, ANIM_TAG_BLUE_RING_2}, - {gBattleAnimSpritePal_WhiteStreak, ANIM_TAG_WHITE_STREAK}, - {gBattleAnimSpritePal_PurpleJab, ANIM_TAG_PURPLE_JAB}, - //new particles - {gBattleAnimSpritePal_ToxicSpikes, ANIM_TAG_TOXIC_SPIKES}, - {gBattleAnimSpritePal_EnergyBall, ANIM_TAG_ENERGY_BALL}, - {gBattleAnimSpritePal_SeedBrown, ANIM_TAG_SEED_BROWN}, - {gBattleAnimSpritePal_Feint, ANIM_TAG_FEINT}, - {gBattleAnimSpritePal_MegaStone, ANIM_TAG_MEGA_STONE}, - {gBattleAnimSpritePal_MegaSymbol, ANIM_TAG_MEGA_SYMBOL}, - {gBattleAnimSpritePal_MegaParticles, ANIM_TAG_MEGA_PARTICLES}, - {gBattleAnimSpritePal_TrumpCard, ANIM_TAG_TRUMP_CARD}, - {gBattleAnimSpritePal_TrumpCardParticles, ANIM_TAG_TRUMP_CARD_PARTICLES}, - {gBattleAnimSpritePal_Acupressure, ANIM_TAG_ACUPRESSURE}, - {gBattleAnimSpritePal_WringOut, ANIM_TAG_WRING_OUT}, - {gBattleAnimSpritePal_ColoredOrbs, ANIM_TAG_COLORED_ORBS}, - {gBattleAnimSpritePal_WorrySeed, ANIM_TAG_WORRY_SEED}, - {gBattleAnimSpritePal_SmallCloud, ANIM_TAG_SMALL_CLOUD}, - {gBattleAnimSpritePal_AttackOrder, ANIM_TAG_ATTACK_ORDER}, - {gBattleAnimSpritePal_DragonPulse, ANIM_TAG_DRAGON_PULSE}, - {gBattleAnimSpritePal_WoodHammer, ANIM_TAG_WOOD_HAMMER}, - {gBattleAnimSpritePal_PsychoCut, ANIM_TAG_PSYCHO_CUT}, - {gBattleAnimSpritePal_PowerGem, ANIM_TAG_POWER_GEM}, - {gBattleAnimSpritePal_StoneEdge, ANIM_TAG_STONE_EDGE}, - {gBattleAnimSpritePal_StealthRock, ANIM_TAG_STEALTH_ROCK}, - {gBattleAnimSpritePal_PoisonJab, ANIM_TAG_POISON_JAB}, - {gBattleAnimSpritePal_Vine, ANIM_TAG_GREEN_POISON_BUBBLE}, - {gBattleAnimSpritePal_FlashCannonBall, ANIM_TAG_FLASH_CANNON_BALL}, - {gBattleAnimSpritePal_WaterGun, ANIM_TAG_WATER_GUN}, - {gBattleAnimSpritePal_Punishment, ANIM_TAG_PUNISHMENT_BLADES}, - {gBattleAnimSpritePal_QuickGuard, ANIM_TAG_QUICK_GUARD_HAND}, - {gBattleAnimSpritePal_ShellLeft, ANIM_TAG_SHELL_RIGHT}, - {gBattleAnimSpritePal_ShellLeft, ANIM_TAG_SHELL_LEFT}, - {gBattleAnimSpritePal_RazorShell, ANIM_TAG_RAZOR_SHELL}, - {gBattleAnimSpritePal_HydroPump, ANIM_TAG_HYDRO_PUMP}, - {gBattleAnimSpritePal_Brine, ANIM_TAG_BRINE}, - {gBattleAnimSpritePal_Gear, ANIM_TAG_GEAR}, - {gBattleAnimSpritePal_AssuranceHand, ANIM_TAG_ASSURANCE_HAND}, - {gBattleAnimSpritePal_Fishies, ANIM_TAG_WISHIWASHI_FISH}, - {gBattleAnimSpritePal_ZygardeHexes, ANIM_TAG_ZYGARDE_HEXES}, - {gBattleAnimSpritePal_AuraSphere, ANIM_TAG_AURA_SPHERE}, - {gBattleAnimSpritePal_OmegaStone, ANIM_TAG_OMEGA_STONE}, - {gBattleAnimSpritePal_AlphaStone, ANIM_TAG_ALPHA_STONE}, - {gBattleAnimSpritePal_BerryNormal, ANIM_TAG_BERRY_NORMAL}, - {gBattleAnimSpritePal_SpacialRendSlices, ANIM_TAG_BERRY_EATEN}, - {gBattleAnimSpritePal_GreenDrake, ANIM_TAG_DRAGON_ASCENT}, - {gBattleAnimSpritePal_PinkDiamond, ANIM_TAG_PINK_DIAMOND}, - {gBattleAnimSpritePal_SteamEruption, ANIM_TAG_STEAM_ERUPTION}, - {gBattleAnimSpritePal_Confide, ANIM_TAG_CONFIDE}, - {gBattleAnimSpritePal_FusionFlare, ANIM_TAG_VERTICAL_HEX}, - {NULL, ANIM_TAG_UNAVAILABLE_1}, - {NULL, ANIM_TAG_UNAVAILABLE_2}, - {gBattleAnimSpritePal_PowerTrick, ANIM_TAG_POWER_TRICK}, - {gBattleAnimSpritePal_ChainLink, ANIM_TAG_CHAIN_LINK}, - {gBattleAnimSpritePal_NaturalGiftRing, ANIM_TAG_ANCHOR}, - {gBattleAnimSpritePal_HorseshoeFist, ANIM_TAG_HORSESHOE_SIDE_FIST}, - {gBattleAnimSpritePal_AvalancheRocks, ANIM_TAG_DRAGON_ASCENT_FOE}, - {gBattleAnimSpritePal_CraftyShield, ANIM_TAG_CRAFTY_SHIELD}, - {gBattleAnimSpritePal_BlacephalonHead, ANIM_TAG_BLACEPHALON_HEAD}, - {gBattleAnimSpritePal_DracoMeteor, ANIM_TAG_FAIRY_LOCK_CHAINS}, - {gBattleAnimSpritePal_LightningRain, ANIM_TAG_IONS}, - {gBattleAnimSpritePal_Chop, ANIM_TAG_CHOP}, - [ANIM_TAG_HEART_STAMP - ANIM_SPRITES_START] = {gBattleAnimSpritePal_HeartStamp, ANIM_TAG_HEART_STAMP}, - {gBattleAnimSpritePal_HornLeech, ANIM_TAG_HORN_LEECH}, - {gBattleAnimSpritePal_Steamroller, ANIM_TAG_STEAMROLLER}, - {gBattleAnimSpritePal_HoopaHand, ANIM_TAG_HOOPA_HAND}, - {gBattleAnimSpritePal_HoopaRing, ANIM_TAG_HOOPA_RING}, - {gBattleAnimSpritePal_BlueFlare, ANIM_TAG_METAL_BITS}, - {gBattleAnimSpritePal_NewRocks, ANIM_TAG_SMALL_ROCK}, - {gBattleAnimSpritePal_SpiritShackleArrow, ANIM_TAG_SPIRIT_ARROW}, - {gBattleAnimSpritePal_NecrozmaStar, ANIM_TAG_ULTRA_BURST_SYMBOL}, - {gBattleAnimSpritePal_ZMoveSymbol, ANIM_TAG_Z_MOVE_SYMBOL}, - {gBattleAnimSpritePal_BigRock, ANIM_TAG_REALLY_BIG_ROCK}, - {gBattleAnimSpritePal_Cacoon, ANIM_TAG_COCOON}, - {gBattleAnimSpritePal_Drill, ANIM_TAG_CORKSCREW}, - {gBattleAnimSpritePal_GigavoltHavocSpear, ANIM_TAG_HAVOC_SPEAR}, - {gBattleAnimSpritePal_PurpleDrake, ANIM_TAG_PURPLE_DRAKE}, - {gBattleAnimSpritePal_MudBomb, ANIM_TAG_MUD_BOMB}, - {gBattleAnimSpritePal_Branch, ANIM_TAG_BRANCH}, - {gBattleAnimSpritePal_Apple, ANIM_TAG_APPLE}, - {gBattleAnimSpritePal_Obstruct, ANIM_TAG_OBSTRUCT_CROSS}, - {gBattleAnimSpritePal_PoisonColumn, ANIM_TAG_POISON_COLUMN}, - {gBattleAnimSpritePal_GarbagePoisonPillar, ANIM_TAG_GARBAGE_COLUMN}, - {gBattleAnimSpritePal_LargeSpike, ANIM_TAG_LARGE_SPIKE}, - {gBattleAnimSpritePal_DragonPulseRing, ANIM_TAG_DRAGON_PULSE_RING}, - {gBattleAnimSpritePal_StonePillar, ANIM_TAG_STONE_PILLAR}, - {gBattleAnimSpritePal_Mushroom, ANIM_TAG_MUSHROOM}, - {gBattleAnimSpritePal_GoldenApple, ANIM_TAG_GOLDEN_APPLE}, - {gBattleAnimSpritePal_IceRock, ANIM_TAG_ICE_ROCK}, - {gBattleAnimSpritePal_Tornado, ANIM_TAG_TORNADO}, - {gBattleAnimSpritePal_StraightBeam, ANIM_TAG_STRAIGHT_BEAM}, - {gBattleAnimSpritePal_DreepyMissile, ANIM_TAG_DREEPY}, - {gBattleAnimSpritePal_IceRock, ANIM_TAG_ICE_ROCK_SINGLE}, - {gBattleAnimSpritePal_StonePillar, ANIM_TAG_STONE_PILLAR_MULTI}, - {gBattleAnimSpritePal_AlphaSymbol, ANIM_TAG_ALPHA_SYMBOL}, - {gBattleAnimSpritePal_OmegaSymbol, ANIM_TAG_OMEGA_SYMBOL}, - {gBattleAnimSpritePal_SteelBeam, ANIM_TAG_STEEL_BEAM}, - {gBattleAnimSpritePal_Poltergeist, ANIM_TAG_POLTERGEIST}, -}; - -const struct BattleAnimBackground gBattleAnimBackgroundTable[] = -{ - [BG_NONE] = {gBattleAnimBgImage_Dark, gBattleAnimBgPalette_Dark, gBattleAnimBgTilemap_Dark}, - [BG_DARK] = {gBattleAnimBgImage_Dark, gBattleAnimBgPalette_Dark, gBattleAnimBgTilemap_Dark}, - [BG_GHOST] = {gBattleAnimBgImage_Ghost, gBattleAnimBgPalette_Ghost, gBattleAnimBgTilemap_Ghost}, - [BG_PSYCHIC] = {gBattleAnimBgImage_Psychic, gBattleAnimBgPalette_Psychic, gBattleAnimBgTilemap_Psychic}, - [BG_IMPACT_OPPONENT] = {gBattleAnimBgImage_Impact, gBattleAnimBgPalette_Impact, gBattleAnimBgTilemap_ImpactOpponent}, - [BG_IMPACT_PLAYER] = {gBattleAnimBgImage_Impact, gBattleAnimBgPalette_Impact, gBattleAnimBgTilemap_ImpactPlayer}, - [BG_IMPACT_CONTESTS] = {gBattleAnimBgImage_Impact, gBattleAnimBgPalette_Impact, gBattleAnimBgTilemap_ImpactContests}, - [BG_DRILL] = {gBattleAnimBgImage_Drill, gBattleAnimBgPalette_Drill, gBattleAnimBgTilemap_Drill}, - [BG_DRILL_CONTESTS] = {gBattleAnimBgImage_Drill, gBattleAnimBgPalette_Drill, gBattleAnimBgTilemap_DrillContests}, - [BG_HIGHSPEED_OPPONENT] = {gBattleAnimBgImage_Highspeed, gBattleAnimBgPalette_Highspeed, gBattleAnimBgTilemap_HighspeedOpponent}, - [BG_HIGHSPEED_PLAYER] = {gBattleAnimBgImage_Highspeed, gBattleAnimBgPalette_Highspeed, gBattleAnimBgTilemap_HighspeedPlayer}, - [BG_THUNDER] = {gBattleAnimBgImage_Thunder, gBattleAnimBgPalette_Thunder, gBattleAnimBgTilemap_Thunder}, - [BG_GUILLOTINE_OPPONENT] = {gBattleAnimBgImage_Guillotine, gBattleAnimBgPalette_Guillotine, gBattleAnimBgTilemap_GuillotineOpponent}, - [BG_GUILLOTINE_PLAYER] = {gBattleAnimBgImage_Guillotine, gBattleAnimBgPalette_Guillotine, gBattleAnimBgTilemap_GuillotinePlayer}, - [BG_GUILLOTINE_CONTESTS] = {gBattleAnimBgImage_Guillotine, gBattleAnimBgPalette_Guillotine, gBattleAnimBgTilemap_GuillotineContests}, - [BG_ICE] = {gBattleAnimBgImage_Ice, gBattleAnimBgPalette_Ice, gBattleAnimBgTilemap_Ice}, - [BG_COSMIC] = {gBattleAnimBgImage_Cosmic, gBattleAnimBgPalette_Cosmic, gBattleAnimBgTilemap_Cosmic}, - [BG_IN_AIR] = {gBattleAnimBgImage_InAir, gBattleAnimBgPalette_InAir, gBattleAnimBgTilemap_InAir}, - [BG_SKY] = {gBattleAnimBgImage_Drill, gBattleAnimBgPalette_Sky, gBattleAnimBgTilemap_Drill}, - [BG_SKY_CONTESTS] = {gBattleAnimBgImage_Drill, gBattleAnimBgPalette_Sky, gBattleAnimBgTilemap_DrillContests}, - [BG_AURORA] = {gBattleAnimBgImage_Aurora, gBattleAnimBgPalette_Aurora, gBattleAnimBgTilemap_Aurora}, - [BG_FISSURE] = {gBattleAnimBgImage_Fissure, gBattleAnimBgPalette_Fissure, gBattleAnimBgTilemap_Fissure}, - [BG_BUG_OPPONENT] = {gBattleAnimBgImage_Highspeed, gBattleAnimBgPalette_Bug, gBattleAnimBgTilemap_HighspeedOpponent}, - [BG_BUG_PLAYER] = {gBattleAnimBgImage_Highspeed, gBattleAnimBgPalette_Bug, gBattleAnimBgTilemap_HighspeedPlayer}, - [BG_SOLAR_BEAM_OPPONENT] = {gBattleAnimBgImage_Impact, gBattleAnimBgPalette_SolarBeam, gBattleAnimBgTilemap_ImpactOpponent}, - [BG_SOLAR_BEAM_PLAYER] = {gBattleAnimBgImage_Impact, gBattleAnimBgPalette_SolarBeam, gBattleAnimBgTilemap_ImpactPlayer}, - [BG_SOLAR_BEAM_CONTESTS] = {gBattleAnimBgImage_Impact, gBattleAnimBgPalette_SolarBeam, gBattleAnimBgTilemap_ImpactContests}, - //new bgs - [BG_MAGMA_STORM] = {gBattleAnimBgImage_InAir, gBattleAnimBgPalette_MagmaStorm, gBattleAnimBgTilemap_InAir}, - [BG_GIGA_IMPACT_OPPONENT] = {gBattleAnimBgImage_GigaImpact, gBattleAnimBgPalette_GigaImpact, gBattleAnimBgTilemap_GigaImpactOpponent}, - [BG_GIGA_IMPACT_PLAYER] = {gBattleAnimBgImage_GigaImpact, gBattleAnimBgPalette_GigaImpact, gBattleAnimBgTilemap_GigaImpactPlayer}, - [BG_GIGA_IMPACT_CONTEST] = {gBattleAnimBgImage_GigaImpact, gBattleAnimBgPalette_GigaImpact, gBattleAnimBgTilemap_GigaImpactContest}, - [BG_TRICK_ROOM] = {gBattleAnimBgImage_TrickRoom, gBattleAnimBgPalette_TrickRoom, gBattleAnimBgTilemap_TrickRoom}, - [BG_ROCK_WRECKER] = {gBattleAnimBgImage_Hurricane, gBattleAnimBgPalette_RockWrecker, gBattleAnimBgTilemap_Hurricane}, - [BG_SPACIAL_REND_ON_OPPONENT] = {gBattleAnimBgImage_SpacialRend, gBattleAnimBgPalette_SpacialRend, gBattleAnimBgTilemap_GigaImpactOpponent}, - [BG_SPACIAL_REND_ON_PLAYER] = {gBattleAnimBgImage_SpacialRend, gBattleAnimBgPalette_SpacialRend, gBattleAnimBgTilemap_GigaImpactPlayer}, - [BG_DARK_VOID] = {gBattleAnimBgImage_Waterfall, gBattleAnimBgPalette_DarkVoid, gBattleAnimBgTilemap_DarkVoid}, - [BG_WATER] = {gBattleAnimBgImage_HydroPump, gBattleAnimBgPalette_HydroPump, gBattleAnimBgTilemap_HydroPump}, - [BG_NIGHTMARE] = {gBattleAnimBgImage_Nightmare, gBattleAnimBgPalette_Nightmare, gBattleAnimBgTilemap_Nightmare}, - [BG_LEAF_STORM] = {gBattleAnimBgImage_LeafStorm, gBattleAnimBgPalette_LeafStorm, gBattleAnimBgTilemap_LeafStorm}, - [BG_FIRE] = {gBattleAnimBgImage_Fire1, gBattleAnimBgPalette_Fire1, gBattleAnimBgTilemap_Fire1}, - [BG_FIRE_2] = {gBattleAnimBgImage_Fire1, gBattleAnimBgPalette_Fire2, gBattleAnimBgTilemap_Fire1}, - [BG_WATER_2] = {gBattleAnimBgImage_Waterfall, gBattleAnimBgPalette_Waterfall, gBattleAnimBgTilemap_Waterfall}, - [BG_POISON] = {gBattleAnimBgImage_Waterfall, gBattleAnimBgPalette_PoisonFalls, gBattleAnimBgTilemap_Waterfall}, - [BG_AEROBLAST] = {gBattleAnimBgImage_Aeroblast, gBattleAnimBgPalette_Aeroblast, gBattleAnimBgTilemap_Aeroblast}, - [BG_HURRICANE] = {gBattleAnimBgImage_Hurricane, gBattleAnimBgPalette_Hurricane, gBattleAnimBgTilemap_Hurricane}, - [BG_ELECTRIC_TERRAIN] = {gBattleAnimBgImage_ElectricTerrain, gBattleAnimBgPalette_ElectricTerrain, gBattleAnimBgTilemap_ElectricTerrain}, - [BG_GRASSY_TERRAIN] = {gBattleAnimBgImage_GrassyTerrain, gBattleAnimBgPalette_GrassyTerrain, gBattleAnimBgTilemap_GrassyTerrain}, - [BG_MISTY_TERRAIN] = {gBattleAnimBgImage_MistyTerrain, gBattleAnimBgPalette_MistyTerrain, gBattleAnimBgTilemap_MistyTerrain}, - [BG_PSYCHIC_TERRAIN] = {gBattleAnimBgImage_PsychicTerrain, gBattleAnimBgPalette_PsychicTerrain, gBattleAnimBgTilemap_PsychicTerrain}, - [BG_FOCUS_BLAST] = {gBattleAnimBgImage_FocusBlast, gBattleAnimBgPalette_FocusBlast, gBattleAnimBgTilemap_FocusBlast}, - [BG_GUNK_SHOT] = {gBattleAnimBgImage_FocusBlast, gBattleAnimBgPalette_GunkShot, gBattleAnimBgTilemap_FocusBlast}, - [BG_HYDRO_CANNON] = {gBattleAnimBgImage_HydroCannon, gBattleAnimBgPalette_HydroCannon, gBattleAnimBgTilemap_HydroCannon}, - [BG_WONDER_ROOM] = {gBattleAnimBgImage_TrickRoom, gBattleAnimBgPalette_WonderRoom, gBattleAnimBgTilemap_TrickRoom}, - [BG_MAGIC_ROOM] = {gBattleAnimBgImage_TrickRoom, gBattleAnimBgPalette_MagicRoom, gBattleAnimBgTilemap_TrickRoom}, - [BG_HYPERSPACE_FURY] = {gBattleAnimBgImage_Psychic, gBattleAnimBgPalette_HyperspaceFury, gBattleAnimBgTilemap_Psychic}, - [BG_BOLT_STRIKE] = {gBattleAnimBgImage_BoltStrike, gBattleAnimBgPalette_BoltStrike, gBattleAnimBgTilemap_BoltStrike}, - [BG_ZMOVE_ACTIVATE] = {gBattleAnimBgImage_ZMoveActivate, gBattleAnimBgPalette_ZMoveActivate, gBattleAnimBgTilemap_ZMoveActivate}, - [BG_TECTONIC_RAGE] = {gBattleAnimBgImage_InAir, gBattleAnimBgPalette_TectonicRage, gBattleAnimBgTilemap_InAir}, - [BG_BLUE_SKY_DAY] = {gBattleAnimBgImage_SkyDay, gBattleAnimBgPalette_SkyDay, gBattleAnimBgTilemap_SkyDay}, - [BG_BLUE_SKY_AFTERNOON] = {gBattleAnimBgImage_SkyDay, gBattleAnimBgPalette_SkyAfternoon, gBattleAnimBgTilemap_SkyDay}, - [BG_BLUE_SKY_NIGHT] = {gBattleAnimBgImage_SkyDay, gBattleAnimBgPalette_SkyNight, gBattleAnimBgTilemap_SkyDay}, - [BG_ZMOVE_MOUNTAIN] = {gBattleAnimBgImage_ZMoveMountain, gBattleAnimBgPalette_ZMoveMountain, gBattleAnimBgTilemap_ZMoveMountain}, - [BG_NEVERENDING_NIGHTMARE] = {gBattleAnimBgImage_NeverendingNightmare, gBattleAnimBgPalette_NeverendingNightmare, gBattleAnimBgTilemap_NeverendingNightmare}, - [BG_WATER_PULSE] = {gBattleAnimBgImage_WaterPulse, gBattleAnimBgPalette_WaterPulse, gBattleAnimBgTilemap_WaterPulse}, - [BG_INFERNO_OVERDRIVE] = {gBattleAnimBgImage_InfernoOverdrive, gBattleAnimBgPalette_InfernoOverdrive, gBattleAnimBgTilemap_InfernoOverdrive}, - [BG_BLOOM_DOOM] = {gBattleAnimBgImage_BloomDoom, gBattleAnimBgPalette_BloomDoom, gBattleAnimBgTilemap_BloomDoom}, - [BG_SHATTERED_PSYCHE] = {gBattleAnimBgImage_ShatteredPsyche, gBattleAnimBgPalette_ShatteredPsyche, gBattleAnimBgTilemap_ShatteredPsyche}, - [BG_TWINKLE_TACKLE] = {gBattleAnimBgImage_TwinkleTackle, gBattleAnimBgPalette_TwinkleTackle, gBattleAnimBgTilemap_TwinkleTackle}, - [BG_BLACKHOLE_ECLIPSE] = {gBattleAnimBgImage_BlackholeEclipse, gBattleAnimBgPalette_BlackholeEclipse, gBattleAnimBgTilemap_BlackholeEclipse}, - [BG_SOULSTEALING_7STAR_STRIKE] = {gBattleAnimBgImage_SoulStealing7StarStrike, gBattleAnimBgPalette_SoulStealing7StarStrike, gBattleAnimBgTilemap_SoulStealing7StarStrike}, - [BG_MALICIOUS_MOONSAULT] = {gBattleAnimBgImage_MaliciousMoonsault, gBattleAnimBgPalette_MaliciousMoonsault, gBattleAnimBgTilemap_MaliciousMoonsault}, - [BG_CLANGOROUS_SOULBLAZE] = {gBattleAnimBgImage_ClangorousSoulblaze, gBattleAnimBgPalette_ClangorousSoulblaze, gBattleAnimBgTilemap_ClangorousSoulblaze}, - [BG_SNUGGLE_FOREVER] = {gBattleAnimBgImage_SnuggleForever, gBattleAnimBgPalette_SnuggleForever, gBattleAnimBgTilemap_SnuggleForever}, - [BG_MAX_LIGHTNING] = {gBattleAnimBgImage_MaxLightning, gBattleAnimBgPalette_MaxLightning, gBattleAnimBgTilemap_MaxLightning}, - [BG_GARBAGE_FALLS] = {gBattleAnimBgImage_Waterfall, gBattleAnimBgPalette_GarbageFalls, gBattleAnimBgTilemap_Waterfall}, - [BG_HYPER_BEAM] = {gBattleAnimBgImage_HydroCannon, gBattleAnimBgPalette_HyperBeam, gBattleAnimBgTilemap_HydroCannon}, - [BG_DYNAMAX_CANNON] = {gBattleAnimBgImage_HydroCannon, gBattleAnimBgPalette_DynamaxCannon, gBattleAnimBgTilemap_HydroCannon}, - [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}, -}; From 5682247acee8f1b1a62c28c0fd708043bf2a4697 Mon Sep 17 00:00:00 2001 From: SonikkuA-DatH <58025603+SonikkuA-DatH@users.noreply.github.com> Date: Sun, 18 Dec 2022 19:14:54 -0800 Subject: [PATCH 51/84] Add files via upload Base upload. Need to apply Teatime changes... --- src/data/battle_anim.h | 1988 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 1988 insertions(+) create mode 100644 src/data/battle_anim.h diff --git a/src/data/battle_anim.h b/src/data/battle_anim.h new file mode 100644 index 000000000..e6e03f06c --- /dev/null +++ b/src/data/battle_anim.h @@ -0,0 +1,1988 @@ +const struct OamData gOamData_AffineOff_ObjNormal_8x8 = +{ + .y = 0, + .affineMode = ST_OAM_AFFINE_OFF, + .objMode = ST_OAM_OBJ_NORMAL, + .bpp = ST_OAM_4BPP, + .shape = SPRITE_SHAPE(8x8), + .x = 0, + .size = SPRITE_SIZE(8x8), + .tileNum = 0, + .priority = 2, + .paletteNum = 0, +}; + + +const struct OamData gOamData_AffineOff_ObjNormal_16x16 = +{ + .y = 0, + .affineMode = ST_OAM_AFFINE_OFF, + .objMode = ST_OAM_OBJ_NORMAL, + .bpp = ST_OAM_4BPP, + .shape = SPRITE_SHAPE(16x16), + .x = 0, + .size = SPRITE_SIZE(16x16), + .tileNum = 0, + .priority = 2, + .paletteNum = 0, +}; + +const struct OamData gOamData_AffineOff_ObjNormal_32x32 = +{ + .y = 0, + .affineMode = ST_OAM_AFFINE_OFF, + .objMode = ST_OAM_OBJ_NORMAL, + .bpp = ST_OAM_4BPP, + .shape = SPRITE_SHAPE(32x32), + .x = 0, + .size = SPRITE_SIZE(32x32), + .tileNum = 0, + .priority = 2, + .paletteNum = 0, +}; + +const struct OamData gOamData_AffineOff_ObjNormal_64x64 = +{ + .y = 0, + .affineMode = ST_OAM_AFFINE_OFF, + .objMode = ST_OAM_OBJ_NORMAL, + .bpp = ST_OAM_4BPP, + .shape = SPRITE_SHAPE(64x64), + .x = 0, + .size = SPRITE_SIZE(64x64), + .tileNum = 0, + .priority = 2, + .paletteNum = 0, +}; + +const struct OamData gOamData_AffineOff_ObjNormal_16x8 = +{ + .y = 0, + .affineMode = ST_OAM_AFFINE_OFF, + .objMode = ST_OAM_OBJ_NORMAL, + .bpp = ST_OAM_4BPP, + .shape = SPRITE_SHAPE(16x8), + .x = 0, + .size = SPRITE_SIZE(16x8), + .tileNum = 0, + .priority = 2, + .paletteNum = 0, +}; + +const struct OamData gOamData_AffineOff_ObjNormal_32x8 = +{ + .y = 0, + .affineMode = ST_OAM_AFFINE_OFF, + .objMode = ST_OAM_OBJ_NORMAL, + .bpp = ST_OAM_4BPP, + .shape = SPRITE_SHAPE(32x8), + .x = 0, + .size = SPRITE_SIZE(32x8), + .tileNum = 0, + .priority = 2, + .paletteNum = 0, +}; + +const struct OamData gOamData_AffineOff_ObjNormal_32x16 = +{ + .y = 0, + .affineMode = ST_OAM_AFFINE_OFF, + .objMode = ST_OAM_OBJ_NORMAL, + .bpp = ST_OAM_4BPP, + .shape = SPRITE_SHAPE(32x16), + .x = 0, + .size = SPRITE_SIZE(32x16), + .tileNum = 0, + .priority = 2, + .paletteNum = 0, +}; + +const struct OamData gOamData_AffineOff_ObjNormal_64x32 = +{ + .y = 0, + .affineMode = ST_OAM_AFFINE_OFF, + .objMode = ST_OAM_OBJ_NORMAL, + .bpp = ST_OAM_4BPP, + .shape = SPRITE_SHAPE(64x32), + .x = 0, + .size = SPRITE_SIZE(64x32), + .tileNum = 0, + .priority = 2, + .paletteNum = 0, +}; + +const struct OamData gOamData_AffineOff_ObjNormal_8x16 = +{ + .y = 0, + .affineMode = ST_OAM_AFFINE_OFF, + .objMode = ST_OAM_OBJ_NORMAL, + .bpp = ST_OAM_4BPP, + .shape = SPRITE_SHAPE(8x16), + .x = 0, + .size = SPRITE_SIZE(8x16), + .tileNum = 0, + .priority = 2, + .paletteNum = 0, +}; + +const struct OamData gOamData_AffineOff_ObjNormal_8x32 = +{ + .y = 0, + .affineMode = ST_OAM_AFFINE_OFF, + .objMode = ST_OAM_OBJ_NORMAL, + .bpp = ST_OAM_4BPP, + .shape = SPRITE_SHAPE(8x32), + .x = 0, + .size = SPRITE_SIZE(8x32), + .tileNum = 0, + .priority = 2, + .paletteNum = 0, +}; + +const struct OamData gOamData_AffineOff_ObjNormal_16x32 = +{ + .y = 0, + .affineMode = ST_OAM_AFFINE_OFF, + .objMode = ST_OAM_OBJ_NORMAL, + .bpp = ST_OAM_4BPP, + .shape = SPRITE_SHAPE(16x32), + .x = 0, + .size = SPRITE_SIZE(16x32), + .tileNum = 0, + .priority = 2, + .paletteNum = 0, +}; + +const struct OamData gOamData_AffineOff_ObjNormal_32x64 = +{ + .y = 0, + .affineMode = ST_OAM_AFFINE_OFF, + .objMode = ST_OAM_OBJ_NORMAL, + .bpp = ST_OAM_4BPP, + .shape = SPRITE_SHAPE(32x64), + .x = 0, + .size = SPRITE_SIZE(32x64), + .tileNum = 0, + .priority = 2, + .paletteNum = 0, +}; + +const struct OamData gOamData_AffineNormal_ObjNormal_8x8 = +{ + .y = 0, + .affineMode = ST_OAM_AFFINE_NORMAL, + .objMode = ST_OAM_OBJ_NORMAL, + .bpp = ST_OAM_4BPP, + .shape = SPRITE_SHAPE(8x8), + .x = 0, + .size = SPRITE_SIZE(8x8), + .tileNum = 0, + .priority = 2, + .paletteNum = 0, +}; + +const struct OamData gOamData_AffineNormal_ObjNormal_16x16 = +{ + .y = 0, + .affineMode = ST_OAM_AFFINE_NORMAL, + .objMode = ST_OAM_OBJ_NORMAL, + .bpp = ST_OAM_4BPP, + .shape = SPRITE_SHAPE(16x16), + .x = 0, + .size = SPRITE_SIZE(16x16), + .tileNum = 0, + .priority = 2, + .paletteNum = 0, +}; + +const struct OamData gOamData_AffineNormal_ObjNormal_32x32 = +{ + .y = 0, + .affineMode = ST_OAM_AFFINE_NORMAL, + .objMode = ST_OAM_OBJ_NORMAL, + .bpp = ST_OAM_4BPP, + .shape = SPRITE_SHAPE(32x32), + .x = 0, + .size = SPRITE_SIZE(32x32), + .tileNum = 0, + .priority = 2, + .paletteNum = 0, +}; + +const struct OamData gOamData_AffineNormal_ObjNormal_64x64 = +{ + .y = 0, + .affineMode = ST_OAM_AFFINE_NORMAL, + .objMode = ST_OAM_OBJ_NORMAL, + .bpp = ST_OAM_4BPP, + .shape = SPRITE_SHAPE(64x64), + .x = 0, + .size = SPRITE_SIZE(64x64), + .tileNum = 0, + .priority = 2, + .paletteNum = 0, +}; + +const struct OamData gOamData_AffineNormal_ObjNormal_16x8 = +{ + .y = 0, + .affineMode = ST_OAM_AFFINE_NORMAL, + .objMode = ST_OAM_OBJ_NORMAL, + .bpp = ST_OAM_4BPP, + .shape = SPRITE_SHAPE(16x8), + .x = 0, + .size = SPRITE_SIZE(16x8), + .tileNum = 0, + .priority = 2, + .paletteNum = 0, +}; + +const struct OamData gOamData_AffineNormal_ObjNormal_32x8 = +{ + .y = 0, + .affineMode = ST_OAM_AFFINE_NORMAL, + .objMode = ST_OAM_OBJ_NORMAL, + .bpp = ST_OAM_4BPP, + .shape = SPRITE_SHAPE(32x8), + .x = 0, + .size = SPRITE_SIZE(32x8), + .tileNum = 0, + .priority = 2, + .paletteNum = 0, +}; + +const struct OamData gOamData_AffineNormal_ObjNormal_32x16 = +{ + .y = 0, + .affineMode = ST_OAM_AFFINE_NORMAL, + .objMode = ST_OAM_OBJ_NORMAL, + .bpp = ST_OAM_4BPP, + .shape = SPRITE_SHAPE(32x16), + .x = 0, + .size = SPRITE_SIZE(32x16), + .tileNum = 0, + .priority = 2, + .paletteNum = 0, +}; + +const struct OamData gOamData_AffineNormal_ObjNormal_64x32 = +{ + .y = 0, + .affineMode = ST_OAM_AFFINE_NORMAL, + .objMode = ST_OAM_OBJ_NORMAL, + .bpp = ST_OAM_4BPP, + .shape = SPRITE_SHAPE(64x32), + .x = 0, + .size = SPRITE_SIZE(64x32), + .tileNum = 0, + .priority = 2, + .paletteNum = 0, +}; + +const struct OamData gOamData_AffineNormal_ObjNormal_8x16 = +{ + .y = 0, + .affineMode = ST_OAM_AFFINE_NORMAL, + .objMode = ST_OAM_OBJ_NORMAL, + .bpp = ST_OAM_4BPP, + .shape = SPRITE_SHAPE(8x16), + .x = 0, + .size = SPRITE_SIZE(8x16), + .tileNum = 0, + .priority = 2, + .paletteNum = 0, +}; + +const struct OamData gOamData_AffineNormal_ObjNormal_8x32 = +{ + .y = 0, + .affineMode = ST_OAM_AFFINE_NORMAL, + .objMode = ST_OAM_OBJ_NORMAL, + .bpp = ST_OAM_4BPP, + .shape = SPRITE_SHAPE(8x32), + .x = 0, + .size = SPRITE_SIZE(8x32), + .tileNum = 0, + .priority = 2, + .paletteNum = 0, +}; + +const struct OamData gOamData_AffineNormal_ObjNormal_16x32 = +{ + .y = 0, + .affineMode = ST_OAM_AFFINE_NORMAL, + .objMode = ST_OAM_OBJ_NORMAL, + .bpp = ST_OAM_4BPP, + .shape = SPRITE_SHAPE(16x32), + .x = 0, + .size = SPRITE_SIZE(16x32), + .tileNum = 0, + .priority = 2, + .paletteNum = 0, +}; + +const struct OamData gOamData_AffineNormal_ObjNormal_32x64 = +{ + .y = 0, + .affineMode = ST_OAM_AFFINE_NORMAL, + .objMode = ST_OAM_OBJ_NORMAL, + .bpp = ST_OAM_4BPP, + .shape = SPRITE_SHAPE(32x64), + .x = 0, + .size = SPRITE_SIZE(32x64), + .tileNum = 0, + .priority = 2, + .paletteNum = 0, +}; + +const struct OamData gOamData_AffineDouble_ObjNormal_8x8 = +{ + .y = 0, + .affineMode = ST_OAM_AFFINE_DOUBLE, + .objMode = ST_OAM_OBJ_NORMAL, + .bpp = ST_OAM_4BPP, + .shape = SPRITE_SHAPE(8x8), + .x = 0, + .size = SPRITE_SIZE(8x8), + .tileNum = 0, + .priority = 2, + .paletteNum = 0, +}; + +const struct OamData gOamData_AffineDouble_ObjNormal_16x16 = +{ + .y = 0, + .affineMode = ST_OAM_AFFINE_DOUBLE, + .objMode = ST_OAM_OBJ_NORMAL, + .bpp = ST_OAM_4BPP, + .shape = SPRITE_SHAPE(16x16), + .x = 0, + .size = SPRITE_SIZE(16x16), + .tileNum = 0, + .priority = 2, + .paletteNum = 0, +}; + +const struct OamData gOamData_AffineDouble_ObjNormal_32x32 = +{ + .y = 0, + .affineMode = ST_OAM_AFFINE_DOUBLE, + .objMode = ST_OAM_OBJ_NORMAL, + .bpp = ST_OAM_4BPP, + .shape = SPRITE_SHAPE(32x32), + .x = 0, + .size = SPRITE_SIZE(32x32), + .tileNum = 0, + .priority = 2, + .paletteNum = 0, +}; + +const struct OamData gOamData_AffineDouble_ObjNormal_64x64 = +{ + .y = 0, + .affineMode = ST_OAM_AFFINE_DOUBLE, + .objMode = ST_OAM_OBJ_NORMAL, + .bpp = ST_OAM_4BPP, + .shape = SPRITE_SHAPE(64x64), + .x = 0, + .size = SPRITE_SIZE(64x64), + .tileNum = 0, + .priority = 2, + .paletteNum = 0, +}; + +const struct OamData gOamData_AffineDouble_ObjNormal_16x8 = +{ + .y = 0, + .affineMode = ST_OAM_AFFINE_DOUBLE, + .objMode = ST_OAM_OBJ_NORMAL, + .bpp = ST_OAM_4BPP, + .shape = SPRITE_SHAPE(16x8), + .x = 0, + .size = SPRITE_SIZE(16x8), + .tileNum = 0, + .priority = 2, + .paletteNum = 0, +}; + +const struct OamData gOamData_AffineDouble_ObjNormal_32x8 = +{ + .y = 0, + .affineMode = ST_OAM_AFFINE_DOUBLE, + .objMode = ST_OAM_OBJ_NORMAL, + .bpp = ST_OAM_4BPP, + .shape = SPRITE_SHAPE(32x8), + .x = 0, + .size = SPRITE_SIZE(32x8), + .tileNum = 0, + .priority = 2, + .paletteNum = 0, +}; + +const struct OamData gOamData_AffineDouble_ObjNormal_32x16 = +{ + .y = 0, + .affineMode = ST_OAM_AFFINE_DOUBLE, + .objMode = ST_OAM_OBJ_NORMAL, + .bpp = ST_OAM_4BPP, + .shape = SPRITE_SHAPE(32x16), + .x = 0, + .size = SPRITE_SIZE(32x16), + .tileNum = 0, + .priority = 2, + .paletteNum = 0, +}; + +const struct OamData gOamData_AffineDouble_ObjNormal_64x32 = +{ + .y = 0, + .affineMode = ST_OAM_AFFINE_DOUBLE, + .objMode = ST_OAM_OBJ_NORMAL, + .bpp = ST_OAM_4BPP, + .shape = SPRITE_SHAPE(64x32), + .x = 0, + .size = SPRITE_SIZE(64x32), + .tileNum = 0, + .priority = 2, + .paletteNum = 0, +}; + +const struct OamData gOamData_AffineDouble_ObjNormal_8x16 = +{ + .y = 0, + .affineMode = ST_OAM_AFFINE_DOUBLE, + .objMode = ST_OAM_OBJ_NORMAL, + .bpp = ST_OAM_4BPP, + .shape = SPRITE_SHAPE(8x16), + .x = 0, + .size = SPRITE_SIZE(8x16), + .tileNum = 0, + .priority = 2, + .paletteNum = 0, +}; + +const struct OamData gOamData_AffineDouble_ObjNormal_8x32 = +{ + .y = 0, + .affineMode = ST_OAM_AFFINE_DOUBLE, + .objMode = ST_OAM_OBJ_NORMAL, + .bpp = ST_OAM_4BPP, + .shape = SPRITE_SHAPE(8x32), + .x = 0, + .size = SPRITE_SIZE(8x32), + .tileNum = 0, + .priority = 2, + .paletteNum = 0, +}; + +const struct OamData gOamData_AffineDouble_ObjNormal_16x32 = +{ + .y = 0, + .affineMode = ST_OAM_AFFINE_DOUBLE, + .objMode = ST_OAM_OBJ_NORMAL, + .bpp = ST_OAM_4BPP, + .shape = SPRITE_SHAPE(16x32), + .x = 0, + .size = SPRITE_SIZE(16x32), + .tileNum = 0, + .priority = 2, + .paletteNum = 0, +}; + +const struct OamData gOamData_AffineDouble_ObjNormal_32x64 = +{ + .y = 0, + .affineMode = ST_OAM_AFFINE_DOUBLE, + .objMode = ST_OAM_OBJ_NORMAL, + .bpp = ST_OAM_4BPP, + .shape = SPRITE_SHAPE(32x64), + .x = 0, + .size = SPRITE_SIZE(32x64), + .tileNum = 0, + .priority = 2, + .paletteNum = 0, +}; + +const struct OamData gOamData_AffineOff_ObjBlend_8x8 = +{ + .y = 0, + .affineMode = ST_OAM_AFFINE_OFF, + .objMode = ST_OAM_OBJ_BLEND, + .bpp = ST_OAM_4BPP, + .shape = SPRITE_SHAPE(8x8), + .x = 0, + .size = SPRITE_SIZE(8x8), + .tileNum = 0, + .priority = 2, + .paletteNum = 0, +}; + +const struct OamData gOamData_AffineOff_ObjBlend_16x16 = +{ + .y = 0, + .affineMode = ST_OAM_AFFINE_OFF, + .objMode = ST_OAM_OBJ_BLEND, + .bpp = ST_OAM_4BPP, + .shape = SPRITE_SHAPE(16x16), + .x = 0, + .size = SPRITE_SIZE(16x16), + .tileNum = 0, + .priority = 2, + .paletteNum = 0, +}; + +const struct OamData gOamData_AffineOff_ObjBlend_32x32 = +{ + .y = 0, + .affineMode = ST_OAM_AFFINE_OFF, + .objMode = ST_OAM_OBJ_BLEND, + .bpp = ST_OAM_4BPP, + .shape = SPRITE_SHAPE(32x32), + .x = 0, + .size = SPRITE_SIZE(32x32), + .tileNum = 0, + .priority = 2, + .paletteNum = 0, +}; + +const struct OamData gOamData_AffineOff_ObjBlend_64x64 = +{ + .y = 0, + .affineMode = ST_OAM_AFFINE_OFF, + .objMode = ST_OAM_OBJ_BLEND, + .bpp = ST_OAM_4BPP, + .shape = SPRITE_SHAPE(64x64), + .x = 0, + .size = SPRITE_SIZE(64x64), + .tileNum = 0, + .priority = 2, + .paletteNum = 0, +}; + +const struct OamData gOamData_AffineOff_ObjBlend_16x8 = +{ + .y = 0, + .affineMode = ST_OAM_AFFINE_OFF, + .objMode = ST_OAM_OBJ_BLEND, + .bpp = ST_OAM_4BPP, + .shape = SPRITE_SHAPE(16x8), + .x = 0, + .size = SPRITE_SIZE(16x8), + .tileNum = 0, + .priority = 2, + .paletteNum = 0, +}; + +const struct OamData gOamData_AffineOff_ObjBlend_32x8 = +{ + .y = 0, + .affineMode = ST_OAM_AFFINE_OFF, + .objMode = ST_OAM_OBJ_BLEND, + .bpp = ST_OAM_4BPP, + .shape = SPRITE_SHAPE(32x8), + .x = 0, + .size = SPRITE_SIZE(32x8), + .tileNum = 0, + .priority = 2, + .paletteNum = 0, +}; + +const struct OamData gOamData_AffineOff_ObjBlend_32x16 = +{ + .y = 0, + .affineMode = ST_OAM_AFFINE_OFF, + .objMode = ST_OAM_OBJ_BLEND, + .bpp = ST_OAM_4BPP, + .shape = SPRITE_SHAPE(32x16), + .x = 0, + .size = SPRITE_SIZE(32x16), + .tileNum = 0, + .priority = 2, + .paletteNum = 0, +}; + +const struct OamData gOamData_AffineOff_ObjBlend_64x32 = +{ + .y = 0, + .affineMode = ST_OAM_AFFINE_OFF, + .objMode = ST_OAM_OBJ_BLEND, + .bpp = ST_OAM_4BPP, + .shape = SPRITE_SHAPE(64x32), + .x = 0, + .size = SPRITE_SIZE(64x32), + .tileNum = 0, + .priority = 2, + .paletteNum = 0, +}; + +const struct OamData gOamData_AffineOff_ObjBlend_8x16 = +{ + .y = 0, + .affineMode = ST_OAM_AFFINE_OFF, + .objMode = ST_OAM_OBJ_BLEND, + .bpp = ST_OAM_4BPP, + .shape = SPRITE_SHAPE(8x16), + .x = 0, + .size = SPRITE_SIZE(8x16), + .tileNum = 0, + .priority = 2, + .paletteNum = 0, +}; + +const struct OamData gOamData_AffineOff_ObjBlend_8x32 = +{ + .y = 0, + .affineMode = ST_OAM_AFFINE_OFF, + .objMode = ST_OAM_OBJ_BLEND, + .bpp = ST_OAM_4BPP, + .shape = SPRITE_SHAPE(8x32), + .x = 0, + .size = SPRITE_SIZE(8x32), + .tileNum = 0, + .priority = 2, + .paletteNum = 0, +}; + +const struct OamData gOamData_AffineOff_ObjBlend_16x32 = +{ + .y = 0, + .affineMode = ST_OAM_AFFINE_OFF, + .objMode = ST_OAM_OBJ_BLEND, + .bpp = ST_OAM_4BPP, + .shape = SPRITE_SHAPE(16x32), + .x = 0, + .size = SPRITE_SIZE(16x32), + .tileNum = 0, + .priority = 2, + .paletteNum = 0, +}; + +const struct OamData gOamData_AffineOff_ObjBlend_32x64 = +{ + .y = 0, + .affineMode = ST_OAM_AFFINE_OFF, + .objMode = ST_OAM_OBJ_BLEND, + .bpp = ST_OAM_4BPP, + .shape = SPRITE_SHAPE(32x64), + .x = 0, + .size = SPRITE_SIZE(32x64), + .tileNum = 0, + .priority = 2, + .paletteNum = 0, +}; + +const struct OamData gOamData_AffineNormal_ObjBlend_8x8 = +{ + .y = 0, + .affineMode = ST_OAM_AFFINE_NORMAL, + .objMode = ST_OAM_OBJ_BLEND, + .bpp = ST_OAM_4BPP, + .shape = SPRITE_SHAPE(8x8), + .x = 0, + .size = SPRITE_SIZE(8x8), + .tileNum = 0, + .priority = 2, + .paletteNum = 0, +}; + +const struct OamData gOamData_AffineNormal_ObjBlend_16x16 = +{ + .y = 0, + .affineMode = ST_OAM_AFFINE_NORMAL, + .objMode = ST_OAM_OBJ_BLEND, + .bpp = ST_OAM_4BPP, + .shape = SPRITE_SHAPE(16x16), + .x = 0, + .size = SPRITE_SIZE(16x16), + .tileNum = 0, + .priority = 2, + .paletteNum = 0, +}; + +const struct OamData gOamData_AffineNormal_ObjBlend_32x32 = +{ + .y = 0, + .affineMode = ST_OAM_AFFINE_NORMAL, + .objMode = ST_OAM_OBJ_BLEND, + .bpp = ST_OAM_4BPP, + .shape = SPRITE_SHAPE(32x32), + .x = 0, + .size = SPRITE_SIZE(32x32), + .tileNum = 0, + .priority = 2, + .paletteNum = 0, +}; + +const struct OamData gOamData_AffineNormal_ObjBlend_64x64 = +{ + .y = 0, + .affineMode = ST_OAM_AFFINE_NORMAL, + .objMode = ST_OAM_OBJ_BLEND, + .bpp = ST_OAM_4BPP, + .shape = SPRITE_SHAPE(64x64), + .x = 0, + .size = SPRITE_SIZE(64x64), + .tileNum = 0, + .priority = 2, + .paletteNum = 0, +}; + +const struct OamData gOamData_AffineNormal_ObjBlend_16x8 = +{ + .y = 0, + .affineMode = ST_OAM_AFFINE_NORMAL, + .objMode = ST_OAM_OBJ_BLEND, + .bpp = ST_OAM_4BPP, + .shape = SPRITE_SHAPE(16x8), + .x = 0, + .size = SPRITE_SIZE(16x8), + .tileNum = 0, + .priority = 2, + .paletteNum = 0, +}; + +const struct OamData gOamData_AffineNormal_ObjBlend_32x8 = +{ + .y = 0, + .affineMode = ST_OAM_AFFINE_NORMAL, + .objMode = ST_OAM_OBJ_BLEND, + .bpp = ST_OAM_4BPP, + .shape = SPRITE_SHAPE(32x8), + .x = 0, + .size = SPRITE_SIZE(32x8), + .tileNum = 0, + .priority = 2, + .paletteNum = 0, +}; + +const struct OamData gOamData_AffineNormal_ObjBlend_32x16 = +{ + .y = 0, + .affineMode = ST_OAM_AFFINE_NORMAL, + .objMode = ST_OAM_OBJ_BLEND, + .bpp = ST_OAM_4BPP, + .shape = SPRITE_SHAPE(32x16), + .x = 0, + .size = SPRITE_SIZE(32x16), + .tileNum = 0, + .priority = 2, + .paletteNum = 0, +}; + +const struct OamData gOamData_AffineNormal_ObjBlend_64x32 = +{ + .y = 0, + .affineMode = ST_OAM_AFFINE_NORMAL, + .objMode = ST_OAM_OBJ_BLEND, + .bpp = ST_OAM_4BPP, + .shape = SPRITE_SHAPE(64x32), + .x = 0, + .size = SPRITE_SIZE(64x32), + .tileNum = 0, + .priority = 2, + .paletteNum = 0, +}; + +const struct OamData gOamData_AffineNormal_ObjBlend_8x16 = +{ + .y = 0, + .affineMode = ST_OAM_AFFINE_NORMAL, + .objMode = ST_OAM_OBJ_BLEND, + .bpp = ST_OAM_4BPP, + .shape = SPRITE_SHAPE(8x16), + .x = 0, + .size = SPRITE_SIZE(8x16), + .tileNum = 0, + .priority = 2, + .paletteNum = 0, +}; + +const struct OamData gOamData_AffineNormal_ObjBlend_8x32 = +{ + .y = 0, + .affineMode = ST_OAM_AFFINE_NORMAL, + .objMode = ST_OAM_OBJ_BLEND, + .bpp = ST_OAM_4BPP, + .shape = SPRITE_SHAPE(8x32), + .x = 0, + .size = SPRITE_SIZE(8x32), + .tileNum = 0, + .priority = 2, + .paletteNum = 0, +}; + +const struct OamData gOamData_AffineNormal_ObjBlend_16x32 = +{ + .y = 0, + .affineMode = ST_OAM_AFFINE_NORMAL, + .objMode = ST_OAM_OBJ_BLEND, + .bpp = ST_OAM_4BPP, + .shape = SPRITE_SHAPE(16x32), + .x = 0, + .size = SPRITE_SIZE(16x32), + .tileNum = 0, + .priority = 2, + .paletteNum = 0, +}; + +const struct OamData gOamData_AffineNormal_ObjBlend_32x64 = +{ + .y = 0, + .affineMode = ST_OAM_AFFINE_NORMAL, + .objMode = ST_OAM_OBJ_BLEND, + .bpp = ST_OAM_4BPP, + .shape = SPRITE_SHAPE(32x64), + .x = 0, + .size = SPRITE_SIZE(32x64), + .tileNum = 0, + .priority = 2, + .paletteNum = 0, +}; + +const struct OamData gOamData_AffineDouble_ObjBlend_8x8 = +{ + .y = 0, + .affineMode = ST_OAM_AFFINE_DOUBLE, + .objMode = ST_OAM_OBJ_BLEND, + .bpp = ST_OAM_4BPP, + .shape = SPRITE_SHAPE(8x8), + .x = 0, + .size = SPRITE_SIZE(8x8), + .tileNum = 0, + .priority = 2, + .paletteNum = 0, +}; + +const struct OamData gOamData_AffineDouble_ObjBlend_16x16 = +{ + .y = 0, + .affineMode = ST_OAM_AFFINE_DOUBLE, + .objMode = ST_OAM_OBJ_BLEND, + .bpp = ST_OAM_4BPP, + .shape = SPRITE_SHAPE(16x16), + .x = 0, + .size = SPRITE_SIZE(16x16), + .tileNum = 0, + .priority = 2, + .paletteNum = 0, +}; + +const struct OamData gOamData_AffineDouble_ObjBlend_32x32 = +{ + .y = 0, + .affineMode = ST_OAM_AFFINE_DOUBLE, + .objMode = ST_OAM_OBJ_BLEND, + .bpp = ST_OAM_4BPP, + .shape = SPRITE_SHAPE(32x32), + .x = 0, + .size = SPRITE_SIZE(32x32), + .tileNum = 0, + .priority = 2, + .paletteNum = 0, +}; + +const struct OamData gOamData_AffineDouble_ObjBlend_64x64 = +{ + .y = 0, + .affineMode = ST_OAM_AFFINE_DOUBLE, + .objMode = ST_OAM_OBJ_BLEND, + .bpp = ST_OAM_4BPP, + .shape = SPRITE_SHAPE(64x64), + .x = 0, + .size = SPRITE_SIZE(64x64), + .tileNum = 0, + .priority = 2, + .paletteNum = 0, +}; + +const struct OamData gOamData_AffineDouble_ObjBlend_16x8 = +{ + .y = 0, + .affineMode = ST_OAM_AFFINE_DOUBLE, + .objMode = ST_OAM_OBJ_BLEND, + .bpp = ST_OAM_4BPP, + .shape = SPRITE_SHAPE(16x8), + .x = 0, + .size = SPRITE_SIZE(16x8), + .tileNum = 0, + .priority = 2, + .paletteNum = 0, +}; + +const struct OamData gOamData_AffineDouble_ObjBlend_32x8 = +{ + .y = 0, + .affineMode = ST_OAM_AFFINE_DOUBLE, + .objMode = ST_OAM_OBJ_BLEND, + .bpp = ST_OAM_4BPP, + .shape = SPRITE_SHAPE(32x8), + .x = 0, + .size = SPRITE_SIZE(32x8), + .tileNum = 0, + .priority = 2, + .paletteNum = 0, +}; + +const struct OamData gOamData_AffineDouble_ObjBlend_32x16 = +{ + .y = 0, + .affineMode = ST_OAM_AFFINE_DOUBLE, + .objMode = ST_OAM_OBJ_BLEND, + .bpp = ST_OAM_4BPP, + .shape = SPRITE_SHAPE(32x16), + .x = 0, + .size = SPRITE_SIZE(32x16), + .tileNum = 0, + .priority = 2, + .paletteNum = 0, +}; + +const struct OamData gOamData_AffineDouble_ObjBlend_64x32 = +{ + .y = 0, + .affineMode = ST_OAM_AFFINE_DOUBLE, + .objMode = ST_OAM_OBJ_BLEND, + .bpp = ST_OAM_4BPP, + .shape = SPRITE_SHAPE(64x32), + .x = 0, + .size = SPRITE_SIZE(64x32), + .tileNum = 0, + .priority = 2, + .paletteNum = 0, +}; + +const struct OamData gOamData_AffineDouble_ObjBlend_8x16 = +{ + .y = 0, + .affineMode = ST_OAM_AFFINE_DOUBLE, + .objMode = ST_OAM_OBJ_BLEND, + .bpp = ST_OAM_4BPP, + .shape = SPRITE_SHAPE(8x16), + .x = 0, + .size = SPRITE_SIZE(8x16), + .tileNum = 0, + .priority = 2, + .paletteNum = 0, +}; + +const struct OamData gOamData_AffineDouble_ObjBlend_8x32 = +{ + .y = 0, + .affineMode = ST_OAM_AFFINE_DOUBLE, + .objMode = ST_OAM_OBJ_BLEND, + .bpp = ST_OAM_4BPP, + .shape = SPRITE_SHAPE(8x32), + .x = 0, + .size = SPRITE_SIZE(8x32), + .tileNum = 0, + .priority = 2, + .paletteNum = 0, +}; + +const struct OamData gOamData_AffineDouble_ObjBlend_16x32 = +{ + .y = 0, + .affineMode = ST_OAM_AFFINE_DOUBLE, + .objMode = ST_OAM_OBJ_BLEND, + .bpp = ST_OAM_4BPP, + .shape = SPRITE_SHAPE(16x32), + .x = 0, + .size = SPRITE_SIZE(16x32), + .tileNum = 0, + .priority = 2, + .paletteNum = 0, +}; + +const struct OamData gOamData_AffineDouble_ObjBlend_32x64 = +{ + .y = 0, + .affineMode = ST_OAM_AFFINE_DOUBLE, + .objMode = ST_OAM_OBJ_BLEND, + .bpp = ST_OAM_4BPP, + .shape = SPRITE_SHAPE(32x64), + .x = 0, + .size = SPRITE_SIZE(32x64), + .tileNum = 0, + .priority = 2, + .paletteNum = 0, +}; + +const struct CompressedSpriteSheet gBattleAnimPicTable[] = +{ + {gBattleAnimSpriteGfx_Bone, 0x0200, ANIM_TAG_BONE}, + {gBattleAnimSpriteGfx_Spark, 0x0300, ANIM_TAG_SPARK}, + {gBattleAnimSpriteGfx_Pencil, 0x0200, ANIM_TAG_PENCIL}, + {gBattleAnimSpriteGfx_AirWave, 0x0100, ANIM_TAG_AIR_WAVE}, + {gBattleAnimSpriteGfx_Orb, 0x0200, ANIM_TAG_ORB}, +#if B_NEW_SWORD_PARTICLE + {gBattleAnimSpriteGfx_NewSword, 0x0400, ANIM_TAG_SWORD}, +#else + {gBattleAnimSpriteGfx_Sword, 0x0400, ANIM_TAG_SWORD}, +#endif +#if B_NEW_LEECH_SEED_PARTICLE + {gBattleAnimSpriteGfx_NewLeechSeed, 0x0180, ANIM_TAG_SEED}, +#else + {gBattleAnimSpriteGfx_Seed, 0x0180, ANIM_TAG_SEED}, +#endif + {gBattleAnimSpriteGfx_Explosion6, 0x0800, ANIM_TAG_EXPLOSION_6}, + {gBattleAnimSpriteGfx_PinkOrb, 0x0020, ANIM_TAG_PINK_ORB}, + {gBattleAnimSpriteGfx_Gust, 0x0400, ANIM_TAG_GUST}, + {gBattleAnimSpriteGfx_IceCube, 0x1200, ANIM_TAG_ICE_CUBE}, + {gBattleAnimSpriteGfx_Spark2, 0x0180, ANIM_TAG_SPARK_2}, + {gBattleAnimSpriteGfx_Orange, 0x0080, ANIM_TAG_ORANGE}, + {gBattleAnimSpriteGfx_YellowBall, 0x0080, ANIM_TAG_YELLOW_BALL}, + {gBattleAnimSpriteGfx_LockOn, 0x0280, ANIM_TAG_LOCK_ON}, + {gBattleAnimSpriteGfx_TiedBag, 0x0080, ANIM_TAG_TIED_BAG}, + {gBattleAnimSpriteGfx_BlackSmoke, 0x0100, ANIM_TAG_BLACK_SMOKE}, + {gBattleAnimSpriteGfx_BlackBall, 0x0020, ANIM_TAG_BLACK_BALL}, + {gBattleAnimSpriteGfx_Conversion, 0x0080, ANIM_TAG_CONVERSION}, + {gBattleAnimSpriteGfx_Glass, 0x0400, ANIM_TAG_GLASS}, + {gBattleAnimSpriteGfx_HornHit, 0x0200, ANIM_TAG_HORN_HIT}, + {gBattleAnimSpriteGfx_Hit, 0x0A00, ANIM_TAG_HIT}, + {gBattleAnimSpriteGfx_Hit, 0x0A00, ANIM_TAG_HIT_2}, + {gBattleAnimSpriteGfx_BlueShards, 0x0380, ANIM_TAG_BLUE_SHARDS}, + {gBattleAnimSpriteGfx_ClosingEye, 0x0300, ANIM_TAG_CLOSING_EYE}, + {gBattleAnimSpriteGfx_WavingHand, 0x0A00, ANIM_TAG_WAVING_HAND}, + {gBattleAnimSpriteGfx_HitDuplicate, 0x0A00, ANIM_TAG_HIT_DUPLICATE}, + {gBattleAnimSpriteGfx_Leer, 0x0A00, ANIM_TAG_LEER}, + {gBattleAnimSpriteGfx_BlueBurst, 0x0A00, ANIM_TAG_BLUE_BURST}, +#if B_NEW_EMBER_PARTICLES + {gBattleAnimSpriteGfx_NewEmbers, 0x0A00, ANIM_TAG_SMALL_EMBER}, +#else + {gBattleAnimSpriteGfx_SmallEmber, 0x0A00, ANIM_TAG_SMALL_EMBER}, +#endif + {gBattleAnimSpriteGfx_GraySmoke, 0x0A00, ANIM_TAG_GRAY_SMOKE}, + {gBattleAnimSpriteGfx_BlueStar, 0x0E00, ANIM_TAG_BLUE_STAR}, + {gBattleAnimSpriteGfx_BubbleBurst, 0x0380, ANIM_TAG_BUBBLE_BURST}, + {gBattleAnimSpriteGfx_Fire, 0x1000, ANIM_TAG_FIRE}, + {gBattleAnimSpriteGfx_SpinningFire, 0x0800, ANIM_TAG_SPINNING_FIRE}, + {gBattleAnimSpriteGfx_FirePlume, 0x0A00, ANIM_TAG_FIRE_PLUME}, + {gBattleAnimSpriteGfx_Lightning2, 0x0800, ANIM_TAG_LIGHTNING_2}, + {gBattleAnimSpriteGfx_Lightning, 0x0A00, ANIM_TAG_LIGHTNING}, + {gBattleAnimSpriteGfx_ClawSlash2, 0x0A00, ANIM_TAG_CLAW_SLASH_2}, + {gBattleAnimSpriteGfx_ClawSlash, 0x0A00, ANIM_TAG_CLAW_SLASH}, + {gBattleAnimSpriteGfx_Scratch3, 0x0A00, ANIM_TAG_SCRATCH_3}, + {gBattleAnimSpriteGfx_Scratch2, 0x0A00, ANIM_TAG_SCRATCH_2}, + {gBattleAnimSpriteGfx_BubbleBurst2, 0x0A00, ANIM_TAG_BUBBLE_BURST_2}, + {gBattleAnimSpriteGfx_IceChunk, 0x0A00, ANIM_TAG_ICE_CHUNK}, + {gBattleAnimSpriteGfx_Glass2, 0x0A00, ANIM_TAG_GLASS_2}, + {gBattleAnimSpriteGfx_PinkHeart2, 0x0A00, ANIM_TAG_PINK_HEART_2}, + {gBattleAnimSpriteGfx_SapDrip, 0x1000, ANIM_TAG_SAP_DRIP}, + {gBattleAnimSpriteGfx_SapDrip, 0x1000, ANIM_TAG_SAP_DRIP_2}, + {gBattleAnimSpriteGfx_Sparkle1, 0x1000, ANIM_TAG_SPARKLE_1}, + {gBattleAnimSpriteGfx_Sparkle1, 0x1000, ANIM_TAG_SPARKLE_2}, + {gBattleAnimSpriteGfx_HumanoidFoot, 0x0200, ANIM_TAG_HUMANOID_FOOT}, + {gBattleAnimSpriteGfx_MonsterFoot, 0x0200, ANIM_TAG_MONSTER_FOOT}, + {gBattleAnimSpriteGfx_HumanoidHand, 0x0200, ANIM_TAG_HUMANOID_HAND}, + {gBattleAnimSpriteGfx_NoiseLine, 0x0800, ANIM_TAG_NOISE_LINE}, + {gBattleAnimSpriteGfx_YellowUnk, 0x0080, ANIM_TAG_YELLOW_UNK}, + {gBattleAnimSpriteGfx_RedFist, 0x0200, ANIM_TAG_RED_FIST}, + {gBattleAnimSpriteGfx_SlamHit, 0x1000, ANIM_TAG_SLAM_HIT}, + {gBattleAnimSpriteGfx_Ring, 0x0180, ANIM_TAG_RING}, +#if NEW_ROCKS_PARTICLE + {gBattleAnimSpriteGfx_NewRocks, 0x0C00, ANIM_TAG_ROCKS}, +#else + {gBattleAnimSpriteGfx_Rocks, 0x0C00, ANIM_TAG_ROCKS}, +#endif + {gBattleAnimSpriteGfx_Z, 0x0100, ANIM_TAG_Z}, + {gBattleAnimSpriteGfx_YellowUnk2, 0x0040, ANIM_TAG_YELLOW_UNK_2}, + {gBattleAnimSpriteGfx_AirSlash, 0x0180, ANIM_TAG_AIR_SLASH}, + {gBattleAnimSpriteGfx_SpinningGreenOrbs, 0x0800, ANIM_TAG_SPINNING_GREEN_ORBS}, +#if B_NEW_LEAF_PARTICLE + {gBattleAnimSpriteGfx_NewLeaf, 0x0480, ANIM_TAG_LEAF}, +#else + {gBattleAnimSpriteGfx_Leaf, 0x0480, ANIM_TAG_LEAF}, +#endif + {gBattleAnimSpriteGfx_Finger, 0x0200, ANIM_TAG_FINGER}, + {gBattleAnimSpriteGfx_PoisonPowder, 0x0200, ANIM_TAG_POISON_POWDER}, + {gBattleAnimSpriteGfx_BrownTriangle, 0x0100, ANIM_TAG_BROWN_TRIANGLE}, + {gBattleAnimSpriteGfx_PoisonPowder, 0x0200, ANIM_TAG_SLEEP_POWDER}, + {gBattleAnimSpriteGfx_PoisonPowder, 0x0200, ANIM_TAG_STUN_SPORE}, + {gBattleAnimSpriteGfx_PoisonPowder, 0x0200, ANIM_TAG_POWDER}, + {gBattleAnimSpriteGfx_Sparkle3, 0x0200, ANIM_TAG_SPARKLE_3}, + {gBattleAnimSpriteGfx_Sparkle4, 0x0A00, ANIM_TAG_SPARKLE_4}, + {gBattleAnimSpriteGfx_MusicNotes, 0x0300, ANIM_TAG_MUSIC_NOTES}, + {gBattleAnimSpriteGfx_Duck, 0x0180, ANIM_TAG_DUCK}, + {gBattleAnimSpriteGfx_MudSand, 0x00A0, ANIM_TAG_MUD_SAND}, + {gBattleAnimSpriteGfx_Alert, 0x0700, ANIM_TAG_ALERT}, + {gBattleAnimSpriteGfx_BlueFlames, 0x0400, ANIM_TAG_BLUE_FLAMES}, + {gBattleAnimSpriteGfx_BlueFlames2, 0x0200, ANIM_TAG_BLUE_FLAMES_2}, + {gBattleAnimSpriteGfx_Shock4, 0x0300, ANIM_TAG_SHOCK_4}, + {gBattleAnimSpriteGfx_Shock, 0x0C00, ANIM_TAG_SHOCK}, + {gBattleAnimSpriteGfx_Bell2, 0x0A00, ANIM_TAG_BELL_2}, + {gBattleAnimSpriteGfx_PinkGlove, 0x0080, ANIM_TAG_PINK_GLOVE}, + {gBattleAnimSpriteGfx_BlueLines, 0x0040, ANIM_TAG_BLUE_LINES}, + {gBattleAnimSpriteGfx_Impact3, 0x0E00, ANIM_TAG_IMPACT_3}, + {gBattleAnimSpriteGfx_Impact2, 0x0E00, ANIM_TAG_IMPACT_2}, + {gBattleAnimSpriteGfx_Reticle, 0x0280, ANIM_TAG_RETICLE}, + {gBattleAnimSpriteGfx_Breath, 0x0200, ANIM_TAG_BREATH}, + {gBattleAnimSpriteGfx_Anger, 0x0080, ANIM_TAG_ANGER}, + {gBattleAnimSpriteGfx_Snowball, 0x00C0, ANIM_TAG_SNOWBALL}, + {gBattleAnimSpriteGfx_Vine, 0x0A00, ANIM_TAG_VINE}, + {gBattleAnimSpriteGfx_Sword2, 0x0200, ANIM_TAG_SWORD_2}, + {gBattleAnimSpriteGfx_Clapping, 0x0180, ANIM_TAG_CLAPPING}, + {gBattleAnimSpriteGfx_RedTube, 0x0080, ANIM_TAG_RED_TUBE}, + {gBattleAnimSpriteGfx_Amnesia, 0x1000, ANIM_TAG_AMNESIA}, + {gBattleAnimSpriteGfx_String2, 0x0A00, ANIM_TAG_STRING_2}, + {gBattleAnimSpriteGfx_Pencil2, 0x0180, ANIM_TAG_PENCIL_2}, + {gBattleAnimSpriteGfx_Petal, 0x0380, ANIM_TAG_PETAL}, + {gBattleAnimSpriteGfx_BentSpoon, 0x0C00, ANIM_TAG_BENT_SPOON}, + {gBattleAnimSpriteGfx_Web, 0x0200, ANIM_TAG_WEB}, + {gBattleAnimSpriteGfx_MilkBottle, 0x0200, ANIM_TAG_MILK_BOTTLE}, + {gBattleAnimSpriteGfx_Coin, 0x0200, ANIM_TAG_COIN}, + {gBattleAnimSpriteGfx_CrackedEgg, 0x0200, ANIM_TAG_CRACKED_EGG}, + {gBattleAnimSpriteGfx_HatchedEgg, 0x0400, ANIM_TAG_HATCHED_EGG}, + {gBattleAnimSpriteGfx_FreshEgg, 0x0080, ANIM_TAG_FRESH_EGG}, + {gBattleAnimSpriteGfx_Fangs, 0x0400, ANIM_TAG_FANGS}, + {gBattleAnimSpriteGfx_Explosion2, 0x0c00, ANIM_TAG_EXPLOSION_2}, + {gBattleAnimSpriteGfx_Explosion3, 0x0200, ANIM_TAG_EXPLOSION_3}, + {gBattleAnimSpriteGfx_WaterDroplet, 0x1000, ANIM_TAG_WATER_DROPLET}, + {gBattleAnimSpriteGfx_WaterDroplet2, 0x0a00, ANIM_TAG_WATER_DROPLET_2}, + {gBattleAnimSpriteGfx_Seed2, 0x0020, ANIM_TAG_SEED_2}, + {gBattleAnimSpriteGfx_Sprout, 0x0e00, ANIM_TAG_SPROUT}, + {gBattleAnimSpriteGfx_RedWand, 0x0080, ANIM_TAG_RED_WAND}, + {gBattleAnimSpriteGfx_PurpleGreenUnk, 0x0a00, ANIM_TAG_PURPLE_GREEN_UNK}, + {gBattleAnimSpriteGfx_WaterColumn, 0x0400, ANIM_TAG_WATER_COLUMN}, + {gBattleAnimSpriteGfx_MudUnk, 0x0200, ANIM_TAG_MUD_UNK}, + {gBattleAnimSpriteGfx_RainDrops, 0x0700, ANIM_TAG_RAIN_DROPS}, + {gBattleAnimSpriteGfx_FurySwipes, 0x0800, ANIM_TAG_FURY_SWIPES}, + {gBattleAnimSpriteGfx_Vine2, 0x0a00, ANIM_TAG_VINE_2}, + {gBattleAnimSpriteGfx_Teeth, 0x0600, ANIM_TAG_TEETH}, + {gBattleAnimSpriteGfx_Bone2, 0x0800, ANIM_TAG_BONE_2}, + {gBattleAnimSpriteGfx_WhiteBag, 0x0200, ANIM_TAG_WHITE_BAG}, + {gBattleAnimSpriteGfx_Unknown, 0x0040, ANIM_TAG_UNKNOWN}, + {gBattleAnimSpriteGfx_PurpleCoral, 0x0180, ANIM_TAG_PURPLE_CORAL}, + {gBattleAnimSpriteGfx_PurpleDroplet, 0x0600, ANIM_TAG_PURPLE_DROPLET}, + {gBattleAnimSpriteGfx_Shock2, 0x0600, ANIM_TAG_SHOCK_2}, + {gBattleAnimSpriteGfx_ClosingEye2, 0x0200, ANIM_TAG_CLOSING_EYE_2}, + {gBattleAnimSpriteGfx_MetalBall, 0x0080, ANIM_TAG_METAL_BALL}, +#if NEW_SUBSTITUTE_PARTICLE + {gBattleAnimSpriteGfx_NewSubstituteFront, 0x0200, ANIM_TAG_MONSTER_DOLL}, +#else + {gBattleAnimSpriteGfx_MonsterDoll, 0x0200, ANIM_TAG_MONSTER_DOLL}, +#endif + {gBattleAnimSpriteGfx_Whirlwind, 0x0800, ANIM_TAG_WHIRLWIND}, + {gBattleAnimSpriteGfx_Whirlwind2, 0x0080, ANIM_TAG_WHIRLWIND_2}, + {gBattleAnimSpriteGfx_Explosion4, 0x0a00, ANIM_TAG_EXPLOSION_4}, + {gBattleAnimSpriteGfx_Explosion5, 0x0280, ANIM_TAG_EXPLOSION_5}, + {gBattleAnimSpriteGfx_Tongue, 0x0280, ANIM_TAG_TONGUE}, + {gBattleAnimSpriteGfx_Smoke, 0x0100, ANIM_TAG_SMOKE}, + {gBattleAnimSpriteGfx_Smoke2, 0x0200, ANIM_TAG_SMOKE_2}, + {gBattleAnimSpriteGfx_Impact, 0x0200, ANIM_TAG_IMPACT}, + {gBattleAnimSpriteGfx_CircleImpact, 0x0020, ANIM_TAG_CIRCLE_IMPACT}, + {gBattleAnimSpriteGfx_Scratch, 0x0a00, ANIM_TAG_SCRATCH}, + {gBattleAnimSpriteGfx_Cut, 0x0800, ANIM_TAG_CUT}, +#if B_NEW_TEETH_PARTICLE + {gBattleAnimSpriteGfx_NewTeeth, 0x0800, ANIM_TAG_SHARP_TEETH}, +#else + {gBattleAnimSpriteGfx_SharpTeeth, 0x0800, ANIM_TAG_SHARP_TEETH}, +#endif + {gBattleAnimSpriteGfx_RainbowRings, 0x00c0, ANIM_TAG_RAINBOW_RINGS}, + {gBattleAnimSpriteGfx_IceCrystals, 0x01c0, ANIM_TAG_ICE_CRYSTALS}, + {gBattleAnimSpriteGfx_IceSpikes, 0x0100, ANIM_TAG_ICE_SPIKES}, +#if B_NEW_HANDS_FEET_PARTICLE + {gBattleAnimSpriteGfx_NewHandsAndFeet, 0x0800, ANIM_TAG_HANDS_AND_FEET}, +#else + {gBattleAnimSpriteGfx_HandsAndFeet, 0x0800, ANIM_TAG_HANDS_AND_FEET}, +#endif + {gBattleAnimSpriteGfx_MistCloud, 0x0200, ANIM_TAG_MIST_CLOUD}, + {gBattleAnimSpriteGfx_Clamp, 0x0800, ANIM_TAG_CLAMP}, + {gBattleAnimSpriteGfx_Bubble, 0x0180, ANIM_TAG_BUBBLE}, + {gBattleAnimSpriteGfx_Orbs, 0x0180, ANIM_TAG_ORBS}, + {gBattleAnimSpriteGfx_WaterImpact, 0x0200, ANIM_TAG_WATER_IMPACT}, + {gBattleAnimSpriteGfx_WaterOrb, 0x0200, ANIM_TAG_WATER_ORB}, + {gBattleAnimSpriteGfx_PoisonBubble, 0x0180, ANIM_TAG_POISON_BUBBLE}, + {gBattleAnimSpriteGfx_ToxicBubble, 0x0400, ANIM_TAG_TOXIC_BUBBLE}, +#if B_NEW_SPIKES_PARTICLE + {gBattleAnimSpriteGfx_NewSpikes, 0x0080, ANIM_TAG_SPIKES}, +#else + {gBattleAnimSpriteGfx_Spikes, 0x0080, ANIM_TAG_SPIKES}, +#endif + {gBattleAnimSpriteGfx_HornHit2, 0x0100, ANIM_TAG_HORN_HIT_2}, + {gBattleAnimSpriteGfx_AirWave2, 0x0100, ANIM_TAG_AIR_WAVE_2}, + {gBattleAnimSpriteGfx_SmallBubbles, 0x0140, ANIM_TAG_SMALL_BUBBLES}, +#if B_NEW_FLY_BUBBLE_PARTICLE + {gBattleAnimSpriteGfx_NewFly, 0x0800, ANIM_TAG_ROUND_SHADOW}, +#else + {gBattleAnimSpriteGfx_RoundShadow, 0x0800, ANIM_TAG_ROUND_SHADOW}, +#endif + {gBattleAnimSpriteGfx_Sunlight, 0x0200, ANIM_TAG_SUNLIGHT}, + {gBattleAnimSpriteGfx_Spore, 0x0100, ANIM_TAG_SPORE}, + {gBattleAnimSpriteGfx_Flower, 0x00a0, ANIM_TAG_FLOWER}, + {gBattleAnimSpriteGfx_RazorLeaf, 0x0100, ANIM_TAG_RAZOR_LEAF}, + {gBattleAnimSpriteGfx_Needle, 0x0080, ANIM_TAG_NEEDLE}, + {gBattleAnimSpriteGfx_WhirlwindLines, 0x0300, ANIM_TAG_WHIRLWIND_LINES}, + {gBattleAnimSpriteGfx_GoldRing, 0x0100, ANIM_TAG_GOLD_RING}, + {gBattleAnimSpriteGfx_GoldRing, 0x0100, ANIM_TAG_PURPLE_RING}, + {gBattleAnimSpriteGfx_GoldRing, 0x0100, ANIM_TAG_BLUE_RING}, + {gBattleAnimSpriteGfx_GreenLightWall, 0x0800, ANIM_TAG_GREEN_LIGHT_WALL}, + {gBattleAnimSpriteGfx_GreenLightWall, 0x0800, ANIM_TAG_BLUE_LIGHT_WALL}, + {gBattleAnimSpriteGfx_GreenLightWall, 0x0800, ANIM_TAG_RED_LIGHT_WALL}, + {gBattleAnimSpriteGfx_GreenLightWall, 0x0800, ANIM_TAG_GRAY_LIGHT_WALL}, + {gBattleAnimSpriteGfx_GreenLightWall, 0x0800, ANIM_TAG_ORANGE_LIGHT_WALL}, + {gBattleAnimSpriteGfx_BlackBall2, 0x0080, ANIM_TAG_BLACK_BALL_2}, + {gBattleAnimSpriteGfx_MistCloud, 0x0200, ANIM_TAG_PURPLE_GAS_CLOUD}, + {gBattleAnimSpriteGfx_SparkH, 0x0200, ANIM_TAG_SPARK_H}, + {gBattleAnimSpriteGfx_YellowStar, 0x0200, ANIM_TAG_YELLOW_STAR}, + {gBattleAnimSpriteGfx_LargeFreshEgg, 0x0080, ANIM_TAG_LARGE_FRESH_EGG}, + {gBattleAnimSpriteGfx_ShadowBall, 0x0200, ANIM_TAG_SHADOW_BALL}, + {gBattleAnimSpriteGfx_Lick, 0x0500, ANIM_TAG_LICK}, + {gBattleAnimSpriteGfx_VoidLines, 0x0800, ANIM_TAG_VOID_LINES}, + {gBattleAnimSpriteGfx_String, 0x0400, ANIM_TAG_STRING}, + {gBattleAnimSpriteGfx_WebThread, 0x0020, ANIM_TAG_WEB_THREAD}, + {gBattleAnimSpriteGfx_SpiderWeb, 0x0800, ANIM_TAG_SPIDER_WEB}, + {gBattleAnimSpriteGfx_Lightbulb, 0x0100, ANIM_TAG_LIGHTBULB}, + {gBattleAnimSpriteGfx_Slash, 0x0800, ANIM_TAG_SLASH}, + {gBattleAnimSpriteGfx_FocusEnergy, 0x0400, ANIM_TAG_FOCUS_ENERGY}, + {gBattleAnimSpriteGfx_SphereToCube, 0x0a00, ANIM_TAG_SPHERE_TO_CUBE}, + {gBattleAnimSpriteGfx_Tendrils, 0x1000, ANIM_TAG_TENDRILS}, +#if B_NEW_MEAN_LOOK_PARTICLE + {gBattleAnimSpriteGfx_NewEye, 0x0800, ANIM_TAG_EYE}, +#else + {gBattleAnimSpriteGfx_Eye, 0x0800, ANIM_TAG_EYE}, +#endif + {gBattleAnimSpriteGfx_WhiteShadow, 0x0400, ANIM_TAG_WHITE_SHADOW}, + {gBattleAnimSpriteGfx_TealAlert, 0x0200, ANIM_TAG_TEAL_ALERT}, + {gBattleAnimSpriteGfx_OpeningEye, 0x0800, ANIM_TAG_OPENING_EYE}, + {gBattleAnimSpriteGfx_RoundWhiteHalo, 0x0800, ANIM_TAG_ROUND_WHITE_HALO}, + {gBattleAnimSpriteGfx_FangAttack, 0x0800, ANIM_TAG_FANG_ATTACK}, + {gBattleAnimSpriteGfx_PurpleHandOutline, 0x0200, ANIM_TAG_PURPLE_HAND_OUTLINE}, + {gBattleAnimSpriteGfx_Moon, 0x0800, ANIM_TAG_MOON}, + {gBattleAnimSpriteGfx_GreenSparkle, 0x0200, ANIM_TAG_GREEN_SPARKLE}, + {gBattleAnimSpriteGfx_Spiral, 0x0800, ANIM_TAG_SPIRAL}, + {gBattleAnimSpriteGfx_SnoreZ, 0x0200, ANIM_TAG_SNORE_Z}, + {gBattleAnimSpriteGfx_Explosion, 0x0800, ANIM_TAG_EXPLOSION}, +#if B_NEW_CURSE_NAIL_PARTICLE + {gBattleAnimSpriteGfx_NewNail, 0x0400, ANIM_TAG_NAIL}, +#else + {gBattleAnimSpriteGfx_Nail, 0x0400, ANIM_TAG_NAIL}, +#endif + {gBattleAnimSpriteGfx_GhostlySpirit, 0x0200, ANIM_TAG_GHOSTLY_SPIRIT}, + {gBattleAnimSpriteGfx_WarmRock, 0x0a80, ANIM_TAG_WARM_ROCK}, + {gBattleAnimSpriteGfx_BreakingEgg, 0x0600, ANIM_TAG_BREAKING_EGG}, + {gBattleAnimSpriteGfx_ThinRing, 0x0800, ANIM_TAG_THIN_RING}, + {gBattleAnimSpriteGfx_PunchImpact, 0x0200, ANIM_TAG_PUNCH_IMPACT}, + {gBattleAnimSpriteGfx_Bell, 0x0600, ANIM_TAG_BELL}, + {gBattleAnimSpriteGfx_MusicNotes2, 0x0800, ANIM_TAG_MUSIC_NOTES_2}, + {gBattleAnimSpriteGfx_SpeedDust, 0x0180, ANIM_TAG_SPEED_DUST}, + {gBattleAnimSpriteGfx_TornMetal, 0x0800, ANIM_TAG_TORN_METAL}, + {gBattleAnimSpriteGfx_ThoughtBubble, 0x0800, ANIM_TAG_THOUGHT_BUBBLE}, + {gBattleAnimSpriteGfx_MagentaHeart, 0x0080, ANIM_TAG_MAGENTA_HEART}, + {gBattleAnimSpriteGfx_ElectricOrbs, 0x0080, ANIM_TAG_ELECTRIC_ORBS}, + {gBattleAnimSpriteGfx_CircleOfLight, 0x0800, ANIM_TAG_CIRCLE_OF_LIGHT}, + {gBattleAnimSpriteGfx_Electricity, 0x0800, ANIM_TAG_ELECTRICITY}, + {gBattleAnimSpriteGfx_Finger2, 0x0600, ANIM_TAG_FINGER_2}, + {gBattleAnimSpriteGfx_MovementWaves, 0x0600, ANIM_TAG_MOVEMENT_WAVES}, + {gBattleAnimSpriteGfx_MagentaHeart, 0x0080, ANIM_TAG_RED_HEART}, + {gBattleAnimSpriteGfx_RedOrb, 0x0080, ANIM_TAG_RED_ORB}, + {gBattleAnimSpriteGfx_EyeSparkle, 0x0180, ANIM_TAG_EYE_SPARKLE}, + {gBattleAnimSpriteGfx_MagentaHeart, 0x0080, ANIM_TAG_PINK_HEART}, + {gBattleAnimSpriteGfx_Angel, 0x0200, ANIM_TAG_ANGEL}, + {gBattleAnimSpriteGfx_Devil, 0x0400, ANIM_TAG_DEVIL}, + {gBattleAnimSpriteGfx_Swipe, 0x0a00, ANIM_TAG_SWIPE}, + {gBattleAnimSpriteGfx_Roots, 0x0800, ANIM_TAG_ROOTS}, + {gBattleAnimSpriteGfx_ItemBag, 0x0200, ANIM_TAG_ITEM_BAG}, + {gBattleAnimSpriteGfx_JaggedMusicNote, 0x0400, ANIM_TAG_JAGGED_MUSIC_NOTE}, +#if B_NEW_BATON_PASS_BALL_PARTICLE + {gBattleAnimSpriteGfx_NewPokeball, 0x0080, ANIM_TAG_POKEBALL}, +#else + {gBattleAnimSpriteGfx_Pokeball, 0x0080, ANIM_TAG_POKEBALL}, +#endif + {gBattleAnimSpriteGfx_Spotlight, 0x0800, ANIM_TAG_SPOTLIGHT}, + {gBattleAnimSpriteGfx_LetterZ, 0x0200, ANIM_TAG_LETTER_Z}, + {gBattleAnimSpriteGfx_RapidSpin, 0x0300, ANIM_TAG_RAPID_SPIN}, + {gBattleAnimSpriteGfx_TriAttackTriangle, 0x0800, ANIM_TAG_TRI_ATTACK_TRIANGLE}, + {gBattleAnimSpriteGfx_WispOrb, 0x0380, ANIM_TAG_WISP_ORB}, + {gBattleAnimSpriteGfx_WispFire, 0x0800, ANIM_TAG_WISP_FIRE}, + {gBattleAnimSpriteGfx_GoldStars, 0x00c0, ANIM_TAG_GOLD_STARS}, + {gBattleAnimSpriteGfx_EclipsingOrb, 0x0800, ANIM_TAG_ECLIPSING_ORB}, + {gBattleAnimSpriteGfx_GrayOrb, 0x0060, ANIM_TAG_GRAY_ORB}, + {gBattleAnimSpriteGfx_GrayOrb, 0x0060, ANIM_TAG_BLUE_ORB}, + {gBattleAnimSpriteGfx_GrayOrb, 0x0060, ANIM_TAG_RED_ORB_2}, + {gBattleAnimSpriteGfx_PinkPetal, 0x0080, ANIM_TAG_PINK_PETAL}, + {gBattleAnimSpriteGfx_PainSplit, 0x0180, ANIM_TAG_PAIN_SPLIT}, + {gBattleAnimSpriteGfx_Confetti, 0x0180, ANIM_TAG_CONFETTI}, +#if B_NEW_MORNING_SUN_STAR_PARTICLE + {gBattleAnimSpriteGfx_NewGreenStar, 0x0200, ANIM_TAG_GREEN_STAR}, +#else + {gBattleAnimSpriteGfx_GreenStar, 0x0200, ANIM_TAG_GREEN_STAR}, +#endif + {gBattleAnimSpriteGfx_PinkCloud, 0x0200, ANIM_TAG_PINK_CLOUD}, + {gBattleAnimSpriteGfx_SweatDrop, 0x0020, ANIM_TAG_SWEAT_DROP}, + {gBattleAnimSpriteGfx_GuardRing, 0x0400, ANIM_TAG_GUARD_RING}, + {gBattleAnimSpriteGfx_PurpleScratch, 0x0600, ANIM_TAG_PURPLE_SCRATCH}, + {gBattleAnimSpriteGfx_PurpleSwipe, 0x1000, ANIM_TAG_PURPLE_SWIPE}, + {gBattleAnimSpriteGfx_TagHand, 0x0400, ANIM_TAG_TAG_HAND}, + {gBattleAnimSpriteGfx_SmallRedEye, 0x0020, ANIM_TAG_SMALL_RED_EYE}, + {gBattleAnimSpriteGfx_HollowOrb, 0x0080, ANIM_TAG_HOLLOW_ORB}, + {gBattleAnimSpriteGfx_XSign, 0x0800, ANIM_TAG_X_SIGN}, + {gBattleAnimSpriteGfx_BluegreenOrb, 0x0080, ANIM_TAG_BLUEGREEN_ORB}, + {gBattleAnimSpriteGfx_PawPrint, 0x0200, ANIM_TAG_PAW_PRINT}, + {gBattleAnimSpriteGfx_PurpleFlame, 0x0400, ANIM_TAG_PURPLE_FLAME}, + {gBattleAnimSpriteGfx_RedBall, 0x0200, ANIM_TAG_RED_BALL}, + {gBattleAnimSpriteGfx_SmellingsaltEffect, 0x0200, ANIM_TAG_SMELLINGSALT_EFFECT}, + {gBattleAnimSpriteGfx_Meteor, 0x0800, ANIM_TAG_METEOR}, + {gBattleAnimSpriteGfx_FlatRock, 0x0280, ANIM_TAG_FLAT_ROCK}, + {gBattleAnimSpriteGfx_MagnifyingGlass, 0x0200, ANIM_TAG_MAGNIFYING_GLASS}, + {gBattleAnimSpriteGfx_WaterOrb, 0x0200, ANIM_TAG_BROWN_ORB}, + {gBattleAnimSpriteGfx_MetalSoundWaves, 0x0400, ANIM_TAG_METAL_SOUND_WAVES}, + {gBattleAnimSpriteGfx_FlyingDirt, 0x0200, ANIM_TAG_FLYING_DIRT}, + {gBattleAnimSpriteGfx_IcicleSpear, 0x0200, ANIM_TAG_ICICLE_SPEAR}, + {gBattleAnimSpriteGfx_Hail, 0x0080, ANIM_TAG_HAIL}, + {gBattleAnimSpriteGfx_GlowyRedOrb, 0x0020, ANIM_TAG_GLOWY_RED_ORB}, + {gBattleAnimSpriteGfx_GlowyRedOrb, 0x0020, ANIM_TAG_GLOWY_GREEN_ORB}, + {gBattleAnimSpriteGfx_GreenSpike, 0x0080, ANIM_TAG_GREEN_SPIKE}, + {gBattleAnimSpriteGfx_CircleOfLight, 0x0800, ANIM_TAG_WHITE_CIRCLE_OF_LIGHT}, + {gBattleAnimSpriteGfx_GlowyRedOrb, 0x0020, ANIM_TAG_GLOWY_BLUE_ORB}, + {gBattleAnimSpriteGfx_Pokeblock, 0x0080, ANIM_TAG_POKEBLOCK}, + {gBattleAnimSpriteGfx_WhiteFeather, 0x0400, ANIM_TAG_WHITE_FEATHER}, + {gBattleAnimSpriteGfx_Sparkle6, 0x0080, ANIM_TAG_SPARKLE_6}, + {gBattleAnimSpriteGfx_Splash, 0x0800, ANIM_TAG_SPLASH}, + {gBattleAnimSpriteGfx_SweatBead, 0x0020, ANIM_TAG_SWEAT_BEAD}, + {gBattleAnimSpriteGfx_Gem1, 0x0800, ANIM_TAG_GEM_1}, + {gBattleAnimSpriteGfx_Gem2, 0x0800, ANIM_TAG_GEM_2}, + {gBattleAnimSpriteGfx_Gem3, 0x0800, ANIM_TAG_GEM_3}, + {gBattleAnimSpriteGfx_SlamHit2, 0x1000, ANIM_TAG_SLAM_HIT_2}, + {gBattleAnimSpriteGfx_Recycle, 0x0800, ANIM_TAG_RECYCLE}, + {gBattleAnimSpriteGfx_RedParticles, 0x00a0, ANIM_TAG_RED_PARTICLES}, + {gBattleAnimSpriteGfx_Protect, 0x0800, ANIM_TAG_PROTECT}, + {gBattleAnimSpriteGfx_DirtMound, 0x0200, ANIM_TAG_DIRT_MOUND}, + {gBattleAnimSpriteGfx_Shock3, 0x0600, ANIM_TAG_SHOCK_3}, + {gBattleAnimSpriteGfx_WeatherBall, 0x0200, ANIM_TAG_WEATHER_BALL}, + {gBattleAnimSpriteGfx_Bird, 0x0800, ANIM_TAG_BIRD}, + {gBattleAnimSpriteGfx_CrossImpact, 0x0200, ANIM_TAG_CROSS_IMPACT}, + {gBattleAnimSpriteGfx_Slash, 0x0800, ANIM_TAG_SLASH_2}, + {gBattleAnimSpriteGfx_SlamHit, 0x1000, ANIM_TAG_WHIP_HIT}, + {gBattleAnimSpriteGfx_GoldRing, 0x0100, ANIM_TAG_BLUE_RING_2}, + {gBattleAnimSpriteGfx_WhiteStreak, 0x0200, ANIM_TAG_WHITE_STREAK}, + {gBattleAnimSpriteGfx_PurpleJab, 0x0100, ANIM_TAG_PURPLE_JAB}, + {gBattleAnimSpriteGfx_Spikes, 0x0080, ANIM_TAG_TOXIC_SPIKES}, + {gBattleAnimSpriteGfx_EnergyBall, 0x0200, ANIM_TAG_ENERGY_BALL}, + {gBattleAnimSpriteGfx_SeedBrown, 0x0080, ANIM_TAG_SEED_BROWN}, + {gBattleAnimSpriteGfx_Feint, 0x0800, ANIM_TAG_FEINT}, + {gBattleAnimSpriteGfx_MegaStone, 0x800, ANIM_TAG_MEGA_STONE}, + {gBattleAnimSpriteGfx_MegaSymbol, 0x0200, ANIM_TAG_MEGA_SYMBOL}, + {gBattleAnimSpriteGfx_MegaParticles, 0x0180, ANIM_TAG_MEGA_PARTICLES}, + {gBattleAnimSpriteGfx_TrumpCard, 0x0180, ANIM_TAG_TRUMP_CARD}, + {gBattleAnimSpriteGfx_TrumpCardParticles, 0x0060, ANIM_TAG_TRUMP_CARD_PARTICLES}, + {gBattleAnimSpriteGfx_Acupressure, 0x0200, ANIM_TAG_ACUPRESSURE}, + {gBattleAnimSpriteGfx_WringOut, 0x0200, ANIM_TAG_WRING_OUT}, + {gBattleAnimSpriteGfx_ColoredOrbs, 0x0300, ANIM_TAG_COLORED_ORBS}, + {gBattleAnimSpriteGfx_WorrySeed, 0x0080, ANIM_TAG_WORRY_SEED}, + {gBattleAnimSpriteGfx_SmallCloud, 0x0080, ANIM_TAG_SMALL_CLOUD}, + {gBattleAnimSpriteGfx_AttackOrder, 0x0480, ANIM_TAG_ATTACK_ORDER}, + {gBattleAnimSpriteGfx_DragonPulse, 0x0100, ANIM_TAG_DRAGON_PULSE}, + {gBattleAnimSpriteGfx_WoodHammer, 0x0C00, ANIM_TAG_WOOD_HAMMER}, + {gBattleAnimSpriteGfx_PsychoCut, 0x0200, ANIM_TAG_PSYCHO_CUT}, + {gBattleAnimSpriteGfx_PowerGem, 0x0080, ANIM_TAG_POWER_GEM}, + {gBattleAnimSpriteGfx_StoneEdge, 0x0A00, ANIM_TAG_STONE_EDGE}, + {gBattleAnimSpriteGfx_StealthRock, 0x0080, ANIM_TAG_STEALTH_ROCK}, + {gBattleAnimSpriteGfx_PoisonJab, 0x0080, ANIM_TAG_POISON_JAB}, + {gBattleAnimSpriteGfx_PoisonBubble, 0x0180, ANIM_TAG_GREEN_POISON_BUBBLE}, + {gBattleAnimSpriteGfx_FlashCannonBall, 0x200, ANIM_TAG_FLASH_CANNON_BALL}, + {gBattleAnimSpriteGfx_WaterGun, 0x180, ANIM_TAG_WATER_GUN}, + {gBattleAnimSpriteGfx_Punishment, 0xa00, ANIM_TAG_PUNISHMENT_BLADES}, + {gBattleAnimSpriteGfx_QuickGuard, 0x200, ANIM_TAG_QUICK_GUARD_HAND}, + {gBattleAnimSpriteGfx_ShellRight, 0x800, ANIM_TAG_SHELL_RIGHT}, + {gBattleAnimSpriteGfx_ShellLeft, 0x800, ANIM_TAG_SHELL_LEFT}, + {gBattleAnimSpriteGfx_RazorShell, 0x200, ANIM_TAG_RAZOR_SHELL}, + {gBattleAnimSpriteGfx_HydroPump, 0x200, ANIM_TAG_HYDRO_PUMP}, + {gBattleAnimSpriteGfx_Brine, 0xc00, ANIM_TAG_BRINE}, + {gBattleAnimSpriteGfx_Gear, 0x200, ANIM_TAG_GEAR}, + {gBattleAnimSpriteGfx_AssuranceHand, 0x200, ANIM_TAG_ASSURANCE_HAND}, + {gBattleAnimSpriteGfx_Fishies, 0x480, ANIM_TAG_WISHIWASHI_FISH}, + {gBattleAnimSpriteGfx_ZygardeHexes, 0x480, ANIM_TAG_ZYGARDE_HEXES}, + {gBattleAnimSpriteGfx_AuraSphere, 0x200, ANIM_TAG_AURA_SPHERE}, + {gBattleAnimSpriteGfx_OmegaStone, 0x800, ANIM_TAG_OMEGA_STONE}, + {gBattleAnimSpriteGfx_AlphaStone, 0x800, ANIM_TAG_ALPHA_STONE}, + {gBattleAnimSpriteGfx_BerryNormal, 0x400, ANIM_TAG_BERRY_NORMAL}, + {gBattleAnimSpriteGfx_BerryEaten, 0x200, ANIM_TAG_BERRY_EATEN}, + {gBattleAnimSpriteGfx_PurpleDrake, 0x800, ANIM_TAG_DRAGON_ASCENT}, + {gBattleAnimSpriteGfx_PinkDiamond, 0x40, ANIM_TAG_PINK_DIAMOND}, + {gBattleAnimSpriteGfx_SteamEruption, 0xa00, ANIM_TAG_STEAM_ERUPTION}, + {gBattleAnimSpriteGfx_Confide, 0x800, ANIM_TAG_CONFIDE}, + {gBattleAnimSpriteGfx_Arrows, 0x480, ANIM_TAG_VERTICAL_HEX}, + {NULL, 0x0, ANIM_TAG_UNAVAILABLE_1}, + {NULL, 0x0, ANIM_TAG_UNAVAILABLE_2}, + {gBattleAnimSpriteGfx_PowerTrick, 0x800, ANIM_TAG_POWER_TRICK}, + {gBattleAnimSpriteGfx_ChainLink, 0x200, ANIM_TAG_CHAIN_LINK}, + {gBattleAnimSpriteGfx_Anchor, 0x200, ANIM_TAG_ANCHOR}, + {gBattleAnimSpriteGfx_HorseshoeFist, 0x800, ANIM_TAG_HORSESHOE_SIDE_FIST}, + {gBattleAnimSpriteGfx_PurpleDrake, 0x800, ANIM_TAG_DRAGON_ASCENT_FOE}, + {gBattleAnimSpriteGfx_CraftyShield, 0x80, ANIM_TAG_CRAFTY_SHIELD}, + {gBattleAnimSpriteGfx_BlacephalonHead, 0x200, ANIM_TAG_BLACEPHALON_HEAD}, + {gBattleAnimSpriteGfx_FairyLockChains, 0x400, ANIM_TAG_FAIRY_LOCK_CHAINS}, + {gBattleAnimSpriteGfx_LightningRain, 0x700, ANIM_TAG_IONS}, + {gBattleAnimSpriteGfx_Chop, 0x200, ANIM_TAG_CHOP}, + {gBattleAnimSpriteGfx_HeartStamp, 0x400, ANIM_TAG_HEART_STAMP}, + {gBattleAnimSpriteGfx_HornLeech, 0x200, ANIM_TAG_HORN_LEECH}, + {gBattleAnimSpriteGfx_Steamroller, 0x800, ANIM_TAG_STEAMROLLER}, + {gBattleAnimSpriteGfx_HoopaHand, 0x80, ANIM_TAG_HOOPA_HAND}, + {gBattleAnimSpriteGfx_HoopaRing, 0x200, ANIM_TAG_HOOPA_RING}, + {gBattleAnimSpriteGfx_MetalBits, 0x140, ANIM_TAG_METAL_BITS}, + {gBattleAnimSpriteGfx_RocksSmall, 0x140, ANIM_TAG_SMALL_ROCK}, + {gBattleAnimSpriteGfx_SpiritShackleArrow, 0x200, ANIM_TAG_SPIRIT_ARROW}, + {gBattleAnimSpriteGfx_NecrozmaStar, 0x200, ANIM_TAG_ULTRA_BURST_SYMBOL}, + {gBattleAnimSpriteGfx_ZMoveSymbol, 0x800, ANIM_TAG_Z_MOVE_SYMBOL}, + {gBattleAnimSpriteGfx_BigRock, 0x800, ANIM_TAG_REALLY_BIG_ROCK}, + {gBattleAnimSpriteGfx_Cacoon, 0x800, ANIM_TAG_COCOON}, + {gBattleAnimSpriteGfx_Drill, 0x800, ANIM_TAG_CORKSCREW}, + {gBattleAnimSpriteGfx_GigavoltHavocSpear, 0x800, ANIM_TAG_HAVOC_SPEAR}, + {gBattleAnimSpriteGfx_PurpleDrake, 0x800, ANIM_TAG_PURPLE_DRAKE}, + {gBattleAnimSpriteGfx_MudBomb, 0x800, ANIM_TAG_MUD_BOMB}, + {gBattleAnimSpriteGfx_Branch, 0x200, ANIM_TAG_BRANCH}, + {gBattleAnimSpriteGfx_Apple, 0x200, ANIM_TAG_APPLE}, + {gBattleAnimSpriteGfx_Obstruct, 0x200, ANIM_TAG_OBSTRUCT_CROSS}, + {gBattleAnimSpriteGfx_PoisonColumn, 0x2000, ANIM_TAG_POISON_COLUMN}, + {gBattleAnimSpriteGfx_PoisonColumn, 0x2000, ANIM_TAG_GARBAGE_COLUMN}, + {gBattleAnimSpriteGfx_LargeSpike, 0x1000, ANIM_TAG_LARGE_SPIKE}, + {gBattleAnimSpriteGfx_DragonPulseRing, 0x200, ANIM_TAG_DRAGON_PULSE_RING}, + {gBattleAnimSpriteGfx_StonePillar, 0x2000, ANIM_TAG_STONE_PILLAR}, + {gBattleAnimSpriteGfx_Mushroom, 0x800, ANIM_TAG_MUSHROOM}, + {gBattleAnimSpriteGfx_GoldenApple, 0x800, ANIM_TAG_GOLDEN_APPLE}, + {gBattleAnimSpriteGfx_IceRock, 0x2800, ANIM_TAG_ICE_ROCK}, + {gBattleAnimSpriteGfx_Tornado, 0x1800, ANIM_TAG_TORNADO}, + {gBattleAnimSpriteGfx_StraightBeam, 0x180, ANIM_TAG_STRAIGHT_BEAM}, + {gBattleAnimSpriteGfx_DreepyMissile, 0x200, ANIM_TAG_DREEPY}, + {gBattleAnimSpriteGfx_IceRock, 0x1800, ANIM_TAG_ICE_ROCK_SINGLE}, + {gBattleAnimSpriteGfx_StonePillar, 0x1800, ANIM_TAG_STONE_PILLAR_MULTI}, + {gBattleAnimSpriteGfx_AlphaSymbol, 0x0200, ANIM_TAG_ALPHA_SYMBOL}, + {gBattleAnimSpriteGfx_OmegaSymbol, 0x0200, ANIM_TAG_OMEGA_SYMBOL}, + {gBattleAnimSpriteGfx_Orbs, 0x0180, ANIM_TAG_STEEL_BEAM}, + {gBattleAnimSpriteGfx_AuraSphere, 0x200, ANIM_TAG_POLTERGEIST}, +}; + +const struct CompressedSpritePalette gBattleAnimPaletteTable[] = +{ + {gBattleAnimSpritePal_Bone, ANIM_TAG_BONE}, + {gBattleAnimSpritePal_Spark, ANIM_TAG_SPARK}, + {gBattleAnimSpritePal_Pencil, ANIM_TAG_PENCIL}, + {gBattleAnimSpritePal_AirWave, ANIM_TAG_AIR_WAVE}, + {gBattleAnimSpritePal_Orb, ANIM_TAG_ORB}, +#if B_NEW_SWORD_PARTICLE + {gBattleAnimSpritePal_NewSword, ANIM_TAG_SWORD}, +#else + {gBattleAnimSpritePal_Sword, ANIM_TAG_SWORD}, +#endif +#if B_NEW_LEECH_SEED_PARTICLE + {gBattleAnimSpritePal_NewLeechSeed, ANIM_TAG_SEED}, +#else + {gBattleAnimSpritePal_Seed, ANIM_TAG_SEED}, +#endif + {gBattleAnimSpritePal_Explosion6, ANIM_TAG_EXPLOSION_6}, + {gBattleAnimSpritePal_PinkOrb, ANIM_TAG_PINK_ORB}, + {gBattleAnimSpritePal_Gust, ANIM_TAG_GUST}, + {gBattleAnimSpritePal_IceCube, ANIM_TAG_ICE_CUBE}, + {gBattleAnimSpritePal_Spark2, ANIM_TAG_SPARK_2}, + {gBattleAnimSpritePal_Orange, ANIM_TAG_ORANGE}, + {gBattleAnimSpritePal_YellowBall, ANIM_TAG_YELLOW_BALL}, + {gBattleAnimSpritePal_LockOn, ANIM_TAG_LOCK_ON}, + {gBattleAnimSpritePal_TiedBag, ANIM_TAG_TIED_BAG}, + {gBattleAnimSpritePal_BlackSmoke, ANIM_TAG_BLACK_SMOKE}, + {gBattleAnimSpritePal_BlackSmoke, ANIM_TAG_BLACK_BALL}, + {gBattleAnimSpritePal_Conversion, ANIM_TAG_CONVERSION}, + {gBattleAnimSpritePal_Glass, ANIM_TAG_GLASS}, +#if B_NEW_HORN_ATTACK_PARTICLE + {gBattleAnimSpritePal_NewHornHit, ANIM_TAG_HORN_HIT}, +#else + {gBattleAnimSpritePal_HornHit, ANIM_TAG_HORN_HIT}, +#endif + {gBattleAnimSpritePal_Hit, ANIM_TAG_HIT}, + {gBattleAnimSpritePal_Hit2, ANIM_TAG_HIT_2}, + {gBattleAnimSpritePal_BlueShards, ANIM_TAG_BLUE_SHARDS}, + {gBattleAnimSpritePal_ClosingEye, ANIM_TAG_CLOSING_EYE}, + {gBattleAnimSpritePal_WavingHand, ANIM_TAG_WAVING_HAND}, + {gBattleAnimSpritePal_HitDuplicate, ANIM_TAG_HIT_DUPLICATE}, + {gBattleAnimSpritePal_Leer, ANIM_TAG_LEER}, + {gBattleAnimSpritePal_BlueBurst, ANIM_TAG_BLUE_BURST}, +#if B_NEW_EMBER_PARTICLES + {gBattleAnimSpritePal_NewEmbers, ANIM_TAG_SMALL_EMBER}, +#else + {gBattleAnimSpritePal_SmallEmber, ANIM_TAG_SMALL_EMBER}, +#endif + {gBattleAnimSpritePal_GraySmoke, ANIM_TAG_GRAY_SMOKE}, + {gBattleAnimSpritePal_BlueStar, ANIM_TAG_BLUE_STAR}, + {gBattleAnimSpritePal_BubbleBurst, ANIM_TAG_BUBBLE_BURST}, + {gBattleAnimSpritePal_Fire, ANIM_TAG_FIRE}, + {gBattleAnimSpritePal_Fire, ANIM_TAG_SPINNING_FIRE}, + {gBattleAnimSpritePal_Fire, ANIM_TAG_FIRE_PLUME}, + {gBattleAnimSpritePal_Lightning2, ANIM_TAG_LIGHTNING_2}, + {gBattleAnimSpritePal_Lightning2, ANIM_TAG_LIGHTNING}, + {gBattleAnimSpritePal_ClawSlash2, ANIM_TAG_CLAW_SLASH_2}, + {gBattleAnimSpritePal_ClawSlash, ANIM_TAG_CLAW_SLASH}, + {gBattleAnimSpritePal_ClawSlash2, ANIM_TAG_SCRATCH_3}, + {gBattleAnimSpritePal_ClawSlash2, ANIM_TAG_SCRATCH_2}, + {gBattleAnimSpritePal_BubbleBurst2, ANIM_TAG_BUBBLE_BURST_2}, + {gBattleAnimSpritePal_IceChunk, ANIM_TAG_ICE_CHUNK}, + {gBattleAnimSpritePal_Glass2, ANIM_TAG_GLASS_2}, + {gBattleAnimSpritePal_PinkHeart2, ANIM_TAG_PINK_HEART_2}, + {gBattleAnimSpritePal_SapDrip, ANIM_TAG_SAP_DRIP}, + {gBattleAnimSpritePal_SapDrip2, ANIM_TAG_SAP_DRIP}, + {gBattleAnimSpritePal_Sparkle1, ANIM_TAG_SPARKLE_1}, + {gBattleAnimSpritePal_Sparkle2, ANIM_TAG_SPARKLE_2}, + {gBattleAnimSpritePal_HumanoidFoot, ANIM_TAG_HUMANOID_FOOT}, + {gBattleAnimSpritePal_HumanoidFoot, ANIM_TAG_MONSTER_FOOT}, + {gBattleAnimSpritePal_HumanoidFoot, ANIM_TAG_HUMANOID_HAND}, + {gBattleAnimSpritePal_HitDuplicate, ANIM_TAG_NOISE_LINE}, + {gBattleAnimSpritePal_YellowUnk, ANIM_TAG_YELLOW_UNK}, + {gBattleAnimSpritePal_HumanoidFoot, ANIM_TAG_RED_FIST}, + {gBattleAnimSpritePal_SlamHit, ANIM_TAG_SLAM_HIT}, + {gBattleAnimSpritePal_Ring, ANIM_TAG_RING}, +#if NEW_ROCKS_PARTICLE + {gBattleAnimSpritePal_NewRocks, ANIM_TAG_ROCKS}, +#else + {gBattleAnimSpritePal_Rocks, ANIM_TAG_ROCKS}, +#endif + {gBattleAnimSpritePal_Z, ANIM_TAG_Z}, + {gBattleAnimSpritePal_YellowUnk2, ANIM_TAG_YELLOW_UNK_2}, + {gBattleAnimSpritePal_AirSlash, ANIM_TAG_AIR_SLASH}, + {gBattleAnimSpritePal_SpinningGreenOrbs, ANIM_TAG_SPINNING_GREEN_ORBS}, +#if B_NEW_LEAF_PARTICLE + {gBattleAnimSpritePal_NewLeaf, ANIM_TAG_LEAF}, +#else + {gBattleAnimSpritePal_Leaf, ANIM_TAG_LEAF}, +#endif + {gBattleAnimSpritePal_Finger, ANIM_TAG_FINGER}, + {gBattleAnimSpritePal_PoisonPowder, ANIM_TAG_POISON_POWDER}, + {gBattleAnimSpritePal_BrownTriangle, ANIM_TAG_BROWN_TRIANGLE}, + {gBattleAnimSpritePal_SleepPowder, ANIM_TAG_SLEEP_POWDER}, + {gBattleAnimSpritePal_StunSpore, ANIM_TAG_STUN_SPORE}, + {gBattleAnimSpritePal_PoisonPowder, ANIM_TAG_POWDER}, + {gBattleAnimSpritePal_Sparkle3, ANIM_TAG_SPARKLE_3}, + {gBattleAnimSpritePal_Sparkle3, ANIM_TAG_SPARKLE_4}, + {gBattleAnimSpritePal_MusicNotes, ANIM_TAG_MUSIC_NOTES}, + {gBattleAnimSpritePal_Duck, ANIM_TAG_DUCK}, + {gBattleAnimSpritePal_MudSand, ANIM_TAG_MUD_SAND}, + {gBattleAnimSpritePal_Alert, ANIM_TAG_ALERT}, + {gBattleAnimSpritePal_BlueFlames, ANIM_TAG_BLUE_FLAMES}, + {gBattleAnimSpritePal_BlueFlames, ANIM_TAG_BLUE_FLAMES_2}, + {gBattleAnimSpritePal_Shock4, ANIM_TAG_SHOCK_4}, + {gBattleAnimSpritePal_Shock4, ANIM_TAG_SHOCK}, + {gBattleAnimSpritePal_Bell2, ANIM_TAG_BELL_2}, + {gBattleAnimSpritePal_PinkGlove, ANIM_TAG_PINK_GLOVE}, + {gBattleAnimSpritePal_BlueLines, ANIM_TAG_BLUE_LINES}, + {gBattleAnimSpritePal_Impact3, ANIM_TAG_IMPACT_3}, + {gBattleAnimSpritePal_Impact2, ANIM_TAG_IMPACT_2}, + {gBattleAnimSpritePal_Reticle, ANIM_TAG_RETICLE}, + {gBattleAnimSpritePal_Breath, ANIM_TAG_BREATH}, + {gBattleAnimSpritePal_Anger, ANIM_TAG_ANGER}, + {gBattleAnimSpritePal_Snowball, ANIM_TAG_SNOWBALL}, + {gBattleAnimSpritePal_Vine, ANIM_TAG_VINE}, + {gBattleAnimSpritePal_Sword2, ANIM_TAG_SWORD_2}, + {gBattleAnimSpritePal_Clapping, ANIM_TAG_CLAPPING}, + {gBattleAnimSpritePal_RedTube, ANIM_TAG_RED_TUBE}, + {gBattleAnimSpritePal_Amnesia, ANIM_TAG_AMNESIA}, + {gBattleAnimSpritePal_String2, ANIM_TAG_STRING_2}, + {gBattleAnimSpritePal_Pencil2, ANIM_TAG_PENCIL_2}, + {gBattleAnimSpritePal_Petal, ANIM_TAG_PETAL}, + {gBattleAnimSpritePal_BentSpoon, ANIM_TAG_BENT_SPOON}, + {gBattleAnimSpritePal_String2, ANIM_TAG_WEB}, + {gBattleAnimSpritePal_MilkBottle, ANIM_TAG_MILK_BOTTLE}, + {gBattleAnimSpritePal_Coin, ANIM_TAG_COIN}, + {gBattleAnimSpritePal_CrackedEgg, ANIM_TAG_CRACKED_EGG}, + {gBattleAnimSpritePal_CrackedEgg, ANIM_TAG_HATCHED_EGG}, + {gBattleAnimSpritePal_FreshEgg, ANIM_TAG_FRESH_EGG}, + {gBattleAnimSpritePal_Fangs, ANIM_TAG_FANGS}, + {gBattleAnimSpritePal_Explosion2, ANIM_TAG_EXPLOSION_2}, + {gBattleAnimSpritePal_Explosion2, ANIM_TAG_EXPLOSION_3}, + {gBattleAnimSpritePal_WaterDroplet, ANIM_TAG_WATER_DROPLET}, + {gBattleAnimSpritePal_WaterDroplet, ANIM_TAG_WATER_DROPLET_2}, + {gBattleAnimSpritePal_Seed2, ANIM_TAG_SEED_2}, + {gBattleAnimSpritePal_Seed2, ANIM_TAG_SPROUT}, + {gBattleAnimSpritePal_RedWand, ANIM_TAG_RED_WAND}, + {gBattleAnimSpritePal_PurpleGreenUnk, ANIM_TAG_PURPLE_GREEN_UNK}, + {gBattleAnimSpritePal_WaterColumn, ANIM_TAG_WATER_COLUMN}, + {gBattleAnimSpritePal_MudUnk, ANIM_TAG_MUD_UNK}, + {gBattleAnimSpritePal_RainDrops, ANIM_TAG_RAIN_DROPS}, + {gBattleAnimSpritePal_FurySwipes, ANIM_TAG_FURY_SWIPES}, + {gBattleAnimSpritePal_Vine2, ANIM_TAG_VINE_2}, + {gBattleAnimSpritePal_Teeth, ANIM_TAG_TEETH}, + {gBattleAnimSpritePal_Bone2, ANIM_TAG_BONE_2}, + {gBattleAnimSpritePal_WhiteBag, ANIM_TAG_WHITE_BAG}, + {gBattleAnimSpritePal_Unknown, ANIM_TAG_UNKNOWN}, + {gBattleAnimSpritePal_PurpleCoral, ANIM_TAG_PURPLE_CORAL}, + {gBattleAnimSpritePal_PurpleCoral, ANIM_TAG_PURPLE_DROPLET}, + {gBattleAnimSpritePal_Shock2, ANIM_TAG_SHOCK_2}, + {gBattleAnimSpritePal_ClosingEye2, ANIM_TAG_CLOSING_EYE_2}, + {gBattleAnimSpritePal_MetalBall, ANIM_TAG_METAL_BALL}, +#if NEW_SUBSTITUTE_PARTICLE + {gBattleAnimSpritePal_NewSubstituteFront, ANIM_TAG_MONSTER_DOLL}, +#else + {gBattleAnimSpritePal_MonsterDoll, ANIM_TAG_MONSTER_DOLL}, +#endif + {gBattleAnimSpritePal_Whirlwind, ANIM_TAG_WHIRLWIND}, + {gBattleAnimSpritePal_Whirlwind, ANIM_TAG_WHIRLWIND_2}, + {gBattleAnimSpritePal_Explosion4, ANIM_TAG_EXPLOSION_4}, + {gBattleAnimSpritePal_Explosion4, ANIM_TAG_EXPLOSION_5}, + {gBattleAnimSpritePal_Tongue, ANIM_TAG_TONGUE}, + {gBattleAnimSpritePal_Smoke, ANIM_TAG_SMOKE}, + {gBattleAnimSpritePal_Smoke, ANIM_TAG_SMOKE_2}, +#if B_NEW_IMPACT_PALETTE + {gBattleAnimSpritePal_NewImpact, ANIM_TAG_IMPACT}, +#else + {gBattleAnimSpritePal_Impact, ANIM_TAG_IMPACT}, +#endif + {gBattleAnimSpritePal_CircleImpact, ANIM_TAG_CIRCLE_IMPACT}, + {gBattleAnimSpritePal_Impact, ANIM_TAG_SCRATCH}, + {gBattleAnimSpritePal_Impact, ANIM_TAG_CUT}, +#if B_NEW_TEETH_PARTICLE + {gBattleAnimSpritePal_NewTeeth, ANIM_TAG_SHARP_TEETH}, +#else + {gBattleAnimSpritePal_SharpTeeth, ANIM_TAG_SHARP_TEETH}, +#endif + {gBattleAnimSpritePal_RainbowRings, ANIM_TAG_RAINBOW_RINGS}, + {gBattleAnimSpritePal_IceCrystals, ANIM_TAG_ICE_CRYSTALS}, + {gBattleAnimSpritePal_IceCrystals, ANIM_TAG_ICE_SPIKES}, +#if B_NEW_HANDS_FEET_PARTICLE + {gBattleAnimSpritePal_NewHandsAndFeet, ANIM_TAG_HANDS_AND_FEET}, +#else + {gBattleAnimSpritePal_HandsAndFeet, ANIM_TAG_HANDS_AND_FEET}, +#endif + {gBattleAnimSpritePal_MistCloud, ANIM_TAG_MIST_CLOUD}, + {gBattleAnimSpritePal_SharpTeeth, ANIM_TAG_CLAMP}, + {gBattleAnimSpritePal_RainDrops, ANIM_TAG_BUBBLE}, + {gBattleAnimSpritePal_Orbs, ANIM_TAG_ORBS}, + {gBattleAnimSpritePal_WaterImpact, ANIM_TAG_WATER_IMPACT}, + {gBattleAnimSpritePal_WaterImpact, ANIM_TAG_WATER_ORB}, + {gBattleAnimSpritePal_PoisonBubble, ANIM_TAG_POISON_BUBBLE}, + {gBattleAnimSpritePal_PoisonBubble, ANIM_TAG_TOXIC_BUBBLE}, +#if B_NEW_SPIKES_PARTICLE + {gBattleAnimSpritePal_NewSpikes, ANIM_TAG_SPIKES}, +#else + {gBattleAnimSpritePal_Spikes, ANIM_TAG_SPIKES}, +#endif + {gBattleAnimSpritePal_HornHit2, ANIM_TAG_HORN_HIT_2}, + {gBattleAnimSpritePal_AirWave2, ANIM_TAG_AIR_WAVE_2}, + {gBattleAnimSpritePal_SmallBubbles, ANIM_TAG_SMALL_BUBBLES}, +#if B_NEW_FLY_BUBBLE_PARTICLE + {gBattleAnimSpritePal_NewFly, ANIM_TAG_ROUND_SHADOW}, +#else + {gBattleAnimSpritePal_RoundShadow, ANIM_TAG_ROUND_SHADOW}, +#endif + {gBattleAnimSpritePal_Sunlight, ANIM_TAG_SUNLIGHT}, + {gBattleAnimSpritePal_Spore, ANIM_TAG_SPORE}, + {gBattleAnimSpritePal_Flower, ANIM_TAG_FLOWER}, + {gBattleAnimSpritePal_RazorLeaf, ANIM_TAG_RAZOR_LEAF}, + {gBattleAnimSpritePal_Needle, ANIM_TAG_NEEDLE}, + {gBattleAnimSpritePal_WhirlwindLines, ANIM_TAG_WHIRLWIND_LINES}, + {gBattleAnimSpritePal_GoldRing, ANIM_TAG_GOLD_RING}, + {gBattleAnimSpritePal_PurpleRing, ANIM_TAG_PURPLE_RING}, + {gBattleAnimSpritePal_BlueRing, ANIM_TAG_BLUE_RING}, + {gBattleAnimSpritePal_GreenLightWall, ANIM_TAG_GREEN_LIGHT_WALL}, + {gBattleAnimSpritePal_BlueLightWall, ANIM_TAG_BLUE_LIGHT_WALL}, + {gBattleAnimSpritePal_RedLightWall, ANIM_TAG_RED_LIGHT_WALL}, + {gBattleAnimSpritePal_GrayLightWall, ANIM_TAG_GRAY_LIGHT_WALL}, + {gBattleAnimSpritePal_OrangeLightWall, ANIM_TAG_ORANGE_LIGHT_WALL}, + {gBattleAnimSpritePal_BlackBall2, ANIM_TAG_BLACK_BALL_2}, + {gBattleAnimSpritePal_PurpleGasCloud, ANIM_TAG_PURPLE_GAS_CLOUD}, + {gBattleAnimSpritePal_Spark, ANIM_TAG_SPARK_H}, + {gBattleAnimSpritePal_YellowStar, ANIM_TAG_YELLOW_STAR}, + {gBattleAnimSpritePal_LargeFreshEgg, ANIM_TAG_LARGE_FRESH_EGG}, + {gBattleAnimSpritePal_ShadowBall, ANIM_TAG_SHADOW_BALL}, + {gBattleAnimSpritePal_Lick, ANIM_TAG_LICK}, + {gBattleAnimSpritePal_VoidLines, ANIM_TAG_VOID_LINES}, + {gBattleAnimSpritePal_String, ANIM_TAG_STRING}, + {gBattleAnimSpritePal_String, ANIM_TAG_WEB_THREAD}, + {gBattleAnimSpritePal_String, ANIM_TAG_SPIDER_WEB}, + {gBattleAnimSpritePal_Lightbulb, ANIM_TAG_LIGHTBULB}, + {gBattleAnimSpritePal_Slash, ANIM_TAG_SLASH}, + {gBattleAnimSpritePal_FocusEnergy, ANIM_TAG_FOCUS_ENERGY}, + {gBattleAnimSpritePal_SphereToCube, ANIM_TAG_SPHERE_TO_CUBE}, + {gBattleAnimSpritePal_Tendrils, ANIM_TAG_TENDRILS}, +#if B_NEW_MEAN_LOOK_PARTICLE + {gBattleAnimSpritePal_NewEye, ANIM_TAG_EYE}, +#else + {gBattleAnimSpritePal_Eye, ANIM_TAG_EYE}, +#endif + {gBattleAnimSpritePal_WhiteShadow, ANIM_TAG_WHITE_SHADOW}, + {gBattleAnimSpritePal_TealAlert, ANIM_TAG_TEAL_ALERT}, + {gBattleAnimSpritePal_OpeningEye, ANIM_TAG_OPENING_EYE}, + {gBattleAnimSpritePal_RoundWhiteHalo, ANIM_TAG_ROUND_WHITE_HALO}, + {gBattleAnimSpritePal_FangAttack, ANIM_TAG_FANG_ATTACK}, + {gBattleAnimSpritePal_PurpleHandOutline, ANIM_TAG_PURPLE_HAND_OUTLINE}, + {gBattleAnimSpritePal_Moon, ANIM_TAG_MOON}, + {gBattleAnimSpritePal_GreenSparkle, ANIM_TAG_GREEN_SPARKLE}, + {gBattleAnimSpritePal_Spiral, ANIM_TAG_SPIRAL}, + {gBattleAnimSpritePal_SnoreZ, ANIM_TAG_SNORE_Z}, + {gBattleAnimSpritePal_Explosion, ANIM_TAG_EXPLOSION}, + {gBattleAnimSpritePal_Nail, ANIM_TAG_NAIL}, + {gBattleAnimSpritePal_GhostlySpirit, ANIM_TAG_GHOSTLY_SPIRIT}, + {gBattleAnimSpritePal_WarmRock, ANIM_TAG_WARM_ROCK}, + {gBattleAnimSpritePal_BreakingEgg, ANIM_TAG_BREAKING_EGG}, + {gBattleAnimSpritePal_ThinRing, ANIM_TAG_THIN_RING}, + {gBattleAnimSpritePal_PunchImpact, ANIM_TAG_PUNCH_IMPACT}, + {gBattleAnimSpritePal_Bell, ANIM_TAG_BELL}, + {gBattleAnimSpritePal_MusicNotes2, ANIM_TAG_MUSIC_NOTES_2}, + {gBattleAnimSpritePal_SpeedDust, ANIM_TAG_SPEED_DUST}, + {gBattleAnimSpritePal_BlueLightWall, ANIM_TAG_TORN_METAL}, + {gBattleAnimSpritePal_ThoughtBubble, ANIM_TAG_THOUGHT_BUBBLE}, + {gBattleAnimSpritePal_MagentaHeart, ANIM_TAG_MAGENTA_HEART}, + {gBattleAnimSpritePal_ElectricOrbs, ANIM_TAG_ELECTRIC_ORBS}, + {gBattleAnimSpritePal_ElectricOrbs, ANIM_TAG_CIRCLE_OF_LIGHT}, + {gBattleAnimSpritePal_ElectricOrbs, ANIM_TAG_ELECTRICITY}, + {gBattleAnimSpritePal_Finger, ANIM_TAG_FINGER_2}, + {gBattleAnimSpritePal_MovementWaves, ANIM_TAG_MOVEMENT_WAVES}, + {gBattleAnimSpritePal_RedHeart, ANIM_TAG_RED_HEART}, + {gBattleAnimSpritePal_RedOrb, ANIM_TAG_RED_ORB}, + {gBattleAnimSpritePal_EyeSparkle, ANIM_TAG_EYE_SPARKLE}, + {gBattleAnimSpritePal_PinkHeart, ANIM_TAG_PINK_HEART}, + {gBattleAnimSpritePal_Angel, ANIM_TAG_ANGEL}, + {gBattleAnimSpritePal_Devil, ANIM_TAG_DEVIL}, + {gBattleAnimSpritePal_Swipe, ANIM_TAG_SWIPE}, + {gBattleAnimSpritePal_Roots, ANIM_TAG_ROOTS}, + {gBattleAnimSpritePal_ItemBag, ANIM_TAG_ITEM_BAG}, + {gBattleAnimSpritePal_JaggedMusicNote, ANIM_TAG_JAGGED_MUSIC_NOTE}, +#if B_NEW_BATON_PASS_BALL_PARTICLE + {gBattleAnimSpritePal_NewPokeball, ANIM_TAG_POKEBALL}, +#else + {gBattleAnimSpritePal_Pokeball, ANIM_TAG_POKEBALL}, +#endif + {gBattleAnimSpritePal_Pokeball, ANIM_TAG_SPOTLIGHT}, + {gBattleAnimSpritePal_LetterZ, ANIM_TAG_LETTER_Z}, + {gBattleAnimSpritePal_RapidSpin, ANIM_TAG_RAPID_SPIN}, + {gBattleAnimSpritePal_TriAttackTriangle, ANIM_TAG_TRI_ATTACK_TRIANGLE}, + {gBattleAnimSpritePal_WispOrb, ANIM_TAG_WISP_ORB}, + {gBattleAnimSpritePal_WispOrb, ANIM_TAG_WISP_FIRE}, + {gBattleAnimSpritePal_GoldStars, ANIM_TAG_GOLD_STARS}, + {gBattleAnimSpritePal_EclipsingOrb, ANIM_TAG_ECLIPSING_ORB}, + {gBattleAnimSpritePal_GrayOrb, ANIM_TAG_GRAY_ORB}, + {gBattleAnimSpritePal_BlueOrb, ANIM_TAG_BLUE_ORB}, + {gBattleAnimSpritePal_RedOrb2, ANIM_TAG_RED_ORB_2}, + {gBattleAnimSpritePal_PinkPetal, ANIM_TAG_PINK_PETAL}, + {gBattleAnimSpritePal_PainSplit, ANIM_TAG_PAIN_SPLIT}, + {gBattleAnimSpritePal_Confetti, ANIM_TAG_CONFETTI}, +#if B_NEW_MORNING_SUN_STAR_PARTICLE + {gBattleAnimSpritePal_NewGreenStar, ANIM_TAG_GREEN_STAR}, +#else + {gBattleAnimSpritePal_GreenStar, ANIM_TAG_GREEN_STAR}, +#endif + {gBattleAnimSpritePal_PinkCloud, ANIM_TAG_PINK_CLOUD}, + {gBattleAnimSpritePal_SweatDrop, ANIM_TAG_SWEAT_DROP}, + {gBattleAnimSpritePal_GuardRing, ANIM_TAG_GUARD_RING}, + {gBattleAnimSpritePal_PurpleScratch, ANIM_TAG_PURPLE_SCRATCH}, + {gBattleAnimSpritePal_PurpleScratch, ANIM_TAG_PURPLE_SWIPE}, + {gBattleAnimSpritePal_Finger, ANIM_TAG_TAG_HAND}, + {gBattleAnimSpritePal_SmallRedEye, ANIM_TAG_SMALL_RED_EYE}, + {gBattleAnimSpritePal_HollowOrb, ANIM_TAG_HOLLOW_ORB}, + {gBattleAnimSpritePal_HollowOrb, ANIM_TAG_X_SIGN}, + {gBattleAnimSpritePal_BluegreenOrb, ANIM_TAG_BLUEGREEN_ORB}, + {gBattleAnimSpritePal_PawPrint, ANIM_TAG_PAW_PRINT}, + {gBattleAnimSpritePal_PurpleFlame, ANIM_TAG_PURPLE_FLAME}, + {gBattleAnimSpritePal_RedBall, ANIM_TAG_RED_BALL}, + {gBattleAnimSpritePal_SmellingsaltEffect, ANIM_TAG_SMELLINGSALT_EFFECT}, + {gBattleAnimSpritePal_Meteor, ANIM_TAG_METEOR}, + {gBattleAnimSpritePal_FlatRock, ANIM_TAG_FLAT_ROCK}, + {gBattleAnimSpritePal_MagnifyingGlass, ANIM_TAG_MAGNIFYING_GLASS}, + {gBattleAnimSpritePal_BrownOrb, ANIM_TAG_BROWN_ORB}, + {gBattleAnimSpritePal_MetalSoundWaves, ANIM_TAG_METAL_SOUND_WAVES}, + {gBattleAnimSpritePal_FlyingDirt, ANIM_TAG_FLYING_DIRT}, + {gBattleAnimSpritePal_IcicleSpear, ANIM_TAG_ICICLE_SPEAR}, + {gBattleAnimSpritePal_Hail, ANIM_TAG_HAIL}, + {gBattleAnimSpritePal_GlowyRedOrb, ANIM_TAG_GLOWY_RED_ORB}, + {gBattleAnimSpritePal_GlowyGreenOrb, ANIM_TAG_GLOWY_GREEN_ORB}, + {gBattleAnimSpritePal_GreenSpike, ANIM_TAG_GREEN_SPIKE}, + {gBattleAnimSpritePal_WhiteCircleOfLight, ANIM_TAG_WHITE_CIRCLE_OF_LIGHT}, + {gBattleAnimSpritePal_GlowyBlueOrb, ANIM_TAG_GLOWY_BLUE_ORB}, + {gBattleAnimSpritePal_Pokeblock, ANIM_TAG_POKEBLOCK}, + {gBattleAnimSpritePal_WhiteFeather, ANIM_TAG_WHITE_FEATHER}, + {gBattleAnimSpritePal_Sparkle6, ANIM_TAG_SPARKLE_6}, + {gBattleAnimSpritePal_Splash, ANIM_TAG_SPLASH}, + {gBattleAnimSpritePal_Splash, ANIM_TAG_SWEAT_BEAD}, + {gBattleAnimSpritePal_Gem1, ANIM_TAG_GEM_1}, + {gBattleAnimSpritePal_Gem1, ANIM_TAG_GEM_2}, + {gBattleAnimSpritePal_Gem1, ANIM_TAG_GEM_3}, + {gBattleAnimSpritePal_SlamHit2, ANIM_TAG_SLAM_HIT_2}, + {gBattleAnimSpritePal_Recycle, ANIM_TAG_RECYCLE}, + {gBattleAnimSpritePal_RedParticles, ANIM_TAG_RED_PARTICLES}, + {gBattleAnimSpritePal_Protect, ANIM_TAG_PROTECT}, + {gBattleAnimSpritePal_DirtMound, ANIM_TAG_DIRT_MOUND}, + {gBattleAnimSpritePal_Shock3, ANIM_TAG_SHOCK_3}, + {gBattleAnimSpritePal_WeatherBall, ANIM_TAG_WEATHER_BALL}, + {gBattleAnimSpritePal_Bird, ANIM_TAG_BIRD}, + {gBattleAnimSpritePal_CrossImpact, ANIM_TAG_CROSS_IMPACT}, + {gBattleAnimSpritePal_Slash2, ANIM_TAG_SLASH_2}, + {gBattleAnimSpritePal_WhipHit, ANIM_TAG_WHIP_HIT}, + {gBattleAnimSpritePal_BlueRing2, ANIM_TAG_BLUE_RING_2}, + {gBattleAnimSpritePal_WhiteStreak, ANIM_TAG_WHITE_STREAK}, + {gBattleAnimSpritePal_PurpleJab, ANIM_TAG_PURPLE_JAB}, + //new particles + {gBattleAnimSpritePal_ToxicSpikes, ANIM_TAG_TOXIC_SPIKES}, + {gBattleAnimSpritePal_EnergyBall, ANIM_TAG_ENERGY_BALL}, + {gBattleAnimSpritePal_SeedBrown, ANIM_TAG_SEED_BROWN}, + {gBattleAnimSpritePal_Feint, ANIM_TAG_FEINT}, + {gBattleAnimSpritePal_MegaStone, ANIM_TAG_MEGA_STONE}, + {gBattleAnimSpritePal_MegaSymbol, ANIM_TAG_MEGA_SYMBOL}, + {gBattleAnimSpritePal_MegaParticles, ANIM_TAG_MEGA_PARTICLES}, + {gBattleAnimSpritePal_TrumpCard, ANIM_TAG_TRUMP_CARD}, + {gBattleAnimSpritePal_TrumpCardParticles, ANIM_TAG_TRUMP_CARD_PARTICLES}, + {gBattleAnimSpritePal_Acupressure, ANIM_TAG_ACUPRESSURE}, + {gBattleAnimSpritePal_WringOut, ANIM_TAG_WRING_OUT}, + {gBattleAnimSpritePal_ColoredOrbs, ANIM_TAG_COLORED_ORBS}, + {gBattleAnimSpritePal_WorrySeed, ANIM_TAG_WORRY_SEED}, + {gBattleAnimSpritePal_SmallCloud, ANIM_TAG_SMALL_CLOUD}, + {gBattleAnimSpritePal_AttackOrder, ANIM_TAG_ATTACK_ORDER}, + {gBattleAnimSpritePal_DragonPulse, ANIM_TAG_DRAGON_PULSE}, + {gBattleAnimSpritePal_WoodHammer, ANIM_TAG_WOOD_HAMMER}, + {gBattleAnimSpritePal_PsychoCut, ANIM_TAG_PSYCHO_CUT}, + {gBattleAnimSpritePal_PowerGem, ANIM_TAG_POWER_GEM}, + {gBattleAnimSpritePal_StoneEdge, ANIM_TAG_STONE_EDGE}, + {gBattleAnimSpritePal_StealthRock, ANIM_TAG_STEALTH_ROCK}, + {gBattleAnimSpritePal_PoisonJab, ANIM_TAG_POISON_JAB}, + {gBattleAnimSpritePal_Vine, ANIM_TAG_GREEN_POISON_BUBBLE}, + {gBattleAnimSpritePal_FlashCannonBall, ANIM_TAG_FLASH_CANNON_BALL}, + {gBattleAnimSpritePal_WaterGun, ANIM_TAG_WATER_GUN}, + {gBattleAnimSpritePal_Punishment, ANIM_TAG_PUNISHMENT_BLADES}, + {gBattleAnimSpritePal_QuickGuard, ANIM_TAG_QUICK_GUARD_HAND}, + {gBattleAnimSpritePal_ShellLeft, ANIM_TAG_SHELL_RIGHT}, + {gBattleAnimSpritePal_ShellLeft, ANIM_TAG_SHELL_LEFT}, + {gBattleAnimSpritePal_RazorShell, ANIM_TAG_RAZOR_SHELL}, + {gBattleAnimSpritePal_HydroPump, ANIM_TAG_HYDRO_PUMP}, + {gBattleAnimSpritePal_Brine, ANIM_TAG_BRINE}, + {gBattleAnimSpritePal_Gear, ANIM_TAG_GEAR}, + {gBattleAnimSpritePal_AssuranceHand, ANIM_TAG_ASSURANCE_HAND}, + {gBattleAnimSpritePal_Fishies, ANIM_TAG_WISHIWASHI_FISH}, + {gBattleAnimSpritePal_ZygardeHexes, ANIM_TAG_ZYGARDE_HEXES}, + {gBattleAnimSpritePal_AuraSphere, ANIM_TAG_AURA_SPHERE}, + {gBattleAnimSpritePal_OmegaStone, ANIM_TAG_OMEGA_STONE}, + {gBattleAnimSpritePal_AlphaStone, ANIM_TAG_ALPHA_STONE}, + {gBattleAnimSpritePal_BerryNormal, ANIM_TAG_BERRY_NORMAL}, + {gBattleAnimSpritePal_SpacialRendSlices, ANIM_TAG_BERRY_EATEN}, + {gBattleAnimSpritePal_GreenDrake, ANIM_TAG_DRAGON_ASCENT}, + {gBattleAnimSpritePal_PinkDiamond, ANIM_TAG_PINK_DIAMOND}, + {gBattleAnimSpritePal_SteamEruption, ANIM_TAG_STEAM_ERUPTION}, + {gBattleAnimSpritePal_Confide, ANIM_TAG_CONFIDE}, + {gBattleAnimSpritePal_FusionFlare, ANIM_TAG_VERTICAL_HEX}, + {NULL, ANIM_TAG_UNAVAILABLE_1}, + {NULL, ANIM_TAG_UNAVAILABLE_2}, + {gBattleAnimSpritePal_PowerTrick, ANIM_TAG_POWER_TRICK}, + {gBattleAnimSpritePal_ChainLink, ANIM_TAG_CHAIN_LINK}, + {gBattleAnimSpritePal_NaturalGiftRing, ANIM_TAG_ANCHOR}, + {gBattleAnimSpritePal_HorseshoeFist, ANIM_TAG_HORSESHOE_SIDE_FIST}, + {gBattleAnimSpritePal_AvalancheRocks, ANIM_TAG_DRAGON_ASCENT_FOE}, + {gBattleAnimSpritePal_CraftyShield, ANIM_TAG_CRAFTY_SHIELD}, + {gBattleAnimSpritePal_BlacephalonHead, ANIM_TAG_BLACEPHALON_HEAD}, + {gBattleAnimSpritePal_DracoMeteor, ANIM_TAG_FAIRY_LOCK_CHAINS}, + {gBattleAnimSpritePal_LightningRain, ANIM_TAG_IONS}, + {gBattleAnimSpritePal_Chop, ANIM_TAG_CHOP}, + [ANIM_TAG_HEART_STAMP - ANIM_SPRITES_START] = {gBattleAnimSpritePal_HeartStamp, ANIM_TAG_HEART_STAMP}, + {gBattleAnimSpritePal_HornLeech, ANIM_TAG_HORN_LEECH}, + {gBattleAnimSpritePal_Steamroller, ANIM_TAG_STEAMROLLER}, + {gBattleAnimSpritePal_HoopaHand, ANIM_TAG_HOOPA_HAND}, + {gBattleAnimSpritePal_HoopaRing, ANIM_TAG_HOOPA_RING}, + {gBattleAnimSpritePal_BlueFlare, ANIM_TAG_METAL_BITS}, + {gBattleAnimSpritePal_NewRocks, ANIM_TAG_SMALL_ROCK}, + {gBattleAnimSpritePal_SpiritShackleArrow, ANIM_TAG_SPIRIT_ARROW}, + {gBattleAnimSpritePal_NecrozmaStar, ANIM_TAG_ULTRA_BURST_SYMBOL}, + {gBattleAnimSpritePal_ZMoveSymbol, ANIM_TAG_Z_MOVE_SYMBOL}, + {gBattleAnimSpritePal_BigRock, ANIM_TAG_REALLY_BIG_ROCK}, + {gBattleAnimSpritePal_Cacoon, ANIM_TAG_COCOON}, + {gBattleAnimSpritePal_Drill, ANIM_TAG_CORKSCREW}, + {gBattleAnimSpritePal_GigavoltHavocSpear, ANIM_TAG_HAVOC_SPEAR}, + {gBattleAnimSpritePal_PurpleDrake, ANIM_TAG_PURPLE_DRAKE}, + {gBattleAnimSpritePal_MudBomb, ANIM_TAG_MUD_BOMB}, + {gBattleAnimSpritePal_Branch, ANIM_TAG_BRANCH}, + {gBattleAnimSpritePal_Apple, ANIM_TAG_APPLE}, + {gBattleAnimSpritePal_Obstruct, ANIM_TAG_OBSTRUCT_CROSS}, + {gBattleAnimSpritePal_PoisonColumn, ANIM_TAG_POISON_COLUMN}, + {gBattleAnimSpritePal_GarbagePoisonPillar, ANIM_TAG_GARBAGE_COLUMN}, + {gBattleAnimSpritePal_LargeSpike, ANIM_TAG_LARGE_SPIKE}, + {gBattleAnimSpritePal_DragonPulseRing, ANIM_TAG_DRAGON_PULSE_RING}, + {gBattleAnimSpritePal_StonePillar, ANIM_TAG_STONE_PILLAR}, + {gBattleAnimSpritePal_Mushroom, ANIM_TAG_MUSHROOM}, + {gBattleAnimSpritePal_GoldenApple, ANIM_TAG_GOLDEN_APPLE}, + {gBattleAnimSpritePal_IceRock, ANIM_TAG_ICE_ROCK}, + {gBattleAnimSpritePal_Tornado, ANIM_TAG_TORNADO}, + {gBattleAnimSpritePal_StraightBeam, ANIM_TAG_STRAIGHT_BEAM}, + {gBattleAnimSpritePal_DreepyMissile, ANIM_TAG_DREEPY}, + {gBattleAnimSpritePal_IceRock, ANIM_TAG_ICE_ROCK_SINGLE}, + {gBattleAnimSpritePal_StonePillar, ANIM_TAG_STONE_PILLAR_MULTI}, + {gBattleAnimSpritePal_AlphaSymbol, ANIM_TAG_ALPHA_SYMBOL}, + {gBattleAnimSpritePal_OmegaSymbol, ANIM_TAG_OMEGA_SYMBOL}, + {gBattleAnimSpritePal_SteelBeam, ANIM_TAG_STEEL_BEAM}, + {gBattleAnimSpritePal_Poltergeist, ANIM_TAG_POLTERGEIST}, +}; + +const struct BattleAnimBackground gBattleAnimBackgroundTable[] = +{ + [BG_NONE] = {gBattleAnimBgImage_Dark, gBattleAnimBgPalette_Dark, gBattleAnimBgTilemap_Dark}, + [BG_DARK] = {gBattleAnimBgImage_Dark, gBattleAnimBgPalette_Dark, gBattleAnimBgTilemap_Dark}, + [BG_GHOST] = {gBattleAnimBgImage_Ghost, gBattleAnimBgPalette_Ghost, gBattleAnimBgTilemap_Ghost}, + [BG_PSYCHIC] = {gBattleAnimBgImage_Psychic, gBattleAnimBgPalette_Psychic, gBattleAnimBgTilemap_Psychic}, + [BG_IMPACT_OPPONENT] = {gBattleAnimBgImage_Impact, gBattleAnimBgPalette_Impact, gBattleAnimBgTilemap_ImpactOpponent}, + [BG_IMPACT_PLAYER] = {gBattleAnimBgImage_Impact, gBattleAnimBgPalette_Impact, gBattleAnimBgTilemap_ImpactPlayer}, + [BG_IMPACT_CONTESTS] = {gBattleAnimBgImage_Impact, gBattleAnimBgPalette_Impact, gBattleAnimBgTilemap_ImpactContests}, + [BG_DRILL] = {gBattleAnimBgImage_Drill, gBattleAnimBgPalette_Drill, gBattleAnimBgTilemap_Drill}, + [BG_DRILL_CONTESTS] = {gBattleAnimBgImage_Drill, gBattleAnimBgPalette_Drill, gBattleAnimBgTilemap_DrillContests}, + [BG_HIGHSPEED_OPPONENT] = {gBattleAnimBgImage_Highspeed, gBattleAnimBgPalette_Highspeed, gBattleAnimBgTilemap_HighspeedOpponent}, + [BG_HIGHSPEED_PLAYER] = {gBattleAnimBgImage_Highspeed, gBattleAnimBgPalette_Highspeed, gBattleAnimBgTilemap_HighspeedPlayer}, + [BG_THUNDER] = {gBattleAnimBgImage_Thunder, gBattleAnimBgPalette_Thunder, gBattleAnimBgTilemap_Thunder}, + [BG_GUILLOTINE_OPPONENT] = {gBattleAnimBgImage_Guillotine, gBattleAnimBgPalette_Guillotine, gBattleAnimBgTilemap_GuillotineOpponent}, + [BG_GUILLOTINE_PLAYER] = {gBattleAnimBgImage_Guillotine, gBattleAnimBgPalette_Guillotine, gBattleAnimBgTilemap_GuillotinePlayer}, + [BG_GUILLOTINE_CONTESTS] = {gBattleAnimBgImage_Guillotine, gBattleAnimBgPalette_Guillotine, gBattleAnimBgTilemap_GuillotineContests}, + [BG_ICE] = {gBattleAnimBgImage_Ice, gBattleAnimBgPalette_Ice, gBattleAnimBgTilemap_Ice}, + [BG_COSMIC] = {gBattleAnimBgImage_Cosmic, gBattleAnimBgPalette_Cosmic, gBattleAnimBgTilemap_Cosmic}, + [BG_IN_AIR] = {gBattleAnimBgImage_InAir, gBattleAnimBgPalette_InAir, gBattleAnimBgTilemap_InAir}, + [BG_SKY] = {gBattleAnimBgImage_Drill, gBattleAnimBgPalette_Sky, gBattleAnimBgTilemap_Drill}, + [BG_SKY_CONTESTS] = {gBattleAnimBgImage_Drill, gBattleAnimBgPalette_Sky, gBattleAnimBgTilemap_DrillContests}, + [BG_AURORA] = {gBattleAnimBgImage_Aurora, gBattleAnimBgPalette_Aurora, gBattleAnimBgTilemap_Aurora}, + [BG_FISSURE] = {gBattleAnimBgImage_Fissure, gBattleAnimBgPalette_Fissure, gBattleAnimBgTilemap_Fissure}, + [BG_BUG_OPPONENT] = {gBattleAnimBgImage_Highspeed, gBattleAnimBgPalette_Bug, gBattleAnimBgTilemap_HighspeedOpponent}, + [BG_BUG_PLAYER] = {gBattleAnimBgImage_Highspeed, gBattleAnimBgPalette_Bug, gBattleAnimBgTilemap_HighspeedPlayer}, + [BG_SOLAR_BEAM_OPPONENT] = {gBattleAnimBgImage_Impact, gBattleAnimBgPalette_SolarBeam, gBattleAnimBgTilemap_ImpactOpponent}, + [BG_SOLAR_BEAM_PLAYER] = {gBattleAnimBgImage_Impact, gBattleAnimBgPalette_SolarBeam, gBattleAnimBgTilemap_ImpactPlayer}, + [BG_SOLAR_BEAM_CONTESTS] = {gBattleAnimBgImage_Impact, gBattleAnimBgPalette_SolarBeam, gBattleAnimBgTilemap_ImpactContests}, + //new bgs + [BG_MAGMA_STORM] = {gBattleAnimBgImage_InAir, gBattleAnimBgPalette_MagmaStorm, gBattleAnimBgTilemap_InAir}, + [BG_GIGA_IMPACT_OPPONENT] = {gBattleAnimBgImage_GigaImpact, gBattleAnimBgPalette_GigaImpact, gBattleAnimBgTilemap_GigaImpactOpponent}, + [BG_GIGA_IMPACT_PLAYER] = {gBattleAnimBgImage_GigaImpact, gBattleAnimBgPalette_GigaImpact, gBattleAnimBgTilemap_GigaImpactPlayer}, + [BG_GIGA_IMPACT_CONTEST] = {gBattleAnimBgImage_GigaImpact, gBattleAnimBgPalette_GigaImpact, gBattleAnimBgTilemap_GigaImpactContest}, + [BG_TRICK_ROOM] = {gBattleAnimBgImage_TrickRoom, gBattleAnimBgPalette_TrickRoom, gBattleAnimBgTilemap_TrickRoom}, + [BG_ROCK_WRECKER] = {gBattleAnimBgImage_Hurricane, gBattleAnimBgPalette_RockWrecker, gBattleAnimBgTilemap_Hurricane}, + [BG_SPACIAL_REND_ON_OPPONENT] = {gBattleAnimBgImage_SpacialRend, gBattleAnimBgPalette_SpacialRend, gBattleAnimBgTilemap_GigaImpactOpponent}, + [BG_SPACIAL_REND_ON_PLAYER] = {gBattleAnimBgImage_SpacialRend, gBattleAnimBgPalette_SpacialRend, gBattleAnimBgTilemap_GigaImpactPlayer}, + [BG_DARK_VOID] = {gBattleAnimBgImage_Waterfall, gBattleAnimBgPalette_DarkVoid, gBattleAnimBgTilemap_DarkVoid}, + [BG_WATER] = {gBattleAnimBgImage_HydroPump, gBattleAnimBgPalette_HydroPump, gBattleAnimBgTilemap_HydroPump}, + [BG_NIGHTMARE] = {gBattleAnimBgImage_Nightmare, gBattleAnimBgPalette_Nightmare, gBattleAnimBgTilemap_Nightmare}, + [BG_LEAF_STORM] = {gBattleAnimBgImage_LeafStorm, gBattleAnimBgPalette_LeafStorm, gBattleAnimBgTilemap_LeafStorm}, + [BG_FIRE] = {gBattleAnimBgImage_Fire1, gBattleAnimBgPalette_Fire1, gBattleAnimBgTilemap_Fire1}, + [BG_FIRE_2] = {gBattleAnimBgImage_Fire1, gBattleAnimBgPalette_Fire2, gBattleAnimBgTilemap_Fire1}, + [BG_WATER_2] = {gBattleAnimBgImage_Waterfall, gBattleAnimBgPalette_Waterfall, gBattleAnimBgTilemap_Waterfall}, + [BG_POISON] = {gBattleAnimBgImage_Waterfall, gBattleAnimBgPalette_PoisonFalls, gBattleAnimBgTilemap_Waterfall}, + [BG_AEROBLAST] = {gBattleAnimBgImage_Aeroblast, gBattleAnimBgPalette_Aeroblast, gBattleAnimBgTilemap_Aeroblast}, + [BG_HURRICANE] = {gBattleAnimBgImage_Hurricane, gBattleAnimBgPalette_Hurricane, gBattleAnimBgTilemap_Hurricane}, + [BG_ELECTRIC_TERRAIN] = {gBattleAnimBgImage_ElectricTerrain, gBattleAnimBgPalette_ElectricTerrain, gBattleAnimBgTilemap_ElectricTerrain}, + [BG_GRASSY_TERRAIN] = {gBattleAnimBgImage_GrassyTerrain, gBattleAnimBgPalette_GrassyTerrain, gBattleAnimBgTilemap_GrassyTerrain}, + [BG_MISTY_TERRAIN] = {gBattleAnimBgImage_MistyTerrain, gBattleAnimBgPalette_MistyTerrain, gBattleAnimBgTilemap_MistyTerrain}, + [BG_PSYCHIC_TERRAIN] = {gBattleAnimBgImage_PsychicTerrain, gBattleAnimBgPalette_PsychicTerrain, gBattleAnimBgTilemap_PsychicTerrain}, + [BG_FOCUS_BLAST] = {gBattleAnimBgImage_FocusBlast, gBattleAnimBgPalette_FocusBlast, gBattleAnimBgTilemap_FocusBlast}, + [BG_GUNK_SHOT] = {gBattleAnimBgImage_FocusBlast, gBattleAnimBgPalette_GunkShot, gBattleAnimBgTilemap_FocusBlast}, + [BG_HYDRO_CANNON] = {gBattleAnimBgImage_HydroCannon, gBattleAnimBgPalette_HydroCannon, gBattleAnimBgTilemap_HydroCannon}, + [BG_WONDER_ROOM] = {gBattleAnimBgImage_TrickRoom, gBattleAnimBgPalette_WonderRoom, gBattleAnimBgTilemap_TrickRoom}, + [BG_MAGIC_ROOM] = {gBattleAnimBgImage_TrickRoom, gBattleAnimBgPalette_MagicRoom, gBattleAnimBgTilemap_TrickRoom}, + [BG_HYPERSPACE_FURY] = {gBattleAnimBgImage_Psychic, gBattleAnimBgPalette_HyperspaceFury, gBattleAnimBgTilemap_Psychic}, + [BG_BOLT_STRIKE] = {gBattleAnimBgImage_BoltStrike, gBattleAnimBgPalette_BoltStrike, gBattleAnimBgTilemap_BoltStrike}, + [BG_ZMOVE_ACTIVATE] = {gBattleAnimBgImage_ZMoveActivate, gBattleAnimBgPalette_ZMoveActivate, gBattleAnimBgTilemap_ZMoveActivate}, + [BG_TECTONIC_RAGE] = {gBattleAnimBgImage_InAir, gBattleAnimBgPalette_TectonicRage, gBattleAnimBgTilemap_InAir}, + [BG_BLUE_SKY_DAY] = {gBattleAnimBgImage_SkyDay, gBattleAnimBgPalette_SkyDay, gBattleAnimBgTilemap_SkyDay}, + [BG_BLUE_SKY_AFTERNOON] = {gBattleAnimBgImage_SkyDay, gBattleAnimBgPalette_SkyAfternoon, gBattleAnimBgTilemap_SkyDay}, + [BG_BLUE_SKY_NIGHT] = {gBattleAnimBgImage_SkyDay, gBattleAnimBgPalette_SkyNight, gBattleAnimBgTilemap_SkyDay}, + [BG_ZMOVE_MOUNTAIN] = {gBattleAnimBgImage_ZMoveMountain, gBattleAnimBgPalette_ZMoveMountain, gBattleAnimBgTilemap_ZMoveMountain}, + [BG_NEVERENDING_NIGHTMARE] = {gBattleAnimBgImage_NeverendingNightmare, gBattleAnimBgPalette_NeverendingNightmare, gBattleAnimBgTilemap_NeverendingNightmare}, + [BG_WATER_PULSE] = {gBattleAnimBgImage_WaterPulse, gBattleAnimBgPalette_WaterPulse, gBattleAnimBgTilemap_WaterPulse}, + [BG_INFERNO_OVERDRIVE] = {gBattleAnimBgImage_InfernoOverdrive, gBattleAnimBgPalette_InfernoOverdrive, gBattleAnimBgTilemap_InfernoOverdrive}, + [BG_BLOOM_DOOM] = {gBattleAnimBgImage_BloomDoom, gBattleAnimBgPalette_BloomDoom, gBattleAnimBgTilemap_BloomDoom}, + [BG_SHATTERED_PSYCHE] = {gBattleAnimBgImage_ShatteredPsyche, gBattleAnimBgPalette_ShatteredPsyche, gBattleAnimBgTilemap_ShatteredPsyche}, + [BG_TWINKLE_TACKLE] = {gBattleAnimBgImage_TwinkleTackle, gBattleAnimBgPalette_TwinkleTackle, gBattleAnimBgTilemap_TwinkleTackle}, + [BG_BLACKHOLE_ECLIPSE] = {gBattleAnimBgImage_BlackholeEclipse, gBattleAnimBgPalette_BlackholeEclipse, gBattleAnimBgTilemap_BlackholeEclipse}, + [BG_SOULSTEALING_7STAR_STRIKE] = {gBattleAnimBgImage_SoulStealing7StarStrike, gBattleAnimBgPalette_SoulStealing7StarStrike, gBattleAnimBgTilemap_SoulStealing7StarStrike}, + [BG_MALICIOUS_MOONSAULT] = {gBattleAnimBgImage_MaliciousMoonsault, gBattleAnimBgPalette_MaliciousMoonsault, gBattleAnimBgTilemap_MaliciousMoonsault}, + [BG_CLANGOROUS_SOULBLAZE] = {gBattleAnimBgImage_ClangorousSoulblaze, gBattleAnimBgPalette_ClangorousSoulblaze, gBattleAnimBgTilemap_ClangorousSoulblaze}, + [BG_SNUGGLE_FOREVER] = {gBattleAnimBgImage_SnuggleForever, gBattleAnimBgPalette_SnuggleForever, gBattleAnimBgTilemap_SnuggleForever}, + [BG_MAX_LIGHTNING] = {gBattleAnimBgImage_MaxLightning, gBattleAnimBgPalette_MaxLightning, gBattleAnimBgTilemap_MaxLightning}, + [BG_GARBAGE_FALLS] = {gBattleAnimBgImage_Waterfall, gBattleAnimBgPalette_GarbageFalls, gBattleAnimBgTilemap_Waterfall}, + [BG_HYPER_BEAM] = {gBattleAnimBgImage_HydroCannon, gBattleAnimBgPalette_HyperBeam, gBattleAnimBgTilemap_HydroCannon}, + [BG_DYNAMAX_CANNON] = {gBattleAnimBgImage_HydroCannon, gBattleAnimBgPalette_DynamaxCannon, gBattleAnimBgTilemap_HydroCannon}, + [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}, +}; From 6a2a026c707a2eb5a5f45ddcf5c8520f96fb097d Mon Sep 17 00:00:00 2001 From: SonikkuA-DatH <58025603+SonikkuA-DatH@users.noreply.github.com> Date: Sun, 18 Dec 2022 22:23:51 -0800 Subject: [PATCH 52/84] Update battle_anim.h Added required tags --- src/data/battle_anim.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/data/battle_anim.h b/src/data/battle_anim.h index e6e03f06c..5be53fe66 100644 --- a/src/data/battle_anim.h +++ b/src/data/battle_anim.h @@ -1450,6 +1450,7 @@ const struct CompressedSpriteSheet gBattleAnimPicTable[] = {gBattleAnimSpriteGfx_OmegaSymbol, 0x0200, ANIM_TAG_OMEGA_SYMBOL}, {gBattleAnimSpriteGfx_Orbs, 0x0180, ANIM_TAG_STEEL_BEAM}, {gBattleAnimSpriteGfx_AuraSphere, 0x200, ANIM_TAG_POLTERGEIST}, + {gBattleAnimSpriteGfx_Teapot, 0x1800, ANIM_TAG_TEAPOT}, }; const struct CompressedSpritePalette gBattleAnimPaletteTable[] = @@ -1900,6 +1901,7 @@ const struct CompressedSpritePalette gBattleAnimPaletteTable[] = {gBattleAnimSpritePal_OmegaSymbol, ANIM_TAG_OMEGA_SYMBOL}, {gBattleAnimSpritePal_SteelBeam, ANIM_TAG_STEEL_BEAM}, {gBattleAnimSpritePal_Poltergeist, ANIM_TAG_POLTERGEIST}, + {gBattleAnimSpritePal_Teapot, ANIM_TAG_TEAPOT}, }; const struct BattleAnimBackground gBattleAnimBackgroundTable[] = From 03b5d362497da4cddb74efabf19b4aa56b14dabd Mon Sep 17 00:00:00 2001 From: SonikkuA-DatH <58025603+SonikkuA-DatH@users.noreply.github.com> Date: Sun, 18 Dec 2022 22:26:06 -0800 Subject: [PATCH 53/84] Update src/battle_script_commands.c removes various description Co-authored-by: LOuroboros --- src/battle_script_commands.c | 30 +++++++++++++----------------- 1 file changed, 13 insertions(+), 17 deletions(-) diff --git a/src/battle_script_commands.c b/src/battle_script_commands.c index 3274a7d36..dd1d3bb2c 100644 --- a/src/battle_script_commands.c +++ b/src/battle_script_commands.c @@ -10135,25 +10135,21 @@ static void Cmd_various(void) return; } break; - case VARIOUS_TEATIME_TARGETS: - // Gets the battlers to be affected by teatime. If there are none, print 'But it failed!' + case VARIOUS_TEATIME_TARGETS: + { + u32 count = 0; + + for (i = 0; i < gBattlersCount; i++) { - u32 count = 0; - for (i = 0; i < gBattlersCount; i++) - { - if (IsTeatimeAffected(i)) - { - count++; - } - } - if (count == 0) { - gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 3); // Teatime fails - } - else { - gBattlescriptCurrInstr += 7; - } + if (IsTeatimeAffected(i)) + count++; } - return; + if (count == 0) + gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 3); // Teatime fails + else + gBattlescriptCurrInstr += 7; + } + return; case VARIOUS_TEATIME_INVUL: if (ItemId_GetPocket(gBattleMons[gActiveBattler].item) == POCKET_BERRIES && !(gStatuses3[gBattlerTarget] & (STATUS3_SEMI_INVULNERABLE))) gBattlescriptCurrInstr += 7; From c81b702a86e981c8de4165b140172126fe84ca6e Mon Sep 17 00:00:00 2001 From: SonikkuA-DatH <58025603+SonikkuA-DatH@users.noreply.github.com> Date: Sun, 18 Dec 2022 22:26:51 -0800 Subject: [PATCH 54/84] Update src/battle_script_commands.c Spacing refix Co-authored-by: LOuroboros --- src/battle_script_commands.c | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/src/battle_script_commands.c b/src/battle_script_commands.c index dd1d3bb2c..71e756af4 100644 --- a/src/battle_script_commands.c +++ b/src/battle_script_commands.c @@ -8151,21 +8151,19 @@ static bool32 IsAbilityRodAffected(void) static bool32 IsAbilityMotorAffected(void) { - u32 moveType; + u32 moveType; - if (gBattleStruct->dynamicMoveType == 0) - moveType = gBattleMoves[gCurrentMove].type; - else if (!(gBattleStruct->dynamicMoveType & 0x40)) - moveType = gBattleStruct->dynamicMoveType & 0x3F; - else - moveType = gBattleMoves[gCurrentMove].type; + if (gBattleStruct->dynamicMoveType == 0) + moveType = gBattleMoves[gCurrentMove].type; + else if (!(gBattleStruct->dynamicMoveType & 0x40)) + moveType = gBattleStruct->dynamicMoveType & 0x3F; + else + moveType = gBattleMoves[gCurrentMove].type; - if (moveType == TYPE_ELECTRIC && GetBattlerAbility(gBattlerTarget) == ABILITY_MOTOR_DRIVE) { - return TRUE; - } - else { - return FALSE; - } + if (moveType == TYPE_ELECTRIC && GetBattlerAbility(gBattlerTarget) == ABILITY_MOTOR_DRIVE) + return TRUE; + else + return FALSE; } static bool32 IsAbilityAbsorbAffected(void) From bf1a205661a37dad891308778e3f822dc3b847e4 Mon Sep 17 00:00:00 2001 From: SonikkuA-DatH <58025603+SonikkuA-DatH@users.noreply.github.com> Date: Sun, 18 Dec 2022 22:27:12 -0800 Subject: [PATCH 55/84] Update src/battle_script_commands.c Bracket fixing Co-authored-by: LOuroboros --- src/battle_script_commands.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/battle_script_commands.c b/src/battle_script_commands.c index 71e756af4..b4b4eddd0 100644 --- a/src/battle_script_commands.c +++ b/src/battle_script_commands.c @@ -8141,12 +8141,10 @@ static bool32 IsAbilityRodAffected(void) else moveType = gBattleMoves[gCurrentMove].type; - if (moveType == TYPE_ELECTRIC && GetBattlerAbility(gBattlerTarget) == ABILITY_LIGHTNING_ROD) { + if (moveType == TYPE_ELECTRIC && GetBattlerAbility(gBattlerTarget) == ABILITY_LIGHTNING_ROD) return TRUE; - } - else { + else return FALSE; - } } static bool32 IsAbilityMotorAffected(void) From 2dbfc1c8f5f57490c76e8e435976baef5647d5c5 Mon Sep 17 00:00:00 2001 From: SonikkuA-DatH <58025603+SonikkuA-DatH@users.noreply.github.com> Date: Sun, 18 Dec 2022 22:28:33 -0800 Subject: [PATCH 56/84] Update data/battle_scripts_1.s Fixes spacing. Thanks Lunos! Co-authored-by: LOuroboros --- data/battle_scripts_1.s | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data/battle_scripts_1.s b/data/battle_scripts_1.s index f013a41e8..ea1498e06 100644 --- a/data/battle_scripts_1.s +++ b/data/battle_scripts_1.s @@ -416,7 +416,7 @@ gBattleScriptsForMoveEffects:: .4byte BattleScript_EffectDoubleShock @ EFFECT_DOUBLE_SHOCK .4byte BattleScript_EffectSpecialAttackUpHit @ EFFECT_SPECIAL_ATTACK_UP_HIT .4byte BattleScript_EffectVictoryDance @ EFFECT_VICTORY_DANCE - .4byte BattleScript_EffectTeatime @ EFFECT_TEATIME + .4byte BattleScript_EffectTeatime @ EFFECT_TEATIME BattleScript_EffectTeatime:: attackcanceler From ffda8165071119b5dffa843c737fc51a775190fb Mon Sep 17 00:00:00 2001 From: SonikkuA-DatH <58025603+SonikkuA-DatH@users.noreply.github.com> Date: Sun, 18 Dec 2022 22:41:15 -0800 Subject: [PATCH 57/84] Update battle_script_commands.h Whoops, forgot the to copy paste various --- include/constants/battle_script_commands.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/include/constants/battle_script_commands.h b/include/constants/battle_script_commands.h index 5d99cd221..21f3eb57e 100644 --- a/include/constants/battle_script_commands.h +++ b/include/constants/battle_script_commands.h @@ -246,7 +246,11 @@ #define VARIOUS_CAN_TELEPORT 155 #define VARIOUS_GET_BATTLER_SIDE 156 #define VARIOUS_CHECK_PARENTAL_BOND_COUNTER 157 -#define VARIOUS_TEATIME_TARGETS 158 +#define VARIOUS_JUMP_IF_ROD 158 +#define VARIOUS_JUMP_IF_ABSORB 159 +#define VARIOUS_JUMP_IF_MOTOR 160 +#define VARIOUS_TEATIME_INVUL 161 +#define VARIOUS_TEATIME_TARGETS 162 // Cmd_manipulatedamage From 562736a5e60b78bbe96f25286dd0cf34a417d6dc Mon Sep 17 00:00:00 2001 From: SonikkuA-DatH <58025603+SonikkuA-DatH@users.noreply.github.com> Date: Sun, 18 Dec 2022 22:50:41 -0800 Subject: [PATCH 58/84] Update battle_scripts_1.s Changed STAT_BUFF_ALLOW_PTR to STAT_CHANGE_ALLOW_PTR --- data/battle_scripts_1.s | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/data/battle_scripts_1.s b/data/battle_scripts_1.s index ea1498e06..b9401117a 100644 --- a/data/battle_scripts_1.s +++ b/data/battle_scripts_1.s @@ -457,7 +457,7 @@ BattleScript_Teatimerod: call BattleScript_AbilityPopUp playstatchangeanimation BS_TARGET, BIT_SPATK, STAT_CHANGE_BY_TWO setstatchanger STAT_SPATK, 1, FALSE - statbuffchange STAT_BUFF_ALLOW_PTR, BattleScript_TeatimeBuffer + statbuffchange STAT_CHANGE_ALLOW_PTR, BattleScript_TeatimeBuffer jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, 0x2, BattleScript_TeatimeBuffer printfromtable gStatUpStringIds waitmessage 0x40 @@ -470,7 +470,7 @@ BattleScript_Teatimemotor: call BattleScript_AbilityPopUp playstatchangeanimation BS_TARGET, BIT_SPEED, STAT_CHANGE_BY_TWO setstatchanger STAT_SPEED, 1, FALSE - statbuffchange STAT_BUFF_ALLOW_PTR, BattleScript_TeatimeBuffer + statbuffchange STAT_CHANGE_ALLOW_PTR, BattleScript_TeatimeBuffer jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, 0x2, BattleScript_TeatimeBuffer printfromtable gStatUpStringIds waitmessage 0x40 From 6215d4b1b4ddddd179e48c6528b9b324e0f24761 Mon Sep 17 00:00:00 2001 From: SonikkuA-DatH <58025603+SonikkuA-DatH@users.noreply.github.com> Date: Mon, 19 Dec 2022 17:18:05 -0800 Subject: [PATCH 59/84] Update src/battle_script_commands.c Co-authored-by: LOuroboros --- src/battle_script_commands.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/src/battle_script_commands.c b/src/battle_script_commands.c index b8e162804..9dc869d27 100644 --- a/src/battle_script_commands.c +++ b/src/battle_script_commands.c @@ -8132,19 +8132,19 @@ static bool32 IsRototillerAffected(u32 battlerId) static bool32 IsAbilityRodAffected(void) { - u32 moveType; + u32 moveType; - if (gBattleStruct->dynamicMoveType == 0) - moveType = gBattleMoves[gCurrentMove].type; - else if (!(gBattleStruct->dynamicMoveType & 0x40)) - moveType = gBattleStruct->dynamicMoveType & 0x3F; - else - moveType = gBattleMoves[gCurrentMove].type; + if (gBattleStruct->dynamicMoveType == 0) + moveType = gBattleMoves[gCurrentMove].type; + else if (!(gBattleStruct->dynamicMoveType & 0x40)) + moveType = gBattleStruct->dynamicMoveType & 0x3F; + else + moveType = gBattleMoves[gCurrentMove].type; - if (moveType == TYPE_ELECTRIC && GetBattlerAbility(gBattlerTarget) == ABILITY_LIGHTNING_ROD) - return TRUE; - else - return FALSE; + if (moveType == TYPE_ELECTRIC && GetBattlerAbility(gBattlerTarget) == ABILITY_LIGHTNING_ROD) + return TRUE; + else + return FALSE; } static bool32 IsAbilityMotorAffected(void) From 459631eb9682e29ee391a6a81fcbf593051e0ee8 Mon Sep 17 00:00:00 2001 From: SonikkuA-DatH <58025603+SonikkuA-DatH@users.noreply.github.com> Date: Mon, 19 Dec 2022 17:18:23 -0800 Subject: [PATCH 60/84] Update src/battle_script_commands.c Co-authored-by: LOuroboros --- src/battle_script_commands.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/battle_script_commands.c b/src/battle_script_commands.c index 9dc869d27..ede9574af 100644 --- a/src/battle_script_commands.c +++ b/src/battle_script_commands.c @@ -8185,11 +8185,11 @@ static bool32 IsAbilityAbsorbAffected(void) static bool32 IsTeatimeAffected(u32 battlerId) { - if (ItemId_GetPocket(gBattleMons[battlerId].item) != POCKET_BERRIES) - return FALSE; // Only berries - if (gStatuses3[battlerId] & STATUS3_SEMI_INVULNERABLE) - return FALSE; // Teatime doesn't affected semi-invulnerable battlers - return TRUE; + if (ItemId_GetPocket(gBattleMons[battlerId].item) != POCKET_BERRIES) + return FALSE; // Only berries + if (gStatuses3[battlerId] & STATUS3_SEMI_INVULNERABLE) + return FALSE; // Teatime doesn't affected semi-invulnerable battlers + return TRUE; } #define COURTCHANGE_SWAP(status, structField, temp) \ From 07a91b9e9b437c719ac44890c0a66a92c7dfb7ce Mon Sep 17 00:00:00 2001 From: SonikkuA-DatH <58025603+SonikkuA-DatH@users.noreply.github.com> Date: Mon, 19 Dec 2022 17:18:43 -0800 Subject: [PATCH 61/84] Update src/battle_script_commands.c Co-authored-by: LOuroboros --- src/battle_script_commands.c | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/src/battle_script_commands.c b/src/battle_script_commands.c index ede9574af..edecee664 100644 --- a/src/battle_script_commands.c +++ b/src/battle_script_commands.c @@ -8166,21 +8166,19 @@ static bool32 IsAbilityMotorAffected(void) static bool32 IsAbilityAbsorbAffected(void) { - u32 moveType; + u32 moveType; - if (gBattleStruct->dynamicMoveType == 0) - moveType = gBattleMoves[gCurrentMove].type; - else if (!(gBattleStruct->dynamicMoveType & 0x40)) - moveType = gBattleStruct->dynamicMoveType & 0x3F; - else - moveType = gBattleMoves[gCurrentMove].type; + if (gBattleStruct->dynamicMoveType == 0) + moveType = gBattleMoves[gCurrentMove].type; + else if (!(gBattleStruct->dynamicMoveType & 0x40)) + moveType = gBattleStruct->dynamicMoveType & 0x3F; + else + moveType = gBattleMoves[gCurrentMove].type; - if (moveType == TYPE_ELECTRIC && GetBattlerAbility(gBattlerTarget) == ABILITY_VOLT_ABSORB) { - return TRUE; - } - else { - return FALSE; - } + if (moveType == TYPE_ELECTRIC && GetBattlerAbility(gBattlerTarget) == ABILITY_VOLT_ABSORB) + return TRUE; + else + return FALSE; } static bool32 IsTeatimeAffected(u32 battlerId) From c8abf00cac0a56cf722355f2751ed7fbe2957386 Mon Sep 17 00:00:00 2001 From: LOuroboros Date: Tue, 20 Dec 2022 05:21:16 -0300 Subject: [PATCH 62/84] Applied corrections Anger Shell: -Made it print a string from the gStatDownStringIds table while lowering Def and Sp. Def -Made it use the shiny new modifybattlerstatstage macro. -Made it activate multiple times per battle, as it should. Well-Baked Body: -Turned it into an absorbing ability. Wind Rider: -Turned it into an absorbing ability. -For its Tailwind interaction, I made it activate only when Tailwind kicks in successfully, instead of whenever it's active at the end of a turn. Guard Dog: -Updated its check inside BattleScript_EffectHitEscape. -Moved it from Cmd_forcerandomswitch to BattleScript_EffectRoar. Wind Power: -Split off its move end effect from Electromorphosis'. Electromorphosis: -Split off its move end effect from Wind Power's. Hadron Engine: -Merged its Switch In effect with Electric Surge's. Protosynthesis: -Fixed its stat boost. Quark Drive: -Fixed its stat boost. Cud Chew: -Updated its ENDTURN effect's berry check. Supreme Overlord: -Tweaked the looping i variable's data type, the order of the variables and the checks inside ApplySupremeOverlordModifier. Earth Eater: -Turned it into an absorbing ability. Misc changes: -Added a variable to set the amount of stat stages raised inside AbilityMoveEffects' case ABILITYEFFECT_ABSORBING. -Added a preproc config to update the text string that they print. -Limited the scope of atkHighestStat and defHighestStat in CalcMoveBasePowerAfterModifiers to Protosynthesis's and Quark Drive's effects. --- data/battle_scripts_1.s | 62 ++++++++++---------- include/battle.h | 1 - include/config/battle.h | 3 +- src/battle_script_commands.c | 4 +- src/battle_util.c | 107 ++++++++++++++++++----------------- 5 files changed, 92 insertions(+), 85 deletions(-) diff --git a/data/battle_scripts_1.s b/data/battle_scripts_1.s index 61392433d..af0352e68 100644 --- a/data/battle_scripts_1.s +++ b/data/battle_scripts_1.s @@ -2876,8 +2876,25 @@ BattleScript_EffectTailwind: waitanimation printstring STRINGID_TAILWINDBLEW waitmessage B_WAIT_TIME_LONG + call TryActivateWindRiderLoop goto BattleScript_MoveEnd +TryActivateWindRiderLoop: + savetarget + setbyte gBattlerTarget, 0 +BattleScript_WindRiderLoop_Iter: + jumpifability BS_TARGET, ABILITY_WIND_RIDER, BattleScript_WindRiderLoop_Activate + goto BattleScript_WindRiderLoop_Increment +BattleScript_WindRiderLoop_Activate: + call BattleScript_AbilityPopUp + modifybattlerstatstage BS_TARGET, STAT_ATK, INCREASE, 1, BattleScript_WindRiderLoop_Increment, ANIM_ON +BattleScript_WindRiderLoop_Increment: + addbyte gBattlerTarget, 0x1 + jumpifbytenotequal gBattlerTarget, gBattlersCount, BattleScript_WindRiderLoop_Iter +BattleScript_WindRiderLoop_Ret: + restoretarget + return + BattleScript_EffectMircleEye: attackcanceler accuracycheck BattleScript_PrintMoveMissed, ACC_CURR_MOVE @@ -2965,9 +2982,9 @@ BattleScript_EffectHitEscape: resultmessage waitmessage B_WAIT_TIME_LONG jumpifmovehadnoeffect BattleScript_MoveEnd + jumpifability BS_TARGET, ABILITY_GUARD_DOG, BattleScript_MoveEnd seteffectwithchance tryfaintmon BS_TARGET - jumpifability BS_TARGET, ABILITY_GUARD_DOG, BattleScript_MoveEnd moveendto MOVEEND_ATTACKER_VISIBLE moveendfrom MOVEEND_TARGET_VISIBLE jumpifbattleend BattleScript_HitEscapeEnd @@ -3557,6 +3574,7 @@ BattleScript_EffectRoar:: attackstring ppreduce jumpifroarfails BattleScript_ButItFailed + jumpifability BS_TARGET, ABILITY_GUARD_DOG, BattleScript_ButItFailed jumpifability BS_TARGET, ABILITY_SUCTION_CUPS, BattleScript_AbilityPreventsPhasingOut jumpifstatus3 BS_TARGET, STATUS3_ROOTED, BattleScript_PrintMonIsRooted accuracycheck BattleScript_ButItFailed, NO_ACC_CALC_CHECK_LOCK_ON @@ -7151,38 +7169,16 @@ BattleScript_AngerShellActivates:: jumpifstat BS_TARGET, CMP_EQUAL, STAT_SPDEF, MIN_STAT_STAGE, BattleScript_ButItFailed BattleScript_AngerShellTryDef:: setbyte sSTAT_ANIM_PLAYED, FALSE - playstatchangeanimation BS_TARGET, BIT_DEF | BIT_SPDEF, STAT_CHANGE_NEGATIVE | STAT_CHANGE_CANT_PREVENT - setstatchanger STAT_DEF, 1, TRUE - statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_CHANGE_ALLOW_PTR | MOVE_EFFECT_CERTAIN, BattleScript_AngerShellTrySpDef - jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, B_MSG_STAT_WONT_INCREASE, BattleScript_AngerShellTrySpDef - printfromtable gStatUpStringIds - waitmessage B_WAIT_TIME_LONG + modifybattlerstatstage BS_ATTACKER, STAT_DEF, DECREASE, 1, BattleScript_AngerShellTrySpDef, ANIM_ON BattleScript_AngerShellTrySpDef: - setstatchanger STAT_SPDEF, 1, TRUE - statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_CHANGE_ALLOW_PTR | MOVE_EFFECT_CERTAIN, BattleScript_AngerShellTryAttack - jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, B_MSG_STAT_WONT_INCREASE, BattleScript_AngerShellTryAttack - printfromtable gStatUpStringIds - waitmessage B_WAIT_TIME_LONG + modifybattlerstatstage BS_ATTACKER, STAT_SPDEF, DECREASE, 1, BattleScript_AngerShellTryAttack, ANIM_ON BattleScript_AngerShellTryAttack: setbyte sSTAT_ANIM_PLAYED, FALSE - playstatchangeanimation BS_TARGET, BIT_SPATK | BIT_ATK | BIT_SPEED, STAT_CHANGE_BY_TWO - setstatchanger STAT_ATK, 1, FALSE - statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_CHANGE_ALLOW_PTR, BattleScript_AngerShellTrySpAtk - jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, B_MSG_STAT_WONT_INCREASE, BattleScript_AngerShellTrySpAtk - printfromtable gStatUpStringIds - waitmessage B_WAIT_TIME_LONG + modifybattlerstatstage BS_ATTACKER, STAT_ATK, INCREASE, 1, BattleScript_AngerShellTrySpAtk, ANIM_ON BattleScript_AngerShellTrySpAtk: - setstatchanger STAT_SPATK, 1, FALSE - statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_CHANGE_ALLOW_PTR, BattleScript_AngerShellTrySpeed - jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, B_MSG_STAT_WONT_INCREASE, BattleScript_AngerShellTrySpeed - printfromtable gStatUpStringIds - waitmessage B_WAIT_TIME_LONG + modifybattlerstatstage BS_ATTACKER, STAT_SPATK, INCREASE, 1, BattleScript_AngerShellTrySpeed, ANIM_ON BattleScript_AngerShellTrySpeed: - setstatchanger STAT_SPEED, 1, FALSE - statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_CHANGE_ALLOW_PTR, BattleScript_AngerShellRet - jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, B_MSG_STAT_WONT_INCREASE, BattleScript_AngerShellRet - printfromtable gStatUpStringIds - waitmessage B_WAIT_TIME_LONG + modifybattlerstatstage BS_ATTACKER, STAT_SPEED, INCREASE, 1, BattleScript_AngerShellRet, ANIM_ON BattleScript_AngerShellRet: return @@ -7210,7 +7206,7 @@ BattleScript_EarthEaterActivates:: call BattleScript_AbilityPopUp pause B_WAIT_TIME_LONG tryhealquarterhealth BS_TARGET, BattleScript_EarthEaterRet - orword gHitMarker, HITMARKER_IGNORE_SUBSTITUTE + orword gHitMarker, HITMARKER_SKIP_DMG_TRACK | HITMARKER_IGNORE_SUBSTITUTE | HITMARKER_PASSIVE_DAMAGE healthbarupdate BS_TARGET datahpupdate BS_TARGET printstring STRINGID_PKMNREGAINEDHEALTH @@ -8451,6 +8447,7 @@ BattleScript_IntimidatePrevented: BattleScript_IntimidateInReverse: copybyte sBATTLER, gBattlerTarget + copybyte gBattlerAbility, gBattlerTarget call BattleScript_AbilityPopUp pause B_WAIT_TIME_SHORT modifybattlerstatstage BS_TARGET, STAT_ATK, INCREASE, 1, BattleScript_IntimidateLoopIncrement, ANIM_ON @@ -8703,8 +8700,15 @@ BattleScript_MoveStatDrain:: setgraphicalstatchangevalues playanimation BS_TARGET, B_ANIM_STATS_CHANGE, sB_ANIM_ARG1 waitanimation +.if B_ABSORBING_ABILITY_STRING >= GEN_5 + statbuffchange STAT_CHANGE_ALLOW_PTR, BattleScript_MoveStatDrain_Cont + printfromtable gStatUpStringIds + waitmessage B_WAIT_TIME_LONG +.else printstring STRINGID_TARGETABILITYSTATRAISE waitmessage B_WAIT_TIME_LONG +.endif +BattleScript_MoveStatDrain_Cont: clearsemiinvulnerablebit tryfaintmon BS_ATTACKER goto BattleScript_MoveEnd diff --git a/include/battle.h b/include/battle.h index 317995333..883b70d26 100644 --- a/include/battle.h +++ b/include/battle.h @@ -653,7 +653,6 @@ struct BattleStruct u8 attackerBeforeBounce:2; u8 targetsDone[MAX_BATTLERS_COUNT]; // Each battler as a bit. u16 overwrittenAbilities[MAX_BATTLERS_COUNT]; // abilities overwritten during battle (keep separate from battle history in case of switching) - bool8 endturnAbilityDone[PARTY_SIZE][2]; // For some reason, adding a switchInAbilityDone equivalent in SpecialStatus didn't work. }; #define F_DYNAMIC_TYPE_1 (1 << 6) diff --git a/include/config/battle.h b/include/config/battle.h index 3f359a6f2..3f06f54da 100644 --- a/include/config/battle.h +++ b/include/config/battle.h @@ -110,6 +110,7 @@ #define B_WEATHER_FORMS GEN_LATEST // In Gen5+, Castform and Cherrim revert to their base form upon losing their respective ability. Cherrim needs Flower Gift to swap forms. #define B_SYMBIOSIS_GEMS GEN_LATEST // In Gen7+, Symbiosis passes an item after a gem-boosted attack. Previously, items are passed before the gem-boosted attack hits, making the item effect apply. #define B_CHECK_IF_CHARGED_UP TRUE // If set to TRUE, certain abilities such as Electromorphosis WILL check if the STATUS3_CHARGED_UP status flag is applied. +#define B_ABSORBING_ABILITY_STRING GEN_LATEST // In Gen5+, the abilities that absorb moves of a certain type use a generic string for stat increases and decreases. // Item settings #define B_HP_BERRIES GEN_LATEST // In Gen4+, berries which restore hp activate immediately after HP drops to half. In Gen3, the effect occurs at the end of the turn. @@ -174,7 +175,7 @@ #define B_LAST_USED_BALL_BUTTON R_BUTTON // If last used ball is implemented, this button (or button combo) will trigger throwing the last used ball. // Other settings -#define B_DOUBLE_WILD_CHANCE 0 // % chance of encountering two Pokémon in a Wild Encounter. +#define B_DOUBLE_WILD_CHANCE 100 // % chance of encountering two Pokémon in a Wild Encounter. #define B_MULTI_BATTLE_WHITEOUT GEN_LATEST // In Gen4+, multi battles end when the Player and also their Partner don't have any more Pokémon to fight. #define B_EVOLUTION_AFTER_WHITEOUT GEN_LATEST // In Gen6+, Pokemon that qualify for evolution after battle will evolve even if the player loses. #define B_WILD_NATURAL_ENEMIES TRUE // If set to TRUE, certain wild mon species will attack other species when partnered in double wild battles (eg. Zangoose vs Seviper) diff --git a/src/battle_script_commands.c b/src/battle_script_commands.c index 98cee311b..ab7e144f7 100644 --- a/src/battle_script_commands.c +++ b/src/battle_script_commands.c @@ -11238,8 +11238,8 @@ static void Cmd_forcerandomswitch(void) } else { - // In normal wild doubles, Roar will always fail if the user's level is less than the target's or if the target's ability is Guard Dog. - if (gBattleMons[gBattlerAttacker].level >= gBattleMons[gBattlerTarget].level && GetBattlerAbility(gBattlerTarget) != ABILITY_GUARD_DOG) + // In normal wild doubles, Roar will always fail if the user's level is less than the target's. + if (gBattleMons[gBattlerAttacker].level >= gBattleMons[gBattlerTarget].level) gBattlescriptCurrInstr = BattleScript_RoarSuccessEndBattle; else gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 1); diff --git a/src/battle_util.c b/src/battle_util.c index df16999eb..9556c8fc3 100644 --- a/src/battle_util.c +++ b/src/battle_util.c @@ -2378,11 +2378,6 @@ u8 DoFieldEndTurnEffects(void) BattleScriptExecute(BattleScript_TailwindEnds); effect++; } - if (IsAbilityOnSide(gActiveBattler, ABILITY_WIND_RIDER)) - { - BattleScriptExecute(BattleScript_WindRiderActivatesEnd2); - effect++; - } if (IsAbilityOnSide(gActiveBattler, ABILITY_WIND_POWER)) { gCurrentMove = MOVE_TAILWIND; @@ -3245,7 +3240,7 @@ u8 DoBattlerEndTurnEffects(void) gBattleStruct->turnEffectsTracker++; break; case ENDTURN_CUD_CHEW: - if (GetBattlerAbility(gActiveBattler) == ABILITY_CUD_CHEW && !gDisableStructs[gActiveBattler].cudChew && GetUsedHeldItem(gActiveBattler) != ITEM_NONE) + if (GetBattlerAbility(gActiveBattler) == ABILITY_CUD_CHEW && !gDisableStructs[gActiveBattler].cudChew && ItemId_GetPocket(GetUsedHeldItem(gActiveBattler)) == POCKET_BERRIES) gDisableStructs[gActiveBattler].cudChew = TRUE; gBattleStruct->turnEffectsTracker++; break; @@ -4773,6 +4768,7 @@ u8 AbilityBattleEffects(u8 caseID, u8 battler, u16 ability, u8 special, u16 move } break; case ABILITY_ELECTRIC_SURGE: + case ABILITY_HADRON_ENGINE: if (TryChangeBattleTerrain(battler, STATUS_FIELD_ELECTRIC_TERRAIN, &gFieldTimers.terrainTimer)) { BattleScriptPushCursorAndCallback(BattleScript_ElectricSurgeActivates); @@ -4957,13 +4953,6 @@ u8 AbilityBattleEffects(u8 caseID, u8 battler, u16 ability, u8 special, u16 move effect++; } break; - case ABILITY_HADRON_ENGINE: - if (TryChangeBattleTerrain(battler, STATUS_FIELD_ELECTRIC_TERRAIN, &gFieldTimers.terrainTimer)) - { - BattleScriptPushCursorAndCallback(BattleScript_ElectricSurgeActivates); - effect++; - } - break; case ABILITY_SUPREME_OVERLORD: if (!gSpecialStatuses[battler].switchInAbilityDone && CountUsablePartyMons(battler) < PARTY_SIZE) { @@ -5233,16 +5222,6 @@ u8 AbilityBattleEffects(u8 caseID, u8 battler, u16 ability, u8 special, u16 move gBattlescriptCurrInstr = BattleScript_DarkTypePreventsPrankster; effect = 1; } - else if (targetAbility == ABILITY_WELL_BAKED_BODY && gBattleMoves[gCurrentMove].type == TYPE_FIRE) - { - gBattlescriptCurrInstr = BattleScript_WellBakedBodyActivates; - effect = 1; - } - else if (targetAbility == ABILITY_WIND_RIDER && gBattleMoves[gCurrentMove].flags & FLAG_WIND_MOVE && !(moveTarget & MOVE_TARGET_USER)) - { - gBattlescriptCurrInstr = BattleScript_WindRiderActivatesMoveEnd; - effect = 1; - } else if (GetBattlerAbility(gBattlerTarget) == ABILITY_GOOD_AS_GOLD && IS_MOVE_STATUS(gCurrentMove) && !(moveTarget & MOVE_TARGET_USER) @@ -5258,6 +5237,7 @@ u8 AbilityBattleEffects(u8 caseID, u8 battler, u16 ability, u8 special, u16 move if (move != MOVE_NONE) { u8 statId; + u8 statAmount = 1; switch (gLastUsedAbility) { case ABILITY_VOLT_ABSORB: @@ -5315,6 +5295,18 @@ u8 AbilityBattleEffects(u8 caseID, u8 battler, u16 ability, u8 special, u16 move } } break; + case ABILITY_WELL_BAKED_BODY: + if (moveType == TYPE_FIRE) + effect = 2, statId = STAT_DEF, statAmount = 2; + break; + case ABILITY_WIND_RIDER: + if (gBattleMoves[gCurrentMove].flags & FLAG_WIND_MOVE && !(GetBattlerMoveTargetType(gBattlerAttacker, gCurrentMove) & MOVE_TARGET_USER)) + effect = 2, statId = STAT_ATK; + break; + case ABILITY_EARTH_EATER: + if (moveType == TYPE_GROUND) + effect = 1; + break; } if (effect == 1) // Drain Hp ability. @@ -5359,9 +5351,11 @@ u8 AbilityBattleEffects(u8 caseID, u8 battler, u16 ability, u8 special, u16 move else gBattlescriptCurrInstr = BattleScript_MoveStatDrain_PPLoss; - SET_STATCHANGER(statId, 1, FALSE); + SET_STATCHANGER(statId, statAmount, FALSE); + #if B_ABSORBING_ABILITY_STRING < GEN_5 gBattleMons[battler].statStages[statId]++; PREPARE_STAT_BUFFER(gBattleTextBuff1, statId); + #endif } } } @@ -5894,10 +5888,8 @@ u8 AbilityBattleEffects(u8 caseID, u8 battler, u16 ability, u8 special, u16 move if (!(gMoveResultFlags & MOVE_RESULT_NO_EFFECT) && !gProtectStructs[gBattlerAttacker].confusionSelfDmg && TARGET_TURN_DAMAGED - && (gBattleMons[gBattlerTarget].hp <= gBattleMons[gBattlerTarget].maxHP / 2) - && !gBattleStruct->endturnAbilityDone[gBattlerPartyIndexes[gBattlerTarget]][GetBattlerSide(gBattlerTarget)]) + && (gBattleMons[gBattlerTarget].hp <= gBattleMons[gBattlerTarget].maxHP / 2)) { - gBattleStruct->endturnAbilityDone[gBattlerPartyIndexes[gBattlerTarget]][GetBattlerSide(gBattlerTarget)] = TRUE; gBattlerAttacker = gBattlerTarget; BattleScriptPushCursor(); gBattlescriptCurrInstr = BattleScript_AngerShellActivates; @@ -5905,7 +5897,6 @@ u8 AbilityBattleEffects(u8 caseID, u8 battler, u16 ability, u8 special, u16 move } break; case ABILITY_WIND_POWER: - case ABILITY_ELECTROMORPHOSIS: if (!(gMoveResultFlags & MOVE_RESULT_NO_EFFECT) && !gProtectStructs[gBattlerAttacker].confusionSelfDmg && TARGET_TURN_DAMAGED @@ -5918,6 +5909,18 @@ u8 AbilityBattleEffects(u8 caseID, u8 battler, u16 ability, u8 special, u16 move effect++; } break; + case ABILITY_ELECTROMORPHOSIS: + if (!(gMoveResultFlags & MOVE_RESULT_NO_EFFECT) + && !gProtectStructs[gBattlerAttacker].confusionSelfDmg + && TARGET_TURN_DAMAGED + && IsBattlerAlive(gBattlerTarget)) + { + gBattlerAttacker = gBattlerTarget; + BattleScriptPushCursor(); + gBattlescriptCurrInstr = BattleScript_WindPowerActivates; + effect++; + } + break; case ABILITY_TOXIC_DEBRIS: if (!(gMoveResultFlags & MOVE_RESULT_NO_EFFECT) && !gProtectStructs[gBattlerAttacker].confusionSelfDmg @@ -5932,18 +5935,6 @@ u8 AbilityBattleEffects(u8 caseID, u8 battler, u16 ability, u8 special, u16 move effect++; } break; - case ABILITY_EARTH_EATER: - if (!(gMoveResultFlags & MOVE_RESULT_NO_EFFECT) - && !gProtectStructs[gBattlerAttacker].confusionSelfDmg - && gBattleMoves[gCurrentMove].type == TYPE_GROUND - && TARGET_TURN_DAMAGED - && IsBattlerAlive(gBattlerTarget)) - { - BattleScriptPushCursor(); - gBattlescriptCurrInstr = BattleScript_EarthEaterActivates; - effect++; - } - break; } break; case ABILITYEFFECT_MOVE_END_ATTACKER: // Same as above, but for attacker @@ -8773,15 +8764,17 @@ static u16 CalcMoveBasePower(u16 move, u8 battlerAtk, u8 battlerDef) // The first ally adds a x1.2 boost, and subsequent allies add an extra x0.1 boost each. static u16 ApplySupremeOverlordModifier(u8 battlerId) { + u32 i; u8 side = GetBattlerSide(battlerId); struct Pokemon *party = (side == B_SIDE_PLAYER) ? gPlayerParty : gEnemyParty; - u8 i; u16 modifier = UQ_4_12(1.0); bool8 appliedFirstBoost = FALSE; for (i = 0; i < PARTY_SIZE; i++) { - if (GetMonData(&party[i], MON_DATA_HP) == 0) + if (GetMonData(&party[i], MON_DATA_SPECIES) != SPECIES_NONE + && !GetMonData(&party[i], MON_DATA_IS_EGG) + && GetMonData(&party[i], MON_DATA_HP) == 0) modifier += (!appliedFirstBoost) ? UQ_4_12(0.2) : UQ_4_12(0.1); appliedFirstBoost = TRUE; } @@ -8799,8 +8792,6 @@ static u32 CalcMoveBasePowerAfterModifiers(u16 move, u8 battlerAtk, u8 battlerDe u32 atkSide = GET_BATTLER_SIDE(battlerAtk); u16 atkAbility = GetBattlerAbility(battlerAtk); u16 defAbility = GetBattlerAbility(battlerDef); - u8 atkHighestStat = GetHighestStatId(battlerAtk); - u8 defHighestStat = GetHighestStatId(battlerDef); // attacker's abilities switch (atkAbility) @@ -8914,12 +8905,18 @@ static u32 CalcMoveBasePowerAfterModifiers(u16 move, u8 battlerAtk, u8 battlerDe MulModifier(&modifier, UQ_4_12(1.5)); break; case ABILITY_PROTOSYNTHESIS: - if (gBattleWeather & B_WEATHER_SUN && WEATHER_HAS_EFFECT && (atkHighestStat == STAT_ATK || atkHighestStat == STAT_SPATK)) - MulModifier(&modifier, UQ_4_12(1.3)); + { + u8 atkHighestStat = GetHighestStatId(battlerAtk); + if (gBattleWeather & B_WEATHER_SUN && WEATHER_HAS_EFFECT && (atkHighestStat == STAT_ATK || atkHighestStat == STAT_SPATK)) + MulModifier(&modifier, UQ_4_12(1.3)); + } break; case ABILITY_QUARK_DRIVE: - if (gFieldStatuses & STATUS_FIELD_ELECTRIC_TERRAIN && (atkHighestStat == STAT_ATK || atkHighestStat == STAT_SPATK)) - MulModifier(&modifier, UQ_4_12(1.3)); + { + u8 atkHighestStat = GetHighestStatId(battlerAtk); + if (gFieldStatuses & STATUS_FIELD_ELECTRIC_TERRAIN && (atkHighestStat == STAT_ATK || atkHighestStat == STAT_SPATK)) + MulModifier(&modifier, UQ_4_12(1.3)); + } break; case ABILITY_ORICHALCUM_PULSE: if (gBattleWeather & B_WEATHER_SUN && WEATHER_HAS_EFFECT) @@ -9006,12 +9003,18 @@ static u32 CalcMoveBasePowerAfterModifiers(u16 move, u8 battlerAtk, u8 battlerDe MulModifier(&modifier, UQ_4_12(2.0)); break; case ABILITY_PROTOSYNTHESIS: - if (gBattleWeather & B_WEATHER_SUN && WEATHER_HAS_EFFECT && (defHighestStat == STAT_DEF || defHighestStat == STAT_SPDEF)) - MulModifier(&modifier, UQ_4_12(0.3)); + { + u8 defHighestStat = GetHighestStatId(battlerDef); + if (gBattleWeather & B_WEATHER_SUN && WEATHER_HAS_EFFECT && (defHighestStat == STAT_DEF || defHighestStat == STAT_SPDEF)) + MulModifier(&modifier, UQ_4_12(0.7)); + } break; case ABILITY_QUARK_DRIVE: - if (gFieldStatuses & STATUS_FIELD_ELECTRIC_TERRAIN && (defHighestStat == STAT_DEF || defHighestStat == STAT_SPDEF)) - MulModifier(&modifier, UQ_4_12(0.3)); + { + u8 defHighestStat = GetHighestStatId(battlerDef); + if (gFieldStatuses & STATUS_FIELD_ELECTRIC_TERRAIN && (defHighestStat == STAT_DEF || defHighestStat == STAT_SPDEF)) + MulModifier(&modifier, UQ_4_12(0.7)); + } break; } From 5eaf0e15fc764716cefa40b0d01873fa5b51c4ae Mon Sep 17 00:00:00 2001 From: SonikkuA-DatH <58025603+SonikkuA-DatH@users.noreply.github.com> Date: Tue, 20 Dec 2022 18:08:01 -0800 Subject: [PATCH 63/84] Update data/battle_scripts_1.s -_- Co-authored-by: Eduardo Quezada D'Ottone --- data/battle_scripts_1.s | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data/battle_scripts_1.s b/data/battle_scripts_1.s index c3914c11d..d4b781b22 100644 --- a/data/battle_scripts_1.s +++ b/data/battle_scripts_1.s @@ -416,7 +416,7 @@ gBattleScriptsForMoveEffects:: .4byte BattleScript_EffectDoubleShock @ EFFECT_DOUBLE_SHOCK .4byte BattleScript_EffectSpecialAttackUpHit @ EFFECT_SPECIAL_ATTACK_UP_HIT .4byte BattleScript_EffectVictoryDance @ EFFECT_VICTORY_DANCE - .4byte BattleScript_EffectTeatime @ EFFECT_TEATIME + .4byte BattleScript_EffectTeatime @ EFFECT_TEATIME BattleScript_EffectTeatime:: attackcanceler From 2c2807669620100b056e149d9a3012ed5e0e6010 Mon Sep 17 00:00:00 2001 From: SonikkuA-DatH <58025603+SonikkuA-DatH@users.noreply.github.com> Date: Tue, 20 Dec 2022 18:08:38 -0800 Subject: [PATCH 64/84] Update include/constants/battle_script_commands.h Co-authored-by: Eduardo Quezada D'Ottone --- include/constants/battle_script_commands.h | 1 - 1 file changed, 1 deletion(-) diff --git a/include/constants/battle_script_commands.h b/include/constants/battle_script_commands.h index e12f957b4..2e3cab2ec 100644 --- a/include/constants/battle_script_commands.h +++ b/include/constants/battle_script_commands.h @@ -253,7 +253,6 @@ #define VARIOUS_TEATIME_INVUL 162 #define VARIOUS_TEATIME_TARGETS 163 - // Cmd_manipulatedamage #define DMG_CHANGE_SIGN 0 #define DMG_RECOIL_FROM_MISS 1 From 8d28d23e74a023404626dbd23c9912901e55d749 Mon Sep 17 00:00:00 2001 From: SonikkuA-DatH <58025603+SonikkuA-DatH@users.noreply.github.com> Date: Tue, 20 Dec 2022 18:09:15 -0800 Subject: [PATCH 65/84] Update src/battle_util.c Co-authored-by: Eduardo Quezada D'Ottone --- src/battle_util.c | 1 - 1 file changed, 1 deletion(-) diff --git a/src/battle_util.c b/src/battle_util.c index 1e21a380a..8faa3be0f 100644 --- a/src/battle_util.c +++ b/src/battle_util.c @@ -418,7 +418,6 @@ void HandleAction_UseMove(void) battlerAbility = GetBattlerAbility(gActiveBattler); RecordAbilityBattle(gActiveBattler, gBattleMons[gActiveBattler].ability); - if (battlerAbility == ABILITY_LIGHTNING_ROD && gCurrentMove != MOVE_TEATIME) gSpecialStatuses[gActiveBattler].lightningRodRedirected = TRUE; else if (battlerAbility == ABILITY_STORM_DRAIN) From 405a42b246c9b8d6bcadfd9732b20a19eb839d8a Mon Sep 17 00:00:00 2001 From: SonikkuA-DatH <58025603+SonikkuA-DatH@users.noreply.github.com> Date: Tue, 20 Dec 2022 18:17:49 -0800 Subject: [PATCH 66/84] Update battle_anim_effects_1.c spacing --- src/battle_anim_effects_1.c | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/src/battle_anim_effects_1.c b/src/battle_anim_effects_1.c index 77abc8681..ea36b2eac 100644 --- a/src/battle_anim_effects_1.c +++ b/src/battle_anim_effects_1.c @@ -2449,35 +2449,35 @@ const struct SpriteTemplate gFollowMeFingerSpriteTemplate = const union AffineAnimCmd gTeaAffineAnimCmds1[] = { - AFFINEANIMCMD_FRAME(0x10, 0x10, 0, 0), - AFFINEANIMCMD_FRAME(0x1E, 0x1E, 0, 8), - AFFINEANIMCMD_END, + AFFINEANIMCMD_FRAME(0x10, 0x10, 0, 0), + AFFINEANIMCMD_FRAME(0x1E, 0x1E, 0, 8), + AFFINEANIMCMD_END, }; const union AffineAnimCmd gTeaAffineAnimCmds2[] = { - AFFINEANIMCMD_FRAME(0x0, 0x0, -3, 11), - AFFINEANIMCMD_FRAME(0x0, 0x0, 3, 11), - AFFINEANIMCMD_LOOP(2), - AFFINEANIMCMD_FRAME(0xFFE2, 0xFFE2, 0, 8), - AFFINEANIMCMD_END, + AFFINEANIMCMD_FRAME(0x0, 0x0, -3, 11), + AFFINEANIMCMD_FRAME(0x0, 0x0, 3, 11), + AFFINEANIMCMD_LOOP(2), + AFFINEANIMCMD_FRAME(0xFFE2, 0xFFE2, 0, 8), + AFFINEANIMCMD_END, }; const union AffineAnimCmd *const gTeaAffineAnimTable[] = { - gTeaAffineAnimCmds1, - gTeaAffineAnimCmds2, + gTeaAffineAnimCmds1, + gTeaAffineAnimCmds2, }; const struct SpriteTemplate gTeapotSpriteTemplate = { - .tileTag = ANIM_TAG_TEAPOT, - .paletteTag = ANIM_TAG_TEAPOT, - .oam = &gOamData_AffineDouble_ObjNormal_64x64, - .anims = gDummySpriteAnimTable, - .images = NULL, - .affineAnims = gTeaAffineAnimTable, - .callback = AnimMetronomeFinger, + .tileTag = ANIM_TAG_TEAPOT, + .paletteTag = ANIM_TAG_TEAPOT, + .oam = &gOamData_AffineDouble_ObjNormal_64x64, + .anims = gDummySpriteAnimTable, + .images = NULL, + .affineAnims = gTeaAffineAnimTable, + .callback = AnimMetronomeFinger, }; const union AnimCmd gTauntFingerAnimCmds1[] = From d943f891c5fa790fef9f8c3847302a213c0e9361 Mon Sep 17 00:00:00 2001 From: LOuroboros Date: Wed, 21 Dec 2022 10:08:16 -0300 Subject: [PATCH 67/84] Applied Wind Power and Wind Rider correction -Renamed TryActivateWindRiderLoop to BattleScript_TryTailwindAbilitiesLoop -Modified how it handles the check for Wind Rider by using a various and incorporated Wind Power into the mix because that ability is affected by Tailwind as well. --- asm/macros/battle_script.inc | 5 +++++ data/battle_scripts_1.s | 18 ++++++++---------- include/constants/battle_script_commands.h | 1 + src/battle_script_commands.c | 17 +++++++++++++++++ src/battle_util.c | 6 ------ 5 files changed, 31 insertions(+), 16 deletions(-) diff --git a/asm/macros/battle_script.inc b/asm/macros/battle_script.inc index ee001e244..994cf4d52 100644 --- a/asm/macros/battle_script.inc +++ b/asm/macros/battle_script.inc @@ -2005,6 +2005,11 @@ .byte \stat .endm + .macro trywindriderpower battler:req, ptr:req + various \battler, VARIOUS_TRY_WIND_RIDER_POWER + .4byte \ptr + .endm + @ helpful macros .macro setstatchanger stat:req, stages:req, down:req setbyte sSTATCHANGER, \stat | \stages << 3 | \down << 7 diff --git a/data/battle_scripts_1.s b/data/battle_scripts_1.s index 615017713..0f5f2d3a5 100644 --- a/data/battle_scripts_1.s +++ b/data/battle_scripts_1.s @@ -2876,22 +2876,20 @@ BattleScript_EffectTailwind: waitanimation printstring STRINGID_TAILWINDBLEW waitmessage B_WAIT_TIME_LONG - call TryActivateWindRiderLoop + call BattleScript_TryTailwindAbilitiesLoop goto BattleScript_MoveEnd -TryActivateWindRiderLoop: +BattleScript_TryTailwindAbilitiesLoop: savetarget setbyte gBattlerTarget, 0 -BattleScript_WindRiderLoop_Iter: - jumpifability BS_TARGET, ABILITY_WIND_RIDER, BattleScript_WindRiderLoop_Activate - goto BattleScript_WindRiderLoop_Increment -BattleScript_WindRiderLoop_Activate: +BattleScript_TryTailwindAbilitiesLoop_Iter: + trywindriderpower BS_TARGET, BattleScript_TryTailwindAbilitiesLoop_Increment call BattleScript_AbilityPopUp - modifybattlerstatstage BS_TARGET, STAT_ATK, INCREASE, 1, BattleScript_WindRiderLoop_Increment, ANIM_ON -BattleScript_WindRiderLoop_Increment: + modifybattlerstatstage BS_TARGET, STAT_ATK, INCREASE, 1, BattleScript_TryTailwindAbilitiesLoop_Increment, ANIM_ON +BattleScript_TryTailwindAbilitiesLoop_Increment: addbyte gBattlerTarget, 0x1 - jumpifbytenotequal gBattlerTarget, gBattlersCount, BattleScript_WindRiderLoop_Iter -BattleScript_WindRiderLoop_Ret: + jumpifbytenotequal gBattlerTarget, gBattlersCount, BattleScript_TryTailwindAbilitiesLoop_Iter +BattleScript_TryTailwindAbilitiesLoop_Ret: restoretarget return diff --git a/include/constants/battle_script_commands.h b/include/constants/battle_script_commands.h index 0fcb2bbb0..3aba0144d 100644 --- a/include/constants/battle_script_commands.h +++ b/include/constants/battle_script_commands.h @@ -247,6 +247,7 @@ #define VARIOUS_GET_BATTLER_SIDE 156 #define VARIOUS_CHECK_PARENTAL_BOND_COUNTER 157 #define VARIOUS_SWAP_STATS 158 +#define VARIOUS_TRY_WIND_RIDER_POWER 159 // Cmd_manipulatedamage #define DMG_CHANGE_SIGN 0 diff --git a/src/battle_script_commands.c b/src/battle_script_commands.c index 089585d5a..807cafa28 100644 --- a/src/battle_script_commands.c +++ b/src/battle_script_commands.c @@ -10099,6 +10099,23 @@ static void Cmd_various(void) PREPARE_STAT_BUFFER(gBattleTextBuff1, statId); } break; + case VARIOUS_TRY_WIND_RIDER_POWER: + { + u16 ability = GetBattlerAbility(gActiveBattler); + if (GetBattlerSide(gActiveBattler) == GetBattlerSide(gBattlerAttacker) + && (ability == ABILITY_WIND_RIDER || ability == ABILITY_WIND_POWER)) + { + gLastUsedAbility = ability; + RecordAbilityBattle(gActiveBattler, gLastUsedAbility); + gBattlerAbility = gBattleScripting.battler = gActiveBattler; + gBattlescriptCurrInstr += 7; + } + else + { + gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 3); + } + } + return; } // End of switch (gBattlescriptCurrInstr[2]) gBattlescriptCurrInstr += 3; diff --git a/src/battle_util.c b/src/battle_util.c index ba26128f3..b11a10e52 100644 --- a/src/battle_util.c +++ b/src/battle_util.c @@ -2378,12 +2378,6 @@ u8 DoFieldEndTurnEffects(void) BattleScriptExecute(BattleScript_TailwindEnds); effect++; } - if (IsAbilityOnSide(gActiveBattler, ABILITY_WIND_POWER)) - { - gCurrentMove = MOVE_TAILWIND; - BattleScriptExecute(BattleScript_WindPowerActivatesEnd2); - effect++; - } } gBattleStruct->turnSideTracker++; if (effect != 0) From 31cd076f9dbc3053936370c69126289811ce25df Mon Sep 17 00:00:00 2001 From: LOuroboros Date: Wed, 21 Dec 2022 11:14:59 -0300 Subject: [PATCH 68/84] Oopsie. Wind Power doesn't boost Attack lol --- data/battle_scripts_1.s | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/data/battle_scripts_1.s b/data/battle_scripts_1.s index 0f5f2d3a5..4cb11f183 100644 --- a/data/battle_scripts_1.s +++ b/data/battle_scripts_1.s @@ -2884,8 +2884,8 @@ BattleScript_TryTailwindAbilitiesLoop: setbyte gBattlerTarget, 0 BattleScript_TryTailwindAbilitiesLoop_Iter: trywindriderpower BS_TARGET, BattleScript_TryTailwindAbilitiesLoop_Increment - call BattleScript_AbilityPopUp - modifybattlerstatstage BS_TARGET, STAT_ATK, INCREASE, 1, BattleScript_TryTailwindAbilitiesLoop_Increment, ANIM_ON + jumpifability BS_TARGET, ABILITY_WIND_RIDER, BattleScript_TryTailwindAbilitiesLoop_WindRider + jumpifability BS_TARGET, ABILITY_WIND_POWER, BattleScript_TryTailwindAbilitiesLoop_WindPower BattleScript_TryTailwindAbilitiesLoop_Increment: addbyte gBattlerTarget, 0x1 jumpifbytenotequal gBattlerTarget, gBattlersCount, BattleScript_TryTailwindAbilitiesLoop_Iter @@ -2893,6 +2893,21 @@ BattleScript_TryTailwindAbilitiesLoop_Ret: restoretarget return +BattleScript_TryTailwindAbilitiesLoop_WindRider: + call BattleScript_AbilityPopUp + modifybattlerstatstage BS_TARGET, STAT_ATK, INCREASE, 1, BattleScript_TryTailwindAbilitiesLoop_Increment, ANIM_ON + goto BattleScript_TryTailwindAbilitiesLoop_Increment + +BattleScript_TryTailwindAbilitiesLoop_WindPower: + call BattleScript_AbilityPopUp + copybyte sSAVED_BATTLER, gBattlerAttacker + copybyte gBattlerAttacker, gBattlerTarget + setcharge + printstring STRINGID_BEINGHITCHARGEDPKMNWITHPOWER + waitmessage B_WAIT_TIME_LONG + copybyte gBattlerAttacker, sSAVED_BATTLER + goto BattleScript_TryTailwindAbilitiesLoop_Increment + BattleScript_EffectMircleEye: attackcanceler accuracycheck BattleScript_PrintMoveMissed, ACC_CURR_MOVE From 0a5154499e46901191a2de7fe649fe897bb7f92a Mon Sep 17 00:00:00 2001 From: SonikkuA-DatH <58025603+SonikkuA-DatH@users.noreply.github.com> Date: Wed, 21 Dec 2022 14:27:39 -0800 Subject: [PATCH 69/84] Update battle_scripts_1.s Compensating Substitute, removing item --- data/battle_scripts_1.s | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/data/battle_scripts_1.s b/data/battle_scripts_1.s index d4b781b22..7690cce41 100644 --- a/data/battle_scripts_1.s +++ b/data/battle_scripts_1.s @@ -431,11 +431,12 @@ BattleScript_TeatimeLoop: jumpifrodaffected BS_TARGET, BattleScript_Teatimerod jumpifabsorbaffected BS_TARGET, BattleScript_Teatimesorb jumpifmotoraffected BS_TARGET, BattleScript_Teatimemotor - orword gHitMarker, HITMARKER_NO_ANIMATIONS + orword gHitMarker, HITMARKER_NO_ANIMATIONS, HITMARKER_IGNORE_SUBSTITUTE | HITMARKER_IGNORE_DISGUISE setbyte sBERRY_OVERRIDE, TRUE @ override the requirements for eating berries consumeberry BS_TARGET, TRUE @ consume the berry, then restore the item from changedItems - bicword gHitMarker, HITMARKER_NO_ANIMATIONS + bicword gHitMarker, HITMARKER_NO_ANIMATIONS, HITMARKER_IGNORE_SUBSTITUTE | HITMARKER_IGNORE_DISGUISE setbyte sBERRY_OVERRIDE, FALSE + removeitem BS_TARGET moveendto MOVEEND_NEXT_TARGET jumpifnexttargetvalid BattleScript_TeatimeLoop moveendcase MOVEEND_CLEAR_BITS From c40e15f8c5cf393b68a9b40c6bb49acc3edb40da Mon Sep 17 00:00:00 2001 From: LOuroboros Date: Wed, 21 Dec 2022 19:43:41 -0300 Subject: [PATCH 70/84] Added Sheer Force check to Anger Shell --- src/battle_util.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/battle_util.c b/src/battle_util.c index b11a10e52..ac34d5360 100644 --- a/src/battle_util.c +++ b/src/battle_util.c @@ -5881,7 +5881,8 @@ u8 AbilityBattleEffects(u8 caseID, u8 battler, u16 ability, u8 special, u16 move if (!(gMoveResultFlags & MOVE_RESULT_NO_EFFECT) && !gProtectStructs[gBattlerAttacker].confusionSelfDmg && TARGET_TURN_DAMAGED - && (gBattleMons[gBattlerTarget].hp <= gBattleMons[gBattlerTarget].maxHP / 2)) + && (gBattleMons[gBattlerTarget].hp <= gBattleMons[gBattlerTarget].maxHP / 2) + && !(TestSheerForceFlag(gBattlerAttacker, gCurrentMove))) { gBattlerAttacker = gBattlerTarget; BattleScriptPushCursor(); From c4db74460a931f2cdf8d31a4db841bbe232a0b7b Mon Sep 17 00:00:00 2001 From: SonikkuA-DatH <58025603+SonikkuA-DatH@users.noreply.github.com> Date: Wed, 21 Dec 2022 14:50:06 -0800 Subject: [PATCH 71/84] Update battle_util.c Noted Protection Bypassing --- src/battle_util.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/battle_util.c b/src/battle_util.c index 8faa3be0f..89a051a78 100644 --- a/src/battle_util.c +++ b/src/battle_util.c @@ -8012,6 +8012,11 @@ bool32 IsBattlerProtected(u8 battlerId, u16 move) else if (gProtectStructs[battlerId].protected) return FALSE; } + + if (move == MOVE_TEATIME) + { + return FALSE; + } // Protective Pads doesn't stop Unseen Fist from bypassing Protect effects, so IsMoveMakingContact() isn't used here. // This means extra logic is needed to handle Shell Side Arm. From 3e807e5b1efd8f8640aff5a7f7984b961f9626b1 Mon Sep 17 00:00:00 2001 From: SonikkuA-DatH <58025603+SonikkuA-DatH@users.noreply.github.com> Date: Wed, 21 Dec 2022 15:12:06 -0800 Subject: [PATCH 72/84] Update battle_scripts_1.s fix ORs --- data/battle_scripts_1.s | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/data/battle_scripts_1.s b/data/battle_scripts_1.s index 7690cce41..760f5416b 100644 --- a/data/battle_scripts_1.s +++ b/data/battle_scripts_1.s @@ -431,10 +431,10 @@ BattleScript_TeatimeLoop: jumpifrodaffected BS_TARGET, BattleScript_Teatimerod jumpifabsorbaffected BS_TARGET, BattleScript_Teatimesorb jumpifmotoraffected BS_TARGET, BattleScript_Teatimemotor - orword gHitMarker, HITMARKER_NO_ANIMATIONS, HITMARKER_IGNORE_SUBSTITUTE | HITMARKER_IGNORE_DISGUISE + orword gHitMarker, HITMARKER_NO_ANIMATIONS | HITMARKER_IGNORE_SUBSTITUTE | HITMARKER_IGNORE_DISGUISE setbyte sBERRY_OVERRIDE, TRUE @ override the requirements for eating berries consumeberry BS_TARGET, TRUE @ consume the berry, then restore the item from changedItems - bicword gHitMarker, HITMARKER_NO_ANIMATIONS, HITMARKER_IGNORE_SUBSTITUTE | HITMARKER_IGNORE_DISGUISE + bicword gHitMarker, HITMARKER_NO_ANIMATIONS | HITMARKER_IGNORE_SUBSTITUTE | HITMARKER_IGNORE_DISGUISE setbyte sBERRY_OVERRIDE, FALSE removeitem BS_TARGET moveendto MOVEEND_NEXT_TARGET From 17410fa9c5ac0d03f0bc4ae98c7173d7e3ff6901 Mon Sep 17 00:00:00 2001 From: LOuroboros Date: Mon, 26 Dec 2022 00:47:07 -0300 Subject: [PATCH 73/84] Fixed some issues of the Intimidate's rework --- data/battle_scripts_1.s | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/data/battle_scripts_1.s b/data/battle_scripts_1.s index 94a220608..3b22a684f 100644 --- a/data/battle_scripts_1.s +++ b/data/battle_scripts_1.s @@ -8278,12 +8278,13 @@ BattleScript_IntimidateLoop: jumpifability BS_TARGET, ABILITY_OBLIVIOUS, BattleScript_IntimidatePrevented .endif BattleScript_IntimidateEffect: - copybyte sBATTLER, gBattlerTarget - statbuffchange STAT_CHANGE_NOT_PROTECT_AFFECTED | MOVE_EFFECT_CERTAIN, NULL + copybyte sBATTLER, gBattlerAttacker + statbuffchange STAT_CHANGE_NOT_PROTECT_AFFECTED | STAT_CHANGE_ALLOW_PTR, BattleScript_IntimidateLoopIncrement setgraphicalstatchangevalues playanimation BS_TARGET, B_ANIM_STATS_CHANGE, sB_ANIM_ARG1 printstring STRINGID_PKMNCUTSATTACKWITH waitmessage B_WAIT_TIME_LONG + copybyte sBATTLER, gBattlerTarget call BattleScript_TryAdrenalineOrb BattleScript_IntimidateLoopIncrement: addbyte gBattlerTarget, 1 From 263ed337553f6ee0df444ab2233b7835421a6564 Mon Sep 17 00:00:00 2001 From: Eduardo Quezada D'Ottone Date: Mon, 26 Dec 2022 11:56:27 -0300 Subject: [PATCH 74/84] Fixed Eggs sometimes reading garbage graphic data. --- src/pokemon.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/pokemon.c b/src/pokemon.c index 8e8166fb3..7d121289e 100644 --- a/src/pokemon.c +++ b/src/pokemon.c @@ -8621,6 +8621,8 @@ void TrySpecialOverworldEvo(void) bool32 ShouldShowFemaleDifferences(u16 species, u32 personality) { + if (species >= NUM_SPECIES) + return FALSE; return (gSpeciesInfo[species].flags & SPECIES_FLAG_GENDER_DIFFERENCE) && GetGenderFromSpeciesAndPersonality(species, personality) == MON_FEMALE; } From 200b71be028d6d8781a2e31fe42495d1d0788b3e Mon Sep 17 00:00:00 2001 From: SphericalIce Date: Tue, 27 Dec 2022 10:49:57 +0000 Subject: [PATCH 75/84] Fix Beat Up's battle script to avoid an out-of-bounds array access --- asm/macros/battle_script.inc | 2 +- data/battle_scripts_1.s | 16 +++++++++------- include/battle.h | 1 + src/battle_main.c | 1 + src/battle_script_commands.c | 5 +++++ src/battle_util.c | 7 ++++--- 6 files changed, 21 insertions(+), 11 deletions(-) diff --git a/asm/macros/battle_script.inc b/asm/macros/battle_script.inc index 61ad67549..9ad159ef3 100644 --- a/asm/macros/battle_script.inc +++ b/asm/macros/battle_script.inc @@ -1022,7 +1022,7 @@ .4byte \ptr .endm - .macro trydobeatup endPtr:req, failPtr:req + .macro trydobeatup endPtr=NULL, failPtr=NULL .byte 0xc4 .4byte \endPtr .4byte \failPtr diff --git a/data/battle_scripts_1.s b/data/battle_scripts_1.s index 3b22a684f..244faf2c6 100644 --- a/data/battle_scripts_1.s +++ b/data/battle_scripts_1.s @@ -5183,10 +5183,18 @@ BattleScript_EffectTeleportNew: BattleScript_EffectTeleportNewEnd: goto BattleScript_MoveEnd -.if B_BEAT_UP < GEN_5 BattleScript_EffectBeatUp:: attackcanceler accuracycheck BattleScript_PrintMoveMissed, ACC_CURR_MOVE +.if B_BEAT_UP >= GEN_5 + attackstring + ppreduce + critcalc + damagecalc + adjustdamage + trydobeatup + goto BattleScript_HitFromAtkAnimation +.else attackstring pause B_WAIT_TIME_SHORT ppreduce @@ -5216,12 +5224,6 @@ BattleScript_BeatUpAttack:: goto BattleScript_BeatUpLoop BattleScript_BeatUpEnd:: end -.else -BattleScript_EffectBeatUp:: - attackcanceler - accuracycheck BattleScript_PrintMoveMissed, ACC_CURR_MOVE - addbyte gBattleCommunication, 1 - goto BattleScript_HitFromAtkString .endif BattleScript_EffectSemiInvulnerable:: diff --git a/include/battle.h b/include/battle.h index a38c28db8..cf06a588a 100644 --- a/include/battle.h +++ b/include/battle.h @@ -650,6 +650,7 @@ struct BattleStruct u8 skyDropTargets[MAX_BATTLERS_COUNT]; // For Sky Drop, to account for if multiple Pokemon use Sky Drop in a double battle. // When using a move which hits multiple opponents which is then bounced by a target, we need to make sure, the move hits both opponents, the one with bounce, and the one without. u8 attackerBeforeBounce:2; + u8 beatUpSlot:3; u8 targetsDone[MAX_BATTLERS_COUNT]; // Each battler as a bit. u16 overwrittenAbilities[MAX_BATTLERS_COUNT]; // abilities overwritten during battle (keep separate from battle history in case of switching) }; diff --git a/src/battle_main.c b/src/battle_main.c index d138cf231..d7607e37a 100644 --- a/src/battle_main.c +++ b/src/battle_main.c @@ -3039,6 +3039,7 @@ static void BattleStartClearSetData(void) gBattleStruct->stickyWebUser = 0xFF; gBattleStruct->appearedInBattle = 0; + gBattleStruct->beatUpSlot = 0; for (i = 0; i < PARTY_SIZE; i++) { diff --git a/src/battle_script_commands.c b/src/battle_script_commands.c index 9c780c28e..44cc43227 100644 --- a/src/battle_script_commands.c +++ b/src/battle_script_commands.c @@ -12855,6 +12855,10 @@ static void Cmd_trysetfutureattack(void) static void Cmd_trydobeatup(void) { +#if B_BEAT_UP >= GEN_5 + gBattleStruct->beatUpSlot++; + gBattlescriptCurrInstr += 9; +#else struct Pokemon *party; if (GetBattlerSide(gBattlerAttacker) == B_SIDE_PLAYER) @@ -12898,6 +12902,7 @@ static void Cmd_trydobeatup(void) else gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 5); } +#endif } static void Cmd_setsemiinvulnerablebit(void) diff --git a/src/battle_util.c b/src/battle_util.c index 00e3b869b..75e77a86b 100644 --- a/src/battle_util.c +++ b/src/battle_util.c @@ -230,8 +230,9 @@ static u8 CalcBeatUpPower(void) party = gPlayerParty; else party = gEnemyParty; - // Party slot is set in the battle script for Beat Up - species = GetMonData(&party[gBattleCommunication[0] - 1], MON_DATA_SPECIES); + + // Party slot is incremented by the battle script for Beat Up after this damage calculation + species = GetMonData(&party[gBattleStruct->beatUpSlot], MON_DATA_SPECIES); basePower = (gSpeciesInfo[species].baseAttack / 10) + 5; return basePower; @@ -3875,7 +3876,7 @@ u8 AtkCanceller_UnableToUseMove(void) gMultiHitCounter++; } - gBattleCommunication[0] = 0; // For later + gBattleStruct->beatUpSlot = 0; PREPARE_BYTE_NUMBER_BUFFER(gBattleScripting.multihitString, 1, 0) } #endif From 1fc86e52b5a387776b0ceb157ad678976d20d637 Mon Sep 17 00:00:00 2001 From: Eduardo Quezada Date: Tue, 27 Dec 2022 21:18:20 -0300 Subject: [PATCH 76/84] Reverting P_SHINY_BASE_CHANCE implementation as it wasn't accuerate to Gen6+ --- include/config/pokemon.h | 1 - src/pokemon.c | 4 ---- 2 files changed, 5 deletions(-) diff --git a/include/config/pokemon.h b/include/config/pokemon.h index b2b08d249..3d8d7fd48 100644 --- a/include/config/pokemon.h +++ b/include/config/pokemon.h @@ -9,7 +9,6 @@ #define P_LEGENDARY_PERFECT_IVS GEN_LATEST // Since Gen 6, Legendaries, Mythicals and Ultra Beasts found in the wild or given through gifts have at least 3 perfect IVs. #define P_KADABRA_EVERSTONE GEN_LATEST // Since Gen 4, Kadabra can evolve even when holding an Everstone. #define P_NIDORAN_M_DITTO_BREED GEN_LATEST // Since Gen 5, when Nidoran♂ breeds with Ditto it can produce Nidoran♀ offspring. Before, it would only yield male offspring. This change also applies to Volbeat. -#define P_SHINY_BASE_CHANCE GEN_LATEST // Since Gen 6, the base chances of encountering a Shiny Pokémon was raised to 1/4096. This config adds an extra roll to the calculation, which effectively does the same thing. // Flag settings // To use the following features in scripting, replace the 0s with the flag ID you're assigning it to. diff --git a/src/pokemon.c b/src/pokemon.c index 8e8166fb3..46c6c94f1 100644 --- a/src/pokemon.c +++ b/src/pokemon.c @@ -3481,11 +3481,7 @@ void CreateBoxMon(struct BoxPokemon *boxMon, u16 species, u8 level, u8 fixedIV, else #endif { - #if P_SHINY_BASE_CHANCE >= GEN_6 - u32 totalRerolls = 1; - #else u32 totalRerolls = 0; - #endif if (CheckBagHasItem(ITEM_SHINY_CHARM, 1)) totalRerolls += I_SHINY_CHARM_REROLLS; if (LURE_STEP_COUNT != 0) From 9bad91b1674ff5c4b6e5c012538fb5b85bec27e9 Mon Sep 17 00:00:00 2001 From: LOuroboros Date: Wed, 28 Dec 2022 08:33:31 -0300 Subject: [PATCH 77/84] Applied minor tweaks -Made setbeakblast affect a specified battler instead of the gBattlerAttacker to justify the macro's layout. -Added Shell Trap to the list of moves unaffected by Encore. -Renamed CheckFocusPunch_ClearVarsBeforeTurnStarts into CheckChosenMoveForEffectsBeforeTurnStarts because that function doesn't just check for Focus Punch anymore, and it doesn't clear any variables either. --- src/battle_main.c | 10 +++++----- src/battle_script_commands.c | 7 ++++--- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/src/battle_main.c b/src/battle_main.c index d7607e37a..40a91a1bb 100644 --- a/src/battle_main.c +++ b/src/battle_main.c @@ -101,7 +101,7 @@ static void SetActionsAndBattlersTurnOrder(void); static void UpdateBattlerPartyOrdersOnSwitch(void); static bool8 AllAtActionConfirmed(void); static void TryChangeTurnOrder(void); -static void CheckFocusPunch_ClearVarsBeforeTurnStarts(void); +static void CheckChosenMoveForEffectsBeforeTurnStarts(void); static void CheckMegaEvolutionBeforeTurn(void); static void CheckQuickClaw_CustapBerryActivation(void); static void FreeResetData_ReturnToOvOrDoEvolutions(void); @@ -4879,7 +4879,7 @@ static void CheckMegaEvolutionBeforeTurn(void) } #if B_MEGA_EVO_TURN_ORDER <= GEN_6 - gBattleMainFunc = CheckFocusPunch_ClearVarsBeforeTurnStarts; + gBattleMainFunc = CheckChosenMoveForEffectsBeforeTurnStarts; gBattleStruct->focusPunchBattlerId = 0; #else gBattleMainFunc = TryChangeTurnOrder; // This will just do nothing if no mon has mega evolved @@ -4904,11 +4904,11 @@ static void TryChangeTurnOrder(void) } } } - gBattleMainFunc = CheckFocusPunch_ClearVarsBeforeTurnStarts; + gBattleMainFunc = CheckChosenMoveForEffectsBeforeTurnStarts; gBattleStruct->focusPunchBattlerId = 0; } -static void CheckFocusPunch_ClearVarsBeforeTurnStarts(void) +static void CheckChosenMoveForEffectsBeforeTurnStarts(void) { u32 i; @@ -4922,7 +4922,7 @@ static void CheckFocusPunch_ClearVarsBeforeTurnStarts(void) && !(gDisableStructs[gBattlerAttacker].truantCounter) && !(gProtectStructs[gActiveBattler].noValidMoves)) { - switch(gChosenMoveByBattler[gActiveBattler]) + switch (gChosenMoveByBattler[gActiveBattler]) { case MOVE_FOCUS_PUNCH: BattleScriptExecute(BattleScript_FocusPunchSetUp); diff --git a/src/battle_script_commands.c b/src/battle_script_commands.c index 44cc43227..73734d4f8 100644 --- a/src/battle_script_commands.c +++ b/src/battle_script_commands.c @@ -10031,7 +10031,7 @@ static void Cmd_various(void) gBattleMons[gActiveBattler].item = gLastUsedItem; break; case VARIOUS_SET_BEAK_BLAST: - gProtectStructs[gBattlerAttacker].beakBlastCharge = TRUE; + gProtectStructs[gActiveBattler].beakBlastCharge = TRUE; break; case VARIOUS_SWAP_SIDE_STATUSES: CourtChangeSwapSideStatuses(); @@ -11926,8 +11926,9 @@ static void Cmd_trysetencore(void) } if (gLastMoves[gBattlerTarget] == MOVE_STRUGGLE - || gLastMoves[gBattlerTarget] == MOVE_ENCORE - || gLastMoves[gBattlerTarget] == MOVE_MIRROR_MOVE) + || gLastMoves[gBattlerTarget] == MOVE_ENCORE + || gLastMoves[gBattlerTarget] == MOVE_MIRROR_MOVE + || gLastMoves[gBattlerTarget] == MOVE_SHELL_TRAP) { i = MAX_MON_MOVES; } From 0ef148dfbbd9391aec26f32d5d1dee7e994fb5e4 Mon Sep 17 00:00:00 2001 From: LOuroboros Date: Wed, 28 Dec 2022 08:50:15 -0300 Subject: [PATCH 78/84] Applied more corrections -Removed BattleScript_WindRiderActivatesEnd2 -Tweaked the condition of Wind Power in AbilityBattleEffects -Renamed ApplySupremeOverlordModifier to GetSupremeOverlordModifier --- data/battle_scripts_1.s | 20 -------------------- include/battle_scripts.h | 1 - src/battle_util.c | 19 +++++-------------- 3 files changed, 5 insertions(+), 35 deletions(-) diff --git a/data/battle_scripts_1.s b/data/battle_scripts_1.s index 4cb11f183..01ef1fdd3 100644 --- a/data/battle_scripts_1.s +++ b/data/battle_scripts_1.s @@ -6683,26 +6683,6 @@ BattleScript_TailwindEnds:: waitmessage B_WAIT_TIME_LONG end2 -BattleScript_WindRiderActivatesEnd2:: - setbyte gBattlerTarget, 0 -BattleScript_WindRiderLoop: - printstring STRINGID_EMPTYSTRING3 - jumpifability BS_TARGET, ABILITY_WIND_RIDER, BattleScript_WindRiderLoop_Cont - goto BattleScript_WindRiderIncrement -BattleScript_WindRiderLoop_Cont: - jumpifsideaffecting BS_TARGET, SIDE_STATUS_TAILWIND, BattleScript_WindRider_Activate - goto BattleScript_WindRiderIncrement -BattleScript_WindRider_Activate: - call BattleScript_AbilityPopUp - pause B_WAIT_TIME_MED - modifybattlerstatstage BS_TARGET, STAT_ATK, INCREASE, 1, BattleScript_WindRiderIncrement, ANIM_ON -BattleScript_WindRiderIncrement: - addbyte gBattlerTarget, 1 - jumpifbytenotequal gBattlerTarget, gBattlersCount, BattleScript_WindRiderLoop -BattleScript_WindRiderEnd: - destroyabilitypopup - end2 - BattleScript_WindPowerActivatesEnd2:: setbyte gBattlerAttacker, 0 BattleScript_WindPowerLoop: diff --git a/include/battle_scripts.h b/include/battle_scripts.h index 5fc55cc65..d79566a44 100644 --- a/include/battle_scripts.h +++ b/include/battle_scripts.h @@ -436,7 +436,6 @@ extern const u8 BattleScript_DoubleShockRemoveType[]; extern const u8 BattleScript_SeedSowerActivates[]; extern const u8 BattleScript_AngerShellActivates[]; extern const u8 BattleScript_WellBakedBodyActivates[]; -extern const u8 BattleScript_WindRiderActivatesEnd2[]; extern const u8 BattleScript_WindRiderActivatesMoveEnd[]; extern const u8 BattleScript_WindPowerActivates[]; extern const u8 BattleScript_WindPowerActivatesEnd2[]; diff --git a/src/battle_util.c b/src/battle_util.c index ac34d5360..c1d112d19 100644 --- a/src/battle_util.c +++ b/src/battle_util.c @@ -5891,18 +5891,9 @@ u8 AbilityBattleEffects(u8 caseID, u8 battler, u16 ability, u8 special, u16 move } break; case ABILITY_WIND_POWER: - if (!(gMoveResultFlags & MOVE_RESULT_NO_EFFECT) - && !gProtectStructs[gBattlerAttacker].confusionSelfDmg - && TARGET_TURN_DAMAGED - && gBattleMoves[gCurrentMove].flags & FLAG_WIND_MOVE - && IsBattlerAlive(gBattlerTarget)) - { - gBattlerAttacker = gBattlerTarget; - BattleScriptPushCursor(); - gBattlescriptCurrInstr = BattleScript_WindPowerActivates; - effect++; - } - break; + if (!(gBattleMoves[gCurrentMove].flags & FLAG_WIND_MOVE)) + break; + // fall through case ABILITY_ELECTROMORPHOSIS: if (!(gMoveResultFlags & MOVE_RESULT_NO_EFFECT) && !gProtectStructs[gBattlerAttacker].confusionSelfDmg @@ -8756,7 +8747,7 @@ static u16 CalcMoveBasePower(u16 move, u8 battlerAtk, u8 battlerDef) // Supreme Overlord adds a damage boost for each fainted ally. // The first ally adds a x1.2 boost, and subsequent allies add an extra x0.1 boost each. -static u16 ApplySupremeOverlordModifier(u8 battlerId) +static u16 GetSupremeOverlordModifier(u8 battlerId) { u32 i; u8 side = GetBattlerSide(battlerId); @@ -8925,7 +8916,7 @@ static u32 CalcMoveBasePowerAfterModifiers(u16 move, u8 battlerAtk, u8 battlerDe MulModifier(&modifier, UQ_4_12(1.5)); break; case ABILITY_SUPREME_OVERLORD: - MulModifier(&modifier, ApplySupremeOverlordModifier(battlerAtk)); + MulModifier(&modifier, GetSupremeOverlordModifier(battlerAtk)); break; } From e8dfb66c309dc7166ec3cd12ce30de86b1c44fe0 Mon Sep 17 00:00:00 2001 From: LOuroboros Date: Thu, 29 Dec 2022 01:32:24 -0300 Subject: [PATCH 79/84] Adding ability effect triggers for terrains and weather A new, probably better way to handle the announcement trigger that abilities such as Protosynthesis and Quark Drive have, when the battle weather or the field terrain change. Misc. changes: -EFFECT_DAMAGE_SET_TERRAIN -> EFFECT_HIT_SET_REMOVE_TERRAIN -It's more appropriate as the effect can be used to force set a terrain or simply to remove an active terrain, after all. -The main reason for the rename was the inconsistency with the battle script's label. -Reverted accidentally committed change to B_DOUBLE_WILD_CHANCE, performed back in c8abf00c. --- asm/macros/battle_script.inc | 8 ++++ data/battle_scripts_1.s | 44 ++++++++++++++++++++-- include/battle_util.h | 2 + include/constants/battle_move_effects.h | 2 +- include/constants/battle_script_commands.h | 2 + src/battle_script_commands.c | 10 ++++- src/battle_tv.c | 2 +- src/battle_util.c | 28 ++++++++++++++ src/data/battle_moves.h | 12 +++--- 9 files changed, 97 insertions(+), 13 deletions(-) diff --git a/asm/macros/battle_script.inc b/asm/macros/battle_script.inc index 994cf4d52..a882a0315 100644 --- a/asm/macros/battle_script.inc +++ b/asm/macros/battle_script.inc @@ -2010,6 +2010,14 @@ .4byte \ptr .endm + .macro activateweatherabilities battler:req + various \battler, VARIOUS_ACTIVATE_WEATHER_ABILITIES + .endm + + .macro activateterrainabilities battler:req + various \battler, VARIOUS_ACTIVATE_TERRAIN_ABILITIES + .endm + @ helpful macros .macro setstatchanger stat:req, stages:req, down:req setbyte sSTATCHANGER, \stat | \stages << 3 | \down << 7 diff --git a/data/battle_scripts_1.s b/data/battle_scripts_1.s index 01ef1fdd3..722619c3b 100644 --- a/data/battle_scripts_1.s +++ b/data/battle_scripts_1.s @@ -410,7 +410,7 @@ gBattleScriptsForMoveEffects:: .4byte BattleScript_EffectCourtChange @ EFFECT_COURT_CHANGE .4byte BattleScript_EffectSteelBeam @ EFFECT_STEEL_BEAM .4byte BattleScript_EffectExtremeEvoboost @ EFFECT_EXTREME_EVOBOOST - .4byte BattleScript_EffectTerrainHit @ EFFECT_DAMAGE_SET_TERRAIN + .4byte BattleScript_EffectHitSetRemoveTerrain @ EFFECT_HIT_SET_REMOVE_TERRAIN .4byte BattleScript_EffectDarkVoid @ EFFECT_DARK_VOID .4byte BattleScript_EffectSleepHit @ EFFECT_SLEEP_HIT .4byte BattleScript_EffectDoubleShock @ EFFECT_DOUBLE_SHOCK @@ -2456,6 +2456,7 @@ BattleScript_EffectPsychicTerrain: printfromtable gTerrainStringIds waitmessage B_WAIT_TIME_LONG playanimation BS_ATTACKER, B_ANIM_RESTORE_BG + call BattleScript_ActivateTerrainAbilities call BattleScript_TerrainSeedLoop jumpifabilitypresent ABILITY_MIMICRY, BattleScript_ApplyMimicry goto BattleScript_MoveEnd @@ -4975,9 +4976,20 @@ BattleScript_MoveWeatherChange:: printfromtable gMoveWeatherChangeStringIds waitmessage B_WAIT_TIME_LONG call BattleScript_WeatherFormChanges - call BattleScript_ActivateSwitchInAbilities + call BattleScript_ActivateWeatherAbilities goto BattleScript_MoveEnd +BattleScript_ActivateWeatherAbilities: + copybyte sBATTLER, gBattlerAttacker + setbyte gBattlerAttacker, 0 +BattleScript_ActivateWeatherAbilities_Loop: + activateweatherabilities BS_ATTACKER +BattleScript_ActivateWeatherAbilities_Increment: + addbyte gBattlerAttacker, 1 + jumpifbytenotequal gBattlerAttacker, gBattlersCount, BattleScript_ActivateWeatherAbilities_Loop + copybyte gBattlerAttacker, sBATTLER + return + BattleScript_EffectSunnyDay:: attackcanceler attackstring @@ -7150,6 +7162,7 @@ BattleScript_SeedSowerActivates:: printstring STRINGID_TERRAINBECOMESGRASSY waitmessage B_WAIT_TIME_LONG playanimation BS_SCRIPTING, B_ANIM_RESTORE_BG + call BattleScript_ActivateTerrainAbilities call BattleScript_TerrainSeedLoop return @@ -8167,6 +8180,7 @@ BattleScript_DrizzleActivates:: waitstate playanimation BS_BATTLER_0, B_ANIM_RAIN_CONTINUES call BattleScript_WeatherFormChanges + call BattleScript_ActivateWeatherAbilities end3 BattleScript_AbilityRaisesDefenderStat:: @@ -8327,6 +8341,7 @@ BattleScript_SandstreamActivates:: waitstate playanimation BS_BATTLER_0, B_ANIM_SANDSTORM_CONTINUES call BattleScript_WeatherFormChanges + call BattleScript_ActivateWeatherAbilities end3 BattleScript_SandSpitActivates:: @@ -8336,6 +8351,7 @@ BattleScript_SandSpitActivates:: waitstate playanimation BS_BATTLER_0, B_ANIM_SANDSTORM_CONTINUES call BattleScript_WeatherFormChanges + call BattleScript_ActivateWeatherAbilities return BattleScript_ShedSkinActivates:: @@ -8454,6 +8470,7 @@ BattleScript_DroughtActivates:: waitstate playanimation BS_BATTLER_0, B_ANIM_SUN_CONTINUES call BattleScript_WeatherFormChanges + call BattleScript_ActivateWeatherAbilities end3 BattleScript_DesolateLandActivates:: @@ -8463,6 +8480,7 @@ BattleScript_DesolateLandActivates:: waitstate playanimation BS_BATTLER_0, B_ANIM_SUN_CONTINUES call BattleScript_WeatherFormChanges + call BattleScript_ActivateWeatherAbilities end3 BattleScript_DesolateLandEvaporatesWaterTypeMoves:: @@ -8483,6 +8501,7 @@ BattleScript_PrimordialSeaActivates:: waitstate playanimation BS_BATTLER_0, B_ANIM_RAIN_CONTINUES call BattleScript_WeatherFormChanges + call BattleScript_ActivateWeatherAbilities end3 BattleScript_PrimordialSeaFizzlesOutFireTypeMoves:: @@ -8553,6 +8572,7 @@ BattleScript_SnowWarningActivates:: waitstate playanimation BS_BATTLER_0, B_ANIM_HAIL_CONTINUES call BattleScript_WeatherFormChanges + call BattleScript_ActivateWeatherAbilities end3 BattleScript_TerrainSeedLoop: @@ -8566,7 +8586,6 @@ BattleScript_TerrainSeedLoop_NextBattler: addbyte gBattlerTarget, 0x1 jumpifbytenotequal gBattlerTarget, gBattlersCount, BattleScript_TerrainSeedLoopIter restoretarget - call BattleScript_ActivateSwitchInAbilities return BattleScript_ActivateSwitchInAbilities: @@ -8580,12 +8599,24 @@ BattleScript_ActivateSwitchInAbilities_Increment: copybyte gBattlerAttacker, sBATTLER return +BattleScript_ActivateTerrainAbilities: + copybyte sBATTLER, gBattlerAttacker + setbyte gBattlerAttacker, 0 +BattleScript_ActivateTerrainAbilities_Loop: + activateterrainabilities BS_ATTACKER +BattleScript_ActivateTerrainAbilities_Increment: + addbyte gBattlerAttacker, 1 + jumpifbytenotequal gBattlerAttacker, gBattlersCount, BattleScript_ActivateTerrainAbilities_Loop + copybyte gBattlerAttacker, sBATTLER + return + BattleScript_ElectricSurgeActivates:: pause B_WAIT_TIME_SHORT call BattleScript_AbilityPopUp printstring STRINGID_TERRAINBECOMESELECTRIC waitmessage B_WAIT_TIME_LONG playanimation BS_SCRIPTING, B_ANIM_RESTORE_BG + call BattleScript_ActivateTerrainAbilities call BattleScript_TerrainSeedLoop end3 @@ -8595,6 +8626,7 @@ BattleScript_MistySurgeActivates:: printstring STRINGID_TERRAINBECOMESMISTY waitmessage B_WAIT_TIME_LONG playanimation BS_SCRIPTING, B_ANIM_RESTORE_BG + call BattleScript_ActivateTerrainAbilities call BattleScript_TerrainSeedLoop end3 @@ -8604,6 +8636,7 @@ BattleScript_GrassySurgeActivates:: printstring STRINGID_TERRAINBECOMESGRASSY waitmessage B_WAIT_TIME_LONG playanimation BS_SCRIPTING, B_ANIM_RESTORE_BG + call BattleScript_ActivateTerrainAbilities call BattleScript_TerrainSeedLoop end3 @@ -8613,6 +8646,7 @@ BattleScript_PsychicSurgeActivates:: printstring STRINGID_TERRAINBECOMESPSYCHIC waitmessage B_WAIT_TIME_LONG playanimation BS_SCRIPTING, B_ANIM_RESTORE_BG + call BattleScript_ActivateTerrainAbilities call BattleScript_TerrainSeedLoop end3 @@ -9722,6 +9756,7 @@ BattleScript_AnnounceAirLockCloudNine:: printstring STRINGID_AIRLOCKACTIVATES waitmessage B_WAIT_TIME_LONG call BattleScript_WeatherFormChanges + call BattleScript_ActivateWeatherAbilities end3 BattleScript_QuickClawActivation:: @@ -9881,7 +9916,7 @@ BattleScript_ExtremeEvoboostSpDef:: BattleScript_ExtremeEvoboostEnd:: goto BattleScript_MoveEnd -BattleScript_EffectTerrainHit: +BattleScript_EffectHitSetRemoveTerrain: attackcanceler accuracycheck BattleScript_PrintMoveMissed, ACC_CURR_MOVE attackstring @@ -9903,6 +9938,7 @@ BattleScript_EffectTerrainHit: setterrain BattleScript_TryFaint playanimation BS_ATTACKER, B_ANIM_RESTORE_BG printfromtable gTerrainStringIds + call BattleScript_ActivateTerrainAbilities BattleScript_TryFaint: tryfaintmon BS_TARGET goto BattleScript_MoveEnd diff --git a/include/battle_util.h b/include/battle_util.h index 5f5f0b902..18af25c68 100644 --- a/include/battle_util.h +++ b/include/battle_util.h @@ -34,6 +34,8 @@ #define ABILITYEFFECT_MOVE_END_OTHER 12 #define ABILITYEFFECT_NEUTRALIZINGGAS 13 #define ABILITYEFFECT_FIELD_SPORT 14 // Only used if B_SPORT_TURNS < GEN_6 +#define ABILITYEFFECT_ON_WEATHER 15 +#define ABILITYEFFECT_ON_TERRAIN 16 // Special cases #define ABILITYEFFECT_MUD_SPORT 252 // Only used if B_SPORT_TURNS < GEN_6 #define ABILITYEFFECT_WATER_SPORT 253 // Only used if B_SPORT_TURNS < GEN_6 diff --git a/include/constants/battle_move_effects.h b/include/constants/battle_move_effects.h index 5af1017a9..122660c05 100644 --- a/include/constants/battle_move_effects.h +++ b/include/constants/battle_move_effects.h @@ -391,7 +391,7 @@ #define EFFECT_COURT_CHANGE 385 #define EFFECT_STEEL_BEAM 386 #define EFFECT_EXTREME_EVOBOOST 387 -#define EFFECT_DAMAGE_SET_TERRAIN 388 // genesis supernova +#define EFFECT_HIT_SET_REMOVE_TERRAIN 388 #define EFFECT_DARK_VOID 389 #define EFFECT_SLEEP_HIT 390 #define EFFECT_DOUBLE_SHOCK 391 diff --git a/include/constants/battle_script_commands.h b/include/constants/battle_script_commands.h index 3aba0144d..74d7a0be2 100644 --- a/include/constants/battle_script_commands.h +++ b/include/constants/battle_script_commands.h @@ -248,6 +248,8 @@ #define VARIOUS_CHECK_PARENTAL_BOND_COUNTER 157 #define VARIOUS_SWAP_STATS 158 #define VARIOUS_TRY_WIND_RIDER_POWER 159 +#define VARIOUS_ACTIVATE_WEATHER_ABILITIES 160 +#define VARIOUS_ACTIVATE_TERRAIN_ABILITIES 161 // Cmd_manipulatedamage #define DMG_CHANGE_SIGN 0 diff --git a/src/battle_script_commands.c b/src/battle_script_commands.c index 807cafa28..e08a61c2f 100644 --- a/src/battle_script_commands.c +++ b/src/battle_script_commands.c @@ -7941,7 +7941,7 @@ static void HandleTerrainMove(u16 move) statusFlag = STATUS_FIELD_PSYCHIC_TERRAIN, timer = &gFieldTimers.terrainTimer; gBattleCommunication[MULTISTRING_CHOOSER] = 3; break; - case EFFECT_DAMAGE_SET_TERRAIN: + case EFFECT_HIT_SET_REMOVE_TERRAIN: switch (gBattleMoves[move].argument) { case 0: //genesis supernova @@ -10116,6 +10116,14 @@ static void Cmd_various(void) } } return; + case VARIOUS_ACTIVATE_WEATHER_ABILITIES: + gBattlescriptCurrInstr += 3; + AbilityBattleEffects(ABILITYEFFECT_ON_WEATHER, gActiveBattler, 0, 0, 0); + return; + case VARIOUS_ACTIVATE_TERRAIN_ABILITIES: + gBattlescriptCurrInstr += 3; + AbilityBattleEffects(ABILITYEFFECT_ON_TERRAIN, gActiveBattler, 0, 0, 0); + return; } // End of switch (gBattlescriptCurrInstr[2]) gBattlescriptCurrInstr += 3; diff --git a/src/battle_tv.c b/src/battle_tv.c index 9d2ec244e..33483da06 100644 --- a/src/battle_tv.c +++ b/src/battle_tv.c @@ -476,7 +476,7 @@ static const u16 sPoints_MoveEffect[NUM_BATTLE_MOVE_EFFECTS] = [EFFECT_COURT_CHANGE] = 0, // TODO: Assign points [EFFECT_STEEL_BEAM] = 0, // TODO: Assign points [EFFECT_EXTREME_EVOBOOST] = 0, // TODO: Assign points - [EFFECT_DAMAGE_SET_TERRAIN] = 0, // TODO: Assign points + [EFFECT_HIT_SET_REMOVE_TERRAIN] = 0, // TODO: Assign points [EFFECT_DARK_VOID] = 0, // TODO: Assign points [EFFECT_SLEEP_HIT] = 1, [EFFECT_DOUBLE_SHOCK] = 0, // TODO: Assign points diff --git a/src/battle_util.c b/src/battle_util.c index c1d112d19..c31ee5069 100644 --- a/src/battle_util.c +++ b/src/battle_util.c @@ -6251,6 +6251,34 @@ u8 AbilityBattleEffects(u8 caseID, u8 battler, u16 ability, u8 special, u16 move break; } break; + case ABILITYEFFECT_ON_WEATHER: // For ability effects that activate when the battle weather changes. + gBattleScripting.battler = gBattlerAbility = battler; + switch (GetBattlerAbility(battler)) + { + case ABILITY_PROTOSYNTHESIS: + if (IsBattlerWeatherAffected(battler, B_WEATHER_SUN)) + { + PREPARE_STAT_BUFFER(gBattleTextBuff1, GetHighestStatId(battler)); + BattleScriptPushCursorAndCallback(BattleScript_ProtosynthesisActivates); + effect++; + } + break; + } + break; + case ABILITYEFFECT_ON_TERRAIN: // For ability effects that activate when the field terrain changes. + gBattleScripting.battler = gBattlerAbility = battler; + switch (GetBattlerAbility(battler)) + { + case ABILITY_QUARK_DRIVE: + if (IsBattlerTerrainAffected(battler, STATUS_FIELD_ELECTRIC_TERRAIN)) + { + PREPARE_STAT_BUFFER(gBattleTextBuff1, GetHighestStatId(battler)); + BattleScriptPushCursorAndCallback(BattleScript_QuarkDriveActivates); + effect++; + } + break; + } + break; } if (effect && gLastUsedAbility != 0xFF) diff --git a/src/data/battle_moves.h b/src/data/battle_moves.h index b633010e7..e5d3306ce 100644 --- a/src/data/battle_moves.h +++ b/src/data/battle_moves.h @@ -13872,7 +13872,7 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = [MOVE_ICE_SPINNER] = { - .effect = EFFECT_DAMAGE_SET_TERRAIN, + .effect = EFFECT_HIT_SET_REMOVE_TERRAIN, .power = 80, .type = TYPE_ICE, .accuracy = 100, @@ -13884,7 +13884,7 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .split = SPLIT_PHYSICAL, .zMovePower = 160, .zMoveEffect = Z_EFFECT_NONE, - .argument = 1, //remove terrain + .argument = 1, // Remove the active field terrain if there is one. }, [MOVE_GLAIVE_RUSH] = @@ -14839,7 +14839,7 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = }, [MOVE_GENESIS_SUPERNOVA] = { - .effect = EFFECT_DAMAGE_SET_TERRAIN, + .effect = EFFECT_HIT_SET_REMOVE_TERRAIN, .power = 185, .type = TYPE_PSYCHIC, .accuracy = 0, @@ -14850,7 +14850,7 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .flags = 0, .zMovePower = 0, .split = SPLIT_SPECIAL, - .argument = 0, //psychic terrain + .argument = 0, // Set Psychic Terrain. If there's a different field terrain active, overwrite it. .zMoveEffect = 0 }, [MOVE_SINISTER_ARROW_RAID] = @@ -14900,7 +14900,7 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = }, [MOVE_SPLINTERED_STORMSHARDS] = { - .effect = EFFECT_DAMAGE_SET_TERRAIN, + .effect = EFFECT_HIT_SET_REMOVE_TERRAIN, .power = 190, .type = TYPE_ROCK, .accuracy = 0, @@ -14911,7 +14911,7 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .flags = 0, .zMovePower = 0, .split = SPLIT_PHYSICAL, - .argument = 1, //remove terrain + .argument = 1, // Remove the active field terrain if there is one. .zMoveEffect = 0 }, [MOVE_LETS_SNUGGLE_FOREVER] = From 453aa2ffe7d33323b8d00d01c1f895f17f25b963 Mon Sep 17 00:00:00 2001 From: Bassoonian Date: Sat, 31 Dec 2022 02:01:56 +0100 Subject: [PATCH 80/84] Fix faulty gBaseStats reference --- src/battle_ai_util.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/battle_ai_util.c b/src/battle_ai_util.c index fc5311642..ef97ab9a1 100644 --- a/src/battle_ai_util.c +++ b/src/battle_ai_util.c @@ -2433,8 +2433,8 @@ static bool32 PartyBattlerShouldAvoidHazards(u8 currBattler, u8 switchBattler) u16 species = GetMonData(mon, MON_DATA_SPECIES); u32 flags = gSideStatuses[GetBattlerSide(currBattler)] & (SIDE_STATUS_SPIKES | SIDE_STATUS_STEALTH_ROCK | SIDE_STATUS_STICKY_WEB | SIDE_STATUS_TOXIC_SPIKES); s32 hazardDamage = 0; - u8 type1 = gBaseStats[species].type1; - u8 type2 = gBaseStats[species].type2; + u8 type1 = gSpeciesInfo[species].type1; + u8 type2 = gSpeciesInfo[species].type2; u32 maxHp = GetMonData(mon, MON_DATA_MAX_HP); if (flags == 0) From 965e2c33947ff65568dbf46520ba3af98b813f42 Mon Sep 17 00:00:00 2001 From: Eduardo Quezada Date: Sun, 1 Jan 2023 10:31:09 -0300 Subject: [PATCH 81/84] Newline fix --- graphics/battle_anims/sprites/new/teapot.pal | 38 ++++++++++---------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/graphics/battle_anims/sprites/new/teapot.pal b/graphics/battle_anims/sprites/new/teapot.pal index 9b59309ba..f8319ce12 100644 --- a/graphics/battle_anims/sprites/new/teapot.pal +++ b/graphics/battle_anims/sprites/new/teapot.pal @@ -1,19 +1,19 @@ -JASC-PAL -0100 -16 -10 247 12 -144 141 173 -255 255 255 -207 232 255 -106 104 120 -190 211 255 -166 169 214 -214 171 113 -162 119 89 -72 71 81 -251 255 211 -232 207 121 -255 255 153 -124 86 73 -0 0 0 -0 0 0 +JASC-PAL +0100 +16 +10 247 12 +144 141 173 +255 255 255 +207 232 255 +106 104 120 +190 211 255 +166 169 214 +214 171 113 +162 119 89 +72 71 81 +251 255 211 +232 207 121 +255 255 153 +124 86 73 +0 0 0 +0 0 0 From d3443396e272c9352b2638023d8a25f0d35b9f2a Mon Sep 17 00:00:00 2001 From: LOuroboros Date: Sun, 1 Jan 2023 10:45:38 -0300 Subject: [PATCH 82/84] Made Clear Body and similar abilities be normally affected by their own stat stage reductions --- src/battle_script_commands.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/battle_script_commands.c b/src/battle_script_commands.c index 567c91221..38174f0ad 100644 --- a/src/battle_script_commands.c +++ b/src/battle_script_commands.c @@ -10876,7 +10876,7 @@ static u32 ChangeStatBuffs(s8 statValue, u32 statId, u32 flags, const u8 *BS_ptr else if ((activeBattlerAbility == ABILITY_CLEAR_BODY || activeBattlerAbility == ABILITY_FULL_METAL_BODY || activeBattlerAbility == ABILITY_WHITE_SMOKE) - && !certain && gCurrentMove != MOVE_CURSE) + && !affectsUser && !certain && gCurrentMove != MOVE_CURSE) { if (flags == STAT_CHANGE_ALLOW_PTR) { From ca32d43433b027342157aed02d576b675c34d941 Mon Sep 17 00:00:00 2001 From: LOuroboros Date: Mon, 2 Jan 2023 14:30:16 -0300 Subject: [PATCH 83/84] Streamlined ability-on-weather changes Also renamed activateweatherabilities and activateterrainabilities. --- asm/macros/battle_script.inc | 8 +++--- data/battle_scripts_1.s | 23 ++--------------- include/constants/battle_script_commands.h | 4 +-- src/battle_script_commands.c | 4 +-- src/battle_util.c | 30 +++++++++++----------- 5 files changed, 25 insertions(+), 44 deletions(-) diff --git a/asm/macros/battle_script.inc b/asm/macros/battle_script.inc index a882a0315..69e45ddea 100644 --- a/asm/macros/battle_script.inc +++ b/asm/macros/battle_script.inc @@ -2010,12 +2010,12 @@ .4byte \ptr .endm - .macro activateweatherabilities battler:req - various \battler, VARIOUS_ACTIVATE_WEATHER_ABILITIES + .macro activateweatherchangeabilities battler:req + various \battler, VARIOUS_ACTIVATE_WEATHER_CHANGE_ABILITIES .endm - .macro activateterrainabilities battler:req - various \battler, VARIOUS_ACTIVATE_TERRAIN_ABILITIES + .macro activateterrainchangeabilities battler:req + various \battler, VARIOUS_ACTIVATE_TERRAIN_CHANGE_ABILITIES .endm @ helpful macros diff --git a/data/battle_scripts_1.s b/data/battle_scripts_1.s index 722619c3b..9d307b8b9 100644 --- a/data/battle_scripts_1.s +++ b/data/battle_scripts_1.s @@ -4976,20 +4976,8 @@ BattleScript_MoveWeatherChange:: printfromtable gMoveWeatherChangeStringIds waitmessage B_WAIT_TIME_LONG call BattleScript_WeatherFormChanges - call BattleScript_ActivateWeatherAbilities goto BattleScript_MoveEnd -BattleScript_ActivateWeatherAbilities: - copybyte sBATTLER, gBattlerAttacker - setbyte gBattlerAttacker, 0 -BattleScript_ActivateWeatherAbilities_Loop: - activateweatherabilities BS_ATTACKER -BattleScript_ActivateWeatherAbilities_Increment: - addbyte gBattlerAttacker, 1 - jumpifbytenotequal gBattlerAttacker, gBattlersCount, BattleScript_ActivateWeatherAbilities_Loop - copybyte gBattlerAttacker, sBATTLER - return - BattleScript_EffectSunnyDay:: attackcanceler attackstring @@ -8180,7 +8168,6 @@ BattleScript_DrizzleActivates:: waitstate playanimation BS_BATTLER_0, B_ANIM_RAIN_CONTINUES call BattleScript_WeatherFormChanges - call BattleScript_ActivateWeatherAbilities end3 BattleScript_AbilityRaisesDefenderStat:: @@ -8341,7 +8328,6 @@ BattleScript_SandstreamActivates:: waitstate playanimation BS_BATTLER_0, B_ANIM_SANDSTORM_CONTINUES call BattleScript_WeatherFormChanges - call BattleScript_ActivateWeatherAbilities end3 BattleScript_SandSpitActivates:: @@ -8351,7 +8337,6 @@ BattleScript_SandSpitActivates:: waitstate playanimation BS_BATTLER_0, B_ANIM_SANDSTORM_CONTINUES call BattleScript_WeatherFormChanges - call BattleScript_ActivateWeatherAbilities return BattleScript_ShedSkinActivates:: @@ -8365,6 +8350,7 @@ BattleScript_WeatherFormChanges:: setbyte sBATTLER, 0 BattleScript_WeatherFormChangesLoop:: tryweatherformdatachange + activateweatherchangeabilities BS_SCRIPTING addbyte sBATTLER, 1 jumpifbytenotequal sBATTLER, gBattlersCount, BattleScript_WeatherFormChangesLoop return @@ -8470,7 +8456,6 @@ BattleScript_DroughtActivates:: waitstate playanimation BS_BATTLER_0, B_ANIM_SUN_CONTINUES call BattleScript_WeatherFormChanges - call BattleScript_ActivateWeatherAbilities end3 BattleScript_DesolateLandActivates:: @@ -8480,7 +8465,6 @@ BattleScript_DesolateLandActivates:: waitstate playanimation BS_BATTLER_0, B_ANIM_SUN_CONTINUES call BattleScript_WeatherFormChanges - call BattleScript_ActivateWeatherAbilities end3 BattleScript_DesolateLandEvaporatesWaterTypeMoves:: @@ -8501,7 +8485,6 @@ BattleScript_PrimordialSeaActivates:: waitstate playanimation BS_BATTLER_0, B_ANIM_RAIN_CONTINUES call BattleScript_WeatherFormChanges - call BattleScript_ActivateWeatherAbilities end3 BattleScript_PrimordialSeaFizzlesOutFireTypeMoves:: @@ -8572,7 +8555,6 @@ BattleScript_SnowWarningActivates:: waitstate playanimation BS_BATTLER_0, B_ANIM_HAIL_CONTINUES call BattleScript_WeatherFormChanges - call BattleScript_ActivateWeatherAbilities end3 BattleScript_TerrainSeedLoop: @@ -8603,7 +8585,7 @@ BattleScript_ActivateTerrainAbilities: copybyte sBATTLER, gBattlerAttacker setbyte gBattlerAttacker, 0 BattleScript_ActivateTerrainAbilities_Loop: - activateterrainabilities BS_ATTACKER + activateterrainchangeabilities BS_ATTACKER BattleScript_ActivateTerrainAbilities_Increment: addbyte gBattlerAttacker, 1 jumpifbytenotequal gBattlerAttacker, gBattlersCount, BattleScript_ActivateTerrainAbilities_Loop @@ -9756,7 +9738,6 @@ BattleScript_AnnounceAirLockCloudNine:: printstring STRINGID_AIRLOCKACTIVATES waitmessage B_WAIT_TIME_LONG call BattleScript_WeatherFormChanges - call BattleScript_ActivateWeatherAbilities end3 BattleScript_QuickClawActivation:: diff --git a/include/constants/battle_script_commands.h b/include/constants/battle_script_commands.h index 74d7a0be2..61f69587c 100644 --- a/include/constants/battle_script_commands.h +++ b/include/constants/battle_script_commands.h @@ -248,8 +248,8 @@ #define VARIOUS_CHECK_PARENTAL_BOND_COUNTER 157 #define VARIOUS_SWAP_STATS 158 #define VARIOUS_TRY_WIND_RIDER_POWER 159 -#define VARIOUS_ACTIVATE_WEATHER_ABILITIES 160 -#define VARIOUS_ACTIVATE_TERRAIN_ABILITIES 161 +#define VARIOUS_ACTIVATE_WEATHER_CHANGE_ABILITIES 160 +#define VARIOUS_ACTIVATE_TERRAIN_CHANGE_ABILITIES 161 // Cmd_manipulatedamage #define DMG_CHANGE_SIGN 0 diff --git a/src/battle_script_commands.c b/src/battle_script_commands.c index e08a61c2f..a979400ab 100644 --- a/src/battle_script_commands.c +++ b/src/battle_script_commands.c @@ -10116,11 +10116,11 @@ static void Cmd_various(void) } } return; - case VARIOUS_ACTIVATE_WEATHER_ABILITIES: + case VARIOUS_ACTIVATE_WEATHER_CHANGE_ABILITIES: gBattlescriptCurrInstr += 3; AbilityBattleEffects(ABILITYEFFECT_ON_WEATHER, gActiveBattler, 0, 0, 0); return; - case VARIOUS_ACTIVATE_TERRAIN_ABILITIES: + case VARIOUS_ACTIVATE_TERRAIN_CHANGE_ABILITIES: gBattlescriptCurrInstr += 3; AbilityBattleEffects(ABILITYEFFECT_ON_TERRAIN, gActiveBattler, 0, 0, 0); return; diff --git a/src/battle_util.c b/src/battle_util.c index c31ee5069..4eb44daa7 100644 --- a/src/battle_util.c +++ b/src/battle_util.c @@ -4798,19 +4798,6 @@ u8 AbilityBattleEffects(u8 caseID, u8 battler, u16 ability, u8 special, u16 move effect++; } break; - case ABILITY_FORECAST: -#if B_WEATHER_FORMS >= GEN_5 - case ABILITY_FLOWER_GIFT: -#else - TRY_WEATHER_FORM: -#endif - effect = TryWeatherFormChange(battler); - if (effect != 0) - { - BattleScriptPushCursorAndCallback(BattleScript_WeatherFormChange); - *(&gBattleStruct->formToChangeInto) = effect - 1; - } - break; case ABILITY_TRACE: if (!(gSpecialStatuses[battler].traced)) { @@ -6252,9 +6239,22 @@ u8 AbilityBattleEffects(u8 caseID, u8 battler, u16 ability, u8 special, u16 move } break; case ABILITYEFFECT_ON_WEATHER: // For ability effects that activate when the battle weather changes. - gBattleScripting.battler = gBattlerAbility = battler; + battler = gBattlerAbility = gBattlerAttacker = gBattleScripting.battler; switch (GetBattlerAbility(battler)) { + case ABILITY_FORECAST: +#if B_WEATHER_FORMS >= GEN_5 + case ABILITY_FLOWER_GIFT: +#else + TRY_WEATHER_FORM: +#endif + effect = TryWeatherFormChange(battler); + if (effect != 0) + { + BattleScriptPushCursorAndCallback(BattleScript_WeatherFormChange); + *(&gBattleStruct->formToChangeInto) = effect - 1; + } + break; case ABILITY_PROTOSYNTHESIS: if (IsBattlerWeatherAffected(battler, B_WEATHER_SUN)) { @@ -6266,7 +6266,7 @@ u8 AbilityBattleEffects(u8 caseID, u8 battler, u16 ability, u8 special, u16 move } break; case ABILITYEFFECT_ON_TERRAIN: // For ability effects that activate when the field terrain changes. - gBattleScripting.battler = gBattlerAbility = battler; + battler = gBattlerAbility = gBattlerAttacker = gBattleScripting.battler; switch (GetBattlerAbility(battler)) { case ABILITY_QUARK_DRIVE: From cdfec0fc0599d514ef95be61c775b3cec40f1fa5 Mon Sep 17 00:00:00 2001 From: LOuroboros Date: Mon, 2 Jan 2023 15:42:30 -0300 Subject: [PATCH 84/84] Updated B_DOUBLE_WILD_CHANCE --- include/config/battle.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/config/battle.h b/include/config/battle.h index c060cb0cc..fc5c6536f 100644 --- a/include/config/battle.h +++ b/include/config/battle.h @@ -176,7 +176,7 @@ #define B_LAST_USED_BALL_BUTTON R_BUTTON // If last used ball is implemented, this button (or button combo) will trigger throwing the last used ball. // Other settings -#define B_DOUBLE_WILD_CHANCE 100 // % chance of encountering two Pokémon in a Wild Encounter. +#define B_DOUBLE_WILD_CHANCE 0 // % chance of encountering two Pokémon in a Wild Encounter. #define B_MULTI_BATTLE_WHITEOUT GEN_LATEST // In Gen4+, multi battles end when the Player and also their Partner don't have any more Pokémon to fight. #define B_EVOLUTION_AFTER_WHITEOUT GEN_LATEST // In Gen6+, Pokemon that qualify for evolution after battle will evolve even if the player loses. #define B_WILD_NATURAL_ENEMIES TRUE // If set to TRUE, certain wild mon species will attack other species when partnered in double wild battles (eg. Zangoose vs Seviper)