Fixed WAR, C18, PAL00, UST set, added/fixed primitives, improved Android downloader, implemented Foretell ability, improved castcard keyword, improved "can play" restriction, improved primitives parsed in order to allow the nesting of transforms, ability$! reveal, scry, pay, grant keywords.

This commit is contained in:
Vittorio Alfieri
2021-01-14 17:51:13 +01:00
parent 69885cf90a
commit 91d19e2852
19 changed files with 340 additions and 312 deletions

View File

@@ -13,6 +13,7 @@ CardDescriptor::CardDescriptor()
counterToughness = 0;
counterNB = 0;
mode = CD_AND;
foretoldComparisonMode = COMPARISON_NONE;
kickedComparisonMode = COMPARISON_NONE;
powerComparisonMode = COMPARISON_NONE;
toughnessComparisonMode = COMPARISON_NONE;
@@ -159,6 +160,8 @@ MTGCardInstance * CardDescriptor::match_or(MTGCardInstance * card)
}
// Quantified restrictions are always AND-ed:
if (foretoldComparisonMode && !valueInRange(foretoldComparisonMode, card->foretellTurn, foretellTurn))
return NULL;
if (kickedComparisonMode && !valueInRange(kickedComparisonMode, card->kicked, kicked))
return NULL;
if (powerComparisonMode && !valueInRange(powerComparisonMode, card->getPower(), power))
@@ -204,6 +207,8 @@ MTGCardInstance * CardDescriptor::match_and(MTGCardInstance * card)
match = NULL;
}
if (foretoldComparisonMode && !valueInRange(foretoldComparisonMode, card->foretellTurn, foretellTurn))
match = NULL;
if (kickedComparisonMode && !valueInRange(kickedComparisonMode, card->kicked, kicked))
match = NULL;
if (powerComparisonMode && !valueInRange(powerComparisonMode, card->getPower(), power))