Fix send to library as a cost and add support for moving a card to
graveyard as a cost(cards like Void Attendant from Battle for Zendikar)
This commit is contained in:
Anthony Calosa
2016-05-29 17:56:33 +08:00
parent 506adf63c9
commit c472a0215d
3 changed files with 43 additions and 1 deletions
+5 -1
View File
@@ -139,10 +139,14 @@ ManaCost * ManaCost::parseManaCost(string s, ManaCost * _manaCost, MTGCardInstan
}
break;
case 's':
if (value == "s2l")
if (value.find("s2l") != string::npos)
{ //Send To Library Cost (move from anywhere to Library)
manaCost->addExtraCost(NEW ToLibraryCost(tc));
}
else if (value.find("s2g") != string::npos)
{ //Send to Graveyard Cost (move from anywhere to Graveyard)
manaCost->addExtraCost(NEW ToGraveCost(tc));
}
else
{ //Sacrifice
manaCost->addExtraCost(NEW SacrificeCost(tc));