Examples of addToughness()


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

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

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

    Permanent enchantment = game.getPermanent(source.getSourceId());
    if (enchantment != null && enchantment.getAttachedTo() != null) {
      Permanent creature = game.getPermanent(enchantment.getAttachedTo());
      if (creature != null) {
        creature.addPower(power);
        creature.addToughness(toughness);
      }
    }
    return true;
  }
View Full Code Here

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

    Permanent equipment = game.getPermanent(source.getSourceId());
    if (equipment != null && equipment.getAttachedTo() != null) {
      Permanent creature = game.getPermanent(equipment.getAttachedTo());
      if (creature != null) {
        creature.addPower(power);
        creature.addToughness(toughness);
      }
    }
    return true;
  }
View Full Code Here

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

  @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;
  }

  @Override
View Full Code Here

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

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

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

        switch (layer) {
          case PTChangingEffects_7:
            if (sublayer == SubLayer.ModifyPT_7c) {
              int amount = game.getBattlefield().countAll(filter, source.getControllerId());
              creature.addPower(amount);
              creature.addToughness(amount);
            }
            break;
          case AbilityAddingRemovingEffects_6:
            if (sublayer == SubLayer.NA) {
              creature.addAbility(FlyingAbility.getInstance());
View Full Code Here

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

    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.addToughness()

    if (creature != null) {
      switch (layer) {
        case PTChangingEffects_7:
          if (sublayer == SubLayer.ModifyPT_7c) {
            creature.addPower(3);
            creature.addToughness(3);
          }
          break;
      }
      return true;
    }
View Full Code Here

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

        switch (layer) {
          case PTChangingEffects_7:
            if (sublayer == SubLayer.ModifyPT_7c) {
              int amount = game.getBattlefield().countAll(filter, source.getControllerId());
              creature.addPower(-amount);
              creature.addToughness(-amount);
            }
            break;
        }
        return true;
      }
View Full Code Here

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

    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
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.