Examples of Permanent


Examples of mage.client.cards.Permanent

    if (cardPlugin != null) {
      mageActionCallback.refreshSession();
      mageActionCallback.setCardPreviewComponent(bigCard);
      return cardPlugin.getMagePermanent(card, dimension, gameId, mageActionCallback);
    } else {
      return new Permanent(card, bigCard, Config.dimensions, gameId);
    }
  }
View Full Code Here

Examples of mage.game.permanent.Permanent

  }

  @Override
  public boolean apply(Game game, Ability source) {
    Card card = game.getCard(source.getFirstTarget());
    Permanent permanent = game.getPermanent(source.getSourceId());
    permanent.setName(card.getName());
    permanent.getColor().setColor(card.getColor());
    permanent.getManaCost().clear();
    permanent.getManaCost().add(card.getManaCost());
    permanent.getCardType().clear();
    for (CardType type: card.getCardType()) {
      permanent.getCardType().add(type);
    }
    permanent.getSubtype().clear();
    for (String type: card.getSubtype()) {
      permanent.getSubtype().add(type);
    }
    permanent.getSupertype().clear();
    for (String type: card.getSupertype()) {
      permanent.getSupertype().add(type);
    }
    permanent.setExpansionSetCode(card.getExpansionSetCode());
    permanent.getAbilities().clear();
    for (Ability ability: card.getAbilities()) {
      permanent.addAbility(ability);
    }
    permanent.getPower().setValue(card.getPower().getValue());
    permanent.getToughness().setValue(card.getToughness().getValue());
    permanent.getLoyalty().setValue(card.getLoyalty().getValue());
    permanent.setArt(card.getArt());
   
    return true;

  }
View Full Code Here

Examples of mage.game.permanent.Permanent

    super(cost);
  }

  @Override
  public boolean pay(Game game, UUID sourceId, UUID controllerId, boolean noMana) {
    Permanent permanent = game.getPermanent(sourceId);
    if (permanent != null) {
      paid = permanent.tap(game);
    }
    return paid;
  }
View Full Code Here

Examples of mage.game.permanent.Permanent

    return paid;
  }

  @Override
  public boolean canPay(UUID sourceId, UUID controllerId, Game game) {
    Permanent permanent = game.getPermanent(sourceId);
    if (permanent != null) {
      return !permanent.isTapped() && permanent.canTap();
    }
    return false;
  }
View Full Code Here

Examples of mage.game.permanent.Permanent

    this.amount = cost.amount;
  }

  @Override
  public boolean canPay(UUID sourceId, UUID controllerId, Game game) {
    Permanent planeswalker = game.getPermanent(sourceId);
    if (planeswalker.getLoyalty().getValue() + amount >= 0 && !planeswalker.isLoyaltyUsed())
      return true;
    return false;
  }
View Full Code Here

Examples of mage.game.permanent.Permanent

    return false;
  }

  @Override
  public boolean pay(Game game, UUID sourceId, UUID controllerId, boolean noMana) {
    Permanent planeswalker = game.getPermanent(sourceId);
    if (planeswalker.getLoyalty().getValue() + amount >= 0 && !planeswalker.isLoyaltyUsed()) {
      planeswalker.getLoyalty().boostValue(amount);
      planeswalker.setLoyaltyUsed(true);
      this.paid = true;
    }
    return paid;
  }
View Full Code Here

Examples of mage.game.permanent.Permanent

    return new BoostTargetEffect(this);
  }

  @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

    super(cost);
  }

  @Override
  public boolean pay(Game game, UUID sourceId, UUID controllerId, boolean noMana) {
    Permanent permanent = game.getPermanent(sourceId);
    if (permanent != null) {
      paid = permanent.sacrifice(sourceId, game);
    }
    return paid;
  }
View Full Code Here

Examples of mage.game.permanent.Permanent

    return paid;
  }

  @Override
  public boolean canPay(UUID sourceId, UUID controllerId, Game game) {
    Permanent permanent = game.getPermanent(sourceId);
    if (permanent != null) {
      return true;
    }
    return false;
  }
View Full Code Here

Examples of mage.game.permanent.Permanent

    return new DestroySourceEffect(this);
  }

  @Override
  public boolean apply(Game game, Ability source) {
    Permanent permanent = game.getPermanent(source.getSourceId());
    if (permanent != null) {
      permanent.destroy(source.getId(), game, noRegen);
      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.