* Watchdof + Briar Patch - Fixed abug that an ability could have no controller.

This commit is contained in:
LevelX2 2017-08-30 16:56:39 +02:00
parent 6857b7db29
commit 1c8f11e849
2 changed files with 10 additions and 12 deletions

View file

@ -52,7 +52,7 @@ public class BriarPatch extends CardImpl {
Effect effect = new BoostTargetEffect(-1, 0, Duration.EndOfTurn);
effect.setText("it gets -1/-0");
Ability ability = new AttackedByCreatureTriggeredAbility(Zone.BATTLEFIELD, effect, false, SetTargetPointer.PERMANENT);
this.getAbilities().add(ability);
addAbility(ability);
}
public BriarPatch(final BriarPatch card) {

View file

@ -58,9 +58,9 @@ public class Watchdog extends CardImpl {
this.toughness = new MageInt(2);
// Watchdog blocks each turn if able.
this.getAbilities().add(new SimpleStaticAbility(Zone.BATTLEFIELD, new BlocksIfAbleSourceEffect(Duration.WhileOnBattlefield)));
addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BlocksIfAbleSourceEffect(Duration.WhileOnBattlefield)));
// As long as Watchdog is untapped, all creatures attacking you get -1/-0.
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new ConditionalContinuousEffect(
addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new ConditionalContinuousEffect(
new BoostAllEffect(-1, 0, Duration.WhileOnBattlefield, new WatchdogFilter(), false), new InvertCondition(SourceTappedCondition.instance), "As long as {this} is untapped, all creatures attacking you get -1/-0")));
}
@ -74,14 +74,12 @@ public class Watchdog extends CardImpl {
}
}
class WatchdogFilter extends FilterAttackingCreature {
public WatchdogFilter() {
super("creatures attacking you");
}
public WatchdogFilter(final WatchdogFilter filter) {
super(filter);
}