diff --git a/Mage.Sets/src/mage/cards/t/TawnosUrzasApprentice.java b/Mage.Sets/src/mage/cards/t/TawnosUrzasApprentice.java index e4db5140e7..4b80eb69af 100644 --- a/Mage.Sets/src/mage/cards/t/TawnosUrzasApprentice.java +++ b/Mage.Sets/src/mage/cards/t/TawnosUrzasApprentice.java @@ -17,7 +17,7 @@ import mage.constants.Outcome; import mage.constants.TargetController; import mage.constants.Zone; import mage.filter.FilterStackObject; -import mage.filter.predicate.ability.ArtifactSourcePredicate; +import mage.filter.predicate.other.StackObjectWithArtifactSourcePredicate; import mage.filter.predicate.permanent.ControllerPredicate; import mage.game.Game; import mage.game.permanent.Permanent; @@ -34,7 +34,7 @@ public final class TawnosUrzasApprentice extends CardImpl { private final static FilterStackObject filter = new FilterStackObject("activated or triggered ability you control from an artifact source"); static { - filter.add(new ArtifactSourcePredicate()); + filter.add(new StackObjectWithArtifactSourcePredicate()); filter.add(new ControllerPredicate(TargetController.YOU)); } diff --git a/Mage/src/main/java/mage/filter/predicate/other/StackObjectWithArtifactSourcePredicate.java b/Mage/src/main/java/mage/filter/predicate/other/StackObjectWithArtifactSourcePredicate.java new file mode 100644 index 0000000000..bacccb3e80 --- /dev/null +++ b/Mage/src/main/java/mage/filter/predicate/other/StackObjectWithArtifactSourcePredicate.java @@ -0,0 +1,24 @@ + +package mage.filter.predicate.other; + +import mage.MageObject; +import mage.filter.predicate.Predicate; +import mage.game.Game; +import mage.game.stack.StackObject; + +/** + * + */ +public class StackObjectWithArtifactSourcePredicate implements Predicate { + + @Override + public boolean apply(StackObject input, Game game) { + MageObject sourceObject = game.getObject(input.getSourceId()); + return sourceObject != null && sourceObject.isArtifact(); + } + + @Override + public String toString() { + return "Source(Artifact)"; + } +}