Merge pull request #20 from Bassoonian/formbattlechangefix

Integrate ghoul's review
This commit is contained in:
Eduardo Quezada D'Ottone 2023-04-29 15:54:13 -04:00 committed by GitHub
commit 9796984637
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 11 deletions

View File

@ -15148,15 +15148,7 @@ 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;
// }
// removed in favor of new form system
}
// Water and Mud Sport

View File

@ -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))