change text for cycling to this card, rather than referring the name

This commit is contained in:
igoudt 2017-06-04 17:12:08 +02:00
parent 9ac70b868d
commit d42b2a6d37
2 changed files with 17 additions and 4 deletions

View file

@ -28,7 +28,6 @@
package mage.abilities.costs.common;
import java.util.UUID;
import mage.abilities.Ability;
import mage.abilities.costs.Cost;
import mage.abilities.costs.CostImpl;
@ -36,16 +35,25 @@ import mage.cards.Card;
import mage.game.Game;
import mage.players.Player;
import java.util.UUID;
/**
*
* @author BetaSteward_at_googlemail.com
*/
public class DiscardSourceCost extends CostImpl {
private boolean nameCard = true;
public DiscardSourceCost() {}
public DiscardSourceCost(boolean nameCard){
this.nameCard = nameCard;
}
public DiscardSourceCost(DiscardSourceCost cost) {
super(cost);
nameCard = cost.nameCard;
}
@Override
@ -67,7 +75,12 @@ public class DiscardSourceCost extends CostImpl {
@Override
public String getText() {
return "Discard {this}";
if(nameCard) {
return "Discard {this}";
}
else{
return "Discard this card";
}
}
@Override

View file

@ -48,14 +48,14 @@ public class CyclingAbility extends ActivatedAbilityImpl {
public CyclingAbility(Cost cost) {
super(Zone.HAND, new DrawCardSourceControllerEffect(1), cost);
this.addCost(new DiscardSourceCost());
this.addCost(new DiscardSourceCost(false));
this.cost = cost;
this.text = "Cycling";
}
public CyclingAbility(Cost cost, FilterCard filter, String text) {
super(Zone.HAND, new SearchLibraryPutInHandEffect(new TargetCardInLibrary(filter), true, true), cost);
this.addCost(new DiscardSourceCost());
this.addCost(new DiscardSourceCost(false));
this.cost = cost;
this.text = text;
}