Small rewrite

This commit is contained in:
L_J 2018-02-13 19:56:46 +00:00 committed by GitHub
parent e7301e2c08
commit c37ecff939
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -49,11 +49,9 @@ public class AttackingSameNotBandedPredicate implements Predicate<Permanent> {
@Override
public boolean apply(Permanent input, Game game) {
CombatGroup combatGroup = game.getCombat().findGroup(input.getId());
if (combatGroup != null) {
return input.isAttacking()
return combatGroup != null
&& input.isAttacking()
&& input.getBandedCards().isEmpty()
&& combatGroup.getDefenderId().equals(defenderId);
}
return false;
}
}