fix a few text discrepancies

This commit is contained in:
xenohedron 2024-09-13 21:37:33 -04:00
parent d5b23705c7
commit df80856e79
8 changed files with 13 additions and 8 deletions

View file

@ -19,6 +19,7 @@ public class EntersBattlefieldOrAttacksSourceTriggeredAbility extends TriggeredA
public EntersBattlefieldOrAttacksSourceTriggeredAbility(Effect effect, boolean optional) {
super(Zone.BATTLEFIELD, effect, optional);
setTriggerPhrase("Whenever {this} enters or attacks, ");
this.withRuleTextReplacement(true);
}
protected EntersBattlefieldOrAttacksSourceTriggeredAbility(final EntersBattlefieldOrAttacksSourceTriggeredAbility ability) {

View file

@ -51,7 +51,10 @@ public class AlternativeCostImpl<T extends AlternativeCostImpl<T>> extends Costs
if (onlyCost) {
return getText();
} else {
return (name != null ? name : "") + (isMana ? " " : "&mdash;") + getText() + (isMana ? "" : '.');
String costName = (name != null ? name : "");
String delimiter = (!isMana || (!costName.isEmpty() && costName.substring(costName.length() - 1).matches("\\d")))
? "&mdash;" : " ";
return costName + delimiter + getText() + (isMana ? "" : '.');
}
}