示例#1
0
  public StackAbilityView(Game game, StackAbility ability, String sourceName, CardView sourceCard) {
    this.id = ability.getId();
    this.mageObjectType = MageObjectType.ABILITY_STACK;
    this.abilityType = ability.getStackAbility().getAbilityType();
    this.sourceCard = sourceCard;
    this.sourceCard.setMageObjectType(mageObjectType);
    this.name = "Ability";
    this.loyalty = "";

    this.cardTypes = ability.getCardType();
    this.subTypes = ability.getSubtype();
    this.superTypes = ability.getSupertype();
    this.color = ability.getColor(game);
    this.manaCost = ability.getManaCost().getSymbols();
    this.cardTypes = ability.getCardType();
    this.subTypes = ability.getSubtype();
    this.superTypes = ability.getSupertype();
    this.color = ability.getColor(game);
    this.manaCost = ability.getManaCost().getSymbols();
    this.power = ability.getPower().toString();
    this.toughness = ability.getToughness().toString();
    String nameToShow;
    if (sourceCard.isFaceDown()) {
      CardView tmpSourceCard = this.getSourceCard();
      tmpSourceCard.displayName = "Face Down";
      tmpSourceCard.superTypes.clear();
      tmpSourceCard.subTypes.clear();
      tmpSourceCard.cardTypes.clear();
      tmpSourceCard.cardTypes.add(CardType.CREATURE);
      tmpSourceCard.manaCost.clear();
      tmpSourceCard.power = "2";
      tmpSourceCard.toughness = "2";
      nameToShow = "creature without name";
    } else {
      nameToShow = sourceName;
    }
    this.rules = new ArrayList<>();
    rules.add(ability.getRule(nameToShow));
    this.counters = sourceCard.getCounters();

    updateTargets(game, ability);
  }
示例#2
0
  public StackAbilityView(Game game, StackAbility ability, String sourceName, CardView sourceCard) {
    this.id = ability.getId();
    this.mageObjectType = MageObjectType.ABILITY_STACK;
    this.abilityType = ability.getStackAbility().getAbilityType();
    this.sourceCard = sourceCard;
    this.sourceCard.setMageObjectType(mageObjectType);
    this.name = "Ability";
    this.rules = new ArrayList<>();
    rules.add(ability.getRule(sourceName));
    this.power = ability.getPower().toString();
    this.toughness = ability.getToughness().toString();
    this.loyalty = "";
    this.cardTypes = ability.getCardType();
    this.subTypes = ability.getSubtype();
    this.superTypes = ability.getSupertype();
    this.color = ability.getColor();
    this.manaCost = ability.getManaCost().getSymbols();
    this.counters = sourceCard.getCounters();

    updateTargets(game, ability);
  }