same applies for scry

This commit is contained in:
zethfoxster
2016-07-30 10:20:19 -04:00
parent 018e35295a
commit f2208389bd
+8
View File
@@ -732,6 +732,10 @@ bool MTGScryCards::CheckUserInput(JButton key)
if (!abilitySecond && !tc->getNbTargets() && tc->source) if (!abilitySecond && !tc->getNbTargets() && tc->source)
{ {
tc->source->getObserver()->cardClick(tc->source, 0, false); tc->source->getObserver()->cardClick(tc->source, 0, false);
//remove the first ability to avoid a menu react.
source->getObserver()->mLayers->stackLayer()->Remove(abilityFirst);
abilityFirst->removeFromGame();
game->removeObserver(abilityFirst);
game->Update(0); game->Update(0);
if (zone->cards.size()) if (zone->cards.size())
{ {
@@ -755,6 +759,10 @@ bool MTGScryCards::CheckUserInput(JButton key)
{ {
if (!tc && !abilitySecond) if (!tc && !abilitySecond)
{ {
//remove the first ability to avoid a menu react.
source->getObserver()->mLayers->stackLayer()->Remove(abilityFirst);
abilityFirst->removeFromGame();
game->removeObserver(abilityFirst);
game->Update(1); game->Update(1);
if (zone->cards.size() || (revealDisplay && !zone->cards.size())) if (zone->cards.size() || (revealDisplay && !zone->cards.size()))