forked from External/mage
53 lines
1.9 KiB
Java
53 lines
1.9 KiB
Java
|
|
package mage.cards.a;
|
|
|
|
import java.util.UUID;
|
|
import mage.MageInt;
|
|
import mage.ObjectColor;
|
|
import mage.abilities.common.BlocksOrBecomesBlockedSourceTriggeredAbility;
|
|
import mage.abilities.common.delayed.AtTheEndOfCombatDelayedTriggeredAbility;
|
|
import mage.abilities.effects.Effect;
|
|
import mage.abilities.effects.common.CreateDelayedTriggeredAbilityEffect;
|
|
import mage.abilities.effects.common.DestroyTargetEffect;
|
|
import mage.cards.CardImpl;
|
|
import mage.cards.CardSetInfo;
|
|
import mage.constants.CardType;
|
|
import mage.constants.SubType;
|
|
import mage.filter.common.FilterCreaturePermanent;
|
|
import mage.filter.predicate.Predicates;
|
|
import mage.filter.predicate.mageobject.ColorPredicate;
|
|
|
|
/**
|
|
*
|
|
* @author jeffwadsworth
|
|
*/
|
|
public final class Abomination extends CardImpl {
|
|
|
|
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("green or white creature");
|
|
|
|
static {
|
|
filter.add(Predicates.or(new ColorPredicate(ObjectColor.GREEN), new ColorPredicate(ObjectColor.WHITE)));
|
|
}
|
|
|
|
public Abomination(UUID ownerId, CardSetInfo setInfo) {
|
|
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{B}{B}");
|
|
this.subtype.add(SubType.HORROR);
|
|
|
|
this.power = new MageInt(2);
|
|
this.toughness = new MageInt(6);
|
|
|
|
// Whenever Abomination blocks or becomes blocked by a green or white creature, destroy that creature at end of combat.
|
|
Effect effect = new CreateDelayedTriggeredAbilityEffect(new AtTheEndOfCombatDelayedTriggeredAbility(new DestroyTargetEffect()), true);
|
|
effect.setText("destroy that creature at end of combat");
|
|
this.addAbility(new BlocksOrBecomesBlockedSourceTriggeredAbility(effect, filter, false));
|
|
}
|
|
|
|
public Abomination(final Abomination card) {
|
|
super(card);
|
|
}
|
|
|
|
@Override
|
|
public Abomination copy() {
|
|
return new Abomination(this);
|
|
}
|
|
}
|