mirror of
https://github.com/correl/mage.git
synced 2024-12-27 03:00:13 +00:00
[DMU] Implemented Cut Down
This commit is contained in:
parent
18a516f870
commit
b1a79b8fa2
2 changed files with 54 additions and 0 deletions
53
Mage.Sets/src/mage/cards/c/CutDown.java
Normal file
53
Mage.Sets/src/mage/cards/c/CutDown.java
Normal file
|
@ -0,0 +1,53 @@
|
|||
package mage.cards.c;
|
||||
|
||||
import mage.abilities.effects.common.DestroyTargetEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.Predicate;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.target.TargetPermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class CutDown extends CardImpl {
|
||||
|
||||
private static final FilterPermanent filter
|
||||
= new FilterCreaturePermanent("creature with total power and toughness 5 or less");
|
||||
|
||||
static {
|
||||
filter.add(CutDownPredicate.instance);
|
||||
}
|
||||
|
||||
public CutDown(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{B}");
|
||||
|
||||
// Destroy target creature with total power and toughness 5 or less.
|
||||
this.getSpellAbility().addEffect(new DestroyTargetEffect());
|
||||
this.getSpellAbility().addTarget(new TargetPermanent(filter));
|
||||
}
|
||||
|
||||
private CutDown(final CutDown card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public CutDown copy() {
|
||||
return new CutDown(this);
|
||||
}
|
||||
}
|
||||
|
||||
enum CutDownPredicate implements Predicate<Permanent> {
|
||||
instance;
|
||||
|
||||
@Override
|
||||
public boolean apply(Permanent input, Game game) {
|
||||
return input.getPower().getValue() + input.getToughness().getValue() <= 5;
|
||||
}
|
||||
}
|
|
@ -32,6 +32,7 @@ public final class DominariaUnited extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Benalish Sleeper", 8, Rarity.COMMON, mage.cards.b.BenalishSleeper.class));
|
||||
cards.add(new SetCardInfo("Caves of Koilos", 244, Rarity.RARE, mage.cards.c.CavesOfKoilos.class));
|
||||
cards.add(new SetCardInfo("Charismatic Vanguard", 10, Rarity.COMMON, mage.cards.c.CharismaticVanguard.class));
|
||||
cards.add(new SetCardInfo("Cut Down", 89, Rarity.UNCOMMON, mage.cards.c.CutDown.class));
|
||||
cards.add(new SetCardInfo("Evolved Sleeper", 93, Rarity.RARE, mage.cards.e.EvolvedSleeper.class));
|
||||
cards.add(new SetCardInfo("Forest", 274, Rarity.LAND, mage.cards.basiclands.Forest.class, NON_FULL_USE_VARIOUS));
|
||||
cards.add(new SetCardInfo("Herd Migration", 429, Rarity.RARE, mage.cards.h.HerdMigration.class));
|
||||
|
|
Loading…
Reference in a new issue