From 517763bc9f31721813eb283b6fadce88e23bc825 Mon Sep 17 00:00:00 2001 From: MissingNoL <84547991+MissingNoL@users.noreply.github.com> Date: Sat, 5 Jun 2021 16:38:37 -0700 Subject: [PATCH 1/3] Update src/battle_util.c Changed an `if` to `else if` Co-authored-by: LOuroboros --- 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 fb41105913..0d4a7f18af 100644 --- a/src/battle_util.c +++ b/src/battle_util.c @@ -8371,7 +8371,7 @@ u8 GetBattleMoveSplit(u32 moveId) { if (gSwapDamageCategory == TRUE) // Photon Geyser, Shell Side Arm, Light That Burns the Sky return SPLIT_PHYSICAL; - if (IS_MOVE_STATUS(moveId) || B_PHYSICAL_SPECIAL_SPLIT >= GEN_4) + else if (IS_MOVE_STATUS(moveId) || B_PHYSICAL_SPECIAL_SPLIT >= GEN_4) return gBattleMoves[moveId].split; else if (gBattleMoves[moveId].type < TYPE_MYSTERY) return SPLIT_PHYSICAL; From 921b80de7c138a0c0320187ae2a383d22a390f13 Mon Sep 17 00:00:00 2001 From: MissingNoL <84547991+MissingNoL@users.noreply.github.com> Date: Sat, 5 Jun 2021 16:40:03 -0700 Subject: [PATCH 2/3] Update battle_script_commands.h Properly aligned the list of number IDs --- include/constants/battle_script_commands.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/constants/battle_script_commands.h b/include/constants/battle_script_commands.h index 28ba1a5d48..3976d4375a 100644 --- a/include/constants/battle_script_commands.h +++ b/include/constants/battle_script_commands.h @@ -173,8 +173,8 @@ #define VARIOUS_DESTROY_ABILITY_POPUP 102 #define VARIOUS_TOTEM_BOOST 103 #define VARIOUS_TRY_ACTIVATE_GRIM_NEIGH 104 -#define VARIOUS_PHOTON_GEYSER_CHECK 105 -#define VARIOUS_SHELL_SIDE_ARM_CHECK 106 +#define VARIOUS_PHOTON_GEYSER_CHECK 105 +#define VARIOUS_SHELL_SIDE_ARM_CHECK 106 // Cmd_manipulatedamage #define DMG_CHANGE_SIGN 0 From d69cfcff7043a1a97d0835747dd727f1a3709d34 Mon Sep 17 00:00:00 2001 From: MissingNoL <84547991+MissingNoL@users.noreply.github.com> Date: Sat, 5 Jun 2021 16:43:19 -0700 Subject: [PATCH 3/3] Update battle_script_commands.c Included src/battle_util.c to call IsMoveMakingContact --- src/battle_script_commands.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/battle_script_commands.c b/src/battle_script_commands.c index 422738795c..bb81b2cbc6 100644 --- a/src/battle_script_commands.c +++ b/src/battle_script_commands.c @@ -53,6 +53,7 @@ #include "constants/rgb.h" #include "data.h" #include "constants/party_menu.h" +#include "src/battle_util.c" extern struct MusicPlayerInfo gMPlayInfo_BGM; @@ -4708,7 +4709,7 @@ static void Cmd_moveend(void) switch (gBattleScripting.moveendState) { case MOVEEND_PROTECT_LIKE_EFFECT: - if (gBattleMoves[gCurrentMove].flags & FLAG_MAKES_CONTACT) // needs to be IsMoveMakingContact, but this file does not reference include/battle_util.h or src/battle_util.c + if (IsMoveMakingContact(move, gBattlerAttacker)) { if (gProtectStructs[gBattlerTarget].spikyShielded && GetBattlerAbility(gBattlerAttacker) != ABILITY_MAGIC_GUARD) {