mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 12:48:00 +00:00
PlayerProperty give startsWith "controls" a fallback
This commit is contained in:
@@ -242,8 +242,8 @@ public class PlayerProperty {
|
|||||||
} else if (property.startsWith("controls")) {
|
} else if (property.startsWith("controls")) {
|
||||||
final String[] type = property.substring(8).split("_");
|
final String[] type = property.substring(8).split("_");
|
||||||
final CardCollectionView list = CardLists.getValidCards(player.getCardsIn(ZoneType.Battlefield), type[0], sourceController, source, spellAbility);
|
final CardCollectionView list = CardLists.getValidCards(player.getCardsIn(ZoneType.Battlefield), type[0], sourceController, source, spellAbility);
|
||||||
String comparator = type[1];
|
String comparator = type.length > 1 ? type[1] : "GE";
|
||||||
int y = AbilityUtils.calculateAmount(source, comparator.substring(2), spellAbility);
|
int y = type.length > 1 ? AbilityUtils.calculateAmount(source, comparator.substring(2), spellAbility) : 1;
|
||||||
if (!Expressions.compare(list.size(), comparator, y)) {
|
if (!Expressions.compare(list.size(), comparator, y)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user