diff --git a/src/main/java/forge/Card.java b/src/main/java/forge/Card.java index e3992915f9d..ac75b087eee 100644 --- a/src/main/java/forge/Card.java +++ b/src/main/java/forge/Card.java @@ -6811,6 +6811,10 @@ public class Card extends GameEntity implements Comparable { if (!this.sharesCreatureTypeWith(source)) { return false; } + } else if (property.startsWith("sharesTypeWith")) { + if (!this.sharesTypeWith(source)) { + return false; + } } else if (property.startsWith("withFlashback")) { boolean fb = false; if (this.hasStartOfUnHiddenKeyword("Flashback")) { @@ -7281,6 +7285,25 @@ public class Card extends GameEntity implements Comparable { } return false; } + + /** + *

+ * sharesTypeWith. + *

+ * + * @param c1 + * a {@link forge.Card} object. + * @return a boolean. + */ + public final boolean sharesTypeWith(final Card c1) { + + for (String type : this.getType()) { + if (c1.isType(type)) { + return true; + } + } + return false; + } /** *