* Target - Setting required to false if minNumberOfTargets = 0. Fixed bug with Kruphix’s Insight.

This commit is contained in:
LevelX2 2014-06-25 01:32:01 +02:00
parent a5cba8eccb
commit 5ae1f6306b
2 changed files with 4 additions and 3 deletions

View file

@ -61,9 +61,7 @@ public class TargetCard extends TargetObject {
}
public TargetCard(int minNumTargets, int maxNumTargets, Zone zone, FilterCard filter) {
this.minNumberOfTargets = minNumTargets;
this.maxNumberOfTargets = maxNumTargets;
this.zone = zone;
super(minNumTargets, maxNumTargets, zone, false);
this.filter = filter;
this.targetName = filter.getMessage();
}

View file

@ -58,6 +58,9 @@ public abstract class TargetObject extends TargetImpl {
public TargetObject(int minNumTargets, int maxNumTargets, Zone zone, boolean notTarget) {
this.minNumberOfTargets = minNumTargets;
this.maxNumberOfTargets = maxNumTargets;
if (minNumTargets == 0) {
setRequired(false);
}
this.zone = zone;
this.targetName = "card";
this.notTarget = notTarget;