[AFR] Implemented Ingenious Smith

This commit is contained in:
Daniel Bomar 2021-07-07 10:01:36 -05:00
parent f78ff4860f
commit d519f1d775
No known key found for this signature in database
GPG key ID: C86C8658F4023918
2 changed files with 60 additions and 0 deletions

View file

@ -0,0 +1,59 @@
package mage.cards.i;
import java.util.UUID;
import mage.MageInt;
import mage.abilities.common.EntersBattlefieldControlledTriggeredAbility;
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
import mage.abilities.dynamicvalue.common.StaticValue;
import mage.abilities.effects.common.LookLibraryAndPickControllerEffect;
import mage.abilities.effects.common.counter.AddCountersSourceEffect;
import mage.constants.SubType;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Zone;
import mage.counters.CounterType;
import mage.filter.StaticFilters;
import mage.filter.common.FilterArtifactPermanent;
/**
*
* @author weirddan455
*/
public final class IngeniousSmith extends CardImpl {
private static final FilterArtifactPermanent filter = new FilterArtifactPermanent("one or more artifacts");
public IngeniousSmith(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{W}");
this.subtype.add(SubType.HUMAN);
this.subtype.add(SubType.ARTIFICER);
this.power = new MageInt(1);
this.toughness = new MageInt(1);
// When Ingenious Smith enters the battlefield, look at the top four 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 EntersBattlefieldTriggeredAbility(new LookLibraryAndPickControllerEffect(
StaticValue.get(4), false, StaticValue.get(1), StaticFilters.FILTER_CARD_ARTIFACT_AN,
Zone.LIBRARY, false, true, false, Zone.HAND,
true, false, false).setBackInRandomOrder(true)
));
// Whenever one or more artifacts enter the battlefield under your control, put a +1/+1 counter on Ingenious Smith.
// This ability triggers only once each turn.
this.addAbility(new EntersBattlefieldControlledTriggeredAbility(
new AddCountersSourceEffect(CounterType.P1P1.createInstance()), filter
).setTriggersOnce(true));
}
private IngeniousSmith(final IngeniousSmith card) {
super(card);
}
@Override
public IngeniousSmith copy() {
return new IngeniousSmith(this);
}
}

View file

@ -124,6 +124,7 @@ public final class AdventuresInTheForgottenRealms extends ExpansionSet {
cards.add(new SetCardInfo("Icingdeath, Frost Tyrant", 20, Rarity.MYTHIC, mage.cards.i.IcingdeathFrostTyrant.class));
cards.add(new SetCardInfo("Improvised Weaponry", 150, Rarity.COMMON, mage.cards.i.ImprovisedWeaponry.class));
cards.add(new SetCardInfo("Inferno of the Star Mounts", 151, Rarity.MYTHIC, mage.cards.i.InfernoOfTheStarMounts.class));
cards.add(new SetCardInfo("Ingenious Smith", 21, Rarity.UNCOMMON, mage.cards.i.IngeniousSmith.class));
cards.add(new SetCardInfo("Inspiring Bard", 189, Rarity.COMMON, mage.cards.i.InspiringBard.class));
cards.add(new SetCardInfo("Intrepid Outlander", 191, Rarity.UNCOMMON, mage.cards.i.IntrepidOutlander.class));
cards.add(new SetCardInfo("Iron Golem", 247, Rarity.UNCOMMON, mage.cards.i.IronGolem.class));