Added a new keyword "excessdamage" to retrieve theamount of exceeded damage to creature or planeswalker, fixed an issue on planeswalker damage count, added a new keyword "genrand" to generate a random number between 0 and a specific number (e.g. "genrand3"), improved Flip ability in order to allow the flip back from copy for a generic card name (e.g. "flip(myorigname) undocpy)"

This commit is contained in:
Vittorio Alfieri
2021-01-25 17:24:15 +01:00
parent 4bdc1fdfe1
commit c60f8787d1
7 changed files with 47 additions and 2 deletions
+3
View File
@@ -1935,6 +1935,7 @@ int AACopier::resolve()
}
else
{
source->nameOrig = source->name; // Saves the orignal card name before become a copy
source->copy(_target);
}
source->isACopier = true;
@@ -4258,6 +4259,8 @@ int AAFlip::resolve()
GameObserver * game = _target->getObserver();
if(flipStats.size())
{
if(flipStats == "myorigname" && _target->nameOrig != "")
flipStats = _target->nameOrig; // Added to undo the copy effect at end of turn for a generic card (es. Shapeshifter transformations).
MTGCard * fcard = MTGCollection()->getCardByName(flipStats);
if(!fcard) return 0;
MTGCardInstance * myFlip = NEW MTGCardInstance(fcard, _target->controller()->game);