added CD geared attribute

This commit is contained in:
Anthony Calosa
2016-08-16 15:42:22 +08:00
parent 525c166f62
commit 763918e129
5 changed files with 34 additions and 5 deletions

View File

@@ -24,6 +24,7 @@ CardDescriptor::CardDescriptor()
CDopponentDamaged = 0;
CDcontrollerDamaged = 0;
CDdamager = 0;
CDgeared = 0;
}
int CardDescriptor::init()
@@ -53,7 +54,7 @@ void CardDescriptor::setisMultiColored(int w)
{
isMultiColored = w;
}
void CardDescriptor::setNegativeSubtype(string value)
{
int id = MTGAllCards::findType(value);
@@ -210,6 +211,11 @@ MTGCardInstance * CardDescriptor::match(MTGCardInstance * card)
{
match = NULL;
}
if ((CDgeared == -1 && card->equipment > 0) || (CDgeared == 1 && card->equipment < 1))
{
match = NULL;
}
if ((isMultiColored == -1 && card->isMultiColored) || (isMultiColored == 1 && !card->isMultiColored))
{