added support for {X}{X} in cost, added support for token(creature, X/X or XX/XX)*XX or X or #. added discard card at random as cost type {d}

This commit is contained in:
omegablast2002@yahoo.com
2010-09-12 16:15:24 +00:00
parent 6063ddcf55
commit c408e5d588
11 changed files with 122 additions and 8 deletions

View File

@@ -162,6 +162,13 @@ int Spell::computeX(MTGCardInstance * card){
return x;
}
int Spell::computeXX(MTGCardInstance * card){
ManaCost * c = cost->Diff(card->getManaCost());
int xx = c->getCost(Constants::MTG_NB_COLORS)/2;
delete c;
return xx;
}
bool Spell::kickerWasPaid(){
return (payResult == ManaCost::MANA_PAID_WITH_KICKER);
}