Fix X cost for Alternative payment, added new primitives.
This commit is contained in:
@@ -911,6 +911,7 @@ int MTGAlternativeCostRule::reactToClick(MTGCardInstance * card, ManaCost *alter
|
||||
ManaCost * Xcost = NEW ManaCost();
|
||||
Xcost->copy(alternateCost);
|
||||
Xcost->add(Constants::MTG_COLOR_ARTIFACT, card->setX);
|
||||
card->X = card->setX; // Fix to don't loose X value on alternative cast
|
||||
Xcost->remove(7, 1);//remove the X
|
||||
if (playerMana->canAfford(Xcost))
|
||||
{
|
||||
@@ -983,9 +984,8 @@ int MTGAlternativeCostRule::reactToClick(MTGCardInstance * card, ManaCost *alter
|
||||
}//end of storm
|
||||
else
|
||||
{
|
||||
|
||||
ManaCost * c = spellCost->Diff(alternateCost);
|
||||
copy->X = card->setX;
|
||||
copy->X = card->X;
|
||||
copy->castX = copy->X;
|
||||
delete c;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user