diff --git a/forge-game/src/main/java/forge/game/card/CardFactoryUtil.java b/forge-game/src/main/java/forge/game/card/CardFactoryUtil.java index 70da4cfd33d..202aae365ed 100644 --- a/forge-game/src/main/java/forge/game/card/CardFactoryUtil.java +++ b/forge-game/src/main/java/forge/game/card/CardFactoryUtil.java @@ -1563,6 +1563,17 @@ public class CardFactoryUtil { } } + if (sq[0].contains("InRememberedHand")) { + if (c.getRemembered() != null) { + for (final Object o : c.getRemembered()) { + if (o instanceof Player) { + Player remPlayer = (Player) o; + someCards.addAll(remPlayer.getCardsIn(ZoneType.Hand)); + } + } + } + } + if (sq[0].contains("InChosenYard")) { if (c.getChosenPlayer() != null) { someCards.addAll(c.getChosenPlayer().getCardsIn(ZoneType.Graveyard)); 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 466029d9f89..d80ffa7a608 100644 --- a/forge-game/src/main/java/forge/game/player/PlayerProperty.java +++ b/forge-game/src/main/java/forge/game/player/PlayerProperty.java @@ -243,8 +243,7 @@ public class PlayerProperty { 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; + int y = AbilityUtils.calculateAmount(source, comparator.substring(2), null); if (!Expressions.compare(list.size(), comparator, y)) { return false; } diff --git a/forge-gui/res/cardsfolder/upcoming/tales_of_the_ancestors.txt b/forge-gui/res/cardsfolder/upcoming/tales_of_the_ancestors.txt new file mode 100644 index 00000000000..d3df8b496d1 --- /dev/null +++ b/forge-gui/res/cardsfolder/upcoming/tales_of_the_ancestors.txt @@ -0,0 +1,10 @@ +Name:Tales of the Ancestors +ManaCost:3 U +Types:Sorcery +A:SP$ RepeatEach | RepeatPlayers$ Player.HasCardsInHand_Card_LTX | References$ X | RepeatSubAbility$ DBDraw | SpellDescription$ Each player with fewer cards in hand than the player with the most cards in hand draws cards equal to the difference. +SVar:DBDraw:DB$ Draw | Defined$ Player.IsRemembered | NumCards$ Z | References$ X,Y,Z +SVar:X:PlayerCountPlayers$HighestCardsInHand +SVar:Y:Count$InRememberedHand +SVar:Z:SVar$X/Minus.Y +K:Foretell:1 U +Oracle:Each player with fewer cards in hand than the player with the most cards in hand draws cards equal to the difference.\nForetell {1}{U} (During your turn, you may pay {2} and exile this card from your hand face down. Cast it on a later turn for its foretell cost.)