[ZNR] Implemented Concerted Defense

This commit is contained in:
Evan Kranzler 2020-09-07 11:26:45 -04:00
parent 487d8b57c2
commit c9e4040867
2 changed files with 45 additions and 0 deletions

View file

@ -0,0 +1,44 @@
package mage.cards.c;
import mage.abilities.dynamicvalue.AdditiveDynamicValue;
import mage.abilities.dynamicvalue.DynamicValue;
import mage.abilities.dynamicvalue.common.PartyCount;
import mage.abilities.dynamicvalue.common.StaticValue;
import mage.abilities.effects.common.CounterUnlessPaysEffect;
import mage.abilities.hint.common.PartyCountHint;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.filter.StaticFilters;
import mage.target.TargetSpell;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class ConcertedDefense extends CardImpl {
private static final DynamicValue xValue = new AdditiveDynamicValue(PartyCount.instance, StaticValue.get(1));
public ConcertedDefense(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{U}");
// Counter target noncreature spell unless its controller pays {1} plus an additional {1} for each creature in your party.
this.getSpellAbility().addEffect(new CounterUnlessPaysEffect(xValue).setText(
"Counter target noncreature spell unless its controller pays {1} " +
"plus an additional {1} for each creature in your party."
));
this.getSpellAbility().addTarget(new TargetSpell(StaticFilters.FILTER_SPELL_NON_CREATURE));
this.getSpellAbility().addHint(PartyCountHint.instance);
}
private ConcertedDefense(final ConcertedDefense card) {
super(card);
}
@Override
public ConcertedDefense copy() {
return new ConcertedDefense(this);
}
}

View file

@ -117,6 +117,7 @@ public final class ZendikarRising extends ExpansionSet {
cards.add(new SetCardInfo("Cleric of Chill Depths", 51, Rarity.COMMON, mage.cards.c.ClericOfChillDepths.class));
cards.add(new SetCardInfo("Cleric of Life's Bond", 222, Rarity.UNCOMMON, mage.cards.c.ClericOfLifesBond.class));
cards.add(new SetCardInfo("Cliffhaven Sell-Sword", 8, Rarity.COMMON, mage.cards.c.CliffhavenSellSword.class));
cards.add(new SetCardInfo("Concerted Defense", 52, Rarity.UNCOMMON, mage.cards.c.ConcertedDefense.class));
cards.add(new SetCardInfo("Coralhelm Chronicler", 54, Rarity.RARE, mage.cards.c.CoralhelmChronicler.class));
cards.add(new SetCardInfo("Cragcrown Pathway", 261, Rarity.RARE, mage.cards.c.CragcrownPathway.class));
cards.add(new SetCardInfo("Cragplate Baloth", 183, Rarity.RARE, mage.cards.c.CragplateBaloth.class));