try to fix
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -388,7 +388,29 @@ int MTGPutInPlayRule::reactToClick(MTGCardInstance * card)
|
||||
if ((cost->hasX() || cost->hasSpecificX()) && card->setX == -1)
|
||||
{
|
||||
vector<MTGAbility*>selection;
|
||||
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)
|
||||
|
||||
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user