From dd6e66a10c72398c6ed1757aac4a6069d05b5f6a Mon Sep 17 00:00:00 2001 From: Evan Kranzler Date: Fri, 24 May 2019 08:33:29 -0400 Subject: [PATCH] Implemented Plague Engineer --- .../src/mage/cards/p/PlagueEngineer.java | 60 +++++++++++++++++++ Mage.Sets/src/mage/sets/ModernHorizons.java | 1 + 2 files changed, 61 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/p/PlagueEngineer.java diff --git a/Mage.Sets/src/mage/cards/p/PlagueEngineer.java b/Mage.Sets/src/mage/cards/p/PlagueEngineer.java new file mode 100644 index 0000000000..af2ec5d3c5 --- /dev/null +++ b/Mage.Sets/src/mage/cards/p/PlagueEngineer.java @@ -0,0 +1,60 @@ +package mage.cards.p; + +import mage.MageInt; +import mage.abilities.common.AsEntersBattlefieldAbility; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.common.ChooseCreatureTypeEffect; +import mage.abilities.effects.common.continuous.BoostAllEffect; +import mage.abilities.keyword.DeathtouchAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Outcome; +import mage.constants.SubType; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.common.FilterOpponentsCreaturePermanent; +import mage.filter.predicate.mageobject.ChosenSubtypePredicate; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class PlagueEngineer extends CardImpl { + + private static final FilterCreaturePermanent filter + = new FilterOpponentsCreaturePermanent("creatures of the chosen type your opponents control"); + + static { + filter.add(new ChosenSubtypePredicate()); + } + + public PlagueEngineer(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{B}"); + + this.subtype.add(SubType.CARRIER); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // Deathtouch + this.addAbility(DeathtouchAbility.getInstance()); + + // As Plague Engineer enters the battlefield, choose a creature type. + this.addAbility(new AsEntersBattlefieldAbility(new ChooseCreatureTypeEffect(Outcome.BoostCreature))); + + // Creatures of the chosen type your opponents control get -1/-1. + this.addAbility(new SimpleStaticAbility(new BoostAllEffect( + -1, -1, Duration.WhileOnBattlefield, filter, false + ))); + } + + private PlagueEngineer(final PlagueEngineer card) { + super(card); + } + + @Override + public PlagueEngineer copy() { + return new PlagueEngineer(this); + } +} diff --git a/Mage.Sets/src/mage/sets/ModernHorizons.java b/Mage.Sets/src/mage/sets/ModernHorizons.java index 042ba45ae5..fabecb7daf 100644 --- a/Mage.Sets/src/mage/sets/ModernHorizons.java +++ b/Mage.Sets/src/mage/sets/ModernHorizons.java @@ -72,6 +72,7 @@ public final class ModernHorizons extends ExpansionSet { cards.add(new SetCardInfo("Munitions Expert", 209, Rarity.UNCOMMON, mage.cards.m.MunitionsExpert.class)); cards.add(new SetCardInfo("Nimble Mongoose", 174, Rarity.COMMON, mage.cards.n.NimbleMongoose.class)); cards.add(new SetCardInfo("Nurturing Peatland", 243, Rarity.RARE, mage.cards.n.NurturingPeatland.class)); + cards.add(new SetCardInfo("Plague Engineer", 100, Rarity.RARE, mage.cards.p.PlagueEngineer.class)); cards.add(new SetCardInfo("Planebound Accomplice", 140, Rarity.RARE, mage.cards.p.PlaneboundAccomplice.class)); cards.add(new SetCardInfo("Pondering Mage", 63, Rarity.COMMON, mage.cards.p.PonderingMage.class)); cards.add(new SetCardInfo("Prismatic Vista", 244, Rarity.RARE, mage.cards.p.PrismaticVista.class));