cleanup usages of BlockedAttackerWatcher

This commit is contained in:
xenohedron 2023-11-29 20:43:17 -05:00
parent cd439ab8c8
commit a4cc086775
10 changed files with 5 additions and 12 deletions

View file

@ -34,7 +34,6 @@ public final class GazeOfTheGorgon extends CardImpl {
this.getSpellAbility().addEffect(new RegenerateTargetEffect());
this.getSpellAbility().addTarget(new TargetCreaturePermanent());
this.getSpellAbility().addEffect(new GazeOfTheGorgonCreateDelayedTriggeredAbilityEffect());
this.getSpellAbility().addWatcher(new BlockedAttackerWatcher());
}
private GazeOfTheGorgon(final GazeOfTheGorgon card) {

View file

@ -46,7 +46,6 @@ public final class GlyphOfDelusion extends CardImpl {
this.getSpellAbility().addTarget(new TargetCreaturePermanent(filter));
this.getSpellAbility().addTarget(new GlyphOfDelusionSecondTarget());
this.getSpellAbility().addEffect(new GlyphOfDelusionEffect());
this.getSpellAbility().addWatcher(new BlockedAttackerWatcher());
}
private GlyphOfDelusion(final GlyphOfDelusion card) {

View file

@ -41,7 +41,6 @@ public final class GlyphOfDoom extends CardImpl {
this.getSpellAbility().addTarget(new TargetCreaturePermanent(filter));
this.getSpellAbility().addEffect(new InfoEffect("Choose target Wall creature"));
this.getSpellAbility().addEffect(new GlyphOfDoomCreateDelayedTriggeredAbilityEffect());
this.getSpellAbility().addWatcher(new BlockedAttackerWatcher());
}
private GlyphOfDoom(final GlyphOfDoom card) {

View file

@ -48,7 +48,6 @@ public final class GlyphOfReincarnation extends CardImpl {
// Destroy all creatures that were blocked by target Wall this turn. They cant be regenerated. For each creature that died this way, put a creature card from the graveyard of the player who controlled that creature the last time it became blocked by that Wall onto the battlefield under its owners control.
this.getSpellAbility().addTarget(new TargetCreaturePermanent(filter));
this.getSpellAbility().addEffect(new GlyphOfReincarnationEffect());
this.getSpellAbility().addWatcher(new BlockedAttackerWatcher());
}
private GlyphOfReincarnation(final GlyphOfReincarnation card) {

View file

@ -33,7 +33,6 @@ public final class HuntDown extends CardImpl {
this.getSpellAbility().addEffect(new HuntDownEffect());
this.getSpellAbility().addTarget(new TargetCreaturePermanent(filterMustBlock));
this.getSpellAbility().addTarget(new TargetCreaturePermanent(filterToBeBlocked));
this.getSpellAbility().addWatcher(new BlockedAttackerWatcher());
}

View file

@ -45,7 +45,6 @@ public final class JovensFerrets extends CardImpl {
// At end of combat, tap all creatures that blocked Joven's Ferrets this turn. They don't untap during their controller's next untap step.
Ability eocAbility = new EndOfCombatTriggeredAbility(new JovensFerretsEffect(), false);
eocAbility.addWatcher(new BlockedAttackerWatcher());
this.addAbility(eocAbility);
}
@ -101,4 +100,4 @@ class JovensFerretsEffect extends OneShotEffect {
}
return false;
}
}
}

View file

@ -38,7 +38,6 @@ public final class MonstrousStep extends CardImpl {
// Target creature gets +7/+7 until end of turn. Up to one target creature blocks it this turn if able.
this.getSpellAbility().addEffect(new BoostTargetEffect(7, 7));
this.getSpellAbility().addEffect(new MonstrousStepEffect());
this.getSpellAbility().addWatcher(new BlockedAttackerWatcher());
TargetPermanent target = new TargetCreaturePermanent();
target.setTargetTag(1);

View file

@ -55,7 +55,7 @@ public final class RimehornAurochs extends CardImpl {
Ability ability = new SimpleActivatedAbility(new RimehornAurochsEffect(), new ManaCostsImpl<>("{2}{S}"));
ability.addTarget(new TargetCreaturePermanent(new FilterCreaturePermanent("creature that must block")));
ability.addTarget(new TargetCreaturePermanent(new FilterCreaturePermanent("creature that is to be blocked")));
this.addAbility(ability, new BlockedAttackerWatcher());
this.addAbility(ability);
}
private RimehornAurochs(final RimehornAurochs card) {

View file

@ -33,7 +33,6 @@ public final class VenomousBreath extends CardImpl {
this.getSpellAbility().addTarget(new TargetCreaturePermanent());
this.getSpellAbility().addEffect(new InfoEffect("Choose target creature"));
this.getSpellAbility().addEffect(new VenomousBreathCreateDelayedTriggeredAbilityEffect());
this.getSpellAbility().addWatcher(new BlockedAttackerWatcher());
}
private VenomousBreath(final VenomousBreath card) {

View file

@ -1,4 +1,3 @@
package mage.watchers.common;
import java.util.HashMap;
@ -9,7 +8,6 @@ import mage.MageObjectReference;
import mage.constants.WatcherScope;
import mage.game.Game;
import mage.game.events.GameEvent;
import mage.game.events.GameEvent.EventType;
import mage.game.permanent.Permanent;
import mage.watchers.Watcher;
@ -21,6 +19,9 @@ public class BlockedAttackerWatcher extends Watcher {
private final Map<MageObjectReference, Set<MageObjectReference>> blockData = new HashMap<>();
/**
* Game default watcher
*/
public BlockedAttackerWatcher() {
super(WatcherScope.GAME);
}