Added required flag to TargetCreaturePermanent constructor

This commit is contained in:
magenoxx 2012-05-11 12:02:39 +04:00
parent eae50ffd83
commit d819774cc6

View file

@ -41,6 +41,11 @@ public class TargetCreaturePermanent<T extends TargetCreaturePermanent<T>> exten
this(1, 1, new FilterCreaturePermanent(), false);
}
public TargetCreaturePermanent(boolean required) {
this();
setRequired(required);
}
public TargetCreaturePermanent(FilterCreaturePermanent filter) {
this(1, 1, filter, false);
}
@ -49,6 +54,11 @@ public class TargetCreaturePermanent<T extends TargetCreaturePermanent<T>> exten
this(numTargets, numTargets, new FilterCreaturePermanent(), false);
}
public TargetCreaturePermanent(int numTargets, boolean required) {
this(numTargets);
setRequired(required);
}
public TargetCreaturePermanent(int minNumTargets, int maxNumTargets) {
this(minNumTargets, maxNumTargets, new FilterCreaturePermanent(), false);
}