[VOW] some more text fixes

This commit is contained in:
Evan Kranzler 2021-11-12 19:58:50 -05:00
parent 9ee8ef6eab
commit 6b2fc867f4
6 changed files with 26 additions and 15 deletions

View file

@ -58,6 +58,6 @@ enum ChangeOfFortuneValue implements DynamicValue {
@Override
public String toString() {
return "X";
return "1";
}
}

View file

@ -60,7 +60,7 @@ public final class GloriousSunrise extends CardImpl {
// Target land gains "{T}: Add {G}{G}{G}" until end of turn.
Mode mode = new Mode(new GainAbilityTargetEffect(new SimpleManaAbility(
Zone.BATTLEFIELD, Mana.GreenMana(3), new TapSourceCost()
), Duration.EndOfTurn));
), Duration.EndOfTurn).setText("target land gains \"{T}: Add {G}{G}{G}\" until end of turn"));
mode.addTarget(new TargetLandPermanent());
ability.addMode(mode);

View file

@ -41,7 +41,7 @@ public final class NurturingPresence extends CardImpl {
new EntersBattlefieldControlledTriggeredAbility(
new BoostSourceEffect(1, 1, Duration.EndOfTurn)
.setText("this creature gets +1/+1 until end of turn"),
StaticFilters.FILTER_PERMANENT_CREATURE
StaticFilters.FILTER_PERMANENT_CREATURE_A
), AttachmentType.AURA
)));

View file

@ -48,7 +48,7 @@ public final class SupernaturalRescue extends CardImpl {
).setRuleAtTheTop(true).addHint(hint));
// When you cast this spell, tap up to two target creatures you don't control.
Ability ability = new CastSourceTriggeredAbility(new TapTargetEffect());
Ability ability = new CastSourceTriggeredAbility(new TapTargetEffect().setText("tap up to two target creatures you don't control"));
ability.addTarget(new TargetPermanent(0, 2, StaticFilters.FILTER_CREATURE_YOU_DONT_CONTROL));
this.addAbility(ability);

View file

@ -73,6 +73,7 @@ public class Effects extends ArrayList<Effect> {
} else if (lastRule != null && lastRule.length() > 3) {
//check if lastRule already has appropriate punctuation, if so, add a space.
if (lastRule.endsWith(".\"")
|| lastRule.endsWith(".]")
|| lastRule.endsWith(".)")
|| lastRule.endsWith(".)</i>")
|| lastRule.endsWith(".")) {
@ -105,6 +106,7 @@ public class Effects extends ArrayList<Effect> {
if (lastRule != null && lastRule.length() > 3
&& !lastRule.endsWith(".")
&& !lastRule.endsWith("\"")
&& !lastRule.endsWith(".]")
&& !lastRule.startsWith("<b>Level ")
&& !lastRule.endsWith(".)")
&& !lastRule.endsWith("</i>")) {

View file

@ -1,14 +1,15 @@
package mage.abilities.effects.common.continuous;
import mage.abilities.Ability;
import mage.abilities.Mode;
import mage.abilities.TriggeredAbility;
import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.effects.ContinuousEffectImpl;
import mage.constants.*;
import mage.game.Game;
import mage.game.permanent.Permanent;
import mage.target.targetpointer.FixedTarget;
import java.util.Locale;
/**
* @author BetaSteward_at_googlemail.com
*/
@ -47,9 +48,7 @@ public class GainAbilityAttachedEffect extends ContinuousEffectImpl {
independentEffect = true;
}
if (rule == null) {
setText();
} else {
if (rule != null) {
this.staticText = rule;
}
@ -115,7 +114,11 @@ public class GainAbilityAttachedEffect extends ContinuousEffectImpl {
//
}
private void setText() {
@Override
public String getText(Mode mode) {
if (staticText != null && !staticText.isEmpty()) {
return staticText;
}
StringBuilder sb = new StringBuilder();
sb.append(attachmentType.verb().toLowerCase());
sb.append(" " + targetObjectName + " ");
@ -124,11 +127,17 @@ public class GainAbilityAttachedEffect extends ContinuousEffectImpl {
} else {
sb.append("gains ");
}
sb.append(ability.getRule("this " + targetObjectName));
if (!duration.toString().isEmpty()) {
sb.append(' ').append(duration.toString());
boolean quotes = (ability instanceof SimpleActivatedAbility) || (ability instanceof TriggeredAbility);
if (quotes) {
sb.append('"');
}
staticText = sb.toString();
sb.append(ability.getRule("this " + targetObjectName));
if (quotes) {
sb.append('"');
}
if (!duration.toString().isEmpty()) {
sb.append(' ').append(duration);
}
return sb.toString();
}
}