From ad4f12596973646e7f30bb1674ef70652f4e364e Mon Sep 17 00:00:00 2001 From: Evan Kranzler Date: Thu, 10 Jan 2019 17:08:55 -0500 Subject: [PATCH] Implemented Dovin's Automaton --- .../src/mage/cards/d/DovinsAutomaton.java | 61 +++++++++++++++++++ .../src/mage/sets/RavnicaAllegiance.java | 1 + 2 files changed, 62 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/d/DovinsAutomaton.java diff --git a/Mage.Sets/src/mage/cards/d/DovinsAutomaton.java b/Mage.Sets/src/mage/cards/d/DovinsAutomaton.java new file mode 100644 index 0000000000..e1e17cde99 --- /dev/null +++ b/Mage.Sets/src/mage/cards/d/DovinsAutomaton.java @@ -0,0 +1,61 @@ +package mage.cards.d; + +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.condition.Condition; +import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition; +import mage.abilities.decorator.ConditionalContinuousEffect; +import mage.abilities.effects.common.continuous.BoostSourceEffect; +import mage.abilities.effects.common.continuous.GainAbilitySourceEffect; +import mage.abilities.keyword.VigilanceAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.SubType; +import mage.constants.Zone; +import mage.filter.common.FilterControlledPlaneswalkerPermanent; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class DovinsAutomaton extends CardImpl { + + private static final Condition condition + = new PermanentsOnTheBattlefieldCondition(new FilterControlledPlaneswalkerPermanent(SubType.DOVIN)); + + public DovinsAutomaton(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{4}"); + + this.subtype.add(SubType.HOMUNCULUS); + this.power = new MageInt(3); + this.toughness = new MageInt(3); + + // As long as you control a Dovin planeswalker, Dovin's Automaton gets +2/+2 and has vigilance. + Ability ability = new SimpleStaticAbility( + Zone.BATTLEFIELD, + new ConditionalContinuousEffect( + new BoostSourceEffect(2, 2, Duration.WhileOnBattlefield), + condition, "As long as you control a Dovin planeswalker, {this} gets +2/+2" + ) + ); + ability.addEffect(new ConditionalContinuousEffect( + new GainAbilitySourceEffect( + VigilanceAbility.getInstance(), Duration.WhileOnBattlefield + ), condition, "and has vigilance" + )); + this.addAbility(ability); + } + + private DovinsAutomaton(final DovinsAutomaton card) { + super(card); + } + + @Override + public DovinsAutomaton copy() { + return new DovinsAutomaton(this); + } +} diff --git a/Mage.Sets/src/mage/sets/RavnicaAllegiance.java b/Mage.Sets/src/mage/sets/RavnicaAllegiance.java index 884780fb72..fc03328b4d 100644 --- a/Mage.Sets/src/mage/sets/RavnicaAllegiance.java +++ b/Mage.Sets/src/mage/sets/RavnicaAllegiance.java @@ -72,6 +72,7 @@ public final class RavnicaAllegiance extends ExpansionSet { cards.add(new SetCardInfo("Domri, Chaos Bringer", 166, Rarity.MYTHIC, mage.cards.d.DomriChaosBringer.class)); cards.add(new SetCardInfo("Domri, City Smasher", 269, Rarity.RARE, mage.cards.d.DomriCitySmasher.class)); cards.add(new SetCardInfo("Dovin's Acuity", 168, Rarity.UNCOMMON, mage.cards.d.DovinsAcuity.class)); + cards.add(new SetCardInfo("Dovin's Automaton", 268, Rarity.COMMON, mage.cards.d.DovinsAutomaton.class)); cards.add(new SetCardInfo("Dovin, Architect of Law", 265, Rarity.MYTHIC, mage.cards.d.DovinArchitectOfLaw.class)); cards.add(new SetCardInfo("Dovin, Grand Arbiter", 167, Rarity.MYTHIC, mage.cards.d.DovinGrandArbiter.class)); cards.add(new SetCardInfo("Drill Bit", 73, Rarity.UNCOMMON, mage.cards.d.DrillBit.class));