From 772dbe9ec5667ded729d8c27b55f8a51066544df Mon Sep 17 00:00:00 2001 From: Northmoc Date: Mon, 20 Sep 2021 13:25:33 -0400 Subject: [PATCH] PlayerProperty give startsWith "controls" a fallback --- .../src/main/java/forge/game/player/PlayerProperty.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/forge-game/src/main/java/forge/game/player/PlayerProperty.java b/forge-game/src/main/java/forge/game/player/PlayerProperty.java index f6c2a9187f3..bc719ead392 100644 --- a/forge-game/src/main/java/forge/game/player/PlayerProperty.java +++ b/forge-game/src/main/java/forge/game/player/PlayerProperty.java @@ -242,8 +242,8 @@ public class PlayerProperty { } else if (property.startsWith("controls")) { final String[] type = property.substring(8).split("_"); final CardCollectionView list = CardLists.getValidCards(player.getCardsIn(ZoneType.Battlefield), type[0], sourceController, source, spellAbility); - String comparator = type[1]; - int y = AbilityUtils.calculateAmount(source, comparator.substring(2), spellAbility); + String comparator = type.length > 1 ? type[1] : "GE"; + int y = type.length > 1 ? AbilityUtils.calculateAmount(source, comparator.substring(2), spellAbility) : 1; if (!Expressions.compare(list.size(), comparator, y)) { return false; }