Implemented Jace's Triumph

This commit is contained in:
Evan Kranzler 2019-04-12 20:16:25 -04:00
parent 90adde4feb
commit bd9cb672e1
4 changed files with 50 additions and 3 deletions

View file

@ -0,0 +1,42 @@
package mage.cards.j;
import mage.abilities.condition.Condition;
import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition;
import mage.abilities.decorator.ConditionalOneShotEffect;
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.filter.FilterPermanent;
import mage.filter.common.FilterControlledPlaneswalkerPermanent;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class JacesTriumph extends CardImpl {
private static final FilterPermanent filter = new FilterControlledPlaneswalkerPermanent(SubType.JACE);
private static final Condition condition = new PermanentsOnTheBattlefieldCondition(filter);
public JacesTriumph(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{2}{U}");
// Draw two cards. If you control a Jace planeswalker, draw three cards instead.
this.getSpellAbility().addEffect(new ConditionalOneShotEffect(
new DrawCardSourceControllerEffect(3), new DrawCardSourceControllerEffect(2),
condition, "Draw two cards. If you control a Jace planeswalker, draw three cards instead."
));
}
private JacesTriumph(final JacesTriumph card) {
super(card);
}
@Override
public JacesTriumph copy() {
return new JacesTriumph(this);
}
}

View file

@ -1,5 +1,6 @@
package mage.cards.l; package mage.cards.l;
import mage.abilities.condition.Condition;
import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition; import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition;
import mage.abilities.decorator.ConditionalOneShotEffect; import mage.abilities.decorator.ConditionalOneShotEffect;
import mage.abilities.dynamicvalue.common.StaticValue; import mage.abilities.dynamicvalue.common.StaticValue;
@ -21,7 +22,8 @@ import java.util.UUID;
public final class LilianasTriumph extends CardImpl { public final class LilianasTriumph extends CardImpl {
private static final FilterControlledPlaneswalkerPermanent filter private static final FilterControlledPlaneswalkerPermanent filter
= new FilterControlledPlaneswalkerPermanent(SubType.LILIANA, "a Liliana planeswalker"); = new FilterControlledPlaneswalkerPermanent(SubType.LILIANA);
private static final Condition condition = new PermanentsOnTheBattlefieldCondition(filter);
public LilianasTriumph(UUID ownerId, CardSetInfo setInfo) { public LilianasTriumph(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{1}{B}"); super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{1}{B}");
@ -33,8 +35,7 @@ public final class LilianasTriumph extends CardImpl {
this.getSpellAbility().addEffect(new ConditionalOneShotEffect( this.getSpellAbility().addEffect(new ConditionalOneShotEffect(
new DiscardEachPlayerEffect( new DiscardEachPlayerEffect(
new StaticValue(1), false, TargetController.OPPONENT new StaticValue(1), false, TargetController.OPPONENT
), new PermanentsOnTheBattlefieldCondition(filter), ), condition, "If you control a Liliana planeswalker, each opponent also discards a card."
"If you control a Liliana planeswalker, each opponent also discards a card."
)); ));
} }

View file

@ -1,5 +1,6 @@
package mage.cards.n; package mage.cards.n;
import mage.abilities.condition.Condition;
import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition; import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition;
import mage.abilities.decorator.ConditionalOneShotEffect; import mage.abilities.decorator.ConditionalOneShotEffect;
import mage.abilities.effects.common.search.SearchLibraryPutInHandEffect; import mage.abilities.effects.common.search.SearchLibraryPutInHandEffect;
@ -31,6 +32,8 @@ public final class NissasTriumph extends CardImpl {
filter.add(new SubtypePredicate(SubType.FOREST)); filter.add(new SubtypePredicate(SubType.FOREST));
} }
private static final Condition condition = new PermanentsOnTheBattlefieldCondition(filter2);
public NissasTriumph(UUID ownerId, CardSetInfo setInfo) { public NissasTriumph(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{G}{G}"); super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{G}{G}");

View file

@ -97,6 +97,7 @@ public final class WarOfTheSpark extends ExpansionSet {
cards.add(new SetCardInfo("Island", 253, Rarity.LAND, mage.cards.basiclands.Island.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Island", 253, Rarity.LAND, mage.cards.basiclands.Island.class, NON_FULL_USE_VARIOUS));
cards.add(new SetCardInfo("Island", 254, Rarity.LAND, mage.cards.basiclands.Island.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Island", 254, Rarity.LAND, mage.cards.basiclands.Island.class, NON_FULL_USE_VARIOUS));
cards.add(new SetCardInfo("Island", 255, Rarity.LAND, mage.cards.basiclands.Island.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Island", 255, Rarity.LAND, mage.cards.basiclands.Island.class, NON_FULL_USE_VARIOUS));
cards.add(new SetCardInfo("Jace's Triumph", 55, Rarity.UNCOMMON, mage.cards.j.JacesTriumph.class));
cards.add(new SetCardInfo("Jace, Wielder of Mysteries", 54, Rarity.RARE, mage.cards.j.JaceWielderOfMysteries.class)); cards.add(new SetCardInfo("Jace, Wielder of Mysteries", 54, Rarity.RARE, mage.cards.j.JaceWielderOfMysteries.class));
cards.add(new SetCardInfo("Jaya's Greeting", 136, Rarity.COMMON, mage.cards.j.JayasGreeting.class)); cards.add(new SetCardInfo("Jaya's Greeting", 136, Rarity.COMMON, mage.cards.j.JayasGreeting.class));
cards.add(new SetCardInfo("Jaya, Venerated Firemage", 135, Rarity.UNCOMMON, mage.cards.j.JayaVeneratedFiremage.class)); cards.add(new SetCardInfo("Jaya, Venerated Firemage", 135, Rarity.UNCOMMON, mage.cards.j.JayaVeneratedFiremage.class));