fix Discover text

This commit is contained in:
xenohedron 2023-10-29 02:44:09 -04:00
parent 3abdb72910
commit e802db32d3
2 changed files with 9 additions and 4 deletions

View file

@ -29,9 +29,14 @@ public class ActivateAsSorceryActivatedAbility extends ActivatedAbilityImpl {
@Override
public String getRule() {
if (mayActivate == TargetController.OPPONENT) {
return super.getRule() + " Only your opponents may activate this ability and only as a sorcery.";
String superRule = super.getRule();
String newText = (mayActivate == TargetController.OPPONENT
? " Only your opponents may activate this ability and only as a sorcery."
: " Activate only as a sorcery.");
if (superRule.endsWith("</i>")) {
return superRule.replaceFirst(" <i>", newText + " <i>");
} else {
return superRule + newText;
}
return super.getRule() + " Activate only as a sorcery.";
}
}

View file

@ -25,7 +25,7 @@ public class DiscoverEffect extends OneShotEffect {
public DiscoverEffect(int amount) {
super(Outcome.Benefit);
this.amount = amount;
staticText = "Discover " + amount + " <i>(Exile cards from the top of your library " +
staticText = "discover " + amount + ". <i>(Exile cards from the top of your library " +
"until you exile a nonland card with mana value " + amount + " or less. " +
"Cast it without paying its mana cost or put it into your hand. " +
"Put the rest on the bottom in a random order.)</i>";