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 88038cad515..5970a266813 100644 --- a/forge-game/src/main/java/forge/game/player/PlayerProperty.java +++ b/forge-game/src/main/java/forge/game/player/PlayerProperty.java @@ -225,6 +225,15 @@ public class PlayerProperty { if (!Expressions.compare(list.size(), comparator, y)) { return false; } + } else if (property.startsWith("HasCardsIn")) { // HasCardsIn[zonetype]_[cardtype]_[comparator] + final String[] type = property.substring(10).split("_"); + final CardCollectionView list = CardLists.getValidCards(player.getCardsIn(ZoneType.smartValueOf(type[0])), type[1], sourceController, source); + String comparator = type[2]; + String compareTo = comparator.substring(2); + int y = StringUtils.isNumeric(compareTo) ? Integer.parseInt(compareTo) : 0; + if (!Expressions.compare(list.size(), comparator, y)) { + return false; + } } else if (property.startsWith("withMore")) { final String cardType = property.split("sThan")[0].substring(8); final Player controller = "Active".equals(property.split("sThan")[1]) ? game.getPhaseHandler().getPlayerTurn() : sourceController; diff --git a/forge-gui/res/cardsfolder/upcoming/vantress_gargoyle.txt b/forge-gui/res/cardsfolder/upcoming/vantress_gargoyle.txt new file mode 100644 index 00000000000..c702ababf39 --- /dev/null +++ b/forge-gui/res/cardsfolder/upcoming/vantress_gargoyle.txt @@ -0,0 +1,11 @@ +Name:Vantress Gargoyle +ManaCost:1 U +Types:Artifact Creature Gargoyle +PT:5/4 +K:Flying +S:Mode$ CantAttack | ValidCard$ Card.Self | UnlessDefender$ HasCardsInGraveyard_Card_GE7 | Description$ CARDNAME can't attack unless defending player has seven or more cards in their graveyard. +S:Mode$ Continuous | Affected$ Card.Self | AddHiddenKeyword$ CARDNAME can't block. | CheckSVar$ X | SVarCompare$ LT4 | Description$ CARDNAME can't block unless you have four or more cards in hand. +SVar:X:Count$InYourHand +A:AB$ Mill | Cost$ T | NumCards$ 1 | Defined$ Player | SpellDescription$ Each player puts the top card of their library into their graveyard. +AI:RemoveDeck:Random +Oracle:Flying\nVantress Gargoyle can't attack unless defending player has seven or more cards in their graveyard.\nVantress Gargoyle can't block unless you have four or more cards in hand.\n{T}: Each player puts the top card of their library into their graveyard.