コード例 #1
0
  public SpellCostReductionSourceEffect(
      ManaCosts<ManaCost> manaCostsToReduce, Condition condition) {
    super(Duration.WhileOnBattlefield, Outcome.Benefit, CostModificationType.REDUCE_COST);
    this.amount = 0;
    this.manaCostsToReduce = manaCostsToReduce;
    this.condition = condition;

    StringBuilder sb = new StringBuilder();
    sb.append("{this} costs ");
    for (String manaSymbol : manaCostsToReduce.getSymbols()) {
      sb.append(manaSymbol);
    }
    sb.append(" less to if ").append(this.condition.toString());
    this.staticText = sb.toString();
  }
コード例 #2
0
  public SpellsCostReductionControllerEffect(
      FilterCard filter, ManaCosts<ManaCost> manaCostsToReduce) {
    super(Duration.WhileOnBattlefield, Outcome.Benefit, CostModificationType.REDUCE_COST);
    this.filter = filter;
    this.amount = 0;
    this.manaCostsToReduce = manaCostsToReduce;
    this.upTo = false;

    StringBuilder sb = new StringBuilder();
    sb.append(filter.getMessage()).append(" you cast cost ");
    for (String manaSymbol : manaCostsToReduce.getSymbols()) {
      sb.append(manaSymbol);
    }
    sb.append(" less to cast. This effect reduces only the amount of colored mana you pay.");
    this.staticText = sb.toString();
  }