コード例 #1
0
 public LoseAbilityAllEffect(FilterPermanent filter, Ability ability, Duration duration) {
   super(duration, Layer.AbilityAddingRemovingEffects_6, SubLayer.NA, Outcome.AddAbility);
   this.filter = filter;
   this.ability = ability;
   staticText =
       filter.getMessage()
           + " lose "
           + ability.toString()
           + (duration.toString().isEmpty() ? "" : " " + duration.toString());
 }
コード例 #2
0
 @Override
 public String getText(Mode mode) {
   if (staticText != null && !staticText.isEmpty()) {
     return staticText;
   }
   StringBuilder sb = new StringBuilder();
   if (mode.getTargets().size() > 0) {
     sb.append("target ");
     sb.append(mode.getTargets().get(0).getMessage());
     sb.append(" becomes the color or colors of your choice");
     if (duration.toString().length() > 0) {
       sb.append(" ").append(duration.toString());
     }
   }
   return sb.toString();
 }
コード例 #3
0
  public UnblockableAllEffect(FilterPermanent filter, Duration duration) {
    super(duration);
    this.filter = filter;

    this.staticText = filter.getMessage() + " are unblockable";
    if (duration.equals(Duration.EndOfTurn)) {
      this.staticText += " this turn";
    }
  }
コード例 #4
0
 public GainAbilitySourceEffect(Ability ability, Duration duration, boolean onCard) {
   super(duration, Layer.AbilityAddingRemovingEffects_6, SubLayer.NA, Outcome.AddAbility);
   this.ability = ability;
   staticText = "{this} gains " + ability.getRule() + " " + duration.toString();
   this.onCard = onCard;
 }