* Sludge Strider - fixed rollback error on card usage;
-
package mage.cards.s;
-import java.util.UUID;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.TriggeredAbilityImpl;
@@ -10,12 +8,8 @@ import mage.abilities.effects.OneShotEffect;
import mage.abilities.effects.common.DoIfCostPaid;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
-import mage.constants.CardType;
-import mage.constants.SubType;
-import mage.constants.Outcome;
-import mage.constants.TargetController;
-import mage.constants.Zone;
-import mage.filter.common.FilterArtifactCard;
+import mage.constants.*;
+import mage.filter.common.FilterArtifactPermanent;
import mage.filter.predicate.permanent.AnotherPredicate;
import mage.game.Game;
import mage.game.events.GameEvent;
@@ -25,8 +19,9 @@ import mage.game.permanent.Permanent;
import mage.players.Player;
import mage.target.TargetPlayer;
+import java.util.UUID;
+
/**
- *
* @author jeffwadsworth
*/
public final class SludgeStrider extends CardImpl {
@@ -57,7 +52,8 @@ public final class SludgeStrider extends CardImpl {
class SludgeStriderTriggeredAbility extends TriggeredAbilityImpl {
- private static final FilterArtifactCard filter = new FilterArtifactCard("another artifact under your control");
+ private static final FilterArtifactPermanent filter = new FilterArtifactPermanent("another artifact under your control");
+
static {
filter.add(TargetController.YOU.getControllerPredicate());
filter.add(AnotherPredicate.instance);
@@ -93,9 +89,7 @@ class SludgeStriderTriggeredAbility extends TriggeredAbilityImpl {
if (permanent == null) {
permanent = (Permanent) game.getLastKnownInformation(targetId, Zone.BATTLEFIELD);
}
- if (permanent != null && filter.match(permanent, getSourceId(), getControllerId(), game)) {
- return true;
- }
+ return permanent != null && filter.match(permanent, getSourceId(), getControllerId(), game);
}
}
return false;
