mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-17 19:28:01 +00:00
- Added the property "sharesTypeWith".
This commit is contained in:
@@ -6811,6 +6811,10 @@ public class Card extends GameEntity implements Comparable<Card> {
|
|||||||
if (!this.sharesCreatureTypeWith(source)) {
|
if (!this.sharesCreatureTypeWith(source)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
} else if (property.startsWith("sharesTypeWith")) {
|
||||||
|
if (!this.sharesTypeWith(source)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
} else if (property.startsWith("withFlashback")) {
|
} else if (property.startsWith("withFlashback")) {
|
||||||
boolean fb = false;
|
boolean fb = false;
|
||||||
if (this.hasStartOfUnHiddenKeyword("Flashback")) {
|
if (this.hasStartOfUnHiddenKeyword("Flashback")) {
|
||||||
@@ -7281,6 +7285,25 @@ public class Card extends GameEntity implements Comparable<Card> {
|
|||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* sharesTypeWith.
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @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;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>
|
* <p>
|
||||||
|
|||||||
Reference in New Issue
Block a user