mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 04:08:01 +00:00
- 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:
@@ -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
|
||||
@@ -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
|
||||
@@ -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
|
||||
@@ -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
|
||||
@@ -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
|
||||
@@ -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
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user