Added/Fixed primitives, improved the Double Face Modal cards management: now it's possibile to click on card to flip the side in odrer to read card infos such as name, manacost, text and types, improved the "moveto" keyword in order to allow the usage of the "temp" zone for removing unecessary cards from game (e.g. duplicated card generated from some dual face cards), added the option "nolegend" to the "copy" keyword in order to crerate copy of legendary cards that are not legendary (e.g. Echoing Equation), added the keywords "doublefacedeath" and "gaineddoublefacedeath" to send a card to temp zone after death (e.g. duplicated card generated from some dual face cards), added the keywords "lifefaker" to identify the cards wich modify the life increasement when a @lifeof triggers occours (e.g. Angel of Vitality).

This commit is contained in:
Vittorio Alfieri
2021-04-27 15:35:54 +02:00
parent e265dc3e7f
commit 6fb3feef72
13 changed files with 565 additions and 264 deletions
+9 -2
View File
@@ -97,7 +97,7 @@ MTGCardInstance::MTGCardInstance(MTGCard * card, MTGPlayerCards * arg_belongs_to
return snapShot;
}
void MTGCardInstance::copy(MTGCardInstance * card)
void MTGCardInstance::copy(MTGCardInstance * card, bool nolegend)
{
MTGCard * source = NULL;
if(card->isACopier && card->copiedID)
@@ -130,7 +130,8 @@ void MTGCardInstance::copy(MTGCardInstance * card)
types.clear();//reset types.. fix copying man lands... the copier becomes an unanimated land...
for (size_t i = 0; i < data->types.size(); i++)
{
types.push_back(data->types[i]);
if(!(nolegend && data->types[i] == Subtypes::TYPE_LEGENDARY)) // Check if the copy has to be legendary or not. (e.g. Echoing Equation)
types.push_back(data->types[i]);
}
colors = data->colors;
@@ -514,6 +515,12 @@ int MTGCardInstance::toGrave( bool forced )
basicAbilities[(int)Constants::GAINEDEXILEDEATH] = 0;
return 1;
}
if (basicAbilities[(int)Constants::DOUBLEFACEDEATH] || basicAbilities[(int)Constants::GAINEDDOUBLEFACEDEATH])
{
p->game->putInZone(this, p->game->inPlay, owner->game->temp);
basicAbilities[(int)Constants::GAINEDDOUBLEFACEDEATH] = 0;
return 1;
}
if (basicAbilities[(int)Constants::HANDDEATH] || basicAbilities[(int)Constants::GAINEDHANDDEATH])
{
p->game->putInZone(this, p->game->inPlay, owner->game->hand);