@Override public boolean mustAttack(Game game) { if (conditionState) { return effect.mustAttack(game); } else if (otherwiseEffect != null) { return otherwiseEffect.mustAttack(game); } return false; }
if (effect.mustAttack(game)) { mustAttack = true; for (Ability ability : entry.getValue()) {
private void removeAttackerIfPossible(Game game, Permanent attacker) { for (Map.Entry entry : game.getContinuousEffects().getApplicableRequirementEffects(attacker, false, game).entrySet()) { RequirementEffect effect = (RequirementEffect) entry.getKey(); if (effect.mustAttack(game)) { if (game.getCombat().getMaxAttackers() >= game.getCombat().getCreaturesForcedToAttack().size() && game.getCombat().getDefenders().size() == 1) { return; // we can't change creatures forced to attack if only one possible defender exists and all forced creatures can attack } } } game.getCombat().removeAttacker(attacker.getId(), game); }
for (Map.Entry<RequirementEffect, Set<Ability>> entry : game.getContinuousEffects().getApplicableRequirementEffects(permanent, false, game).entrySet()) { RequirementEffect effect2 = entry.getKey(); if (effect2.mustAttack(game)) { hasToAttack = true;