Fixes cantBeSurpressed ability check for breakable abilities

This commit is contained in:
AlexOn1ine 2024-07-26 20:19:58 +02:00
parent 3d65141db8
commit 8b2774e07d
2 changed files with 13 additions and 1 deletions

View file

@ -6224,7 +6224,6 @@ u32 GetBattlerAbility(u32 battler)
&& gStatuses3[battler] & STATUS3_GASTRO_ACID
&& gBattleMons[battler].ability == ABILITY_COMATOSE)
return ABILITY_NONE;
return gBattleMons[battler].ability;
}
if (gStatuses3[battler] & STATUS3_GASTRO_ACID)

View file

@ -121,3 +121,16 @@ SINGLE_BATTLE_TEST("Disguised Mimikyu takes damage from Rough Skin without break
EXPECT_EQ(player->species, SPECIES_MIMIKYU_DISGUISED);
}
}
SINGLE_BATTLE_TEST("Disguised Mimikyu is ignored by Mold Breaker")
{
GIVEN {
PLAYER(SPECIES_MIMIKYU_DISGUISED) { Ability(ABILITY_DISGUISE); }
OPPONENT(SPECIES_PINSIR) { Ability(ABILITY_MOLD_BREAKER); }
} WHEN {
TURN { MOVE(opponent, MOVE_AERIAL_ACE); }
} SCENE {
ANIMATION(ANIM_TYPE_MOVE, MOVE_AERIAL_ACE, opponent);
NOT ABILITY_POPUP(player, ABILITY_DISGUISE);
}
}