Fix explosive moves used by a mon with Damp not getting suppressed

This commit is contained in:
Zach Day 2024-06-19 16:28:58 -04:00
parent b7853f9ee6
commit 2a4a056426

View File

@ -3050,9 +3050,7 @@ export class MoveEffectPhase extends PokemonPhase {
// Check if other Pokemon on the field have an ability that prevents this move
const prevented = new Utils.BooleanHolder(false);
for (const other of this.scene.getField(true).filter(p => user.id !== p.id)) {
applyAbAttrs(FieldPreventMovesAbAttr, other, prevented, move, user as Pokemon);
}
this.scene.getField(true).forEach(p => applyAbAttrs(FieldPreventMovesAbAttr, p, prevented, move, user));
if (prevented.value) {
// Just bail out of the move if it got prevented. No need to manually show message; the Attr handles that.
moveHistoryEntry.result = MoveResult.FAIL;