forked from External/mage
[BLB] Implement Pawpatch Formation
This commit is contained in:
parent
a688341148
commit
a750db0577
2 changed files with 56 additions and 0 deletions
55
Mage.Sets/src/mage/cards/p/PawpatchFormation.java
Normal file
55
Mage.Sets/src/mage/cards/p/PawpatchFormation.java
Normal file
|
|
@ -0,0 +1,55 @@
|
|||
package mage.cards.p;
|
||||
|
||||
import mage.abilities.Mode;
|
||||
import mage.abilities.effects.common.CreateTokenEffect;
|
||||
import mage.abilities.effects.common.DestroyTargetEffect;
|
||||
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
|
||||
import mage.abilities.keyword.FlyingAbility;
|
||||
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.mageobject.AbilityPredicate;
|
||||
import mage.game.permanent.token.FoodToken;
|
||||
import mage.target.TargetPermanent;
|
||||
import mage.target.common.TargetEnchantmentPermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class PawpatchFormation extends CardImpl {
|
||||
|
||||
private static final FilterPermanent filter = new FilterCreaturePermanent("creature with flying");
|
||||
|
||||
static {
|
||||
filter.add(new AbilityPredicate(FlyingAbility.class));
|
||||
}
|
||||
|
||||
public PawpatchFormation(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{1}{B}");
|
||||
|
||||
// Choose one --
|
||||
// * Destroy target creature with flying.
|
||||
this.getSpellAbility().addEffect(new DestroyTargetEffect());
|
||||
this.getSpellAbility().addTarget(new TargetPermanent(filter));
|
||||
|
||||
// * Destroy target enchantment.
|
||||
this.getSpellAbility().addMode(new Mode(new DestroyTargetEffect()).addTarget(new TargetEnchantmentPermanent()));
|
||||
|
||||
// * Draw a card. Create a Food token.
|
||||
this.getSpellAbility().addMode(new Mode(new DrawCardSourceControllerEffect(1))
|
||||
.addEffect(new CreateTokenEffect(new FoodToken())));
|
||||
}
|
||||
|
||||
private PawpatchFormation(final PawpatchFormation card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PawpatchFormation copy() {
|
||||
return new PawpatchFormation(this);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue