Merge pull request 'master' (#52) from External/mage:master into master

Reviewed-on: #52
This commit is contained in:
Failure 2026-01-13 02:21:39 -08:00
commit 61c717b2bb
150 changed files with 5576 additions and 452 deletions

View file

@ -2857,6 +2857,21 @@ public class ScryfallImageSupportTokens {
put("TLE/Marit Lage", "https://api.scryfall.com/cards/ttle/1/?format=image");
put("TLE/Soldier", "https://api.scryfall.com/cards/ttle/2?format=image");
// ECL
put("ECL/Shapeshifter", "https://api.scryfall.com/cards/tecl/1/?format=image");
// ECC
put("ECC/Elemental/1", "https://api.scryfall.com/cards/tecc/2?format=image");
put("ECC/Elemental/2", "https://api.scryfall.com/cards/tecc/9?format=image");
put("ECC/Elemental/3", "https://api.scryfall.com/cards/tecc/10?format=image");
put("ECC/Elf Warrior", "https://api.scryfall.com/cards/tecc/4?format=image");
put("ECC/Plant", "https://api.scryfall.com/cards/tecc/5?format=image");
put("ECC/Rhino Warrior", "https://api.scryfall.com/cards/tecc/6?format=image");
put("ECC/Saproling", "https://api.scryfall.com/cards/tecc/7?format=image");
put("ECC/Scarecrow", "https://api.scryfall.com/cards/tecc/11?format=image");
put("ECC/Snake", "https://api.scryfall.com/cards/tecc/8?format=image");
put("ECC/Zombie", "https://api.scryfall.com/cards/tecc/3?format=image");
// TMT
put("TMT/Mutagen", "https://api.scryfall.com/cards/ttmt/9?format=image");

View file

@ -28,7 +28,6 @@ public abstract class AbstractCommander extends Constructed {
private static List<CommanderValidator> validators = Arrays.asList(
PartnerValidator.instance,
PartnerVariantValidator.instance,
FriendsForeverValidator.instance,
PartnerWithValidator.instance,
ChooseABackgroundValidator.instance,
DoctorsCompanionValidator.instance

View file

@ -30,6 +30,7 @@ public final class AberrantMindSorcerer extends CardImpl {
this.subtype.add(SubType.HUMAN);
this.subtype.add(SubType.ELF);
this.subtype.add(SubType.SHAMAN);
this.subtype.add(SubType.SORCERER);
this.power = new MageInt(3);
this.toughness = new MageInt(4);

View file

@ -9,16 +9,14 @@ import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition;
import mage.abilities.effects.common.ReturnToHandTargetEffect;
import mage.abilities.effects.common.cost.SpellCostReductionSourceEffect;
import mage.abilities.hint.ConditionHint;
import mage.abilities.hint.Hint;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.Zone;
import mage.filter.StaticFilters;
import mage.filter.common.FilterControlledPermanent;
import mage.target.TargetPermanent;
import mage.target.common.TargetCreaturePermanent;
import java.util.UUID;
import static mage.filter.StaticFilters.FILTER_OPPONENTS_PERMANENT_CREATURE;
@ -28,11 +26,10 @@ import static mage.filter.StaticFilters.FILTER_OPPONENTS_PERMANENT_CREATURE;
*/
public final class AcademyJourneymage extends CardImpl {
private static final FilterControlledPermanent filter = new FilterControlledPermanent("you control a Wizard");
static {
filter.add(SubType.WIZARD.getPredicate());
}
private static final Condition condition = new PermanentsOnTheBattlefieldCondition(
new FilterControlledPermanent(SubType.WIZARD, "you control a Wizard")
);
private static final Hint hint = new ConditionHint(condition, "You control a Wizard");
public AcademyJourneymage(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{U}");
@ -42,10 +39,9 @@ public final class AcademyJourneymage extends CardImpl {
this.toughness = new MageInt(2);
// This spell costs {1} less to cast if you control a Wizard.
Condition condition = new PermanentsOnTheBattlefieldCondition(filter);
Ability ability = new SimpleStaticAbility(Zone.ALL, new SpellCostReductionSourceEffect(1, condition));
ability.setRuleAtTheTop(true);
ability.addHint(new ConditionHint(condition, "You control a Wizard"));
ability.addHint(hint);
this.addAbility(ability);
// When Academy Journeymage enters the battlefield, return target creature an opponent controls to its owner's hand.

View file

@ -0,0 +1,51 @@
package mage.cards.a;
import mage.MageInt;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.effects.common.continuous.GainAbilityControlledEffect;
import mage.abilities.keyword.IndestructibleAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.SubType;
import mage.filter.FilterPermanent;
import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.permanent.TappedPredicate;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class AdeptWatershaper extends CardImpl {
private static final FilterPermanent filter = new FilterCreaturePermanent("tapped creatures");
static {
filter.add(TappedPredicate.TAPPED);
}
public AdeptWatershaper(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{W}");
this.subtype.add(SubType.MERFOLK);
this.subtype.add(SubType.CLERIC);
this.power = new MageInt(3);
this.toughness = new MageInt(4);
// Other tapped creatures you control have indestructible.
this.addAbility(new SimpleStaticAbility(new GainAbilityControlledEffect(
IndestructibleAbility.getInstance(), Duration.WhileOnBattlefield, filter, true
)));
}
private AdeptWatershaper(final AdeptWatershaper card) {
super(card);
}
@Override
public AdeptWatershaper copy() {
return new AdeptWatershaper(this);
}
}

View file

@ -0,0 +1,68 @@
package mage.cards.a;
import mage.abilities.Ability;
import mage.abilities.LoyaltyAbility;
import mage.abilities.dynamicvalue.common.ControllerLifeCount;
import mage.abilities.effects.common.CreateTokenEffect;
import mage.abilities.effects.common.DamageTargetEffect;
import mage.abilities.effects.common.LookLibraryAndPickControllerEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.*;
import mage.filter.FilterCard;
import mage.filter.FilterPermanent;
import mage.filter.common.FilterCreaturePermanent;
import mage.filter.common.FilterNonlandCard;
import mage.filter.predicate.mageobject.ManaValuePredicate;
import mage.filter.predicate.mageobject.PermanentPredicate;
import mage.filter.predicate.permanent.TappedPredicate;
import mage.game.permanent.token.KithkinGreenWhiteToken;
import mage.target.TargetPermanent;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class AjaniOutlandChaperone extends CardImpl {
private static final FilterPermanent filter = new FilterCreaturePermanent("tapped creature");
private static final FilterCard filter2 = new FilterNonlandCard("nonland permanent cards with mana value 3 or less");
static {
filter.add(TappedPredicate.TAPPED);
filter2.add(PermanentPredicate.instance);
filter2.add(new ManaValuePredicate(ComparisonType.FEWER_THAN, 4));
}
public AjaniOutlandChaperone(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.PLANESWALKER}, "{1}{W}{W}");
this.supertype.add(SuperType.LEGENDARY);
this.subtype.add(SubType.AJANI);
this.setStartingLoyalty(3);
// +1: Create a 1/1 green and white Kithkin creature token.
this.addAbility(new LoyaltyAbility(new CreateTokenEffect(new KithkinGreenWhiteToken()), 1));
// -2: Ajani deals 4 damage to target tapped creature.
Ability ability = new LoyaltyAbility(new DamageTargetEffect(4), -2);
ability.addTarget(new TargetPermanent(filter));
this.addAbility(ability);
// -8: Look at the top X cards of your library, where X is your life total. You may put any number of nonland permanent cards with mana value 3 or less from among them onto the battlefield. Then shuffle.
this.addAbility(new LoyaltyAbility(new LookLibraryAndPickControllerEffect(
ControllerLifeCount.instance, Integer.MAX_VALUE,
filter2, PutCards.BATTLEFIELD, PutCards.SHUFFLE
), -8));
}
private AjaniOutlandChaperone(final AjaniOutlandChaperone card) {
super(card);
}
@Override
public AjaniOutlandChaperone copy() {
return new AjaniOutlandChaperone(this);
}
}

View file

@ -23,6 +23,7 @@ public final class ApprenticeSorcerer extends CardImpl {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{U}");
this.subtype.add(SubType.HUMAN);
this.subtype.add(SubType.WIZARD);
this.subtype.add(SubType.SORCERER);
this.power = new MageInt(1);
this.toughness = new MageInt(1);

View file

@ -0,0 +1,51 @@
package mage.cards.a;
import java.util.UUID;
import mage.abilities.Mode;
import mage.abilities.effects.common.continuous.BoostTargetEffect;
import mage.abilities.effects.common.discard.DiscardCardYouChooseTargetEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.filter.FilterCard;
import mage.filter.common.FilterPermanentCard;
import mage.filter.predicate.Predicates;
import mage.target.common.TargetCreaturePermanent;
import mage.target.common.TargetOpponent;
/**
*
* @author muz
*/
public final class AuntiesSentence extends CardImpl {
private static final FilterCard filter = new FilterPermanentCard("a nonland permanent card");
static {
filter.add(Predicates.not(CardType.LAND.getPredicate()));
}
public AuntiesSentence(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{1}{B}");
// Choose one --
// * Target opponent reveals their hand. You choose a nonland permanent card from it. That player discards that card.
this.getSpellAbility().addTarget(new TargetOpponent());
this.getSpellAbility().addEffect(new DiscardCardYouChooseTargetEffect(filter));
// * Target creature gets -2/-2 until end of turn.
Mode mode = new Mode(new BoostTargetEffect(-2, -2));
mode.addTarget(new TargetCreaturePermanent());
this.getSpellAbility().addMode(mode);
}
private AuntiesSentence(final AuntiesSentence card) {
super(card);
}
@Override
public AuntiesSentence copy() {
return new AuntiesSentence(this);
}
}

View file

@ -0,0 +1,52 @@
package mage.cards.b;
import mage.abilities.Ability;
import mage.abilities.common.EntersBattlefieldAttachToTarget;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.effects.common.continuous.BoostEquippedEffect;
import mage.abilities.effects.common.continuous.GainAbilityTargetEffect;
import mage.abilities.keyword.EquipAbility;
import mage.abilities.keyword.FlashAbility;
import mage.abilities.keyword.WitherAbility;
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 BarbedBloodletter extends CardImpl {
public BarbedBloodletter(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{1}{B}");
this.subtype.add(SubType.EQUIPMENT);
// Flash
this.addAbility(FlashAbility.getInstance());
// When this Equipment enters, attach it to target creature you control. That creature gains wither until end of turn.
Ability ability = new EntersBattlefieldAttachToTarget();
ability.addEffect(new GainAbilityTargetEffect(WitherAbility.getInstance())
.setText("That creature gains wither until end of turn"));
this.addAbility(ability);
// Equipped creature gets +1/+2.
this.addAbility(new SimpleStaticAbility(new BoostEquippedEffect(1, 2)));
// Equip {2}
this.addAbility(new EquipAbility(2));
}
private BarbedBloodletter(final BarbedBloodletter card) {
super(card);
}
@Override
public BarbedBloodletter copy() {
return new BarbedBloodletter(this);
}
}

View file

@ -7,14 +7,13 @@ import mage.abilities.costs.common.SacrificeTargetCost;
import mage.abilities.costs.common.TapSourceCost;
import mage.abilities.effects.common.DamageTargetEffect;
import mage.abilities.effects.common.combat.GoadTargetEffect;
import mage.abilities.keyword.FriendsForeverAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.PartnerVariantType;
import mage.constants.SubType;
import mage.constants.SuperType;
import mage.filter.StaticFilters;
import mage.target.common.TargetControlledPermanent;
import mage.target.common.TargetCreaturePermanent;
import java.util.UUID;
@ -40,7 +39,7 @@ public final class BjornaNightfallAlchemist extends CardImpl {
this.addAbility(ability);
// Friends forever
this.addAbility(FriendsForeverAbility.getInstance());
this.addAbility(PartnerVariantType.FRIENDS_FOREVER.makeAbility());
}
private BjornaNightfallAlchemist(final BjornaNightfallAlchemist card) {

View file

@ -0,0 +1,33 @@
package mage.cards.b;
import mage.abilities.effects.common.counter.AddCountersTargetEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.counters.CounterType;
import mage.target.common.TargetCreaturePermanent;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class BlightRot extends CardImpl {
public BlightRot(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{2}{B}");
// Put four -1/-1 counters on target creature.
this.getSpellAbility().addEffect(new AddCountersTargetEffect(CounterType.P1P1.createInstance(4)));
this.getSpellAbility().addTarget(new TargetCreaturePermanent());
}
private BlightRot(final BlightRot card) {
super(card);
}
@Override
public BlightRot copy() {
return new BlightRot(this);
}
}

View file

@ -28,6 +28,7 @@ public final class BloodboilSorcerer extends CardImpl {
this.subtype.add(SubType.HUMAN);
this.subtype.add(SubType.SHAMAN);
this.subtype.add(SubType.SORCERER);
this.power = new MageInt(3);
this.toughness = new MageInt(3);

View file

@ -0,0 +1,54 @@
package mage.cards.b;
import mage.MageInt;
import mage.abilities.common.DiesCreatureTriggeredAbility;
import mage.abilities.effects.common.DamagePlayersEffect;
import mage.abilities.keyword.DeathtouchAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.TargetController;
import mage.filter.FilterPermanent;
import mage.filter.common.FilterControlledPermanent;
import mage.filter.predicate.mageobject.AnotherPredicate;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class BoggartCursecrafter extends CardImpl {
private static final FilterPermanent filter = new FilterControlledPermanent(SubType.GOBLIN, "another Goblin you control");
static {
filter.add(AnotherPredicate.instance);
}
public BoggartCursecrafter(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{B}{R}");
this.subtype.add(SubType.GOBLIN);
this.subtype.add(SubType.WARLOCK);
this.power = new MageInt(2);
this.toughness = new MageInt(3);
// Deathtouch
this.addAbility(DeathtouchAbility.getInstance());
// Whenever another Goblin you control dies, this creature deals 1 damage to each opponent.
this.addAbility(new DiesCreatureTriggeredAbility(
new DamagePlayersEffect(1, TargetController.OPPONENT), false, filter
));
}
private BoggartCursecrafter(final BoggartCursecrafter card) {
super(card);
}
@Override
public BoggartCursecrafter copy() {
return new BoggartCursecrafter(this);
}
}

View file

@ -0,0 +1,51 @@
package mage.cards.b;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.AttacksWithCreaturesTriggeredAbility;
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.filter.predicate.permanent.AttackingPredicate;
import mage.target.TargetPermanent;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class BoggartPrankster extends CardImpl {
private static final FilterPermanent filter = new FilterControlledPermanent(SubType.GOBLIN, "attacking Goblin you control");
static {
filter.add(AttackingPredicate.instance);
}
public BoggartPrankster(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{B}");
this.subtype.add(SubType.GOBLIN);
this.subtype.add(SubType.WARRIOR);
this.power = new MageInt(1);
this.toughness = new MageInt(3);
// Whenever you attack, target attacking Goblin you control gets +1/+0 until end of turn.
Ability ability = new AttacksWithCreaturesTriggeredAbility(new BoostTargetEffect(1, 0), 1);
ability.addTarget(new TargetPermanent(filter));
this.addAbility(ability);
}
private BoggartPrankster(final BoggartPrankster card) {
super(card);
}
@Override
public BoggartPrankster copy() {
return new BoggartPrankster(this);
}
}

View file

@ -0,0 +1,40 @@
package mage.cards.b;
import mage.abilities.costs.OrCost;
import mage.abilities.costs.common.BlightCost;
import mage.abilities.costs.mana.GenericManaCost;
import mage.abilities.effects.common.ExileTargetEffect;
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 BogslithersEmbrace extends CardImpl {
public BogslithersEmbrace(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{1}{B}");
// As an additional cost to cast this spell, blight 1 or pay {3}.
this.getSpellAbility().addCost(new OrCost(
"blight 1 or pay {3}", new BlightCost(1), new GenericManaCost(3)
));
// Exile target creature.
this.getSpellAbility().addEffect(new ExileTargetEffect());
this.getSpellAbility().addTarget(new TargetCreaturePermanent());
}
private BogslithersEmbrace(final BogslithersEmbrace card) {
super(card);
}
@Override
public BogslithersEmbrace copy() {
return new BogslithersEmbrace(this);
}
}

View file

@ -0,0 +1,46 @@
package mage.cards.b;
import mage.abilities.effects.common.DamageTargetAndTargetEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.filter.common.FilterAnyTarget;
import mage.filter.common.FilterPermanentOrPlayer;
import mage.filter.predicate.other.AnotherTargetPredicate;
import mage.target.common.TargetAnyTarget;
import mage.target.common.TargetPermanentOrPlayer;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class BoulderDash extends CardImpl {
private static final FilterPermanentOrPlayer filter2 = new FilterAnyTarget("another target");
static {
filter2.getPermanentFilter().add(new AnotherTargetPredicate(2));
filter2.getPlayerFilter().add(new AnotherTargetPredicate(2));
}
public BoulderDash(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{1}{R}");
// Boulder Dash deals 2 damage to any target and 1 damage to any other target.
this.getSpellAbility().addEffect(new DamageTargetAndTargetEffect(2, 1));
this.getSpellAbility().addTarget(new TargetAnyTarget()
.withChooseHint("to deal 2 damage").setTargetTag(1));
this.getSpellAbility().addTarget(new TargetPermanentOrPlayer(filter2)
.withChooseHint("to deal 1 damage").setTargetTag(2));
}
private BoulderDash(final BoulderDash card) {
super(card);
}
@Override
public BoulderDash copy() {
return new BoulderDash(this);
}
}

View file

@ -0,0 +1,55 @@
package mage.cards.b;
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.combat.CantBlockTargetEffect;
import mage.abilities.effects.common.counter.AddCountersSourceEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.SubType;
import mage.counters.CounterType;
import mage.target.common.TargetCreaturePermanent;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class BramblebackBrute extends CardImpl {
public BramblebackBrute(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{R}");
this.subtype.add(SubType.GIANT);
this.subtype.add(SubType.WARRIOR);
this.power = new MageInt(4);
this.toughness = new MageInt(5);
// This creature enters with two -1/-1 counters on it.
this.addAbility(new EntersBattlefieldAbility(
new AddCountersSourceEffect(CounterType.M1M1.createInstance(2)),
"with two -1/-1 counters on it"
));
// {1}{R}, Remove a counter from this creature: Target creature can't block this turn. Activate only as a sorcery.
Ability ability = new ActivateAsSorceryActivatedAbility(new CantBlockTargetEffect(Duration.EndOfTurn), new ManaCostsImpl<>("{1}{R}"));
ability.addCost(new RemoveCountersSourceCost(1));
ability.addTarget(new TargetCreaturePermanent());
this.addAbility(ability);
}
private BramblebackBrute(final BramblebackBrute card) {
super(card);
}
@Override
public BramblebackBrute copy() {
return new BramblebackBrute(this);
}
}

View file

@ -0,0 +1,107 @@
package mage.cards.b;
import java.util.*;
import mage.MageInt;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.condition.Condition;
import mage.abilities.decorator.ConditionalContinuousEffect;
import mage.abilities.effects.common.continuous.BoostSourceEffect;
import mage.abilities.keyword.DauntAbility;
import mage.constants.SubType;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.MageObjectReference;
import mage.abilities.Ability;
import mage.constants.WatcherScope;
import mage.game.Game;
import mage.game.events.EntersTheBattlefieldEvent;
import mage.game.events.GameEvent;
import mage.game.permanent.Permanent;
import mage.watchers.Watcher;
/**
*
* @author muz
*/
public final class BristlebaneOutrider extends CardImpl {
public BristlebaneOutrider(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{G}");
this.subtype.add(SubType.KITHKIN);
this.subtype.add(SubType.KNIGHT);
this.power = new MageInt(3);
this.toughness = new MageInt(5);
// This creature can't be blocked by creatures with power 2 or less.
this.addAbility(new DauntAbility());
// As long as another creature entered the battlefield under your control this turn, this creature gets +2/+0.
this.addAbility(new SimpleStaticAbility(new ConditionalContinuousEffect(
new BoostSourceEffect(2, 0, Duration.WhileOnBattlefield),
BristlebaneOutriderCondition.instance, "as long as another creature entered the battlefield under your control this turn, this creature gets +2/+0."
)), new BristlebaneOutriderWatcher());
}
private BristlebaneOutrider(final BristlebaneOutrider card) {
super(card);
}
@Override
public BristlebaneOutrider copy() {
return new BristlebaneOutrider(this);
}
}
enum BristlebaneOutriderCondition implements Condition {
instance;
@Override
public boolean apply(Game game, Ability source) {
return BristlebaneOutriderWatcher.checkPlayer(source, game);
}
}
class BristlebaneOutriderWatcher extends Watcher {
private final Map<UUID, Set<MageObjectReference>> creatureMap = new HashMap<>();
private static final Set<MageObjectReference> emptySet = Collections.unmodifiableSet(new HashSet<>());
BristlebaneOutriderWatcher() {
super(WatcherScope.GAME);
}
@Override
public void watch(GameEvent event, Game game) {
if (event.getType() != GameEvent.EventType.ENTERS_THE_BATTLEFIELD) {
return;
}
Permanent permanent = ((EntersTheBattlefieldEvent) event).getTarget();
if (permanent == null) {
return;
}
if (permanent.isCreature(game)) {
creatureMap
.computeIfAbsent(permanent.getControllerId(), x -> new HashSet<>())
.add(new MageObjectReference(permanent, game));
}
}
@Override
public void reset() {
super.reset();
creatureMap.clear();
}
static boolean checkPlayer(Ability source, Game game) {
BristlebaneOutriderWatcher watcher = game.getState().getWatcher(BristlebaneOutriderWatcher.class);
return watcher
.creatureMap
.getOrDefault(source.getControllerId(), emptySet)
.stream()
.anyMatch(mor -> !mor.refersTo(source.getSourceObject(game), game));
}
}

View file

@ -23,6 +23,7 @@ public final class CapriciousSorcerer extends CardImpl {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{U}");
this.subtype.add(SubType.HUMAN);
this.subtype.add(SubType.WIZARD);
this.subtype.add(SubType.SORCERER);
this.power = new MageInt(1);
this.toughness = new MageInt(1);

View file

@ -0,0 +1,63 @@
package mage.cards.c;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
import mage.abilities.condition.common.TwoOfManaColorSpentCondition;
import mage.abilities.effects.common.CreateTokenEffect;
import mage.abilities.effects.common.continuous.BoostControlledEffect;
import mage.abilities.effects.common.continuous.GainAbilityControlledEffect;
import mage.abilities.keyword.EvokeAbility;
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.StaticFilters;
import mage.game.permanent.token.KithkinGreenWhiteToken;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class Catharsis extends CardImpl {
public Catharsis(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{R/W}{R/W}");
this.subtype.add(SubType.ELEMENTAL);
this.subtype.add(SubType.INCARNATION);
this.power = new MageInt(3);
this.toughness = new MageInt(4);
// When this creature enters, if {W}{W} was spent to cast it, create two 1/1 green and white Kithkin creature tokens.
this.addAbility(new EntersBattlefieldTriggeredAbility(
new CreateTokenEffect(new KithkinGreenWhiteToken(), 2)
).withInterveningIf(TwoOfManaColorSpentCondition.WHITE));
// When this creature enters, if {R}{R} was spent to cast it, creatures you control get +1/+1 and gain haste until end of turn.
Ability ability = new EntersBattlefieldTriggeredAbility(
new BoostControlledEffect(1, 1, Duration.EndOfTurn)
.setText("creatures you control get +1/+1")
).withInterveningIf(TwoOfManaColorSpentCondition.RED);
ability.addEffect(new GainAbilityControlledEffect(
HasteAbility.getInstance(), Duration.EndOfTurn,
StaticFilters.FILTER_CONTROLLED_CREATURES
).setText("and gain haste until end of turn"));
this.addAbility(ability);
// Evoke {R/W}{R/W}
this.addAbility(new EvokeAbility("{R/W}{R/W}"));
}
private Catharsis(final Catharsis card) {
super(card);
}
@Override
public Catharsis copy() {
return new Catharsis(this);
}
}

View file

@ -6,7 +6,6 @@ import mage.abilities.common.AttacksTriggeredAbility;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.effects.OneShotEffect;
import mage.abilities.effects.common.continuous.MaximumHandSizeControllerEffect;
import mage.abilities.keyword.FriendsForeverAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.*;
@ -40,7 +39,7 @@ public final class CecilyHauntedMage extends CardImpl {
this.addAbility(new AttacksTriggeredAbility(new CecilyHauntedMageEffect()));
// Friends forever
this.addAbility(FriendsForeverAbility.getInstance());
this.addAbility(PartnerVariantType.FRIENDS_FOREVER.makeAbility());
}
private CecilyHauntedMage(final CecilyHauntedMage card) {

View file

@ -0,0 +1,97 @@
package mage.cards.c;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.EntersBattlefieldAllTriggeredAbility;
import mage.abilities.common.LeavesBattlefieldTriggeredAbility;
import mage.abilities.costs.common.BeholdAndExileCost;
import mage.abilities.effects.OneShotEffect;
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.Outcome;
import mage.constants.SubType;
import mage.filter.FilterPermanent;
import mage.filter.common.FilterControlledPermanent;
import mage.filter.predicate.mageobject.AnotherPredicate;
import mage.game.Game;
import mage.game.permanent.Permanent;
import java.util.Optional;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class ChampionOfThePath extends CardImpl {
private static final FilterPermanent filter = new FilterControlledPermanent(SubType.ELEMENTAL, "another Elemental you control");
static {
filter.add(AnotherPredicate.instance);
}
public ChampionOfThePath(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{R}");
this.subtype.add(SubType.ELEMENTAL);
this.subtype.add(SubType.SORCERER);
this.power = new MageInt(7);
this.toughness = new MageInt(3);
// As an additional cost to cast this spell, behold an Elemental and exile it.
this.getSpellAbility().addCost(new BeholdAndExileCost(BeholdType.ELEMENTAL));
// Whenever another Elemental you control enters, it deals damage equal to its power to each opponent.
this.addAbility(new EntersBattlefieldAllTriggeredAbility(new ChampionOfThePathEffect(), filter));
// When this creature leaves the battlefield, return the exiled card to its owner's hand.
this.addAbility(new LeavesBattlefieldTriggeredAbility(new ReturnExiledCardToHandEffect()));
}
private ChampionOfThePath(final ChampionOfThePath card) {
super(card);
}
@Override
public ChampionOfThePath copy() {
return new ChampionOfThePath(this);
}
}
class ChampionOfThePathEffect extends OneShotEffect {
ChampionOfThePathEffect() {
super(Outcome.Benefit);
staticText = "it deals damage equal to its power to each opponent";
}
private ChampionOfThePathEffect(final ChampionOfThePathEffect effect) {
super(effect);
}
@Override
public ChampionOfThePathEffect copy() {
return new ChampionOfThePathEffect(this);
}
@Override
public boolean apply(Game game, Ability source) {
Permanent permanent = (Permanent) getValue("permanentEnteringBattlefield");
if (permanent == null) {
return false;
}
int power = permanent.getPower().getValue();
if (power < 1) {
return false;
}
for (UUID opponentId : game.getOpponents(source.getControllerId())) {
Optional.of(opponentId)
.map(game::getPlayer)
.ifPresent(player -> player.damage(power, permanent.getId(), source, game));
}
return true;
}
}

View file

@ -0,0 +1,45 @@
package mage.cards.c;
import mage.MageInt;
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
import mage.abilities.effects.common.search.SearchLibraryPutInHandEffect;
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.common.TargetCardInLibrary;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class ChangelingWayfinder extends CardImpl {
public ChangelingWayfinder(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}");
this.subtype.add(SubType.SHAPESHIFTER);
this.power = new MageInt(1);
this.toughness = new MageInt(2);
// Changeling
this.addAbility(new ChangelingAbility());
// When this creature enters, you may search your library for a basic land card, reveal it, put it into your hand, then shuffle.
this.addAbility(new EntersBattlefieldTriggeredAbility(new SearchLibraryPutInHandEffect(
new TargetCardInLibrary(StaticFilters.FILTER_CARD_BASIC_LAND), true
), true));
}
private ChangelingWayfinder(final ChangelingWayfinder card) {
super(card);
}
@Override
public ChangelingWayfinder copy() {
return new ChangelingWayfinder(this);
}
}

View file

@ -18,7 +18,7 @@ import java.util.UUID;
public final class ChaosSpewer extends CardImpl {
public ChaosSpewer(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}");
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{B/R}");
this.subtype.add(SubType.GOBLIN);
this.subtype.add(SubType.WARLOCK);

View file

@ -0,0 +1,83 @@
package mage.cards.c;
import java.util.UUID;
import mage.constants.SuperType;
import mage.constants.TargetController;
import mage.filter.FilterSpell;
import mage.filter.StaticFilters;
import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.mageobject.ChosenSubtypePredicate;
import mage.abilities.common.AsEntersBattlefieldAbility;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.common.SpellCastControllerTriggeredAbility;
import mage.abilities.effects.common.ChooseCreatureTypeEffect;
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
import mage.abilities.effects.common.continuous.BoostAllOfChosenSubtypeEffect;
import mage.abilities.effects.common.continuous.GainAbilityAllOfChosenSubtypeEffect;
import mage.abilities.keyword.FirstStrikeAbility;
import mage.abilities.keyword.TrampleAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.Outcome;
/**
*
* @author muz
*/
public final class ChronicleOfVictory extends CardImpl {
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creatures you control of the chosen type");
private static final FilterSpell filterSpell = new FilterSpell("a spell of the chosen type");
static {
filter.add(TargetController.YOU.getControllerPredicate());
filterSpell.add(ChosenSubtypePredicate.TRUE);
}
public ChronicleOfVictory(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{6}");
this.supertype.add(SuperType.LEGENDARY);
// As Chronicle of Victory enters, choose a creature type.
this.addAbility(new AsEntersBattlefieldAbility(new ChooseCreatureTypeEffect(Outcome.BoostCreature)));
// Creatures you control of the chosen type get +2/+2 and have first strike and trample.
SimpleStaticAbility buffAbility = new SimpleStaticAbility(new BoostAllOfChosenSubtypeEffect(
2, 2, Duration.WhileOnBattlefield, filter, false
).setText("creatures you control of the chosen type get +2/+2"));
buffAbility.addEffect(
new GainAbilityAllOfChosenSubtypeEffect(
FirstStrikeAbility.getInstance(),
Duration.WhileOnBattlefield,
StaticFilters.FILTER_PERMANENT_CREATURES_CONTROLLED
).setText("and have first strike")
);
buffAbility.addEffect(
new GainAbilityAllOfChosenSubtypeEffect(
TrampleAbility.getInstance(),
Duration.WhileOnBattlefield,
StaticFilters.FILTER_PERMANENT_CREATURES_CONTROLLED
).setText("and trample")
);
this.addAbility(buffAbility);
// Whenever you cast a spell of the chosen type, draw a card.
this.addAbility(
new SpellCastControllerTriggeredAbility(
new DrawCardSourceControllerEffect(1), filterSpell, false
)
);
}
private ChronicleOfVictory(final ChronicleOfVictory card) {
super(card);
}
@Override
public ChronicleOfVictory copy() {
return new ChronicleOfVictory(this);
}
}

View file

@ -0,0 +1,40 @@
package mage.cards.c;
import mage.abilities.condition.common.BlightedCondition;
import mage.abilities.decorator.ConditionalOneShotEffect;
import mage.abilities.effects.common.DamageTargetEffect;
import mage.abilities.keyword.BlightAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class CinderStrike extends CardImpl {
public CinderStrike(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{R}");
// As an additional cost to cast this spell, you may blight 1.
this.addAbility(new BlightAbility(1));
// Cinder Strike deals 2 damage to target creature. It deals 4 damage to that creature instead if this spell's additional cost was paid.
this.getSpellAbility().addEffect(new ConditionalOneShotEffect(
new DamageTargetEffect(4), new DamageTargetEffect(2),
BlightedCondition.instance, "{this} deals 2 damage to target creature. " +
"It deals 4 damage to that creature instead if this spell's additional cost was paid"
));
}
private CinderStrike(final CinderStrike card) {
super(card);
}
@Override
public CinderStrike copy() {
return new CinderStrike(this);
}
}

View file

@ -0,0 +1,66 @@
package mage.cards.c;
import mage.MageInt;
import mage.abilities.common.EntersBattlefieldAbility;
import mage.abilities.condition.CompoundCondition;
import mage.abilities.condition.Condition;
import mage.abilities.condition.common.CardsInControllerGraveyardCondition;
import mage.abilities.condition.common.SourceHasCounterCondition;
import mage.abilities.effects.common.counter.AddCountersSourceEffect;
import mage.abilities.effects.common.counter.RemoveCounterSourceEffect;
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.counters.CounterType;
import mage.filter.FilterCard;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class CreakwoodSafewright extends CardImpl {
private static final Condition condition = new CompoundCondition(
"there is an Elf card in your graveyard and {this} has a -1/-1 counter on it",
new CardsInControllerGraveyardCondition(1, new FilterCard(SubType.ELF)),
new SourceHasCounterCondition(CounterType.M1M1)
);
private static final Hint hint = new ConditionHint(
new CardsInControllerGraveyardCondition(1, new FilterCard(SubType.ELF)),
"There is an Elf card in your graveyard"
);
public CreakwoodSafewright(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{B}");
this.subtype.add(SubType.ELF);
this.subtype.add(SubType.WARRIOR);
this.power = new MageInt(5);
this.toughness = new MageInt(5);
// This creature enters with three -1/-1 counters on it.
this.addAbility(new EntersBattlefieldAbility(
new AddCountersSourceEffect(CounterType.M1M1.createInstance(3)),
"with three -1/-1 counters on it"
));
// At the beginning of your end step, if there is an Elf card in your graveyard and this creature has a -1/-1 counter on it, remove a -1/-1 counter from this creature.
this.addAbility(new BeginningOfEndStepTriggeredAbility(
new RemoveCounterSourceEffect(CounterType.M1M1.createInstance())
).withInterveningIf(condition).addHint(hint));
}
private CreakwoodSafewright(final CreakwoodSafewright card) {
super(card);
}
@Override
public CreakwoodSafewright copy() {
return new CreakwoodSafewright(this);
}
}

View file

@ -29,6 +29,7 @@ public final class DakmorSorceress extends CardImpl {
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{B}");
this.subtype.add(SubType.HUMAN);
this.subtype.add(SubType.WIZARD);
this.subtype.add(SubType.SORCERER);
this.power = new MageInt(0);
this.toughness = new MageInt(4);

View file

@ -0,0 +1,54 @@
package mage.cards.d;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.effects.common.UntapTargetEffect;
import mage.abilities.effects.common.continuous.BoostControlledEffect;
import mage.abilities.triggers.BeginningOfEndStepTriggeredAbility;
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.target.TargetPermanent;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class DeepchannelDuelist extends CardImpl {
private static final FilterPermanent filter = new FilterControlledPermanent(SubType.MERFOLK);
public DeepchannelDuelist(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{W}{U}");
this.subtype.add(SubType.MERFOLK);
this.subtype.add(SubType.SOLDIER);
this.power = new MageInt(2);
this.toughness = new MageInt(2);
// At the beginning of your end step, untap target Merfolk you control.
Ability ability = new BeginningOfEndStepTriggeredAbility(new UntapTargetEffect());
ability.addTarget(new TargetPermanent(filter));
this.addAbility(ability);
// Other Merfolk you control get +1/+1.
this.addAbility(new SimpleStaticAbility(new BoostControlledEffect(
1, 1, Duration.WhileOnBattlefield, filter, true
)));
}
private DeepchannelDuelist(final DeepchannelDuelist card) {
super(card);
}
@Override
public DeepchannelDuelist copy() {
return new DeepchannelDuelist(this);
}
}

View file

@ -23,7 +23,7 @@ import java.util.UUID;
public final class DraconicLore extends CardImpl {
private static final Condition condition = new PermanentsOnTheBattlefieldCondition(
new FilterControlledPermanent(SubType.DRAGON, "you control a Dragon")
new FilterControlledPermanent(SubType.DRAGON, "you control a Dragon")
);
private static final Hint hint = new ConditionHint(condition, "You control a Dragon");

View file

@ -0,0 +1,58 @@
package mage.cards.d;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.DiesCreatureTriggeredAbility;
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
import mage.abilities.effects.common.PutCardFromHandOrGraveyardOntoBattlefieldEffect;
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.filter.FilterPermanent;
import mage.filter.StaticFilters;
import mage.filter.common.FilterCreaturePermanent;
import mage.target.common.TargetCreaturePermanent;
import java.util.UUID;
/**
* @author PurpleCrowbar
*/
public final class DreadTiller extends CardImpl {
private static final FilterPermanent filter = new FilterCreaturePermanent("a creature with a -1/-1 counter on it");
static {
filter.add(CounterType.M1M1.getPredicate());
}
public DreadTiller(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{1}{B}{G}");
this.subtype.add(SubType.SCARECROW);
this.power = new MageInt(2);
this.toughness = new MageInt(4);
// When this creature enters, put a -1/-1 counter on target creature.
Ability ability = new EntersBattlefieldTriggeredAbility(new AddCountersTargetEffect(CounterType.M1M1.createInstance()));
ability.addTarget(new TargetCreaturePermanent());
this.addAbility(ability);
// Whenever a creature with a -1/-1 counter on it dies, you may put a land card from your hand or graveyard onto the battlefield tapped.
this.addAbility(new DiesCreatureTriggeredAbility(
new PutCardFromHandOrGraveyardOntoBattlefieldEffect(StaticFilters.FILTER_CARD_LAND_A, true), true, filter
));
}
private DreadTiller(final DreadTiller card) {
super(card);
}
@Override
public DreadTiller copy() {
return new DreadTiller(this);
}
}

View file

@ -0,0 +1,53 @@
package mage.cards.e;
import mage.MageInt;
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
import mage.abilities.effects.common.LookLibraryAndPickControllerEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.PutCards;
import mage.constants.SubType;
import mage.filter.FilterCard;
import mage.filter.predicate.Predicates;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class EclipsedBoggart extends CardImpl {
private static final FilterCard filter = new FilterCard("Goblin, Swamp, or Mountain card");
static {
filter.add(Predicates.or(
SubType.GOBLIN.getPredicate(),
SubType.SWAMP.getPredicate(),
SubType.MOUNTAIN.getPredicate()
));
}
public EclipsedBoggart(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{B/R}{B/R}{B/R}");
this.subtype.add(SubType.GOBLIN);
this.subtype.add(SubType.SCOUT);
this.power = new MageInt(2);
this.toughness = new MageInt(3);
// When this creature enters, look at the top four cards of your library. You may reveal a Goblin, Swamp, or Mountain card from among them and put it into your hand. Put the rest on the bottom of your library in a random order.
this.addAbility(new EntersBattlefieldTriggeredAbility(new LookLibraryAndPickControllerEffect(
4, 1, filter, PutCards.HAND, PutCards.BOTTOM_RANDOM
)));
}
private EclipsedBoggart(final EclipsedBoggart card) {
super(card);
}
@Override
public EclipsedBoggart copy() {
return new EclipsedBoggart(this);
}
}

View file

@ -0,0 +1,53 @@
package mage.cards.e;
import mage.MageInt;
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
import mage.abilities.effects.common.LookLibraryAndPickControllerEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.PutCards;
import mage.constants.SubType;
import mage.filter.FilterCard;
import mage.filter.predicate.Predicates;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class EclipsedElf extends CardImpl {
private static final FilterCard filter = new FilterCard("Elf, Swamp, or Forest card");
static {
filter.add(Predicates.or(
SubType.ELF.getPredicate(),
SubType.SWAMP.getPredicate(),
SubType.FOREST.getPredicate()
));
}
public EclipsedElf(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{B/G}{B/G}{B/G}");
this.subtype.add(SubType.ELF);
this.subtype.add(SubType.SCOUT);
this.power = new MageInt(3);
this.toughness = new MageInt(2);
// When this creature enters, look at the top four cards of your library. You may reveal an Elf, Swamp, or Forest card from among them and put it into your hand. Put the rest on the bottom of your library in a random order.
this.addAbility(new EntersBattlefieldTriggeredAbility(new LookLibraryAndPickControllerEffect(
4, 1, filter, PutCards.HAND, PutCards.BOTTOM_RANDOM
)));
}
private EclipsedElf(final EclipsedElf card) {
super(card);
}
@Override
public EclipsedElf copy() {
return new EclipsedElf(this);
}
}

View file

@ -0,0 +1,53 @@
package mage.cards.e;
import mage.MageInt;
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
import mage.abilities.effects.common.LookLibraryAndPickControllerEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.PutCards;
import mage.constants.SubType;
import mage.filter.FilterCard;
import mage.filter.predicate.Predicates;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class EclipsedKithkin extends CardImpl {
private static final FilterCard filter = new FilterCard("Kithkin, Forest, or Plains card");
static {
filter.add(Predicates.or(
SubType.KITHKIN.getPredicate(),
SubType.FOREST.getPredicate(),
SubType.PLAINS.getPredicate()
));
}
public EclipsedKithkin(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{G/W}{G/W}");
this.subtype.add(SubType.KITHKIN);
this.subtype.add(SubType.SCOUT);
this.power = new MageInt(2);
this.toughness = new MageInt(1);
// When this creature enters, look at the top four cards of your library. You may reveal a Kithkin, Forest, or Plains card from among them and put it into your hand. Put the rest on the bottom of your library in a random order.
this.addAbility(new EntersBattlefieldTriggeredAbility(new LookLibraryAndPickControllerEffect(
4, 1, filter, PutCards.HAND, PutCards.BOTTOM_RANDOM
)));
}
private EclipsedKithkin(final EclipsedKithkin card) {
super(card);
}
@Override
public EclipsedKithkin copy() {
return new EclipsedKithkin(this);
}
}

View file

@ -0,0 +1,53 @@
package mage.cards.e;
import mage.MageInt;
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
import mage.abilities.effects.common.LookLibraryAndPickControllerEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.PutCards;
import mage.constants.SubType;
import mage.filter.FilterCard;
import mage.filter.predicate.Predicates;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class EclipsedMerrow extends CardImpl {
private static final FilterCard filter = new FilterCard("Merfolk, Plains, or Island card");
static {
filter.add(Predicates.or(
SubType.MERFOLK.getPredicate(),
SubType.PLAINS.getPredicate(),
SubType.ISLAND.getPredicate()
));
}
public EclipsedMerrow(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{W/U}{W/U}{W/U}");
this.subtype.add(SubType.MERFOLK);
this.subtype.add(SubType.SCOUT);
this.power = new MageInt(2);
this.toughness = new MageInt(3);
// When this creature enters, look at the top four cards of your library. You may reveal a Merfolk, Plains, or Island card from among them and put it into your hand. Put the rest on the bottom of your library in a random order.
this.addAbility(new EntersBattlefieldTriggeredAbility(new LookLibraryAndPickControllerEffect(
4, 1, filter, PutCards.HAND, PutCards.BOTTOM_RANDOM
)));
}
private EclipsedMerrow(final EclipsedMerrow card) {
super(card);
}
@Override
public EclipsedMerrow copy() {
return new EclipsedMerrow(this);
}
}

View file

@ -0,0 +1,43 @@
package mage.cards.e;
import java.util.UUID;
import mage.abilities.dynamicvalue.common.ColorsAmongControlledPermanentsCount;
import mage.abilities.dynamicvalue.common.CreaturesYouControlCount;
import mage.abilities.effects.common.CreateTokenEffect;
import mage.abilities.effects.common.GainLifeEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.AbilityWord;
import mage.constants.CardType;
import mage.game.permanent.token.OmnathElementalToken;
/**
*
* @author muz
*/
public final class ElementalSpectacle extends CardImpl {
public ElementalSpectacle(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{5}{G}");
// Vivid -- Create a number of 5/5 red and green Elemental creature tokens equal to the number of colors among permanents you control. Then you gain life equal to the number of creatures you control.
this.getSpellAbility().addEffect(new CreateTokenEffect(
new OmnathElementalToken(),
ColorsAmongControlledPermanentsCount.ALL_PERMANENTS
));
this.getSpellAbility().addEffect(new GainLifeEffect(CreaturesYouControlCount.PLURAL)
.setText(", then you gain life equal to the number of creatures you control"));
this.getSpellAbility().setAbilityWord(AbilityWord.VIVID);
this.getSpellAbility().addHint(ColorsAmongControlledPermanentsCount.ALL_PERMANENTS.getHint());
}
private ElementalSpectacle(final ElementalSpectacle card) {
super(card);
}
@Override
public ElementalSpectacle copy() {
return new ElementalSpectacle(this);
}
}

View file

@ -5,11 +5,11 @@ import mage.abilities.Ability;
import mage.abilities.common.CastSecondSpellTriggeredAbility;
import mage.abilities.effects.common.UntapTargetEffect;
import mage.abilities.effects.keyword.InvestigateEffect;
import mage.abilities.keyword.FriendsForeverAbility;
import mage.abilities.keyword.HasteAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.PartnerVariantType;
import mage.constants.SubType;
import mage.constants.SuperType;
import mage.target.common.TargetCreaturePermanent;
@ -39,7 +39,7 @@ public final class ElmarUlvenwaldInformant extends CardImpl {
this.addAbility(ability);
// Friends forever
this.addAbility(FriendsForeverAbility.getInstance());
this.addAbility(PartnerVariantType.FRIENDS_FOREVER.makeAbility());
}
private ElmarUlvenwaldInformant(final ElmarUlvenwaldInformant card) {

View file

@ -0,0 +1,53 @@
package mage.cards.e;
import mage.MageInt;
import mage.abilities.common.BecomesTappedSourceTriggeredAbility;
import mage.abilities.common.EntersBattlefieldAbility;
import mage.abilities.condition.Condition;
import mage.abilities.condition.common.SourceHasCounterCondition;
import mage.abilities.effects.common.counter.AddCountersSourceEffect;
import mage.abilities.effects.common.counter.RemoveCounterSourceEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.counters.CounterType;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class EncumberedReejerey extends CardImpl {
private static final Condition condition = new SourceHasCounterCondition(CounterType.M1M1);
public EncumberedReejerey(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{W}");
this.subtype.add(SubType.MERFOLK);
this.subtype.add(SubType.SOLDIER);
this.power = new MageInt(5);
this.toughness = new MageInt(4);
// This creature enters with three -1/-1 counters on it.
this.addAbility(new EntersBattlefieldAbility(
new AddCountersSourceEffect(CounterType.M1M1.createInstance(3)),
"with three -1/-1 counters on it"
));
// Whenever this creature becomes tapped while it has a -1/-1 counter on it, remove a -1/-1 counter from it.
this.addAbility(new BecomesTappedSourceTriggeredAbility(
new RemoveCounterSourceEffect(CounterType.M1M1.createInstance())
).withTriggerCondition(condition));
}
private EncumberedReejerey(final EncumberedReejerey card) {
super(card);
}
@Override
public EncumberedReejerey copy() {
return new EncumberedReejerey(this);
}
}

View file

@ -23,6 +23,7 @@ public final class EtheriumHornSorcerer extends CardImpl {
super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{4}{U}{R}");
this.subtype.add(SubType.MINOTAUR);
this.subtype.add(SubType.WIZARD);
this.subtype.add(SubType.SORCERER);
this.power = new MageInt(3);

View file

@ -0,0 +1,61 @@
package mage.cards.e;
import mage.abilities.Ability;
import mage.abilities.common.ActivateAsSorceryActivatedAbility;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.costs.common.BlightCost;
import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.effects.common.AttachEffect;
import mage.abilities.effects.common.ReturnSourceFromGraveyardToHandEffect;
import mage.abilities.effects.common.continuous.BoostEnchantedEffect;
import mage.abilities.effects.common.continuous.GainAbilityAttachedEffect;
import mage.abilities.keyword.EnchantAbility;
import mage.abilities.keyword.FlyingAbility;
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 EvershrikesGift extends CardImpl {
public EvershrikesGift(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{W}");
this.subtype.add(SubType.AURA);
// Enchant creature
TargetPermanent auraTarget = new TargetCreaturePermanent();
this.getSpellAbility().addTarget(auraTarget);
this.getSpellAbility().addEffect(new AttachEffect(Outcome.BoostCreature));
this.addAbility(new EnchantAbility(auraTarget));
// Enchanted creature gets +1/+0 and has flying.
Ability ability = new SimpleStaticAbility(new BoostEnchantedEffect(1, 0));
ability.addEffect(new GainAbilityAttachedEffect(
FlyingAbility.getInstance(), AttachmentType.AURA
).setText("and has flying"));
this.addAbility(ability);
// {1}{W}, Blight 2: Return this card from your graveyard to your hand. Activate only as a sorcery.
ability = new ActivateAsSorceryActivatedAbility(
Zone.GRAVEYARD, new ReturnSourceFromGraveyardToHandEffect(), new ManaCostsImpl<>("{1}{W}")
);
ability.addCost(new BlightCost(2));
this.addAbility(ability);
}
private EvershrikesGift(final EvershrikesGift card) {
super(card);
}
@Override
public EvershrikesGift copy() {
return new EvershrikesGift(this);
}
}

View file

@ -0,0 +1,34 @@
package mage.cards.f;
import mage.abilities.effects.common.DamageTargetEffect;
import mage.abilities.effects.common.ExileTargetIfDiesEffect;
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 FeedTheFlames extends CardImpl {
public FeedTheFlames(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{3}{R}");
// Feed the Flames deals 5 damage to target creature. If that creature would die this turn, exile it instead.
this.getSpellAbility().addEffect(new DamageTargetEffect(5));
this.getSpellAbility().addTarget(new TargetCreaturePermanent());
this.getSpellAbility().addEffect(new ExileTargetIfDiesEffect());
}
private FeedTheFlames(final FeedTheFlames card) {
super(card);
}
@Override
public FeedTheFlames copy() {
return new FeedTheFlames(this);
}
}

View file

@ -0,0 +1,48 @@
package mage.cards.f;
import mage.MageInt;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.condition.common.MyTurnCondition;
import mage.abilities.decorator.ConditionalContinuousEffect;
import mage.abilities.effects.common.continuous.GainAbilitySourceEffect;
import mage.abilities.keyword.ChangelingAbility;
import mage.abilities.keyword.FirstStrikeAbility;
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 FeistySpikeling extends CardImpl {
public FeistySpikeling(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{R/W}");
this.subtype.add(SubType.SHAPESHIFTER);
this.power = new MageInt(2);
this.toughness = new MageInt(1);
// Changeling
this.addAbility(new ChangelingAbility());
// During your turn, this creature has first strike.
this.addAbility(new SimpleStaticAbility(new ConditionalContinuousEffect(
new GainAbilitySourceEffect(FirstStrikeAbility.getInstance(), Duration.WhileOnBattlefield),
MyTurnCondition.instance, "during your turn, {this} has first strike"
)));
}
private FeistySpikeling(final FeistySpikeling card) {
super(card);
}
@Override
public FeistySpikeling copy() {
return new FeistySpikeling(this);
}
}

View file

@ -0,0 +1,52 @@
package mage.cards.f;
import java.util.UUID;
import mage.constants.SubType;
import mage.game.permanent.token.custom.CreatureToken;
import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.costs.mana.GenericManaCost;
import mage.abilities.effects.common.continuous.BecomesCreatureSourceEffect;
import mage.abilities.keyword.ChangelingAbility;
import mage.abilities.mana.AnyColorManaAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Duration;
/**
*
* @author muz
*/
public final class FirdochCore extends CardImpl {
public FirdochCore(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.KINDRED, CardType.ARTIFACT}, "{3}");
this.subtype.add(SubType.SHAPESHIFTER);
// Changeling
this.addAbility(new ChangelingAbility());
// {T}: Add one mana of any color.
this.addAbility(new AnyColorManaAbility());
// {4}: This artifact becomes a 4/4 artifact creature until end of turn.
this.addAbility(new SimpleActivatedAbility(
new BecomesCreatureSourceEffect(
new CreatureToken(4, 4).withType(CardType.ARTIFACT).withSubType(SubType.SHAPESHIFTER),
CardType.ARTIFACT,
Duration.EndOfTurn
).setText("this artifact becomes a 4/4 artifact creature until end of turn"),
new GenericManaCost(4)
));
}
private FirdochCore(final FirdochCore card) {
super(card);
}
@Override
public FirdochCore copy() {
return new FirdochCore(this);
}
}

View file

@ -0,0 +1,51 @@
package mage.cards.f;
import java.util.UUID;
import mage.MageInt;
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
import mage.abilities.common.SpellCastControllerTriggeredAbility;
import mage.abilities.costs.common.DiscardCardCost;
import mage.abilities.effects.common.DoIfCostPaid;
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
import mage.abilities.meta.OrTriggeredAbility;
import mage.constants.SubType;
import mage.constants.Zone;
import mage.filter.StaticFilters;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
/**
*
* @author muz
*/
public final class FlaringCinder extends CardImpl {
public FlaringCinder(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{U/R}{U/R}");
this.subtype.add(SubType.ELEMENTAL);
this.subtype.add(SubType.SORCERER);
this.power = new MageInt(3);
this.toughness = new MageInt(2);
// When this creature enters and whenever you cast a spell with mana value 4 or greater, you may discard a card. If you do, draw a card.
this.addAbility(new OrTriggeredAbility(
Zone.BATTLEFIELD,
new DoIfCostPaid(new DrawCardSourceControllerEffect(1), new DiscardCardCost()),
false,
"When this creature enters and whenever you cast a spell with mana value 4 or greater, ",
new EntersBattlefieldTriggeredAbility(null),
new SpellCastControllerTriggeredAbility(null, StaticFilters.FILTER_SPELL_MV_4_OR_GREATER, true)
));
}
private FlaringCinder(final FlaringCinder card) {
super(card);
}
@Override
public FlaringCinder copy() {
return new FlaringCinder(this);
}
}

View file

@ -16,7 +16,7 @@ import java.util.UUID;
public final class GanglyStompling extends CardImpl {
public GanglyStompling(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}");
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{R/G}");
this.subtype.add(SubType.SHAPESHIFTER);
this.power = new MageInt(4);

View file

@ -0,0 +1,112 @@
package mage.cards.g;
import java.util.UUID;
import mage.abilities.Ability;
import mage.abilities.common.AsEntersBattlefieldAbility;
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.effects.OneShotEffect;
import mage.abilities.effects.common.ChooseCreatureTypeEffect;
import mage.abilities.effects.common.cost.SpellsCostReductionAllOfChosenSubtypeEffect;
import mage.abilities.meta.OrTriggeredAbility;
import mage.abilities.triggers.BeginningOfUpkeepTriggeredAbility;
import mage.cards.Card;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.cards.CardsImpl;
import mage.constants.CardType;
import mage.constants.Outcome;
import mage.constants.SubType;
import mage.constants.Zone;
import mage.filter.common.FilterCreatureCard;
import mage.game.Game;
import mage.players.Player;
/**
*
* @author muz
*/
public final class GatheringStone extends CardImpl {
public GatheringStone(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{4}");
// As this artifact enters, choose a creature type.
this.addAbility(new AsEntersBattlefieldAbility(
new ChooseCreatureTypeEffect(Outcome.Benefit)
));
// Spells you cast of the chosen type cost {1} less to cast.
this.addAbility(new SimpleStaticAbility(
new SpellsCostReductionAllOfChosenSubtypeEffect(
new FilterCreatureCard("Creature spells you cast of the chosen type"), 1, true
)
));
// When this artifact enters and at the beginning of your upkeep, look at the top card of your library.
// If it's a card of the chosen type, you may reveal it and put it into your hand.
// If you don't put the card into your hand, you may put it into your graveyard.
this.addAbility(new OrTriggeredAbility(
Zone.BATTLEFIELD,
new GatheringStoneEffect(),
false,
"When this artifact enters and at the beginning of your upkeep, ",
new EntersBattlefieldTriggeredAbility(null),
new BeginningOfUpkeepTriggeredAbility(null)
));
}
private GatheringStone(final GatheringStone card) {
super(card);
}
@Override
public GatheringStone copy() {
return new GatheringStone(this);
}
}
class GatheringStoneEffect extends OneShotEffect {
GatheringStoneEffect() {
super(Outcome.Benefit);
staticText = "look at the top card of your library. " +
"If it's a card of the chosen type, you may reveal it and put it into your hand. " +
"If you don't put the card into your hand, you may put it into your graveyard";
}
private GatheringStoneEffect(final GatheringStoneEffect effect) {
super(effect);
}
@Override
public GatheringStoneEffect copy() {
return new GatheringStoneEffect(this);
}
@Override
public boolean apply(Game game, Ability source) {
Player controller = game.getPlayer(source.getControllerId());
if (controller == null) {
return false;
}
Card topCard = controller.getLibrary().getFromTop(game);
if (topCard == null) {
return false;
}
SubType subtype = ChooseCreatureTypeEffect.getChosenCreatureType(source.getSourceId(), game);
controller.lookAtCards("Top card of library", topCard, game);
if (topCard.hasSubtype(subtype, game)) {
if (controller.chooseUse(Outcome.DrawCard, "Reveal " + topCard.getName() + " and put it into your hand?", source, game)) {
controller.revealCards(source, new CardsImpl(topCard), game);
controller.moveCards(topCard, Zone.HAND, source, game);
return true;
}
}
if (controller.chooseUse(Outcome.Neutral, "Put " + topCard.getName() + " into your graveyard?", source, game)) {
controller.moveCards(topCard, Zone.GRAVEYARD, source, game);
}
return true;
}
}

View file

@ -33,6 +33,7 @@ public final class GempalmSorcerer extends CardImpl {
this.subtype.add(SubType.HUMAN);
this.subtype.add(SubType.WIZARD);
this.subtype.add(SubType.SORCERER);
this.power = new MageInt(2);
this.toughness = new MageInt(2);

View file

@ -0,0 +1,41 @@
package mage.cards.g;
import mage.abilities.Mode;
import mage.abilities.effects.common.DamageWithPowerFromOneToAnotherTargetEffect;
import mage.abilities.effects.common.DestroyTargetEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.target.common.TargetArtifactPermanent;
import mage.target.common.TargetControlledCreaturePermanent;
import mage.target.common.TargetOpponentsCreaturePermanent;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class Giantfall extends CardImpl {
public Giantfall(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{1}{R}");
// Choose one --
// * Target creature you control deals damage equal to its power to target creature an opponent controls.
this.getSpellAbility().addEffect(new DamageWithPowerFromOneToAnotherTargetEffect());
this.getSpellAbility().addTarget(new TargetControlledCreaturePermanent());
this.getSpellAbility().addTarget(new TargetOpponentsCreaturePermanent());
// * Destroy target artifact.
this.getSpellAbility().addMode(new Mode(new DestroyTargetEffect()).addTarget(new TargetArtifactPermanent()));
}
private Giantfall(final Giantfall card) {
super(card);
}
@Override
public Giantfall copy() {
return new Giantfall(this);
}
}

View file

@ -0,0 +1,66 @@
package mage.cards.g;
import java.util.UUID;
import mage.constants.SubType;
import mage.abilities.keyword.FlashAbility;
import mage.abilities.keyword.IndestructibleAbility;
import mage.abilities.keyword.TrampleAbility;
import mage.target.common.TargetCreaturePermanent;
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.constants.Outcome;
import mage.target.TargetPermanent;
import mage.abilities.keyword.EnchantAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.AttachmentType;
import mage.constants.CardType;
import mage.constants.Duration;
/**
*
* @author muz
*/
public final class GiltLeafsEmbrace extends CardImpl {
public GiltLeafsEmbrace(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{G}");
this.subtype.add(SubType.AURA);
// Flash
this.addAbility(FlashAbility.getInstance());
// Enchant creature
TargetPermanent auraTarget = new TargetCreaturePermanent();
this.getSpellAbility().addTarget(auraTarget);
this.getSpellAbility().addEffect(new AttachEffect(Outcome.BoostCreature));
this.addAbility(new EnchantAbility(auraTarget));
// When this Aura enters, enchanted creature gains trample and indestructible until end of turn.
EntersBattlefieldTriggeredAbility ability = new EntersBattlefieldTriggeredAbility(
new GainAbilityAttachedEffect(TrampleAbility.getInstance(), AttachmentType.AURA, Duration.EndOfTurn)
.setText("enchanted creature gains trample")
);
ability.addEffect(
new GainAbilityAttachedEffect(IndestructibleAbility.getInstance(), AttachmentType.AURA, Duration.EndOfTurn)
.setText("and indestructible until end of turn")
);
this.addAbility(ability);
// Enchanted creature gets +2/+0.
this.addAbility(new SimpleStaticAbility(new BoostEnchantedEffect(2, 0)));
}
private GiltLeafsEmbrace(final GiltLeafsEmbrace card) {
super(card);
}
@Override
public GiltLeafsEmbrace copy() {
return new GiltLeafsEmbrace(this);
}
}

View file

@ -0,0 +1,56 @@
package mage.cards.g;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.Mode;
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
import mage.abilities.effects.common.TapTargetEffect;
import mage.abilities.effects.common.UntapTargetEffect;
import mage.abilities.keyword.FlashAbility;
import mage.abilities.keyword.FlyingAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.target.common.TargetCreaturePermanent;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class Glamermite extends CardImpl {
public Glamermite(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{U}");
this.subtype.add(SubType.FAERIE);
this.subtype.add(SubType.ROGUE);
this.power = new MageInt(2);
this.toughness = new MageInt(2);
// Flash
this.addAbility(FlashAbility.getInstance());
// Flying
this.addAbility(FlyingAbility.getInstance());
// When this creature enters, choose one --
// * Tap target creature.
Ability ability = new EntersBattlefieldTriggeredAbility(new TapTargetEffect());
ability.addTarget(new TargetCreaturePermanent());
// * Untap target creature.
ability.addMode(new Mode(new UntapTargetEffect()).addTarget(new TargetCreaturePermanent()));
this.addAbility(ability);
}
private Glamermite(final Glamermite card) {
super(card);
}
@Override
public Glamermite copy() {
return new Glamermite(this);
}
}

View file

@ -14,7 +14,6 @@ import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.Zone;
import mage.filter.StaticFilters;
import mage.target.TargetSpell;

View file

@ -0,0 +1,65 @@
package mage.cards.g;
import java.util.UUID;
import mage.MageInt;
import mage.constants.SubType;
import mage.counters.CounterType;
import mage.filter.StaticFilters;
import mage.target.TargetSpell;
import mage.abilities.Ability;
import mage.abilities.common.EntersBattlefieldAbility;
import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.costs.common.RemoveCountersSourceCost;
import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.effects.common.CounterTargetEffect;
import mage.abilities.effects.common.DrawCardTargetControllerEffect;
import mage.abilities.effects.common.counter.AddCountersSourceEffect;
import mage.abilities.keyword.FlashAbility;
import mage.abilities.keyword.FlyingAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
/**
*
* @author muz
*/
public final class GlenElendraGuardian extends CardImpl {
public GlenElendraGuardian(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{U}");
this.subtype.add(SubType.FAERIE);
this.subtype.add(SubType.WIZARD);
this.power = new MageInt(3);
this.toughness = new MageInt(4);
// Flash
this.addAbility(FlashAbility.getInstance());
// Flying
this.addAbility(FlyingAbility.getInstance());
// This creature enters with a -1/-1 counter on it.
this.addAbility(new EntersBattlefieldAbility(
new AddCountersSourceEffect(CounterType.M1M1.createInstance(1)),
"with a -1/-1 counter on it"
));
// {1}{U}, Remove a counter from this creature: Counter target noncreature spell. Its controller draws a card.
Ability ability = new SimpleActivatedAbility(new CounterTargetEffect(), new ManaCostsImpl<>("{1}{U}"));
ability.addCost(new RemoveCountersSourceCost(1));
ability.addTarget(new TargetSpell(StaticFilters.FILTER_SPELL_NON_CREATURE));
ability.addEffect(new DrawCardTargetControllerEffect(1));
this.addAbility(ability);
}
private GlenElendraGuardian(final GlenElendraGuardian card) {
super(card);
}
@Override
public GlenElendraGuardian copy() {
return new GlenElendraGuardian(this);
}
}

View file

@ -0,0 +1,76 @@
package mage.cards.g;
import java.util.UUID;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
import mage.abilities.dynamicvalue.AdditiveDynamicValue;
import mage.abilities.dynamicvalue.DynamicValue;
import mage.abilities.dynamicvalue.common.CardsInControllerGraveyardCount;
import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount;
import mage.abilities.dynamicvalue.common.StaticValue;
import mage.abilities.dynamicvalue.common.SignInversionDynamicValue;
import mage.abilities.effects.common.continuous.BoostTargetEffect;
import mage.abilities.hint.Hint;
import mage.abilities.hint.ValueHint;
import mage.constants.SubType;
import mage.constants.TargetController;
import mage.filter.FilterCard;
import mage.filter.FilterPermanent;
import mage.filter.common.FilterControlledPermanent;
import mage.target.common.TargetControlledCreaturePermanent;
import mage.target.common.TargetOpponentsCreaturePermanent;
import mage.target.targetpointer.SecondTargetPointer;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
/**
*
* @author muz
*/
public final class GloomRipper extends CardImpl {
private static final FilterPermanent creatureFilter = new FilterControlledPermanent(SubType.ELF, "Elves you control");
private static final FilterCard cardFilter = new FilterCard(SubType.ELF, "Elf cards");
private static final DynamicValue xValuePos = new AdditiveDynamicValue(
new PermanentsOnBattlefieldCount(creatureFilter),
new CardsInControllerGraveyardCount(cardFilter)
);
private static final DynamicValue xValueNeg = new SignInversionDynamicValue(xValuePos);
private static final Hint hint = new ValueHint("Elves you control plus the number of Elf cards in your graveyard", xValuePos);
public GloomRipper(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{B}{B}");
this.subtype.add(SubType.ELF);
this.subtype.add(SubType.ASSASSIN);
this.power = new MageInt(4);
this.toughness = new MageInt(4);
// When this creature enters, target creature you control gets +X/+0 until end of turn and up to one target creature an opponent controls gets -0/-X until end of turn, where X is the number of Elves you control plus the number of Elf cards in your graveyard.
Ability ability = new EntersBattlefieldTriggeredAbility(
new BoostTargetEffect(xValuePos, StaticValue.get(0))
.setText("until end of turn, target creature you control gets +X/+0")
);
ability.addTarget(new TargetControlledCreaturePermanent());
ability.addEffect(
new BoostTargetEffect(StaticValue.get(0), xValueNeg)
.setText("and up to one target creature an opponent controls gets -0/-X, where X is the number of Elves you control plus the number of Elf cards in your graveyard")
.setTargetPointer(new SecondTargetPointer())
);
ability.addTarget(new TargetOpponentsCreaturePermanent(0, 1));
this.addAbility(ability.addHint(hint));
}
private GloomRipper(final GloomRipper card) {
super(card);
}
@Override
public GloomRipper copy() {
return new GloomRipper(this);
}
}

View file

@ -0,0 +1,63 @@
package mage.cards.g;
import java.util.UUID;
import mage.abilities.Ability;
import mage.abilities.common.DiesCreatureTriggeredAbility;
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
import mage.abilities.condition.common.MonarchIsSourceControllerCondition;
import mage.abilities.effects.common.BecomesMonarchSourceEffect;
import mage.abilities.effects.common.GainLifeEffect;
import mage.abilities.effects.common.LoseLifeOpponentsEffect;
import mage.abilities.effects.common.ReturnFromGraveyardToHandTargetEffect;
import mage.abilities.hint.common.MonarchHint;
import mage.abilities.triggers.BeginningOfEndStepTriggeredAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.TargetController;
import mage.filter.StaticFilters;
import mage.target.common.TargetCardInYourGraveyard;
/**
*
* @author muz
*/
public final class GraveVenerations extends CardImpl {
public GraveVenerations(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{3}{B}");
// When this enchantment enters, you become the monarch.
this.addAbility(new EntersBattlefieldTriggeredAbility(new BecomesMonarchSourceEffect()).addHint(MonarchHint.instance));
// At the beginning of your end step, if you're the monarch, return up to one target creature card from your graveyard to your hand.
Ability monarchAbility = new BeginningOfEndStepTriggeredAbility(
TargetController.YOU,
new ReturnFromGraveyardToHandTargetEffect(),
false,
MonarchIsSourceControllerCondition.instance
);
monarchAbility.addTarget(new TargetCardInYourGraveyard(
0, 1, StaticFilters.FILTER_CARD_CREATURE_YOUR_GRAVEYARD
));
this.addAbility(monarchAbility);
// Whenever a creature you control dies, each opponent loses 1 life and you gain 1 life.
Ability diesAbility = new DiesCreatureTriggeredAbility(
new LoseLifeOpponentsEffect(1), false,
StaticFilters.FILTER_CONTROLLED_A_CREATURE
);
diesAbility.addEffect(new GainLifeEffect(1).concatBy("and"));
this.addAbility(diesAbility);
}
private GraveVenerations(final GraveVenerations card) {
super(card);
}
@Override
public GraveVenerations copy() {
return new GraveVenerations(this);
}
}

View file

@ -31,6 +31,7 @@ public final class GreensleevesMaroSorcerer extends CardImpl {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{G}{G}");
this.supertype.add(SuperType.LEGENDARY);
this.subtype.add(SubType.ELEMENTAL);
this.subtype.add(SubType.SORCERER);
this.power = new MageInt(0);
this.toughness = new MageInt(0);

View file

@ -7,12 +7,12 @@ import mage.Mana;
import mage.abilities.Ability;
import mage.abilities.condition.Condition;
import mage.abilities.costs.common.TapSourceCost;
import mage.abilities.keyword.FriendsForeverAbility;
import mage.abilities.mana.ConditionalColorlessManaAbility;
import mage.abilities.mana.builder.ConditionalManaBuilder;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.PartnerVariantType;
import mage.constants.SubType;
import mage.constants.SuperType;
import mage.game.Game;
@ -38,7 +38,7 @@ public final class HargildeKindlyRunechanter extends CardImpl {
));
// Friends forever
this.addAbility(FriendsForeverAbility.getInstance());
this.addAbility(PartnerVariantType.FRIENDS_FOREVER.makeAbility());
}
private HargildeKindlyRunechanter(final HargildeKindlyRunechanter card) {

View file

@ -15,6 +15,8 @@ import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.counters.CounterType;
import mage.filter.StaticFilters;
import mage.target.TargetPermanent;
import java.util.UUID;
@ -24,7 +26,7 @@ import java.util.UUID;
public final class HovelHurler extends CardImpl {
public HovelHurler(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}");
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{R/W}{R/W}");
this.subtype.add(SubType.GIANT);
this.subtype.add(SubType.WARRIOR);
@ -46,6 +48,7 @@ public final class HovelHurler extends CardImpl {
ability.addCost(new RemoveCountersSourceCost(1));
ability.addEffect(new GainAbilityTargetEffect(FlyingAbility.getInstance())
.setText("and gains flying until end of turn"));
ability.addTarget(new TargetPermanent(StaticFilters.FILTER_ANOTHER_TARGET_CREATURE_YOU_CONTROL));
this.addAbility(ability);
}

View file

@ -0,0 +1,65 @@
package mage.cards.i;
import java.util.UUID;
import mage.MageInt;
import mage.constants.SubType;
import mage.filter.common.FilterControlledPermanent;
import mage.abilities.common.CastAsThoughItHadFlashIfConditionAbility;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.condition.Condition;
import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition;
import mage.abilities.condition.common.SourceTappedCondition;
import mage.abilities.decorator.ConditionalContinuousEffect;
import mage.abilities.effects.common.continuous.GainAbilitySourceEffect;
import mage.abilities.keyword.FlyingAbility;
import mage.abilities.keyword.HexproofAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Duration;
/**
*
* @author muz
*/
public final class IllusionSpinners extends CardImpl {
private static final Condition condition = new PermanentsOnTheBattlefieldCondition(
new FilterControlledPermanent(SubType.FAERIE, "you control a Faerie")
);
public IllusionSpinners(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{U}");
this.subtype.add(SubType.FAERIE);
this.subtype.add(SubType.WIZARD);
this.power = new MageInt(4);
this.toughness = new MageInt(3);
// You may cast this spell as though it had flash if you control a Faerie.
this.addAbility(new CastAsThoughItHadFlashIfConditionAbility(
condition, "you may cast this spell as though it had flash if you control a Faerie"
));
// Flying
this.addAbility(FlyingAbility.getInstance());
// This creature has hexproof as long as it's untapped.
this.addAbility(new SimpleStaticAbility(new ConditionalContinuousEffect(
new GainAbilitySourceEffect(
HexproofAbility.getInstance(),
Duration.WhileOnBattlefield
), SourceTappedCondition.UNTAPPED,
"{this} has hexproof as long as it's untapped"
)));
}
private IllusionSpinners(final IllusionSpinners card) {
super(card);
}
@Override
public IllusionSpinners copy() {
return new IllusionSpinners(this);
}
}

View file

@ -30,6 +30,7 @@ public final class JohannApprenticeSorcerer extends CardImpl {
this.supertype.add(SuperType.LEGENDARY);
this.subtype.add(SubType.HUMAN);
this.subtype.add(SubType.WIZARD);
this.subtype.add(SubType.SORCERER);
this.power = new MageInt(2);
this.toughness = new MageInt(5);

View file

@ -45,6 +45,7 @@ public final class KadenaSlinkingSorcerer extends CardImpl {
this.supertype.add(SuperType.LEGENDARY);
this.subtype.add(SubType.SNAKE);
this.subtype.add(SubType.WIZARD);
this.subtype.add(SubType.SORCERER);
this.power = new MageInt(3);
this.toughness = new MageInt(3);

View file

@ -0,0 +1,48 @@
package mage.cards.k;
import mage.abilities.Mode;
import mage.abilities.effects.common.DamageTargetEffect;
import mage.abilities.effects.common.DestroyTargetEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.filter.FilterPermanent;
import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.permanent.TappedPredicate;
import mage.target.TargetPermanent;
import mage.target.common.TargetEnchantmentPermanent;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class KeepOut extends CardImpl {
private static final FilterPermanent filter = new FilterCreaturePermanent("tapped creature");
static {
filter.add(TappedPredicate.TAPPED);
}
public KeepOut(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{1}{W}");
// Choose one --
// * Keep Out deals 4 damage to target tapped creature.
this.getSpellAbility().addEffect(new DamageTargetEffect(4));
this.getSpellAbility().addTarget(new TargetPermanent(filter));
// * Destroy target enchantment.
this.getSpellAbility().addMode(new Mode(new DestroyTargetEffect()).addTarget(new TargetEnchantmentPermanent()));
}
private KeepOut(final KeepOut card) {
super(card);
}
@Override
public KeepOut copy() {
return new KeepOut(this);
}
}

View file

@ -0,0 +1,88 @@
package mage.cards.k;
import mage.MageInt;
import mage.abilities.common.AttacksTriggeredAbility;
import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount;
import mage.abilities.effects.common.PutCardFromHandOntoBattlefieldEffect;
import mage.abilities.hint.Hint;
import mage.abilities.hint.ValueHint;
import mage.abilities.keyword.FirstStrikeAbility;
import mage.abilities.keyword.LifelinkAbility;
import mage.cards.Card;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.filter.FilterCard;
import mage.filter.FilterPermanent;
import mage.filter.common.FilterControlledCreaturePermanent;
import mage.filter.predicate.ObjectSourcePlayer;
import mage.filter.predicate.ObjectSourcePlayerPredicate;
import mage.filter.predicate.permanent.AttackingPredicate;
import mage.game.Game;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class KinscaerSentry extends CardImpl {
private static final FilterCard filter = new FilterCard(
"creature card with mana value less than or equal to the number of attacking creatures you control"
);
static {
filter.add(KinscaerSentryPredicate.instance);
}
public KinscaerSentry(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{W}");
this.subtype.add(SubType.KITHKIN);
this.subtype.add(SubType.SOLDIER);
this.power = new MageInt(2);
this.toughness = new MageInt(2);
// First strike
this.addAbility(FirstStrikeAbility.getInstance());
// Lifelink
this.addAbility(LifelinkAbility.getInstance());
// Whenever this creature attacks, you may put a creature card with mana value X or less from your hand onto the battlefield tapped and attacking, where X is the number of attacking creatures you control.
this.addAbility(new AttacksTriggeredAbility(new PutCardFromHandOntoBattlefieldEffect(
filter, false, true, true
).setText("you may put a creature card with mana value X or less from your hand onto the battlefield " +
"tapped and attacking, where X is the number of attacking creatures you control")).addHint(KinscaerSentryPredicate.getHint()));
}
private KinscaerSentry(final KinscaerSentry card) {
super(card);
}
@Override
public KinscaerSentry copy() {
return new KinscaerSentry(this);
}
}
enum KinscaerSentryPredicate implements ObjectSourcePlayerPredicate<Card> {
instance;
private static final FilterPermanent filter = new FilterControlledCreaturePermanent();
static {
filter.add(AttackingPredicate.instance);
}
private static final Hint hint = new ValueHint("Attacking creatures you control", new PermanentsOnBattlefieldCount(filter));
public static Hint getHint() {
return hint;
}
@Override
public boolean apply(ObjectSourcePlayer<Card> input, Game game) {
return input.getObject().getManaValue() <= game.getBattlefield().count(filter, input.getPlayerId(), input.getSource(), game);
}
}

View file

@ -37,6 +37,7 @@ public final class KrovikanSorcerer extends CardImpl {
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}");
this.subtype.add(SubType.HUMAN);
this.subtype.add(SubType.WIZARD);
this.subtype.add(SubType.SORCERER);
this.power = new MageInt(1);
this.toughness = new MageInt(1);

View file

@ -0,0 +1,86 @@
package mage.cards.l;
import mage.abilities.Ability;
import mage.abilities.effects.Effect;
import mage.abilities.effects.OneShotEffect;
import mage.abilities.effects.RedirectionEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Outcome;
import mage.game.Game;
import mage.game.permanent.Permanent;
import mage.players.Player;
import mage.target.common.TargetAnyTarget;
import mage.util.CardUtil;
import java.util.List;
import java.util.UUID;
import java.util.stream.Collectors;
/**
*
* @author notgreat
*/
public final class LavaBurst extends CardImpl {
public LavaBurst(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{X}{R}");
// Lava Burst deals X damage to any target. If Lava Burst would deal damage to a creature, that damage can't be prevented or dealt instead to another creature or player.
this.getSpellAbility().addEffect(new LavaBurstEffect());
this.getSpellAbility().addTarget(new TargetAnyTarget());
}
private LavaBurst(final LavaBurst card) {
super(card);
}
@Override
public LavaBurst copy() {
return new LavaBurst(this);
}
}
class LavaBurstEffect extends OneShotEffect {
LavaBurstEffect() {
super(Outcome.Damage);
staticText = "{this} deals X damage to any target. If {this} would deal damage to a creature, that damage can't be prevented or dealt instead to another permanent or player.";
}
private LavaBurstEffect(final LavaBurstEffect effect) {
super(effect);
}
@Override
public LavaBurstEffect copy() {
return new LavaBurstEffect(this);
}
@Override
public boolean apply(Game game, Ability source) {
Player targetPlayer = game.getPlayer(source.getFirstTarget());
int damage = CardUtil.getSourceCostsTag(game, source, "X", 0);
if (targetPlayer != null) {
targetPlayer.damage(damage, source.getSourceId(), source, game, false, true);
return true;
}
Permanent targetPermanent = game.getPermanent(source.getFirstTarget());
if (targetPermanent != null) {
if (targetPermanent.isCreature(game)) {
// hack to avoid needing to create a DAMAGE_REDIRECTION event
// Pretend that all possible redirection effects have already been applied
List<UUID> redirectionEffects = game.getState().getContinuousEffects().getReplacementEffects().stream()
.filter(x -> x instanceof RedirectionEffect).map(Effect::getId).collect(Collectors.toList());
targetPermanent.damage(damage, source.getSourceId(), source, game, false, false, redirectionEffects);
} else {
targetPermanent.damage(damage, source.getSourceId(), source, game, false, true);
}
return true;
}
return false;
}
}

View file

@ -0,0 +1,62 @@
package mage.cards.l;
import mage.MageInt;
import mage.Mana;
import mage.abilities.condition.Condition;
import mage.abilities.condition.common.CardsInControllerGraveyardCondition;
import mage.abilities.costs.OrCost;
import mage.abilities.costs.common.BeholdCost;
import mage.abilities.costs.common.TapSourceCost;
import mage.abilities.costs.mana.GenericManaCost;
import mage.abilities.effects.mana.BasicManaEffect;
import mage.abilities.hint.ConditionHint;
import mage.abilities.hint.Hint;
import mage.abilities.mana.ActivateIfConditionManaAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.BeholdType;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.Zone;
import mage.filter.FilterCard;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class LysAlanaDignitary extends CardImpl {
private static final Condition condition
= new CardsInControllerGraveyardCondition(1, new FilterCard(SubType.ELF));
private static final Hint hint = new ConditionHint(condition, "There is an Elf card in your graveyard");
public LysAlanaDignitary(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{G}");
this.subtype.add(SubType.ELF);
this.subtype.add(SubType.ADVISOR);
this.power = new MageInt(2);
this.toughness = new MageInt(3);
// As an additional cost to cast this spell, behold an Elf or pay {2}.
this.getSpellAbility().addCost(new OrCost(
"behold an Elf or pay {2}",
new BeholdCost(BeholdType.ELF), new GenericManaCost(2)
));
// {T}: Add {G}{G}. Activate only if there is an Elf card in your graveyard.
this.addAbility(new ActivateIfConditionManaAbility(
Zone.BATTLEFIELD, new BasicManaEffect(Mana.GreenMana(2)), new TapSourceCost(), condition
).addHint(hint));
}
private LysAlanaDignitary(final LysAlanaDignitary card) {
super(card);
}
@Override
public LysAlanaDignitary copy() {
return new LysAlanaDignitary(this);
}
}

View file

@ -0,0 +1,68 @@
package mage.cards.m;
import java.util.UUID;
import mage.MageInt;
import mage.constants.SubType;
import mage.constants.SuperType;
import mage.filter.FilterPermanent;
import mage.filter.common.FilterControlledPermanent;
import mage.filter.predicate.mageobject.AnotherPredicate;
import mage.target.TargetPermanent;
import mage.abilities.Ability;
import mage.abilities.effects.common.continuous.GainAbilityTargetEffect;
import mage.abilities.keyword.FirstStrikeAbility;
import mage.abilities.keyword.MyriadAbility;
import mage.abilities.keyword.VigilanceAbility;
import mage.abilities.triggers.BeginningOfCombatTriggeredAbility;
import mage.abilities.keyword.TrampleAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
/**
*
* @author muz
*/
public final class MassOfMysteries extends CardImpl {
private static final FilterPermanent filter
= new FilterControlledPermanent(SubType.ELEMENTAL, "another target Elemental you control");
static {
filter.add(AnotherPredicate.instance);
}
public MassOfMysteries(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{W}{U}{B}{R}{G}");
this.supertype.add(SuperType.LEGENDARY);
this.subtype.add(SubType.ELEMENTAL);
this.power = new MageInt(5);
this.toughness = new MageInt(5);
// First strike
this.addAbility(FirstStrikeAbility.getInstance());
// Vigilance
this.addAbility(VigilanceAbility.getInstance());
// Trample
this.addAbility(TrampleAbility.getInstance());
// At the beginning of combat on your turn, another target Elemental you control gains Myriad until end of turn.
Ability ability = new BeginningOfCombatTriggeredAbility(
new GainAbilityTargetEffect(new MyriadAbility())
);
ability.addTarget(new TargetPermanent(filter));
this.addAbility(ability);
}
private MassOfMysteries(final MassOfMysteries card) {
super(card);
}
@Override
public MassOfMysteries copy() {
return new MassOfMysteries(this);
}
}

View file

@ -33,6 +33,7 @@ public final class MathiseSurgeChanneler extends CardImpl {
this.subtype.add(SubType.HUMAN);
this.subtype.add(SubType.ELF);
this.subtype.add(SubType.SHAMAN);
this.subtype.add(SubType.SORCERER);
this.power = new MageInt(1);
this.toughness = new MageInt(1);

View file

@ -1,24 +1,15 @@
package mage.cards.m;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.effects.OneShotEffect;
import mage.abilities.effects.common.PutCardFromHandOntoBattlefieldEffect;
import mage.abilities.keyword.MenaceAbility;
import mage.abilities.keyword.PackTacticsAbility;
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.constants.Zone;
import mage.filter.FilterCard;
import mage.filter.common.FilterCreatureCard;
import mage.game.Game;
import mage.game.permanent.Permanent;
import mage.players.Player;
import mage.target.common.TargetCardInHand;
import mage.util.CardUtil;
import java.util.UUID;
@ -27,6 +18,12 @@ import java.util.UUID;
*/
public final class MinionOfTheMighty extends CardImpl {
private static final FilterCard filter = new FilterCreatureCard("a Dragon creature card");
static {
filter.add(SubType.DRAGON.getPredicate());
}
public MinionOfTheMighty(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{R}");
@ -38,7 +35,9 @@ public final class MinionOfTheMighty extends CardImpl {
this.addAbility(new MenaceAbility(false));
// Pack tactics Whenever Minion of the Mighty attacks, if you attacked with creatures wih total power 6 or greater this combat, you may put a Dragon creature card from your hand onto the battlefield tapped and attacking.
this.addAbility(new PackTacticsAbility(new MinionOfTheMightyEffect()));
this.addAbility(new PackTacticsAbility(new PutCardFromHandOntoBattlefieldEffect(
filter, false, true, true
)));
}
private MinionOfTheMighty(final MinionOfTheMighty card) {
@ -50,49 +49,3 @@ public final class MinionOfTheMighty extends CardImpl {
return new MinionOfTheMighty(this);
}
}
class MinionOfTheMightyEffect extends OneShotEffect {
private static final FilterCard filter = new FilterCreatureCard("a Dragon creature card");
static {
filter.add(SubType.DRAGON.getPredicate());
}
MinionOfTheMightyEffect() {
super(Outcome.Benefit);
staticText = "you may put a Dragon creature card from your hand onto the battlefield tapped and attacking";
}
private MinionOfTheMightyEffect(final MinionOfTheMightyEffect effect) {
super(effect);
}
@Override
public MinionOfTheMightyEffect copy() {
return new MinionOfTheMightyEffect(this);
}
@Override
public boolean apply(Game game, Ability source) {
Player controller = game.getPlayer(source.getControllerId());
TargetCardInHand target = new TargetCardInHand(filter);
if (controller == null) {
return false;
}
target.choose(outcome, controller.getId(), source.getSourceId(), source, game);
Card card = controller.getHand().get(target.getFirstTarget(), game);
if (card == null) {
return false;
}
controller.moveCards(
card, Zone.BATTLEFIELD, source, game, true,
false, true, null
);
Permanent permanent = CardUtil.getPermanentFromCardPutToBattlefield(card, game);
if (permanent != null) {
game.getCombat().addAttackingCreature(permanent.getId(), game);
}
return true;
}
}

View file

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

View file

@ -0,0 +1,58 @@
package mage.cards.m;
import java.util.UUID;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.condition.Condition;
import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition;
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
import mage.abilities.effects.common.cost.SpellCostReductionSourceEffect;
import mage.abilities.hint.ConditionHint;
import mage.abilities.hint.Hint;
import mage.constants.SubType;
import mage.constants.Zone;
import mage.filter.common.FilterControlledPermanent;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
/**
*
* @author muz
*/
public final class MistmeadowCouncil extends CardImpl {
private static final Condition condition = new PermanentsOnTheBattlefieldCondition(
new FilterControlledPermanent(SubType.KITHKIN, "you control a Kithkin")
);
private static final Hint hint = new ConditionHint(condition, "You control a Kithkin");
public MistmeadowCouncil(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{G}");
this.subtype.add(SubType.KITHKIN);
this.subtype.add(SubType.ADVISOR);
this.power = new MageInt(4);
this.toughness = new MageInt(3);
// This spell costs {1} less to cast if you control a Kithkin.
Ability ability = new SimpleStaticAbility(Zone.ALL, new SpellCostReductionSourceEffect(1, condition));
ability.setRuleAtTheTop(true);
ability.addHint(hint);
this.addAbility(ability);
// When this creature enters, draw a card.
this.addAbility(new EntersBattlefieldTriggeredAbility(new DrawCardSourceControllerEffect(1)));
}
private MistmeadowCouncil(final MistmeadowCouncil card) {
super(card);
}
@Override
public MistmeadowCouncil copy() {
return new MistmeadowCouncil(this);
}
}

View file

@ -28,6 +28,7 @@ public final class MolimoMaroSorcerer extends CardImpl {
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{G}{G}{G}");
this.supertype.add(SuperType.LEGENDARY);
this.subtype.add(SubType.ELEMENTAL);
this.subtype.add(SubType.SORCERER);
this.power = new MageInt(0);
this.toughness = new MageInt(0);

View file

@ -0,0 +1,57 @@
package mage.cards.m;
import mage.MageInt;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.dynamicvalue.AdditiveDynamicValue;
import mage.abilities.dynamicvalue.DynamicValue;
import mage.abilities.dynamicvalue.common.CardsInControllerGraveyardCount;
import mage.abilities.dynamicvalue.common.CreaturesYouControlCount;
import mage.abilities.effects.common.continuous.BoostSourceEffect;
import mage.abilities.hint.Hint;
import mage.abilities.hint.ValueHint;
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 TheElk801
*/
public final class MoonVigilAdherents extends CardImpl {
private static final DynamicValue xValue = new AdditiveDynamicValue(
CreaturesYouControlCount.SINGULAR, new CardsInControllerGraveyardCount(StaticFilters.FILTER_CARD_CREATURE)
);
private static final Hint hint = new ValueHint(
"Creatures you control and creature cards in your graveyard", xValue
);
public MoonVigilAdherents(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{G}{G}");
this.subtype.add(SubType.ELF);
this.subtype.add(SubType.DRUID);
this.power = new MageInt(0);
this.toughness = new MageInt(0);
// Trample
this.addAbility(TrampleAbility.getInstance());
// This creature gets +1/+1 for each creature you control and each creature card in your graveyard.
this.addAbility(new SimpleStaticAbility(new BoostSourceEffect(xValue, xValue, Duration.WhileOnBattlefield)).addHint(hint));
}
private MoonVigilAdherents(final MoonVigilAdherents card) {
super(card);
}
@Override
public MoonVigilAdherents copy() {
return new MoonVigilAdherents(this);
}
}

View file

@ -0,0 +1,54 @@
package mage.cards.m;
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.DrawCardSourceControllerEffect;
import mage.abilities.effects.common.counter.AddCountersSourceEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.counters.CounterType;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class MoonlitLamenter extends CardImpl {
public MoonlitLamenter(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{W}");
this.subtype.add(SubType.TREEFOLK);
this.subtype.add(SubType.CLERIC);
this.power = new MageInt(2);
this.toughness = new MageInt(5);
// This creature enters with a -1/-1 counter on it.
this.addAbility(new EntersBattlefieldAbility(
new AddCountersSourceEffect(CounterType.M1M1.createInstance(1)),
"with a -1/-1 counter on it"
));
// {1}{W}, Remove a counter from this creature: Draw a card. Activate only as a sorcery.
Ability ability = new ActivateAsSorceryActivatedAbility(
new DrawCardSourceControllerEffect(1), new ManaCostsImpl<>("{1}{W}")
);
ability.addCost(new RemoveCountersSourceCost(1));
this.addAbility(ability);
}
private MoonlitLamenter(final MoonlitLamenter card) {
super(card);
}
@Override
public MoonlitLamenter copy() {
return new MoonlitLamenter(this);
}
}

View file

@ -0,0 +1,55 @@
package mage.cards.m;
import mage.abilities.Ability;
import mage.abilities.common.ActivateAsSorceryActivatedAbility;
import mage.abilities.costs.common.SacrificeSourceCost;
import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.dynamicvalue.DynamicValue;
import mage.abilities.dynamicvalue.common.CardsInControllerGraveyardCount;
import mage.abilities.effects.common.CreateTokenEffect;
import mage.abilities.effects.keyword.SurveilEffect;
import mage.abilities.hint.Hint;
import mage.abilities.hint.ValueHint;
import mage.abilities.triggers.BeginningOfUpkeepTriggeredAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.filter.FilterCard;
import mage.game.permanent.token.BlackGreenElfToken;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class MorcantsEyes extends CardImpl {
private static final DynamicValue xValue = new CardsInControllerGraveyardCount(new FilterCard(SubType.ELF), null);
private static final Hint hint = new ValueHint("Elf cards in your graveyard", xValue);
public MorcantsEyes(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.KINDRED, CardType.ENCHANTMENT}, "{1}{G}");
this.subtype.add(SubType.ELF);
// At the beginning of your upkeep, surveil 1.
this.addAbility(new BeginningOfUpkeepTriggeredAbility(new SurveilEffect(1)));
// {4}{G}{G}, Sacrifice this enchantment: Create X 2/2 black and green Elf creature tokens, where X is the number of Elf cards in your graveyard. Activate only as a sorcery.
Ability ability = new ActivateAsSorceryActivatedAbility(
new CreateTokenEffect(new BlackGreenElfToken(), xValue), new ManaCostsImpl<>("{4}{G}{G}")
);
ability.addCost(new SacrificeSourceCost());
this.addAbility(ability.addHint(hint));
}
private MorcantsEyes(final MorcantsEyes card) {
super(card);
}
@Override
public MorcantsEyes copy() {
return new MorcantsEyes(this);
}
}

View file

@ -0,0 +1,60 @@
package mage.cards.m;
import java.util.UUID;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.DiesSourceTriggeredAbility;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.effects.common.ReturnFromGraveyardToHandTargetEffect;
import mage.abilities.effects.common.continuous.BoostControlledEffect;
import mage.constants.SubType;
import mage.filter.FilterCard;
import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.mageobject.AnotherPredicate;
import mage.target.common.TargetCardInYourGraveyard;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Duration;
/**
*
* @author muz
*/
public final class MorcantsLoyalist extends CardImpl {
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent(SubType.ELF, "Elves");
private static final FilterCard filter2 = new FilterCard(SubType.ELF, "another target Elf card from your graveyard");
static {
filter2.add(AnotherPredicate.instance);
}
public MorcantsLoyalist(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{B}{G}");
this.subtype.add(SubType.ELF);
this.subtype.add(SubType.WARRIOR);
this.power = new MageInt(3);
this.toughness = new MageInt(2);
// Other Elves you control get +1/+1.
this.addAbility(new SimpleStaticAbility(new BoostControlledEffect(
1, 1, Duration.WhileOnBattlefield, filter, true
)));
// When this creature dies, return another target Elf card from your graveyard to your hand.
Ability ability = new DiesSourceTriggeredAbility(new ReturnFromGraveyardToHandTargetEffect());
ability.addTarget(new TargetCardInYourGraveyard(filter2));
this.addAbility(ability);
}
private MorcantsLoyalist(final MorcantsLoyalist card) {
super(card);
}
@Override
public MorcantsLoyalist copy() {
return new MorcantsLoyalist(this);
}
}

View file

@ -24,6 +24,7 @@ public final class MultaniMaroSorcerer extends CardImpl {
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{G}{G}");
this.supertype.add(SuperType.LEGENDARY);
this.subtype.add(SubType.ELEMENTAL);
this.subtype.add(SubType.SORCERER);
this.power = new MageInt(0);
this.toughness = new MageInt(0);

View file

@ -0,0 +1,54 @@
package mage.cards.n;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.SpellCastControllerTriggeredAbility;
import mage.abilities.condition.common.OpponentsTurnCondition;
import mage.abilities.effects.common.counter.AddCountersTargetEffect;
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.SubType;
import mage.counters.CounterType;
import mage.target.common.TargetCreaturePermanent;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class NightmareSower extends CardImpl {
public NightmareSower(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{B}");
this.subtype.add(SubType.FAERIE);
this.subtype.add(SubType.ASSASSIN);
this.power = new MageInt(2);
this.toughness = new MageInt(3);
// Flying
this.addAbility(FlyingAbility.getInstance());
// Lifelink
this.addAbility(LifelinkAbility.getInstance());
// Whenever you cast a spell during an opponent's turn, put a -1/-1 counter on up to one target creature.
Ability ability = new SpellCastControllerTriggeredAbility(
new AddCountersTargetEffect(CounterType.M1M1.createInstance()), false
).withTriggerCondition(OpponentsTurnCondition.instance);
ability.addTarget(new TargetCreaturePermanent(0, 1));
this.addAbility(ability);
}
private NightmareSower(final NightmareSower card) {
super(card);
}
@Override
public NightmareSower copy() {
return new NightmareSower(this);
}
}

View file

@ -0,0 +1,55 @@
package mage.cards.n;
import java.util.UUID;
import mage.constants.SubType;
import mage.game.permanent.token.custom.CreatureToken;
import mage.abilities.keyword.FlashAbility;
import mage.target.common.TargetCreaturePermanent;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.effects.common.AttachEffect;
import mage.abilities.effects.common.continuous.BecomesCreatureAttachedEffect;
import mage.constants.Outcome;
import mage.target.TargetPermanent;
import mage.abilities.keyword.EnchantAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Duration;
/**
*
* @author muz
*/
public final class NoggleTheMind extends CardImpl {
public NoggleTheMind(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
TargetPermanent auraTarget = new TargetCreaturePermanent();
this.getSpellAbility().addTarget(auraTarget);
this.getSpellAbility().addEffect(new AttachEffect(Outcome.BoostCreature));
this.addAbility(new EnchantAbility(auraTarget));
// Enchanted creature loses all abilities and is a colorless Noggle with base power and toughness 1/1.
this.addAbility(new SimpleStaticAbility(new BecomesCreatureAttachedEffect(
new CreatureToken(1, 1, "", SubType.NOGGLE),
"Enchanted creature loses all abilities and is a colorless Noggle with base power and toughness 1/1",
Duration.WhileOnBattlefield, BecomesCreatureAttachedEffect.LoseType.ALL, Outcome.Detriment
)));
}
private NoggleTheMind(final NoggleTheMind card) {
super(card);
}
@Override
public NoggleTheMind copy() {
return new NoggleTheMind(this);
}
}

View file

@ -0,0 +1,70 @@
package mage.cards.o;
import java.util.UUID;
import mage.MageInt;
import mage.MageObject;
import mage.constants.SubType;
import mage.constants.Zone;
import mage.filter.StaticFilters;
import mage.game.Game;
import mage.util.functions.CopyApplier;
import mage.abilities.Ability;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.effects.EntersBattlefieldEffect;
import mage.abilities.effects.common.CopyPermanentEffect;
import mage.abilities.keyword.ChangelingAbility;
import mage.abilities.keyword.ConvokeAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
/**
*
* @author muz
*/
public final class OmniChangeling extends CardImpl {
private static final CopyApplier applier = new CopyApplier() {
@Override
public boolean apply(Game game, MageObject blueprint, Ability source, UUID copyToObjectId) {
blueprint.getAbilities().add(new ChangelingAbility());
return true;
}
};
public OmniChangeling(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{U}{U}");
this.subtype.add(SubType.SHAPESHIFTER);
this.power = new MageInt(0);
this.toughness = new MageInt(0);
// Changeling
this.addAbility(new ChangelingAbility());
// Convoke
this.addAbility(new ConvokeAbility());
// You may have this creature enter as a copy of any creature on the battlefield, except it has changeling.
this.addAbility(new SimpleStaticAbility(
Zone.ALL,
new EntersBattlefieldEffect(
new CopyPermanentEffect(
StaticFilters.FILTER_PERMANENT_CREATURE,
applier
).setText("You may have {this} enter as a copy of any creature on the battlefield, except it has changeling"),
"",
true
)
));
}
private OmniChangeling(final OmniChangeling card) {
super(card);
}
@Override
public OmniChangeling copy() {
return new OmniChangeling(this);
}
}

View file

@ -6,10 +6,10 @@ import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.costs.common.TapSourceCost;
import mage.abilities.costs.mana.GenericManaCost;
import mage.abilities.effects.common.ReturnFromGraveyardToBattlefieldTargetEffect;
import mage.abilities.keyword.FriendsForeverAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.PartnerVariantType;
import mage.constants.SubType;
import mage.constants.SuperType;
import mage.filter.FilterCard;
@ -54,7 +54,7 @@ public final class OthelmSigardianOutcast extends CardImpl {
this.addAbility(ability, new CardsPutIntoGraveyardWatcher());
// Friends forever
this.addAbility(FriendsForeverAbility.getInstance());
this.addAbility(PartnerVariantType.FRIENDS_FOREVER.makeAbility());
}
private OthelmSigardianOutcast(final OthelmSigardianOutcast card) {

View file

@ -1,33 +1,41 @@
package mage.cards.p;
import mage.MageInt;
import mage.MageObject;
import mage.abilities.Ability;
import mage.abilities.effects.OneShotEffect;
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
import mage.abilities.effects.common.InfoEffect;
import mage.abilities.effects.common.PutCardFromHandOntoBattlefieldEffect;
import mage.abilities.keyword.BattalionAbility;
import mage.cards.Card;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.*;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.SuperType;
import mage.filter.FilterCard;
import mage.filter.common.FilterCreatureCard;
import mage.filter.predicate.card.ManaValueLessThanOrEqualToSourcePowerPredicate;
import mage.filter.predicate.ObjectSourcePlayer;
import mage.filter.predicate.ObjectSourcePlayerPredicate;
import mage.game.Game;
import mage.game.permanent.Permanent;
import mage.players.Player;
import mage.target.common.TargetCardInHand;
import mage.util.CardUtil;
import java.util.Optional;
import java.util.UUID;
/**
*
* @author notgreat
*/
public final class PaladinElizabethTaggerdy extends CardImpl {
private static final FilterCard filter = new FilterCreatureCard("creature card with mana value X or less");
static {
filter.add(PaladinElizabethTaggerdyPredicate.instance);
}
public PaladinElizabethTaggerdy(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{R}{W}");
this.supertype.add(SuperType.LEGENDARY);
this.subtype.add(SubType.HUMAN);
this.subtype.add(SubType.KNIGHT);
@ -36,9 +44,11 @@ public final class PaladinElizabethTaggerdy extends CardImpl {
// Battalion -- Whenever Paladin Elizabeth Taggerdy and at least two other creatures attack, draw a card, then you may put a creature card with mana value X or less from your hand onto the battlefield tapped and attacking, where X is Paladin Elizabeth Taggerdy's power.
Ability ability = new BattalionAbility(new DrawCardSourceControllerEffect(1));
ability.addEffect(new PaladinElizabethTaggerdyEffect().concatBy(", then"));
ability.addEffect(new PutCardFromHandOntoBattlefieldEffect(
filter, false, true, true
).concatBy(", then"));
ability.addEffect(new InfoEffect(", where X is {this}'s power"));
this.addAbility(ability);
}
private PaladinElizabethTaggerdy(final PaladinElizabethTaggerdy card) {
@ -51,50 +61,16 @@ public final class PaladinElizabethTaggerdy extends CardImpl {
}
}
//Based on Preeminent Captain
class PaladinElizabethTaggerdyEffect extends OneShotEffect {
private static final FilterCard filter = new FilterCreatureCard("a creature card with mana value less than or equal to {this}'s power");
static {
filter.add(ManaValueLessThanOrEqualToSourcePowerPredicate.instance);
}
public PaladinElizabethTaggerdyEffect() {
super(Outcome.PutCreatureInPlay);
this.staticText = "you may put a creature card with mana value X or less from your hand onto the battlefield tapped and attacking, where X is {this}'s power";
}
private PaladinElizabethTaggerdyEffect(final PaladinElizabethTaggerdyEffect effect) {
super(effect);
}
enum PaladinElizabethTaggerdyPredicate implements ObjectSourcePlayerPredicate<Card> {
instance;
@Override
public boolean apply(Game game, Ability source) {
Player controller = game.getPlayer(source.getControllerId());
TargetCardInHand target = new TargetCardInHand(filter);
if (controller != null && target.canChoose(controller.getId(), source, game)
&& target.choose(outcome, controller.getId(), source.getSourceId(), source, game)) {
if (!target.getTargets().isEmpty()) {
UUID cardId = target.getFirstTarget();
Card card = controller.getHand().get(cardId, game);
if (card != null) {
if (controller.moveCards(card, Zone.BATTLEFIELD, source, game, true, false, true, null)) {
Permanent permanent = CardUtil.getPermanentFromCardPutToBattlefield(card, game);
if (permanent != null) {
game.getCombat().addAttackingCreature(permanent.getId(), game);
}
}
}
}
return true;
}
return false;
public boolean apply(ObjectSourcePlayer<Card> input, Game game) {
return Optional
.ofNullable(input.getSource().getSourcePermanentOrLKI(game))
.map(MageObject::getPower)
.map(MageInt::getValue)
.filter(power -> input.getObject().getManaValue() <= power)
.isPresent();
}
@Override
public PaladinElizabethTaggerdyEffect copy() {
return new PaladinElizabethTaggerdyEffect(this);
}
}

View file

@ -2,7 +2,6 @@ package mage.cards.p;
import mage.MageInt;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.condition.InvertCondition;
import mage.abilities.condition.common.SourceTappedCondition;
import mage.abilities.decorator.ConditionalContinuousEffect;
import mage.abilities.effects.common.continuous.GainAbilitySourceEffect;
@ -31,11 +30,11 @@ public final class ParadiseDruid extends CardImpl {
// Paradise Druid has hexproof as long as it's untapped.
this.addAbility(new SimpleStaticAbility(new ConditionalContinuousEffect(
new GainAbilitySourceEffect(
HexproofAbility.getInstance(),
Duration.WhileOnBattlefield
), SourceTappedCondition.UNTAPPED,
"{this} has hexproof as long as it's untapped"
new GainAbilitySourceEffect(
HexproofAbility.getInstance(),
Duration.WhileOnBattlefield
), SourceTappedCondition.UNTAPPED,
"{this} has hexproof as long as it's untapped"
)));
// {T}: Add one mana of any color.

View file

@ -1,23 +1,14 @@
package mage.cards.p;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.AttacksTriggeredAbility;
import mage.abilities.effects.OneShotEffect;
import mage.abilities.effects.common.PutCardFromHandOntoBattlefieldEffect;
import mage.abilities.keyword.FirstStrikeAbility;
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.constants.Zone;
import mage.filter.common.FilterCreatureCard;
import mage.game.Game;
import mage.game.permanent.Permanent;
import mage.players.Player;
import mage.target.common.TargetCardInHand;
import mage.util.CardUtil;
import java.util.UUID;
@ -26,6 +17,12 @@ import java.util.UUID;
*/
public final class PreeminentCaptain extends CardImpl {
private static final FilterCreatureCard filter = new FilterCreatureCard("Soldier creature card");
static {
filter.add(SubType.SOLDIER.getPredicate());
}
public PreeminentCaptain(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{W}");
this.subtype.add(SubType.KITHKIN);
@ -35,9 +32,11 @@ public final class PreeminentCaptain extends CardImpl {
this.toughness = new MageInt(2);
this.addAbility(FirstStrikeAbility.getInstance());
// Whenever Preeminent Captain attacks, you may put a Soldier creature
// card from your hand onto the battlefield tapped and attacking.
this.addAbility(new AttacksTriggeredAbility(new PreeminentCaptainEffect(), true));
// Whenever Preeminent Captain attacks, you may put a Soldier creature card from your hand onto the battlefield tapped and attacking.
this.addAbility(new AttacksTriggeredAbility(new PutCardFromHandOntoBattlefieldEffect(
filter, false, true, true
), true));
}
private PreeminentCaptain(final PreeminentCaptain card) {
@ -49,50 +48,3 @@ public final class PreeminentCaptain extends CardImpl {
return new PreeminentCaptain(this);
}
}
class PreeminentCaptainEffect extends OneShotEffect {
private static final FilterCreatureCard filter = new FilterCreatureCard("a soldier creature card");
static {
filter.add(SubType.SOLDIER.getPredicate());
}
public PreeminentCaptainEffect() {
super(Outcome.PutCreatureInPlay);
this.staticText = "put a Soldier creature card from your hand onto the battlefield tapped and attacking";
}
private PreeminentCaptainEffect(final PreeminentCaptainEffect effect) {
super(effect);
}
@Override
public boolean apply(Game game, Ability source) {
Player controller = game.getPlayer(source.getControllerId());
TargetCardInHand target = new TargetCardInHand(filter);
if (controller != null && target.canChoose(controller.getId(), source, game)
&& target.choose(outcome, controller.getId(), source.getSourceId(), source, game)) {
if (!target.getTargets().isEmpty()) {
UUID cardId = target.getFirstTarget();
Card card = controller.getHand().get(cardId, game);
if (card != null) {
if (controller.moveCards(card, Zone.BATTLEFIELD, source, game, true, false, true, null)) {
Permanent permanent = CardUtil.getPermanentFromCardPutToBattlefield(card, game);
if (permanent != null) {
game.getCombat().addAttackingCreature(permanent.getId(), game);
}
}
}
}
return true;
}
return false;
}
@Override
public PreeminentCaptainEffect copy() {
return new PreeminentCaptainEffect(this);
}
}

View file

@ -16,7 +16,7 @@ import java.util.UUID;
public final class PridefulFeastling extends CardImpl {
public PridefulFeastling(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}");
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{W/B}");
this.subtype.add(SubType.SHAPESHIFTER);
this.power = new MageInt(2);

View file

@ -0,0 +1,55 @@
package mage.cards.p;
import java.util.UUID;
import mage.MageInt;
import mage.constants.SubType;
import mage.target.common.TargetControlledCreaturePermanent;
import mage.target.targetadjustment.TargetsCountAdjuster;
import mage.abilities.Ability;
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
import mage.abilities.dynamicvalue.common.ColorsAmongControlledPermanentsCount;
import mage.abilities.effects.common.continuous.BoostTargetEffect;
import mage.abilities.keyword.TrampleAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.AbilityWord;
import mage.constants.CardType;
/**
*
* @author muz
*/
public final class Prismabasher extends CardImpl {
public Prismabasher(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{G}{G}");
this.subtype.add(SubType.ELEMENTAL);
this.power = new MageInt(6);
this.toughness = new MageInt(6);
// Trample
this.addAbility(TrampleAbility.getInstance());
// Vivid -- When this creature enters, up to X target creatures you control get +X/+X until end of turn, where X is the number of colors among permanents you control.
Ability ability = new EntersBattlefieldTriggeredAbility(
new BoostTargetEffect(
ColorsAmongControlledPermanentsCount.ALL_PERMANENTS,
ColorsAmongControlledPermanentsCount.ALL_PERMANENTS
).setText("up to X target creatures you control get +X/+X until end of turn, " +
"where X is the number of colors among permanents you control")
);
ability.addTarget(new TargetControlledCreaturePermanent(0, 0));
ability.setTargetAdjuster(new TargetsCountAdjuster(ColorsAmongControlledPermanentsCount.ALL_PERMANENTS));
this.addAbility(ability.setAbilityWord(AbilityWord.VIVID).addHint(ColorsAmongControlledPermanentsCount.ALL_PERMANENTS.getHint()));
}
private Prismabasher(final Prismabasher card) {
super(card);
}
@Override
public Prismabasher copy() {
return new Prismabasher(this);
}
}

View file

@ -0,0 +1,88 @@
package mage.cards.p;
import mage.abilities.Ability;
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.dynamicvalue.common.ColorsAmongControlledPermanentsCount;
import mage.abilities.effects.OneShotEffect;
import mage.abilities.effects.common.continuous.PlayAdditionalLandsControllerEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.cards.Cards;
import mage.cards.CardsImpl;
import mage.constants.*;
import mage.filter.StaticFilters;
import mage.game.Game;
import mage.players.Player;
import mage.target.common.TargetCardInLibrary;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class PrismaticUndercurrents extends CardImpl {
public PrismaticUndercurrents(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{3}{G}");
// Vivid -- When this enchantment enters, search your library for up to X basic land cards, where X is the number of colors among permanents you control. Reveal those cards, put them into your hand, then shuffle.
this.addAbility(new EntersBattlefieldTriggeredAbility(new PrismaticUndercurrentsEffect())
.setAbilityWord(AbilityWord.VIVID)
.addHint(ColorsAmongControlledPermanentsCount.ALL_PERMANENTS.getHint()));
// You may play an additional land on each of your turns.
this.addAbility(new SimpleStaticAbility(
new PlayAdditionalLandsControllerEffect(1, Duration.WhileOnBattlefield)
));
}
private PrismaticUndercurrents(final PrismaticUndercurrents card) {
super(card);
}
@Override
public PrismaticUndercurrents copy() {
return new PrismaticUndercurrents(this);
}
}
class PrismaticUndercurrentsEffect extends OneShotEffect {
PrismaticUndercurrentsEffect() {
super(Outcome.Benefit);
staticText = "search your library for up to X basic land cards, where X is the number of colors " +
"among permanents you control. Reveal those cards, put them into your hand, then shuffle";
}
private PrismaticUndercurrentsEffect(final PrismaticUndercurrentsEffect effect) {
super(effect);
}
@Override
public PrismaticUndercurrentsEffect copy() {
return new PrismaticUndercurrentsEffect(this);
}
@Override
public boolean apply(Game game, Ability source) {
Player player = game.getPlayer(source.getControllerId());
if (player == null) {
return false;
}
TargetCardInLibrary target = new TargetCardInLibrary(
0,
ColorsAmongControlledPermanentsCount
.ALL_PERMANENTS
.calculate(game, source, this),
StaticFilters.FILTER_CARD_BASIC_LANDS
);
player.searchLibrary(target, source, game);
Cards cards = new CardsImpl(target.getTargets());
cards.retainZone(Zone.LIBRARY, game);
player.revealCards(source, cards, game);
player.moveCards(cards, Zone.HAND, source, game);
player.shuffleLibrary(source, game);
return true;
}
}

View file

@ -23,6 +23,7 @@ public final class ProdigalSorcerer extends CardImpl {
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}");
this.subtype.add(SubType.HUMAN);
this.subtype.add(SubType.WIZARD);
this.subtype.add(SubType.SORCERER);
this.power = new MageInt(1);
this.toughness = new MageInt(1);

View file

@ -0,0 +1,36 @@
package mage.cards.p;
import mage.abilities.effects.common.DestroyTargetEffect;
import mage.abilities.keyword.ConvokeAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.target.common.TargetAttackingOrBlockingCreature;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class ProtectiveResponse extends CardImpl {
public ProtectiveResponse(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{2}{W}");
// Convoke
this.addAbility(new ConvokeAbility());
// Destroy target attacking or blocking creature.
this.getSpellAbility().addEffect(new DestroyTargetEffect());
this.getSpellAbility().addTarget(new TargetAttackingOrBlockingCreature());
}
private ProtectiveResponse(final ProtectiveResponse card) {
super(card);
}
@Override
public ProtectiveResponse copy() {
return new ProtectiveResponse(this);
}
}

View file

@ -0,0 +1,60 @@
package mage.cards.p;
import java.util.UUID;
import mage.MageInt;
import mage.constants.SubType;
import mage.filter.common.FilterControlledCreaturePermanent;
import mage.abilities.keyword.VigilanceAbility;
import mage.abilities.keyword.ReachAbility;
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.dynamicvalue.common.GreatestAmongPermanentsValue;
import mage.abilities.effects.common.GainLifeEffect;
import mage.abilities.hint.Hint;
import mage.abilities.keyword.WardAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
/**
*
* @author muz
*/
public final class PummelerForHire extends CardImpl {
private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent(SubType.GIANT, "Giants you control");
static final GreatestAmongPermanentsValue xValue = new GreatestAmongPermanentsValue(GreatestAmongPermanentsValue.Quality.Power, filter);
private static final Hint hint = xValue.getHint();
public PummelerForHire(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{G}");
this.subtype.add(SubType.GIANT);
this.subtype.add(SubType.MERCENARY);
this.power = new MageInt(4);
this.toughness = new MageInt(4);
// Vigilance
this.addAbility(VigilanceAbility.getInstance());
// Reach
this.addAbility(ReachAbility.getInstance());
// Ward {2}
this.addAbility(new WardAbility(new ManaCostsImpl<>("{2}")));
// When this creature enters, you gain X life, where X is the greatest power among Giants you control.
EntersBattlefieldTriggeredAbility ability = new EntersBattlefieldTriggeredAbility(new GainLifeEffect(xValue));
ability.addHint(hint);
this.addAbility(ability);
}
private PummelerForHire(final PummelerForHire card) {
super(card);
}
@Override
public PummelerForHire copy() {
return new PummelerForHire(this);
}
}

View file

@ -0,0 +1,61 @@
package mage.cards.p;
import java.util.UUID;
import mage.abilities.Mode;
import mage.abilities.condition.common.BlightedCondition;
import mage.abilities.effects.common.DestroyTargetEffect;
import mage.abilities.keyword.BlightAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.ComparisonType;
import mage.filter.FilterPermanent;
import mage.filter.StaticFilters;
import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.mageobject.ManaValuePredicate;
import mage.target.TargetPermanent;
/**
*
* @author muz
*/
public final class PyrrhicStrike extends CardImpl {
private static final FilterPermanent filter = new FilterCreaturePermanent("creature with mana value 3 or greater");
static {
filter.add(new ManaValuePredicate(ComparisonType.OR_GREATER, 3));
}
public PyrrhicStrike(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{2}{W}");
// As an additional cost to cast this spell, you may blight 2.
this.addAbility(new BlightAbility(2));
// Choose one. If this spell's additional cost was paid, choose both instead.
this.getSpellAbility().getModes().setChooseText(
"Choose one. If this spell's additional cost was paid, choose both instead."
);
this.getSpellAbility().getModes().setMoreCondition(2, BlightedCondition.instance);
// * Destroy target artifact or enchantment.
this.getSpellAbility().addEffect(new DestroyTargetEffect());
this.getSpellAbility().addTarget(new TargetPermanent(StaticFilters.FILTER_PERMANENT_ARTIFACT_OR_ENCHANTMENT));
// * Destroy target creature with mana value 3 or greater.
Mode mode = new Mode(new DestroyTargetEffect());
mode.addTarget(new TargetPermanent(filter));
this.getSpellAbility().addMode(mode);
}
private PyrrhicStrike(final PyrrhicStrike card) {
super(card);
}
@Override
public PyrrhicStrike copy() {
return new PyrrhicStrike(this);
}
}

View file

@ -0,0 +1,79 @@
package mage.cards.r;
import java.util.UUID;
import mage.abilities.Ability;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.effects.ContinuousEffectImpl;
import mage.abilities.keyword.ConspireAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.Layer;
import mage.constants.Outcome;
import mage.constants.SubLayer;
import mage.filter.StaticFilters;
import mage.game.Game;
import mage.game.stack.Spell;
import mage.game.stack.StackObject;
/**
*
* @author muz
*/
public final class RaidingSchemes extends CardImpl {
public RaidingSchemes(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{3}{R}{G}");
// Each noncreature spell you cast has conspire.
this.addAbility(new SimpleStaticAbility(new GainConspireEffect()));
}
private RaidingSchemes(final RaidingSchemes card) {
super(card);
}
@Override
public RaidingSchemes copy() {
return new RaidingSchemes(this);
}
}
class GainConspireEffect extends ContinuousEffectImpl {
private final ConspireAbility conspireAbility;
public GainConspireEffect() {
super(Duration.WhileOnBattlefield, Layer.AbilityAddingRemovingEffects_6, SubLayer.NA, Outcome.AddAbility);
staticText = "Each noncreature spell you cast has conspire. <i>(As you cast the spell, you may tap two untapped creatures you control that share a color with it. When you do, copy it and you may choose new targets for the copy.)</i>";
this.conspireAbility = new ConspireAbility(ConspireAbility.ConspireTargets.MORE);
}
private GainConspireEffect(final GainConspireEffect effect) {
super(effect);
this.conspireAbility = effect.conspireAbility;
}
@Override
public GainConspireEffect copy() {
return new GainConspireEffect(this);
}
@Override
public boolean apply(Game game, Ability source) {
for (StackObject stackObject : game.getStack()) {
// only spells cast, so no copies of spells
if (!(stackObject instanceof Spell) || stackObject.isCopy()
|| !stackObject.isControlledBy(source.getControllerId())) {
continue;
}
Spell spell = (Spell) stackObject;
if (StaticFilters.FILTER_SPELL_NON_CREATURE.match(stackObject, game)) {
game.getState().addOtherAbility(spell.getCard(), conspireAbility.setAddedById(source.getSourceId()));
}
}
return true;
}
}

View file

@ -0,0 +1,68 @@
package mage.cards.r;
import java.util.UUID;
import mage.MageInt;
import mage.constants.SubType;
import mage.counters.CounterType;
import mage.filter.common.FilterCreatureCard;
import mage.filter.predicate.mageobject.ManaValuePredicate;
import mage.target.common.TargetCardInYourGraveyard;
import mage.target.common.TargetCreaturePermanent;
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.ReturnFromGraveyardToBattlefieldTargetEffect;
import mage.abilities.effects.common.counter.AddCountersSourceEffect;
import mage.abilities.keyword.LifelinkAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.ComparisonType;
/**
*
* @author muz
*/
public final class ReapingWillow extends CardImpl {
private static final FilterCreatureCard filter = new FilterCreatureCard("creature card with mana value 3 or less from your graveyard");
static {
filter.add(new ManaValuePredicate(ComparisonType.FEWER_THAN, 4));
}
public ReapingWillow(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{W/B}{W/B}{W/B}");
this.subtype.add(SubType.TREEFOLK);
this.subtype.add(SubType.CLERIC);
this.power = new MageInt(3);
this.toughness = new MageInt(6);
// Lifelink
this.addAbility(LifelinkAbility.getInstance());
// This creature enters with two -1/-1 counters on it.
this.addAbility(new EntersBattlefieldAbility(
new AddCountersSourceEffect(CounterType.M1M1.createInstance(2)),
"with two -1/-1 counters on it"
));
// {1}{W/B}, Remove two counters from this creature: Return target creature card with mana value 3 or less from your graveyard to the battlefield. Activate only as a sorcery.
Ability ability = new ActivateAsSorceryActivatedAbility(new ReturnFromGraveyardToBattlefieldTargetEffect(), new ManaCostsImpl<>("{1}{W/B}"));
ability.addCost(new RemoveCountersSourceCost(2));
ability.addTarget(new TargetCardInYourGraveyard(filter));
this.addAbility(ability);
}
private ReapingWillow(final ReapingWillow card) {
super(card);
}
@Override
public ReapingWillow copy() {
return new ReapingWillow(this);
}
}

View file

@ -0,0 +1,35 @@
package mage.cards.r;
import mage.abilities.effects.common.CreateTokenEffect;
import mage.abilities.effects.common.continuous.BoostTargetEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.game.permanent.token.TreasureToken;
import mage.target.common.TargetCreaturePermanent;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class RecklessRansacking extends CardImpl {
public RecklessRansacking(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{1}{R}");
// Target creature gets +3/+2 until end of turn. Create a Treasure token.
this.getSpellAbility().addEffect(new BoostTargetEffect(3, 2));
this.getSpellAbility().addTarget(new TargetCreaturePermanent());
this.getSpellAbility().addEffect(new CreateTokenEffect(new TreasureToken()));
}
private RecklessRansacking(final RecklessRansacking card) {
super(card);
}
@Override
public RecklessRansacking copy() {
return new RecklessRansacking(this);
}
}

View file

@ -0,0 +1,55 @@
package mage.cards.r;
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.effects.common.counter.AddCountersSourceEffect;
import mage.abilities.effects.common.counter.RemoveCounterSourceEffect;
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 ReluctantDounguard extends CardImpl {
private static final Condition condition = new SourceHasCounterCondition(CounterType.M1M1);
public ReluctantDounguard(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{W}");
this.subtype.add(SubType.KITHKIN);
this.subtype.add(SubType.SOLDIER);
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)),
"with two -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 ReluctantDounguard(final ReluctantDounguard card) {
super(card);
}
@Override
public ReluctantDounguard copy() {
return new ReluctantDounguard(this);
}
}

View file

@ -0,0 +1,68 @@
package mage.cards.r;
import java.util.UUID;
import mage.abilities.common.AsEntersBattlefieldAbility;
import mage.abilities.common.EntersBattlefieldAllTriggeredAbility;
import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.common.delayed.CopyNextSpellDelayedTriggeredAbility;
import mage.abilities.costs.common.RemoveCountersSourceCost;
import mage.abilities.costs.common.TapSourceCost;
import mage.abilities.effects.common.ChooseCreatureTypeEffect;
import mage.abilities.effects.common.CreateDelayedTriggeredAbilityEffect;
import mage.abilities.effects.common.counter.AddCountersSourceEffect;
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.common.FilterControlledPermanent;
import mage.filter.predicate.mageobject.ChosenSubtypePredicate;
/**
*
* @author muz
*/
public final class RimefireTorque extends CardImpl {
private static final FilterControlledPermanent filter = new FilterControlledPermanent("a permanent you control of the chosen type");
static {
filter.add(ChosenSubtypePredicate.TRUE);
}
public RimefireTorque(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{1}{U}");
// As this artifact enters, choose a creature type.
this.addAbility(new AsEntersBattlefieldAbility(new ChooseCreatureTypeEffect(Outcome.Benefit)));
// Whenever a permanent you control of the chosen type enters, put a charge counter on this artifact.
this.addAbility(
new EntersBattlefieldAllTriggeredAbility(
Zone.BATTLEFIELD,
new AddCountersSourceEffect(CounterType.CHARGE.createInstance()),
filter,
false
)
);
// {T}, Remove three charge counters from this artifact: When you next cast an instant or sorcery spell this turn, copy it. You may choose new targets for the copy.
SimpleActivatedAbility ability = new SimpleActivatedAbility(
new CreateDelayedTriggeredAbilityEffect(new CopyNextSpellDelayedTriggeredAbility()),
new RemoveCountersSourceCost(CounterType.CHARGE.createInstance(3))
);
ability.addCost(new TapSourceCost());
this.addAbility(ability);
}
private RimefireTorque(final RimefireTorque card) {
super(card);
}
@Override
public RimefireTorque copy() {
return new RimefireTorque(this);
}
}

View file

@ -0,0 +1,43 @@
package mage.cards.r;
import java.util.UUID;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
import mage.abilities.effects.common.ReturnToHandTargetEffect;
import mage.constants.SubType;
import mage.filter.StaticFilters;
import mage.target.TargetPermanent;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
/**
*
* @author muz
*/
public final class RimekinRecluse extends CardImpl {
public RimekinRecluse(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{U}");
this.subtype.add(SubType.ELEMENTAL);
this.subtype.add(SubType.WIZARD);
this.power = new MageInt(3);
this.toughness = new MageInt(2);
// When this creature enters, return up to one other target creature to its owner's hand.
Ability ability = new EntersBattlefieldTriggeredAbility(new ReturnToHandTargetEffect());
ability.addTarget(new TargetPermanent(0, 1, StaticFilters.FILTER_ANOTHER_TARGET_CREATURE));
this.addAbility(ability);
}
private RimekinRecluse(final RimekinRecluse card) {
super(card);
}
@Override
public RimekinRecluse copy() {
return new RimekinRecluse(this);
}
}

View file

@ -0,0 +1,42 @@
package mage.cards.r;
import mage.abilities.effects.common.UntapTargetEffect;
import mage.abilities.effects.common.continuous.BoostTargetEffect;
import mage.abilities.effects.common.continuous.GainAbilityTargetEffect;
import mage.abilities.keyword.FirstStrikeAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.target.common.TargetCreaturePermanent;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class RiverguardsReflexes extends CardImpl {
public RiverguardsReflexes(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{1}{W}");
// Target creature gets +2/+2 and gains first strike until end of turn. Untap it.
this.getSpellAbility().addEffect(new BoostTargetEffect(
2, 2, Duration.EndOfTurn
).setText("target creature gets +2/+2"));
this.getSpellAbility().addEffect(new GainAbilityTargetEffect(
FirstStrikeAbility.getInstance(), Duration.EndOfTurn
).setText("and gains first strike until end of turn"));
this.getSpellAbility().addEffect(new UntapTargetEffect("Untap it"));
this.getSpellAbility().addTarget(new TargetCreaturePermanent());
}
private RiverguardsReflexes(final RiverguardsReflexes card) {
super(card);
}
@Override
public RiverguardsReflexes copy() {
return new RiverguardsReflexes(this);
}
}

View file

@ -23,6 +23,7 @@ public final class RockslideSorcerer extends CardImpl {
this.subtype.add(SubType.HUMAN);
this.subtype.add(SubType.WIZARD);
this.subtype.add(SubType.SORCERER);
this.power = new MageInt(3);
this.toughness = new MageInt(3);

View file

@ -0,0 +1,52 @@
package mage.cards.s;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.costs.mana.GenericManaCost;
import mage.abilities.effects.common.combat.CantBeBlockedByMoreThanOneSourceEffect;
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.target.TargetPermanent;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class SafewrightCavalry extends CardImpl {
private static final FilterPermanent filter = new FilterControlledPermanent(SubType.ELF);
public SafewrightCavalry(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(4);
this.toughness = new MageInt(4);
// This creature can't be blocked by more than one creature.
this.addAbility(new SimpleStaticAbility(new CantBeBlockedByMoreThanOneSourceEffect()));
// {5}: Target Elf you control gets +2/+2 until end of turn.
Ability ability = new SimpleActivatedAbility(new BoostTargetEffect(2, 2), new GenericManaCost(5));
ability.addTarget(new TargetPermanent(filter));
this.addAbility(ability);
}
private SafewrightCavalry(final SafewrightCavalry card) {
super(card);
}
@Override
public SafewrightCavalry copy() {
return new SafewrightCavalry(this);
}
}

View file

@ -24,8 +24,6 @@ import mage.game.permanent.Permanent;
import mage.players.Player;
import mage.target.TargetPermanent;
import mage.target.TargetPlayer;
import mage.target.common.TargetCreaturePermanent;
import java.util.List;
import java.util.UUID;

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