- Added the SVar NeedsToPlay. The AI won't play cards with it unless a valid card is on the battlefield.

- Updated the Lairs to use it.
This commit is contained in:
jendave
2011-08-07 00:21:47 +00:00
parent 8c429da712
commit b17eb43274
7 changed files with 31 additions and 10 deletions

View File

@@ -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$ 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$ 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$ R | SpellDescription$ Add R to your mana pool.
SVar:RemAIDeck:True SVar:NeedsToPlay:Land.nonLair+YouCtrl
SVar:Rarity:Uncommon SVar:Rarity:Uncommon
SVar:Picture:http://www.wizards.com/global/images/magic/general/crosiss_catacombs.jpg 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 End

View File

@@ -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$ 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$ 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$ G | SpellDescription$ Add G to your mana pool.
SVar:RemAIDeck:True SVar:NeedsToPlay:Land.nonLair+YouCtrl
SVar:Rarity:Uncommon SVar:Rarity:Uncommon
SVar:Picture:http://www.wizards.com/global/images/magic/general/darigaazs_caldera.jpg 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 End

View File

@@ -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$ 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$ 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$ B | SpellDescription$ Add B to your mana pool.
SVar:RemAIDeck:True SVar:NeedsToPlay:Land.nonLair+YouCtrl
SVar:Rarity:Uncommon SVar:Rarity:Uncommon
SVar:Picture:http://www.wizards.com/global/images/magic/general/dromars_cavern.jpg 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 End

View File

@@ -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$ 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$ 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$ W | SpellDescription$ Add W to your mana pool.
SVar:RemAIDeck:True SVar:NeedsToPlay:Land.nonLair+YouCtrl
SVar:Rarity:Uncommon SVar:Rarity:Uncommon
SVar:Picture:http://www.wizards.com/global/images/magic/general/riths_grove.jpg 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 End

View File

@@ -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$ 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$ 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$ U | SpellDescription$ Add U to your mana pool.
SVar:RemAIDeck:True SVar:NeedsToPlay:Land.nonLair+YouCtrl
SVar:Rarity:Uncommon SVar:Rarity:Uncommon
SVar:Picture:http://www.wizards.com/global/images/magic/general/trevas_ruins.jpg 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 End

View File

@@ -762,6 +762,19 @@ public class ComputerUtil
for (Card crd : lands) for (Card crd : lands)
landList.add(crd); 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()){ while(!landList.isEmpty() && computer.canPlayLand()){
// play as many lands as you can // play as many lands as you can

View File

@@ -228,6 +228,14 @@ public class Spell_Permanent extends Spell {
return false; 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)) if (!checkETBEffects(card, this, null))
return false; return false;