forked from External/mage
43 lines
1.2 KiB
Java
43 lines
1.2 KiB
Java
|
|
package mage.cards.g;
|
|
|
|
import java.util.UUID;
|
|
import mage.abilities.costs.common.SacrificeTargetCost;
|
|
import mage.abilities.effects.common.DamageTargetEffect;
|
|
import mage.cards.CardImpl;
|
|
import mage.cards.CardSetInfo;
|
|
import mage.constants.CardType;
|
|
import mage.constants.SubType;
|
|
import mage.filter.common.FilterControlledPermanent;
|
|
import mage.target.common.TargetControlledPermanent;
|
|
import mage.target.common.TargetAnyTarget;
|
|
|
|
/**
|
|
* @author Loki
|
|
*/
|
|
public final class GoblinGrenade extends CardImpl {
|
|
|
|
private static final FilterControlledPermanent filter = new FilterControlledPermanent("a Goblin");
|
|
|
|
static {
|
|
filter.add(SubType.GOBLIN.getPredicate());
|
|
}
|
|
|
|
public GoblinGrenade(UUID ownerId, CardSetInfo setInfo) {
|
|
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{R}");
|
|
|
|
this.getSpellAbility().addCost(new SacrificeTargetCost(new TargetControlledPermanent(1, 1, filter, false)));
|
|
this.getSpellAbility().addEffect(new DamageTargetEffect(5));
|
|
this.getSpellAbility().addTarget(new TargetAnyTarget());
|
|
}
|
|
|
|
private GoblinGrenade(final GoblinGrenade card) {
|
|
super(card);
|
|
}
|
|
|
|
@Override
|
|
public GoblinGrenade copy() {
|
|
return new GoblinGrenade(this);
|
|
}
|
|
|
|
}
|