Exemplo n.º 1
0
  @Override
  public String getText(Mode mode) {
    if (this.staticText != null && !this.staticText.isEmpty()) {
      return staticText;
    }
    StringBuilder sb = new StringBuilder();
    Target target = mode.getTargets().get(0);
    sb.append("Put ");
    if (target.getMaxNumberOfTargets() == 0) {
      sb.append("any number of ");
    } else {
      if (target.getMaxNumberOfTargets() != 1 || target.getNumberOfTargets() != 1) {
        if (target.getMaxNumberOfTargets() > target.getNumberOfTargets()) {
          sb.append("up to ");
        }
        sb.append(CardUtil.numberToText(target.getMaxNumberOfTargets())).append(" ");
      }
    }
    sb.append("target ").append(mode.getTargets().get(0).getTargetName()).append(" on ");
    sb.append(onTop ? "top" : "the bottom").append(" of its owner's library");

    return sb.toString();
  }
Exemplo n.º 2
0
 @Override
 public boolean apply(Game game, Ability source, Ability abilityToModify) {
   // Target target = abilityToModify.getTargets().get(0);
   for (Target target : abilityToModify.getTargets()) {
     if (target.getMaxNumberOfTargets() == Integer.MAX_VALUE) {
       int additionalTargets = target.getTargets().size() - 1;
       for (int i = 0; i < additionalTargets; i++) {
         abilityToModify.getManaCostsToPay().add(striveCosts.copy());
       }
       return true;
     }
   }
   return false;
 }