fix can produce mana
limited for land...
This commit is contained in:
@@ -26,6 +26,12 @@ CardDescriptor::CardDescriptor()
|
||||
CDdamager = 0;
|
||||
CDgeared = 0;
|
||||
CDblocked = 0;
|
||||
CDcanProduceC = 0;
|
||||
CDcanProduceG = 0;
|
||||
CDcanProduceU = 0;
|
||||
CDcanProduceR = 0;
|
||||
CDcanProduceB = 0;
|
||||
CDcanProduceW = 0;
|
||||
}
|
||||
|
||||
int CardDescriptor::init()
|
||||
@@ -239,6 +245,36 @@ MTGCardInstance * CardDescriptor::match(MTGCardInstance * card)
|
||||
match = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
if ((CDcanProduceC == -1 && card->canproduceC == 1) || (CDcanProduceC == 1 && card->canproduceC == 0))
|
||||
{
|
||||
match = NULL;
|
||||
}
|
||||
|
||||
if ((CDcanProduceG == -1 && card->canproduceG == 1) || (CDcanProduceG == 1 && card->canproduceG == 0))
|
||||
{
|
||||
match = NULL;
|
||||
}
|
||||
|
||||
if ((CDcanProduceU == -1 && card->canproduceU == 1) || (CDcanProduceU == 1 && card->canproduceU == 0))
|
||||
{
|
||||
match = NULL;
|
||||
}
|
||||
|
||||
if ((CDcanProduceR == -1 && card->canproduceR == 1) || (CDcanProduceR == 1 && card->canproduceR == 0))
|
||||
{
|
||||
match = NULL;
|
||||
}
|
||||
|
||||
if ((CDcanProduceB == -1 && card->canproduceB == 1) || (CDcanProduceB == 1 && card->canproduceB == 0))
|
||||
{
|
||||
match = NULL;
|
||||
}
|
||||
|
||||
if ((CDcanProduceW == -1 && card->canproduceW == 1) || (CDcanProduceW == 1 && card->canproduceW == 0))
|
||||
{
|
||||
match = NULL;
|
||||
}
|
||||
|
||||
if ((isMultiColored == -1 && card->isMultiColored) || (isMultiColored == 1 && !card->isMultiColored))
|
||||
{
|
||||
|
||||
@@ -557,6 +557,73 @@ TargetChooser * TargetChooserFactory::createTargetChooser(string s, MTGCardInsta
|
||||
cd->CDdamager = 1;
|
||||
}
|
||||
}
|
||||
//can produce mana
|
||||
else if (attribute.find("manac") != string::npos)
|
||||
{
|
||||
if (minus)
|
||||
{
|
||||
cd->CDcanProduceC = -1;
|
||||
}
|
||||
else
|
||||
{
|
||||
cd->CDcanProduceC = 1;
|
||||
}
|
||||
}
|
||||
else if (attribute.find("manag") != string::npos)
|
||||
{
|
||||
if (minus)
|
||||
{
|
||||
cd->CDcanProduceG = -1;
|
||||
}
|
||||
else
|
||||
{
|
||||
cd->CDcanProduceG = 1;
|
||||
}
|
||||
}
|
||||
else if (attribute.find("manau") != string::npos)
|
||||
{
|
||||
if (minus)
|
||||
{
|
||||
cd->CDcanProduceU = -1;
|
||||
}
|
||||
else
|
||||
{
|
||||
cd->CDcanProduceU = 1;
|
||||
}
|
||||
}
|
||||
else if (attribute.find("manar") != string::npos)
|
||||
{
|
||||
if (minus)
|
||||
{
|
||||
cd->CDcanProduceR = -1;
|
||||
}
|
||||
else
|
||||
{
|
||||
cd->CDcanProduceR = 1;
|
||||
}
|
||||
}
|
||||
else if (attribute.find("manab") != string::npos)
|
||||
{
|
||||
if (minus)
|
||||
{
|
||||
cd->CDcanProduceB = -1;
|
||||
}
|
||||
else
|
||||
{
|
||||
cd->CDcanProduceB = 1;
|
||||
}
|
||||
}
|
||||
else if (attribute.find("manaw") != string::npos)
|
||||
{
|
||||
if (minus)
|
||||
{
|
||||
cd->CDcanProduceW = -1;
|
||||
}
|
||||
else
|
||||
{
|
||||
cd->CDcanProduceW = 1;
|
||||
}
|
||||
}
|
||||
else if (attribute.find("multicolor") != string::npos)
|
||||
{
|
||||
//card is multicolored?
|
||||
|
||||
Reference in New Issue
Block a user