Fixed Bad Dream's ability popup message

This commit is contained in:
Eduardo Quezada 2022-11-04 00:46:07 -03:00
parent 9ea3ad8938
commit 8c66b318eb

View File

@ -5003,15 +5003,20 @@ u8 AbilityBattleEffects(u8 caseID, u8 battler, u16 ability, u8 special, u16 move
gDisableStructs[gBattlerAttacker].truantCounter ^= 1;
break;
case ABILITY_BAD_DREAMS:
if (gBattleMons[battler].status1 & STATUS1_SLEEP
|| gBattleMons[BATTLE_OPPOSITE(battler)].status1 & STATUS1_SLEEP
|| GetBattlerAbility(battler) == ABILITY_COMATOSE
|| GetBattlerAbility(BATTLE_OPPOSITE(battler)) == ABILITY_COMATOSE)
{
u32 i;
for (i = 0; i < gBattlersCount; i++)
{
BattleScriptPushCursorAndCallback(BattleScript_BadDreamsActivates);
effect++;
if (i != battler && IsBattlerAlive(i)
&& ((gBattleMons[i].status1 & STATUS1_SLEEP) || GetBattlerAbility(i) == ABILITY_COMATOSE))
{
BattleScriptPushCursorAndCallback(BattleScript_BadDreamsActivates);
effect++;
break;
}
}
break;
}
SOLAR_POWER_HP_DROP:
case ABILITY_SOLAR_POWER:
if (IsBattlerWeatherAffected(battler, B_WEATHER_SUN))