Fixed/added primitives, added keyword to alter devotion count, added keyword to target cards with flashback cost, added "duplicatecounters(single)" keyword to add a counter of a specific kind already present on a permanent or a player.

This commit is contained in:
Vittorio Alfieri
2021-01-07 18:56:47 +01:00
parent 4c00dfb3b6
commit eaaa4d783b
13 changed files with 249 additions and 105 deletions

View File

@@ -22,6 +22,7 @@ CardDescriptor::CardDescriptor()
zposComparisonMode = COMPARISON_NONE;
zposition = -1;
hasKickerCost = 0;
hasFlashbackCost = 0;
compareName ="";
nameComparisonMode = COMPARISON_NONE;
colorComparisonMode = COMPARISON_NONE;
@@ -62,6 +63,11 @@ void CardDescriptor::unsecureSetHasKickerCost(int k)
hasKickerCost = k;
}
void CardDescriptor::unsecureSetHasFlashbackCost(int k)
{
hasFlashbackCost = k;
}
void CardDescriptor::unsecureSetTapped(int i)
{
tapped = i;
@@ -241,6 +247,11 @@ MTGCardInstance * CardDescriptor::match(MTGCardInstance * card)
match = NULL;
}
if ((hasFlashbackCost == -1 && card->getManaCost()->getFlashback()) || (hasFlashbackCost == 1 && !card->getManaCost()->getFlashback()))
{
match = NULL;
}
if ((tapped == -1 && card->isTapped()) || (tapped == 1 && !card->isTapped()))
{
match = NULL;