diff --git a/Mage.Sets/src/mage/cards/d/DemolitionField.java b/Mage.Sets/src/mage/cards/d/DemolitionField.java index 53d56fda623..b52c289b5e3 100644 --- a/Mage.Sets/src/mage/cards/d/DemolitionField.java +++ b/Mage.Sets/src/mage/cards/d/DemolitionField.java @@ -54,7 +54,7 @@ public final class DemolitionField extends CardImpl { )); ability.addEffect(new SearchLibraryPutInPlayEffect( new TargetCardInLibrary(StaticFilters.FILTER_CARD_BASIC_LAND_A), - false, true + false, false, true )); ability.addTarget(new TargetLandPermanent(filter)); this.addAbility(ability); diff --git a/Mage/src/main/java/mage/abilities/effects/common/search/SearchLibraryPutInHandEffect.java b/Mage/src/main/java/mage/abilities/effects/common/search/SearchLibraryPutInHandEffect.java index 86b02e20311..8743354d378 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/search/SearchLibraryPutInHandEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/search/SearchLibraryPutInHandEffect.java @@ -11,7 +11,6 @@ import mage.constants.Zone; import mage.game.Game; import mage.players.Player; import mage.target.common.TargetCardInLibrary; -import mage.util.CardUtil; import java.util.UUID; @@ -81,9 +80,8 @@ public class SearchLibraryPutInHandEffect extends SearchEffect { private void setText() { StringBuilder sb = new StringBuilder(); sb.append("search your library for "); - if (target.getNumberOfTargets() == 0 && target.getMaxNumberOfTargets() > 0) { - sb.append("up to ").append(CardUtil.numberToText(target.getMaxNumberOfTargets())).append(' '); - sb.append(target.getTargetName()); + sb.append(target.getDescription()); + if (target.getMaxNumberOfTargets() > 1) { if (revealCards) { sb.append(", reveal "); sb.append(textThatCard ? "those cards" : "them"); @@ -93,7 +91,6 @@ public class SearchLibraryPutInHandEffect extends SearchEffect { sb.append(textThatCard ? "those cards" : "them"); } } else { - sb.append(CardUtil.addArticle(target.getTargetName())); if (revealCards) { sb.append(", reveal "); sb.append(textThatCard ? "that card" : "it"); @@ -102,7 +99,6 @@ public class SearchLibraryPutInHandEffect extends SearchEffect { sb.append(", put "); sb.append(textThatCard ? "that card" : "it"); } - } sb.append(" into your hand, then shuffle"); staticText = sb.toString(); diff --git a/Mage/src/main/java/mage/abilities/effects/common/search/SearchLibraryPutInPlayEffect.java b/Mage/src/main/java/mage/abilities/effects/common/search/SearchLibraryPutInPlayEffect.java index 25df381a267..a75ad98e0d1 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/search/SearchLibraryPutInPlayEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/search/SearchLibraryPutInPlayEffect.java @@ -18,6 +18,7 @@ import java.util.UUID; public class SearchLibraryPutInPlayEffect extends SearchEffect { protected boolean tapped; + protected boolean textThatCard; protected boolean optional; public SearchLibraryPutInPlayEffect(TargetCardInLibrary target) { @@ -28,27 +29,27 @@ public class SearchLibraryPutInPlayEffect extends SearchEffect { this(target, tapped, false); } - public SearchLibraryPutInPlayEffect(TargetCardInLibrary target, boolean tapped, boolean optional) { + public SearchLibraryPutInPlayEffect(TargetCardInLibrary target, boolean tapped, boolean textThatCard) { + this(target, tapped, textThatCard, false); + } + + public SearchLibraryPutInPlayEffect(TargetCardInLibrary target, boolean tapped, boolean textThatCard, boolean optional) { super(target, Outcome.PutCardInPlay); this.tapped = tapped; + this.textThatCard = textThatCard; this.optional = optional; if (target.getDescription().contains("land")) { this.outcome = Outcome.PutLandInPlay; } else if (target.getDescription().contains("creature")) { this.outcome = Outcome.PutCreatureInPlay; } - staticText = (optional ? "you may " : "") - + "search your library for " - + target.getDescription() - + ", " - + (target.getMaxNumberOfTargets() > 1 ? "put them onto the battlefield" : "put it onto the battlefield") - + (tapped ? " tapped" : "") - + ", then shuffle"; + setText(); } public SearchLibraryPutInPlayEffect(final SearchLibraryPutInPlayEffect effect) { super(effect); this.tapped = effect.tapped; + this.textThatCard = effect.textThatCard; this.optional = effect.optional; } @@ -78,6 +79,27 @@ public class SearchLibraryPutInPlayEffect extends SearchEffect { return false; } + private void setText() { + StringBuilder sb = new StringBuilder(); + if (optional) { + sb.append("you may "); + } + sb.append("search your library for "); + sb.append(target.getDescription()); + sb.append(", put"); + if (target.getMaxNumberOfTargets() > 1) { + sb.append(textThatCard ? "those cards" : "them"); + } else { + sb.append(textThatCard ? "that card" : "it"); + } + sb.append(" onto the battlefield"); + if (tapped) { + sb.append(" tapped"); + } + sb.append( ", then shuffle"); + staticText = sb.toString(); + } + public List getTargets() { return target.getTargets(); }