diff --git a/forge-game/src/main/java/forge/game/card/CardProperty.java b/forge-game/src/main/java/forge/game/card/CardProperty.java index b5dc3ff66e7..b8c6241363e 100644 --- a/forge-game/src/main/java/forge/game/card/CardProperty.java +++ b/forge-game/src/main/java/forge/game/card/CardProperty.java @@ -651,12 +651,14 @@ public class CardProperty { return false; } } else if (property.startsWith("TopLibrary") || property.startsWith("BottomLibrary")) { - CardCollection cards = (CardCollection) card.getOwner().getCardsIn(ZoneType.Library); + CardCollectionView cards = card.getOwner().getCardsIn(ZoneType.Library); if (!property.equals("TopLibrary")) { - if (property.equals("TopLibraryLand")) cards = CardLists.filter(cards, CardPredicates.LANDS); - else if (property.contains("_")) cards = CardLists.getValidCards(cards, property.split("_")[1], + if (property.contains("_")) cards = CardLists.getValidCards(cards, property.split("_")[1], sourceController, source, spellAbility); - if (property.startsWith("Bottom")) Collections.reverse(cards); + if (property.startsWith("Bottom")) { + cards = new CardCollection(cards); + Collections.reverse((CardCollection) cards); + } } if (cards.isEmpty() || !card.equals(cards.get(0))) return false; } else if (property.startsWith("Cloned")) { diff --git a/forge-gui/res/cardsfolder/v/vigorous_farming.txt b/forge-gui/res/cardsfolder/v/vigorous_farming.txt index 1583977c035..3d8080273dc 100644 --- a/forge-gui/res/cardsfolder/v/vigorous_farming.txt +++ b/forge-gui/res/cardsfolder/v/vigorous_farming.txt @@ -4,7 +4,7 @@ Types:Enchantment R:Event$ Moved | ValidCard$ Land.YouCtrl | Destination$ Battlefield | ReplaceWith$ ETBUntapped | ReplacementResult$ Updated | ActiveZones$ Battlefield | Description$ Lands you control enter the battlefield untapped. SVar:ETBUntapped:DB$ Untap | ETB$ True | Defined$ ReplacedCard T:Mode$ Phase | Phase$ End of Turn | ValidPlayer$ You | TriggerZones$ Battlefield | Execute$ TrigAnimate | TriggerDescription$ At the beginning of your end step, the topmost land card in your library perpetually gains "Whenever this land is tapped for mana, add an additional {G}." -SVar:TrigAnimate:DB$ Animate | Defined$ ValidLibrary Land.TopLibraryLand+YouCtrl | Triggers$ ManaTap | Duration$ Perpetual +SVar:TrigAnimate:DB$ Animate | Defined$ ValidLibrary Land.TopLibrary_Land+YouCtrl | Triggers$ ManaTap | Duration$ Perpetual SVar:ManaTap:Mode$ TapsForMana | ValidCard$ Card.Self | Execute$ TrigMana | Static$ True | TriggerDescription$ Whenever this land is tapped for mana, add an additional {G}. SVar:TrigMana:DB$ Mana | Produced$ G | Amount$ 1 | Defined$ TriggeredCardController Oracle:Lands you control enter the battlefield untapped.\nAt the beginning of your end step, the topmost land card in your library perpetually gains "Whenever this land is tapped for mana, add an additional {G}."