forked from External/mage
Merge pull request 'master' (#50) from External/mage:master into master
All checks were successful
/ build_release (push) Successful in 16m19s
All checks were successful
/ build_release (push) Successful in 16m19s
Reviewed-on: #50
This commit is contained in:
commit
d43ac44ada
574 changed files with 13222 additions and 10870 deletions
|
|
@ -940,8 +940,13 @@ public abstract class CardPanel extends MagePermanent implements ComponentListen
|
||||||
private void setGameCardSides(CardView gameCard) {
|
private void setGameCardSides(CardView gameCard) {
|
||||||
if (this.cardSideMain == null) {
|
if (this.cardSideMain == null) {
|
||||||
// new card
|
// new card
|
||||||
|
if (gameCard instanceof PermanentView) {
|
||||||
|
this.cardSideMain = gameCard;
|
||||||
|
this.cardSideOther = gameCard.isTransformed() ? ((PermanentView) gameCard).getOriginal() : gameCard.getSecondCardFace();
|
||||||
|
} else {
|
||||||
this.cardSideMain = gameCard;
|
this.cardSideMain = gameCard;
|
||||||
this.cardSideOther = gameCard.getSecondCardFace();
|
this.cardSideOther = gameCard.getSecondCardFace();
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
// updated card
|
// updated card
|
||||||
if (this.cardSideMain.getName().equals(gameCard.getName())) {
|
if (this.cardSideMain.getName().equals(gameCard.getName())) {
|
||||||
|
|
|
||||||
|
|
@ -558,12 +558,12 @@ public class DownloadPicturesService extends DefaultBoundedRangeModel implements
|
||||||
);
|
);
|
||||||
allCardsUrls.add(url);
|
allCardsUrls.add(url);
|
||||||
}
|
}
|
||||||
if (card.isModalDoubleFacedCard()) {
|
if (card.isDoubleFacedCard()) {
|
||||||
if (card.getModalDoubleFacedSecondSideName() == null || card.getModalDoubleFacedSecondSideName().trim().isEmpty()) {
|
if (card.getDoubleFacedSecondSideName() == null || card.getDoubleFacedSecondSideName().trim().isEmpty()) {
|
||||||
throw new IllegalStateException("MDF card can't have empty name.");
|
throw new IllegalStateException("MDF card can't have empty name.");
|
||||||
}
|
}
|
||||||
CardDownloadData cardDownloadData = new CardDownloadData(
|
CardDownloadData cardDownloadData = new CardDownloadData(
|
||||||
card.getModalDoubleFacedSecondSideName(),
|
card.getDoubleFacedSecondSideName(),
|
||||||
card.getSetCode(),
|
card.getSetCode(),
|
||||||
card.getCardNumber(),
|
card.getCardNumber(),
|
||||||
card.usesVariousArt(),
|
card.usesVariousArt(),
|
||||||
|
|
|
||||||
|
|
@ -33,6 +33,7 @@ import mage.game.command.Dungeon;
|
||||||
import mage.game.command.Emblem;
|
import mage.game.command.Emblem;
|
||||||
import mage.game.command.Plane;
|
import mage.game.command.Plane;
|
||||||
import mage.game.permanent.Permanent;
|
import mage.game.permanent.Permanent;
|
||||||
|
import mage.game.permanent.PermanentCard;
|
||||||
import mage.game.permanent.PermanentToken;
|
import mage.game.permanent.PermanentToken;
|
||||||
import mage.game.permanent.token.Token;
|
import mage.game.permanent.token.Token;
|
||||||
import mage.game.stack.Spell;
|
import mage.game.stack.Spell;
|
||||||
|
|
@ -116,7 +117,7 @@ public class CardView extends SimpleCardView {
|
||||||
protected List<String> rightSplitRules;
|
protected List<String> rightSplitRules;
|
||||||
protected String rightSplitTypeLine;
|
protected String rightSplitTypeLine;
|
||||||
|
|
||||||
protected boolean isModalDoubleFacedCard;
|
protected boolean isDoubleFacedCard;
|
||||||
|
|
||||||
protected ArtRect artRect = ArtRect.NORMAL;
|
protected ArtRect artRect = ArtRect.NORMAL;
|
||||||
|
|
||||||
|
|
@ -238,7 +239,7 @@ public class CardView extends SimpleCardView {
|
||||||
this.rightSplitRules = cardView.rightSplitRules == null ? null : new ArrayList<>(cardView.rightSplitRules);
|
this.rightSplitRules = cardView.rightSplitRules == null ? null : new ArrayList<>(cardView.rightSplitRules);
|
||||||
this.rightSplitTypeLine = cardView.rightSplitTypeLine;
|
this.rightSplitTypeLine = cardView.rightSplitTypeLine;
|
||||||
|
|
||||||
this.isModalDoubleFacedCard = cardView.isModalDoubleFacedCard;
|
this.isDoubleFacedCard = cardView.isDoubleFacedCard;
|
||||||
|
|
||||||
this.artRect = cardView.artRect;
|
this.artRect = cardView.artRect;
|
||||||
this.targets = cardView.targets == null ? null : new ArrayList<>(cardView.targets);
|
this.targets = cardView.targets == null ? null : new ArrayList<>(cardView.targets);
|
||||||
|
|
@ -428,11 +429,17 @@ public class CardView extends SimpleCardView {
|
||||||
this.manaCostLeftStr = splitCard.getLeftHalfCard().getManaCostSymbols();
|
this.manaCostLeftStr = splitCard.getLeftHalfCard().getManaCostSymbols();
|
||||||
this.manaCostRightStr = splitCard.getRightHalfCard().getManaCostSymbols();
|
this.manaCostRightStr = splitCard.getRightHalfCard().getManaCostSymbols();
|
||||||
} else if (card instanceof ModalDoubleFacedCard) {
|
} else if (card instanceof ModalDoubleFacedCard) {
|
||||||
this.isModalDoubleFacedCard = true;
|
this.isDoubleFacedCard = true;
|
||||||
ModalDoubleFacedCard mainCard = ((ModalDoubleFacedCard) card);
|
DoubleFacedCard mainCard = ((DoubleFacedCard) card);
|
||||||
fullCardName = mainCard.getLeftHalfCard().getName() + MockCard.MODAL_DOUBLE_FACES_NAME_SEPARATOR + mainCard.getRightHalfCard().getName();
|
fullCardName = mainCard.getLeftHalfCard().getName() + MockCard.MODAL_DOUBLE_FACES_NAME_SEPARATOR + mainCard.getRightHalfCard().getName();
|
||||||
this.manaCostLeftStr = mainCard.getLeftHalfCard().getManaCostSymbols();
|
this.manaCostLeftStr = mainCard.getLeftHalfCard().getManaCostSymbols();
|
||||||
this.manaCostRightStr = mainCard.getRightHalfCard().getManaCostSymbols();
|
this.manaCostRightStr = mainCard.getRightHalfCard().getManaCostSymbols();
|
||||||
|
} else if (card instanceof TransformingDoubleFacedCard) {
|
||||||
|
this.isDoubleFacedCard = true;
|
||||||
|
DoubleFacedCard mainCard = ((DoubleFacedCard) card);
|
||||||
|
fullCardName = mainCard.getLeftHalfCard().getName() + MockCard.MODAL_DOUBLE_FACES_NAME_SEPARATOR + mainCard.getRightHalfCard().getName();
|
||||||
|
this.manaCostLeftStr = mainCard.getLeftHalfCard().getManaCostSymbols();
|
||||||
|
this.manaCostRightStr = new ArrayList<>();
|
||||||
} else if (card instanceof CardWithSpellOption) {
|
} else if (card instanceof CardWithSpellOption) {
|
||||||
this.isSplitCard = true;
|
this.isSplitCard = true;
|
||||||
CardWithSpellOption mainCard = ((CardWithSpellOption) card);
|
CardWithSpellOption mainCard = ((CardWithSpellOption) card);
|
||||||
|
|
@ -531,7 +538,9 @@ public class CardView extends SimpleCardView {
|
||||||
|
|
||||||
this.extraDeckCard = card.isExtraDeckCard();
|
this.extraDeckCard = card.isExtraDeckCard();
|
||||||
|
|
||||||
|
// TODO: can probably remove this after tdfc rework
|
||||||
// transformable, double faces cards
|
// transformable, double faces cards
|
||||||
|
if (!(sourceCard.getMainCard() instanceof DoubleFacedCard)) {
|
||||||
this.transformable = card.isTransformable();
|
this.transformable = card.isTransformable();
|
||||||
|
|
||||||
Card secondSideCard = card.getSecondCardFace();
|
Card secondSideCard = card.getSecondCardFace();
|
||||||
|
|
@ -539,17 +548,23 @@ public class CardView extends SimpleCardView {
|
||||||
this.secondCardFace = new CardView(secondSideCard, game);
|
this.secondCardFace = new CardView(secondSideCard, game);
|
||||||
this.alternateName = secondCardFace.getName();
|
this.alternateName = secondCardFace.getName();
|
||||||
}
|
}
|
||||||
|
} else if (card instanceof PermanentCard && card.isTransformable()) {
|
||||||
|
this.transformable = card.isTransformable();
|
||||||
|
Card secondSideCard = (Card) ((PermanentCard) card).getOtherFace();
|
||||||
|
this.secondCardFace = new CardView(secondSideCard, game);
|
||||||
|
this.alternateName = secondSideCard.getName();
|
||||||
|
}
|
||||||
|
|
||||||
this.flipCard = card.isFlipCard();
|
this.flipCard = card.isFlipCard();
|
||||||
if (card.isFlipCard() && card.getFlipCardName() != null) {
|
if (card.isFlipCard() && card.getFlipCardName() != null) {
|
||||||
this.alternateName = card.getFlipCardName();
|
this.alternateName = card.getFlipCardName();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (card instanceof ModalDoubleFacedCard) {
|
if (card instanceof DoubleFacedCard) {
|
||||||
this.transformable = true; // enable GUI day/night button
|
this.transformable = true; // enable GUI day/night button
|
||||||
ModalDoubleFacedCard mdfCard = (ModalDoubleFacedCard) card;
|
DoubleFacedCard doubleFacedCard = (DoubleFacedCard) card;
|
||||||
this.secondCardFace = new CardView(mdfCard.getRightHalfCard(), game);
|
this.secondCardFace = new CardView(doubleFacedCard.getRightHalfCard(), game);
|
||||||
this.alternateName = mdfCard.getRightHalfCard().getName();
|
this.alternateName = doubleFacedCard.getRightHalfCard().getName();
|
||||||
}
|
}
|
||||||
|
|
||||||
Card meldsToCard = card.getMeldsToCard();
|
Card meldsToCard = card.getMeldsToCard();
|
||||||
|
|
|
||||||
|
|
@ -206,9 +206,9 @@ public class TinyLeaders extends Constructed {
|
||||||
if (card instanceof SplitCard) {
|
if (card instanceof SplitCard) {
|
||||||
costs.add(((SplitCard) card).getLeftHalfCard().getManaValue());
|
costs.add(((SplitCard) card).getLeftHalfCard().getManaValue());
|
||||||
costs.add(((SplitCard) card).getRightHalfCard().getManaValue());
|
costs.add(((SplitCard) card).getRightHalfCard().getManaValue());
|
||||||
} else if (card instanceof ModalDoubleFacedCard) {
|
} else if (card instanceof DoubleFacedCard) {
|
||||||
costs.add(((ModalDoubleFacedCard) card).getLeftHalfCard().getManaValue());
|
costs.add(((DoubleFacedCard) card).getLeftHalfCard().getManaValue());
|
||||||
costs.add(((ModalDoubleFacedCard) card).getRightHalfCard().getManaValue());
|
costs.add(((DoubleFacedCard) card).getRightHalfCard().getManaValue());
|
||||||
} else {
|
} else {
|
||||||
costs.add(card.getManaValue());
|
costs.add(card.getManaValue());
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,60 +0,0 @@
|
||||||
package mage.cards.a;
|
|
||||||
|
|
||||||
import mage.MageInt;
|
|
||||||
import mage.abilities.common.AttacksTriggeredAbility;
|
|
||||||
import mage.abilities.effects.common.counter.AddCountersAllEffect;
|
|
||||||
import mage.abilities.keyword.ReachAbility;
|
|
||||||
import mage.abilities.keyword.TrampleAbility;
|
|
||||||
import mage.cards.CardImpl;
|
|
||||||
import mage.cards.CardSetInfo;
|
|
||||||
import mage.constants.CardType;
|
|
||||||
import mage.constants.SubType;
|
|
||||||
import mage.constants.SuperType;
|
|
||||||
import mage.counters.CounterType;
|
|
||||||
import mage.filter.FilterPermanent;
|
|
||||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
|
||||||
import mage.filter.predicate.permanent.TappedPredicate;
|
|
||||||
|
|
||||||
import java.util.UUID;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author TheElk801
|
|
||||||
*/
|
|
||||||
public final class AangAndLaOceansFury extends CardImpl {
|
|
||||||
|
|
||||||
private static final FilterPermanent filter = new FilterControlledCreaturePermanent("tapped creature you control");
|
|
||||||
|
|
||||||
static {
|
|
||||||
filter.add(TappedPredicate.TAPPED);
|
|
||||||
}
|
|
||||||
|
|
||||||
public AangAndLaOceansFury(UUID ownerId, CardSetInfo setInfo) {
|
|
||||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "");
|
|
||||||
|
|
||||||
this.supertype.add(SuperType.LEGENDARY);
|
|
||||||
this.subtype.add(SubType.AVATAR);
|
|
||||||
this.subtype.add(SubType.SPIRIT);
|
|
||||||
this.subtype.add(SubType.ALLY);
|
|
||||||
this.power = new MageInt(5);
|
|
||||||
this.toughness = new MageInt(5);
|
|
||||||
this.nightCard = true;
|
|
||||||
|
|
||||||
// Reach
|
|
||||||
this.addAbility(ReachAbility.getInstance());
|
|
||||||
|
|
||||||
// Trample
|
|
||||||
this.addAbility(TrampleAbility.getInstance());
|
|
||||||
|
|
||||||
// Whenever Aang and La attack, put a +1/+1 counter on each tapped creature you control.
|
|
||||||
this.addAbility(new AttacksTriggeredAbility(new AddCountersAllEffect(CounterType.P1P1.createInstance(), filter)));
|
|
||||||
}
|
|
||||||
|
|
||||||
private AangAndLaOceansFury(final AangAndLaOceansFury card) {
|
|
||||||
super(card);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public AangAndLaOceansFury copy() {
|
|
||||||
return new AangAndLaOceansFury(this);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,59 +1,81 @@
|
||||||
package mage.cards.a;
|
package mage.cards.a;
|
||||||
|
|
||||||
import mage.MageInt;
|
import mage.abilities.Ability;
|
||||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||||
import mage.abilities.common.LeavesBattlefieldAllTriggeredAbility;
|
import mage.abilities.common.LeavesBattlefieldAllTriggeredAbility;
|
||||||
|
import mage.abilities.common.SimpleStaticAbility;
|
||||||
import mage.abilities.common.delayed.AtTheBeginOfNextUpkeepDelayedTriggeredAbility;
|
import mage.abilities.common.delayed.AtTheBeginOfNextUpkeepDelayedTriggeredAbility;
|
||||||
import mage.abilities.effects.common.CreateDelayedTriggeredAbilityEffect;
|
import mage.abilities.effects.common.CreateDelayedTriggeredAbilityEffect;
|
||||||
import mage.abilities.effects.common.LookLibraryAndPickControllerEffect;
|
import mage.abilities.effects.common.LookLibraryAndPickControllerEffect;
|
||||||
import mage.abilities.effects.common.TransformSourceEffect;
|
import mage.abilities.effects.common.TransformSourceEffect;
|
||||||
|
import mage.abilities.effects.common.continuous.GainAbilityControlledEffect;
|
||||||
|
import mage.abilities.effects.keyword.EarthbendTargetEffect;
|
||||||
import mage.abilities.keyword.FlyingAbility;
|
import mage.abilities.keyword.FlyingAbility;
|
||||||
import mage.abilities.keyword.TransformAbility;
|
import mage.abilities.keyword.VigilanceAbility;
|
||||||
import mage.cards.CardImpl;
|
import mage.abilities.triggers.BeginningOfCombatTriggeredAbility;
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
|
import mage.cards.TransformingDoubleFacedCard;
|
||||||
import mage.constants.*;
|
import mage.constants.*;
|
||||||
import mage.filter.FilterCard;
|
import mage.filter.FilterCard;
|
||||||
|
import mage.filter.FilterPermanent;
|
||||||
import mage.filter.StaticFilters;
|
import mage.filter.StaticFilters;
|
||||||
import mage.filter.common.FilterCreatureCard;
|
import mage.filter.common.FilterCreatureCard;
|
||||||
import mage.filter.predicate.mageobject.ManaValuePredicate;
|
import mage.filter.predicate.mageobject.ManaValuePredicate;
|
||||||
|
import mage.target.common.TargetControlledLandPermanent;
|
||||||
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author TheElk801
|
* @author TheElk801
|
||||||
*/
|
*/
|
||||||
public final class AangAtTheCrossroads extends CardImpl {
|
public final class AangAtTheCrossroads extends TransformingDoubleFacedCard {
|
||||||
|
|
||||||
private static final FilterCard filter = new FilterCreatureCard("creature card with mana value 4 or less");
|
private static final FilterCard filter = new FilterCreatureCard("creature card with mana value 4 or less");
|
||||||
|
private static final FilterPermanent saviorFilter = new FilterPermanent("land creatures");
|
||||||
|
|
||||||
static {
|
static {
|
||||||
filter.add(new ManaValuePredicate(ComparisonType.FEWER_THAN, 5));
|
filter.add(new ManaValuePredicate(ComparisonType.FEWER_THAN, 5));
|
||||||
|
saviorFilter.add(CardType.LAND.getPredicate());
|
||||||
|
saviorFilter.add(CardType.CREATURE.getPredicate());
|
||||||
}
|
}
|
||||||
|
|
||||||
public AangAtTheCrossroads(UUID ownerId, CardSetInfo setInfo) {
|
public AangAtTheCrossroads(UUID ownerId, CardSetInfo setInfo) {
|
||||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{G}{W}{U}");
|
super(ownerId, setInfo,
|
||||||
|
new SuperType[]{SuperType.LEGENDARY}, new CardType[]{CardType.CREATURE}, new SubType[]{SubType.HUMAN, SubType.AVATAR, SubType.ALLY}, "{2}{G}{W}{U}",
|
||||||
|
"Aang, Destined Savior",
|
||||||
|
new SuperType[]{SuperType.LEGENDARY}, new CardType[]{CardType.CREATURE}, new SubType[]{SubType.AVATAR, SubType.ALLY}, "");
|
||||||
|
|
||||||
this.supertype.add(SuperType.LEGENDARY);
|
this.getLeftHalfCard().setPT(3, 3);
|
||||||
this.subtype.add(SubType.HUMAN);
|
this.getRightHalfCard().setPT(4, 4);
|
||||||
this.subtype.add(SubType.AVATAR);
|
|
||||||
this.subtype.add(SubType.ALLY);
|
|
||||||
this.power = new MageInt(3);
|
|
||||||
this.toughness = new MageInt(3);
|
|
||||||
this.secondSideCardClazz = mage.cards.a.AangDestinedSavior.class;
|
|
||||||
|
|
||||||
// Flying
|
// Flying
|
||||||
this.addAbility(FlyingAbility.getInstance());
|
this.getLeftHalfCard().addAbility(FlyingAbility.getInstance());
|
||||||
|
|
||||||
// When Aang enters, look at the top five cards of your library. You may put a creature card with mana value 4 or less from among them onto the battlefield. Put the rest on the bottom of your library in a random order.
|
// When Aang enters, look at the top five cards of your library. You may put a creature card with mana value 4 or less from among them onto the battlefield. Put the rest on the bottom of your library in a random order.
|
||||||
this.addAbility(new EntersBattlefieldTriggeredAbility(new LookLibraryAndPickControllerEffect(
|
this.getLeftHalfCard().addAbility(new EntersBattlefieldTriggeredAbility(new LookLibraryAndPickControllerEffect(
|
||||||
5, 1, filter, PutCards.BATTLEFIELD, PutCards.BOTTOM_RANDOM
|
5, 1, filter, PutCards.BATTLEFIELD, PutCards.BOTTOM_RANDOM
|
||||||
)));
|
)));
|
||||||
|
|
||||||
// When another creature you control leaves the battlefield, transform Aang at the beginning of the next upkeep.
|
// When another creature you control leaves the battlefield, transform Aang at the beginning of the next upkeep.
|
||||||
this.addAbility(new TransformAbility());
|
this.getLeftHalfCard().addAbility(new LeavesBattlefieldAllTriggeredAbility(new CreateDelayedTriggeredAbilityEffect(
|
||||||
this.addAbility(new LeavesBattlefieldAllTriggeredAbility(new CreateDelayedTriggeredAbilityEffect(
|
|
||||||
new AtTheBeginOfNextUpkeepDelayedTriggeredAbility(new TransformSourceEffect())
|
new AtTheBeginOfNextUpkeepDelayedTriggeredAbility(new TransformSourceEffect())
|
||||||
).setText("transform {this} at the beginning of the next upkeep"), StaticFilters.FILTER_ANOTHER_CREATURE_YOU_CONTROL));
|
).setText("transform {this} at the beginning of the next upkeep"), StaticFilters.FILTER_ANOTHER_CREATURE_YOU_CONTROL)
|
||||||
|
.setTriggerPhrase("When another creature you control leaves the battlefield, "));
|
||||||
|
|
||||||
|
// Aang, Destined Savior
|
||||||
|
|
||||||
|
// Flying
|
||||||
|
this.getRightHalfCard().addAbility(FlyingAbility.getInstance());
|
||||||
|
|
||||||
|
// Land creatures you control have vigilance.
|
||||||
|
this.getRightHalfCard().addAbility(new SimpleStaticAbility(new GainAbilityControlledEffect(
|
||||||
|
VigilanceAbility.getInstance(), Duration.WhileOnBattlefield, saviorFilter
|
||||||
|
)));
|
||||||
|
|
||||||
|
// At the beginning of combat on your turn, earthbend 2.
|
||||||
|
Ability ability = new BeginningOfCombatTriggeredAbility(new EarthbendTargetEffect(2));
|
||||||
|
ability.addTarget(new TargetControlledLandPermanent());
|
||||||
|
this.getRightHalfCard().addAbility(ability);
|
||||||
}
|
}
|
||||||
|
|
||||||
private AangAtTheCrossroads(final AangAtTheCrossroads card) {
|
private AangAtTheCrossroads(final AangAtTheCrossroads card) {
|
||||||
|
|
|
||||||
|
|
@ -1,66 +0,0 @@
|
||||||
package mage.cards.a;
|
|
||||||
|
|
||||||
import mage.MageInt;
|
|
||||||
import mage.abilities.Ability;
|
|
||||||
import mage.abilities.common.SimpleStaticAbility;
|
|
||||||
import mage.abilities.effects.common.continuous.GainAbilityControlledEffect;
|
|
||||||
import mage.abilities.effects.keyword.EarthbendTargetEffect;
|
|
||||||
import mage.abilities.keyword.FlyingAbility;
|
|
||||||
import mage.abilities.keyword.VigilanceAbility;
|
|
||||||
import mage.abilities.triggers.BeginningOfCombatTriggeredAbility;
|
|
||||||
import mage.cards.CardImpl;
|
|
||||||
import mage.cards.CardSetInfo;
|
|
||||||
import mage.constants.CardType;
|
|
||||||
import mage.constants.Duration;
|
|
||||||
import mage.constants.SubType;
|
|
||||||
import mage.constants.SuperType;
|
|
||||||
import mage.filter.FilterPermanent;
|
|
||||||
import mage.target.common.TargetControlledLandPermanent;
|
|
||||||
|
|
||||||
import java.util.UUID;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author TheElk801
|
|
||||||
*/
|
|
||||||
public final class AangDestinedSavior extends CardImpl {
|
|
||||||
|
|
||||||
private static final FilterPermanent filter = new FilterPermanent("land creatures");
|
|
||||||
|
|
||||||
static {
|
|
||||||
filter.add(CardType.LAND.getPredicate());
|
|
||||||
filter.add(CardType.CREATURE.getPredicate());
|
|
||||||
}
|
|
||||||
|
|
||||||
public AangDestinedSavior(UUID ownerId, CardSetInfo setInfo) {
|
|
||||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "");
|
|
||||||
|
|
||||||
this.supertype.add(SuperType.LEGENDARY);
|
|
||||||
this.subtype.add(SubType.AVATAR);
|
|
||||||
this.subtype.add(SubType.ALLY);
|
|
||||||
this.power = new MageInt(4);
|
|
||||||
this.toughness = new MageInt(4);
|
|
||||||
this.nightCard = true;
|
|
||||||
|
|
||||||
// Flying
|
|
||||||
this.addAbility(FlyingAbility.getInstance());
|
|
||||||
|
|
||||||
// Land creatures you control have vigilance.
|
|
||||||
this.addAbility(new SimpleStaticAbility(new GainAbilityControlledEffect(
|
|
||||||
VigilanceAbility.getInstance(), Duration.WhileOnBattlefield, filter
|
|
||||||
)));
|
|
||||||
|
|
||||||
// At the beginning of combat on your turn, earthbend 2.
|
|
||||||
Ability ability = new BeginningOfCombatTriggeredAbility(new EarthbendTargetEffect(2));
|
|
||||||
ability.addTarget(new TargetControlledLandPermanent());
|
|
||||||
this.addAbility(ability);
|
|
||||||
}
|
|
||||||
|
|
||||||
private AangDestinedSavior(final AangDestinedSavior card) {
|
|
||||||
super(card);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public AangDestinedSavior copy() {
|
|
||||||
return new AangDestinedSavior(this);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,112 +0,0 @@
|
||||||
package mage.cards.a;
|
|
||||||
|
|
||||||
import mage.MageInt;
|
|
||||||
import mage.abilities.Ability;
|
|
||||||
import mage.abilities.common.SimpleStaticAbility;
|
|
||||||
import mage.abilities.costs.Cost;
|
|
||||||
import mage.abilities.costs.CostImpl;
|
|
||||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
|
||||||
import mage.abilities.dynamicvalue.common.StaticValue;
|
|
||||||
import mage.abilities.effects.common.DamagePlayersEffect;
|
|
||||||
import mage.abilities.effects.common.DoIfCostPaid;
|
|
||||||
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
|
|
||||||
import mage.abilities.effects.common.GainLifeEffect;
|
|
||||||
import mage.abilities.effects.common.cost.SpellsCostReductionControllerEffect;
|
|
||||||
import mage.abilities.effects.common.counter.AddCountersSourceEffect;
|
|
||||||
import mage.abilities.keyword.FlyingAbility;
|
|
||||||
import mage.abilities.triggers.BeginningOfUpkeepTriggeredAbility;
|
|
||||||
import mage.cards.Card;
|
|
||||||
import mage.cards.CardImpl;
|
|
||||||
import mage.cards.CardSetInfo;
|
|
||||||
import mage.constants.CardType;
|
|
||||||
import mage.constants.SubType;
|
|
||||||
import mage.constants.SuperType;
|
|
||||||
import mage.constants.TargetController;
|
|
||||||
import mage.counters.CounterType;
|
|
||||||
import mage.filter.FilterCard;
|
|
||||||
import mage.game.Game;
|
|
||||||
|
|
||||||
import java.util.Optional;
|
|
||||||
import java.util.UUID;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author TheElk801
|
|
||||||
*/
|
|
||||||
public final class AangMasterOfElements extends CardImpl {
|
|
||||||
|
|
||||||
private static final FilterCard filter = new FilterCard("spells");
|
|
||||||
|
|
||||||
public AangMasterOfElements(UUID ownerId, CardSetInfo setInfo) {
|
|
||||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "");
|
|
||||||
|
|
||||||
this.supertype.add(SuperType.LEGENDARY);
|
|
||||||
this.subtype.add(SubType.AVATAR);
|
|
||||||
this.subtype.add(SubType.ALLY);
|
|
||||||
this.power = new MageInt(6);
|
|
||||||
this.toughness = new MageInt(6);
|
|
||||||
this.nightCard = true;
|
|
||||||
|
|
||||||
// Flying
|
|
||||||
this.addAbility(FlyingAbility.getInstance());
|
|
||||||
|
|
||||||
// Spells you cast cost {W}{U}{B}{R}{G} less to cast.
|
|
||||||
this.addAbility(new SimpleStaticAbility(new SpellsCostReductionControllerEffect(
|
|
||||||
filter, new ManaCostsImpl<>("{W}{U}{B}{R}{G}"), StaticValue.get(1), true
|
|
||||||
)));
|
|
||||||
|
|
||||||
// At the beginning of each upkeep, you may transform Aang, Master of Elements. If you do, you gain 4 life, draw four cards, put four +1/+1 counters on him, and he deals 4 damage to each opponent.
|
|
||||||
this.addAbility(new BeginningOfUpkeepTriggeredAbility(
|
|
||||||
TargetController.ANY,
|
|
||||||
new DoIfCostPaid(new GainLifeEffect(4), new AangMasterOfElementsCost())
|
|
||||||
.addEffect(new DrawCardSourceControllerEffect(4).concatBy(","))
|
|
||||||
.addEffect(new AddCountersSourceEffect(CounterType.P1P1.createInstance(4))
|
|
||||||
.setText(", put four +1/+1 counters on him"))
|
|
||||||
.addEffect(new DamagePlayersEffect(4, TargetController.OPPONENT)
|
|
||||||
.setText(", and he deals 4 damage to each opponent")),
|
|
||||||
false
|
|
||||||
));
|
|
||||||
}
|
|
||||||
|
|
||||||
private AangMasterOfElements(final AangMasterOfElements card) {
|
|
||||||
super(card);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public AangMasterOfElements copy() {
|
|
||||||
return new AangMasterOfElements(this);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
class AangMasterOfElementsCost extends CostImpl {
|
|
||||||
|
|
||||||
AangMasterOfElementsCost() {
|
|
||||||
super();
|
|
||||||
text = "transform {this}";
|
|
||||||
}
|
|
||||||
|
|
||||||
private AangMasterOfElementsCost(final AangMasterOfElementsCost cost) {
|
|
||||||
super(cost);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public AangMasterOfElementsCost copy() {
|
|
||||||
return new AangMasterOfElementsCost(this);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean canPay(Ability ability, Ability source, UUID controllerId, Game game) {
|
|
||||||
return Optional
|
|
||||||
.ofNullable(source.getSourcePermanentIfItStillExists(game))
|
|
||||||
.filter(Card::isTransformable)
|
|
||||||
.isPresent();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean pay(Ability ability, Game game, Ability source, UUID controllerId, boolean noMana, Cost costToPay) {
|
|
||||||
paid = Optional
|
|
||||||
.ofNullable(source.getSourcePermanentIfItStillExists(game))
|
|
||||||
.filter(permanent -> permanent.transform(source, game))
|
|
||||||
.isPresent();
|
|
||||||
return paid;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,22 +1,28 @@
|
||||||
package mage.cards.a;
|
package mage.cards.a;
|
||||||
|
|
||||||
import mage.MageInt;
|
|
||||||
import mage.abilities.Ability;
|
import mage.abilities.Ability;
|
||||||
|
import mage.abilities.common.AttacksTriggeredAbility;
|
||||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||||
import mage.abilities.common.SimpleActivatedAbility;
|
import mage.abilities.common.SimpleActivatedAbility;
|
||||||
import mage.abilities.costs.common.WaterbendCost;
|
import mage.abilities.costs.common.WaterbendCost;
|
||||||
import mage.abilities.effects.common.TransformSourceEffect;
|
import mage.abilities.effects.common.TransformSourceEffect;
|
||||||
|
import mage.abilities.effects.common.counter.AddCountersAllEffect;
|
||||||
import mage.abilities.effects.keyword.AirbendTargetEffect;
|
import mage.abilities.effects.keyword.AirbendTargetEffect;
|
||||||
import mage.abilities.keyword.FlashAbility;
|
import mage.abilities.keyword.FlashAbility;
|
||||||
import mage.abilities.keyword.FlyingAbility;
|
import mage.abilities.keyword.FlyingAbility;
|
||||||
import mage.abilities.keyword.TransformAbility;
|
import mage.abilities.keyword.ReachAbility;
|
||||||
import mage.cards.CardImpl;
|
import mage.abilities.keyword.TrampleAbility;
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
|
import mage.cards.TransformingDoubleFacedCard;
|
||||||
import mage.constants.CardType;
|
import mage.constants.CardType;
|
||||||
import mage.constants.SubType;
|
import mage.constants.SubType;
|
||||||
import mage.constants.SuperType;
|
import mage.constants.SuperType;
|
||||||
|
import mage.counters.CounterType;
|
||||||
|
import mage.filter.FilterPermanent;
|
||||||
|
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||||
import mage.filter.common.FilterSpellOrPermanent;
|
import mage.filter.common.FilterSpellOrPermanent;
|
||||||
import mage.filter.predicate.mageobject.AnotherPredicate;
|
import mage.filter.predicate.mageobject.AnotherPredicate;
|
||||||
|
import mage.filter.predicate.permanent.TappedPredicate;
|
||||||
import mage.target.common.TargetSpellOrPermanent;
|
import mage.target.common.TargetSpellOrPermanent;
|
||||||
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
|
@ -24,40 +30,52 @@ import java.util.UUID;
|
||||||
/**
|
/**
|
||||||
* @author TheElk801
|
* @author TheElk801
|
||||||
*/
|
*/
|
||||||
public final class AangSwiftSavior extends CardImpl {
|
public final class AangSwiftSavior extends TransformingDoubleFacedCard {
|
||||||
|
|
||||||
private static final FilterSpellOrPermanent filter = new FilterSpellOrPermanent("other target creature or spell");
|
private static final FilterSpellOrPermanent filter = new FilterSpellOrPermanent("other target creature or spell");
|
||||||
|
private static final FilterPermanent laFilter = new FilterControlledCreaturePermanent("tapped creature you control");
|
||||||
|
|
||||||
|
static {
|
||||||
|
}
|
||||||
static {
|
static {
|
||||||
filter.getPermanentFilter().add(CardType.CREATURE.getPredicate());
|
filter.getPermanentFilter().add(CardType.CREATURE.getPredicate());
|
||||||
filter.getPermanentFilter().add(AnotherPredicate.instance);
|
filter.getPermanentFilter().add(AnotherPredicate.instance);
|
||||||
|
laFilter.add(TappedPredicate.TAPPED);
|
||||||
}
|
}
|
||||||
|
|
||||||
public AangSwiftSavior(UUID ownerId, CardSetInfo setInfo) {
|
public AangSwiftSavior(UUID ownerId, CardSetInfo setInfo) {
|
||||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{W}{U}");
|
super(ownerId, setInfo,
|
||||||
|
new SuperType[]{SuperType.LEGENDARY}, new CardType[]{CardType.CREATURE}, new SubType[]{SubType.HUMAN, SubType.AVATAR, SubType.ALLY}, "{1}{W}{U}",
|
||||||
|
"Aang and La, Ocean's Fury",
|
||||||
|
new SuperType[]{SuperType.LEGENDARY}, new CardType[]{CardType.CREATURE}, new SubType[]{SubType.AVATAR, SubType.SPIRIT, SubType.ALLY}, "");
|
||||||
|
|
||||||
this.supertype.add(SuperType.LEGENDARY);
|
this.getLeftHalfCard().setPT(2, 3);
|
||||||
this.subtype.add(SubType.HUMAN);
|
this.getRightHalfCard().setPT(5, 5);
|
||||||
this.subtype.add(SubType.AVATAR);
|
|
||||||
this.subtype.add(SubType.ALLY);
|
|
||||||
this.power = new MageInt(2);
|
|
||||||
this.toughness = new MageInt(3);
|
|
||||||
this.secondSideCardClazz = mage.cards.a.AangAndLaOceansFury.class;
|
|
||||||
|
|
||||||
// Flash
|
// Flash
|
||||||
this.addAbility(FlashAbility.getInstance());
|
this.getLeftHalfCard().addAbility(FlashAbility.getInstance());
|
||||||
|
|
||||||
// Flying
|
// Flying
|
||||||
this.addAbility(FlyingAbility.getInstance());
|
this.getLeftHalfCard().addAbility(FlyingAbility.getInstance());
|
||||||
|
|
||||||
// When Aang enters, airbend up to one other target creature or spell.
|
// When Aang enters, airbend up to one other target creature or spell.
|
||||||
Ability ability = new EntersBattlefieldTriggeredAbility(new AirbendTargetEffect());
|
Ability ability = new EntersBattlefieldTriggeredAbility(new AirbendTargetEffect());
|
||||||
ability.addTarget(new TargetSpellOrPermanent(0, 1, filter, false));
|
ability.addTarget(new TargetSpellOrPermanent(0, 1, filter, false));
|
||||||
this.addAbility(ability);
|
this.getLeftHalfCard().addAbility(ability);
|
||||||
|
|
||||||
// Waterbend {8}: Transform Aang.
|
// Waterbend {8}: Transform Aang.
|
||||||
this.addAbility(new TransformAbility());
|
this.getLeftHalfCard().addAbility(new SimpleActivatedAbility(new TransformSourceEffect(), new WaterbendCost(8)));
|
||||||
this.addAbility(new SimpleActivatedAbility(new TransformSourceEffect(), new WaterbendCost(8)));
|
|
||||||
|
// Aang and La, Ocean's Fury
|
||||||
|
|
||||||
|
// Reach
|
||||||
|
this.getRightHalfCard().addAbility(ReachAbility.getInstance());
|
||||||
|
|
||||||
|
// Trample
|
||||||
|
this.getRightHalfCard().addAbility(TrampleAbility.getInstance());
|
||||||
|
|
||||||
|
// Whenever Aang and La attack, put a +1/+1 counter on each tapped creature you control.
|
||||||
|
this.getRightHalfCard().addAbility(new AttacksTriggeredAbility(new AddCountersAllEffect(CounterType.P1P1.createInstance(), laFilter)).setTriggerPhrase("Whenever {this} attack, "));
|
||||||
}
|
}
|
||||||
|
|
||||||
private AangSwiftSavior(final AangSwiftSavior card) {
|
private AangSwiftSavior(final AangSwiftSavior card) {
|
||||||
|
|
|
||||||
|
|
@ -1,16 +1,16 @@
|
||||||
|
|
||||||
package mage.cards.a;
|
package mage.cards.a;
|
||||||
|
|
||||||
import mage.MageInt;
|
|
||||||
import mage.abilities.Ability;
|
import mage.abilities.Ability;
|
||||||
import mage.abilities.triggers.BeginningOfUpkeepTriggeredAbility;
|
|
||||||
import mage.abilities.effects.OneShotEffect;
|
import mage.abilities.effects.OneShotEffect;
|
||||||
import mage.abilities.effects.common.TransformSourceEffect;
|
import mage.abilities.effects.common.TransformSourceEffect;
|
||||||
import mage.abilities.keyword.FlyingAbility;
|
import mage.abilities.keyword.FlyingAbility;
|
||||||
import mage.abilities.keyword.TransformAbility;
|
import mage.abilities.triggers.BeginningOfUpkeepTriggeredAbility;
|
||||||
import mage.cards.CardImpl;
|
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
import mage.constants.*;
|
import mage.cards.TransformingDoubleFacedCard;
|
||||||
|
import mage.constants.CardType;
|
||||||
|
import mage.constants.Outcome;
|
||||||
|
import mage.constants.SubType;
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
import mage.players.Player;
|
import mage.players.Player;
|
||||||
|
|
||||||
|
|
@ -19,23 +19,26 @@ import java.util.UUID;
|
||||||
/**
|
/**
|
||||||
* @author fireshoes
|
* @author fireshoes
|
||||||
*/
|
*/
|
||||||
public final class AberrantResearcher extends CardImpl {
|
public final class AberrantResearcher extends TransformingDoubleFacedCard {
|
||||||
|
|
||||||
public AberrantResearcher(UUID ownerId, CardSetInfo setInfo) {
|
public AberrantResearcher(UUID ownerId, CardSetInfo setInfo) {
|
||||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{U}");
|
super(ownerId, setInfo,
|
||||||
this.subtype.add(SubType.HUMAN);
|
new CardType[]{CardType.CREATURE}, new SubType[]{SubType.HUMAN, SubType.INSECT}, "{3}{U}",
|
||||||
this.subtype.add(SubType.INSECT);
|
"Perfected Form",
|
||||||
this.power = new MageInt(3);
|
new CardType[]{CardType.CREATURE}, new SubType[]{SubType.INSECT, SubType.HORROR}, "U");
|
||||||
this.toughness = new MageInt(2);
|
|
||||||
|
|
||||||
this.secondSideCardClazz = mage.cards.p.PerfectedForm.class;
|
this.getLeftHalfCard().setPT(3, 2);
|
||||||
|
this.getRightHalfCard().setPT(5, 4);
|
||||||
|
|
||||||
// Flying
|
// Flying
|
||||||
this.addAbility(FlyingAbility.getInstance());
|
this.getLeftHalfCard().addAbility(FlyingAbility.getInstance());
|
||||||
|
|
||||||
// At the beginning of your upkeep, put the top card of your library into your graveyard. If it's an instant or sorcery card, transform Aberrant Researcher.
|
// At the beginning of your upkeep, put the top card of your library into your graveyard. If it's an instant or sorcery card, transform Aberrant Researcher.
|
||||||
this.addAbility(new TransformAbility());
|
this.getLeftHalfCard().addAbility(new BeginningOfUpkeepTriggeredAbility(new AberrantResearcherEffect()));
|
||||||
this.addAbility(new BeginningOfUpkeepTriggeredAbility(new AberrantResearcherEffect()));
|
|
||||||
|
// Perfected Form
|
||||||
|
// Flying
|
||||||
|
this.getRightHalfCard().addAbility(FlyingAbility.getInstance());
|
||||||
}
|
}
|
||||||
|
|
||||||
private AberrantResearcher(final AberrantResearcher card) {
|
private AberrantResearcher(final AberrantResearcher card) {
|
||||||
|
|
|
||||||
|
|
@ -1,49 +1,76 @@
|
||||||
package mage.cards.a;
|
package mage.cards.a;
|
||||||
|
|
||||||
import mage.MageInt;
|
|
||||||
import mage.abilities.Ability;
|
import mage.abilities.Ability;
|
||||||
|
import mage.abilities.SpellAbility;
|
||||||
import mage.abilities.common.DiesSourceTriggeredAbility;
|
import mage.abilities.common.DiesSourceTriggeredAbility;
|
||||||
import mage.abilities.common.SimpleStaticAbility;
|
import mage.abilities.common.SimpleStaticAbility;
|
||||||
import mage.abilities.effects.OneShotEffect;
|
import mage.abilities.effects.OneShotEffect;
|
||||||
|
import mage.abilities.effects.common.AttachEffect;
|
||||||
|
import mage.abilities.effects.common.GainLifeEffect;
|
||||||
|
import mage.abilities.effects.common.LoseLifeTargetEffect;
|
||||||
|
import mage.abilities.effects.common.cost.CostModificationEffectImpl;
|
||||||
import mage.abilities.effects.common.cost.SpellsCostModificationThatTargetSourceEffect;
|
import mage.abilities.effects.common.cost.SpellsCostModificationThatTargetSourceEffect;
|
||||||
|
import mage.abilities.keyword.EnchantAbility;
|
||||||
import mage.abilities.keyword.TransformAbility;
|
import mage.abilities.keyword.TransformAbility;
|
||||||
import mage.cards.Card;
|
import mage.abilities.triggers.BeginningOfUpkeepTriggeredAbility;
|
||||||
import mage.cards.CardImpl;
|
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
|
import mage.cards.DoubleFacedCardHalf;
|
||||||
|
import mage.cards.TransformingDoubleFacedCard;
|
||||||
import mage.constants.*;
|
import mage.constants.*;
|
||||||
import mage.filter.FilterCard;
|
import mage.filter.FilterCard;
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
|
import mage.game.permanent.Permanent;
|
||||||
|
import mage.game.stack.Spell;
|
||||||
import mage.players.Player;
|
import mage.players.Player;
|
||||||
|
import mage.target.TargetPlayer;
|
||||||
import mage.target.common.TargetOpponent;
|
import mage.target.common.TargetOpponent;
|
||||||
|
import mage.util.CardUtil;
|
||||||
|
|
||||||
|
import java.util.Objects;
|
||||||
|
import java.util.Set;
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author halljared
|
* @author halljared
|
||||||
*/
|
*/
|
||||||
public final class AccursedWitch extends CardImpl {
|
public final class AccursedWitch extends TransformingDoubleFacedCard {
|
||||||
|
|
||||||
private static final FilterCard filter = new FilterCard("spells");
|
private static final FilterCard filter = new FilterCard("spells");
|
||||||
|
|
||||||
public AccursedWitch(UUID ownerId, CardSetInfo setInfo) {
|
public AccursedWitch(UUID ownerId, CardSetInfo setInfo) {
|
||||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{B}");
|
super(ownerId, setInfo,
|
||||||
this.subtype.add(SubType.HUMAN);
|
new CardType[]{CardType.CREATURE}, new SubType[]{SubType.HUMAN, SubType.SHAMAN}, "{3}{B}",
|
||||||
this.subtype.add(SubType.SHAMAN);
|
"Infectious Curse",
|
||||||
this.power = new MageInt(4);
|
new CardType[]{CardType.ENCHANTMENT}, new SubType[]{SubType.AURA, SubType.CURSE}, "B");
|
||||||
this.toughness = new MageInt(2);
|
this.getLeftHalfCard().setPT(4, 2);
|
||||||
|
|
||||||
this.secondSideCardClazz = mage.cards.i.InfectiousCurse.class;
|
|
||||||
|
|
||||||
// Spells your opponents cast that target Accursed Witch cost {1} less to cast.
|
// Spells your opponents cast that target Accursed Witch cost {1} less to cast.
|
||||||
this.addAbility(new SimpleStaticAbility(
|
this.getLeftHalfCard().addAbility(new SimpleStaticAbility(
|
||||||
new SpellsCostModificationThatTargetSourceEffect(-1, filter, TargetController.OPPONENT))
|
new SpellsCostModificationThatTargetSourceEffect(-1, filter, TargetController.OPPONENT))
|
||||||
);
|
);
|
||||||
|
|
||||||
// When Accursed Witch dies, return it to the battlefield transformed under your control attached to target opponent.
|
// When Accursed Witch dies, return it to the battlefield transformed under your control attached to target opponent.
|
||||||
this.addAbility(new TransformAbility());
|
|
||||||
Ability ability = new DiesSourceTriggeredAbility(new AccursedWitchReturnTransformedEffect());
|
Ability ability = new DiesSourceTriggeredAbility(new AccursedWitchReturnTransformedEffect());
|
||||||
ability.addTarget(new TargetOpponent());
|
ability.addTarget(new TargetOpponent());
|
||||||
this.addAbility(ability);
|
this.getLeftHalfCard().addAbility(ability);
|
||||||
|
|
||||||
|
// Infectious Curse
|
||||||
|
// Enchant player
|
||||||
|
TargetPlayer auraTarget = new TargetPlayer();
|
||||||
|
this.getRightHalfCard().getSpellAbility().addTarget(auraTarget);
|
||||||
|
this.getRightHalfCard().getSpellAbility().addEffect(new AttachEffect(Outcome.Damage));
|
||||||
|
this.getRightHalfCard().addAbility(new EnchantAbility(auraTarget));
|
||||||
|
|
||||||
|
// Spells you cast that target enchanted player cost {1} less to cast.
|
||||||
|
this.getRightHalfCard().addAbility(new SimpleStaticAbility(new InfectiousCurseCostReductionEffect()));
|
||||||
|
|
||||||
|
// At the beginning of enchanted player's upkeep, that player loses 1 life and you gain 1 life.
|
||||||
|
Ability upkeepAbility = new BeginningOfUpkeepTriggeredAbility(
|
||||||
|
TargetController.ENCHANTED, new LoseLifeTargetEffect(1).setText("that player loses 1 life"),
|
||||||
|
false
|
||||||
|
);
|
||||||
|
upkeepAbility.addEffect(new GainLifeEffect(1).concatBy("and"));
|
||||||
|
this.getRightHalfCard().addAbility(upkeepAbility);
|
||||||
}
|
}
|
||||||
|
|
||||||
private AccursedWitch(final AccursedWitch card) {
|
private AccursedWitch(final AccursedWitch card) {
|
||||||
|
|
@ -80,16 +107,67 @@ class AccursedWitchReturnTransformedEffect extends OneShotEffect {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
Card card = game.getCard(source.getSourceId());
|
DoubleFacedCardHalf card = (DoubleFacedCardHalf) game.getCard(source.getSourceId());
|
||||||
if (card == null) {
|
if (card == null) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
game.getState().setValue(TransformAbility.VALUE_KEY_ENTER_TRANSFORMED + source.getSourceId(), Boolean.TRUE);
|
game.getState().setValue(TransformAbility.VALUE_KEY_ENTER_TRANSFORMED + source.getSourceId(), Boolean.TRUE);
|
||||||
game.getState().setValue("attachTo:" + source.getSourceId(), attachTo.getId());
|
game.getState().setValue("attachTo:" + card.getOtherSide().getId(), attachTo.getId());
|
||||||
if (controller.moveCards(card, Zone.BATTLEFIELD, source, game)) {
|
if (controller.moveCards(card, Zone.BATTLEFIELD, source, game)) {
|
||||||
attachTo.addAttachment(card.getId(), source, game);
|
attachTo.addAttachment(card.getOtherSide().getId(), source, game);
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
class InfectiousCurseCostReductionEffect extends CostModificationEffectImpl {
|
||||||
|
|
||||||
|
InfectiousCurseCostReductionEffect() {
|
||||||
|
super(Duration.WhileOnBattlefield, Outcome.Benefit, CostModificationType.REDUCE_COST);
|
||||||
|
this.staticText = "Spells you cast that target enchanted player cost {1} less to cast";
|
||||||
|
}
|
||||||
|
|
||||||
|
private InfectiousCurseCostReductionEffect(InfectiousCurseCostReductionEffect effect) {
|
||||||
|
super(effect);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean apply(Game game, Ability source, Ability abilityToModify) {
|
||||||
|
CardUtil.reduceCost(abilityToModify, 1);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean applies(Ability abilityToModify, Ability source, Game game) {
|
||||||
|
if (!(abilityToModify instanceof SpellAbility)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!source.isControlledBy(abilityToModify.getControllerId())) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
Permanent enchantment = game.getPermanent(source.getSourceId());
|
||||||
|
if (enchantment == null || enchantment.getAttachedTo() == null) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
Spell spell = (Spell) game.getStack().getStackObject(abilityToModify.getId());
|
||||||
|
Set<UUID> allTargets;
|
||||||
|
if (spell != null) {
|
||||||
|
// real cast
|
||||||
|
allTargets = CardUtil.getAllSelectedTargets(abilityToModify, game);
|
||||||
|
} else {
|
||||||
|
// playable
|
||||||
|
allTargets = CardUtil.getAllPossibleTargets(abilityToModify, game);
|
||||||
|
}
|
||||||
|
|
||||||
|
// try to reduce all the time (if it possible to target)
|
||||||
|
return allTargets.stream().anyMatch(target -> Objects.equals(target, enchantment.getAttachedTo()));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public InfectiousCurseCostReductionEffect copy() {
|
||||||
|
return new InfectiousCurseCostReductionEffect(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,16 +1,23 @@
|
||||||
package mage.cards.a;
|
package mage.cards.a;
|
||||||
|
|
||||||
import mage.MageInt;
|
|
||||||
import mage.MageObject;
|
|
||||||
import mage.abilities.Ability;
|
import mage.abilities.Ability;
|
||||||
import mage.abilities.TriggeredAbilityImpl;
|
import mage.abilities.TriggeredAbilityImpl;
|
||||||
|
import mage.abilities.common.ActivateIfConditionActivatedAbility;
|
||||||
import mage.abilities.common.AttacksTriggeredAbility;
|
import mage.abilities.common.AttacksTriggeredAbility;
|
||||||
import mage.abilities.common.DiesSourceTriggeredAbility;
|
import mage.abilities.common.DiesSourceTriggeredAbility;
|
||||||
|
import mage.abilities.condition.Condition;
|
||||||
|
import mage.abilities.condition.common.CardsInHandCondition;
|
||||||
|
import mage.abilities.costs.common.TapSourceCost;
|
||||||
|
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||||
import mage.abilities.effects.OneShotEffect;
|
import mage.abilities.effects.OneShotEffect;
|
||||||
import mage.abilities.effects.common.CreateTokenEffect;
|
import mage.abilities.effects.common.CreateTokenEffect;
|
||||||
|
import mage.abilities.effects.common.TransformSourceEffect;
|
||||||
|
import mage.abilities.hint.ConditionHint;
|
||||||
|
import mage.abilities.hint.Hint;
|
||||||
import mage.abilities.keyword.FlyingAbility;
|
import mage.abilities.keyword.FlyingAbility;
|
||||||
import mage.abilities.keyword.LifelinkAbility;
|
import mage.abilities.keyword.LifelinkAbility;
|
||||||
import mage.abilities.keyword.TransformAbility;
|
import mage.abilities.keyword.TransformAbility;
|
||||||
|
import mage.abilities.mana.BlackManaAbility;
|
||||||
import mage.cards.*;
|
import mage.cards.*;
|
||||||
import mage.constants.*;
|
import mage.constants.*;
|
||||||
import mage.filter.StaticFilters;
|
import mage.filter.StaticFilters;
|
||||||
|
|
@ -28,33 +35,43 @@ import java.util.UUID;
|
||||||
/**
|
/**
|
||||||
* @author Susucr
|
* @author Susucr
|
||||||
*/
|
*/
|
||||||
public final class AclazotzDeepestBetrayal extends CardImpl {
|
public final class AclazotzDeepestBetrayal extends TransformingDoubleFacedCard {
|
||||||
|
private static final Condition condition = new CardsInHandCondition(ComparisonType.FEWER_THAN, 2, TargetController.ANY);
|
||||||
|
private static final Hint hint = new ConditionHint(condition);
|
||||||
|
|
||||||
public AclazotzDeepestBetrayal(UUID ownerId, CardSetInfo setInfo) {
|
public AclazotzDeepestBetrayal(UUID ownerId, CardSetInfo setInfo) {
|
||||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{B}{B}");
|
super(ownerId, setInfo,
|
||||||
this.secondSideCardClazz = mage.cards.t.TempleOfTheDead.class;
|
new SuperType[]{SuperType.LEGENDARY}, new CardType[]{CardType.CREATURE}, new SubType[]{SubType.BAT, SubType.GOD}, "{3}{B}{B}",
|
||||||
|
"Temple of the Dead",
|
||||||
|
new SuperType[]{}, new CardType[]{CardType.LAND}, new SubType[]{}, "");
|
||||||
|
|
||||||
this.supertype.add(SuperType.LEGENDARY);
|
this.getLeftHalfCard().setPT(4, 4);
|
||||||
this.subtype.add(SubType.BAT);
|
|
||||||
this.subtype.add(SubType.GOD);
|
|
||||||
this.power = new MageInt(4);
|
|
||||||
this.toughness = new MageInt(4);
|
|
||||||
|
|
||||||
// Flying
|
// Flying
|
||||||
this.addAbility(FlyingAbility.getInstance());
|
this.getLeftHalfCard().addAbility(FlyingAbility.getInstance());
|
||||||
|
|
||||||
// Lifelink
|
// Lifelink
|
||||||
this.addAbility(LifelinkAbility.getInstance());
|
this.getLeftHalfCard().addAbility(LifelinkAbility.getInstance());
|
||||||
|
|
||||||
// Whenever Aclazotz attacks, each opponent discards a card. For each opponent who can't, you draw a card.
|
// Whenever Aclazotz attacks, each opponent discards a card. For each opponent who can't, you draw a card.
|
||||||
this.addAbility(new AttacksTriggeredAbility(new AclazotzDeepestBetrayalEffect()));
|
this.getLeftHalfCard().addAbility(new AttacksTriggeredAbility(new AclazotzDeepestBetrayalEffect()));
|
||||||
|
|
||||||
// Whenever an opponent discards a land card, create a 1/1 black Bat creature token with flying.
|
// Whenever an opponent discards a land card, create a 1/1 black Bat creature token with flying.
|
||||||
this.addAbility(new AclazotzDeepestBetrayalTriggeredAbility());
|
this.getLeftHalfCard().addAbility(new AclazotzDeepestBetrayalTriggeredAbility());
|
||||||
|
|
||||||
// When Aclazotz dies, return it to the battlefield tapped and transformed under its owner's control.
|
// When Aclazotz dies, return it to the battlefield tapped and transformed under its owner's control.
|
||||||
this.addAbility(new TransformAbility());
|
this.getLeftHalfCard().addAbility(new DiesSourceTriggeredAbility(new AclazotzDeepestBetrayalTransformEffect()));
|
||||||
this.addAbility(new DiesSourceTriggeredAbility(new AclazotzDeepestBetrayalTransformEffect()));
|
|
||||||
|
// Temple of the Dead
|
||||||
|
// {T}: Add {B}.
|
||||||
|
this.getRightHalfCard().addAbility(new BlackManaAbility());
|
||||||
|
|
||||||
|
// {2}{B}, {T}: Transform Temple of the Dead. Activate only if a player has one or fewer cards in hand and only as a sorcery.
|
||||||
|
Ability ability = new ActivateIfConditionActivatedAbility(
|
||||||
|
new TransformSourceEffect(), new ManaCostsImpl<>("{2}{B}"), condition
|
||||||
|
).setTiming(TimingRule.SORCERY);
|
||||||
|
ability.addCost(new TapSourceCost());
|
||||||
|
this.getRightHalfCard().addAbility(ability.addHint(hint));
|
||||||
}
|
}
|
||||||
|
|
||||||
private AclazotzDeepestBetrayal(final AclazotzDeepestBetrayal card) {
|
private AclazotzDeepestBetrayal(final AclazotzDeepestBetrayal card) {
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,3 @@
|
||||||
|
|
||||||
package mage.cards.a;
|
package mage.cards.a;
|
||||||
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
|
@ -28,7 +27,9 @@ public final class AcolyteOfTheInferno extends CardImpl {
|
||||||
this.addAbility(new RenownAbility(1));
|
this.addAbility(new RenownAbility(1));
|
||||||
|
|
||||||
// Whenever Acolyte of the Inferno becomes blocked by a creature, it deals 2 damage to that creature
|
// Whenever Acolyte of the Inferno becomes blocked by a creature, it deals 2 damage to that creature
|
||||||
this.addAbility(new BecomesBlockedByCreatureTriggeredAbility(new DamageTargetEffect(2, true, "that creature", "it"), false));
|
this.addAbility(new BecomesBlockedByCreatureTriggeredAbility(
|
||||||
|
new DamageTargetEffect(2, "it")
|
||||||
|
.withTargetDescription("that creature"), false));
|
||||||
}
|
}
|
||||||
|
|
||||||
private AcolyteOfTheInferno(final AcolyteOfTheInferno card) {
|
private AcolyteOfTheInferno(final AcolyteOfTheInferno card) {
|
||||||
|
|
|
||||||
|
|
@ -41,7 +41,7 @@ public final class AdrenalineJockey extends CardImpl {
|
||||||
|
|
||||||
// Whenever a player casts a spell, if it's not their turn, this creature deals 4 damage to them.
|
// Whenever a player casts a spell, if it's not their turn, this creature deals 4 damage to them.
|
||||||
this.addAbility(new SpellCastAllTriggeredAbility(
|
this.addAbility(new SpellCastAllTriggeredAbility(
|
||||||
new DamageTargetEffect(4, true, "them"),
|
new DamageTargetEffect(4).withTargetDescription("them"),
|
||||||
filter, false, SetTargetPointer.PLAYER
|
filter, false, SetTargetPointer.PLAYER
|
||||||
));
|
));
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,13 +1,13 @@
|
||||||
package mage.cards.a;
|
package mage.cards.a;
|
||||||
|
|
||||||
import mage.MageInt;
|
|
||||||
import mage.abilities.common.ActivateAsSorceryActivatedAbility;
|
import mage.abilities.common.ActivateAsSorceryActivatedAbility;
|
||||||
|
import mage.abilities.common.DealsCombatDamageToAPlayerOrBattleTriggeredAbility;
|
||||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||||
|
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
|
||||||
import mage.abilities.effects.common.TransformSourceEffect;
|
import mage.abilities.effects.common.TransformSourceEffect;
|
||||||
import mage.abilities.keyword.DeathtouchAbility;
|
import mage.abilities.keyword.DeathtouchAbility;
|
||||||
import mage.abilities.keyword.TransformAbility;
|
|
||||||
import mage.cards.CardImpl;
|
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
|
import mage.cards.TransformingDoubleFacedCard;
|
||||||
import mage.constants.CardType;
|
import mage.constants.CardType;
|
||||||
import mage.constants.SubType;
|
import mage.constants.SubType;
|
||||||
|
|
||||||
|
|
@ -16,23 +16,28 @@ import java.util.UUID;
|
||||||
/**
|
/**
|
||||||
* @author TheElk801
|
* @author TheElk801
|
||||||
*/
|
*/
|
||||||
public final class AetherbladeAgent extends CardImpl {
|
public final class AetherbladeAgent extends TransformingDoubleFacedCard {
|
||||||
|
|
||||||
public AetherbladeAgent(UUID ownerId, CardSetInfo setInfo) {
|
public AetherbladeAgent(UUID ownerId, CardSetInfo setInfo) {
|
||||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{B}");
|
super(ownerId, setInfo,
|
||||||
|
new CardType[]{CardType.CREATURE}, new SubType[]{SubType.HUMAN, SubType.ROGUE}, "{1}{B}",
|
||||||
this.subtype.add(SubType.HUMAN);
|
"Gitaxian Mindstinger",
|
||||||
this.subtype.add(SubType.ROGUE);
|
new CardType[]{CardType.CREATURE}, new SubType[]{SubType.PHYREXIAN, SubType.ROGUE}, "UB");
|
||||||
this.power = new MageInt(1);
|
this.getLeftHalfCard().setPT(1, 1);
|
||||||
this.toughness = new MageInt(1);
|
this.getRightHalfCard().setPT(3, 3);
|
||||||
this.secondSideCardClazz = mage.cards.g.GitaxianMindstinger.class;
|
|
||||||
|
|
||||||
// Deathtouch
|
// Deathtouch
|
||||||
this.addAbility(DeathtouchAbility.getInstance());
|
this.getLeftHalfCard().addAbility(DeathtouchAbility.getInstance());
|
||||||
|
|
||||||
// {4}{U/P}: Transform Aetherblade Agent. Activate only as a sorcery.
|
// {4}{U/P}: Transform Aetherblade Agent. Activate only as a sorcery.
|
||||||
this.addAbility(new TransformAbility());
|
this.getLeftHalfCard().addAbility(new ActivateAsSorceryActivatedAbility(new TransformSourceEffect(), new ManaCostsImpl<>("{4}{U/P}")));
|
||||||
this.addAbility(new ActivateAsSorceryActivatedAbility(new TransformSourceEffect(), new ManaCostsImpl<>("{4}{U/P}")));
|
|
||||||
|
// Gitaxian Mindstinger
|
||||||
|
// Deathtouch
|
||||||
|
this.getRightHalfCard().addAbility(DeathtouchAbility.getInstance());
|
||||||
|
|
||||||
|
// Whenever Gitaxian Mindstinger deals combat damage to a player or battle, draw a card.
|
||||||
|
this.getRightHalfCard().addAbility(new DealsCombatDamageToAPlayerOrBattleTriggeredAbility(new DrawCardSourceControllerEffect(1),false));
|
||||||
}
|
}
|
||||||
|
|
||||||
private AetherbladeAgent(final AetherbladeAgent card) {
|
private AetherbladeAgent(final AetherbladeAgent card) {
|
||||||
|
|
|
||||||
|
|
@ -1,33 +1,49 @@
|
||||||
package mage.cards.a;
|
package mage.cards.a;
|
||||||
|
|
||||||
import mage.MageInt;
|
import mage.abilities.Ability;
|
||||||
|
import mage.abilities.common.TransformIntoSourceTriggeredAbility;
|
||||||
|
import mage.abilities.common.WerewolfBackTriggeredAbility;
|
||||||
import mage.abilities.common.WerewolfFrontTriggeredAbility;
|
import mage.abilities.common.WerewolfFrontTriggeredAbility;
|
||||||
import mage.abilities.keyword.TransformAbility;
|
import mage.abilities.effects.OneShotEffect;
|
||||||
import mage.cards.CardImpl;
|
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
|
import mage.cards.TransformingDoubleFacedCard;
|
||||||
import mage.constants.CardType;
|
import mage.constants.CardType;
|
||||||
|
import mage.constants.Outcome;
|
||||||
import mage.constants.SubType;
|
import mage.constants.SubType;
|
||||||
|
import mage.constants.Zone;
|
||||||
|
import mage.game.Controllable;
|
||||||
|
import mage.game.Game;
|
||||||
|
import mage.game.permanent.Permanent;
|
||||||
|
import mage.target.common.TargetArtifactPermanent;
|
||||||
|
|
||||||
|
import java.util.Optional;
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author BetaSteward
|
* @author BetaSteward
|
||||||
*/
|
*/
|
||||||
public final class AfflictedDeserter extends CardImpl {
|
public final class AfflictedDeserter extends TransformingDoubleFacedCard {
|
||||||
|
|
||||||
public AfflictedDeserter(UUID ownerId, CardSetInfo setInfo) {
|
public AfflictedDeserter(UUID ownerId, CardSetInfo setInfo) {
|
||||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{R}");
|
super(ownerId, setInfo,
|
||||||
this.subtype.add(SubType.HUMAN);
|
new CardType[]{CardType.CREATURE}, new SubType[]{SubType.HUMAN, SubType.WEREWOLF}, "{3}{R}",
|
||||||
this.subtype.add(SubType.WEREWOLF);
|
"Werewolf Ransacker",
|
||||||
|
new CardType[]{CardType.CREATURE}, new SubType[]{SubType.WEREWOLF}, "R");
|
||||||
this.secondSideCardClazz = mage.cards.w.WerewolfRansacker.class;
|
this.getLeftHalfCard().setPT(3, 2);
|
||||||
|
this.getRightHalfCard().setPT(5, 4);
|
||||||
this.power = new MageInt(3);
|
|
||||||
this.toughness = new MageInt(2);
|
|
||||||
|
|
||||||
// At the beginning of each upkeep, if no spells were cast last turn, transform Afflicted Deserter.
|
// At the beginning of each upkeep, if no spells were cast last turn, transform Afflicted Deserter.
|
||||||
this.addAbility(new TransformAbility());
|
this.getLeftHalfCard().addAbility(new WerewolfFrontTriggeredAbility());
|
||||||
this.addAbility(new WerewolfFrontTriggeredAbility());
|
|
||||||
|
// Werewolf Ransacker
|
||||||
|
// Whenever this creature transforms into Werewolf Ransacker, you may destroy target artifact. If that artifact is put into a graveyard this way, Werewolf Ransacker deals 3 damage to that artifact's controller.
|
||||||
|
Ability ability = new TransformIntoSourceTriggeredAbility(new WerewolfRansackerEffect(), true, true);
|
||||||
|
ability.addTarget(new TargetArtifactPermanent());
|
||||||
|
this.getRightHalfCard().addAbility(ability);
|
||||||
|
|
||||||
|
// At the beginning of each upkeep, if a player cast two or more spells last turn, transform Werewolf Ransacker.
|
||||||
|
this.getRightHalfCard().addAbility(new WerewolfBackTriggeredAbility());
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private AfflictedDeserter(final AfflictedDeserter card) {
|
private AfflictedDeserter(final AfflictedDeserter card) {
|
||||||
|
|
@ -39,3 +55,39 @@ public final class AfflictedDeserter extends CardImpl {
|
||||||
return new AfflictedDeserter(this);
|
return new AfflictedDeserter(this);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
class WerewolfRansackerEffect extends OneShotEffect {
|
||||||
|
|
||||||
|
WerewolfRansackerEffect() {
|
||||||
|
super(Outcome.DestroyPermanent);
|
||||||
|
staticText = "destroy target artifact. If that artifact is put into a graveyard this way, " +
|
||||||
|
"{this} deals 3 damage to that artifact's controller";
|
||||||
|
}
|
||||||
|
|
||||||
|
private WerewolfRansackerEffect(final WerewolfRansackerEffect effect) {
|
||||||
|
super(effect);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public WerewolfRansackerEffect copy() {
|
||||||
|
return new WerewolfRansackerEffect(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean apply(Game game, Ability source) {
|
||||||
|
Permanent permanent = game.getPermanent(getTargetPointer().getFirst(game, source));
|
||||||
|
if (permanent == null) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
permanent.destroy(source, game);
|
||||||
|
if (game.getState().getZone(permanent.getId()) != Zone.GRAVEYARD) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
Optional.of(permanent)
|
||||||
|
.map(Controllable::getControllerId)
|
||||||
|
.map(game::getPlayer)
|
||||||
|
.ifPresent(player -> player.damage(3, source, game));
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,190 +0,0 @@
|
||||||
package mage.cards.a;
|
|
||||||
|
|
||||||
import mage.ObjectColor;
|
|
||||||
import mage.abilities.Ability;
|
|
||||||
import mage.abilities.LoyaltyAbility;
|
|
||||||
import mage.abilities.common.delayed.ReflexiveTriggeredAbility;
|
|
||||||
import mage.abilities.condition.Condition;
|
|
||||||
import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition;
|
|
||||||
import mage.abilities.dynamicvalue.common.CreaturesYouControlCount;
|
|
||||||
import mage.abilities.effects.OneShotEffect;
|
|
||||||
import mage.abilities.effects.common.CreateTokenEffect;
|
|
||||||
import mage.abilities.effects.common.DamageTargetEffect;
|
|
||||||
import mage.abilities.effects.common.counter.AddCountersAllEffect;
|
|
||||||
import mage.cards.CardImpl;
|
|
||||||
import mage.cards.CardSetInfo;
|
|
||||||
import mage.constants.CardType;
|
|
||||||
import mage.constants.Outcome;
|
|
||||||
import mage.constants.SubType;
|
|
||||||
import mage.constants.SuperType;
|
|
||||||
import mage.counters.CounterType;
|
|
||||||
import mage.filter.FilterPermanent;
|
|
||||||
import mage.filter.StaticFilters;
|
|
||||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
|
||||||
import mage.filter.common.FilterNonlandPermanent;
|
|
||||||
import mage.filter.predicate.mageobject.AnotherPredicate;
|
|
||||||
import mage.filter.predicate.mageobject.ColorPredicate;
|
|
||||||
import mage.filter.predicate.permanent.ControllerIdPredicate;
|
|
||||||
import mage.game.Game;
|
|
||||||
import mage.game.permanent.Permanent;
|
|
||||||
import mage.game.permanent.token.CatWarrior21Token;
|
|
||||||
import mage.players.Player;
|
|
||||||
import mage.target.TargetPermanent;
|
|
||||||
import mage.target.common.TargetAnyTarget;
|
|
||||||
import mage.util.CardUtil;
|
|
||||||
|
|
||||||
import java.util.*;
|
|
||||||
import java.util.stream.Collectors;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author Susucr
|
|
||||||
*/
|
|
||||||
public final class AjaniNacatlAvenger extends CardImpl {
|
|
||||||
|
|
||||||
private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent(SubType.CAT, "Cat you control");
|
|
||||||
|
|
||||||
public AjaniNacatlAvenger(UUID ownerId, CardSetInfo setInfo) {
|
|
||||||
super(ownerId, setInfo, new CardType[]{CardType.PLANESWALKER}, "");
|
|
||||||
|
|
||||||
this.supertype.add(SuperType.LEGENDARY);
|
|
||||||
this.subtype.add(SubType.AJANI);
|
|
||||||
this.setStartingLoyalty(3);
|
|
||||||
|
|
||||||
this.color.setRed(true);
|
|
||||||
this.color.setWhite(true);
|
|
||||||
this.nightCard = true;
|
|
||||||
|
|
||||||
// +2: Put a +1/+1 counter on each Cat you control.
|
|
||||||
this.addAbility(new LoyaltyAbility(
|
|
||||||
new AddCountersAllEffect(CounterType.P1P1.createInstance(), filter), 2
|
|
||||||
));
|
|
||||||
|
|
||||||
// 0: Create a 2/1 white Car Warrior creature token. When you do, if you control a red permanent other than Ajani, Nacatl Avenger, he deals damage equal to the number of creatures you control to any target.
|
|
||||||
this.addAbility(new LoyaltyAbility(new AjaniNacatlAvengerZeroEffect(), 0));
|
|
||||||
|
|
||||||
// -4: Each opponent chooses an artifact, a creature, an enchantment and a planeswalker from among the nonland permanents they control, then sacrifices the rest.
|
|
||||||
this.addAbility(new LoyaltyAbility(new AjaniNacatlAvengerMinusFourEffect(), -4));
|
|
||||||
}
|
|
||||||
|
|
||||||
private AjaniNacatlAvenger(final AjaniNacatlAvenger card) {
|
|
||||||
super(card);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public AjaniNacatlAvenger copy() {
|
|
||||||
return new AjaniNacatlAvenger(this);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
class AjaniNacatlAvengerZeroEffect extends OneShotEffect {
|
|
||||||
|
|
||||||
private static final FilterPermanent filter = new FilterPermanent("red permanent other than {this}");
|
|
||||||
|
|
||||||
static {
|
|
||||||
filter.add(new ColorPredicate(ObjectColor.RED));
|
|
||||||
filter.add(AnotherPredicate.instance);
|
|
||||||
}
|
|
||||||
|
|
||||||
private static final Condition condition = new PermanentsOnTheBattlefieldCondition(filter, true);
|
|
||||||
|
|
||||||
AjaniNacatlAvengerZeroEffect() {
|
|
||||||
super(Outcome.PutCreatureInPlay);
|
|
||||||
staticText = "Create a 2/1 white Cat Warrior creature token. "
|
|
||||||
+ "When you do, if you control a red permanent other than {this}, "
|
|
||||||
+ "he deals damage equal to the number of creatures you control to any target.";
|
|
||||||
}
|
|
||||||
|
|
||||||
private AjaniNacatlAvengerZeroEffect(final AjaniNacatlAvengerZeroEffect effect) {
|
|
||||||
super(effect);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public AjaniNacatlAvengerZeroEffect copy() {
|
|
||||||
return new AjaniNacatlAvengerZeroEffect(this);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean apply(Game game, Ability source) {
|
|
||||||
if (!new CreateTokenEffect(new CatWarrior21Token()).apply(game, source)) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
ReflexiveTriggeredAbility reflexive = new ReflexiveTriggeredAbility(
|
|
||||||
new DamageTargetEffect(CreaturesYouControlCount.PLURAL),
|
|
||||||
false,
|
|
||||||
"When you do, if you control a red permanent other than {this}, "
|
|
||||||
+ "he deals damage equal to the number of creatures you control to any target.",
|
|
||||||
condition
|
|
||||||
);
|
|
||||||
reflexive.addTarget(new TargetAnyTarget());
|
|
||||||
game.fireReflexiveTriggeredAbility(reflexive, source);
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Inspired by Mythos of Snapdax
|
|
||||||
class AjaniNacatlAvengerMinusFourEffect extends OneShotEffect {
|
|
||||||
|
|
||||||
private static final List<CardType> cardTypes = Arrays.asList(
|
|
||||||
CardType.ARTIFACT,
|
|
||||||
CardType.CREATURE,
|
|
||||||
CardType.ENCHANTMENT,
|
|
||||||
CardType.PLANESWALKER
|
|
||||||
);
|
|
||||||
|
|
||||||
AjaniNacatlAvengerMinusFourEffect() {
|
|
||||||
super(Outcome.Benefit);
|
|
||||||
staticText = "Each opponent chooses an artifact, a creature, an enchantment and a planeswalker "
|
|
||||||
+ "from among the nonland permanents they control, then sacrifices the rest.";
|
|
||||||
}
|
|
||||||
|
|
||||||
private AjaniNacatlAvengerMinusFourEffect(final AjaniNacatlAvengerMinusFourEffect effect) {
|
|
||||||
super(effect);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public AjaniNacatlAvengerMinusFourEffect copy() {
|
|
||||||
return new AjaniNacatlAvengerMinusFourEffect(this);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean apply(Game game, Ability source) {
|
|
||||||
Player controller = game.getPlayer(source.getControllerId());
|
|
||||||
if (controller == null) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
List<Player> playerList = game
|
|
||||||
.getOpponents(controller.getId())
|
|
||||||
.stream()
|
|
||||||
.map(game::getPlayer)
|
|
||||||
.filter(Objects::nonNull)
|
|
||||||
.collect(Collectors.toList());
|
|
||||||
|
|
||||||
Set<UUID> toKeep = new HashSet<>();
|
|
||||||
for (Player player : playerList) {
|
|
||||||
for (CardType cardType : cardTypes) {
|
|
||||||
String message = CardUtil.addArticle(cardType.toString());
|
|
||||||
FilterPermanent filter = new FilterNonlandPermanent(message);
|
|
||||||
filter.add(cardType.getPredicate());
|
|
||||||
filter.add(new ControllerIdPredicate(player.getId()));
|
|
||||||
if (game.getBattlefield().count(filter, source.getControllerId(), source, game) == 0) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
TargetPermanent target = new TargetPermanent(filter);
|
|
||||||
target.withNotTarget(true);
|
|
||||||
player.choose(outcome, target, source, game);
|
|
||||||
toKeep.add(target.getFirstTarget());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
for (Permanent permanent : game.getBattlefield().getActivePermanents(StaticFilters.FILTER_PERMANENT_NON_LAND, source.getControllerId(), game)) {
|
|
||||||
if (permanent == null || toKeep.contains(permanent.getId()) || !controller.hasOpponent(permanent.getControllerId(), game)) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
permanent.sacrifice(source, game);
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
@ -1,27 +1,49 @@
|
||||||
package mage.cards.a;
|
package mage.cards.a;
|
||||||
|
|
||||||
import mage.MageInt;
|
import mage.ObjectColor;
|
||||||
import mage.constants.Pronoun;
|
import mage.abilities.Ability;
|
||||||
|
import mage.abilities.LoyaltyAbility;
|
||||||
import mage.abilities.common.DiesOneOrMoreTriggeredAbility;
|
import mage.abilities.common.DiesOneOrMoreTriggeredAbility;
|
||||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||||
|
import mage.abilities.common.delayed.ReflexiveTriggeredAbility;
|
||||||
|
import mage.abilities.condition.Condition;
|
||||||
|
import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition;
|
||||||
|
import mage.abilities.dynamicvalue.common.CreaturesYouControlCount;
|
||||||
|
import mage.abilities.effects.OneShotEffect;
|
||||||
import mage.abilities.effects.common.CreateTokenEffect;
|
import mage.abilities.effects.common.CreateTokenEffect;
|
||||||
|
import mage.abilities.effects.common.DamageTargetEffect;
|
||||||
import mage.abilities.effects.common.ExileAndReturnSourceEffect;
|
import mage.abilities.effects.common.ExileAndReturnSourceEffect;
|
||||||
import mage.abilities.keyword.TransformAbility;
|
import mage.abilities.effects.common.counter.AddCountersAllEffect;
|
||||||
import mage.cards.CardImpl;
|
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
|
import mage.cards.TransformingDoubleFacedCard;
|
||||||
import mage.constants.*;
|
import mage.constants.*;
|
||||||
|
import mage.counters.CounterType;
|
||||||
|
import mage.filter.FilterPermanent;
|
||||||
|
import mage.filter.StaticFilters;
|
||||||
|
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||||
import mage.filter.common.FilterCreaturePermanent;
|
import mage.filter.common.FilterCreaturePermanent;
|
||||||
|
import mage.filter.common.FilterNonlandPermanent;
|
||||||
import mage.filter.predicate.mageobject.AnotherPredicate;
|
import mage.filter.predicate.mageobject.AnotherPredicate;
|
||||||
|
import mage.filter.predicate.mageobject.ColorPredicate;
|
||||||
|
import mage.filter.predicate.permanent.ControllerIdPredicate;
|
||||||
|
import mage.game.Game;
|
||||||
|
import mage.game.permanent.Permanent;
|
||||||
import mage.game.permanent.token.CatWarrior21Token;
|
import mage.game.permanent.token.CatWarrior21Token;
|
||||||
|
import mage.players.Player;
|
||||||
|
import mage.target.TargetPermanent;
|
||||||
|
import mage.target.common.TargetAnyTarget;
|
||||||
|
import mage.util.CardUtil;
|
||||||
|
|
||||||
import java.util.UUID;
|
import java.util.*;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Susucr
|
* @author Susucr
|
||||||
*/
|
*/
|
||||||
public final class AjaniNacatlPariah extends CardImpl {
|
public final class AjaniNacatlPariah extends TransformingDoubleFacedCard {
|
||||||
|
|
||||||
public static final FilterCreaturePermanent filter = new FilterCreaturePermanent(SubType.CAT, "other Cats you control");
|
public static final FilterCreaturePermanent filter = new FilterCreaturePermanent(SubType.CAT, "other Cats you control");
|
||||||
|
private static final FilterControlledCreaturePermanent nacatlAvengerFilter = new FilterControlledCreaturePermanent(SubType.CAT, "Cat you control");
|
||||||
|
|
||||||
static {
|
static {
|
||||||
filter.add(AnotherPredicate.instance);
|
filter.add(AnotherPredicate.instance);
|
||||||
|
|
@ -29,25 +51,34 @@ public final class AjaniNacatlPariah extends CardImpl {
|
||||||
}
|
}
|
||||||
|
|
||||||
public AjaniNacatlPariah(UUID ownerId, CardSetInfo setInfo) {
|
public AjaniNacatlPariah(UUID ownerId, CardSetInfo setInfo) {
|
||||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{W}");
|
super(ownerId, setInfo,
|
||||||
|
new SuperType[]{SuperType.LEGENDARY}, new CardType[]{CardType.CREATURE}, new SubType[]{SubType.CAT, SubType.WARRIOR}, "{1}{W}",
|
||||||
|
"Ajani, Nacatl Avenger",
|
||||||
|
new SuperType[]{SuperType.LEGENDARY}, new CardType[]{CardType.PLANESWALKER}, new SubType[]{SubType.AJANI}, "RW");
|
||||||
|
|
||||||
this.supertype.add(SuperType.LEGENDARY);
|
this.getLeftHalfCard().setPT(1, 2);
|
||||||
this.subtype.add(SubType.CAT);
|
this.getRightHalfCard().setStartingLoyalty(3);
|
||||||
this.subtype.add(SubType.WARRIOR);
|
|
||||||
this.power = new MageInt(1);
|
|
||||||
this.toughness = new MageInt(2);
|
|
||||||
|
|
||||||
this.secondSideCardClazz = mage.cards.a.AjaniNacatlAvenger.class;
|
|
||||||
|
|
||||||
// When Ajani, Nacatl Pariah enters the battlefield, create a 2/1 white Cat Warrior creature token.
|
// When Ajani, Nacatl Pariah enters the battlefield, create a 2/1 white Cat Warrior creature token.
|
||||||
this.addAbility(new EntersBattlefieldTriggeredAbility(new CreateTokenEffect(new CatWarrior21Token())));
|
this.getLeftHalfCard().addAbility(new EntersBattlefieldTriggeredAbility(new CreateTokenEffect(new CatWarrior21Token())));
|
||||||
|
|
||||||
// Whenever one or more other Cats you control die, you may exile Ajani, then return him to the battlefield transformed under his owner's control.
|
// Whenever one or more other Cats you control die, you may exile Ajani, then return him to the battlefield transformed under his owner's control.
|
||||||
this.addAbility(new TransformAbility());
|
this.getLeftHalfCard().addAbility(new DiesOneOrMoreTriggeredAbility(
|
||||||
this.addAbility(new DiesOneOrMoreTriggeredAbility(
|
|
||||||
new ExileAndReturnSourceEffect(PutCards.BATTLEFIELD_TRANSFORMED, Pronoun.HE),
|
new ExileAndReturnSourceEffect(PutCards.BATTLEFIELD_TRANSFORMED, Pronoun.HE),
|
||||||
filter,
|
filter,
|
||||||
true));
|
true));
|
||||||
|
|
||||||
|
// Ajani, Nacatl Avenger
|
||||||
|
// +2: Put a +1/+1 counter on each Cat you control.
|
||||||
|
this.getRightHalfCard().addAbility(new LoyaltyAbility(
|
||||||
|
new AddCountersAllEffect(CounterType.P1P1.createInstance(), nacatlAvengerFilter), 2
|
||||||
|
));
|
||||||
|
|
||||||
|
// 0: Create a 2/1 white Car Warrior creature token. When you do, if you control a red permanent other than Ajani, Nacatl Avenger, he deals damage equal to the number of creatures you control to any target.
|
||||||
|
this.getRightHalfCard().addAbility(new LoyaltyAbility(new AjaniNacatlAvengerZeroEffect(), 0));
|
||||||
|
|
||||||
|
// -4: Each opponent chooses an artifact, a creature, an enchantment and a planeswalker from among the nonland permanents they control, then sacrifices the rest.
|
||||||
|
this.getRightHalfCard().addAbility(new LoyaltyAbility(new AjaniNacatlAvengerMinusFourEffect(), -4));
|
||||||
}
|
}
|
||||||
|
|
||||||
private AjaniNacatlPariah(final AjaniNacatlPariah card) {
|
private AjaniNacatlPariah(final AjaniNacatlPariah card) {
|
||||||
|
|
@ -59,3 +90,116 @@ public final class AjaniNacatlPariah extends CardImpl {
|
||||||
return new AjaniNacatlPariah(this);
|
return new AjaniNacatlPariah(this);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
class AjaniNacatlAvengerZeroEffect extends OneShotEffect {
|
||||||
|
|
||||||
|
private static final FilterPermanent filter = new FilterPermanent("red permanent other than {this}");
|
||||||
|
|
||||||
|
static {
|
||||||
|
filter.add(new ColorPredicate(ObjectColor.RED));
|
||||||
|
filter.add(AnotherPredicate.instance);
|
||||||
|
}
|
||||||
|
|
||||||
|
private static final Condition condition = new PermanentsOnTheBattlefieldCondition(filter, true);
|
||||||
|
|
||||||
|
AjaniNacatlAvengerZeroEffect() {
|
||||||
|
super(Outcome.PutCreatureInPlay);
|
||||||
|
staticText = "Create a 2/1 white Cat Warrior creature token. "
|
||||||
|
+ "When you do, if you control a red permanent other than {this}, "
|
||||||
|
+ "he deals damage equal to the number of creatures you control to any target.";
|
||||||
|
}
|
||||||
|
|
||||||
|
private AjaniNacatlAvengerZeroEffect(final AjaniNacatlAvengerZeroEffect effect) {
|
||||||
|
super(effect);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public AjaniNacatlAvengerZeroEffect copy() {
|
||||||
|
return new AjaniNacatlAvengerZeroEffect(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean apply(Game game, Ability source) {
|
||||||
|
if (!new CreateTokenEffect(new CatWarrior21Token()).apply(game, source)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
ReflexiveTriggeredAbility reflexive = new ReflexiveTriggeredAbility(
|
||||||
|
new DamageTargetEffect(CreaturesYouControlCount.PLURAL),
|
||||||
|
false,
|
||||||
|
"When you do, if you control a red permanent other than {this}, "
|
||||||
|
+ "he deals damage equal to the number of creatures you control to any target.",
|
||||||
|
condition
|
||||||
|
);
|
||||||
|
reflexive.addTarget(new TargetAnyTarget());
|
||||||
|
game.fireReflexiveTriggeredAbility(reflexive, source);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Inspired by Mythos of Snapdax
|
||||||
|
class AjaniNacatlAvengerMinusFourEffect extends OneShotEffect {
|
||||||
|
|
||||||
|
private static final List<CardType> cardTypes = Arrays.asList(
|
||||||
|
CardType.ARTIFACT,
|
||||||
|
CardType.CREATURE,
|
||||||
|
CardType.ENCHANTMENT,
|
||||||
|
CardType.PLANESWALKER
|
||||||
|
);
|
||||||
|
|
||||||
|
AjaniNacatlAvengerMinusFourEffect() {
|
||||||
|
super(Outcome.Benefit);
|
||||||
|
staticText = "Each opponent chooses an artifact, a creature, an enchantment and a planeswalker "
|
||||||
|
+ "from among the nonland permanents they control, then sacrifices the rest.";
|
||||||
|
}
|
||||||
|
|
||||||
|
private AjaniNacatlAvengerMinusFourEffect(final AjaniNacatlAvengerMinusFourEffect effect) {
|
||||||
|
super(effect);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public AjaniNacatlAvengerMinusFourEffect copy() {
|
||||||
|
return new AjaniNacatlAvengerMinusFourEffect(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean apply(Game game, Ability source) {
|
||||||
|
Player controller = game.getPlayer(source.getControllerId());
|
||||||
|
if (controller == null) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
List<Player> playerList = game
|
||||||
|
.getOpponents(controller.getId())
|
||||||
|
.stream()
|
||||||
|
.map(game::getPlayer)
|
||||||
|
.filter(Objects::nonNull)
|
||||||
|
.collect(Collectors.toList());
|
||||||
|
|
||||||
|
Set<UUID> toKeep = new HashSet<>();
|
||||||
|
for (Player player : playerList) {
|
||||||
|
for (CardType cardType : cardTypes) {
|
||||||
|
String message = CardUtil.addArticle(cardType.toString());
|
||||||
|
FilterPermanent filter = new FilterNonlandPermanent(message);
|
||||||
|
filter.add(cardType.getPredicate());
|
||||||
|
filter.add(new ControllerIdPredicate(player.getId()));
|
||||||
|
if (game.getBattlefield().count(filter, source.getControllerId(), source, game) == 0) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
TargetPermanent target = new TargetPermanent(filter);
|
||||||
|
target.withNotTarget(true);
|
||||||
|
player.choose(outcome, target, source, game);
|
||||||
|
toKeep.add(target.getFirstTarget());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
for (Permanent permanent : game.getBattlefield().getActivePermanents(StaticFilters.FILTER_PERMANENT_NON_LAND, source.getControllerId(), game)) {
|
||||||
|
if (permanent == null || toKeep.contains(permanent.getId()) || !controller.hasOpponent(permanent.getControllerId(), game)) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
permanent.sacrifice(source, game);
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,35 +1,60 @@
|
||||||
package mage.cards.a;
|
package mage.cards.a;
|
||||||
|
|
||||||
import mage.MageInt;
|
import mage.Mana;
|
||||||
|
import mage.abilities.Ability;
|
||||||
import mage.abilities.TriggeredAbilityImpl;
|
import mage.abilities.TriggeredAbilityImpl;
|
||||||
|
import mage.abilities.common.SimpleActivatedAbility;
|
||||||
|
import mage.abilities.common.TransformIntoSourceTriggeredAbility;
|
||||||
|
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||||
import mage.abilities.effects.common.TransformSourceEffect;
|
import mage.abilities.effects.common.TransformSourceEffect;
|
||||||
import mage.abilities.keyword.TransformAbility;
|
import mage.abilities.effects.common.continuous.BoostSourceEffect;
|
||||||
import mage.cards.CardImpl;
|
import mage.abilities.effects.common.continuous.BoostTargetEffect;
|
||||||
|
import mage.abilities.effects.mana.UntilEndOfTurnManaEffect;
|
||||||
|
import mage.abilities.keyword.TrampleAbility;
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
|
import mage.cards.TransformingDoubleFacedCard;
|
||||||
import mage.constants.CardType;
|
import mage.constants.CardType;
|
||||||
|
import mage.constants.Duration;
|
||||||
import mage.constants.SubType;
|
import mage.constants.SubType;
|
||||||
import mage.constants.Zone;
|
import mage.constants.Zone;
|
||||||
|
import mage.filter.StaticFilters;
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
import mage.game.events.GameEvent;
|
import mage.game.events.GameEvent;
|
||||||
|
import mage.target.TargetPermanent;
|
||||||
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author TheElk801
|
* @author TheElk801
|
||||||
*/
|
*/
|
||||||
public final class AlluringSuitor extends CardImpl {
|
public final class AlluringSuitor extends TransformingDoubleFacedCard {
|
||||||
|
|
||||||
public AlluringSuitor(UUID ownerId, CardSetInfo setInfo) {
|
public AlluringSuitor(UUID ownerId, CardSetInfo setInfo) {
|
||||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{R}");
|
super(ownerId, setInfo,
|
||||||
|
new CardType[]{CardType.CREATURE}, new SubType[]{SubType.VAMPIRE}, "{2}{R}",
|
||||||
this.subtype.add(SubType.VAMPIRE);
|
"Deadly Dancer",
|
||||||
this.power = new MageInt(2);
|
new CardType[]{CardType.CREATURE}, new SubType[]{SubType.VAMPIRE}, "R");
|
||||||
this.toughness = new MageInt(3);
|
this.getLeftHalfCard().setPT(2, 3);
|
||||||
this.secondSideCardClazz = mage.cards.d.DeadlyDancer.class;
|
this.getRightHalfCard().setPT(3, 3);
|
||||||
|
|
||||||
// When you attack with exactly two creatures, transform Alluring Suitor.
|
// When you attack with exactly two creatures, transform Alluring Suitor.
|
||||||
this.addAbility(new TransformAbility());
|
this.getLeftHalfCard().addAbility(new AlluringSuitorTriggeredAbility());
|
||||||
this.addAbility(new AlluringSuitorTriggeredAbility());
|
|
||||||
|
// Deadly Dancer
|
||||||
|
// Trample
|
||||||
|
this.getRightHalfCard().addAbility(TrampleAbility.getInstance());
|
||||||
|
|
||||||
|
// When this creature transforms into Deadly Dancer, add {R}{R}. Until end of turn, you don't lose this mana as steps and phases end.
|
||||||
|
this.getRightHalfCard().addAbility(new TransformIntoSourceTriggeredAbility(new UntilEndOfTurnManaEffect(Mana.RedMana(2))));
|
||||||
|
|
||||||
|
// {R}{R}: Deadly Dancer and another target creature each get +1/+0 until end of turn.
|
||||||
|
Ability ability = new SimpleActivatedAbility(new BoostSourceEffect(
|
||||||
|
1, 0, Duration.EndOfTurn
|
||||||
|
).setText("{this}"), new ManaCostsImpl<>("{R}{R}"));
|
||||||
|
ability.addEffect(new BoostTargetEffect(1, 0)
|
||||||
|
.setText("and another target creature each get +1/+0 until end of turn"));
|
||||||
|
ability.addTarget(new TargetPermanent(StaticFilters.FILTER_ANOTHER_TARGET_CREATURE));
|
||||||
|
this.getRightHalfCard().addAbility(ability);
|
||||||
}
|
}
|
||||||
|
|
||||||
private AlluringSuitor(final AlluringSuitor card) {
|
private AlluringSuitor(final AlluringSuitor card) {
|
||||||
|
|
|
||||||
|
|
@ -1,45 +1,63 @@
|
||||||
package mage.cards.a;
|
package mage.cards.a;
|
||||||
|
|
||||||
import java.util.UUID;
|
|
||||||
import mage.abilities.Ability;
|
import mage.abilities.Ability;
|
||||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||||
import mage.abilities.common.SimpleActivatedAbility;
|
import mage.abilities.common.SimpleActivatedAbility;
|
||||||
|
import mage.abilities.common.SimpleStaticAbility;
|
||||||
import mage.abilities.costs.common.SacrificeTargetCost;
|
import mage.abilities.costs.common.SacrificeTargetCost;
|
||||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||||
|
import mage.abilities.dynamicvalue.DynamicValue;
|
||||||
|
import mage.abilities.effects.ContinuousEffectImpl;
|
||||||
|
import mage.abilities.effects.Effect;
|
||||||
import mage.abilities.effects.OneShotEffect;
|
import mage.abilities.effects.OneShotEffect;
|
||||||
import mage.abilities.effects.common.ReturnSourceFromGraveyardToHandEffect;
|
import mage.abilities.effects.common.ReturnSourceFromGraveyardToHandEffect;
|
||||||
import mage.abilities.keyword.CraftAbility;
|
import mage.abilities.effects.common.continuous.SetBasePowerToughnessSourceEffect;
|
||||||
import mage.cards.CardImpl;
|
import mage.abilities.keyword.*;
|
||||||
|
import mage.cards.Card;
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
import mage.constants.CardType;
|
import mage.cards.TransformingDoubleFacedCard;
|
||||||
import mage.constants.Outcome;
|
import mage.constants.*;
|
||||||
import mage.constants.Zone;
|
|
||||||
import mage.filter.StaticFilters;
|
import mage.filter.StaticFilters;
|
||||||
|
import mage.game.ExileZone;
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
|
import mage.game.permanent.Permanent;
|
||||||
import mage.players.Player;
|
import mage.players.Player;
|
||||||
|
import mage.util.CardUtil;
|
||||||
|
|
||||||
|
import java.util.Set;
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @author jeffwadsworth
|
* @author jeffwadsworth
|
||||||
*/
|
*/
|
||||||
public final class AltarOfTheWretched extends CardImpl {
|
public final class AltarOfTheWretched extends TransformingDoubleFacedCard {
|
||||||
|
|
||||||
public AltarOfTheWretched(UUID ownerId, CardSetInfo setInfo) {
|
public AltarOfTheWretched(UUID ownerId, CardSetInfo setInfo) {
|
||||||
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{2}{B}");
|
super(ownerId, setInfo,
|
||||||
this.secondSideCardClazz = mage.cards.w.WretchedBonemass.class;
|
new CardType[]{CardType.ARTIFACT}, new SubType[]{}, "{2}{B}",
|
||||||
|
"Wretched Bonemass",
|
||||||
|
new CardType[]{CardType.CREATURE}, new SubType[]{SubType.SKELETON, SubType.HORROR}, "B");
|
||||||
|
this.getRightHalfCard().setPT(0, 0);
|
||||||
|
|
||||||
// When Altar of the Wretched enters the battlefield, you may sacrifice a nontoken creature. If you do, draw X cards, then mill X cards, where X is that creature’s power.
|
// When Altar of the Wretched enters the battlefield, you may sacrifice a nontoken creature. If you do, draw X cards, then mill X cards, where X is that creature’s power.
|
||||||
this.addAbility(new EntersBattlefieldTriggeredAbility(new AltarOfTheWretchedEffect(), true));
|
this.getLeftHalfCard().addAbility(new EntersBattlefieldTriggeredAbility(new AltarOfTheWretchedEffect(), true));
|
||||||
|
|
||||||
// Craft with one or more creatures {2}{B}{B}
|
// Craft with one or more creatures {2}{B}{B}
|
||||||
this.addAbility(new CraftAbility(
|
this.getLeftHalfCard().addAbility(new CraftAbility(
|
||||||
"{2}{B}{B}", "one or more creatures", "other creatures you control and/or"
|
"{2}{B}{B}", "one or more creatures", "other creatures you control and/or"
|
||||||
+ "creature cards in your graveyard", 1, Integer.MAX_VALUE, CardType.CREATURE.getPredicate()
|
+ "creature cards in your graveyard", 1, Integer.MAX_VALUE, CardType.CREATURE.getPredicate()
|
||||||
));
|
));
|
||||||
|
|
||||||
// {2}{B}: Return Altar of the Wretched from your graveyard to your hand.
|
// {2}{B}: Return Altar of the Wretched from your graveyard to your hand.
|
||||||
this.addAbility(new SimpleActivatedAbility(Zone.GRAVEYARD, new ReturnSourceFromGraveyardToHandEffect(), new ManaCostsImpl<>("{2}{B}")));
|
this.getLeftHalfCard().addAbility(new SimpleActivatedAbility(Zone.GRAVEYARD, new ReturnSourceFromGraveyardToHandEffect(), new ManaCostsImpl<>("{2}{B}")));
|
||||||
|
|
||||||
|
// Wretched Bonemass
|
||||||
|
// Wretched Bonemass’s power and toughness are each equal to the total power of the exiled cards used to craft it.
|
||||||
|
this.getRightHalfCard().addAbility(new SimpleStaticAbility(new SetBasePowerToughnessSourceEffect(WretchedBonemassDynamicValue.instance).setText("{this}'s power and toughness are each equal to the total power of the exiled cards used to craft it.")));
|
||||||
|
|
||||||
|
// Wretched Bonemass has flying as long as an exiled card used to craft it has flying. The same is true for first strike, double strike, deathtouch, haste, hexproof, indestructible, lifelink, menace, protection, reach, trample, and vigilance.
|
||||||
|
this.getRightHalfCard().addAbility(new SimpleStaticAbility(new WretchedBonemassGainAbilityEffect()));
|
||||||
}
|
}
|
||||||
|
|
||||||
private AltarOfTheWretched(final AltarOfTheWretched card) {
|
private AltarOfTheWretched(final AltarOfTheWretched card) {
|
||||||
|
|
@ -84,3 +102,124 @@ class AltarOfTheWretchedEffect extends OneShotEffect {
|
||||||
return new AltarOfTheWretchedEffect(this);
|
return new AltarOfTheWretchedEffect(this);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
enum WretchedBonemassDynamicValue implements DynamicValue {
|
||||||
|
instance;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int calculate(Game game, Ability sourceAbility, Effect effect) {
|
||||||
|
int totalPower = 0;
|
||||||
|
Permanent permanent = sourceAbility.getSourcePermanentIfItStillExists(game);
|
||||||
|
if (permanent == null) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
ExileZone exileZone = game
|
||||||
|
.getExile()
|
||||||
|
.getExileZone(CardUtil.getExileZoneId(
|
||||||
|
game, permanent.getId(), permanent.getZoneChangeCounter(game) - 2
|
||||||
|
));
|
||||||
|
if (exileZone == null) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
for (Card card : exileZone.getCards(game)) {
|
||||||
|
totalPower += card.getPower().getValue();
|
||||||
|
}
|
||||||
|
return totalPower;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public WretchedBonemassDynamicValue copy() {
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getMessage() {
|
||||||
|
return "total power of the exiled cards used to craft it";
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return "0";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class WretchedBonemassGainAbilityEffect extends ContinuousEffectImpl {
|
||||||
|
|
||||||
|
WretchedBonemassGainAbilityEffect() {
|
||||||
|
super(Duration.WhileOnBattlefield, Layer.AbilityAddingRemovingEffects_6, SubLayer.NA, Outcome.AddAbility);
|
||||||
|
staticText = "{this} has flying as long as an exiled card used to craft it has flying. The same is true for first strike, double strike, deathtouch, haste, hexproof, indestructible, lifelink, menace, protection, reach, trample, and vigilance.";
|
||||||
|
}
|
||||||
|
|
||||||
|
private WretchedBonemassGainAbilityEffect(final WretchedBonemassGainAbilityEffect effect) {
|
||||||
|
super(effect);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public WretchedBonemassGainAbilityEffect copy() {
|
||||||
|
return new WretchedBonemassGainAbilityEffect(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean apply(Game game, Ability source) {
|
||||||
|
Permanent wretchedBonemass = source.getSourcePermanentIfItStillExists(game);
|
||||||
|
if (wretchedBonemass != null) {
|
||||||
|
ExileZone exileZone = game
|
||||||
|
.getExile()
|
||||||
|
.getExileZone(CardUtil.getExileZoneId(
|
||||||
|
game, wretchedBonemass.getId(), wretchedBonemass.getZoneChangeCounter(game) - 2
|
||||||
|
));
|
||||||
|
if (exileZone != null
|
||||||
|
&& !exileZone.isEmpty()) {
|
||||||
|
Set<Card> cardsInExile = exileZone.getCards(game);
|
||||||
|
for (Card card : cardsInExile) {
|
||||||
|
for (Ability a : card.getAbilities()) {
|
||||||
|
if (a instanceof FlyingAbility) {
|
||||||
|
wretchedBonemass.addAbility(a, source.getSourceId(), game);
|
||||||
|
}
|
||||||
|
if (a instanceof FirstStrikeAbility) {
|
||||||
|
wretchedBonemass.addAbility(a, source.getSourceId(), game);
|
||||||
|
}
|
||||||
|
if (a instanceof DoubleStrikeAbility) {
|
||||||
|
wretchedBonemass.addAbility(a, source.getSourceId(), game);
|
||||||
|
}
|
||||||
|
if (a instanceof DeathtouchAbility) {
|
||||||
|
wretchedBonemass.addAbility(a, source.getSourceId(), game);
|
||||||
|
}
|
||||||
|
if (a instanceof HasteAbility) {
|
||||||
|
wretchedBonemass.addAbility(a, source.getSourceId(), game);
|
||||||
|
}
|
||||||
|
if (a instanceof HexproofAbility) {
|
||||||
|
wretchedBonemass.addAbility(a, source.getSourceId(), game);
|
||||||
|
}
|
||||||
|
if (a instanceof IndestructibleAbility) {
|
||||||
|
wretchedBonemass.addAbility(a, source.getSourceId(), game);
|
||||||
|
}
|
||||||
|
if (a instanceof LifelinkAbility) {
|
||||||
|
wretchedBonemass.addAbility(a, source.getSourceId(), game);
|
||||||
|
}
|
||||||
|
if (a instanceof MenaceAbility) {
|
||||||
|
wretchedBonemass.addAbility(a, source.getSourceId(), game);
|
||||||
|
}
|
||||||
|
if (a instanceof ProtectionAbility) {
|
||||||
|
wretchedBonemass.addAbility(a, source.getSourceId(), game);
|
||||||
|
}
|
||||||
|
if (a instanceof IndestructibleAbility) {
|
||||||
|
wretchedBonemass.addAbility(a, source.getSourceId(), game);
|
||||||
|
}
|
||||||
|
if (a instanceof ReachAbility) {
|
||||||
|
wretchedBonemass.addAbility(a, source.getSourceId(), game);
|
||||||
|
}
|
||||||
|
if (a instanceof TrampleAbility) {
|
||||||
|
wretchedBonemass.addAbility(a, source.getSourceId(), game);
|
||||||
|
}
|
||||||
|
if (a instanceof VigilanceAbility) {
|
||||||
|
wretchedBonemass.addAbility(a, source.getSourceId(), game);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,56 +0,0 @@
|
||||||
package mage.cards.a;
|
|
||||||
|
|
||||||
import mage.MageInt;
|
|
||||||
import mage.abilities.common.ActivateIfConditionActivatedAbility;
|
|
||||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
|
||||||
import mage.abilities.condition.common.CovenCondition;
|
|
||||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
|
||||||
import mage.abilities.effects.common.TransformSourceEffect;
|
|
||||||
import mage.abilities.effects.common.search.SearchLibraryPutInHandEffect;
|
|
||||||
import mage.abilities.hint.common.CovenHint;
|
|
||||||
import mage.abilities.keyword.TransformAbility;
|
|
||||||
import mage.cards.CardImpl;
|
|
||||||
import mage.cards.CardSetInfo;
|
|
||||||
import mage.constants.AbilityWord;
|
|
||||||
import mage.constants.CardType;
|
|
||||||
import mage.constants.SubType;
|
|
||||||
import mage.filter.StaticFilters;
|
|
||||||
import mage.target.common.TargetCardInLibrary;
|
|
||||||
|
|
||||||
import java.util.UUID;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author TheElk801
|
|
||||||
*/
|
|
||||||
public final class AmbitiousFarmhand extends CardImpl {
|
|
||||||
|
|
||||||
public AmbitiousFarmhand(UUID ownerId, CardSetInfo setInfo) {
|
|
||||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{W}");
|
|
||||||
|
|
||||||
this.subtype.add(SubType.HUMAN);
|
|
||||||
this.subtype.add(SubType.PEASANT);
|
|
||||||
this.power = new MageInt(1);
|
|
||||||
this.toughness = new MageInt(1);
|
|
||||||
this.secondSideCardClazz = mage.cards.s.SeasonedCathar.class;
|
|
||||||
|
|
||||||
// When Ambitious Farmhand enters the battlefield, you may search your library for a basic Plains card, reveal it, put it into your hand, then shuffle.
|
|
||||||
this.addAbility(new EntersBattlefieldTriggeredAbility(
|
|
||||||
new SearchLibraryPutInHandEffect(new TargetCardInLibrary(StaticFilters.FILTER_CARD_BASIC_PLAINS), true), true
|
|
||||||
));
|
|
||||||
|
|
||||||
// Coven—{1}{W}{W}: Transform Ambitious Farmhand. Activate only if you control three or more creatures with different powers.
|
|
||||||
this.addAbility(new TransformAbility());
|
|
||||||
this.addAbility(new ActivateIfConditionActivatedAbility(
|
|
||||||
new TransformSourceEffect(), new ManaCostsImpl<>("{1}{W}{W}"), CovenCondition.instance
|
|
||||||
).setAbilityWord(AbilityWord.COVEN).addHint(CovenHint.instance));
|
|
||||||
}
|
|
||||||
|
|
||||||
private AmbitiousFarmhand(final AmbitiousFarmhand card) {
|
|
||||||
super(card);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public AmbitiousFarmhand copy() {
|
|
||||||
return new AmbitiousFarmhand(this);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,18 +1,22 @@
|
||||||
package mage.cards.a;
|
package mage.cards.a;
|
||||||
|
|
||||||
import mage.MageInt;
|
import mage.MageObjectReference;
|
||||||
import mage.abilities.Ability;
|
import mage.abilities.Ability;
|
||||||
import mage.abilities.common.ActivateAsSorceryActivatedAbility;
|
import mage.abilities.common.ActivateAsSorceryActivatedAbility;
|
||||||
|
import mage.abilities.common.AttacksTriggeredAbility;
|
||||||
import mage.abilities.common.DiesCreatureTriggeredAbility;
|
import mage.abilities.common.DiesCreatureTriggeredAbility;
|
||||||
import mage.abilities.common.SimpleStaticAbility;
|
import mage.abilities.common.SimpleStaticAbility;
|
||||||
import mage.abilities.costs.common.SacrificeTargetCost;
|
import mage.abilities.costs.common.SacrificeTargetCost;
|
||||||
|
import mage.abilities.dynamicvalue.common.CountersSourceCount;
|
||||||
|
import mage.abilities.effects.ContinuousEffectImpl;
|
||||||
import mage.abilities.effects.ReplacementEffectImpl;
|
import mage.abilities.effects.ReplacementEffectImpl;
|
||||||
import mage.abilities.effects.common.TransformSourceEffect;
|
import mage.abilities.effects.common.TransformSourceEffect;
|
||||||
import mage.abilities.effects.common.continuous.BoostTargetEffect;
|
import mage.abilities.effects.common.continuous.BoostTargetEffect;
|
||||||
import mage.abilities.effects.common.counter.AddCountersSourceEffect;
|
import mage.abilities.effects.common.counter.AddCountersSourceEffect;
|
||||||
import mage.abilities.keyword.TransformAbility;
|
import mage.abilities.keyword.LifelinkAbility;
|
||||||
import mage.cards.CardImpl;
|
import mage.abilities.keyword.MenaceAbility;
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
|
import mage.cards.TransformingDoubleFacedCard;
|
||||||
import mage.constants.*;
|
import mage.constants.*;
|
||||||
import mage.counters.CounterType;
|
import mage.counters.CounterType;
|
||||||
import mage.filter.StaticFilters;
|
import mage.filter.StaticFilters;
|
||||||
|
|
@ -20,38 +24,45 @@ import mage.game.Game;
|
||||||
import mage.game.events.GameEvent;
|
import mage.game.events.GameEvent;
|
||||||
import mage.game.events.ZoneChangeEvent;
|
import mage.game.events.ZoneChangeEvent;
|
||||||
import mage.game.permanent.Permanent;
|
import mage.game.permanent.Permanent;
|
||||||
import mage.target.common.TargetControlledCreaturePermanent;
|
|
||||||
import mage.target.common.TargetCreaturePermanent;
|
import mage.target.common.TargetCreaturePermanent;
|
||||||
|
|
||||||
|
import java.util.Iterator;
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Styxo
|
* @author Styxo
|
||||||
*/
|
*/
|
||||||
public final class AnakinSkywalker extends CardImpl {
|
public final class AnakinSkywalker extends TransformingDoubleFacedCard {
|
||||||
|
|
||||||
public AnakinSkywalker(UUID ownerId, CardSetInfo setInfo) {
|
public AnakinSkywalker(UUID ownerId, CardSetInfo setInfo) {
|
||||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{U}{B}{R}");
|
super(ownerId, setInfo,
|
||||||
this.supertype.add(SuperType.LEGENDARY);
|
new SuperType[]{SuperType.LEGENDARY}, new CardType[]{CardType.CREATURE}, new SubType[]{SubType.HUMAN, SubType.SITH}, "{3}{U}{B}{R}",
|
||||||
this.subtype.add(SubType.HUMAN);
|
"Darth Vader",
|
||||||
this.subtype.add(SubType.SITH);
|
new SuperType[]{SuperType.LEGENDARY}, new CardType[]{CardType.CREATURE}, new SubType[]{SubType.HUMAN, SubType.SITH}, "B");
|
||||||
this.power = new MageInt(4);
|
this.getLeftHalfCard().setPT(4, 4);
|
||||||
this.toughness = new MageInt(4);
|
this.getRightHalfCard().setPT(4, 4);
|
||||||
|
|
||||||
this.secondSideCardClazz = mage.cards.d.DarthVader.class;
|
|
||||||
|
|
||||||
// Whenever another creature dies, put a +1/+1 counter on Anakin Skywalker.
|
// Whenever another creature dies, put a +1/+1 counter on Anakin Skywalker.
|
||||||
this.addAbility(new DiesCreatureTriggeredAbility(new AddCountersSourceEffect(CounterType.P1P1.createInstance()), false, true));
|
this.getLeftHalfCard().addAbility(new DiesCreatureTriggeredAbility(new AddCountersSourceEffect(CounterType.P1P1.createInstance()), false, true));
|
||||||
|
|
||||||
// Sacrifice another creature: Target creature gets -1/-1 until end of turn. Activate this ability only as a sorcery.
|
// Sacrifice another creature: Target creature gets -1/-1 until end of turn. Activate this ability only as a sorcery.
|
||||||
Ability ability = new ActivateAsSorceryActivatedAbility(Zone.BATTLEFIELD, new BoostTargetEffect(-1, -1, Duration.EndOfTurn),
|
Ability ability = new ActivateAsSorceryActivatedAbility(Zone.BATTLEFIELD, new BoostTargetEffect(-1, -1, Duration.EndOfTurn),
|
||||||
new SacrificeTargetCost(StaticFilters.FILTER_CONTROLLED_ANOTHER_CREATURE));
|
new SacrificeTargetCost(StaticFilters.FILTER_CONTROLLED_ANOTHER_CREATURE));
|
||||||
ability.addTarget(new TargetCreaturePermanent());
|
ability.addTarget(new TargetCreaturePermanent());
|
||||||
this.addAbility(ability);
|
this.getLeftHalfCard().addAbility(ability);
|
||||||
|
|
||||||
// If Anakin Skywalker would be destroyed, regenerate, then transform him instead.
|
// If Anakin Skywalker would be destroyed, regenerate, then transform him instead.
|
||||||
this.addAbility(new TransformAbility());
|
this.getLeftHalfCard().addAbility(new SimpleStaticAbility(new AnakinSkywalkerEffect()));
|
||||||
this.addAbility(new SimpleStaticAbility(new AnakinSkywalkerEffect()));
|
|
||||||
|
// Darth Vader
|
||||||
|
// Menace
|
||||||
|
this.getRightHalfCard().addAbility(new MenaceAbility());
|
||||||
|
|
||||||
|
// Lifelink
|
||||||
|
this.getRightHalfCard().addAbility(LifelinkAbility.getInstance());
|
||||||
|
|
||||||
|
// Whenever Darth Vader attacks, creatures defending player controls get -1/-1 until end of turn for each +1/+1 counter on Darth Vader.
|
||||||
|
this.getRightHalfCard().addAbility(new AttacksTriggeredAbility(new UnboostCreaturesDefendingPlayerEffect(), false, null, SetTargetPointer.PLAYER));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -101,3 +112,47 @@ class AnakinSkywalkerEffect extends ReplacementEffectImpl {
|
||||||
return new AnakinSkywalkerEffect(this);
|
return new AnakinSkywalkerEffect(this);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
class UnboostCreaturesDefendingPlayerEffect extends ContinuousEffectImpl {
|
||||||
|
|
||||||
|
UnboostCreaturesDefendingPlayerEffect() {
|
||||||
|
super(Duration.EndOfTurn, Layer.PTChangingEffects_7, SubLayer.ModifyPT_7c, Outcome.UnboostCreature);
|
||||||
|
staticText = "creatures defending player controls get -1/-1 until end of turn for each +1/+1 counter on Darth Vader";
|
||||||
|
}
|
||||||
|
|
||||||
|
private UnboostCreaturesDefendingPlayerEffect(final UnboostCreaturesDefendingPlayerEffect effect) {
|
||||||
|
super(effect);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public UnboostCreaturesDefendingPlayerEffect copy() {
|
||||||
|
return new UnboostCreaturesDefendingPlayerEffect(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void init(Ability source, Game game) {
|
||||||
|
super.init(source, game);
|
||||||
|
if (getAffectedObjectsSet()) {
|
||||||
|
for (Permanent creature : game.getBattlefield().getAllActivePermanents(StaticFilters.FILTER_PERMANENT_CREATURE, getTargetPointer().getFirst(game, source), game)) {
|
||||||
|
affectedObjectList.add(new MageObjectReference(creature, game));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean apply(Game game, Ability source) {
|
||||||
|
for (Iterator<MageObjectReference> it = affectedObjectList.iterator(); it.hasNext(); ) {
|
||||||
|
Permanent permanent = it.next().getPermanent(game);
|
||||||
|
if (permanent != null) {
|
||||||
|
int unboostCount = -1 * new CountersSourceCount(CounterType.P1P1).calculate(game, source, this);
|
||||||
|
permanent.addPower(unboostCount);
|
||||||
|
permanent.addToughness(unboostCount);
|
||||||
|
} else {
|
||||||
|
it.remove();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,42 +0,0 @@
|
||||||
|
|
||||||
package mage.cards.a;
|
|
||||||
|
|
||||||
import java.util.UUID;
|
|
||||||
import mage.MageInt;
|
|
||||||
import mage.abilities.keyword.HexproofAbility;
|
|
||||||
import mage.abilities.keyword.TrampleAbility;
|
|
||||||
import mage.cards.CardImpl;
|
|
||||||
import mage.cards.CardSetInfo;
|
|
||||||
import mage.constants.CardType;
|
|
||||||
import mage.constants.SubType;
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @author LevelX2
|
|
||||||
*/
|
|
||||||
public final class AncientOfTheEquinox extends CardImpl {
|
|
||||||
|
|
||||||
public AncientOfTheEquinox(UUID ownerId, CardSetInfo setInfo) {
|
|
||||||
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"");
|
|
||||||
this.subtype.add(SubType.TREEFOLK);
|
|
||||||
this.power = new MageInt(4);
|
|
||||||
this.toughness = new MageInt(4);
|
|
||||||
this.color.setGreen(true);
|
|
||||||
|
|
||||||
this.nightCard = true;
|
|
||||||
|
|
||||||
// Trample
|
|
||||||
this.addAbility(TrampleAbility.getInstance());
|
|
||||||
// Hexproof
|
|
||||||
this.addAbility(HexproofAbility.getInstance());
|
|
||||||
}
|
|
||||||
|
|
||||||
private AncientOfTheEquinox(final AncientOfTheEquinox card) {
|
|
||||||
super(card);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public AncientOfTheEquinox copy() {
|
|
||||||
return new AncientOfTheEquinox(this);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,59 +0,0 @@
|
||||||
package mage.cards.a;
|
|
||||||
|
|
||||||
import mage.MageInt;
|
|
||||||
import mage.abilities.common.AttacksTriggeredAbility;
|
|
||||||
import mage.abilities.common.SimpleStaticAbility;
|
|
||||||
import mage.abilities.dynamicvalue.common.ControllerLifeCount;
|
|
||||||
import mage.abilities.effects.common.GainLifeEffect;
|
|
||||||
import mage.abilities.effects.common.continuous.GainAbilityControllerEffect;
|
|
||||||
import mage.abilities.effects.common.continuous.SetBasePowerToughnessSourceEffect;
|
|
||||||
import mage.abilities.keyword.FlyingAbility;
|
|
||||||
import mage.abilities.keyword.HexproofAbility;
|
|
||||||
import mage.cards.CardImpl;
|
|
||||||
import mage.cards.CardSetInfo;
|
|
||||||
import mage.constants.CardType;
|
|
||||||
import mage.constants.SubType;
|
|
||||||
import mage.constants.Zone;
|
|
||||||
|
|
||||||
import java.util.UUID;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author TheElk801
|
|
||||||
*/
|
|
||||||
public final class AngelicEnforcer extends CardImpl {
|
|
||||||
|
|
||||||
public AngelicEnforcer(UUID ownerId, CardSetInfo setInfo) {
|
|
||||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "");
|
|
||||||
|
|
||||||
this.subtype.add(SubType.ANGEL);
|
|
||||||
this.power = new MageInt(0);
|
|
||||||
this.toughness = new MageInt(0);
|
|
||||||
this.color.setWhite(true);
|
|
||||||
this.nightCard = true;
|
|
||||||
|
|
||||||
// Flying
|
|
||||||
this.addAbility(FlyingAbility.getInstance());
|
|
||||||
|
|
||||||
// You have hexproof.
|
|
||||||
this.addAbility(new SimpleStaticAbility(new GainAbilityControllerEffect(HexproofAbility.getInstance())));
|
|
||||||
|
|
||||||
// Angelic Enforcer's power and toughness are each equal to your life total.
|
|
||||||
this.addAbility(new SimpleStaticAbility(Zone.ALL, new SetBasePowerToughnessSourceEffect(
|
|
||||||
ControllerLifeCount.instance
|
|
||||||
).setText("{this}'s power and toughness are each equal to your life total")));
|
|
||||||
|
|
||||||
// Whenever Angelic Enforcer attacks, double your life total.
|
|
||||||
this.addAbility(new AttacksTriggeredAbility(new GainLifeEffect(
|
|
||||||
ControllerLifeCount.instance
|
|
||||||
).setText("double your life total")));
|
|
||||||
}
|
|
||||||
|
|
||||||
private AngelicEnforcer(final AngelicEnforcer card) {
|
|
||||||
super(card);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public AngelicEnforcer copy() {
|
|
||||||
return new AngelicEnforcer(this);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -26,7 +26,7 @@ public final class AnotherChance extends CardImpl {
|
||||||
// You may mill two cards. Then return up to two creature cards from your graveyard to your hand.
|
// You may mill two cards. Then return up to two creature cards from your graveyard to your hand.
|
||||||
this.getSpellAbility().addEffect(new AnotherChanceMillEffect());
|
this.getSpellAbility().addEffect(new AnotherChanceMillEffect());
|
||||||
this.getSpellAbility().addEffect(new OneShotNonTargetEffect(new ReturnFromGraveyardToHandTargetEffect().setText("Then return up to two creature cards from your graveyard to your hand."),
|
this.getSpellAbility().addEffect(new OneShotNonTargetEffect(new ReturnFromGraveyardToHandTargetEffect().setText("Then return up to two creature cards from your graveyard to your hand."),
|
||||||
new TargetCardInYourGraveyard(0, 2, StaticFilters.FILTER_CARD_CREATURES_YOUR_GRAVEYARD, true)).withTargetDescription("up to two creature cards").concatBy("Then "));
|
new TargetCardInYourGraveyard(0, 2, StaticFilters.FILTER_CARD_CREATURES_YOUR_GRAVEYARD, true)).withTargetDescription("up to two creature cards"));
|
||||||
}
|
}
|
||||||
|
|
||||||
private AnotherChance(final AnotherChance card) {
|
private AnotherChance(final AnotherChance card) {
|
||||||
|
|
|
||||||
|
|
@ -1,241 +0,0 @@
|
||||||
package mage.cards.a;
|
|
||||||
|
|
||||||
import mage.MageObject;
|
|
||||||
import mage.abilities.Ability;
|
|
||||||
import mage.abilities.common.AsEntersBattlefieldAbility;
|
|
||||||
import mage.abilities.common.EntersBattlefieldTappedAbility;
|
|
||||||
import mage.abilities.common.SimpleActivatedAbility;
|
|
||||||
import mage.abilities.costs.common.TapSourceCost;
|
|
||||||
import mage.abilities.effects.OneShotEffect;
|
|
||||||
import mage.cards.Card;
|
|
||||||
import mage.cards.CardImpl;
|
|
||||||
import mage.cards.CardSetInfo;
|
|
||||||
import mage.choices.Choice;
|
|
||||||
import mage.choices.ChoiceCardType;
|
|
||||||
import mage.constants.*;
|
|
||||||
import mage.game.ExileZone;
|
|
||||||
import mage.game.Game;
|
|
||||||
import mage.game.permanent.Permanent;
|
|
||||||
import mage.players.Player;
|
|
||||||
import mage.util.CardUtil;
|
|
||||||
|
|
||||||
import java.util.*;
|
|
||||||
import java.util.stream.Collectors;
|
|
||||||
import mage.abilities.SpellAbility;
|
|
||||||
import mage.abilities.effects.common.cost.CostModificationEffectImpl;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author jeffwadsworth
|
|
||||||
*/
|
|
||||||
public class ApexObservatory extends CardImpl {
|
|
||||||
|
|
||||||
public ApexObservatory(UUID ownerId, CardSetInfo setInfo) {
|
|
||||||
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, null);
|
|
||||||
|
|
||||||
this.nightCard = true;
|
|
||||||
|
|
||||||
// Apex Observatory enters the battlefield tapped.
|
|
||||||
this.addAbility(new EntersBattlefieldTappedAbility());
|
|
||||||
|
|
||||||
// As it enters, choose a card type shared among two exiled cards used to craft it.
|
|
||||||
this.addAbility(new AsEntersBattlefieldAbility(new ChooseCardTypeEffect()));
|
|
||||||
|
|
||||||
// The next spell you cast this turn of the chosen type can be cast without paying its mana cost.
|
|
||||||
this.addAbility(new SimpleActivatedAbility(new ApexObservatoryEffect(), new TapSourceCost()));
|
|
||||||
}
|
|
||||||
|
|
||||||
private ApexObservatory(final ApexObservatory card) {
|
|
||||||
super(card);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public ApexObservatory copy() {
|
|
||||||
return new ApexObservatory(this);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
class ChooseCardTypeEffect extends OneShotEffect {
|
|
||||||
|
|
||||||
public ChooseCardTypeEffect() {
|
|
||||||
super(Outcome.Neutral);
|
|
||||||
staticText = "choose a card type shared among two exiled cards used to craft it.";
|
|
||||||
}
|
|
||||||
|
|
||||||
protected ChooseCardTypeEffect(final ChooseCardTypeEffect effect) {
|
|
||||||
super(effect);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean apply(Game game, Ability source) {
|
|
||||||
Player controller = game.getPlayer(source.getControllerId());
|
|
||||||
MageObject mageObject = game.getPermanentEntering(source.getSourceId());
|
|
||||||
List<CardType> exiledCardsCardType = new ArrayList<>();
|
|
||||||
if (mageObject == null) {
|
|
||||||
mageObject = game.getObject(source);
|
|
||||||
}
|
|
||||||
if (controller != null && mageObject != null) {
|
|
||||||
Permanent permanent = source.getSourcePermanentIfItStillExists(game);
|
|
||||||
if (permanent == null) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
// chase the exile zone down...
|
|
||||||
ExileZone exileZone = game.getState().getExile().getExileZone(CardUtil.getExileZoneId(game, source, game.getState().getZoneChangeCounter(mageObject.getId()) - 1));
|
|
||||||
if (exileZone == null) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
for (Card card : exileZone.getCards(game)) {
|
|
||||||
exiledCardsCardType.addAll(card.getCardType(game));
|
|
||||||
}
|
|
||||||
Choice cardTypeChoice = new ChoiceCardType();
|
|
||||||
cardTypeChoice.getChoices().clear();
|
|
||||||
cardTypeChoice.getChoices().addAll(exiledCardsCardType.stream().map(CardType::toString).collect(Collectors.toList()));
|
|
||||||
// find only card types that each card shares; some cards have more than 1 card type
|
|
||||||
Map<String, Integer> cardTypeCounts = new HashMap<>();
|
|
||||||
for (String cardType : cardTypeChoice.getChoices()) {
|
|
||||||
cardTypeCounts.put(cardType, 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
for (Card c : exileZone.getCards(game)) {
|
|
||||||
for (CardType cardType : c.getCardType(game)) {
|
|
||||||
if (cardTypeCounts.containsKey(cardType.toString())) {
|
|
||||||
cardTypeCounts.put(cardType.toString(), cardTypeCounts.get(cardType.toString()) + 1);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
List<String> sharedCardTypes = new ArrayList<>();
|
|
||||||
int numExiledCards = exileZone.getCards(game).size();
|
|
||||||
for (Map.Entry<String, Integer> entry : cardTypeCounts.entrySet()) {
|
|
||||||
if (entry.getValue() == numExiledCards) {
|
|
||||||
sharedCardTypes.add(entry.getKey());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// handle situations like the double-faced instant/land Jwari Disruption // Jwari Ruins
|
|
||||||
if (sharedCardTypes.isEmpty()) {
|
|
||||||
game.informPlayers(mageObject.getIdName() + " No exiled cards shared a type in exile, so nothing is done.");
|
|
||||||
if (mageObject instanceof Permanent) {
|
|
||||||
((Permanent) mageObject).addInfo("chosen type", CardUtil.addToolTipMarkTags("No exiled cards have the same card type."), game);
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
cardTypeChoice.getChoices().retainAll(sharedCardTypes);
|
|
||||||
if (controller.choose(Outcome.Benefit, cardTypeChoice, game)) {
|
|
||||||
if (!game.isSimulation()) {
|
|
||||||
game.informPlayers(mageObject.getName() + ": " + controller.getLogName() + " has chosen " + cardTypeChoice.getChoice());
|
|
||||||
}
|
|
||||||
game.getState().setValue("ApexObservatoryType_" + source.getSourceId().toString(), cardTypeChoice.getChoice());
|
|
||||||
if (mageObject instanceof Permanent) {
|
|
||||||
((Permanent) mageObject).addInfo("chosen type", CardUtil.addToolTipMarkTags("Chosen card type: " + cardTypeChoice.getChoice()), game);
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public ChooseCardTypeEffect copy() {
|
|
||||||
return new ChooseCardTypeEffect(this);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
class ApexObservatoryEffect extends OneShotEffect {
|
|
||||||
|
|
||||||
ApexObservatoryEffect() {
|
|
||||||
super(Outcome.Benefit);
|
|
||||||
staticText = "The next spell you cast this turn of the chosen type can be cast without paying its mana cost.";
|
|
||||||
}
|
|
||||||
|
|
||||||
private ApexObservatoryEffect(final ApexObservatoryEffect effect) {
|
|
||||||
super(effect);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public ApexObservatoryEffect copy() {
|
|
||||||
return new ApexObservatoryEffect(this);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean apply(Game game, Ability source) {
|
|
||||||
String chosenCardType = (String) game.getState().getValue("ApexObservatoryType_" + source.getSourceId().toString());
|
|
||||||
if (chosenCardType == null) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
game.addEffect(new ApexObservatoryCastWithoutManaEffect(chosenCardType, source.getControllerId()), source);
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
class ApexObservatoryCastWithoutManaEffect extends CostModificationEffectImpl {
|
|
||||||
|
|
||||||
private final String chosenCardType;
|
|
||||||
private final UUID playerId;
|
|
||||||
private boolean used = false;
|
|
||||||
|
|
||||||
ApexObservatoryCastWithoutManaEffect(String chosenCardType, UUID playerId) {
|
|
||||||
super(Duration.EndOfTurn, Outcome.Benefit, CostModificationType.SET_COST);
|
|
||||||
this.chosenCardType = chosenCardType;
|
|
||||||
this.playerId = playerId;
|
|
||||||
staticText = "The next spell you cast this turn of the chosen type can be cast without paying its mana cost";
|
|
||||||
}
|
|
||||||
|
|
||||||
private ApexObservatoryCastWithoutManaEffect(final ApexObservatoryCastWithoutManaEffect effect) {
|
|
||||||
super(effect);
|
|
||||||
this.chosenCardType = effect.chosenCardType;
|
|
||||||
this.playerId = effect.playerId;
|
|
||||||
this.used = effect.used;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean apply(Game game, Ability source, Ability abilityToModify) {
|
|
||||||
// Ask the player if they want to use the effect
|
|
||||||
Player controller = game.getPlayer(playerId);
|
|
||||||
if (controller != null) {
|
|
||||||
MageObject spell = abilityToModify.getSourceObject(game);
|
|
||||||
if (spell != null && !game.isSimulation()) {
|
|
||||||
String message = "Cast " + spell.getIdName() + " without paying its mana cost?";
|
|
||||||
if (controller.chooseUse(Outcome.Benefit, message, source, game)) {
|
|
||||||
// Set the cost to zero
|
|
||||||
abilityToModify.getManaCostsToPay().clear();
|
|
||||||
// Mark as used
|
|
||||||
used = true;
|
|
||||||
game.informPlayers(controller.getLogName() + " casts " + spell.getIdName() + " without paying its mana cost.");
|
|
||||||
return true;
|
|
||||||
} else {
|
|
||||||
// Player chose not to use the effect
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public ApexObservatoryCastWithoutManaEffect copy() {
|
|
||||||
return new ApexObservatoryCastWithoutManaEffect(this);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean isInactive(Ability source, Game game) {
|
|
||||||
return used || super.isInactive(source, game);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean applies(Ability ability, Ability source, Game game) {
|
|
||||||
if (used) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
if (!ability.isControlledBy(playerId)) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
if (!(ability instanceof SpellAbility)) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
MageObject object = game.getObject(ability.getSourceId());
|
|
||||||
if (object != null && object.getCardType(game).stream()
|
|
||||||
.anyMatch(cardType -> cardType.toString().equals(chosenCardType))) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -12,8 +12,12 @@ import mage.cards.CardSetInfo;
|
||||||
import mage.constants.CardType;
|
import mage.constants.CardType;
|
||||||
import mage.constants.SubType;
|
import mage.constants.SubType;
|
||||||
import mage.constants.SuperType;
|
import mage.constants.SuperType;
|
||||||
|
import mage.constants.TargetController;
|
||||||
|
import mage.filter.FilterPermanent;
|
||||||
|
import mage.filter.common.FilterNonlandPermanent;
|
||||||
|
import mage.filter.predicate.mageobject.AnotherPredicate;
|
||||||
|
import mage.target.TargetPermanent;
|
||||||
import mage.target.common.TargetControlledCreaturePermanent;
|
import mage.target.common.TargetControlledCreaturePermanent;
|
||||||
import mage.target.common.TargetNonlandPermanent;
|
|
||||||
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
|
||||||
|
|
@ -22,6 +26,13 @@ import java.util.UUID;
|
||||||
*/
|
*/
|
||||||
public final class AppaLoyalSkyBison extends CardImpl {
|
public final class AppaLoyalSkyBison extends CardImpl {
|
||||||
|
|
||||||
|
private static final FilterPermanent filter = new FilterNonlandPermanent("another target nonland permanent you control");
|
||||||
|
|
||||||
|
static {
|
||||||
|
filter.add(AnotherPredicate.instance);
|
||||||
|
filter.add(TargetController.YOU.getControllerPredicate());
|
||||||
|
}
|
||||||
|
|
||||||
public AppaLoyalSkyBison(UUID ownerId, CardSetInfo setInfo) {
|
public AppaLoyalSkyBison(UUID ownerId, CardSetInfo setInfo) {
|
||||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{W}{W}");
|
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{W}{W}");
|
||||||
|
|
||||||
|
|
@ -39,8 +50,8 @@ public final class AppaLoyalSkyBison extends CardImpl {
|
||||||
Ability ability = new EntersBattlefieldOrAttacksSourceTriggeredAbility(new GainAbilityTargetEffect(FlyingAbility.getInstance()));
|
Ability ability = new EntersBattlefieldOrAttacksSourceTriggeredAbility(new GainAbilityTargetEffect(FlyingAbility.getInstance()));
|
||||||
ability.addTarget(new TargetControlledCreaturePermanent());
|
ability.addTarget(new TargetControlledCreaturePermanent());
|
||||||
|
|
||||||
// * Airbend another target nonland permanent you control..
|
// * Airbend another target nonland permanent you control.
|
||||||
ability.addMode(new Mode(new AirbendTargetEffect()).addTarget(new TargetNonlandPermanent()));
|
ability.addMode(new Mode(new AirbendTargetEffect()).addTarget(new TargetPermanent(filter)));
|
||||||
this.addAbility(ability);
|
this.addAbility(ability);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -7,6 +7,7 @@ import mage.constants.CardType;
|
||||||
import mage.filter.common.FilterAnyTarget;
|
import mage.filter.common.FilterAnyTarget;
|
||||||
import mage.filter.common.FilterPermanentOrPlayer;
|
import mage.filter.common.FilterPermanentOrPlayer;
|
||||||
import mage.filter.predicate.other.AnotherTargetPredicate;
|
import mage.filter.predicate.other.AnotherTargetPredicate;
|
||||||
|
import mage.target.common.TargetAnyTarget;
|
||||||
import mage.target.common.TargetPermanentOrPlayer;
|
import mage.target.common.TargetPermanentOrPlayer;
|
||||||
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
|
@ -16,8 +17,7 @@ import java.util.UUID;
|
||||||
*/
|
*/
|
||||||
public final class ArcTrail extends CardImpl {
|
public final class ArcTrail extends CardImpl {
|
||||||
|
|
||||||
private static final FilterPermanentOrPlayer filter1 = new FilterAnyTarget("creature, player or planeswalker to deal 2 damage");
|
private static final FilterPermanentOrPlayer filter2 = new FilterAnyTarget("another target");
|
||||||
private static final FilterPermanentOrPlayer filter2 = new FilterAnyTarget("another creature, player or planeswalker to deal 1 damage");
|
|
||||||
|
|
||||||
static {
|
static {
|
||||||
filter2.getPermanentFilter().add(new AnotherTargetPredicate(2));
|
filter2.getPermanentFilter().add(new AnotherTargetPredicate(2));
|
||||||
|
|
@ -29,7 +29,7 @@ public final class ArcTrail extends CardImpl {
|
||||||
|
|
||||||
// Arc Trail deals 2 damage to any target and 1 damage to another target
|
// Arc Trail deals 2 damage to any target and 1 damage to another target
|
||||||
this.getSpellAbility().addEffect(new DamageTargetAndTargetEffect(2, 1));
|
this.getSpellAbility().addEffect(new DamageTargetAndTargetEffect(2, 1));
|
||||||
this.getSpellAbility().addTarget(new TargetPermanentOrPlayer(filter1)
|
this.getSpellAbility().addTarget(new TargetAnyTarget()
|
||||||
.withChooseHint("to deal 2 damage").setTargetTag(1));
|
.withChooseHint("to deal 2 damage").setTargetTag(1));
|
||||||
this.getSpellAbility().addTarget(new TargetPermanentOrPlayer(filter2)
|
this.getSpellAbility().addTarget(new TargetPermanentOrPlayer(filter2)
|
||||||
.withChooseHint("to deal 1 damage").setTargetTag(2));
|
.withChooseHint("to deal 1 damage").setTargetTag(2));
|
||||||
|
|
|
||||||
|
|
@ -1,112 +0,0 @@
|
||||||
package mage.cards.a;
|
|
||||||
|
|
||||||
import mage.MageInt;
|
|
||||||
import mage.abilities.common.SpellCastControllerTriggeredAbility;
|
|
||||||
import mage.abilities.dynamicvalue.common.SavedDamageValue;
|
|
||||||
import mage.abilities.effects.common.TransformSourceEffect;
|
|
||||||
import mage.abilities.effects.common.counter.AddCountersSourceEffect;
|
|
||||||
import mage.abilities.keyword.LivingMetalAbility;
|
|
||||||
import mage.cards.CardImpl;
|
|
||||||
import mage.cards.CardSetInfo;
|
|
||||||
import mage.constants.CardType;
|
|
||||||
import mage.constants.SubType;
|
|
||||||
import mage.constants.SuperType;
|
|
||||||
import mage.counters.CounterType;
|
|
||||||
import mage.game.Controllable;
|
|
||||||
import mage.game.Game;
|
|
||||||
import mage.game.events.GameEvent;
|
|
||||||
import mage.game.stack.Spell;
|
|
||||||
import mage.target.Target;
|
|
||||||
|
|
||||||
import java.util.Collection;
|
|
||||||
import java.util.Objects;
|
|
||||||
import java.util.UUID;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author TheElk801
|
|
||||||
*/
|
|
||||||
public final class ArceeAcrobaticCoupe extends CardImpl {
|
|
||||||
|
|
||||||
public ArceeAcrobaticCoupe(UUID ownerId, CardSetInfo setInfo) {
|
|
||||||
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "");
|
|
||||||
|
|
||||||
this.supertype.add(SuperType.LEGENDARY);
|
|
||||||
this.subtype.add(SubType.VEHICLE);
|
|
||||||
this.power = new MageInt(2);
|
|
||||||
this.toughness = new MageInt(2);
|
|
||||||
this.color.setRed(true);
|
|
||||||
this.color.setWhite(true);
|
|
||||||
this.nightCard = true;
|
|
||||||
|
|
||||||
// Living metal
|
|
||||||
this.addAbility(new LivingMetalAbility());
|
|
||||||
|
|
||||||
// Whenever you cast a spell that targets one or more creatures or Vehicles you control, put that many +1/+1 counters on Arcee. Convert Arcee.
|
|
||||||
this.addAbility(new ArceeAcrobaticCoupeTriggeredAbility());
|
|
||||||
}
|
|
||||||
|
|
||||||
private ArceeAcrobaticCoupe(final ArceeAcrobaticCoupe card) {
|
|
||||||
super(card);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public ArceeAcrobaticCoupe copy() {
|
|
||||||
return new ArceeAcrobaticCoupe(this);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
class ArceeAcrobaticCoupeTriggeredAbility extends SpellCastControllerTriggeredAbility {
|
|
||||||
|
|
||||||
ArceeAcrobaticCoupeTriggeredAbility() {
|
|
||||||
super(new AddCountersSourceEffect(
|
|
||||||
CounterType.P1P1.createInstance(0),
|
|
||||||
SavedDamageValue.MANY, false
|
|
||||||
), false);
|
|
||||||
this.addEffect(new TransformSourceEffect());
|
|
||||||
}
|
|
||||||
|
|
||||||
private ArceeAcrobaticCoupeTriggeredAbility(final ArceeAcrobaticCoupeTriggeredAbility ability) {
|
|
||||||
super(ability);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public ArceeAcrobaticCoupeTriggeredAbility copy() {
|
|
||||||
return new ArceeAcrobaticCoupeTriggeredAbility(this);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean checkTrigger(GameEvent event, Game game) {
|
|
||||||
if (!super.checkTrigger(event, game)) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
Spell spell = game.getSpell(event.getTargetId());
|
|
||||||
if (spell == null) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
int targets = spell
|
|
||||||
.getStackAbility()
|
|
||||||
.getTargets()
|
|
||||||
.stream()
|
|
||||||
.map(Target::getTargets)
|
|
||||||
.flatMap(Collection::stream)
|
|
||||||
.map(game::getPermanent)
|
|
||||||
.filter(Objects::nonNull)
|
|
||||||
.filter(permanent -> permanent.isCreature(game)
|
|
||||||
|| permanent.hasSubtype(SubType.VEHICLE, game))
|
|
||||||
.map(Controllable::getControllerId)
|
|
||||||
.map(this::isControlledBy)
|
|
||||||
.mapToInt(x -> x ? 1 : 0)
|
|
||||||
.sum();
|
|
||||||
if (targets > 0) {
|
|
||||||
this.getEffects().setValue("damage", targets);
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String getRule() {
|
|
||||||
return "Whenever you cast a spell that targets one or more creatures or Vehicles " +
|
|
||||||
"you control, put that many +1/+1 counters on {this}. Convert {this}.";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,44 +1,54 @@
|
||||||
package mage.cards.a;
|
package mage.cards.a;
|
||||||
|
|
||||||
import mage.MageInt;
|
|
||||||
import mage.abilities.Ability;
|
import mage.abilities.Ability;
|
||||||
import mage.abilities.common.SimpleActivatedAbility;
|
import mage.abilities.common.SimpleActivatedAbility;
|
||||||
|
import mage.abilities.common.SpellCastControllerTriggeredAbility;
|
||||||
import mage.abilities.costs.common.RemoveVariableCountersSourceCost;
|
import mage.abilities.costs.common.RemoveVariableCountersSourceCost;
|
||||||
import mage.abilities.costs.mana.GenericManaCost;
|
import mage.abilities.costs.mana.GenericManaCost;
|
||||||
import mage.abilities.dynamicvalue.common.GetXValue;
|
import mage.abilities.dynamicvalue.common.GetXValue;
|
||||||
|
import mage.abilities.dynamicvalue.common.SavedDamageValue;
|
||||||
import mage.abilities.effects.common.DamageTargetEffect;
|
import mage.abilities.effects.common.DamageTargetEffect;
|
||||||
import mage.abilities.effects.common.TransformSourceEffect;
|
import mage.abilities.effects.common.TransformSourceEffect;
|
||||||
|
import mage.abilities.effects.common.counter.AddCountersSourceEffect;
|
||||||
import mage.abilities.keyword.FirstStrikeAbility;
|
import mage.abilities.keyword.FirstStrikeAbility;
|
||||||
|
import mage.abilities.keyword.LivingMetalAbility;
|
||||||
import mage.abilities.keyword.MoreThanMeetsTheEyeAbility;
|
import mage.abilities.keyword.MoreThanMeetsTheEyeAbility;
|
||||||
import mage.cards.CardImpl;
|
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
|
import mage.cards.TransformingDoubleFacedCard;
|
||||||
import mage.constants.CardType;
|
import mage.constants.CardType;
|
||||||
import mage.constants.SubType;
|
import mage.constants.SubType;
|
||||||
import mage.constants.SuperType;
|
import mage.constants.SuperType;
|
||||||
import mage.counters.CounterType;
|
import mage.counters.CounterType;
|
||||||
|
import mage.game.Controllable;
|
||||||
|
import mage.game.Game;
|
||||||
|
import mage.game.events.GameEvent;
|
||||||
|
import mage.game.stack.Spell;
|
||||||
|
import mage.target.Target;
|
||||||
import mage.target.common.TargetCreaturePermanent;
|
import mage.target.common.TargetCreaturePermanent;
|
||||||
|
|
||||||
|
import java.util.Collection;
|
||||||
|
import java.util.Objects;
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author TheElk801
|
* @author TheElk801
|
||||||
*/
|
*/
|
||||||
public final class ArceeSharpshooter extends CardImpl {
|
public final class ArceeSharpshooter extends TransformingDoubleFacedCard {
|
||||||
|
|
||||||
public ArceeSharpshooter(UUID ownerId, CardSetInfo setInfo) {
|
public ArceeSharpshooter(UUID ownerId, CardSetInfo setInfo) {
|
||||||
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{1}{R}{W}");
|
super(ownerId, setInfo,
|
||||||
|
new SuperType[]{SuperType.LEGENDARY}, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, new SubType[]{SubType.ROBOT}, "{1}{R}{W}",
|
||||||
|
"Arcee, Acrobatic Coupe",
|
||||||
|
new SuperType[]{SuperType.LEGENDARY}, new CardType[]{CardType.ARTIFACT}, new SubType[]{SubType.VEHICLE}, "RW");
|
||||||
|
|
||||||
this.supertype.add(SuperType.LEGENDARY);
|
this.getLeftHalfCard().setPT(2, 2);
|
||||||
this.subtype.add(SubType.ROBOT);
|
this.getRightHalfCard().setPT(2, 2);
|
||||||
this.power = new MageInt(2);
|
|
||||||
this.toughness = new MageInt(2);
|
|
||||||
this.secondSideCardClazz = mage.cards.a.ArceeAcrobaticCoupe.class;
|
|
||||||
|
|
||||||
// More Than Meets the Eye {R}{W}
|
// More Than Meets the Eye {R}{W}
|
||||||
this.addAbility(new MoreThanMeetsTheEyeAbility(this, "{R}{W}"));
|
this.getLeftHalfCard().addAbility(new MoreThanMeetsTheEyeAbility(this, "{R}{W}"));
|
||||||
|
|
||||||
// First strike
|
// First strike
|
||||||
this.addAbility(FirstStrikeAbility.getInstance());
|
this.getLeftHalfCard().addAbility(FirstStrikeAbility.getInstance());
|
||||||
|
|
||||||
// {1}, Remove one or more +1/+1 counters from Arcee: It deals that much damage to target creature. Convert Arcee.
|
// {1}, Remove one or more +1/+1 counters from Arcee: It deals that much damage to target creature. Convert Arcee.
|
||||||
Ability ability = new SimpleActivatedAbility(
|
Ability ability = new SimpleActivatedAbility(
|
||||||
|
|
@ -49,7 +59,14 @@ public final class ArceeSharpshooter extends CardImpl {
|
||||||
ability.addCost(new RemoveVariableCountersSourceCost(CounterType.P1P1, 1));
|
ability.addCost(new RemoveVariableCountersSourceCost(CounterType.P1P1, 1));
|
||||||
ability.addEffect(new TransformSourceEffect().setText("convert {this}"));
|
ability.addEffect(new TransformSourceEffect().setText("convert {this}"));
|
||||||
ability.addTarget(new TargetCreaturePermanent());
|
ability.addTarget(new TargetCreaturePermanent());
|
||||||
this.addAbility(ability);
|
this.getLeftHalfCard().addAbility(ability);
|
||||||
|
|
||||||
|
// Arcee, Acrobatic Coupe
|
||||||
|
// Living metal
|
||||||
|
this.getRightHalfCard().addAbility(new LivingMetalAbility());
|
||||||
|
|
||||||
|
// Whenever you cast a spell that targets one or more creatures or Vehicles you control, put that many +1/+1 counters on Arcee. Convert Arcee.
|
||||||
|
this.getRightHalfCard().addAbility(new ArceeAcrobaticCoupeTriggeredAbility());
|
||||||
}
|
}
|
||||||
|
|
||||||
private ArceeSharpshooter(final ArceeSharpshooter card) {
|
private ArceeSharpshooter(final ArceeSharpshooter card) {
|
||||||
|
|
@ -61,3 +78,59 @@ public final class ArceeSharpshooter extends CardImpl {
|
||||||
return new ArceeSharpshooter(this);
|
return new ArceeSharpshooter(this);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
class ArceeAcrobaticCoupeTriggeredAbility extends SpellCastControllerTriggeredAbility {
|
||||||
|
|
||||||
|
ArceeAcrobaticCoupeTriggeredAbility() {
|
||||||
|
super(new AddCountersSourceEffect(
|
||||||
|
CounterType.P1P1.createInstance(0),
|
||||||
|
SavedDamageValue.MANY, false
|
||||||
|
), false);
|
||||||
|
this.addEffect(new TransformSourceEffect());
|
||||||
|
}
|
||||||
|
|
||||||
|
private ArceeAcrobaticCoupeTriggeredAbility(final ArceeAcrobaticCoupeTriggeredAbility ability) {
|
||||||
|
super(ability);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ArceeAcrobaticCoupeTriggeredAbility copy() {
|
||||||
|
return new ArceeAcrobaticCoupeTriggeredAbility(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean checkTrigger(GameEvent event, Game game) {
|
||||||
|
if (!super.checkTrigger(event, game)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
Spell spell = game.getSpell(event.getTargetId());
|
||||||
|
if (spell == null) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
int targets = spell
|
||||||
|
.getStackAbility()
|
||||||
|
.getTargets()
|
||||||
|
.stream()
|
||||||
|
.map(Target::getTargets)
|
||||||
|
.flatMap(Collection::stream)
|
||||||
|
.map(game::getPermanent)
|
||||||
|
.filter(Objects::nonNull)
|
||||||
|
.filter(permanent -> permanent.isCreature(game)
|
||||||
|
|| permanent.hasSubtype(SubType.VEHICLE, game))
|
||||||
|
.map(Controllable::getControllerId)
|
||||||
|
.map(this::isControlledBy)
|
||||||
|
.mapToInt(x -> x ? 1 : 0)
|
||||||
|
.sum();
|
||||||
|
if (targets > 0) {
|
||||||
|
this.getEffects().setValue("damage", targets);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getRule() {
|
||||||
|
return "Whenever you cast a spell that targets one or more creatures or Vehicles " +
|
||||||
|
"you control, put that many +1/+1 counters on {this}. Convert {this}.";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,66 +1,86 @@
|
||||||
package mage.cards.a;
|
package mage.cards.a;
|
||||||
|
|
||||||
import mage.MageInt;
|
import mage.abilities.Ability;
|
||||||
import mage.abilities.common.DiesCreatureTriggeredAbility;
|
import mage.abilities.common.DiesCreatureTriggeredAbility;
|
||||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||||
|
import mage.abilities.common.TransformIntoSourceTriggeredAbility;
|
||||||
import mage.abilities.common.delayed.AtTheBeginOfNextUpkeepDelayedTriggeredAbility;
|
import mage.abilities.common.delayed.AtTheBeginOfNextUpkeepDelayedTriggeredAbility;
|
||||||
import mage.abilities.effects.common.CreateDelayedTriggeredAbilityEffect;
|
import mage.abilities.effects.common.CreateDelayedTriggeredAbilityEffect;
|
||||||
|
import mage.abilities.effects.common.DamageAllEffect;
|
||||||
|
import mage.abilities.effects.common.DamagePlayersEffect;
|
||||||
import mage.abilities.effects.common.TransformSourceEffect;
|
import mage.abilities.effects.common.TransformSourceEffect;
|
||||||
import mage.abilities.effects.common.continuous.GainAbilityControlledEffect;
|
import mage.abilities.effects.common.continuous.GainAbilityControlledEffect;
|
||||||
import mage.abilities.keyword.*;
|
import mage.abilities.keyword.FlashAbility;
|
||||||
import mage.cards.CardImpl;
|
import mage.abilities.keyword.FlyingAbility;
|
||||||
|
import mage.abilities.keyword.IndestructibleAbility;
|
||||||
|
import mage.abilities.keyword.VigilanceAbility;
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
|
import mage.cards.TransformingDoubleFacedCard;
|
||||||
import mage.constants.*;
|
import mage.constants.*;
|
||||||
|
import mage.filter.FilterPermanent;
|
||||||
import mage.filter.StaticFilters;
|
import mage.filter.StaticFilters;
|
||||||
import mage.filter.common.FilterCreaturePermanent;
|
import mage.filter.common.FilterCreaturePermanent;
|
||||||
import mage.filter.predicate.Predicates;
|
import mage.filter.predicate.Predicates;
|
||||||
|
import mage.filter.predicate.mageobject.AnotherPredicate;
|
||||||
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author fireshoes
|
* @author fireshoes
|
||||||
*/
|
*/
|
||||||
public final class ArchangelAvacyn extends CardImpl {
|
public final class ArchangelAvacyn extends TransformingDoubleFacedCard {
|
||||||
|
|
||||||
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("a non-Angel creature you control");
|
private static final FilterCreaturePermanent nonAngelFilter = new FilterCreaturePermanent("a non-Angel creature you control");
|
||||||
|
private static final FilterPermanent otherCreatureFilter = new FilterCreaturePermanent("other creature");
|
||||||
|
|
||||||
static {
|
static {
|
||||||
filter.add(Predicates.not(SubType.ANGEL.getPredicate()));
|
otherCreatureFilter.add(AnotherPredicate.instance);
|
||||||
filter.add(TargetController.YOU.getControllerPredicate());
|
nonAngelFilter.add(Predicates.not(SubType.ANGEL.getPredicate()));
|
||||||
|
nonAngelFilter.add(TargetController.YOU.getControllerPredicate());
|
||||||
}
|
}
|
||||||
|
|
||||||
public ArchangelAvacyn(UUID ownerId, CardSetInfo setInfo) {
|
public ArchangelAvacyn(UUID ownerId, CardSetInfo setInfo) {
|
||||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{W}{W}");
|
super(ownerId, setInfo,
|
||||||
|
new SuperType[]{SuperType.LEGENDARY}, new CardType[]{CardType.CREATURE}, new SubType[]{SubType.ANGEL}, "{3}{W}{W}",
|
||||||
|
"Avacyn, the Purifier",
|
||||||
|
new SuperType[]{SuperType.LEGENDARY}, new CardType[]{CardType.CREATURE}, new SubType[]{SubType.ANGEL}, "R");
|
||||||
|
|
||||||
this.supertype.add(SuperType.LEGENDARY);
|
this.getLeftHalfCard().setPT(4, 4);
|
||||||
this.subtype.add(SubType.ANGEL);
|
this.getRightHalfCard().setPT(6, 5);
|
||||||
this.power = new MageInt(4);
|
|
||||||
this.toughness = new MageInt(4);
|
|
||||||
|
|
||||||
this.secondSideCardClazz = mage.cards.a.AvacynThePurifier.class;
|
|
||||||
|
|
||||||
// Flash
|
// Flash
|
||||||
this.addAbility(FlashAbility.getInstance());
|
this.getLeftHalfCard().addAbility(FlashAbility.getInstance());
|
||||||
|
|
||||||
// Flying
|
// Flying
|
||||||
this.addAbility(FlyingAbility.getInstance());
|
this.getLeftHalfCard().addAbility(FlyingAbility.getInstance());
|
||||||
|
|
||||||
// Vigilance
|
// Vigilance
|
||||||
this.addAbility(VigilanceAbility.getInstance());
|
this.getLeftHalfCard().addAbility(VigilanceAbility.getInstance());
|
||||||
|
|
||||||
// When Archangel Avacyn enters the battlefield, creatures you control gain indestructible until end of turn.
|
// When Archangel Avacyn enters the battlefield, creatures you control gain indestructible until end of turn.
|
||||||
this.addAbility(new EntersBattlefieldTriggeredAbility(new GainAbilityControlledEffect(
|
this.getLeftHalfCard().addAbility(new EntersBattlefieldTriggeredAbility(new GainAbilityControlledEffect(
|
||||||
IndestructibleAbility.getInstance(), Duration.EndOfTurn,
|
IndestructibleAbility.getInstance(), Duration.EndOfTurn,
|
||||||
StaticFilters.FILTER_PERMANENT_CREATURES
|
StaticFilters.FILTER_PERMANENT_CREATURES
|
||||||
), false));
|
), false));
|
||||||
|
|
||||||
// When a non-Angel creature you control dies, transform Archangel Avacyn at the beginning of the next upkeep.
|
// When a non-Angel creature you control dies, transform Archangel Avacyn at the beginning of the next upkeep.
|
||||||
this.addAbility(new TransformAbility());
|
this.getLeftHalfCard().addAbility(new DiesCreatureTriggeredAbility(
|
||||||
this.addAbility(new DiesCreatureTriggeredAbility(
|
|
||||||
new CreateDelayedTriggeredAbilityEffect(
|
new CreateDelayedTriggeredAbilityEffect(
|
||||||
new AtTheBeginOfNextUpkeepDelayedTriggeredAbility(new TransformSourceEffect())
|
new AtTheBeginOfNextUpkeepDelayedTriggeredAbility(new TransformSourceEffect())
|
||||||
).setText("transform {this} at the beginning of the next upkeep"), false, filter
|
).setText("transform {this} at the beginning of the next upkeep"), false, nonAngelFilter
|
||||||
).setTriggerPhrase("When a non-Angel creature you control dies, "));
|
).setTriggerPhrase("When a non-Angel creature you control dies, "));
|
||||||
|
|
||||||
|
// Avacyn, the Purifier
|
||||||
|
|
||||||
|
// Flying
|
||||||
|
this.getRightHalfCard().addAbility(FlyingAbility.getInstance());
|
||||||
|
|
||||||
|
// When this creature transforms into Avacyn, the Purifier, it deals 3 damage to each other creature and each opponent.
|
||||||
|
Ability ability = new TransformIntoSourceTriggeredAbility(
|
||||||
|
new DamageAllEffect(3, "it", otherCreatureFilter)
|
||||||
|
);
|
||||||
|
ability.addEffect(new DamagePlayersEffect(3, TargetController.OPPONENT).setText("and each opponent"));
|
||||||
|
this.getRightHalfCard().addAbility(ability);
|
||||||
}
|
}
|
||||||
|
|
||||||
private ArchangelAvacyn(final ArchangelAvacyn card) {
|
private ArchangelAvacyn(final ArchangelAvacyn card) {
|
||||||
|
|
|
||||||
|
|
@ -1,42 +1,56 @@
|
||||||
package mage.cards.a;
|
package mage.cards.a;
|
||||||
|
|
||||||
import mage.abilities.Ability;
|
import mage.abilities.Ability;
|
||||||
import mage.abilities.triggers.BeginningOfUpkeepTriggeredAbility;
|
|
||||||
import mage.abilities.common.SimpleActivatedAbility;
|
import mage.abilities.common.SimpleActivatedAbility;
|
||||||
import mage.abilities.condition.common.FatefulHourCondition;
|
import mage.abilities.condition.common.FatefulHourCondition;
|
||||||
import mage.abilities.costs.common.PayLifeCost;
|
import mage.abilities.costs.common.PayLifeCost;
|
||||||
|
import mage.abilities.costs.common.SacrificeTargetCost;
|
||||||
|
import mage.abilities.costs.common.TapSourceCost;
|
||||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||||
|
import mage.abilities.dynamicvalue.common.SacrificeCostCreaturesToughness;
|
||||||
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
|
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
|
||||||
|
import mage.abilities.effects.common.GainLifeEffect;
|
||||||
import mage.abilities.effects.common.TransformSourceEffect;
|
import mage.abilities.effects.common.TransformSourceEffect;
|
||||||
import mage.abilities.keyword.TransformAbility;
|
import mage.abilities.mana.BlackManaAbility;
|
||||||
import mage.cards.CardImpl;
|
import mage.abilities.triggers.BeginningOfUpkeepTriggeredAbility;
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
|
import mage.cards.TransformingDoubleFacedCard;
|
||||||
import mage.constants.CardType;
|
import mage.constants.CardType;
|
||||||
|
import mage.constants.SubType;
|
||||||
import mage.constants.SuperType;
|
import mage.constants.SuperType;
|
||||||
import mage.constants.Zone;
|
import mage.filter.StaticFilters;
|
||||||
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author TheElk801
|
* @author TheElk801
|
||||||
*/
|
*/
|
||||||
public final class ArguelsBloodFast extends CardImpl {
|
public final class ArguelsBloodFast extends TransformingDoubleFacedCard {
|
||||||
|
|
||||||
public ArguelsBloodFast(UUID ownerId, CardSetInfo setInfo) {
|
public ArguelsBloodFast(UUID ownerId, CardSetInfo setInfo) {
|
||||||
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{1}{B}");
|
super(ownerId, setInfo,
|
||||||
|
new SuperType[]{SuperType.LEGENDARY}, new CardType[]{CardType.ENCHANTMENT}, new SubType[]{}, "{1}{B}",
|
||||||
this.supertype.add(SuperType.LEGENDARY);
|
"Temple of Aclazotz",
|
||||||
this.secondSideCardClazz = mage.cards.t.TempleOfAclazotz.class;
|
new SuperType[]{SuperType.LEGENDARY}, new CardType[]{CardType.LAND}, new SubType[]{},"");
|
||||||
|
|
||||||
// {1}{B}, Pay 2 life: Draw a card.
|
// {1}{B}, Pay 2 life: Draw a card.
|
||||||
Ability ability = new SimpleActivatedAbility(new DrawCardSourceControllerEffect(1), new ManaCostsImpl<>("{1}{B}"));
|
Ability ability = new SimpleActivatedAbility(new DrawCardSourceControllerEffect(1), new ManaCostsImpl<>("{1}{B}"));
|
||||||
ability.addCost(new PayLifeCost(2));
|
ability.addCost(new PayLifeCost(2));
|
||||||
this.addAbility(ability);
|
this.getLeftHalfCard().addAbility(ability);
|
||||||
|
|
||||||
// At the beginning of your upkeep, if you have 5 or less life, you may transform Arguel's Blood Fast.
|
// At the beginning of your upkeep, if you have 5 or less life, you may transform Arguel's Blood Fast.
|
||||||
this.addAbility(new TransformAbility());
|
this.getLeftHalfCard().addAbility(new BeginningOfUpkeepTriggeredAbility(new TransformSourceEffect(), true
|
||||||
this.addAbility(new BeginningOfUpkeepTriggeredAbility(new TransformSourceEffect(), true
|
|
||||||
).withInterveningIf(FatefulHourCondition.instance));
|
).withInterveningIf(FatefulHourCondition.instance));
|
||||||
|
|
||||||
|
// Temple of Aclazotz
|
||||||
|
// {T}: Add {B}
|
||||||
|
this.getRightHalfCard().addAbility(new BlackManaAbility());
|
||||||
|
|
||||||
|
// {T}, Sacrifice a creature: You gain life equal to the sacrificed creature's toughness.
|
||||||
|
Ability activatedAbility = new SimpleActivatedAbility(new GainLifeEffect(SacrificeCostCreaturesToughness.instance)
|
||||||
|
.setText("you gain life equal to the sacrificed creature's toughness"), new TapSourceCost());
|
||||||
|
activatedAbility.addCost(new SacrificeTargetCost(StaticFilters.FILTER_PERMANENT_CREATURE));
|
||||||
|
this.getRightHalfCard().addAbility(activatedAbility);
|
||||||
}
|
}
|
||||||
|
|
||||||
private ArguelsBloodFast(final ArguelsBloodFast card) {
|
private ArguelsBloodFast(final ArguelsBloodFast card) {
|
||||||
|
|
|
||||||
|
|
@ -1,68 +0,0 @@
|
||||||
package mage.cards.a;
|
|
||||||
|
|
||||||
import mage.abilities.Ability;
|
|
||||||
import mage.abilities.LoyaltyAbility;
|
|
||||||
import mage.abilities.effects.common.DamageTargetEffect;
|
|
||||||
import mage.abilities.effects.common.GetEmblemEffect;
|
|
||||||
import mage.abilities.effects.common.TransformSourceEffect;
|
|
||||||
import mage.abilities.effects.common.continuous.BoostControlledEffect;
|
|
||||||
import mage.abilities.effects.common.continuous.GainAbilityControlledEffect;
|
|
||||||
import mage.abilities.keyword.TrampleAbility;
|
|
||||||
import mage.abilities.keyword.TransformAbility;
|
|
||||||
import mage.cards.CardImpl;
|
|
||||||
import mage.cards.CardSetInfo;
|
|
||||||
import mage.constants.CardType;
|
|
||||||
import mage.constants.Duration;
|
|
||||||
import mage.constants.SubType;
|
|
||||||
import mage.constants.SuperType;
|
|
||||||
import mage.filter.StaticFilters;
|
|
||||||
import mage.game.command.emblems.ArlinnEmbracedByTheMoonEmblem;
|
|
||||||
import mage.target.common.TargetAnyTarget;
|
|
||||||
|
|
||||||
import java.util.UUID;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author fireshoes
|
|
||||||
*/
|
|
||||||
public final class ArlinnEmbracedByTheMoon extends CardImpl {
|
|
||||||
|
|
||||||
public ArlinnEmbracedByTheMoon(UUID ownerId, CardSetInfo setInfo) {
|
|
||||||
super(ownerId, setInfo, new CardType[]{CardType.PLANESWALKER}, "");
|
|
||||||
this.supertype.add(SuperType.LEGENDARY);
|
|
||||||
this.subtype.add(SubType.ARLINN);
|
|
||||||
this.color.setRed(true);
|
|
||||||
this.color.setGreen(true);
|
|
||||||
|
|
||||||
this.nightCard = true;
|
|
||||||
|
|
||||||
// +1: Creatures you control get +1/+1 and gain trample until end of turn.
|
|
||||||
Ability ability = new LoyaltyAbility(new BoostControlledEffect(
|
|
||||||
1, 1, Duration.EndOfTurn,
|
|
||||||
StaticFilters.FILTER_PERMANENT_CREATURE
|
|
||||||
).setText("Creatures you control get +1/+1"), 1);
|
|
||||||
ability.addEffect(new GainAbilityControlledEffect(
|
|
||||||
TrampleAbility.getInstance(), Duration.EndOfTurn,
|
|
||||||
StaticFilters.FILTER_PERMANENT_CREATURE
|
|
||||||
).setText("and gain trample until end of turn"));
|
|
||||||
this.addAbility(ability);
|
|
||||||
|
|
||||||
// -1: Arlinn, Embraced by the Moon deals 3 damage to any target. Transform Arlinn, Embraced by the Moon.
|
|
||||||
this.addAbility(new TransformAbility());
|
|
||||||
ability = new LoyaltyAbility(new DamageTargetEffect(3), -1);
|
|
||||||
ability.addTarget(new TargetAnyTarget());
|
|
||||||
ability.addEffect(new TransformSourceEffect());
|
|
||||||
this.addAbility(ability);
|
|
||||||
|
|
||||||
// -6: You get an emblem with "Creatures you control have haste and '{T}: This creature deals damage equal to its power to any target.'"
|
|
||||||
this.addAbility(new LoyaltyAbility(new GetEmblemEffect(new ArlinnEmbracedByTheMoonEmblem()), -6));
|
|
||||||
}
|
|
||||||
|
|
||||||
private ArlinnEmbracedByTheMoon(final ArlinnEmbracedByTheMoon card) {
|
|
||||||
super(card);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public ArlinnEmbracedByTheMoon copy() {
|
|
||||||
return new ArlinnEmbracedByTheMoon(this);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -3,19 +3,26 @@ package mage.cards.a;
|
||||||
import mage.abilities.Ability;
|
import mage.abilities.Ability;
|
||||||
import mage.abilities.LoyaltyAbility;
|
import mage.abilities.LoyaltyAbility;
|
||||||
import mage.abilities.effects.common.CreateTokenEffect;
|
import mage.abilities.effects.common.CreateTokenEffect;
|
||||||
|
import mage.abilities.effects.common.DamageTargetEffect;
|
||||||
|
import mage.abilities.effects.common.GetEmblemEffect;
|
||||||
import mage.abilities.effects.common.TransformSourceEffect;
|
import mage.abilities.effects.common.TransformSourceEffect;
|
||||||
|
import mage.abilities.effects.common.continuous.BoostControlledEffect;
|
||||||
import mage.abilities.effects.common.continuous.BoostTargetEffect;
|
import mage.abilities.effects.common.continuous.BoostTargetEffect;
|
||||||
|
import mage.abilities.effects.common.continuous.GainAbilityControlledEffect;
|
||||||
import mage.abilities.effects.common.continuous.GainAbilityTargetEffect;
|
import mage.abilities.effects.common.continuous.GainAbilityTargetEffect;
|
||||||
import mage.abilities.keyword.HasteAbility;
|
import mage.abilities.keyword.HasteAbility;
|
||||||
import mage.abilities.keyword.TransformAbility;
|
import mage.abilities.keyword.TrampleAbility;
|
||||||
import mage.abilities.keyword.VigilanceAbility;
|
import mage.abilities.keyword.VigilanceAbility;
|
||||||
import mage.cards.CardImpl;
|
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
|
import mage.cards.TransformingDoubleFacedCard;
|
||||||
import mage.constants.CardType;
|
import mage.constants.CardType;
|
||||||
import mage.constants.Duration;
|
import mage.constants.Duration;
|
||||||
import mage.constants.SubType;
|
import mage.constants.SubType;
|
||||||
import mage.constants.SuperType;
|
import mage.constants.SuperType;
|
||||||
|
import mage.filter.StaticFilters;
|
||||||
|
import mage.game.command.emblems.ArlinnEmbracedByTheMoonEmblem;
|
||||||
import mage.game.permanent.token.WolfToken;
|
import mage.game.permanent.token.WolfToken;
|
||||||
|
import mage.target.common.TargetAnyTarget;
|
||||||
import mage.target.common.TargetCreaturePermanent;
|
import mage.target.common.TargetCreaturePermanent;
|
||||||
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
|
@ -23,16 +30,14 @@ import java.util.UUID;
|
||||||
/**
|
/**
|
||||||
* @author fireshoes
|
* @author fireshoes
|
||||||
*/
|
*/
|
||||||
public final class ArlinnKord extends CardImpl {
|
public final class ArlinnKord extends TransformingDoubleFacedCard {
|
||||||
|
|
||||||
public ArlinnKord(UUID ownerId, CardSetInfo setInfo) {
|
public ArlinnKord(UUID ownerId, CardSetInfo setInfo) {
|
||||||
super(ownerId, setInfo, new CardType[]{CardType.PLANESWALKER}, "{2}{R}{G}");
|
super(ownerId, setInfo,
|
||||||
this.supertype.add(SuperType.LEGENDARY);
|
new SuperType[]{SuperType.LEGENDARY}, new CardType[]{CardType.PLANESWALKER}, new SubType[]{SubType.ARLINN}, "{2}{R}{G}",
|
||||||
this.subtype.add(SubType.ARLINN);
|
"Arlinn, Embraced by the Moon",
|
||||||
|
new SuperType[]{SuperType.LEGENDARY}, new CardType[]{CardType.PLANESWALKER}, new SubType[]{SubType.ARLINN}, "RG");
|
||||||
this.secondSideCardClazz = mage.cards.a.ArlinnEmbracedByTheMoon.class;
|
this.getLeftHalfCard().setStartingLoyalty(3);
|
||||||
|
|
||||||
this.setStartingLoyalty(3);
|
|
||||||
|
|
||||||
// +1: Until end of turn, up to one target creature gets +2/+2 and gains vigilance and haste.
|
// +1: Until end of turn, up to one target creature gets +2/+2 and gains vigilance and haste.
|
||||||
Ability ability = new LoyaltyAbility(new BoostTargetEffect(
|
Ability ability = new LoyaltyAbility(new BoostTargetEffect(
|
||||||
|
|
@ -45,13 +50,34 @@ public final class ArlinnKord extends CardImpl {
|
||||||
HasteAbility.getInstance(), Duration.EndOfTurn
|
HasteAbility.getInstance(), Duration.EndOfTurn
|
||||||
).setText("and haste"));
|
).setText("and haste"));
|
||||||
ability.addTarget(new TargetCreaturePermanent(0, 1));
|
ability.addTarget(new TargetCreaturePermanent(0, 1));
|
||||||
this.addAbility(ability);
|
this.getLeftHalfCard().addAbility(ability);
|
||||||
|
|
||||||
// 0: Create a 2/2 green Wolf creature token. Transform Arlinn Kord.
|
// 0: Create a 2/2 green Wolf creature token. Transform Arlinn Kord.
|
||||||
this.addAbility(new TransformAbility());
|
|
||||||
ability = new LoyaltyAbility(new CreateTokenEffect(new WolfToken()), 0);
|
ability = new LoyaltyAbility(new CreateTokenEffect(new WolfToken()), 0);
|
||||||
ability.addEffect(new TransformSourceEffect());
|
ability.addEffect(new TransformSourceEffect());
|
||||||
this.addAbility(ability);
|
this.getLeftHalfCard().addAbility(ability);
|
||||||
|
|
||||||
|
// Arlinn, Embraced by the Moon
|
||||||
|
// +1: Creatures you control get +1/+1 and gain trample until end of turn.
|
||||||
|
ability = new LoyaltyAbility(new BoostControlledEffect(
|
||||||
|
1, 1, Duration.EndOfTurn,
|
||||||
|
StaticFilters.FILTER_PERMANENT_CREATURE
|
||||||
|
).setText("Creatures you control get +1/+1"), 1);
|
||||||
|
ability.addEffect(new GainAbilityControlledEffect(
|
||||||
|
TrampleAbility.getInstance(), Duration.EndOfTurn,
|
||||||
|
StaticFilters.FILTER_PERMANENT_CREATURE
|
||||||
|
).setText("and gain trample until end of turn"));
|
||||||
|
this.getRightHalfCard().addAbility(ability);
|
||||||
|
|
||||||
|
// -1: Arlinn, Embraced by the Moon deals 3 damage to any target. Transform Arlinn, Embraced by the Moon.
|
||||||
|
ability = new LoyaltyAbility(new DamageTargetEffect(3), -1);
|
||||||
|
ability.addTarget(new TargetAnyTarget());
|
||||||
|
ability.addEffect(new TransformSourceEffect());
|
||||||
|
this.getRightHalfCard().addAbility(ability);
|
||||||
|
|
||||||
|
// -6: You get an emblem with "Creatures you control have haste and '{T}: This creature deals damage equal to its power to any target.'"
|
||||||
|
this.getRightHalfCard().addAbility(new LoyaltyAbility(new GetEmblemEffect(new ArlinnEmbracedByTheMoonEmblem()), -6));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private ArlinnKord(final ArlinnKord card) {
|
private ArlinnKord(final ArlinnKord card) {
|
||||||
|
|
|
||||||
|
|
@ -1,118 +0,0 @@
|
||||||
package mage.cards.a;
|
|
||||||
|
|
||||||
import mage.Mana;
|
|
||||||
import mage.abilities.Ability;
|
|
||||||
import mage.abilities.LoyaltyAbility;
|
|
||||||
import mage.abilities.effects.ContinuousEffectImpl;
|
|
||||||
import mage.abilities.effects.mana.BasicManaEffect;
|
|
||||||
import mage.abilities.keyword.HasteAbility;
|
|
||||||
import mage.abilities.keyword.IndestructibleAbility;
|
|
||||||
import mage.abilities.keyword.NightboundAbility;
|
|
||||||
import mage.abilities.keyword.TrampleAbility;
|
|
||||||
import mage.cards.CardImpl;
|
|
||||||
import mage.cards.CardSetInfo;
|
|
||||||
import mage.constants.*;
|
|
||||||
import mage.game.Game;
|
|
||||||
import mage.game.permanent.Permanent;
|
|
||||||
|
|
||||||
import java.util.UUID;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author TheElk801
|
|
||||||
*/
|
|
||||||
public final class ArlinnTheMoonsFury extends CardImpl {
|
|
||||||
|
|
||||||
public ArlinnTheMoonsFury(UUID ownerId, CardSetInfo setInfo) {
|
|
||||||
super(ownerId, setInfo, new CardType[]{CardType.PLANESWALKER}, "");
|
|
||||||
|
|
||||||
this.supertype.add(SuperType.LEGENDARY);
|
|
||||||
this.subtype.add(SubType.ARLINN);
|
|
||||||
this.setStartingLoyalty(4);
|
|
||||||
this.color.setRed(true);
|
|
||||||
this.color.setGreen(true);
|
|
||||||
this.nightCard = true;
|
|
||||||
|
|
||||||
// Nightbound
|
|
||||||
this.addAbility(new NightboundAbility());
|
|
||||||
|
|
||||||
// +2: Add {R}{G}.
|
|
||||||
this.addAbility(new LoyaltyAbility(new BasicManaEffect(new Mana(
|
|
||||||
0, 0, 0, 1, 1, 0, 0, 0
|
|
||||||
)), 2));
|
|
||||||
|
|
||||||
// 0: Until end of turn, Arlinn, the Moon's Fury becomes a 5/5 Werewolf creature with trample, indestructible, and haste.
|
|
||||||
this.addAbility(new LoyaltyAbility(new ArlinnTheMoonsFuryEffect(), 0));
|
|
||||||
}
|
|
||||||
|
|
||||||
private ArlinnTheMoonsFury(final ArlinnTheMoonsFury card) {
|
|
||||||
super(card);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public ArlinnTheMoonsFury copy() {
|
|
||||||
return new ArlinnTheMoonsFury(this);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
class ArlinnTheMoonsFuryEffect extends ContinuousEffectImpl {
|
|
||||||
|
|
||||||
ArlinnTheMoonsFuryEffect() {
|
|
||||||
super(Duration.EndOfTurn, Outcome.Benefit);
|
|
||||||
staticText = "until end of turn, {this} becomes a 5/5 Werewolf creature with trample, indestructible, and haste";
|
|
||||||
this.dependencyTypes.add(DependencyType.BecomeCreature);
|
|
||||||
}
|
|
||||||
|
|
||||||
private ArlinnTheMoonsFuryEffect(final ArlinnTheMoonsFuryEffect effect) {
|
|
||||||
super(effect);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public ArlinnTheMoonsFuryEffect copy() {
|
|
||||||
return new ArlinnTheMoonsFuryEffect(this);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean apply(Layer layer, SubLayer sublayer, Ability source, Game game) {
|
|
||||||
Permanent permanent = source.getSourcePermanentIfItStillExists(game);
|
|
||||||
if (permanent == null) {
|
|
||||||
discard();
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
switch (layer) {
|
|
||||||
case TypeChangingEffects_4:
|
|
||||||
permanent.removeAllCardTypes(game);
|
|
||||||
permanent.addCardType(game, CardType.CREATURE);
|
|
||||||
permanent.removeAllCreatureTypes(game);
|
|
||||||
permanent.addSubType(game, SubType.WEREWOLF);
|
|
||||||
return true;
|
|
||||||
case AbilityAddingRemovingEffects_6:
|
|
||||||
permanent.addAbility(TrampleAbility.getInstance(), source.getSourceId(), game);
|
|
||||||
permanent.addAbility(IndestructibleAbility.getInstance(), source.getSourceId(), game);
|
|
||||||
permanent.addAbility(HasteAbility.getInstance(), source.getSourceId(), game);
|
|
||||||
return true;
|
|
||||||
case PTChangingEffects_7:
|
|
||||||
if (sublayer == SubLayer.SetPT_7b) {
|
|
||||||
permanent.getPower().setModifiedBaseValue(5);
|
|
||||||
permanent.getToughness().setModifiedBaseValue(5);
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean apply(Game game, Ability source) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean hasLayer(Layer layer) {
|
|
||||||
switch (layer) {
|
|
||||||
case TypeChangingEffects_4:
|
|
||||||
case AbilityAddingRemovingEffects_6:
|
|
||||||
case PTChangingEffects_7:
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,21 +1,23 @@
|
||||||
package mage.cards.a;
|
package mage.cards.a;
|
||||||
|
|
||||||
|
import mage.Mana;
|
||||||
import mage.abilities.Ability;
|
import mage.abilities.Ability;
|
||||||
import mage.abilities.LoyaltyAbility;
|
import mage.abilities.LoyaltyAbility;
|
||||||
|
import mage.abilities.effects.ContinuousEffectImpl;
|
||||||
import mage.abilities.effects.common.CreateTokenEffect;
|
import mage.abilities.effects.common.CreateTokenEffect;
|
||||||
import mage.abilities.effects.common.EntersWithCountersControlledEffect;
|
import mage.abilities.effects.common.EntersWithCountersControlledEffect;
|
||||||
import mage.abilities.effects.common.continuous.CastAsThoughItHadFlashAllEffect;
|
import mage.abilities.effects.common.continuous.CastAsThoughItHadFlashAllEffect;
|
||||||
import mage.abilities.keyword.DayboundAbility;
|
import mage.abilities.effects.mana.BasicManaEffect;
|
||||||
import mage.cards.CardImpl;
|
import mage.abilities.keyword.*;
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
import mage.constants.CardType;
|
import mage.cards.TransformingDoubleFacedCard;
|
||||||
import mage.constants.Duration;
|
import mage.constants.*;
|
||||||
import mage.constants.SubType;
|
|
||||||
import mage.constants.SuperType;
|
|
||||||
import mage.counters.CounterType;
|
import mage.counters.CounterType;
|
||||||
import mage.filter.FilterCard;
|
import mage.filter.FilterCard;
|
||||||
import mage.filter.StaticFilters;
|
import mage.filter.StaticFilters;
|
||||||
import mage.filter.common.FilterCreatureCard;
|
import mage.filter.common.FilterCreatureCard;
|
||||||
|
import mage.game.Game;
|
||||||
|
import mage.game.permanent.Permanent;
|
||||||
import mage.game.permanent.token.WolfToken;
|
import mage.game.permanent.token.WolfToken;
|
||||||
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
|
@ -23,20 +25,20 @@ import java.util.UUID;
|
||||||
/**
|
/**
|
||||||
* @author TheElk801
|
* @author TheElk801
|
||||||
*/
|
*/
|
||||||
public final class ArlinnThePacksHope extends CardImpl {
|
public final class ArlinnThePacksHope extends TransformingDoubleFacedCard {
|
||||||
|
|
||||||
private static final FilterCard filter = new FilterCreatureCard("creature spells");
|
private static final FilterCard filter = new FilterCreatureCard("creature spells");
|
||||||
|
|
||||||
public ArlinnThePacksHope(UUID ownerId, CardSetInfo setInfo) {
|
public ArlinnThePacksHope(UUID ownerId, CardSetInfo setInfo) {
|
||||||
super(ownerId, setInfo, new CardType[]{CardType.PLANESWALKER}, "{2}{R}{G}");
|
super(ownerId, setInfo,
|
||||||
|
new SuperType[]{SuperType.LEGENDARY}, new CardType[]{CardType.PLANESWALKER}, new SubType[]{SubType.ARLINN}, "{2}{R}{G}",
|
||||||
this.supertype.add(SuperType.LEGENDARY);
|
"Arlinn, the Moon's Fury",
|
||||||
this.subtype.add(SubType.ARLINN);
|
new SuperType[]{SuperType.LEGENDARY}, new CardType[]{CardType.PLANESWALKER}, new SubType[]{SubType.ARLINN}, "RG");
|
||||||
this.setStartingLoyalty(4);
|
this.getLeftHalfCard().setStartingLoyalty(4);
|
||||||
this.secondSideCardClazz = mage.cards.a.ArlinnTheMoonsFury.class;
|
this.getRightHalfCard().setStartingLoyalty(4);
|
||||||
|
|
||||||
// Daybound
|
// Daybound
|
||||||
this.addAbility(new DayboundAbility());
|
this.getLeftHalfCard().addAbility(new DayboundAbility());
|
||||||
|
|
||||||
// +1: Until your next turn, you may cast creature spells as though they had flash, and each creature you control enters the battlefield with an additional +1/+1 counter on it.
|
// +1: Until your next turn, you may cast creature spells as though they had flash, and each creature you control enters the battlefield with an additional +1/+1 counter on it.
|
||||||
Ability ability = new LoyaltyAbility(new CastAsThoughItHadFlashAllEffect(
|
Ability ability = new LoyaltyAbility(new CastAsThoughItHadFlashAllEffect(
|
||||||
|
|
@ -45,10 +47,23 @@ public final class ArlinnThePacksHope extends CardImpl {
|
||||||
ability.addEffect(new EntersWithCountersControlledEffect(
|
ability.addEffect(new EntersWithCountersControlledEffect(
|
||||||
StaticFilters.FILTER_PERMANENT_CREATURE, CounterType.P1P1.createInstance(), false
|
StaticFilters.FILTER_PERMANENT_CREATURE, CounterType.P1P1.createInstance(), false
|
||||||
).concatBy(", and"));
|
).concatBy(", and"));
|
||||||
this.addAbility(ability);
|
this.getLeftHalfCard().addAbility(ability);
|
||||||
|
|
||||||
// −3: Create two 2/2 green Wolf creature tokens.
|
// −3: Create two 2/2 green Wolf creature tokens.
|
||||||
this.addAbility(new LoyaltyAbility(new CreateTokenEffect(new WolfToken(), 2), -3));
|
this.getLeftHalfCard().addAbility(new LoyaltyAbility(new CreateTokenEffect(new WolfToken(), 2), -3));
|
||||||
|
|
||||||
|
// Arlinn, the Moon's Fury
|
||||||
|
// Nightbound
|
||||||
|
this.getRightHalfCard().addAbility(new NightboundAbility());
|
||||||
|
|
||||||
|
// +2: Add {R}{G}.
|
||||||
|
this.getRightHalfCard().addAbility(new LoyaltyAbility(new BasicManaEffect(new Mana(
|
||||||
|
0, 0, 0, 1, 1, 0, 0, 0
|
||||||
|
)), 2));
|
||||||
|
|
||||||
|
// 0: Until end of turn, Arlinn, the Moon's Fury becomes a 5/5 Werewolf creature with trample, indestructible, and haste.
|
||||||
|
this.getRightHalfCard().addAbility(new LoyaltyAbility(new ArlinnTheMoonsFuryEffect(), 0));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private ArlinnThePacksHope(final ArlinnThePacksHope card) {
|
private ArlinnThePacksHope(final ArlinnThePacksHope card) {
|
||||||
|
|
@ -60,3 +75,66 @@ public final class ArlinnThePacksHope extends CardImpl {
|
||||||
return new ArlinnThePacksHope(this);
|
return new ArlinnThePacksHope(this);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
class ArlinnTheMoonsFuryEffect extends ContinuousEffectImpl {
|
||||||
|
|
||||||
|
ArlinnTheMoonsFuryEffect() {
|
||||||
|
super(Duration.EndOfTurn, Outcome.Benefit);
|
||||||
|
staticText = "until end of turn, {this} becomes a 5/5 Werewolf creature with trample, indestructible, and haste";
|
||||||
|
this.dependencyTypes.add(DependencyType.BecomeCreature);
|
||||||
|
}
|
||||||
|
|
||||||
|
private ArlinnTheMoonsFuryEffect(final ArlinnTheMoonsFuryEffect effect) {
|
||||||
|
super(effect);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ArlinnTheMoonsFuryEffect copy() {
|
||||||
|
return new ArlinnTheMoonsFuryEffect(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean apply(Layer layer, SubLayer sublayer, Ability source, Game game) {
|
||||||
|
Permanent permanent = source.getSourcePermanentIfItStillExists(game);
|
||||||
|
if (permanent == null) {
|
||||||
|
discard();
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
switch (layer) {
|
||||||
|
case TypeChangingEffects_4:
|
||||||
|
permanent.removeAllCardTypes(game);
|
||||||
|
permanent.addCardType(game, CardType.CREATURE);
|
||||||
|
permanent.removeAllCreatureTypes(game);
|
||||||
|
permanent.addSubType(game, SubType.WEREWOLF);
|
||||||
|
return true;
|
||||||
|
case AbilityAddingRemovingEffects_6:
|
||||||
|
permanent.addAbility(TrampleAbility.getInstance(), source.getSourceId(), game);
|
||||||
|
permanent.addAbility(IndestructibleAbility.getInstance(), source.getSourceId(), game);
|
||||||
|
permanent.addAbility(HasteAbility.getInstance(), source.getSourceId(), game);
|
||||||
|
return true;
|
||||||
|
case PTChangingEffects_7:
|
||||||
|
if (sublayer == SubLayer.SetPT_7b) {
|
||||||
|
permanent.getPower().setModifiedBaseValue(5);
|
||||||
|
permanent.getToughness().setModifiedBaseValue(5);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean apply(Game game, Ability source) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean hasLayer(Layer layer) {
|
||||||
|
switch (layer) {
|
||||||
|
case TypeChangingEffects_4:
|
||||||
|
case AbilityAddingRemovingEffects_6:
|
||||||
|
case PTChangingEffects_7:
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,6 @@ import mage.abilities.effects.common.DamageTargetEffect;
|
||||||
import mage.abilities.hint.common.RaidHint;
|
import mage.abilities.hint.common.RaidHint;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
import mage.constants.AbilityWord;
|
|
||||||
import mage.constants.CardType;
|
import mage.constants.CardType;
|
||||||
import mage.target.common.TargetAnyTarget;
|
import mage.target.common.TargetAnyTarget;
|
||||||
import mage.watchers.common.PlayerAttackedWatcher;
|
import mage.watchers.common.PlayerAttackedWatcher;
|
||||||
|
|
@ -30,7 +29,7 @@ public final class ArrowStorm extends CardImpl {
|
||||||
this.getSpellAbility().addTarget(new TargetAnyTarget());
|
this.getSpellAbility().addTarget(new TargetAnyTarget());
|
||||||
// Raid - If you attacked with a creature this turn, instead Arrow Storm deals 5 damage to that creature or player and the damage can't be prevented.
|
// Raid - If you attacked with a creature this turn, instead Arrow Storm deals 5 damage to that creature or player and the damage can't be prevented.
|
||||||
this.getSpellAbility().addEffect(new ConditionalOneShotEffect(
|
this.getSpellAbility().addEffect(new ConditionalOneShotEffect(
|
||||||
new DamageTargetEffect(5, false),
|
new DamageTargetEffect(5).withCantBePrevented(),
|
||||||
RaidCondition.instance,
|
RaidCondition.instance,
|
||||||
"<br/><br/><i>Raid</i> — If you attacked this turn, instead {this} deals 5 damage to that permanent or player and the damage can't be prevented"));
|
"<br/><br/><i>Raid</i> — If you attacked this turn, instead {this} deals 5 damage to that permanent or player and the damage can't be prevented"));
|
||||||
this.getSpellAbility().addWatcher(new PlayerAttackedWatcher());
|
this.getSpellAbility().addWatcher(new PlayerAttackedWatcher());
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,7 @@ public final class AshmouthHound extends CardImpl {
|
||||||
this.toughness = new MageInt(1);
|
this.toughness = new MageInt(1);
|
||||||
|
|
||||||
// Whenever Ashmouth Hound blocks or becomes blocked by a creature, Ashmouth Hound deals 1 damage to that creature.
|
// Whenever Ashmouth Hound blocks or becomes blocked by a creature, Ashmouth Hound deals 1 damage to that creature.
|
||||||
this.addAbility(new BlocksOrBlockedByCreatureSourceTriggeredAbility(new DamageTargetEffect(1, true, "that creature")));
|
this.addAbility(new BlocksOrBlockedByCreatureSourceTriggeredAbility(new DamageTargetEffect(1).withTargetDescription("that creature")));
|
||||||
}
|
}
|
||||||
|
|
||||||
private AshmouthHound(final AshmouthHound card) {
|
private AshmouthHound(final AshmouthHound card) {
|
||||||
|
|
|
||||||
|
|
@ -1,49 +0,0 @@
|
||||||
|
|
||||||
package mage.cards.a;
|
|
||||||
|
|
||||||
import java.util.UUID;
|
|
||||||
import mage.MageInt;
|
|
||||||
import mage.abilities.common.AttacksTriggeredAbility;
|
|
||||||
import mage.abilities.effects.common.LoseLifeOpponentsEffect;
|
|
||||||
import mage.abilities.keyword.DeathtouchAbility;
|
|
||||||
import mage.abilities.keyword.FlyingAbility;
|
|
||||||
import mage.cards.CardImpl;
|
|
||||||
import mage.cards.CardSetInfo;
|
|
||||||
import mage.constants.CardType;
|
|
||||||
import mage.constants.SubType;
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @author fireshoes
|
|
||||||
*/
|
|
||||||
public final class AuroraOfEmrakul extends CardImpl {
|
|
||||||
|
|
||||||
public AuroraOfEmrakul(UUID ownerId, CardSetInfo setInfo) {
|
|
||||||
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"");
|
|
||||||
this.subtype.add(SubType.ELDRAZI);
|
|
||||||
this.subtype.add(SubType.REFLECTION);
|
|
||||||
this.power = new MageInt(1);
|
|
||||||
this.toughness = new MageInt(4);
|
|
||||||
|
|
||||||
// this card is the second face of double-faced card
|
|
||||||
this.nightCard = true;
|
|
||||||
|
|
||||||
// Flying
|
|
||||||
this.addAbility(FlyingAbility.getInstance());
|
|
||||||
|
|
||||||
// Deathtouch
|
|
||||||
this.addAbility(DeathtouchAbility.getInstance());
|
|
||||||
|
|
||||||
// Whenever Aurora of Emrakul attacks, each opponent loses 3 life.
|
|
||||||
this.addAbility(new AttacksTriggeredAbility(new LoseLifeOpponentsEffect(3),false));
|
|
||||||
}
|
|
||||||
|
|
||||||
private AuroraOfEmrakul(final AuroraOfEmrakul card) {
|
|
||||||
super(card);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public AuroraOfEmrakul copy() {
|
|
||||||
return new AuroraOfEmrakul(this);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -6,12 +6,14 @@ import mage.abilities.costs.mana.ManaCostsImpl;
|
||||||
import mage.abilities.dynamicvalue.common.CardTypesInGraveyardCount;
|
import mage.abilities.dynamicvalue.common.CardTypesInGraveyardCount;
|
||||||
import mage.abilities.effects.common.MillCardsControllerEffect;
|
import mage.abilities.effects.common.MillCardsControllerEffect;
|
||||||
import mage.abilities.effects.common.TransformSourceEffect;
|
import mage.abilities.effects.common.TransformSourceEffect;
|
||||||
import mage.abilities.keyword.TransformAbility;
|
import mage.abilities.keyword.HexproofAbility;
|
||||||
|
import mage.abilities.keyword.TrampleAbility;
|
||||||
import mage.abilities.triggers.BeginningOfEndStepTriggeredAbility;
|
import mage.abilities.triggers.BeginningOfEndStepTriggeredAbility;
|
||||||
import mage.cards.CardImpl;
|
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
|
import mage.cards.TransformingDoubleFacedCard;
|
||||||
import mage.constants.AbilityWord;
|
import mage.constants.AbilityWord;
|
||||||
import mage.constants.CardType;
|
import mage.constants.CardType;
|
||||||
|
import mage.constants.SubType;
|
||||||
import mage.constants.TargetController;
|
import mage.constants.TargetController;
|
||||||
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
|
@ -19,20 +21,28 @@ import java.util.UUID;
|
||||||
/**
|
/**
|
||||||
* @author LevelX2
|
* @author LevelX2
|
||||||
*/
|
*/
|
||||||
public final class AutumnalGloom extends CardImpl {
|
public final class AutumnalGloom extends TransformingDoubleFacedCard {
|
||||||
|
|
||||||
public AutumnalGloom(UUID ownerId, CardSetInfo setInfo) {
|
public AutumnalGloom(UUID ownerId, CardSetInfo setInfo) {
|
||||||
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{G}");
|
super(ownerId, setInfo,
|
||||||
this.secondSideCardClazz = mage.cards.a.AncientOfTheEquinox.class;
|
new CardType[]{CardType.ENCHANTMENT}, new SubType[]{}, "{2}{G}",
|
||||||
|
"Ancient of the Equinox",
|
||||||
|
new CardType[]{CardType.CREATURE}, new SubType[]{SubType.TREEFOLK}, "G");
|
||||||
|
this.getRightHalfCard().setPT(4, 4);
|
||||||
|
|
||||||
// {B}: Put the top card of your library into your graveyard.
|
// {B}: Put the top card of your library into your graveyard.
|
||||||
this.addAbility(new SimpleActivatedAbility(new MillCardsControllerEffect(1), new ManaCostsImpl<>("{B}")));
|
this.getLeftHalfCard().addAbility(new SimpleActivatedAbility(new MillCardsControllerEffect(1), new ManaCostsImpl<>("{B}")));
|
||||||
|
|
||||||
// <i>Delirium</i> — At the beginning of your end step, if there are four or more card types among cards in your graveyard, transform Autumnal Gloom.
|
// <i>Delirium</i> — At the beginning of your end step, if there are four or more card types among cards in your graveyard, transform Autumnal Gloom.
|
||||||
this.addAbility(new TransformAbility());
|
this.getLeftHalfCard().addAbility(new BeginningOfEndStepTriggeredAbility(
|
||||||
this.addAbility(new BeginningOfEndStepTriggeredAbility(
|
|
||||||
TargetController.YOU, new TransformSourceEffect(), false, DeliriumCondition.instance
|
TargetController.YOU, new TransformSourceEffect(), false, DeliriumCondition.instance
|
||||||
).setAbilityWord(AbilityWord.DELIRIUM).addHint(CardTypesInGraveyardCount.YOU.getHint()));
|
).setAbilityWord(AbilityWord.DELIRIUM).addHint(CardTypesInGraveyardCount.YOU.getHint()));
|
||||||
|
|
||||||
|
// Ancient of the Equinox
|
||||||
|
// Trample
|
||||||
|
this.getRightHalfCard().addAbility(TrampleAbility.getInstance());
|
||||||
|
// Hexproof
|
||||||
|
this.getRightHalfCard().addAbility(HexproofAbility.getInstance());
|
||||||
}
|
}
|
||||||
|
|
||||||
private AutumnalGloom(final AutumnalGloom card) {
|
private AutumnalGloom(final AutumnalGloom card) {
|
||||||
|
|
|
||||||
|
|
@ -1,14 +1,18 @@
|
||||||
package mage.cards.a;
|
package mage.cards.a;
|
||||||
|
|
||||||
import mage.MageInt;
|
|
||||||
import mage.abilities.Ability;
|
import mage.abilities.Ability;
|
||||||
|
import mage.abilities.common.SimpleStaticAbility;
|
||||||
|
import mage.abilities.effects.common.continuous.GainAbilityControlledEffect;
|
||||||
|
import mage.abilities.effects.common.counter.AddCountersAllEffect;
|
||||||
import mage.abilities.effects.common.counter.AddCountersTargetEffect;
|
import mage.abilities.effects.common.counter.AddCountersTargetEffect;
|
||||||
import mage.abilities.keyword.DayboundAbility;
|
import mage.abilities.keyword.DayboundAbility;
|
||||||
import mage.abilities.keyword.HexproofAbility;
|
import mage.abilities.keyword.HexproofAbility;
|
||||||
|
import mage.abilities.keyword.NightboundAbility;
|
||||||
import mage.abilities.triggers.BeginningOfCombatTriggeredAbility;
|
import mage.abilities.triggers.BeginningOfCombatTriggeredAbility;
|
||||||
import mage.cards.CardImpl;
|
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
|
import mage.cards.TransformingDoubleFacedCard;
|
||||||
import mage.constants.CardType;
|
import mage.constants.CardType;
|
||||||
|
import mage.constants.Duration;
|
||||||
import mage.constants.SubType;
|
import mage.constants.SubType;
|
||||||
import mage.counters.CounterType;
|
import mage.counters.CounterType;
|
||||||
import mage.filter.StaticFilters;
|
import mage.filter.StaticFilters;
|
||||||
|
|
@ -19,29 +23,49 @@ import java.util.UUID;
|
||||||
/**
|
/**
|
||||||
* @author TheElk801
|
* @author TheElk801
|
||||||
*/
|
*/
|
||||||
public final class AvabruckCaretaker extends CardImpl {
|
public final class AvabruckCaretaker extends TransformingDoubleFacedCard {
|
||||||
|
|
||||||
public AvabruckCaretaker(UUID ownerId, CardSetInfo setInfo) {
|
public AvabruckCaretaker(UUID ownerId, CardSetInfo setInfo) {
|
||||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{G}{G}");
|
super(ownerId, setInfo,
|
||||||
|
new CardType[]{CardType.CREATURE}, new SubType[]{SubType.HUMAN, SubType.WEREWOLF}, "{4}{G}{G}",
|
||||||
this.subtype.add(SubType.HUMAN);
|
"Hollowhenge Huntmaster",
|
||||||
this.subtype.add(SubType.WEREWOLF);
|
new CardType[]{CardType.CREATURE}, new SubType[]{SubType.WEREWOLF}, "G");
|
||||||
this.power = new MageInt(4);
|
this.getLeftHalfCard().setPT(4, 4);
|
||||||
this.toughness = new MageInt(4);
|
this.getRightHalfCard().setPT(6, 6);
|
||||||
this.secondSideCardClazz = mage.cards.h.HollowhengeHuntmaster.class;
|
|
||||||
|
|
||||||
// Hexproof
|
// Hexproof
|
||||||
this.addAbility(HexproofAbility.getInstance());
|
this.getLeftHalfCard().addAbility(HexproofAbility.getInstance());
|
||||||
|
|
||||||
// At the beginning of combat on your turn, put two +1/+1 counters on another target creature you control.
|
// At the beginning of combat on your turn, put two +1/+1 counters on another target creature you control.
|
||||||
Ability ability = new BeginningOfCombatTriggeredAbility(
|
Ability ability = new BeginningOfCombatTriggeredAbility(
|
||||||
new AddCountersTargetEffect(CounterType.P1P1.createInstance(2))
|
new AddCountersTargetEffect(CounterType.P1P1.createInstance(2))
|
||||||
);
|
);
|
||||||
ability.addTarget(new TargetPermanent(StaticFilters.FILTER_ANOTHER_TARGET_CREATURE_YOU_CONTROL));
|
ability.addTarget(new TargetPermanent(StaticFilters.FILTER_ANOTHER_TARGET_CREATURE_YOU_CONTROL));
|
||||||
this.addAbility(ability);
|
this.getLeftHalfCard().addAbility(ability);
|
||||||
|
|
||||||
// Daybound
|
// Daybound
|
||||||
this.addAbility(new DayboundAbility());
|
this.getLeftHalfCard().addAbility(new DayboundAbility());
|
||||||
|
|
||||||
|
// Hollowhenge Huntmaster
|
||||||
|
// Hexproof
|
||||||
|
this.getRightHalfCard().addAbility(HexproofAbility.getInstance());
|
||||||
|
|
||||||
|
// Other permanents you control have hexproof.
|
||||||
|
this.getRightHalfCard().addAbility(new SimpleStaticAbility(new GainAbilityControlledEffect(
|
||||||
|
HexproofAbility.getInstance(), Duration.WhileOnBattlefield,
|
||||||
|
StaticFilters.FILTER_PERMANENTS, true
|
||||||
|
)));
|
||||||
|
|
||||||
|
// At the beginning of combat on your turn, put two +1/+1 counters on each creature you control.
|
||||||
|
this.getRightHalfCard().addAbility(new BeginningOfCombatTriggeredAbility(
|
||||||
|
new AddCountersAllEffect(
|
||||||
|
CounterType.P1P1.createInstance(2),
|
||||||
|
StaticFilters.FILTER_CONTROLLED_CREATURE
|
||||||
|
)
|
||||||
|
));
|
||||||
|
|
||||||
|
// Nightbound
|
||||||
|
this.getRightHalfCard().addAbility(new NightboundAbility());
|
||||||
}
|
}
|
||||||
|
|
||||||
private AvabruckCaretaker(final AvabruckCaretaker card) {
|
private AvabruckCaretaker(final AvabruckCaretaker card) {
|
||||||
|
|
|
||||||
|
|
@ -1,62 +0,0 @@
|
||||||
package mage.cards.a;
|
|
||||||
|
|
||||||
import mage.MageInt;
|
|
||||||
import mage.abilities.Ability;
|
|
||||||
import mage.abilities.common.TransformIntoSourceTriggeredAbility;
|
|
||||||
import mage.abilities.effects.common.DamageAllEffect;
|
|
||||||
import mage.abilities.effects.common.DamagePlayersEffect;
|
|
||||||
import mage.abilities.keyword.FlyingAbility;
|
|
||||||
import mage.cards.CardImpl;
|
|
||||||
import mage.cards.CardSetInfo;
|
|
||||||
import mage.constants.CardType;
|
|
||||||
import mage.constants.SubType;
|
|
||||||
import mage.constants.SuperType;
|
|
||||||
import mage.constants.TargetController;
|
|
||||||
import mage.filter.FilterPermanent;
|
|
||||||
import mage.filter.common.FilterCreaturePermanent;
|
|
||||||
import mage.filter.predicate.mageobject.AnotherPredicate;
|
|
||||||
|
|
||||||
import java.util.UUID;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author fireshoes
|
|
||||||
*/
|
|
||||||
public final class AvacynThePurifier extends CardImpl {
|
|
||||||
|
|
||||||
private static final FilterPermanent filter = new FilterCreaturePermanent("other creature");
|
|
||||||
|
|
||||||
static {
|
|
||||||
filter.add(AnotherPredicate.instance);
|
|
||||||
}
|
|
||||||
|
|
||||||
public AvacynThePurifier(UUID ownerId, CardSetInfo setInfo) {
|
|
||||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "");
|
|
||||||
this.supertype.add(SuperType.LEGENDARY);
|
|
||||||
this.subtype.add(SubType.ANGEL);
|
|
||||||
this.power = new MageInt(6);
|
|
||||||
this.toughness = new MageInt(5);
|
|
||||||
this.color.setRed(true);
|
|
||||||
|
|
||||||
// this card is the second face of double-faced card
|
|
||||||
this.nightCard = true;
|
|
||||||
|
|
||||||
// Flying
|
|
||||||
this.addAbility(FlyingAbility.getInstance());
|
|
||||||
|
|
||||||
// When this creature transforms into Avacyn, the Purifier, it deals 3 damage to each other creature and each opponent.
|
|
||||||
Ability ability = new TransformIntoSourceTriggeredAbility(
|
|
||||||
new DamageAllEffect(3, "it", filter)
|
|
||||||
);
|
|
||||||
ability.addEffect(new DamagePlayersEffect(3, TargetController.OPPONENT).setText("and each opponent"));
|
|
||||||
this.addAbility(ability);
|
|
||||||
}
|
|
||||||
|
|
||||||
private AvacynThePurifier(final AvacynThePurifier card) {
|
|
||||||
super(card);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public AvacynThePurifier copy() {
|
|
||||||
return new AvacynThePurifier(this);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,37 +1,43 @@
|
||||||
package mage.cards.a;
|
package mage.cards.a;
|
||||||
|
|
||||||
import java.util.UUID;
|
import mage.abilities.Ability;
|
||||||
|
import mage.abilities.common.TransformIntoSourceTriggeredAbility;
|
||||||
import mage.MageInt;
|
|
||||||
import mage.abilities.triggers.BeginningOfEndStepTriggeredAbility;
|
|
||||||
import mage.abilities.condition.common.EquippedSourceCondition;
|
import mage.abilities.condition.common.EquippedSourceCondition;
|
||||||
|
import mage.abilities.effects.common.ExileUntilSourceLeavesEffect;
|
||||||
import mage.abilities.effects.common.TransformSourceEffect;
|
import mage.abilities.effects.common.TransformSourceEffect;
|
||||||
import mage.abilities.keyword.TransformAbility;
|
import mage.abilities.triggers.BeginningOfEndStepTriggeredAbility;
|
||||||
import mage.cards.CardImpl;
|
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
|
import mage.cards.TransformingDoubleFacedCard;
|
||||||
import mage.constants.CardType;
|
import mage.constants.CardType;
|
||||||
import mage.constants.SubType;
|
import mage.constants.SubType;
|
||||||
import mage.constants.TargetController;
|
import mage.constants.TargetController;
|
||||||
|
import mage.filter.StaticFilters;
|
||||||
|
import mage.target.TargetPermanent;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author fireshoes
|
* @author fireshoes
|
||||||
*/
|
*/
|
||||||
public final class AvacynianMissionaries extends CardImpl {
|
public final class AvacynianMissionaries extends TransformingDoubleFacedCard {
|
||||||
|
|
||||||
public AvacynianMissionaries(UUID ownerId, CardSetInfo setInfo) {
|
public AvacynianMissionaries(UUID ownerId, CardSetInfo setInfo) {
|
||||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{W}");
|
super(ownerId, setInfo,
|
||||||
this.subtype.add(SubType.HUMAN);
|
new CardType[]{CardType.CREATURE}, new SubType[]{SubType.HUMAN, SubType.CLERIC}, "{3}{W}",
|
||||||
this.subtype.add(SubType.CLERIC);
|
"Lunarch Inquisitors",
|
||||||
this.power = new MageInt(3);
|
new CardType[]{CardType.CREATURE}, new SubType[]{SubType.HUMAN, SubType.CLERIC}, "W");
|
||||||
this.toughness = new MageInt(3);
|
this.getLeftHalfCard().setPT(3, 3);
|
||||||
|
this.getRightHalfCard().setPT(4, 4);
|
||||||
this.secondSideCardClazz = mage.cards.l.LunarchInquisitors.class;
|
|
||||||
|
|
||||||
// At the beginning of your end step, if Avacynian Missionaries is equipped, transform it.
|
// At the beginning of your end step, if Avacynian Missionaries is equipped, transform it.
|
||||||
this.addAbility(new TransformAbility());
|
this.getLeftHalfCard().addAbility(new BeginningOfEndStepTriggeredAbility(TargetController.YOU, new TransformSourceEffect().setText("transform it"),
|
||||||
this.addAbility(new BeginningOfEndStepTriggeredAbility(TargetController.YOU, new TransformSourceEffect().setText("transform it"),
|
|
||||||
false, EquippedSourceCondition.instance));
|
false, EquippedSourceCondition.instance));
|
||||||
|
|
||||||
|
// Lunarch Inquisitors
|
||||||
|
// When this creature transforms into Lunarch Inquisitors, you may exile another target creature until Lunarch Inquisitors leaves the battlefield.
|
||||||
|
Ability ability = new TransformIntoSourceTriggeredAbility(new ExileUntilSourceLeavesEffect(), true);
|
||||||
|
ability.addTarget(new TargetPermanent(StaticFilters.FILTER_ANOTHER_TARGET_CREATURE));
|
||||||
|
this.getRightHalfCard().addAbility(ability);
|
||||||
}
|
}
|
||||||
|
|
||||||
private AvacynianMissionaries(final AvacynianMissionaries card) {
|
private AvacynianMissionaries(final AvacynianMissionaries card) {
|
||||||
|
|
|
||||||
|
|
@ -65,7 +65,7 @@ public final class AvalancheOfSector7 extends CardImpl {
|
||||||
class AvalancheOfSector7TriggeredAbility extends TriggeredAbilityImpl {
|
class AvalancheOfSector7TriggeredAbility extends TriggeredAbilityImpl {
|
||||||
|
|
||||||
AvalancheOfSector7TriggeredAbility() {
|
AvalancheOfSector7TriggeredAbility() {
|
||||||
super(Zone.BATTLEFIELD, new DamageTargetEffect(1, true, "that player"));
|
super(Zone.BATTLEFIELD, new DamageTargetEffect(1).withTargetDescription("that player"));
|
||||||
setTriggerPhrase("Whenever an opponent activates an ability of an artifact they control, ");
|
setTriggerPhrase("Whenever an opponent activates an ability of an artifact they control, ");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,50 +1,80 @@
|
||||||
package mage.cards.a;
|
package mage.cards.a;
|
||||||
|
|
||||||
import mage.MageInt;
|
|
||||||
import mage.abilities.Ability;
|
import mage.abilities.Ability;
|
||||||
import mage.abilities.TriggeredAbilityImpl;
|
import mage.abilities.TriggeredAbilityImpl;
|
||||||
|
import mage.abilities.common.SimpleStaticAbility;
|
||||||
import mage.abilities.condition.Condition;
|
import mage.abilities.condition.Condition;
|
||||||
|
import mage.abilities.costs.Cost;
|
||||||
|
import mage.abilities.costs.CostImpl;
|
||||||
|
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||||
import mage.abilities.decorator.ConditionalOneShotEffect;
|
import mage.abilities.decorator.ConditionalOneShotEffect;
|
||||||
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
|
import mage.abilities.dynamicvalue.common.StaticValue;
|
||||||
import mage.abilities.effects.common.TransformSourceEffect;
|
import mage.abilities.effects.common.*;
|
||||||
|
import mage.abilities.effects.common.cost.SpellsCostReductionControllerEffect;
|
||||||
|
import mage.abilities.effects.common.counter.AddCountersSourceEffect;
|
||||||
import mage.abilities.keyword.FirebendingAbility;
|
import mage.abilities.keyword.FirebendingAbility;
|
||||||
import mage.abilities.keyword.FlyingAbility;
|
import mage.abilities.keyword.FlyingAbility;
|
||||||
import mage.cards.CardImpl;
|
import mage.abilities.triggers.BeginningOfUpkeepTriggeredAbility;
|
||||||
|
import mage.cards.Card;
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
|
import mage.cards.TransformingDoubleFacedCard;
|
||||||
import mage.constants.*;
|
import mage.constants.*;
|
||||||
|
import mage.counters.CounterType;
|
||||||
|
import mage.filter.FilterCard;
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
import mage.game.events.GameEvent;
|
import mage.game.events.GameEvent;
|
||||||
import mage.watchers.Watcher;
|
import mage.watchers.Watcher;
|
||||||
|
|
||||||
import java.util.HashSet;
|
import java.util.HashSet;
|
||||||
|
import java.util.Optional;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author TheElk801
|
* @author TheElk801
|
||||||
*/
|
*/
|
||||||
public final class AvatarAang extends CardImpl {
|
public final class AvatarAang extends TransformingDoubleFacedCard {
|
||||||
|
|
||||||
|
private static final FilterCard filter = new FilterCard("spells");
|
||||||
|
|
||||||
public AvatarAang(UUID ownerId, CardSetInfo setInfo) {
|
public AvatarAang(UUID ownerId, CardSetInfo setInfo) {
|
||||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{R}{G}{W}{U}");
|
super(ownerId, setInfo,
|
||||||
|
new SuperType[]{SuperType.LEGENDARY}, new CardType[]{CardType.CREATURE}, new SubType[]{SubType.HUMAN, SubType.AVATAR, SubType.ALLY}, "{R}{G}{W}{U}",
|
||||||
|
"Aang, Master of Elements",
|
||||||
|
new SuperType[]{SuperType.LEGENDARY}, new CardType[]{CardType.CREATURE}, new SubType[]{SubType.AVATAR, SubType.ALLY}, "");
|
||||||
|
|
||||||
this.supertype.add(SuperType.LEGENDARY);
|
this.getLeftHalfCard().setPT(4, 4);
|
||||||
this.subtype.add(SubType.HUMAN);
|
this.getRightHalfCard().setPT(6, 6);
|
||||||
this.subtype.add(SubType.AVATAR);
|
|
||||||
this.subtype.add(SubType.ALLY);
|
|
||||||
this.power = new MageInt(4);
|
|
||||||
this.toughness = new MageInt(4);
|
|
||||||
|
|
||||||
this.secondSideCardClazz = mage.cards.a.AangMasterOfElements.class;
|
|
||||||
|
|
||||||
// Flying
|
// Flying
|
||||||
this.addAbility(FlyingAbility.getInstance());
|
this.getLeftHalfCard().addAbility(FlyingAbility.getInstance());
|
||||||
|
|
||||||
// Firebending 2
|
// Firebending 2
|
||||||
this.addAbility(new FirebendingAbility(2));
|
this.getLeftHalfCard().addAbility(new FirebendingAbility(2));
|
||||||
|
|
||||||
// Whenever you waterbend, earthbend, firebend, or airbend, draw a card. Then if you've done all four this turn, transform Avatar Aang.
|
// Whenever you waterbend, earthbend, firebend, or airbend, draw a card. Then if you've done all four this turn, transform Avatar Aang.
|
||||||
this.addAbility(new AvatarAangTriggeredAbility());
|
this.getLeftHalfCard().addAbility(new AvatarAangTriggeredAbility());
|
||||||
|
|
||||||
|
// Aang, Master of Elements
|
||||||
|
// Flying
|
||||||
|
this.getRightHalfCard().addAbility(FlyingAbility.getInstance());
|
||||||
|
|
||||||
|
// Spells you cast cost {W}{U}{B}{R}{G} less to cast.
|
||||||
|
this.getRightHalfCard().addAbility(new SimpleStaticAbility(new SpellsCostReductionControllerEffect(
|
||||||
|
filter, new ManaCostsImpl<>("{W}{U}{B}{R}{G}"), StaticValue.get(1), true
|
||||||
|
)));
|
||||||
|
|
||||||
|
// At the beginning of each upkeep, you may transform Aang, Master of Elements. If you do, you gain 4 life, draw four cards, put four +1/+1 counters on him, and he deals 4 damage to each opponent.
|
||||||
|
this.getRightHalfCard().addAbility(new BeginningOfUpkeepTriggeredAbility(
|
||||||
|
TargetController.ANY,
|
||||||
|
new DoIfCostPaid(new GainLifeEffect(4), new AangMasterOfElementsCost())
|
||||||
|
.addEffect(new DrawCardSourceControllerEffect(4).concatBy(","))
|
||||||
|
.addEffect(new AddCountersSourceEffect(CounterType.P1P1.createInstance(4))
|
||||||
|
.setText(", put four +1/+1 counters on him"))
|
||||||
|
.addEffect(new DamagePlayersEffect(4, TargetController.OPPONENT)
|
||||||
|
.setText(", and he deals 4 damage to each opponent")),
|
||||||
|
false
|
||||||
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
private AvatarAang(final AvatarAang card) {
|
private AvatarAang(final AvatarAang card) {
|
||||||
|
|
@ -154,3 +184,37 @@ class AvatarAangWatcher extends Watcher {
|
||||||
return game.getState().getWatcher(AvatarAangWatcher.class).checkPlayer(source.getControllerId());
|
return game.getState().getWatcher(AvatarAangWatcher.class).checkPlayer(source.getControllerId());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
class AangMasterOfElementsCost extends CostImpl {
|
||||||
|
|
||||||
|
AangMasterOfElementsCost() {
|
||||||
|
super();
|
||||||
|
text = "transform {this}";
|
||||||
|
}
|
||||||
|
|
||||||
|
private AangMasterOfElementsCost(final AangMasterOfElementsCost cost) {
|
||||||
|
super(cost);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public AangMasterOfElementsCost copy() {
|
||||||
|
return new AangMasterOfElementsCost(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean canPay(Ability ability, Ability source, UUID controllerId, Game game) {
|
||||||
|
return Optional
|
||||||
|
.ofNullable(source.getSourcePermanentIfItStillExists(game))
|
||||||
|
.filter(Card::isTransformable)
|
||||||
|
.isPresent();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean pay(Ability ability, Game game, Ability source, UUID controllerId, boolean noMana, Cost costToPay) {
|
||||||
|
paid = Optional
|
||||||
|
.ofNullable(source.getSourcePermanentIfItStillExists(game))
|
||||||
|
.filter(permanent -> permanent.transform(source, game))
|
||||||
|
.isPresent();
|
||||||
|
return paid;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
||||||
110
Mage.Sets/src/mage/cards/a/AvatarDestiny.java
Normal file
110
Mage.Sets/src/mage/cards/a/AvatarDestiny.java
Normal file
|
|
@ -0,0 +1,110 @@
|
||||||
|
package mage.cards.a;
|
||||||
|
|
||||||
|
import mage.MageInt;
|
||||||
|
import mage.MageObject;
|
||||||
|
import mage.abilities.Ability;
|
||||||
|
import mage.abilities.common.DiesAttachedTriggeredAbility;
|
||||||
|
import mage.abilities.common.SimpleStaticAbility;
|
||||||
|
import mage.abilities.dynamicvalue.DynamicValue;
|
||||||
|
import mage.abilities.dynamicvalue.common.CardsInControllerGraveyardCount;
|
||||||
|
import mage.abilities.effects.OneShotEffect;
|
||||||
|
import mage.abilities.effects.common.AttachEffect;
|
||||||
|
import mage.abilities.effects.common.ReturnToHandSourceEffect;
|
||||||
|
import mage.abilities.effects.common.continuous.AddCardSubtypeAttachedEffect;
|
||||||
|
import mage.abilities.effects.common.continuous.BoostEnchantedEffect;
|
||||||
|
import mage.abilities.keyword.EnchantAbility;
|
||||||
|
import mage.cards.CardImpl;
|
||||||
|
import mage.cards.CardSetInfo;
|
||||||
|
import mage.cards.Cards;
|
||||||
|
import mage.constants.*;
|
||||||
|
import mage.filter.StaticFilters;
|
||||||
|
import mage.game.Game;
|
||||||
|
import mage.game.permanent.Permanent;
|
||||||
|
import mage.players.Player;
|
||||||
|
import mage.target.TargetCard;
|
||||||
|
import mage.target.TargetPermanent;
|
||||||
|
import mage.target.common.TargetControlledCreaturePermanent;
|
||||||
|
|
||||||
|
import java.util.Optional;
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author TheElk801
|
||||||
|
*/
|
||||||
|
public final class AvatarDestiny extends CardImpl {
|
||||||
|
|
||||||
|
private static final DynamicValue xValue = new CardsInControllerGraveyardCount(StaticFilters.FILTER_CARD_CREATURE);
|
||||||
|
|
||||||
|
public AvatarDestiny(UUID ownerId, CardSetInfo setInfo) {
|
||||||
|
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{G}{G}");
|
||||||
|
|
||||||
|
this.subtype.add(SubType.AURA);
|
||||||
|
|
||||||
|
// Enchant creature you control
|
||||||
|
TargetPermanent auraTarget = new TargetControlledCreaturePermanent();
|
||||||
|
this.getSpellAbility().addTarget(auraTarget);
|
||||||
|
this.getSpellAbility().addEffect(new AttachEffect(Outcome.BoostCreature));
|
||||||
|
this.addAbility(new EnchantAbility(auraTarget));
|
||||||
|
|
||||||
|
// Enchanted creature gets +1/+1 for each creature card in your graveyard and is an Avatar in addition to its other types.
|
||||||
|
Ability ability = new SimpleStaticAbility(new BoostEnchantedEffect(xValue, xValue));
|
||||||
|
ability.addEffect(new AddCardSubtypeAttachedEffect(
|
||||||
|
SubType.AVATAR, AttachmentType.AURA
|
||||||
|
).setText("and is an Avatar in addition to its other types"));
|
||||||
|
this.addAbility(ability);
|
||||||
|
|
||||||
|
// When enchanted creature dies, mill cards equal to its power. Return this card to its owner's hand and up to one creature card milled this way to the battlefield under your control.
|
||||||
|
this.addAbility(new DiesAttachedTriggeredAbility(new AvatarDestinyEffect(), "enchanted creature"));
|
||||||
|
}
|
||||||
|
|
||||||
|
private AvatarDestiny(final AvatarDestiny card) {
|
||||||
|
super(card);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public AvatarDestiny copy() {
|
||||||
|
return new AvatarDestiny(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class AvatarDestinyEffect extends OneShotEffect {
|
||||||
|
|
||||||
|
AvatarDestinyEffect() {
|
||||||
|
super(Outcome.Benefit);
|
||||||
|
staticText = "mill cards equal to its power. Return this card to its owner's hand and up to one " +
|
||||||
|
"creature card milled this way to the battlefield under your control";
|
||||||
|
}
|
||||||
|
|
||||||
|
private AvatarDestinyEffect(final AvatarDestinyEffect effect) {
|
||||||
|
super(effect);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public AvatarDestinyEffect copy() {
|
||||||
|
return new AvatarDestinyEffect(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean apply(Game game, Ability source) {
|
||||||
|
Player player = game.getPlayer(source.getControllerId());
|
||||||
|
if (player == null) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
int count = Optional
|
||||||
|
.ofNullable((Permanent) getValue("attachedTo"))
|
||||||
|
.map(MageObject::getPower)
|
||||||
|
.map(MageInt::getValue)
|
||||||
|
.orElse(0);
|
||||||
|
Cards cards = player.millCards(count, source, game);
|
||||||
|
game.processAction();
|
||||||
|
new ReturnToHandSourceEffect(false, true).apply(game, source);
|
||||||
|
TargetCard target = new TargetCard(0, 1, Zone.ALL, StaticFilters.FILTER_CARD_CREATURE);
|
||||||
|
target.withNotTarget(true);
|
||||||
|
player.choose(Outcome.PutCreatureInPlay, cards, target, source, game);
|
||||||
|
player.moveCards(
|
||||||
|
game.getCard(target.getFirstTarget()), Zone.BATTLEFIELD, source,
|
||||||
|
game, true, false, false, null
|
||||||
|
);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -41,7 +41,7 @@ public final class AvatarKyoshiEarthbender extends CardImpl {
|
||||||
)));
|
)));
|
||||||
|
|
||||||
// At the beginning of combat on your turn, earthbend 8, then untap that land.
|
// At the beginning of combat on your turn, earthbend 8, then untap that land.
|
||||||
Ability ability = new BeginningOfCombatTriggeredAbility(new EarthbendTargetEffect(8));
|
Ability ability = new BeginningOfCombatTriggeredAbility(new EarthbendTargetEffect(8, false));
|
||||||
ability.addEffect(new UntapTargetEffect().setText(", then untap that land"));
|
ability.addEffect(new UntapTargetEffect().setText(", then untap that land"));
|
||||||
ability.addTarget(new TargetControlledLandPermanent());
|
ability.addTarget(new TargetControlledLandPermanent());
|
||||||
this.addAbility(ability);
|
this.addAbility(ability);
|
||||||
|
|
|
||||||
57
Mage.Sets/src/mage/cards/a/AvatarYangchen.java
Normal file
57
Mage.Sets/src/mage/cards/a/AvatarYangchen.java
Normal file
|
|
@ -0,0 +1,57 @@
|
||||||
|
package mage.cards.a;
|
||||||
|
|
||||||
|
import mage.MageInt;
|
||||||
|
import mage.abilities.Ability;
|
||||||
|
import mage.abilities.common.CastSecondSpellTriggeredAbility;
|
||||||
|
import mage.abilities.effects.keyword.AirbendTargetEffect;
|
||||||
|
import mage.abilities.keyword.FlyingAbility;
|
||||||
|
import mage.cards.CardImpl;
|
||||||
|
import mage.cards.CardSetInfo;
|
||||||
|
import mage.constants.CardType;
|
||||||
|
import mage.constants.SubType;
|
||||||
|
import mage.constants.SuperType;
|
||||||
|
import mage.filter.FilterPermanent;
|
||||||
|
import mage.filter.common.FilterNonlandPermanent;
|
||||||
|
import mage.filter.predicate.mageobject.AnotherPredicate;
|
||||||
|
import mage.target.TargetPermanent;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author TheElk801
|
||||||
|
*/
|
||||||
|
public final class AvatarYangchen extends CardImpl {
|
||||||
|
|
||||||
|
private static final FilterPermanent filter = new FilterNonlandPermanent("other target nonland permanent");
|
||||||
|
|
||||||
|
static {
|
||||||
|
filter.add(AnotherPredicate.instance);
|
||||||
|
}
|
||||||
|
|
||||||
|
public AvatarYangchen(UUID ownerId, CardSetInfo setInfo) {
|
||||||
|
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "");
|
||||||
|
|
||||||
|
this.supertype.add(SuperType.LEGENDARY);
|
||||||
|
this.subtype.add(SubType.AVATAR);
|
||||||
|
this.power = new MageInt(4);
|
||||||
|
this.toughness = new MageInt(5);
|
||||||
|
this.nightCard = true;
|
||||||
|
|
||||||
|
// Flying
|
||||||
|
this.addAbility(FlyingAbility.getInstance());
|
||||||
|
|
||||||
|
// Whenever you cast your second spell each turn, airbend up to one other target nonland permanent.
|
||||||
|
Ability ability = new CastSecondSpellTriggeredAbility(new AirbendTargetEffect());
|
||||||
|
ability.addTarget(new TargetPermanent(0, 1, filter));
|
||||||
|
this.addAbility(ability);
|
||||||
|
}
|
||||||
|
|
||||||
|
private AvatarYangchen(final AvatarYangchen card) {
|
||||||
|
super(card);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public AvatarYangchen copy() {
|
||||||
|
return new AvatarYangchen(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -1,34 +0,0 @@
|
||||||
package mage.cards.a;
|
|
||||||
|
|
||||||
import mage.MageInt;
|
|
||||||
import mage.cards.CardImpl;
|
|
||||||
import mage.cards.CardSetInfo;
|
|
||||||
import mage.constants.CardType;
|
|
||||||
import mage.constants.SubType;
|
|
||||||
|
|
||||||
import java.util.UUID;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author TheElk801
|
|
||||||
*/
|
|
||||||
public final class AwokenDemon extends CardImpl {
|
|
||||||
|
|
||||||
public AwokenDemon(UUID ownerId, CardSetInfo setInfo) {
|
|
||||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "");
|
|
||||||
|
|
||||||
this.subtype.add(SubType.DEMON);
|
|
||||||
this.power = new MageInt(4);
|
|
||||||
this.toughness = new MageInt(4);
|
|
||||||
this.color.setBlack(true);
|
|
||||||
this.nightCard = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
private AwokenDemon(final AwokenDemon card) {
|
|
||||||
super(card);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public AwokenDemon copy() {
|
|
||||||
return new AwokenDemon(this);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,109 +0,0 @@
|
||||||
package mage.cards.a;
|
|
||||||
|
|
||||||
import mage.MageInt;
|
|
||||||
import mage.abilities.Ability;
|
|
||||||
import mage.abilities.triggers.BeginningOfCombatTriggeredAbility;
|
|
||||||
import mage.abilities.common.delayed.AtTheBeginOfNextEndStepDelayedTriggeredAbility;
|
|
||||||
import mage.abilities.effects.OneShotEffect;
|
|
||||||
import mage.abilities.effects.common.ExileTargetEffect;
|
|
||||||
import mage.abilities.effects.common.continuous.GainAbilityTargetEffect;
|
|
||||||
import mage.abilities.keyword.HasteAbility;
|
|
||||||
import mage.cards.Card;
|
|
||||||
import mage.cards.CardImpl;
|
|
||||||
import mage.cards.CardSetInfo;
|
|
||||||
import mage.constants.*;
|
|
||||||
import mage.filter.FilterCard;
|
|
||||||
import mage.filter.predicate.Predicates;
|
|
||||||
import mage.game.Game;
|
|
||||||
import mage.game.permanent.Permanent;
|
|
||||||
import mage.players.Player;
|
|
||||||
import mage.target.common.TargetCardInYourGraveyard;
|
|
||||||
import mage.target.targetpointer.FixedTarget;
|
|
||||||
import mage.util.CardUtil;
|
|
||||||
|
|
||||||
import java.util.UUID;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author TheElk801
|
|
||||||
*/
|
|
||||||
public final class AyaraFurnaceQueen extends CardImpl {
|
|
||||||
|
|
||||||
private static final FilterCard filter = new FilterCard("artifact or creature card from your graveyard");
|
|
||||||
|
|
||||||
static {
|
|
||||||
filter.add(Predicates.or(
|
|
||||||
CardType.ARTIFACT.getPredicate(),
|
|
||||||
CardType.CREATURE.getPredicate()
|
|
||||||
));
|
|
||||||
}
|
|
||||||
|
|
||||||
public AyaraFurnaceQueen(UUID ownerId, CardSetInfo setInfo) {
|
|
||||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "");
|
|
||||||
|
|
||||||
this.supertype.add(SuperType.LEGENDARY);
|
|
||||||
this.subtype.add(SubType.PHYREXIAN);
|
|
||||||
this.subtype.add(SubType.ELF);
|
|
||||||
this.subtype.add(SubType.NOBLE);
|
|
||||||
this.power = new MageInt(4);
|
|
||||||
this.toughness = new MageInt(4);
|
|
||||||
this.color.setBlack(true);
|
|
||||||
this.color.setRed(true);
|
|
||||||
this.nightCard = true;
|
|
||||||
|
|
||||||
// At the beginning of combat on your turn, return up to one target artifact or creature card from your graveyard to the battlefield. It gains haste. Exile it at the beginning of the next end step.
|
|
||||||
Ability ability = new BeginningOfCombatTriggeredAbility(
|
|
||||||
new AyaraFurnaceQueenEffect()
|
|
||||||
);
|
|
||||||
ability.addTarget(new TargetCardInYourGraveyard(0, 1, filter));
|
|
||||||
this.addAbility(ability);
|
|
||||||
}
|
|
||||||
|
|
||||||
private AyaraFurnaceQueen(final AyaraFurnaceQueen card) {
|
|
||||||
super(card);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public AyaraFurnaceQueen copy() {
|
|
||||||
return new AyaraFurnaceQueen(this);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
class AyaraFurnaceQueenEffect extends OneShotEffect {
|
|
||||||
|
|
||||||
AyaraFurnaceQueenEffect() {
|
|
||||||
super(Outcome.Benefit);
|
|
||||||
staticText = "return up to one target artifact or creature card from your graveyard " +
|
|
||||||
"to the battlefield. It gains haste. Exile it at the beginning of the next end step";
|
|
||||||
}
|
|
||||||
|
|
||||||
private AyaraFurnaceQueenEffect(final AyaraFurnaceQueenEffect effect) {
|
|
||||||
super(effect);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public AyaraFurnaceQueenEffect copy() {
|
|
||||||
return new AyaraFurnaceQueenEffect(this);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean apply(Game game, Ability source) {
|
|
||||||
Player player = game.getPlayer(source.getControllerId());
|
|
||||||
Card card = game.getCard(getTargetPointer().getFirst(game, source));
|
|
||||||
if (player == null || card == null) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
Permanent permanent = CardUtil.getPermanentFromCardPutToBattlefield(card, game);
|
|
||||||
if (permanent == null) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
game.addEffect(new GainAbilityTargetEffect(
|
|
||||||
HasteAbility.getInstance(), Duration.Custom
|
|
||||||
).setTargetPointer(new FixedTarget(permanent.getId(), game)), source);
|
|
||||||
game.addDelayedTriggeredAbility(new AtTheBeginOfNextEndStepDelayedTriggeredAbility(
|
|
||||||
new ExileTargetEffect().setText("exile it")
|
|
||||||
.setTargetPointer(new FixedTarget(permanent.getId(), game)),
|
|
||||||
TargetController.ANY
|
|
||||||
), source);
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,49 +1,66 @@
|
||||||
package mage.cards.a;
|
package mage.cards.a;
|
||||||
|
|
||||||
import mage.MageInt;
|
|
||||||
import mage.abilities.Ability;
|
import mage.abilities.Ability;
|
||||||
import mage.abilities.common.ActivateAsSorceryActivatedAbility;
|
import mage.abilities.common.ActivateAsSorceryActivatedAbility;
|
||||||
import mage.abilities.common.SimpleActivatedAbility;
|
import mage.abilities.common.SimpleActivatedAbility;
|
||||||
|
import mage.abilities.common.delayed.AtTheBeginOfNextEndStepDelayedTriggeredAbility;
|
||||||
import mage.abilities.costs.common.SacrificeTargetCost;
|
import mage.abilities.costs.common.SacrificeTargetCost;
|
||||||
import mage.abilities.costs.common.TapSourceCost;
|
import mage.abilities.costs.common.TapSourceCost;
|
||||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||||
import mage.abilities.dynamicvalue.DynamicValue;
|
import mage.abilities.dynamicvalue.DynamicValue;
|
||||||
import mage.abilities.dynamicvalue.common.SacrificeCostManaValue;
|
import mage.abilities.dynamicvalue.common.SacrificeCostManaValue;
|
||||||
|
import mage.abilities.effects.OneShotEffect;
|
||||||
import mage.abilities.effects.common.DamageTargetEffect;
|
import mage.abilities.effects.common.DamageTargetEffect;
|
||||||
|
import mage.abilities.effects.common.ExileTargetEffect;
|
||||||
import mage.abilities.effects.common.GainLifeEffect;
|
import mage.abilities.effects.common.GainLifeEffect;
|
||||||
import mage.abilities.effects.common.TransformSourceEffect;
|
import mage.abilities.effects.common.TransformSourceEffect;
|
||||||
import mage.abilities.keyword.TransformAbility;
|
import mage.abilities.effects.common.continuous.GainAbilityTargetEffect;
|
||||||
import mage.cards.CardImpl;
|
import mage.abilities.keyword.HasteAbility;
|
||||||
|
import mage.abilities.triggers.BeginningOfCombatTriggeredAbility;
|
||||||
|
import mage.cards.Card;
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
import mage.constants.CardType;
|
import mage.cards.TransformingDoubleFacedCard;
|
||||||
import mage.constants.SubType;
|
import mage.constants.*;
|
||||||
import mage.constants.SuperType;
|
import mage.filter.FilterCard;
|
||||||
import mage.filter.FilterOpponent;
|
import mage.filter.FilterOpponent;
|
||||||
import mage.filter.StaticFilters;
|
import mage.filter.StaticFilters;
|
||||||
import mage.filter.common.FilterPermanentOrPlayer;
|
import mage.filter.common.FilterPermanentOrPlayer;
|
||||||
|
import mage.filter.predicate.Predicates;
|
||||||
|
import mage.game.Game;
|
||||||
|
import mage.game.permanent.Permanent;
|
||||||
|
import mage.players.Player;
|
||||||
|
import mage.target.common.TargetCardInYourGraveyard;
|
||||||
import mage.target.common.TargetPermanentOrPlayer;
|
import mage.target.common.TargetPermanentOrPlayer;
|
||||||
|
import mage.target.targetpointer.FixedTarget;
|
||||||
|
import mage.util.CardUtil;
|
||||||
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author TheElk801
|
* @author TheElk801
|
||||||
*/
|
*/
|
||||||
public final class AyaraWidowOfTheRealm extends CardImpl {
|
public final class AyaraWidowOfTheRealm extends TransformingDoubleFacedCard {
|
||||||
|
|
||||||
private static final DynamicValue xValue = SacrificeCostManaValue.PERMANENT;
|
private static final DynamicValue xValue = SacrificeCostManaValue.PERMANENT;
|
||||||
private static final FilterPermanentOrPlayer filter = new FilterPermanentOrPlayer(
|
private static final FilterPermanentOrPlayer filter = new FilterPermanentOrPlayer(
|
||||||
"opponent or battle", StaticFilters.FILTER_PERMANENT_BATTLE, new FilterOpponent()
|
"opponent or battle", StaticFilters.FILTER_PERMANENT_BATTLE, new FilterOpponent()
|
||||||
);
|
);
|
||||||
|
private static final FilterCard furnaceQueenFilter = new FilterCard("artifact or creature card from your graveyard");
|
||||||
|
|
||||||
|
static {
|
||||||
|
furnaceQueenFilter.add(Predicates.or(
|
||||||
|
CardType.ARTIFACT.getPredicate(),
|
||||||
|
CardType.CREATURE.getPredicate()
|
||||||
|
));
|
||||||
|
}
|
||||||
|
|
||||||
public AyaraWidowOfTheRealm(UUID ownerId, CardSetInfo setInfo) {
|
public AyaraWidowOfTheRealm(UUID ownerId, CardSetInfo setInfo) {
|
||||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{B}{B}");
|
super(ownerId, setInfo,
|
||||||
|
new SuperType[]{SuperType.LEGENDARY}, new CardType[]{CardType.CREATURE}, new SubType[]{SubType.ELF, SubType.NOBLE}, "{1}{B}{B}",
|
||||||
this.supertype.add(SuperType.LEGENDARY);
|
"Ayara, Furnace Queen",
|
||||||
this.subtype.add(SubType.ELF);
|
new SuperType[]{SuperType.LEGENDARY}, new CardType[]{CardType.CREATURE}, new SubType[]{SubType.PHYREXIAN, SubType.ELF, SubType.NOBLE}, "BR");
|
||||||
this.subtype.add(SubType.NOBLE);
|
this.getLeftHalfCard().setPT(3, 3);
|
||||||
this.power = new MageInt(3);
|
this.getRightHalfCard().setPT(4, 4);
|
||||||
this.toughness = new MageInt(3);
|
|
||||||
this.secondSideCardClazz = mage.cards.a.AyaraFurnaceQueen.class;
|
|
||||||
|
|
||||||
// {T}, Sacrifice another creature or artifact: Ayara, Widow of the Realm deals X damage to target opponent or battle and you gain X life, where X is the sacrificed permanent's mana value.
|
// {T}, Sacrifice another creature or artifact: Ayara, Widow of the Realm deals X damage to target opponent or battle and you gain X life, where X is the sacrificed permanent's mana value.
|
||||||
Ability ability = new SimpleActivatedAbility(new DamageTargetEffect(xValue)
|
Ability ability = new SimpleActivatedAbility(new DamageTargetEffect(xValue)
|
||||||
|
|
@ -51,11 +68,18 @@ public final class AyaraWidowOfTheRealm extends CardImpl {
|
||||||
ability.addCost(new SacrificeTargetCost(StaticFilters.FILTER_CONTROLLED_ANOTHER_CREATURE_OR_ARTIFACT));
|
ability.addCost(new SacrificeTargetCost(StaticFilters.FILTER_CONTROLLED_ANOTHER_CREATURE_OR_ARTIFACT));
|
||||||
ability.addEffect(new GainLifeEffect(xValue).setText("and you gain X life, where X is the sacrificed permanent's mana value"));
|
ability.addEffect(new GainLifeEffect(xValue).setText("and you gain X life, where X is the sacrificed permanent's mana value"));
|
||||||
ability.addTarget(new TargetPermanentOrPlayer(filter));
|
ability.addTarget(new TargetPermanentOrPlayer(filter));
|
||||||
this.addAbility(ability);
|
this.getLeftHalfCard().addAbility(ability);
|
||||||
|
|
||||||
// {5}{R/P}: Transform Ayara. Activate only as a sorcery.
|
// {5}{R/P}: Transform Ayara. Activate only as a sorcery.
|
||||||
this.addAbility(new TransformAbility());
|
this.getLeftHalfCard().addAbility(new ActivateAsSorceryActivatedAbility(new TransformSourceEffect(), new ManaCostsImpl<>("{5}{R/P}")));
|
||||||
this.addAbility(new ActivateAsSorceryActivatedAbility(new TransformSourceEffect(), new ManaCostsImpl<>("{5}{R/P}")));
|
|
||||||
|
// Ayara, Furnace Queen
|
||||||
|
// At the beginning of combat on your turn, return up to one target artifact or creature card from your graveyard to the battlefield. It gains haste. Exile it at the beginning of the next end step.
|
||||||
|
Ability triggeredAbility = new BeginningOfCombatTriggeredAbility(
|
||||||
|
new AyaraFurnaceQueenEffect()
|
||||||
|
);
|
||||||
|
triggeredAbility.addTarget(new TargetCardInYourGraveyard(0, 1, furnaceQueenFilter));
|
||||||
|
this.getRightHalfCard().addAbility(triggeredAbility);
|
||||||
}
|
}
|
||||||
|
|
||||||
private AyaraWidowOfTheRealm(final AyaraWidowOfTheRealm card) {
|
private AyaraWidowOfTheRealm(final AyaraWidowOfTheRealm card) {
|
||||||
|
|
@ -67,3 +91,43 @@ public final class AyaraWidowOfTheRealm extends CardImpl {
|
||||||
return new AyaraWidowOfTheRealm(this);
|
return new AyaraWidowOfTheRealm(this);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
class AyaraFurnaceQueenEffect extends OneShotEffect {
|
||||||
|
|
||||||
|
AyaraFurnaceQueenEffect() {
|
||||||
|
super(Outcome.Benefit);
|
||||||
|
staticText = "return up to one target artifact or creature card from your graveyard " +
|
||||||
|
"to the battlefield. It gains haste. Exile it at the beginning of the next end step";
|
||||||
|
}
|
||||||
|
|
||||||
|
private AyaraFurnaceQueenEffect(final AyaraFurnaceQueenEffect effect) {
|
||||||
|
super(effect);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public AyaraFurnaceQueenEffect copy() {
|
||||||
|
return new AyaraFurnaceQueenEffect(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean apply(Game game, Ability source) {
|
||||||
|
Player player = game.getPlayer(source.getControllerId());
|
||||||
|
Card card = game.getCard(getTargetPointer().getFirst(game, source));
|
||||||
|
if (player == null || card == null) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
Permanent permanent = CardUtil.getPermanentFromCardPutToBattlefield(card, game);
|
||||||
|
if (permanent == null) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
game.addEffect(new GainAbilityTargetEffect(
|
||||||
|
HasteAbility.getInstance(), Duration.Custom
|
||||||
|
).setTargetPointer(new FixedTarget(permanent.getId(), game)), source);
|
||||||
|
game.addDelayedTriggeredAbility(new AtTheBeginOfNextEndStepDelayedTriggeredAbility(
|
||||||
|
new ExileTargetEffect().setText("exile it")
|
||||||
|
.setTargetPointer(new FixedTarget(permanent.getId(), game)),
|
||||||
|
TargetController.ANY
|
||||||
|
), source);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,23 +1,26 @@
|
||||||
package mage.cards.a;
|
package mage.cards.a;
|
||||||
|
|
||||||
import mage.MageObject;
|
import mage.MageObject;
|
||||||
|
import mage.Mana;
|
||||||
import mage.abilities.Ability;
|
import mage.abilities.Ability;
|
||||||
import mage.abilities.common.SimpleActivatedAbility;
|
import mage.abilities.common.SimpleActivatedAbility;
|
||||||
import mage.abilities.condition.Condition;
|
import mage.abilities.condition.Condition;
|
||||||
import mage.abilities.costs.common.TapSourceCost;
|
import mage.abilities.costs.common.TapSourceCost;
|
||||||
import mage.abilities.costs.mana.GenericManaCost;
|
import mage.abilities.costs.mana.GenericManaCost;
|
||||||
import mage.abilities.decorator.ConditionalOneShotEffect;
|
import mage.abilities.decorator.ConditionalOneShotEffect;
|
||||||
|
import mage.abilities.dynamicvalue.common.ControllerLifeCount;
|
||||||
import mage.abilities.effects.OneShotEffect;
|
import mage.abilities.effects.OneShotEffect;
|
||||||
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
|
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
|
||||||
import mage.abilities.effects.common.GainLifeEffect;
|
import mage.abilities.effects.common.GainLifeEffect;
|
||||||
import mage.abilities.effects.common.TransformSourceEffect;
|
import mage.abilities.effects.common.TransformSourceEffect;
|
||||||
import mage.abilities.effects.common.UntapSourceEffect;
|
import mage.abilities.effects.common.UntapSourceEffect;
|
||||||
import mage.abilities.keyword.TransformAbility;
|
import mage.abilities.mana.DynamicManaAbility;
|
||||||
import mage.cards.Card;
|
import mage.cards.Card;
|
||||||
import mage.cards.CardImpl;
|
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
|
import mage.cards.TransformingDoubleFacedCard;
|
||||||
import mage.constants.CardType;
|
import mage.constants.CardType;
|
||||||
import mage.constants.Outcome;
|
import mage.constants.Outcome;
|
||||||
|
import mage.constants.SubType;
|
||||||
import mage.constants.SuperType;
|
import mage.constants.SuperType;
|
||||||
import mage.game.ExileZone;
|
import mage.game.ExileZone;
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
|
|
@ -31,18 +34,17 @@ import java.util.UUID;
|
||||||
/**
|
/**
|
||||||
* @author LevelX2
|
* @author LevelX2
|
||||||
*/
|
*/
|
||||||
public final class AzorsGateway extends CardImpl {
|
public final class AzorsGateway extends TransformingDoubleFacedCard {
|
||||||
|
|
||||||
public AzorsGateway(UUID ownerId, CardSetInfo setInfo) {
|
public AzorsGateway(UUID ownerId, CardSetInfo setInfo) {
|
||||||
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{2}");
|
super(ownerId, setInfo,
|
||||||
|
new SuperType[]{SuperType.LEGENDARY}, new CardType[]{CardType.ARTIFACT}, new SubType[]{}, "{2}",
|
||||||
this.supertype.add(SuperType.LEGENDARY);
|
"Sanctum of the Sun",
|
||||||
this.secondSideCardClazz = mage.cards.s.SanctumOfTheSun.class;
|
new SuperType[]{SuperType.LEGENDARY}, new CardType[]{CardType.LAND}, new SubType[]{}, "");
|
||||||
|
|
||||||
// {1}, {T}: Draw a card, then exile a card from your hand.
|
// {1}, {T}: Draw a card, then exile a card from your hand.
|
||||||
// If cards with five or more different converted mana costs are exiled with Azor's Gateway,
|
// If cards with five or more different converted mana costs are exiled with Azor's Gateway,
|
||||||
// you gain 5 life, untap Azor's Gateway, and transform it.
|
// you gain 5 life, untap Azor's Gateway, and transform it.
|
||||||
this.addAbility(new TransformAbility());
|
|
||||||
Ability ability = new SimpleActivatedAbility(new DrawCardSourceControllerEffect(1), new GenericManaCost(1));
|
Ability ability = new SimpleActivatedAbility(new DrawCardSourceControllerEffect(1), new GenericManaCost(1));
|
||||||
ability.addCost(new TapSourceCost());
|
ability.addCost(new TapSourceCost());
|
||||||
ability.addEffect(new AzorsGatewayEffect());
|
ability.addEffect(new AzorsGatewayEffect());
|
||||||
|
|
@ -50,7 +52,13 @@ public final class AzorsGateway extends CardImpl {
|
||||||
new GainLifeEffect(5), AzorsGatewayCondition.instance, "If cards with five or more " +
|
new GainLifeEffect(5), AzorsGatewayCondition.instance, "If cards with five or more " +
|
||||||
"different mana values are exiled with {this}, you gain 5 life, untap {this}, and transform it."
|
"different mana values are exiled with {this}, you gain 5 life, untap {this}, and transform it."
|
||||||
).addEffect(new UntapSourceEffect()).addEffect(new TransformSourceEffect()));
|
).addEffect(new UntapSourceEffect()).addEffect(new TransformSourceEffect()));
|
||||||
this.addAbility(ability);
|
this.getLeftHalfCard().addAbility(ability);
|
||||||
|
|
||||||
|
// Sanctum of the Sun
|
||||||
|
// {T}: Add X mana of any one color, where X is your life total.
|
||||||
|
this.getRightHalfCard().addAbility(new DynamicManaAbility(new Mana(0, 0, 0, 0, 0, 0, 1, 0), ControllerLifeCount.instance, new TapSourceCost(),
|
||||||
|
"Add X mana of any one color, where X is your life total", true));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private AzorsGateway(final AzorsGateway card) {
|
private AzorsGateway(final AzorsGateway card) {
|
||||||
|
|
|
||||||
218
Mage.Sets/src/mage/cards/a/AzulaCunningUsurper.java
Normal file
218
Mage.Sets/src/mage/cards/a/AzulaCunningUsurper.java
Normal file
|
|
@ -0,0 +1,218 @@
|
||||||
|
package mage.cards.a;
|
||||||
|
|
||||||
|
import mage.MageInt;
|
||||||
|
import mage.abilities.Ability;
|
||||||
|
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||||
|
import mage.abilities.common.SimpleStaticAbility;
|
||||||
|
import mage.abilities.effects.AsThoughEffectImpl;
|
||||||
|
import mage.abilities.effects.AsThoughManaEffect;
|
||||||
|
import mage.abilities.effects.OneShotEffect;
|
||||||
|
import mage.abilities.keyword.FirebendingAbility;
|
||||||
|
import mage.cards.*;
|
||||||
|
import mage.constants.*;
|
||||||
|
import mage.filter.StaticFilters;
|
||||||
|
import mage.game.ExileZone;
|
||||||
|
import mage.game.Game;
|
||||||
|
import mage.players.ManaPoolItem;
|
||||||
|
import mage.players.Player;
|
||||||
|
import mage.target.TargetCard;
|
||||||
|
import mage.target.TargetPermanent;
|
||||||
|
import mage.target.common.TargetCardInYourGraveyard;
|
||||||
|
import mage.target.common.TargetOpponent;
|
||||||
|
import mage.util.CardUtil;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author TheElk801
|
||||||
|
*/
|
||||||
|
public final class AzulaCunningUsurper extends CardImpl {
|
||||||
|
|
||||||
|
public AzulaCunningUsurper(UUID ownerId, CardSetInfo setInfo) {
|
||||||
|
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{U}{B}{B}");
|
||||||
|
|
||||||
|
this.supertype.add(SuperType.LEGENDARY);
|
||||||
|
this.subtype.add(SubType.HUMAN);
|
||||||
|
this.subtype.add(SubType.NOBLE);
|
||||||
|
this.subtype.add(SubType.ROGUE);
|
||||||
|
this.power = new MageInt(4);
|
||||||
|
this.toughness = new MageInt(4);
|
||||||
|
|
||||||
|
// Firebending 2
|
||||||
|
this.addAbility(new FirebendingAbility(2));
|
||||||
|
|
||||||
|
// When Azula enters, target opponent exiles a nontoken creature they control, then they exile a nonland card from their graveyard.
|
||||||
|
Ability ability = new EntersBattlefieldTriggeredAbility(new AzulaCunningUsurperExileEffect());
|
||||||
|
ability.addTarget(new TargetOpponent());
|
||||||
|
this.addAbility(ability);
|
||||||
|
|
||||||
|
// During your turn, you may cast cards exiled with Azula and you may cast them as though they had flash. Mana of any type can be spent to cast those spells.
|
||||||
|
ability = new SimpleStaticAbility(new AzulaCunningUsurperCastEffect());
|
||||||
|
ability.addEffect(new AzulaCunningUsurperFlashEffect());
|
||||||
|
ability.addEffect(new AzulaCunningUsurperManaEffect());
|
||||||
|
this.addAbility(ability);
|
||||||
|
}
|
||||||
|
|
||||||
|
private AzulaCunningUsurper(final AzulaCunningUsurper card) {
|
||||||
|
super(card);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public AzulaCunningUsurper copy() {
|
||||||
|
return new AzulaCunningUsurper(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class AzulaCunningUsurperExileEffect extends OneShotEffect {
|
||||||
|
|
||||||
|
AzulaCunningUsurperExileEffect() {
|
||||||
|
super(Outcome.Benefit);
|
||||||
|
staticText = "target opponent exiles a nontoken creature they control, " +
|
||||||
|
"then they exile a nonland card from their graveyard";
|
||||||
|
}
|
||||||
|
|
||||||
|
private AzulaCunningUsurperExileEffect(final AzulaCunningUsurperExileEffect effect) {
|
||||||
|
super(effect);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public AzulaCunningUsurperExileEffect copy() {
|
||||||
|
return new AzulaCunningUsurperExileEffect(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean apply(Game game, Ability source) {
|
||||||
|
Player player = game.getPlayer(getTargetPointer().getFirst(game, source));
|
||||||
|
if (player == null) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
Cards cards = new CardsImpl();
|
||||||
|
if (game.getBattlefield().contains(StaticFilters.FILTER_CONTROLLED_CREATURE_NON_TOKEN, player.getId(), source, game, 1)) {
|
||||||
|
TargetPermanent target = new TargetPermanent(StaticFilters.FILTER_CONTROLLED_CREATURE_NON_TOKEN);
|
||||||
|
target.withNotTarget(true);
|
||||||
|
player.choose(Outcome.Exile, target, source, game);
|
||||||
|
cards.add(target.getFirstTarget());
|
||||||
|
}
|
||||||
|
if (player.getGraveyard().count(StaticFilters.FILTER_CARD_A_NON_CREATURE, game) > 0) {
|
||||||
|
TargetCard target = new TargetCardInYourGraveyard(StaticFilters.FILTER_CARD_A_NON_CREATURE);
|
||||||
|
target.withNotTarget(true);
|
||||||
|
player.choose(Outcome.Exile, target, source, game);
|
||||||
|
cards.add(target.getFirstTarget());
|
||||||
|
}
|
||||||
|
return player.moveCardsToExile(
|
||||||
|
cards.getCards(game), source, game, true,
|
||||||
|
CardUtil.getExileZoneId(game, source),
|
||||||
|
CardUtil.getSourceLogName(game, source)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class AzulaCunningUsurperCastEffect extends AsThoughEffectImpl {
|
||||||
|
|
||||||
|
AzulaCunningUsurperCastEffect() {
|
||||||
|
super(AsThoughEffectType.CAST_FROM_NOT_OWN_HAND_ZONE, Duration.WhileOnBattlefield, Outcome.Benefit);
|
||||||
|
staticText = "during your turn, you may cast cards exiled with {this}";
|
||||||
|
}
|
||||||
|
|
||||||
|
private AzulaCunningUsurperCastEffect(final AzulaCunningUsurperCastEffect effect) {
|
||||||
|
super(effect);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean apply(Game game, Ability source) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public AzulaCunningUsurperCastEffect copy() {
|
||||||
|
return new AzulaCunningUsurperCastEffect(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean applies(UUID objectId, Ability source, UUID affectedControllerId, Game game) {
|
||||||
|
if (!source.isControlledBy(affectedControllerId) || !game.isActivePlayer(affectedControllerId)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
Card card = game.getCard(objectId);
|
||||||
|
if (card == null || card.isLand(game)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
ExileZone exileZone = game.getState().getExile().getExileZone(CardUtil.getExileZoneId(game, source));
|
||||||
|
return exileZone != null && exileZone.contains(objectId);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class AzulaCunningUsurperFlashEffect extends AsThoughEffectImpl {
|
||||||
|
|
||||||
|
AzulaCunningUsurperFlashEffect() {
|
||||||
|
super(AsThoughEffectType.CAST_FROM_NOT_OWN_HAND_ZONE, Duration.WhileOnBattlefield, Outcome.Benefit);
|
||||||
|
staticText = "and you may cast them as though they had flash";
|
||||||
|
}
|
||||||
|
|
||||||
|
private AzulaCunningUsurperFlashEffect(final AzulaCunningUsurperFlashEffect effect) {
|
||||||
|
super(effect);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean apply(Game game, Ability source) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public AzulaCunningUsurperFlashEffect copy() {
|
||||||
|
return new AzulaCunningUsurperFlashEffect(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean applies(UUID objectId, Ability source, UUID affectedControllerId, Game game) {
|
||||||
|
if (!source.isControlledBy(affectedControllerId) || !game.isActivePlayer(affectedControllerId)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
Card card = game.getCard(objectId);
|
||||||
|
if (card == null || card.isLand(game)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
ExileZone exileZone = game.getState().getExile().getExileZone(CardUtil.getExileZoneId(game, source));
|
||||||
|
return exileZone != null && exileZone.contains(objectId);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class AzulaCunningUsurperManaEffect extends AsThoughEffectImpl implements AsThoughManaEffect {
|
||||||
|
|
||||||
|
AzulaCunningUsurperManaEffect() {
|
||||||
|
super(AsThoughEffectType.SPEND_OTHER_MANA, Duration.WhileOnBattlefield, Outcome.Benefit);
|
||||||
|
staticText = "Mana of any type can be spent to cast those spells";
|
||||||
|
}
|
||||||
|
|
||||||
|
private AzulaCunningUsurperManaEffect(final AzulaCunningUsurperManaEffect effect) {
|
||||||
|
super(effect);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean apply(Game game, Ability source) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public AzulaCunningUsurperManaEffect copy() {
|
||||||
|
return new AzulaCunningUsurperManaEffect(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean applies(UUID objectId, Ability source, UUID affectedControllerId, Game game) {
|
||||||
|
if (!source.isControlledBy(affectedControllerId) || !game.isActivePlayer(affectedControllerId)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
Card card = game.getCard(objectId);
|
||||||
|
if (card == null || card.isLand(game)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
ExileZone exileZone = game.getState().getExile().getExileZone(CardUtil.getExileZoneId(game, source));
|
||||||
|
return exileZone != null && exileZone.contains(objectId);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ManaType getAsThoughManaType(ManaType manaType, ManaPoolItem mana, UUID affectedControllerId, Ability source, Game game) {
|
||||||
|
return mana.getFirstAvailable();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -1,45 +1,51 @@
|
||||||
package mage.cards.a;
|
package mage.cards.a;
|
||||||
|
|
||||||
import java.util.UUID;
|
import mage.abilities.common.BecomesBlockedSourceTriggeredAbility;
|
||||||
|
|
||||||
import mage.abilities.common.SagaAbility;
|
import mage.abilities.common.SagaAbility;
|
||||||
import mage.abilities.effects.common.ExileSagaAndReturnTransformedEffect;
|
import mage.abilities.effects.common.ExileSagaAndReturnTransformedEffect;
|
||||||
import mage.abilities.effects.common.GainLifeEffect;
|
import mage.abilities.effects.common.GainLifeEffect;
|
||||||
|
import mage.abilities.effects.common.UntapLandsEffect;
|
||||||
import mage.abilities.effects.common.continuous.PlayAdditionalLandsControllerEffect;
|
import mage.abilities.effects.common.continuous.PlayAdditionalLandsControllerEffect;
|
||||||
import mage.abilities.keyword.TransformAbility;
|
import mage.cards.CardSetInfo;
|
||||||
|
import mage.cards.TransformingDoubleFacedCard;
|
||||||
|
import mage.constants.CardType;
|
||||||
import mage.constants.Duration;
|
import mage.constants.Duration;
|
||||||
import mage.constants.SagaChapter;
|
import mage.constants.SagaChapter;
|
||||||
import mage.constants.SubType;
|
import mage.constants.SubType;
|
||||||
import mage.cards.CardImpl;
|
|
||||||
import mage.cards.CardSetInfo;
|
import java.util.UUID;
|
||||||
import mage.constants.CardType;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @author weirddan455
|
* @author weirddan455
|
||||||
*/
|
*/
|
||||||
public final class AzusasManyJourneys extends CardImpl {
|
public final class AzusasManyJourneys extends TransformingDoubleFacedCard {
|
||||||
|
|
||||||
public AzusasManyJourneys(UUID ownerId, CardSetInfo setInfo) {
|
public AzusasManyJourneys(UUID ownerId, CardSetInfo setInfo) {
|
||||||
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{1}{G}");
|
super(ownerId, setInfo,
|
||||||
|
new CardType[]{CardType.ENCHANTMENT}, new SubType[]{SubType.SAGA}, "{1}{G}",
|
||||||
|
"Likeness of the Seeker",
|
||||||
|
new CardType[]{CardType.ENCHANTMENT, CardType.CREATURE}, new SubType[]{SubType.HUMAN, SubType.MONK}, "G");
|
||||||
|
|
||||||
this.subtype.add(SubType.SAGA);
|
this.getRightHalfCard().setPT(3, 3);
|
||||||
this.secondSideCardClazz = mage.cards.l.LikenessOfTheSeeker.class;
|
|
||||||
|
|
||||||
// (As this Saga enters and after your draw step, add a lore counter.)
|
// (As this Saga enters and after your draw step, add a lore counter.)
|
||||||
SagaAbility sagaAbility = new SagaAbility(this);
|
SagaAbility sagaAbility = new SagaAbility(this.getLeftHalfCard());
|
||||||
|
|
||||||
// I — You may play an additional land this turn.
|
// I — You may play an additional land this turn.
|
||||||
sagaAbility.addChapterEffect(this, SagaChapter.CHAPTER_I, new PlayAdditionalLandsControllerEffect(1, Duration.EndOfTurn));
|
sagaAbility.addChapterEffect(this.getLeftHalfCard(), SagaChapter.CHAPTER_I, new PlayAdditionalLandsControllerEffect(1, Duration.EndOfTurn));
|
||||||
|
|
||||||
// II — You gain 3 life.
|
// II — You gain 3 life.
|
||||||
sagaAbility.addChapterEffect(this, SagaChapter.CHAPTER_II, new GainLifeEffect(3));
|
sagaAbility.addChapterEffect(this.getLeftHalfCard(), SagaChapter.CHAPTER_II, new GainLifeEffect(3));
|
||||||
|
|
||||||
// III — Exile this Saga, then return it to the battlefield transformed under your control.
|
// III — Exile this Saga, then return it to the battlefield transformed under your control.
|
||||||
this.addAbility(new TransformAbility());
|
sagaAbility.addChapterEffect(this.getLeftHalfCard(), SagaChapter.CHAPTER_III, new ExileSagaAndReturnTransformedEffect());
|
||||||
sagaAbility.addChapterEffect(this, SagaChapter.CHAPTER_III, new ExileSagaAndReturnTransformedEffect());
|
|
||||||
|
|
||||||
this.addAbility(sagaAbility);
|
this.getLeftHalfCard().addAbility(sagaAbility);
|
||||||
|
|
||||||
|
// Likeness of the Seeker
|
||||||
|
// Whenever Likeness of the Seeker becomes blocked, untap up to three lands you control.
|
||||||
|
this.getRightHalfCard().addAbility(new BecomesBlockedSourceTriggeredAbility(new UntapLandsEffect(3, true, true), false));
|
||||||
}
|
}
|
||||||
|
|
||||||
private AzusasManyJourneys(final AzusasManyJourneys card) {
|
private AzusasManyJourneys(final AzusasManyJourneys card) {
|
||||||
|
|
|
||||||
|
|
@ -47,7 +47,7 @@ public final class BaboonSpirit extends CardImpl {
|
||||||
|
|
||||||
// {3}{U}: Exile another target creature you control. Return it to the battlefield under its owner's control at the beginning of the next end step.
|
// {3}{U}: Exile another target creature you control. Return it to the battlefield under its owner's control at the beginning of the next end step.
|
||||||
Ability ability = new SimpleActivatedAbility(
|
Ability ability = new SimpleActivatedAbility(
|
||||||
new ExileReturnBattlefieldNextEndStepTargetEffect(), new ManaCostsImpl<>("{3}{U}")
|
new ExileReturnBattlefieldNextEndStepTargetEffect().withTextThatCard(false), new ManaCostsImpl<>("{3}{U}")
|
||||||
);
|
);
|
||||||
ability.addTarget(new TargetPermanent(StaticFilters.FILTER_ANOTHER_TARGET_CREATURE_YOU_CONTROL));
|
ability.addTarget(new TargetPermanent(StaticFilters.FILTER_ANOTHER_TARGET_CREATURE_YOU_CONTROL));
|
||||||
this.addAbility(ability);
|
this.addAbility(ability);
|
||||||
|
|
|
||||||
|
|
@ -39,7 +39,7 @@ public final class Badgermole extends CardImpl {
|
||||||
this.addAbility(new SimpleStaticAbility(new GainAbilityAllEffect(
|
this.addAbility(new SimpleStaticAbility(new GainAbilityAllEffect(
|
||||||
TrampleAbility.getInstance(), Duration.WhileOnBattlefield,
|
TrampleAbility.getInstance(), Duration.WhileOnBattlefield,
|
||||||
StaticFilters.FILTER_CONTROLLED_CREATURES_P1P1
|
StaticFilters.FILTER_CONTROLLED_CREATURES_P1P1
|
||||||
)));
|
).setText("creatures you control with +1/+1 counters on them have trample")));
|
||||||
}
|
}
|
||||||
|
|
||||||
private Badgermole(final Badgermole card) {
|
private Badgermole(final Badgermole card) {
|
||||||
|
|
|
||||||
|
|
@ -1,71 +0,0 @@
|
||||||
package mage.cards.b;
|
|
||||||
|
|
||||||
import mage.MageInt;
|
|
||||||
import mage.abilities.common.SagaAbility;
|
|
||||||
import mage.abilities.effects.common.DestroyTargetEffect;
|
|
||||||
import mage.abilities.effects.common.ExileSourceAndReturnFaceUpEffect;
|
|
||||||
import mage.abilities.effects.common.continuous.GainAbilityControlledEffect;
|
|
||||||
import mage.abilities.effects.common.counter.AddCountersAllEffect;
|
|
||||||
import mage.abilities.keyword.FlyingAbility;
|
|
||||||
import mage.cards.CardImpl;
|
|
||||||
import mage.cards.CardSetInfo;
|
|
||||||
import mage.constants.*;
|
|
||||||
import mage.counters.CounterType;
|
|
||||||
import mage.filter.StaticFilters;
|
|
||||||
import mage.target.TargetPermanent;
|
|
||||||
|
|
||||||
import java.util.UUID;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author TheElk801
|
|
||||||
*/
|
|
||||||
public final class BahamutWardenOfLight extends CardImpl {
|
|
||||||
|
|
||||||
public BahamutWardenOfLight(UUID ownerId, CardSetInfo setInfo) {
|
|
||||||
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT, CardType.CREATURE}, "");
|
|
||||||
|
|
||||||
this.supertype.add(SuperType.LEGENDARY);
|
|
||||||
this.subtype.add(SubType.SAGA);
|
|
||||||
this.subtype.add(SubType.DRAGON);
|
|
||||||
this.power = new MageInt(5);
|
|
||||||
this.toughness = new MageInt(5);
|
|
||||||
this.nightCard = true;
|
|
||||||
this.color.setWhite(true);
|
|
||||||
|
|
||||||
// (As this Saga enters and after your draw step, add a lore counter.)
|
|
||||||
SagaAbility sagaAbility = new SagaAbility(this);
|
|
||||||
|
|
||||||
// I, II -- Wings of Light -- Put a +1/+1 counter on each other creature you control. Those creatures gain flying until end of turn.
|
|
||||||
sagaAbility.addChapterEffect(this, SagaChapter.CHAPTER_I, SagaChapter.CHAPTER_II, ability -> {
|
|
||||||
ability.addEffect(new AddCountersAllEffect(
|
|
||||||
CounterType.P1P1.createInstance(), StaticFilters.FILTER_OTHER_CONTROLLED_CREATURE
|
|
||||||
));
|
|
||||||
ability.addEffect(new GainAbilityControlledEffect(
|
|
||||||
FlyingAbility.getInstance(), Duration.EndOfTurn,
|
|
||||||
StaticFilters.FILTER_CONTROLLED_CREATURE
|
|
||||||
).setText("Those creatures gain flying until end of turn"));
|
|
||||||
ability.withFlavorWord("Wings of Light");
|
|
||||||
});
|
|
||||||
|
|
||||||
// III -- Gigaflare -- Destroy target permanent. Exile Bahamut, then return it to the battlefield.
|
|
||||||
sagaAbility.addChapterEffect(this, SagaChapter.CHAPTER_III, ability -> {
|
|
||||||
ability.addEffect(new DestroyTargetEffect());
|
|
||||||
ability.addEffect(new ExileSourceAndReturnFaceUpEffect());
|
|
||||||
ability.addTarget(new TargetPermanent());
|
|
||||||
ability.withFlavorWord("Gigaflare");
|
|
||||||
});
|
|
||||||
this.addAbility(sagaAbility);
|
|
||||||
|
|
||||||
// Flying
|
|
||||||
this.addAbility(FlyingAbility.getInstance());
|
|
||||||
}
|
|
||||||
|
|
||||||
private BahamutWardenOfLight(final BahamutWardenOfLight card) {
|
|
||||||
super(card);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public BahamutWardenOfLight copy() {
|
|
||||||
return new BahamutWardenOfLight(this);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,10 +1,9 @@
|
||||||
package mage.cards.b;
|
package mage.cards.b;
|
||||||
|
|
||||||
import mage.MageInt;
|
|
||||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
|
||||||
import mage.abilities.keyword.DisturbAbility;
|
import mage.abilities.keyword.DisturbAbility;
|
||||||
import mage.cards.CardImpl;
|
import mage.abilities.keyword.FlyingAbility;
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
|
import mage.cards.TransformingDoubleFacedCard;
|
||||||
import mage.constants.CardType;
|
import mage.constants.CardType;
|
||||||
import mage.constants.SubType;
|
import mage.constants.SubType;
|
||||||
|
|
||||||
|
|
@ -13,19 +12,25 @@ import java.util.UUID;
|
||||||
/**
|
/**
|
||||||
* @author TheElk801
|
* @author TheElk801
|
||||||
*/
|
*/
|
||||||
public final class BaithookAngler extends CardImpl {
|
public final class BaithookAngler extends TransformingDoubleFacedCard {
|
||||||
|
|
||||||
public BaithookAngler(UUID ownerId, CardSetInfo setInfo) {
|
public BaithookAngler(UUID ownerId, CardSetInfo setInfo) {
|
||||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{U}");
|
super(ownerId, setInfo,
|
||||||
|
new CardType[]{CardType.CREATURE}, new SubType[]{SubType.HUMAN, SubType.PEASANT}, "{1}{U}",
|
||||||
this.subtype.add(SubType.HUMAN);
|
"Hook-Haunt Drifter",
|
||||||
this.subtype.add(SubType.PEASANT);
|
new CardType[]{CardType.CREATURE}, new SubType[]{SubType.SPIRIT}, "U"
|
||||||
this.power = new MageInt(2);
|
);
|
||||||
this.toughness = new MageInt(1);
|
this.getLeftHalfCard().setPT(2, 1);
|
||||||
this.secondSideCardClazz = mage.cards.h.HookHauntDrifter.class;
|
this.getRightHalfCard().setPT(1, 2);
|
||||||
|
|
||||||
// Disturb {1}{U}
|
// Disturb {1}{U}
|
||||||
this.addAbility(new DisturbAbility(this, "{1}{U}"));
|
this.getLeftHalfCard().addAbility(new DisturbAbility(this, "{1}{U}"));
|
||||||
|
|
||||||
|
// Flying
|
||||||
|
this.getRightHalfCard().addAbility(FlyingAbility.getInstance());
|
||||||
|
|
||||||
|
// If Hook-Haunt Drifter would be put into a graveyard from anywhere, exile it instead.
|
||||||
|
this.getRightHalfCard().addAbility(DisturbAbility.makeBackAbility());
|
||||||
}
|
}
|
||||||
|
|
||||||
private BaithookAngler(final BaithookAngler card) {
|
private BaithookAngler(final BaithookAngler card) {
|
||||||
|
|
|
||||||
|
|
@ -1,48 +0,0 @@
|
||||||
package mage.cards.b;
|
|
||||||
|
|
||||||
import mage.MageInt;
|
|
||||||
import mage.abilities.common.AttacksTriggeredAbility;
|
|
||||||
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
|
|
||||||
import mage.abilities.keyword.CrewAbility;
|
|
||||||
import mage.abilities.keyword.FlyingAbility;
|
|
||||||
import mage.cards.CardImpl;
|
|
||||||
import mage.cards.CardSetInfo;
|
|
||||||
import mage.constants.CardType;
|
|
||||||
import mage.constants.SubType;
|
|
||||||
import mage.constants.SuperType;
|
|
||||||
|
|
||||||
import java.util.UUID;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author TheElk801
|
|
||||||
*/
|
|
||||||
public final class BalambGardenAirborne extends CardImpl {
|
|
||||||
|
|
||||||
public BalambGardenAirborne(UUID ownerId, CardSetInfo setInfo) {
|
|
||||||
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "");
|
|
||||||
|
|
||||||
this.supertype.add(SuperType.LEGENDARY);
|
|
||||||
this.subtype.add(SubType.VEHICLE);
|
|
||||||
this.power = new MageInt(5);
|
|
||||||
this.toughness = new MageInt(4);
|
|
||||||
this.nightCard = true;
|
|
||||||
|
|
||||||
// Flying
|
|
||||||
this.addAbility(FlyingAbility.getInstance());
|
|
||||||
|
|
||||||
// Whenever Balamb Garden attacks, draw a card.
|
|
||||||
this.addAbility(new AttacksTriggeredAbility(new DrawCardSourceControllerEffect(1)));
|
|
||||||
|
|
||||||
// Crew 1
|
|
||||||
this.addAbility(new CrewAbility(1));
|
|
||||||
}
|
|
||||||
|
|
||||||
private BalambGardenAirborne(final BalambGardenAirborne card) {
|
|
||||||
super(card);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public BalambGardenAirborne copy() {
|
|
||||||
return new BalambGardenAirborne(this);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
package mage.cards.b;
|
package mage.cards.b;
|
||||||
|
|
||||||
import mage.abilities.Ability;
|
import mage.abilities.Ability;
|
||||||
|
import mage.abilities.common.AttacksTriggeredAbility;
|
||||||
import mage.abilities.common.EntersBattlefieldTappedAbility;
|
import mage.abilities.common.EntersBattlefieldTappedAbility;
|
||||||
import mage.abilities.common.SimpleActivatedAbility;
|
import mage.abilities.common.SimpleActivatedAbility;
|
||||||
import mage.abilities.costs.CostAdjuster;
|
import mage.abilities.costs.CostAdjuster;
|
||||||
|
|
@ -8,17 +9,20 @@ import mage.abilities.costs.common.TapSourceCost;
|
||||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||||
import mage.abilities.dynamicvalue.DynamicValue;
|
import mage.abilities.dynamicvalue.DynamicValue;
|
||||||
import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount;
|
import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount;
|
||||||
|
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
|
||||||
import mage.abilities.effects.common.InfoEffect;
|
import mage.abilities.effects.common.InfoEffect;
|
||||||
import mage.abilities.effects.common.TransformSourceEffect;
|
import mage.abilities.effects.common.TransformSourceEffect;
|
||||||
import mage.abilities.hint.Hint;
|
import mage.abilities.hint.Hint;
|
||||||
import mage.abilities.hint.ValueHint;
|
import mage.abilities.hint.ValueHint;
|
||||||
import mage.abilities.keyword.TransformAbility;
|
import mage.abilities.keyword.CrewAbility;
|
||||||
|
import mage.abilities.keyword.FlyingAbility;
|
||||||
import mage.abilities.mana.BlueManaAbility;
|
import mage.abilities.mana.BlueManaAbility;
|
||||||
import mage.abilities.mana.GreenManaAbility;
|
import mage.abilities.mana.GreenManaAbility;
|
||||||
import mage.cards.CardImpl;
|
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
|
import mage.cards.TransformingDoubleFacedCard;
|
||||||
import mage.constants.CardType;
|
import mage.constants.CardType;
|
||||||
import mage.constants.SubType;
|
import mage.constants.SubType;
|
||||||
|
import mage.constants.SuperType;
|
||||||
import mage.filter.FilterPermanent;
|
import mage.filter.FilterPermanent;
|
||||||
import mage.filter.common.FilterControlledPermanent;
|
import mage.filter.common.FilterControlledPermanent;
|
||||||
import mage.filter.predicate.mageobject.AnotherPredicate;
|
import mage.filter.predicate.mageobject.AnotherPredicate;
|
||||||
|
|
@ -30,29 +34,39 @@ import java.util.UUID;
|
||||||
/**
|
/**
|
||||||
* @author TheElk801
|
* @author TheElk801
|
||||||
*/
|
*/
|
||||||
public final class BalambGardenSeeDAcademy extends CardImpl {
|
public final class BalambGardenSeeDAcademy extends TransformingDoubleFacedCard {
|
||||||
|
|
||||||
public BalambGardenSeeDAcademy(UUID ownerId, CardSetInfo setInfo) {
|
public BalambGardenSeeDAcademy(UUID ownerId, CardSetInfo setInfo) {
|
||||||
super(ownerId, setInfo, new CardType[]{CardType.LAND}, "");
|
super(ownerId, setInfo,
|
||||||
|
new SuperType[]{}, new CardType[]{CardType.LAND}, new SubType[]{SubType.TOWN}, "",
|
||||||
this.subtype.add(SubType.TOWN);
|
"Balamb Garden, Airborne",
|
||||||
this.secondSideCardClazz = mage.cards.b.BalambGardenAirborne.class;
|
new SuperType[]{SuperType.LEGENDARY}, new CardType[]{CardType.ARTIFACT}, new SubType[]{SubType.VEHICLE}, "");
|
||||||
|
this.getRightHalfCard().setPT(5, 4);
|
||||||
|
|
||||||
// This land enters tapped.
|
// This land enters tapped.
|
||||||
this.addAbility(new EntersBattlefieldTappedAbility());
|
this.getLeftHalfCard().addAbility(new EntersBattlefieldTappedAbility());
|
||||||
|
|
||||||
// Add {G} or {U}.
|
// Add {G} or {U}.
|
||||||
this.addAbility(new GreenManaAbility());
|
this.getLeftHalfCard().addAbility(new GreenManaAbility());
|
||||||
this.addAbility(new BlueManaAbility());
|
this.getLeftHalfCard().addAbility(new BlueManaAbility());
|
||||||
|
|
||||||
// {5}{G}{U}, {T}: Transform this land. This ability costs {1} less to activate for each other Town you control.
|
// {5}{G}{U}, {T}: Transform this land. This ability costs {1} less to activate for each other Town you control.
|
||||||
this.addAbility(new TransformAbility());
|
|
||||||
Ability ability = new SimpleActivatedAbility(new TransformSourceEffect(), new ManaCostsImpl<>("{5}{G}{U}"));
|
Ability ability = new SimpleActivatedAbility(new TransformSourceEffect(), new ManaCostsImpl<>("{5}{G}{U}"));
|
||||||
ability.addCost(new TapSourceCost());
|
ability.addCost(new TapSourceCost());
|
||||||
ability.addEffect(new InfoEffect("This ability costs {1} less to activate for each other Town you control"));
|
ability.addEffect(new InfoEffect("This ability costs {1} less to activate for each other Town you control"));
|
||||||
this.addAbility(ability
|
this.getLeftHalfCard().addAbility(ability
|
||||||
.setCostAdjuster(BalambGardenSeeDAcademyAdjuster.instance)
|
.setCostAdjuster(BalambGardenSeeDAcademyAdjuster.instance)
|
||||||
.addHint(BalambGardenSeeDAcademyAdjuster.getHint()));
|
.addHint(BalambGardenSeeDAcademyAdjuster.getHint()));
|
||||||
|
|
||||||
|
// Balamb Garden, Airborne
|
||||||
|
// Flying
|
||||||
|
this.getRightHalfCard().addAbility(FlyingAbility.getInstance());
|
||||||
|
|
||||||
|
// Whenever Balamb Garden attacks, draw a card.
|
||||||
|
this.getRightHalfCard().addAbility(new AttacksTriggeredAbility(new DrawCardSourceControllerEffect(1)));
|
||||||
|
|
||||||
|
// Crew 1
|
||||||
|
this.getRightHalfCard().addAbility(new CrewAbility(1));
|
||||||
}
|
}
|
||||||
|
|
||||||
private BalambGardenSeeDAcademy(final BalambGardenSeeDAcademy card) {
|
private BalambGardenSeeDAcademy(final BalambGardenSeeDAcademy card) {
|
||||||
|
|
|
||||||
|
|
@ -1,16 +1,23 @@
|
||||||
package mage.cards.b;
|
package mage.cards.b;
|
||||||
|
|
||||||
import mage.MageInt;
|
|
||||||
import mage.abilities.Ability;
|
import mage.abilities.Ability;
|
||||||
import mage.abilities.common.SimpleActivatedAbility;
|
import mage.abilities.common.SimpleActivatedAbility;
|
||||||
import mage.abilities.costs.common.TapSourceCost;
|
import mage.abilities.costs.common.TapSourceCost;
|
||||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||||
|
import mage.abilities.effects.OneShotEffect;
|
||||||
import mage.abilities.effects.common.DamageTargetEffect;
|
import mage.abilities.effects.common.DamageTargetEffect;
|
||||||
|
import mage.abilities.effects.common.combat.CantBlockTargetEffect;
|
||||||
import mage.abilities.keyword.DayboundAbility;
|
import mage.abilities.keyword.DayboundAbility;
|
||||||
import mage.cards.CardImpl;
|
import mage.abilities.keyword.NightboundAbility;
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
|
import mage.cards.TransformingDoubleFacedCard;
|
||||||
import mage.constants.CardType;
|
import mage.constants.CardType;
|
||||||
|
import mage.constants.Duration;
|
||||||
|
import mage.constants.Outcome;
|
||||||
import mage.constants.SubType;
|
import mage.constants.SubType;
|
||||||
|
import mage.game.Game;
|
||||||
|
import mage.game.permanent.Permanent;
|
||||||
|
import mage.players.Player;
|
||||||
import mage.target.common.TargetAnyTarget;
|
import mage.target.common.TargetAnyTarget;
|
||||||
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
|
@ -18,17 +25,16 @@ import java.util.UUID;
|
||||||
/**
|
/**
|
||||||
* @author TheElk801
|
* @author TheElk801
|
||||||
*/
|
*/
|
||||||
public final class BallistaWatcher extends CardImpl {
|
public final class BallistaWatcher extends TransformingDoubleFacedCard {
|
||||||
|
|
||||||
public BallistaWatcher(UUID ownerId, CardSetInfo setInfo) {
|
public BallistaWatcher(UUID ownerId, CardSetInfo setInfo) {
|
||||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{R}{R}");
|
super(ownerId, setInfo,
|
||||||
|
new CardType[]{CardType.CREATURE}, new SubType[]{SubType.HUMAN, SubType.SOLDIER, SubType.WEREWOLF}, "{2}{R}{R}",
|
||||||
|
"Ballista Wielder",
|
||||||
|
new CardType[]{CardType.CREATURE}, new SubType[]{SubType.WEREWOLF}, "R");
|
||||||
|
|
||||||
this.subtype.add(SubType.HUMAN);
|
// Ballista Watcher
|
||||||
this.subtype.add(SubType.SOLDIER);
|
this.getLeftHalfCard().setPT(4, 3);
|
||||||
this.subtype.add(SubType.WEREWOLF);
|
|
||||||
this.power = new MageInt(4);
|
|
||||||
this.toughness = new MageInt(3);
|
|
||||||
this.secondSideCardClazz = mage.cards.b.BallistaWielder.class;
|
|
||||||
|
|
||||||
// {2}{R}, {T}: Ballista Watcher deals 1 damage to any target.
|
// {2}{R}, {T}: Ballista Watcher deals 1 damage to any target.
|
||||||
Ability ability = new SimpleActivatedAbility(
|
Ability ability = new SimpleActivatedAbility(
|
||||||
|
|
@ -36,10 +42,21 @@ public final class BallistaWatcher extends CardImpl {
|
||||||
);
|
);
|
||||||
ability.addCost(new TapSourceCost());
|
ability.addCost(new TapSourceCost());
|
||||||
ability.addTarget(new TargetAnyTarget());
|
ability.addTarget(new TargetAnyTarget());
|
||||||
this.addAbility(ability);
|
this.getLeftHalfCard().addAbility(ability);
|
||||||
|
|
||||||
// Daybound
|
// Daybound
|
||||||
this.addAbility(new DayboundAbility());
|
this.getLeftHalfCard().addAbility(new DayboundAbility());
|
||||||
|
|
||||||
|
// Ballista Wielder
|
||||||
|
this.getRightHalfCard().setPT(5, 5);
|
||||||
|
|
||||||
|
// {2}{R}: Ballista Wielder deals 1 damage to any target. A creature dealt damage this way can't block this turn.
|
||||||
|
Ability weilderAbility = new SimpleActivatedAbility(new BallistaWielderEffect(), new ManaCostsImpl<>("{2}{R}"));
|
||||||
|
weilderAbility.addTarget(new TargetAnyTarget());
|
||||||
|
this.getRightHalfCard().addAbility(weilderAbility);
|
||||||
|
|
||||||
|
// Nightbound
|
||||||
|
this.getRightHalfCard().addAbility(new NightboundAbility());
|
||||||
}
|
}
|
||||||
|
|
||||||
private BallistaWatcher(final BallistaWatcher card) {
|
private BallistaWatcher(final BallistaWatcher card) {
|
||||||
|
|
@ -51,3 +68,34 @@ public final class BallistaWatcher extends CardImpl {
|
||||||
return new BallistaWatcher(this);
|
return new BallistaWatcher(this);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
class BallistaWielderEffect extends OneShotEffect {
|
||||||
|
|
||||||
|
BallistaWielderEffect() {
|
||||||
|
super(Outcome.Benefit);
|
||||||
|
staticText = "{this} deals 1 damage to any target. A creature dealt damage this way can't block this turn";
|
||||||
|
}
|
||||||
|
|
||||||
|
private BallistaWielderEffect(final BallistaWielderEffect effect) {
|
||||||
|
super(effect);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public BallistaWielderEffect copy() {
|
||||||
|
return new BallistaWielderEffect(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean apply(Game game, Ability source) {
|
||||||
|
Permanent permanent = game.getPermanent(getTargetPointer().getFirst(game, source));
|
||||||
|
if (permanent == null) {
|
||||||
|
Player player = game.getPlayer(getTargetPointer().getFirst(game, source));
|
||||||
|
return player != null && player.damage(1, source, game) > 0;
|
||||||
|
}
|
||||||
|
if (permanent.damage(1, source, game) <= 0) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
game.addEffect(new CantBlockTargetEffect(Duration.EndOfTurn), source);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,85 +0,0 @@
|
||||||
package mage.cards.b;
|
|
||||||
|
|
||||||
import mage.MageInt;
|
|
||||||
import mage.abilities.Ability;
|
|
||||||
import mage.abilities.common.SimpleActivatedAbility;
|
|
||||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
|
||||||
import mage.abilities.effects.OneShotEffect;
|
|
||||||
import mage.abilities.effects.common.combat.CantBlockTargetEffect;
|
|
||||||
import mage.abilities.keyword.NightboundAbility;
|
|
||||||
import mage.cards.CardImpl;
|
|
||||||
import mage.cards.CardSetInfo;
|
|
||||||
import mage.constants.CardType;
|
|
||||||
import mage.constants.Duration;
|
|
||||||
import mage.constants.Outcome;
|
|
||||||
import mage.constants.SubType;
|
|
||||||
import mage.game.Game;
|
|
||||||
import mage.game.permanent.Permanent;
|
|
||||||
import mage.players.Player;
|
|
||||||
import mage.target.common.TargetAnyTarget;
|
|
||||||
|
|
||||||
import java.util.UUID;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author TheElk801
|
|
||||||
*/
|
|
||||||
public final class BallistaWielder extends CardImpl {
|
|
||||||
|
|
||||||
public BallistaWielder(UUID ownerId, CardSetInfo setInfo) {
|
|
||||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "");
|
|
||||||
|
|
||||||
this.subtype.add(SubType.WEREWOLF);
|
|
||||||
this.power = new MageInt(5);
|
|
||||||
this.toughness = new MageInt(5);
|
|
||||||
this.color.setRed(true);
|
|
||||||
this.nightCard = true;
|
|
||||||
|
|
||||||
// {2}{R}: Ballista Wielder deals 1 damage to any target. A creature dealt damage this way can't block this turn.
|
|
||||||
Ability ability = new SimpleActivatedAbility(new BallistaWielderEffect(), new ManaCostsImpl<>("{2}{R}"));
|
|
||||||
ability.addTarget(new TargetAnyTarget());
|
|
||||||
this.addAbility(ability);
|
|
||||||
|
|
||||||
// Nightbound
|
|
||||||
this.addAbility(new NightboundAbility());
|
|
||||||
}
|
|
||||||
|
|
||||||
private BallistaWielder(final BallistaWielder card) {
|
|
||||||
super(card);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public BallistaWielder copy() {
|
|
||||||
return new BallistaWielder(this);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
class BallistaWielderEffect extends OneShotEffect {
|
|
||||||
|
|
||||||
BallistaWielderEffect() {
|
|
||||||
super(Outcome.Benefit);
|
|
||||||
staticText = "{this} deals 1 damage to any target. A creature dealt damage this way can't block this turn";
|
|
||||||
}
|
|
||||||
|
|
||||||
private BallistaWielderEffect(final BallistaWielderEffect effect) {
|
|
||||||
super(effect);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public BallistaWielderEffect copy() {
|
|
||||||
return new BallistaWielderEffect(this);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean apply(Game game, Ability source) {
|
|
||||||
Permanent permanent = game.getPermanent(getTargetPointer().getFirst(game, source));
|
|
||||||
if (permanent == null) {
|
|
||||||
Player player = game.getPlayer(getTargetPointer().getFirst(game, source));
|
|
||||||
return player != null && player.damage(1, source, game) > 0;
|
|
||||||
}
|
|
||||||
if (permanent.damage(1, source, game) <= 0) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
game.addEffect(new CantBlockTargetEffect(Duration.EndOfTurn), source);
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,11 +1,13 @@
|
||||||
package mage.cards.b;
|
package mage.cards.b;
|
||||||
|
|
||||||
import mage.MageInt;
|
|
||||||
import mage.abilities.common.BecomesBlockedSourceTriggeredAbility;
|
import mage.abilities.common.BecomesBlockedSourceTriggeredAbility;
|
||||||
|
import mage.abilities.common.DiesCreatureTriggeredAbility;
|
||||||
|
import mage.abilities.effects.common.LoseLifeTargetControllerEffect;
|
||||||
import mage.abilities.effects.common.continuous.BoostAllEffect;
|
import mage.abilities.effects.common.continuous.BoostAllEffect;
|
||||||
import mage.abilities.keyword.DayboundAbility;
|
import mage.abilities.keyword.DayboundAbility;
|
||||||
import mage.cards.CardImpl;
|
import mage.abilities.keyword.NightboundAbility;
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
|
import mage.cards.TransformingDoubleFacedCard;
|
||||||
import mage.constants.CardType;
|
import mage.constants.CardType;
|
||||||
import mage.constants.Duration;
|
import mage.constants.Duration;
|
||||||
import mage.constants.SubType;
|
import mage.constants.SubType;
|
||||||
|
|
@ -17,31 +19,47 @@ import java.util.UUID;
|
||||||
/**
|
/**
|
||||||
* @author TheElk801
|
* @author TheElk801
|
||||||
*/
|
*/
|
||||||
public final class BanebladeScoundrel extends CardImpl {
|
public final class BanebladeScoundrel extends TransformingDoubleFacedCard {
|
||||||
|
|
||||||
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent();
|
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature blocking {this}");
|
||||||
|
|
||||||
static {
|
static {
|
||||||
filter.add(BlockingOrBlockedBySourcePredicate.BLOCKING);
|
filter.add(BlockingOrBlockedBySourcePredicate.BLOCKING);
|
||||||
}
|
}
|
||||||
|
|
||||||
public BanebladeScoundrel(UUID ownerId, CardSetInfo setInfo) {
|
public BanebladeScoundrel(UUID ownerId, CardSetInfo setInfo) {
|
||||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{B}");
|
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, new SubType[]{SubType.HUMAN, SubType.ROGUE, SubType.WEREWOLF}, "{3}{B}",
|
||||||
|
"Baneclaw Marauder",
|
||||||
|
new CardType[]{CardType.CREATURE}, new SubType[]{SubType.WEREWOLF}, "B");
|
||||||
|
|
||||||
this.subtype.add(SubType.HUMAN);
|
// Baneblade Scoundrel
|
||||||
this.subtype.add(SubType.ROGUE);
|
this.getLeftHalfCard().setPT(4, 3);
|
||||||
this.subtype.add(SubType.WEREWOLF);
|
|
||||||
this.power = new MageInt(4);
|
|
||||||
this.toughness = new MageInt(3);
|
|
||||||
this.secondSideCardClazz = mage.cards.b.BaneclawMarauder.class;
|
|
||||||
|
|
||||||
// Whenever Baneblade Scoundrel becomes blocked, each creature blocking it gets -1/-1 until end of turn.
|
// Whenever Baneblade Scoundrel becomes blocked, each creature blocking it gets -1/-1 until end of turn.
|
||||||
this.addAbility(new BecomesBlockedSourceTriggeredAbility(new BoostAllEffect(
|
this.getLeftHalfCard().addAbility(new BecomesBlockedSourceTriggeredAbility(new BoostAllEffect(
|
||||||
-1, -1, Duration.EndOfTurn, filter, false
|
-1, -1, Duration.EndOfTurn, filter, false
|
||||||
).setText("each creature blocking it gets -1/-1 until end of turn"), false));
|
).setText("each creature blocking it gets -1/-1 until end of turn"), false));
|
||||||
|
|
||||||
// Daybound
|
// Daybound
|
||||||
this.addAbility(new DayboundAbility());
|
this.getLeftHalfCard().addAbility(new DayboundAbility());
|
||||||
|
|
||||||
|
// Baneclaw Marauder
|
||||||
|
this.getRightHalfCard().setPT(5, 4);
|
||||||
|
|
||||||
|
// Whenever Baneclaw Marauder becomes blocked, each creature blocking it gets -1/-1 until end of turn.
|
||||||
|
this.getRightHalfCard().addAbility(new BecomesBlockedSourceTriggeredAbility(new BoostAllEffect(
|
||||||
|
-1, -1, Duration.EndOfTurn, filter, false
|
||||||
|
).setText("each creature blocking it gets -1/-1 until end of turn"), false));
|
||||||
|
|
||||||
|
// Whenever a creature blocking Baneclaw Marauder dies, its controller loses 1 life.
|
||||||
|
this.getRightHalfCard().addAbility(new DiesCreatureTriggeredAbility(
|
||||||
|
new LoseLifeTargetControllerEffect(1)
|
||||||
|
.setText("that creature's controller loses 1 life"),
|
||||||
|
false, filter, true
|
||||||
|
));
|
||||||
|
|
||||||
|
// Nightbound
|
||||||
|
this.getRightHalfCard().addAbility(new NightboundAbility());
|
||||||
}
|
}
|
||||||
|
|
||||||
private BanebladeScoundrel(final BanebladeScoundrel card) {
|
private BanebladeScoundrel(final BanebladeScoundrel card) {
|
||||||
|
|
|
||||||
|
|
@ -1,63 +0,0 @@
|
||||||
package mage.cards.b;
|
|
||||||
|
|
||||||
import mage.MageInt;
|
|
||||||
import mage.abilities.common.BecomesBlockedSourceTriggeredAbility;
|
|
||||||
import mage.abilities.common.DiesCreatureTriggeredAbility;
|
|
||||||
import mage.abilities.effects.common.LoseLifeTargetControllerEffect;
|
|
||||||
import mage.abilities.effects.common.continuous.BoostAllEffect;
|
|
||||||
import mage.abilities.keyword.NightboundAbility;
|
|
||||||
import mage.cards.CardImpl;
|
|
||||||
import mage.cards.CardSetInfo;
|
|
||||||
import mage.constants.CardType;
|
|
||||||
import mage.constants.Duration;
|
|
||||||
import mage.constants.SubType;
|
|
||||||
import mage.filter.common.FilterCreaturePermanent;
|
|
||||||
import mage.filter.predicate.permanent.BlockingOrBlockedBySourcePredicate;
|
|
||||||
|
|
||||||
import java.util.UUID;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author TheElk801
|
|
||||||
*/
|
|
||||||
public final class BaneclawMarauder extends CardImpl {
|
|
||||||
|
|
||||||
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("a creature blocking {this}");
|
|
||||||
|
|
||||||
static {
|
|
||||||
filter.add(BlockingOrBlockedBySourcePredicate.BLOCKING);
|
|
||||||
}
|
|
||||||
|
|
||||||
public BaneclawMarauder(UUID ownerId, CardSetInfo setInfo) {
|
|
||||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "");
|
|
||||||
|
|
||||||
this.subtype.add(SubType.WEREWOLF);
|
|
||||||
this.power = new MageInt(5);
|
|
||||||
this.toughness = new MageInt(4);
|
|
||||||
this.color.setBlack(true);
|
|
||||||
this.nightCard = true;
|
|
||||||
|
|
||||||
// Whenever Baneclaw Marauder becomes blocked, each creature blocking it gets -1/-1 until end of turn.
|
|
||||||
this.addAbility(new BecomesBlockedSourceTriggeredAbility(new BoostAllEffect(
|
|
||||||
-1, -1, Duration.EndOfTurn, filter, false
|
|
||||||
).setText("each creature blocking it gets -1/-1 until end of turn"), false));
|
|
||||||
|
|
||||||
// Whenever a creature blocking Baneclaw Marauder dies, its controller loses 1 life.
|
|
||||||
this.addAbility(new DiesCreatureTriggeredAbility(
|
|
||||||
new LoseLifeTargetControllerEffect(1)
|
|
||||||
.setText("that creature's controller loses 1 life"),
|
|
||||||
false, filter, true
|
|
||||||
));
|
|
||||||
|
|
||||||
// Nightbound
|
|
||||||
this.addAbility(new NightboundAbility());
|
|
||||||
}
|
|
||||||
|
|
||||||
private BaneclawMarauder(final BaneclawMarauder card) {
|
|
||||||
super(card);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public BaneclawMarauder copy() {
|
|
||||||
return new BaneclawMarauder(this);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -49,10 +49,10 @@ public final class BarretWallace extends CardImpl {
|
||||||
|
|
||||||
// Whenever Barret Wallace attacks, it deals damage equal to the number of equipped creatures you control to defending player.
|
// Whenever Barret Wallace attacks, it deals damage equal to the number of equipped creatures you control to defending player.
|
||||||
this.addAbility(new AttacksTriggeredAbility(
|
this.addAbility(new AttacksTriggeredAbility(
|
||||||
new DamageTargetEffect(xValue, true, "it")
|
new DamageTargetEffect(xValue)
|
||||||
.setText("it deals damage equal to the number of equipped creatures you control to defending player"),
|
.setText("it deals damage equal to the number of equipped creatures you control to defending player"),
|
||||||
false, null, SetTargetPointer.PLAYER
|
false, null, SetTargetPointer.PLAYER
|
||||||
).withRuleTextReplacement(true).addHint(hint));
|
).addHint(hint));
|
||||||
}
|
}
|
||||||
|
|
||||||
private BarretWallace(final BarretWallace card) {
|
private BarretWallace(final BarretWallace card) {
|
||||||
|
|
|
||||||
|
|
@ -1,45 +0,0 @@
|
||||||
|
|
||||||
package mage.cards.b;
|
|
||||||
|
|
||||||
import java.util.UUID;
|
|
||||||
import mage.MageInt;
|
|
||||||
import mage.abilities.common.DealsCombatDamageToAPlayerTriggeredAbility;
|
|
||||||
import mage.abilities.effects.keyword.InvestigateEffect;
|
|
||||||
import mage.abilities.keyword.ProwessAbility;
|
|
||||||
import mage.cards.CardImpl;
|
|
||||||
import mage.cards.CardSetInfo;
|
|
||||||
import mage.constants.CardType;
|
|
||||||
import mage.constants.SubType;
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @author fireshoes
|
|
||||||
*/
|
|
||||||
public final class BearerOfOverwhelmingTruths extends CardImpl {
|
|
||||||
|
|
||||||
public BearerOfOverwhelmingTruths(UUID ownerId, CardSetInfo setInfo) {
|
|
||||||
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"");
|
|
||||||
this.subtype.add(SubType.HUMAN, SubType.WIZARD);
|
|
||||||
this.power = new MageInt(3);
|
|
||||||
this.toughness = new MageInt(2);
|
|
||||||
this.color.setBlue(true);
|
|
||||||
|
|
||||||
// this card is the second face of double-faced card
|
|
||||||
this.nightCard = true;
|
|
||||||
|
|
||||||
// Prowess
|
|
||||||
this.addAbility(new ProwessAbility());
|
|
||||||
|
|
||||||
// Whenever Bearer of Overwhelming Truths deals combat damage to a player, investigate.
|
|
||||||
this.addAbility(new DealsCombatDamageToAPlayerTriggeredAbility(new InvestigateEffect(), false));
|
|
||||||
}
|
|
||||||
|
|
||||||
private BearerOfOverwhelmingTruths(final BearerOfOverwhelmingTruths card) {
|
|
||||||
super(card);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public BearerOfOverwhelmingTruths copy() {
|
|
||||||
return new BearerOfOverwhelmingTruths(this);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -6,9 +6,8 @@ import mage.abilities.effects.common.ExileSagaAndReturnTransformedEffect;
|
||||||
import mage.abilities.effects.common.continuous.BoostTargetEffect;
|
import mage.abilities.effects.common.continuous.BoostTargetEffect;
|
||||||
import mage.abilities.effects.common.continuous.GainAbilityTargetEffect;
|
import mage.abilities.effects.common.continuous.GainAbilityTargetEffect;
|
||||||
import mage.abilities.keyword.FlyingAbility;
|
import mage.abilities.keyword.FlyingAbility;
|
||||||
import mage.abilities.keyword.TransformAbility;
|
|
||||||
import mage.cards.CardImpl;
|
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
|
import mage.cards.TransformingDoubleFacedCard;
|
||||||
import mage.constants.CardType;
|
import mage.constants.CardType;
|
||||||
import mage.constants.SagaChapter;
|
import mage.constants.SagaChapter;
|
||||||
import mage.constants.SubType;
|
import mage.constants.SubType;
|
||||||
|
|
@ -19,20 +18,20 @@ import java.util.UUID;
|
||||||
/**
|
/**
|
||||||
* @author TheElk801
|
* @author TheElk801
|
||||||
*/
|
*/
|
||||||
public final class BefriendingTheMoths extends CardImpl {
|
public final class BefriendingTheMoths extends TransformingDoubleFacedCard {
|
||||||
|
|
||||||
public BefriendingTheMoths(UUID ownerId, CardSetInfo setInfo) {
|
public BefriendingTheMoths(UUID ownerId, CardSetInfo setInfo) {
|
||||||
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{3}{W}");
|
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, new SubType[]{SubType.SAGA}, "{3}{W}",
|
||||||
|
"Imperial Moth",
|
||||||
this.subtype.add(SubType.SAGA);
|
new CardType[]{CardType.ENCHANTMENT, CardType.CREATURE}, new SubType[]{SubType.INSECT}, "W");
|
||||||
this.secondSideCardClazz = mage.cards.i.ImperialMoth.class;
|
|
||||||
|
|
||||||
|
// Befriending the Moths
|
||||||
// (As this Saga enters and after your draw step, add a lore counter.)
|
// (As this Saga enters and after your draw step, add a lore counter.)
|
||||||
SagaAbility sagaAbility = new SagaAbility(this);
|
SagaAbility sagaAbility = new SagaAbility(getLeftHalfCard());
|
||||||
|
|
||||||
// I, II — Target creature you control gets +1/+1 and gains flying until end of turn.
|
// I, II — Target creature you control gets +1/+1 and gains flying until end of turn.
|
||||||
sagaAbility.addChapterEffect(
|
sagaAbility.addChapterEffect(
|
||||||
this, SagaChapter.CHAPTER_I, SagaChapter.CHAPTER_II,
|
getLeftHalfCard(), SagaChapter.CHAPTER_I, SagaChapter.CHAPTER_II,
|
||||||
new Effects(
|
new Effects(
|
||||||
new BoostTargetEffect(1, 1)
|
new BoostTargetEffect(1, 1)
|
||||||
.setText("target creature you control gets +1/+1"),
|
.setText("target creature you control gets +1/+1"),
|
||||||
|
|
@ -42,10 +41,14 @@ public final class BefriendingTheMoths extends CardImpl {
|
||||||
);
|
);
|
||||||
|
|
||||||
// III — Exile this Saga, then return it to the battlefield transformed under your control.
|
// III — Exile this Saga, then return it to the battlefield transformed under your control.
|
||||||
this.addAbility(new TransformAbility());
|
sagaAbility.addChapterEffect(getLeftHalfCard(), SagaChapter.CHAPTER_III, new ExileSagaAndReturnTransformedEffect());
|
||||||
sagaAbility.addChapterEffect(this, SagaChapter.CHAPTER_III, new ExileSagaAndReturnTransformedEffect());
|
this.getLeftHalfCard().addAbility(sagaAbility);
|
||||||
|
|
||||||
this.addAbility(sagaAbility);
|
// Imperial Moth
|
||||||
|
this.getRightHalfCard().setPT(2, 4);
|
||||||
|
|
||||||
|
// Flying
|
||||||
|
this.getRightHalfCard().addAbility(FlyingAbility.getInstance());
|
||||||
}
|
}
|
||||||
|
|
||||||
private BefriendingTheMoths(final BefriendingTheMoths card) {
|
private BefriendingTheMoths(final BefriendingTheMoths card) {
|
||||||
|
|
|
||||||
|
|
@ -1,15 +1,19 @@
|
||||||
package mage.cards.b;
|
package mage.cards.b;
|
||||||
|
|
||||||
import mage.abilities.common.SagaAbility;
|
import mage.abilities.common.SagaAbility;
|
||||||
|
import mage.abilities.common.SimpleStaticAbility;
|
||||||
import mage.abilities.condition.common.HeckbentCondition;
|
import mage.abilities.condition.common.HeckbentCondition;
|
||||||
import mage.abilities.decorator.ConditionalOneShotEffect;
|
import mage.abilities.decorator.ConditionalOneShotEffect;
|
||||||
|
import mage.abilities.dynamicvalue.common.CardsInControllerHandCount;
|
||||||
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
|
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
|
||||||
import mage.abilities.effects.common.ExileSagaAndReturnTransformedEffect;
|
import mage.abilities.effects.common.ExileSagaAndReturnTransformedEffect;
|
||||||
import mage.abilities.effects.common.continuous.BoostAllEffect;
|
import mage.abilities.effects.common.continuous.BoostAllEffect;
|
||||||
|
import mage.abilities.effects.common.continuous.BoostSourceEffect;
|
||||||
import mage.abilities.effects.keyword.ScryEffect;
|
import mage.abilities.effects.keyword.ScryEffect;
|
||||||
import mage.abilities.keyword.TransformAbility;
|
import mage.abilities.keyword.FlyingAbility;
|
||||||
import mage.cards.CardImpl;
|
import mage.abilities.keyword.TrampleAbility;
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
|
import mage.cards.TransformingDoubleFacedCard;
|
||||||
import mage.constants.CardType;
|
import mage.constants.CardType;
|
||||||
import mage.constants.Duration;
|
import mage.constants.Duration;
|
||||||
import mage.constants.SagaChapter;
|
import mage.constants.SagaChapter;
|
||||||
|
|
@ -21,35 +25,49 @@ import java.util.UUID;
|
||||||
/**
|
/**
|
||||||
* @author TheElk801
|
* @author TheElk801
|
||||||
*/
|
*/
|
||||||
public final class BeholdTheUnspeakable extends CardImpl {
|
public final class BeholdTheUnspeakable extends TransformingDoubleFacedCard {
|
||||||
|
|
||||||
public BeholdTheUnspeakable(UUID ownerId, CardSetInfo setInfo) {
|
public BeholdTheUnspeakable(UUID ownerId, CardSetInfo setInfo) {
|
||||||
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{3}{U}{U}");
|
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, new SubType[]{SubType.SAGA}, "{3}{U}{U}",
|
||||||
|
"Vision of the Unspeakable",
|
||||||
this.subtype.add(SubType.SAGA);
|
new CardType[]{CardType.ENCHANTMENT, CardType.CREATURE}, new SubType[]{SubType.SPIRIT}, "U");
|
||||||
this.secondSideCardClazz = mage.cards.v.VisionOfTheUnspeakable.class;
|
|
||||||
|
|
||||||
|
// Behold the Unspeakable
|
||||||
// (As this Saga enters and after your draw step, add a lore counter.)
|
// (As this Saga enters and after your draw step, add a lore counter.)
|
||||||
SagaAbility sagaAbility = new SagaAbility(this);
|
SagaAbility sagaAbility = new SagaAbility(getLeftHalfCard());
|
||||||
|
|
||||||
// I — Creatures you don't control get -2/-0 until your next turn.
|
// I — Creatures you don't control get -2/-0 until your next turn.
|
||||||
sagaAbility.addChapterEffect(this, SagaChapter.CHAPTER_I, new BoostAllEffect(
|
sagaAbility.addChapterEffect(getLeftHalfCard(), SagaChapter.CHAPTER_I, new BoostAllEffect(
|
||||||
-2, 0, Duration.UntilYourNextTurn,
|
-2, 0, Duration.UntilYourNextTurn,
|
||||||
StaticFilters.FILTER_CREATURES_YOU_DONT_CONTROL, false
|
StaticFilters.FILTER_CREATURES_YOU_DONT_CONTROL, false
|
||||||
));
|
));
|
||||||
|
|
||||||
// II — If you have one or fewer cards in hand, draw four cards. Otherwise, scry 2, then draw two cards.
|
// II — If you have one or fewer cards in hand, draw four cards. Otherwise, scry 2, then draw two cards.
|
||||||
sagaAbility.addChapterEffect(this, SagaChapter.CHAPTER_II, new ConditionalOneShotEffect(
|
sagaAbility.addChapterEffect(getLeftHalfCard(), SagaChapter.CHAPTER_II, new ConditionalOneShotEffect(
|
||||||
new DrawCardSourceControllerEffect(4), new ScryEffect(2),
|
new DrawCardSourceControllerEffect(4), new ScryEffect(2),
|
||||||
HeckbentCondition.instance, "if you have one or fewer cards in hand, " +
|
HeckbentCondition.instance, "if you have one or fewer cards in hand, " +
|
||||||
"draw four cards. Otherwise, scry 2, then draw two cards"
|
"draw four cards. Otherwise, scry 2, then draw two cards"
|
||||||
).addOtherwiseEffect(new DrawCardSourceControllerEffect(2)));
|
).addOtherwiseEffect(new DrawCardSourceControllerEffect(2)));
|
||||||
|
|
||||||
// III — Exile this Saga, then return it to the battlefield transformed under your control.
|
// III — Exile this Saga, then return it to the battlefield transformed under your control.
|
||||||
this.addAbility(new TransformAbility());
|
sagaAbility.addChapterEffect(getLeftHalfCard(), SagaChapter.CHAPTER_III, new ExileSagaAndReturnTransformedEffect());
|
||||||
sagaAbility.addChapterEffect(this, SagaChapter.CHAPTER_III, new ExileSagaAndReturnTransformedEffect());
|
this.getLeftHalfCard().addAbility(sagaAbility);
|
||||||
|
|
||||||
this.addAbility(sagaAbility);
|
// Vision of the Unspeakable
|
||||||
|
this.getRightHalfCard().setPT(0, 0);
|
||||||
|
|
||||||
|
// Flying
|
||||||
|
this.getRightHalfCard().addAbility(FlyingAbility.getInstance());
|
||||||
|
|
||||||
|
// Trample
|
||||||
|
this.getRightHalfCard().addAbility(TrampleAbility.getInstance());
|
||||||
|
|
||||||
|
// Vision of the Unspeakable gets +1/+1 for each card in your hand.
|
||||||
|
this.getRightHalfCard().addAbility(new SimpleStaticAbility(new BoostSourceEffect(
|
||||||
|
CardsInControllerHandCount.ANY_SINGULAR,
|
||||||
|
CardsInControllerHandCount.ANY_SINGULAR,
|
||||||
|
Duration.WhileOnBattlefield
|
||||||
|
)));
|
||||||
}
|
}
|
||||||
|
|
||||||
private BeholdTheUnspeakable(final BeholdTheUnspeakable card) {
|
private BeholdTheUnspeakable(final BeholdTheUnspeakable card) {
|
||||||
|
|
|
||||||
|
|
@ -42,7 +42,7 @@ public final class BeifongsBountyHunters extends CardImpl {
|
||||||
|
|
||||||
// Whenever a nonland creature you control dies, earthbend X, where X is that creature's power.
|
// Whenever a nonland creature you control dies, earthbend X, where X is that creature's power.
|
||||||
Ability ability = new DiesCreatureTriggeredAbility(
|
Ability ability = new DiesCreatureTriggeredAbility(
|
||||||
new EarthbendTargetEffect(BeifongsBountyHuntersValue.instance), false, filter
|
new EarthbendTargetEffect(BeifongsBountyHuntersValue.instance, true), false, filter
|
||||||
);
|
);
|
||||||
ability.addTarget(new TargetControlledLandPermanent());
|
ability.addTarget(new TargetControlledLandPermanent());
|
||||||
this.addAbility(ability);
|
this.addAbility(ability);
|
||||||
|
|
|
||||||
|
|
@ -1,35 +0,0 @@
|
||||||
package mage.cards.b;
|
|
||||||
|
|
||||||
import mage.abilities.common.SimpleStaticAbility;
|
|
||||||
import mage.abilities.effects.common.continuous.BoostControlledEffect;
|
|
||||||
import mage.cards.CardImpl;
|
|
||||||
import mage.cards.CardSetInfo;
|
|
||||||
import mage.constants.CardType;
|
|
||||||
import mage.constants.Duration;
|
|
||||||
|
|
||||||
import java.util.UUID;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author TheElk801
|
|
||||||
*/
|
|
||||||
public final class BelenonWarAnthem extends CardImpl {
|
|
||||||
|
|
||||||
public BelenonWarAnthem(UUID ownerId, CardSetInfo setInfo) {
|
|
||||||
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "");
|
|
||||||
|
|
||||||
this.color.setWhite(true);
|
|
||||||
this.nightCard = true;
|
|
||||||
|
|
||||||
// Creatures you control get +1/+1.
|
|
||||||
this.addAbility(new SimpleStaticAbility(new BoostControlledEffect(1, 1, Duration.WhileOnBattlefield)));
|
|
||||||
}
|
|
||||||
|
|
||||||
private BelenonWarAnthem(final BelenonWarAnthem card) {
|
|
||||||
super(card);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public BelenonWarAnthem copy() {
|
|
||||||
return new BelenonWarAnthem(this);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,10 +1,10 @@
|
||||||
package mage.cards.b;
|
package mage.cards.b;
|
||||||
|
|
||||||
import mage.MageInt;
|
|
||||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
|
||||||
import mage.abilities.keyword.DisturbAbility;
|
import mage.abilities.keyword.DisturbAbility;
|
||||||
import mage.cards.CardImpl;
|
import mage.abilities.keyword.FlyingAbility;
|
||||||
|
import mage.abilities.keyword.VigilanceAbility;
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
|
import mage.cards.TransformingDoubleFacedCard;
|
||||||
import mage.constants.CardType;
|
import mage.constants.CardType;
|
||||||
import mage.constants.SubType;
|
import mage.constants.SubType;
|
||||||
|
|
||||||
|
|
@ -13,20 +13,27 @@ import java.util.UUID;
|
||||||
/**
|
/**
|
||||||
* @author weirddan455
|
* @author weirddan455
|
||||||
*/
|
*/
|
||||||
public final class BelovedBeggar extends CardImpl {
|
public final class BelovedBeggar extends TransformingDoubleFacedCard {
|
||||||
|
|
||||||
public BelovedBeggar(UUID ownerId, CardSetInfo setInfo) {
|
public BelovedBeggar(UUID ownerId, CardSetInfo setInfo) {
|
||||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{W}");
|
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, new SubType[]{SubType.HUMAN, SubType.PEASANT}, "{1}{W}",
|
||||||
|
"Generous Soul",
|
||||||
this.subtype.add(SubType.HUMAN);
|
new CardType[]{CardType.CREATURE}, new SubType[]{SubType.SPIRIT}, "W");
|
||||||
this.subtype.add(SubType.PEASANT);
|
this.getLeftHalfCard().setPT(0, 4);
|
||||||
this.power = new MageInt(0);
|
this.getRightHalfCard().setPT(4, 4);
|
||||||
this.toughness = new MageInt(4);
|
|
||||||
|
|
||||||
this.secondSideCardClazz = mage.cards.g.GenerousSoul.class;
|
|
||||||
|
|
||||||
// Disturb {4}{W}{W}
|
// Disturb {4}{W}{W}
|
||||||
this.addAbility(new DisturbAbility(this, "{4}{W}{W}"));
|
this.getLeftHalfCard().addAbility(new DisturbAbility(this, "{4}{W}{W}"));
|
||||||
|
|
||||||
|
// Generous Soul
|
||||||
|
// Flying
|
||||||
|
this.getRightHalfCard().addAbility(FlyingAbility.getInstance());
|
||||||
|
|
||||||
|
// Vigilance
|
||||||
|
this.getRightHalfCard().addAbility(VigilanceAbility.getInstance());
|
||||||
|
|
||||||
|
// If Generous Soul would be put into a graveyard from anywhere, exile it instead.
|
||||||
|
this.getRightHalfCard().addAbility(DisturbAbility.makeBackAbility());
|
||||||
}
|
}
|
||||||
|
|
||||||
private BelovedBeggar(final BelovedBeggar card) {
|
private BelovedBeggar(final BelovedBeggar card) {
|
||||||
|
|
|
||||||
|
|
@ -39,7 +39,7 @@ public final class BenBenAkkiHermit extends CardImpl {
|
||||||
|
|
||||||
this.power = new MageInt(1);
|
this.power = new MageInt(1);
|
||||||
this.toughness = new MageInt(1);
|
this.toughness = new MageInt(1);
|
||||||
Ability ability = new SimpleActivatedAbility(new DamageTargetEffect(new PermanentsOnBattlefieldCount(filter), true), new TapSourceCost());
|
Ability ability = new SimpleActivatedAbility(new DamageTargetEffect(new PermanentsOnBattlefieldCount(filter)), new TapSourceCost());
|
||||||
ability.addTarget(new TargetAttackingCreature());
|
ability.addTarget(new TargetAttackingCreature());
|
||||||
this.addAbility(ability);
|
this.addAbility(ability);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,37 +1,56 @@
|
||||||
package mage.cards.b;
|
package mage.cards.b;
|
||||||
|
|
||||||
import mage.MageInt;
|
import mage.abilities.Ability;
|
||||||
|
import mage.abilities.common.AttacksTriggeredAbility;
|
||||||
import mage.abilities.common.DiesCreatureTriggeredAbility;
|
import mage.abilities.common.DiesCreatureTriggeredAbility;
|
||||||
|
import mage.abilities.effects.common.ReturnFromGraveyardToBattlefieldTargetEffect;
|
||||||
import mage.abilities.effects.common.TransformSourceEffect;
|
import mage.abilities.effects.common.TransformSourceEffect;
|
||||||
import mage.abilities.keyword.TransformAbility;
|
|
||||||
import mage.cards.CardImpl;
|
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
|
import mage.cards.TransformingDoubleFacedCard;
|
||||||
import mage.constants.CardType;
|
import mage.constants.CardType;
|
||||||
|
import mage.constants.ComparisonType;
|
||||||
import mage.constants.SubType;
|
import mage.constants.SubType;
|
||||||
|
import mage.filter.FilterCard;
|
||||||
import mage.filter.StaticFilters;
|
import mage.filter.StaticFilters;
|
||||||
|
import mage.filter.common.FilterCreatureCard;
|
||||||
|
import mage.filter.predicate.mageobject.ManaValuePredicate;
|
||||||
|
import mage.target.common.TargetCardInYourGraveyard;
|
||||||
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author TheElk801
|
* @author TheElk801
|
||||||
*/
|
*/
|
||||||
public final class BereavedSurvivor extends CardImpl {
|
public final class BereavedSurvivor extends TransformingDoubleFacedCard {
|
||||||
|
|
||||||
|
private static final FilterCard filter
|
||||||
|
= new FilterCreatureCard("creature card with mana value 2 or less from your graveyard");
|
||||||
|
|
||||||
|
static {
|
||||||
|
filter.add(new ManaValuePredicate(ComparisonType.FEWER_THAN, 3));
|
||||||
|
}
|
||||||
public BereavedSurvivor(UUID ownerId, CardSetInfo setInfo) {
|
public BereavedSurvivor(UUID ownerId, CardSetInfo setInfo) {
|
||||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{W}");
|
super(ownerId, setInfo,
|
||||||
|
new CardType[]{CardType.CREATURE}, new SubType[]{SubType.HUMAN, SubType.PEASANT}, "{2}{W}",
|
||||||
|
"Dauntless Avenger",
|
||||||
|
new CardType[]{CardType.CREATURE}, new SubType[]{SubType.HUMAN, SubType.SOLDIER}, "W");
|
||||||
|
|
||||||
this.subtype.add(SubType.HUMAN);
|
// Bereaved Survivor
|
||||||
this.subtype.add(SubType.PEASANT);
|
this.getLeftHalfCard().setPT(2, 1);
|
||||||
this.power = new MageInt(2);
|
|
||||||
this.toughness = new MageInt(1);
|
|
||||||
this.secondSideCardClazz = mage.cards.d.DauntlessAvenger.class;
|
|
||||||
|
|
||||||
// When another creature you control dies, transform Bereaved Survivor.
|
// When another creature you control dies, transform Bereaved Survivor.
|
||||||
this.addAbility(new TransformAbility());
|
this.getLeftHalfCard().addAbility(new DiesCreatureTriggeredAbility(
|
||||||
this.addAbility(new DiesCreatureTriggeredAbility(
|
|
||||||
new TransformSourceEffect(), false,
|
new TransformSourceEffect(), false,
|
||||||
StaticFilters.FILTER_CONTROLLED_ANOTHER_CREATURE
|
StaticFilters.FILTER_CONTROLLED_ANOTHER_CREATURE
|
||||||
).setTriggerPhrase("When another creature you control dies, "));
|
).setTriggerPhrase("When another creature you control dies, "));
|
||||||
|
|
||||||
|
// Dauntless Avenger
|
||||||
|
this.getRightHalfCard().setPT(3, 2);
|
||||||
|
|
||||||
|
// Whenever Dauntless Avenger attacks, return target creature card with mana value 2 or less from your graveyard to the battlefield tapped and attacking.
|
||||||
|
Ability ability = new AttacksTriggeredAbility(new ReturnFromGraveyardToBattlefieldTargetEffect(true, true));
|
||||||
|
ability.addTarget(new TargetCardInYourGraveyard(filter));
|
||||||
|
this.getRightHalfCard().addAbility(ability);
|
||||||
}
|
}
|
||||||
|
|
||||||
private BereavedSurvivor(final BereavedSurvivor card) {
|
private BereavedSurvivor(final BereavedSurvivor card) {
|
||||||
|
|
|
||||||
|
|
@ -1,15 +1,20 @@
|
||||||
package mage.cards.b;
|
package mage.cards.b;
|
||||||
|
|
||||||
import mage.MageInt;
|
|
||||||
import mage.abilities.Ability;
|
import mage.abilities.Ability;
|
||||||
import mage.abilities.common.AttacksTriggeredAbility;
|
import mage.abilities.common.AttacksTriggeredAbility;
|
||||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
import mage.abilities.common.SimpleStaticAbility;
|
||||||
|
import mage.abilities.effects.common.AttachEffect;
|
||||||
|
import mage.abilities.effects.common.continuous.BoostEnchantedEffect;
|
||||||
import mage.abilities.effects.common.continuous.BoostTargetEffect;
|
import mage.abilities.effects.common.continuous.BoostTargetEffect;
|
||||||
import mage.abilities.keyword.DisturbAbility;
|
import mage.abilities.keyword.DisturbAbility;
|
||||||
import mage.cards.CardImpl;
|
import mage.abilities.keyword.EnchantAbility;
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
|
import mage.cards.TransformingDoubleFacedCard;
|
||||||
import mage.constants.CardType;
|
import mage.constants.CardType;
|
||||||
|
import mage.constants.Outcome;
|
||||||
import mage.constants.SubType;
|
import mage.constants.SubType;
|
||||||
|
import mage.target.TargetPermanent;
|
||||||
|
import mage.target.common.TargetCreaturePermanent;
|
||||||
import mage.target.common.TargetOpponentsCreaturePermanent;
|
import mage.target.common.TargetOpponentsCreaturePermanent;
|
||||||
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
|
@ -17,23 +22,38 @@ import java.util.UUID;
|
||||||
/**
|
/**
|
||||||
* @author TheElk801
|
* @author TheElk801
|
||||||
*/
|
*/
|
||||||
public final class BindingGeist extends CardImpl {
|
public final class BindingGeist extends TransformingDoubleFacedCard {
|
||||||
|
|
||||||
public BindingGeist(UUID ownerId, CardSetInfo setInfo) {
|
public BindingGeist(UUID ownerId, CardSetInfo setInfo) {
|
||||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{U}");
|
super(ownerId, setInfo,
|
||||||
|
new CardType[]{CardType.CREATURE}, new SubType[]{SubType.SPIRIT}, "{2}{U}",
|
||||||
|
"Spectral Binding",
|
||||||
|
new CardType[]{CardType.ENCHANTMENT}, new SubType[]{SubType.AURA}, "U");
|
||||||
|
|
||||||
this.subtype.add(SubType.SPIRIT);
|
// Binding Geist
|
||||||
this.power = new MageInt(3);
|
this.getLeftHalfCard().setPT(3, 1);
|
||||||
this.toughness = new MageInt(1);
|
|
||||||
this.secondSideCardClazz = mage.cards.s.SpectralBinding.class;
|
|
||||||
|
|
||||||
// Whenever Binding Geist attacks, target creature an opponent controls gets -2/-0 until end of turn.
|
// Whenever Binding Geist attacks, target creature an opponent controls gets -2/-0 until end of turn.
|
||||||
Ability ability = new AttacksTriggeredAbility(new BoostTargetEffect(-2, 0));
|
Ability ability = new AttacksTriggeredAbility(new BoostTargetEffect(-2, 0));
|
||||||
ability.addTarget(new TargetOpponentsCreaturePermanent());
|
ability.addTarget(new TargetOpponentsCreaturePermanent());
|
||||||
this.addAbility(ability);
|
this.getLeftHalfCard().addAbility(ability);
|
||||||
|
|
||||||
|
// Spectral Binding
|
||||||
|
// Enchant creature
|
||||||
|
TargetPermanent auraTarget = new TargetCreaturePermanent();
|
||||||
|
this.getSpellAbility().addTarget(auraTarget);
|
||||||
|
this.getSpellAbility().addEffect(new AttachEffect(Outcome.BoostCreature));
|
||||||
|
this.getRightHalfCard().addAbility(new EnchantAbility(auraTarget));
|
||||||
|
|
||||||
// Disturb {1}{U}
|
// Disturb {1}{U}
|
||||||
this.addAbility(new DisturbAbility(this, "{1}{U}"));
|
// needs to be added after right half has spell ability target set
|
||||||
|
this.getLeftHalfCard().addAbility(new DisturbAbility(this, "{1}{U}"));
|
||||||
|
|
||||||
|
// Enchanted creature gets -2/-0.
|
||||||
|
this.getRightHalfCard().addAbility(new SimpleStaticAbility(new BoostEnchantedEffect(-2, 0)));
|
||||||
|
|
||||||
|
// If Spectral Binding would be put into a graveyard from anywhere, exile it instead.
|
||||||
|
this.getRightHalfCard().addAbility(DisturbAbility.makeBackAbility());
|
||||||
}
|
}
|
||||||
|
|
||||||
private BindingGeist(final BindingGeist card) {
|
private BindingGeist(final BindingGeist card) {
|
||||||
|
|
|
||||||
|
|
@ -1,22 +1,22 @@
|
||||||
package mage.cards.b;
|
package mage.cards.b;
|
||||||
|
|
||||||
import mage.MageInt;
|
|
||||||
import mage.abilities.Ability;
|
import mage.abilities.Ability;
|
||||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||||
import mage.abilities.common.SacrificeSourceTriggeredAbility;
|
import mage.abilities.common.SacrificeSourceTriggeredAbility;
|
||||||
|
import mage.abilities.common.SimpleActivatedAbility;
|
||||||
import mage.abilities.common.delayed.AtTheBeginOfNextEndStepDelayedTriggeredAbility;
|
import mage.abilities.common.delayed.AtTheBeginOfNextEndStepDelayedTriggeredAbility;
|
||||||
|
import mage.abilities.costs.common.SacrificeTargetCost;
|
||||||
import mage.abilities.effects.OneShotEffect;
|
import mage.abilities.effects.OneShotEffect;
|
||||||
import mage.abilities.effects.common.CreateDelayedTriggeredAbilityEffect;
|
import mage.abilities.effects.common.CreateDelayedTriggeredAbilityEffect;
|
||||||
|
import mage.abilities.effects.common.combat.CantBeBlockedSourceEffect;
|
||||||
import mage.abilities.effects.keyword.ScryEffect;
|
import mage.abilities.effects.keyword.ScryEffect;
|
||||||
import mage.abilities.keyword.DefenderAbility;
|
import mage.abilities.keyword.DefenderAbility;
|
||||||
import mage.abilities.keyword.TransformAbility;
|
import mage.abilities.keyword.TransformAbility;
|
||||||
import mage.cards.Card;
|
import mage.cards.Card;
|
||||||
import mage.cards.CardImpl;
|
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
import mage.constants.CardType;
|
import mage.cards.TransformingDoubleFacedCard;
|
||||||
import mage.constants.Outcome;
|
import mage.constants.*;
|
||||||
import mage.constants.SubType;
|
import mage.filter.common.FilterControlledPermanent;
|
||||||
import mage.constants.Zone;
|
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
import mage.players.Player;
|
import mage.players.Player;
|
||||||
|
|
||||||
|
|
@ -25,28 +25,39 @@ import java.util.UUID;
|
||||||
/**
|
/**
|
||||||
* @author TheElk801
|
* @author TheElk801
|
||||||
*/
|
*/
|
||||||
public final class BiolumeEgg extends CardImpl {
|
public final class BiolumeEgg extends TransformingDoubleFacedCard {
|
||||||
|
|
||||||
|
private static final FilterControlledPermanent filter
|
||||||
|
= new FilterControlledPermanent(SubType.ISLAND, "Islands");
|
||||||
|
|
||||||
public BiolumeEgg(UUID ownerId, CardSetInfo setInfo) {
|
public BiolumeEgg(UUID ownerId, CardSetInfo setInfo) {
|
||||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{U}");
|
super(ownerId, setInfo,
|
||||||
|
new CardType[]{CardType.CREATURE}, new SubType[]{SubType.SERPENT, SubType.EGG}, "{2}{U}",
|
||||||
|
"Biolume Serpent",
|
||||||
|
new CardType[]{CardType.CREATURE}, new SubType[]{SubType.SERPENT}, "U");
|
||||||
|
|
||||||
this.subtype.add(SubType.SERPENT);
|
// Biolume Egg
|
||||||
this.subtype.add(SubType.EGG);
|
this.getLeftHalfCard().setPT(0, 4);
|
||||||
this.power = new MageInt(0);
|
|
||||||
this.toughness = new MageInt(4);
|
|
||||||
this.secondSideCardClazz = mage.cards.b.BiolumeSerpent.class;
|
|
||||||
|
|
||||||
// Defender
|
// Defender
|
||||||
this.addAbility(DefenderAbility.getInstance());
|
this.getLeftHalfCard().addAbility(DefenderAbility.getInstance());
|
||||||
|
|
||||||
// When Biolume Egg enters the battlefield, scry 2.
|
// When Biolume Egg enters the battlefield, scry 2.
|
||||||
this.addAbility(new EntersBattlefieldTriggeredAbility(new ScryEffect(2)));
|
this.getLeftHalfCard().addAbility(new EntersBattlefieldTriggeredAbility(new ScryEffect(2)));
|
||||||
|
|
||||||
// When you sacrifice Biolume Egg, return it to the battlefield transformed under its owner's control at the beginning of the next end step.
|
// When you sacrifice Biolume Egg, return it to the battlefield transformed under its owner's control at the beginning of the next end step.
|
||||||
this.addAbility(new TransformAbility());
|
this.getLeftHalfCard().addAbility(new SacrificeSourceTriggeredAbility(new CreateDelayedTriggeredAbilityEffect(
|
||||||
this.addAbility(new SacrificeSourceTriggeredAbility(new CreateDelayedTriggeredAbilityEffect(
|
|
||||||
new AtTheBeginOfNextEndStepDelayedTriggeredAbility(new BiolumeEggEffect()), true
|
new AtTheBeginOfNextEndStepDelayedTriggeredAbility(new BiolumeEggEffect()), true
|
||||||
).setText("return it to the battlefield transformed under its owner's control at the beginning of the next end step"), false, true));
|
).setText("return it to the battlefield transformed under its owner's control at the beginning of the next end step"), false, true));
|
||||||
|
|
||||||
|
// Biolume Serpent
|
||||||
|
this.getRightHalfCard().setPT(4, 4);
|
||||||
|
|
||||||
|
// Sacrifice two Islands: Biolume Serpent can't be blocked this turn.
|
||||||
|
this.getRightHalfCard().addAbility(new SimpleActivatedAbility(
|
||||||
|
new CantBeBlockedSourceEffect(Duration.EndOfTurn),
|
||||||
|
new SacrificeTargetCost(2, filter)
|
||||||
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
private BiolumeEgg(final BiolumeEgg card) {
|
private BiolumeEgg(final BiolumeEgg card) {
|
||||||
|
|
|
||||||
|
|
@ -1,50 +0,0 @@
|
||||||
package mage.cards.b;
|
|
||||||
|
|
||||||
import mage.MageInt;
|
|
||||||
import mage.abilities.common.SimpleActivatedAbility;
|
|
||||||
import mage.abilities.costs.common.SacrificeTargetCost;
|
|
||||||
import mage.abilities.effects.common.combat.CantBeBlockedSourceEffect;
|
|
||||||
import mage.cards.CardImpl;
|
|
||||||
import mage.cards.CardSetInfo;
|
|
||||||
import mage.constants.CardType;
|
|
||||||
import mage.constants.Duration;
|
|
||||||
import mage.constants.SubType;
|
|
||||||
import mage.filter.common.FilterControlledPermanent;
|
|
||||||
import mage.target.common.TargetControlledPermanent;
|
|
||||||
import mage.target.common.TargetSacrifice;
|
|
||||||
|
|
||||||
import java.util.UUID;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author TheElk801
|
|
||||||
*/
|
|
||||||
public final class BiolumeSerpent extends CardImpl {
|
|
||||||
|
|
||||||
private static final FilterControlledPermanent filter
|
|
||||||
= new FilterControlledPermanent(SubType.ISLAND, "Islands");
|
|
||||||
|
|
||||||
public BiolumeSerpent(UUID ownerId, CardSetInfo setInfo) {
|
|
||||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "");
|
|
||||||
|
|
||||||
this.subtype.add(SubType.SERPENT);
|
|
||||||
this.power = new MageInt(4);
|
|
||||||
this.toughness = new MageInt(4);
|
|
||||||
this.color.setBlue(true);
|
|
||||||
this.nightCard = true;
|
|
||||||
|
|
||||||
// Sacrifice two Islands: Biolume Serpent can't be blocked this turn.
|
|
||||||
this.addAbility(new SimpleActivatedAbility(
|
|
||||||
new CantBeBlockedSourceEffect(Duration.EndOfTurn),
|
|
||||||
new SacrificeTargetCost(2, filter)
|
|
||||||
));
|
|
||||||
}
|
|
||||||
|
|
||||||
private BiolumeSerpent(final BiolumeSerpent card) {
|
|
||||||
super(card);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public BiolumeSerpent copy() {
|
|
||||||
return new BiolumeSerpent(this);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,10 +1,10 @@
|
||||||
package mage.cards.b;
|
package mage.cards.b;
|
||||||
|
|
||||||
import mage.MageInt;
|
|
||||||
import mage.abilities.keyword.DayboundAbility;
|
import mage.abilities.keyword.DayboundAbility;
|
||||||
|
import mage.abilities.keyword.NightboundAbility;
|
||||||
import mage.abilities.keyword.ReachAbility;
|
import mage.abilities.keyword.ReachAbility;
|
||||||
import mage.cards.CardImpl;
|
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
|
import mage.cards.TransformingDoubleFacedCard;
|
||||||
import mage.constants.CardType;
|
import mage.constants.CardType;
|
||||||
import mage.constants.SubType;
|
import mage.constants.SubType;
|
||||||
|
|
||||||
|
|
@ -13,23 +13,31 @@ import java.util.UUID;
|
||||||
/**
|
/**
|
||||||
* @author TheElk801
|
* @author TheElk801
|
||||||
*/
|
*/
|
||||||
public final class BirdAdmirer extends CardImpl {
|
public final class BirdAdmirer extends TransformingDoubleFacedCard {
|
||||||
|
|
||||||
public BirdAdmirer(UUID ownerId, CardSetInfo setInfo) {
|
public BirdAdmirer(UUID ownerId, CardSetInfo setInfo) {
|
||||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{G}");
|
super(ownerId, setInfo,
|
||||||
|
new CardType[]{CardType.CREATURE}, new SubType[]{SubType.HUMAN, SubType.ARCHER, SubType.WEREWOLF}, "{2}{G}",
|
||||||
|
"Wing Shredder",
|
||||||
|
new CardType[]{CardType.CREATURE}, new SubType[]{SubType.WEREWOLF}, "G");
|
||||||
|
|
||||||
this.subtype.add(SubType.HUMAN);
|
// Bird Admirer
|
||||||
this.subtype.add(SubType.ARCHER);
|
this.getLeftHalfCard().setPT(1, 4);
|
||||||
this.subtype.add(SubType.WEREWOLF);
|
|
||||||
this.power = new MageInt(1);
|
|
||||||
this.toughness = new MageInt(4);
|
|
||||||
this.secondSideCardClazz = mage.cards.w.WingShredder.class;
|
|
||||||
|
|
||||||
// Reach
|
// Reach
|
||||||
this.addAbility(ReachAbility.getInstance());
|
this.getLeftHalfCard().addAbility(ReachAbility.getInstance());
|
||||||
|
|
||||||
// Daybound
|
// Daybound
|
||||||
this.addAbility(new DayboundAbility());
|
this.getLeftHalfCard().addAbility(new DayboundAbility());
|
||||||
|
|
||||||
|
// Wing Shredder
|
||||||
|
this.getRightHalfCard().setPT(3, 5);
|
||||||
|
|
||||||
|
// Reach
|
||||||
|
this.getRightHalfCard().addAbility(ReachAbility.getInstance());
|
||||||
|
|
||||||
|
// Nightbound
|
||||||
|
this.getRightHalfCard().addAbility(new NightboundAbility());
|
||||||
}
|
}
|
||||||
|
|
||||||
private BirdAdmirer(final BirdAdmirer card) {
|
private BirdAdmirer(final BirdAdmirer card) {
|
||||||
|
|
|
||||||
|
|
@ -1,60 +0,0 @@
|
||||||
package mage.cards.b;
|
|
||||||
|
|
||||||
import mage.MageInt;
|
|
||||||
import mage.abilities.common.SimpleActivatedAbility;
|
|
||||||
import mage.abilities.costs.common.TapTargetCost;
|
|
||||||
import mage.abilities.effects.common.continuous.AddCardTypeSourceEffect;
|
|
||||||
import mage.abilities.keyword.CrewAbility;
|
|
||||||
import mage.cards.CardImpl;
|
|
||||||
import mage.cards.CardSetInfo;
|
|
||||||
import mage.constants.CardType;
|
|
||||||
import mage.constants.Duration;
|
|
||||||
import mage.constants.SubType;
|
|
||||||
import mage.filter.common.FilterControlledArtifactPermanent;
|
|
||||||
import mage.filter.common.FilterControlledPermanent;
|
|
||||||
import mage.filter.predicate.mageobject.AnotherPredicate;
|
|
||||||
import mage.filter.predicate.permanent.TappedPredicate;
|
|
||||||
import mage.target.common.TargetControlledPermanent;
|
|
||||||
|
|
||||||
import java.util.UUID;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author TheElk801
|
|
||||||
*/
|
|
||||||
public final class BladewheelChariot extends CardImpl {
|
|
||||||
|
|
||||||
private static final FilterControlledPermanent filter
|
|
||||||
= new FilterControlledArtifactPermanent("other untapped artifacts you control");
|
|
||||||
|
|
||||||
static {
|
|
||||||
filter.add(AnotherPredicate.instance);
|
|
||||||
filter.add(TappedPredicate.UNTAPPED);
|
|
||||||
}
|
|
||||||
|
|
||||||
public BladewheelChariot(UUID ownerId, CardSetInfo setInfo) {
|
|
||||||
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "");
|
|
||||||
|
|
||||||
this.subtype.add(SubType.VEHICLE);
|
|
||||||
this.power = new MageInt(5);
|
|
||||||
this.toughness = new MageInt(5);
|
|
||||||
this.nightCard = true;
|
|
||||||
this.color.setWhite(true);
|
|
||||||
|
|
||||||
// Tap two other untapped artifacts you control: Bladewheel Chariot becomes an artifact creature until end of turn.
|
|
||||||
this.addAbility(new SimpleActivatedAbility(new AddCardTypeSourceEffect(
|
|
||||||
Duration.EndOfTurn, CardType.ARTIFACT, CardType.CREATURE
|
|
||||||
).setText("{this} becomes an artifact creature until end of turn"), new TapTargetCost(new TargetControlledPermanent(2, filter))));
|
|
||||||
|
|
||||||
// Crew 1
|
|
||||||
this.addAbility(new CrewAbility(1));
|
|
||||||
}
|
|
||||||
|
|
||||||
private BladewheelChariot(final BladewheelChariot card) {
|
|
||||||
super(card);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public BladewheelChariot copy() {
|
|
||||||
return new BladewheelChariot(this);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,33 +1,48 @@
|
||||||
package mage.cards.b;
|
package mage.cards.b;
|
||||||
|
|
||||||
import mage.MageInt;
|
|
||||||
import mage.abilities.common.ActivateAsSorceryActivatedAbility;
|
import mage.abilities.common.ActivateAsSorceryActivatedAbility;
|
||||||
|
import mage.abilities.common.DiesSourceTriggeredAbility;
|
||||||
|
import mage.abilities.common.TransformIntoSourceTriggeredAbility;
|
||||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||||
|
import mage.abilities.effects.common.CreateTokenEffect;
|
||||||
import mage.abilities.effects.common.TransformSourceEffect;
|
import mage.abilities.effects.common.TransformSourceEffect;
|
||||||
import mage.abilities.keyword.TransformAbility;
|
import mage.abilities.meta.OrTriggeredAbility;
|
||||||
import mage.cards.CardImpl;
|
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
|
import mage.cards.TransformingDoubleFacedCard;
|
||||||
import mage.constants.CardType;
|
import mage.constants.CardType;
|
||||||
import mage.constants.SubType;
|
import mage.constants.SubType;
|
||||||
|
import mage.constants.Zone;
|
||||||
|
import mage.game.permanent.token.PhyrexianSaprolingToken;
|
||||||
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author TheElk801
|
* @author TheElk801
|
||||||
*/
|
*/
|
||||||
public final class BlightreaperThallid extends CardImpl {
|
public final class BlightreaperThallid extends TransformingDoubleFacedCard {
|
||||||
|
|
||||||
public BlightreaperThallid(UUID ownerId, CardSetInfo setInfo) {
|
public BlightreaperThallid(UUID ownerId, CardSetInfo setInfo) {
|
||||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{B}");
|
super(ownerId, setInfo,
|
||||||
|
new CardType[]{CardType.CREATURE}, new SubType[]{SubType.FUNGUS}, "{1}{B}",
|
||||||
|
"Blightsower Thallid",
|
||||||
|
new CardType[]{CardType.CREATURE}, new SubType[]{SubType.PHYREXIAN, SubType.FUNGUS}, "BG");
|
||||||
|
|
||||||
this.subtype.add(SubType.FUNGUS);
|
// Blightreaper Thallid
|
||||||
this.power = new MageInt(2);
|
this.getLeftHalfCard().setPT(2, 2);
|
||||||
this.toughness = new MageInt(2);
|
|
||||||
this.secondSideCardClazz = mage.cards.b.BlightsowerThallid.class;
|
|
||||||
|
|
||||||
// {3}{G/P}: Transform Blightreaper Thallid. Activate only as a sorcery.
|
// {3}{G/P}: Transform Blightreaper Thallid. Activate only as a sorcery.
|
||||||
this.addAbility(new TransformAbility());
|
this.getLeftHalfCard().addAbility(new ActivateAsSorceryActivatedAbility(new TransformSourceEffect(), new ManaCostsImpl<>("{3}{G/P}")));
|
||||||
this.addAbility(new ActivateAsSorceryActivatedAbility(new TransformSourceEffect(), new ManaCostsImpl<>("{3}{G/P}")));
|
|
||||||
|
// Blightsower Thallid
|
||||||
|
this.getRightHalfCard().setPT(3, 3);
|
||||||
|
|
||||||
|
// When this creature transforms into Blightsower Thallid or dies, create a 1/1 green Phyrexian Saproling creature token.
|
||||||
|
this.getRightHalfCard().addAbility(new OrTriggeredAbility(
|
||||||
|
Zone.BATTLEFIELD, new CreateTokenEffect(new PhyrexianSaprolingToken()), false,
|
||||||
|
"When this creature transforms into {this} or dies, ",
|
||||||
|
new TransformIntoSourceTriggeredAbility(null),
|
||||||
|
new DiesSourceTriggeredAbility(null, false)
|
||||||
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
private BlightreaperThallid(final BlightreaperThallid card) {
|
private BlightreaperThallid(final BlightreaperThallid card) {
|
||||||
|
|
|
||||||
|
|
@ -1,50 +0,0 @@
|
||||||
package mage.cards.b;
|
|
||||||
|
|
||||||
import mage.MageInt;
|
|
||||||
import mage.abilities.common.DiesSourceTriggeredAbility;
|
|
||||||
import mage.abilities.common.TransformIntoSourceTriggeredAbility;
|
|
||||||
import mage.abilities.effects.common.CreateTokenEffect;
|
|
||||||
import mage.abilities.meta.OrTriggeredAbility;
|
|
||||||
import mage.cards.CardImpl;
|
|
||||||
import mage.cards.CardSetInfo;
|
|
||||||
import mage.constants.CardType;
|
|
||||||
import mage.constants.SubType;
|
|
||||||
import mage.constants.Zone;
|
|
||||||
import mage.game.permanent.token.PhyrexianSaprolingToken;
|
|
||||||
|
|
||||||
import java.util.UUID;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author TheElk801
|
|
||||||
*/
|
|
||||||
public final class BlightsowerThallid extends CardImpl {
|
|
||||||
|
|
||||||
public BlightsowerThallid(UUID ownerId, CardSetInfo setInfo) {
|
|
||||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "");
|
|
||||||
|
|
||||||
this.subtype.add(SubType.PHYREXIAN);
|
|
||||||
this.subtype.add(SubType.FUNGUS);
|
|
||||||
this.power = new MageInt(3);
|
|
||||||
this.toughness = new MageInt(3);
|
|
||||||
this.color.setBlack(true);
|
|
||||||
this.color.setGreen(true);
|
|
||||||
this.nightCard = true;
|
|
||||||
|
|
||||||
// When this creature transforms into Blightsower Thallid or dies, create a 1/1 green Phyrexian Saproling creature token.
|
|
||||||
this.addAbility(new OrTriggeredAbility(
|
|
||||||
Zone.BATTLEFIELD, new CreateTokenEffect(new PhyrexianSaprolingToken()), false,
|
|
||||||
"When this creature transforms into {this} or dies, ",
|
|
||||||
new TransformIntoSourceTriggeredAbility(null),
|
|
||||||
new DiesSourceTriggeredAbility(null, false)
|
|
||||||
));
|
|
||||||
}
|
|
||||||
|
|
||||||
private BlightsowerThallid(final BlightsowerThallid card) {
|
|
||||||
super(card);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public BlightsowerThallid copy() {
|
|
||||||
return new BlightsowerThallid(this);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,83 +0,0 @@
|
||||||
package mage.cards.b;
|
|
||||||
|
|
||||||
import mage.MageInt;
|
|
||||||
import mage.abilities.Ability;
|
|
||||||
import mage.abilities.triggers.BeginningOfCombatTriggeredAbility;
|
|
||||||
import mage.abilities.common.DealsCombatDamageToAPlayerTriggeredAbility;
|
|
||||||
import mage.abilities.effects.OneShotEffect;
|
|
||||||
import mage.abilities.effects.common.TransformSourceEffect;
|
|
||||||
import mage.abilities.effects.common.continuous.GainAbilitySourceEffect;
|
|
||||||
import mage.abilities.keyword.FlyingAbility;
|
|
||||||
import mage.abilities.keyword.IndestructibleAbility;
|
|
||||||
import mage.abilities.keyword.LivingMetalAbility;
|
|
||||||
import mage.cards.CardImpl;
|
|
||||||
import mage.cards.CardSetInfo;
|
|
||||||
import mage.constants.*;
|
|
||||||
import mage.game.Game;
|
|
||||||
import mage.util.RandomUtil;
|
|
||||||
|
|
||||||
import java.util.UUID;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author TheElk801
|
|
||||||
*/
|
|
||||||
public final class BlitzwingAdaptiveAssailant extends CardImpl {
|
|
||||||
|
|
||||||
public BlitzwingAdaptiveAssailant(UUID ownerId, CardSetInfo setInfo) {
|
|
||||||
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "");
|
|
||||||
|
|
||||||
this.supertype.add(SuperType.LEGENDARY);
|
|
||||||
this.subtype.add(SubType.VEHICLE);
|
|
||||||
this.power = new MageInt(3);
|
|
||||||
this.toughness = new MageInt(5);
|
|
||||||
this.color.setBlack(true);
|
|
||||||
this.nightCard = true;
|
|
||||||
|
|
||||||
// Living metal
|
|
||||||
this.addAbility(new LivingMetalAbility());
|
|
||||||
|
|
||||||
// At the beginning of combat on your turn, choose flying or indestructible at random. Blitzwing gains that ability until end of turn.
|
|
||||||
this.addAbility(new BeginningOfCombatTriggeredAbility(
|
|
||||||
new BlitzwingAdaptiveAssailantEffect()
|
|
||||||
));
|
|
||||||
|
|
||||||
// Whenever Blitzwing deals combat damage to a player, convert it.
|
|
||||||
this.addAbility(new DealsCombatDamageToAPlayerTriggeredAbility(
|
|
||||||
new TransformSourceEffect().setText("convert it"), false
|
|
||||||
));
|
|
||||||
}
|
|
||||||
|
|
||||||
private BlitzwingAdaptiveAssailant(final BlitzwingAdaptiveAssailant card) {
|
|
||||||
super(card);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public BlitzwingAdaptiveAssailant copy() {
|
|
||||||
return new BlitzwingAdaptiveAssailant(this);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
class BlitzwingAdaptiveAssailantEffect extends OneShotEffect {
|
|
||||||
|
|
||||||
BlitzwingAdaptiveAssailantEffect() {
|
|
||||||
super(Outcome.Benefit);
|
|
||||||
staticText = "choose flying or indestructible at random. {this} gains that ability until end of turn";
|
|
||||||
}
|
|
||||||
|
|
||||||
private BlitzwingAdaptiveAssailantEffect(final BlitzwingAdaptiveAssailantEffect effect) {
|
|
||||||
super(effect);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public BlitzwingAdaptiveAssailantEffect copy() {
|
|
||||||
return new BlitzwingAdaptiveAssailantEffect(this);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean apply(Game game, Ability source) {
|
|
||||||
Ability ability = RandomUtil.nextBoolean() ? FlyingAbility.getInstance() : IndestructibleAbility.getInstance();
|
|
||||||
game.informPlayers(ability.getRule() + " has been chosen");
|
|
||||||
game.addEffect(new GainAbilitySourceEffect(ability, Duration.EndOfTurn), source);
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,17 +1,24 @@
|
||||||
package mage.cards.b;
|
package mage.cards.b;
|
||||||
|
|
||||||
import mage.MageInt;
|
|
||||||
import mage.abilities.Ability;
|
import mage.abilities.Ability;
|
||||||
import mage.abilities.triggers.BeginningOfEndStepTriggeredAbility;
|
import mage.abilities.common.DealsCombatDamageToAPlayerTriggeredAbility;
|
||||||
import mage.abilities.effects.OneShotEffect;
|
import mage.abilities.effects.OneShotEffect;
|
||||||
|
import mage.abilities.effects.common.TransformSourceEffect;
|
||||||
|
import mage.abilities.effects.common.continuous.GainAbilitySourceEffect;
|
||||||
|
import mage.abilities.keyword.FlyingAbility;
|
||||||
|
import mage.abilities.keyword.IndestructibleAbility;
|
||||||
|
import mage.abilities.keyword.LivingMetalAbility;
|
||||||
import mage.abilities.keyword.MoreThanMeetsTheEyeAbility;
|
import mage.abilities.keyword.MoreThanMeetsTheEyeAbility;
|
||||||
import mage.cards.CardImpl;
|
import mage.abilities.triggers.BeginningOfCombatTriggeredAbility;
|
||||||
|
import mage.abilities.triggers.BeginningOfEndStepTriggeredAbility;
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
|
import mage.cards.TransformingDoubleFacedCard;
|
||||||
import mage.constants.*;
|
import mage.constants.*;
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
import mage.game.permanent.Permanent;
|
import mage.game.permanent.Permanent;
|
||||||
import mage.players.Player;
|
import mage.players.Player;
|
||||||
import mage.target.common.TargetOpponent;
|
import mage.target.common.TargetOpponent;
|
||||||
|
import mage.util.RandomUtil;
|
||||||
import mage.watchers.common.PlayerLostLifeWatcher;
|
import mage.watchers.common.PlayerLostLifeWatcher;
|
||||||
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
|
@ -19,26 +26,43 @@ import java.util.UUID;
|
||||||
/**
|
/**
|
||||||
* @author TheElk801
|
* @author TheElk801
|
||||||
*/
|
*/
|
||||||
public final class BlitzwingCruelTormentor extends CardImpl {
|
public final class BlitzwingCruelTormentor extends TransformingDoubleFacedCard {
|
||||||
|
|
||||||
public BlitzwingCruelTormentor(UUID ownerId, CardSetInfo setInfo) {
|
public BlitzwingCruelTormentor(UUID ownerId, CardSetInfo setInfo) {
|
||||||
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{5}{B}");
|
super(ownerId, setInfo,
|
||||||
|
new SuperType[]{SuperType.LEGENDARY}, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, new SubType[]{SubType.ROBOT}, "{5}{B}",
|
||||||
|
"Blitzwing Adaptive Assailant",
|
||||||
|
new SuperType[]{SuperType.LEGENDARY}, new CardType[]{CardType.ARTIFACT}, new SubType[]{SubType.VEHICLE}, "B");
|
||||||
|
|
||||||
this.supertype.add(SuperType.LEGENDARY);
|
|
||||||
this.subtype.add(SubType.ROBOT);
|
// Blitzwing, Cruel Tormentor
|
||||||
this.power = new MageInt(6);
|
this.getLeftHalfCard().setPT(6, 5);
|
||||||
this.toughness = new MageInt(5);
|
|
||||||
this.secondSideCardClazz = mage.cards.b.BlitzwingAdaptiveAssailant.class;
|
|
||||||
|
|
||||||
// More Than Meets the Eye {3}{B}
|
// More Than Meets the Eye {3}{B}
|
||||||
this.addAbility(new MoreThanMeetsTheEyeAbility(this, "{3}{B}"));
|
this.getLeftHalfCard().addAbility(new MoreThanMeetsTheEyeAbility(this, "{3}{B}"));
|
||||||
|
|
||||||
// At the beginning of your end step, target opponent loses life equal to the life that player lost this turn. If no life is lost this way, convert Blitzwing.
|
// At the beginning of your end step, target opponent loses life equal to the life that player lost this turn. If no life is lost this way, convert Blitzwing.
|
||||||
Ability ability = new BeginningOfEndStepTriggeredAbility(
|
Ability ability = new BeginningOfEndStepTriggeredAbility(
|
||||||
new BlitzwingCruelTormentorEffect()
|
new BlitzwingCruelTormentorEffect()
|
||||||
);
|
);
|
||||||
ability.addTarget(new TargetOpponent());
|
ability.addTarget(new TargetOpponent());
|
||||||
this.addAbility(ability);
|
this.getLeftHalfCard().addAbility(ability);
|
||||||
|
|
||||||
|
// Blitzwing Adaptive Assailant
|
||||||
|
this.getRightHalfCard().setPT(3, 5);
|
||||||
|
|
||||||
|
// Living metal
|
||||||
|
this.getRightHalfCard().addAbility(new LivingMetalAbility());
|
||||||
|
|
||||||
|
// At the beginning of combat on your turn, choose flying or indestructible at random. Blitzwing gains that ability until end of turn.
|
||||||
|
this.getRightHalfCard().addAbility(new BeginningOfCombatTriggeredAbility(
|
||||||
|
new BlitzwingAdaptiveAssailantEffect()
|
||||||
|
));
|
||||||
|
|
||||||
|
// Whenever Blitzwing deals combat damage to a player, convert it.
|
||||||
|
this.getRightHalfCard().addAbility(new DealsCombatDamageToAPlayerTriggeredAbility(
|
||||||
|
new TransformSourceEffect().setText("convert it"), false
|
||||||
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
private BlitzwingCruelTormentor(final BlitzwingCruelTormentor card) {
|
private BlitzwingCruelTormentor(final BlitzwingCruelTormentor card) {
|
||||||
|
|
@ -81,3 +105,28 @@ class BlitzwingCruelTormentorEffect extends OneShotEffect {
|
||||||
return permanent != null && permanent.transform(source, game);
|
return permanent != null && permanent.transform(source, game);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
class BlitzwingAdaptiveAssailantEffect extends OneShotEffect {
|
||||||
|
|
||||||
|
BlitzwingAdaptiveAssailantEffect() {
|
||||||
|
super(Outcome.Benefit);
|
||||||
|
staticText = "choose flying or indestructible at random. {this} gains that ability until end of turn";
|
||||||
|
}
|
||||||
|
|
||||||
|
private BlitzwingAdaptiveAssailantEffect(final BlitzwingAdaptiveAssailantEffect effect) {
|
||||||
|
super(effect);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public BlitzwingAdaptiveAssailantEffect copy() {
|
||||||
|
return new BlitzwingAdaptiveAssailantEffect(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean apply(Game game, Ability source) {
|
||||||
|
Ability ability = RandomUtil.nextBoolean() ? FlyingAbility.getInstance() : IndestructibleAbility.getInstance();
|
||||||
|
game.informPlayers(ability.getRule() + " has been chosen");
|
||||||
|
game.addEffect(new GainAbilitySourceEffect(ability, Duration.EndOfTurn), source);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,8 @@
|
||||||
|
|
||||||
package mage.cards.b;
|
package mage.cards.b;
|
||||||
|
|
||||||
import mage.MageInt;
|
|
||||||
import mage.abilities.common.ActivateIfConditionActivatedAbility;
|
import mage.abilities.common.ActivateIfConditionActivatedAbility;
|
||||||
import mage.abilities.common.SimpleActivatedAbility;
|
import mage.abilities.common.SimpleActivatedAbility;
|
||||||
|
import mage.abilities.common.SimpleStaticAbility;
|
||||||
import mage.abilities.condition.Condition;
|
import mage.abilities.condition.Condition;
|
||||||
import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition;
|
import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition;
|
||||||
import mage.abilities.costs.common.TapSourceCost;
|
import mage.abilities.costs.common.TapSourceCost;
|
||||||
|
|
@ -11,17 +10,19 @@ import mage.abilities.costs.mana.ManaCostsImpl;
|
||||||
import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount;
|
import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount;
|
||||||
import mage.abilities.effects.common.CreateTokenEffect;
|
import mage.abilities.effects.common.CreateTokenEffect;
|
||||||
import mage.abilities.effects.common.TransformSourceEffect;
|
import mage.abilities.effects.common.TransformSourceEffect;
|
||||||
|
import mage.abilities.effects.common.continuous.BoostControlledEffect;
|
||||||
import mage.abilities.hint.Hint;
|
import mage.abilities.hint.Hint;
|
||||||
import mage.abilities.hint.ValueHint;
|
import mage.abilities.hint.ValueHint;
|
||||||
import mage.abilities.keyword.FlyingAbility;
|
import mage.abilities.keyword.FlyingAbility;
|
||||||
import mage.abilities.keyword.TransformAbility;
|
|
||||||
import mage.cards.CardImpl;
|
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
|
import mage.cards.TransformingDoubleFacedCard;
|
||||||
import mage.constants.CardType;
|
import mage.constants.CardType;
|
||||||
import mage.constants.ComparisonType;
|
import mage.constants.ComparisonType;
|
||||||
|
import mage.constants.Duration;
|
||||||
import mage.constants.SubType;
|
import mage.constants.SubType;
|
||||||
import mage.filter.FilterPermanent;
|
import mage.filter.FilterPermanent;
|
||||||
import mage.filter.common.FilterControlledPermanent;
|
import mage.filter.common.FilterControlledPermanent;
|
||||||
|
import mage.filter.common.FilterCreaturePermanent;
|
||||||
import mage.game.permanent.token.VampireToken;
|
import mage.game.permanent.token.VampireToken;
|
||||||
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
|
@ -29,33 +30,46 @@ import java.util.UUID;
|
||||||
/**
|
/**
|
||||||
* @author Loki
|
* @author Loki
|
||||||
*/
|
*/
|
||||||
public final class BloodlineKeeper extends CardImpl {
|
public final class BloodlineKeeper extends TransformingDoubleFacedCard {
|
||||||
|
|
||||||
private static final FilterPermanent filter
|
private static final FilterPermanent filter
|
||||||
= new FilterControlledPermanent(SubType.VAMPIRE, "you control five or more Vampires");
|
= new FilterControlledPermanent(SubType.VAMPIRE, "you control five or more Vampires");
|
||||||
private static final Condition condition
|
private static final Condition condition
|
||||||
= new PermanentsOnTheBattlefieldCondition(filter, ComparisonType.MORE_THAN, 4);
|
= new PermanentsOnTheBattlefieldCondition(filter, ComparisonType.MORE_THAN, 4);
|
||||||
private static final Hint hint = new ValueHint("Vampires you control", new PermanentsOnBattlefieldCount(filter));
|
private static final Hint hint = new ValueHint("Vampires you control", new PermanentsOnBattlefieldCount(filter));
|
||||||
|
private static final FilterCreaturePermanent lordOfLineageFilter = new FilterCreaturePermanent(SubType.VAMPIRE, "Vampire creatures");
|
||||||
|
|
||||||
public BloodlineKeeper(UUID ownerId, CardSetInfo setInfo) {
|
public BloodlineKeeper(UUID ownerId, CardSetInfo setInfo) {
|
||||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{B}{B}");
|
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, new SubType[]{SubType.VAMPIRE}, "{2}{B}{B}",
|
||||||
this.subtype.add(SubType.VAMPIRE);
|
"Lord of Lineage",
|
||||||
|
new CardType[]{CardType.CREATURE}, new SubType[]{SubType.VAMPIRE}, "B");
|
||||||
|
|
||||||
this.power = new MageInt(3);
|
// Bloodline Keeper
|
||||||
this.toughness = new MageInt(3);
|
this.getLeftHalfCard().setPT(3, 3);
|
||||||
|
|
||||||
this.secondSideCardClazz = mage.cards.l.LordOfLineage.class;
|
// Flying
|
||||||
|
this.getLeftHalfCard().addAbility(FlyingAbility.getInstance());
|
||||||
this.addAbility(FlyingAbility.getInstance());
|
|
||||||
|
|
||||||
// {T}: Create a 2/2 black Vampire creature token with flying.
|
// {T}: Create a 2/2 black Vampire creature token with flying.
|
||||||
this.addAbility(new SimpleActivatedAbility(new CreateTokenEffect(new VampireToken()), new TapSourceCost()));
|
this.getLeftHalfCard().addAbility(new SimpleActivatedAbility(new CreateTokenEffect(new VampireToken()), new TapSourceCost()));
|
||||||
|
|
||||||
// {B}: Transform Bloodline Keeper. Activate this ability only if you control five or more Vampires.
|
// {B}: Transform Bloodline Keeper. Activate this ability only if you control five or more Vampires.
|
||||||
this.addAbility(new TransformAbility());
|
this.getLeftHalfCard().addAbility(new ActivateIfConditionActivatedAbility(
|
||||||
this.addAbility(new ActivateIfConditionActivatedAbility(
|
|
||||||
new TransformSourceEffect(), new ManaCostsImpl<>("{B}"), condition
|
new TransformSourceEffect(), new ManaCostsImpl<>("{B}"), condition
|
||||||
).addHint(hint));
|
).addHint(hint));
|
||||||
|
|
||||||
|
// Lord of Lineage
|
||||||
|
this.getRightHalfCard().setPT(5, 5);
|
||||||
|
|
||||||
|
// Flying
|
||||||
|
this.getRightHalfCard().addAbility(FlyingAbility.getInstance());
|
||||||
|
|
||||||
|
// Other Vampire creatures you control get +2/+2.
|
||||||
|
this.getRightHalfCard().addAbility(new SimpleStaticAbility(new BoostControlledEffect(2, 2, Duration.WhileOnBattlefield, lordOfLineageFilter, true)));
|
||||||
|
|
||||||
|
// {T}: Create a 2/2 black Vampire creature token with flying.
|
||||||
|
this.getRightHalfCard().addAbility(new SimpleActivatedAbility(new CreateTokenEffect(new VampireToken()), new TapSourceCost()));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private BloodlineKeeper(final BloodlineKeeper card) {
|
private BloodlineKeeper(final BloodlineKeeper card) {
|
||||||
|
|
|
||||||
|
|
@ -1,65 +0,0 @@
|
||||||
package mage.cards.b;
|
|
||||||
|
|
||||||
import mage.MageInt;
|
|
||||||
import mage.abilities.Ability;
|
|
||||||
import mage.abilities.common.SimpleActivatedAbility;
|
|
||||||
import mage.abilities.common.SimpleStaticAbility;
|
|
||||||
import mage.abilities.costs.common.DiscardCardCost;
|
|
||||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
|
||||||
import mage.abilities.dynamicvalue.DynamicValue;
|
|
||||||
import mage.abilities.dynamicvalue.common.CardsInControllerGraveyardCount;
|
|
||||||
import mage.abilities.effects.common.TapSourceEffect;
|
|
||||||
import mage.abilities.effects.common.continuous.GainAbilitySourceEffect;
|
|
||||||
import mage.abilities.effects.common.continuous.SetBasePowerToughnessSourceEffect;
|
|
||||||
import mage.abilities.keyword.IndestructibleAbility;
|
|
||||||
import mage.cards.CardImpl;
|
|
||||||
import mage.cards.CardSetInfo;
|
|
||||||
import mage.constants.CardType;
|
|
||||||
import mage.constants.Duration;
|
|
||||||
import mage.constants.SubType;
|
|
||||||
import mage.constants.Zone;
|
|
||||||
import mage.filter.StaticFilters;
|
|
||||||
|
|
||||||
import java.util.UUID;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author weirddan455
|
|
||||||
*/
|
|
||||||
public final class BloodswornKnight extends CardImpl {
|
|
||||||
|
|
||||||
private static final DynamicValue xValue = new CardsInControllerGraveyardCount(StaticFilters.FILTER_CARD_CREATURES);
|
|
||||||
|
|
||||||
public BloodswornKnight(UUID ownerId, CardSetInfo setInfo) {
|
|
||||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "");
|
|
||||||
|
|
||||||
this.subtype.add(SubType.VAMPIRE);
|
|
||||||
this.subtype.add(SubType.KNIGHT);
|
|
||||||
this.power = new MageInt(0);
|
|
||||||
this.toughness = new MageInt(0);
|
|
||||||
this.color.setBlack(true);
|
|
||||||
|
|
||||||
// Back half of Bloodsworn Squire
|
|
||||||
this.nightCard = true;
|
|
||||||
|
|
||||||
// Bloodsworn Knight's power and toughness are each equal to the number of creature cards in your graveyard.
|
|
||||||
this.addAbility(new SimpleStaticAbility(Zone.ALL, new SetBasePowerToughnessSourceEffect(xValue)));
|
|
||||||
|
|
||||||
// {1}{B}, Discard a card: Bloodsworn Knight gains indestructible until end of turn. Tap it.
|
|
||||||
Ability ability = new SimpleActivatedAbility(
|
|
||||||
new GainAbilitySourceEffect(IndestructibleAbility.getInstance(), Duration.EndOfTurn),
|
|
||||||
new ManaCostsImpl<>("{1}{B}")
|
|
||||||
);
|
|
||||||
ability.addCost(new DiscardCardCost());
|
|
||||||
ability.addEffect(new TapSourceEffect().setText("tap it"));
|
|
||||||
this.addAbility(ability);
|
|
||||||
}
|
|
||||||
|
|
||||||
private BloodswornKnight(final BloodswornKnight card) {
|
|
||||||
super(card);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public BloodswornKnight copy() {
|
|
||||||
return new BloodswornKnight(this);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,41 +1,45 @@
|
||||||
package mage.cards.b;
|
package mage.cards.b;
|
||||||
|
|
||||||
import java.util.UUID;
|
|
||||||
import mage.MageInt;
|
|
||||||
import mage.abilities.Ability;
|
import mage.abilities.Ability;
|
||||||
import mage.abilities.common.SimpleActivatedAbility;
|
import mage.abilities.common.SimpleActivatedAbility;
|
||||||
|
import mage.abilities.common.SimpleStaticAbility;
|
||||||
import mage.abilities.condition.common.CardsInControllerGraveyardCondition;
|
import mage.abilities.condition.common.CardsInControllerGraveyardCondition;
|
||||||
import mage.abilities.costs.common.DiscardCardCost;
|
import mage.abilities.costs.common.DiscardCardCost;
|
||||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||||
import mage.abilities.decorator.ConditionalOneShotEffect;
|
import mage.abilities.decorator.ConditionalOneShotEffect;
|
||||||
|
import mage.abilities.dynamicvalue.DynamicValue;
|
||||||
|
import mage.abilities.dynamicvalue.common.CardsInControllerGraveyardCount;
|
||||||
import mage.abilities.effects.common.TapSourceEffect;
|
import mage.abilities.effects.common.TapSourceEffect;
|
||||||
import mage.abilities.effects.common.TransformSourceEffect;
|
import mage.abilities.effects.common.TransformSourceEffect;
|
||||||
import mage.abilities.effects.common.continuous.GainAbilitySourceEffect;
|
import mage.abilities.effects.common.continuous.GainAbilitySourceEffect;
|
||||||
|
import mage.abilities.effects.common.continuous.SetBasePowerToughnessSourceEffect;
|
||||||
import mage.abilities.keyword.IndestructibleAbility;
|
import mage.abilities.keyword.IndestructibleAbility;
|
||||||
import mage.abilities.keyword.TransformAbility;
|
import mage.cards.CardSetInfo;
|
||||||
|
import mage.cards.TransformingDoubleFacedCard;
|
||||||
|
import mage.constants.CardType;
|
||||||
import mage.constants.Duration;
|
import mage.constants.Duration;
|
||||||
import mage.constants.SubType;
|
import mage.constants.SubType;
|
||||||
import mage.cards.CardImpl;
|
import mage.constants.Zone;
|
||||||
import mage.cards.CardSetInfo;
|
|
||||||
import mage.constants.CardType;
|
|
||||||
import mage.filter.StaticFilters;
|
import mage.filter.StaticFilters;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @author weirddan455
|
* @author weirddan455
|
||||||
*/
|
*/
|
||||||
public final class BloodswornSquire extends CardImpl {
|
public final class BloodswornSquire extends TransformingDoubleFacedCard {
|
||||||
|
|
||||||
|
private static final DynamicValue xValue = new CardsInControllerGraveyardCount(StaticFilters.FILTER_CARD_CREATURES);
|
||||||
|
|
||||||
public BloodswornSquire(UUID ownerId, CardSetInfo setInfo) {
|
public BloodswornSquire(UUID ownerId, CardSetInfo setInfo) {
|
||||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{B}");
|
super(ownerId, setInfo,
|
||||||
|
new CardType[]{CardType.CREATURE}, new SubType[]{SubType.VAMPIRE, SubType.SOLDIER}, "{3}{B}",
|
||||||
|
"Bloodsworn Knight",
|
||||||
|
new CardType[]{CardType.CREATURE}, new SubType[]{SubType.VAMPIRE, SubType.KNIGHT}, "B");
|
||||||
|
|
||||||
this.subtype.add(SubType.VAMPIRE);
|
// Bloodsworn Squire
|
||||||
this.subtype.add(SubType.SOLDIER);
|
this.getLeftHalfCard().setPT(3, 3);
|
||||||
this.power = new MageInt(3);
|
|
||||||
this.toughness = new MageInt(3);
|
|
||||||
this.secondSideCardClazz = mage.cards.b.BloodswornKnight.class;
|
|
||||||
|
|
||||||
this.addAbility(new TransformAbility());
|
|
||||||
|
|
||||||
// {1}{B}, Discard a card: Bloodsworn Squire gains indestructible until end of turn. Tap it. Then if there are four or more creature cards in your graveyard, transform Bloodsworn Squire.
|
// {1}{B}, Discard a card: Bloodsworn Squire gains indestructible until end of turn. Tap it. Then if there are four or more creature cards in your graveyard, transform Bloodsworn Squire.
|
||||||
Ability ability = new SimpleActivatedAbility(
|
Ability ability = new SimpleActivatedAbility(
|
||||||
|
|
@ -49,7 +53,22 @@ public final class BloodswornSquire extends CardImpl {
|
||||||
new CardsInControllerGraveyardCondition(4, StaticFilters.FILTER_CARD_CREATURES),
|
new CardsInControllerGraveyardCondition(4, StaticFilters.FILTER_CARD_CREATURES),
|
||||||
"Then if there are four or more creature cards in your graveyard, transform {this}"
|
"Then if there are four or more creature cards in your graveyard, transform {this}"
|
||||||
));
|
));
|
||||||
this.addAbility(ability);
|
this.getLeftHalfCard().addAbility(ability);
|
||||||
|
|
||||||
|
// Bloodsworn Knight
|
||||||
|
this.getRightHalfCard().setPT(0, 0);
|
||||||
|
|
||||||
|
// Bloodsworn Knight's power and toughness are each equal to the number of creature cards in your graveyard.
|
||||||
|
this.getRightHalfCard().addAbility(new SimpleStaticAbility(Zone.ALL, new SetBasePowerToughnessSourceEffect(xValue)));
|
||||||
|
|
||||||
|
// {1}{B}, Discard a card: Bloodsworn Knight gains indestructible until end of turn. Tap it.
|
||||||
|
ability = new SimpleActivatedAbility(
|
||||||
|
new GainAbilitySourceEffect(IndestructibleAbility.getInstance(), Duration.EndOfTurn),
|
||||||
|
new ManaCostsImpl<>("{1}{B}")
|
||||||
|
);
|
||||||
|
ability.addCost(new DiscardCardCost());
|
||||||
|
ability.addEffect(new TapSourceEffect().setText("tap it"));
|
||||||
|
this.getRightHalfCard().addAbility(ability);
|
||||||
}
|
}
|
||||||
|
|
||||||
private BloodswornSquire(final BloodswornSquire card) {
|
private BloodswornSquire(final BloodswornSquire card) {
|
||||||
|
|
|
||||||
|
|
@ -32,7 +32,7 @@ import java.util.UUID;
|
||||||
public final class BoilingRockRioter extends CardImpl {
|
public final class BoilingRockRioter extends CardImpl {
|
||||||
|
|
||||||
private static final FilterControlledPermanent filter
|
private static final FilterControlledPermanent filter
|
||||||
= new FilterControlledPermanent(SubType.ALLY, "untaped Ally you control");
|
= new FilterControlledPermanent(SubType.ALLY, "untapped Ally you control");
|
||||||
|
|
||||||
static {
|
static {
|
||||||
filter.add(TappedPredicate.UNTAPPED);
|
filter.add(TappedPredicate.UNTAPPED);
|
||||||
|
|
|
||||||
|
|
@ -1,12 +1,11 @@
|
||||||
package mage.cards.b;
|
package mage.cards.b;
|
||||||
|
|
||||||
import mage.MageInt;
|
|
||||||
import mage.abilities.common.ActivateAsSorceryActivatedAbility;
|
import mage.abilities.common.ActivateAsSorceryActivatedAbility;
|
||||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||||
import mage.abilities.effects.common.TransformSourceEffect;
|
import mage.abilities.effects.common.TransformSourceEffect;
|
||||||
import mage.abilities.keyword.TransformAbility;
|
import mage.abilities.keyword.MenaceAbility;
|
||||||
import mage.cards.CardImpl;
|
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
|
import mage.cards.TransformingDoubleFacedCard;
|
||||||
import mage.constants.CardType;
|
import mage.constants.CardType;
|
||||||
import mage.constants.SubType;
|
import mage.constants.SubType;
|
||||||
|
|
||||||
|
|
@ -15,19 +14,25 @@ import java.util.UUID;
|
||||||
/**
|
/**
|
||||||
* @author TheElk801
|
* @author TheElk801
|
||||||
*/
|
*/
|
||||||
public final class BondedHerdbeast extends CardImpl {
|
public final class BondedHerdbeast extends TransformingDoubleFacedCard {
|
||||||
|
|
||||||
public BondedHerdbeast(UUID ownerId, CardSetInfo setInfo) {
|
public BondedHerdbeast(UUID ownerId, CardSetInfo setInfo) {
|
||||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{G}");
|
super(ownerId, setInfo,
|
||||||
|
new CardType[]{CardType.CREATURE}, new SubType[]{SubType.BEAST}, "{4}{G}",
|
||||||
|
"Plated Kilnbeast",
|
||||||
|
new CardType[]{CardType.CREATURE}, new SubType[]{SubType.PHYREXIAN, SubType.BEAST}, "RG");
|
||||||
|
|
||||||
this.subtype.add(SubType.BEAST);
|
// Bonded Herdbeast
|
||||||
this.power = new MageInt(4);
|
this.getLeftHalfCard().setPT(4, 5);
|
||||||
this.toughness = new MageInt(5);
|
|
||||||
this.secondSideCardClazz = mage.cards.p.PlatedKilnbeast.class;
|
|
||||||
|
|
||||||
// {4}{R/P}: Transform Bonded Herdbeast. Activate only as a sorcery.
|
// {4}{R/P}: Transform Bonded Herdbeast. Activate only as a sorcery.
|
||||||
this.addAbility(new TransformAbility());
|
this.getLeftHalfCard().addAbility(new ActivateAsSorceryActivatedAbility(new TransformSourceEffect(), new ManaCostsImpl<>("{4}{R/P}")));
|
||||||
this.addAbility(new ActivateAsSorceryActivatedAbility(new TransformSourceEffect(), new ManaCostsImpl<>("{4}{R/P}")));
|
|
||||||
|
// Plated Kilnbeast
|
||||||
|
this.getRightHalfCard().setPT(7, 5);
|
||||||
|
|
||||||
|
// Menace
|
||||||
|
this.getRightHalfCard().addAbility(new MenaceAbility());
|
||||||
}
|
}
|
||||||
|
|
||||||
private BondedHerdbeast(final BondedHerdbeast card) {
|
private BondedHerdbeast(final BondedHerdbeast card) {
|
||||||
|
|
|
||||||
|
|
@ -29,9 +29,8 @@ public final class BonecrusherGiant extends AdventureCard {
|
||||||
|
|
||||||
// Whenever Bonecrusher Giant becomes the target of a spell, Bonecrusher Giant deals 2 damage to that spell's controller.
|
// Whenever Bonecrusher Giant becomes the target of a spell, Bonecrusher Giant deals 2 damage to that spell's controller.
|
||||||
this.addAbility(new BecomesTargetSourceTriggeredAbility(
|
this.addAbility(new BecomesTargetSourceTriggeredAbility(
|
||||||
new DamageTargetEffect(
|
new DamageTargetEffect(2).withTargetDescription("that spell's controller"),
|
||||||
2, true, "that spell's controller", "{this}"
|
StaticFilters.FILTER_SPELL_A, SetTargetPointer.PLAYER, false)
|
||||||
), StaticFilters.FILTER_SPELL_A, SetTargetPointer.PLAYER, false)
|
|
||||||
.withRuleTextReplacement(false));
|
.withRuleTextReplacement(false));
|
||||||
|
|
||||||
// Stomp
|
// Stomp
|
||||||
|
|
|
||||||
|
|
@ -51,8 +51,11 @@ public final class BoobyTrap extends CardImpl {
|
||||||
|
|
||||||
class BoobyTrapTriggeredAbility extends TriggeredAbilityImpl {
|
class BoobyTrapTriggeredAbility extends TriggeredAbilityImpl {
|
||||||
|
|
||||||
public BoobyTrapTriggeredAbility() {
|
BoobyTrapTriggeredAbility() {
|
||||||
super(Zone.BATTLEFIELD, new DoIfCostPaid(new DamageTargetEffect(10, true, "that player"), new SacrificeSourceCost(), "", false), false);
|
super(Zone.BATTLEFIELD, new DoIfCostPaid(
|
||||||
|
new DamageTargetEffect(10).withTargetDescription("that player"),
|
||||||
|
new SacrificeSourceCost(), "", false
|
||||||
|
), false);
|
||||||
}
|
}
|
||||||
|
|
||||||
private BoobyTrapTriggeredAbility(final BoobyTrapTriggeredAbility ability) {
|
private BoobyTrapTriggeredAbility(final BoobyTrapTriggeredAbility ability) {
|
||||||
|
|
|
||||||
|
|
@ -47,7 +47,7 @@ public final class BoscoJustABear extends CardImpl {
|
||||||
|
|
||||||
// {2}{G}, Sacrifice a Food: Put two +1/+1 counters on Bosco. He gains trample until end of turn.
|
// {2}{G}, Sacrifice a Food: Put two +1/+1 counters on Bosco. He gains trample until end of turn.
|
||||||
Ability ability = new SimpleActivatedAbility(
|
Ability ability = new SimpleActivatedAbility(
|
||||||
new AddCountersSourceEffect(CounterType.P1P1.createInstance()), new ManaCostsImpl<>("{2}{G}")
|
new AddCountersSourceEffect(CounterType.P1P1.createInstance(2)), new ManaCostsImpl<>("{2}{G}")
|
||||||
);
|
);
|
||||||
ability.addCost(new SacrificeTargetCost(StaticFilters.FILTER_CONTROLLED_FOOD));
|
ability.addCost(new SacrificeTargetCost(StaticFilters.FILTER_CONTROLLED_FOOD));
|
||||||
ability.addEffect(new GainAbilitySourceEffect(
|
ability.addEffect(new GainAbilitySourceEffect(
|
||||||
|
|
|
||||||
|
|
@ -1,13 +1,17 @@
|
||||||
package mage.cards.b;
|
package mage.cards.b;
|
||||||
|
|
||||||
import mage.abilities.common.SagaAbility;
|
import mage.abilities.common.SagaAbility;
|
||||||
|
import mage.abilities.common.SimpleStaticAbility;
|
||||||
|
import mage.abilities.dynamicvalue.common.LandsYouControlCount;
|
||||||
import mage.abilities.effects.common.ExileSagaAndReturnTransformedEffect;
|
import mage.abilities.effects.common.ExileSagaAndReturnTransformedEffect;
|
||||||
import mage.abilities.effects.common.PutOnLibraryTargetEffect;
|
import mage.abilities.effects.common.PutOnLibraryTargetEffect;
|
||||||
|
import mage.abilities.effects.common.continuous.BoostSourceEffect;
|
||||||
import mage.abilities.effects.common.search.SearchLibraryPutInHandEffect;
|
import mage.abilities.effects.common.search.SearchLibraryPutInHandEffect;
|
||||||
import mage.abilities.keyword.TransformAbility;
|
import mage.abilities.keyword.ReachAbility;
|
||||||
import mage.cards.CardImpl;
|
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
|
import mage.cards.TransformingDoubleFacedCard;
|
||||||
import mage.constants.CardType;
|
import mage.constants.CardType;
|
||||||
|
import mage.constants.Duration;
|
||||||
import mage.constants.SagaChapter;
|
import mage.constants.SagaChapter;
|
||||||
import mage.constants.SubType;
|
import mage.constants.SubType;
|
||||||
import mage.filter.FilterCard;
|
import mage.filter.FilterCard;
|
||||||
|
|
@ -21,22 +25,23 @@ import java.util.UUID;
|
||||||
/**
|
/**
|
||||||
* @author TheElk801
|
* @author TheElk801
|
||||||
*/
|
*/
|
||||||
public final class BoseijuReachesSkyward extends CardImpl {
|
public final class BoseijuReachesSkyward extends TransformingDoubleFacedCard {
|
||||||
|
|
||||||
private static final FilterCard filter = new FilterBasicCard(SubType.FOREST, "basic Forest cards");
|
private static final FilterCard filter = new FilterBasicCard(SubType.FOREST, "basic Forest cards");
|
||||||
|
|
||||||
public BoseijuReachesSkyward(UUID ownerId, CardSetInfo setInfo) {
|
public BoseijuReachesSkyward(UUID ownerId, CardSetInfo setInfo) {
|
||||||
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{3}{G}");
|
super(ownerId, setInfo,
|
||||||
|
new CardType[]{CardType.ENCHANTMENT}, new SubType[]{SubType.SAGA}, "{3}{G}",
|
||||||
this.subtype.add(SubType.SAGA);
|
"Branch of Boseiju",
|
||||||
this.secondSideCardClazz = mage.cards.b.BranchOfBoseiju.class;
|
new CardType[]{CardType.ENCHANTMENT, CardType.CREATURE}, new SubType[]{SubType.PLANT}, "G");
|
||||||
|
|
||||||
|
// Boseiju Reaches Skyward
|
||||||
// (As this Saga enters and after your draw step, add a lore counter.)
|
// (As this Saga enters and after your draw step, add a lore counter.)
|
||||||
SagaAbility sagaAbility = new SagaAbility(this);
|
SagaAbility sagaAbility = new SagaAbility(getLeftHalfCard());
|
||||||
|
|
||||||
// I — Search your library for up to two basic Forest cards, reveal them, put them into your hand, then shuffle.
|
// I — Search your library for up to two basic Forest cards, reveal them, put them into your hand, then shuffle.
|
||||||
sagaAbility.addChapterEffect(
|
sagaAbility.addChapterEffect(
|
||||||
this, SagaChapter.CHAPTER_I,
|
getLeftHalfCard(), SagaChapter.CHAPTER_I,
|
||||||
new SearchLibraryPutInHandEffect(new TargetCardInLibrary(
|
new SearchLibraryPutInHandEffect(new TargetCardInLibrary(
|
||||||
0, 2, filter
|
0, 2, filter
|
||||||
), true)
|
), true)
|
||||||
|
|
@ -44,16 +49,25 @@ public final class BoseijuReachesSkyward extends CardImpl {
|
||||||
|
|
||||||
// II — Put up to one target land card from your graveyard on top of your library.
|
// II — Put up to one target land card from your graveyard on top of your library.
|
||||||
sagaAbility.addChapterEffect(
|
sagaAbility.addChapterEffect(
|
||||||
this, SagaChapter.CHAPTER_II, SagaChapter.CHAPTER_II,
|
getLeftHalfCard(), SagaChapter.CHAPTER_II, SagaChapter.CHAPTER_II,
|
||||||
new PutOnLibraryTargetEffect(true),
|
new PutOnLibraryTargetEffect(true),
|
||||||
new TargetCardInYourGraveyard(0, 1, StaticFilters.FILTER_CARD_LAND_FROM_YOUR_GRAVEYARD)
|
new TargetCardInYourGraveyard(0, 1, StaticFilters.FILTER_CARD_LAND_FROM_YOUR_GRAVEYARD)
|
||||||
);
|
);
|
||||||
|
|
||||||
// III — Exile this Saga, then return it to the battlefield transformed under your control.
|
// III — Exile this Saga, then return it to the battlefield transformed under your control.
|
||||||
this.addAbility(new TransformAbility());
|
sagaAbility.addChapterEffect(getLeftHalfCard(), SagaChapter.CHAPTER_III, new ExileSagaAndReturnTransformedEffect());
|
||||||
sagaAbility.addChapterEffect(this, SagaChapter.CHAPTER_III, new ExileSagaAndReturnTransformedEffect());
|
this.getLeftHalfCard().addAbility(sagaAbility);
|
||||||
|
|
||||||
this.addAbility(sagaAbility);
|
// Branch of Boseiju
|
||||||
|
this.getRightHalfCard().setPT(0, 0);
|
||||||
|
|
||||||
|
// Reach
|
||||||
|
this.getRightHalfCard().addAbility(ReachAbility.getInstance());
|
||||||
|
|
||||||
|
// Branch of Boseiju gets +1/+1 for each land you control.
|
||||||
|
this.getRightHalfCard().addAbility(new SimpleStaticAbility(new BoostSourceEffect(
|
||||||
|
LandsYouControlCount.instance, LandsYouControlCount.instance, Duration.WhileOnBattlefield
|
||||||
|
).setText("{this} gets +1/+1 for each land you control")));
|
||||||
}
|
}
|
||||||
|
|
||||||
private BoseijuReachesSkyward(final BoseijuReachesSkyward card) {
|
private BoseijuReachesSkyward(final BoseijuReachesSkyward card) {
|
||||||
|
|
|
||||||
|
|
@ -1,21 +1,17 @@
|
||||||
package mage.cards.b;
|
package mage.cards.b;
|
||||||
|
|
||||||
import java.util.UUID;
|
|
||||||
|
|
||||||
import mage.abilities.common.DealsDamageToAPlayerAllTriggeredAbility;
|
import mage.abilities.common.DealsDamageToAPlayerAllTriggeredAbility;
|
||||||
import mage.abilities.common.UnlockThisDoorTriggeredAbility;
|
import mage.abilities.common.UnlockThisDoorTriggeredAbility;
|
||||||
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
|
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
|
||||||
import mage.abilities.effects.common.ReturnToHandTargetEffect;
|
import mage.abilities.effects.common.ReturnToHandTargetEffect;
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
import mage.cards.RoomCard;
|
import mage.cards.RoomCard;
|
||||||
import mage.constants.CardType;
|
import mage.constants.*;
|
||||||
import mage.constants.SetTargetPointer;
|
|
||||||
import mage.constants.SpellAbilityType;
|
|
||||||
import mage.constants.SubType;
|
|
||||||
import mage.constants.TargetController;
|
|
||||||
import mage.filter.StaticFilters;
|
import mage.filter.StaticFilters;
|
||||||
import mage.target.common.TargetCreaturePermanent;
|
import mage.target.common.TargetCreaturePermanent;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author oscscull
|
* @author oscscull
|
||||||
*/
|
*/
|
||||||
|
|
@ -38,14 +34,14 @@ public final class BottomlessPoolLockerRoom extends RoomCard {
|
||||||
UnlockThisDoorTriggeredAbility left = new UnlockThisDoorTriggeredAbility(
|
UnlockThisDoorTriggeredAbility left = new UnlockThisDoorTriggeredAbility(
|
||||||
new ReturnToHandTargetEffect(), false, true);
|
new ReturnToHandTargetEffect(), false, true);
|
||||||
left.addTarget(new TargetCreaturePermanent(0, 1));
|
left.addTarget(new TargetCreaturePermanent(0, 1));
|
||||||
|
this.getLeftHalfCard().addAbility(left);
|
||||||
|
|
||||||
// Right half ability - "Whenever one or more creatures you control deal combat damage to a player, draw a card."
|
// Right half ability - "Whenever one or more creatures you control deal combat damage to a player, draw a card."
|
||||||
DealsDamageToAPlayerAllTriggeredAbility right = new DealsDamageToAPlayerAllTriggeredAbility(
|
DealsDamageToAPlayerAllTriggeredAbility right = new DealsDamageToAPlayerAllTriggeredAbility(
|
||||||
new DrawCardSourceControllerEffect(1),
|
new DrawCardSourceControllerEffect(1),
|
||||||
StaticFilters.FILTER_CONTROLLED_A_CREATURE,
|
StaticFilters.FILTER_CONTROLLED_A_CREATURE,
|
||||||
false, SetTargetPointer.PLAYER, true, true, TargetController.OPPONENT);
|
false, SetTargetPointer.PLAYER, true, true, TargetController.OPPONENT);
|
||||||
|
this.getRightHalfCard().addAbility(right);
|
||||||
this.addRoomAbilities(left, right);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private BottomlessPoolLockerRoom(final BottomlessPoolLockerRoom card) {
|
private BottomlessPoolLockerRoom(final BottomlessPoolLockerRoom card) {
|
||||||
|
|
|
||||||
|
|
@ -5,20 +5,28 @@ import mage.abilities.common.EntersBattlefieldAbility;
|
||||||
import mage.abilities.common.SimpleActivatedAbility;
|
import mage.abilities.common.SimpleActivatedAbility;
|
||||||
import mage.abilities.costs.common.RemoveCountersSourceCost;
|
import mage.abilities.costs.common.RemoveCountersSourceCost;
|
||||||
import mage.abilities.costs.common.TapSourceCost;
|
import mage.abilities.costs.common.TapSourceCost;
|
||||||
|
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||||
|
import mage.abilities.dynamicvalue.common.ArtifactYouControlCount;
|
||||||
|
import mage.abilities.effects.OneShotEffect;
|
||||||
import mage.abilities.effects.RestrictionEffect;
|
import mage.abilities.effects.RestrictionEffect;
|
||||||
|
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
|
||||||
import mage.abilities.effects.common.TapTargetEffect;
|
import mage.abilities.effects.common.TapTargetEffect;
|
||||||
import mage.abilities.effects.common.counter.AddCountersSourceEffect;
|
import mage.abilities.effects.common.counter.AddCountersSourceEffect;
|
||||||
|
import mage.abilities.hint.common.ArtifactYouControlHint;
|
||||||
import mage.abilities.keyword.CraftAbility;
|
import mage.abilities.keyword.CraftAbility;
|
||||||
import mage.cards.CardImpl;
|
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
|
import mage.cards.TransformingDoubleFacedCard;
|
||||||
import mage.constants.CardType;
|
import mage.constants.CardType;
|
||||||
import mage.constants.Duration;
|
import mage.constants.Duration;
|
||||||
|
import mage.constants.Outcome;
|
||||||
|
import mage.constants.SubType;
|
||||||
import mage.counters.CounterType;
|
import mage.counters.CounterType;
|
||||||
import mage.filter.FilterPermanent;
|
import mage.filter.FilterPermanent;
|
||||||
import mage.filter.common.FilterNonlandPermanent;
|
import mage.filter.common.FilterNonlandPermanent;
|
||||||
import mage.filter.predicate.mageobject.AnotherPredicate;
|
import mage.filter.predicate.mageobject.AnotherPredicate;
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
import mage.game.permanent.Permanent;
|
import mage.game.permanent.Permanent;
|
||||||
|
import mage.players.Player;
|
||||||
import mage.target.TargetPermanent;
|
import mage.target.TargetPermanent;
|
||||||
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
|
@ -26,7 +34,7 @@ import java.util.UUID;
|
||||||
/**
|
/**
|
||||||
* @author TheElk801
|
* @author TheElk801
|
||||||
*/
|
*/
|
||||||
public final class BraidedNet extends CardImpl {
|
public final class BraidedNet extends TransformingDoubleFacedCard {
|
||||||
|
|
||||||
private static final FilterPermanent filter = new FilterNonlandPermanent("another target nonland permanent");
|
private static final FilterPermanent filter = new FilterNonlandPermanent("another target nonland permanent");
|
||||||
|
|
||||||
|
|
@ -35,11 +43,14 @@ public final class BraidedNet extends CardImpl {
|
||||||
}
|
}
|
||||||
|
|
||||||
public BraidedNet(UUID ownerId, CardSetInfo setInfo) {
|
public BraidedNet(UUID ownerId, CardSetInfo setInfo) {
|
||||||
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{2}{U}");
|
super(ownerId, setInfo,
|
||||||
this.secondSideCardClazz = mage.cards.b.BraidedQuipu.class;
|
new CardType[]{CardType.ARTIFACT}, new SubType[]{}, "{2}{U}",
|
||||||
|
"Braided Quipu",
|
||||||
|
new CardType[]{CardType.ARTIFACT}, new SubType[]{}, "U");
|
||||||
|
|
||||||
|
// Braided Net
|
||||||
// Braided Net enters the battlefield with three net counters on it.
|
// Braided Net enters the battlefield with three net counters on it.
|
||||||
this.addAbility(new EntersBattlefieldAbility(
|
this.getLeftHalfCard().addAbility(new EntersBattlefieldAbility(
|
||||||
new AddCountersSourceEffect(CounterType.NET.createInstance(3)),
|
new AddCountersSourceEffect(CounterType.NET.createInstance(3)),
|
||||||
"with three net counters on it"
|
"with three net counters on it"
|
||||||
));
|
));
|
||||||
|
|
@ -49,10 +60,20 @@ public final class BraidedNet extends CardImpl {
|
||||||
ability.addCost(new RemoveCountersSourceCost(CounterType.NET.createInstance()));
|
ability.addCost(new RemoveCountersSourceCost(CounterType.NET.createInstance()));
|
||||||
ability.addEffect(new BraidedNetEffect());
|
ability.addEffect(new BraidedNetEffect());
|
||||||
ability.addTarget(new TargetPermanent(filter));
|
ability.addTarget(new TargetPermanent(filter));
|
||||||
this.addAbility(ability);
|
this.getLeftHalfCard().addAbility(ability);
|
||||||
|
|
||||||
// Craft with artifact {1}{U}
|
// Craft with artifact {1}{U}
|
||||||
this.addAbility(new CraftAbility("{1}{U}"));
|
this.getLeftHalfCard().addAbility(new CraftAbility("{1}{U}"));
|
||||||
|
|
||||||
|
// Braided Quipu
|
||||||
|
// {3}{U}, {T}: Draw a card for each artifact you control, then put Braided Quipu into its owner's library third from the top.
|
||||||
|
ability = new SimpleActivatedAbility(
|
||||||
|
new DrawCardSourceControllerEffect(ArtifactYouControlCount.instance), new ManaCostsImpl<>("{3}{U}")
|
||||||
|
);
|
||||||
|
ability.addCost(new TapSourceCost());
|
||||||
|
ability.addEffect(new BraidedQuipuEffect());
|
||||||
|
this.getRightHalfCard().addAbility(ability.addHint(ArtifactYouControlHint.instance));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private BraidedNet(final BraidedNet card) {
|
private BraidedNet(final BraidedNet card) {
|
||||||
|
|
@ -100,3 +121,29 @@ class BraidedNetEffect extends RestrictionEffect {
|
||||||
return permanent == null || !permanent.isTapped();
|
return permanent == null || !permanent.isTapped();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
class BraidedQuipuEffect extends OneShotEffect {
|
||||||
|
|
||||||
|
BraidedQuipuEffect() {
|
||||||
|
super(Outcome.Benefit);
|
||||||
|
staticText = ", then put {this} into its owner's library third from the top";
|
||||||
|
}
|
||||||
|
|
||||||
|
private BraidedQuipuEffect(final BraidedQuipuEffect effect) {
|
||||||
|
super(effect);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public BraidedQuipuEffect copy() {
|
||||||
|
return new BraidedQuipuEffect(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean apply(Game game, Ability source) {
|
||||||
|
Player player = game.getPlayer(source.getControllerId());
|
||||||
|
Permanent permanent = source.getSourcePermanentIfItStillExists(game);
|
||||||
|
return player != null
|
||||||
|
&& permanent != null
|
||||||
|
&& player.putCardOnTopXOfLibrary(permanent, game, source, 3, true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -1,74 +0,0 @@
|
||||||
package mage.cards.b;
|
|
||||||
|
|
||||||
import mage.abilities.Ability;
|
|
||||||
import mage.abilities.common.SimpleActivatedAbility;
|
|
||||||
import mage.abilities.costs.common.TapSourceCost;
|
|
||||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
|
||||||
import mage.abilities.dynamicvalue.common.ArtifactYouControlCount;
|
|
||||||
import mage.abilities.effects.OneShotEffect;
|
|
||||||
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
|
|
||||||
import mage.abilities.hint.common.ArtifactYouControlHint;
|
|
||||||
import mage.cards.CardImpl;
|
|
||||||
import mage.cards.CardSetInfo;
|
|
||||||
import mage.constants.CardType;
|
|
||||||
import mage.constants.Outcome;
|
|
||||||
import mage.game.Game;
|
|
||||||
import mage.game.permanent.Permanent;
|
|
||||||
import mage.players.Player;
|
|
||||||
|
|
||||||
import java.util.UUID;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author TheElk801
|
|
||||||
*/
|
|
||||||
public final class BraidedQuipu extends CardImpl {
|
|
||||||
|
|
||||||
public BraidedQuipu(UUID ownerId, CardSetInfo setInfo) {
|
|
||||||
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "");
|
|
||||||
this.nightCard = true;
|
|
||||||
this.color.setBlue(true);
|
|
||||||
|
|
||||||
// {3}{U}, {T}: Draw a card for each artifact you control, then put Braided Quipu into its owner's library third from the top.
|
|
||||||
Ability ability = new SimpleActivatedAbility(
|
|
||||||
new DrawCardSourceControllerEffect(ArtifactYouControlCount.instance), new ManaCostsImpl<>("{3}{U}")
|
|
||||||
);
|
|
||||||
ability.addCost(new TapSourceCost());
|
|
||||||
ability.addEffect(new BraidedQuipuEffect());
|
|
||||||
this.addAbility(ability.addHint(ArtifactYouControlHint.instance));
|
|
||||||
}
|
|
||||||
|
|
||||||
private BraidedQuipu(final BraidedQuipu card) {
|
|
||||||
super(card);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public BraidedQuipu copy() {
|
|
||||||
return new BraidedQuipu(this);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
class BraidedQuipuEffect extends OneShotEffect {
|
|
||||||
|
|
||||||
BraidedQuipuEffect() {
|
|
||||||
super(Outcome.Benefit);
|
|
||||||
staticText = ", then put {this} into its owner's library third from the top";
|
|
||||||
}
|
|
||||||
|
|
||||||
private BraidedQuipuEffect(final BraidedQuipuEffect effect) {
|
|
||||||
super(effect);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public BraidedQuipuEffect copy() {
|
|
||||||
return new BraidedQuipuEffect(this);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean apply(Game game, Ability source) {
|
|
||||||
Player player = game.getPlayer(source.getControllerId());
|
|
||||||
Permanent permanent = source.getSourcePermanentIfItStillExists(game);
|
|
||||||
return player != null
|
|
||||||
&& permanent != null
|
|
||||||
&& player.putCardOnTopXOfLibrary(permanent, game, source, 3, true);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,47 +0,0 @@
|
||||||
package mage.cards.b;
|
|
||||||
|
|
||||||
import mage.MageInt;
|
|
||||||
import mage.abilities.common.SimpleStaticAbility;
|
|
||||||
import mage.abilities.dynamicvalue.common.LandsYouControlCount;
|
|
||||||
import mage.abilities.effects.common.continuous.BoostSourceEffect;
|
|
||||||
import mage.abilities.keyword.ReachAbility;
|
|
||||||
import mage.cards.CardImpl;
|
|
||||||
import mage.cards.CardSetInfo;
|
|
||||||
import mage.constants.CardType;
|
|
||||||
import mage.constants.Duration;
|
|
||||||
import mage.constants.SubType;
|
|
||||||
|
|
||||||
import java.util.UUID;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author TheElk801
|
|
||||||
*/
|
|
||||||
public final class BranchOfBoseiju extends CardImpl {
|
|
||||||
|
|
||||||
public BranchOfBoseiju(UUID ownerId, CardSetInfo setInfo) {
|
|
||||||
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT, CardType.CREATURE}, "");
|
|
||||||
|
|
||||||
this.subtype.add(SubType.PLANT);
|
|
||||||
this.power = new MageInt(0);
|
|
||||||
this.toughness = new MageInt(0);
|
|
||||||
this.color.setGreen(true);
|
|
||||||
this.nightCard = true;
|
|
||||||
|
|
||||||
// Reach
|
|
||||||
this.addAbility(ReachAbility.getInstance());
|
|
||||||
|
|
||||||
// Branch of Boseiju gets +1/+1 for each land you control.
|
|
||||||
this.addAbility(new SimpleStaticAbility(new BoostSourceEffect(
|
|
||||||
LandsYouControlCount.instance, LandsYouControlCount.instance, Duration.WhileOnBattlefield
|
|
||||||
).setText("{this} gets +1/+1 for each land you control")));
|
|
||||||
}
|
|
||||||
|
|
||||||
private BranchOfBoseiju(final BranchOfBoseiju card) {
|
|
||||||
super(card);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public BranchOfBoseiju copy() {
|
|
||||||
return new BranchOfBoseiju(this);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,39 +0,0 @@
|
||||||
package mage.cards.b;
|
|
||||||
|
|
||||||
import java.util.UUID;
|
|
||||||
import mage.MageInt;
|
|
||||||
import mage.abilities.common.WerewolfBackTriggeredAbility;
|
|
||||||
import mage.cards.CardImpl;
|
|
||||||
import mage.cards.CardSetInfo;
|
|
||||||
import mage.constants.CardType;
|
|
||||||
import mage.constants.SubType;
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @author fireshoes
|
|
||||||
*/
|
|
||||||
public final class BrandedHowler extends CardImpl {
|
|
||||||
|
|
||||||
public BrandedHowler(UUID ownerId, CardSetInfo setInfo) {
|
|
||||||
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"");
|
|
||||||
this.subtype.add(SubType.WEREWOLF);
|
|
||||||
this.power = new MageInt(4);
|
|
||||||
this.toughness = new MageInt(4);
|
|
||||||
this.color.setRed(true);
|
|
||||||
|
|
||||||
// this card is the second face of double-faced card
|
|
||||||
this.nightCard = true;
|
|
||||||
|
|
||||||
// At the beginning of each upkeep, if a player cast two or more spells last turn, transform Branded Howler.
|
|
||||||
this.addAbility(new WerewolfBackTriggeredAbility());
|
|
||||||
}
|
|
||||||
|
|
||||||
private BrandedHowler(final BrandedHowler card) {
|
|
||||||
super(card);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public BrandedHowler copy() {
|
|
||||||
return new BrandedHowler(this);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
package mage.cards.b;
|
package mage.cards.b;
|
||||||
|
|
||||||
import mage.abilities.Ability;
|
import mage.abilities.Ability;
|
||||||
|
import mage.abilities.common.CastSpellPaidBySourceTriggeredAbility;
|
||||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||||
import mage.abilities.condition.Condition;
|
import mage.abilities.condition.Condition;
|
||||||
import mage.abilities.condition.common.DescendedThisTurnCondition;
|
import mage.abilities.condition.common.DescendedThisTurnCondition;
|
||||||
|
|
@ -11,16 +12,17 @@ import mage.abilities.effects.OneShotEffect;
|
||||||
import mage.abilities.effects.common.RemoveAllCountersSourceEffect;
|
import mage.abilities.effects.common.RemoveAllCountersSourceEffect;
|
||||||
import mage.abilities.effects.common.TransformSourceEffect;
|
import mage.abilities.effects.common.TransformSourceEffect;
|
||||||
import mage.abilities.effects.common.counter.AddCountersSourceEffect;
|
import mage.abilities.effects.common.counter.AddCountersSourceEffect;
|
||||||
import mage.abilities.keyword.TransformAbility;
|
import mage.abilities.effects.keyword.DiscoverEffect;
|
||||||
|
import mage.abilities.mana.RedManaAbility;
|
||||||
import mage.abilities.triggers.BeginningOfEndStepTriggeredAbility;
|
import mage.abilities.triggers.BeginningOfEndStepTriggeredAbility;
|
||||||
import mage.cards.CardImpl;
|
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
import mage.constants.CardType;
|
import mage.cards.TransformingDoubleFacedCard;
|
||||||
import mage.constants.Outcome;
|
import mage.constants.*;
|
||||||
import mage.constants.SuperType;
|
|
||||||
import mage.constants.TargetController;
|
|
||||||
import mage.counters.CounterType;
|
import mage.counters.CounterType;
|
||||||
|
import mage.filter.FilterSpell;
|
||||||
|
import mage.filter.predicate.mageobject.PermanentPredicate;
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
|
import mage.game.stack.Spell;
|
||||||
import mage.players.Player;
|
import mage.players.Player;
|
||||||
import mage.watchers.common.DescendedWatcher;
|
import mage.watchers.common.DescendedWatcher;
|
||||||
|
|
||||||
|
|
@ -29,21 +31,27 @@ import java.util.UUID;
|
||||||
/**
|
/**
|
||||||
* @author Susucr
|
* @author Susucr
|
||||||
*/
|
*/
|
||||||
public final class BrasssTunnelGrinder extends CardImpl {
|
public final class BrasssTunnelGrinder extends TransformingDoubleFacedCard {
|
||||||
|
|
||||||
private static final Condition condition = new SourceHasCounterCondition(CounterType.BORE, 3);
|
private static final Condition condition = new SourceHasCounterCondition(CounterType.BORE, 3);
|
||||||
|
|
||||||
|
private static final FilterSpell filter = new FilterSpell("a permanent spell");
|
||||||
|
|
||||||
|
static {
|
||||||
|
filter.add(PermanentPredicate.instance);
|
||||||
|
}
|
||||||
|
|
||||||
public BrasssTunnelGrinder(UUID ownerId, CardSetInfo setInfo) {
|
public BrasssTunnelGrinder(UUID ownerId, CardSetInfo setInfo) {
|
||||||
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{2}{R}");
|
super(ownerId, setInfo,
|
||||||
this.secondSideCardClazz = mage.cards.t.TecutlanTheSearingRift.class;
|
new SuperType[]{SuperType.LEGENDARY}, new CardType[]{CardType.ARTIFACT}, new SubType[]{}, "{2}{R}",
|
||||||
|
"Tecutlan, the Searing Rift",
|
||||||
this.supertype.add(SuperType.LEGENDARY);
|
new SuperType[]{SuperType.LEGENDARY}, new CardType[]{CardType.LAND}, new SubType[]{SubType.CAVE}, "");
|
||||||
|
|
||||||
|
// Brass's Tunnel-Grinder
|
||||||
// When Brass's Tunnel-Grinder enters the battlefield, discard any number of cards, then draw that many cards plus one.
|
// When Brass's Tunnel-Grinder enters the battlefield, discard any number of cards, then draw that many cards plus one.
|
||||||
this.addAbility(new EntersBattlefieldTriggeredAbility(new BrasssTunnelGrinderEffect()));
|
this.getLeftHalfCard().addAbility(new EntersBattlefieldTriggeredAbility(new BrasssTunnelGrinderEffect()));
|
||||||
|
|
||||||
// At the beginning of your end step, if you descended this turn, put a bore counter on Brass's Tunnel-Grinder. Then if there are three or more bore counters on it, remove those counters and transform it.
|
// At the beginning of your end step, if you descended this turn, put a bore counter on Brass's Tunnel-Grinder. Then if there are three or more bore counters on it, remove those counters and transform it.
|
||||||
this.addAbility(new TransformAbility());
|
|
||||||
Ability ability = new BeginningOfEndStepTriggeredAbility(
|
Ability ability = new BeginningOfEndStepTriggeredAbility(
|
||||||
TargetController.YOU, new AddCountersSourceEffect(CounterType.BORE.createInstance()),
|
TargetController.YOU, new AddCountersSourceEffect(CounterType.BORE.createInstance()),
|
||||||
false, DescendedThisTurnCondition.instance
|
false, DescendedThisTurnCondition.instance
|
||||||
|
|
@ -53,7 +61,18 @@ public final class BrasssTunnelGrinder extends CardImpl {
|
||||||
"Then if there are three or more bore counters on it, remove those counters and transform it"
|
"Then if there are three or more bore counters on it, remove those counters and transform it"
|
||||||
).addEffect(new TransformSourceEffect()));
|
).addEffect(new TransformSourceEffect()));
|
||||||
ability.addHint(DescendedThisTurnCount.getHint());
|
ability.addHint(DescendedThisTurnCount.getHint());
|
||||||
this.addAbility(ability, new DescendedWatcher());
|
ability.addWatcher(new DescendedWatcher());
|
||||||
|
this.getLeftHalfCard().addAbility(ability);
|
||||||
|
|
||||||
|
// Tecutlan, the Searing Rift
|
||||||
|
// {T}: Add {R}.
|
||||||
|
this.getRightHalfCard().addAbility(new RedManaAbility());
|
||||||
|
|
||||||
|
// Whenever you cast a permanent spell using mana produced by Tecutlan, the Searing Rift, discover X, where X is that spell's mana value.
|
||||||
|
this.getRightHalfCard().addAbility(new CastSpellPaidBySourceTriggeredAbility(
|
||||||
|
new TecutlanTheSearingRiftEffect(),
|
||||||
|
filter, true
|
||||||
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
private BrasssTunnelGrinder(final BrasssTunnelGrinder card) {
|
private BrasssTunnelGrinder(final BrasssTunnelGrinder card) {
|
||||||
|
|
@ -94,3 +113,35 @@ class BrasssTunnelGrinderEffect extends OneShotEffect {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
class TecutlanTheSearingRiftEffect extends OneShotEffect {
|
||||||
|
|
||||||
|
TecutlanTheSearingRiftEffect() {
|
||||||
|
super(Outcome.Benefit);
|
||||||
|
staticText = "discover X, where X is that spell's mana value";
|
||||||
|
}
|
||||||
|
|
||||||
|
private TecutlanTheSearingRiftEffect(final TecutlanTheSearingRiftEffect effect) {
|
||||||
|
super(effect);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public TecutlanTheSearingRiftEffect copy() {
|
||||||
|
return new TecutlanTheSearingRiftEffect(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean apply(Game game, Ability source) {
|
||||||
|
Player controller = game.getPlayer(source.getControllerId());
|
||||||
|
if (controller == null) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
Spell spell = game.getSpellOrLKIStack(getTargetPointer().getFirst(game, source));
|
||||||
|
int mv = spell == null ? 0 : Math.max(0, spell.getManaValue());
|
||||||
|
|
||||||
|
DiscoverEffect.doDiscover(controller, mv, game, source);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,31 +1,54 @@
|
||||||
package mage.cards.b;
|
package mage.cards.b;
|
||||||
|
|
||||||
import mage.MageInt;
|
import mage.abilities.Ability;
|
||||||
|
import mage.abilities.common.SimpleStaticAbility;
|
||||||
|
import mage.abilities.common.WerewolfBackTriggeredAbility;
|
||||||
import mage.abilities.common.WerewolfFrontTriggeredAbility;
|
import mage.abilities.common.WerewolfFrontTriggeredAbility;
|
||||||
import mage.abilities.keyword.TransformAbility;
|
import mage.abilities.effects.common.continuous.BoostControlledEffect;
|
||||||
import mage.cards.CardImpl;
|
import mage.abilities.effects.common.continuous.GainAbilityControlledEffect;
|
||||||
|
import mage.abilities.keyword.TrampleAbility;
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
|
import mage.cards.TransformingDoubleFacedCard;
|
||||||
import mage.constants.CardType;
|
import mage.constants.CardType;
|
||||||
|
import mage.constants.Duration;
|
||||||
import mage.constants.SubType;
|
import mage.constants.SubType;
|
||||||
|
import mage.filter.StaticFilters;
|
||||||
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author fireshoes
|
* @author fireshoes
|
||||||
*/
|
*/
|
||||||
public final class BreakneckRider extends CardImpl {
|
public final class BreakneckRider extends TransformingDoubleFacedCard {
|
||||||
|
|
||||||
public BreakneckRider(UUID ownerId, CardSetInfo setInfo) {
|
public BreakneckRider(UUID ownerId, CardSetInfo setInfo) {
|
||||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{R}{R}");
|
super(ownerId, setInfo,
|
||||||
this.subtype.add(SubType.HUMAN, SubType.SCOUT, SubType.WEREWOLF);
|
new CardType[]{CardType.CREATURE}, new SubType[]{SubType.HUMAN, SubType.SCOUT, SubType.WEREWOLF}, "{1}{R}{R}",
|
||||||
this.power = new MageInt(3);
|
"Neck Breaker",
|
||||||
this.toughness = new MageInt(3);
|
new CardType[]{CardType.CREATURE}, new SubType[]{SubType.WEREWOLF}, "R");
|
||||||
|
|
||||||
this.secondSideCardClazz = mage.cards.n.NeckBreaker.class;
|
// Breakneck Rider
|
||||||
|
this.getLeftHalfCard().setPT(3, 3);
|
||||||
|
|
||||||
// At the beginning of each upkeep, if no spells were cast last turn, transform Breakneck Rider.
|
// At the beginning of each upkeep, if no spells were cast last turn, transform Breakneck Rider.
|
||||||
this.addAbility(new TransformAbility());
|
this.getLeftHalfCard().addAbility(new WerewolfFrontTriggeredAbility());
|
||||||
this.addAbility(new WerewolfFrontTriggeredAbility());
|
|
||||||
|
// Neck Breaker
|
||||||
|
this.getRightHalfCard().setPT(4, 3);
|
||||||
|
|
||||||
|
// Attacking creatures you control get +1/+0 and have trample.
|
||||||
|
Ability ability = new SimpleStaticAbility(new BoostControlledEffect(
|
||||||
|
1, 0, Duration.WhileOnBattlefield,
|
||||||
|
StaticFilters.FILTER_ATTACKING_CREATURES
|
||||||
|
));
|
||||||
|
ability.addEffect(new GainAbilityControlledEffect(
|
||||||
|
TrampleAbility.getInstance(), Duration.WhileOnBattlefield,
|
||||||
|
StaticFilters.FILTER_ATTACKING_CREATURES
|
||||||
|
).setText("and have trample"));
|
||||||
|
this.getRightHalfCard().addAbility(ability);
|
||||||
|
|
||||||
|
// At the beginning of each upkeep, if a player cast two or more spells last turn, transform Neck Breaker.
|
||||||
|
this.getRightHalfCard().addAbility(new WerewolfBackTriggeredAbility());
|
||||||
}
|
}
|
||||||
|
|
||||||
private BreakneckRider(final BreakneckRider card) {
|
private BreakneckRider(final BreakneckRider card) {
|
||||||
|
|
|
||||||
|
|
@ -1,26 +1,28 @@
|
||||||
package mage.cards.b;
|
package mage.cards.b;
|
||||||
|
|
||||||
import mage.MageInt;
|
import mage.abilities.common.BecomesTargetAttachedTriggeredAbility;
|
||||||
import mage.abilities.common.BecomesTargetSourceTriggeredAbility;
|
import mage.abilities.common.BecomesTargetSourceTriggeredAbility;
|
||||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||||
|
import mage.abilities.effects.common.AttachEffect;
|
||||||
import mage.abilities.effects.common.CreateTokenEffect;
|
import mage.abilities.effects.common.CreateTokenEffect;
|
||||||
import mage.abilities.keyword.DisturbAbility;
|
import mage.abilities.keyword.DisturbAbility;
|
||||||
|
import mage.abilities.keyword.EnchantAbility;
|
||||||
import mage.abilities.meta.OrTriggeredAbility;
|
import mage.abilities.meta.OrTriggeredAbility;
|
||||||
import mage.cards.CardImpl;
|
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
import mage.constants.CardType;
|
import mage.cards.TransformingDoubleFacedCard;
|
||||||
import mage.constants.SubType;
|
import mage.constants.*;
|
||||||
import mage.constants.Zone;
|
|
||||||
import mage.filter.FilterSpell;
|
import mage.filter.FilterSpell;
|
||||||
import mage.filter.predicate.other.AuraSpellPredicate;
|
import mage.filter.predicate.other.AuraSpellPredicate;
|
||||||
import mage.game.permanent.token.SpiritWhiteToken;
|
import mage.game.permanent.token.SpiritWhiteToken;
|
||||||
|
import mage.target.TargetPermanent;
|
||||||
|
import mage.target.common.TargetCreaturePermanent;
|
||||||
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author TheElk801
|
* @author TheElk801
|
||||||
*/
|
*/
|
||||||
public final class BrineComber extends CardImpl {
|
public final class BrineComber extends TransformingDoubleFacedCard {
|
||||||
|
|
||||||
private static final FilterSpell filter = new FilterSpell("an Aura spell");
|
private static final FilterSpell filter = new FilterSpell("an Aura spell");
|
||||||
|
|
||||||
|
|
@ -29,21 +31,40 @@ public final class BrineComber extends CardImpl {
|
||||||
}
|
}
|
||||||
|
|
||||||
public BrineComber(UUID ownerId, CardSetInfo setInfo) {
|
public BrineComber(UUID ownerId, CardSetInfo setInfo) {
|
||||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{W}{U}");
|
super(ownerId, setInfo,
|
||||||
|
new CardType[]{CardType.CREATURE}, new SubType[]{SubType.SPIRIT}, "{1}{W}{U}",
|
||||||
|
"Brinebound Gift",
|
||||||
|
new CardType[]{CardType.ENCHANTMENT}, new SubType[]{SubType.AURA}, "WU");
|
||||||
|
|
||||||
this.subtype.add(SubType.SPIRIT);
|
// Brine Comber
|
||||||
this.power = new MageInt(1);
|
this.getLeftHalfCard().setPT(1, 1);
|
||||||
this.toughness = new MageInt(1);
|
|
||||||
this.secondSideCardClazz = mage.cards.b.BrineboundGift.class;
|
|
||||||
|
|
||||||
// Whenever Brine Comber enters the battlefield or becomes the target of an Aura spell, create a 1/1 white Spirit creature token with flying.
|
// Whenever Brine Comber enters the battlefield or becomes the target of an Aura spell, create a 1/1 white Spirit creature token with flying.
|
||||||
this.addAbility(new OrTriggeredAbility(Zone.ALL, new CreateTokenEffect(new SpiritWhiteToken()), false,
|
this.getLeftHalfCard().addAbility(new OrTriggeredAbility(Zone.ALL, new CreateTokenEffect(new SpiritWhiteToken()), false,
|
||||||
"Whenever {this} enters or becomes the target of an Aura spell, ",
|
"Whenever {this} enters or becomes the target of an Aura spell, ",
|
||||||
new EntersBattlefieldTriggeredAbility(null),
|
new EntersBattlefieldTriggeredAbility(null),
|
||||||
new BecomesTargetSourceTriggeredAbility(null, filter)));
|
new BecomesTargetSourceTriggeredAbility(null, filter)));
|
||||||
|
|
||||||
|
|
||||||
|
// Brinebound Gift
|
||||||
|
// Enchant creature
|
||||||
|
TargetPermanent auraTarget = new TargetCreaturePermanent();
|
||||||
|
this.getRightHalfCard().getSpellAbility().addTarget(auraTarget);
|
||||||
|
this.getRightHalfCard().getSpellAbility().addEffect(new AttachEffect(Outcome.BoostCreature));
|
||||||
|
this.getRightHalfCard().addAbility(new EnchantAbility(auraTarget));
|
||||||
|
|
||||||
// Disturb {W}{U}
|
// Disturb {W}{U}
|
||||||
this.addAbility(new DisturbAbility(this, "{W}{U}"));
|
// needs to be added after enchant ability is set for target
|
||||||
|
this.getLeftHalfCard().addAbility(new DisturbAbility(this, "{W}{U}"));
|
||||||
|
|
||||||
|
// Whenever Brinebound Gift enters the battlefield or enchanted creature becomes the target of an Aura spell, create a 1/1 white Spirit creature token with flying.
|
||||||
|
this.getRightHalfCard().addAbility(new OrTriggeredAbility(Zone.ALL, new CreateTokenEffect(new SpiritWhiteToken()), false,
|
||||||
|
"Whenever {this} enters or enchanted creature becomes the target of an Aura spell, ",
|
||||||
|
new EntersBattlefieldTriggeredAbility(null),
|
||||||
|
new BecomesTargetAttachedTriggeredAbility(null, filter, SetTargetPointer.NONE, false)));
|
||||||
|
|
||||||
|
// If Brinebound Gift would be put into a graveyard from anywhere, exile it instead.
|
||||||
|
this.getRightHalfCard().addAbility(DisturbAbility.makeBackAbility());
|
||||||
}
|
}
|
||||||
|
|
||||||
private BrineComber(final BrineComber card) {
|
private BrineComber(final BrineComber card) {
|
||||||
|
|
|
||||||
|
|
@ -1,64 +0,0 @@
|
||||||
package mage.cards.b;
|
|
||||||
|
|
||||||
import mage.abilities.common.BecomesTargetAttachedTriggeredAbility;
|
|
||||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
|
||||||
import mage.abilities.effects.common.AttachEffect;
|
|
||||||
import mage.abilities.effects.common.CreateTokenEffect;
|
|
||||||
import mage.abilities.keyword.DisturbAbility;
|
|
||||||
import mage.abilities.keyword.EnchantAbility;
|
|
||||||
import mage.abilities.meta.OrTriggeredAbility;
|
|
||||||
import mage.cards.CardImpl;
|
|
||||||
import mage.cards.CardSetInfo;
|
|
||||||
import mage.constants.*;
|
|
||||||
import mage.filter.FilterSpell;
|
|
||||||
import mage.filter.predicate.other.AuraSpellPredicate;
|
|
||||||
import mage.game.permanent.token.SpiritWhiteToken;
|
|
||||||
import mage.target.TargetPermanent;
|
|
||||||
import mage.target.common.TargetCreaturePermanent;
|
|
||||||
|
|
||||||
import java.util.UUID;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author TheElk801
|
|
||||||
*/
|
|
||||||
public final class BrineboundGift extends CardImpl {
|
|
||||||
|
|
||||||
private static final FilterSpell filter = new FilterSpell("an Aura spell");
|
|
||||||
|
|
||||||
static {
|
|
||||||
filter.add(AuraSpellPredicate.instance);
|
|
||||||
}
|
|
||||||
|
|
||||||
public BrineboundGift(UUID ownerId, CardSetInfo setInfo) {
|
|
||||||
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "");
|
|
||||||
|
|
||||||
this.subtype.add(SubType.AURA);
|
|
||||||
this.color.setWhite(true);
|
|
||||||
this.color.setBlue(true);
|
|
||||||
this.nightCard = true;
|
|
||||||
|
|
||||||
// Enchant creature
|
|
||||||
TargetPermanent auraTarget = new TargetCreaturePermanent();
|
|
||||||
this.getSpellAbility().addTarget(auraTarget);
|
|
||||||
this.getSpellAbility().addEffect(new AttachEffect(Outcome.BoostCreature));
|
|
||||||
this.addAbility(new EnchantAbility(auraTarget));
|
|
||||||
|
|
||||||
// Whenever Brinebound Gift enters the battlefield or enchanted creature becomes the target of an Aura spell, create a 1/1 white Spirit creature token with flying.
|
|
||||||
this.addAbility(new OrTriggeredAbility(Zone.ALL, new CreateTokenEffect(new SpiritWhiteToken()), false,
|
|
||||||
"Whenever {this} enters or enchanted creature becomes the target of an Aura spell, ",
|
|
||||||
new EntersBattlefieldTriggeredAbility(null),
|
|
||||||
new BecomesTargetAttachedTriggeredAbility(null, filter, SetTargetPointer.NONE, false)));
|
|
||||||
|
|
||||||
// If Brinebound Gift would be put into a graveyard from anywhere, exile it instead.
|
|
||||||
this.addAbility(DisturbAbility.makeBackAbility());
|
|
||||||
}
|
|
||||||
|
|
||||||
private BrineboundGift(final BrineboundGift card) {
|
|
||||||
super(card);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public BrineboundGift copy() {
|
|
||||||
return new BrineboundGift(this);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue