Examples of addPower()


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

  public boolean apply(Game game, Ability source) {
    int count = game.getPlayer(source.getControllerId()).getGraveyard().count(filter, game);
    if (count > 0) {
      Permanent target = (Permanent) game.getPermanent(source.getSourceId());
      if (target != null) {
        target.addPower(count);
        target.addToughness(count);
        return true;
      }
    }
    return false;
View Full Code Here

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

    public boolean apply(Game game, Ability source) {
      int count = game.getBattlefield().count(filter, source.getControllerId(), game) - 1;
      if (count > 0) {
        Permanent target = (Permanent) game.getPermanent(source.getSourceId());
        if (target != null) {
          target.addPower(count);
          target.addToughness(count);
          return true;
        }
      }
      return false;
View Full Code Here

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

      Permanent creature = game.getPermanent(enchantment.getAttachedTo());
      if (creature != null) {
        switch (layer) {
          case PTChangingEffects_7:
            if (sublayer == SubLayer.ModifyPT_7c) {
              creature.addPower(2);
              creature.addToughness(1);
            }
            break;
        }
        return true;
View Full Code Here

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

      Permanent creature = game.getPermanent(enchantment.getAttachedTo());
      if (creature != null) {
        switch (layer) {
          case PTChangingEffects_7:
            if (sublayer == SubLayer.ModifyPT_7c) {
              creature.addPower(1);
              creature.addToughness(2);
            }
            break;
        }
        return true;
View Full Code Here

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

      Permanent creature = game.getPermanent(enchantment.getAttachedTo());
      if (creature != null) {
        switch (layer) {
          case PTChangingEffects_7:
            if (sublayer == SubLayer.ModifyPT_7c) {
              creature.addPower(2);
              creature.addToughness(2);
            }
            break;
          case AbilityAddingRemovingEffects_6:
            if (sublayer == SubLayer.NA) {
View Full Code Here

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

            Permanent creature = game.getPermanent(enchantment.getAttachedTo());
            if (creature != null) {
                switch (layer) {
                    case PTChangingEffects_7:
                        if (sublayer == SubLayer.ModifyPT_7c) {
                            creature.addPower(2);
                            creature.addToughness(2);
                        }
                        break;
                    case AbilityAddingRemovingEffects_6:
                        if (sublayer == SubLayer.NA) {
View Full Code Here

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

    @Override
    public boolean apply(Game game, Ability source) {
        Permanent target = game.getPermanent(source.getSourceId());
        if (target != null) {
            target.addPower(power.calculate(game, source, this));
            target.addToughness(toughness.calculate(game, source, this));
            return true;
        }
        return false;
    }
View Full Code Here

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

        if (permanent != null && permanent.getPairedCard() != null) {
            Permanent paired = game.getPermanent(permanent.getPairedCard());
            if (paired != null) {
                permanent.addPower(power);
                permanent.addToughness(toughness);
                paired.addPower(power);
                paired.addToughness(toughness);
                return true;
            }
        }
        return false;
View Full Code Here

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

        if (this.affectedObjectsSet) {
            for (Iterator<UUID> it = objects.iterator(); it.hasNext();) { // filter may not be used again, because object can have changed filter relevant attributes but still geets boost
                UUID permanentId = it.next();
                Permanent permanent = game.getPermanent(permanentId);
                if (permanent != null) {
                    permanent.addPower(power.calculate(game, source, this));
                    permanent.addToughness(toughness.calculate(game, source, this));
                } else {
                    it.remove(); // no longer on the battlefield, remove reference to object
                }
            }
View Full Code Here

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

    public boolean apply(Game game, Ability source) {
        int affectedTargets = 0;
        for (UUID permanentId : targetPointer.getTargets(game, source)) {
            Permanent target = game.getPermanent(permanentId);
            if (target != null) {
                target.addPower(power.calculate(game, source, this));
                target.addToughness(toughness.calculate(game, source, this));
                affectedTargets++;
            }
        }
        return affectedTargets > 0;
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.