mirror of
https://github.com/magefree/mage.git
synced 2025-12-20 02:30:08 -08:00
small text generation improvement
This commit is contained in:
parent
a223b3f89c
commit
519a9e0c49
3 changed files with 6 additions and 2 deletions
|
|
@ -42,7 +42,7 @@ public final class AyarasOathsworn extends CardImpl {
|
||||||
Ability ability = new DealsCombatDamageToAPlayerTriggeredAbility(
|
Ability ability = new DealsCombatDamageToAPlayerTriggeredAbility(
|
||||||
new AddCountersSourceEffect(CounterType.P1P1.createInstance())
|
new AddCountersSourceEffect(CounterType.P1P1.createInstance())
|
||||||
.setText("put a +1/+1 counter on it"), false
|
.setText("put a +1/+1 counter on it"), false
|
||||||
).withInterveningIf(condition1);
|
).withInterveningIf(condition1).withRuleTextReplacement(true);
|
||||||
ability.addEffect(new ConditionalOneShotEffect(
|
ability.addEffect(new ConditionalOneShotEffect(
|
||||||
new SearchLibraryPutInHandEffect(new TargetCardInLibrary(), false),
|
new SearchLibraryPutInHandEffect(new TargetCardInLibrary(), false),
|
||||||
condition2, "Then if it has exactly four +1/+1 counters on it, " +
|
condition2, "Then if it has exactly four +1/+1 counters on it, " +
|
||||||
|
|
|
||||||
|
|
@ -37,7 +37,8 @@ public final class KrondTheDawnClad extends CardImpl {
|
||||||
this.addAbility(VigilanceAbility.getInstance());
|
this.addAbility(VigilanceAbility.getInstance());
|
||||||
|
|
||||||
// Whenever Krond the Dawn-Clad attacks, if it's enchanted, exile target permanent.
|
// Whenever Krond the Dawn-Clad attacks, if it's enchanted, exile target permanent.
|
||||||
Ability ability = new AttacksTriggeredAbility(new ExileTargetEffect(), false).withInterveningIf(condition);
|
Ability ability = new AttacksTriggeredAbility(new ExileTargetEffect(), false)
|
||||||
|
.withInterveningIf(condition).withRuleTextReplacement(true);
|
||||||
ability.addTarget(new TargetPermanent());
|
ability.addTarget(new TargetPermanent());
|
||||||
this.addAbility(ability);
|
this.addAbility(ability);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -302,6 +302,9 @@ public abstract class TriggeredAbilityImpl extends AbilityImpl implements Trigge
|
||||||
if (!conditionText.isEmpty()) { // e.g. CaseSolveAbility
|
if (!conditionText.isEmpty()) { // e.g. CaseSolveAbility
|
||||||
if (replaceRuleText && triggerPhrase != null && triggerPhrase.contains("{this}")) {
|
if (replaceRuleText && triggerPhrase != null && triggerPhrase.contains("{this}")) {
|
||||||
conditionText = conditionText.replace("{this}", "it");
|
conditionText = conditionText.replace("{this}", "it");
|
||||||
|
if (conditionText.startsWith("it is ")) {
|
||||||
|
conditionText = conditionText.replace("it is ", "it's ");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (!conditionText.startsWith("if ")) {
|
if (!conditionText.startsWith("if ")) {
|
||||||
sb.append("if ");
|
sb.append("if ");
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue