From 6eced3f7a439010ce03e600b028d8c11fb7c2929 Mon Sep 17 00:00:00 2001 From: BuffelSaft Date: Wed, 22 Sep 2021 11:53:44 +1200 Subject: [PATCH] Fix Download Raises user's stat instead of a random target's, and determines stat boosts using the opposing Pokemon's stats. --- 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 ccc0c558a..fdc4277d8 100644 --- a/src/battle_util.c +++ b/src/battle_util.c @@ -4045,7 +4045,7 @@ u8 AbilityBattleEffects(u8 caseID, u8 battler, u16 ability, u8 special, u16 move u32 opposingDef = 0, opposingSpDef = 0; opposingBattler = BATTLE_OPPOSITE(battler); - for (i = 0; i < 2; opposingBattler ^= BIT_SIDE, i++) + for (i = 0; i < 2; opposingBattler ^= BIT_FLANK, i++) { if (IsBattlerAlive(opposingBattler)) { @@ -4069,6 +4069,7 @@ u8 AbilityBattleEffects(u8 caseID, u8 battler, u16 ability, u8 special, u16 move { gBattleMons[battler].statStages[statId]++; SET_STATCHANGER(statId, 1, FALSE); + gBattlerAttacker = battler; PREPARE_STAT_BUFFER(gBattleTextBuff1, statId); BattleScriptPushCursorAndCallback(BattleScript_AttackerAbilityStatRaiseEnd3); effect++;