Implemented Dovin's Automaton

This commit is contained in:
Evan Kranzler 2019-01-10 17:08:55 -05:00
parent 3ff26721e8
commit ad4f125969
2 changed files with 62 additions and 0 deletions

View file

@ -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);
}
}

View file

@ -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));