diff --git a/projects/mtg/bin/Res/test/buyback.txt b/projects/mtg/bin/Res/test/buyback.txt new file mode 100644 index 000000000..ca655e5d5 --- /dev/null +++ b/projects/mtg/bin/Res/test/buyback.txt @@ -0,0 +1,30 @@ +# Cast card once with buyback and second time without. +# The card must be in the graveyard, not in the hand +[INIT] +FIRSTMAIN + +[PLAYER1] +hand:Capsize +manapool:{5}{U}{U}{U}{U} + +[PLAYER2] +inplay:Swamp,Island + +[DO] +Capsize +# pay buyback +choice 1 +Swamp +Capsize +Island + +[ASSERT] +FIRSTMAIN + +[PLAYER1] +graveyard:Capsize + +[PLAYER2] +hand:Swamp,Island + +[END] diff --git a/projects/mtg/src/MTGAbility.cpp b/projects/mtg/src/MTGAbility.cpp index ca1a4b5ab..a4ad3f5e2 100644 --- a/projects/mtg/src/MTGAbility.cpp +++ b/projects/mtg/src/MTGAbility.cpp @@ -4284,6 +4284,7 @@ void AbilityFactory::addAbilities(int _id, Spell * spell) } else if (card->alternateCostPaid[ManaCost::MANA_PAID_WITH_BUYBACK] > 0) { + card->alternateCostPaid[ManaCost::MANA_PAID_WITH_BUYBACK] = 0; zones->putInZone(card, zones->stack, Endzones->hand); } else if (card->alternateCostPaid[ManaCost::MANA_PAID_WITH_FLASHBACK] > 0)