Package mage.game.combat

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


  @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
View Full Code Here


      else {
        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

    @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

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.