[ZNR] Added all modal double faces cards (#7012)

This commit is contained in:
Oleg Agafonov 2020-10-01 11:08:39 +04:00
parent 70514124a6
commit a73c9bddae
77 changed files with 957 additions and 1682 deletions

View file

@ -1,42 +0,0 @@
package mage.cards.a;
import mage.abilities.common.AsEntersBattlefieldAbility;
import mage.abilities.costs.common.PayLifeCost;
import mage.abilities.effects.common.TapSourceUnlessPaysEffect;
import mage.abilities.mana.BlackManaAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class AgadeemTheUndercrypt extends CardImpl {
public AgadeemTheUndercrypt(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.LAND}, "");
this.modalDFC = true;
this.nightCard = true;
// As Agadeem, the Undercrypt enters the battlefield, you may pay 3 life. If you don't, it enters the battlefield tapped.
this.addAbility(new AsEntersBattlefieldAbility(
new TapSourceUnlessPaysEffect(new PayLifeCost(3)),
"you may pay 3 life. If you don't, it enters the battlefield tapped"
));
// {T}: Add {B}.
this.addAbility(new BlackManaAbility());
}
private AgadeemTheUndercrypt(final AgadeemTheUndercrypt card) {
super(card);
}
@Override
public AgadeemTheUndercrypt copy() {
return new AgadeemTheUndercrypt(this);
}
}

View file

@ -2,11 +2,16 @@ package mage.cards.a;
import mage.MageObject;
import mage.abilities.Ability;
import mage.abilities.common.AsEntersBattlefieldAbility;
import mage.abilities.costs.common.PayLifeCost;
import mage.abilities.effects.common.ReturnFromGraveyardToBattlefieldTargetEffect;
import mage.abilities.effects.common.TapSourceUnlessPaysEffect;
import mage.abilities.mana.BlackManaAbility;
import mage.cards.Card;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.cards.ModalDoubleFacesCard;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.filter.FilterCard;
import mage.filter.common.FilterCreatureCard;
import mage.game.Game;
@ -18,22 +23,39 @@ import java.util.UUID;
import java.util.stream.Collectors;
/**
* @author TheElk801
* @author JayDi85
*/
public final class AgadeemsAwakening extends CardImpl {
public final class AgadeemsAwakening extends ModalDoubleFacesCard {
public AgadeemsAwakening(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{X}{B}{B}{B}");
super(ownerId, setInfo,
new CardType[]{CardType.SORCERY}, new SubType[]{}, "{X}{B}{B}{B}",
"Agadeem, the Undercrypt", new CardType[]{CardType.LAND}, new SubType[]{}, ""
);
this.modalDFC = true;
this.secondSideCardClazz = mage.cards.a.AgadeemTheUndercrypt.class;
// 1.
// Agadeem's Awakening
// Sorcery
// Return from your graveyard to the battlefield any number of target creature cards that each have a different converted mana cost X or less.
this.getSpellAbility().addEffect(new ReturnFromGraveyardToBattlefieldTargetEffect().setText(
this.getLeftHalfCard().getSpellAbility().addEffect(new ReturnFromGraveyardToBattlefieldTargetEffect().setText(
"return from your graveyard to the battlefield any number of target creature cards " +
"that each have a different converted mana cost X or less"
));
this.getSpellAbility().setTargetAdjuster(AgadeemsAwakeningAdjuster.instance);
this.getLeftHalfCard().getSpellAbility().setTargetAdjuster(AgadeemsAwakeningAdjuster.instance);
// 2.
// Agadeem, the Undercrypt
// Land
// As Agadeem, the Undercrypt enters the battlefield, you may pay 3 life. If you don't, it enters the battlefield tapped.
this.getRightHalfCard().addAbility(new AsEntersBattlefieldAbility(
new TapSourceUnlessPaysEffect(new PayLifeCost(3)),
"you may pay 3 life. If you don't, it enters the battlefield tapped"
));
// {T}: Add {B}.
this.getRightHalfCard().addAbility(new BlackManaAbility());
}
private AgadeemsAwakening(final AgadeemsAwakening card) {

View file

@ -22,15 +22,21 @@ public final class AkoumWarrior extends ModalDoubleFacesCard {
"Akoum Teeth", new CardType[]{CardType.LAND}, new SubType[]{}, ""
);
// 1.
// Akoum Warrior
// Creature Minotaur Warrior
this.getLeftHalfCard().setPT(new MageInt(4), new MageInt(5));
// Trample
this.getLeftHalfCard().addAbility(TrampleAbility.getInstance());
// 2.
// Akoum Teeth
// Land
// Akoum Teeth enters the battlefield tapped.
this.getRightHalfCard().addAbility(new EntersBattlefieldTappedAbility());
// {T}: Add {R}.
this.getRightHalfCard().addAbility(new RedManaAbility());
}

View file

@ -1,27 +1,44 @@
package mage.cards.b;
import mage.abilities.common.EntersBattlefieldTappedAbility;
import mage.abilities.effects.common.ReturnFromGraveyardToHandTargetEffect;
import mage.cards.CardImpl;
import mage.abilities.mana.GreenManaAbility;
import mage.cards.CardSetInfo;
import mage.cards.ModalDoubleFacesCard;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.target.common.TargetCardInYourGraveyard;
import java.util.UUID;
/**
* @author TheElk801
* @author JayDi85
*/
public final class BalaGedRecovery extends CardImpl {
public final class BalaGedRecovery extends ModalDoubleFacesCard {
public BalaGedRecovery(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{2}{G}");
super(ownerId, setInfo,
new CardType[]{CardType.SORCERY}, new SubType[]{}, "{2}{G}",
"Bala Ged Sanctuary", new CardType[]{CardType.LAND}, new SubType[]{}, ""
);
this.modalDFC = true;
this.secondSideCardClazz = mage.cards.b.BalaGedSanctuary.class;
// 1.
// Bala Ged Recovery
// Sorcery
// Return target card from your graveyard to your hand.
this.getSpellAbility().addEffect(new ReturnFromGraveyardToHandTargetEffect());
this.getSpellAbility().addTarget(new TargetCardInYourGraveyard());
this.getLeftHalfCard().getSpellAbility().addEffect(new ReturnFromGraveyardToHandTargetEffect());
this.getLeftHalfCard().getSpellAbility().addTarget(new TargetCardInYourGraveyard());
// 2.
// Bala Ged Sanctuary
// Land
// Bala Ged Sanctuary enters the battlefield tapped.
this.getRightHalfCard().addAbility(new EntersBattlefieldTappedAbility());
// {T}: Add {G}.
this.getRightHalfCard().addAbility(new GreenManaAbility());
}
private BalaGedRecovery(final BalaGedRecovery card) {

View file

@ -1,37 +0,0 @@
package mage.cards.b;
import mage.abilities.common.EntersBattlefieldTappedAbility;
import mage.abilities.mana.GreenManaAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class BalaGedSanctuary extends CardImpl {
public BalaGedSanctuary(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.LAND}, "");
this.modalDFC = true;
this.nightCard = true;
// Bala Ged Sanctuary enters the battlefield tapped.
this.addAbility(new EntersBattlefieldTappedAbility());
// {T}: Add {G}.
this.addAbility(new GreenManaAbility());
}
private BalaGedSanctuary(final BalaGedSanctuary card) {
super(card);
}
@Override
public BalaGedSanctuary copy() {
return new BalaGedSanctuary(this);
}
}

View file

@ -1,37 +0,0 @@
package mage.cards.b;
import mage.abilities.common.EntersBattlefieldTappedAbility;
import mage.abilities.mana.BlueManaAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class BeyeenCoast extends CardImpl {
public BeyeenCoast(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.LAND}, "");
this.modalDFC = true;
this.nightCard = true;
// Beyeen Coast enters the battlefield tapped.
this.addAbility(new EntersBattlefieldTappedAbility());
// {T}: Add {U}.
this.addAbility(new BlueManaAbility());
}
private BeyeenCoast(final BeyeenCoast card) {
super(card);
}
@Override
public BeyeenCoast copy() {
return new BeyeenCoast(this);
}
}

View file

@ -1,26 +1,43 @@
package mage.cards.b;
import mage.abilities.common.EntersBattlefieldTappedAbility;
import mage.abilities.effects.common.continuous.BoostOpponentsEffect;
import mage.cards.CardImpl;
import mage.abilities.mana.BlueManaAbility;
import mage.cards.CardSetInfo;
import mage.cards.ModalDoubleFacesCard;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.SubType;
import java.util.UUID;
/**
* @author TheElk801
* @author JayDi85
*/
public final class BeyeenVeil extends CardImpl {
public final class BeyeenVeil extends ModalDoubleFacesCard {
public BeyeenVeil(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{1}{U}");
super(ownerId, setInfo,
new CardType[]{CardType.INSTANT}, new SubType[]{}, "{1}{U}",
"Beyeen Coast", new CardType[]{CardType.LAND}, new SubType[]{}, ""
);
this.modalDFC = true;
this.secondSideCardClazz = mage.cards.b.BeyeenCoast.class;
// 1.
// Beyeen Veil
// Instant
// Creatures your opponents control get -2/-0 until end of turn.
this.getSpellAbility().addEffect(new BoostOpponentsEffect(-2, 0, Duration.EndOfTurn));
this.getLeftHalfCard().getSpellAbility().addEffect(new BoostOpponentsEffect(-2, 0, Duration.EndOfTurn));
// 2.
// Beyeen Coast
// Land
// Beyeen Coast enters the battlefield tapped.
this.getRightHalfCard().addAbility(new EntersBattlefieldTappedAbility());
// {T}: Add {U}.
this.getRightHalfCard().addAbility(new BlueManaAbility());
}
private BeyeenVeil(final BeyeenVeil card) {

View file

@ -1,37 +0,0 @@
package mage.cards.b;
import mage.abilities.common.EntersBattlefieldTappedAbility;
import mage.abilities.mana.BlackManaAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class BlackbloomBog extends CardImpl {
public BlackbloomBog(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.LAND}, "");
this.modalDFC = true;
this.nightCard = true;
// Blackbloom Bog enters the battlefield tapped.
this.addAbility(new EntersBattlefieldTappedAbility());
// {T}: Add {B}.
this.addAbility(new BlackManaAbility());
}
private BlackbloomBog(final BlackbloomBog card) {
super(card);
}
@Override
public BlackbloomBog copy() {
return new BlackbloomBog(this);
}
}

View file

@ -1,13 +1,15 @@
package mage.cards.b;
import mage.MageInt;
import mage.abilities.common.EntersBattlefieldTappedAbility;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.condition.common.CardsInOpponentGraveyardCondition;
import mage.abilities.decorator.ConditionalContinuousEffect;
import mage.abilities.effects.common.continuous.BoostSourceEffect;
import mage.abilities.keyword.MenaceAbility;
import mage.cards.CardImpl;
import mage.abilities.mana.BlackManaAbility;
import mage.cards.CardSetInfo;
import mage.cards.ModalDoubleFacesCard;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.SubType;
@ -15,30 +17,40 @@ import mage.constants.SubType;
import java.util.UUID;
/**
* @author TheElk801
* @author JayDi85
*/
public final class BlackbloomRogue extends CardImpl {
public final class BlackbloomRogue extends ModalDoubleFacesCard {
public BlackbloomRogue(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{B}");
super(ownerId, setInfo,
new CardType[]{CardType.CREATURE}, new SubType[]{SubType.HUMAN, SubType.ROGUE}, "{2}{B}",
"Blackbloom Bog", new CardType[]{CardType.LAND}, new SubType[]{}, ""
);
this.subtype.add(SubType.HUMAN);
this.subtype.add(SubType.ROGUE);
this.power = new MageInt(2);
this.toughness = new MageInt(3);
this.modalDFC = true;
this.secondSideCardClazz = mage.cards.b.BlackbloomBog.class;
// 1.
// Blackbloom Rogue {2}{B}
// Creature Human Rogue
this.getLeftHalfCard().setPT(new MageInt(2), new MageInt(3));
// Menace
this.addAbility(new MenaceAbility());
this.getLeftHalfCard().addAbility(new MenaceAbility());
// Blackbloom Rogue gets +3/+0 as long as an opponent has eight or more cards in their graveyard.
this.addAbility(new SimpleStaticAbility(new ConditionalContinuousEffect(
this.getLeftHalfCard().addAbility(new SimpleStaticAbility(new ConditionalContinuousEffect(
new BoostSourceEffect(3, 0, Duration.WhileOnBattlefield),
CardsInOpponentGraveyardCondition.EIGHT, "{this} gets +3/+0 as long as " +
"an opponent has eight or more cards in their graveyard"
)).addHint(CardsInOpponentGraveyardCondition.EIGHT.getHint()));
// 2.
// Blackbloom Bog
// Land
// Blackbloom Bog enters the battlefield tapped.
this.getRightHalfCard().addAbility(new EntersBattlefieldTappedAbility());
// {T}: Add {B}.
this.getRightHalfCard().addAbility(new BlackManaAbility());
}
private BlackbloomRogue(final BlackbloomRogue card) {

View file

@ -1,33 +0,0 @@
package mage.cards.b;
import mage.abilities.mana.WhiteManaAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class BoulderloftPathway extends CardImpl {
public BoulderloftPathway(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.LAND}, "");
this.modalDFC = true;
this.nightCard = true;
// {T}: Add {W}.
this.addAbility(new WhiteManaAbility());
}
private BoulderloftPathway(final BoulderloftPathway card) {
super(card);
}
@Override
public BoulderloftPathway copy() {
return new BoulderloftPathway(this);
}
}

View file

@ -1,25 +1,38 @@
package mage.cards.b;
import mage.abilities.mana.GreenManaAbility;
import mage.cards.CardImpl;
import mage.abilities.mana.WhiteManaAbility;
import mage.cards.CardSetInfo;
import mage.cards.ModalDoubleFacesCard;
import mage.constants.CardType;
import mage.constants.SubType;
import java.util.UUID;
/**
* @author TheElk801
* @author JayDi85
*/
public final class BranchloftPathway extends CardImpl {
public final class BranchloftPathway extends ModalDoubleFacesCard {
public BranchloftPathway(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.LAND}, "");
super(ownerId, setInfo,
new CardType[]{CardType.LAND}, new SubType[]{}, "",
"Boulderloft Pathway", new CardType[]{CardType.LAND}, new SubType[]{}, ""
);
this.modalDFC = true;
this.secondSideCardClazz = mage.cards.b.BoulderloftPathway.class;
// 1.
// Branchloft Pathway
// Land
// {T}: Add {G}.
this.addAbility(new GreenManaAbility());
this.getLeftHalfCard().addAbility(new GreenManaAbility());
// 2.
// Boulderloft Pathway
// Land
// {T}: Add {W}.
this.getRightHalfCard().addAbility(new WhiteManaAbility());
}
private BranchloftPathway(final BranchloftPathway card) {

View file

@ -1,25 +1,38 @@
package mage.cards.b;
import mage.abilities.mana.BlackManaAbility;
import mage.abilities.mana.WhiteManaAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.cards.ModalDoubleFacesCard;
import mage.constants.CardType;
import mage.constants.SubType;
import java.util.UUID;
/**
* @author TheElk801
* @author JayDi85
*/
public final class BrightclimbPathway extends CardImpl {
public final class BrightclimbPathway extends ModalDoubleFacesCard {
public BrightclimbPathway(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.LAND}, "");
super(ownerId, setInfo,
new CardType[]{CardType.LAND}, new SubType[]{}, "",
"Grimclimb Pathway", new CardType[]{CardType.LAND}, new SubType[]{}, ""
);
this.modalDFC = true;
this.secondSideCardClazz = mage.cards.g.GrimclimbPathway.class;
// 1.
// Brightclimb Pathway
// Land
// {T}: Add {W}.
this.addAbility(new WhiteManaAbility());
this.getLeftHalfCard().addAbility(new WhiteManaAbility());
// 2.
// Grimclimb Pathway
// Land
// {T}: Add {B}.
this.getRightHalfCard().addAbility(new BlackManaAbility());
}
private BrightclimbPathway(final BrightclimbPathway card) {

View file

@ -1,25 +1,38 @@
package mage.cards.c;
import mage.abilities.mana.BlackManaAbility;
import mage.abilities.mana.BlueManaAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.cards.ModalDoubleFacesCard;
import mage.constants.CardType;
import mage.constants.SubType;
import java.util.UUID;
/**
* @author TheElk801
* @author JayDi85
*/
public final class ClearwaterPathway extends CardImpl {
public final class ClearwaterPathway extends ModalDoubleFacesCard {
public ClearwaterPathway(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.LAND}, "");
super(ownerId, setInfo,
new CardType[]{CardType.LAND}, new SubType[]{}, "",
"Murkwater Pathway", new CardType[]{CardType.LAND}, new SubType[]{}, ""
);
this.modalDFC = true;
this.secondSideCardClazz = mage.cards.m.MurkwaterPathway.class;
// 1.
// Clearwater Pathway
// Land
// {T}: Add {U}.
this.addAbility(new BlueManaAbility());
this.getLeftHalfCard().addAbility(new BlueManaAbility());
// 2.
// Murkwater Pathway
// Land
// {T}: Add {B}.
this.getRightHalfCard().addAbility(new BlackManaAbility());
}
private ClearwaterPathway(final ClearwaterPathway card) {

View file

@ -1,26 +1,40 @@
package mage.cards.c;
import mage.abilities.keyword.TransformAbility;
import mage.abilities.mana.GreenManaAbility;
import mage.abilities.mana.RedManaAbility;
import mage.cards.CardSetInfo;
import mage.cards.ModalDoubleFacesCard;
import mage.constants.CardType;
import mage.constants.SubType;
import java.util.UUID;
import mage.abilities.keyword.TransformAbility;
import mage.abilities.mana.RedManaAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
/**
* @author TheElk801
* @author JayDi85
*/
public final class CragcrownPathway extends CardImpl {
public final class CragcrownPathway extends ModalDoubleFacesCard {
public CragcrownPathway(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.LAND}, "");
super(ownerId, setInfo,
new CardType[]{CardType.LAND}, new SubType[]{}, "",
"Timbercrown Pathway", new CardType[]{CardType.LAND}, new SubType[]{}, ""
);
this.secondSideCardClazz = mage.cards.t.TimbercrownPathway.class;
// 1.
// Cragcrown Pathway
// Land
// {T}: Add {R}.
this.addAbility(new RedManaAbility());
this.addAbility(new TransformAbility());
this.getLeftHalfCard().addAbility(new RedManaAbility());
this.getLeftHalfCard().addAbility(new TransformAbility());
// 2.
// Timbercrown Pathway
// Land
// {T}: Add {G}.
this.getRightHalfCard().addAbility(new GreenManaAbility());
}
private CragcrownPathway(final CragcrownPathway card) {

View file

@ -1,42 +0,0 @@
package mage.cards.e;
import mage.abilities.common.AsEntersBattlefieldAbility;
import mage.abilities.costs.common.PayLifeCost;
import mage.abilities.effects.common.TapSourceUnlessPaysEffect;
import mage.abilities.mana.WhiteManaAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class EmeriaShatteredSkyclave extends CardImpl {
public EmeriaShatteredSkyclave(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.LAND}, "");
this.modalDFC = true;
this.nightCard = true;
// As Emeria, Shattered Skyclave enters the battlefield, you may pay 3 life. If you don't, it enters the battlefield tapped.
this.addAbility(new AsEntersBattlefieldAbility(
new TapSourceUnlessPaysEffect(new PayLifeCost(3)),
"you may pay 3 life. If you don't, it enters the battlefield tapped"
));
// {T}: Add {W}.
this.addAbility(new WhiteManaAbility());
}
private EmeriaShatteredSkyclave(final EmeriaShatteredSkyclave card) {
super(card);
}
@Override
public EmeriaShatteredSkyclave copy() {
return new EmeriaShatteredSkyclave(this);
}
}

View file

@ -1,10 +1,14 @@
package mage.cards.e;
import mage.abilities.common.AsEntersBattlefieldAbility;
import mage.abilities.costs.common.PayLifeCost;
import mage.abilities.effects.common.CreateTokenEffect;
import mage.abilities.effects.common.TapSourceUnlessPaysEffect;
import mage.abilities.effects.common.continuous.GainAbilityAllEffect;
import mage.abilities.keyword.IndestructibleAbility;
import mage.cards.CardImpl;
import mage.abilities.mana.WhiteManaAbility;
import mage.cards.CardSetInfo;
import mage.cards.ModalDoubleFacesCard;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.SubType;
@ -16,9 +20,9 @@ import mage.game.permanent.token.AngelWarriorToken;
import java.util.UUID;
/**
* @author TheElk801
* @author JayDi85
*/
public final class EmeriasCall extends CardImpl {
public final class EmeriasCall extends ModalDoubleFacesCard {
private static final FilterPermanent filter
= new FilterControlledCreaturePermanent("Non-Angel creatures you control");
@ -28,14 +32,34 @@ public final class EmeriasCall extends CardImpl {
}
public EmeriasCall(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{4}{W}{W}{W}");
super(ownerId, setInfo,
new CardType[]{CardType.SORCERY}, new SubType[]{}, "{4}{W}{W}{W}",
"Emeria, Shattered Skyclave", new CardType[]{CardType.LAND}, new SubType[]{}, ""
);
// 1.
// Emeria's Call
// Sorcery
// Create two 4/4 white Angel Warrior creature tokens with flying. Non-Angel creatures you control gain indestructible until your next turn.
this.getSpellAbility().addEffect(new CreateTokenEffect(new AngelWarriorToken(), 2));
this.getSpellAbility().addEffect(new GainAbilityAllEffect(
this.getLeftHalfCard().getSpellAbility().addEffect(new CreateTokenEffect(new AngelWarriorToken(), 2));
this.getLeftHalfCard().getSpellAbility().addEffect(new GainAbilityAllEffect(
IndestructibleAbility.getInstance(),
Duration.UntilYourNextTurn, filter
));
// 2.
// Emeria, Shattered Skyclave
// Land
// As Emeria, Shattered Skyclave enters the battlefield, you may pay 3 life. If you don't, it enters the battlefield tapped.
this.getRightHalfCard().addAbility(new AsEntersBattlefieldAbility(
new TapSourceUnlessPaysEffect(new PayLifeCost(3)),
"you may pay 3 life. If you don't, it enters the battlefield tapped"
));
// {T}: Add {W}.
this.getRightHalfCard().addAbility(new WhiteManaAbility());
}
private EmeriasCall(final EmeriasCall card) {

View file

@ -4,9 +4,11 @@ import mage.MageInt;
import mage.MageObject;
import mage.abilities.Ability;
import mage.abilities.common.EntersBattlefieldAbility;
import mage.abilities.common.EntersBattlefieldTappedAbility;
import mage.abilities.effects.common.CopyPermanentEffect;
import mage.cards.CardImpl;
import mage.abilities.mana.BlueManaAbility;
import mage.cards.CardSetInfo;
import mage.cards.ModalDoubleFacesCard;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.filter.StaticFilters;
@ -17,27 +19,37 @@ import mage.util.functions.ApplyToPermanent;
import java.util.UUID;
/**
* @author TheElk801
* @author JayDi85
*/
public final class GlasspoolMimic extends CardImpl {
public final class GlasspoolMimic extends ModalDoubleFacesCard {
public GlasspoolMimic(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{U}");
super(ownerId, setInfo,
new CardType[]{CardType.CREATURE}, new SubType[]{SubType.SHAPESHIFTER, SubType.ROGUE}, "{2}{U}",
"Glasspool Shore", new CardType[]{CardType.LAND}, new SubType[]{}, ""
);
this.subtype.add(SubType.SHAPESHIFTER);
this.subtype.add(SubType.ROGUE);
this.power = new MageInt(0);
this.toughness = new MageInt(0);
this.modalDFC = true;
this.secondSideCardClazz = mage.cards.g.GlasspoolShore.class;
// 1.
// Glasspool Mimic
// Creature Shapeshifter Rogue
this.getLeftHalfCard().setPT(new MageInt(0), new MageInt(0));
// You may have Glasspool Mimic enter the battlefield as a copy of a creature you control, except it's a Shapeshifter Rogue in addition to its other types.
this.addAbility(new EntersBattlefieldAbility(
this.getLeftHalfCard().addAbility(new EntersBattlefieldAbility(
new CopyPermanentEffect(StaticFilters.FILTER_CONTROLLED_CREATURE, new GlasspoolMimicApplier()),
true, null, "You may have {this} enter the battlefield as a copy of " +
"a creature you control, except it's a Shapeshifter Rogue in addition to its other types.", ""
));
// 2.
// Glasspool Shore
// Land
// Glasspool Shore enters the battlefield tapped.
this.getRightHalfCard().addAbility(new EntersBattlefieldTappedAbility());
// {T}: Add {U}.
this.getRightHalfCard().addAbility(new BlueManaAbility());
}
private GlasspoolMimic(final GlasspoolMimic card) {

View file

@ -1,37 +0,0 @@
package mage.cards.g;
import mage.abilities.common.EntersBattlefieldTappedAbility;
import mage.abilities.mana.BlueManaAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class GlasspoolShore extends CardImpl {
public GlasspoolShore(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.LAND}, "");
this.modalDFC = true;
this.nightCard = true;
// Glasspool Shore enters the battlefield tapped.
this.addAbility(new EntersBattlefieldTappedAbility());
// {T}: Add {U}.
this.addAbility(new BlueManaAbility());
}
private GlasspoolShore(final GlasspoolShore card) {
super(card);
}
@Override
public GlasspoolShore copy() {
return new GlasspoolShore(this);
}
}

View file

@ -1,33 +0,0 @@
package mage.cards.g;
import mage.abilities.mana.BlackManaAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class GrimclimbPathway extends CardImpl {
public GrimclimbPathway(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.LAND}, "");
this.modalDFC = true;
this.nightCard = true;
// {T}: Add {B}.
this.addAbility(new BlackManaAbility());
}
private GrimclimbPathway(final GrimclimbPathway card) {
super(card);
}
@Override
public GrimclimbPathway copy() {
return new GrimclimbPathway(this);
}
}

View file

@ -1,37 +0,0 @@
package mage.cards.h;
import mage.abilities.common.EntersBattlefieldTappedAbility;
import mage.abilities.mana.BlackManaAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class HagraBroodpit extends CardImpl {
public HagraBroodpit(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.LAND}, "");
this.modalDFC = true;
this.nightCard = true;
// Hagra Broodpit enters the battlefield tapped.
this.addAbility(new EntersBattlefieldTappedAbility());
// {T}: Add {B}.
this.addAbility(new BlackManaAbility());
}
private HagraBroodpit(final HagraBroodpit card) {
super(card);
}
@Override
public HagraBroodpit copy() {
return new HagraBroodpit(this);
}
}

View file

@ -1,15 +1,18 @@
package mage.cards.h;
import mage.abilities.Ability;
import mage.abilities.common.EntersBattlefieldTappedAbility;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.condition.Condition;
import mage.abilities.effects.common.DestroyTargetEffect;
import mage.abilities.effects.common.cost.SpellCostReductionSourceEffect;
import mage.abilities.hint.ConditionHint;
import mage.abilities.hint.Hint;
import mage.cards.CardImpl;
import mage.abilities.mana.BlackManaAbility;
import mage.cards.CardSetInfo;
import mage.cards.ModalDoubleFacesCard;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.SuperType;
import mage.constants.Zone;
import mage.filter.FilterPermanent;
@ -23,27 +26,41 @@ import java.util.UUID;
/**
* @author TheElk801
*/
public final class HagraMauling extends CardImpl {
public final class HagraMauling extends ModalDoubleFacesCard {
private static final Hint hint = new ConditionHint(
HagraMaulingCondition.instance, "An opponent controls no basic lands"
);
public HagraMauling(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{2}{B}{B}");
super(ownerId, setInfo,
new CardType[]{CardType.INSTANT}, new SubType[]{}, "{2}{B}{B}",
"Hagra Broodpit", new CardType[]{CardType.LAND}, new SubType[]{}, ""
);
this.modalDFC = true;
this.secondSideCardClazz = mage.cards.h.HagraBroodpit.class;
// 1.
// Hagra Mauling
// Instant
// This spell costs {1} less to cast if an opponent controls no basic lands.
this.addAbility(new SimpleStaticAbility(
this.getLeftHalfCard().addAbility(new SimpleStaticAbility(
Zone.ALL, new SpellCostReductionSourceEffect(1, HagraMaulingCondition.instance).setCanWorksOnStackOnly(true)
).setRuleAtTheTop(true));
// Destroy target creature.
this.getSpellAbility().addEffect(new DestroyTargetEffect());
this.getSpellAbility().addTarget(new TargetCreaturePermanent());
this.getSpellAbility().addHint(hint);
this.getLeftHalfCard().getSpellAbility().addEffect(new DestroyTargetEffect());
this.getLeftHalfCard().getSpellAbility().addTarget(new TargetCreaturePermanent());
this.getLeftHalfCard().getSpellAbility().addHint(hint);
// 2.
// Hagra Broodpit
// Land
// Hagra Broodpit enters the battlefield tapped.
this.getRightHalfCard().addAbility(new EntersBattlefieldTappedAbility());
// {T}: Add {B}.
this.getRightHalfCard().addAbility(new BlackManaAbility());
}
private HagraMauling(final HagraMauling card) {

View file

@ -1,28 +1,45 @@
package mage.cards.j;
import mage.abilities.common.EntersBattlefieldTappedAbility;
import mage.abilities.costs.mana.GenericManaCost;
import mage.abilities.effects.common.CounterUnlessPaysEffect;
import mage.cards.CardImpl;
import mage.abilities.mana.BlueManaAbility;
import mage.cards.CardSetInfo;
import mage.cards.ModalDoubleFacesCard;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.target.TargetSpell;
import java.util.UUID;
/**
* @author TheElk801
* @author JayDi85
*/
public final class JwariDisruption extends CardImpl {
public final class JwariDisruption extends ModalDoubleFacesCard {
public JwariDisruption(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{1}{U}");
super(ownerId, setInfo,
new CardType[]{CardType.INSTANT}, new SubType[]{}, "{1}{U}",
"Jwari Ruins", new CardType[]{CardType.LAND}, new SubType[]{}, ""
);
this.modalDFC = true;
this.secondSideCardClazz = mage.cards.j.JwariDisruption.class;
// 1.
// Jwari Disruption
// Instant
// Counter target spell unless its controller pays {1}.
this.getSpellAbility().addEffect(new CounterUnlessPaysEffect(new GenericManaCost(1)));
this.getSpellAbility().addTarget(new TargetSpell());
this.getLeftHalfCard().getSpellAbility().addEffect(new CounterUnlessPaysEffect(new GenericManaCost(1)));
this.getLeftHalfCard().getSpellAbility().addTarget(new TargetSpell());
// 2.
// Jwari Ruins
// Land
// Jwari Ruins enters the battlefield tapped.
this.getRightHalfCard().addAbility(new EntersBattlefieldTappedAbility());
// {T}: Add {U}.
this.getRightHalfCard().addAbility(new BlueManaAbility());
}
private JwariDisruption(final JwariDisruption card) {

View file

@ -1,37 +0,0 @@
package mage.cards.j;
import mage.abilities.common.EntersBattlefieldTappedAbility;
import mage.abilities.mana.BlueManaAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class JwariRuins extends CardImpl {
public JwariRuins(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.LAND}, "");
this.modalDFC = true;
this.nightCard = true;
// Jwari Ruins enters the battlefield tapped.
this.addAbility(new EntersBattlefieldTappedAbility());
// {T}: Add {U}.
this.addAbility(new BlueManaAbility());
}
private JwariRuins(final JwariRuins card) {
super(card);
}
@Override
public JwariRuins copy() {
return new JwariRuins(this);
}
}

View file

@ -1,37 +0,0 @@
package mage.cards.k;
import mage.abilities.common.EntersBattlefieldTappedAbility;
import mage.abilities.mana.WhiteManaAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class KabiraPlateau extends CardImpl {
public KabiraPlateau(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.LAND}, "");
this.modalDFC = true;
this.nightCard = true;
// Kabira Plateau enters the battlefield tapped.
this.addAbility(new EntersBattlefieldTappedAbility());
// {T}: Add {W}.
this.addAbility(new WhiteManaAbility());
}
private KabiraPlateau(final KabiraPlateau card) {
super(card);
}
@Override
public KabiraPlateau copy() {
return new KabiraPlateau(this);
}
}

View file

@ -1,33 +1,53 @@
package mage.cards.k;
import mage.abilities.common.EntersBattlefieldTappedAbility;
import mage.abilities.dynamicvalue.DynamicValue;
import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount;
import mage.abilities.effects.common.DamageTargetEffect;
import mage.cards.CardImpl;
import mage.abilities.hint.ValueHint;
import mage.abilities.mana.WhiteManaAbility;
import mage.cards.CardSetInfo;
import mage.cards.ModalDoubleFacesCard;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.filter.StaticFilters;
import mage.target.common.TargetCreatureOrPlaneswalker;
import java.util.UUID;
/**
* @author TheElk801
* @author JayDi85
*/
public final class KabiraTakedown extends CardImpl {
public final class KabiraTakedown extends ModalDoubleFacesCard {
private static final DynamicValue xValue
= new PermanentsOnBattlefieldCount(StaticFilters.FILTER_CONTROLLED_CREATURES);
public KabiraTakedown(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{1}{W}");
super(ownerId, setInfo,
new CardType[]{CardType.INSTANT}, new SubType[]{}, "{1}{W}",
"Kabira Plateau", new CardType[]{CardType.LAND}, new SubType[]{}, ""
);
this.modalDFC = true;
this.secondSideCardClazz = mage.cards.k.KabiraPlateau.class;
// 1.
// Kabira Takedown
// Instant
// Kabira Takedown deals damage equal to the number of creatures you control to target creature or planeswalker.
this.getSpellAbility().addEffect(new DamageTargetEffect(xValue).setText("{this} deals damage equal to the number of creatures you control to target creature or planeswalker"));
this.getSpellAbility().addTarget(new TargetCreatureOrPlaneswalker());
this.getLeftHalfCard().getSpellAbility().addEffect(new DamageTargetEffect(xValue)
.setText("{this} deals damage equal to the number of creatures you control to target creature or planeswalker"));
this.getLeftHalfCard().getSpellAbility().addTarget(new TargetCreatureOrPlaneswalker());
this.getLeftHalfCard().getSpellAbility().addHint(new ValueHint("Creatures you control", xValue));
// 2.
// Kabira Plateau
// Land
// Kabira Plateau enters the battlefield tapped.
this.getRightHalfCard().addAbility(new EntersBattlefieldTappedAbility());
// {T}: Add {W}.
this.getRightHalfCard().addAbility(new WhiteManaAbility());
}
private KabiraTakedown(final KabiraTakedown card) {

View file

@ -1,10 +1,12 @@
package mage.cards.k;
import mage.MageInt;
import mage.abilities.common.EntersBattlefieldTappedAbility;
import mage.abilities.common.LandfallAbility;
import mage.abilities.effects.common.continuous.BoostSourceEffect;
import mage.cards.CardImpl;
import mage.abilities.mana.GreenManaAbility;
import mage.cards.CardSetInfo;
import mage.cards.ModalDoubleFacesCard;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.SubType;
@ -12,22 +14,33 @@ import mage.constants.SubType;
import java.util.UUID;
/**
* @author TheElk801
* @author JayDi85
*/
public final class KazanduMammoth extends CardImpl {
public final class KazanduMammoth extends ModalDoubleFacesCard {
public KazanduMammoth(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{G}{G}");
super(ownerId, setInfo,
new CardType[]{CardType.CREATURE}, new SubType[]{SubType.ELEPHANT}, "{1}{G}{G}",
"Kazandu Valley", new CardType[]{CardType.LAND}, new SubType[]{}, ""
);
this.subtype.add(SubType.ELEPHANT);
this.power = new MageInt(3);
this.toughness = new MageInt(3);
this.modalDFC = true;
this.secondSideCardClazz = mage.cards.k.KazanduValley.class;
// 1.
// Kazandu Mammoth
// Creature Elephant
this.getLeftHalfCard().setPT(new MageInt(3), new MageInt(3));
// Landfall Whenever a land enters the battlefield under your control, Kazandu Mammoth gets +2/+2 until end of turn.
this.addAbility(new LandfallAbility(new BoostSourceEffect(2, 2, Duration.EndOfTurn)));
this.getLeftHalfCard().addAbility(new LandfallAbility(new BoostSourceEffect(2, 2, Duration.EndOfTurn)));
// 2.
// Kazandu Valley
// Land
// Kazandu Valley enters the battlefield tapped.
this.getRightHalfCard().addAbility(new EntersBattlefieldTappedAbility());
// {T}: Add {G}.
this.getRightHalfCard().addAbility(new GreenManaAbility());
}
private KazanduMammoth(final KazanduMammoth card) {

View file

@ -1,37 +0,0 @@
package mage.cards.k;
import mage.abilities.common.EntersBattlefieldTappedAbility;
import mage.abilities.mana.GreenManaAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class KazanduValley extends CardImpl {
public KazanduValley(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.LAND}, "");
this.modalDFC = true;
this.nightCard = true;
// Kazandu Valley enters the battlefield tapped.
this.addAbility(new EntersBattlefieldTappedAbility());
// {T}: Add {G}.
this.addAbility(new GreenManaAbility());
}
private KazanduValley(final KazanduValley card) {
super(card);
}
@Override
public KazanduValley copy() {
return new KazanduValley(this);
}
}

View file

@ -1,37 +0,0 @@
package mage.cards.k;
import mage.abilities.common.EntersBattlefieldTappedAbility;
import mage.abilities.mana.RedManaAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class KazuulsCliffs extends CardImpl {
public KazuulsCliffs(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.LAND}, "");
this.modalDFC = true;
this.nightCard = true;
// Kazuul's Cliffs enters the battlefield tapped.
this.addAbility(new EntersBattlefieldTappedAbility());
// {T}: Add {R}.
this.addAbility(new RedManaAbility());
}
private KazuulsCliffs(final KazuulsCliffs card) {
super(card);
}
@Override
public KazuulsCliffs copy() {
return new KazuulsCliffs(this);
}
}

View file

@ -1,11 +1,14 @@
package mage.cards.k;
import mage.abilities.common.EntersBattlefieldTappedAbility;
import mage.abilities.costs.common.SacrificeTargetCost;
import mage.abilities.dynamicvalue.common.SacrificeCostCreaturesPower;
import mage.abilities.effects.common.DamageTargetEffect;
import mage.cards.CardImpl;
import mage.abilities.mana.RedManaAbility;
import mage.cards.CardSetInfo;
import mage.cards.ModalDoubleFacesCard;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.target.common.TargetAnyTarget;
import mage.target.common.TargetControlledCreaturePermanent;
@ -14,23 +17,37 @@ import java.util.UUID;
import static mage.filter.StaticFilters.FILTER_CONTROLLED_CREATURE_SHORT_TEXT;
/**
* @author TheElk801
* @author JayDi85
*/
public final class KazuulsFury extends CardImpl {
public final class KazuulsFury extends ModalDoubleFacesCard {
public KazuulsFury(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{2}{R}");
super(ownerId, setInfo,
new CardType[]{CardType.INSTANT}, new SubType[]{}, "{2}{R}",
"Kazuul's Cliffs", new CardType[]{CardType.LAND}, new SubType[]{}, ""
);
this.modalDFC = true;
this.secondSideCardClazz = mage.cards.k.KazuulsCliffs.class;
// 1.
// Kazuul's Fury
// Instant
// As an additional cost to cast this spell, sacrifice a creature.
this.getSpellAbility().addCost(new SacrificeTargetCost(new TargetControlledCreaturePermanent(FILTER_CONTROLLED_CREATURE_SHORT_TEXT)));
this.getLeftHalfCard().getSpellAbility().addCost(new SacrificeTargetCost(new TargetControlledCreaturePermanent(FILTER_CONTROLLED_CREATURE_SHORT_TEXT)));
// Kazuul's Fury deals damage equal to the sacrificed creatures power to any target.
this.getSpellAbility().addEffect(new DamageTargetEffect(SacrificeCostCreaturesPower.instance)
this.getLeftHalfCard().getSpellAbility().addEffect(new DamageTargetEffect(SacrificeCostCreaturesPower.instance)
.setText("{this} deals damage equal to the sacrificed creature's power to any target"));
this.getSpellAbility().addTarget(new TargetAnyTarget());
this.getLeftHalfCard().getSpellAbility().addTarget(new TargetAnyTarget());
// 2.
// Kazuul's Cliffs
// Land
// Kazuul's Cliffs enters the battlefield tapped.
this.getRightHalfCard().addAbility(new EntersBattlefieldTappedAbility());
// {T}: Add {R}.
this.getRightHalfCard().addAbility(new RedManaAbility());
}
private KazuulsFury(final KazuulsFury card) {

View file

@ -1,9 +1,12 @@
package mage.cards.k;
import mage.abilities.common.EntersBattlefieldTappedAbility;
import mage.abilities.effects.common.FightTargetsEffect;
import mage.cards.CardImpl;
import mage.abilities.mana.GreenManaAbility;
import mage.cards.CardSetInfo;
import mage.cards.ModalDoubleFacesCard;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.filter.StaticFilters;
import mage.target.common.TargetControlledCreaturePermanent;
import mage.target.common.TargetCreaturePermanent;
@ -11,20 +14,34 @@ import mage.target.common.TargetCreaturePermanent;
import java.util.UUID;
/**
* @author TheElk801
* @author JayDi85
*/
public final class KhalniAmbush extends CardImpl {
public final class KhalniAmbush extends ModalDoubleFacesCard {
public KhalniAmbush(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{2}{G}");
super(ownerId, setInfo,
new CardType[]{CardType.INSTANT}, new SubType[]{}, "{2}{G}",
"Khalni Territory", new CardType[]{CardType.LAND}, new SubType[]{}, ""
);
this.modalDFC = true;
this.secondSideCardClazz = mage.cards.k.KhalniTerritory.class;
// 1.
// Khalni Ambush
// Instant
// Target creature you control fights target creature you don't control.
this.getSpellAbility().addEffect(new FightTargetsEffect());
this.getSpellAbility().addTarget(new TargetControlledCreaturePermanent());
this.getSpellAbility().addTarget(new TargetCreaturePermanent(StaticFilters.FILTER_CREATURE_YOU_DONT_CONTROL));
this.getLeftHalfCard().getSpellAbility().addEffect(new FightTargetsEffect());
this.getLeftHalfCard().getSpellAbility().addTarget(new TargetControlledCreaturePermanent());
this.getLeftHalfCard().getSpellAbility().addTarget(new TargetCreaturePermanent(StaticFilters.FILTER_CREATURE_YOU_DONT_CONTROL));
// 2.
// Khalni Territory
// Land
// Khalni Territory enters the battlefield tapped.
this.getRightHalfCard().addAbility(new EntersBattlefieldTappedAbility());
// {T}: Add {G}.
this.getRightHalfCard().addAbility(new GreenManaAbility());
}
private KhalniAmbush(final KhalniAmbush card) {

View file

@ -1,37 +0,0 @@
package mage.cards.k;
import mage.abilities.common.EntersBattlefieldTappedAbility;
import mage.abilities.mana.GreenManaAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class KhalniTerritory extends CardImpl {
public KhalniTerritory(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.LAND}, "");
this.modalDFC = true;
this.nightCard = true;
// Khalni Territory enters the battlefield tapped.
this.addAbility(new EntersBattlefieldTappedAbility());
// {T}: Add {G}.
this.addAbility(new GreenManaAbility());
}
private KhalniTerritory(final KhalniTerritory card) {
super(card);
}
@Override
public KhalniTerritory copy() {
return new KhalniTerritory(this);
}
}

View file

@ -1,33 +0,0 @@
package mage.cards.l;
import mage.abilities.mana.RedManaAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class LavaglidePathway extends CardImpl {
public LavaglidePathway(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.LAND}, "");
this.modalDFC = true;
this.nightCard = true;
// {T}: Add {R}.
this.addAbility(new RedManaAbility());
}
private LavaglidePathway(final LavaglidePathway card) {
super(card);
}
@Override
public LavaglidePathway copy() {
return new LavaglidePathway(this);
}
}

View file

@ -1,37 +0,0 @@
package mage.cards.m;
import mage.abilities.common.EntersBattlefieldTappedAbility;
import mage.abilities.mana.WhiteManaAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class MakindiMesas extends CardImpl {
public MakindiMesas(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.LAND}, "");
this.modalDFC = true;
this.nightCard = true;
// Makindi Mesas enters the battlefield tapped.
this.addAbility(new EntersBattlefieldTappedAbility());
// {T}: Add {W}.
this.addAbility(new WhiteManaAbility());
}
private MakindiMesas(final MakindiMesas card) {
super(card);
}
@Override
public MakindiMesas copy() {
return new MakindiMesas(this);
}
}

View file

@ -1,26 +1,43 @@
package mage.cards.m;
import mage.abilities.common.EntersBattlefieldTappedAbility;
import mage.abilities.effects.common.continuous.BoostControlledEffect;
import mage.cards.CardImpl;
import mage.abilities.mana.WhiteManaAbility;
import mage.cards.CardSetInfo;
import mage.cards.ModalDoubleFacesCard;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.SubType;
import java.util.UUID;
/**
* @author TheElk801
* @author JayDi85
*/
public final class MakindiStampede extends CardImpl {
public final class MakindiStampede extends ModalDoubleFacesCard {
public MakindiStampede(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{3}{W}{W}");
super(ownerId, setInfo,
new CardType[]{CardType.SORCERY}, new SubType[]{}, "{3}{W}{W}",
"Makindi Mesas", new CardType[]{CardType.LAND}, new SubType[]{}, ""
);
this.modalDFC = true;
this.secondSideCardClazz = mage.cards.m.MakindiMesas.class;
// 1.
// Makindi Stampede
// Sorcery
// Creatures you control get +2/+2 until end of turn.
this.getSpellAbility().addEffect(new BoostControlledEffect(2, 2, Duration.EndOfTurn));
this.getLeftHalfCard().getSpellAbility().addEffect(new BoostControlledEffect(2, 2, Duration.EndOfTurn));
// 2.
// Makindi Mesas
// Land
// Makindi Mesas enters the battlefield tapped.
this.getRightHalfCard().addAbility(new EntersBattlefieldTappedAbility());
// {T}: Add {W}.
this.getRightHalfCard().addAbility(new WhiteManaAbility());
}
private MakindiStampede(final MakindiStampede card) {

View file

@ -1,37 +0,0 @@
package mage.cards.m;
import mage.abilities.common.EntersBattlefieldTappedAbility;
import mage.abilities.mana.BlackManaAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class MalakirMire extends CardImpl {
public MalakirMire(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.LAND}, "");
this.modalDFC = true;
this.nightCard = true;
// Malakir Mire enters the battlefield tapped.
this.addAbility(new EntersBattlefieldTappedAbility());
// {T}: Add {B}.
this.addAbility(new BlackManaAbility());
}
private MalakirMire(final MalakirMire card) {
super(card);
}
@Override
public MalakirMire copy() {
return new MalakirMire(this);
}
}

View file

@ -1,35 +1,52 @@
package mage.cards.m;
import mage.abilities.Ability;
import mage.abilities.common.DiesSourceTriggeredAbility;
import mage.abilities.effects.OneShotEffect;
import mage.abilities.common.EntersBattlefieldTappedAbility;
import mage.abilities.effects.common.LoseLifeSourceControllerEffect;
import mage.abilities.effects.common.ReturnSourceFromGraveyardToBattlefieldEffect;
import mage.abilities.effects.common.continuous.GainAbilityTargetEffect;
import mage.cards.CardImpl;
import mage.abilities.mana.BlackManaAbility;
import mage.cards.CardSetInfo;
import mage.cards.ModalDoubleFacesCard;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.Outcome;
import mage.game.Game;
import mage.players.Player;
import mage.constants.SubType;
import mage.target.common.TargetCreaturePermanent;
import java.util.UUID;
/**
* @author TheElk801
* @author JayDi85
*/
public final class MalakirRebirth extends CardImpl {
public final class MalakirRebirth extends ModalDoubleFacesCard {
public MalakirRebirth(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{B}");
super(ownerId, setInfo,
new CardType[]{CardType.INSTANT}, new SubType[]{}, "{B}",
"Malakir Mire", new CardType[]{CardType.LAND}, new SubType[]{}, ""
);
this.modalDFC = true;
this.secondSideCardClazz = mage.cards.m.MalakirMire.class;
// 1.
// Malakir Rebirth
// Instant
// Choose target creature. You lose 2 life. Until end of turn, that creature gains "When this creature dies, return it to the battlefield tapped under its owner's control."
this.getSpellAbility().addEffect(new MalakirRebirthEffect());
this.getSpellAbility().addTarget(new TargetCreaturePermanent());
this.getLeftHalfCard().getSpellAbility().addEffect(new LoseLifeSourceControllerEffect(2)
.setText("Choose target creature. You lose 2 life"));
this.getLeftHalfCard().getSpellAbility().addEffect(new GainAbilityTargetEffect(new DiesSourceTriggeredAbility(
new ReturnSourceFromGraveyardToBattlefieldEffect(true, true), false
), Duration.EndOfTurn).setText("Until end of turn, that creature gains \"When this creature dies, return it to the battlefield tapped under its owner's control.\""));
this.getLeftHalfCard().getSpellAbility().addTarget(new TargetCreaturePermanent());
// 2.
// Malakir Mire
// Land
// Malakir Mire enters the battlefield tapped.
this.getRightHalfCard().addAbility(new EntersBattlefieldTappedAbility());
// {T}: Add {B}.
this.getRightHalfCard().addAbility(new BlackManaAbility());
}
private MalakirRebirth(final MalakirRebirth card) {
@ -40,31 +57,4 @@ public final class MalakirRebirth extends CardImpl {
public MalakirRebirth copy() {
return new MalakirRebirth(this);
}
}
class MalakirRebirthEffect extends OneShotEffect {
MalakirRebirthEffect() {
super(Outcome.Benefit);
staticText = "Choose target creature. You lose 2 life. Until end of turn, " +
"that creature gains \"When this creature dies, return it to the battlefield tapped under its owner's control.\"";
}
private MalakirRebirthEffect(final MalakirRebirthEffect effect) {
super(effect);
}
@Override
public MalakirRebirthEffect copy() {
return new MalakirRebirthEffect(this);
}
@Override
public boolean apply(Game game, Ability source) {
game.addEffect(new GainAbilityTargetEffect(new DiesSourceTriggeredAbility(
new ReturnSourceFromGraveyardToBattlefieldEffect(true, true), false
), Duration.EndOfTurn), source);
Player player = game.getPlayer(source.getControllerId());
return player != null && player.loseLife(2, game, false) > 0;
}
}
}

View file

@ -1,33 +0,0 @@
package mage.cards.m;
import mage.abilities.mana.BlackManaAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class MurkwaterPathway extends CardImpl {
public MurkwaterPathway(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.LAND}, "");
this.modalDFC = true;
this.nightCard = true;
// {T}: Add {B}.
this.addAbility(new BlackManaAbility());
}
private MurkwaterPathway(final MurkwaterPathway card) {
super(card);
}
@Override
public MurkwaterPathway copy() {
return new MurkwaterPathway(this);
}
}

View file

@ -1,25 +1,39 @@
package mage.cards.n;
import mage.abilities.mana.RedManaAbility;
import mage.abilities.mana.WhiteManaAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.cards.ModalDoubleFacesCard;
import mage.constants.CardType;
import mage.constants.SubType;
import java.util.UUID;
/**
* @author TheElk801
* @author JayDi85
*/
public final class NeedlevergePathway extends CardImpl {
public final class NeedlevergePathway extends ModalDoubleFacesCard {
public NeedlevergePathway(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.LAND}, "");
super(ownerId, setInfo,
new CardType[]{CardType.LAND}, new SubType[]{}, "",
"Pillarverge Pathway", new CardType[]{CardType.LAND}, new SubType[]{}, ""
);
this.modalDFC = true;
this.secondSideCardClazz = mage.cards.p.PillarvergePathway.class;
// 1.
// Needleverge Pathway
// Land
// {T}: Add {R}.
this.addAbility(new RedManaAbility());
this.getLeftHalfCard().addAbility(new RedManaAbility());
// 2.
// Pillarverge Pathway
// Land
// {T}: Add {W}.
this.getRightHalfCard().addAbility(new WhiteManaAbility());
}
private NeedlevergePathway(final NeedlevergePathway card) {

View file

@ -1,26 +1,44 @@
package mage.cards.o;
import mage.abilities.common.EntersBattlefieldTappedAbility;
import mage.abilities.effects.common.DestroyAllEffect;
import mage.abilities.mana.WhiteManaAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.cards.ModalDoubleFacesCard;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.filter.StaticFilters;
import java.util.UUID;
/**
* @author TheElk801
* @author JayDi85
*/
public final class OnduInversion extends CardImpl {
public final class OnduInversion extends ModalDoubleFacesCard {
public OnduInversion(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{6}{W}{W}");
super(ownerId, setInfo,
new CardType[]{CardType.SORCERY}, new SubType[]{}, "{6}{W}{W}",
"Ondu Skyruins", new CardType[]{CardType.LAND}, new SubType[]{}, ""
);
this.modalDFC = true;
this.secondSideCardClazz = mage.cards.o.OnduInversion.class;
// 1.
// Ondu Inversion
// Sorcery
// Destroy all nonland permanents.
this.getSpellAbility().addEffect(new DestroyAllEffect(StaticFilters.FILTER_PERMANENTS_NON_LAND));
this.getLeftHalfCard().getSpellAbility().addEffect(new DestroyAllEffect(StaticFilters.FILTER_PERMANENTS_NON_LAND));
// 2.
// Ondu Skyruins
// Land
// Ondu Skyruins enters the battlefield tapped.
this.getRightHalfCard().addAbility(new EntersBattlefieldTappedAbility());
// {T}: Add {W}.
this.getRightHalfCard().addAbility(new WhiteManaAbility());
}
private OnduInversion(final OnduInversion card) {

View file

@ -1,37 +0,0 @@
package mage.cards.o;
import mage.abilities.common.EntersBattlefieldTappedAbility;
import mage.abilities.mana.WhiteManaAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class OnduSkyruins extends CardImpl {
public OnduSkyruins(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.LAND}, "");
this.modalDFC = true;
this.nightCard = true;
// Ondu Skyruins enters the battlefield tapped.
this.addAbility(new EntersBattlefieldTappedAbility());
// {T}: Add {W}.
this.addAbility(new WhiteManaAbility());
}
private OnduSkyruins(final OnduSkyruins card) {
super(card);
}
@Override
public OnduSkyruins copy() {
return new OnduSkyruins(this);
}
}

View file

@ -1,37 +0,0 @@
package mage.cards.p;
import mage.abilities.common.EntersBattlefieldTappedAbility;
import mage.abilities.mana.BlackManaAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class PelakkaCaverns extends CardImpl {
public PelakkaCaverns(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.LAND}, "");
this.modalDFC = true;
this.nightCard = true;
// Pelakka Caverns enters the battlefield tapped.
this.addAbility(new EntersBattlefieldTappedAbility());
// {T}: Add {B}.
this.addAbility(new BlackManaAbility());
}
private PelakkaCaverns(final PelakkaCaverns card) {
super(card);
}
@Override
public PelakkaCaverns copy() {
return new PelakkaCaverns(this);
}
}

View file

@ -1,10 +1,14 @@
package mage.cards.p;
import mage.abilities.common.EntersBattlefieldTappedAbility;
import mage.abilities.effects.common.discard.DiscardCardYouChooseTargetEffect;
import mage.abilities.mana.BlackManaAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.cards.ModalDoubleFacesCard;
import mage.constants.CardType;
import mage.constants.ComparisonType;
import mage.constants.SubType;
import mage.constants.TargetController;
import mage.filter.FilterCard;
import mage.filter.predicate.mageobject.ConvertedManaCostPredicate;
@ -13,9 +17,9 @@ import mage.target.common.TargetOpponent;
import java.util.UUID;
/**
* @author TheElk801
* @author JayDi85
*/
public final class PelakkaPredation extends CardImpl {
public final class PelakkaPredation extends ModalDoubleFacesCard {
private static final FilterCard filter = new FilterCard("a card from it with converted mana cost 3 or greater");
@ -24,14 +28,28 @@ public final class PelakkaPredation extends CardImpl {
}
public PelakkaPredation(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{2}{B}");
super(ownerId, setInfo,
new CardType[]{CardType.SORCERY}, new SubType[]{}, "{2}{B}",
"Pelakka Caverns", new CardType[]{CardType.LAND}, new SubType[]{}, ""
);
this.modalDFC = true;
this.secondSideCardClazz = mage.cards.p.PelakkaCaverns.class;
// 1.
// Pelakka Predation
// Sorcery
// Target opponent reveals their hand. You may choose a card from it with converted mana cost 3 or greater. That player discards that card.
this.getSpellAbility().addEffect(new DiscardCardYouChooseTargetEffect(filter, TargetController.ANY));
this.getSpellAbility().addTarget(new TargetOpponent());
this.getLeftHalfCard().getSpellAbility().addEffect(new DiscardCardYouChooseTargetEffect(filter, TargetController.ANY));
this.getLeftHalfCard().getSpellAbility().addTarget(new TargetOpponent());
// 2.
// Pelakka Caverns
// Land
// Pelakka Caverns enters the battlefield tapped.
this.getRightHalfCard().addAbility(new EntersBattlefieldTappedAbility());
// {T}: Add {B}.
this.getRightHalfCard().addAbility(new BlackManaAbility());
}
private PelakkaPredation(final PelakkaPredation card) {

View file

@ -1,33 +0,0 @@
package mage.cards.p;
import mage.abilities.mana.WhiteManaAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class PillarvergePathway extends CardImpl {
public PillarvergePathway(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.LAND}, "");
this.modalDFC = true;
this.nightCard = true;
// {T}: Add {W}.
this.addAbility(new WhiteManaAbility());
}
private PillarvergePathway(final PillarvergePathway card) {
super(card);
}
@Override
public PillarvergePathway copy() {
return new PillarvergePathway(this);
}
}

View file

@ -3,23 +3,36 @@ package mage.cards.r;
import mage.abilities.mana.RedManaAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.cards.ModalDoubleFacesCard;
import mage.constants.CardType;
import mage.constants.SubType;
import java.util.UUID;
/**
* @author TheElk801
* @author JayDi85
*/
public final class RiverglidePathway extends CardImpl {
public final class RiverglidePathway extends ModalDoubleFacesCard {
public RiverglidePathway(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.LAND}, "");
super(ownerId, setInfo,
new CardType[]{CardType.LAND}, new SubType[]{}, "",
"Lavaglide Pathway", new CardType[]{CardType.LAND}, new SubType[]{}, ""
);
this.modalDFC = true;
this.secondSideCardClazz = mage.cards.l.LavaglidePathway.class;
// 1.
// Riverglide Pathway
// Land
// {T}: Add {U}.
this.addAbility(new RedManaAbility());
this.getLeftHalfCard().addAbility(new RedManaAbility());
// 2.
// Lavaglide Pathway
// Land
// {T}: Add {R}.
this.getRightHalfCard().addAbility(new RedManaAbility());
}
private RiverglidePathway(final RiverglidePathway card) {

View file

@ -1,42 +0,0 @@
package mage.cards.s;
import mage.abilities.common.AsEntersBattlefieldAbility;
import mage.abilities.costs.common.PayLifeCost;
import mage.abilities.effects.common.TapSourceUnlessPaysEffect;
import mage.abilities.mana.BlueManaAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class SeaGateReborn extends CardImpl {
public SeaGateReborn(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.LAND}, "");
this.modalDFC = true;
this.nightCard = true;
// As Sea Gate, Reborn enters the battlefield, you may pay 3 life. If you don't, it enters the battlefield tapped.
this.addAbility(new AsEntersBattlefieldAbility(
new TapSourceUnlessPaysEffect(new PayLifeCost(3)),
"you may pay 3 life. If you don't, it enters the battlefield tapped"
));
// {T}: Add {U}.
this.addAbility(new BlueManaAbility());
}
private SeaGateReborn(final SeaGateReborn card) {
super(card);
}
@Override
public SeaGateReborn copy() {
return new SeaGateReborn(this);
}
}

View file

@ -1,38 +1,60 @@
package mage.cards.s;
import mage.abilities.common.AsEntersBattlefieldAbility;
import mage.abilities.costs.common.PayLifeCost;
import mage.abilities.dynamicvalue.AdditiveDynamicValue;
import mage.abilities.dynamicvalue.DynamicValue;
import mage.abilities.dynamicvalue.common.CardsInControllerHandCount;
import mage.abilities.dynamicvalue.common.StaticValue;
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
import mage.abilities.effects.common.TapSourceUnlessPaysEffect;
import mage.abilities.effects.common.continuous.MaximumHandSizeControllerEffect;
import mage.cards.CardImpl;
import mage.abilities.mana.BlueManaAbility;
import mage.cards.CardSetInfo;
import mage.cards.ModalDoubleFacesCard;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.SubType;
import java.util.UUID;
/**
* @author TheElk801
* @author JayDi85
*/
public final class SeaGateRestoration extends CardImpl {
public final class SeaGateRestoration extends ModalDoubleFacesCard {
private static final DynamicValue xValue = new AdditiveDynamicValue(CardsInControllerHandCount.instance, StaticValue.get(1));
public SeaGateRestoration(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{4}{U}{U}{U}");
super(ownerId, setInfo,
new CardType[]{CardType.SORCERY}, new SubType[]{}, "{4}{U}{U}{U}",
"Sea Gate, Reborn", new CardType[]{CardType.LAND}, new SubType[]{}, ""
);
this.modalDFC = true;
this.secondSideCardClazz = mage.cards.s.SeaGateReborn.class;
// 1.
// Sea Gate Restoration
// Sorcery
// Draw cards equal to the number of cards in your hand plus one. You have no maximum hand size for the rest of the game.
this.getSpellAbility().addEffect(new DrawCardSourceControllerEffect(xValue)
this.getLeftHalfCard().getSpellAbility().addEffect(new DrawCardSourceControllerEffect(xValue)
.setText("Draw cards equal to the number of cards in your hand plus one."));
this.getSpellAbility().addEffect(new MaximumHandSizeControllerEffect(
this.getLeftHalfCard().getSpellAbility().addEffect(new MaximumHandSizeControllerEffect(
Integer.MAX_VALUE, Duration.EndOfGame,
MaximumHandSizeControllerEffect.HandSizeModification.SET
));
// 2.
// Sea Gate, Reborn
// Land
// As Sea Gate, Reborn enters the battlefield, you may pay 3 life. If you don't, it enters the battlefield tapped.
this.getRightHalfCard().addAbility(new AsEntersBattlefieldAbility(
new TapSourceUnlessPaysEffect(new PayLifeCost(3)),
"you may pay 3 life. If you don't, it enters the battlefield tapped"
));
// {T}: Add {U}.
this.getRightHalfCard().addAbility(new BlueManaAbility());
}
private SeaGateRestoration(final SeaGateRestoration card) {

View file

@ -1,37 +0,0 @@
package mage.cards.s;
import mage.abilities.common.EntersBattlefieldTappedAbility;
import mage.abilities.mana.WhiteManaAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class SejiriGlacier extends CardImpl {
public SejiriGlacier(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.LAND}, "");
this.modalDFC = true;
this.nightCard = true;
// Sejiri Glacier enters the battlefield tapped.
this.addAbility(new EntersBattlefieldTappedAbility());
// {T}: Add {W}.
this.addAbility(new WhiteManaAbility());
}
private SejiriGlacier(final SejiriGlacier card) {
super(card);
}
@Override
public SejiriGlacier copy() {
return new SejiriGlacier(this);
}
}

View file

@ -1,28 +1,46 @@
package mage.cards.s;
import mage.abilities.common.EntersBattlefieldTappedAbility;
import mage.abilities.effects.common.continuous.GainProtectionFromColorTargetEffect;
import mage.abilities.mana.WhiteManaAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.cards.ModalDoubleFacesCard;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.SubType;
import mage.target.common.TargetControlledCreaturePermanent;
import java.util.UUID;
/**
* @author TheElk801
* @author JayDi85
*/
public final class SejiriShelter extends CardImpl {
public final class SejiriShelter extends ModalDoubleFacesCard {
public SejiriShelter(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{1}{W}");
super(ownerId, setInfo,
new CardType[]{CardType.INSTANT}, new SubType[]{}, "{1}{W}",
"Sejiri Glacier", new CardType[]{CardType.LAND}, new SubType[]{}, ""
);
this.modalDFC = true;
this.secondSideCardClazz = mage.cards.s.SejiriGlacier.class;
// 1.
// Sejiri Shelter
// Instant
// Target creature you control gains protection from the color of your choice until end of turn.
this.getSpellAbility().addEffect(new GainProtectionFromColorTargetEffect(Duration.EndOfTurn));
this.getSpellAbility().addTarget(new TargetControlledCreaturePermanent());
this.getLeftHalfCard().getSpellAbility().addEffect(new GainProtectionFromColorTargetEffect(Duration.EndOfTurn));
this.getLeftHalfCard().getSpellAbility().addTarget(new TargetControlledCreaturePermanent());
// 2.
// Sejiri Glacier
// Land
// Sejiri Glacier enters the battlefield tapped.
this.getRightHalfCard().addAbility(new EntersBattlefieldTappedAbility());
// {T}: Add {W}.
this.getRightHalfCard().addAbility(new WhiteManaAbility());
}
private SejiriShelter(final SejiriShelter card) {

View file

@ -1,15 +1,21 @@
package mage.cards.s;
import mage.abilities.Ability;
import mage.abilities.common.AsEntersBattlefieldAbility;
import mage.abilities.condition.Condition;
import mage.abilities.costs.common.PayLifeCost;
import mage.abilities.decorator.ConditionalOneShotEffect;
import mage.abilities.dynamicvalue.DynamicValue;
import mage.abilities.dynamicvalue.MultipliedValue;
import mage.abilities.dynamicvalue.common.ManacostVariableValue;
import mage.abilities.effects.common.DamageMultiEffect;
import mage.abilities.effects.common.TapSourceUnlessPaysEffect;
import mage.abilities.mana.RedManaAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.cards.ModalDoubleFacesCard;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.game.Game;
import mage.target.TargetAmount;
import mage.target.common.TargetCreatureOrPlaneswalkerAmount;
@ -20,21 +26,41 @@ import java.util.UUID;
/**
* @author TheElk801
*/
public final class ShatterskullSmashing extends CardImpl {
public final class ShatterskullSmashing extends ModalDoubleFacesCard {
private static final DynamicValue xValue = new MultipliedValue(ManacostVariableValue.instance, 2);
public ShatterskullSmashing(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{X}{R}{R}");
super(ownerId, setInfo,
new CardType[]{CardType.SORCERY}, new SubType[]{}, "{X}{R}{R}",
"Shatterskull, the Hammer Pass", new CardType[]{CardType.LAND}, new SubType[]{}, ""
);
// 1.
// Shatterskull Smashing
// Sorcery
// Shatterskull Smashing deals X damage divided as you choose among up to two target creatures and/or planeswalkers. If X is 6 or more, Shatterskull Smashing deals twice X damage divided as you choose among them instead.
this.getSpellAbility().addEffect(new ConditionalOneShotEffect(
this.getLeftHalfCard().getSpellAbility().addEffect(new ConditionalOneShotEffect(
new DamageMultiEffect(xValue), new DamageMultiEffect(ManacostVariableValue.instance),
ShatterskullSmashingCondition.instance, "{this} deals X damage divided as you choose " +
"among up to two target creatures and/or planeswalkers. If X is 6 or more, " +
"{this} deals twice X damage divided as you choose among them instead."
));
this.getSpellAbility().setTargetAdjuster(ShatterskullSmashingAdjuster.instance);
this.getLeftHalfCard().getSpellAbility().setTargetAdjuster(ShatterskullSmashingAdjuster.instance);
// 2.
// Shatterskull, the Hammer Pass
// Land
// As Shatterskull, the Hammer Pass enters the battlefield, you may pay 3 life. If you don't, it enters the battlefield tapped.
this.getRightHalfCard().addAbility(new AsEntersBattlefieldAbility(
new TapSourceUnlessPaysEffect(new PayLifeCost(3)),
"you may pay 3 life. If you don't, it enters the battlefield tapped"
));
// {T}: Add {R}.
this.getRightHalfCard().addAbility(new RedManaAbility());
}
private ShatterskullSmashing(final ShatterskullSmashing card) {

View file

@ -1,42 +0,0 @@
package mage.cards.s;
import mage.abilities.common.AsEntersBattlefieldAbility;
import mage.abilities.costs.common.PayLifeCost;
import mage.abilities.effects.common.TapSourceUnlessPaysEffect;
import mage.abilities.mana.RedManaAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class ShatterskullTheHammerPass extends CardImpl {
public ShatterskullTheHammerPass(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.LAND}, "");
this.modalDFC = true;
this.nightCard = true;
// As Shatterskull, the Hammer Pass enters the battlefield, you may pay 3 life. If you don't, it enters the battlefield tapped.
this.addAbility(new AsEntersBattlefieldAbility(
new TapSourceUnlessPaysEffect(new PayLifeCost(3)),
"you may pay 3 life. If you don't, it enters the battlefield tapped"
));
// {T}: Add {R}.
this.addAbility(new RedManaAbility());
}
private ShatterskullTheHammerPass(final ShatterskullTheHammerPass card) {
super(card);
}
@Override
public ShatterskullTheHammerPass copy() {
return new ShatterskullTheHammerPass(this);
}
}

View file

@ -1,37 +0,0 @@
package mage.cards.s;
import mage.abilities.common.EntersBattlefieldTappedAbility;
import mage.abilities.mana.BlueManaAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class SilundiIsle extends CardImpl {
public SilundiIsle(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.LAND}, "");
this.modalDFC = true;
this.nightCard = true;
// Silundi Isle enters the battlefield tapped.
this.addAbility(new EntersBattlefieldTappedAbility());
// {T}: Add {U}.
this.addAbility(new BlueManaAbility());
}
private SilundiIsle(final SilundiIsle card) {
super(card);
}
@Override
public SilundiIsle copy() {
return new SilundiIsle(this);
}
}

View file

@ -1,10 +1,14 @@
package mage.cards.s;
import mage.abilities.common.EntersBattlefieldTappedAbility;
import mage.abilities.dynamicvalue.common.StaticValue;
import mage.abilities.effects.common.LookLibraryAndPickControllerEffect;
import mage.abilities.mana.BlueManaAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.cards.ModalDoubleFacesCard;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.Zone;
import mage.filter.StaticFilters;
@ -13,16 +17,20 @@ import java.util.UUID;
/**
* @author TheElk801
*/
public final class SilundiVision extends CardImpl {
public final class SilundiVision extends ModalDoubleFacesCard {
public SilundiVision(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{2}{U}");
super(ownerId, setInfo,
new CardType[]{CardType.INSTANT}, new SubType[]{}, "{2}{U}",
"Silundi Isle", new CardType[]{CardType.LAND}, new SubType[]{}, ""
);
this.modalDFC = true;
this.secondSideCardClazz = mage.cards.s.SilundiIsle.class;
// 1.
// Silundi Vision
// Instant
// Look at the top six cards of your library. You may reveal an instant or sorcery card from among them and put it into your hand. Put the rest on the bottom of your library in a random order.
this.getSpellAbility().addEffect(
this.getLeftHalfCard().getSpellAbility().addEffect(
new LookLibraryAndPickControllerEffect(
StaticValue.get(6), false, StaticValue.get(1),
StaticFilters.FILTER_CARD_INSTANT_OR_SORCERY, Zone.LIBRARY,
@ -32,6 +40,16 @@ public final class SilundiVision extends CardImpl {
"You may reveal an instant or sorcery card from among them " +
"and put it into your hand. Put the rest on the bottom of your library in a random order.")
);
// 2.
// Silundi Isle
// Land
// Silundi Isle enters the battlefield tapped.
this.getRightHalfCard().addAbility(new EntersBattlefieldTappedAbility());
// {T}: Add {U}.
this.getRightHalfCard().addAbility(new BlueManaAbility());
}
private SilundiVision(final SilundiVision card) {

View file

@ -1,37 +0,0 @@
package mage.cards.s;
import mage.abilities.common.EntersBattlefieldTappedAbility;
import mage.abilities.mana.WhiteManaAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class SkyclaveBasilica extends CardImpl {
public SkyclaveBasilica(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.LAND}, "");
this.modalDFC = true;
this.nightCard = true;
// Skyclave Basilica enters the battlefield tapped.
this.addAbility(new EntersBattlefieldTappedAbility());
// {T}: Add {W}.
this.addAbility(new WhiteManaAbility());
}
private SkyclaveBasilica(final SkyclaveBasilica card) {
super(card);
}
@Override
public SkyclaveBasilica copy() {
return new SkyclaveBasilica(this);
}
}

View file

@ -1,33 +1,46 @@
package mage.cards.s;
import mage.MageInt;
import mage.abilities.common.EntersBattlefieldTappedAbility;
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
import mage.abilities.effects.common.GainLifeEffect;
import mage.abilities.mana.WhiteManaAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.cards.ModalDoubleFacesCard;
import mage.constants.CardType;
import mage.constants.SubType;
import java.util.UUID;
/**
* @author TheElk801
* @author JayDi85
*/
public final class SkyclaveCleric extends CardImpl {
public final class SkyclaveCleric extends ModalDoubleFacesCard {
public SkyclaveCleric(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{W}");
super(ownerId, setInfo,
new CardType[]{CardType.CREATURE}, new SubType[]{SubType.KOR, SubType.CLERIC}, "{1}{W}",
"Skyclave Basilica", new CardType[]{CardType.LAND}, new SubType[]{}, ""
);
this.subtype.add(SubType.KOR);
this.subtype.add(SubType.CLERIC);
this.power = new MageInt(1);
this.toughness = new MageInt(3);
this.modalDFC = true;
this.secondSideCardClazz = mage.cards.s.SkyclaveBasilica.class;
// 1.
// Skyclave Cleric
// Creature Kor Cleric
this.getLeftHalfCard().setPT(new MageInt(1), new MageInt(3));
// When Skyclave Cleric enters the battlefield, you gain 2 life.
this.addAbility(new EntersBattlefieldTriggeredAbility(new GainLifeEffect(2)));
this.getLeftHalfCard().addAbility(new EntersBattlefieldTriggeredAbility(new GainLifeEffect(2)));
// 2.
// Skyclave Basilica
// Land
// Skyclave Basilica enters the battlefield tapped.
this.getRightHalfCard().addAbility(new EntersBattlefieldTappedAbility());
// {T}: Add {W}.
this.getRightHalfCard().addAbility(new WhiteManaAbility());
}
private SkyclaveCleric(final SkyclaveCleric card) {

View file

@ -1,37 +0,0 @@
package mage.cards.s;
import mage.abilities.common.EntersBattlefieldTappedAbility;
import mage.abilities.mana.RedManaAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class SongMadRuins extends CardImpl {
public SongMadRuins(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.LAND}, "");
this.modalDFC = true;
this.nightCard = true;
// Song-Mad Ruins enters the battlefield tapped.
this.addAbility(new EntersBattlefieldTappedAbility());
// {T}: Add {R}.
this.addAbility(new RedManaAbility());
}
private SongMadRuins(final SongMadRuins card) {
super(card);
}
@Override
public SongMadRuins copy() {
return new SongMadRuins(this);
}
}

View file

@ -1,35 +1,52 @@
package mage.cards.s;
import mage.abilities.common.EntersBattlefieldTappedAbility;
import mage.abilities.effects.common.UntapTargetEffect;
import mage.abilities.effects.common.continuous.GainAbilityTargetEffect;
import mage.abilities.effects.common.continuous.GainControlTargetEffect;
import mage.abilities.keyword.HasteAbility;
import mage.cards.CardImpl;
import mage.abilities.mana.RedManaAbility;
import mage.cards.CardSetInfo;
import mage.cards.ModalDoubleFacesCard;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.SubType;
import mage.target.common.TargetCreaturePermanent;
import java.util.UUID;
/**
* @author TheElk801
* @author JayDi85
*/
public final class SongMadTreachery extends CardImpl {
public final class SongMadTreachery extends ModalDoubleFacesCard {
public SongMadTreachery(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{3}{R}{R}");
super(ownerId, setInfo,
new CardType[]{CardType.SORCERY}, new SubType[]{}, "{3}{R}{R}",
"Song-Mad Ruins", new CardType[]{CardType.LAND}, new SubType[]{}, ""
);
this.modalDFC = true;
this.secondSideCardClazz = mage.cards.s.SongMadRuins.class;
// 1.
// Song-Mad Treachery
// Sorcery
// Gain control of target creature until end of turn. Untap that creature. It gains haste until end of turn.
this.getSpellAbility().addEffect(new GainControlTargetEffect(Duration.EndOfTurn));
this.getSpellAbility().addEffect(new UntapTargetEffect().setText("Untap that creature"));
this.getSpellAbility().addEffect(new GainAbilityTargetEffect(
this.getLeftHalfCard().getSpellAbility().addEffect(new GainControlTargetEffect(Duration.EndOfTurn));
this.getLeftHalfCard().getSpellAbility().addEffect(new UntapTargetEffect().setText("Untap that creature"));
this.getLeftHalfCard().getSpellAbility().addEffect(new GainAbilityTargetEffect(
HasteAbility.getInstance(), Duration.EndOfTurn
).setText("It gains haste until end of turn."));
this.getSpellAbility().addTarget(new TargetCreaturePermanent());
this.getLeftHalfCard().getSpellAbility().addTarget(new TargetCreaturePermanent());
// 2.
// Song-Mad Ruins
// Land
// Song-Mad Ruins enters the battlefield tapped.
this.getRightHalfCard().addAbility(new EntersBattlefieldTappedAbility());
// {T}: Add {R}.
this.getRightHalfCard().addAbility(new RedManaAbility());
}
private SongMadTreachery(final SongMadTreachery card) {

View file

@ -1,37 +0,0 @@
package mage.cards.s;
import mage.abilities.common.EntersBattlefieldTappedAbility;
import mage.abilities.mana.RedManaAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class SpikefieldCave extends CardImpl {
public SpikefieldCave(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.LAND}, "");
this.modalDFC = true;
this.nightCard = true;
// Spikefield Cave enters the battlefield tapped.
this.addAbility(new EntersBattlefieldTappedAbility());
// {T}: Add {R}.
this.addAbility(new RedManaAbility());
}
private SpikefieldCave(final SpikefieldCave card) {
super(card);
}
@Override
public SpikefieldCave copy() {
return new SpikefieldCave(this);
}
}

View file

@ -1,30 +1,48 @@
package mage.cards.s;
import mage.abilities.common.EntersBattlefieldTappedAbility;
import mage.abilities.effects.common.DamageTargetEffect;
import mage.abilities.effects.common.ExileTargetIfDiesEffect;
import mage.abilities.mana.RedManaAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.cards.ModalDoubleFacesCard;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.target.common.TargetAnyTarget;
import java.util.UUID;
/**
* @author TheElk801
* @author JayDi85
*/
public final class SpikefieldHazard extends CardImpl {
public final class SpikefieldHazard extends ModalDoubleFacesCard {
public SpikefieldHazard(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{R}");
super(ownerId, setInfo,
new CardType[]{CardType.INSTANT}, new SubType[]{}, "{R}",
"Spikefield Cave", new CardType[]{CardType.LAND}, new SubType[]{}, ""
);
this.modalDFC = true;
this.secondSideCardClazz = mage.cards.s.SpikefieldCave.class;
// 1.
// Spikefield Hazard
// Instant
// Spikefield Hazard deals 1 damage to any target. If a permanent dealt damage this way would die this turn, exile it instead.
this.getSpellAbility().addEffect(new DamageTargetEffect(1));
this.getSpellAbility().addEffect(new ExileTargetIfDiesEffect()
this.getLeftHalfCard().getSpellAbility().addEffect(new DamageTargetEffect(1));
this.getLeftHalfCard().getSpellAbility().addEffect(new ExileTargetIfDiesEffect()
.setText("If a permanent dealt damage this way would die this turn, exile it instead."));
this.getSpellAbility().addTarget(new TargetAnyTarget());
this.getLeftHalfCard().getSpellAbility().addTarget(new TargetAnyTarget());
// 2.
// Spikefield Cave
// Land
// Spikefield Cave enters the battlefield tapped.
this.getRightHalfCard().addAbility(new EntersBattlefieldTappedAbility());
// {T}: Add {R}.
this.getRightHalfCard().addAbility(new RedManaAbility());
}
private SpikefieldHazard(final SpikefieldHazard card) {

View file

@ -1,31 +1,44 @@
package mage.cards.t;
import mage.MageInt;
import mage.abilities.common.EntersBattlefieldTappedAbility;
import mage.abilities.mana.GreenManaAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.cards.ModalDoubleFacesCard;
import mage.constants.CardType;
import mage.constants.SubType;
import java.util.UUID;
/**
* @author TheElk801
* @author JayDi85
*/
public final class TangledFlorahedron extends CardImpl {
public final class TangledFlorahedron extends ModalDoubleFacesCard {
public TangledFlorahedron(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{G}");
super(ownerId, setInfo,
new CardType[]{CardType.CREATURE}, new SubType[]{SubType.ELEMENTAL}, "{1}{G}",
"Tangled Vale", new CardType[]{CardType.LAND}, new SubType[]{}, ""
);
this.subtype.add(SubType.ELEMENTAL);
this.power = new MageInt(1);
this.toughness = new MageInt(1);
this.modalDFC = true;
this.secondSideCardClazz = mage.cards.t.TangledVale.class;
// 1.
// Tangled Florahedron
// Creature Elemental
this.getLeftHalfCard().setPT(new MageInt(1), new MageInt(1));
// {T}: Add {G}.
this.addAbility(new GreenManaAbility());
this.getLeftHalfCard().addAbility(new GreenManaAbility());
// 2.
// Tangled Vale
// Land
// Tangled Vale enters the battlefield tapped.
this.getRightHalfCard().addAbility(new EntersBattlefieldTappedAbility());
// {T}: Add {G}.
this.getRightHalfCard().addAbility(new GreenManaAbility());
}
private TangledFlorahedron(final TangledFlorahedron card) {

View file

@ -1,37 +0,0 @@
package mage.cards.t;
import mage.abilities.common.EntersBattlefieldTappedAbility;
import mage.abilities.mana.GreenManaAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class TangledVale extends CardImpl {
public TangledVale(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.LAND}, "");
this.modalDFC = true;
this.nightCard = true;
// Tangled Vale enters the battlefield tapped.
this.addAbility(new EntersBattlefieldTappedAbility());
// {T}: Add {G}.
this.addAbility(new GreenManaAbility());
}
private TangledVale(final TangledVale card) {
super(card);
}
@Override
public TangledVale copy() {
return new TangledVale(this);
}
}

View file

@ -1,33 +0,0 @@
package mage.cards.t;
import mage.abilities.mana.GreenManaAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class TimbercrownPathway extends CardImpl {
public TimbercrownPathway(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.LAND}, "");
this.modalDFC = true;
this.nightCard = true;
// {T}: Add {G}.
this.addAbility(new GreenManaAbility());
}
private TimbercrownPathway(final TimbercrownPathway card) {
super(card);
}
@Override
public TimbercrownPathway copy() {
return new TimbercrownPathway(this);
}
}

View file

@ -1,42 +0,0 @@
package mage.cards.t;
import mage.abilities.common.AsEntersBattlefieldAbility;
import mage.abilities.costs.common.PayLifeCost;
import mage.abilities.effects.common.TapSourceUnlessPaysEffect;
import mage.abilities.mana.GreenManaAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class TurntimberSerpentineWood extends CardImpl {
public TurntimberSerpentineWood(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.LAND}, "");
this.modalDFC = true;
this.nightCard = true;
// As Turntimber, Serpentine Wood enters the battlefield, you may pay 3 life. If you don't, it enters the battlefield tapped.
this.addAbility(new AsEntersBattlefieldAbility(
new TapSourceUnlessPaysEffect(new PayLifeCost(3)),
"you may pay 3 life. If you don't, it enters the battlefield tapped"
));
// {T}: Add {G}.
this.addAbility(new GreenManaAbility());
}
private TurntimberSerpentineWood(final TurntimberSerpentineWood card) {
super(card);
}
@Override
public TurntimberSerpentineWood copy() {
return new TurntimberSerpentineWood(this);
}
}

View file

@ -1,10 +1,15 @@
package mage.cards.t;
import mage.abilities.Ability;
import mage.abilities.common.AsEntersBattlefieldAbility;
import mage.abilities.costs.common.PayLifeCost;
import mage.abilities.effects.OneShotEffect;
import mage.abilities.effects.common.TapSourceUnlessPaysEffect;
import mage.abilities.mana.GreenManaAbility;
import mage.cards.*;
import mage.constants.CardType;
import mage.constants.Outcome;
import mage.constants.SubType;
import mage.constants.Zone;
import mage.counters.CounterType;
import mage.filter.StaticFilters;
@ -19,16 +24,35 @@ import java.util.UUID;
/**
* @author TheElk801
*/
public final class TurntimberSymbiosis extends CardImpl {
public final class TurntimberSymbiosis extends ModalDoubleFacesCard {
public TurntimberSymbiosis(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{4}{G}{G}{G}");
super(ownerId, setInfo,
new CardType[]{CardType.SORCERY}, new SubType[]{}, "{4}{G}{G}{G}",
"Turntimber, Serpentine Wood", new CardType[]{CardType.LAND}, new SubType[]{}, ""
);
this.modalDFC = true;
this.secondSideCardClazz = mage.cards.t.TurntimberSerpentineWood.class;
// 1.
// Turntimber Symbiosis
// Sorcery
// Look at the top seven cards of your library. You may put a creature card from among them onto the battlefield. If that card has converted mana cost 3 or less, it enters with three additional +1/+1 counters on it. Put the rest on the bottom of your library in a random order.
this.getSpellAbility().addEffect(new TurntimberSymbiosisEffect());
// Look at the top seven cards of your library. You may put a creature card from among them onto the battlefield.
// If that card has converted mana cost 3 or less, it enters with three additional +1/+1 counters on it.
// Put the rest on the bottom of your library in a random order.
this.getLeftHalfCard().getSpellAbility().addEffect(new TurntimberSymbiosisEffect());
// 2.
// Turntimber, Serpentine Wood
// Land
// As Turntimber, Serpentine Wood enters the battlefield, you may pay 3 life. If you don't, it enters the battlefield tapped.
this.getRightHalfCard().addAbility(new AsEntersBattlefieldAbility(
new TapSourceUnlessPaysEffect(new PayLifeCost(3)),
"you may pay 3 life. If you don't, it enters the battlefield tapped"
));
// {T}: Add {G}.
this.getRightHalfCard().addAbility(new GreenManaAbility());
}
private TurntimberSymbiosis(final TurntimberSymbiosis card) {
@ -48,7 +72,7 @@ class TurntimberSymbiosisEffect extends OneShotEffect {
staticText = "Look at the top seven cards of your library. You may put a creature card " +
"from among them onto the battlefield. If that card has converted mana cost 3 or less, " +
"it enters with three additional +1/+1 counters on it. " +
"Put the rest on the bottom of your library in a random order.";
"Put the rest on the bottom of your library in a random order";
}
private TurntimberSymbiosisEffect(final TurntimberSymbiosisEffect effect) {
@ -66,6 +90,7 @@ class TurntimberSymbiosisEffect extends OneShotEffect {
if (player == null) {
return false;
}
Cards cards = new CardsImpl(player.getLibrary().getTopCards(game, 7));
TargetCard target = new TargetCardInLibrary(
0, 1, StaticFilters.FILTER_CARD_CREATURE
@ -76,6 +101,7 @@ class TurntimberSymbiosisEffect extends OneShotEffect {
player.putCardsOnBottomOfLibrary(cards, game, source, false);
return true;
}
boolean small = card.getConvertedManaCost() <= 3;
player.moveCards(card, Zone.BATTLEFIELD, source, game);
Permanent permanent = game.getPermanent(card.getId());

View file

@ -1,37 +0,0 @@
package mage.cards.u;
import mage.abilities.common.EntersBattlefieldTappedAbility;
import mage.abilities.mana.BlueManaAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class UmaraSkyfalls extends CardImpl {
public UmaraSkyfalls(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.LAND}, "");
this.modalDFC = true;
this.nightCard = true;
// Umara Skyfalls enters the battlefield tapped.
this.addAbility(new EntersBattlefieldTappedAbility());
// {T}: Add {U}.
this.addAbility(new BlueManaAbility());
}
private UmaraSkyfalls(final UmaraSkyfalls card) {
super(card);
}
@Override
public UmaraSkyfalls copy() {
return new UmaraSkyfalls(this);
}
}

View file

@ -1,11 +1,14 @@
package mage.cards.u;
import mage.MageInt;
import mage.abilities.common.EntersBattlefieldTappedAbility;
import mage.abilities.common.SpellCastControllerTriggeredAbility;
import mage.abilities.effects.common.continuous.GainAbilitySourceEffect;
import mage.abilities.keyword.FlyingAbility;
import mage.abilities.mana.BlueManaAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.cards.ModalDoubleFacesCard;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.SubType;
@ -14,26 +17,36 @@ import mage.filter.StaticFilters;
import java.util.UUID;
/**
* @author TheElk801
* @author JayDi85
*/
public final class UmaraWizard extends CardImpl {
public final class UmaraWizard extends ModalDoubleFacesCard {
public UmaraWizard(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{U}");
super(ownerId, setInfo,
new CardType[]{CardType.CREATURE}, new SubType[]{SubType.MERFOLK, SubType.WIZARD}, "{4}{U}",
"Umara Skyfalls", new CardType[]{CardType.LAND}, new SubType[]{}, ""
);
this.subtype.add(SubType.MERFOLK);
this.subtype.add(SubType.WIZARD);
this.power = new MageInt(4);
this.toughness = new MageInt(3);
this.modalDFC = true;
this.secondSideCardClazz = mage.cards.u.UmaraSkyfalls.class;
// 1.
// Umara Wizard
// Creature Merfolk Wizard
this.getLeftHalfCard().setPT(new MageInt(4), new MageInt(3));
// Whenever you cast an instant, sorcery, or Wizard spell, Umara Wizard gains flying until end of turn.
this.addAbility(new SpellCastControllerTriggeredAbility(
this.getLeftHalfCard().addAbility(new SpellCastControllerTriggeredAbility(
new GainAbilitySourceEffect(FlyingAbility.getInstance(), Duration.EndOfTurn),
StaticFilters.FILTER_SPELL_INSTANT_SORCERY_WIZARD, false
));
// 2.
// Umara Skyfalls
// Land
// Umara Skyfalls enters the battlefield tapped.
this.getRightHalfCard().addAbility(new EntersBattlefieldTappedAbility());
// {T}: Add {U}.
this.getRightHalfCard().addAbility(new BlueManaAbility());
}
private UmaraWizard(final UmaraWizard card) {

View file

@ -1,13 +1,13 @@
package mage.cards.v;
import mage.abilities.Ability;
import mage.abilities.common.EntersBattlefieldTappedAbility;
import mage.abilities.effects.OneShotEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.cards.Cards;
import mage.cards.CardsImpl;
import mage.abilities.mana.RedManaAbility;
import mage.cards.*;
import mage.constants.CardType;
import mage.constants.Outcome;
import mage.constants.SubType;
import mage.filter.StaticFilters;
import mage.game.Game;
import mage.players.Player;
@ -19,16 +19,30 @@ import java.util.UUID;
/**
* @author TheElk801
*/
public final class ValakutAwakening extends CardImpl {
public final class ValakutAwakening extends ModalDoubleFacesCard {
public ValakutAwakening(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{2}{R}");
super(ownerId, setInfo,
new CardType[]{CardType.INSTANT}, new SubType[]{}, "{2}{R}",
"Valakut Stoneforge", new CardType[]{CardType.LAND}, new SubType[]{}, ""
);
this.modalDFC = true;
this.secondSideCardClazz = mage.cards.v.ValakutStoneforge.class;
// 1.
// Valakut Awakening
// Instant
// Put any number of cards from your hand on the bottom of your library, then draw that many cards plus one.
this.getSpellAbility().addEffect(new ValakutAwakeningEffect());
this.getLeftHalfCard().getSpellAbility().addEffect(new ValakutAwakeningEffect());
// 2.
// Valakut Stoneforge
// Land
// Valakut Stoneforge enters the battlefield tapped.
this.getRightHalfCard().addAbility(new EntersBattlefieldTappedAbility());
// {T}: Add {R}.
this.getRightHalfCard().addAbility(new RedManaAbility());
}
private ValakutAwakening(final ValakutAwakening card) {
@ -69,9 +83,6 @@ class ValakutAwakeningEffect extends OneShotEffect {
);
player.choose(outcome, player.getHand(), targetCard, game);
Cards cards = new CardsImpl(targetCard.getTargets());
if (cards.isEmpty()) {
return false;
}
player.putCardsOnBottomOfLibrary(cards, game, source, true);
player.drawCards(cards.size() + 1, source.getSourceId(), game);
return true;

View file

@ -1,37 +0,0 @@
package mage.cards.v;
import mage.abilities.common.EntersBattlefieldTappedAbility;
import mage.abilities.mana.RedManaAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class ValakutStoneforge extends CardImpl {
public ValakutStoneforge(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.LAND}, "");
this.modalDFC = true;
this.nightCard = true;
// Valakut Stoneforge enters the battlefield tapped.
this.addAbility(new EntersBattlefieldTappedAbility());
// {T}: Add {R}.
this.addAbility(new RedManaAbility());
}
private ValakutStoneforge(final ValakutStoneforge card) {
super(card);
}
@Override
public ValakutStoneforge copy() {
return new ValakutStoneforge(this);
}
}

View file

@ -1,28 +1,46 @@
package mage.cards.v;
import mage.abilities.common.EntersBattlefieldTappedAbility;
import mage.abilities.effects.common.counter.AddCountersTargetEffect;
import mage.abilities.mana.GreenManaAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.cards.ModalDoubleFacesCard;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.counters.CounterType;
import mage.target.common.TargetCreaturePermanent;
import java.util.UUID;
/**
* @author TheElk801
* @author JayDi85
*/
public final class VastwoodFortification extends CardImpl {
public final class VastwoodFortification extends ModalDoubleFacesCard {
public VastwoodFortification(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{G}");
super(ownerId, setInfo,
new CardType[]{CardType.INSTANT}, new SubType[]{}, "{G}",
"Vastwood Thicket", new CardType[]{CardType.LAND}, new SubType[]{}, ""
);
this.modalDFC = true;
this.secondSideCardClazz = mage.cards.v.VastwoodThicket.class;
// 1.
// Vastwood Fortification
// Instant
// Put a +1/+1 counter on target creature.
this.getSpellAbility().addEffect(new AddCountersTargetEffect(CounterType.P1P1.createInstance()));
this.getSpellAbility().addTarget(new TargetCreaturePermanent());
this.getLeftHalfCard().getSpellAbility().addEffect(new AddCountersTargetEffect(CounterType.P1P1.createInstance()));
this.getLeftHalfCard().getSpellAbility().addTarget(new TargetCreaturePermanent());
// 2.
// Vastwood Thicket
// Land
// Vastwood Thicket enters the battlefield tapped.
this.getRightHalfCard().addAbility(new EntersBattlefieldTappedAbility());
// {T}: Add {G}.
this.getRightHalfCard().addAbility(new GreenManaAbility());
}
private VastwoodFortification(final VastwoodFortification card) {

View file

@ -1,37 +0,0 @@
package mage.cards.v;
import mage.abilities.common.EntersBattlefieldTappedAbility;
import mage.abilities.mana.GreenManaAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class VastwoodThicket extends CardImpl {
public VastwoodThicket(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.LAND}, "");
this.modalDFC = true;
this.nightCard = true;
// Vastwood Thicket enters the battlefield tapped.
this.addAbility(new EntersBattlefieldTappedAbility());
// {T}: Add {G}.
this.addAbility(new GreenManaAbility());
}
private VastwoodThicket(final VastwoodThicket card) {
super(card);
}
@Override
public VastwoodThicket copy() {
return new VastwoodThicket(this);
}
}

View file

@ -1,37 +0,0 @@
package mage.cards.z;
import mage.abilities.common.EntersBattlefieldTappedAbility;
import mage.abilities.mana.BlackManaAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class ZofBloodbog extends CardImpl {
public ZofBloodbog(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.LAND}, "");
this.modalDFC = true;
this.nightCard = true;
// Zof Bloodbog enters the battlefield tapped.
this.addAbility(new EntersBattlefieldTappedAbility());
// {T}: Add {B}.
this.addAbility(new BlackManaAbility());
}
private ZofBloodbog(final ZofBloodbog card) {
super(card);
}
@Override
public ZofBloodbog copy() {
return new ZofBloodbog(this);
}
}

View file

@ -1,27 +1,45 @@
package mage.cards.z;
import mage.abilities.common.EntersBattlefieldTappedAbility;
import mage.abilities.effects.common.GainLifeEffect;
import mage.abilities.effects.common.LoseLifeOpponentsEffect;
import mage.abilities.mana.BlackManaAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.cards.ModalDoubleFacesCard;
import mage.constants.CardType;
import mage.constants.SubType;
import java.util.UUID;
/**
* @author TheElk801
* @author JayDi85
*/
public final class ZofConsumption extends CardImpl {
public final class ZofConsumption extends ModalDoubleFacesCard {
public ZofConsumption(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{4}{B}{B}");
super(ownerId, setInfo,
new CardType[]{CardType.SORCERY}, new SubType[]{}, "{4}{B}{B}",
"Zof Bloodbog", new CardType[]{CardType.LAND}, new SubType[]{}, ""
);
this.modalDFC = true;
this.secondSideCardClazz = mage.cards.z.ZofBloodbog.class;
// 1.
// Zof Consumption
// Sorcery
// Each opponent loses 4 life and you gain 4 life.
this.getSpellAbility().addEffect(new LoseLifeOpponentsEffect(4));
this.getSpellAbility().addEffect(new GainLifeEffect(4).concatBy("and"));
this.getLeftHalfCard().getSpellAbility().addEffect(new LoseLifeOpponentsEffect(4));
this.getLeftHalfCard().getSpellAbility().addEffect(new GainLifeEffect(4).concatBy("and"));
// 2.
// Zof Bloodbog
// Land
// Zof Bloodbog enters the battlefield tapped.
this.getRightHalfCard().addAbility(new EntersBattlefieldTappedAbility());
// {T}: Add {B}.
this.getRightHalfCard().addAbility(new BlackManaAbility());
}
private ZofConsumption(final ZofConsumption card) {

View file

@ -32,7 +32,6 @@ public final class ZendikarRising extends ExpansionSet {
cards.add(new SetCardInfo("Acquisitions Expert", 89, Rarity.UNCOMMON, mage.cards.a.AcquisitionsExpert.class));
cards.add(new SetCardInfo("Adventure Awaits", 177, Rarity.COMMON, mage.cards.a.AdventureAwaits.class));
cards.add(new SetCardInfo("Agadeem's Awakening", 90, Rarity.MYTHIC, mage.cards.a.AgadeemsAwakening.class));
cards.add(new SetCardInfo("Agadeem, the Undercrypt", 90, Rarity.MYTHIC, mage.cards.a.AgadeemTheUndercrypt.class));
cards.add(new SetCardInfo("Akiri, Fearless Voyager", 220, Rarity.RARE, mage.cards.a.AkiriFearlessVoyager.class));
cards.add(new SetCardInfo("Akoum Hellhound", 133, Rarity.COMMON, mage.cards.a.AkoumHellhound.class));
cards.add(new SetCardInfo("Akoum Warrior", 134, Rarity.UNCOMMON, AkoumWarrior.class));
@ -47,16 +46,12 @@ public final class ZendikarRising extends ExpansionSet {
cards.add(new SetCardInfo("Ashaya, Soul of the Wild", 179, Rarity.MYTHIC, mage.cards.a.AshayaSoulOfTheWild.class));
cards.add(new SetCardInfo("Attended Healer", 6, Rarity.UNCOMMON, mage.cards.a.AttendedHealer.class));
cards.add(new SetCardInfo("Bala Ged Recovery", 180, Rarity.UNCOMMON, mage.cards.b.BalaGedRecovery.class));
cards.add(new SetCardInfo("Bala Ged Sanctuary", 180, Rarity.UNCOMMON, mage.cards.b.BalaGedSanctuary.class));
cards.add(new SetCardInfo("Base Camp", 257, Rarity.UNCOMMON, mage.cards.b.BaseCamp.class));
cards.add(new SetCardInfo("Beyeen Coast", 46, Rarity.UNCOMMON, mage.cards.b.BeyeenCoast.class));
cards.add(new SetCardInfo("Beyeen Veil", 46, Rarity.UNCOMMON, mage.cards.b.BeyeenVeil.class));
cards.add(new SetCardInfo("Blackbloom Bog", 91, Rarity.UNCOMMON, mage.cards.b.BlackbloomBog.class));
cards.add(new SetCardInfo("Blackbloom Rogue", 91, Rarity.UNCOMMON, mage.cards.b.BlackbloomRogue.class));
cards.add(new SetCardInfo("Blood Beckoning", 92, Rarity.COMMON, mage.cards.b.BloodBeckoning.class));
cards.add(new SetCardInfo("Blood Price", 93, Rarity.COMMON, mage.cards.b.BloodPrice.class));
cards.add(new SetCardInfo("Bloodchief's Thirst", 94, Rarity.UNCOMMON, mage.cards.b.BloodchiefsThirst.class));
cards.add(new SetCardInfo("Boulderloft Pathway", 258, Rarity.RARE, mage.cards.b.BoulderloftPathway.class));
cards.add(new SetCardInfo("Branchloft Pathway", 258, Rarity.RARE, mage.cards.b.BranchloftPathway.class));
cards.add(new SetCardInfo("Brightclimb Pathway", 259, Rarity.RARE, mage.cards.b.BrightclimbPathway.class));
cards.add(new SetCardInfo("Broken Wings", 181, Rarity.COMMON, mage.cards.b.BrokenWings.class));
@ -93,7 +88,6 @@ public final class ZendikarRising extends ExpansionSet {
cards.add(new SetCardInfo("Dreadwurm", 100, Rarity.COMMON, mage.cards.d.Dreadwurm.class));
cards.add(new SetCardInfo("Emeria Captain", 11, Rarity.UNCOMMON, mage.cards.e.EmeriaCaptain.class));
cards.add(new SetCardInfo("Emeria's Call", 12, Rarity.MYTHIC, mage.cards.e.EmeriasCall.class));
cards.add(new SetCardInfo("Emeria, Shattered Skyclave", 12, Rarity.MYTHIC, mage.cards.e.EmeriaShatteredSkyclave.class));
cards.add(new SetCardInfo("Expedition Champion", 138, Rarity.COMMON, mage.cards.e.ExpeditionChampion.class));
cards.add(new SetCardInfo("Expedition Diviner", 57, Rarity.COMMON, mage.cards.e.ExpeditionDiviner.class));
cards.add(new SetCardInfo("Expedition Healer", 13, Rarity.COMMON, mage.cards.e.ExpeditionHealer.class));
@ -110,15 +104,12 @@ public final class ZendikarRising extends ExpansionSet {
cards.add(new SetCardInfo("Ghastly Gloomhunter", 103, Rarity.COMMON, mage.cards.g.GhastlyGloomhunter.class));
cards.add(new SetCardInfo("Glacial Grasp", 59, Rarity.COMMON, mage.cards.g.GlacialGrasp.class));
cards.add(new SetCardInfo("Glasspool Mimic", 60, Rarity.RARE, mage.cards.g.GlasspoolMimic.class));
cards.add(new SetCardInfo("Glasspool Shore", 60, Rarity.RARE, mage.cards.g.GlasspoolShore.class));
cards.add(new SetCardInfo("Gnarlid Colony", 185, Rarity.COMMON, mage.cards.g.GnarlidColony.class));
cards.add(new SetCardInfo("Goma Fada Vanguard", 141, Rarity.UNCOMMON, mage.cards.g.GomaFadaVanguard.class));
cards.add(new SetCardInfo("Grakmaw, Skyclave Ravager", 223, Rarity.RARE, mage.cards.g.GrakmawSkyclaveRavager.class));
cards.add(new SetCardInfo("Grimclimb Pathway", 259, Rarity.RARE, mage.cards.g.GrimclimbPathway.class));
cards.add(new SetCardInfo("Grotag Bug-Catcher", 142, Rarity.COMMON, mage.cards.g.GrotagBugCatcher.class));
cards.add(new SetCardInfo("Grotag Night-Runner", 143, Rarity.UNCOMMON, mage.cards.g.GrotagNightRunner.class));
cards.add(new SetCardInfo("Guul Draz Mucklord", 104, Rarity.COMMON, mage.cards.g.GuulDrazMucklord.class));
cards.add(new SetCardInfo("Hagra Broodpit", 106, Rarity.RARE, mage.cards.h.HagraBroodpit.class));
cards.add(new SetCardInfo("Hagra Constrictor", 105, Rarity.COMMON, mage.cards.h.HagraConstrictor.class));
cards.add(new SetCardInfo("Hagra Mauling", 106, Rarity.RARE, mage.cards.h.HagraMauling.class));
cards.add(new SetCardInfo("Highborn Vampire", 107, Rarity.COMMON, mage.cards.h.HighbornVampire.class));
@ -133,9 +124,7 @@ public final class ZendikarRising extends ExpansionSet {
cards.add(new SetCardInfo("Joraga Visionary", 188, Rarity.COMMON, mage.cards.j.JoragaVisionary.class));
cards.add(new SetCardInfo("Journey to Oblivion", 17, Rarity.UNCOMMON, mage.cards.j.JourneyToOblivion.class));
cards.add(new SetCardInfo("Jwari Disruption", 64, Rarity.UNCOMMON, mage.cards.j.JwariDisruption.class));
cards.add(new SetCardInfo("Jwari Ruins", 64, Rarity.UNCOMMON, mage.cards.j.JwariRuins.class));
cards.add(new SetCardInfo("Kabira Outrider", 18, Rarity.COMMON, mage.cards.k.KabiraOutrider.class));
cards.add(new SetCardInfo("Kabira Plateau", 19, Rarity.UNCOMMON, mage.cards.k.KabiraPlateau.class));
cards.add(new SetCardInfo("Kabira Takedown", 19, Rarity.UNCOMMON, mage.cards.k.KabiraTakedown.class));
cards.add(new SetCardInfo("Kargan Intimidator", 145, Rarity.RARE, mage.cards.k.KarganIntimidator.class));
cards.add(new SetCardInfo("Kargan Warleader", 224, Rarity.UNCOMMON, mage.cards.k.KarganWarleader.class));
@ -143,15 +132,11 @@ public final class ZendikarRising extends ExpansionSet {
cards.add(new SetCardInfo("Kazandu Mammoth", 189, Rarity.RARE, mage.cards.k.KazanduMammoth.class));
cards.add(new SetCardInfo("Kazandu Nectarpot", 190, Rarity.COMMON, mage.cards.k.KazanduNectarpot.class));
cards.add(new SetCardInfo("Kazandu Stomper", 191, Rarity.COMMON, mage.cards.k.KazanduStomper.class));
cards.add(new SetCardInfo("Kazandu Valley", 189, Rarity.RARE, mage.cards.k.KazanduValley.class));
cards.add(new SetCardInfo("Kazuul's Cliffs", 146, Rarity.UNCOMMON, mage.cards.k.KazuulsCliffs.class));
cards.add(new SetCardInfo("Kazuul's Fury", 146, Rarity.UNCOMMON, mage.cards.k.KazuulsFury.class));
cards.add(new SetCardInfo("Khalni Ambush", 192, Rarity.UNCOMMON, mage.cards.k.KhalniAmbush.class));
cards.add(new SetCardInfo("Khalni Territory", 192, Rarity.UNCOMMON, mage.cards.k.KhalniTerritory.class));
cards.add(new SetCardInfo("Kitesail Cleric", 20, Rarity.UNCOMMON, mage.cards.k.KitesailCleric.class));
cards.add(new SetCardInfo("Kor Blademaster", 21, Rarity.UNCOMMON, mage.cards.k.KorBlademaster.class));
cards.add(new SetCardInfo("Kor Celebrant", 22, Rarity.COMMON, mage.cards.k.KorCelebrant.class));
cards.add(new SetCardInfo("Lavaglide Pathway", 264, Rarity.RARE, mage.cards.l.LavaglidePathway.class));
cards.add(new SetCardInfo("Legion Angel", 23, Rarity.RARE, mage.cards.l.LegionAngel.class));
cards.add(new SetCardInfo("Leyline Tyrant", 147, Rarity.MYTHIC, mage.cards.l.LeylineTyrant.class));
cards.add(new SetCardInfo("Linvala, Shield of Sea Gate", 226, Rarity.RARE, mage.cards.l.LinvalaShieldOfSeaGate.class));
@ -163,11 +148,9 @@ public final class ZendikarRising extends ExpansionSet {
cards.add(new SetCardInfo("Luminarch Aspirant", 24, Rarity.RARE, mage.cards.l.LuminarchAspirant.class));
cards.add(new SetCardInfo("Maddening Cacophony", 67, Rarity.RARE, mage.cards.m.MaddeningCacophony.class));
cards.add(new SetCardInfo("Magmatic Channeler", 148, Rarity.RARE, mage.cards.m.MagmaticChanneler.class));
cards.add(new SetCardInfo("Makindi Mesas", 26, Rarity.UNCOMMON, mage.cards.m.MakindiMesas.class));
cards.add(new SetCardInfo("Makindi Ox", 25, Rarity.COMMON, mage.cards.m.MakindiOx.class));
cards.add(new SetCardInfo("Makindi Stampede", 26, Rarity.UNCOMMON, mage.cards.m.MakindiStampede.class));
cards.add(new SetCardInfo("Malakir Blood-Priest", 110, Rarity.COMMON, mage.cards.m.MalakirBloodPriest.class));
cards.add(new SetCardInfo("Malakir Mire", 111, Rarity.UNCOMMON, mage.cards.m.MalakirMire.class));
cards.add(new SetCardInfo("Malakir Rebirth", 111, Rarity.UNCOMMON, mage.cards.m.MalakirRebirth.class));
cards.add(new SetCardInfo("Marauding Blight-Priest", 112, Rarity.COMMON, mage.cards.m.MaraudingBlightPriest.class));
cards.add(new SetCardInfo("Master of Winds", 68, Rarity.RARE, mage.cards.m.MasterOfWinds.class));
@ -185,7 +168,6 @@ public final class ZendikarRising extends ExpansionSet {
cards.add(new SetCardInfo("Murasa Brute", 195, Rarity.COMMON, mage.cards.m.MurasaBrute.class));
cards.add(new SetCardInfo("Murasa Rootgrazer", 229, Rarity.UNCOMMON, mage.cards.m.MurasaRootgrazer.class));
cards.add(new SetCardInfo("Murasa Sproutling", 196, Rarity.UNCOMMON, mage.cards.m.MurasaSproutling.class));
cards.add(new SetCardInfo("Murkwater Pathway", 260, Rarity.RARE, mage.cards.m.MurkwaterPathway.class));
cards.add(new SetCardInfo("Myriad Construct", 246, Rarity.RARE, mage.cards.m.MyriadConstruct.class));
cards.add(new SetCardInfo("Nahiri's Binding", 29, Rarity.COMMON, mage.cards.n.NahirisBinding.class));
cards.add(new SetCardInfo("Nahiri's Lithoforming", 151, Rarity.RARE, mage.cards.n.NahirisLithoforming.class));
@ -202,14 +184,11 @@ public final class ZendikarRising extends ExpansionSet {
cards.add(new SetCardInfo("Oblivion's Hunger", 119, Rarity.COMMON, mage.cards.o.OblivionsHunger.class));
cards.add(new SetCardInfo("Omnath, Locus of Creation", 232, Rarity.MYTHIC, mage.cards.o.OmnathLocusOfCreation.class));
cards.add(new SetCardInfo("Ondu Inversion", 30, Rarity.RARE, mage.cards.o.OnduInversion.class));
cards.add(new SetCardInfo("Ondu Skyruins", 30, Rarity.RARE, mage.cards.o.OnduSkyruins.class));
cards.add(new SetCardInfo("Orah, Skyclave Hierophant", 233, Rarity.RARE, mage.cards.o.OrahSkyclaveHierophant.class));
cards.add(new SetCardInfo("Oran-Rief Ooze", 198, Rarity.RARE, mage.cards.o.OranRiefOoze.class));
cards.add(new SetCardInfo("Paired Tactician", 31, Rarity.UNCOMMON, mage.cards.p.PairedTactician.class));
cards.add(new SetCardInfo("Pelakka Caverns", 120, Rarity.UNCOMMON, mage.cards.p.PelakkaCaverns.class));
cards.add(new SetCardInfo("Pelakka Predation", 120, Rarity.UNCOMMON, mage.cards.p.PelakkaPredation.class));
cards.add(new SetCardInfo("Phylath, World Sculptor", 234, Rarity.RARE, mage.cards.p.PhylathWorldSculptor.class));
cards.add(new SetCardInfo("Pillarverge Pathway", 263, Rarity.RARE, mage.cards.p.PillarvergePathway.class));
cards.add(new SetCardInfo("Plains", 266, Rarity.LAND, mage.cards.basiclands.Plains.class, FULL_ART_BFZ_VARIOUS));
cards.add(new SetCardInfo("Practiced Tactics", 32, Rarity.COMMON, mage.cards.p.PracticedTactics.class));
cards.add(new SetCardInfo("Pressure Point", 33, Rarity.COMMON, mage.cards.p.PressurePoint.class));
@ -242,23 +221,18 @@ public final class ZendikarRising extends ExpansionSet {
cards.add(new SetCardInfo("Sea Gate Colossus", 251, Rarity.COMMON, mage.cards.s.SeaGateColossus.class));
cards.add(new SetCardInfo("Sea Gate Restoration", 76, Rarity.MYTHIC, mage.cards.s.SeaGateRestoration.class));
cards.add(new SetCardInfo("Sea Gate Stormcaller", 77, Rarity.MYTHIC, mage.cards.s.SeaGateStormcaller.class));
cards.add(new SetCardInfo("Sea Gate, Reborn", 76, Rarity.MYTHIC, mage.cards.s.SeaGateReborn.class));
cards.add(new SetCardInfo("Seafloor Stalker", 78, Rarity.COMMON, mage.cards.s.SeafloorStalker.class));
cards.add(new SetCardInfo("Sejiri Glacier", 37, Rarity.UNCOMMON, mage.cards.s.SejiriGlacier.class));
cards.add(new SetCardInfo("Sejiri Shelter", 37, Rarity.UNCOMMON, mage.cards.s.SejiriShelter.class));
cards.add(new SetCardInfo("Shadow Stinger", 123, Rarity.UNCOMMON, mage.cards.s.ShadowStinger.class));
cards.add(new SetCardInfo("Shadows' Verdict", 124, Rarity.RARE, mage.cards.s.ShadowsVerdict.class));
cards.add(new SetCardInfo("Shatterskull Charger", 159, Rarity.RARE, mage.cards.s.ShatterskullCharger.class));
cards.add(new SetCardInfo("Shatterskull Minotaur", 160, Rarity.UNCOMMON, mage.cards.s.ShatterskullMinotaur.class));
cards.add(new SetCardInfo("Shatterskull Smashing", 161, Rarity.MYTHIC, mage.cards.s.ShatterskullSmashing.class));
cards.add(new SetCardInfo("Shatterskull, the Hammer Pass", 161, Rarity.MYTHIC, mage.cards.s.ShatterskullTheHammerPass.class));
cards.add(new SetCardInfo("Shell Shield", 79, Rarity.COMMON, mage.cards.s.ShellShield.class));
cards.add(new SetCardInfo("Shepherd of Heroes", 38, Rarity.COMMON, mage.cards.s.ShepherdOfHeroes.class));
cards.add(new SetCardInfo("Silundi Isle", 80, Rarity.UNCOMMON, mage.cards.s.SilundiIsle.class));
cards.add(new SetCardInfo("Silundi Vision", 80, Rarity.UNCOMMON, mage.cards.s.SilundiVision.class));
cards.add(new SetCardInfo("Sizzling Barrage", 162, Rarity.COMMON, mage.cards.s.SizzlingBarrage.class));
cards.add(new SetCardInfo("Skyclave Apparition", 39, Rarity.RARE, mage.cards.s.SkyclaveApparition.class));
cards.add(new SetCardInfo("Skyclave Basilica", 40, Rarity.UNCOMMON, mage.cards.s.SkyclaveBasilica.class));
cards.add(new SetCardInfo("Skyclave Cleric", 40, Rarity.UNCOMMON, mage.cards.s.SkyclaveCleric.class));
cards.add(new SetCardInfo("Skyclave Geopede", 163, Rarity.UNCOMMON, mage.cards.s.SkyclaveGeopede.class));
cards.add(new SetCardInfo("Skyclave Pick-Axe", 204, Rarity.UNCOMMON, mage.cards.s.SkyclavePickAxe.class));
@ -271,11 +245,9 @@ public final class ZendikarRising extends ExpansionSet {
cards.add(new SetCardInfo("Smite the Monstrous", 42, Rarity.COMMON, mage.cards.s.SmiteTheMonstrous.class));
cards.add(new SetCardInfo("Sneaking Guide", 164, Rarity.COMMON, mage.cards.s.SneakingGuide.class));
cards.add(new SetCardInfo("Soaring Thought-Thief", 236, Rarity.UNCOMMON, mage.cards.s.SoaringThoughtThief.class));
cards.add(new SetCardInfo("Song-Mad Ruins", 165, Rarity.UNCOMMON, mage.cards.s.SongMadRuins.class));
cards.add(new SetCardInfo("Song-Mad Treachery", 165, Rarity.UNCOMMON, mage.cards.s.SongMadTreachery.class));
cards.add(new SetCardInfo("Soul Shatter", 127, Rarity.RARE, mage.cards.s.SoulShatter.class));
cards.add(new SetCardInfo("Spare Supplies", 254, Rarity.COMMON, mage.cards.s.SpareSupplies.class));
cards.add(new SetCardInfo("Spikefield Cave", 166, Rarity.UNCOMMON, mage.cards.s.SpikefieldCave.class));
cards.add(new SetCardInfo("Spikefield Hazard", 166, Rarity.UNCOMMON, mage.cards.s.SpikefieldHazard.class));
cards.add(new SetCardInfo("Spitfire Lagac", 167, Rarity.COMMON, mage.cards.s.SpitfireLagac.class));
cards.add(new SetCardInfo("Spoils of Adventure", 237, Rarity.UNCOMMON, mage.cards.s.SpoilsOfAdventure.class));
@ -293,7 +265,6 @@ public final class ZendikarRising extends ExpansionSet {
cards.add(new SetCardInfo("Tajuru Paragon", 209, Rarity.RARE, mage.cards.t.TajuruParagon.class));
cards.add(new SetCardInfo("Tajuru Snarecaster", 210, Rarity.COMMON, mage.cards.t.TajuruSnarecaster.class));
cards.add(new SetCardInfo("Tangled Florahedron", 211, Rarity.UNCOMMON, mage.cards.t.TangledFlorahedron.class));
cards.add(new SetCardInfo("Tangled Vale", 211, Rarity.UNCOMMON, mage.cards.t.TangledVale.class));
cards.add(new SetCardInfo("Taunting Arbormage", 212, Rarity.UNCOMMON, mage.cards.t.TauntingArbormage.class));
cards.add(new SetCardInfo("Tazeem Raptor", 43, Rarity.COMMON, mage.cards.t.TazeemRaptor.class));
cards.add(new SetCardInfo("Tazeem Roilmage", 84, Rarity.COMMON, mage.cards.t.TazeemRoilmage.class));
@ -305,23 +276,18 @@ public final class ZendikarRising extends ExpansionSet {
cards.add(new SetCardInfo("Thundering Rebuke", 170, Rarity.UNCOMMON, mage.cards.t.ThunderingRebuke.class));
cards.add(new SetCardInfo("Thundering Sparkmage", 171, Rarity.UNCOMMON, mage.cards.t.ThunderingSparkmage.class));
cards.add(new SetCardInfo("Thwart the Grave", 130, Rarity.UNCOMMON, mage.cards.t.ThwartTheGrave.class));
cards.add(new SetCardInfo("Timbercrown Pathway", 261, Rarity.RARE, mage.cards.t.TimbercrownPathway.class));
cards.add(new SetCardInfo("Tormenting Voice", 172, Rarity.COMMON, mage.cards.t.TormentingVoice.class));
cards.add(new SetCardInfo("Tuktuk Rubblefort", 173, Rarity.COMMON, mage.cards.t.TuktukRubblefort.class));
cards.add(new SetCardInfo("Turntimber Ascetic", 214, Rarity.COMMON, mage.cards.t.TurntimberAscetic.class));
cards.add(new SetCardInfo("Turntimber Symbiosis", 215, Rarity.MYTHIC, mage.cards.t.TurntimberSymbiosis.class));
cards.add(new SetCardInfo("Turntimber, Serpentine Wood", 215, Rarity.MYTHIC, mage.cards.t.TurntimberSerpentineWood.class));
cards.add(new SetCardInfo("Umara Mystic", 238, Rarity.UNCOMMON, mage.cards.u.UmaraMystic.class));
cards.add(new SetCardInfo("Umara Skyfalls", 86, Rarity.UNCOMMON, mage.cards.u.UmaraSkyfalls.class));
cards.add(new SetCardInfo("Umara Wizard", 86, Rarity.UNCOMMON, mage.cards.u.UmaraWizard.class));
cards.add(new SetCardInfo("Utility Knife", 256, Rarity.COMMON, mage.cards.u.UtilityKnife.class));
cards.add(new SetCardInfo("Valakut Awakening", 174, Rarity.RARE, mage.cards.v.ValakutAwakening.class));
cards.add(new SetCardInfo("Valakut Exploration", 175, Rarity.RARE, mage.cards.v.ValakutExploration.class));
cards.add(new SetCardInfo("Valakut Stoneforge", 174, Rarity.RARE, mage.cards.v.ValakutStoneforge.class));
cards.add(new SetCardInfo("Vanquish the Weak", 131, Rarity.COMMON, mage.cards.v.VanquishTheWeak.class));
cards.add(new SetCardInfo("Vastwood Fortification", 216, Rarity.UNCOMMON, mage.cards.v.VastwoodFortification.class));
cards.add(new SetCardInfo("Vastwood Surge", 217, Rarity.UNCOMMON, mage.cards.v.VastwoodSurge.class));
cards.add(new SetCardInfo("Vastwood Thicket", 216, Rarity.UNCOMMON, mage.cards.v.VastwoodThicket.class));
cards.add(new SetCardInfo("Veteran Adventurer", 218, Rarity.UNCOMMON, mage.cards.v.VeteranAdventurer.class));
cards.add(new SetCardInfo("Vine Gecko", 219, Rarity.UNCOMMON, mage.cards.v.VineGecko.class));
cards.add(new SetCardInfo("Wayward Guide-Beast", 176, Rarity.RARE, mage.cards.w.WaywardGuideBeast.class));
@ -329,7 +295,6 @@ public final class ZendikarRising extends ExpansionSet {
cards.add(new SetCardInfo("Yasharn, Implacable Earth", 240, Rarity.RARE, mage.cards.y.YasharnImplacableEarth.class));
cards.add(new SetCardInfo("Zagras, Thief of Heartbeats", 241, Rarity.RARE, mage.cards.z.ZagrasThiefOfHeartbeats.class));
cards.add(new SetCardInfo("Zareth San, the Trickster", 242, Rarity.RARE, mage.cards.z.ZarethSanTheTrickster.class));
cards.add(new SetCardInfo("Zof Bloodbog", 132, Rarity.UNCOMMON, mage.cards.z.ZofBloodbog.class));
cards.add(new SetCardInfo("Zof Consumption", 132, Rarity.UNCOMMON, mage.cards.z.ZofConsumption.class));
cards.add(new SetCardInfo("Zulaport Duelist", 88, Rarity.COMMON, mage.cards.z.ZulaportDuelist.class));
}

View file

@ -159,4 +159,32 @@ public class ModalDoubleFacesCardsTest extends CardTestPlayerBase {
execute();
assertAllCommandsUsed();
}
@Test
public void test_Single_MalakirRebirth() {
// Malakir Rebirth
// Choose target creature. You lose 2 life. Until end of turn, that creature gains "When this creature dies, return it to the battlefield tapped under its owner's control."
addCard(Zone.HAND, playerA, "Malakir Rebirth"); // {B}
addCard(Zone.BATTLEFIELD, playerA, "Swamp", 1);
addCard(Zone.BATTLEFIELD, playerA, "Balduvian Bears", 1);
//
addCard(Zone.HAND, playerA, "Lightning Bolt", 1);
addCard(Zone.BATTLEFIELD, playerA, "Mountain", 1);
// cast instant and give gained ability
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Malakir Rebirth", "Balduvian Bears");
waitStackResolved(1, PhaseStep.PRECOMBAT_MAIN);
checkPermanentCount("before", 1, PhaseStep.PRECOMBAT_MAIN, playerA, "Balduvian Bears", 1);
// check gained ability (bear must be returned after die)
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Lightning Bolt", "Balduvian Bears");
waitStackResolved(1, PhaseStep.PRECOMBAT_MAIN, playerA);
checkPermanentCount("after", 1, PhaseStep.PRECOMBAT_MAIN, playerA, "Balduvian Bears", 1);
checkGraveyardCount("after", 1, PhaseStep.PRECOMBAT_MAIN, playerA, "Lightning Bolt", 1);
setStrictChooseMode(true);
setStopAt(1, PhaseStep.END_TURN);
execute();
assertAllCommandsUsed();
}
}

View file

@ -39,6 +39,7 @@ public final class MtgJsonCard {
if ("transform".equals(layout)
|| "flip".equals(layout)
|| "adventure".equals(layout)
|| "modal_dfc".equals(layout)
|| "meld".equals(layout)) { // mtgjson uses composite names for meld cards, but scryfall uses simple face names
return faceName;
}

View file

@ -21,8 +21,8 @@ import java.util.UUID;
*/
public abstract class ModalDoubleFacesCard extends CardImpl {
protected Card leftHalfCard;
protected Card rightHalfCard;
protected Card leftHalfCard; // main card in all zone
protected Card rightHalfCard; // second side card, can be only in stack and battlefield zones
public ModalDoubleFacesCard(UUID ownerId, CardSetInfo setInfo,
CardType[] typesLeft, SubType[] subTypesLeft, String costsLeft,

View file

@ -7,6 +7,7 @@ import mage.constants.SubType;
import mage.constants.Zone;
import mage.game.Game;
import java.util.Arrays;
import java.util.List;
import java.util.UUID;
@ -20,6 +21,7 @@ public class ModalDoubleFacesCardHalfImpl extends CardImpl implements ModalDoubl
public ModalDoubleFacesCardHalfImpl(UUID ownerId, CardSetInfo setInfo, CardType[] cardTypes, SubType[] cardSubTypes,
String costs, ModalDoubleFacesCard parentCard, SpellAbilityType spellAbilityType) {
super(ownerId, setInfo, cardTypes, costs, spellAbilityType);
this.subtype.addAll(Arrays.asList(cardSubTypes));
this.parentCard = parentCard;
}

View file

@ -98,46 +98,55 @@ public final class ZonesHandler {
ZoneChangeEvent event = info.event;
Zone toZone = event.getToZone();
Card targetCard = getTargetCard(game, event.getTargetId());
Cards cards = null;
// If we're moving a token it shouldn't be put into any zone as an object.
Cards cardsToMove = null; // moving real cards
Cards cardsToUpdate = null; // updating all card's parts
// if we're moving a token it shouldn't be put into any zone as an object.
if (!(targetCard instanceof Permanent) && targetCard != null) {
if (targetCard instanceof MeldCard) {
cards = ((MeldCard) targetCard).getHalves();
// meld/group cards must be independent (use can choose order)
cardsToMove = ((MeldCard) targetCard).getHalves();
cardsToUpdate = cardsToMove;
} else if (targetCard instanceof ModalDoubleFacesCard) {
cards = new CardsImpl(targetCard);
cards.add(((ModalDoubleFacesCard) targetCard).getLeftHalfCard());
cards.add(((ModalDoubleFacesCard) targetCard).getRightHalfCard());
// mdf cards must be moved as single object, but each half must be updated separetly
cardsToMove = new CardsImpl(targetCard);
cardsToUpdate = new CardsImpl(targetCard);
cardsToUpdate.add(((ModalDoubleFacesCard) targetCard).getLeftHalfCard());
cardsToUpdate.add(((ModalDoubleFacesCard) targetCard).getRightHalfCard());
} else {
cards = new CardsImpl(targetCard);
cardsToMove = new CardsImpl(targetCard);
cardsToUpdate = cardsToMove;
}
Player owner = game.getPlayer(targetCard.getOwnerId());
switch (toZone) {
case HAND:
for (Card card : cards.getCards(game)) {
for (Card card : cardsToMove.getCards(game)) {
game.getPlayer(card.getOwnerId()).getHand().add(card);
}
break;
case GRAVEYARD:
for (Card card : chooseOrder(
"order to put in graveyard (last chosen will be on top)", cards, owner, game)) {
"order to put in graveyard (last chosen will be on top)", cardsToMove, owner, game)) {
game.getPlayer(card.getOwnerId()).getGraveyard().add(card);
}
break;
case LIBRARY:
if (info instanceof ZoneChangeInfo.Library && ((ZoneChangeInfo.Library) info).top) {
// on top
for (Card card : chooseOrder(
"order to put on top of library (last chosen will be topmost)", cards, owner, game)) {
"order to put on top of library (last chosen will be topmost)", cardsToMove, owner, game)) {
game.getPlayer(card.getOwnerId()).getLibrary().putOnTop(card, game);
}
} else { // buttom
} else {
// on bottom
for (Card card : chooseOrder(
"order to put on bottom of library (last chosen will be bottommost)", cards, owner, game)) {
"order to put on bottom of library (last chosen will be bottommost)", cardsToMove, owner, game)) {
game.getPlayer(card.getOwnerId()).getLibrary().putOnBottom(card, game);
}
}
break;
case EXILED:
for (Card card : cards.getCards(game)) {
for (Card card : cardsToMove.getCards(game)) {
if (info instanceof ZoneChangeInfo.Exile && ((ZoneChangeInfo.Exile) info).id != null) {
ZoneChangeInfo.Exile exileInfo = (ZoneChangeInfo.Exile) info;
game.getExile().createZone(exileInfo.id, exileInfo.name).add(card);
@ -148,13 +157,13 @@ public final class ZonesHandler {
break;
case COMMAND:
// There should never be more than one card here.
for (Card card : cards.getCards(game)) {
for (Card card : cardsToMove.getCards(game)) {
game.addCommander(new Commander(card));
}
break;
case STACK:
// There should never be more than one card here.
for (Card card : cards.getCards(game)) {
for (Card card : cardsToMove.getCards(game)) {
Spell spell;
if (info instanceof ZoneChangeInfo.Stack && ((ZoneChangeInfo.Stack) info).spell != null) {
spell = ((ZoneChangeInfo.Stack) info).spell;
@ -177,9 +186,9 @@ public final class ZonesHandler {
}
game.setZone(event.getTargetId(), event.getToZone());
if (cards != null && (targetCard instanceof MeldCard || targetCard instanceof ModalDoubleFacesCard)) {
// update other parts too
for (Card card : cards.getCards(game)) {
if (cardsToUpdate != null && (targetCard instanceof MeldCard || targetCard instanceof ModalDoubleFacesCard)) {
// update other parts too (meld cards, mdf cards)
for (Card card : cardsToUpdate.getCards(game)) {
game.setZone(card.getId(), event.getToZone());
}
// reset meld status
@ -192,16 +201,17 @@ public final class ZonesHandler {
}
public static Card getTargetCard(Game game, UUID targetId) {
if (game.getCard(targetId) != null) {
return game.getCard(targetId);
Card card = game.getCard(targetId);
if (card != null) {
return card;
}
if (game.getMeldCard(targetId) != null) {
return game.getMeldCard(targetId);
card = game.getMeldCard(targetId);
if (card != null) {
return card;
}
if (game.getPermanent(targetId) != null) {
return game.getPermanent(targetId);
}
return null;
return game.getPermanent(targetId);
}
private static boolean maybeRemoveFromSourceZone(ZoneChangeInfo info, Game game) {
@ -255,9 +265,9 @@ public final class ZonesHandler {
if (card instanceof MeldCard) {
permanent = new PermanentMeld(card, event.getPlayerId(), game);
} else if (card instanceof ModalDoubleFacesCard) {
throw new IllegalStateException("Try to move mdf card to battlefield instead half");
throw new IllegalStateException("Unexpected trying of move mdf card to battlefield instead half");
} else if (card instanceof Permanent) {
throw new IllegalStateException("Try to move permanent card to battlefield");
throw new IllegalStateException("Unexpected trying of move permanent to battlefield instead card");
} else {
permanent = new PermanentCard(card, event.getPlayerId(), game);
}