master #51

Merged
Failure merged 249 commits from External/mage:master into master 2026-01-09 09:12:49 -08:00
928 changed files with 28198 additions and 24563 deletions

View file

@ -79,13 +79,15 @@ public enum MageTray {
} catch (AWTException e) {
log.error("TrayIcon could not be added: ", e);
}
} catch (Exception e) {
log.error(e);
}
}
public synchronized void blink() {
if (trayIcon == null)
return;
if (state == 0) {
synchronized (MageTray.class) {
if (state == 0) {

View file

@ -616,8 +616,11 @@ public class ScryfallImageSupportCards {
add("TLA"); // Avatar: The Last Airbender
add("TLE"); // Avatar: The Last Airbender Eternal
add("ECL"); // Lorwyn Eclipsed
add("ECC"); // Lorwyn Eclipsed Commander
add("TMT"); // Teenage Mutant Ninja Turtles
add("TMC"); // Teenage Mutant Ninja Turtles Eternal
add("MSH"); // Marvel Super Heroes
add("MSC"); // Marvel Super Heroes Commander
// Custom sets using Scryfall images - must provide a direct link for each card in directDownloadLinks
add("CALC"); // Custom Alchemized versions of existing cards

View file

@ -2889,12 +2889,12 @@ public class ScryfallImageSupportTokens {
put("REX/Treasure", "https://api.scryfall.com/cards/trex/2?format=image");
// UGL
put("UGL/Goblin", "https://api.scryfall.com/cards/tugl/4?format=image");
put("UGL/Pegasus", "https://api.scryfall.com/cards/tugl/1?format=image");
put("UGL/Rabid Sheep", "https://api.scryfall.com/cards/tugl/5?format=image");
put("UGL/Soldier", "https://api.scryfall.com/cards/tugl/2?format=image");
put("UGL/Squirrel", "https://api.scryfall.com/cards/tugl/6?format=image");
put("UGL/Zombie", "https://api.scryfall.com/cards/tugl/3?format=image");
put("UGL/Goblin", "https://api.scryfall.com/cards/tugl/92?format=image");
put("UGL/Pegasus", "https://api.scryfall.com/cards/tugl/89?format=image");
put("UGL/Rabid Sheep", "https://api.scryfall.com/cards/tugl/93?format=image");
put("UGL/Soldier", "https://api.scryfall.com/cards/tugl/90?format=image");
put("UGL/Squirrel", "https://api.scryfall.com/cards/tugl/94?format=image");
put("UGL/Zombie", "https://api.scryfall.com/cards/tugl/91?format=image");
// UST
put("UST/Angel", "https://api.scryfall.com/cards/tust/1?format=image");

View file

@ -0,0 +1,67 @@
package mage.cards.a;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
import mage.abilities.effects.common.continuous.LoseAllAbilitiesTargetEffect;
import mage.abilities.effects.common.counter.AddCountersTargetEffect;
import mage.abilities.keyword.FirstStrikeAbility;
import mage.abilities.keyword.FlyingAbility;
import mage.abilities.keyword.LifelinkAbility;
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.counters.CounterType;
import mage.filter.StaticFilters;
import mage.target.TargetPermanent;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class AbigaleEloquentFirstYear extends CardImpl {
public AbigaleEloquentFirstYear(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{W/B}{W/B}");
this.supertype.add(SuperType.LEGENDARY);
this.subtype.add(SubType.BIRD);
this.subtype.add(SubType.BARD);
this.power = new MageInt(1);
this.toughness = new MageInt(1);
// Flying
this.addAbility(FlyingAbility.getInstance());
// First strike
this.addAbility(FirstStrikeAbility.getInstance());
// Lifelink
this.addAbility(LifelinkAbility.getInstance());
// When Abigale enters, up to one other target creature loses all abilities. Put a flying counter, a first strike counter, and a lifelink counter on that creature.
Ability ability = new EntersBattlefieldTriggeredAbility(new LoseAllAbilitiesTargetEffect(Duration.Custom)
.setText("up to one other target creature loses all abilities"));
ability.addEffect(new AddCountersTargetEffect(CounterType.FLYING.createInstance())
.setText("Put a flying counter"));
ability.addEffect(new AddCountersTargetEffect(CounterType.FIRST_STRIKE.createInstance())
.setText(", a first strike counter"));
ability.addEffect(new AddCountersTargetEffect(CounterType.FLYING.createInstance())
.setText(", and a lifelink counter on that creature"));
ability.addTarget(new TargetPermanent(0, 1, StaticFilters.FILTER_ANOTHER_TARGET_CREATURE));
this.addAbility(ability);
}
private AbigaleEloquentFirstYear(final AbigaleEloquentFirstYear card) {
super(card);
}
@Override
public AbigaleEloquentFirstYear copy() {
return new AbigaleEloquentFirstYear(this);
}
}

View file

@ -1,51 +0,0 @@
package mage.cards.a;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.TransformIntoSourceTriggeredAbility;
import mage.abilities.effects.common.SacrificeEffect;
import mage.abilities.keyword.FlyingAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.filter.StaticFilters;
import mage.target.common.TargetOpponent;
import java.util.UUID;
/**
* @author fireshoes
*/
public final class AbolisherOfBloodlines extends CardImpl {
public AbolisherOfBloodlines(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "");
this.subtype.add(SubType.ELDRAZI);
this.subtype.add(SubType.VAMPIRE);
this.power = new MageInt(6);
this.toughness = new MageInt(5);
// this card is the second face of double-faced card
this.nightCard = true;
// Flying
this.addAbility(FlyingAbility.getInstance());
// When this creature transforms into Abolisher of Bloodlines, target opponent sacrifices three creatures.
Ability ability = new TransformIntoSourceTriggeredAbility(new SacrificeEffect(
StaticFilters.FILTER_PERMANENT_CREATURES, 3, "target opponent"
));
ability.addTarget(new TargetOpponent());
this.addAbility(ability);
}
private AbolisherOfBloodlines(final AbolisherOfBloodlines card) {
super(card);
}
@Override
public AbolisherOfBloodlines copy() {
return new AbolisherOfBloodlines(this);
}
}

View file

@ -0,0 +1,65 @@
package mage.cards.a;
import java.util.UUID;
import mage.ConditionalMana;
import mage.abilities.Ability;
import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.costs.common.TapSourceCost;
import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.effects.common.CreateTokenEffect;
import mage.abilities.mana.ColorlessManaAbility;
import mage.abilities.mana.ConditionalAnyColorManaAbility;
import mage.abilities.mana.builder.ConditionalManaBuilder;
import mage.abilities.mana.conditional.CreatureCastConditionalMana;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.game.permanent.token.HumanToken;
import mage.game.permanent.token.ShapeshifterColorlessToken;
/**
*
* @author muz
*/
public final class AbundantCountryside extends CardImpl {
public AbundantCountryside(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.LAND}, "");
// {T}: Add {C}.
this.addAbility(new ColorlessManaAbility());
// {T}: Add one mana of any color. Spend this mana only to cast a creature spell.
this.addAbility(new ConditionalAnyColorManaAbility(1, new AbundantCountrysideManaBuilder()));
// {6}, {T}: Create a 1/1 colorless Shapeshifter creature token with changeling.
Ability ability = new SimpleActivatedAbility(
new CreateTokenEffect(new ShapeshifterColorlessToken()), new ManaCostsImpl<>("{6}")
);
ability.addCost(new TapSourceCost());
this.addAbility(ability);
}
private AbundantCountryside(final AbundantCountryside card) {
super(card);
}
@Override
public AbundantCountryside copy() {
return new AbundantCountryside(this);
}
}
class AbundantCountrysideManaBuilder extends ConditionalManaBuilder {
@Override
public ConditionalMana build(Object... options) {
return new CreatureCastConditionalMana(this.mana);
}
@Override
public String getRule() {
return "Spend this mana only to cast a creature spell";
}
}

View file

@ -1,48 +0,0 @@
package mage.cards.a;
import java.util.UUID;
import mage.abilities.Ability;
import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.costs.common.TapSourceCost;
import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.effects.common.CreateTokenEffect;
import mage.abilities.mana.WhiteManaAbility;
import mage.constants.SuperType;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Zone;
import mage.game.permanent.token.IxalanVampireToken;
/**
*
* @author TheElk801
*/
public final class AdantoTheFirstFort extends CardImpl {
public AdantoTheFirstFort(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.LAND}, "");
this.supertype.add(SuperType.LEGENDARY);
this.nightCard = true;
// T: Add W.
this.addAbility(new WhiteManaAbility());
// 2W, T: Create a 1/1 white Vampire creature token with lifelink.
Ability ability = new SimpleActivatedAbility(new CreateTokenEffect(new IxalanVampireToken()), new ManaCostsImpl<>("{2}{W}"));
ability.addCost(new TapSourceCost());
this.addAbility(ability);
}
private AdantoTheFirstFort(final AdantoTheFirstFort card) {
super(card);
}
@Override
public AdantoTheFirstFort copy() {
return new AdantoTheFirstFort(this);
}
}

View file

@ -1,53 +0,0 @@
package mage.cards.a;
import mage.MageInt;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.dynamicvalue.common.ArtifactYouControlCount;
import mage.abilities.effects.common.continuous.SetBasePowerSourceEffect;
import mage.abilities.keyword.CrewAbility;
import mage.abilities.keyword.FlyingAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.*;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class AetherwingGoldenScaleFlagship extends CardImpl {
public AetherwingGoldenScaleFlagship(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(0);
this.toughness = new MageInt(4);
this.color.setBlue(true);
this.color.setRed(true);
this.nightCard = true;
// Flying
this.addAbility(FlyingAbility.getInstance());
// Aetherwing, Golden-Scale Flagship's power is equal to the number of artifacts you control.
this.addAbility(new SimpleStaticAbility(
Zone.ALL,
new SetBasePowerSourceEffect(ArtifactYouControlCount.instance)
.setText("{this}'s power is equal to the number of artifacts you control")
));
// Crew 1
this.addAbility(new CrewAbility(1));
}
private AetherwingGoldenScaleFlagship(final AetherwingGoldenScaleFlagship card) {
super(card);
}
@Override
public AetherwingGoldenScaleFlagship copy() {
return new AetherwingGoldenScaleFlagship(this);
}
}

View file

@ -42,7 +42,7 @@ public final class AllOutAssault extends CardImpl {
extraCombatAbility.addEffect(new CreateDelayedTriggeredAbilityEffect(new WhenYouAttackDelayedTriggeredAbility(
new UntapAllControllerEffect(
StaticFilters.FILTER_CONTROLLED_CREATURE, "untap each creature you control"), Duration.EndOfTurn, true)));
this.addAbility(extraCombatAbility.withInterveningIf(IsMainPhaseCondition.YOUR));
this.addAbility(extraCombatAbility.withInterveningIf(IsMainPhaseCondition.YOURS));
}

View file

@ -117,7 +117,7 @@ enum WretchedBonemassDynamicValue implements DynamicValue {
ExileZone exileZone = game
.getExile()
.getExileZone(CardUtil.getExileZoneId(
game, permanent.getId(), permanent.getZoneChangeCounter(game) - 2
game, permanent.getMainCard().getId(), permanent.getZoneChangeCounter(game) - 1
));
if (exileZone == null) {
return 0;
@ -167,7 +167,7 @@ class WretchedBonemassGainAbilityEffect extends ContinuousEffectImpl {
ExileZone exileZone = game
.getExile()
.getExileZone(CardUtil.getExileZoneId(
game, wretchedBonemass.getId(), wretchedBonemass.getZoneChangeCounter(game) - 2
game, wretchedBonemass.getMainCard().getId(), wretchedBonemass.getZoneChangeCounter(game) - 1
));
if (exileZone != null
&& !exileZone.isEmpty()) {

View file

@ -0,0 +1,59 @@
package mage.cards.a;
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.LifelinkAbility;
import mage.cards.CardSetInfo;
import mage.cards.TransformingDoubleFacedCard;
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 TransformingDoubleFacedCard {
public AmbitiousFarmhand(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, new SubType[]{SubType.HUMAN, SubType.PEASANT}, "{1}{W}",
"Seasoned Cathar",
new CardType[]{CardType.CREATURE}, new SubType[]{SubType.HUMAN, SubType.KNIGHT}, "W");
// Ambitious Farmhand
this.getLeftHalfCard().setPT(1, 1);
// 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.getLeftHalfCard().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.getLeftHalfCard().addAbility(new ActivateIfConditionActivatedAbility(
new TransformSourceEffect(), new ManaCostsImpl<>("{1}{W}{W}"), CovenCondition.instance
).setAbilityWord(AbilityWord.COVEN).addHint(CovenHint.instance));
// Seasoned Cathar
this.getRightHalfCard().setPT(3, 3);
// Lifelink
this.getRightHalfCard().addAbility(LifelinkAbility.getInstance());
}
private AmbitiousFarmhand(final AmbitiousFarmhand card) {
super(card);
}
@Override
public AmbitiousFarmhand copy() {
return new AmbitiousFarmhand(this);
}
}

View file

@ -1,52 +0,0 @@
package mage.cards.a;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.effects.common.AttachEffect;
import mage.abilities.effects.common.continuous.GainAbilityAttachedEffect;
import mage.abilities.keyword.DisturbAbility;
import mage.abilities.keyword.EnchantAbility;
import mage.abilities.keyword.LifelinkAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.*;
import mage.target.TargetPermanent;
import mage.target.common.TargetCreaturePermanent;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class AncestorsEmbrace extends CardImpl {
public AncestorsEmbrace(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "");
this.subtype.add(SubType.AURA);
this.color.setWhite(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));
// Enchanted creature has lifelink.
this.addAbility(new SimpleStaticAbility(new GainAbilityAttachedEffect(
LifelinkAbility.getInstance(), AttachmentType.AURA, Duration.WhileOnBattlefield
)));
// If Ancestor's Embrace would be put into a graveyard from anywhere, exile it instead.
this.addAbility(DisturbAbility.makeBackAbility());
}
private AncestorsEmbrace(final AncestorsEmbrace card) {
super(card);
}
@Override
public AncestorsEmbrace copy() {
return new AncestorsEmbrace(this);
}
}

View file

@ -1,92 +0,0 @@
package mage.cards.a;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.AttacksTriggeredAbility;
import mage.abilities.dynamicvalue.DynamicValue;
import mage.abilities.dynamicvalue.common.CardsInAllGraveyardsCount;
import mage.abilities.dynamicvalue.common.StaticValue;
import mage.abilities.effects.common.continuous.BoostSourceEffect;
import mage.abilities.hint.Hint;
import mage.abilities.keyword.MenaceAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.SubType;
import mage.filter.FilterCard;
import mage.filter.StaticFilters;
import mage.filter.common.FilterCreatureCard;
import mage.filter.predicate.card.DefendingPlayerOwnsCardPredicate;
import mage.game.Game;
import java.util.Objects;
import java.util.UUID;
import java.util.stream.Collectors;
/**
* @author TheElk801
*/
public final class AnimusOfNightsReach extends CardImpl {
private static final FilterCard filter
= new FilterCreatureCard("creature cards in defending player's graveyard");
static {
filter.add(DefendingPlayerOwnsCardPredicate.instance);
}
private static final DynamicValue xValue = new CardsInAllGraveyardsCount(filter);
public AnimusOfNightsReach(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT, CardType.CREATURE}, "");
this.subtype.add(SubType.SPIRIT);
this.power = new MageInt(0);
this.toughness = new MageInt(4);
this.color.setBlack(true);
this.nightCard = true;
// Menace
this.addAbility(new MenaceAbility());
// Whenever Animus of Night's Reach attacks, it gets +X/+0 until end of turn, where X is the number of creature cards in defending player's graveyard.
this.addAbility(new AttacksTriggeredAbility(new BoostSourceEffect(
xValue, StaticValue.get(0), Duration.EndOfTurn
).setText("it gets +X/+0 until end of turn, where X is the number of creature cards in defending player's graveyard")).addHint(AnimusOfNightsReachHint.instance));
}
private AnimusOfNightsReach(final AnimusOfNightsReach card) {
super(card);
}
@Override
public AnimusOfNightsReach copy() {
return new AnimusOfNightsReach(this);
}
}
enum AnimusOfNightsReachHint implements Hint {
instance;
@Override
public String getText(Game game, Ability ability) {
return "Cards in each opponent's graveyard:<br>"
+ game
.getOpponents(ability.getControllerId())
.stream()
.map(game::getPlayer)
.filter(Objects::nonNull)
.map(player -> player
.getName()
+ ": " + player
.getGraveyard()
.count(StaticFilters.FILTER_CARD_CREATURE, game))
.collect(Collectors.joining("<br>"));
}
@Override
public AnimusOfNightsReachHint copy() {
return instance;
}
}

View file

@ -0,0 +1,36 @@
package mage.cards.a;
import mage.abilities.effects.common.continuous.BoostTargetEffect;
import mage.abilities.keyword.ConvokeAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.target.common.TargetCreaturePermanent;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class AppealToEirdu extends CardImpl {
public AppealToEirdu(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{3}{W}");
// Convoke
this.addAbility(new ConvokeAbility());
// One or two target creatures each get +2/+1 until end of turn.
this.getSpellAbility().addEffect(new BoostTargetEffect(2, 1));
this.getSpellAbility().addTarget(new TargetCreaturePermanent(1, 2));
}
private AppealToEirdu(final AppealToEirdu card) {
super(card);
}
@Override
public AppealToEirdu copy() {
return new AppealToEirdu(this);
}
}

View file

@ -0,0 +1,55 @@
package mage.cards.a;
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.effects.common.AttachEffect;
import mage.abilities.effects.common.continuous.BoostEnchantedEffect;
import mage.abilities.effects.common.continuous.GainAbilityAttachedEffect;
import mage.abilities.keyword.EnchantAbility;
import mage.abilities.keyword.FlashAbility;
import mage.abilities.keyword.HexproofAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.*;
import mage.target.TargetPermanent;
import mage.target.common.TargetControlledCreaturePermanent;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class AquitectsDefenses extends CardImpl {
public AquitectsDefenses(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{1}{U}");
this.subtype.add(SubType.AURA);
// Flash
this.addAbility(FlashAbility.getInstance());
// Enchant creature you control
TargetPermanent auraTarget = new TargetControlledCreaturePermanent();
this.getSpellAbility().addTarget(auraTarget);
this.getSpellAbility().addEffect(new AttachEffect(Outcome.BoostCreature));
this.addAbility(new EnchantAbility(auraTarget));
// When this Aura enters, enchanted creature gains hexproof until end of turn.
this.addAbility(new EntersBattlefieldTriggeredAbility(new GainAbilityAttachedEffect(
HexproofAbility.getInstance(), AttachmentType.AURA, Duration.EndOfTurn
)));
// Enchanted creature gets +1/+2.
this.addAbility(new SimpleStaticAbility(new BoostEnchantedEffect(1, 2)));
}
private AquitectsDefenses(final AquitectsDefenses card) {
super(card);
}
@Override
public AquitectsDefenses copy() {
return new AquitectsDefenses(this);
}
}

View file

@ -1,54 +0,0 @@
package mage.cards.a;
import mage.MageInt;
import mage.abilities.costs.common.SacrificeTargetCost;
import mage.abilities.effects.common.DamageControllerEffect;
import mage.abilities.effects.common.DoIfCostPaid;
import mage.abilities.effects.common.TapSourceEffect;
import mage.abilities.keyword.FlyingAbility;
import mage.abilities.keyword.TrampleAbility;
import mage.abilities.triggers.BeginningOfUpkeepTriggeredAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.filter.common.FilterControlledPermanent;
import java.util.UUID;
/**
* @author anonymous
*/
public final class ArchdemonOfGreed extends CardImpl {
private static final FilterControlledPermanent filter = new FilterControlledPermanent(SubType.HUMAN, "Human");
public ArchdemonOfGreed(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "");
this.subtype.add(SubType.DEMON);
this.color.setBlack(true);
this.nightCard = true;
this.power = new MageInt(9);
this.toughness = new MageInt(9);
this.addAbility(FlyingAbility.getInstance());
this.addAbility(TrampleAbility.getInstance());
// At the beginning of your upkeep, sacrifice a Human. If you can't, tap Archdemon of Greed and it deals 9 damage to you.
this.addAbility(new BeginningOfUpkeepTriggeredAbility(new DoIfCostPaid(
null, new TapSourceEffect(), new SacrificeTargetCost(filter), false
).addOtherwiseEffect(new DamageControllerEffect(9))
.setText("sacrifice a Human. If you can't, tap {this} and it deals 9 damage to you")));
}
private ArchdemonOfGreed(final ArchdemonOfGreed card) {
super(card);
}
@Override
public ArchdemonOfGreed copy() {
return new ArchdemonOfGreed(this);
}
}

View file

@ -1,45 +0,0 @@
package mage.cards.a;
import mage.MageInt;
import mage.abilities.common.AttacksOrBlocksTriggeredAbility;
import mage.abilities.effects.common.CreateTokenEffect;
import mage.abilities.keyword.VigilanceAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.game.permanent.token.SpiritToken;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class ArchitectOfRestoration extends CardImpl {
public ArchitectOfRestoration(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT, CardType.CREATURE}, "");
this.subtype.add(SubType.FOX);
this.subtype.add(SubType.MONK);
this.power = new MageInt(3);
this.toughness = new MageInt(4);
this.color.setWhite(true);
this.nightCard = true;
// Vigilance
this.addAbility(VigilanceAbility.getInstance());
// Whenever Architect of Restoration attacks or blocks, create a 1/1 colorless Spirit creature token.
this.addAbility(new AttacksOrBlocksTriggeredAbility(new CreateTokenEffect(new SpiritToken()), false));
}
private ArchitectOfRestoration(final ArchitectOfRestoration card) {
super(card);
}
@Override
public ArchitectOfRestoration copy() {
return new ArchitectOfRestoration(this);
}
}

View file

@ -1,48 +0,0 @@
package mage.cards.a;
import mage.MageInt;
import mage.abilities.common.AttacksTriggeredAbility;
import mage.abilities.effects.common.DrawDiscardControllerEffect;
import mage.abilities.keyword.DisturbAbility;
import mage.abilities.keyword.FlyingAbility;
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 ArchiveHaunt extends CardImpl {
public ArchiveHaunt(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "");
this.subtype.add(SubType.SPIRIT);
this.subtype.add(SubType.WIZARD);
this.power = new MageInt(2);
this.toughness = new MageInt(1);
this.color.setBlue(true);
this.nightCard = true;
// Flying
this.addAbility(FlyingAbility.getInstance());
// Whenever Archive Haunt attacks, draw a card, then discard a card.
this.addAbility(new AttacksTriggeredAbility(new DrawDiscardControllerEffect(1, 1)));
// If Archive Haunt would be put into a graveyard from anywhere, exile it instead.
this.addAbility(DisturbAbility.makeBackAbility());
}
private ArchiveHaunt(final ArchiveHaunt card) {
super(card);
}
@Override
public ArchiveHaunt copy() {
return new ArchiveHaunt(this);
}
}

View file

@ -1,88 +0,0 @@
package mage.cards.a;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.triggers.BeginningOfEndStepTriggeredAbility;
import mage.abilities.condition.Condition;
import mage.abilities.decorator.ConditionalOneShotEffect;
import mage.abilities.effects.common.counter.AddCountersSourceEffect;
import mage.abilities.keyword.MenaceAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.WatcherScope;
import mage.counters.CounterType;
import mage.game.Game;
import mage.game.events.GameEvent;
import mage.game.events.ZoneChangeEvent;
import mage.watchers.Watcher;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class AshenReaper extends CardImpl {
public AshenReaper(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "");
this.subtype.add(SubType.ZOMBIE);
this.subtype.add(SubType.ELEMENTAL);
this.power = new MageInt(2);
this.toughness = new MageInt(1);
this.color.setBlack(true);
this.color.setRed(true);
this.nightCard = true;
// Menace
this.addAbility(new MenaceAbility(false));
// At the beginning of your end step, put a +1/+1 counter on Ashen Reaper if a permanent was put into a graveyard from the battlefield this turn.
this.addAbility(new BeginningOfEndStepTriggeredAbility(
new ConditionalOneShotEffect(
new AddCountersSourceEffect(CounterType.P1P1.createInstance()),
AshenReaperCondition.instance, "put a +1/+1 counter on {this} " +
"if a permanent was put into a graveyard from the battlefield this turn"
)
));
}
private AshenReaper(final AshenReaper card) {
super(card);
}
@Override
public AshenReaper copy() {
return new AshenReaper(this);
}
public static AshenReaperWatcher makeWatcher() {
return new AshenReaperWatcher();
}
}
enum AshenReaperCondition implements Condition {
instance;
@Override
public boolean apply(Game game, Ability source) {
return game.getState().getWatcher(AshenReaperWatcher.class).conditionMet();
}
}
class AshenReaperWatcher extends Watcher {
AshenReaperWatcher() {
super(WatcherScope.GAME);
}
@Override
public void watch(GameEvent event, Game game) {
if (event.getType() == GameEvent.EventType.ZONE_CHANGE
&& ((ZoneChangeEvent) event).isDiesEvent()) {
condition = true;
}
}
}

View file

@ -0,0 +1,76 @@
package mage.cards.a;
import mage.abilities.common.TransformIntoSourceTriggeredAbility;
import mage.abilities.common.TransformsOrEntersTriggeredAbility;
import mage.abilities.costs.common.DiscardCardCost;
import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.effects.common.DoIfCostPaid;
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
import mage.abilities.effects.common.TransformSourceEffect;
import mage.abilities.effects.mana.AddConditionalManaOfAnyColorEffect;
import mage.abilities.mana.conditional.ConditionalSpellManaBuilder;
import mage.abilities.meta.OrTriggeredAbility;
import mage.abilities.triggers.BeginningOfFirstMainTriggeredAbility;
import mage.cards.CardSetInfo;
import mage.cards.TransformingDoubleFacedCard;
import mage.constants.*;
import mage.filter.FilterSpell;
import mage.filter.predicate.mageobject.ManaValuePredicate;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class AshlingRekindled extends TransformingDoubleFacedCard {
private static final FilterSpell filter = new FilterSpell("spells with mana value 4 or greater");
static {
filter.add(new ManaValuePredicate(ComparisonType.MORE_THAN, 3));
}
public AshlingRekindled(UUID ownerId, CardSetInfo setInfo) {
super(
ownerId, setInfo,
new SuperType[]{SuperType.LEGENDARY}, new CardType[]{CardType.CREATURE}, new SubType[]{SubType.ELEMENTAL, SubType.SORCERER}, "{1}{R}",
"Ashling, Rimebound",
new SuperType[]{SuperType.LEGENDARY}, new CardType[]{CardType.CREATURE}, new SubType[]{SubType.ELEMENTAL, SubType.WIZARD}, "U"
);
this.getLeftHalfCard().setPT(1, 3);
this.getRightHalfCard().setPT(1, 3);
// Whenever this creature enters or transforms into Ashling, Rekindled, you may discard a card. If you do, draw a card.
this.getLeftHalfCard().addAbility(new TransformsOrEntersTriggeredAbility(
new DoIfCostPaid(new DrawCardSourceControllerEffect(1), new DiscardCardCost()), false
));
// At the beginning of your first main phase, you may pay {U}. If you do, transform Ashling.
this.getLeftHalfCard().addAbility(new BeginningOfFirstMainTriggeredAbility(
new DoIfCostPaid(new TransformSourceEffect(), new ManaCostsImpl<>("{U}"))
));
// Ashling, Rimebound
// Whenever this creature transforms into Ashling, Rimebound and at the beginning of your first main phase, add two mana of any one color. Spend this mana only to cast spells with mana value 4 or greater.
this.getRightHalfCard().addAbility(new OrTriggeredAbility(
Zone.BATTLEFIELD,
new AddConditionalManaOfAnyColorEffect(2, new ConditionalSpellManaBuilder(filter)),
new TransformIntoSourceTriggeredAbility(null),
new BeginningOfFirstMainTriggeredAbility(null)
));
// At the beginning of your first main phase, you may pay {R}. If you do, transform Ashling.
this.getRightHalfCard().addAbility(new BeginningOfFirstMainTriggeredAbility(
new DoIfCostPaid(new TransformSourceEffect(), new ManaCostsImpl<>("{R}"))
));
}
private AshlingRekindled(final AshlingRekindled card) {
super(card);
}
@Override
public AshlingRekindled copy() {
return new AshlingRekindled(this);
}
}

View file

@ -1,48 +0,0 @@
package mage.cards.a;
import mage.abilities.Ability;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.effects.common.continuous.BoostEquippedEffect;
import mage.abilities.effects.common.continuous.GainAbilityAttachedEffect;
import mage.abilities.keyword.EquipAbility;
import mage.abilities.keyword.FirstStrikeAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.AttachmentType;
import mage.constants.CardType;
import mage.constants.SubType;
import java.util.UUID;
/**
* @author fireshoes
*/
public final class AshmouthBlade extends CardImpl {
public AshmouthBlade(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "");
this.subtype.add(SubType.EQUIPMENT);
// this card is the second face of double-faced card
this.nightCard = true;
// Equipped creature gets +3/+3 and has first strike.
Ability ability = new SimpleStaticAbility(new BoostEquippedEffect(3, 3));
ability.addEffect(new GainAbilityAttachedEffect(
FirstStrikeAbility.getInstance(), AttachmentType.EQUIPMENT
).setText("and has first strike"));
this.addAbility(ability);
// Equip {3}
this.addAbility(new EquipAbility(3, false));
}
private AshmouthBlade(final AshmouthBlade card) {
super(card);
}
@Override
public AshmouthBlade copy() {
return new AshmouthBlade(this);
}
}

View file

@ -1,50 +0,0 @@
package mage.cards.a;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.SpellCastControllerTriggeredAbility;
import mage.abilities.effects.common.DamageTargetEffect;
import mage.abilities.keyword.FlyingAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.filter.StaticFilters;
import mage.target.common.TargetAnyTarget;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class AshmouthDragon extends CardImpl {
public AshmouthDragon(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "");
this.subtype.add(SubType.DRAGON);
this.power = new MageInt(4);
this.toughness = new MageInt(4);
this.color.setRed(true);
this.nightCard = true;
// Flying
this.addAbility(FlyingAbility.getInstance());
// Whenever you cast an instant or sorcery spell, Ashmouth Dragon deals 2 damage to any target.
Ability ability = new SpellCastControllerTriggeredAbility(
new DamageTargetEffect(2), StaticFilters.FILTER_SPELL_AN_INSTANT_OR_SORCERY, false
);
ability.addTarget(new TargetAnyTarget());
this.addAbility(ability);
}
private AshmouthDragon(final AshmouthDragon card) {
super(card);
}
@Override
public AshmouthDragon copy() {
return new AshmouthDragon(this);
}
}

View file

@ -0,0 +1,36 @@
package mage.cards.a;
import mage.abilities.effects.common.DamageWithPowerFromOneToAnotherTargetEffect;
import mage.abilities.effects.common.continuous.BoostTargetEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.target.common.TargetControlledCreaturePermanent;
import mage.target.common.TargetOpponentsCreaturePermanent;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class AssertPerfection extends CardImpl {
public AssertPerfection(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{1}{G}");
// Target creature you control gets +1/+0 until end of turn. It deals damage equal to its power to up to one target creature an opponent controls.
this.getSpellAbility().addEffect(new BoostTargetEffect(1, 0));
this.getSpellAbility().addEffect(new DamageWithPowerFromOneToAnotherTargetEffect("it"));
this.getSpellAbility().addTarget(new TargetControlledCreaturePermanent());
this.getSpellAbility().addTarget(new TargetOpponentsCreaturePermanent());
}
private AssertPerfection(final AssertPerfection card) {
super(card);
}
@Override
public AssertPerfection copy() {
return new AssertPerfection(this);
}
}

View file

@ -0,0 +1,51 @@
package mage.cards.a;
import mage.MageInt;
import mage.abilities.common.AttacksPlayerWithCreaturesTriggeredAbility;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
import mage.abilities.effects.common.continuous.BoostAllEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.*;
import mage.filter.common.FilterControlledCreaturePermanent;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class AttumaAtlanteanWarlord extends CardImpl {
private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent(SubType.MERFOLK);
public AttumaAtlanteanWarlord(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{U}{U}");
this.supertype.add(SuperType.LEGENDARY);
this.subtype.add(SubType.MERFOLK);
this.subtype.add(SubType.WARRIOR);
this.subtype.add(SubType.VILLAIN);
this.power = new MageInt(3);
this.toughness = new MageInt(4);
// Other Merfolk you control get +1/+1.
this.addAbility(new SimpleStaticAbility(new BoostAllEffect(
1, 1, Duration.WhileOnBattlefield, filter, true
)));
// Whenever one or more Merfolk you control attack a player, draw a card.
this.addAbility(new AttacksPlayerWithCreaturesTriggeredAbility(
new DrawCardSourceControllerEffect(1), filter, SetTargetPointer.NONE
));
}
private AttumaAtlanteanWarlord(final AttumaAtlanteanWarlord card) {
super(card);
}
@Override
public AttumaAtlanteanWarlord copy() {
return new AttumaAtlanteanWarlord(this);
}
}

View file

@ -1,51 +0,0 @@
package mage.cards.a;
import java.util.UUID;
import mage.abilities.Ability;
import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.costs.common.TapSourceCost;
import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.effects.common.ReturnFromGraveyardToBattlefieldTargetEffect;
import mage.abilities.mana.AnyColorManaAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SuperType;
import mage.constants.Zone;
import mage.filter.StaticFilters;
import mage.target.common.TargetCardInYourGraveyard;
/**
*
* @author LevelX2
*/
public final class AtzalCaveOfEternity extends CardImpl {
public AtzalCaveOfEternity(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.LAND}, "");
this.supertype.add(SuperType.LEGENDARY);
this.nightCard = true;
// <i>(Transforms from Journey to Eternity.)</i>
// {t}: Add one mana of any color.
this.addAbility(new AnyColorManaAbility());
// {3}{B}{G}, {T}: Return target creature card from your graveyard to the battlefield.
Ability ability = new SimpleActivatedAbility(new ReturnFromGraveyardToBattlefieldTargetEffect(), new ManaCostsImpl<>("{3}{B}{G}"));
ability.addCost(new TapSourceCost());
ability.addTarget(new TargetCardInYourGraveyard(StaticFilters.FILTER_CARD_CREATURE_YOUR_GRAVEYARD));
this.addAbility(ability);
}
private AtzalCaveOfEternity(final AtzalCaveOfEternity card) {
super(card);
}
@Override
public AtzalCaveOfEternity copy() {
return new AtzalCaveOfEternity(this);
}
}

View file

@ -0,0 +1,115 @@
package mage.cards.a;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.TriggeredAbilityImpl;
import mage.abilities.costs.common.BlightCost;
import mage.abilities.effects.OneShotEffect;
import mage.abilities.keyword.WardAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.*;
import mage.counters.CounterType;
import mage.game.Controllable;
import mage.game.Game;
import mage.game.events.GameEvent;
import mage.game.permanent.Permanent;
import java.util.Optional;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class AuntieOolCursewretch extends CardImpl {
public AuntieOolCursewretch(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{B}{R}{G}");
this.supertype.add(SuperType.LEGENDARY);
this.subtype.add(SubType.GOBLIN);
this.subtype.add(SubType.WARLOCK);
this.power = new MageInt(4);
this.toughness = new MageInt(4);
// Ward--Blight 2.
this.addAbility(new WardAbility(new BlightCost(2)));
// Whenever one or more -1/-1 counters are put on a creature, draw a card if you control that creature. If you don't control it, its controller loses 1 life.
this.addAbility(new AuntieOolCursewretchTriggeredAbility());
}
private AuntieOolCursewretch(final AuntieOolCursewretch card) {
super(card);
}
@Override
public AuntieOolCursewretch copy() {
return new AuntieOolCursewretch(this);
}
}
class AuntieOolCursewretchTriggeredAbility extends TriggeredAbilityImpl {
AuntieOolCursewretchTriggeredAbility() {
super(Zone.BATTLEFIELD, new AuntieOolCursewretchEffect());
setTriggerPhrase("Whenever one or more -1/-1 counters are put on a creature, ");
}
private AuntieOolCursewretchTriggeredAbility(final AuntieOolCursewretchTriggeredAbility ability) {
super(ability);
}
@Override
public AuntieOolCursewretchTriggeredAbility copy() {
return new AuntieOolCursewretchTriggeredAbility(this);
}
@Override
public boolean checkEventType(GameEvent event, Game game) {
return event.getType() == GameEvent.EventType.COUNTERS_ADDED;
}
@Override
public boolean checkTrigger(GameEvent event, Game game) {
Permanent permanent = game.getPermanentOrLKIBattlefield(event.getTargetId());
if (permanent == null
|| !permanent.isCreature(game)
|| !event.getData().equals(CounterType.M1M1.getName())
|| event.getAmount() < 1) {
return false;
}
this.getEffects().setValue("creature", permanent);
return true;
}
}
class AuntieOolCursewretchEffect extends OneShotEffect {
AuntieOolCursewretchEffect() {
super(Outcome.Benefit);
staticText = "draw a card if you control that creature. If you don't control it, its controller loses 1 life";
}
private AuntieOolCursewretchEffect(final AuntieOolCursewretchEffect effect) {
super(effect);
}
@Override
public AuntieOolCursewretchEffect copy() {
return new AuntieOolCursewretchEffect(this);
}
@Override
public boolean apply(Game game, Ability source) {
return Optional
.ofNullable((Permanent) getValue("creature"))
.map(Controllable::getControllerId)
.map(game::getPlayer)
.map(player -> source.isControlledBy(player.getId())
? player.drawCards(1, source, game)
: player.loseLife(1, game, source, false))
.filter(x -> x > 0)
.isPresent();
}
}

View file

@ -0,0 +1,92 @@
package mage.cards.a;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
import mage.abilities.dynamicvalue.common.ColorsAmongControlledPermanentsCount;
import mage.abilities.effects.OneShotEffect;
import mage.abilities.keyword.TrampleAbility;
import mage.cards.*;
import mage.constants.*;
import mage.filter.StaticFilters;
import mage.game.Game;
import mage.players.Player;
import mage.target.TargetCard;
import mage.target.common.TargetCardInLibrary;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class AuroraAwakener extends CardImpl {
public AuroraAwakener(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{6}{G}");
this.subtype.add(SubType.GIANT);
this.subtype.add(SubType.DRUID);
this.power = new MageInt(7);
this.toughness = new MageInt(7);
// Trample
this.addAbility(TrampleAbility.getInstance());
// Vivid -- When this creature enters, reveal cards from the top of your library until you reveal X permanent cards, where X is the number of colors among permanents you control. Put any number of those permanent cards onto the battlefield, then put the rest of the revealed cards on the bottom of your library in a random order.
this.addAbility(new EntersBattlefieldTriggeredAbility(new AuroraAwakenerEffect())
.setAbilityWord(AbilityWord.VIVID)
.addHint(ColorsAmongControlledPermanentsCount.ALL_PERMANENTS.getHint()));
}
private AuroraAwakener(final AuroraAwakener card) {
super(card);
}
@Override
public AuroraAwakener copy() {
return new AuroraAwakener(this);
}
}
class AuroraAwakenerEffect extends OneShotEffect {
AuroraAwakenerEffect() {
super(Outcome.Benefit);
staticText = "reveal cards from the top of your library until you reveal X permanent cards, " +
"where X is the number of colors among permanents you control. " +
"Put any number of those permanent cards onto the battlefield, " +
"then put the rest of the revealed cards on the bottom of your library in a random order";
}
private AuroraAwakenerEffect(final AuroraAwakenerEffect effect) {
super(effect);
}
@Override
public AuroraAwakenerEffect copy() {
return new AuroraAwakenerEffect(this);
}
@Override
public boolean apply(Game game, Ability source) {
Player player = game.getPlayer(source.getControllerId());
int count = ColorsAmongControlledPermanentsCount.ALL_PERMANENTS.calculate(game, source, this);
if (player == null || count < 1) {
return false;
}
Cards cards = new CardsImpl();
for (Card card : player.getLibrary().getCards(game)) {
cards.add(card);
if (cards.count(StaticFilters.FILTER_CARD_PERMANENT, game) >= count) {
break;
}
}
player.revealCards(source, cards, game);
TargetCard target = new TargetCardInLibrary(0, Integer.MAX_VALUE, StaticFilters.FILTER_CARD_PERMANENTS);
player.choose(outcome, cards, target, source, game);
player.moveCards(new CardsImpl(target.getTargets()), Zone.BATTLEFIELD, source, game);
cards.retainZone(Zone.LIBRARY, game);
player.putCardsOnBottomOfLibrary(cards, game, source, false);
return true;
}
}

View file

@ -170,14 +170,14 @@ class AvatarAangWatcher extends Watcher {
earthSet.clear();
airSet.clear();
fireSet.clear();
earthSet.clear();
waterSet.clear();
}
private boolean checkPlayer(UUID playerId) {
return earthSet.contains(playerId)
&& airSet.contains(playerId)
&& fireSet.contains(playerId)
&& earthSet.contains(playerId);
&& waterSet.contains(playerId);
}
static boolean checkPlayer(Game game, Ability source) {

View file

@ -1,50 +0,0 @@
package mage.cards.a;
import mage.MageInt;
import mage.abilities.common.SpellCastControllerTriggeredAbility;
import mage.abilities.costs.common.WaterbendCost;
import mage.abilities.effects.common.CreateTokenEffect;
import mage.abilities.effects.common.turn.AddExtraTurnControllerEffect;
import mage.abilities.keyword.ExhaustAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.SuperType;
import mage.filter.StaticFilters;
import mage.game.permanent.token.SpiritWorldToken;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class AvatarKuruk extends CardImpl {
public AvatarKuruk(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(3);
this.nightCard = true;
// Whenever you cast a spell, create a 1/1 colorless Spirit creature token with "This token can't block or be blocked by non-Spirit creatures."
this.addAbility(new SpellCastControllerTriggeredAbility(
new CreateTokenEffect(new SpiritWorldToken()), StaticFilters.FILTER_SPELL_A, false
));
// Exhaust -- Waterbend {20}: Take an extra turn after this one.
this.addAbility(new ExhaustAbility(new AddExtraTurnControllerEffect(), new WaterbendCost(20)));
}
private AvatarKuruk(final AvatarKuruk card) {
super(card);
}
@Override
public AvatarKuruk copy() {
return new AvatarKuruk(this);
}
}

View file

@ -1,62 +0,0 @@
package mage.cards.a;
import mage.MageInt;
import mage.Mana;
import mage.abilities.Ability;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.costs.common.TapSourceCost;
import mage.abilities.dynamicvalue.common.GreatestAmongPermanentsValue;
import mage.abilities.effects.common.continuous.GainAbilityControlledEffect;
import mage.abilities.keyword.HexproofAbility;
import mage.abilities.keyword.TrampleAbility;
import mage.abilities.mana.DynamicManaAbility;
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 java.util.UUID;
/**
* @author TheElk801
*/
public final class AvatarKyoshi extends CardImpl {
public AvatarKyoshi(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(5);
this.toughness = new MageInt(4);
this.nightCard = true;
// Lands you control have trample and hexproof.
Ability ability = new SimpleStaticAbility(new GainAbilityControlledEffect(
TrampleAbility.getInstance(), Duration.WhileOnBattlefield, StaticFilters.FILTER_LANDS
));
ability.addEffect(new GainAbilityControlledEffect(
HexproofAbility.getInstance(), Duration.WhileOnBattlefield, StaticFilters.FILTER_LANDS
).setText("and hexproof"));
this.addAbility(ability);
// {T}: Add X mana of any one color, where X is the greatest power among creatures you control.
this.addAbility(new DynamicManaAbility(
Mana.AnyMana(1), GreatestAmongPermanentsValue.POWER_CONTROLLED_CREATURES,
new TapSourceCost(), "add X mana of any one color, " +
"where X is the greatest power among creatures you control", true
).addHint(GreatestAmongPermanentsValue.POWER_CONTROLLED_CREATURES.getHint()));
}
private AvatarKyoshi(final AvatarKyoshi card) {
super(card);
}
@Override
public AvatarKyoshi copy() {
return new AvatarKyoshi(this);
}
}

View file

@ -1,48 +0,0 @@
package mage.cards.a;
import mage.MageInt;
import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.costs.mana.GenericManaCost;
import mage.abilities.effects.common.CreateTokenEffect;
import mage.abilities.keyword.FirebendingAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.SuperType;
import mage.game.permanent.token.DragonFirebendingToken;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class AvatarRoku extends CardImpl {
public AvatarRoku(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(4);
this.nightCard = true;
// Firebending 4
this.addAbility(new FirebendingAbility(4));
// {8}: Create a 4/4 red Dragon creature token with flying and firebending 4.
this.addAbility(new SimpleActivatedAbility(
new CreateTokenEffect(new DragonFirebendingToken()), new GenericManaCost(8)
));
}
private AvatarRoku(final AvatarRoku card) {
super(card);
}
@Override
public AvatarRoku copy() {
return new AvatarRoku(this);
}
}

View file

@ -1,57 +0,0 @@
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);
}
}

View file

@ -1,128 +0,0 @@
package mage.cards.a;
import mage.abilities.Ability;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.effects.OneShotEffect;
import mage.abilities.effects.common.*;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Outcome;
import mage.constants.Zone;
import mage.counters.CounterType;
import mage.filter.StaticFilters;
import mage.game.Game;
import mage.game.permanent.Permanent;
import mage.players.Player;
import mage.target.TargetPermanent;
import mage.target.TargetPlayer;
import mage.target.common.TargetControlledPermanent;
import mage.target.common.TargetCreaturePermanentAmount;
import mage.target.common.TargetPermanentAmount;
import mage.target.targetpointer.SecondTargetPointer;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class AwakenTheMaelstrom extends CardImpl {
public AwakenTheMaelstrom(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "");
this.nightCard = true;
// Awaken the Maelstrom is all colors.
this.color.setWhite(true);
this.color.setBlue(true);
this.color.setBlack(true);
this.color.setRed(true);
this.color.setGreen(true);
this.addAbility(new SimpleStaticAbility(Zone.ALL, new InfoEffect("{this} is all colors")));
// Target player draws two cards.
this.getSpellAbility().addEffect(new DrawCardTargetEffect(2));
this.getSpellAbility().addTarget(new TargetPlayer().withChooseHint("to draw two cards"));
// You may put an artifact card from your hand onto the battlefield.
this.getSpellAbility().addEffect(new PutCardFromHandOntoBattlefieldEffect(StaticFilters.FILTER_CARD_ARTIFACT_AN));
// Create a token that's a copy of a permanent you control.
// Distribute three +1/+1 counters among one, two, or three creatures you control.
this.getSpellAbility().addEffect(new AwakenTheMaelstromEffect());
// Destroy target permanent an opponent controls.
this.getSpellAbility().addEffect(new DestroyTargetEffect().setTargetPointer(new SecondTargetPointer()));
this.getSpellAbility().addTarget(new TargetPermanent(StaticFilters.FILTER_OPPONENTS_PERMANENT).withChooseHint("to destroy"));
}
private AwakenTheMaelstrom(final AwakenTheMaelstrom card) {
super(card);
}
@Override
public AwakenTheMaelstrom copy() {
return new AwakenTheMaelstrom(this);
}
}
class AwakenTheMaelstromEffect extends OneShotEffect {
AwakenTheMaelstromEffect() {
super(Outcome.Benefit);
staticText = "Create a token that's a copy of a permanent you control. " +
"Distribute three +1/+1 counters among one, two, or three creatures you control.";
}
private AwakenTheMaelstromEffect(final AwakenTheMaelstromEffect effect) {
super(effect);
}
@Override
public AwakenTheMaelstromEffect copy() {
return new AwakenTheMaelstromEffect(this);
}
@Override
public boolean apply(Game game, Ability source) {
Player player = game.getPlayer(source.getControllerId());
if (player == null) {
return false;
}
makeToken(player, game, source);
game.processAction();
distributeCounters(player, game, source);
return true;
}
private void makeToken(Player player, Game game, Ability source) {
TargetPermanent target = new TargetControlledPermanent();
target.withNotTarget(true);
target.withChooseHint("to copy");
if (!target.canChoose(player.getId(), source, game)) {
return;
}
player.choose(outcome, target, source, game);
Permanent permanent = game.getPermanent(target.getFirstTarget());
if (permanent != null) {
new CreateTokenCopyTargetEffect().setSavedPermanent(permanent).apply(game, source);
}
}
private void distributeCounters(Player player, Game game, Ability source) {
if (game.getBattlefield().count(StaticFilters.FILTER_CONTROLLED_CREATURE, player.getId(), source, game) < 1) {
return;
}
TargetPermanentAmount target = new TargetCreaturePermanentAmount(3, StaticFilters.FILTER_CONTROLLED_CREATURE);
target.withNotTarget(true);
target.withChooseHint("to distribute counters");
target.chooseTarget(outcome, player.getId(), source, game);
for (UUID targetId : target.getTargets()) {
Permanent permanent = game.getPermanent(targetId);
if (permanent != null) {
permanent.addCounters(CounterType.P1P1.createInstance(target.getTargetAmount(targetId)), source, game);
}
}
}
}

View file

@ -1,53 +0,0 @@
package mage.cards.a;
import mage.MageInt;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.effects.common.continuous.AddCardTypeSourceEffect;
import mage.abilities.keyword.HasteAbility;
import mage.abilities.keyword.VigilanceAbility;
import mage.abilities.mana.AnyColorManaAbility;
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 AwakenedSkyclave extends CardImpl {
public AwakenedSkyclave(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "");
this.subtype.add(SubType.ELEMENTAL);
this.power = new MageInt(4);
this.toughness = new MageInt(4);
this.color.setGreen(true);
this.nightCard = true;
// Vigilance
this.addAbility(VigilanceAbility.getInstance());
// Haste
this.addAbility(HasteAbility.getInstance());
// As long as Awakened Skyclave is on the battlefield, it's a land in addition to its other types.
this.addAbility(new SimpleStaticAbility(new AddCardTypeSourceEffect(Duration.WhileOnBattlefield, CardType.LAND)
.setText("as long as {this} is on the battlefield, it's a land in addition to its other types")));
// {T}: Add one mana of any color.
this.addAbility(new AnyColorManaAbility());
}
private AwakenedSkyclave(final AwakenedSkyclave card) {
super(card);
}
@Override
public AwakenedSkyclave copy() {
return new AwakenedSkyclave(this);
}
}

View file

@ -1,48 +0,0 @@
package mage.cards.a;
import mage.MageInt;
import mage.abilities.common.TransformIntoSourceTriggeredAbility;
import mage.abilities.effects.common.ReturnToHandFromBattlefieldAllEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.Predicates;
import java.util.UUID;
/**
* @author fireshoes
*/
public final class AwokenHorror extends CardImpl {
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("non-Horror creatures");
static {
filter.add(Predicates.not(SubType.HORROR.getPredicate()));
}
public AwokenHorror(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "");
this.subtype.add(SubType.KRAKEN);
this.subtype.add(SubType.HORROR);
this.power = new MageInt(7);
this.toughness = new MageInt(8);
this.color.setBlue(true);
this.nightCard = true;
// When this creature transforms into Awoken Horrow, return all non-Horror creatures to their owners' hands.
this.addAbility(new TransformIntoSourceTriggeredAbility(new ReturnToHandFromBattlefieldAllEffect(filter)));
}
private AwokenHorror(final AwokenHorror card) {
super(card);
}
@Override
public AwokenHorror copy() {
return new AwokenHorror(this);
}
}

View file

@ -1,60 +0,0 @@
package mage.cards.a;
import java.util.UUID;
import mage.abilities.Ability;
import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.costs.common.TapSourceCost;
import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.effects.common.LookLibraryAndPickControllerEffect;
import mage.abilities.mana.BlueManaAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.PutCards;
import mage.constants.SuperType;
import mage.filter.FilterCard;
import mage.filter.predicate.Predicates;
/**
*
* @author LevelX2
*/
public final class AzcantaTheSunkenRuin extends CardImpl {
private static final FilterCard filter = new FilterCard("a noncreature, nonland card");
static {
filter.add(Predicates.not(CardType.CREATURE.getPredicate()));
filter.add(Predicates.not(CardType.LAND.getPredicate()));
}
public AzcantaTheSunkenRuin(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.LAND}, "");
this.supertype.add(SuperType.LEGENDARY);
// this card is the second face of double-faced card
this.nightCard = true;
// (Transforms from Search for Azcanta)/
// {T} : Add {U}.
this.addAbility(new BlueManaAbility());
// {2}{U} , {T} : Look at the top four cards of your library. You may reveal a noncreature, nonland card from among them and put it into your hand. Put the rest on the bottom of your library in any order.
Ability ability = new SimpleActivatedAbility(
new LookLibraryAndPickControllerEffect(4, 1, filter, PutCards.HAND, PutCards.BOTTOM_ANY),
new ManaCostsImpl<>("{2}{U}")
);
ability.addCost(new TapSourceCost());
this.addAbility(ability);
}
private AzcantaTheSunkenRuin(final AzcantaTheSunkenRuin card) {
super(card);
}
@Override
public AzcantaTheSunkenRuin copy() {
return new AzcantaTheSunkenRuin(this);
}
}

View file

@ -1,44 +0,0 @@
package mage.cards.b;
import mage.MageInt;
import mage.abilities.common.AttacksEachCombatStaticAbility;
import mage.abilities.common.WerewolfBackTriggeredAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import java.util.UUID;
/**
* @author nantuko
*/
public final class BaneOfHanweir extends CardImpl {
public BaneOfHanweir(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "");
this.subtype.add(SubType.WEREWOLF);
this.color.setRed(true);
// this card is the second face of double-faced card
this.nightCard = true;
this.power = new MageInt(5);
this.toughness = new MageInt(5);
// Bane of Hanweir attacks each turn if able.
this.addAbility(new AttacksEachCombatStaticAbility());
// At the beginning of each upkeep, if a player cast two or more spells last turn, transform Bane of Hanweir.
this.addAbility(new WerewolfBackTriggeredAbility());
}
private BaneOfHanweir(final BaneOfHanweir card) {
super(card);
}
@Override
public BaneOfHanweir copy() {
return new BaneOfHanweir(this);
}
}

View file

@ -4,7 +4,7 @@ import mage.abilities.Ability;
import mage.abilities.common.ActivateIfConditionActivatedAbility;
import mage.abilities.common.EntersBattlefieldTappedUnlessAbility;
import mage.abilities.condition.common.MorbidCondition;
import mage.abilities.condition.common.YouControlPermanentCondition;
import mage.abilities.condition.common.YouControlALegendaryCreatureCondition;
import mage.abilities.costs.common.TapSourceCost;
import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.dynamicvalue.common.GetXValue;
@ -16,8 +16,6 @@ import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.SuperType;
import mage.filter.FilterPermanent;
import mage.filter.common.FilterControlledCreaturePermanent;
import java.util.UUID;
@ -26,21 +24,14 @@ import java.util.UUID;
*/
public final class BaradDur extends CardImpl {
private static final FilterPermanent filter = new FilterControlledCreaturePermanent("a legendary creature");
static {
filter.add(SuperType.LEGENDARY.getPredicate());
}
private static final YouControlPermanentCondition condition = new YouControlPermanentCondition(filter);
public BaradDur(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.LAND}, "");
this.supertype.add(SuperType.LEGENDARY);
// Barad-dur enters the battlefield tapped unless you control a legendary creature.
this.addAbility(new EntersBattlefieldTappedUnlessAbility(condition).addHint(condition.getHint()));
this.addAbility(new EntersBattlefieldTappedUnlessAbility(YouControlALegendaryCreatureCondition.instance)
.addHint(YouControlALegendaryCreatureCondition.getHint()));
// {T}: Add {B}.
this.addAbility(new BlackManaAbility());

View file

@ -1,56 +0,0 @@
package mage.cards.b;
import mage.abilities.common.CastSpellPaidBySourceTriggeredAbility;
import mage.abilities.effects.common.CreateTokenEffect;
import mage.abilities.mana.WhiteManaAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SuperType;
import mage.filter.FilterSpell;
import mage.filter.predicate.Predicates;
import mage.game.permanent.token.GnomeSoldierStarStarToken;
import java.util.UUID;
/**
* @author Susucr
*/
public final class BarracksOfTheThousand extends CardImpl {
private static final FilterSpell filter = new FilterSpell("an artifact or creature spell");
static {
filter.add(Predicates.or(
CardType.ARTIFACT.getPredicate(),
CardType.CREATURE.getPredicate()
));
}
public BarracksOfTheThousand(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT, CardType.LAND}, "");
this.supertype.add(SuperType.LEGENDARY);
// (Transforms from Thousand Moons Smithy.)
this.nightCard = true;
// {T}: Add {W}.
this.addAbility(new WhiteManaAbility());
// Whenever you cast an artifact or creature spell using mana produced by Barracks of the Thousand, create a white Gnome Soldier artifact creature token with "This creature's power and toughness are each equal to the number of artifacts and/or creatures you control."
this.addAbility(new CastSpellPaidBySourceTriggeredAbility(
new CreateTokenEffect(new GnomeSoldierStarStarToken()),
filter, false
));
}
private BarracksOfTheThousand(final BarracksOfTheThousand card) {
super(card);
}
@Override
public BarracksOfTheThousand copy() {
return new BarracksOfTheThousand(this);
}
}

View file

@ -19,7 +19,7 @@ import mage.constants.SubType;
import mage.filter.StaticFilters;
import mage.game.Game;
import mage.game.permanent.Permanent;
import mage.game.permanent.token.WallToken;
import mage.game.permanent.token.BasaltGolemToken;
import mage.players.Player;
/**
@ -30,7 +30,7 @@ public final class BasaltGolem extends CardImpl {
public BasaltGolem(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{5}");
this.subtype.add(SubType.GOLEM);
this.power = new MageInt(2);
this.toughness = new MageInt(4);
@ -83,6 +83,6 @@ class BasaltGolemEffect extends OneShotEffect {
if (!creature.sacrifice(source, game))
return false;
return new WallToken().putOntoBattlefield(1, game, source, player.getId());
return new BasaltGolemToken().putOntoBattlefield(1, game, source, player.getId());
}
}

View file

@ -1,47 +0,0 @@
package mage.cards.b;
import mage.MageInt;
import mage.abilities.common.SpellCastControllerTriggeredAbility;
import mage.abilities.effects.common.continuous.GainAbilitySourceEffect;
import mage.abilities.keyword.IndestructibleAbility;
import mage.abilities.keyword.TrampleAbility;
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 BelligerentRegisaur extends CardImpl {
public BelligerentRegisaur(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "");
this.subtype.add(SubType.DINOSAUR);
this.power = new MageInt(4);
this.toughness = new MageInt(3);
this.color.setGreen(true);
this.nightCard = true;
// Trample
this.addAbility(TrampleAbility.getInstance());
// Whenever you cast a spell, Belligerent Regisaur gains indestructible until end of turn.
this.addAbility(new SpellCastControllerTriggeredAbility(new GainAbilitySourceEffect(
IndestructibleAbility.getInstance(), Duration.EndOfTurn
), false));
}
private BelligerentRegisaur(final BelligerentRegisaur card) {
super(card);
}
@Override
public BelligerentRegisaur copy() {
return new BelligerentRegisaur(this);
}
}

View file

@ -0,0 +1,44 @@
package mage.cards.b;
import mage.MageInt;
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.effects.common.CreateTokenEffect;
import mage.abilities.keyword.EncoreAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.game.permanent.token.ShapeshifterColorlessToken;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class Belonging extends CardImpl {
public Belonging(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{5}{W}");
this.subtype.add(SubType.ELEMENTAL);
this.subtype.add(SubType.INCARNATION);
this.power = new MageInt(6);
this.toughness = new MageInt(6);
// When this creature enters, create three 1/1 colorless Shapeshifter creature tokens with changeling.
this.addAbility(new EntersBattlefieldTriggeredAbility(new CreateTokenEffect(new ShapeshifterColorlessToken(), 3)));
// Encore {6}{W}{W}
this.addAbility(new EncoreAbility(new ManaCostsImpl<>("{6}{W}{W}")));
}
private Belonging(final Belonging card) {
super(card);
}
@Override
public Belonging copy() {
return new Belonging(this);
}
}

View file

@ -1,52 +0,0 @@
package mage.cards.b;
import mage.MageInt;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.effects.common.CantBeCounteredControlledEffect;
import mage.abilities.keyword.DisturbAbility;
import mage.abilities.keyword.FlyingAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.SubType;
import mage.filter.StaticFilters;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class BenevolentGeist extends CardImpl {
public BenevolentGeist(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "");
this.subtype.add(SubType.SPIRIT);
this.subtype.add(SubType.WIZARD);
this.power = new MageInt(2);
this.toughness = new MageInt(2);
this.color.setBlue(true);
this.nightCard = true;
// Flying
this.addAbility(FlyingAbility.getInstance());
// Noncreature spells you control can't be countered.
this.addAbility(new SimpleStaticAbility(new CantBeCounteredControlledEffect(
StaticFilters.FILTER_SPELLS_NON_CREATURE, Duration.WhileOnBattlefield
)));
// If Benevolent Geist would be put into a graveyard from anywhere, exile it instead.
this.addAbility(DisturbAbility.makeBackAbility());
}
private BenevolentGeist(final BenevolentGeist card) {
super(card);
}
@Override
public BenevolentGeist copy() {
return new BenevolentGeist(this);
}
}

View file

@ -2,8 +2,10 @@ package mage.cards.b;
import mage.MageInt;
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.costs.common.WaterbendCost;
import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.effects.common.InfoEffect;
import mage.abilities.effects.keyword.ScryEffect;
import mage.abilities.keyword.FlyingAbility;
import mage.abilities.keyword.WardAbility;
@ -11,6 +13,7 @@ import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.Zone;
import java.util.UUID;
@ -28,6 +31,9 @@ public final class BenevolentRiverSpirit extends CardImpl {
// As an additional cost to cast this spell, waterbend {5}.
this.getSpellAbility().addCost(new WaterbendCost(5));
this.addAbility(new SimpleStaticAbility(
Zone.ALL, new InfoEffect("as an additional cost to cast this spell, waterbend {5}")
).setRuleAtTheTop(true));
// Flying
this.addAbility(FlyingAbility.getInstance());

View file

@ -0,0 +1,43 @@
package mage.cards.b;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.DiesSourceTriggeredAbility;
import mage.abilities.effects.common.counter.AddCountersTargetEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.counters.CounterType;
import mage.target.common.TargetCreaturePermanent;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class BileVialBoggart extends CardImpl {
public BileVialBoggart(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{B}");
this.subtype.add(SubType.GOBLIN);
this.subtype.add(SubType.ASSASSIN);
this.power = new MageInt(1);
this.toughness = new MageInt(1);
// When this creature dies, put a -1/-1 counter on up to one target creature.
Ability ability = new DiesSourceTriggeredAbility(new AddCountersTargetEffect(CounterType.M1M1.createInstance()));
ability.addTarget(new TargetCreaturePermanent(0, 1));
this.addAbility(ability);
}
private BileVialBoggart(final BileVialBoggart card) {
super(card);
}
@Override
public BileVialBoggart copy() {
return new BileVialBoggart(this);
}
}

View file

@ -1,54 +0,0 @@
package mage.cards.b;
import mage.MageInt;
import mage.abilities.common.LandfallAbility;
import mage.abilities.common.TransformIntoSourceTriggeredAbility;
import mage.abilities.effects.common.continuous.BoostControlledEffect;
import mage.abilities.effects.common.search.SearchLibraryPutInPlayEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.SubType;
import mage.filter.FilterPermanent;
import mage.filter.StaticFilters;
import mage.target.common.TargetCardInLibrary;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class BlackChocobo extends CardImpl {
private static final FilterPermanent filter = new FilterPermanent(SubType.BIRD, "Birds");
public BlackChocobo(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "");
this.subtype.add(SubType.BIRD);
this.power = new MageInt(2);
this.toughness = new MageInt(2);
this.nightCard = true;
this.color.setGreen(true);
// When this permanent transforms into Black Chocobo, search your library for a land card, put it onto the battlefield tapped, then shuffle.
this.addAbility(new TransformIntoSourceTriggeredAbility(
new SearchLibraryPutInPlayEffect(new TargetCardInLibrary(StaticFilters.FILTER_CARD_LAND_A), true)
));
// Landfall -- Whenever a land you control enters, Birds you control get +1/+0 until end of turn.
this.addAbility(new LandfallAbility(new BoostControlledEffect(
1, 0, Duration.EndOfTurn, filter, false
)));
}
private BlackChocobo(final BlackChocobo card) {
super(card);
}
@Override
public BlackChocobo copy() {
return new BlackChocobo(this);
}
}

View file

@ -0,0 +1,43 @@
package mage.cards.b;
import mage.MageInt;
import mage.abilities.common.EntersBattlefieldOrAttacksSourceTriggeredAbility;
import mage.abilities.costs.common.BlightCost;
import mage.abilities.effects.common.DoIfCostPaid;
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
import mage.abilities.effects.common.LoseLifeSourceControllerEffect;
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 BlightedBlackthorn extends CardImpl {
public BlightedBlackthorn(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{B}");
this.subtype.add(SubType.TREEFOLK);
this.subtype.add(SubType.WARLOCK);
this.power = new MageInt(3);
this.toughness = new MageInt(7);
// Whenever this creature enters or attacks, you may blight 2. If you do, you draw a card and lose 1 life.
this.addAbility(new EntersBattlefieldOrAttacksSourceTriggeredAbility(new DoIfCostPaid(
new DrawCardSourceControllerEffect(1, true), new BlightCost(2)
).addEffect(new LoseLifeSourceControllerEffect(1).setText("and lose 1 life"))));
}
private BlightedBlackthorn(final BlightedBlackthorn card) {
super(card);
}
@Override
public BlightedBlackthorn copy() {
return new BlightedBlackthorn(this);
}
}

View file

@ -1,68 +0,0 @@
package mage.cards.b;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.triggers.BeginningOfCombatTriggeredAbility;
import mage.abilities.effects.common.continuous.BecomesCreatureTargetEffect;
import mage.abilities.keyword.FlyingAbility;
import mage.abilities.keyword.HasteAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.SubType;
import mage.filter.FilterPermanent;
import mage.filter.common.FilterControlledPermanent;
import mage.filter.predicate.permanent.TokenPredicate;
import mage.game.permanent.token.custom.CreatureToken;
import mage.target.TargetPermanent;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class BloodbatSummoner extends CardImpl {
private static final FilterPermanent filter
= new FilterControlledPermanent(SubType.BLOOD, "Blood token you control");
static {
filter.add(TokenPredicate.TRUE);
}
public BloodbatSummoner(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "");
this.subtype.add(SubType.VAMPIRE);
this.subtype.add(SubType.WIZARD);
this.power = new MageInt(3);
this.toughness = new MageInt(3);
this.color.setBlack(true);
this.nightCard = true;
// Flying
this.addAbility(FlyingAbility.getInstance());
// At the beginning of combat on your turn, up to one target Blood token you control becomes a 2/2 black Bat creature with flying and haste in addition to its other types.
Ability ability = new BeginningOfCombatTriggeredAbility(new BecomesCreatureTargetEffect(
new CreatureToken(2, 2, "", SubType.BAT)
.withAbility(FlyingAbility.getInstance())
.withAbility(HasteAbility.getInstance())
.withColor("B"),
false, false, Duration.Custom
).setText("up to one target Blood token you control becomes a " +
"2/2 black Bat creature with flying and haste in addition to its other types"));
ability.addTarget(new TargetPermanent(0, 1, filter));
this.addAbility(ability);
}
private BloodbatSummoner(final BloodbatSummoner card) {
super(card);
}
@Override
public BloodbatSummoner copy() {
return new BloodbatSummoner(this);
}
}

View file

@ -0,0 +1,82 @@
package mage.cards.b;
import mage.abilities.Ability;
import mage.abilities.effects.OneShotEffect;
import mage.abilities.keyword.ConvokeAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.cards.Cards;
import mage.cards.CardsImpl;
import mage.choices.Choice;
import mage.choices.ChoiceCreatureType;
import mage.constants.CardType;
import mage.constants.Outcome;
import mage.constants.SubType;
import mage.constants.Zone;
import mage.game.Game;
import mage.players.Player;
import mage.util.CardUtil;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class BloodlineBidding extends CardImpl {
public BloodlineBidding(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{6}{B}{B}");
// Convoke
this.addAbility(new ConvokeAbility());
// Choose a creature type. Return all creature cards of the chosen type from your graveyard to the battlefield.
this.getSpellAbility().addEffect(new BloodlineBiddingEffect());
}
private BloodlineBidding(final BloodlineBidding card) {
super(card);
}
@Override
public BloodlineBidding copy() {
return new BloodlineBidding(this);
}
}
class BloodlineBiddingEffect extends OneShotEffect {
BloodlineBiddingEffect() {
super(Outcome.Benefit);
staticText = "choose a creature type. Return all creature cards " +
"of the chosen type from your graveyard to the battlefield";
}
private BloodlineBiddingEffect(final BloodlineBiddingEffect effect) {
super(effect);
}
@Override
public BloodlineBiddingEffect copy() {
return new BloodlineBiddingEffect(this);
}
@Override
public boolean apply(Game game, Ability source) {
Player player = game.getPlayer(source.getControllerId());
if (player == null) {
return false;
}
Choice choice = new ChoiceCreatureType(game, source);
player.choose(outcome, choice, game);
SubType subType = SubType.fromString(choice.getChoice());
if (subType == null) {
return false;
}
game.informPlayers(CardUtil.getSourceLogName(game, source) + ": " + player.getLogName() + " chooses " + subType);
Cards cards = new CardsImpl(player.getGraveyard().getCards(game));
cards.removeIf(uuid -> !game.getCard(uuid).isCreature(game));
cards.removeIf(uuid -> !game.getCard(uuid).hasSubtype(subType, game));
return !cards.isEmpty() && player.moveCards(cards, Zone.BATTLEFIELD, source, game);
}
}

View file

@ -1,64 +0,0 @@
package mage.cards.b;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.condition.Condition;
import mage.abilities.condition.common.YouGainedLifeCondition;
import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.effects.common.CreateTokenEffect;
import mage.abilities.effects.common.GainLifeEffect;
import mage.abilities.effects.common.LoseLifeOpponentsEffect;
import mage.abilities.hint.ConditionHint;
import mage.abilities.hint.Hint;
import mage.abilities.triggers.BeginningOfEndStepTriggeredAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.TargetController;
import mage.game.permanent.token.BloodToken;
import mage.watchers.common.PlayerGainedLifeWatcher;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class BloodsoakedReveler extends CardImpl {
private static final Condition condition = new YouGainedLifeCondition();
private static final Hint hint = new ConditionHint(condition, "You gained life this turn");
public BloodsoakedReveler(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "");
this.subtype.add(SubType.VAMPIRE);
this.power = new MageInt(3);
this.toughness = new MageInt(3);
this.color.setBlack(true);
this.nightCard = true;
// At the beginning of your end step, if you gained life this turn, create a Blood token.
this.addAbility(new BeginningOfEndStepTriggeredAbility(
TargetController.YOU, new CreateTokenEffect(new BloodToken()),
false, condition
).addHint(hint), new PlayerGainedLifeWatcher());
// {4}{B}: Each opponent loses 2 life and you gain 2 life.
Ability ability = new SimpleActivatedAbility(
new LoseLifeOpponentsEffect(2), new ManaCostsImpl<>("{4}{B}")
);
ability.addEffect(new GainLifeEffect(2).concatBy("and"));
this.addAbility(ability);
}
private BloodsoakedReveler(final BloodsoakedReveler card) {
super(card);
}
@Override
public BloodsoakedReveler copy() {
return new BloodsoakedReveler(this);
}
}

View file

@ -1,18 +1,11 @@
package mage.cards.b;
import mage.MageInt;
import mage.Mana;
import mage.abilities.Ability;
import mage.abilities.costs.common.TapSourceCost;
import mage.abilities.effects.mana.ManaEffect;
import mage.abilities.mana.SimpleManaAbility;
import mage.abilities.mana.AddEachControlledColorManaAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.Zone;
import mage.game.Game;
import mage.game.permanent.Permanent;
import java.util.UUID;
@ -29,8 +22,7 @@ public final class BloomTender extends CardImpl {
this.toughness = new MageInt(1);
// {T}: For each color among permanents you control, add one mana of that color.
this.addAbility(new SimpleManaAbility(Zone.BATTLEFIELD, new BloomTenderEffect(), new TapSourceCost()));
this.addAbility(new AddEachControlledColorManaAbility());
}
private BloomTender(final BloomTender card) {
@ -42,46 +34,3 @@ public final class BloomTender extends CardImpl {
return new BloomTender(this);
}
}
class BloomTenderEffect extends ManaEffect {
BloomTenderEffect() {
super();
staticText = "For each color among permanents you control, add one mana of that color";
}
private BloomTenderEffect(final BloomTenderEffect effect) {
super(effect);
}
@Override
public BloomTenderEffect copy() {
return new BloomTenderEffect(this);
}
@Override
public Mana produceMana(Game game, Ability source) {
Mana mana = new Mana();
if (game == null) {
return mana;
}
for (Permanent permanent : game.getBattlefield().getAllActivePermanents(source.getControllerId())) {
if (mana.getBlack() == 0 && permanent.getColor(game).isBlack()) {
mana.increaseBlack();
}
if (mana.getBlue() == 0 && permanent.getColor(game).isBlue()) {
mana.increaseBlue();
}
if (mana.getRed() == 0 && permanent.getColor(game).isRed()) {
mana.increaseRed();
}
if (mana.getGreen() == 0 && permanent.getColor(game).isGreen()) {
mana.increaseGreen();
}
if (mana.getWhite() == 0 && permanent.getColor(game).isWhite()) {
mana.increaseWhite();
}
}
return mana;
}
}

View file

@ -1,52 +0,0 @@
package mage.cards.b;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.triggers.BeginningOfEndStepTriggeredAbility;
import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.effects.common.counter.AddCountersTargetEffect;
import mage.abilities.keyword.WardAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.counters.CounterType;
import mage.target.common.TargetControlledCreaturePermanent;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class BloomwielderDryads extends CardImpl {
public BloomwielderDryads(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "");
this.subtype.add(SubType.DRYAD);
this.power = new MageInt(3);
this.toughness = new MageInt(3);
this.color.setWhite(true);
this.color.setGreen(true);
this.nightCard = true;
// Ward {2}
this.addAbility(new WardAbility(new ManaCostsImpl<>("{2}")));
// At the beginning of your end step, put a +1/+1 counter on target creature you control.
Ability ability = new BeginningOfEndStepTriggeredAbility(
new AddCountersTargetEffect(CounterType.P1P1.createInstance())
);
ability.addTarget(new TargetControlledCreaturePermanent());
this.addAbility(ability);
}
private BloomwielderDryads(final BloomwielderDryads card) {
super(card);
}
@Override
public BloomwielderDryads copy() {
return new BloomwielderDryads(this);
}
}

View file

@ -1,47 +0,0 @@
package mage.cards.b;
import mage.MageInt;
import mage.abilities.costs.common.TapSourceCost;
import mage.abilities.effects.mana.AddManaOfAnyColorEffect;
import mage.abilities.keyword.NightboundAbility;
import mage.abilities.mana.SimpleManaAbility;
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 BlossomCladWerewolf extends CardImpl {
public BlossomCladWerewolf(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "");
this.subtype.add(SubType.WEREWOLF);
this.power = new MageInt(3);
this.toughness = new MageInt(4);
this.color.setGreen(true);
this.nightCard = true;
// {T}: Add two mana of any one color.
this.addAbility(new SimpleManaAbility(
Zone.BATTLEFIELD, new AddManaOfAnyColorEffect(2), new TapSourceCost()
));
// Nightbound
this.addAbility(new NightboundAbility());
}
private BlossomCladWerewolf(final BlossomCladWerewolf card) {
super(card);
}
@Override
public BlossomCladWerewolf copy() {
return new BlossomCladWerewolf(this);
}
}

View file

@ -0,0 +1,52 @@
package mage.cards.b;
import mage.abilities.Ability;
import mage.abilities.common.DiesCreatureTriggeredAbility;
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
import mage.abilities.costs.common.BlightCost;
import mage.abilities.effects.common.CreateTokenEffect;
import mage.abilities.effects.common.DoIfCostPaid;
import mage.abilities.effects.common.GainLifeEffect;
import mage.abilities.effects.common.LoseLifeOpponentsEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.filter.FilterPermanent;
import mage.filter.common.FilterControlledCreaturePermanent;
import mage.game.permanent.token.BlackAndRedGoblinToken;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class BoggartMischief extends CardImpl {
private static final FilterPermanent filter = new FilterControlledCreaturePermanent(SubType.GOBLIN, "a Goblin creature you control");
public BoggartMischief(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.KINDRED, CardType.ENCHANTMENT}, "{2}{B}");
this.subtype.add(SubType.GOBLIN);
// When this enchantment enters, you may blight 1. If you do, create two 1/1 black and red Goblin creature tokens.
this.addAbility(new EntersBattlefieldTriggeredAbility(
new DoIfCostPaid(new CreateTokenEffect(new BlackAndRedGoblinToken()), new BlightCost(1))
));
// Whenever a Goblin creature you control dies, each opponent loses 1 life and you gain 1 life.
Ability ability = new DiesCreatureTriggeredAbility(new LoseLifeOpponentsEffect(1), false, filter);
ability.addEffect(new GainLifeEffect(1).concatBy("and"));
this.addAbility(ability);
}
private BoggartMischief(final BoggartMischief card) {
super(card);
}
@Override
public BoggartMischief copy() {
return new BoggartMischief(this);
}
}

View file

@ -0,0 +1,48 @@
package mage.cards.b;
import mage.MageInt;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.effects.common.continuous.GainAbilityControlledEffect;
import mage.abilities.keyword.DoubleStrikeAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.SubType;
import mage.filter.FilterPermanent;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class BoldwyrAggressor extends CardImpl {
private static final FilterPermanent filter = new FilterPermanent(SubType.GIANT, "Giants");
public BoldwyrAggressor(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{R}{R}");
this.subtype.add(SubType.GIANT);
this.subtype.add(SubType.WARRIOR);
this.power = new MageInt(2);
this.toughness = new MageInt(5);
// Double strike
this.addAbility(DoubleStrikeAbility.getInstance());
// Other Giants you control have double strike.
this.addAbility(new SimpleStaticAbility(new GainAbilityControlledEffect(
DoubleStrikeAbility.getInstance(), Duration.WhileOnBattlefield, filter, true
)));
}
private BoldwyrAggressor(final BoldwyrAggressor card) {
super(card);
}
@Override
public BoldwyrAggressor copy() {
return new BoldwyrAggressor(this);
}
}

View file

@ -0,0 +1,61 @@
package mage.cards.b;
import mage.MageInt;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.dynamicvalue.DynamicValue;
import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount;
import mage.abilities.dynamicvalue.common.StaticValue;
import mage.abilities.effects.common.continuous.BoostSourceEffect;
import mage.abilities.hint.Hint;
import mage.abilities.hint.ValueHint;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.SubType;
import mage.filter.FilterPermanent;
import mage.filter.common.FilterControlledPermanent;
import mage.filter.predicate.mageobject.AnotherPredicate;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class BoneclubBerserker extends CardImpl {
private static final FilterPermanent filter
= new FilterControlledPermanent(SubType.GOBLIN, "other Goblin you control");
static {
filter.add(AnotherPredicate.instance);
}
private static final DynamicValue xValue = new PermanentsOnBattlefieldCount(filter, 2);
private static final Hint hint = new ValueHint(
"Other Goblins you control", new PermanentsOnBattlefieldCount(filter)
);
public BoneclubBerserker(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{R}");
this.subtype.add(SubType.GOBLIN);
this.subtype.add(SubType.BERSERKER);
this.power = new MageInt(2);
this.toughness = new MageInt(4);
// This creature gets +2/+0 for each other Goblin you control.
this.addAbility(new SimpleStaticAbility(new BoostSourceEffect(
xValue, StaticValue.get(0), Duration.WhileOnBattlefield
)).addHint(hint));
}
private BoneclubBerserker(final BoneclubBerserker card) {
super(card);
}
@Override
public BoneclubBerserker copy() {
return new BoneclubBerserker(this);
}
}

View file

@ -26,8 +26,7 @@ public final class BottomlessPoolLockerRoom extends RoomCard {
// Enchantment -- Room
// Whenever one or more creatures you control deal combat damage to a player, draw a card.
super(ownerId, setInfo,
new CardType[] { CardType.ENCHANTMENT },
"{U}", "{4}{U}", SpellAbilityType.SPLIT);
"{U}", "{4}{U}");
this.subtype.add(SubType.ROOM);
// Left half ability - "When you unlock this door, return up to one target creature to its owners hand."
@ -52,4 +51,4 @@ public final class BottomlessPoolLockerRoom extends RoomCard {
public BottomlessPoolLockerRoom copy() {
return new BottomlessPoolLockerRoom(this);
}
}
}

View file

@ -1,61 +0,0 @@
package mage.cards.b;
import mage.MageInt;
import mage.abilities.common.SagaAbility;
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
import mage.abilities.effects.common.SacrificeOpponentsEffect;
import mage.abilities.effects.common.discard.DiscardEachPlayerEffect;
import mage.abilities.keyword.MenaceAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.*;
import mage.filter.StaticFilters;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class BraskasFinalAeon extends CardImpl {
public BraskasFinalAeon(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.NIGHTMARE);
this.power = new MageInt(7);
this.toughness = new MageInt(7);
this.nightCard = true;
this.color.setBlack(true);
// (As this Saga enters and after your draw step, add a lore counter. Sacrifice after III.)
SagaAbility sagaAbility = new SagaAbility(this);
// I, II -- Jecht Beam -- Each opponent discards a card and you draw a card.
sagaAbility.addChapterEffect(this, SagaChapter.CHAPTER_I, SagaChapter.CHAPTER_II, ability -> {
ability.addEffect(new DiscardEachPlayerEffect(TargetController.OPPONENT));
ability.addEffect(new DrawCardSourceControllerEffect(1).concatBy("and you"));
ability.withFlavorWord("Jecht Beam");
});
// III -- Ultimate Jecht Shot -- Each opponent sacrifices two creatures of their choice.
sagaAbility.addChapterEffect(this, SagaChapter.CHAPTER_III, ability -> {
ability.addEffect(new SacrificeOpponentsEffect(2, StaticFilters.FILTER_PERMANENT_CREATURES));
ability.withFlavorWord("Ultimate Jecht Shot");
});
this.addAbility(sagaAbility.withShowSacText(true));
// Menace
this.addAbility(new MenaceAbility());
}
private BraskasFinalAeon(final BraskasFinalAeon card) {
super(card);
}
@Override
public BraskasFinalAeon copy() {
return new BraskasFinalAeon(this);
}
}

View file

@ -0,0 +1,64 @@
package mage.cards.b;
import mage.abilities.Mode;
import mage.abilities.effects.common.CreateTokenCopyTargetEffect;
import mage.abilities.effects.common.CreateTokenTargetEffect;
import mage.abilities.effects.common.FightTargetsEffect;
import mage.abilities.effects.common.continuous.BoostTargetEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.filter.FilterPermanent;
import mage.filter.common.FilterControlledPermanent;
import mage.game.permanent.token.KithkinGreenWhiteToken;
import mage.target.TargetPermanent;
import mage.target.TargetPlayer;
import mage.target.common.TargetControlledCreaturePermanent;
import mage.target.common.TargetOpponentsCreaturePermanent;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class BrigidsCommand extends CardImpl {
private static final FilterPermanent filter = new FilterControlledPermanent(SubType.KITHKIN);
public BrigidsCommand(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.KINDRED, CardType.SORCERY}, "{1}{G}{W}");
this.subtype.add(SubType.KITHKIN);
// Choose two --
this.getSpellAbility().getModes().setMinModes(2);
this.getSpellAbility().getModes().setMaxModes(2);
// * Create a token that's a copy of target Kithkin you control.
this.getSpellAbility().addEffect(new CreateTokenCopyTargetEffect());
this.getSpellAbility().addTarget(new TargetPermanent(filter).withChooseHint("to copy"));
// * Target player creates a 1/1 green and white Kithkin creature token.
this.getSpellAbility().addMode(new Mode(new CreateTokenTargetEffect(new KithkinGreenWhiteToken()))
.addTarget(new TargetPlayer().withChooseHint("to create a token")));
// * Target creature you control gets +3/+3 until end of turn.
this.getSpellAbility().addMode(new Mode(new BoostTargetEffect(3, 3))
.addTarget(new TargetControlledCreaturePermanent().withChooseHint("+3/+3")));
// * Target creature you control fights target creature an opponent controls.
this.getSpellAbility().addMode(new Mode(new FightTargetsEffect())
.addTarget(new TargetControlledCreaturePermanent().withChooseHint("to fight"))
.addTarget(new TargetOpponentsCreaturePermanent().withChooseHint("to fight")));
}
private BrigidsCommand(final BrigidsCommand card) {
super(card);
}
@Override
public BrigidsCommand copy() {
return new BrigidsCommand(this);
}
}

View file

@ -0,0 +1,64 @@
package mage.cards.b;
import mage.MageInt;
import mage.abilities.common.EntersBattlefieldAbility;
import mage.abilities.common.EntersBattlefieldAllTriggeredAbility;
import mage.abilities.condition.Condition;
import mage.abilities.condition.common.SourceHasCounterCondition;
import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.effects.common.counter.AddCountersSourceEffect;
import mage.abilities.effects.common.counter.RemoveCounterSourceEffect;
import mage.abilities.keyword.TrampleAbility;
import mage.abilities.keyword.WardAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.counters.CounterType;
import mage.filter.StaticFilters;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class BristlebaneBattler extends CardImpl {
private static final Condition condition = new SourceHasCounterCondition(CounterType.M1M1);
public BristlebaneBattler(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{G}");
this.subtype.add(SubType.KITHKIN);
this.subtype.add(SubType.SOLDIER);
this.power = new MageInt(6);
this.toughness = new MageInt(6);
// Trample
this.addAbility(TrampleAbility.getInstance());
// Ward {2}
this.addAbility(new WardAbility(new ManaCostsImpl<>("{2}")));
// This creature enters with five -1/-1 counters on it.
this.addAbility(new EntersBattlefieldAbility(
new AddCountersSourceEffect(CounterType.M1M1.createInstance(5)),
"with five -1/-1 counters on it"
));
// Whenever another creature you control enters while this creature has a -1/-1 counter on it, remove a -1/-1 counter from this creature.
this.addAbility(new EntersBattlefieldAllTriggeredAbility(
new RemoveCounterSourceEffect(CounterType.M1M1.createInstance()),
StaticFilters.FILTER_ANOTHER_CREATURE_YOU_CONTROL
).withTriggerCondition(condition));
}
private BristlebaneBattler(final BristlebaneBattler card) {
super(card);
}
@Override
public BristlebaneBattler copy() {
return new BristlebaneBattler(this);
}
}

View file

@ -0,0 +1,82 @@
package mage.cards.b;
import mage.abilities.Ability;
import mage.abilities.common.ActivateAsSorceryActivatedAbility;
import mage.abilities.common.DealtDamageToSourceTriggeredAbility;
import mage.abilities.condition.common.SourceAttackingCondition;
import mage.abilities.costs.common.TapSourceCost;
import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.decorator.ConditionalOneShotEffect;
import mage.abilities.dynamicvalue.common.GetXValue;
import mage.abilities.effects.common.AdditionalCombatPhaseEffect;
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
import mage.abilities.effects.common.TransformSourceEffect;
import mage.abilities.effects.common.UntapSourceEffect;
import mage.abilities.effects.common.counter.AddCountersSourceEffect;
import mage.abilities.keyword.ReachAbility;
import mage.abilities.keyword.TrampleAbility;
import mage.cards.CardSetInfo;
import mage.cards.ModalDoubleFacedCard;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.SuperType;
import mage.counters.CounterType;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class BruceBanner extends ModalDoubleFacedCard {
public BruceBanner(UUID ownerId, CardSetInfo setInfo) {
super(
ownerId, setInfo,
new SuperType[]{SuperType.LEGENDARY}, new CardType[]{CardType.CREATURE}, new SubType[]{SubType.HUMAN, SubType.SCIENTIST, SubType.HERO}, "{U}",
"The Incredible Hulk",
new SuperType[]{SuperType.LEGENDARY}, new CardType[]{CardType.CREATURE}, new SubType[]{SubType.GAMMA, SubType.BERSERKER, SubType.HERO}, "{2}{R}{R}{G}{G}"
);
this.getLeftHalfCard().setPT(1, 1);
this.getRightHalfCard().setPT(8, 8);
// {X}{X}, {T}: Draw X cards. Activate only as a sorcery.
Ability ability = new ActivateAsSorceryActivatedAbility(
new DrawCardSourceControllerEffect(GetXValue.instance), new ManaCostsImpl<>("{X}{X}")
);
ability.addCost(new TapSourceCost());
this.getLeftHalfCard().addAbility(ability);
// {2}{R}{R}{G}{G}: Transform Bruce Banner. Activate only as a sorcery.
this.getLeftHalfCard().addAbility(new ActivateAsSorceryActivatedAbility(
new TransformSourceEffect(), new ManaCostsImpl<>("{2}{R}{R}{G}{G}")
));
// The Incredible Hulk
// Reach
this.getRightHalfCard().addAbility(ReachAbility.getInstance());
// Trample
this.getRightHalfCard().addAbility(TrampleAbility.getInstance());
// Enrage -- Whenever The Incredible Hulk is dealt damage, put a +1/+1 counter on him. If he's attacking, untap him and there is an additional combat phase after this phase.
ability = new DealtDamageToSourceTriggeredAbility(
new AddCountersSourceEffect(CounterType.P1P1.createInstance())
.setText("put a +1/+1 counter on him"),
false, true
);
ability.addEffect(new ConditionalOneShotEffect(
new UntapSourceEffect(), SourceAttackingCondition.instance, "If he's attacking, " +
"untap him and there is an additional combat phase after this phase"
).addEffect(new AdditionalCombatPhaseEffect()));
this.getRightHalfCard().addAbility(ability);
}
private BruceBanner(final BruceBanner card) {
super(card);
}
@Override
public BruceBanner copy() {
return new BruceBanner(this);
}
}

View file

@ -30,7 +30,7 @@ public final class BugenhagenWiseElder extends CardImpl {
= new FilterControlledCreaturePermanent("you control a creature with power 7 or greater");
static {
filter.add(new PowerPredicate(ComparisonType.MORE_THAN, 7));
filter.add(new PowerPredicate(ComparisonType.OR_GREATER, 7));
}
private static final Condition condition = new PermanentsOnTheBattlefieldCondition(filter);

View file

@ -0,0 +1,55 @@
package mage.cards.b;
import java.util.UUID;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.ActivateAsSorceryActivatedAbility;
import mage.abilities.common.EntersBattlefieldAbility;
import mage.abilities.costs.common.RemoveCountersSourceCost;
import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.effects.common.continuous.GainAbilityTargetEffect;
import mage.abilities.effects.common.counter.AddCountersSourceEffect;
import mage.abilities.keyword.IndestructibleAbility;
import mage.constants.SubType;
import mage.counters.CounterType;
import mage.target.common.TargetCreaturePermanent;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
/**
*
* @author muz
*/
public final class BurdenedStoneback extends CardImpl {
public BurdenedStoneback(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{W}");
this.subtype.add(SubType.GIANT);
this.subtype.add(SubType.WARRIOR);
this.power = new MageInt(4);
this.toughness = new MageInt(4);
// This creature enters with two -1/-1 counters on it.
this.addAbility(new EntersBattlefieldAbility(new AddCountersSourceEffect(CounterType.M1M1.createInstance(2)),
null, "This creature enters with two -1/-1 counters on it.", "")
);
// {1}{W}, Remove a counter from this creature: Target creature gains indestructible until end of turn. Activate only as a sorcery.
Ability ability = new ActivateAsSorceryActivatedAbility(new GainAbilityTargetEffect(IndestructibleAbility.getInstance()), new ManaCostsImpl<>("{1}{W}"));
ability.addCost(new RemoveCountersSourceCost(1));
ability.addTarget(new TargetCreaturePermanent());
this.addAbility(ability);
}
private BurdenedStoneback(final BurdenedStoneback card) {
super(card);
}
@Override
public BurdenedStoneback copy() {
return new BurdenedStoneback(this);
}
}

View file

@ -0,0 +1,43 @@
package mage.cards.b;
import mage.abilities.condition.common.BlightedCondition;
import mage.abilities.decorator.ConditionalOneShotEffect;
import mage.abilities.effects.common.ExileTopXMayPlayUntilEffect;
import mage.abilities.keyword.BlightAbility;
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 BurningCuriosity extends CardImpl {
public BurningCuriosity(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{2}{R}");
// As an additional cost to cast this spell, you may blight 1.
this.addAbility(new BlightAbility(1));
// Exile the top two cards of your library. If this spell's additional cost was paid, exile the top three cards instead. Until the end of your next turn, you may play those cards.
this.getSpellAbility().addEffect(new ConditionalOneShotEffect(
new ExileTopXMayPlayUntilEffect(3, Duration.UntilEndOfYourNextTurn),
new ExileTopXMayPlayUntilEffect(2, Duration.UntilEndOfYourNextTurn),
BlightedCondition.instance, "exile the top two cards of your library. " +
"If this spell's additional cost was paid, exile the top three cards instead. " +
"Until the end of your next turn, you may play those cards"
));
}
private BurningCuriosity(final BurningCuriosity card) {
super(card);
}
@Override
public BurningCuriosity copy() {
return new BurningCuriosity(this);
}
}

View file

@ -1,41 +0,0 @@
package mage.cards.b;
import mage.MageInt;
import mage.abilities.keyword.TrampleAbility;
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 BurnishedDunestomper extends CardImpl {
public BurnishedDunestomper(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "");
this.subtype.add(SubType.PHYREXIAN);
this.subtype.add(SubType.DOG);
this.subtype.add(SubType.WARRIOR);
this.power = new MageInt(4);
this.toughness = new MageInt(3);
this.color.setWhite(true);
this.color.setGreen(true);
this.nightCard = true;
// Trample
this.addAbility(TrampleAbility.getInstance());
}
private BurnishedDunestomper(final BurnishedDunestomper card) {
super(card);
}
@Override
public BurnishedDunestomper copy() {
return new BurnishedDunestomper(this);
}
}

View file

@ -1,53 +0,0 @@
package mage.cards.c;
import mage.MageInt;
import mage.abilities.common.DiesThisOrAnotherTriggeredAbility;
import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.effects.common.GainLifeEffect;
import mage.abilities.effects.common.continuous.GainAbilitySourceEffect;
import mage.abilities.keyword.DeathtouchAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.SubType;
import mage.filter.StaticFilters;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class CacklingCulprit extends CardImpl {
public CacklingCulprit(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "");
this.subtype.add(SubType.HUMAN);
this.subtype.add(SubType.ROGUE);
this.power = new MageInt(3);
this.toughness = new MageInt(5);
this.color.setBlack(true);
this.nightCard = true;
// Whenever Cackling Culprit or another creature you control dies, you gain 1 life.
this.addAbility(new DiesThisOrAnotherTriggeredAbility(
new GainLifeEffect(1), false, StaticFilters.FILTER_CONTROLLED_CREATURE
));
// {1}{B}: Cackling Culprit gains deathtouch until end of turn.
this.addAbility(new SimpleActivatedAbility(new GainAbilitySourceEffect(
DeathtouchAbility.getInstance(), Duration.EndOfTurn
), new ManaCostsImpl<>("{1}{B}")));
}
private CacklingCulprit(final CacklingCulprit card) {
super(card);
}
@Override
public CacklingCulprit copy() {
return new CacklingCulprit(this);
}
}

View file

@ -1,63 +0,0 @@
package mage.cards.c;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.triggers.BeginningOfEndStepTriggeredAbility;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.effects.common.UntapTargetEffect;
import mage.abilities.effects.common.continuous.GainAbilityControlledSpellsEffect;
import mage.abilities.keyword.ConvokeAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.SuperType;
import mage.filter.common.FilterNonlandCard;
import mage.filter.predicate.Predicates;
import mage.filter.predicate.mageobject.AbilityPredicate;
import mage.target.common.TargetCreaturePermanent;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class CaetusSeaTyrantOfSegovia extends CardImpl {
private static final FilterNonlandCard filter = new FilterNonlandCard("noncreature spells you cast");
static {
filter.add(Predicates.not(CardType.CREATURE.getPredicate()));
filter.add(Predicates.not(new AbilityPredicate(ConvokeAbility.class))); // So there are not redundant copies being added to each card
}
public CaetusSeaTyrantOfSegovia(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "");
this.supertype.add(SuperType.LEGENDARY);
this.subtype.add(SubType.SERPENT);
this.power = new MageInt(3);
this.toughness = new MageInt(3);
this.color.setBlue(true);
this.nightCard = true;
// Noncreature spells you cast have convoke.
this.addAbility(new SimpleStaticAbility(new GainAbilityControlledSpellsEffect(new ConvokeAbility(), filter)));
// At the beginning of your end step, untap up to four target creatures.
Ability ability = new BeginningOfEndStepTriggeredAbility(
new UntapTargetEffect()
);
ability.addTarget(new TargetCreaturePermanent(0, 4));
this.addAbility(ability);
}
private CaetusSeaTyrantOfSegovia(final CaetusSeaTyrantOfSegovia card) {
super(card);
}
@Override
public CaetusSeaTyrantOfSegovia copy() {
return new CaetusSeaTyrantOfSegovia(this);
}
}

View file

@ -0,0 +1,72 @@
package mage.cards.c;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.EntersBattlefieldAbility;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.condition.Condition;
import mage.abilities.condition.common.SourceHasCounterCondition;
import mage.abilities.decorator.ConditionalContinuousEffect;
import mage.abilities.effects.common.continuous.GainAbilityControlledEffect;
import mage.abilities.effects.common.continuous.GainAbilityControllerEffect;
import mage.abilities.effects.common.counter.AddCountersSourceEffect;
import mage.abilities.keyword.FirstStrikeAbility;
import mage.abilities.keyword.HexproofAbility;
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.counters.CounterType;
import mage.filter.FilterPermanent;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class CaptainAmericaSuperSoldier extends CardImpl {
private static final Condition condition = new SourceHasCounterCondition(CounterType.SHIELD);
private static final FilterPermanent filter = new FilterPermanent(SubType.HERO, "Heroes");
public CaptainAmericaSuperSoldier(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{W}{W}");
this.supertype.add(SuperType.LEGENDARY);
this.subtype.add(SubType.HUMAN);
this.subtype.add(SubType.SOLDIER);
this.subtype.add(SubType.HERO);
this.power = new MageInt(3);
this.toughness = new MageInt(2);
// First strike
this.addAbility(FirstStrikeAbility.getInstance());
// Captain America enters with a shield counter on him.
this.addAbility(new EntersBattlefieldAbility(
new AddCountersSourceEffect(CounterType.SHIELD.createInstance()),
"with a shield counter on him"
));
// As long as Captain America has a shield counter on him, you and other Heroes you control have hexproof.
Ability ability = new SimpleStaticAbility(new ConditionalContinuousEffect(
new GainAbilityControllerEffect(HexproofAbility.getInstance()),
condition, "as long as {this} has a shield counter on him, you"
));
ability.addEffect(new ConditionalContinuousEffect(new GainAbilityControlledEffect(
HexproofAbility.getInstance(), Duration.WhileOnBattlefield, filter, true
), condition, null).concatBy("and"));
this.addAbility(ability);
}
private CaptainAmericaSuperSoldier(final CaptainAmericaSuperSoldier card) {
super(card);
}
@Override
public CaptainAmericaSuperSoldier copy() {
return new CaptainAmericaSuperSoldier(this);
}
}

View file

@ -2,12 +2,11 @@
package mage.cards.c;
import mage.abilities.Ability;
import mage.abilities.Mode;
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.effects.Effect;
import mage.abilities.effects.OneShotEffect;
import mage.abilities.effects.common.AttachEffect;
import mage.abilities.effects.common.FightEnchantedTargetEffect;
import mage.abilities.effects.common.continuous.BoostEnchantedEffect;
import mage.abilities.effects.common.continuous.GainAbilityAttachedEffect;
import mage.abilities.keyword.EnchantAbility;
@ -15,8 +14,6 @@ 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 mage.target.TargetPermanent;
import mage.target.common.TargetControlledCreaturePermanent;
import mage.target.common.TargetOpponentsCreaturePermanent;
@ -24,14 +21,13 @@ import mage.target.common.TargetOpponentsCreaturePermanent;
import java.util.UUID;
/**
*
* @author stravant
*/
public final class CartoucheOfStrength extends CardImpl {
public CartoucheOfStrength(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{G}");
this.subtype.add(SubType.AURA, SubType.CARTOUCHE);
// Enchant creature you control
@ -42,7 +38,8 @@ public final class CartoucheOfStrength extends CardImpl {
this.addAbility(ability);
// When Cartouche of Strength enters the battlefield, you may have enchanted creature fight target creature an opponent controls.
ability = new EntersBattlefieldTriggeredAbility(new FightEnchantedTargetEffect(), /* optional = */true);
ability = new EntersBattlefieldTriggeredAbility(new FightEnchantedTargetEffect()
.setText("enchanted creature fight target creature an opponent controls"), true);
ability.addTarget(new TargetOpponentsCreaturePermanent());
this.addAbility(ability);
@ -63,49 +60,3 @@ public final class CartoucheOfStrength extends CardImpl {
return new CartoucheOfStrength(this);
}
}
/**
*
* @author stravant
*/
class FightEnchantedTargetEffect extends OneShotEffect {
FightEnchantedTargetEffect() {
super(Outcome.Damage);
this.staticText = "you may have enchanted creature fight target creature an opponent controls. " +
"<i>(Each deals damage equal to its power to the other.)</i>";
}
private FightEnchantedTargetEffect(final FightEnchantedTargetEffect effect) {
super(effect);
}
@Override
public boolean apply(Game game, Ability source) {
Permanent sourcePermanent = game.getPermanent(source.getSourceId());
if (sourcePermanent != null) {
Permanent originalCreature = game.getPermanentOrLKIBattlefield(sourcePermanent.getAttachedTo());
if (originalCreature != null) {
Permanent enchantedCreature = game.getPermanent(sourcePermanent.getAttachedTo());
// only if target is legal the effect will be applied
if (source.getTargets().get(0).isLegal(source, game)) {
Permanent creature1 = game.getPermanent(source.getTargets().get(0).getFirstTarget());
// 20110930 - 701.10
if (creature1 != null && enchantedCreature != null) {
if (creature1.isCreature(game) && enchantedCreature.isCreature(game)) {
return enchantedCreature.fight(creature1, source, game);
}
}
}
if (!game.isSimulation())
game.informPlayers(originalCreature.getLogName() + ": Fighting effect has been fizzled.");
}
}
return false;
}
@Override
public FightEnchantedTargetEffect copy() {
return new FightEnchantedTargetEffect(this);
}
}

View file

@ -1,19 +1,25 @@
package mage.cards.c;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.AttacksTriggeredAbility;
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
import mage.abilities.common.TransformIntoSourceTriggeredAbility;
import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.effects.common.DoIfCostPaid;
import mage.abilities.effects.common.TransformSourceEffect;
import mage.abilities.effects.common.continuous.BoostControlledEffect;
import mage.abilities.effects.common.continuous.GainAbilityControlledEffect;
import mage.abilities.effects.common.search.SearchLibraryPutInPlayEffect;
import mage.abilities.keyword.TransformAbility;
import mage.abilities.keyword.TrampleAbility;
import mage.abilities.keyword.VigilanceAbility;
import mage.cards.CardImpl;
import mage.abilities.triggers.BeginningOfUpkeepTriggeredAbility;
import mage.cards.CardSetInfo;
import mage.cards.TransformingDoubleFacedCard;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.SubType;
import mage.constants.SuperType;
import mage.filter.common.FilterCreaturePermanent;
import mage.filter.common.FilterLandCard;
import mage.target.common.TargetCardInLibrary;
@ -22,37 +28,59 @@ import java.util.UUID;
/**
* @author TheElk801
*/
public final class CasalLurkwoodPathfinder extends CardImpl {
public final class CasalLurkwoodPathfinder extends TransformingDoubleFacedCard {
private static final FilterLandCard filter = new FilterLandCard("Forest card");
private static final FilterCreaturePermanent filterLegendary = new FilterCreaturePermanent();
static {
filter.add(SubType.FOREST.getPredicate());
filterLegendary.add(SuperType.LEGENDARY.getPredicate());
}
public CasalLurkwoodPathfinder(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{G}");
super(ownerId, setInfo,
new SuperType[]{SuperType.LEGENDARY}, new CardType[]{CardType.CREATURE}, new SubType[]{SubType.TIEFLING, SubType.DRUID}, "{3}{G}",
"Casal, Pathbreaker Owlbear",
new SuperType[]{SuperType.LEGENDARY}, new CardType[]{CardType.CREATURE}, new SubType[]{SubType.BIRD, SubType.BEAR}, "G"
);
this.supertype.add(SuperType.LEGENDARY);
this.subtype.add(SubType.TIEFLING);
this.subtype.add(SubType.DRUID);
this.power = new MageInt(3);
this.toughness = new MageInt(3);
this.secondSideCardClazz = CasalPathbreakerOwlbear.class;
// Casal, Lurkwood Pathfinder
this.getLeftHalfCard().setPT(3, 3);
// Vigilance
this.addAbility(VigilanceAbility.getInstance());
this.getLeftHalfCard().addAbility(VigilanceAbility.getInstance());
// When Doric, Nature's Warden enters the battlefield, search your library for a Forest card, put it into the battlefield tapped, then shuffle.
this.addAbility(new EntersBattlefieldTriggeredAbility(
// When Casal, Lurkwood Pathfinder enters the battlefield, search your library for a Forest card, put it into the battlefield tapped, then shuffle.
this.getLeftHalfCard().addAbility(new EntersBattlefieldTriggeredAbility(
new SearchLibraryPutInPlayEffect(new TargetCardInLibrary(filter), true)
));
// Whenever Doric attacks, you may pay {1}{G}. If you do, transform her.
this.addAbility(new TransformAbility());
this.addAbility(new AttacksTriggeredAbility(new DoIfCostPaid(
// Whenever Casal attacks, you may pay {1}{G}. If you do, transform her.
this.getLeftHalfCard().addAbility(new AttacksTriggeredAbility(new DoIfCostPaid(
new TransformSourceEffect().setText("transform her"), new ManaCostsImpl<>("{1}{G}")
)));
// Casal, Pathbreaker Owlbear
this.getRightHalfCard().setPT(6, 6);
// Vigilance
this.getRightHalfCard().addAbility(VigilanceAbility.getInstance());
// Trample
this.getRightHalfCard().addAbility(TrampleAbility.getInstance());
// When this creature transforms into Casal, Pathbreaker Owlbear, other legendary creatures you control get +2/+2 and gain trample until end of turn.
Ability ability = new TransformIntoSourceTriggeredAbility(new BoostControlledEffect(
2, 2, Duration.EndOfTurn, filterLegendary, true
).setText("other legendary creatures you control get +2/+2"));
ability.addEffect(new GainAbilityControlledEffect(
TrampleAbility.getInstance(), Duration.EndOfTurn, filterLegendary, true
).setText("and gain trample until end of turn"));
this.getRightHalfCard().addAbility(ability);
// At the beginning of your upkeep, transform Casal.
this.getRightHalfCard().addAbility(new BeginningOfUpkeepTriggeredAbility(new TransformSourceEffect()));
}
private CasalLurkwoodPathfinder(final CasalLurkwoodPathfinder card) {

View file

@ -1,68 +0,0 @@
package mage.cards.c;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.triggers.BeginningOfUpkeepTriggeredAbility;
import mage.abilities.common.TransformIntoSourceTriggeredAbility;
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.VigilanceAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.*;
import mage.filter.common.FilterCreaturePermanent;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class CasalPathbreakerOwlbear extends CardImpl {
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent();
static {
filter.add(SuperType.LEGENDARY.getPredicate());
}
public CasalPathbreakerOwlbear(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "");
this.supertype.add(SuperType.LEGENDARY);
this.subtype.add(SubType.BIRD);
this.subtype.add(SubType.BEAR);
this.power = new MageInt(6);
this.toughness = new MageInt(6);
this.color.setGreen(true);
this.nightCard = true;
// Vigilance
this.addAbility(VigilanceAbility.getInstance());
// Trample
this.addAbility(TrampleAbility.getInstance());
// When this creature transforms into Doric, Owlbear Avenger, other legendary creatures you control get +2/+2 and gain trample until end of turn.
Ability ability = new TransformIntoSourceTriggeredAbility(new BoostControlledEffect(
2, 2, Duration.EndOfTurn, filter, true
).setText("other legendary creatures you control get +2/+2"));
ability.addEffect(new GainAbilityControlledEffect(
TrampleAbility.getInstance(), Duration.EndOfTurn, filter, true
).setText("and gain trample until end of turn"));
this.addAbility(ability);
// At the beginning of your upkeep, transform Doric.
this.addAbility(new BeginningOfUpkeepTriggeredAbility(new TransformSourceEffect()));
}
private CasalPathbreakerOwlbear(final CasalPathbreakerOwlbear card) {
super(card);
}
@Override
public CasalPathbreakerOwlbear copy() {
return new CasalPathbreakerOwlbear(this);
}
}

View file

@ -1,14 +1,13 @@
package mage.cards.c;
import mage.ObjectColor;
import mage.abilities.Ability;
import mage.abilities.common.CaseAbility;
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
import mage.abilities.condition.Condition;
import mage.abilities.condition.common.SolvedSourceCondition;
import mage.abilities.dynamicvalue.common.ColorsAmongControlledPermanentsCount;
import mage.abilities.effects.common.continuous.GainAbilityTargetEffect;
import mage.abilities.effects.common.search.SearchLibraryPutInHandEffect;
import mage.abilities.hint.common.CaseSolvedHint;
import mage.abilities.keyword.DoubleStrikeAbility;
import mage.abilities.keyword.FlyingAbility;
import mage.abilities.keyword.VigilanceAbility;
@ -49,7 +48,7 @@ public final class CaseOfTheShatteredPact extends CardImpl {
solvedAbility.addTarget(new TargetControlledCreaturePermanent());
this.addAbility(new CaseAbility(initialAbility, CaseOfTheShatteredPactCondition.instance, solvedAbility)
.addHint(new CaseOfTheShatteredPactHint(CaseOfTheShatteredPactCondition.instance)));
.addHint(ColorsAmongControlledPermanentsCount.ALL_PERMANENTS.getHint()));
}
private CaseOfTheShatteredPact(final CaseOfTheShatteredPact card) {
@ -67,13 +66,7 @@ enum CaseOfTheShatteredPactCondition implements Condition {
@Override
public boolean apply(Game game, Ability source) {
ObjectColor color = new ObjectColor("");
game.getBattlefield()
.getAllActivePermanents(source.getControllerId())
.stream()
.map(permanent -> permanent.getColor(game))
.forEach(color::addColor);
return color.getColorCount() == 5;
return ColorsAmongControlledPermanentsCount.ALL_PERMANENTS.calculate(game, source, null) >= 5;
}
@Override
@ -81,30 +74,3 @@ enum CaseOfTheShatteredPactCondition implements Condition {
return "There are five colors among permanents you control";
}
}
class CaseOfTheShatteredPactHint extends CaseSolvedHint {
CaseOfTheShatteredPactHint(Condition condition) {
super(condition);
}
CaseOfTheShatteredPactHint(final CaseOfTheShatteredPactHint hint) {
super(hint);
}
@Override
public CaseOfTheShatteredPactHint copy() {
return new CaseOfTheShatteredPactHint(this);
}
@Override
public String getConditionText(Game game, Ability ability) {
ObjectColor color = new ObjectColor("");
game.getBattlefield()
.getAllActivePermanents(ability.getControllerId())
.stream()
.map(permanent -> permanent.getColor(game))
.forEach(color::addColor);
return "Colors: " + color.getColorCount() + " (need 5).";
}
}

View file

@ -1,58 +0,0 @@
package mage.cards.c;
import mage.abilities.common.DealsCombatDamageToAPlayerTriggeredAbility;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.effects.common.AttachEffect;
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
import mage.abilities.effects.common.continuous.GainAbilityAttachedEffect;
import mage.abilities.keyword.DisturbAbility;
import mage.abilities.keyword.EnchantAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.AttachmentType;
import mage.constants.CardType;
import mage.constants.Outcome;
import mage.constants.SubType;
import mage.target.TargetPermanent;
import mage.target.common.TargetCreaturePermanent;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class CatlikeCuriosity extends CardImpl {
public CatlikeCuriosity(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "");
this.subtype.add(SubType.AURA);
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));
// Enchanted creature has "Whenever this creature deals combat damage to a player, draw a card."
this.addAbility(new SimpleStaticAbility(new GainAbilityAttachedEffect(
new DealsCombatDamageToAPlayerTriggeredAbility(
new DrawCardSourceControllerEffect(1), false
).setTriggerPhrase("Whenever this creature deals combat damage to a player, "), AttachmentType.AURA
)));
// If Catlike Curiosity would be put into a graveyard from anywhere, exile it instead.
this.addAbility(DisturbAbility.makeBackAbility());
}
private CatlikeCuriosity(final CatlikeCuriosity card) {
super(card);
}
@Override
public CatlikeCuriosity copy() {
return new CatlikeCuriosity(this);
}
}

View file

@ -1,11 +1,12 @@
package mage.cards.c;
import mage.abilities.costs.OrCost;
import mage.abilities.costs.common.BeholdDragonCost;
import mage.abilities.costs.common.BeholdCost;
import mage.abilities.costs.mana.GenericManaCost;
import mage.abilities.effects.common.continuous.BoostTargetEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.BeholdType;
import mage.constants.CardType;
import mage.target.common.TargetCreaturePermanent;
@ -22,7 +23,7 @@ public final class CausticExhale extends CardImpl {
// As an additional cost to cast this spell, behold a Dragon or pay {1}.
this.getSpellAbility().addCost(new OrCost(
"behold a Dragon or pay {1}",
new BeholdDragonCost(), new GenericManaCost(1)
new BeholdCost(BeholdType.DRAGON), new GenericManaCost(1)
));
// Target creature gets -3/-3 until end of turn.

View file

@ -0,0 +1,58 @@
package mage.cards.c;
import mage.MageInt;
import mage.abilities.common.LeavesBattlefieldTriggeredAbility;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.costs.common.BeholdAndExileCost;
import mage.abilities.effects.common.ReturnExiledCardToHandEffect;
import mage.abilities.effects.common.continuous.BoostControlledEffect;
import mage.abilities.keyword.FlashAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.BeholdType;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.SubType;
import mage.filter.FilterPermanent;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class ChampionOfTheClachan extends CardImpl {
private static final FilterPermanent filter = new FilterPermanent(SubType.KITHKIN, "Kithkin");
public ChampionOfTheClachan(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{W}");
this.subtype.add(SubType.KITHKIN);
this.subtype.add(SubType.KNIGHT);
this.power = new MageInt(4);
this.toughness = new MageInt(5);
// Flash
this.addAbility(FlashAbility.getInstance());
// As an additional cost to cast this spell, behold a Kithkin and exile it.
this.getSpellAbility().addCost(new BeholdAndExileCost(BeholdType.KITHKIN));
// Other Kithkin you control get +1/+1.
this.addAbility(new SimpleStaticAbility(new BoostControlledEffect(
1, 1, Duration.WhileOnBattlefield, filter, true
)));
// When this creature leaves the battlefield, return the exiled card to its owner's hand.
this.addAbility(new LeavesBattlefieldTriggeredAbility(new ReturnExiledCardToHandEffect()));
}
private ChampionOfTheClachan(final ChampionOfTheClachan card) {
super(card);
}
@Override
public ChampionOfTheClachan copy() {
return new ChampionOfTheClachan(this);
}
}

View file

@ -0,0 +1,55 @@
package mage.cards.c;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.ActivateAsSorceryActivatedAbility;
import mage.abilities.common.LeavesBattlefieldTriggeredAbility;
import mage.abilities.costs.common.BeholdAndExileCost;
import mage.abilities.costs.common.BlightCost;
import mage.abilities.costs.common.PayLifeCost;
import mage.abilities.effects.common.ReturnExiledCardToHandEffect;
import mage.abilities.effects.keyword.BlightTargetEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.BeholdType;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.target.common.TargetOpponent;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class ChampionOfTheWeird extends CardImpl {
public ChampionOfTheWeird(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{B}");
this.subtype.add(SubType.GOBLIN);
this.subtype.add(SubType.BERSERKER);
this.power = new MageInt(5);
this.toughness = new MageInt(5);
// As an additional cost to cast this spell, behold a Goblin and exile it.
this.getSpellAbility().addCost(new BeholdAndExileCost(BeholdType.GOBLIN));
// Pay 1 life, Blight 2: Target opponent blights 2. Activate only as a sorcery.
Ability ability = new ActivateAsSorceryActivatedAbility(new BlightTargetEffect(2), new PayLifeCost(1));
ability.addCost(new BlightCost(2));
ability.addTarget(new TargetOpponent());
this.addAbility(ability);
// When this creature leaves the battlefield, return the exiled card to its owner's hand.
this.addAbility(new LeavesBattlefieldTriggeredAbility(new ReturnExiledCardToHandEffect()));
}
private ChampionOfTheWeird(final ChampionOfTheWeird card) {
super(card);
}
@Override
public ChampionOfTheWeird copy() {
return new ChampionOfTheWeird(this);
}
}

View file

@ -0,0 +1,52 @@
package mage.cards.c;
import mage.MageInt;
import mage.abilities.common.LeavesBattlefieldTriggeredAbility;
import mage.abilities.common.SpellCastControllerTriggeredAbility;
import mage.abilities.costs.common.BeholdAndExileCost;
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
import mage.abilities.effects.common.ReturnExiledCardToHandEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.BeholdType;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.filter.StaticFilters;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class ChampionsOfThePerfect extends CardImpl {
public ChampionsOfThePerfect(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{G}");
this.subtype.add(SubType.ELF);
this.subtype.add(SubType.WARRIOR);
this.power = new MageInt(6);
this.toughness = new MageInt(6);
// As an additional cost to cast this spell, behold an Elf and exile it.
this.getSpellAbility().addCost(new BeholdAndExileCost(BeholdType.ELF));
// Whenever you cast a creature spell, draw a card.
this.addAbility(new SpellCastControllerTriggeredAbility(
new DrawCardSourceControllerEffect(1),
StaticFilters.FILTER_SPELL_A_CREATURE, false
));
// When this creature leaves the battlefield, return the exiled card to its owner's hand.
this.addAbility(new LeavesBattlefieldTriggeredAbility(new ReturnExiledCardToHandEffect()));
}
private ChampionsOfThePerfect(final ChampionsOfThePerfect card) {
super(card);
}
@Override
public ChampionsOfThePerfect copy() {
return new ChampionsOfThePerfect(this);
}
}

View file

@ -0,0 +1,92 @@
package mage.cards.c;
import mage.abilities.Ability;
import mage.abilities.common.DiesCreatureTriggeredAbility;
import mage.abilities.effects.OneShotEffect;
import mage.abilities.effects.common.ExileTargetForSourceEffect;
import mage.abilities.triggers.BeginningOfUpkeepTriggeredAbility;
import mage.cards.Card;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Outcome;
import mage.constants.SuperType;
import mage.constants.Zone;
import mage.counters.CounterType;
import mage.counters.Counters;
import mage.filter.StaticFilters;
import mage.game.ExileZone;
import mage.game.Game;
import mage.players.Player;
import mage.target.TargetCard;
import mage.target.common.TargetCardInExile;
import mage.util.CardUtil;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class ChaosShrinesBlackCrystal extends CardImpl {
public ChaosShrinesBlackCrystal(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{3}{B}");
this.supertype.add(SuperType.LEGENDARY);
// Whenever a nontoken creature you control dies, exile it.
this.addAbility(new DiesCreatureTriggeredAbility(
new ExileTargetForSourceEffect(), false,
StaticFilters.FILTER_CONTROLLED_CREATURE_NON_TOKEN, true
));
// At the beginning of your upkeep, you may put a creature card exiled with Chaos Shrine's Black Crystal onto the battlefield under your control with a finality counter on it.
this.addAbility(new BeginningOfUpkeepTriggeredAbility(new ChaosShrinesBlackCrystalEffect()));
}
private ChaosShrinesBlackCrystal(final ChaosShrinesBlackCrystal card) {
super(card);
}
@Override
public ChaosShrinesBlackCrystal copy() {
return new ChaosShrinesBlackCrystal(this);
}
}
class ChaosShrinesBlackCrystalEffect extends OneShotEffect {
ChaosShrinesBlackCrystalEffect() {
super(Outcome.Benefit);
staticText = "you may put a creature card exiled with {this} " +
"onto the battlefield under your control with a finality counter on it";
}
private ChaosShrinesBlackCrystalEffect(final ChaosShrinesBlackCrystalEffect effect) {
super(effect);
}
@Override
public ChaosShrinesBlackCrystalEffect copy() {
return new ChaosShrinesBlackCrystalEffect(this);
}
@Override
public boolean apply(Game game, Ability source) {
Player player = game.getPlayer(source.getControllerId());
ExileZone exileZone = game.getExile().getExileZone(CardUtil.getExileZoneId(game, source));
if (player == null || exileZone == null) {
return false;
}
TargetCard target = new TargetCardInExile(
0, 1, StaticFilters.FILTER_CARD_CREATURE, exileZone.getId()
);
player.choose(Outcome.PutCreatureInPlay, target, source, game);
Card card = game.getCard(target.getFirstTarget());
if (card == null) {
return false;
}
game.setEnterWithCounters(card.getId(), new Counters(CounterType.FINALITY.createInstance()));
return player.moveCards(card, Zone.BATTLEFIELD, source, game);
}
}

View file

@ -0,0 +1,42 @@
package mage.cards.c;
import mage.MageInt;
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
import mage.abilities.costs.mana.GenericManaCost;
import mage.abilities.effects.common.DoIfCostPaid;
import mage.abilities.effects.keyword.BlightControllerEffect;
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 ChaosSpewer extends CardImpl {
public ChaosSpewer(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}");
this.subtype.add(SubType.GOBLIN);
this.subtype.add(SubType.WARLOCK);
this.power = new MageInt(5);
this.toughness = new MageInt(4);
// When this creature enters, you may pay {2}. If you don't, blight 2.
this.addAbility(new EntersBattlefieldTriggeredAbility(new DoIfCostPaid(
null, new BlightControllerEffect(2), new GenericManaCost(2)
)));
}
private ChaosSpewer(final ChaosSpewer card) {
super(card);
}
@Override
public ChaosSpewer copy() {
return new ChaosSpewer(this);
}
}

View file

@ -1,48 +0,0 @@
package mage.cards.c;
import mage.MageInt;
import mage.abilities.common.DiesSourceTriggeredAbility;
import mage.abilities.effects.common.PutOnLibrarySourceEffect;
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 ChaosTheEndless extends CardImpl {
public ChaosTheEndless(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "");
this.supertype.add(SuperType.LEGENDARY);
this.subtype.add(SubType.DEMON);
this.power = new MageInt(5);
this.toughness = new MageInt(5);
this.color.setBlack(true);
this.color.setRed(true);
this.nightCard = true;
// Flying
this.addAbility(FlyingAbility.getInstance());
// When Chaos dies, put it on the bottom of its owner's library.
this.addAbility(new DiesSourceTriggeredAbility(new PutOnLibrarySourceEffect(
false, "put it on the bottom of its owner's library"
), false));
}
private ChaosTheEndless(final ChaosTheEndless card) {
super(card);
}
@Override
public ChaosTheEndless copy() {
return new ChaosTheEndless(this);
}
}

View file

@ -1,43 +0,0 @@
package mage.cards.c;
import mage.abilities.Ability;
import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.costs.common.TapSourceCost;
import mage.abilities.costs.mana.GenericManaCost;
import mage.abilities.effects.common.TapTargetEffect;
import mage.abilities.effects.common.TransformSourceEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.target.common.TargetNonlandPermanent;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class ChillingChronicle extends CardImpl {
public ChillingChronicle(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "");
this.color.setBlue(true);
this.nightCard = true;
// {1}, {T}: Tap target nonland permanent. Transform Chilling Chronicle.
Ability ability = new SimpleActivatedAbility(new TapTargetEffect(), new GenericManaCost(1));
ability.addCost(new TapSourceCost());
ability.addEffect(new TransformSourceEffect());
ability.addTarget(new TargetNonlandPermanent());
this.addAbility(ability);
}
private ChillingChronicle(final ChillingChronicle card) {
super(card);
}
@Override
public ChillingChronicle copy() {
return new ChillingChronicle(this);
}
}

View file

@ -0,0 +1,40 @@
package mage.cards.c;
import mage.MageInt;
import mage.abilities.keyword.ChangelingAbility;
import mage.abilities.keyword.ReachAbility;
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 ChitinousGraspling extends CardImpl {
public ChitinousGraspling(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{G/U}");
this.subtype.add(SubType.SHAPESHIFTER);
this.power = new MageInt(3);
this.toughness = new MageInt(4);
// Changeling
this.addAbility(new ChangelingAbility());
// Reach
this.addAbility(ReachAbility.getInstance());
}
private ChitinousGraspling(final ChitinousGraspling card) {
super(card);
}
@Override
public ChitinousGraspling copy() {
return new ChitinousGraspling(this);
}
}

View file

@ -0,0 +1,62 @@
package mage.cards.c;
import mage.abilities.Ability;
import mage.abilities.common.EntersBattlefieldTappedUnlessAbility;
import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.common.delayed.AddCounterNextSpellDelayedTriggeredAbility;
import mage.abilities.condition.common.YouControlALegendaryCreatureCondition;
import mage.abilities.costs.common.TapSourceCost;
import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.effects.common.CreateDelayedTriggeredAbilityEffect;
import mage.abilities.effects.common.CreateTokenEffect;
import mage.abilities.mana.BasicManaAbility;
import mage.abilities.mana.GreenManaAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.filter.FilterSpell;
import mage.filter.common.FilterCreatureSpell;
import mage.game.permanent.token.ChocoboToken;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class ChocoboCamp extends CardImpl {
private static final FilterSpell filter = new FilterCreatureSpell("a Bird creature spell");
static {
filter.add(SubType.BIRD.getPredicate());
}
public ChocoboCamp(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.LAND}, "");
// This land enters tapped unless you control a legendary creature.
this.addAbility(new EntersBattlefieldTappedUnlessAbility(YouControlALegendaryCreatureCondition.instance)
.addHint(YouControlALegendaryCreatureCondition.getHint()));
// {T}: Add {G}. When you next cast a Bird creature spell this turn, it enters with an additional +1/+1 counter on it.
BasicManaAbility manaAbility = new GreenManaAbility();
manaAbility.addEffect(new CreateDelayedTriggeredAbilityEffect(new AddCounterNextSpellDelayedTriggeredAbility(filter)));
manaAbility.setUndoPossible(false);
this.addAbility(manaAbility);
// {2}{G}{G}, {T}: Create a 2/2 green Bird creature token with "Whenever a land you control enters, this token gets +1/+0 until end of turn."
Ability ability = new SimpleActivatedAbility(new CreateTokenEffect(new ChocoboToken()), new ManaCostsImpl<>("{2}{G}{G}"));
ability.addCost(new TapSourceCost());
this.addAbility(ability);
}
private ChocoboCamp(final ChocoboCamp card) {
super(card);
}
@Override
public ChocoboCamp copy() {
return new ChocoboCamp(this);
}
}

View file

@ -0,0 +1,46 @@
package mage.cards.c;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
import mage.abilities.effects.common.DestroyTargetEffect;
import mage.abilities.keyword.ChangelingAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.filter.StaticFilters;
import mage.target.TargetPermanent;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class ChompingChangeling extends CardImpl {
public ChompingChangeling(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{G}");
this.subtype.add(SubType.SHAPESHIFTER);
this.power = new MageInt(1);
this.toughness = new MageInt(2);
// Changeling
this.addAbility(new ChangelingAbility());
// When this creature enters, destroy up to one target artifact or enchantment.
Ability ability = new EntersBattlefieldTriggeredAbility(new DestroyTargetEffect());
ability.addTarget(new TargetPermanent(0, 1, StaticFilters.FILTER_PERMANENT_ARTIFACT_OR_ENCHANTMENT));
this.addAbility(ability);
}
private ChompingChangeling(final ChompingChangeling card) {
super(card);
}
@Override
public ChompingChangeling copy() {
return new ChompingChangeling(this);
}
}

View file

@ -6,9 +6,10 @@ import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.costs.common.TapSourceCost;
import mage.abilities.costs.mana.GenericManaCost;
import mage.abilities.dynamicvalue.common.ColorsAmongControlledPermanentsCount;
import mage.abilities.effects.AsThoughEffectImpl;
import mage.abilities.effects.AsThoughManaEffect;
import mage.abilities.effects.common.DrawCardForEachColorAmongControlledPermanentsEffect;
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
import mage.abilities.mana.SimpleManaAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
@ -19,14 +20,13 @@ import mage.players.ManaPoolItem;
import java.util.UUID;
/**
*
* @author htrajan
*/
public final class ChromaticOrrery extends CardImpl {
public ChromaticOrrery(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{7}");
this.supertype.add(SuperType.LEGENDARY);
// You may spend mana as though it were mana of any color.
@ -36,9 +36,9 @@ public final class ChromaticOrrery extends CardImpl {
this.addAbility(new SimpleManaAbility(Zone.BATTLEFIELD, Mana.ColorlessMana(5), new TapSourceCost()));
// {5}, {T}: Draw a card for each color among permanents you control.
Ability ability = new SimpleActivatedAbility(new DrawCardForEachColorAmongControlledPermanentsEffect(), new GenericManaCost(5));
Ability ability = new SimpleActivatedAbility(new DrawCardSourceControllerEffect(ColorsAmongControlledPermanentsCount.ALL_PERMANENTS), new GenericManaCost(5));
ability.addCost(new TapSourceCost());
this.addAbility(ability);
this.addAbility(ability.addHint(ColorsAmongControlledPermanentsCount.ALL_PERMANENTS.getHint()));
}
private ChromaticOrrery(final ChromaticOrrery card) {

View file

@ -1,57 +0,0 @@
package mage.cards.c;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.AttacksTriggeredAbility;
import mage.abilities.effects.common.continuous.SetBasePowerToughnessTargetEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.SubType;
import mage.filter.FilterPermanent;
import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.mageobject.AnotherPredicate;
import mage.target.TargetPermanent;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class ChromeHostHulk extends CardImpl {
private static final FilterPermanent filter = new FilterCreaturePermanent("other target creature");
static {
filter.add(AnotherPredicate.instance);
}
public ChromeHostHulk(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "");
this.subtype.add(SubType.PHYREXIAN);
this.subtype.add(SubType.TROLL);
this.power = new MageInt(5);
this.toughness = new MageInt(5);
this.color.setBlue(true);
this.color.setGreen(true);
this.nightCard = true;
// Whenever Chrome Host Hulk attacks, up to one other target creature has base power and toughness 5/5 until end of turn.
Ability ability = new AttacksTriggeredAbility(
new SetBasePowerToughnessTargetEffect(5, 5, Duration.EndOfTurn)
);
ability.addTarget(new TargetPermanent(0, 1, filter));
this.addAbility(ability);
}
private ChromeHostHulk(final ChromeHostHulk card) {
super(card);
}
@Override
public ChromeHostHulk copy() {
return new ChromeHostHulk(this);
}
}

View file

@ -1,50 +0,0 @@
package mage.cards.c;
import mage.MageInt;
import mage.abilities.common.CanBlockOnlyFlyingAbility;
import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.effects.common.DrawDiscardControllerEffect;
import mage.abilities.keyword.FlyingAbility;
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 CipherboundSpirit extends CardImpl {
public CipherboundSpirit(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "");
this.subtype.add(SubType.SPIRIT);
this.power = new MageInt(3);
this.toughness = new MageInt(2);
this.color.setBlue(true);
this.nightCard = true;
// Flying
this.addAbility(FlyingAbility.getInstance());
// Cipherbound Spirit can block only creatures with flying.
this.addAbility(new CanBlockOnlyFlyingAbility());
// {3}{U}: Draw two cards, then discard a card.
this.addAbility(new SimpleActivatedAbility(
new DrawDiscardControllerEffect(2, 1), new ManaCostsImpl<>("{3}{U}")
));
}
private CipherboundSpirit(final CipherboundSpirit card) {
super(card);
}
@Override
public CipherboundSpirit copy() {
return new CipherboundSpirit(this);
}
}

View file

@ -0,0 +1,42 @@
package mage.cards.c;
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.effects.common.CreateTokenEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.game.permanent.token.KithkinGreenWhiteToken;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class ClachanFestival extends CardImpl {
public ClachanFestival(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.KINDRED, CardType.ENCHANTMENT}, "{2}{W}");
this.subtype.add(SubType.KITHKIN);
// When this enchantment enters, create two 1/1 green and white Kithkin creature tokens.
this.addAbility(new EntersBattlefieldTriggeredAbility(new CreateTokenEffect(new KithkinGreenWhiteToken(), 2)));
// {4}{W}: Create a 1/1 green and white Kithkin creature token.
this.addAbility(new SimpleActivatedAbility(
new CreateTokenEffect(new KithkinGreenWhiteToken()), new ManaCostsImpl<>("{4}{W}")
));
}
private ClachanFestival(final ClachanFestival card) {
super(card);
}
@Override
public ClachanFestival copy() {
return new ClachanFestival(this);
}
}

View file

@ -8,6 +8,7 @@ import mage.abilities.effects.OneShotEffect;
import mage.abilities.effects.common.TransformSourceEffect;
import mage.abilities.keyword.DefenderAbility;
import mage.abilities.keyword.MenaceAbility;
import mage.cards.Card;
import mage.cards.CardSetInfo;
import mage.cards.TransformingDoubleFacedCard;
import mage.constants.CardType;
@ -15,6 +16,7 @@ import mage.constants.Outcome;
import mage.constants.SubType;
import mage.constants.Zone;
import mage.filter.StaticFilters;
import mage.game.Game;
import mage.players.Player;
import mage.target.TargetCard;
import mage.target.common.TargetOpponent;
@ -83,7 +85,7 @@ class RevealingEyeEffect extends OneShotEffect {
}
@Override
public boolean apply(mage.game.Game game, Ability source) {
public boolean apply(Game game, Ability source) {
Player controller = game.getPlayer(source.getControllerId());
Player opponent = game.getPlayer(source.getFirstTarget());
if (controller == null || opponent == null) {
@ -95,7 +97,7 @@ class RevealingEyeEffect extends OneShotEffect {
}
TargetCard target = new TargetCard(0, 1, Zone.HAND, StaticFilters.FILTER_CARD_NON_LAND);
controller.choose(outcome, opponent.getHand(), target, source, game);
mage.cards.Card card = game.getCard(target.getFirstTarget());
Card card = game.getCard(target.getFirstTarget());
if (card == null) {
return true;
}

View file

@ -1,12 +1,10 @@
package mage.cards.c;
import mage.ObjectColor;
import mage.abilities.Ability;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.costs.mana.GenericManaCost;
import mage.abilities.dynamicvalue.DynamicValue;
import mage.abilities.dynamicvalue.common.ColorsAmongControlledPermanentsCount;
import mage.abilities.effects.ContinuousRuleModifyingEffectImpl;
import mage.abilities.effects.Effect;
import mage.abilities.effects.common.continuous.BoostEquippedEffect;
import mage.abilities.keyword.EquipAbility;
import mage.cards.CardImpl;
@ -19,7 +17,6 @@ import mage.game.Game;
import mage.game.events.GameEvent;
import mage.game.permanent.Permanent;
import java.util.Objects;
import java.util.Optional;
import java.util.UUID;
@ -35,8 +32,10 @@ public final class ConquerorsFlail extends CardImpl {
// Equipped creature gets +1/+1 for each color among permanents you control.
this.addAbility(new SimpleStaticAbility(new BoostEquippedEffect(
ConquerorsFlailColorCount.instance, ConquerorsFlailColorCount.instance, Duration.WhileOnBattlefield
)));
ColorsAmongControlledPermanentsCount.ALL_PERMANENTS,
ColorsAmongControlledPermanentsCount.ALL_PERMANENTS,
Duration.WhileOnBattlefield
)).addHint(ColorsAmongControlledPermanentsCount.ALL_PERMANENTS.getHint()));
// As long as Conqueror's Flail is attached to a creature, your opponents can't cast spells during your turn.
this.addAbility(new SimpleStaticAbility(new ConquerorsFlailEffect()));
@ -55,36 +54,6 @@ public final class ConquerorsFlail extends CardImpl {
}
}
enum ConquerorsFlailColorCount implements DynamicValue {
instance;
@Override
public int calculate(Game game, Ability sourceAbility, Effect effect) {
ObjectColor color = new ObjectColor("");
game.getBattlefield()
.getAllActivePermanents(sourceAbility.getControllerId())
.stream()
.map(permanent -> permanent.getColor(game))
.forEach(color::addColor);
return color.getColorCount();
}
@Override
public String toString() {
return "1";
}
@Override
public String getMessage() {
return "color among permanents you control";
}
@Override
public ConquerorsFlailColorCount copy() {
return this;
}
}
class ConquerorsFlailEffect extends ContinuousRuleModifyingEffectImpl {
ConquerorsFlailEffect() {

View file

@ -1,39 +0,0 @@
package mage.cards.c;
import mage.abilities.Ability;
import mage.abilities.triggers.BeginningOfUpkeepTriggeredAbility;
import mage.abilities.effects.common.GainLifeEffect;
import mage.abilities.effects.common.LoseLifeOpponentsEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class ConsumingSepulcher extends CardImpl {
public ConsumingSepulcher(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "");
this.nightCard = true;
this.color.setBlack(true);
// At the beginning of your upkeep, each opponent loses 1 life and you gain 1 life.
Ability ability = new BeginningOfUpkeepTriggeredAbility(
new LoseLifeOpponentsEffect(1)
);
ability.addEffect(new GainLifeEffect(1).concatBy("and"));
this.addAbility(ability);
}
private ConsumingSepulcher(final ConsumingSepulcher card) {
super(card);
}
@Override
public ConsumingSepulcher copy() {
return new ConsumingSepulcher(this);
}
}

View file

@ -1,48 +0,0 @@
package mage.cards.c;
import java.util.UUID;
import mage.abilities.Ability;
import mage.abilities.common.ActivateAsSorceryActivatedAbility;
import mage.abilities.costs.common.SacrificeTargetCost;
import mage.abilities.costs.common.TapSourceCost;
import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.effects.common.counter.AddCountersAllEffect;
import mage.abilities.mana.WhiteManaAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.counters.CounterType;
import mage.filter.StaticFilters;
/**
* @author balazskristof
*/
public final class CookingCampsite extends CardImpl {
public CookingCampsite(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.LAND}, "");
this.nightCard = true;
// {T}: Add {W}.
this.addAbility(new WhiteManaAbility());
// {3}, {T}, Sacrifice an artifact: Put a +1/+1 counter on each creature you control. Activate only as a sorcery.
Ability ability = new ActivateAsSorceryActivatedAbility(
new AddCountersAllEffect(CounterType.P1P1.createInstance(), StaticFilters.FILTER_CONTROLLED_CREATURE), new ManaCostsImpl<>("{3}")
);
ability.addCost(new TapSourceCost());
ability.addCost(new SacrificeTargetCost(StaticFilters.FILTER_PERMANENT_ARTIFACT_AN));
this.addAbility(ability);
}
private CookingCampsite(final CookingCampsite card) {
super(card);
}
@Override
public CookingCampsite copy() {
return new CookingCampsite(this);
}
}

View file

@ -1,98 +0,0 @@
package mage.cards.c;
import java.util.UUID;
import mage.MageObject;
import mage.abilities.Ability;
import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.costs.common.TapSourceCost;
import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.effects.OneShotEffect;
import mage.cards.Card;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Outcome;
import mage.filter.StaticFilters;
import mage.game.Game;
import mage.players.Player;
import mage.target.Target;
import mage.target.common.TargetCardInExile;
import mage.util.CardUtil;
/**
* Cosmium Catalyst
* Artifact
* {1}{R}, {T}: Choose an exiled card used to craft Cosmium Catalyst at random. You may cast that card without paying its mana cost.
*
* @author DominionSpy
*/
public class CosmiumCatalyst extends CardImpl {
public CosmiumCatalyst(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "");
this.nightCard = true;
this.color.setRed(true);
// {1}{R}, {T}: Choose an exiled card used to craft Cosmium Catalyst at random. You may cast that card without paying its mana cost.
Ability ability = new SimpleActivatedAbility(new CosmiumCatalystEffect(), new ManaCostsImpl<>("{1}{R}"));
ability.addCost(new TapSourceCost());
this.addAbility(ability);
}
private CosmiumCatalyst(CosmiumCatalyst card) {
super(card);
}
@Override
public CosmiumCatalyst copy() {
return new CosmiumCatalyst(this);
}
}
class CosmiumCatalystEffect extends OneShotEffect {
CosmiumCatalystEffect() {
super(Outcome.PlayForFree);
this.staticText = "Choose an exiled card used to craft {this} at random." +
" You may cast that card without paying its mana cost.";
}
private CosmiumCatalystEffect(CosmiumCatalystEffect effect) {
super(effect);
}
@Override
public CosmiumCatalystEffect copy() {
return new CosmiumCatalystEffect(this);
}
@Override
public boolean apply(Game game, Ability source) {
Player controller = game.getPlayer(source.getControllerId());
if (controller == null) {
return false;
}
MageObject sourceObject = game.getObject(source.getSourceId());
if (sourceObject == null) {
return false;
}
Target target = new TargetCardInExile(StaticFilters.FILTER_CARD,
CardUtil.getExileZoneId(game, source.getSourceId(),
game.getState().getZoneChangeCounter(source.getSourceId()) - 2
));
target.withNotTarget(true);
target.setRandom(true);
if (!target.canChoose(controller.getId(), source, game)) {
return true;
}
target.chooseTarget(outcome, controller.getId(), source, game);
Card chosenCard = game.getCard(target.getFirstTarget());
if (chosenCard != null) {
CardUtil.castSpellWithAttributesForFree(controller, source, game, chosenCard);
}
return true;
}
}

View file

@ -0,0 +1,169 @@
package mage.cards.c;
import mage.MageIdentifier;
import mage.MageObjectReference;
import mage.abilities.Ability;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.common.UnlockThisDoorTriggeredAbility;
import mage.abilities.costs.Costs;
import mage.abilities.costs.CostsImpl;
import mage.abilities.costs.common.PayLifeCost;
import mage.abilities.effects.AsThoughEffectImpl;
import mage.abilities.effects.OneShotEffect;
import mage.cards.Card;
import mage.cards.CardSetInfo;
import mage.cards.RoomCard;
import mage.constants.*;
import mage.game.Controllable;
import mage.game.Game;
import mage.game.events.GameEvent;
import mage.game.permanent.Permanent;
import mage.players.Player;
import mage.target.common.TargetOpponentsCreaturePermanent;
import mage.util.CardUtil;
import mage.watchers.Watcher;
import java.util.HashSet;
import java.util.Optional;
import java.util.Set;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class CrampedVentsAccessMaze extends RoomCard {
public CrampedVentsAccessMaze(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, "{3}{B}", "{5}{B}{B}");
// Cramped Vents
// When you unlock this door, this Room deals 6 damage to target creature an opponent controls. You gain life equal to the excess damage dealt this way.
Ability ability = new UnlockThisDoorTriggeredAbility(new CrampedVentsEffect(), false, true);
ability.addTarget(new TargetOpponentsCreaturePermanent());
ability.addWatcher(new AccessMazeWatcher());
this.getLeftHalfCard().addAbility(ability);
// Access Maze
// Once during each of your turns, you may cast a spell from your hand by paying life equal to its mana value rather than paying its mana cost.
this.getRightHalfCard().addAbility(new SimpleStaticAbility(new AccessMazeEffect())
.setIdentifier(MageIdentifier.AccessMazeWatcher));
}
private CrampedVentsAccessMaze(final CrampedVentsAccessMaze card) {
super(card);
}
@Override
public CrampedVentsAccessMaze copy() {
return new CrampedVentsAccessMaze(this);
}
}
class CrampedVentsEffect extends OneShotEffect {
CrampedVentsEffect() {
super(Outcome.Benefit);
staticText = "{this} deals 6 damage to target creature an opponent controls. " +
"You gain life equal to the excess damage dealt this way.";
}
private CrampedVentsEffect(final CrampedVentsEffect effect) {
super(effect);
}
@Override
public CrampedVentsEffect copy() {
return new CrampedVentsEffect(this);
}
@Override
public boolean apply(Game game, Ability source) {
Permanent permanent = game.getPermanent(getTargetPointer().getFirst(game, source));
if (permanent == null) {
return false;
}
int excess = permanent.damageWithExcess(6, source, game);
if (excess > 0) {
Optional.ofNullable(source)
.map(Controllable::getControllerId)
.map(game::getPlayer)
.ifPresent(player -> player.gainLife(excess, game, source));
}
return true;
}
}
class AccessMazeEffect extends AsThoughEffectImpl {
AccessMazeEffect() {
super(AsThoughEffectType.CAST_FROM_NOT_OWN_HAND_ZONE, Duration.WhileOnBattlefield, Outcome.PlayForFree);
staticText = "once during each of your turns, you may cast a spell from your hand " +
"by paying life equal to its mana value rather than paying its mana cost";
}
private AccessMazeEffect(final AccessMazeEffect effect) {
super(effect);
}
@Override
public AccessMazeEffect copy() {
return new AccessMazeEffect(this);
}
@Override
public boolean apply(Game game, Ability source) {
return true;
}
@Override
public boolean applies(UUID objectId, Ability source, UUID affectedControllerId, Game game) {
if (!source.isControlledBy(affectedControllerId) || !game.isActivePlayer(source.getControllerId())) {
return false;
}
Player controller = game.getPlayer(source.getControllerId());
Permanent sourceObject = game.getPermanent(source.getSourceId());
Card card = game.getCard(CardUtil.getMainCardId(game, objectId));
if (controller == null || card == null || sourceObject == null
|| !Zone.HAND.match(game.getState().getZone(card.getId()))
|| AccessMazeWatcher.isAbilityUsed(new MageObjectReference(sourceObject, game), game)) {
return false;
}
Costs costs = new CostsImpl();
costs.add(new PayLifeCost(card.getManaValue()));
controller.setCastSourceIdWithAlternateMana(
source.getSourceId(), null, costs, MageIdentifier.AccessMazeWatcher
);
return true;
}
}
class AccessMazeWatcher extends Watcher {
private final Set<MageObjectReference> usedFrom = new HashSet<>();
public AccessMazeWatcher() {
super(WatcherScope.GAME);
}
@Override
public void watch(GameEvent event, Game game) {
if (event.getType() == GameEvent.EventType.SPELL_CAST
&& event.hasApprovingIdentifier(MageIdentifier.AccessMazeWatcher)) {
usedFrom.add(event.getApprovingObject().getApprovingMageObjectReference());
}
}
@Override
public void reset() {
super.reset();
usedFrom.clear();
}
static boolean isAbilityUsed(MageObjectReference mor, Game game) {
return game
.getState()
.getWatcher(AccessMazeWatcher.class)
.usedFrom
.contains(mor);
}
}

View file

@ -1,13 +1,16 @@
package mage.cards.c;
import mage.abilities.Ability;
import mage.abilities.costs.common.WaterbendCost;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.costs.common.WaterbendXCost;
import mage.abilities.effects.OneShotEffect;
import mage.abilities.effects.common.InfoEffect;
import mage.abilities.effects.common.TapTargetEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Outcome;
import mage.constants.Zone;
import mage.counters.CounterType;
import mage.filter.FilterPermanent;
import mage.filter.common.FilterOpponentsCreaturePermanent;
@ -30,7 +33,10 @@ public final class CrashingWave extends CardImpl {
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{U}{U}");
// As an additional cost to cast this spell, waterbend {X}.
this.getSpellAbility().addCost(new WaterbendCost("{X}"));
this.getSpellAbility().addCost(new WaterbendXCost());
this.addAbility(new SimpleStaticAbility(
Zone.ALL, new InfoEffect("as an additional cost to cast this spell, waterbend {X}")
).setRuleAtTheTop(true));
// Tap up to X target creatures, then distribute three stun counters among tapped creatures your opponents control.
this.getSpellAbility().addEffect(new TapTargetEffect("tap up to X target creatures"));
@ -79,7 +85,7 @@ class CrashingWaveEffect extends OneShotEffect {
}
TargetPermanentAmount target = new TargetPermanentAmount(3, 1, filter);
target.withNotTarget(true);
player.chooseTarget(outcome, target, source, game);
target.chooseTarget(outcome, player.getId(), source, game);
for (UUID targetId : target.getTargets()) {
Optional.ofNullable(targetId)
.map(game::getPermanent)

View file

@ -1,109 +0,0 @@
package mage.cards.c;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.AttacksTriggeredAbility;
import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.effects.OneShotEffect;
import mage.abilities.effects.common.PhaseOutSourceEffect;
import mage.cards.Card;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Outcome;
import mage.constants.SubType;
import mage.filter.StaticFilters;
import mage.game.ExileZone;
import mage.game.Game;
import mage.game.permanent.Permanent;
import mage.players.Player;
import mage.target.common.TargetCardInGraveyard;
import mage.util.CardUtil;
import java.util.UUID;
/**
* @author LePwnerer
*/
public final class CreepingInn extends CardImpl {
public CreepingInn(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "");
this.subtype.add(SubType.HORROR);
this.subtype.add(SubType.CONSTRUCT);
this.power = new MageInt(3);
this.toughness = new MageInt(7);
this.color.setBlack(true);
this.nightCard = true;
// Whenever Creeping Inn attacks, you may exile a creature card from your graveyard.
// If you do, each opponent loses X life and you gain X life,
// where X is the number of creature cards exiled with Creeping Inn.
this.addAbility(new AttacksTriggeredAbility(new CreepingInnEffect()));
// {4}: Creeping Inn phases out.
this.addAbility(new SimpleActivatedAbility(new PhaseOutSourceEffect(), new ManaCostsImpl<>("{4}")));
}
private CreepingInn(final CreepingInn card) {
super(card);
}
@Override
public CreepingInn copy() {
return new CreepingInn(this);
}
}
class CreepingInnEffect extends OneShotEffect {
CreepingInnEffect() {
super(Outcome.Exile);
this.staticText = "you may exile a creature card from your graveyard. " +
"If you do, each opponent loses X life and you gain X life, " +
"where X is the number of creature cards exiled with {this}.";
}
private CreepingInnEffect(final CreepingInnEffect effect) {
super(effect);
}
@Override
public CreepingInnEffect copy() {
return new CreepingInnEffect(this);
}
@Override
public boolean apply(Game game, Ability source) {
Player player = game.getPlayer(source.getControllerId());
Permanent permanent = source.getSourcePermanentOrLKI(game);
if (player != null && permanent != null) {
UUID exileId = CardUtil.getExileZoneId(game, source);
TargetCardInGraveyard target = new TargetCardInGraveyard(0, 1, StaticFilters.FILTER_CARD_CREATURE_YOUR_GRAVEYARD);
target.withNotTarget(true);
if (target.canChoose(player.getId(), source, game)) {
if (player.choose(Outcome.Exile, target, source, game)) {
Card cardChosen = game.getCard(target.getFirstTarget());
if (cardChosen != null) {
int lifeAmount = 0;
player.moveCardsToExile(cardChosen, source, game, true, exileId, permanent.getName());
ExileZone exile = game.getExile().getExileZone(exileId);
if (exile != null) {
for (UUID cardId : exile) {
lifeAmount++;
}
}
for (UUID playerId : game.getOpponents(source.getControllerId())) {
game.getPlayer(playerId).loseLife(lifeAmount, game, source, false);
}
player.gainLife(lifeAmount, game, source);
}
}
}
return true;
}
return false;
}
}

View file

@ -8,7 +8,7 @@ import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.game.permanent.token.CribSwapShapeshifterWhiteToken;
import mage.game.permanent.token.ShapeshifterColorlessToken;
import mage.target.common.TargetCreaturePermanent;
import java.util.UUID;
@ -26,7 +26,7 @@ public final class CribSwap extends CardImpl {
this.addAbility(new ChangelingAbility());
// Exile target creature. Its controller creates a 1/1 colorless Shapeshifter creature token with changeling.
this.getSpellAbility().addEffect(new ExileTargetEffect());
this.getSpellAbility().addEffect(new CreateTokenControllerTargetEffect(new CribSwapShapeshifterWhiteToken()));
this.getSpellAbility().addEffect(new CreateTokenControllerTargetEffect(new ShapeshifterColorlessToken()));
this.getSpellAbility().addTarget(new TargetCreaturePermanent());
}
@ -39,4 +39,4 @@ public final class CribSwap extends CardImpl {
public CribSwap copy() {
return new CribSwap(this);
}
}
}

View file

@ -0,0 +1,47 @@
package mage.cards.c;
import mage.MageInt;
import mage.abilities.common.EntersBattlefieldAllTriggeredAbility;
import mage.abilities.effects.common.continuous.BoostSourceEffect;
import mage.abilities.keyword.TrampleAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.SubType;
import mage.filter.StaticFilters;
import java.util.UUID;
/**
* @author muz
*/
public final class CrossroadsWatcher extends CardImpl {
public CrossroadsWatcher(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{G}");
this.subtype.add(SubType.KITHKIN);
this.subtype.add(SubType.RANGER);
this.power = new MageInt(3);
this.toughness = new MageInt(3);
// Trample
this.addAbility(TrampleAbility.getInstance());
// Whenever another creature you control enters, this creature gets +1/+0 until end of turn.
this.addAbility(new EntersBattlefieldAllTriggeredAbility(
new BoostSourceEffect(1, 0, Duration.EndOfTurn),
StaticFilters.FILTER_ANOTHER_CREATURE_YOU_CONTROL
));
}
private CrossroadsWatcher(final CrossroadsWatcher card) {
super(card);
}
@Override
public CrossroadsWatcher copy() {
return new CrossroadsWatcher(this);
}
}

View file

@ -1,45 +0,0 @@
package mage.cards.c;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.effects.common.continuous.BoostControlledEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.cards.s.SerahFarron;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.SuperType;
import mage.filter.StaticFilters;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class CrystallizedSerah extends CardImpl {
public CrystallizedSerah(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "");
this.supertype.add(SuperType.LEGENDARY);
this.nightCard = true;
this.color.setGreen(true);
this.color.setWhite(true);
// The first legendary creature spell you cast each turn costs {2} less to cast.
this.addAbility(SerahFarron.makeAbility());
// Legendary creatures you control get +2/+2.
this.addAbility(new SimpleStaticAbility(new BoostControlledEffect(
2, 2, Duration.WhileOnBattlefield, StaticFilters.FILTER_CREATURES_LEGENDARY
)));
}
private CrystallizedSerah(final CrystallizedSerah card) {
super(card);
}
@Override
public CrystallizedSerah copy() {
return new CrystallizedSerah(this);
}
}

View file

@ -0,0 +1,34 @@
package mage.cards.d;
import mage.abilities.effects.common.counter.AddCountersAllEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.counters.CounterType;
import mage.filter.StaticFilters;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class DarknessDescends extends CardImpl {
public DarknessDescends(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{2}{B}{B}");
// Put two -1/-1 counters on each creature.
this.getSpellAbility().addEffect(new AddCountersAllEffect(
CounterType.M1M1.createInstance(2), StaticFilters.FILTER_PERMANENT_CREATURE
));
}
private DarknessDescends(final DarknessDescends card) {
super(card);
}
@Override
public DarknessDescends copy() {
return new DarknessDescends(this);
}
}

Some files were not shown because too many files have changed in this diff Show more