@Override
public boolean applies(Permanent permanent, Ability source, Game game) {
Permanent attackingCreature = game.getPermanent(this.getTargetPointer().getFirst(game, source));
if (attackingCreature != null && attackingCreature.isAttacking()) {
if (!source.getAbilityType().equals(AbilityType.STATIC)) {
BlockedAttackerWatcher blockedAttackerWatcher = (BlockedAttackerWatcher) game.getState().getWatchers().get("BlockedAttackerWatcher");
if (blockedAttackerWatcher != null && blockedAttackerWatcher.creatureHasBlockedAttacker(attackingCreature, permanent)) {
// has already blocked this turn, so no need to do again
return false;
}
}
return permanent.canBlock(this.getTargetPointer().getFirst(game, source), game);