From 480e6a1ffc37d035326f473f45b60f03d75697e9 Mon Sep 17 00:00:00 2001 From: LOuroboros Date: Fri, 2 Apr 2021 21:04:04 -0300 Subject: [PATCH 1/3] Tweaked Ability PopUp for Inner Focus --- data/battle_scripts_1.s | 1 + 1 file changed, 1 insertion(+) diff --git a/data/battle_scripts_1.s b/data/battle_scripts_1.s index 16bb6e92c8..9b1ab1c22e 100644 --- a/data/battle_scripts_1.s +++ b/data/battle_scripts_1.s @@ -7058,6 +7058,7 @@ BattleScript_ObliviousPreventsAttraction:: BattleScript_FlinchPrevention:: pause 0x20 + copybyte gBattlerAbility, gBattlerTarget call BattleScript_AbilityPopUp printstring STRINGID_PKMNSXPREVENTSFLINCHING waitmessage 0x40 From 4d773ef40c4cfe7a013522ef471b298ad1ee7b81 Mon Sep 17 00:00:00 2001 From: LOuroboros Date: Fri, 2 Apr 2021 22:52:21 -0300 Subject: [PATCH 2/3] Removed the BattleScript from Inner Focus Any questions shall be directed to Mr. Junichi Masuda. --- src/battle_script_commands.c | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/src/battle_script_commands.c b/src/battle_script_commands.c index 0c5250050e..fbd70ec3d2 100644 --- a/src/battle_script_commands.c +++ b/src/battle_script_commands.c @@ -2739,18 +2739,9 @@ void SetMoveEffect(bool32 primary, u32 certain) } break; case MOVE_EFFECT_FLINCH: - if (GetBattlerAbility(gEffectBattler) == ABILITY_INNER_FOCUS) + if (gBattleMons[gEffectBattler].ability == ABILITY_INNER_FOCUS) { - if (primary == TRUE || certain == MOVE_EFFECT_CERTAIN) - { - gLastUsedAbility = ABILITY_INNER_FOCUS; - RecordAbilityBattle(gEffectBattler, ABILITY_INNER_FOCUS); - gBattlescriptCurrInstr = BattleScript_FlinchPrevention; - } - else - { - gBattlescriptCurrInstr++; - } + gBattlescriptCurrInstr++; } else { From 8726107d42665e78320548cd80981f7301b112b1 Mon Sep 17 00:00:00 2001 From: LOuroboros Date: Mon, 7 Jun 2021 19:10:34 -0300 Subject: [PATCH 3/3] 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++; }