Fix Intimidate affecting fainted mons
This commit is contained in:
parent
dff72b97dd
commit
0a7dd2edd6
1 changed files with 33 additions and 32 deletions
|
@ -5525,10 +5525,11 @@ u8 AbilityBattleEffects(u8 caseID, u8 battler, u16 ability, u8 special, u16 move
|
||||||
case ABILITYEFFECT_INTIMIDATE2:
|
case ABILITYEFFECT_INTIMIDATE2:
|
||||||
for (i = 0; i < gBattlersCount; i++)
|
for (i = 0; i < gBattlersCount; i++)
|
||||||
{
|
{
|
||||||
if (GetBattlerAbility(i) == ABILITY_INTIMIDATE && gBattleResources->flags->flags[i] & RESOURCE_FLAG_INTIMIDATED)
|
if (GetBattlerAbility(i) == ABILITY_INTIMIDATE && gBattleResources->flags->flags[i] & RESOURCE_FLAG_INTIMIDATED
|
||||||
|
&& (IsBattlerAlive(BATTLE_OPPOSITE(i)) || IsBattlerAlive(BATTLE_PARTNER(BATTLE_OPPOSITE(i))))) // At least one opposing mon has to be alive.
|
||||||
{
|
{
|
||||||
gLastUsedAbility = ABILITY_INTIMIDATE;
|
|
||||||
gBattleResources->flags->flags[i] &= ~(RESOURCE_FLAG_INTIMIDATED);
|
gBattleResources->flags->flags[i] &= ~(RESOURCE_FLAG_INTIMIDATED);
|
||||||
|
gLastUsedAbility = ABILITY_INTIMIDATE;
|
||||||
if (caseID == ABILITYEFFECT_INTIMIDATE1)
|
if (caseID == ABILITYEFFECT_INTIMIDATE1)
|
||||||
{
|
{
|
||||||
BattleScriptPushCursorAndCallback(BattleScript_IntimidateActivatesEnd3);
|
BattleScriptPushCursorAndCallback(BattleScript_IntimidateActivatesEnd3);
|
||||||
|
|
Loading…
Reference in a new issue