mirror of
https://github.com/correl/mage.git
synced 2024-12-24 11:50:45 +00:00
change text for cycling to this card, rather than referring the name
This commit is contained in:
parent
9ac70b868d
commit
d42b2a6d37
2 changed files with 17 additions and 4 deletions
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue