Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed softlock w/ weather-triggered form changes & Cloud Nine #4382

Merged
merged 2 commits into from
Apr 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/battle_util.c
Original file line number Diff line number Diff line change
Expand Up @@ -10454,7 +10454,8 @@ u16 GetBattleFormChangeTargetSpecies(u32 battler, u16 method)
targetSpecies = formChanges[i].targetSpecies;
}
// Otherwise, just check for a match between the weather and the form change table.
else if (gBattleWeather & formChanges[i].param1
// Added a check for whether the weather is in effect to prevent end-of-turn soft locks with Cloud Nine / Air Lock
else if (((gBattleWeather & formChanges[i].param1) && WEATHER_HAS_EFFECT)
|| (gBattleWeather == B_WEATHER_NONE && formChanges[i].param1 == B_WEATHER_NONE))
{
targetSpecies = formChanges[i].targetSpecies;
Expand Down
1 change: 0 additions & 1 deletion test/battle/ability/forecast.c
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,6 @@ SINGLE_BATTLE_TEST("Forecast transforms Castform back to normal when Sandstorm i

SINGLE_BATTLE_TEST("Forecast transforms Castform back to normal under Air Lock")
{
KNOWN_FAILING;
GIVEN {
PLAYER(SPECIES_CASTFORM_NORMAL) { Ability(ABILITY_FORECAST); }
OPPONENT(SPECIES_WOBBUFFET);
Expand Down
Loading