mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-18 03:38:01 +00:00
- Added the property "sharesCreatureTypeWith".
- Fixed Kinship cards that changed their creature types.
This commit is contained in:
@@ -6807,6 +6807,10 @@ public class Card extends GameEntity implements Comparable<Card> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} else if (property.startsWith("sharesCreatureTypeWith")) {
|
||||||
|
if (!this.sharesCreatureTypeWith(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")) {
|
||||||
@@ -7256,6 +7260,28 @@ public class Card extends GameEntity implements Comparable<Card> {
|
|||||||
return shares;
|
return shares;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* sharesColorWith.
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @param c1
|
||||||
|
* a {@link forge.Card} object.
|
||||||
|
* @return a boolean.
|
||||||
|
*/
|
||||||
|
public final boolean sharesCreatureTypeWith(final Card c1) {
|
||||||
|
|
||||||
|
for (String type : this.getType()) {
|
||||||
|
if (type.equals("AllCreatureTypes")) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if (CardUtil.isACreatureType(type) && c1.isType(type)) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>
|
* <p>
|
||||||
* isAttacking.
|
* isAttacking.
|
||||||
|
|||||||
@@ -933,7 +933,6 @@ public class Upkeep implements java.io.Serializable {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
final String[] shareTypes = { "Merfolk", "Wizard" };
|
|
||||||
final Card[] prevCardShown = { null };
|
final Card[] prevCardShown = { null };
|
||||||
final Card[] peek = { null };
|
final Card[] peek = { null };
|
||||||
|
|
||||||
@@ -957,7 +956,7 @@ public class Upkeep implements java.io.Serializable {
|
|||||||
// Dialogs outside of the Ability appear at the previous end
|
// Dialogs outside of the Ability appear at the previous end
|
||||||
// of turn phase !!!
|
// of turn phase !!!
|
||||||
|
|
||||||
if (peek[0].isValid(shareTypes, k.getController(), k)) {
|
if (peek[0].isValid("Card.sharesCreatureTypeWith", k.getController(), k)) {
|
||||||
if (player.isHuman()) {
|
if (player.isHuman()) {
|
||||||
final StringBuilder question = new StringBuilder();
|
final StringBuilder question = new StringBuilder();
|
||||||
question.append("Your top card is ").append(peek[0].getName());
|
question.append("Your top card is ").append(peek[0].getName());
|
||||||
@@ -1020,7 +1019,6 @@ public class Upkeep implements java.io.Serializable {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
final String[] shareTypes = { "Kithkin", "Soldier" };
|
|
||||||
final Card[] prevCardShown = { null };
|
final Card[] prevCardShown = { null };
|
||||||
final Card[] peek = { null };
|
final Card[] peek = { null };
|
||||||
|
|
||||||
@@ -1044,7 +1042,7 @@ public class Upkeep implements java.io.Serializable {
|
|||||||
// Dialogs outside of the Ability appear at the previous end
|
// Dialogs outside of the Ability appear at the previous end
|
||||||
// of turn phase !!!
|
// of turn phase !!!
|
||||||
|
|
||||||
if (peek[0].isValid(shareTypes, k.getController(), k)) {
|
if (peek[0].isValid("Card.sharesCreatureTypeWith", k.getController(), k)) {
|
||||||
if (player.isHuman()) {
|
if (player.isHuman()) {
|
||||||
final StringBuilder question = new StringBuilder();
|
final StringBuilder question = new StringBuilder();
|
||||||
question.append("Your top card is ").append(peek[0].getName());
|
question.append("Your top card is ").append(peek[0].getName());
|
||||||
@@ -1123,7 +1121,6 @@ public class Upkeep implements java.io.Serializable {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
final String[] shareTypes = { "Treefolk", "Shaman" };
|
|
||||||
final Card[] prevCardShown = { null };
|
final Card[] prevCardShown = { null };
|
||||||
final Card[] peek = { null };
|
final Card[] peek = { null };
|
||||||
|
|
||||||
@@ -1147,7 +1144,7 @@ public class Upkeep implements java.io.Serializable {
|
|||||||
// Dialogs outside of the Ability appear at the previous end
|
// Dialogs outside of the Ability appear at the previous end
|
||||||
// of turn phase !!!
|
// of turn phase !!!
|
||||||
|
|
||||||
if (peek[0].isValid(shareTypes, k.getController(), k)) {
|
if (peek[0].isValid("Card.sharesCreatureTypeWith", k.getController(), k)) {
|
||||||
if (player.isHuman()) {
|
if (player.isHuman()) {
|
||||||
final StringBuilder question = new StringBuilder();
|
final StringBuilder question = new StringBuilder();
|
||||||
question.append("Your top card is ").append(peek[0].getName());
|
question.append("Your top card is ").append(peek[0].getName());
|
||||||
@@ -1224,7 +1221,6 @@ public class Upkeep implements java.io.Serializable {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
final String[] shareTypes = { "Goblin", "Warrior" };
|
|
||||||
final Card[] prevCardShown = { null };
|
final Card[] prevCardShown = { null };
|
||||||
final Card[] peek = { null };
|
final Card[] peek = { null };
|
||||||
|
|
||||||
@@ -1248,7 +1244,7 @@ public class Upkeep implements java.io.Serializable {
|
|||||||
// Dialogs outside of the Ability appear at the previous end
|
// Dialogs outside of the Ability appear at the previous end
|
||||||
// of turn phase !!!
|
// of turn phase !!!
|
||||||
|
|
||||||
if (peek[0].isValid(shareTypes, k.getController(), k)) {
|
if (peek[0].isValid("Card.sharesCreatureTypeWith", k.getController(), k)) {
|
||||||
if (player.isHuman()) {
|
if (player.isHuman()) {
|
||||||
final StringBuilder question = new StringBuilder();
|
final StringBuilder question = new StringBuilder();
|
||||||
question.append("Your top card is ").append(peek[0].getName());
|
question.append("Your top card is ").append(peek[0].getName());
|
||||||
@@ -1323,7 +1319,6 @@ public class Upkeep implements java.io.Serializable {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
final String[] shareTypes = { "Faerie", "Wizard" };
|
|
||||||
final Card[] prevCardShown = { null };
|
final Card[] prevCardShown = { null };
|
||||||
final Card[] peek = { null };
|
final Card[] peek = { null };
|
||||||
|
|
||||||
@@ -1347,7 +1342,7 @@ public class Upkeep implements java.io.Serializable {
|
|||||||
// Dialogs outside of the Ability appear at the previous end
|
// Dialogs outside of the Ability appear at the previous end
|
||||||
// of turn phase !!!
|
// of turn phase !!!
|
||||||
|
|
||||||
if (peek[0].isValid(shareTypes, k.getController(), k)) {
|
if (peek[0].isValid("Card.sharesCreatureTypeWith", k.getController(), k)) {
|
||||||
if (player.isHuman()) {
|
if (player.isHuman()) {
|
||||||
final StringBuilder question = new StringBuilder();
|
final StringBuilder question = new StringBuilder();
|
||||||
question.append("Your top card is ").append(peek[0].getName());
|
question.append("Your top card is ").append(peek[0].getName());
|
||||||
@@ -1408,7 +1403,6 @@ public class Upkeep implements java.io.Serializable {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
final String[] shareTypes = { "Elemental", "Shaman" };
|
|
||||||
final Card[] prevCardShown = { null };
|
final Card[] prevCardShown = { null };
|
||||||
final Card[] peek = { null };
|
final Card[] peek = { null };
|
||||||
|
|
||||||
@@ -1441,7 +1435,7 @@ public class Upkeep implements java.io.Serializable {
|
|||||||
// Dialogs outside of the Ability appear at the previous end
|
// Dialogs outside of the Ability appear at the previous end
|
||||||
// of turn phase !!!
|
// of turn phase !!!
|
||||||
|
|
||||||
if (peek[0].isValid(shareTypes, k.getController(), k)) {
|
if (peek[0].isValid("Card.sharesCreatureTypeWith", k.getController(), k)) {
|
||||||
if (player.isHuman()) {
|
if (player.isHuman()) {
|
||||||
final StringBuilder question = new StringBuilder();
|
final StringBuilder question = new StringBuilder();
|
||||||
question.append("Your top card is ").append(peek[0].getName());
|
question.append("Your top card is ").append(peek[0].getName());
|
||||||
@@ -1509,7 +1503,6 @@ public class Upkeep implements java.io.Serializable {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
final String[] shareTypes = { "Goblin", "Shaman" };
|
|
||||||
final Card[] prevCardShown = { null };
|
final Card[] prevCardShown = { null };
|
||||||
final Card[] peek = { null };
|
final Card[] peek = { null };
|
||||||
|
|
||||||
@@ -1534,7 +1527,7 @@ public class Upkeep implements java.io.Serializable {
|
|||||||
// Dialogs outside of the Ability appear at the previous end
|
// Dialogs outside of the Ability appear at the previous end
|
||||||
// of turn phase !!!
|
// of turn phase !!!
|
||||||
|
|
||||||
if (peek[0].isValid(shareTypes, k.getController(), k)) {
|
if (peek[0].isValid("Card.sharesCreatureTypeWith", k.getController(), k)) {
|
||||||
if (player.isHuman()) {
|
if (player.isHuman()) {
|
||||||
final StringBuilder question = new StringBuilder();
|
final StringBuilder question = new StringBuilder();
|
||||||
question.append("Your top card is ").append(peek[0].getName());
|
question.append("Your top card is ").append(peek[0].getName());
|
||||||
@@ -1602,7 +1595,6 @@ public class Upkeep implements java.io.Serializable {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
final String[] shareTypes = { "Goblin", "Shaman" };
|
|
||||||
final Card[] prevCardShown = { null };
|
final Card[] prevCardShown = { null };
|
||||||
final Card[] peek = { null };
|
final Card[] peek = { null };
|
||||||
|
|
||||||
@@ -1626,7 +1618,7 @@ public class Upkeep implements java.io.Serializable {
|
|||||||
// Dialogs outside of the Ability appear at the previous end
|
// Dialogs outside of the Ability appear at the previous end
|
||||||
// of turn phase !!!
|
// of turn phase !!!
|
||||||
|
|
||||||
if (peek[0].isValid(shareTypes, k.getController(), k)) {
|
if (peek[0].isValid("Card.sharesCreatureTypeWith", k.getController(), k)) {
|
||||||
if (player.isHuman()) {
|
if (player.isHuman()) {
|
||||||
final StringBuilder question = new StringBuilder();
|
final StringBuilder question = new StringBuilder();
|
||||||
question.append("Your top card is ").append(peek[0].getName());
|
question.append("Your top card is ").append(peek[0].getName());
|
||||||
@@ -1688,7 +1680,6 @@ public class Upkeep implements java.io.Serializable {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
final String[] shareTypes = { "Giant", "Wizard" };
|
|
||||||
final Card[] prevCardShown = { null };
|
final Card[] prevCardShown = { null };
|
||||||
final Card[] peek = { null };
|
final Card[] peek = { null };
|
||||||
|
|
||||||
@@ -1712,7 +1703,7 @@ public class Upkeep implements java.io.Serializable {
|
|||||||
// Dialogs outside of the Ability appear at the previous end
|
// Dialogs outside of the Ability appear at the previous end
|
||||||
// of turn phase !!!
|
// of turn phase !!!
|
||||||
|
|
||||||
if (peek[0].isValid(shareTypes, k.getController(), k)) {
|
if (peek[0].isValid("Card.sharesCreatureTypeWith", k.getController(), k)) {
|
||||||
if (player.isHuman()) {
|
if (player.isHuman()) {
|
||||||
final StringBuilder question = new StringBuilder();
|
final StringBuilder question = new StringBuilder();
|
||||||
question.append("Your top card is ").append(peek[0].getName());
|
question.append("Your top card is ").append(peek[0].getName());
|
||||||
@@ -1773,7 +1764,6 @@ public class Upkeep implements java.io.Serializable {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
final String[] shareTypes = { "Merfolk", "Wizard" };
|
|
||||||
final Card[] prevCardShown = { null };
|
final Card[] prevCardShown = { null };
|
||||||
final Card[] peek = { null };
|
final Card[] peek = { null };
|
||||||
|
|
||||||
@@ -1797,7 +1787,7 @@ public class Upkeep implements java.io.Serializable {
|
|||||||
// Dialogs outside of the Ability appear at the previous end
|
// Dialogs outside of the Ability appear at the previous end
|
||||||
// of turn phase !!!
|
// of turn phase !!!
|
||||||
|
|
||||||
if (peek[0].isValid(shareTypes, k.getController(), k)) {
|
if (peek[0].isValid("Card.sharesCreatureTypeWith", k.getController(), k)) {
|
||||||
if (player.isHuman()) {
|
if (player.isHuman()) {
|
||||||
final StringBuilder question = new StringBuilder();
|
final StringBuilder question = new StringBuilder();
|
||||||
question.append("Your top card is ").append(peek[0].getName());
|
question.append("Your top card is ").append(peek[0].getName());
|
||||||
@@ -1879,7 +1869,6 @@ public class Upkeep implements java.io.Serializable {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
final String[] shareTypes = { "Elf", "Warrior" };
|
|
||||||
final Card[] prevCardShown = { null };
|
final Card[] prevCardShown = { null };
|
||||||
final Card[] peek = { null };
|
final Card[] peek = { null };
|
||||||
|
|
||||||
@@ -1903,7 +1892,7 @@ public class Upkeep implements java.io.Serializable {
|
|||||||
// Dialogs outside of the Ability appear at the previous end
|
// Dialogs outside of the Ability appear at the previous end
|
||||||
// of turn phase !!!
|
// of turn phase !!!
|
||||||
|
|
||||||
if (peek[0].isValid(shareTypes, k.getController(), k)) {
|
if (peek[0].isValid("Card.sharesCreatureTypeWith", k.getController(), k)) {
|
||||||
if (player.isHuman()) {
|
if (player.isHuman()) {
|
||||||
final StringBuilder question = new StringBuilder();
|
final StringBuilder question = new StringBuilder();
|
||||||
question.append("Your top card is ").append(peek[0].getName());
|
question.append("Your top card is ").append(peek[0].getName());
|
||||||
@@ -1964,7 +1953,6 @@ public class Upkeep implements java.io.Serializable {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
final String[] shareTypes = { "Elf", "Shaman" };
|
|
||||||
final Card[] prevCardShown = { null };
|
final Card[] prevCardShown = { null };
|
||||||
final Card[] peek = { null };
|
final Card[] peek = { null };
|
||||||
|
|
||||||
@@ -1988,7 +1976,7 @@ public class Upkeep implements java.io.Serializable {
|
|||||||
// Dialogs outside of the Ability appear at the previous end
|
// Dialogs outside of the Ability appear at the previous end
|
||||||
// of turn phase !!!
|
// of turn phase !!!
|
||||||
|
|
||||||
if (peek[0].isValid(shareTypes, k.getController(), k)) {
|
if (peek[0].isValid("Card.sharesCreatureTypeWith", k.getController(), k)) {
|
||||||
if (player.isHuman()) {
|
if (player.isHuman()) {
|
||||||
final StringBuilder question = new StringBuilder();
|
final StringBuilder question = new StringBuilder();
|
||||||
question.append("Your top card is ").append(peek[0].getName());
|
question.append("Your top card is ").append(peek[0].getName());
|
||||||
|
|||||||
Reference in New Issue
Block a user