fix damage prevention to multiple targets

This commit is contained in:
xenohedron 2024-05-16 14:02:27 -04:00
parent 3abce2f5c8
commit b4dbc75ac5
2 changed files with 51 additions and 2 deletions

View file

@ -1,4 +1,3 @@
package mage.abilities.effects.common;
import mage.constants.Duration;
@ -45,7 +44,9 @@ public class PreventDamageToTargetEffect extends PreventionEffectImpl {
@Override
public boolean applies(GameEvent event, Ability source, Game game) {
return !this.used && super.applies(event, source, game) && event.getTargetId().equals(getTargetPointer().getFirst(game, source));
return !this.used
&& super.applies(event, source, game)
&& getTargetPointer().getTargets(game, source).contains(event.getTargetId());
}
@Override