From 6212af0f484a7f6eea464158ecf487d722a2940f Mon Sep 17 00:00:00 2001 From: Vittorio Alfieri <53129080+Vitty85@users.noreply.github.com> Date: Thu, 11 Jun 2020 00:09:32 +0200 Subject: [PATCH] Fix !share!types! keyword --- projects/mtg/src/TargetChooser.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/projects/mtg/src/TargetChooser.cpp b/projects/mtg/src/TargetChooser.cpp index 825b1bded..6740f39c3 100644 --- a/projects/mtg/src/TargetChooser.cpp +++ b/projects/mtg/src/TargetChooser.cpp @@ -771,8 +771,9 @@ TargetChooser * TargetChooserFactory::createTargetChooser(string s, MTGCardInsta cd->removeType("tribal"); if (!cd->types.size()){ int i = rand() % 10000 + 1; - ostringstream rnd; - cd->setSubtype(card->getName() + "_DummyType_" + rnd.str()); // Fix to avoid type vector size is 0 causing the always true match issue. + ostringstream subt; + 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; }