diff --git a/Mage.Sets/src/mage/cards/a/AlloyAnimist.java b/Mage.Sets/src/mage/cards/a/AlloyAnimist.java index e0daef77857..c1e7f71a356 100644 --- a/Mage.Sets/src/mage/cards/a/AlloyAnimist.java +++ b/Mage.Sets/src/mage/cards/a/AlloyAnimist.java @@ -43,7 +43,7 @@ public final class AlloyAnimist extends CardImpl { new CreatureToken(4, 4, "4/4 artifact creature") .withType(CardType.ARTIFACT), false, false, Duration.EndOfTurn - ), new ManaCostsImpl<>("{2}{G}")); + ).withDurationRuleAtStart(true), new ManaCostsImpl<>("{2}{G}")); ability.addTarget(new TargetPermanent(filter)); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/a/AnimateLand.java b/Mage.Sets/src/mage/cards/a/AnimateLand.java index bcad4687a8c..243ddc0aaaa 100644 --- a/Mage.Sets/src/mage/cards/a/AnimateLand.java +++ b/Mage.Sets/src/mage/cards/a/AnimateLand.java @@ -1,7 +1,6 @@ package mage.cards.a; -import java.util.UUID; import mage.abilities.effects.common.continuous.BecomesCreatureTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; @@ -10,17 +9,21 @@ import mage.constants.Duration; import mage.game.permanent.token.custom.CreatureToken; import mage.target.common.TargetLandPermanent; +import java.util.UUID; + /** - * * @author LoneFox */ public final class AnimateLand extends CardImpl { public AnimateLand(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{G}"); + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{G}"); // Until end of turn, target land becomes a 3/3 creature that's still a land. - this.getSpellAbility().addEffect(new BecomesCreatureTargetEffect(new CreatureToken(3, 3), false, true, Duration.EndOfTurn)); + this.getSpellAbility().addEffect(new BecomesCreatureTargetEffect( + new CreatureToken(3, 3), + false, true, Duration.EndOfTurn + ).withDurationRuleAtStart(true)); this.getSpellAbility().addTarget(new TargetLandPermanent()); } diff --git a/Mage.Sets/src/mage/cards/a/AnthousaSetessanHero.java b/Mage.Sets/src/mage/cards/a/AnthousaSetessanHero.java index 197619e492c..287be523602 100644 --- a/Mage.Sets/src/mage/cards/a/AnthousaSetessanHero.java +++ b/Mage.Sets/src/mage/cards/a/AnthousaSetessanHero.java @@ -32,7 +32,7 @@ public final class AnthousaSetessanHero extends CardImpl { this.toughness = new MageInt(5); // Heroic — Whenever you cast a spell that targets Anthousa, Setessan Hero, up to three target lands you control each become 2/2 Warrior creatures until end of turn. They're still lands. - Ability ability = new HeroicAbility(new BecomesCreatureTargetEffect(new CreatureToken(2, 2, "2/2 Warrior creature", SubType.WARRIOR),false,true, Duration.EndOfTurn)); + Ability ability = new HeroicAbility(new BecomesCreatureTargetEffect(new CreatureToken(2, 2, "2/2 Warrior creatures", SubType.WARRIOR),false,true, Duration.EndOfTurn)); ability.addTarget(new TargetControlledPermanent(0,3,new FilterControlledLandPermanent("lands"), false)); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/d/DanceOfTheSkywise.java b/Mage.Sets/src/mage/cards/d/DanceOfTheSkywise.java index 6925bfcd26d..a85a60d7562 100644 --- a/Mage.Sets/src/mage/cards/d/DanceOfTheSkywise.java +++ b/Mage.Sets/src/mage/cards/d/DanceOfTheSkywise.java @@ -24,7 +24,9 @@ public final class DanceOfTheSkywise extends CardImpl { super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{1}{U}"); // Until end of turn, target creature you control becomes a blue Dragon Illusion with base power and toughness 4/4, loses all abilities, and gains flying. - Effect effect = new BecomesCreatureTargetEffect(new DragonIllusionToken(), true, false, Duration.EndOfTurn); + Effect effect = new BecomesCreatureTargetEffect( + new DragonIllusionToken(), true, false, Duration.EndOfTurn) + .withDurationRuleAtStart(true); effect.setText("Until end of turn, target creature you control becomes a blue Dragon Illusion with base power and toughness 4/4, loses all abilities, and gains flying."); this.getSpellAbility().addEffect(effect); this.getSpellAbility().addTarget(new TargetControlledCreaturePermanent()); diff --git a/Mage.Sets/src/mage/cards/d/Dragonshift.java b/Mage.Sets/src/mage/cards/d/Dragonshift.java index 9c1f7c2aa4f..625fde9b54f 100644 --- a/Mage.Sets/src/mage/cards/d/Dragonshift.java +++ b/Mage.Sets/src/mage/cards/d/Dragonshift.java @@ -36,7 +36,8 @@ public final class Dragonshift extends CardImpl { .withSubType(SubType.DRAGON) .withColor("UR") .withAbility(FlyingAbility.getInstance()), - true, false, Duration.EndOfTurn); + true, false, Duration.EndOfTurn) + .withDurationRuleAtStart(true); effect.setText("Until end of turn, target creature you control becomes a blue and red Dragon with base power and toughness 4/4, loses all abilities, and gains flying."); this.getSpellAbility().addEffect(effect); this.getSpellAbility().addTarget(new TargetControlledCreaturePermanent()); diff --git a/Mage.Sets/src/mage/cards/e/ElvishBranchbender.java b/Mage.Sets/src/mage/cards/e/ElvishBranchbender.java index be9e13f6e2a..43430111ca3 100644 --- a/Mage.Sets/src/mage/cards/e/ElvishBranchbender.java +++ b/Mage.Sets/src/mage/cards/e/ElvishBranchbender.java @@ -78,7 +78,10 @@ class ElvishBranchbenderEffect extends OneShotEffect { @Override public boolean apply(Game game, Ability source) { int xValue = new PermanentsOnBattlefieldCount(filter).calculate(game, source, this); - ContinuousEffect effect = new BecomesCreatureTargetEffect(new ElvishBranchbenderToken(xValue), false, false, Duration.EndOfTurn); // fix + ContinuousEffect effect = new BecomesCreatureTargetEffect( + new ElvishBranchbenderToken(xValue), + false, false, Duration.EndOfTurn) + .withDurationRuleAtStart(true); effect.setTargetPointer(targetPointer); game.addEffect(effect, source); return false; diff --git a/Mage.Sets/src/mage/cards/g/GiftOfTusks.java b/Mage.Sets/src/mage/cards/g/GiftOfTusks.java index 8e7391da385..6a1dc45c775 100644 --- a/Mage.Sets/src/mage/cards/g/GiftOfTusks.java +++ b/Mage.Sets/src/mage/cards/g/GiftOfTusks.java @@ -21,7 +21,10 @@ public final class GiftOfTusks extends CardImpl { super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{U}"); // Until end of turn, target creature loses all abilities and becomes a green Elephant with base power and toughness 3/3. - Effect effect = new BecomesCreatureTargetEffect(new ElephantToken(), true, false, Duration.EndOfTurn); + Effect effect = new BecomesCreatureTargetEffect( + new ElephantToken(), + true, false, Duration.EndOfTurn) + .withDurationRuleAtStart(true); effect.setText("Until end of turn, target creature loses all abilities and becomes a green Elephant with base power and toughness 3/3"); this.getSpellAbility().addEffect(effect); this.getSpellAbility().addTarget(new TargetCreaturePermanent()); diff --git a/Mage.Sets/src/mage/cards/k/KamahlHeartOfKrosa.java b/Mage.Sets/src/mage/cards/k/KamahlHeartOfKrosa.java index 6bfc531b670..df6864cfcbc 100644 --- a/Mage.Sets/src/mage/cards/k/KamahlHeartOfKrosa.java +++ b/Mage.Sets/src/mage/cards/k/KamahlHeartOfKrosa.java @@ -43,14 +43,14 @@ public final class KamahlHeartOfKrosa extends CardImpl { this.addAbility(ability); // {1}{G}: Until end of turn, target land you control becomes a 1/1 Elemental creature with vigilance, indestructible, and haste. It's still a land. - ability = new SimpleActivatedAbility(new BecomesCreatureTargetEffect(new CreatureToken( - 1, 1, "1/1 Elemental creature with vigilance, indestructible, and haste" - ).withSubType(SubType.ELEMENTAL) - .withAbility(VigilanceAbility.getInstance()) - .withAbility(IndestructibleAbility.getInstance()) - .withAbility(HasteAbility.getInstance()), + ability = new SimpleActivatedAbility(new BecomesCreatureTargetEffect( + new CreatureToken(1, 1, "1/1 Elemental creature with vigilance, indestructible, and haste") + .withSubType(SubType.ELEMENTAL) + .withAbility(VigilanceAbility.getInstance()) + .withAbility(IndestructibleAbility.getInstance()) + .withAbility(HasteAbility.getInstance()), false, true, Duration.EndOfTurn - ), new ManaCostsImpl<>("{1}{G}")); + ).withDurationRuleAtStart(true), new ManaCostsImpl<>("{1}{G}")); ability.addTarget(new TargetPermanent(StaticFilters.FILTER_CONTROLLED_PERMANENT_LAND)); this.addAbility(ability); diff --git a/Mage.Sets/src/mage/cards/k/KamahlsWill.java b/Mage.Sets/src/mage/cards/k/KamahlsWill.java index cd59cb8a5b8..a49e7a75244 100644 --- a/Mage.Sets/src/mage/cards/k/KamahlsWill.java +++ b/Mage.Sets/src/mage/cards/k/KamahlsWill.java @@ -38,14 +38,14 @@ public final class KamahlsWill extends CardImpl { // • Until end of turn, any number of target lands you control become 1/1 Elemental creatures with vigilance, indestructible, and haste. They're still lands. this.getSpellAbility().addEffect(new BecomesCreatureTargetEffect( - new CreatureToken(1, 1, "") + new CreatureToken(1, 1, "1/1 Elemental creatures with vigilance, indestructible, and haste") .withSubType(SubType.ELEMENTAL) .withAbility(VigilanceAbility.getInstance()) .withAbility(IndestructibleAbility.getInstance()) .withAbility(HasteAbility.getInstance()), false, true, Duration.EndOfTurn - ).setText("until end of turn, any number of target lands you control become 1/1 Elemental creatures " + - "with vigilance, indestructible, and haste. They're still lands")); + ).withDurationRuleAtStart(true)/*.setText("until end of turn, any number of target lands you control become 1/1 Elemental creatures " + + "with vigilance, indestructible, and haste. They're still lands")*/); this.getSpellAbility().addTarget(new TargetPermanent( 0, Integer.MAX_VALUE, StaticFilters.FILTER_CONTROLLED_PERMANENT_LANDS, false )); diff --git a/Mage.Sets/src/mage/cards/l/LifesparkSpellbomb.java b/Mage.Sets/src/mage/cards/l/LifesparkSpellbomb.java index b795e605314..d9fcb05ed8a 100644 --- a/Mage.Sets/src/mage/cards/l/LifesparkSpellbomb.java +++ b/Mage.Sets/src/mage/cards/l/LifesparkSpellbomb.java @@ -1,7 +1,6 @@ package mage.cards.l; -import java.util.UUID; import mage.abilities.Ability; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.costs.common.SacrificeSourceCost; @@ -18,17 +17,22 @@ import mage.constants.Zone; import mage.game.permanent.token.custom.CreatureToken; import mage.target.common.TargetLandPermanent; +import java.util.UUID; + /** - * * @author Loki */ public final class LifesparkSpellbomb extends CardImpl { public LifesparkSpellbomb(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{1}"); + super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{1}"); // {G}, Sacrifice Lifespark Spellbomb: Until end of turn, target land becomes a 3/3 creature that's still a land. - Ability firstAbility = new SimpleActivatedAbility(Zone.BATTLEFIELD, new BecomesCreatureTargetEffect(new CreatureToken(3, 3), false, true, Duration.EndOfTurn), new ColoredManaCost(ColoredManaSymbol.G)); + Ability firstAbility = new SimpleActivatedAbility(Zone.BATTLEFIELD, + new BecomesCreatureTargetEffect( + new CreatureToken(3, 3), + false, true, Duration.EndOfTurn) + .withDurationRuleAtStart(true), new ColoredManaCost(ColoredManaSymbol.G)); firstAbility.addCost(new SacrificeSourceCost()); firstAbility.addTarget(new TargetLandPermanent()); this.addAbility(firstAbility); diff --git a/Mage.Sets/src/mage/cards/m/MercurialTransformation.java b/Mage.Sets/src/mage/cards/m/MercurialTransformation.java index 569fc45200d..c13ff6c7ffe 100644 --- a/Mage.Sets/src/mage/cards/m/MercurialTransformation.java +++ b/Mage.Sets/src/mage/cards/m/MercurialTransformation.java @@ -77,7 +77,7 @@ class MercurialTransformationEffect extends OneShotEffect { } game.addEffect(new BecomesCreatureTargetEffect( token, true, false, Duration.EndOfTurn - ), source); + ).withDurationRuleAtStart(true), source); return true; } } diff --git a/Mage.Sets/src/mage/cards/n/NissaVitalForce.java b/Mage.Sets/src/mage/cards/n/NissaVitalForce.java index 6ad1c2decec..be1966384f6 100644 --- a/Mage.Sets/src/mage/cards/n/NissaVitalForce.java +++ b/Mage.Sets/src/mage/cards/n/NissaVitalForce.java @@ -44,7 +44,7 @@ public final class NissaVitalForce extends CardImpl { LoyaltyAbility ability = new LoyaltyAbility(new UntapTargetEffect(), 1); ability.addEffect(new BecomesCreatureTargetEffect( new NissaVitalForceToken(), false, true, Duration.UntilYourNextTurn - ).setText("Until your next turn, it becomes a 5/5 Elemental creature with haste. It's still a land")); + ).withDurationRuleAtStart(true).setText("Until your next turn, it becomes a 5/5 Elemental creature with haste. It's still a land")); ability.addTarget(new TargetLandPermanent(filter)); this.addAbility(ability); diff --git a/Mage.Sets/src/mage/cards/p/PhantasmalForm.java b/Mage.Sets/src/mage/cards/p/PhantasmalForm.java index bb96d8e1c4b..75ebf7516ee 100644 --- a/Mage.Sets/src/mage/cards/p/PhantasmalForm.java +++ b/Mage.Sets/src/mage/cards/p/PhantasmalForm.java @@ -25,7 +25,7 @@ public final class PhantasmalForm extends CardImpl { // Until end of turn, up to two target creatures each have base power and toughness 3/3, gain flying, and become blue Illusions in addition to their other colors and types. this.getSpellAbility().addEffect(new BecomesCreatureTargetEffect( new PhantasmalFormToken(), false, false, Duration.EndOfTurn - ).setText("Until end of turn, up to two target creatures each have base power and toughness 3/3, " + + ).withDurationRuleAtStart(true).setText("Until end of turn, up to two target creatures each have base power and toughness 3/3, " + "gain flying, and become blue Illusions in addition to their other colors and types.") ); this.getSpellAbility().addTarget(new TargetCreaturePermanent(0, 2)); diff --git a/Mage.Sets/src/mage/cards/r/RampagingGrowth.java b/Mage.Sets/src/mage/cards/r/RampagingGrowth.java index 409e6c4ce4a..5c7ef1b571b 100644 --- a/Mage.Sets/src/mage/cards/r/RampagingGrowth.java +++ b/Mage.Sets/src/mage/cards/r/RampagingGrowth.java @@ -78,7 +78,7 @@ class RampagingGrowthEffect extends OneShotEffect { new CreatureToken(4, 3, "", SubType.INSECT ).withAbility(ReachAbility.getInstance()).withAbility(HasteAbility.getInstance()), false, true, Duration.EndOfTurn - ).setTargetPointer(new FixedTarget(permanent, game)), source); + ).withDurationRuleAtStart(true).setTargetPointer(new FixedTarget(permanent, game)), source); } player.shuffleLibrary(source, game); return true; diff --git a/Mage.Sets/src/mage/cards/s/ScaleUp.java b/Mage.Sets/src/mage/cards/s/ScaleUp.java index 84cd0f9969d..31c16300ddb 100644 --- a/Mage.Sets/src/mage/cards/s/ScaleUp.java +++ b/Mage.Sets/src/mage/cards/s/ScaleUp.java @@ -32,8 +32,7 @@ public final class ScaleUp extends CardImpl { new CreatureToken(6, 4, "green Wurm with base power and toughness 6/4") .withColor("G").withSubType(SubType.WURM), true, false, Duration.EndOfTurn, false, true - ).setText("Until end of turn, target creature you control " + - "becomes a green Wurm with base power and toughness 6/4.")); + ).withDurationRuleAtStart(true)); this.getSpellAbility().addTarget(new TargetControlledCreaturePermanent()); // Overload {4}{G}{G} diff --git a/Mage.Sets/src/mage/cards/s/Snakeform.java b/Mage.Sets/src/mage/cards/s/Snakeform.java index 8fc7b847224..f1543d5e61c 100644 --- a/Mage.Sets/src/mage/cards/s/Snakeform.java +++ b/Mage.Sets/src/mage/cards/s/Snakeform.java @@ -24,7 +24,8 @@ public final class Snakeform extends CardImpl { // Until end of turn, target creature loses all abilities and becomes a green Snake with base power and toughness 1/1. - Effect effect = new BecomesCreatureTargetEffect(new SnakeToken(), true, false, Duration.EndOfTurn); + Effect effect = new BecomesCreatureTargetEffect(new SnakeToken(), true, false, Duration.EndOfTurn) + .withDurationRuleAtStart(true); effect.setText("Until end of turn, target creature loses all abilities and becomes a green Snake with base power and toughness 1/1"); this.getSpellAbility().addEffect(effect); this.getSpellAbility().addTarget(new TargetCreaturePermanent()); diff --git a/Mage.Sets/src/mage/cards/s/StartlingDevelopment.java b/Mage.Sets/src/mage/cards/s/StartlingDevelopment.java index 278e4d485b0..952e873aa7e 100644 --- a/Mage.Sets/src/mage/cards/s/StartlingDevelopment.java +++ b/Mage.Sets/src/mage/cards/s/StartlingDevelopment.java @@ -27,7 +27,7 @@ public final class StartlingDevelopment extends CardImpl { 4, 4, "blue Serpent with base power and toughness 4/4" ).withColor("U").withSubType(SubType.SERPENT), false, false, Duration.EndOfTurn - ).setRemoveSubtypes(true)); + ).withDurationRuleAtStart(true).setRemoveSubtypes(true)); this.getSpellAbility().addTarget(new TargetCreaturePermanent()); // Cycling {1} diff --git a/Mage.Sets/src/mage/cards/t/TurnBurn.java b/Mage.Sets/src/mage/cards/t/TurnBurn.java index 05304b56a97..3b357b9ceee 100644 --- a/Mage.Sets/src/mage/cards/t/TurnBurn.java +++ b/Mage.Sets/src/mage/cards/t/TurnBurn.java @@ -27,8 +27,8 @@ public final class TurnBurn extends SplitCard { // Turn // Until end of turn, target creature loses all abilities and becomes a red Weird with base power and toughness 0/1. - Effect effect = new BecomesCreatureTargetEffect(new WeirdToken(), true, false, Duration.EndOfTurn); - effect.setText("Until end of turn, target creature loses all abilities and becomes a red Weird with base power and toughness 0/1"); + Effect effect = new BecomesCreatureTargetEffect(new WeirdToken(), true, false, Duration.EndOfTurn) + .withDurationRuleAtStart(true); getLeftHalfCard().getSpellAbility().addEffect(effect); getLeftHalfCard().getSpellAbility().addTarget(new TargetCreaturePermanent().withChooseHint("becomes a Weird")); @@ -53,7 +53,7 @@ public final class TurnBurn extends SplitCard { private static class WeirdToken extends TokenImpl { private WeirdToken() { - super("Weird", "a red Weird with base power and toughness 0/1"); + super("Weird", "red Weird with base power and toughness 0/1"); cardType.add(CardType.CREATURE); color.setRed(true); subtype.add(SubType.WEIRD); diff --git a/Mage.Sets/src/mage/cards/w/WoodwraithCorrupter.java b/Mage.Sets/src/mage/cards/w/WoodwraithCorrupter.java index e82ee6fbc65..52e87f3d59a 100644 --- a/Mage.Sets/src/mage/cards/w/WoodwraithCorrupter.java +++ b/Mage.Sets/src/mage/cards/w/WoodwraithCorrupter.java @@ -39,9 +39,8 @@ public final class WoodwraithCorrupter extends CardImpl { this.power = new MageInt(3); this.toughness = new MageInt(6); - // {1}{B}{G}, {tap}: Target Forest becomes a 4/4 black and green Elemental Horror creature. It's still a land. - Effect effect = new BecomesCreatureTargetEffect(new WoodwraithCorrupterToken(), false, true, Duration.EndOfGame); - effect.setText("Target Forest becomes a 4/4 black and green Elemental Horror creature. It's still a land"); + // {1}{B}{G}, {T}: Target Forest becomes a 4/4 black and green Elemental Horror creature. It's still a land. + Effect effect = new BecomesCreatureTargetEffect(new WoodwraithCorrupterToken(), false, true, Duration.Custom); Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new ManaCostsImpl<>("{1}{B}{G}")); ability.addTarget(new TargetPermanent(filter)); ability.addCost(new TapSourceCost()); diff --git a/Mage/src/main/java/mage/abilities/effects/common/continuous/BecomesCreatureTargetEffect.java b/Mage/src/main/java/mage/abilities/effects/common/continuous/BecomesCreatureTargetEffect.java index f0613677d5f..e39e18b2885 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/continuous/BecomesCreatureTargetEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/continuous/BecomesCreatureTargetEffect.java @@ -25,6 +25,8 @@ public class BecomesCreatureTargetEffect extends ContinuousEffectImpl { protected boolean removeSubtypes = false; protected boolean loseOtherCardTypes; + protected boolean durationRuleAtStart = false; // put duration rule to the start of the rules instead end + public BecomesCreatureTargetEffect(Token token, boolean loseAllAbilities, boolean stillALand, Duration duration) { this(token, loseAllAbilities, stillALand, duration, false); } @@ -68,6 +70,7 @@ public class BecomesCreatureTargetEffect extends ContinuousEffectImpl { this.keepAbilities = effect.keepAbilities; this.loseOtherCardTypes = effect.loseOtherCardTypes; this.dependencyTypes.add(DependencyType.BecomeCreature); + this.durationRuleAtStart = effect.durationRuleAtStart; } @Override @@ -172,34 +175,54 @@ public class BecomesCreatureTargetEffect extends ContinuousEffectImpl { || layer == Layer.TextChangingEffects_3; } + public BecomesCreatureTargetEffect withDurationRuleAtStart(boolean durationRuleAtStart) { + this.durationRuleAtStart = durationRuleAtStart; + return this; + } + @Override public String getText(Mode mode) { if (staticText != null && !staticText.isEmpty()) { return staticText; } StringBuilder sb = new StringBuilder(); + if (durationRuleAtStart && duration != Duration.Custom) { + sb.append(duration.toString()); + sb.append(", "); + } + Target target = mode.getTargets().get(0); - if (target.getNumberOfTargets() < target.getMaxNumberOfTargets()) { - sb.append("up to "); - if (target.getMaxNumberOfTargets() == 1) { - sb.append("one "); + if (target.getMaxNumberOfTargets() != Integer.MAX_VALUE) { + if (target.getNumberOfTargets() < target.getMaxNumberOfTargets()) { + sb.append("up to "); + if (target.getMaxNumberOfTargets() == 1) { + sb.append("one "); + } } } + if (target.getMaxNumberOfTargets() > 1) { sb.append(CardUtil.numberToText(target.getMaxNumberOfTargets())).append(" target ").append(target.getTargetName()); if (loseAllAbilities) { - sb.append(" lose all their abilities and "); + sb.append(" lose all their abilities and"); } - sb.append(" each become "); + if (target.getMaxNumberOfTargets() != Integer.MAX_VALUE) { + sb.append(" each"); + } + sb.append(" become "); } else { sb.append("target ").append(target.getTargetName()); if (loseAllAbilities && !keepAbilities) { - sb.append(" loses all abilities and "); + sb.append(" loses all abilities and"); } sb.append(" becomes a "); } sb.append(token.getDescription()); - sb.append(' ').append(duration.toString()); + + if (!durationRuleAtStart && duration != Duration.Custom) { + sb.append(' ').append(duration.toString()); + } + if (addStillALandText) { if (!sb.toString().endsWith("\" ")) { sb.append(". ");