diff --git a/Mage.Sets/src/mage/cards/b/BridgeFromBelow.java b/Mage.Sets/src/mage/cards/b/BridgeFromBelow.java index 21da232f1641..f442083da90b 100644 --- a/Mage.Sets/src/mage/cards/b/BridgeFromBelow.java +++ b/Mage.Sets/src/mage/cards/b/BridgeFromBelow.java @@ -1,4 +1,3 @@ - package mage.cards.b; import java.util.UUID; @@ -13,7 +12,7 @@ import mage.constants.Zone; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.Predicates; -import mage.filter.predicate.permanent.ControllerPredicate; +import mage.filter.predicate.other.OwnerPredicate; import mage.filter.predicate.permanent.TokenPredicate; import mage.game.Game; import mage.game.events.GameEvent; @@ -28,23 +27,24 @@ */ public final class BridgeFromBelow extends CardImpl { - private static final FilterCreaturePermanent filter1 = new FilterCreaturePermanent("Whenever a nontoken creature is put into your graveyard from the battlefield"); private static final FilterCreaturePermanent filter2 = new FilterCreaturePermanent("When a creature is put into an opponent's graveyard from the battlefield"); - - static{ - filter1.add(new ControllerPredicate(TargetController.YOU)); + + static { + filter1.add(new OwnerPredicate(TargetController.YOU)); filter1.add(Predicates.not(TokenPredicate.instance)); - filter2.add(new ControllerPredicate(TargetController.OPPONENT)); + filter2.add(new OwnerPredicate(TargetController.OPPONENT)); } - + public BridgeFromBelow(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{B}{B}{B}"); + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{B}{B}{B}"); // Whenever a nontoken creature is put into your graveyard from the battlefield, if Bridge from Below is in your graveyard, create a 2/2 black Zombie creature token. this.addAbility(new BridgeFromBelowAbility(new CreateTokenEffect(new ZombieToken()), filter1)); + // When a creature is put into an opponent's graveyard from the battlefield, if Bridge from Below is in your graveyard, exile Bridge from Below. this.addAbility(new BridgeFromBelowAbility(new ExileSourceEffect(), filter2)); + } public BridgeFromBelow(final BridgeFromBelow card) { @@ -86,7 +86,8 @@ public boolean checkTrigger(GameEvent event, Game game) { ZoneChangeEvent zEvent = (ZoneChangeEvent) event; if (zEvent.isDiesEvent()) { Permanent permanent = (Permanent) game.getLastKnownInformation(event.getTargetId(), Zone.BATTLEFIELD); - if (permanent != null && filter.match(permanent, sourceId, controllerId, game)) { + if (permanent != null + && filter.match(permanent, sourceId, controllerId, game)) { return true; } } @@ -96,11 +97,12 @@ public boolean checkTrigger(GameEvent event, Game game) { @Override public boolean checkInterveningIfClause(Game game) { Player controller = game.getPlayer(this.getControllerId()); - return controller != null && controller.getGraveyard().contains(this.getSourceId()); + return controller != null + && controller.getGraveyard().contains(this.getSourceId()); } - + @Override public String getRule() { - return filter.getMessage() +", if {this} is in your graveyard, " + super.getRule(); + return filter.getMessage() + ", if {this} is in your graveyard, " + super.getRule(); } }