mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 12:18:00 +00:00
- Added some more options to the property "SharesColorWith" (for example "SharesColorWith TopOfLibary").
This commit is contained in:
@@ -6548,8 +6548,28 @@ public class Card extends GameEntity implements Comparable<Card> {
|
||||
return false;
|
||||
}
|
||||
} else if (property.startsWith("SharesColorWith")) {
|
||||
if (!sharesColorWith(source)) {
|
||||
return false;
|
||||
if (property.equals("SharesColorWith")) {
|
||||
if(!sharesColorWith(source)) {
|
||||
return false;
|
||||
}
|
||||
} else {
|
||||
String restriction = property.split("SharesColorWith ")[1];
|
||||
if (restriction.equals("TopCardOfLibrary")) {
|
||||
CardList list = this.getOwner().getCardsIn(Zone.Library);
|
||||
if (list.isEmpty() || !sharesColorWith(list.get(0))) {
|
||||
return false;
|
||||
}
|
||||
} else {
|
||||
boolean shares = false;
|
||||
for (Card card : sourceController.getCardsIn(Constant.Zone.Battlefield)) {
|
||||
if (card.isValid(restriction, sourceController, source) && sharesColorWith(card)) {
|
||||
shares = true;
|
||||
}
|
||||
}
|
||||
if(!shares) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
} else if (property.startsWith("withFlashback")) {
|
||||
boolean fb = false;
|
||||
|
||||
Reference in New Issue
Block a user