revised "colorless" attribute in targetchooser

also fix worldly tutor
This commit is contained in:
Anthony Calosa
2016-09-04 13:14:19 +08:00
parent 5101ac9d8e
commit f11cc41df8
5 changed files with 23 additions and 6 deletions

View File

@@ -96357,7 +96357,7 @@ type=Sorcery
[/card]
[card]
name=Scouting Trek
auto=moveTo(ownerlibrary) notatarget(<anyamount>land[basic]|mylibrary)
auto=name(put on top) notatarget(<anyamount>land[basic]|mylibrary) moveTo(ownerexile) and!(moveto(ownerlibrary))!
text=Search your library for any number of basic land cards. Reveal those cards, then shuffle your library and put them on top of it.
mana={1}{G}
type=Sorcery
@@ -130286,7 +130286,7 @@ type=Instant
[/card]
[card]
name=Worldly Tutor
auto=moveTo(ownerlibrary) notatarget(creature|mylibrary)
auto=Reveal:type:*:mylibrary revealzone(mylibrary) revealtype(creature|mylibrary) optionone name(choose card) target(creature|reveal) transforms((,newability[all(other *|reveal) moveto(mylibrary) and!(shuffle)!],newability[moveto(mylibrary)])) optiononeend revealend
text=Search your library for a creature card and reveal that card. Shuffle your library, then put the revealed card back on top of it.
mana={G}
type=Instant

View File

@@ -74,6 +74,7 @@ class CardDescriptor: public MTGCardInstance
int CDcanProduceR;
int CDcanProduceB;
int CDcanProduceW;
int CDnocolor;
};
#endif

View File

@@ -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))
{

View File

@@ -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)

View File

@@ -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)