revised "colorless" attribute in targetchooser
also fix worldly tutor
This commit is contained in:
@@ -32,6 +32,7 @@ CardDescriptor::CardDescriptor()
|
||||
CDcanProduceR = 0;
|
||||
CDcanProduceB = 0;
|
||||
CDcanProduceW = 0;
|
||||
CDnocolor = 0;
|
||||
}
|
||||
|
||||
int CardDescriptor::init()
|
||||
@@ -285,6 +286,17 @@ MTGCardInstance * CardDescriptor::match(MTGCardInstance * card)
|
||||
{
|
||||
match = NULL;
|
||||
}
|
||||
|
||||
if ((CDnocolor == -1 && card->getColor() == 0))
|
||||
{
|
||||
match = NULL;
|
||||
}
|
||||
else if(CDnocolor == 1)
|
||||
{
|
||||
if(!card->has(Constants::DEVOID))
|
||||
if(card->getColor()>0)
|
||||
match = NULL;
|
||||
}
|
||||
|
||||
if ((isMultiColored == -1 && card->isMultiColored) || (isMultiColored == 1 && !card->isMultiColored))
|
||||
{
|
||||
|
||||
@@ -641,8 +641,8 @@ void GameObserver::gameStateBasedEffects()
|
||||
if (players[d]->snowManaW < 0)
|
||||
players[d]->snowManaW = 0;
|
||||
|
||||
MTGGameZone * dzones[] = { players[d]->game->inPlay, players[d]->game->graveyard, players[d]->game->hand, players[d]->game->library, players[d]->game->exile };
|
||||
for (int k = 0; k < 5; k++)
|
||||
MTGGameZone * dzones[] = { players[d]->game->inPlay, players[d]->game->graveyard, players[d]->game->hand, players[d]->game->library, players[d]->game->exile, players[d]->game->stack };
|
||||
for (int k = 0; k < 6; k++)
|
||||
{
|
||||
MTGGameZone * zone = dzones[k];
|
||||
if (mLayers->stackLayer()->count(0, NOT_RESOLVED) == 0)
|
||||
|
||||
@@ -790,11 +790,15 @@ TargetChooser * TargetChooserFactory::createTargetChooser(string s, MTGCardInsta
|
||||
if (attribute.find("colorless") != string::npos)
|
||||
{
|
||||
attributefound = 1;
|
||||
for (int cid = 1; cid < Constants::NB_Colors; cid++)
|
||||
/*for (int cid = 1; cid < Constants::NB_Colors; cid++)
|
||||
{
|
||||
cd->SetExclusionColor(cid);
|
||||
}
|
||||
cd->mode = CardDescriptor::CD_OR;
|
||||
cd->mode = CardDescriptor::CD_OR;*/
|
||||
if (minus)
|
||||
cd->CDnocolor = -1;
|
||||
else
|
||||
cd->CDnocolor = 1;
|
||||
}
|
||||
|
||||
if (attribute.find("chosencolor") != string::npos)
|
||||
|
||||
Reference in New Issue
Block a user