diff --git a/Mage.Sets/src/mage/cards/k/KnockoutBlow.java b/Mage.Sets/src/mage/cards/k/KnockoutBlow.java new file mode 100644 index 00000000000..09083c7514a --- /dev/null +++ b/Mage.Sets/src/mage/cards/k/KnockoutBlow.java @@ -0,0 +1,56 @@ +package mage.cards.k; + +import mage.ObjectColor; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.condition.Condition; +import mage.abilities.condition.common.SourceTargetsPermanentCondition; +import mage.abilities.effects.common.DamageTargetEffect; +import mage.abilities.effects.common.GainLifeEffect; +import mage.abilities.effects.common.cost.SpellCostReductionSourceEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Zone; +import mage.filter.FilterPermanent; +import mage.filter.predicate.mageobject.ColorPredicate; +import mage.target.common.TargetAttackingOrBlockingCreature; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class KnockoutBlow extends CardImpl { + + private static final FilterPermanent filter + = new FilterPermanent("a red permanent"); + + static { + filter.add(new ColorPredicate(ObjectColor.RED)); + } + + private static final Condition condition = new SourceTargetsPermanentCondition(filter); + + public KnockoutBlow(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{2}{W}"); + + // This spell costs {2} less to cast if it target a red creature. + this.addAbility(new SimpleStaticAbility( + Zone.ALL, new SpellCostReductionSourceEffect(2, condition).setCanWorksOnStackOnly(true) + ).setRuleAtTheTop(true)); + + // Knockout Blow deals 4 damage to target attacking or blocking creature and you gain 2 life. + this.getSpellAbility().addEffect(new DamageTargetEffect(4)); + this.getSpellAbility().addEffect(new GainLifeEffect(2).concatBy("and")); + this.getSpellAbility().addTarget(new TargetAttackingOrBlockingCreature()); + } + + private KnockoutBlow(final KnockoutBlow card) { + super(card); + } + + @Override + public KnockoutBlow copy() { + return new KnockoutBlow(this); + } +} diff --git a/Mage.Sets/src/mage/cards/o/OutOfTheWay.java b/Mage.Sets/src/mage/cards/o/OutOfTheWay.java index 4f1fbc5b493..9441095c47a 100644 --- a/Mage.Sets/src/mage/cards/o/OutOfTheWay.java +++ b/Mage.Sets/src/mage/cards/o/OutOfTheWay.java @@ -31,7 +31,7 @@ public final class OutOfTheWay extends CardImpl { static { filter.add(new ColorPredicate(ObjectColor.GREEN)); - filter.add(TargetController.OPPONENT.getControllerPredicate()); + filter2.add(TargetController.OPPONENT.getControllerPredicate()); } private static final Condition condition = new SourceTargetsPermanentCondition(filter); diff --git a/Mage.Sets/src/mage/sets/StreetsOfNewCapenna.java b/Mage.Sets/src/mage/sets/StreetsOfNewCapenna.java index b96ded92b2f..e89688074d6 100644 --- a/Mage.Sets/src/mage/sets/StreetsOfNewCapenna.java +++ b/Mage.Sets/src/mage/sets/StreetsOfNewCapenna.java @@ -68,6 +68,7 @@ public final class StreetsOfNewCapenna extends ExpansionSet { cards.add(new SetCardInfo("Jetmir's Garden", 250, Rarity.RARE, mage.cards.j.JetmirsGarden.class)); cards.add(new SetCardInfo("Jetmir, Nexus of Revels", 193, Rarity.MYTHIC, mage.cards.j.JetmirNexusOfRevels.class)); cards.add(new SetCardInfo("Join the Maestros", 85, Rarity.COMMON, mage.cards.j.JoinTheMaestros.class)); + cards.add(new SetCardInfo("Knockout Blow", 20, Rarity.COMMON, mage.cards.k.KnockoutBlow.class)); cards.add(new SetCardInfo("Ledger Shredder", 46, Rarity.RARE, mage.cards.l.LedgerShredder.class)); cards.add(new SetCardInfo("Light 'Em Up", 113, Rarity.COMMON, mage.cards.l.LightEmUp.class)); cards.add(new SetCardInfo("Lord Xander, the Collector", 197, Rarity.MYTHIC, mage.cards.l.LordXanderTheCollector.class));