1
0
Fork 0
mirror of https://github.com/correl/mage.git synced 2025-02-19 11:07:01 +00:00

[filters] Removed unused code from Filters

This commit is contained in:
North 2012-07-14 15:54:53 +03:00
parent c51dc081c6
commit ead5773411
5 changed files with 0 additions and 79 deletions

View file

@ -41,14 +41,8 @@ import java.util.UUID;
* @author BetaSteward_at_googlemail.com
*/
public class FilterPermanent extends FilterObject<Permanent> {
protected List<UUID> ownerId = new ArrayList<UUID>();
protected boolean notOwner;
protected List<UUID> controllerId = new ArrayList<UUID>();
protected boolean notController;
protected boolean useFlipped;
protected boolean flipped;
protected boolean useFaceup;
protected boolean faceup;
protected TargetController controller = TargetController.ANY;
protected TargetController owner = TargetController.ANY;
protected boolean another;
@ -59,14 +53,8 @@ public class FilterPermanent extends FilterObject<Permanent> {
public FilterPermanent(final FilterPermanent filter) {
super(filter);
this.ownerId = new ArrayList<UUID>(filter.ownerId);
this.notOwner = filter.notOwner;
this.controllerId = new ArrayList<UUID>(filter.controllerId);
this.notController = filter.notController;
this.useFlipped = filter.useFlipped;
this.flipped = filter.flipped;
this.useFaceup = filter.useFaceup;
this.faceup = filter.faceup;
this.controller = filter.controller;
this.owner = filter.owner;
this.another = filter.another;
@ -81,18 +69,9 @@ public class FilterPermanent extends FilterObject<Permanent> {
if (!super.match(permanent, game))
return notFilter;
if (ownerId.size() > 0 && ownerId.contains(permanent.getOwnerId()) == notOwner)
return notFilter;
if (controllerId.size() > 0 && controllerId.contains(permanent.getControllerId()) == notController)
return notFilter;
if (useFlipped && permanent.isFlipped() != flipped)
return notFilter;
if (useFaceup && permanent.isFaceUp() != faceup)
return notFilter;
return !notFilter;
}
@ -144,14 +123,6 @@ public class FilterPermanent extends FilterObject<Permanent> {
return !notFilter;
}
public List<UUID> getOwnerId() {
return ownerId;
}
public void setNotOwner(boolean notOwner) {
this.notOwner = notOwner;
}
public List<UUID> getControllerId() {
return controllerId;
}
@ -160,22 +131,6 @@ public class FilterPermanent extends FilterObject<Permanent> {
this.notController = notController;
}
public void setUseFlipped(boolean useFlipped) {
this.useFlipped = useFlipped;
}
public void setFlipped(boolean flipped) {
this.flipped = flipped;
}
public void setUseFaceup(boolean useFaceup) {
this.useFaceup = useFaceup;
}
public void setFaceup(boolean faceup) {
this.faceup = faceup;
}
public void setTargetController(TargetController controller) {
this.controller = controller;
}
@ -192,12 +147,6 @@ public class FilterPermanent extends FilterObject<Permanent> {
this.another = another;
}
public boolean matchOwner(UUID testOwnerId) {
if (ownerId.size() > 0 && ownerId.contains(testOwnerId) == notOwner)
return false;
return true;
}
public boolean matchController(UUID testControllerId) {
if (controllerId.size() > 0 && controllerId.contains(testControllerId) == notController)
return false;

View file

@ -50,14 +50,6 @@ public class FilterCreatureOrPlayer extends FilterImpl<Object> implements Filter
this("player or creature");
}
public FilterCreatureOrPlayer(String name, UUID controllerId) {
super(name);
creatureFilter = new FilterCreaturePermanent();
playerFilter = new FilterPlayer();
creatureFilter.getControllerId().add(controllerId);
playerFilter.getPlayerId().add(controllerId);
}
public FilterCreatureOrPlayer(String name) {
super(name);
creatureFilter = new FilterCreaturePermanent();

View file

@ -50,14 +50,6 @@ public class FilterPermanentOrPlayer extends FilterImpl<Object> implements Filte
this("player or permanent");
}
public FilterPermanentOrPlayer(String name, UUID controllerId) {
super(name);
permanentFilter = new FilterPermanent();
playerFilter = new FilterPlayer();
permanentFilter.getControllerId().add(controllerId);
playerFilter.getPlayerId().add(controllerId);
}
public FilterPermanentOrPlayer(String name) {
super(name);
permanentFilter = new FilterPermanent();

View file

@ -43,10 +43,6 @@ public class FilterPermanentOrPlayerWithCounter extends FilterPermanentOrPlayer
this("player or permanent with counters on them");
}
public FilterPermanentOrPlayerWithCounter(String name, UUID controllerId) {
super(name, controllerId);
}
public FilterPermanentOrPlayerWithCounter(String name) {
super(name);
}

View file

@ -52,14 +52,6 @@ public class FilterSpellOrPermanent extends FilterImpl<Object> implements Filter
this("spell or permanent");
}
public FilterSpellOrPermanent(String name, UUID controllerId) {
super(name);
permanentFilter = new FilterPermanent();
spellFilter = new FilterSpell();
permanentFilter.getControllerId().add(controllerId);
spellFilter.getControllerId().add(controllerId);
}
public FilterSpellOrPermanent(String name) {
super(name);
permanentFilter = new FilterPermanent();