foul-magics/Mage.Sets/src/mage/cards/c/CovetedPeacock.java
2018-09-24 14:56:03 -04:00

55 lines
1.7 KiB
Java

package mage.cards.c;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.AttacksTriggeredAbility;
import mage.abilities.effects.common.combat.GoadTargetEffect;
import mage.abilities.keyword.FlyingAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.filter.FilterPermanent;
import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.permanent.DefendingPlayerControlsPredicate;
import mage.target.TargetPermanent;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class CovetedPeacock extends CardImpl {
public static final FilterPermanent filter = new FilterCreaturePermanent("creature defending player controls");
static {
filter.add(new DefendingPlayerControlsPredicate());
}
public CovetedPeacock(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{U}{U}");
this.subtype.add(SubType.BIRD);
this.power = new MageInt(3);
this.toughness = new MageInt(4);
// Flying
this.addAbility(FlyingAbility.getInstance());
// Whenever Coveted Peacock attacks, you may goad target creature defending player controls.
Ability ability = new AttacksTriggeredAbility(new GoadTargetEffect(), true, "Whenever {this} attacks, you may goad target creature defending player controls.");
ability.addTarget(new TargetPermanent(filter));
this.addAbility(ability);
}
public CovetedPeacock(final CovetedPeacock card) {
super(card);
}
@Override
public CovetedPeacock copy() {
return new CovetedPeacock(this);
}
}