- refactor of MTGRules.cpp (buyback/flashback/retrace/alternative).
This change has been reviewed by myself, Wil, and Mike. The test suite passes.
More cleanup can be done, I will work on that later on.
This commit is contained in:
wagic.the.homebrew@gmail.com
2011-01-21 10:27:45 +00:00
parent b6713c02ec
commit 6d3d4c1792
6 changed files with 204 additions and 597 deletions
+2 -2
View File
@@ -2827,11 +2827,11 @@ void AbilityFactory::addAbilities(int _id, Spell * spell)
if (card->hasType("instant") || card->hasType("sorcery"))
{
MTGPlayerCards * zones = card->controller()->game;
if (card->boughtback > 0)
if (card->alternateCostPaid[ManaCost::MANA_PAID_WITH_BUYBACK] > 0)
{
zones->putInZone(card, zones->stack, zones->hand);
}
else if (card->flashedback > 0)
else if (card->alternateCostPaid[ManaCost::MANA_PAID_WITH_FLASHBACK] > 0)
{
zones->putInZone(card, zones->stack, zones->exile);
}