improve text generation

This commit is contained in:
xenohedron 2023-10-15 23:43:10 -04:00
parent 793d39890b
commit b3bc6b94aa
3 changed files with 3 additions and 3 deletions

View file

@ -26,7 +26,7 @@ public final class Mossdog extends CardImpl {
// Whenever Mossdog becomes the target of a spell or ability an opponent controls, put a +1/+1 counter on Mossdog.
this.addAbility(new BecomesTargetSourceTriggeredAbility(new AddCountersSourceEffect(CounterType.P1P1.createInstance()),
StaticFilters.FILTER_SPELL_OR_ABILITY_OPPONENTS));
StaticFilters.FILTER_SPELL_OR_ABILITY_OPPONENTS).withRuleTextReplacement(false));
}
private Mossdog(final Mossdog card) {

View file

@ -39,7 +39,7 @@ public final class RotisserieElemental extends CardImpl {
Ability ability = new DealsCombatDamageToAPlayerTriggeredAbility(
new AddCountersSourceEffect(CounterType.SKEWER.createInstance()),
false
);
).withRuleTextReplacement(false);
ability.addEffect(new DoIfCostPaid(
new ExileTopXMayPlayUntilEndOfTurnEffect(xValue)
.setText("exile the top X cards of your library, where X is the number of skewer counters "

View file

@ -221,7 +221,7 @@ public abstract class TriggeredAbilityImpl extends AbilityImpl implements Trigge
}
}
if (replaceRuleText && triggerPhrase != null) {
superRule = superRule.replaceFirst("^(you may sacrifice |sacrifice )?\\{this\\}", "$1it");
superRule = superRule.replaceFirst("^((?:you may )?sacrifice |put a [^ ]+ counter on )?\\{this\\}", "$1it");
}
sb.append(superRule);
if (triggersOnceEachTurn) {