Fix X cost for Alternative payment, added new primitives.

This commit is contained in:
valfieri
2020-06-15 17:14:22 +02:00
parent 587155353c
commit a2594f1fb7
3 changed files with 55 additions and 209 deletions

View File

@@ -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;
}