mirror of
https://github.com/correl/mage.git
synced 2024-12-26 11:09:27 +00:00
Implemented Defile
This commit is contained in:
parent
2f8fe5fa65
commit
a3a6c327ef
2 changed files with 50 additions and 0 deletions
49
Mage.Sets/src/mage/cards/d/Defile.java
Normal file
49
Mage.Sets/src/mage/cards/d/Defile.java
Normal file
|
@ -0,0 +1,49 @@
|
|||
package mage.cards.d;
|
||||
|
||||
import mage.abilities.dynamicvalue.DynamicValue;
|
||||
import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount;
|
||||
import mage.abilities.effects.common.continuous.BoostTargetEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.SubType;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class Defile extends CardImpl {
|
||||
|
||||
private static final FilterPermanent filter = new FilterControlledPermanent();
|
||||
|
||||
static {
|
||||
filter.add(new SubtypePredicate(SubType.SWAMP));
|
||||
}
|
||||
|
||||
private static final DynamicValue xValue = new PermanentsOnBattlefieldCount(filter, -1);
|
||||
|
||||
public Defile(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{B}");
|
||||
|
||||
// Target creature gets -1/-1 until end of turn for each Swamp you control.
|
||||
this.getSpellAbility().addEffect(new BoostTargetEffect(
|
||||
xValue, xValue, Duration.EndOfTurn, true
|
||||
).setText("Target creature gets -1/-1 until end of turn for each Swamp you control."));
|
||||
this.getSpellAbility().addTarget(new TargetCreaturePermanent());
|
||||
}
|
||||
|
||||
private Defile(final Defile card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Defile copy() {
|
||||
return new Defile(this);
|
||||
}
|
||||
}
|
|
@ -51,6 +51,7 @@ public final class ModernHorizons extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Crypt Rats", 84, Rarity.UNCOMMON, mage.cards.c.CryptRats.class));
|
||||
cards.add(new SetCardInfo("Dead of Winter", 85, Rarity.RARE, mage.cards.d.DeadOfWinter.class));
|
||||
cards.add(new SetCardInfo("Deep Forest Hermit", 161, Rarity.RARE, mage.cards.d.DeepForestHermit.class));
|
||||
cards.add(new SetCardInfo("Defile", 86, Rarity.COMMON, mage.cards.d.Defile.class));
|
||||
cards.add(new SetCardInfo("Diabolic Edict", 87, Rarity.COMMON, mage.cards.d.DiabolicEdict.class));
|
||||
cards.add(new SetCardInfo("Dismantling Blow", 5, Rarity.UNCOMMON, mage.cards.d.DismantlingBlow.class));
|
||||
cards.add(new SetCardInfo("Dregscape Sliver", 88, Rarity.UNCOMMON, mage.cards.d.DregscapeSliver.class));
|
||||
|
|
Loading…
Reference in a new issue