From 29fe460c8e2fb585b71e555664632d348e6a49a7 Mon Sep 17 00:00:00 2001 From: Evan Kranzler Date: Mon, 18 Jun 2018 20:02:53 -0400 Subject: [PATCH] Implemented Aerial Engineer --- .../src/mage/cards/a/AerialEngineer.java | 66 +++++++++++++++++++ .../src/mage/cards/s/ScrapyardMongrel.java | 11 ++-- Mage.Sets/src/mage/sets/CoreSet2019.java | 1 + 3 files changed, 71 insertions(+), 7 deletions(-) create mode 100644 Mage.Sets/src/mage/cards/a/AerialEngineer.java diff --git a/Mage.Sets/src/mage/cards/a/AerialEngineer.java b/Mage.Sets/src/mage/cards/a/AerialEngineer.java new file mode 100644 index 0000000000..cfdaf87eb7 --- /dev/null +++ b/Mage.Sets/src/mage/cards/a/AerialEngineer.java @@ -0,0 +1,66 @@ +package mage.cards.a; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleStaticAbility; +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.FlyingAbility; +import mage.constants.SubType; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Zone; +import mage.filter.StaticFilters; + +/** + * + * @author TheElk801 + */ +public final class AerialEngineer extends CardImpl { + + public AerialEngineer(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{W}{U}"); + + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.ARTIFICER); + this.power = new MageInt(2); + this.toughness = new MageInt(4); + + // As long as you control an artifact, Aerial Engineer gets +2/+0 and has flying. + Ability ability = new SimpleStaticAbility( + Zone.BATTLEFIELD, + new ConditionalContinuousEffect( + new BoostSourceEffect(2, 0, Duration.WhileOnBattlefield), + new PermanentsOnTheBattlefieldCondition( + StaticFilters.FILTER_CONTROLLED_PERMANENT_ARTIFACT + ), + "As long as you control an artifact, {this} gets +2/+0" + ) + ); + ability.addEffect(new ConditionalContinuousEffect( + new GainAbilitySourceEffect( + FlyingAbility.getInstance(), + Duration.WhileOnBattlefield + ), + new PermanentsOnTheBattlefieldCondition( + StaticFilters.FILTER_CONTROLLED_PERMANENT_ARTIFACT + ), + "and has flying" + )); + this.addAbility(ability); + } + + public AerialEngineer(final AerialEngineer card) { + super(card); + } + + @Override + public AerialEngineer copy() { + return new AerialEngineer(this); + } +} diff --git a/Mage.Sets/src/mage/cards/s/ScrapyardMongrel.java b/Mage.Sets/src/mage/cards/s/ScrapyardMongrel.java index 2f5abb4406..dc4727c640 100644 --- a/Mage.Sets/src/mage/cards/s/ScrapyardMongrel.java +++ b/Mage.Sets/src/mage/cards/s/ScrapyardMongrel.java @@ -1,4 +1,3 @@ - package mage.cards.s; import java.util.UUID; @@ -17,8 +16,7 @@ import mage.constants.CardType; import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; -import mage.filter.FilterPermanent; -import mage.filter.common.FilterControlledArtifactPermanent; +import mage.filter.StaticFilters; /** * @@ -27,7 +25,7 @@ import mage.filter.common.FilterControlledArtifactPermanent; public final class ScrapyardMongrel extends CardImpl { public ScrapyardMongrel(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{R}"); this.subtype.add(SubType.HOUND); this.color.setRed(true); @@ -35,14 +33,13 @@ public final class ScrapyardMongrel extends CardImpl { this.toughness = new MageInt(3); // As long as you control an artifact, Scrapyard Mongrel gets +2/+0 and has trample. - FilterPermanent filter = new FilterControlledArtifactPermanent(); Effect boostEffect = new ConditionalContinuousEffect( new BoostSourceEffect(2, 0, Duration.WhileOnBattlefield), - new PermanentsOnTheBattlefieldCondition(filter), + new PermanentsOnTheBattlefieldCondition(StaticFilters.FILTER_CONTROLLED_PERMANENT_ARTIFACT), "As long as you control an artifact, {this} gets +2/+0"); Effect gainAbilityEffect = new ConditionalContinuousEffect( new GainAbilitySourceEffect(TrampleAbility.getInstance(), Duration.WhileOnBattlefield), - new PermanentsOnTheBattlefieldCondition(filter), + new PermanentsOnTheBattlefieldCondition(StaticFilters.FILTER_CONTROLLED_PERMANENT_ARTIFACT), "and has trample"); Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, boostEffect); ability.addEffect(gainAbilityEffect); diff --git a/Mage.Sets/src/mage/sets/CoreSet2019.java b/Mage.Sets/src/mage/sets/CoreSet2019.java index 72bf3585bc..4c5f6fe3cd 100644 --- a/Mage.Sets/src/mage/sets/CoreSet2019.java +++ b/Mage.Sets/src/mage/sets/CoreSet2019.java @@ -29,6 +29,7 @@ public final class CoreSet2019 extends ExpansionSet { this.maxCardNumberInBooster = 280; cards.add(new SetCardInfo("Act of Treason", 127, Rarity.COMMON, mage.cards.a.ActOfTreason.class)); + cards.add(new SetCardInfo("Aerial Engineer", 211, Rarity.UNCOMMON, mage.cards.a.AerialEngineer.class)); cards.add(new SetCardInfo("Aggressive Mammoth", 302, Rarity.RARE, mage.cards.a.AggressiveMammoth.class)); cards.add(new SetCardInfo("Air Elemental", 308, Rarity.UNCOMMON, mage.cards.a.AirElemental.class)); cards.add(new SetCardInfo("Ajani's Pridemate", 5, Rarity.UNCOMMON, mage.cards.a.AjanisPridemate.class));