From a31da480841daa43b38eba24e1c52057bafd313e Mon Sep 17 00:00:00 2001 From: Oleg Agafonov Date: Thu, 16 Jan 2020 17:11:19 +0400 Subject: [PATCH] Little fixes --- .../test/java/org/mage/test/player/TestPlayer.java | 9 +++++---- .../ExileCardFromOwnGraveyardControllerEffect.java | 13 ++++++------- Mage/src/main/java/mage/game/ZonesHandler.java | 2 +- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/Mage.Tests/src/test/java/org/mage/test/player/TestPlayer.java b/Mage.Tests/src/test/java/org/mage/test/player/TestPlayer.java index 4920288a9e..4eb9e30dd9 100644 --- a/Mage.Tests/src/test/java/org/mage/test/player/TestPlayer.java +++ b/Mage.Tests/src/test/java/org/mage/test/player/TestPlayer.java @@ -62,7 +62,6 @@ import java.util.*; import java.util.regex.Matcher; import java.util.regex.Pattern; import java.util.stream.Collectors; -import java.util.stream.IntStream; import static org.mage.test.serverside.base.impl.CardTestPlayerAPIImpl.*; @@ -2035,7 +2034,7 @@ public class TestPlayer implements Player { Assert.fail(message); } - this.chooseStrictModeFailed("target", game,getInfo(source, game) + "\n" + getInfo(target)); + this.chooseStrictModeFailed("target", game, getInfo(source, game) + "\n" + getInfo(target)); return computerPlayer.chooseTarget(outcome, target, source, game); } @@ -2128,7 +2127,8 @@ public class TestPlayer implements Player { } } - this.chooseStrictModeFailed("choice", game, getInfo(ability, game) + "; " + message); + this.chooseStrictModeFailed("choice", game, getInfo(ability, game) + + "\nMessage: " + message); return computerPlayer.announceXMana(min, max, multiplier, message, game, ability); } @@ -2142,7 +2142,8 @@ public class TestPlayer implements Player { } } - this.chooseStrictModeFailed("choice", game, getInfo(ability, game) + "; " + message); + this.chooseStrictModeFailed("choice", game, getInfo(ability, game) + + "\nMessage: " + message); return computerPlayer.announceXCost(min, max, message, game, ability, null); } diff --git a/Mage/src/main/java/mage/abilities/effects/common/ExileCardFromOwnGraveyardControllerEffect.java b/Mage/src/main/java/mage/abilities/effects/common/ExileCardFromOwnGraveyardControllerEffect.java index 704ac419ce..f2f8de4a1f 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/ExileCardFromOwnGraveyardControllerEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/ExileCardFromOwnGraveyardControllerEffect.java @@ -1,7 +1,5 @@ - package mage.abilities.effects.common; -import java.util.UUID; import mage.abilities.Ability; import mage.abilities.effects.OneShotEffect; import mage.cards.Card; @@ -13,8 +11,9 @@ import mage.players.Player; import mage.target.common.TargetCardInYourGraveyard; import mage.util.CardUtil; +import java.util.UUID; + /** - * * @author LevelX2 */ public class ExileCardFromOwnGraveyardControllerEffect extends OneShotEffect { @@ -39,10 +38,10 @@ public class ExileCardFromOwnGraveyardControllerEffect extends OneShotEffect { @Override public boolean apply(Game game, Ability source) { Player player = game.getPlayer(source.getControllerId()); - if(player != null){ + if (player != null) { TargetCardInYourGraveyard target = new TargetCardInYourGraveyard(Math.min(amount, player.getGraveyard().size()), new FilterCard()); if (player.chooseTarget(outcome, target, source, game)) { - for (UUID targetId: target.getTargets()) { + for (UUID targetId : target.getTargets()) { Card card = player.getGraveyard().get(targetId, game); if (card != null) { card.moveToZone(Zone.EXILED, source.getSourceId(), game, false); @@ -57,9 +56,9 @@ public class ExileCardFromOwnGraveyardControllerEffect extends OneShotEffect { private String setText() { StringBuilder sb = new StringBuilder("exile "); if (amount == 1) { - sb.append(" a card "); + sb.append("a card "); } else { - sb.append(CardUtil.numberToText(amount)). append(" cards "); + sb.append(CardUtil.numberToText(amount)).append(" cards "); } sb.append("from your graveyard"); return sb.toString(); diff --git a/Mage/src/main/java/mage/game/ZonesHandler.java b/Mage/src/main/java/mage/game/ZonesHandler.java index c4440bab1b..bfc255ed9e 100644 --- a/Mage/src/main/java/mage/game/ZonesHandler.java +++ b/Mage/src/main/java/mage/game/ZonesHandler.java @@ -165,7 +165,7 @@ public final class ZonesHandler { game.getPermanentsEntering().remove(permanent.getId()); break; default: - throw new UnsupportedOperationException("to Zone" + toZone.toString() + " not supported yet"); + throw new UnsupportedOperationException("to Zone " + toZone.toString() + " not supported yet"); } } game.setZone(event.getTargetId(), event.getToZone());