Implemented Trusted Pegasus

This commit is contained in:
Evan Kranzler 2019-04-18 07:50:55 -04:00
parent eb67fc396c
commit 0a57d52bfa
2 changed files with 63 additions and 0 deletions

View file

@ -0,0 +1,62 @@
package mage.cards.t;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.AttacksTriggeredAbility;
import mage.abilities.effects.common.continuous.GainAbilityTargetEffect;
import mage.abilities.keyword.FlyingAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.SubType;
import mage.filter.FilterPermanent;
import mage.filter.common.FilterAttackingCreature;
import mage.filter.predicate.Predicates;
import mage.filter.predicate.mageobject.AbilityPredicate;
import mage.target.TargetPermanent;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class TrustedPegasus extends CardImpl {
private static final FilterPermanent filter
= new FilterAttackingCreature("attacking creature without flying");
static {
filter.add(Predicates.not(new AbilityPredicate(FlyingAbility.class)));
}
public TrustedPegasus(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{W}");
this.subtype.add(SubType.PEGASUS);
this.power = new MageInt(2);
this.toughness = new MageInt(2);
// Flying
this.addAbility(FlyingAbility.getInstance());
// Whenever Trusted Pegasus attacks, target attacking creature without flying gains flying until end of turn.
Ability ability = new AttacksTriggeredAbility(
new GainAbilityTargetEffect(
FlyingAbility.getInstance(),
Duration.EndOfTurn
), false
);
ability.addTarget(new TargetPermanent(filter));
addAbility(ability);
}
private TrustedPegasus(final TrustedPegasus card) {
super(card);
}
@Override
public TrustedPegasus copy() {
return new TrustedPegasus(this);
}
}

View file

@ -240,6 +240,7 @@ public final class WarOfTheSpark extends ExpansionSet {
cards.add(new SetCardInfo("Tomik, Distinguished Advokist", 34, Rarity.RARE, mage.cards.t.TomikDistinguishedAdvokist.class));
cards.add(new SetCardInfo("Topple the Statue", 35, Rarity.COMMON, mage.cards.t.ToppleTheStatue.class));
cards.add(new SetCardInfo("Totally Lost", 74, Rarity.COMMON, mage.cards.t.TotallyLost.class));
cards.add(new SetCardInfo("Trusted Pegasus", 36, Rarity.COMMON, mage.cards.t.TrustedPegasus.class));
cards.add(new SetCardInfo("Turret Ogre", 148, Rarity.COMMON, mage.cards.t.TurretOgre.class));
cards.add(new SetCardInfo("Vivien's Arkbow", 181, Rarity.RARE, mage.cards.v.ViviensArkbow.class));
cards.add(new SetCardInfo("Vivien's Grizzly", 182, Rarity.COMMON, mage.cards.v.ViviensGrizzly.class));