fixed Eiscue + multiple weather form changes at once (probably)

This commit is contained in:
AgustinGDLV 2023-03-27 12:05:06 -07:00
parent 2017bee3f8
commit b856cb3e62

View File

@ -2566,14 +2566,14 @@ u8 DoFieldEndTurnEffects(void)
case ENDTURN_WEATHER_FORM: case ENDTURN_WEATHER_FORM:
for (i = 0; i < gBattlersCount; ++i) for (i = 0; i < gBattlersCount; ++i)
{ {
// This breaks Eiscue right now, because Eiscue doesn't use FORM_CHANGE_BATTLE_WEATHER. if (AbilityBattleEffects(ABILITYEFFECT_ON_WEATHER, i, 0, 0, 0))
if(TryBattleFormChange(i, FORM_CHANGE_BATTLE_WEATHER))
{ {
BattleScriptPushCursorAndCallback(BattleScript_BattlerFormChangeWithStringEnd3);
effect++; effect++;
break;
} }
} }
gBattleStruct->turnCountersTracker++; if (effect == 0)
gBattleStruct->turnCountersTracker++;
break; break;
case ENDTURN_STATUS_HEAL: case ENDTURN_STATUS_HEAL:
for (gBattlerAttacker = 0; gBattlerAttacker < gBattlersCount; gBattlerAttacker++) for (gBattlerAttacker = 0; gBattlerAttacker < gBattlersCount; gBattlerAttacker++)
@ -6163,7 +6163,7 @@ u8 AbilityBattleEffects(u8 caseID, u8 battler, u16 ability, u8 special, u16 move
#else #else
TRY_WEATHER_FORM: TRY_WEATHER_FORM:
#endif #endif
if (IsBattlerWeatherAffected(battler, gBattleWeather) if ((IsBattlerWeatherAffected(battler, gBattleWeather) || gBattleWeather == B_WEATHER_NONE)
&& TryBattleFormChange(battler, FORM_CHANGE_BATTLE_WEATHER)) && TryBattleFormChange(battler, FORM_CHANGE_BATTLE_WEATHER))
{ {
BattleScriptPushCursorAndCallback(BattleScript_BattlerFormChangeWithStringEnd3); BattleScriptPushCursorAndCallback(BattleScript_BattlerFormChangeWithStringEnd3);