Examples of addPower()


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) {
        Permanent enchantment = game.getPermanent(source.getSourceId());
        if (enchantment != null && enchantment.getAttachedTo() != null) {
            Permanent creature = game.getPermanent(enchantment.getAttachedTo());
            if (creature != null) {
                creature.addPower(power.calculate(game, source, this));
                creature.addToughness(toughness.calculate(game, source, this));
            }
        }
        return true;
    }
View Full Code Here

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

    @Override
    public boolean applyEffect(Game game, Ability source) {
        Permanent permanent = game.getPermanent(source.getSourceId());
        if (permanent != null) {
            permanent.addPower(power);
            permanent.addToughness(toughness);
        }
        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()

      Player player = game.getPlayer(creature.getControllerId());
      if (player != null && player.getLife() >= 30) {
        switch (layer) {
          case PTChangingEffects_7:
            if (sublayer == SubLayer.ModifyPT_7c) {
              creature.addPower(5);
              creature.addToughness(5);
            }
            break;
          case AbilityAddingRemovingEffects_6:
            if (sublayer == SubLayer.NA) {
View Full Code Here

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

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

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

    public boolean apply(Game game, Ability source) {
        Permanent equipment = game.getPermanent(source.getSourceId());
        if (equipment != null && equipment.getAttachedTo() != null) {
            Permanent creature = game.getPermanent(equipment.getAttachedTo());
            if (creature != null) {
                creature.addPower(creature.getManaCost().convertedManaCost());
                creature.addToughness(creature.getManaCost().convertedManaCost());
            }
        }
        return true;
    }
View Full Code Here

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

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

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

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

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

    public boolean apply(Game game, Ability source) {
        Permanent permanent = game.getPermanent(source.getSourceId());
        if (permanent != null && !permanent.getImprinted().isEmpty()) {
            Card card = game.getCard(permanent.getImprinted().get(0));
            if (card != null) {
                permanent.addPower(card.getPower().getValue());
                permanent.addToughness(card.getToughness().getValue());
                return true;
            }
            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.