Fix !share!types! problem for creatures with no subtypes
This commit is contained in:
@@ -769,16 +769,11 @@ TargetChooser * TargetChooserFactory::createTargetChooser(string s, MTGCardInsta
|
|||||||
cd->removeType("creature");
|
cd->removeType("creature");
|
||||||
cd->removeType("planeswalker");
|
cd->removeType("planeswalker");
|
||||||
cd->removeType("tribal");
|
cd->removeType("tribal");
|
||||||
#if !defined (PSP)
|
|
||||||
if (!cd->types.size())
|
|
||||||
cd->setSubtype(card->getName() + "_DummyType_" + std::to_string((long double)(rand() % 10000 + 1))); // Fix to avoid type vector size is 0 causing the always true match issue.
|
|
||||||
#else
|
|
||||||
if (!cd->types.size()){
|
if (!cd->types.size()){
|
||||||
int i = rand() % 10000 + 1;
|
int i = rand() % 10000 + 1;
|
||||||
ostringstream rnd;
|
ostringstream rnd;
|
||||||
cd->setSubtype(card->getName() + "_DummyType_" + rnd.str()); // Fix to avoid type vector size is 0 causing the always true match issue.
|
cd->setSubtype(card->getName() + "_DummyType_" + rnd.str()); // Fix to avoid type vector size is 0 causing the always true match issue.
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
cd->mode = CardDescriptor::CD_OR;
|
cd->mode = CardDescriptor::CD_OR;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user