add "recent" & "raidcount"
the recent attribute is to parse new cards entered play, then turns itself to 0 if some stuff happened since it's already in play...
This commit is contained in:
@@ -4008,6 +4008,7 @@ int AACloner::resolve()
|
||||
spell->source->isToken = 1;
|
||||
spell->resolve();
|
||||
spell->source->fresh = 1;
|
||||
spell->source->entersBattlefield = 1;
|
||||
spell->source->model = spell->source;
|
||||
spell->source->model->data = spell->source;
|
||||
//if the token doesn't have cda/dynamic pt then allow this...
|
||||
|
||||
@@ -57,6 +57,11 @@ void CardDescriptor::unsecuresetfresh(int k)
|
||||
fresh = k;
|
||||
}
|
||||
|
||||
void CardDescriptor::unsecuresetrecent(int j)
|
||||
{
|
||||
entersBattlefield = j;
|
||||
}
|
||||
|
||||
void CardDescriptor::setisMultiColored(int w)
|
||||
{
|
||||
isMultiColored = w;
|
||||
@@ -218,6 +223,11 @@ MTGCardInstance * CardDescriptor::match(MTGCardInstance * card)
|
||||
{
|
||||
match = NULL;
|
||||
}
|
||||
|
||||
if ((entersBattlefield == -1 && card->entersBattlefield) || (entersBattlefield == 1 && !card->entersBattlefield))
|
||||
{
|
||||
match = NULL;
|
||||
}
|
||||
|
||||
if ((CDgeared == -1 && card->equipment > 0) || (CDgeared == 1 && card->equipment < 1))
|
||||
{
|
||||
|
||||
@@ -1362,6 +1362,17 @@ bool CardGui::FilterCard(MTGCard * _card,string filter)
|
||||
cd.unsecuresetfresh(1);
|
||||
}
|
||||
}
|
||||
else if (attribute.find("recent") != string::npos)
|
||||
{
|
||||
if (minus)
|
||||
{
|
||||
cd.unsecuresetrecent(-1);
|
||||
}
|
||||
else
|
||||
{
|
||||
cd.unsecuresetrecent(1);
|
||||
}
|
||||
}
|
||||
else if (attribute.find("geared") != string::npos)
|
||||
{
|
||||
if (minus)
|
||||
|
||||
@@ -690,6 +690,7 @@ void GameObserver::gameStateBasedEffects()
|
||||
for (int j = zone->nb_cards - 1; j >= 0; j--)
|
||||
{
|
||||
MTGCardInstance * card = zone->cards[j];
|
||||
card->entersBattlefield = 0;
|
||||
card->LKIpower = card->power;
|
||||
card->LKItoughness = card->toughness;
|
||||
card->LKIbasicAbilities = card->basicAbilities;
|
||||
|
||||
@@ -258,6 +258,7 @@ void MTGCardInstance::initMTGCI()
|
||||
canproduceB = 0;
|
||||
canproduceW = 0;
|
||||
canproduceC = 0;
|
||||
entersBattlefield = 0;
|
||||
currentimprintName = "";
|
||||
imprintedNames.clear();
|
||||
CountedObjects = 0;
|
||||
|
||||
@@ -3131,6 +3131,7 @@ int MTGUnearthRule::receiveEvent(WEvent * event)
|
||||
if (e->to == e->card->controller()->game->battlefield)
|
||||
{
|
||||
e->card->fresh = 1;
|
||||
e->card->entersBattlefield = 1;
|
||||
}
|
||||
|
||||
if (card && card->basicAbilities[(int)Constants::UNEARTH])
|
||||
|
||||
@@ -486,6 +486,17 @@ TargetChooser * TargetChooserFactory::createTargetChooser(string s, MTGCardInsta
|
||||
cd->unsecuresetfresh(1);
|
||||
}
|
||||
}
|
||||
else if (attribute.find("recent") != string::npos)
|
||||
{
|
||||
if (minus)
|
||||
{
|
||||
cd->unsecuresetrecent(-1);
|
||||
}
|
||||
else
|
||||
{
|
||||
cd->unsecuresetrecent(1);
|
||||
}
|
||||
}
|
||||
else if (attribute.find("geared") != string::npos)
|
||||
{
|
||||
if (minus)
|
||||
|
||||
Reference in New Issue
Block a user