From 17049dff22ad41a2057b0014abf1f728a9bff5a4 Mon Sep 17 00:00:00 2001 From: Evan Kranzler Date: Fri, 6 Sep 2019 08:48:13 -0400 Subject: [PATCH] Implemented Shimmer Dragon --- Mage.Sets/src/mage/cards/s/ShimmerDragon.java | 76 +++++++++++++++++++ Mage.Sets/src/mage/sets/ThroneOfEldraine.java | 1 + 2 files changed, 77 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/s/ShimmerDragon.java diff --git a/Mage.Sets/src/mage/cards/s/ShimmerDragon.java b/Mage.Sets/src/mage/cards/s/ShimmerDragon.java new file mode 100644 index 0000000000..b4c81df30b --- /dev/null +++ b/Mage.Sets/src/mage/cards/s/ShimmerDragon.java @@ -0,0 +1,76 @@ +package mage.cards.s; + +import mage.MageInt; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.condition.Condition; +import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition; +import mage.abilities.costs.common.TapTargetCost; +import mage.abilities.decorator.ConditionalContinuousEffect; +import mage.abilities.effects.common.DrawCardSourceControllerEffect; +import mage.abilities.effects.common.continuous.GainAbilitySourceEffect; +import mage.abilities.keyword.FlyingAbility; +import mage.abilities.keyword.HexproofAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.ComparisonType; +import mage.constants.Duration; +import mage.constants.SubType; +import mage.filter.StaticFilters; +import mage.filter.common.FilterControlledArtifactPermanent; +import mage.filter.common.FilterControlledPermanent; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.permanent.TappedPredicate; +import mage.target.common.TargetControlledPermanent; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class ShimmerDragon extends CardImpl { + + private static final Condition condition = new PermanentsOnTheBattlefieldCondition( + StaticFilters.FILTER_CONTROLLED_PERMANENT_ARTIFACT, ComparisonType.MORE_THAN, 3 + ); + private static final FilterControlledPermanent filter + = new FilterControlledArtifactPermanent("untapped artifacts you control"); + + static { + filter.add(Predicates.not(TappedPredicate.instance)); + } + + public ShimmerDragon(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{U}{U}"); + + this.subtype.add(SubType.DRAGON); + this.power = new MageInt(5); + this.toughness = new MageInt(6); + + // Flying + this.addAbility(FlyingAbility.getInstance()); + + // As long as you control four or more artifacts, Shimmer Dragon has hexproof. + this.addAbility(new SimpleStaticAbility(new ConditionalContinuousEffect( + new GainAbilitySourceEffect( + HexproofAbility.getInstance(), Duration.WhileOnBattlefield + ), condition, "as long as you control four or more artifacts, {this} has hexproof" + ))); + + // Tap two untapped artifacts you control: Draw a card. + this.addAbility(new SimpleActivatedAbility( + new DrawCardSourceControllerEffect(1), + new TapTargetCost(new TargetControlledPermanent(2, filter)) + )); + } + + private ShimmerDragon(final ShimmerDragon card) { + super(card); + } + + @Override + public ShimmerDragon copy() { + return new ShimmerDragon(this); + } +} diff --git a/Mage.Sets/src/mage/sets/ThroneOfEldraine.java b/Mage.Sets/src/mage/sets/ThroneOfEldraine.java index 1622a039c8..0748b44f55 100644 --- a/Mage.Sets/src/mage/sets/ThroneOfEldraine.java +++ b/Mage.Sets/src/mage/sets/ThroneOfEldraine.java @@ -60,6 +60,7 @@ public final class ThroneOfEldraine extends ExpansionSet { cards.add(new SetCardInfo("Rosethorn Acolyte", 174, Rarity.COMMON, mage.cards.r.RosethornAcolyte.class)); cards.add(new SetCardInfo("Run Away Together", 62, Rarity.COMMON, mage.cards.r.RunAwayTogether.class)); cards.add(new SetCardInfo("Savvy Hunter", 200, Rarity.UNCOMMON, mage.cards.s.SavvyHunter.class)); + cards.add(new SetCardInfo("Shimmer Dragon", 317, Rarity.RARE, mage.cards.s.ShimmerDragon.class)); cards.add(new SetCardInfo("Shinechaser", 201, Rarity.UNCOMMON, mage.cards.s.Shinechaser.class)); cards.add(new SetCardInfo("Shining Armor", 29, Rarity.COMMON, mage.cards.s.ShiningArmor.class)); cards.add(new SetCardInfo("Silverflame Ritual", 30, Rarity.COMMON, mage.cards.s.SilverflameRitual.class));