mirror of
https://github.com/correl/mage.git
synced 2024-12-25 11:11:16 +00:00
* Search in library -- Set required status depending on whether searched cards have stated quality (rules 701.15b, 701.15d).
This commit is contained in:
parent
3836e68dcf
commit
aa606a1d3c
2 changed files with 5 additions and 2 deletions
|
@ -112,6 +112,10 @@ public class FilterCard extends FilterObject<Card> {
|
|||
}
|
||||
return filtered;
|
||||
}
|
||||
|
||||
public boolean hasPredicates() {
|
||||
return predicates.size() > 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public FilterCard copy() {
|
||||
|
|
|
@ -65,13 +65,12 @@ public class TargetCardInLibrary extends TargetCard {
|
|||
|
||||
public TargetCardInLibrary(int minNumTargets, int maxNumTargets, FilterCard filter) {
|
||||
super(minNumTargets, maxNumTargets, Zone.LIBRARY, filter);
|
||||
this.setRequired(false);
|
||||
this.setRequired(!filter.hasPredicates());
|
||||
this.librarySearchLimit = Integer.MAX_VALUE;
|
||||
}
|
||||
|
||||
public TargetCardInLibrary(final TargetCardInLibrary target) {
|
||||
super(target);
|
||||
this.setRequired(false);
|
||||
this.librarySearchLimit = target.librarySearchLimit;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue