* You may choose card from outside or in exile - fixed that it doesn't allows to choose cards from exiled zone (Karn, the Great Creator and Coax from the Blind Eternities);

This commit is contained in:
Oleg Agafonov 2019-12-24 02:06:33 +04:00
parent 8af784e8e6
commit 70b37d1d71

View file

@ -1,8 +1,5 @@
package mage.abilities.effects.common;
import java.util.List;
import java.util.Set;
import mage.MageObject;
import mage.abilities.Ability;
import mage.abilities.effects.OneShotEffect;
@ -16,8 +13,10 @@ import mage.game.Game;
import mage.players.Player;
import mage.target.TargetCard;
import java.util.List;
import java.util.Set;
/**
*
* @author Styxo
*/
public class WishEffect extends OneShotEffect {
@ -73,7 +72,7 @@ public class WishEffect extends OneShotEffect {
if (controller.chooseUse(Outcome.Benefit, choiceText, source, game)) {
Cards cards = controller.getSideboard();
List<Card> exile = game.getExile().getAllCards(game);
boolean noTargets = cards.isEmpty() && (alsoFromExile ? exile.isEmpty() : true);
boolean noTargets = cards.isEmpty() && (!alsoFromExile || exile.isEmpty());
if (noTargets) {
game.informPlayer(controller, "You have no cards outside the game" + (alsoFromExile ? " or in exile" : "") + '.');
return true;
@ -96,7 +95,7 @@ public class WishEffect extends OneShotEffect {
return true;
}
TargetCard target = new TargetCard(Zone.OUTSIDE, filter);
TargetCard target = new TargetCard(Zone.ALL, filter);
target.setNotTarget(true);
if (controller.choose(Outcome.Benefit, filteredCards, target, game)) {
Card card = controller.getSideboard().get(target.getFirstTarget(), game);