Examples of addBlocker()


Examples of mage.game.combat.CombatGroup.addBlocker()

  @Override
  public void declareBlocker(UUID blockerId, UUID attackerId, Game game) {
    Permanent blocker = game.getPermanent(blockerId);
    CombatGroup group = game.getCombat().findGroup(attackerId);
    if (blocker != null && group != null && group.canBlock(blocker, game)) {
      group.addBlocker(blockerId, playerId, game);
    }
  }

  @Override
  public boolean searchLibrary(TargetCardInLibrary target, Game game) {
View Full Code Here

Examples of mage.game.combat.CombatGroup.addBlocker()

        defender = game.getPlayer(group.getDefenderId());
      }
      if (defender != null) {
        for (Permanent creature: game.getBattlefield().getAllActivePermanents(FilterCreaturePermanent.getDefault(), defender.getId())) {
          if (group.canBlock(creature, game)) {
            group.addBlocker(creature.getId(), creature.getControllerId(), game);
          }
        }
        return true;
      }
    }
View Full Code Here

Examples of mage.game.combat.CombatGroup.addBlocker()

    @Override
    public void declareBlocker(UUID defenderId, UUID blockerId, UUID attackerId, Game game) {
        Permanent blocker = game.getPermanent(blockerId);
        CombatGroup group = game.getCombat().findGroup(attackerId);
        if (blocker != null && group != null && group.canBlock(blocker, game)) {
            group.addBlocker(blockerId, playerId, game);
            game.getCombat().addBlockingGroup(blockerId, attackerId, playerId, game);
        } else {
            if (this.isHuman()) {
                game.informPlayer(this, "You can't block this creature.");
            }
View Full Code Here

Examples of mage.game.combat.CombatGroup.addBlocker()

                // even if the block couldn't legally be declared (for example, if that creature
                // enters the battlefield tapped, or it can't block, or the attacking creature
                // has protection from it)
                CombatGroup combatGroup = game.getState().getCombat().findGroup(attackingCreature.getId());
                if (combatGroup != null) {
                    combatGroup.addBlocker(catToken.getId(), source.getControllerId(), game);
                    game.getCombat().addBlockingGroup(catToken.getId(),attackingCreature.getId() , source.getControllerId(), game);   
                }
            }
            return true;
        }   
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.