mirror of
https://github.com/magefree/mage.git
synced 2025-12-24 20:41:58 -08:00
Fix a bug with Tawnos Urza's Apprentice caught by the predicate refactor (#5220)
This commit is contained in:
parent
a68667e582
commit
a94dbe1c9d
2 changed files with 26 additions and 2 deletions
|
|
@ -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<StackObject> {
|
||||
|
||||
@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)";
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue