mirror of
https://github.com/correl/mage.git
synced 2024-11-14 19:19:32 +00:00
SearchLibraryPutInPlayEffect: automatic outcome
This commit is contained in:
parent
6de43dc06e
commit
3b02a42ddf
2 changed files with 9 additions and 4 deletions
|
@ -54,7 +54,7 @@ public final class DemolitionField extends CardImpl {
|
|||
));
|
||||
ability.addEffect(new SearchLibraryPutInPlayEffect(
|
||||
new TargetCardInLibrary(StaticFilters.FILTER_CARD_BASIC_LAND_A),
|
||||
false, true, true, Outcome.PutLandInPlay
|
||||
false, true, true
|
||||
));
|
||||
ability.addTarget(new TargetLandPermanent(filter));
|
||||
this.addAbility(ability);
|
||||
|
|
|
@ -38,14 +38,19 @@ public class SearchLibraryPutInPlayEffect extends SearchEffect {
|
|||
}
|
||||
|
||||
public SearchLibraryPutInPlayEffect(TargetCardInLibrary target, boolean tapped, boolean forceShuffle, Outcome outcome) {
|
||||
this(target, tapped, forceShuffle, false, outcome);
|
||||
this(target, tapped, forceShuffle, false);
|
||||
}
|
||||
|
||||
public SearchLibraryPutInPlayEffect(TargetCardInLibrary target, boolean tapped, boolean forceShuffle, boolean optional, Outcome outcome) {
|
||||
super(target, outcome);
|
||||
public SearchLibraryPutInPlayEffect(TargetCardInLibrary target, boolean tapped, boolean forceShuffle, boolean optional) {
|
||||
super(target, Outcome.PutCardInPlay);
|
||||
this.tapped = tapped;
|
||||
this.forceShuffle = forceShuffle;
|
||||
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()
|
||||
|
|
Loading…
Reference in a new issue