Package mage.game.permanent

Examples of mage.game.permanent.Permanent.damage()


            return true;
        }
        for (UUID targetId :this.getTargetPointer().getTargets(game, source)) {
            Permanent permanent = game.getPermanent(targetId);
            if (permanent != null) {
                permanent.damage(amount.calculate(game, source, this), source.getSourceId(), game, false, preventable);
            } else {
                Player player = game.getPlayer(targetId);
                if (player != null) {
                    player.damage(amount.calculate(game, source, this), source.getSourceId(), game, false, preventable);
                }
View Full Code Here


                return true;
            }
        } else {
            Permanent targetPermanent = game.getPermanent(event.getTargetId());
            if (targetPermanent != null) {
                targetPermanent.damage(damageEvent.getAmount()*2, damageEvent.getSourceId(), game, damageEvent.isCombatDamage(), damageEvent.isPreventable(), event.getAppliedEffects());
                return true;
            }
        }
        return false;
    }
View Full Code Here

                revealed.add(card);
                you.revealCards(sourceObject.getLogName(), revealed, game);
                if (card.getName().equals(cardName)) {
                    Permanent creature = game.getPermanent(targetPointer.getFirst(game, source));
                    if (creature != null) {
                        creature.damage(2, source.getSourceId(), game, false, true);
                        return true;
                    }
                    Player player = game.getPlayer(targetPointer.getFirst(game, source));
                    if (player != null) {
                        player.damage(2, source.getSourceId(), game, false, true);
View Full Code Here

        int damage = sourcePermanent.getPower().getValue();

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

                    targetId = targets.get(rnd.nextInt(targets.size()));
                    amount = rnd.nextInt(damage + 1);
                }
                Permanent permanent = game.getPermanent(targetId);
                if (permanent != null) {
                    permanent.damage(amount, sourceId, game, false, true);
                    remainingDamage -= amount;
                }
                else {
                    Player player = game.getPlayer(targetId);
                    if (player != null) {
View Full Code Here

    int amount = game.getBattlefield().count(filter, source.getControllerId(), game);
    if (amount > 0) {
      int damageDealt = amount;
      Permanent permanent = game.getPermanent(source.getFirstTarget());
      if (permanent != null) {
        damageDealt = permanent.damage(amount, source.getSourceId(), game, true, false);
      }
      else {
        Player player = game.getPlayer(source.getFirstTarget());
        if (player != null) {
          damageDealt = player.damage(amount, source.getSourceId(), game, false, true);
View Full Code Here

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

    @Override
    public boolean apply(Game game, Ability source) {
        Permanent permanent = game.getPermanent(source.getFirstTarget());
        if (permanent != null) {
            permanent.damage(3, source.getSourceId(), game, false, true);
        }

        permanent = game.getPermanent(source.getTargets().get(1).getFirstTarget());
        if (permanent != null) {
            permanent.damage(3, source.getSourceId(), game, false, true);
View Full Code Here

            permanent.damage(3, source.getSourceId(), game, false, true);
        }

        permanent = game.getPermanent(source.getTargets().get(1).getFirstTarget());
        if (permanent != null) {
            permanent.damage(3, source.getSourceId(), game, false, true);
        }
        return true;
    }
}
View Full Code Here

        Permanent creature2 = game.getPermanent(source.getFirstTarget());
        // 20110930 - 701.10
        if (creature1 != null && creature2 != null) {
            if (creature1.getCardType().contains(CardType.CREATURE) && creature2.getCardType().contains(CardType.CREATURE)) {
                creature1.damage(creature2.getPower().getValue(), creature2.getId(), game, false, true);
                creature2.damage(creature1.getPower().getValue(), creature1.getId(), game, false, true);
                return true;
            }
        }
        return 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.