mirror of
https://github.com/magefree/mage.git
synced 2025-12-22 11:32:00 -08:00
* Watchdof + Briar Patch - Fixed abug that an ability could have no controller.
This commit is contained in:
parent
6857b7db29
commit
1c8f11e849
2 changed files with 10 additions and 12 deletions
|
|
@ -52,7 +52,7 @@ public class BriarPatch extends CardImpl {
|
||||||
Effect effect = new BoostTargetEffect(-1, 0, Duration.EndOfTurn);
|
Effect effect = new BoostTargetEffect(-1, 0, Duration.EndOfTurn);
|
||||||
effect.setText("it gets -1/-0");
|
effect.setText("it gets -1/-0");
|
||||||
Ability ability = new AttackedByCreatureTriggeredAbility(Zone.BATTLEFIELD, effect, false, SetTargetPointer.PERMANENT);
|
Ability ability = new AttackedByCreatureTriggeredAbility(Zone.BATTLEFIELD, effect, false, SetTargetPointer.PERMANENT);
|
||||||
this.getAbilities().add(ability);
|
addAbility(ability);
|
||||||
}
|
}
|
||||||
|
|
||||||
public BriarPatch(final BriarPatch card) {
|
public BriarPatch(final BriarPatch card) {
|
||||||
|
|
|
||||||
|
|
@ -58,9 +58,9 @@ public class Watchdog extends CardImpl {
|
||||||
this.toughness = new MageInt(2);
|
this.toughness = new MageInt(2);
|
||||||
|
|
||||||
// Watchdog blocks each turn if able.
|
// 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.
|
// 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")));
|
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 {
|
class WatchdogFilter extends FilterAttackingCreature {
|
||||||
|
|
||||||
public WatchdogFilter() {
|
public WatchdogFilter() {
|
||||||
super("creatures attacking you");
|
super("creatures attacking you");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public WatchdogFilter(final WatchdogFilter filter) {
|
public WatchdogFilter(final WatchdogFilter filter) {
|
||||||
super(filter);
|
super(filter);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue