mirror of
https://github.com/correl/mage.git
synced 2024-12-26 11:09:27 +00:00
[SNC] Implemented Knockout Blow
This commit is contained in:
parent
6e0af2f9b9
commit
be13f22435
3 changed files with 58 additions and 1 deletions
56
Mage.Sets/src/mage/cards/k/KnockoutBlow.java
Normal file
56
Mage.Sets/src/mage/cards/k/KnockoutBlow.java
Normal file
|
@ -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);
|
||||
}
|
||||
}
|
|
@ -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);
|
||||
|
|
|
@ -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));
|
||||
|
|
Loading…
Reference in a new issue