From 408485263d25365e68d2d13cce30a0c90c3d1e06 Mon Sep 17 00:00:00 2001 From: Papa Cancer Date: Tue, 26 Mar 2019 01:34:39 +0000 Subject: [PATCH] Minor ability fixes Status moves that target both opponents will trigger a mon with Clear Body, White Smoke, Hyper Cutter etc. to prevent the loss of stats, but if its partner is targeted first, that partner gets the popup: https://drive.google.com/open?id=1dtTfgxvppD4s2ZL5scPDz9YDf4n7AhMW This fixes that. --- src/battle_script_commands.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/battle_script_commands.c b/src/battle_script_commands.c index 5ed4dec6df..412bf42446 100644 --- a/src/battle_script_commands.c +++ b/src/battle_script_commands.c @@ -7868,6 +7868,7 @@ static u32 ChangeStatBuffs(s8 statValue, u32 statId, u32 flags, const u8 *BS_ptr { BattleScriptPush(BS_ptr); gBattleScripting.battler = gActiveBattler; + gBattlerAbility = gActiveBattler; gBattlescriptCurrInstr = BattleScript_AbilityNoStatLoss; gLastUsedAbility = gBattleMons[gActiveBattler].ability; RecordAbilityBattle(gActiveBattler, gLastUsedAbility); @@ -7883,6 +7884,7 @@ static u32 ChangeStatBuffs(s8 statValue, u32 statId, u32 flags, const u8 *BS_ptr { BattleScriptPush(BS_ptr); gBattleScripting.battler = gActiveBattler; + gBattlerAbility = gActiveBattler; gBattlescriptCurrInstr = BattleScript_AbilityNoSpecificStatLoss; gLastUsedAbility = gBattleMons[gActiveBattler].ability; RecordAbilityBattle(gActiveBattler, gLastUsedAbility); @@ -7896,6 +7898,7 @@ static u32 ChangeStatBuffs(s8 statValue, u32 statId, u32 flags, const u8 *BS_ptr { BattleScriptPush(BS_ptr); gBattleScripting.battler = gActiveBattler; + gBattlerAbility = gActiveBattler; gBattlescriptCurrInstr = BattleScript_AbilityNoSpecificStatLoss; gLastUsedAbility = gBattleMons[gActiveBattler].ability; RecordAbilityBattle(gActiveBattler, gLastUsedAbility);