Fixed some primitives with conjure and phyrexian mana, fixed a bug on "conjure" ability, improved getCardbyName method for castcard with namedcard option, for meld and for flip/turnside ability.

This commit is contained in:
Vittorio Alfieri
2023-06-24 23:01:25 +02:00
parent 20fa180864
commit 9a23c4b83b
6 changed files with 78 additions and 75 deletions
+4 -2
View File
@@ -832,9 +832,11 @@ MTGCard * MTGAllCards::getCardByName(string nameDescriptor, int forcedSetId)
map<string, MTGCard * >::iterator cached = mtgCardByNameCache.find(nameDescriptor);
if ((forcedSetId < 0) && (cached!= mtgCardByNameCache.end()))
if (cached!= mtgCardByNameCache.end())
{
return cached->second;
MTGCard* card = cached->second;
if(forcedSetId < 0 || (card && forcedSetId == card->setId))
return card;
}
int cardnb = atoi(nameDescriptor.c_str());