small change to eternalize and embalm

This commit is contained in:
Evan Kranzler 2022-03-09 17:08:28 -05:00
parent 2cc4a06f7c
commit e67a4f26b4
2 changed files with 26 additions and 25 deletions

View file

@ -17,6 +17,8 @@ import mage.game.permanent.token.EmptyToken;
import mage.players.Player;
import mage.util.CardUtil;
import java.util.stream.Collectors;
/**
* @author LevelX2
*/
@ -29,7 +31,6 @@ public class EmbalmAbility extends ActivatedAbilityImpl {
addCost(new ExileSourceFromGraveCost());
this.rule = setRule(cost, card);
this.timing = TimingRule.SORCERY;
setRule(cost, card);
}
public EmbalmAbility(final EmbalmAbility ability) {
@ -48,14 +49,14 @@ public class EmbalmAbility extends ActivatedAbilityImpl {
}
private String setRule(Cost cost, Card card) {
StringBuilder sb = new StringBuilder("Embalm ").append(cost.getText());
sb.append(" <i>(").append(cost.getText());
sb.append(", Exile this card from your graveyard: Create a token that's a copy of it, except it's a white Zombie ");
for (SubType subtype : card.getSubtype()) {
sb.append(subtype).append(" ");
}
sb.append(" with no mana cost. Embalm only as a sorcery.)</i>");
return sb.toString();
return "Embalm " + cost.getText() + " <i>(" + cost.getText() + ", Exile this card from your graveyard: " +
"Create a token that's a copy of it, except it's a white Zombie " +
card.getSubtype()
.stream()
.map(SubType::getDescription)
.map(s -> s + ' ')
.collect(Collectors.joining()) +
"with no mana cost. Embalm only as a sorcery.)</i>";
}
}

View file

@ -17,24 +17,24 @@ import mage.game.permanent.token.EmptyToken;
import mage.players.Player;
import mage.util.CardUtil;
import java.util.stream.Collectors;
/**
* @author igoudt
*/
public class EternalizeAbility extends ActivatedAbilityImpl {
private String rule;
private final String rule;
public EternalizeAbility(Cost cost, Card card) {
super(Zone.GRAVEYARD, new EternalizeEffect(), cost);
addCost(new ExileSourceFromGraveCost());
this.rule = setRule(cost, card);
this.timing = TimingRule.SORCERY;
setRule(cost, card);
this(cost, card, setRule(cost, card));
}
public EternalizeAbility(Cost cost, Card card, String rule) {
this(cost, card);
super(Zone.GRAVEYARD, new EternalizeEffect(), cost);
addCost(new ExileSourceFromGraveCost());
this.rule = rule;
this.timing = TimingRule.SORCERY;
}
public EternalizeAbility(final EternalizeAbility ability) {
@ -52,15 +52,15 @@ public class EternalizeAbility extends ActivatedAbilityImpl {
return rule;
}
private String setRule(Cost cost, Card card) {
StringBuilder sb = new StringBuilder("Eternalize ").append(cost.getText());
sb.append(" <i>(").append(cost.getText());
sb.append(", Exile this card from your graveyard: Create a token that's a copy of it, except it's a 4/4 black Zombie ");
for (SubType subtype : card.getSubtype()) {
sb.append(subtype).append(" ");
}
sb.append(" with no mana cost. Eternalize only as a sorcery.)</i>");
return sb.toString();
private static String setRule(Cost cost, Card card) {
return "Eternalize " + cost.getText() + " <i>(" + cost.getText() + ", Exile this card from your graveyard: " +
"Create a token that's a copy of it, except it's a 4/4 black Zombie " +
card.getSubtype()
.stream()
.map(SubType::getDescription)
.map(s -> s + ' ')
.collect(Collectors.joining()) +
"with no mana cost. Eternalize only as a sorcery.)</i>";
}
}