removed old B_WEATHER_FORMS use, tests now have assumptions for config

This commit is contained in:
AgustinGDLV 2023-05-23 16:10:26 -07:00
parent d4c7e5e559
commit 6a92caa9fb
4 changed files with 9 additions and 11 deletions

View File

@ -4759,12 +4759,6 @@ u8 AbilityBattleEffects(u8 caseID, u8 battler, u16 ability, u8 special, u16 move
effect++;
}
break;
#if B_WEATHER_FORMS < GEN_5
default:
if (gBattleMons[battler].species == SPECIES_CHERRIM)
goto TRY_WEATHER_FORM;
break;
#endif
}
break;
case ABILITYEFFECT_ENDTURN: // 1
@ -6037,11 +6031,7 @@ u8 AbilityBattleEffects(u8 caseID, u8 battler, u16 ability, u8 special, u16 move
switch (gLastUsedAbility)
{
case ABILITY_FORECAST:
#if B_WEATHER_FORMS >= GEN_5
case ABILITY_FLOWER_GIFT:
#else
TRY_WEATHER_FORM:
#endif
if ((IsBattlerWeatherAffected(battler, gBattleWeather)
|| gBattleWeather == B_WEATHER_NONE
|| !WEATHER_HAS_EFFECT) // Air Lock active

View File

@ -156,7 +156,7 @@ static const struct FormChange sAbsolFormChangeTable[] = {
};
static const struct FormChange sCastformFormChangeTable[] = {
#ifdef B_WEATHER_FORMS >= GEN_5
#if B_WEATHER_FORMS >= GEN_5
{FORM_CHANGE_BATTLE_WEATHER, SPECIES_CASTFORM_SUNNY, B_WEATHER_SUN, ABILITY_FORECAST},
{FORM_CHANGE_BATTLE_WEATHER, SPECIES_CASTFORM_RAINY, B_WEATHER_RAIN, ABILITY_FORECAST},
{FORM_CHANGE_BATTLE_WEATHER, SPECIES_CASTFORM_SNOWY, B_WEATHER_HAIL | B_WEATHER_SNOW, ABILITY_FORECAST},
@ -239,9 +239,15 @@ static const struct FormChange sBurmyFormChangeTable[] = {
};
static const struct FormChange sCherrimFormChangeTable[] = {
#if B_WEATHER_FORMS >= GEN_5
{FORM_CHANGE_BATTLE_WEATHER, SPECIES_CHERRIM_SUNSHINE, B_WEATHER_SUN, ABILITY_FLOWER_GIFT},
{FORM_CHANGE_BATTLE_WEATHER, SPECIES_CHERRIM, ~B_WEATHER_SUN, ABILITY_FLOWER_GIFT},
{FORM_CHANGE_BATTLE_WEATHER, SPECIES_CHERRIM, B_WEATHER_NONE, ABILITY_FLOWER_GIFT},
#else
{FORM_CHANGE_BATTLE_WEATHER, SPECIES_CHERRIM_SUNSHINE, B_WEATHER_SUN},
{FORM_CHANGE_BATTLE_WEATHER, SPECIES_CHERRIM, ~B_WEATHER_SUN},
{FORM_CHANGE_BATTLE_WEATHER, SPECIES_CHERRIM, B_WEATHER_NONE},
#endif
{FORM_CHANGE_BATTLE_SWITCH, SPECIES_CHERRIM},
{FORM_CHANGE_FAINT, SPECIES_CHERRIM},
{FORM_CHANGE_END_BATTLE, SPECIES_CHERRIM},

View File

@ -38,6 +38,7 @@ SINGLE_BATTLE_TEST("Flower Gift transforms Cherrim back to normal when weather c
SINGLE_BATTLE_TEST("Flower Gift transforms Cherrim back to normal when its ability is suppressed")
{
GIVEN {
ASSUME(B_WEATHER_FORMS >= GEN_5);
PLAYER(SPECIES_CHERRIM) { Ability(ABILITY_FLOWER_GIFT); };
OPPONENT(SPECIES_WOBBUFFET);
} WHEN {

View File

@ -237,6 +237,7 @@ SINGLE_BATTLE_TEST("Forecast transforms Castform when weather changes")
SINGLE_BATTLE_TEST("Forecast transforms Castform back to normal when its ability is suppressed")
{
GIVEN {
ASSUME(B_WEATHER_FORMS >= GEN_5);
PLAYER(SPECIES_CASTFORM) { Ability(ABILITY_FORECAST); };
OPPONENT(SPECIES_WOBBUFFET);
} WHEN {