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:
@@ -551,6 +551,14 @@ private:
|
|||||||
intValue +=1;
|
intValue +=1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else if (s == "praidcount")
|
||||||
|
{
|
||||||
|
intValue = card->controller()->raidcount;
|
||||||
|
}
|
||||||
|
else if (s == "oraidcount")
|
||||||
|
{
|
||||||
|
intValue = card->controller()->opponent()->raidcount;
|
||||||
|
}
|
||||||
else if (s == "countallspell")
|
else if (s == "countallspell")
|
||||||
{
|
{
|
||||||
intValue = card->controller()->game->stack->seenThisTurn("*", Constants::CAST_ALL) + card->controller()->opponent()->game->stack->seenThisTurn("*", Constants::CAST_ALL);
|
intValue = card->controller()->game->stack->seenThisTurn("*", Constants::CAST_ALL) + card->controller()->opponent()->game->stack->seenThisTurn("*", Constants::CAST_ALL);
|
||||||
@@ -3803,6 +3811,7 @@ public:
|
|||||||
spell->source->owner = tokenReciever;
|
spell->source->owner = tokenReciever;
|
||||||
spell->source->isToken = 1;
|
spell->source->isToken = 1;
|
||||||
spell->source->fresh = 1;
|
spell->source->fresh = 1;
|
||||||
|
spell->source->entersBattlefield = 1;
|
||||||
if(aLivingWeapon)
|
if(aLivingWeapon)
|
||||||
{
|
{
|
||||||
livingWeaponToken(spell->source);
|
livingWeaponToken(spell->source);
|
||||||
|
|||||||
@@ -44,6 +44,7 @@ class CardDescriptor: public MTGCardInstance
|
|||||||
CardDescriptor();
|
CardDescriptor();
|
||||||
void unsecureSetTapped(int i);
|
void unsecureSetTapped(int i);
|
||||||
void unsecuresetfresh(int k);
|
void unsecuresetfresh(int k);
|
||||||
|
void unsecuresetrecent(int j);
|
||||||
void setisMultiColored(int w);
|
void setisMultiColored(int w);
|
||||||
void setNegativeSubtype( string value);
|
void setNegativeSubtype( string value);
|
||||||
int counterPower;
|
int counterPower;
|
||||||
|
|||||||
@@ -283,6 +283,7 @@ public:
|
|||||||
int canproduceB;
|
int canproduceB;
|
||||||
int canproduceW;
|
int canproduceW;
|
||||||
int canproduceC;
|
int canproduceC;
|
||||||
|
int entersBattlefield;
|
||||||
string currentimprintName;
|
string currentimprintName;
|
||||||
vector<string>imprintedNames;
|
vector<string>imprintedNames;
|
||||||
|
|
||||||
|
|||||||
@@ -4008,6 +4008,7 @@ int AACloner::resolve()
|
|||||||
spell->source->isToken = 1;
|
spell->source->isToken = 1;
|
||||||
spell->resolve();
|
spell->resolve();
|
||||||
spell->source->fresh = 1;
|
spell->source->fresh = 1;
|
||||||
|
spell->source->entersBattlefield = 1;
|
||||||
spell->source->model = spell->source;
|
spell->source->model = spell->source;
|
||||||
spell->source->model->data = spell->source;
|
spell->source->model->data = spell->source;
|
||||||
//if the token doesn't have cda/dynamic pt then allow this...
|
//if the token doesn't have cda/dynamic pt then allow this...
|
||||||
|
|||||||
@@ -57,6 +57,11 @@ void CardDescriptor::unsecuresetfresh(int k)
|
|||||||
fresh = k;
|
fresh = k;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void CardDescriptor::unsecuresetrecent(int j)
|
||||||
|
{
|
||||||
|
entersBattlefield = j;
|
||||||
|
}
|
||||||
|
|
||||||
void CardDescriptor::setisMultiColored(int w)
|
void CardDescriptor::setisMultiColored(int w)
|
||||||
{
|
{
|
||||||
isMultiColored = w;
|
isMultiColored = w;
|
||||||
@@ -218,6 +223,11 @@ MTGCardInstance * CardDescriptor::match(MTGCardInstance * card)
|
|||||||
{
|
{
|
||||||
match = NULL;
|
match = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ((entersBattlefield == -1 && card->entersBattlefield) || (entersBattlefield == 1 && !card->entersBattlefield))
|
||||||
|
{
|
||||||
|
match = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
if ((CDgeared == -1 && card->equipment > 0) || (CDgeared == 1 && card->equipment < 1))
|
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);
|
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)
|
else if (attribute.find("geared") != string::npos)
|
||||||
{
|
{
|
||||||
if (minus)
|
if (minus)
|
||||||
|
|||||||
@@ -690,6 +690,7 @@ void GameObserver::gameStateBasedEffects()
|
|||||||
for (int j = zone->nb_cards - 1; j >= 0; j--)
|
for (int j = zone->nb_cards - 1; j >= 0; j--)
|
||||||
{
|
{
|
||||||
MTGCardInstance * card = zone->cards[j];
|
MTGCardInstance * card = zone->cards[j];
|
||||||
|
card->entersBattlefield = 0;
|
||||||
card->LKIpower = card->power;
|
card->LKIpower = card->power;
|
||||||
card->LKItoughness = card->toughness;
|
card->LKItoughness = card->toughness;
|
||||||
card->LKIbasicAbilities = card->basicAbilities;
|
card->LKIbasicAbilities = card->basicAbilities;
|
||||||
|
|||||||
@@ -258,6 +258,7 @@ void MTGCardInstance::initMTGCI()
|
|||||||
canproduceB = 0;
|
canproduceB = 0;
|
||||||
canproduceW = 0;
|
canproduceW = 0;
|
||||||
canproduceC = 0;
|
canproduceC = 0;
|
||||||
|
entersBattlefield = 0;
|
||||||
currentimprintName = "";
|
currentimprintName = "";
|
||||||
imprintedNames.clear();
|
imprintedNames.clear();
|
||||||
CountedObjects = 0;
|
CountedObjects = 0;
|
||||||
|
|||||||
@@ -3131,6 +3131,7 @@ int MTGUnearthRule::receiveEvent(WEvent * event)
|
|||||||
if (e->to == e->card->controller()->game->battlefield)
|
if (e->to == e->card->controller()->game->battlefield)
|
||||||
{
|
{
|
||||||
e->card->fresh = 1;
|
e->card->fresh = 1;
|
||||||
|
e->card->entersBattlefield = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (card && card->basicAbilities[(int)Constants::UNEARTH])
|
if (card && card->basicAbilities[(int)Constants::UNEARTH])
|
||||||
|
|||||||
@@ -486,6 +486,17 @@ TargetChooser * TargetChooserFactory::createTargetChooser(string s, MTGCardInsta
|
|||||||
cd->unsecuresetfresh(1);
|
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)
|
else if (attribute.find("geared") != string::npos)
|
||||||
{
|
{
|
||||||
if (minus)
|
if (minus)
|
||||||
|
|||||||
Reference in New Issue
Block a user