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

View file

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