From f48e11e3d033da3675d6d8955baf63642b1b26e3 Mon Sep 17 00:00:00 2001 From: Sloth Date: Mon, 5 Dec 2011 19:03:02 +0000 Subject: [PATCH] - Little fix for Kinship cards with Changeling. --- src/main/java/forge/Card.java | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/src/main/java/forge/Card.java b/src/main/java/forge/Card.java index 7535296cd97..e3992915f9d 100644 --- a/src/main/java/forge/Card.java +++ b/src/main/java/forge/Card.java @@ -7259,10 +7259,10 @@ public class Card extends GameEntity implements Comparable { shares |= (this.isWhite() && c1.isWhite()); return shares; } - + /** *

- * sharesColorWith. + * sharesCreatureTypeWith. *

* * @param c1 @@ -7272,7 +7272,7 @@ public class Card extends GameEntity implements Comparable { public final boolean sharesCreatureTypeWith(final Card c1) { for (String type : this.getType()) { - if (type.equals("AllCreatureTypes")) { + if (type.equals("AllCreatureTypes") && c1.hasACreatureType()) { return true; } if (CardUtil.isACreatureType(type) && c1.isType(type)) { @@ -7282,6 +7282,22 @@ public class Card extends GameEntity implements Comparable { return false; } + /** + *

+ * hasACreatureType. + *

+ * + * @return a boolean. + */ + public final boolean hasACreatureType() { + for (String type : this.getType()) { + if (CardUtil.isACreatureType(type)) { + return true; + } + } + return false; + } + /** *

* isAttacking.