mirror of
https://github.com/correl/mage.git
synced 2024-12-25 03:00:15 +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;
|
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() {
|
||||||
|
|
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue