- Improved checkCreatureSacrificeCost.

This commit is contained in:
Sloth
2011-12-09 18:26:46 +00:00
parent f3ce01ab16
commit d13633bfa8
2 changed files with 25 additions and 13 deletions

View File

@@ -1,14 +1,15 @@
Name:Mountain Titan
ManaCost:2 B R
Types:Creature Giant
Text:no text
PT:2/2
A:AB$ Animate | Cost$ 1 R R | Triggers$ TrigSpellCast | sVars$ TrigPutCounter | SpellDescription$ Until end of turn, whenever you cast a black spell, put a +1/+1 counter on CARDNAME.
SVar:TrigSpellCast:Mode$ SpellCast | ValidCard$ Card.Black | ValidActivatingPlayer$ You | Execute$ TrigPutCounter | TriggerZones$ Battlefield | TriggerDescription$ Whenever you cast a black spell, put a +1/+1 counter on CARDNAME.
SVar:TrigPutCounter:AB$ PutCounter | Cost$ 0 | Defined$ Self | CounterType$ P1P1 | CounterNum$ 1
SVar:BuffedBy:Card.Black
SVar:Rarity:Rare
SVar:Picture:http://www.wizards.com/global/images/magic/general/mountain_titan.jpg
SetInfo:ICE|Rare|http://magiccards.info/scans/en/ia/377.jpg
Oracle:{1}{R}{R}: Until end of turn, whenever you cast a black spell, put a +1/+1 counter on Mountain Titan.
Name:Mountain Titan
ManaCost:2 B R
Types:Creature Giant
Text:no text
PT:2/2
A:AB$ Animate | Cost$ 1 R R | Triggers$ TrigSpellCast | sVars$ TrigPutCounter | SpellDescription$ Until end of turn, whenever you cast a black spell, put a +1/+1 counter on CARDNAME.
SVar:TrigSpellCast:Mode$ SpellCast | ValidCard$ Card.Black | ValidActivatingPlayer$ You | Execute$ TrigPutCounter | TriggerZones$ Battlefield | TriggerDescription$ Whenever you cast a black spell, put a +1/+1 counter on CARDNAME.
SVar:TrigPutCounter:AB$ PutCounter | Cost$ 0 | Defined$ Self | CounterType$ P1P1 | CounterNum$ 1
SVar:BuffedBy:Card.Black
SVar:RemAIDeck:True
SVar:Rarity:Rare
SVar:Picture:http://www.wizards.com/global/images/magic/general/mountain_titan.jpg
SetInfo:ICE|Rare|http://magiccards.info/scans/en/ia/377.jpg
Oracle:{1}{R}{R}: Until end of turn, whenever you cast a black spell, put a +1/+1 counter on Mountain Titan.
End

View File

@@ -84,6 +84,17 @@ public class CostUtil {
if (sac.getThis() && source.isCreature()) {
return false;
}
final String type = sac.getType();
if (type.equals("CARDNAME")) {
continue;
}
CardList typeList = AllZone.getComputerPlayer().getCardsIn(Zone.Battlefield);
typeList = typeList.getValidCards(type.split(","), source.getController(), source);
if (ComputerUtil.getCardPreference(source, "SacCost", typeList) == null) {
return false;
}
}
}
return true;