diff --git a/Mage.Sets/src/mage/cards/a/AdaptiveOmnitool.java b/Mage.Sets/src/mage/cards/a/AdaptiveOmnitool.java new file mode 100644 index 00000000000..f88856700d9 --- /dev/null +++ b/Mage.Sets/src/mage/cards/a/AdaptiveOmnitool.java @@ -0,0 +1,66 @@ +package mage.cards.a; + +import java.util.UUID; + +import mage.abilities.common.AttacksAttachedTriggeredAbility; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.costs.mana.GenericManaCost; +import mage.abilities.dynamicvalue.DynamicValue; +import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount; +import mage.abilities.effects.common.LookLibraryAndPickControllerEffect; +import mage.abilities.effects.common.continuous.BoostEquippedEffect; +import mage.abilities.hint.Hint; +import mage.abilities.hint.ValueHint; +import mage.abilities.keyword.EquipAbility; +import mage.constants.Outcome; +import mage.constants.PutCards; +import mage.constants.SubType; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.filter.StaticFilters; +import mage.filter.common.FilterControlledArtifactPermanent; +import mage.target.common.TargetControlledCreaturePermanent; + +/** + * + * @author sobiech + */ +public final class AdaptiveOmnitool extends CardImpl { + private final static DynamicValue artifactYouControlCount = new PermanentsOnBattlefieldCount(new FilterControlledArtifactPermanent()); + private final static Hint hint = new ValueHint("Artifacts you control", artifactYouControlCount); + + public AdaptiveOmnitool(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{2}"); + + this.subtype.add(SubType.EQUIPMENT); + + // Equipped creature gets +1/+1 for each artifact you control. + this.addAbility( + new SimpleStaticAbility(new BoostEquippedEffect(artifactYouControlCount, artifactYouControlCount)).addHint(hint) + ); + + // Whenever equipped creature attacks, look at the top six cards of your library. You may reveal an artifact card from among them and put it into your hand. Put the rest on the bottom of your library in a random order. + this.addAbility(new AttacksAttachedTriggeredAbility( + new LookLibraryAndPickControllerEffect( + 6, + 1, + StaticFilters.FILTER_CARD_ARTIFACT, + PutCards.HAND, + PutCards.BOTTOM_RANDOM + ) + )); + + // Equip {3} + this.addAbility(new EquipAbility(Outcome.BoostCreature, new GenericManaCost(3), new TargetControlledCreaturePermanent(), false)); + } + + private AdaptiveOmnitool(final AdaptiveOmnitool card) { + super(card); + } + + @Override + public AdaptiveOmnitool copy() { + return new AdaptiveOmnitool(this); + } +} diff --git a/Mage.Sets/src/mage/sets/AetherdriftCommander.java b/Mage.Sets/src/mage/sets/AetherdriftCommander.java index bdf0b3d2764..8920401fd93 100644 --- a/Mage.Sets/src/mage/sets/AetherdriftCommander.java +++ b/Mage.Sets/src/mage/sets/AetherdriftCommander.java @@ -20,6 +20,7 @@ public final class AetherdriftCommander extends ExpansionSet { this.hasBasicLands = false; cards.add(new SetCardInfo("Academy Ruins", 58, Rarity.RARE, mage.cards.a.AcademyRuins.class)); + cards.add(new SetCardInfo("Adaptive Omnitool", 16, Rarity.RARE, mage.cards.a.AdaptiveOmnitool.class)); cards.add(new SetCardInfo("Adarkar Wastes", 144, Rarity.RARE, mage.cards.a.AdarkarWastes.class)); cards.add(new SetCardInfo("Aether Hub", 145, Rarity.UNCOMMON, mage.cards.a.AetherHub.class)); cards.add(new SetCardInfo("Aethersquall Ancient", 68, Rarity.RARE, mage.cards.a.AethersquallAncient.class));