From 8726107d42665e78320548cd80981f7301b112b1 Mon Sep 17 00:00:00 2001 From: LOuroboros Date: Mon, 7 Jun 2021 19:10:34 -0300 Subject: [PATCH] Removed BattleScript_FlinchPrevention Also reverted a nonsensical change in SetMoveEffect's case MOVE_EFFECT_FLINCH. --- data/battle_scripts_1.s | 8 -------- include/battle_scripts.h | 1 - src/battle_script_commands.c | 2 +- 3 files changed, 1 insertion(+), 10 deletions(-) diff --git a/data/battle_scripts_1.s b/data/battle_scripts_1.s index 9b1ab1c22e..23c7e964d3 100644 --- a/data/battle_scripts_1.s +++ b/data/battle_scripts_1.s @@ -7056,14 +7056,6 @@ BattleScript_ObliviousPreventsAttraction:: waitmessage 0x40 goto BattleScript_MoveEnd -BattleScript_FlinchPrevention:: - pause 0x20 - copybyte gBattlerAbility, gBattlerTarget - call BattleScript_AbilityPopUp - printstring STRINGID_PKMNSXPREVENTSFLINCHING - waitmessage 0x40 - goto BattleScript_MoveEnd - BattleScript_OwnTempoPrevents:: pause 0x20 call BattleScript_AbilityPopUp diff --git a/include/battle_scripts.h b/include/battle_scripts.h index 2fc993b9c2..49d72d1c28 100644 --- a/include/battle_scripts.h +++ b/include/battle_scripts.h @@ -166,7 +166,6 @@ extern const u8 BattleScript_BRNPrevention[]; extern const u8 BattleScript_PRLZPrevention[]; extern const u8 BattleScript_PSNPrevention[]; extern const u8 BattleScript_ObliviousPreventsAttraction[]; -extern const u8 BattleScript_FlinchPrevention[]; extern const u8 BattleScript_OwnTempoPrevents[]; extern const u8 BattleScript_SoundproofProtected[]; extern const u8 BattleScript_AbilityNoSpecificStatLoss[]; diff --git a/src/battle_script_commands.c b/src/battle_script_commands.c index fbd70ec3d2..b607abc500 100644 --- a/src/battle_script_commands.c +++ b/src/battle_script_commands.c @@ -2739,7 +2739,7 @@ void SetMoveEffect(bool32 primary, u32 certain) } break; case MOVE_EFFECT_FLINCH: - if (gBattleMons[gEffectBattler].ability == ABILITY_INNER_FOCUS) + if (GetBattlerAbility(gEffectBattler) == ABILITY_INNER_FOCUS) { gBattlescriptCurrInstr++; }