Fix Forecast and Flower Gift corruption (#7796)
This commit is contained in:
parent
2f69b44f81
commit
d1bd4edc57
@ -15194,7 +15194,7 @@ void BS_ItemRestorePP(void)
|
||||
void BS_TryRevertWeatherForm(void)
|
||||
{
|
||||
NATIVE_ARGS();
|
||||
if (TryBattleFormChange(gBattlerTarget, FORM_CHANGE_BATTLE_WEATHER))
|
||||
if (IsBattlerAlive(gBattlerTarget) && TryBattleFormChange(gBattlerTarget, FORM_CHANGE_BATTLE_WEATHER))
|
||||
{
|
||||
gBattleScripting.battler = gBattlerTarget;
|
||||
BattleScriptPush(cmd->nextInstr);
|
||||
|
||||
@ -3,8 +3,9 @@
|
||||
|
||||
SINGLE_BATTLE_TEST("Aegislash reverts to Shield Form upon fainting")
|
||||
{
|
||||
KNOWN_FAILING;
|
||||
GIVEN {
|
||||
PLAYER(SPECIES_AEGISLASH_SHIELD) { HP(1); }
|
||||
PLAYER(SPECIES_AEGISLASH_BLADE) { HP(1); }
|
||||
PLAYER(SPECIES_WOBBUFFET);
|
||||
OPPONENT(SPECIES_WOBBUFFET);
|
||||
} WHEN {
|
||||
@ -16,3 +17,26 @@ SINGLE_BATTLE_TEST("Aegislash reverts to Shield Form upon fainting")
|
||||
EXPECT_EQ(GetMonData(&PLAYER_PARTY[0], MON_DATA_SPECIES), SPECIES_AEGISLASH_SHIELD);
|
||||
}
|
||||
}
|
||||
|
||||
DOUBLE_BATTLE_TEST("Causing a Forecast or Flower Gift Pokémon to faint should not cause a message") // issue 7795
|
||||
{
|
||||
u32 species;
|
||||
PARAMETRIZE { species = SPECIES_CASTFORM; }
|
||||
PARAMETRIZE { species = SPECIES_CHERRIM; }
|
||||
GIVEN {
|
||||
PLAYER(SPECIES_WYNAUT);
|
||||
PLAYER(SPECIES_WOBBUFFET);
|
||||
OPPONENT(SPECIES_VULPIX) { Ability(ABILITY_DROUGHT); }
|
||||
OPPONENT(species) { HP(1); }
|
||||
} WHEN {
|
||||
TURN { MOVE(playerRight, MOVE_GYRO_BALL, target: opponentRight); }
|
||||
} SCENE {
|
||||
if (species == SPECIES_CASTFORM) {
|
||||
MESSAGE("The opposing Castform fainted!");
|
||||
NOT MESSAGE("The opposing Castform transformed!");
|
||||
} else {
|
||||
MESSAGE("The opposing Cherrim fainted!");
|
||||
NOT MESSAGE("The opposing Cherrim transformed!");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user