Implemented Ajani, Adversary of Tyrants

This commit is contained in:
Evan Kranzler 2018-06-16 21:39:34 -04:00
parent 56493b631a
commit f55d0e6706
3 changed files with 90 additions and 0 deletions

View file

@ -0,0 +1,65 @@
package mage.cards.a;
import java.util.UUID;
import mage.abilities.Ability;
import mage.abilities.LoyaltyAbility;
import mage.abilities.common.PlanswalkerEntersWithLoyalityCountersAbility;
import mage.abilities.effects.common.GetEmblemEffect;
import mage.abilities.effects.common.ReturnFromGraveyardToBattlefieldTargetEffect;
import mage.abilities.effects.common.counter.AddCountersTargetEffect;
import mage.constants.SubType;
import mage.constants.SuperType;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.ComparisonType;
import mage.counters.CounterType;
import mage.filter.common.FilterCreatureCard;
import mage.filter.predicate.mageobject.ConvertedManaCostPredicate;
import mage.game.command.emblems.AjaniAdversaryOfTyrantsEmblem;
import mage.target.common.TargetCardInYourGraveyard;
import mage.target.common.TargetCreaturePermanent;
/**
*
* @author TheElk801
*/
public final class AjaniAdversaryOfTyrants extends CardImpl {
private static final FilterCreatureCard filter
= new FilterCreatureCard("creature card with converted mana cost 2 or less from your graveyard");
static {
filter.add(new ConvertedManaCostPredicate(ComparisonType.FEWER_THAN, 3));
}
public AjaniAdversaryOfTyrants(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.PLANESWALKER}, "{2}{W}{W}");
this.addSuperType(SuperType.LEGENDARY);
this.subtype.add(SubType.AJANI);
this.addAbility(new PlanswalkerEntersWithLoyalityCountersAbility(4));
// +1: Put a +1/+1 counter on each of up to two target creatures.
Ability ability = new LoyaltyAbility(new AddCountersTargetEffect(CounterType.P1P1.createInstance()));
ability.addTarget(new TargetCreaturePermanent(0, 2));
this.addAbility(ability);
// 2: Return target creature card with converted mana cost 2 or less from your graveyard to the battlefield.
ability = new LoyaltyAbility(new ReturnFromGraveyardToBattlefieldTargetEffect(), -2);
ability.addTarget(new TargetCardInYourGraveyard(filter));
this.addAbility(ability);
// 7: You get an emblem with "At the beginning of your end step, create three 1/1 white Cat creature tokens with lifelink."
this.addAbility(new LoyaltyAbility(new GetEmblemEffect(new AjaniAdversaryOfTyrantsEmblem()), -7));
}
public AjaniAdversaryOfTyrants(final AjaniAdversaryOfTyrants card) {
super(card);
}
@Override
public AjaniAdversaryOfTyrants copy() {
return new AjaniAdversaryOfTyrants(this);
}
}

View file

@ -29,6 +29,7 @@ public final class CoreSet2019 extends ExpansionSet {
cards.add(new SetCardInfo("Aggressive Mammoth", 302, Rarity.RARE, mage.cards.a.AggressiveMammoth.class)); cards.add(new SetCardInfo("Aggressive Mammoth", 302, Rarity.RARE, mage.cards.a.AggressiveMammoth.class));
cards.add(new SetCardInfo("Air Elemental", 308, Rarity.UNCOMMON, mage.cards.a.AirElemental.class)); cards.add(new SetCardInfo("Air Elemental", 308, Rarity.UNCOMMON, mage.cards.a.AirElemental.class));
cards.add(new SetCardInfo("Ajani's Pridemate", 5, Rarity.UNCOMMON, mage.cards.a.AjanisPridemate.class)); cards.add(new SetCardInfo("Ajani's Pridemate", 5, Rarity.UNCOMMON, mage.cards.a.AjanisPridemate.class));
cards.add(new SetCardInfo("Ajani, Adversary of Tyrants", 3, Rarity.MYTHIC, mage.cards.a.AjaniAdversaryOfTyrants.class));
cards.add(new SetCardInfo("Ajani, Wise Counselor", 281, Rarity.MYTHIC, mage.cards.a.AjaniWiseCounselor.class)); cards.add(new SetCardInfo("Ajani, Wise Counselor", 281, Rarity.MYTHIC, mage.cards.a.AjaniWiseCounselor.class));
cards.add(new SetCardInfo("Anticipate", 44, Rarity.COMMON, mage.cards.a.Anticipate.class)); cards.add(new SetCardInfo("Anticipate", 44, Rarity.COMMON, mage.cards.a.Anticipate.class));
cards.add(new SetCardInfo("Apex of Power", 129, Rarity.MYTHIC, mage.cards.a.ApexOfPower.class)); cards.add(new SetCardInfo("Apex of Power", 129, Rarity.MYTHIC, mage.cards.a.ApexOfPower.class));

View file

@ -0,0 +1,24 @@
package mage.game.command.emblems;
import mage.abilities.common.BeginningOfEndStepTriggeredAbility;
import mage.abilities.effects.common.CreateTokenEffect;
import mage.constants.TargetController;
import mage.game.command.Emblem;
import mage.game.permanent.token.CatToken2;
/**
*
* @author spjspj
*/
public class AjaniAdversaryOfTyrantsEmblem extends Emblem {
// 7: You get an emblem with "At the beginning of your end step, create three 1/1 white Cat creature tokens with lifelink."
public AjaniAdversaryOfTyrantsEmblem() {
this.setName("Emblem Ajani");
this.setExpansionSetCodeForImage("M19");
this.getAbilities().add(new BeginningOfEndStepTriggeredAbility(
new CreateTokenEffect(new CatToken2(), 3),
TargetController.YOU, false
));
}
}