diff --git a/Mage.Sets/src/mage/cards/l/LivingBrainMechanicalMarvel.java b/Mage.Sets/src/mage/cards/l/LivingBrainMechanicalMarvel.java new file mode 100644 index 00000000000..f1efe82bb29 --- /dev/null +++ b/Mage.Sets/src/mage/cards/l/LivingBrainMechanicalMarvel.java @@ -0,0 +1,61 @@ +package mage.cards.l; + +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.effects.common.UntapTargetEffect; +import mage.abilities.effects.common.continuous.BecomesCreatureTargetEffect; +import mage.abilities.triggers.BeginningOfCombatTriggeredAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.SubType; +import mage.constants.SuperType; +import mage.filter.common.FilterControlledArtifactPermanent; +import mage.filter.predicate.Predicates; +import mage.game.permanent.token.custom.CreatureToken; +import mage.target.TargetPermanent; + +import java.util.UUID; + +/** + * + * @author Jmlundeen + */ +public final class LivingBrainMechanicalMarvel extends CardImpl { + + private static final FilterControlledArtifactPermanent filter = new FilterControlledArtifactPermanent("non-Equipment artifact you control"); + + static { + filter.add(Predicates.not(SubType.EQUIPMENT.getPredicate())); + } + + public LivingBrainMechanicalMarvel(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{4}"); + + this.supertype.add(SuperType.LEGENDARY); + this.subtype.add(SubType.ROBOT); + this.subtype.add(SubType.VILLAIN); + this.power = new MageInt(3); + this.toughness = new MageInt(3); + + // At the beginning of combat on your turn, target non-Equipment artifact you control becomes an artifact creature with base power and toughness 3/3 until end of turn. Untap it. + CreatureToken token = new CreatureToken(3, 3, "artifact creature with base power and toughness 3/3") + .withType(CardType.ARTIFACT); + Ability ability = new BeginningOfCombatTriggeredAbility( + new BecomesCreatureTargetEffect(token, false, false, Duration.EndOfTurn, false, true, false) + ); + ability.addEffect(new UntapTargetEffect("untap it")); + ability.addTarget(new TargetPermanent(filter)); + this.addAbility(ability); + } + + private LivingBrainMechanicalMarvel(final LivingBrainMechanicalMarvel card) { + super(card); + } + + @Override + public LivingBrainMechanicalMarvel copy() { + return new LivingBrainMechanicalMarvel(this); + } +} diff --git a/Mage.Sets/src/mage/sets/MarvelsSpiderMan.java b/Mage.Sets/src/mage/sets/MarvelsSpiderMan.java index bde52dc3546..55840d8e9a8 100644 --- a/Mage.Sets/src/mage/sets/MarvelsSpiderMan.java +++ b/Mage.Sets/src/mage/sets/MarvelsSpiderMan.java @@ -104,6 +104,7 @@ public final class MarvelsSpiderMan extends ExpansionSet { cards.add(new SetCardInfo("Kraven, Proud Predator", 132, Rarity.UNCOMMON, mage.cards.k.KravenProudPredator.class)); cards.add(new SetCardInfo("Lady Octopus, Inspired Inventor", 252, Rarity.RARE, mage.cards.l.LadyOctopusInspiredInventor.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Lady Octopus, Inspired Inventor", 35, Rarity.RARE, mage.cards.l.LadyOctopusInspiredInventor.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Living Brain, Mechanical Marvel", 167, Rarity.UNCOMMON, mage.cards.l.LivingBrainMechanicalMarvel.class)); cards.add(new SetCardInfo("Lizard, Connors's Curse", 106, Rarity.RARE, mage.cards.l.LizardConnorssCurse.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Lizard, Connors's Curse", 265, Rarity.RARE, mage.cards.l.LizardConnorssCurse.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Lurking Lizards", 107, Rarity.COMMON, mage.cards.l.LurkingLizards.class)); 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 4b4a8e3f362..2ada47074ad 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 @@ -7,6 +7,7 @@ import mage.constants.*; import mage.game.Game; import mage.game.permanent.Permanent; import mage.game.permanent.token.Token; +import mage.util.CardUtil; import java.util.UUID; @@ -194,8 +195,11 @@ public class BecomesCreatureTargetEffect extends ContinuousEffectImpl { " lose all their abilities and" : " loses all abilities and"); } - sb.append(getTargetPointer().isPlural(mode.getTargets()) ? " become " : " becomes a "); - sb.append(token.getDescription()); + if (getTargetPointer().isPlural(mode.getTargets())) { + sb.append(" become ").append(token.getDescription()); + } else { + sb.append(" becomes ").append(CardUtil.addArticle(token.getDescription())); + } if (!durationRuleAtStart && !duration.toString().isEmpty()) { sb.append(' ').append(duration.toString()); }