From c82c2c185ecc62b58e79ab5feb5e29b3e4268f8f Mon Sep 17 00:00:00 2001 From: Bassoonian Date: Sat, 29 Apr 2023 18:29:50 +0200 Subject: [PATCH] Integrate ghoul's review Co-Authored-By: ghoulslash <41651341+ghoulslash@users.noreply.github.com> --- src/battle_script_commands.c | 10 ---------- src/battle_util.c | 4 ++-- 2 files changed, 2 insertions(+), 12 deletions(-) diff --git a/src/battle_script_commands.c b/src/battle_script_commands.c index 81c39f893c..ccbb488d2e 100644 --- a/src/battle_script_commands.c +++ b/src/battle_script_commands.c @@ -15147,16 +15147,6 @@ static void Cmd_doweatherformchangeanimation(void) static void Cmd_tryweatherformdatachange(void) { CMD_ARGS(); - - u8 form; - - // gBattlescriptCurrInstr = cmd->nextInstr; - // form = TryWeatherFormChange(gBattleScripting.battler); - // if (form) - // { - // BattleScriptPushCursorAndCallback(BattleScript_WeatherFormChange); - // *(&gBattleStruct->formToChangeInto) = form - 1; - // } } // Water and Mud Sport diff --git a/src/battle_util.c b/src/battle_util.c index e3c4ceed69..aab0f2db6d 100644 --- a/src/battle_util.c +++ b/src/battle_util.c @@ -2487,7 +2487,7 @@ u8 DoFieldEndTurnEffects(void) gBattleStruct->turnCountersTracker++; break; case ENDTURN_WEATHER_FORM: - for (i = 0; i < gBattlersCount; ++i) + for (i = 0; i < gBattlersCount; i++) { if (AbilityBattleEffects(ABILITYEFFECT_ON_WEATHER, i, 0, 0, 0)) { @@ -10154,7 +10154,7 @@ bool32 TryBattleFormChange(u8 battlerId, u16 method) { u8 monId = gBattlerPartyIndexes[battlerId]; u8 side = GET_BATTLER_SIDE(battlerId); - struct Pokemon *party = (side == B_SIDE_PLAYER) ? gPlayerParty : gEnemyParty; + struct Pokemon *party = GetBattlerParty(battlerId); u16 targetSpecies; if (!CanBattlerFormChange(battlerId, method))