Examples of damage()


Examples of mage.players.Player.damage()

        defender.damage(amount, attacker.getId(), game, true, true);
      }
    }
    else {
      Player defender = game.getPlayer(defenderId);
      defender.damage(amount, attacker.getId(), game, true, true);
    }
  }

  public boolean canBlock(Permanent blocker, Game game) {
    for (UUID attackerId: attackers) {
View Full Code Here

Examples of mage.players.Player.damage()

        permanent.damage(multiTarget.getTargetAmount(target), source.getId(), game, true, false);
      }
      else {
        Player player = game.getPlayer(target);
        if (player != null) {
          player.damage(multiTarget.getTargetAmount(target), source.getId(), game, false, true);
        }
      }
    }
    return true;
  }
View Full Code Here

Examples of mage.players.Player.damage()

  @Override
  public boolean apply(Game game, Ability source) {
    Player player = game.getPlayer(source.getControllerId());
    if (player != null) {
      player.damage(amount, source.getId(), game, false, preventable);
      return true;
    }
    return false;
  }
View Full Code Here

Examples of mage.players.Player.damage()

      permanent.damage(damageEvent.getAmount(), damageSource.getId(), game, damageEvent.isPreventable(), damageEvent.isCombatDamage());
      return true;
    }
    Player player = game.getPlayer(redirectTarget.getFirstTarget());
    if (player != null) {
      player.damage(damageEvent.getAmount(), damageSource.getId(), game, damageEvent.isCombatDamage(), damageEvent.isPreventable());
      return true;
    }
    return false;
  }
View Full Code Here

Examples of mage.players.Player.damage()

      permanent.damage(amount, source.getId(), game, true, false);
      return true;
    }
    Player player = game.getPlayer(source.getFirstTarget());
    if (player != null) {
      player.damage(amount, source.getId(), game, false, true);
      return true;
    }
    return false;
  }
View Full Code Here

Examples of mage.players.Player.damage()

      permanent.damage(amount, source.getId(), game, preventable, false);
      return true;
    }
    Player player = game.getPlayer(source.getFirstTarget());
    if (player != null) {
      player.damage(amount, source.getId(), game, false, preventable);
      return true;
    }
    return false;
  }
View Full Code Here

Examples of mage.players.Player.damage()

      Player player = game.getPlayer(source.getFirstTarget());
      if (player != null) {
        if (event.getAmount() >= this.amount) {
          int damage = event.getAmount();
          event.setAmount(event.getAmount() - amount);
          player.damage(amount, source.getSourceId(), game, false, true);
          this.used = true;
          game.fireEvent(GameEvent.getEvent(GameEvent.EventType.PREVENTED_DAMAGE, source.getControllerId(), source.getId(), source.getControllerId(), damage));
        } else {
          int damage = event.getAmount();
          event.setAmount(0);
View Full Code Here

Examples of mage.players.Player.damage()

          game.fireEvent(GameEvent.getEvent(GameEvent.EventType.PREVENTED_DAMAGE, source.getControllerId(), source.getId(), source.getControllerId(), damage));
        } else {
          int damage = event.getAmount();
          event.setAmount(0);
          amount -= damage;
          player.damage(damage, source.getSourceId(), game, false, true);
          game.fireEvent(GameEvent.getEvent(GameEvent.EventType.PREVENTED_DAMAGE, source.getControllerId(), source.getId(), source.getControllerId(), damage));
        }
      }
    }
    return false;
View Full Code Here

Examples of mage.players.Player.damage()

    Watcher watcher = game.getState().getWatchers().get(source.getControllerId(), "LandPlayed");
    Player player = game.getPlayer(source.getTargets().get(0).getFirstTarget());
    Permanent creature = game.getPermanent(source.getTargets().get(1).getFirstTarget());
    if (watcher != null && watcher.conditionMet()) {
      if (player != null) {
        player.damage(3, source.getId(), game, false, true);
      }
      if (creature != null) {
        creature.damage(3, source.getId(), game, true, false);
      }
    }
View Full Code Here

Examples of mage.players.Player.damage()

        creature.damage(3, source.getId(), game, true, false);
      }
    }
    else {
      if (player != null) {
        player.damage(1, source.getId(), game, false, true);
      }
      if (creature != null) {
        creature.damage(1, source.getId(), game, true, false);
      }
    }
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.