From 0848b2072477c90ed9bcd66b8c89e9213d7d728b Mon Sep 17 00:00:00 2001 From: Evan Kranzler Date: Fri, 11 Jan 2019 23:18:08 -0500 Subject: [PATCH] Implemented Sagittars' Volley --- .../src/mage/cards/s/SagittarsVolley.java | 49 +++++++++++++++++++ .../src/mage/sets/RavnicaAllegiance.java | 1 + 2 files changed, 50 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/s/SagittarsVolley.java diff --git a/Mage.Sets/src/mage/cards/s/SagittarsVolley.java b/Mage.Sets/src/mage/cards/s/SagittarsVolley.java new file mode 100644 index 0000000000..1a017f2a8c --- /dev/null +++ b/Mage.Sets/src/mage/cards/s/SagittarsVolley.java @@ -0,0 +1,49 @@ +package mage.cards.s; + +import mage.abilities.effects.common.DamageAllEffect; +import mage.abilities.effects.common.DestroyTargetEffect; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.filter.FilterPermanent; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.common.FilterOpponentsCreaturePermanent; +import mage.filter.predicate.mageobject.AbilityPredicate; +import mage.target.TargetPermanent; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class SagittarsVolley extends CardImpl { + + private static final FilterPermanent filter + = new FilterCreaturePermanent("creature with flying"); + private static final FilterPermanent filter2 + = new FilterOpponentsCreaturePermanent("creature with flying your opponents control"); + + static { + filter.add(new AbilityPredicate(FlyingAbility.class)); + filter2.add(new AbilityPredicate(FlyingAbility.class)); + } + + public SagittarsVolley(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{2}{G}"); + + // Destroy target creature with flying. Sagittars' Volley deals 1 damage to each creature with flying your opponents control. + this.getSpellAbility().addEffect(new DestroyTargetEffect()); + this.getSpellAbility().addTarget(new TargetPermanent(filter)); + this.getSpellAbility().addEffect(new DamageAllEffect(1, filter2)); + } + + private SagittarsVolley(final SagittarsVolley card) { + super(card); + } + + @Override + public SagittarsVolley copy() { + return new SagittarsVolley(this); + } +} diff --git a/Mage.Sets/src/mage/sets/RavnicaAllegiance.java b/Mage.Sets/src/mage/sets/RavnicaAllegiance.java index bb8faffba4..b628f424fa 100644 --- a/Mage.Sets/src/mage/sets/RavnicaAllegiance.java +++ b/Mage.Sets/src/mage/sets/RavnicaAllegiance.java @@ -221,6 +221,7 @@ public final class RavnicaAllegiance extends ExpansionSet { cards.add(new SetCardInfo("Rubblebelt Recluse", 111, Rarity.COMMON, mage.cards.r.RubblebeltRecluse.class)); cards.add(new SetCardInfo("Rubblebelt Runner", 202, Rarity.COMMON, mage.cards.r.RubblebeltRunner.class)); cards.add(new SetCardInfo("Sage's Row Savant", 49, Rarity.COMMON, mage.cards.s.SagesRowSavant.class)); + cards.add(new SetCardInfo("Sagittars' Volley", 138, Rarity.COMMON, mage.cards.s.SagittarsVolley.class)); cards.add(new SetCardInfo("Saruli Caretaker", 139, Rarity.COMMON, mage.cards.s.SaruliCaretaker.class)); cards.add(new SetCardInfo("Sauroform Hybrid", 140, Rarity.COMMON, mage.cards.s.SauroformHybrid.class)); cards.add(new SetCardInfo("Savage Smash", 203, Rarity.COMMON, mage.cards.s.SavageSmash.class));