mirror of
https://github.com/correl/mage.git
synced 2024-12-25 03:00:15 +00:00
bug fix for Tunnel Vision when it does not find card in library
This commit is contained in:
parent
9d9265e02b
commit
6584079d7a
1 changed files with 8 additions and 5 deletions
|
@ -99,6 +99,7 @@ class TunnelVisionEffect extends OneShotEffect {
|
|||
|
||||
Cards cardsToReveal = new CardsImpl();
|
||||
Cards cardsToBury = new CardsImpl();
|
||||
Card namedCard = null;
|
||||
|
||||
// reveal until named card found
|
||||
// if named card found, put all revealed cards in grave and put named card on top of library
|
||||
|
@ -110,8 +111,7 @@ class TunnelVisionEffect extends OneShotEffect {
|
|||
cardsToReveal.add(card);
|
||||
if (card.getName().equals(cardName)) {
|
||||
namedCardFound = true;
|
||||
targetPlayer.moveCards(cardsToBury, Zone.GRAVEYARD, source, game);
|
||||
targetPlayer.moveCards(card, Zone.LIBRARY, source, game);
|
||||
namedCard = card;
|
||||
break;
|
||||
} else {
|
||||
cardsToBury.add(card);
|
||||
|
@ -120,7 +120,10 @@ class TunnelVisionEffect extends OneShotEffect {
|
|||
}
|
||||
|
||||
targetPlayer.revealCards(sourceObject.getIdName(), cardsToReveal, game);
|
||||
if (!namedCardFound) {
|
||||
if (namedCardFound) {
|
||||
targetPlayer.moveCards(cardsToBury, Zone.GRAVEYARD, source, game);
|
||||
targetPlayer.moveCards(namedCard, Zone.LIBRARY, source, game);
|
||||
} else {
|
||||
targetPlayer.shuffleLibrary(source, game);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue