Implement Bake into a Pie

This commit is contained in:
jmharmon 2019-09-04 18:58:12 -07:00 committed by GitHub
parent 7103791d86
commit 9346f3ec83
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -0,0 +1,36 @@
package mage.cards.b;
import mage.abilities.effects.common.CreateTokenEffect;
import mage.abilities.effects.common.DestroyTargetEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.game.permanent.token.custom.FoodToken;
import mage.target.common.TargetCreaturePermanent;
import java.util.UUID;
/**
* @author jmharmon
*/
public final class BakeIntoAPie extends CardImpl {
public BakeIntoAPie(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{2}{B}{B}");
// Destroy target creature. Create a Food token.
this.getSpellAbility().addTarget(new TargetCreaturePermanent());
this.getSpellAbility().addEffect(new DestroyTargetEffect());
this.getSpellAbility().addEffect(new CreateTokenEffect(new FoodToken(), 1));
}
public BakeIntoAPie(final BakeIntoAPie card) {
super(card);
}
@Override
public BakeIntoAPie copy() {
return new BakeIntoAPie(this);
}
}