Added new primitives from LTC set, improved "_GOAD_" macro, updated missing card by set list, added new keyword "permanent" to target permanents and nonpermanents, added "flashback" option to "castcard" ability, added new ability "unsacrificable" to forbid a player to sacrifice a card.

This commit is contained in:
Vittorio Alfieri
2023-07-07 18:22:58 +02:00
parent deec348fea
commit b791da0786
13 changed files with 787 additions and 26 deletions

View File

@@ -31,6 +31,7 @@ CardDescriptor::CardDescriptor()
hasFlashbackCost = 0;
hasBackSide = 0;
hasPartner = 0;
isPermanent = 0;
modified = 0;
toxicity = 0;
hasXCost = 0;
@@ -106,6 +107,11 @@ void CardDescriptor::unsecureSetHasPartner(int k)
hasPartner = k;
}
void CardDescriptor::unsecureSetIsPermanent(int k)
{
isPermanent = k;
}
void CardDescriptor::unsecureSetTapped(int i)
{
tapped = i;
@@ -383,6 +389,11 @@ MTGCardInstance * CardDescriptor::match(MTGCardInstance * card)
match = NULL;
}
if ((isPermanent == -1 && card->isPermanent()) || (isPermanent == 1 && !card->isPermanent()))
{
match = NULL;
}
if ((hasXCost == -1 && card->getManaCost()->hasX()) || (hasXCost == 1 && !card->getManaCost()->hasX()))
{
match = NULL;