implement [MIR] Shadowbane

This commit is contained in:
Susucre 2025-05-30 20:31:36 +02:00
parent 4e717abaeb
commit d57b99d6e4
4 changed files with 276 additions and 4 deletions

View file

@ -96,7 +96,7 @@ public class PreventNextDamageFromChosenSourceEffect extends PreventionEffectImp
@Override
public boolean replaceEvent(GameEvent event, Ability source, Game game) {
PreventionEffectData data = preventDamageAction(event, source, game);
this.used = true;
discard();
if (onPrevention != null) {
onPrevention.apply(data, targetSource, event, source, game);
}
@ -105,8 +105,7 @@ public class PreventNextDamageFromChosenSourceEffect extends PreventionEffectImp
@Override
public boolean applies(GameEvent event, Ability source, Game game) {
return !this.used
&& super.applies(event, source, game)
return super.applies(event, source, game)
&& (!toYou || event.getTargetId().equals(source.getControllerId()))
&& event.getSourceId().equals(targetSource.getFirstTarget());
}