Fixed issues revealed by EquipAbilityTest

This commit is contained in:
North 2012-07-17 20:36:28 +03:00
parent b7f57c8a23
commit 5dbc3a1c07
4 changed files with 4 additions and 4 deletions

View file

@ -51,7 +51,7 @@ public class FilterPermanent extends FilterObject<Permanent> {
public FilterPermanent(final FilterPermanent filter) {
super(filter);
this.extraPredicates = new ArrayList<ObjectPlayerPredicate<ObjectPlayer<Permanent>>>(extraPredicates);
this.extraPredicates = new ArrayList<ObjectPlayerPredicate<ObjectPlayer<Permanent>>>(filter.extraPredicates);
}
public FilterPermanent(String name) {

View file

@ -56,7 +56,7 @@ public class FilterStackObject<T extends StackObject> extends FilterObject<T> {
public FilterStackObject(final FilterStackObject filter) {
super(filter);
this.extraPredicates = new ArrayList<ObjectPlayerPredicate<ObjectPlayer<Permanent>>>(extraPredicates);
this.extraPredicates = new ArrayList<ObjectPlayerPredicate<ObjectPlayer<Permanent>>>(filter.extraPredicates);
}
public boolean match(T stackObject, UUID playerId, Game game) {

View file

@ -70,7 +70,7 @@ public class ControllerPredicate implements ObjectPlayerPredicate<ObjectPlayer<P
break;
}
return true;
return false;
}
@Override

View file

@ -75,7 +75,7 @@ public class TargetPermanent<T extends TargetPermanent<T>> extends TargetObject<
@Override
public boolean canTarget(UUID id, Ability source, Game game) {
return canTarget(null, id, source, game);
return canTarget(source.getControllerId(), id, source, game);
}
public boolean canTarget(UUID controllerId, UUID id, Ability source, Game game) {