Added/fixed some primitives from J22 and NEC sets, fixed J22 and NEC dat file, updated card image url from NEC and J22 sets, fixed a bug on token copy, improved flip ability for tokens.

This commit is contained in:
Vittorio Alfieri
2023-06-05 17:55:11 +02:00
parent f8fc173e86
commit 2831ac12ae
6 changed files with 632 additions and 13 deletions

View File

@@ -4901,7 +4901,7 @@ int AAFlip::resolve()
if (_target)
{
if(_target->mutation && _target->parentCards.size() > 0) return 0; // Mutated down cards cannot be flipped, they will follow the fate of top-card
if(((_target->isACopier||(_target->isToken && _target->backSide == "")) && !isflipcard && !backfromcopy) || _target->has(Constants::CANTTRANSFORM))
if(((_target->isACopier || (_target->isToken && _target->backSide == "" && !backfromcopy)) && !isflipcard && !backfromcopy) || _target->has(Constants::CANTTRANSFORM))
{
game->removeObserver(this);
return 0;

View File

@@ -112,8 +112,13 @@ void MTGCardInstance::copy(MTGCardInstance * card, bool nolegend)
source = MTGCollection()->getCardById(card->getMTGId());
else
{
source = card->tokCard;
source->data = card->tokCard;//?wtf
if(card->tokCard){ // Fix a possible crash when tokCard is null...
source = card->tokCard;
source->data = card->tokCard; //?wtf
} else {
source = card;
source->data = card;
}
}
}
else