diff --git a/projects/mtg/bin/Res/sets/primitives/borderline.txt b/projects/mtg/bin/Res/sets/primitives/borderline.txt index e2cb7cc20..0aeac5b65 100644 --- a/projects/mtg/bin/Res/sets/primitives/borderline.txt +++ b/projects/mtg/bin/Res/sets/primitives/borderline.txt @@ -357,7 +357,7 @@ auto=this(variable{plandu}>0) {S(land[manau]|mybattlefield)}:Add{U} auto=this(variable{plandr}>0) {S(land[manar]|mybattlefield)}:Add{R} auto=this(variable{plandb}>0) {S(land[manab]|mybattlefield)}:Add{B} auto=this(variable{plandw}>0) {S(land[manaw]|mybattlefield)}:Add{W} -auto=this(variable{plandc}>0) {S(land[manac]|mybattlefield)}:Add{C} +auto=this(variable{plandc}>0) {S(land[cmana]|mybattlefield)}:Add{C} text=Sacrifice a land: Add to your mana pool one mana of any type the sacrificed land could produce. mana={B}{G} type=Enchantment diff --git a/projects/mtg/src/MTGRules.cpp b/projects/mtg/src/MTGRules.cpp index 12381e0f3..3493e0699 100644 --- a/projects/mtg/src/MTGRules.cpp +++ b/projects/mtg/src/MTGRules.cpp @@ -388,7 +388,29 @@ int MTGPutInPlayRule::reactToClick(MTGCardInstance * card) if ((cost->hasX() || cost->hasSpecificX()) && card->setX == -1) { vectorselection; - int options = cost->hasSpecificX() ? 20 : (playerMana->getConvertedCost() - cost->getConvertedCost()) + 1; + int amountx = 0; + int colorlessx = 0; + int costcx = 0; + costcx = cost->getCost(0); + if (cost->xColor) + { + int thisxcolor = cost->xColor; + amountx = (playerMana->getCost(thisxcolor) - cost->getCost(thisxcolor)); + for(int kk = 0; kk < 7; kk++) + { + if(kk!=thisxcolor) + { + colorlessx += playerMana->getCost(kk); + } + } + } + if (amountx < 0) + amountx = 0; + if(colorlessx >= costcx) + colorlessx = 0; + else + colorlessx -= costcx; + int options = cost->hasSpecificX() ? amountx + 1 +colorlessx : (playerMana->getConvertedCost() - cost->getConvertedCost()) + 1; //you can set up to 20 for specific X, if you cant afford it, it cancels. I couldnt think of a equation that would //give me the correct amount sorry. for (int i = 0; i < options; ++i) diff --git a/projects/mtg/src/TargetChooser.cpp b/projects/mtg/src/TargetChooser.cpp index 8fb854b39..35291897c 100644 --- a/projects/mtg/src/TargetChooser.cpp +++ b/projects/mtg/src/TargetChooser.cpp @@ -558,7 +558,7 @@ TargetChooser * TargetChooserFactory::createTargetChooser(string s, MTGCardInsta } } //can produce mana - else if (attribute.find("manac") != string::npos) + else if (attribute.find("cmana") != string::npos) { if (minus) {