Fix !share!types! keyword

This commit is contained in:
Vittorio Alfieri
2020-06-11 00:09:32 +02:00
committed by GitHub
parent 5688b28981
commit 6212af0f48
+3 -2
View File
@@ -771,8 +771,9 @@ TargetChooser * TargetChooserFactory::createTargetChooser(string s, MTGCardInsta
cd->removeType("tribal"); cd->removeType("tribal");
if (!cd->types.size()){ if (!cd->types.size()){
int i = rand() % 10000 + 1; int i = rand() % 10000 + 1;
ostringstream rnd; ostringstream subt;
cd->setSubtype(card->getName() + "_DummyType_" + rnd.str()); // Fix to avoid type vector size is 0 causing the always true match issue. subt << card->getName() << "_DummyType_" << i;
cd->setSubtype(subt.str()); // Fix to avoid type vector size is 0 causing the always true match issue.
} }
cd->mode = CardDescriptor::CD_OR; cd->mode = CardDescriptor::CD_OR;
} }