mirror of
https://github.com/correl/mage.git
synced 2025-03-17 17:00:08 -09: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 cardsToReveal = new CardsImpl();
|
||||||
Cards cardsToBury = new CardsImpl();
|
Cards cardsToBury = new CardsImpl();
|
||||||
|
Card namedCard = null;
|
||||||
|
|
||||||
// reveal until named card found
|
// reveal until named card found
|
||||||
// if named card found, put all revealed cards in grave and put named card on top of library
|
// 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);
|
cardsToReveal.add(card);
|
||||||
if (card.getName().equals(cardName)) {
|
if (card.getName().equals(cardName)) {
|
||||||
namedCardFound = true;
|
namedCardFound = true;
|
||||||
targetPlayer.moveCards(cardsToBury, Zone.GRAVEYARD, source, game);
|
namedCard = card;
|
||||||
targetPlayer.moveCards(card, Zone.LIBRARY, source, game);
|
|
||||||
break;
|
break;
|
||||||
} else {
|
} else {
|
||||||
cardsToBury.add(card);
|
cardsToBury.add(card);
|
||||||
|
@ -120,7 +120,10 @@ class TunnelVisionEffect extends OneShotEffect {
|
||||||
}
|
}
|
||||||
|
|
||||||
targetPlayer.revealCards(sourceObject.getIdName(), cardsToReveal, game);
|
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);
|
targetPlayer.shuffleLibrary(source, game);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue