Text fixes [CSP] (#10599)

* fix text: ExileFromHandCost

* fix text: CumulativeUpkeepAbility

* text fixes: individual CSP cards

* text fix followups
This commit is contained in:
xenohedron 2023-07-09 02:14:42 -04:00 committed by GitHub
parent 79d97d2012
commit b86014a29c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
16 changed files with 44 additions and 50 deletions

View file

@ -37,7 +37,8 @@ public class ExileFromHandCost extends CostImpl {
*/
public ExileFromHandCost(TargetCardInHand target, boolean setXFromCMC) {
this.addTarget(target);
this.text = "exile " + target.getDescription();
this.text = "exile " + target.getDescription() +
(target.getDescription().contains("from your hand") ? "" : " from your hand");
this.setXFromCMC = setXFromCMC;
}

View file

@ -18,6 +18,7 @@ import mage.game.events.GameEvent.EventType;
import mage.game.events.ManaEvent;
import mage.game.permanent.Permanent;
import mage.players.Player;
import mage.util.CardUtil;
/**
*
@ -25,7 +26,7 @@ import mage.players.Player;
*/
public class CumulativeUpkeepAbility extends BeginningOfUpkeepTriggeredAbility {
private Cost cumulativeCost;
private final Cost cumulativeCost;
public CumulativeUpkeepAbility(Cost cumulativeCost) {
super(new AddCountersSourceEffect(CounterType.AGE.createInstance()), TargetController.YOU, false);
@ -46,12 +47,14 @@ public class CumulativeUpkeepAbility extends BeginningOfUpkeepTriggeredAbility {
@Override
public String getRule() {
StringBuilder sb = new StringBuilder("Cumulative upkeep");
if (!(cumulativeCost instanceof ManaCost || cumulativeCost instanceof OrCost)) {
sb.append("—");
} else {
if (cumulativeCost instanceof ManaCost || cumulativeCost instanceof OrCost) {
sb.append(' ');
sb.append(cumulativeCost.getText());
} else {
sb.append("—");
sb.append(CardUtil.getTextWithFirstCharUpperCase(cumulativeCost.getText()));
sb.append(".");
}
sb.append(cumulativeCost.getText());
return sb.toString();
}
}