diff --git a/res/cardsfolder/crosiss_catacombs.txt b/res/cardsfolder/crosiss_catacombs.txt index 6b9e8d44de0..7ce971fd219 100644 --- a/res/cardsfolder/crosiss_catacombs.txt +++ b/res/cardsfolder/crosiss_catacombs.txt @@ -5,8 +5,8 @@ Text:When CARDNAME enters the battlefield, sacrifice it unless you return a non- A:AB$ Mana | Cost$ T | Produced$ U | SpellDescription$ Add U to your mana pool. A:AB$ Mana | Cost$ T | Produced$ B | SpellDescription$ Add B to your mana pool. A:AB$ Mana | Cost$ T | Produced$ R | SpellDescription$ Add R to your mana pool. -SVar:RemAIDeck:True +SVar:NeedsToPlay:Land.nonLair+YouCtrl SVar:Rarity:Uncommon SVar:Picture:http://www.wizards.com/global/images/magic/general/crosiss_catacombs.jpg -SetInfo:PLS|Uncommon|http://magiccards.info/scans/en/ps/136.jpg +SetInfo:PLS|Uncommon|http://magiccards.info/scans/en/ps/136.jpg End \ No newline at end of file diff --git a/res/cardsfolder/darigaazs_caldera.txt b/res/cardsfolder/darigaazs_caldera.txt index 96bde2baa1d..5bee0946d73 100644 --- a/res/cardsfolder/darigaazs_caldera.txt +++ b/res/cardsfolder/darigaazs_caldera.txt @@ -5,8 +5,8 @@ Text:When CARDNAME enters the battlefield, sacrifice it unless you return a non- A:AB$ Mana | Cost$ T | Produced$ B | SpellDescription$ Add B to your mana pool. A:AB$ Mana | Cost$ T | Produced$ R | SpellDescription$ Add R to your mana pool. A:AB$ Mana | Cost$ T | Produced$ G | SpellDescription$ Add G to your mana pool. -SVar:RemAIDeck:True +SVar:NeedsToPlay:Land.nonLair+YouCtrl SVar:Rarity:Uncommon SVar:Picture:http://www.wizards.com/global/images/magic/general/darigaazs_caldera.jpg -SetInfo:PLS|Uncommon|http://magiccards.info/scans/en/ps/137.jpg +SetInfo:PLS|Uncommon|http://magiccards.info/scans/en/ps/137.jpg End \ No newline at end of file diff --git a/res/cardsfolder/dromars_cavern.txt b/res/cardsfolder/dromars_cavern.txt index 8c82dcbbff5..b627d9ce704 100644 --- a/res/cardsfolder/dromars_cavern.txt +++ b/res/cardsfolder/dromars_cavern.txt @@ -5,8 +5,8 @@ Text:When CARDNAME enters the battlefield, sacrifice it unless you return a non- A:AB$ Mana | Cost$ T | Produced$ W | SpellDescription$ Add W to your mana pool. A:AB$ Mana | Cost$ T | Produced$ U | SpellDescription$ Add U to your mana pool. A:AB$ Mana | Cost$ T | Produced$ B | SpellDescription$ Add B to your mana pool. -SVar:RemAIDeck:True +SVar:NeedsToPlay:Land.nonLair+YouCtrl SVar:Rarity:Uncommon SVar:Picture:http://www.wizards.com/global/images/magic/general/dromars_cavern.jpg -SetInfo:PLS|Uncommon|http://magiccards.info/scans/en/ps/138.jpg +SetInfo:PLS|Uncommon|http://magiccards.info/scans/en/ps/138.jpg End \ No newline at end of file diff --git a/res/cardsfolder/riths_grove.txt b/res/cardsfolder/riths_grove.txt index 05876d53de5..2c194d07170 100644 --- a/res/cardsfolder/riths_grove.txt +++ b/res/cardsfolder/riths_grove.txt @@ -5,8 +5,8 @@ Text:When CARDNAME enters the battlefield, sacrifice it unless you return a non- A:AB$ Mana | Cost$ T | Produced$ R | SpellDescription$ Add R to your mana pool. A:AB$ Mana | Cost$ T | Produced$ G | SpellDescription$ Add G to your mana pool. A:AB$ Mana | Cost$ T | Produced$ W | SpellDescription$ Add W to your mana pool. -SVar:RemAIDeck:True +SVar:NeedsToPlay:Land.nonLair+YouCtrl SVar:Rarity:Uncommon SVar:Picture:http://www.wizards.com/global/images/magic/general/riths_grove.jpg -SetInfo:PLS|Uncommon|http://magiccards.info/scans/en/ps/141.jpg +SetInfo:PLS|Uncommon|http://magiccards.info/scans/en/ps/141.jpg End \ No newline at end of file diff --git a/res/cardsfolder/trevas_ruins.txt b/res/cardsfolder/trevas_ruins.txt index 2bab6fb29a2..34528905b13 100644 --- a/res/cardsfolder/trevas_ruins.txt +++ b/res/cardsfolder/trevas_ruins.txt @@ -5,8 +5,8 @@ Text:When CARDNAME enters the battlefield, sacrifice it unless you return a non- A:AB$ Mana | Cost$ T | Produced$ G | SpellDescription$ Add G to your mana pool. A:AB$ Mana | Cost$ T | Produced$ W | SpellDescription$ Add W to your mana pool. A:AB$ Mana | Cost$ T | Produced$ U | SpellDescription$ Add U to your mana pool. -SVar:RemAIDeck:True +SVar:NeedsToPlay:Land.nonLair+YouCtrl SVar:Rarity:Uncommon SVar:Picture:http://www.wizards.com/global/images/magic/general/trevas_ruins.jpg -SetInfo:PLS|Uncommon|http://magiccards.info/scans/en/ps/143.jpg +SetInfo:PLS|Uncommon|http://magiccards.info/scans/en/ps/143.jpg End \ No newline at end of file diff --git a/src/forge/ComputerUtil.java b/src/forge/ComputerUtil.java index 0653740430c..f14d7dcd599 100644 --- a/src/forge/ComputerUtil.java +++ b/src/forge/ComputerUtil.java @@ -762,6 +762,19 @@ public class ComputerUtil for (Card crd : lands) landList.add(crd); } + + landList = landList.filter(new CardListFilter() { + public boolean addCard(Card c) { + if (c.getSVar("NeedsToPlay").length() > 0) { + String needsToPlay = c.getSVar("NeedsToPlay"); + CardList list = AllZoneUtil.getCardsInPlay(); + + list = list.getValidCards(needsToPlay.split(","), c.getController(), c); + if (list.isEmpty()) return false; + } + return true; + } + }); while(!landList.isEmpty() && computer.canPlayLand()){ // play as many lands as you can diff --git a/src/forge/card/spellability/Spell_Permanent.java b/src/forge/card/spellability/Spell_Permanent.java index d982bfc785f..1ddf2a2f2db 100644 --- a/src/forge/card/spellability/Spell_Permanent.java +++ b/src/forge/card/spellability/Spell_Permanent.java @@ -228,6 +228,14 @@ public class Spell_Permanent extends Spell { return false; } + if (card.getSVar("NeedsToPlay").length() > 0) { + String needsToPlay = card.getSVar("NeedsToPlay"); + CardList list = AllZoneUtil.getCardsInPlay(); + + list = list.getValidCards(needsToPlay.split(","), card.getController(), card); + if (list.isEmpty()) return false; + } + if (!checkETBEffects(card, this, null)) return false;