Merge pull request #3352 from drmDev/master

CardsInAnyLibraryCondition fixes #3310
This commit is contained in:
Derek M 2017-05-11 12:13:35 -04:00 committed by GitHub
commit da73d3b1cd

View file

@ -50,17 +50,19 @@ public class CardsInAnyLibraryCondition implements Condition {
@Override
public final boolean apply(Game game, Ability source) {
boolean libraryWith20OrFewerCards = false;
Player controller = game.getPlayer(source.getControllerId());
if (controller != null) {
for (UUID playerId : game.getState().getPlayersInRange(controller.getId(), game)) {
Player player = game.getPlayer(playerId);
if (player != null) {
return ComparisonType.compare(player.getLibrary().size(), type, value);
if (player != null && ComparisonType.compare(player.getLibrary().size(), type, value)) {
libraryWith20OrFewerCards = true;
break;
}
}
}
return false;
return libraryWith20OrFewerCards;
}
@Override