mirror of
https://github.com/magefree/mage.git
synced 2025-12-26 05:22:02 -08:00
added static filter test, a few other small changes
This commit is contained in:
parent
afdae939c3
commit
dcb08be4c3
4 changed files with 42 additions and 3 deletions
|
|
@ -1,10 +1,10 @@
|
|||
|
||||
package mage.filter;
|
||||
|
||||
import mage.filter.predicate.Predicate;
|
||||
import mage.game.Game;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
import mage.filter.predicate.Predicate;
|
||||
import mage.game.Game;
|
||||
|
||||
/**
|
||||
* @param <E>
|
||||
|
|
@ -29,5 +29,9 @@ public interface Filter<E> extends Serializable {
|
|||
|
||||
Filter<E> copy();
|
||||
|
||||
public boolean isLockedFilter();
|
||||
|
||||
public void setLockedFilter(boolean lockedFilter);
|
||||
|
||||
List<Predicate<? super E>> getPredicates();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -67,10 +67,12 @@ public abstract class FilterImpl<E> implements Filter<E> {
|
|||
return message;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isLockedFilter() {
|
||||
return lockedFilter;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setLockedFilter(boolean lockedFilter) {
|
||||
this.lockedFilter = lockedFilter;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -752,6 +752,10 @@ public final class StaticFilters {
|
|||
|
||||
public static final FilterPermanent FILTER_PERMANENT_EQUIPMENT = new FilterEquipmentPermanent();
|
||||
|
||||
static {
|
||||
FILTER_PERMANENT_EQUIPMENT.setLockedFilter(true);
|
||||
}
|
||||
|
||||
public static final FilterPermanent FILTER_PERMANENT_FORTIFICATION = new FilterPermanent();
|
||||
|
||||
static {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue