Merge pull request 'master' (#22) from External/mage:master into master
All checks were successful
/ example-docker-compose (push) Successful in 28m47s

Reviewed-on: #22
This commit is contained in:
Failure 2025-03-22 16:45:51 -07:00
commit c8496d6bbe
133 changed files with 5368 additions and 224 deletions

View file

@ -2587,7 +2587,33 @@ public class ScryfallImageSupportTokens {
put("INR/Zombie/3", "https://api.scryfall.com/cards/tinr/11/en?format=image");
// DFT
put("DFT/Cat", "https://api.scryfall.com/cards/tdft/2/en?format=image");
put("DFT/Emblem Chandra", "https://api.scryfall.com/cards/tdft/13/en?format=image");
put("DFT/Dinosaur Dragon", "https://api.scryfall.com/cards/tdft/4/en?format=image");
put("DFT/Elephant", "https://api.scryfall.com/cards/tdft/6/en?format=image");
put("DFT/Goblin", "https://api.scryfall.com/cards/tdft/5/en?format=image");
put("DFT/Insect", "https://api.scryfall.com/cards/tdft/7/en?format=image");
put("DFT/Pilot", "https://api.scryfall.com/cards/tdft/1/en?format=image");
put("DFT/Servo", "https://api.scryfall.com/cards/tdft/8/en?format=image");
put("DFT/Thopter/1", "https://api.scryfall.com/cards/tdft/9/en?format=image");
put("DFT/Thopter/2", "https://api.scryfall.com/cards/tdft/10/en?format=image");
put("DFT/Treasure", "https://api.scryfall.com/cards/tdft/11/en?format=image");
put("DFT/Vehicle", "https://api.scryfall.com/cards/tdft/12/en?format=image");
put("DFT/Zombie", "https://api.scryfall.com/cards/tdft/3/en?format=image");
// DTC
put("DRC/Beast/1", "https://api.scryfall.com/cards/tdrc/10/en?format=image");
put("DRC/Beast/2", "https://api.scryfall.com/cards/tdrc/11/en?format=image");
put("DRC/Construct", "https://api.scryfall.com/cards/tdrc/12/en?format=image");
put("DRC/Golem/1", "https://api.scryfall.com/cards/tdrc/13/en?format=image");
put("DRC/Golem/2", "https://api.scryfall.com/cards/tdrc/14/en?format=image");
put("DRC/Golem/3", "https://api.scryfall.com/cards/tdrc/15/en?format=image");
put("DRC/Nalaar Aetherjet", "https://api.scryfall.com/cards/tdrc/16/en?format=image");
put("DRC/Shapeshifter", "https://api.scryfall.com/cards/tdrc/4/en?format=image");
put("DRC/Zombie/1", "https://api.scryfall.com/cards/tdrc/3/en?format=image");
put("DRC/Zombie/2", "https://api.scryfall.com/cards/tdrc/7/en?format=image");
put("DRC/Zombie Army", "https://api.scryfall.com/cards/tdrc/8/en?format=image");
put("DRC/Zombie Warrior", "https://api.scryfall.com/cards/tdrc/9/en?format=image");
// generate supported sets
supportedSets.clear();

View file

@ -93,6 +93,7 @@ class AbuelosAwakeningContinuousEffect extends ContinuousEffectImpl {
AbuelosAwakeningContinuousEffect() {
super(Duration.Custom, Outcome.Neutral);
staticText = "It's a 1/1 Spirit creature with flying in addition to its other types";
this.dependencyTypes.add(DependencyType.BecomeCreature);
}
private AbuelosAwakeningContinuousEffect(final AbuelosAwakeningContinuousEffect effect) {

View file

@ -0,0 +1,54 @@
package mage.cards.a;
import mage.MageInt;
import mage.abilities.costs.common.ExileFromGraveCost;
import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.effects.common.DoIfCostPaid;
import mage.abilities.effects.common.counter.AddCountersSourceEffect;
import mage.abilities.keyword.FlyingAbility;
import mage.abilities.keyword.WardAbility;
import mage.abilities.triggers.BeginningOfUpkeepTriggeredAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.counters.CounterType;
import mage.target.common.TargetCardInYourGraveyard;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class AegisSculptor extends CardImpl {
public AegisSculptor(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{U}");
this.subtype.add(SubType.BIRD);
this.subtype.add(SubType.WIZARD);
this.power = new MageInt(2);
this.toughness = new MageInt(3);
// Flying
this.addAbility(FlyingAbility.getInstance());
// Ward {2}
this.addAbility(new WardAbility(new ManaCostsImpl<>("{2}")));
// At the beginning of your upkeep, you may exile two cards from your graveyard. If you do, put a +1/+1 counter on this creature.
this.addAbility(new BeginningOfUpkeepTriggeredAbility(new DoIfCostPaid(
new AddCountersSourceEffect(CounterType.P1P1.createInstance()),
new ExileFromGraveCost(new TargetCardInYourGraveyard(2))
)));
}
private AegisSculptor(final AegisSculptor card) {
super(card);
}
@Override
public AegisSculptor copy() {
return new AegisSculptor(this);
}
}

View file

@ -0,0 +1,38 @@
package mage.cards.a;
import mage.MageInt;
import mage.abilities.common.RenewAbility;
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 AgentOfKotis extends CardImpl {
public AgentOfKotis(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{U}");
this.subtype.add(SubType.HUMAN);
this.subtype.add(SubType.ROGUE);
this.power = new MageInt(2);
this.toughness = new MageInt(1);
// Renew -- {3}{U}, Exile this card from your graveyard: Put two +1/+1 counters on target creature. Activate only as a sorcery.
this.addAbility(new RenewAbility("{3}{U}", CounterType.P1P1.createInstance(2)));
}
private AgentOfKotis(final AgentOfKotis card) {
super(card);
}
@Override
public AgentOfKotis copy() {
return new AgentOfKotis(this);
}
}

View file

@ -3,15 +3,12 @@ package mage.cards.a;
import java.util.UUID;
import mage.abilities.Ability;
import mage.abilities.common.CrewSaddleIncreasedPowerAbility;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.effects.Effect;
import mage.abilities.effects.OneShotEffect;
import mage.abilities.effects.common.EndTurnEffect;
import mage.abilities.effects.common.continuous.AddCardTypeTargetEffect;
import mage.abilities.effects.common.continuous.BoostControlledEffect;
import mage.abilities.effects.common.continuous.GainAbilityControlledEffect;
import mage.abilities.keyword.CrewAbility;
import mage.abilities.keyword.SaddleAbility;
import mage.abilities.keyword.VigilanceAbility;
import mage.abilities.triggers.BeginningOfCombatTriggeredAbility;
@ -25,12 +22,9 @@ import mage.constants.TargetController;
import mage.filter.FilterPermanent;
import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.Predicates;
import mage.filter.predicate.permanent.SaddledSourceThisTurnPredicate;
import mage.game.Game;
import mage.game.events.GameEvent;
import mage.game.permanent.Permanent;
import mage.target.TargetPermanent;
import mage.target.targetpointer.FixedTarget;
/**
*
@ -100,18 +94,10 @@ class AlacrianArmoryAnimateEffect extends OneShotEffect {
return false;
}
if (target.hasSubtype(SubType.MOUNT, game)) {
target.getAbilities().stream().filter(
ability -> ability instanceof SaddleAbility)
.findFirst()
.ifPresent(ability -> game.fireEvent(GameEvent.getEvent(
GameEvent.EventType.MOUNT_SADDLED,
ability.getSourceId(),
ability, source.getControllerId()))
);
SaddleAbility.applySaddle(target, game);
}
if (target.hasSubtype(SubType.VEHICLE, game)) {
game.addEffect(new AddCardTypeTargetEffect(Duration.EndOfTurn, CardType.CREATURE, CardType.ARTIFACT)
.setTargetPointer(new FixedTarget(target, game)), source);
game.addEffect(new AddCardTypeTargetEffect(Duration.EndOfTurn, CardType.CREATURE, CardType.ARTIFACT), source);
}
return true;
}

View file

@ -0,0 +1,62 @@
package mage.cards.a;
import mage.MageInt;
import mage.abilities.common.DiesCreatureTriggeredAbility;
import mage.abilities.effects.keyword.EndureSourceEffect;
import mage.abilities.keyword.FirstStrikeAbility;
import mage.abilities.keyword.FlashAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.SuperType;
import mage.filter.FilterPermanent;
import mage.filter.common.FilterControlledCreaturePermanent;
import mage.filter.predicate.mageobject.AnotherPredicate;
import mage.filter.predicate.permanent.TokenPredicate;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class AnafenzaUnyieldingLineage extends CardImpl {
private static final FilterPermanent filter
= new FilterControlledCreaturePermanent("another nontoken creature you control");
static {
filter.add(AnotherPredicate.instance);
filter.add(TokenPredicate.FALSE);
}
public AnafenzaUnyieldingLineage(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{W}");
this.supertype.add(SuperType.LEGENDARY);
this.subtype.add(SubType.SPIRIT);
this.subtype.add(SubType.SOLDIER);
this.power = new MageInt(2);
this.toughness = new MageInt(2);
// Flash
this.addAbility(FlashAbility.getInstance());
// First strike
this.addAbility(FirstStrikeAbility.getInstance());
// Whenever another nontoken creature you control dies, Anafenza endures 2.
this.addAbility(new DiesCreatureTriggeredAbility(
new EndureSourceEffect(2, "{this}"), true, filter
));
}
private AnafenzaUnyieldingLineage(final AnafenzaUnyieldingLineage card) {
super(card);
}
@Override
public AnafenzaUnyieldingLineage copy() {
return new AnafenzaUnyieldingLineage(this);
}
}

View file

@ -59,6 +59,7 @@ class ArlinnTheMoonsFuryEffect extends ContinuousEffectImpl {
ArlinnTheMoonsFuryEffect() {
super(Duration.EndOfTurn, Outcome.Benefit);
staticText = "until end of turn, {this} becomes a 5/5 Werewolf creature with trample, indestructible, and haste";
this.dependencyTypes.add(DependencyType.BecomeCreature);
}
private ArlinnTheMoonsFuryEffect(final ArlinnTheMoonsFuryEffect effect) {

View file

@ -0,0 +1,32 @@
package mage.cards.a;
import mage.abilities.effects.common.ReturnFromGraveyardToHandTargetEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.target.common.TargetCardInYourGraveyard;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class AuroralProcession extends CardImpl {
public AuroralProcession(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{G}{U}");
// Return target card from your graveyard to your hand.
this.getSpellAbility().addEffect(new ReturnFromGraveyardToHandTargetEffect());
this.getSpellAbility().addTarget(new TargetCardInYourGraveyard());
}
private AuroralProcession(final AuroralProcession card) {
super(card);
}
@Override
public AuroralProcession copy() {
return new AuroralProcession(this);
}
}

View file

@ -0,0 +1,53 @@
package mage.cards.b;
import mage.MageInt;
import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.condition.common.MyTurnCondition;
import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.decorator.ConditionalContinuousEffect;
import mage.abilities.effects.common.continuous.BoostControlledEffect;
import mage.abilities.effects.common.continuous.GainAbilitySourceEffect;
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 BearerOfGlory extends CardImpl {
public BearerOfGlory(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{W}");
this.subtype.add(SubType.HUMAN);
this.subtype.add(SubType.SOLDIER);
this.power = new MageInt(2);
this.toughness = new MageInt(1);
// 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."
)));
// {4}{W}: Creatures you control get +1/+1 until end of turn.
this.addAbility(new SimpleActivatedAbility(
new BoostControlledEffect(1, 1, Duration.EndOfTurn), new ManaCostsImpl<>("{4}{W}")
));
}
private BearerOfGlory(final BearerOfGlory card) {
super(card);
}
@Override
public BearerOfGlory copy() {
return new BearerOfGlory(this);
}
}

View file

@ -0,0 +1,55 @@
package mage.cards.b;
import mage.MageInt;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.effects.common.continuous.GainAbilityControlledEffect;
import mage.abilities.keyword.DeathtouchAbility;
import mage.abilities.keyword.MobilizeAbility;
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.predicate.permanent.AttackingPredicate;
import mage.filter.predicate.permanent.TokenPredicate;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class BoneCairnButcher extends CardImpl {
private static final FilterPermanent filter = new FilterPermanent("attacking tokens");
static {
filter.add(AttackingPredicate.instance);
filter.add(TokenPredicate.TRUE);
}
public BoneCairnButcher(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{R}{W}{B}");
this.subtype.add(SubType.DEMON);
this.power = new MageInt(4);
this.toughness = new MageInt(4);
// Mobilize 2
this.addAbility(new MobilizeAbility(2));
// Attacking tokens you control have deathtouch.
this.addAbility(new SimpleStaticAbility(new GainAbilityControlledEffect(
DeathtouchAbility.getInstance(), Duration.WhileOnBattlefield, filter
)));
}
private BoneCairnButcher(final BoneCairnButcher card) {
super(card);
}
@Override
public BoneCairnButcher copy() {
return new BoneCairnButcher(this);
}
}

View file

@ -0,0 +1,45 @@
package mage.cards.b;
import mage.MageInt;
import mage.abilities.common.AttacksTriggeredAbility;
import mage.abilities.effects.keyword.SurveilEffect;
import mage.abilities.keyword.FlyingAbility;
import mage.abilities.keyword.VigilanceAbility;
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 BoulderbornDragon extends CardImpl {
public BoulderbornDragon(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{5}");
this.subtype.add(SubType.DRAGON);
this.power = new MageInt(3);
this.toughness = new MageInt(3);
// Flying
this.addAbility(FlyingAbility.getInstance());
// Vigilance
this.addAbility(VigilanceAbility.getInstance());
// Whenever this creature attacks, surveil 1.
this.addAbility(new AttacksTriggeredAbility(new SurveilEffect(1)));
}
private BoulderbornDragon(final BoulderbornDragon card) {
super(card);
}
@Override
public BoulderbornDragon copy() {
return new BoulderbornDragon(this);
}
}

View file

@ -0,0 +1,54 @@
package mage.cards.c;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.SpellCastControllerTriggeredAbility;
import mage.abilities.dynamicvalue.common.SourcePermanentPowerValue;
import mage.abilities.effects.common.DamageTargetEffect;
import mage.abilities.effects.common.counter.AddCountersSourceEffect;
import mage.abilities.keyword.FlyingAbility;
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 mage.target.common.TargetOpponent;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class CalderaPyremaw extends CardImpl {
public CalderaPyremaw(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{R}{R}");
this.subtype.add(SubType.DRAGON);
this.power = new MageInt(3);
this.toughness = new MageInt(3);
// Flying
this.addAbility(FlyingAbility.getInstance());
// Whenever you cast an instant or sorcery spell, put a +1/+1 counter on this creature. Then this creature deals damage equal to its power to target opponent.
Ability ability = new SpellCastControllerTriggeredAbility(
new AddCountersSourceEffect(CounterType.P1P1.createInstance()),
StaticFilters.FILTER_SPELL_AN_INSTANT_OR_SORCERY, false
);
ability.addEffect(new DamageTargetEffect(SourcePermanentPowerValue.NOT_NEGATIVE)
.setText("Then this creature deals damage equal to its power to target opponent"));
ability.addTarget(new TargetOpponent());
this.addAbility(ability);
}
private CalderaPyremaw(final CalderaPyremaw card) {
super(card);
}
@Override
public CalderaPyremaw copy() {
return new CalderaPyremaw(this);
}
}

View file

@ -12,6 +12,7 @@ import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.filter.StaticFilters;
import mage.game.Game;
import mage.game.stack.Spell;
import mage.watchers.common.SpellsCastWatcher;
import java.util.UUID;
@ -21,7 +22,7 @@ import java.util.UUID;
*/
public final class CallForthTheTempest extends CardImpl {
private static Hint hint = new ValueHint("Total mana value of other spells you've cast this turn", CallForthTheTempestDynamicValue.instance);
private static final Hint hint = new ValueHint("Total mana value of other spells you've cast this turn", CallForthTheTempestDynamicValue.instance);
public CallForthTheTempest(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{5}{R}{R}{R}");
@ -36,7 +37,7 @@ public final class CallForthTheTempest extends CardImpl {
this.getSpellAbility().addEffect(new DamageAllEffect(
CallForthTheTempestDynamicValue.instance,
StaticFilters.FILTER_OPPONENTS_PERMANENT_CREATURE
));
).setText("{this} deals damage to each creature your opponents control equal to the total mana value of other spells you've cast this turn"));
this.getSpellAbility().addHint(hint);
}
@ -64,7 +65,7 @@ enum CallForthTheTempestDynamicValue implements DynamicValue {
.getSpellsCastThisTurn(sourceAbility.getControllerId())
.stream()
.filter(s -> s != null && !s.getSourceId().equals(sourceAbility.getSourceId()))
.mapToInt(s -> s.getManaValue())
.mapToInt(Spell::getManaValue)
.sum();
}
@ -82,4 +83,4 @@ enum CallForthTheTempestDynamicValue implements DynamicValue {
public String getMessage() {
return "total mana value of other spells you've cast this turn";
}
}
}

View file

@ -0,0 +1,41 @@
package mage.cards.c;
import mage.abilities.costs.OrCost;
import mage.abilities.costs.common.BeholdDragonCost;
import mage.abilities.costs.mana.GenericManaCost;
import mage.abilities.effects.common.continuous.BoostTargetEffect;
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 CausticExhale extends CardImpl {
public CausticExhale(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{B}");
// As an additional cost to cast this spell, behold a Dragon or pay {1}.
this.getSpellAbility().addCost(new OrCost(
"behold a Dragon or pay {1}",
new BeholdDragonCost(), new GenericManaCost(1)
));
// Target creature gets -3/-3 until end of turn.
this.getSpellAbility().addEffect(new BoostTargetEffect(-3, -3));
this.getSpellAbility().addTarget(new TargetCreaturePermanent());
}
private CausticExhale(final CausticExhale card) {
super(card);
}
@Override
public CausticExhale copy() {
return new CausticExhale(this);
}
}

View file

@ -0,0 +1,121 @@
package mage.cards.c;
import java.util.UUID;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.EntersBattlefieldOneOrMoreTriggeredAbility;
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
import mage.abilities.effects.OneShotEffect;
import mage.abilities.effects.common.counter.AddCountersAllEffect;
import mage.constants.SubType;
import mage.constants.SuperType;
import mage.constants.TargetController;
import mage.constants.Zone;
import mage.counters.CounterType;
import mage.filter.StaticFilters;
import mage.game.Game;
import mage.game.events.ZoneChangeEvent;
import mage.game.permanent.Permanent;
import mage.game.stack.Spell;
import mage.players.Player;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Outcome;
/**
* @author balazskristof
*/
public final class CelesRuneKnight extends CardImpl {
public CelesRuneKnight(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{R}{W}{B}");
this.supertype.add(SuperType.LEGENDARY);
this.subtype.add(SubType.HUMAN);
this.subtype.add(SubType.WIZARD);
this.subtype.add(SubType.KNIGHT);
this.power = new MageInt(4);
this.toughness = new MageInt(4);
// When Celes enters, discard any number of cards, then draw that many cards plus one.
this.addAbility(new EntersBattlefieldTriggeredAbility(new CelesRuneKnightEffect()));
// Whenever one or more other creatures you control enter, if one or more of them entered from a graveyard or was cast from a graveyard, put a +1/+1 counter on each creature you control.
this.addAbility(new CelesRuneKnightTriggeredAbility());
}
private CelesRuneKnight(final CelesRuneKnight card) {
super(card);
}
@Override
public CelesRuneKnight copy() {
return new CelesRuneKnight(this);
}
}
class CelesRuneKnightEffect extends OneShotEffect {
CelesRuneKnightEffect() {
super(Outcome.DrawCard);
staticText = "discard any number of cards, then draw that many cards plus one";
}
private CelesRuneKnightEffect(final CelesRuneKnightEffect effect) {
super(effect);
}
@Override
public CelesRuneKnightEffect copy() {
return new CelesRuneKnightEffect(this);
}
@Override
public boolean apply(Game game, Ability source) {
Player player = game.getPlayer(source.getControllerId());
if (player == null) {
return false;
}
int discarded = player.discard(0, Integer.MAX_VALUE, false, source, game).size();
game.processAction();
player.drawCards(discarded + 1, source, game);
return true;
}
}
class CelesRuneKnightTriggeredAbility extends EntersBattlefieldOneOrMoreTriggeredAbility {
CelesRuneKnightTriggeredAbility() {
super(new AddCountersAllEffect(CounterType.P1P1.createInstance(), StaticFilters.FILTER_CONTROLLED_CREATURE), StaticFilters.FILTER_OTHER_CONTROLLED_CREATURES, TargetController.YOU);
setTriggerPhrase("Whenever one or more other creatures you control enter, "
+ "if one or more of them entered from a graveyard or was cast from a graveyard, ");
}
private CelesRuneKnightTriggeredAbility(final CelesRuneKnightTriggeredAbility ability) {
super(ability);
}
@Override
public CelesRuneKnightTriggeredAbility copy() {
return new CelesRuneKnightTriggeredAbility(this);
}
@Override
public boolean checkEvent(ZoneChangeEvent event, Game game) {
if (super.checkEvent(event, game)) {
Zone fromZone = event.getFromZone();
if (fromZone == Zone.GRAVEYARD) {
return true;
}
if (fromZone == Zone.STACK) {
Permanent permanent = event.getTarget();
Spell spell = game.getSpellOrLKIStack(permanent.getId());
if (spell != null && spell.getFromZone() == Zone.GRAVEYARD) {
return true;
}
}
}
return false;
}
}

View file

@ -24,7 +24,7 @@ public final class ChimericCoils extends CardImpl {
public ChimericCoils(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{1}");
// {X}{1}: Chimeric Coils becomes an X/X Construct artifact creature. Sacrifice it at the beginning of thhe next end step.
// {X}{1}: Chimeric Coils becomes an X/X Construct artifact creature. Sacrifice it at the beginning of the next end step.
Ability ability = new SimpleActivatedAbility(new ChimericCoilsEffect(), new ManaCostsImpl<>("{X}{1}"));
ability.addEffect(new CreateDelayedTriggeredAbilityEffect(new AtTheBeginOfNextEndStepDelayedTriggeredAbility(new SacrificeSourceEffect())));
this.addAbility(ability);
@ -45,6 +45,7 @@ class ChimericCoilsEffect extends ContinuousEffectImpl {
ChimericCoilsEffect() {
super(Duration.Custom, Outcome.BecomeCreature);
staticText = "{this} becomes an X/X Construct artifact creature";
this.dependencyTypes.add(DependencyType.BecomeCreature);
}
private ChimericCoilsEffect(final ChimericCoilsEffect effect) {

View file

@ -40,6 +40,7 @@ class ChimericStaffEffect extends ContinuousEffectImpl {
ChimericStaffEffect() {
super(Duration.EndOfTurn, Outcome.BecomeCreature);
staticText = "{this} becomes an X/X Construct artifact creature until end of turn";
this.dependencyTypes.add(DependencyType.BecomeCreature);
}
private ChimericStaffEffect(final ChimericStaffEffect effect) {

View file

@ -0,0 +1,43 @@
package mage.cards.c;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.FlurryAbility;
import mage.abilities.effects.common.DamagePlayersEffect;
import mage.abilities.effects.common.GainLifeEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.TargetController;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class CoriMountainStalwart extends CardImpl {
public CoriMountainStalwart(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{R}{W}");
this.subtype.add(SubType.HUMAN);
this.subtype.add(SubType.MONK);
this.power = new MageInt(3);
this.toughness = new MageInt(3);
// Flurry -- Whenever you cast your second spell each turn, this creature deals 2 damage to each opponent and you gain 2 life.
Ability ability = new FlurryAbility(new DamagePlayersEffect(2, TargetController.OPPONENT));
ability.addEffect(new GainLifeEffect(2).concatBy("and"));
this.addAbility(ability);
}
private CoriMountainStalwart(final CoriMountainStalwart card) {
super(card);
}
@Override
public CoriMountainStalwart copy() {
return new CoriMountainStalwart(this);
}
}

View file

@ -0,0 +1,34 @@
package mage.cards.c;
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
import mage.abilities.effects.common.LoseLifeSourceControllerEffect;
import mage.abilities.effects.keyword.SurveilEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class CruelTruths extends CardImpl {
public CruelTruths(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{3}{B}");
// Surveil 2, then draw two cards. You lose 2 life.
this.getSpellAbility().addEffect(new SurveilEffect(2));
this.getSpellAbility().addEffect(new DrawCardSourceControllerEffect(2).concatBy(", then"));
this.getSpellAbility().addEffect(new LoseLifeSourceControllerEffect(2));
}
private CruelTruths(final CruelTruths card) {
super(card);
}
@Override
public CruelTruths copy() {
return new CruelTruths(this);
}
}

View file

@ -70,6 +70,7 @@ class CyberdriveAwakenerEffect extends ContinuousEffectImpl {
super(Duration.EndOfTurn, Outcome.BecomeCreature);
staticText = "until end of turn, each noncreature artifact you control " +
"becomes an artifact creature with base power and toughness 4/4";
this.dependencyTypes.add(DependencyType.BecomeCreature);
}
private CyberdriveAwakenerEffect(final CyberdriveAwakenerEffect effect) {

View file

@ -0,0 +1,40 @@
package mage.cards.d;
import mage.MageInt;
import mage.abilities.keyword.MobilizeAbility;
import mage.abilities.keyword.VigilanceAbility;
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 DalkovanPackbeasts extends CardImpl {
public DalkovanPackbeasts(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{W}");
this.subtype.add(SubType.OX);
this.power = new MageInt(0);
this.toughness = new MageInt(4);
// Vigilance
this.addAbility(VigilanceAbility.getInstance());
// Mobilize 3
this.addAbility(new MobilizeAbility(3));
}
private DalkovanPackbeasts(final DalkovanPackbeasts card) {
super(card);
}
@Override
public DalkovanPackbeasts copy() {
return new DalkovanPackbeasts(this);
}
}

View file

@ -0,0 +1,43 @@
package mage.cards.d;
import mage.MageInt;
import mage.abilities.common.FlurryAbility;
import mage.abilities.effects.common.DamagePlayersEffect;
import mage.abilities.keyword.HasteAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.TargetController;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class DevotedDuelist extends CardImpl {
public DevotedDuelist(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{R}");
this.subtype.add(SubType.GOBLIN);
this.subtype.add(SubType.MONK);
this.power = new MageInt(2);
this.toughness = new MageInt(1);
// Haste
this.addAbility(HasteAbility.getInstance());
// Flurry -- Whenever you cast your second spell each turn, this creature deals 1 damage to each opponent.
this.addAbility(new FlurryAbility(new DamagePlayersEffect(1, TargetController.OPPONENT)));
}
private DevotedDuelist(final DevotedDuelist card) {
super(card);
}
@Override
public DevotedDuelist copy() {
return new DevotedDuelist(this);
}
}

View file

@ -0,0 +1,41 @@
package mage.cards.d;
import java.util.UUID;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.effects.common.continuous.CastFromHandWithoutPayingManaCostEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.filter.FilterCard;
import mage.filter.predicate.Predicates;
/**
* @author balazskristof
*/
public final class Dracogenesis extends CardImpl {
public static final FilterCard filter = new FilterCard("Dragon spells");
static {
filter.add(Predicates.not(CardType.LAND.getPredicate()));
filter.add(SubType.DRAGON.getPredicate());
}
public Dracogenesis(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{6}{R}{R}");
// You may cast Dragon spells without paying their mana costs.
this.addAbility(new SimpleStaticAbility(new CastFromHandWithoutPayingManaCostEffect(filter, false)));
}
private Dracogenesis(final Dracogenesis card) {
super(card);
}
@Override
public Dracogenesis copy() {
return new Dracogenesis(this);
}
}

View file

@ -0,0 +1,40 @@
package mage.cards.d;
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
import mage.abilities.common.LandfallAbility;
import mage.abilities.effects.common.CreateTokenEffect;
import mage.abilities.effects.common.DamageAllEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.filter.StaticFilters;
import mage.game.permanent.token.DragonToken;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class DragonbackAssault extends CardImpl {
public DragonbackAssault(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{3}{G}{U}{R}");
// When this enchantment enters, it deals 3 damage to each creature and each planeswalker.
this.addAbility(new EntersBattlefieldTriggeredAbility(new DamageAllEffect(
3, StaticFilters.FILTER_PERMANENT_CREATURE_OR_PLANESWALKER
).setText("it deals 3 damage to each creature and each planeswalker")));
// Landfall -- Whenever a land you control enters, create a 4/4 red Dragon creature token with flying.
this.addAbility(new LandfallAbility(new CreateTokenEffect(new DragonToken())));
}
private DragonbackAssault(final DragonbackAssault card) {
super(card);
}
@Override
public DragonbackAssault copy() {
return new DragonbackAssault(this);
}
}

View file

@ -0,0 +1,40 @@
package mage.cards.d;
import java.util.UUID;
import mage.MageInt;
import mage.constants.SubType;
import mage.abilities.keyword.FlyingAbility;
import mage.abilities.keyword.MobilizeAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
/**
* @author balazskristof
*/
public final class DragonbackLancer extends CardImpl {
public DragonbackLancer(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{W}");
this.subtype.add(SubType.HUMAN);
this.subtype.add(SubType.SOLDIER);
this.power = new MageInt(3);
this.toughness = new MageInt(3);
// Flying
this.addAbility(FlyingAbility.getInstance());
// Mobilize 1
this.addAbility(new MobilizeAbility(1));
}
private DragonbackLancer(final DragonbackLancer card) {
super(card);
}
@Override
public DragonbackLancer copy() {
return new DragonbackLancer(this);
}
}

View file

@ -0,0 +1,42 @@
package mage.cards.d;
import mage.MageInt;
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
import mage.abilities.effects.keyword.EndureSourceEffect;
import mage.abilities.keyword.ReachAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class DusyutEarthcarver extends CardImpl {
public DusyutEarthcarver(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{5}{G}");
this.subtype.add(SubType.ELEPHANT);
this.subtype.add(SubType.DRUID);
this.power = new MageInt(4);
this.toughness = new MageInt(4);
// Reach
this.addAbility(ReachAbility.getInstance());
// When this creature enters, it endures 3.
this.addAbility(new EntersBattlefieldTriggeredAbility(new EndureSourceEffect(3)));
}
private DusyutEarthcarver(final DusyutEarthcarver card) {
super(card);
}
@Override
public DusyutEarthcarver copy() {
return new DusyutEarthcarver(this);
}
}

View file

@ -87,7 +87,7 @@ class EccentricApprenticeEffect extends ContinuousEffectImpl {
switch (layer) {
case TypeChangingEffects_4:
permanent.removeAllCreatureTypes(game);
permanent.removeSubType(game, SubType.BIRD);
permanent.addSubType(game, SubType.BIRD);
return true;
case AbilityAddingRemovingEffects_6:
permanent.addAbility(FlyingAbility.getInstance(), source.getSourceId(), game);

View file

@ -0,0 +1,45 @@
package mage.cards.e;
import mage.MageInt;
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
import mage.abilities.common.FlurryAbility;
import mage.abilities.effects.common.ExileTopXMayPlayUntilEffect;
import mage.abilities.effects.common.continuous.GainAbilitySourceEffect;
import mage.abilities.keyword.DoubleStrikeAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.SubType;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class EquilibriumAdept extends CardImpl {
public EquilibriumAdept(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{R}");
this.subtype.add(SubType.DOG);
this.subtype.add(SubType.MONK);
this.power = new MageInt(2);
this.toughness = new MageInt(4);
// When this creature enters, exile the top card of your library. Until the end of your next turn, you may play that card.
this.addAbility(new EntersBattlefieldTriggeredAbility(new ExileTopXMayPlayUntilEffect(1, Duration.UntilEndOfYourNextTurn)));
// Flurry -- Whenever you cast your second spell each turn, this creature gains double strike until end of turn.
this.addAbility(new FlurryAbility(new GainAbilitySourceEffect(DoubleStrikeAbility.getInstance(), Duration.EndOfTurn)));
}
private EquilibriumAdept(final EquilibriumAdept card) {
super(card);
}
@Override
public EquilibriumAdept copy() {
return new EquilibriumAdept(this);
}
}

View file

@ -130,6 +130,7 @@ class ChimericStaffEffect extends ContinuousEffectImpl {
ChimericStaffEffect() {
super(Duration.EndOfTurn, Outcome.BecomeCreature);
staticText = "{this} becomes an X/X Construct artifact creature until end of turn";
this.dependencyTypes.add(DependencyType.BecomeCreature);
}
private ChimericStaffEffect(final ChimericStaffEffect effect) {

View file

@ -0,0 +1,58 @@
package mage.cards.f;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.Mode;
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
import mage.abilities.effects.common.CounterTargetEffect;
import mage.abilities.effects.common.DestroyTargetEffect;
import mage.abilities.effects.common.GainLifeEffect;
import mage.abilities.effects.keyword.SurveilEffect;
import mage.abilities.keyword.FlashAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.filter.StaticFilters;
import mage.target.TargetSpell;
import mage.target.common.TargetEnchantmentPermanent;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class FangkeepersFamiliar extends CardImpl {
public FangkeepersFamiliar(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{B}{G}{U}");
this.subtype.add(SubType.SNAKE);
this.power = new MageInt(3);
this.toughness = new MageInt(3);
// Flash
this.addAbility(FlashAbility.getInstance());
// When this creature enters, choose one --
// * You gain 3 life and surveil 3.
Ability ability = new EntersBattlefieldTriggeredAbility(new GainLifeEffect(3));
ability.addEffect(new SurveilEffect(3).concatBy("and"));
// * Destroy target enchantment.
ability.addMode(new Mode(new DestroyTargetEffect()).addTarget(new TargetEnchantmentPermanent()));
// * Counter target creature spell.
ability.addMode(new Mode(new CounterTargetEffect()).addTarget(new TargetSpell(StaticFilters.FILTER_SPELL_CREATURE)));
this.addAbility(ability);
}
private FangkeepersFamiliar(final FangkeepersFamiliar card) {
super(card);
}
@Override
public FangkeepersFamiliar copy() {
return new FangkeepersFamiliar(this);
}
}

View file

@ -0,0 +1,38 @@
package mage.cards.f;
import mage.MageInt;
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
import mage.abilities.effects.keyword.EndureSourceEffect;
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 FortressKinGuard extends CardImpl {
public FortressKinGuard(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{W}");
this.subtype.add(SubType.DOG);
this.subtype.add(SubType.SOLDIER);
this.power = new MageInt(1);
this.toughness = new MageInt(2);
// When this creature enters, it endures 1.
this.addAbility(new EntersBattlefieldTriggeredAbility(new EndureSourceEffect(1)));
}
private FortressKinGuard(final FortressKinGuard card) {
super(card);
}
@Override
public FortressKinGuard copy() {
return new FortressKinGuard(this);
}
}

View file

@ -0,0 +1,54 @@
package mage.cards.f;
import mage.abilities.Ability;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.effects.common.AttachEffect;
import mage.abilities.effects.common.continuous.BoostEnchantedEffect;
import mage.abilities.effects.common.continuous.LoseAllAbilitiesAttachedEffect;
import mage.abilities.keyword.EnchantAbility;
import mage.abilities.keyword.FlashAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.AttachmentType;
import mage.constants.CardType;
import mage.constants.Outcome;
import mage.constants.SubType;
import mage.target.TargetPermanent;
import mage.target.common.TargetCreaturePermanent;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class FreshStart extends CardImpl {
public FreshStart(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 gets -5/-0 and loses all abilities.
Ability ability = new SimpleStaticAbility(new BoostEnchantedEffect(-5, 0));
ability.addEffect(new LoseAllAbilitiesAttachedEffect(AttachmentType.AURA).setText("and loses all abilities"));
this.addAbility(ability);
}
private FreshStart(final FreshStart card) {
super(card);
}
@Override
public FreshStart copy() {
return new FreshStart(this);
}
}

View file

@ -0,0 +1,80 @@
package mage.cards.f;
import java.util.UUID;
import mage.abilities.DelayedTriggeredAbility;
import mage.abilities.condition.OrCondition;
import mage.abilities.condition.common.IsPhaseCondition;
import mage.abilities.decorator.ConditionalOneShotEffect;
import mage.abilities.effects.common.*;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.*;
import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.permanent.AttackedThisTurnPredicate;
import mage.game.Game;
import mage.game.events.GameEvent;
import mage.game.turn.Turn;
/**
*
* @author Jmlundeen
*/
public final class FullThrottle extends CardImpl {
public FullThrottle(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{4}{R}{R}");
// After this main phase, there are two additional combat phases.
this.getSpellAbility().addEffect(new ConditionalOneShotEffect(
new AdditionalCombatPhaseEffect(2),
new OrCondition(new IsPhaseCondition(TurnPhase.PRECOMBAT_MAIN), new IsPhaseCondition(TurnPhase.POSTCOMBAT_MAIN)),
"After this main phase, there are two additional combat phases."
));
// At the beginning of each combat this turn, untap all creatures that attacked this turn.
DelayedTriggeredAbility ability = new FullThrottleTriggeredAbility();
this.getSpellAbility().addEffect(new CreateDelayedTriggeredAbilityEffect(ability).concatBy("<br>"));
}
private FullThrottle(final FullThrottle card) {
super(card);
}
@Override
public FullThrottle copy() {
return new FullThrottle(this);
}
}
class FullThrottleTriggeredAbility extends DelayedTriggeredAbility {
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creatures that attacked this turn");
static {
filter.add(AttackedThisTurnPredicate.instance);
}
public FullThrottleTriggeredAbility() {
super(new UntapAllEffect(filter), Duration.EndOfTurn, false);
setTriggerPhrase("At the beginning of each combat this turn, ");
}
private FullThrottleTriggeredAbility(final FullThrottleTriggeredAbility ability) {
super(ability);
}
@Override
public FullThrottleTriggeredAbility copy() {
return new FullThrottleTriggeredAbility(this);
}
@Override
public boolean checkEventType(GameEvent event, Game game) {
return event.getType() == GameEvent.EventType.COMBAT_PHASE_PRE;
}
@Override
public boolean checkTrigger(GameEvent event, Game game) {
Turn turn = game.getState().getTurn();
return turn.getPhase().getType() == TurnPhase.COMBAT;
}
}

View file

@ -0,0 +1,166 @@
package mage.cards.g;
import java.util.UUID;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.TriggeredAbilityImpl;
import mage.abilities.effects.ContinuousEffect;
import mage.abilities.effects.OneShotEffect;
import mage.abilities.effects.common.CreateTokenTargetEffect;
import mage.abilities.effects.common.asthought.MayLookAtTargetCardEffect;
import mage.cards.Card;
import mage.constants.*;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.filter.FilterSpell;
import mage.game.Game;
import mage.game.events.DamagedEvent;
import mage.game.events.GameEvent;
import mage.game.permanent.Permanent;
import mage.game.permanent.token.TreasureToken;
import mage.game.stack.Spell;
import mage.players.Player;
import mage.target.targetpointer.FixedTarget;
import mage.util.CardUtil;
/**
*
* @author Jmlundeen
*/
public final class GontiNightMinister extends CardImpl {
public GontiNightMinister(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{B}{B}");
this.supertype.add(SuperType.LEGENDARY);
this.subtype.add(SubType.AETHERBORN);
this.subtype.add(SubType.ROGUE);
this.power = new MageInt(3);
this.toughness = new MageInt(4);
// Whenever a player casts a spell they don't own, that player creates a Treasure token.
this.addAbility(new GontiSpellTriggeredAbility());
// Whenever a creature deals combat damage to one of your opponents, its controller looks at the top card of that opponent's library and exiles it face down. They may play that card for as long as it remains exiled. Mana of any type can be spent to cast a spell this way.
this.addAbility(new GontiTriggeredAbility());
}
private GontiNightMinister(final GontiNightMinister card) {
super(card);
}
@Override
public GontiNightMinister copy() {
return new GontiNightMinister(this);
}
}
class GontiSpellTriggeredAbility extends TriggeredAbilityImpl {
public GontiSpellTriggeredAbility() {
super(Zone.BATTLEFIELD, new CreateTokenTargetEffect(new TreasureToken()), false);
setTriggerPhrase("Whenever a player casts a spell they don't own, ");
}
private GontiSpellTriggeredAbility(final GontiSpellTriggeredAbility ability) {
super(ability);
}
@Override
public GontiSpellTriggeredAbility copy() {
return new GontiSpellTriggeredAbility(this);
}
@Override
public boolean checkEventType(GameEvent event, Game game) {
return event.getType() == GameEvent.EventType.SPELL_CAST;
}
@Override
public boolean checkTrigger(GameEvent event, Game game) {
Player player = game.getPlayer(event.getPlayerId());
Spell spell = game.getSpell(event.getTargetId());
if (player != null && spell != null && !player.getId().equals(spell.getOwnerId())) {
getEffects().setTargetPointer(new FixedTarget(player.getId()));
return true;
}
return false;
}
}
class GontiTriggeredAbility extends TriggeredAbilityImpl {
public GontiTriggeredAbility() {
super(Zone.BATTLEFIELD, new GontiExileEffect(), false);
setTriggerPhrase("Whenever a creature deals combat damage to one of your opponents, ");
}
private GontiTriggeredAbility(final GontiTriggeredAbility ability) {
super(ability);
}
@Override
public GontiTriggeredAbility copy() {
return new GontiTriggeredAbility(this);
}
@Override
public boolean checkEventType(GameEvent event, Game game) {
return event.getType() == GameEvent.EventType.DAMAGED_PLAYER;
}
@Override
public boolean checkTrigger(GameEvent event, Game game) {
DamagedEvent damagedEvent = (DamagedEvent) event;
if (damagedEvent.isCombatDamage() && game.getOpponents(controllerId).contains(damagedEvent.getTargetId())) {
Permanent permanent = game.getPermanentOrLKIBattlefield(damagedEvent.getSourceId());
if (permanent != null && permanent.isCreature(game)) {
getEffects().setTargetPointer(new FixedTarget(damagedEvent.getTargetId()));
this.getEffects().setValue("controllerId", permanent.getControllerId());
return true;
}
}
return false;
}
}
class GontiExileEffect extends OneShotEffect {
GontiExileEffect() {
super(Outcome.Exile);
staticText = "its controller looks at the top card of that opponent's library and exiles it face down." +
" They may play that card for as long as it remains exiled. " +
"Mana of any type can be spent to cast a spell this way.";
}
private GontiExileEffect(final GontiExileEffect effect) {
super(effect);
}
@Override
public GontiExileEffect copy() {
return new GontiExileEffect(this);
}
@Override
public boolean apply(Game game, Ability source) {
Player targetOpponent = game.getPlayer(getTargetPointer().getFirst(game, source));
Player controller = game.getPlayer((UUID) source.getEffects().get(0).getValue("controllerId"));
if (targetOpponent == null || controller == null ) {
return false;
}
Card card = targetOpponent.getLibrary().getFromTop(game);
if (card == null) {
return false;
}
UUID exileZoneId = CardUtil.getExileZoneId(game, controller.getId(), source.getSourceObjectZoneChangeCounter());
String exileName = CardUtil.getSourceName(game, source) + " - " + controller.getName();
if (controller.moveCardsToExile(card, source, game, false, exileZoneId, exileName)) {
card.setFaceDown(true, game);
CardUtil.makeCardPlayable(game, source, card, false, Duration.Custom, true, controller.getId(), null);
}
ContinuousEffect effect = new MayLookAtTargetCardEffect(controller.getId());
effect.setTargetPointer(new FixedTarget(card.getId()));
game.addEffect(effect, source);
return true;
}
}

View file

@ -81,6 +81,7 @@ class GrandMasterOfFlowersEffect extends ContinuousEffectImpl {
super(Duration.WhileOnBattlefield, Outcome.Benefit);
staticText = "as long as {this} has seven or more loyalty counters on him, " +
"he's a 7/7 Dragon God creature with flying and indestructible";
this.dependencyTypes.add(DependencyType.BecomeCreature);
}
private GrandMasterOfFlowersEffect(final GrandMasterOfFlowersEffect effect) {

View file

@ -91,6 +91,7 @@ class GristTheHungerTideTypeEffect extends ContinuousEffectImpl {
super(Duration.Custom, Outcome.Benefit);
staticText = "as long as {this} isn't on the battlefield, " +
"it's a 1/1 Insect creature in addition to its other types";
this.dependencyTypes.add(DependencyType.BecomeCreature);
}
private GristTheHungerTideTypeEffect(final GristTheHungerTideTypeEffect effect) {

View file

@ -0,0 +1,66 @@
package mage.cards.g;
import java.util.UUID;
import mage.abilities.Ability;
import mage.abilities.common.ActivateAsSorceryActivatedAbility;
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.costs.CompositeCost;
import mage.abilities.costs.common.TapSourceCost;
import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
import mage.abilities.effects.common.SaddleTargetMountEffect;
import mage.abilities.effects.common.continuous.AddCardTypeTargetEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.SubType;
import mage.filter.common.FilterControlledPermanent;
import mage.target.TargetPermanent;
/**
*
* @author Jmlundeen
*/
public final class GuidelightMatrix extends CardImpl {
private static final FilterControlledPermanent mountFilter = new FilterControlledPermanent("Mount you control");
private static final FilterControlledPermanent vehicleFilter = new FilterControlledPermanent("Vehicle you control");
static {
mountFilter.add(SubType.MOUNT.getPredicate());
vehicleFilter.add(SubType.VEHICLE.getPredicate());
}
public GuidelightMatrix(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{2}");
// When this artifact enters, draw a card.
this.addAbility(new EntersBattlefieldTriggeredAbility(new DrawCardSourceControllerEffect(1)));
// {2}, {T}: Target Mount you control becomes saddled until end of turn. Activate only as a sorcery.
Ability saddledAbility = new ActivateAsSorceryActivatedAbility(new SaddleTargetMountEffect(), new ManaCostsImpl<>("{2}"));
saddledAbility.addCost(new TapSourceCost());
saddledAbility.addTarget(new TargetPermanent(mountFilter));
this.addAbility(saddledAbility);
// {2}, {T}: Target Vehicle you control becomes an artifact creature until end of turn.
Ability animateVehicleAbility = new SimpleActivatedAbility(
new AddCardTypeTargetEffect(Duration.EndOfTurn, CardType.ARTIFACT, CardType.CREATURE)
.setText("Target Vehicle you control becomes an artifact creature until end of turn."),
new ManaCostsImpl<>("{2}"));
animateVehicleAbility.addCost(new TapSourceCost());
animateVehicleAbility.addTarget(new TargetPermanent(vehicleFilter));
this.addAbility(animateVehicleAbility);
}
private GuidelightMatrix(final GuidelightMatrix card) {
super(card);
}
@Override
public GuidelightMatrix copy() {
return new GuidelightMatrix(this);
}
}

View file

@ -63,6 +63,7 @@ class HalsinEmeraldArchdruidEffect extends ContinuousEffectImpl {
super(Duration.EndOfTurn, Outcome.Benefit);
staticText = "until end of turn, target token you control becomes a green Bear creature " +
"with base power and toughness 4/4 in addition to its other colors and types";
this.dependencyTypes.add(DependencyType.BecomeCreature);
}
private HalsinEmeraldArchdruidEffect(final HalsinEmeraldArchdruidEffect effect) {

View file

@ -0,0 +1,118 @@
package mage.cards.h;
import java.util.Optional;
import java.util.UUID;
import mage.MageInt;
import mage.ObjectColor;
import mage.abilities.Ability;
import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.effects.Effect;
import mage.abilities.effects.OneShotEffect;
import mage.abilities.effects.common.CreateTokenCopyTargetEffect;
import mage.abilities.effects.common.DiscardCardControllerTriggeredAbility;
import mage.abilities.effects.common.DoIfCostPaid;
import mage.abilities.hint.StaticHint;
import mage.cards.Card;
import mage.constants.Outcome;
import mage.constants.SubType;
import mage.constants.SuperType;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.filter.StaticFilters;
import mage.game.Game;
import mage.players.Player;
import mage.target.targetpointer.FixedTarget;
/**
* @author sobiech
*/
public final class HashatonScarabsFist extends CardImpl {
public HashatonScarabsFist(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{W}{B}");
this.supertype.add(SuperType.LEGENDARY);
this.subtype.add(SubType.ZOMBIE);
this.subtype.add(SubType.WIZARD);
this.power = new MageInt(1);
this.toughness = new MageInt(3);
// Whenever you discard a creature card, you may pay {2}{U}. If you do, create a tapped token that's a copy of that card, except it's a 4/4 black Zombie.
final Ability ability = new DiscardCardControllerTriggeredAbility(
new DoIfCostPaid(new HashatonScarabsFistEffect(), new ManaCostsImpl<>("{2}{U}"))
.withChooseHint(new HashatonScarabsFistHint()),
false, StaticFilters.FILTER_CARD_CREATURE_A
);
this.addAbility(ability);
}
private HashatonScarabsFist(final HashatonScarabsFist card) {
super(card);
}
@Override
public HashatonScarabsFist copy() {
return new HashatonScarabsFist(this);
}
}
class HashatonScarabsFistHint extends StaticHint {
public HashatonScarabsFistHint() {
super("");
}
@Override
public String getText(Game game, Ability source) {
if (source.getEffects().isEmpty()) {
return "";
}
for (Effect effect : source.getEffects()) {
Card discardedCard = (Card) effect.getValue("discardedCard");
if (discardedCard != null) {
return "Discarded card: " + discardedCard.getName();
}
}
return "";
}
}
class HashatonScarabsFistEffect extends OneShotEffect {
HashatonScarabsFistEffect() {
super(Outcome.PutCreatureInPlay);
this.staticText = "create a tapped token that`s a copy of that card, except it`s a 4/4 black Zombie";
}
private HashatonScarabsFistEffect(OneShotEffect effect) {
super(effect);
}
@Override
public boolean apply(Game game, Ability source) {
Player player = game.getPlayer(source.getControllerId());
if (player == null) {
return false;
}
return Optional.ofNullable(this.values.get("discardedCard"))
.map(CardImpl.class::cast)
.filter(CardImpl::isCreature)
//create a tapped token that's a copy of that card, except it's a 4/4 black Zombie.
.map(card -> new CreateTokenCopyTargetEffect(null, null, false, 1,
true, false, null, 4, 4, false)
.setOnlyColor(ObjectColor.BLACK)
.setOnlySubType(SubType.ZOMBIE)
.setTargetPointer(new FixedTarget(card, game))
.apply(game, source)
)
.orElse(false);
}
@Override
public HashatonScarabsFistEffect copy() {
return new HashatonScarabsFistEffect(this);
}
}

View file

@ -0,0 +1,57 @@
package mage.cards.h;
import java.util.UUID;
import mage.abilities.condition.common.SacrificedPermanentCondition;
import mage.abilities.costs.common.SacrificeTargetCost;
import mage.abilities.decorator.ConditionalOneShotEffect;
import mage.abilities.effects.common.DestroyTargetEffect;
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.filter.FilterPermanent;
import mage.filter.StaticFilters;
import mage.filter.predicate.Predicates;
import mage.target.TargetPermanent;
/**
*
* @author Jmlundeen
*/
public final class HellishSideswipe extends CardImpl {
private static final FilterPermanent filter = new FilterPermanent("creature or Vehicle");
static {
filter.add(Predicates.or(
CardType.CREATURE.getPredicate(),
SubType.VEHICLE.getPredicate()
));
}
public HellishSideswipe(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{B}");
// As an additional cost to cast this spell, sacrifice an artifact or creature.
this.getSpellAbility().addCost(new SacrificeTargetCost(StaticFilters.FILTER_CONTROLLED_PERMANENT_ARTIFACT_OR_CREATURE));
// Destroy target creature or Vehicle. If the sacrificed permanent was a Vehicle, draw a card.
this.getSpellAbility().addEffect(new DestroyTargetEffect("Destroy target creature or Vehicle"));
this.getSpellAbility().addEffect(new ConditionalOneShotEffect(
new DrawCardSourceControllerEffect(1),
new SacrificedPermanentCondition(new FilterPermanent(SubType.VEHICLE, "permanent was a Vehicle"))
));
this.getSpellAbility().addTarget(new TargetPermanent(filter));
}
private HellishSideswipe(final HellishSideswipe card) {
super(card);
}
@Override
public HellishSideswipe copy() {
return new HellishSideswipe(this);
}
}

View file

@ -0,0 +1,47 @@
package mage.cards.h;
import mage.abilities.Mode;
import mage.abilities.effects.common.DestroyTargetEffect;
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
import mage.abilities.effects.common.ExileTargetEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.target.common.TargetArtifactPermanent;
import mage.target.common.TargetCardInGraveyard;
import mage.target.common.TargetEnchantmentPermanent;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class HeritageReclamation extends CardImpl {
public HeritageReclamation(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{1}{G}");
// Choose one --
// * Destroy target artifact.
this.getSpellAbility().addEffect(new DestroyTargetEffect());
this.getSpellAbility().addTarget(new TargetArtifactPermanent());
// * Destroy target enchantment.
this.getSpellAbility().addMode(new Mode(new DestroyTargetEffect())
.addTarget(new TargetEnchantmentPermanent()));
// * Exile up to one target card from a graveyard. Draw a card.
this.getSpellAbility().addMode(new Mode(new ExileTargetEffect())
.addEffect(new DrawCardSourceControllerEffect(1))
.addTarget(new TargetCardInGraveyard(0, 1)));
}
private HeritageReclamation(final HeritageReclamation card) {
super(card);
}
@Override
public HeritageReclamation copy() {
return new HeritageReclamation(this);
}
}

View file

@ -72,6 +72,7 @@ class IdolOfFalseGodsEffect extends ContinuousEffectImpl {
super(Duration.WhileOnBattlefield, Outcome.Benefit);
staticText = "as long as {this} has eight or more +1/+1 counters on it, " +
"it's a 0/0 creature in addition to its other types and it has annihilator 2";
this.dependencyTypes.add(DependencyType.BecomeCreature);
}
private IdolOfFalseGodsEffect(final IdolOfFalseGodsEffect effect) {

View file

@ -0,0 +1,49 @@
package mage.cards.j;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.costs.common.TapSourceCost;
import mage.abilities.costs.mana.GenericManaCost;
import mage.abilities.effects.common.PutOnLibraryTargetEffect;
import mage.abilities.keyword.ReachAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.target.common.TargetCardInGraveyard;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class JadeCastSentinel extends CardImpl {
public JadeCastSentinel(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{4}");
this.subtype.add(SubType.APE);
this.subtype.add(SubType.SNAKE);
this.power = new MageInt(1);
this.toughness = new MageInt(5);
// Reach
this.addAbility(ReachAbility.getInstance());
// {2}, {T}: Put target card from a graveyard on the bottom of its owner's library.
Ability ability = new SimpleActivatedAbility(new PutOnLibraryTargetEffect(false), new GenericManaCost(2));
ability.addCost(new TapSourceCost());
ability.addTarget(new TargetCardInGraveyard());
this.addAbility(ability);
}
private JadeCastSentinel(final JadeCastSentinel card) {
super(card);
}
@Override
public JadeCastSentinel copy() {
return new JadeCastSentinel(this);
}
}

View file

@ -60,6 +60,7 @@ class KarnSilverGolemEffect extends ContinuousEffectImpl {
KarnSilverGolemEffect() {
super(Duration.EndOfTurn, Outcome.BecomeCreature);
staticText = "Target noncreature artifact becomes an artifact creature with power and toughness each equal to its mana value until end of turn";
this.dependencyTypes.add(DependencyType.BecomeCreature);
}
private KarnSilverGolemEffect(final KarnSilverGolemEffect effect) {

View file

@ -96,6 +96,7 @@ class KarnTheGreatCreatorAnimateEffect extends ContinuousEffectImpl {
super(Duration.UntilYourNextTurn, Outcome.BecomeCreature);
staticText = "Until your next turn, up to one target noncreature artifact becomes " +
"an artifact creature with power and toughness each equal to its mana value.";
this.dependencyTypes.add(DependencyType.BecomeCreature);
}
private KarnTheGreatCreatorAnimateEffect(final KarnTheGreatCreatorAnimateEffect effect) {

View file

@ -6,11 +6,7 @@ import mage.abilities.Ability;
import mage.abilities.effects.ContinuousEffectImpl;
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.constants.*;
import mage.filter.common.FilterArtifactPermanent;
import mage.filter.predicate.Predicates;
import mage.game.Game;
@ -52,6 +48,7 @@ class KarnsTouchEffect extends ContinuousEffectImpl {
KarnsTouchEffect() {
super(Duration.EndOfTurn, Outcome.BecomeCreature);
staticText = "Target noncreature artifact becomes an artifact creature with power and toughness each equal to its mana value until end of turn";
this.dependencyTypes.add(DependencyType.BecomeCreature);
}
private KarnsTouchEffect(final KarnsTouchEffect effect) {

View file

@ -3,18 +3,16 @@ package mage.cards.k;
import java.util.UUID;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.effects.OneShotEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Outcome;
import mage.constants.SubType;
import mage.filter.StaticFilters;
import mage.game.Game;
import mage.game.permanent.Permanent;
import mage.game.permanent.token.TokenImpl;
import mage.game.permanent.token.SpiritWarriorToken;
import mage.game.permanent.token.Token;
/**
@ -72,29 +70,3 @@ class KinTreeInvocationCreateTokenEffect extends OneShotEffect {
}
}
class SpiritWarriorToken extends TokenImpl {
public SpiritWarriorToken() {
this(1);
}
public SpiritWarriorToken(int x) {
super("Spirit Warrior Token", "X/X black and green Spirit Warrior creature token, where X is the greatest toughness among creatures you control");
this.cardType.add(CardType.CREATURE);
this.subtype.add(SubType.SPIRIT);
this.subtype.add(SubType.WARRIOR);
this.color.setBlack(true);
this.color.setGreen(true);
this.power = new MageInt(x);
this.toughness = new MageInt(x);
}
private SpiritWarriorToken(final SpiritWarriorToken token) {
super(token);
}
public SpiritWarriorToken copy() {
return new SpiritWarriorToken(this);
}
}

View file

@ -0,0 +1,68 @@
package mage.cards.k;
import java.util.UUID;
import mage.MageInt;
import mage.abilities.common.EntersBattlefieldControlledTriggeredAbility;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.effects.common.SaddleTargetMountEffect;
import mage.abilities.effects.common.continuous.AddCardTypeTargetEffect;
import mage.abilities.effects.common.continuous.GainAbilityControlledEffect;
import mage.abilities.keyword.HasteAbility;
import mage.constants.*;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.filter.FilterPermanent;
import mage.filter.StaticFilters;
import mage.filter.common.FilterControlledPermanent;
import mage.filter.predicate.Predicates;
/**
*
* @author Jmlundeen
*/
public final class KolodinTriumphCaster extends CardImpl {
private static final FilterControlledPermanent filter = new FilterControlledPermanent("Mounts and Vehicles you control");
private static final FilterControlledPermanent mountFilter = new FilterControlledPermanent("Mount");
private static final FilterControlledPermanent vehicleFilter = new FilterControlledPermanent("Vehicle");
static {
filter.add(Predicates.or(
SubType.MOUNT.getPredicate(),
SubType.VEHICLE.getPredicate()
));
mountFilter.add(SubType.MOUNT.getPredicate());
vehicleFilter.add(SubType.VEHICLE.getPredicate());
}
public KolodinTriumphCaster(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{R}{W}");
this.supertype.add(SuperType.LEGENDARY);
this.subtype.add(SubType.HUMAN);
this.subtype.add(SubType.PILOT);
this.power = new MageInt(2);
this.toughness = new MageInt(3);
// Mounts and Vehicles you control have haste.
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD,
new GainAbilityControlledEffect(HasteAbility.getInstance(),
Duration.WhileOnBattlefield, filter)));
// Whenever a Mount you control enters, it becomes saddled until end of turn.
this.addAbility(new EntersBattlefieldControlledTriggeredAbility(new SaddleTargetMountEffect("it becomes saddled until end of turn"),
mountFilter));
// Whenever a Vehicle you control enters, it becomes an artifact creature until end of turn.
this.addAbility(new EntersBattlefieldControlledTriggeredAbility(new AddCardTypeTargetEffect(
Duration.EndOfTurn, CardType.ARTIFACT, CardType.CREATURE)
.setText("it becomes an artifact creature until end of turn"), vehicleFilter)
);
}
private KolodinTriumphCaster(final KolodinTriumphCaster card) {
super(card);
}
@Override
public KolodinTriumphCaster copy() {
return new KolodinTriumphCaster(this);
}
}

View file

@ -62,6 +62,7 @@ class LiegeOfTheTangleEffect extends ContinuousEffectImpl {
LiegeOfTheTangleEffect() {
super(Duration.EndOfGame, Outcome.BecomeCreature);
staticText = "each of those lands is an 8/8 green Elemental creature for as long as it has an awakening counter on it. They're still lands";
this.dependencyTypes.add(DependencyType.BecomeCreature);
}
private LiegeOfTheTangleEffect(final LiegeOfTheTangleEffect effect) {

View file

@ -0,0 +1,170 @@
package mage.cards.l;
import java.util.Optional;
import java.util.UUID;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.TriggeredAbility;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.condition.Condition;
import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility;
import mage.abilities.effects.OneShotEffect;
import mage.abilities.effects.common.MillCardsControllerEffect;
import mage.abilities.effects.common.continuous.GainAbilityControlledEffect;
import mage.abilities.hint.ConditionHint;
import mage.abilities.hint.Hint;
import mage.abilities.triggers.BeginningOfSecondMainTriggeredAbility;
import mage.cards.Card;
import mage.constants.*;
import mage.abilities.keyword.AfflictAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.filter.FilterCard;
import mage.filter.common.FilterCreatureCard;
import mage.filter.common.FilterCreaturePermanent;
import mage.game.Game;
import mage.game.events.DamagedEvent;
import mage.game.events.DamagedPlayerEvent;
import mage.game.events.GameEvent;
import mage.players.Player;
import mage.target.TargetCard;
import mage.target.common.TargetCardInYourGraveyard;
import mage.watchers.Watcher;
/**
* @author sobiech
*/
public final class LostMonarchOfIfnir extends CardImpl {
private final static Hint hint = new ConditionHint(LostMonarchOfIfnirCondition.instance, "Player was dealt combat damage by a Zombie this turn");
private final static FilterCreaturePermanent filter = new FilterCreaturePermanent(SubType.ZOMBIE, "Zombies");
public LostMonarchOfIfnir(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{B}");
this.subtype.add(SubType.ZOMBIE);
this.subtype.add(SubType.NOBLE);
this.power = new MageInt(4);
this.toughness = new MageInt(4);
// Afflict 3
this.addAbility(new AfflictAbility(3));
// Other Zombies you control have afflict 3.
this.addAbility(new SimpleStaticAbility(new GainAbilityControlledEffect(
new AfflictAbility(3),
Duration.WhileOnBattlefield,
filter,
true
)));
final TriggeredAbility ability = new BeginningOfSecondMainTriggeredAbility(
Zone.BATTLEFIELD,
TargetController.YOU,
new LostMonarchOfIfnirEffect(),
false
);
ability.addHint(hint);
// At the beginning of your second main phase, if a player was dealt combat damage by a Zombie this turn, mill three cards, then you may return a creature card from your graveyard to your hand.
this.addAbility(new ConditionalInterveningIfTriggeredAbility(
ability,
LostMonarchOfIfnirCondition.instance,
"at the beginning of your second main phase, " +
"if a player was dealt combat damage by a Zombie this turn, " +
"mill three cards, then you may return a creature card from your graveyard to your hand"
), new LostMonarchOfIfnirWatcher());
}
private LostMonarchOfIfnir(final LostMonarchOfIfnir card) {
super(card);
}
@Override
public LostMonarchOfIfnir copy() {
return new LostMonarchOfIfnir(this);
}
}
class LostMonarchOfIfnirEffect extends OneShotEffect {
private static final FilterCard filter = new FilterCreatureCard();
LostMonarchOfIfnirEffect() {
super(Outcome.Benefit);
}
private LostMonarchOfIfnirEffect(OneShotEffect effect){
super(effect);
}
@Override
public boolean apply(Game game, Ability source) {
new MillCardsControllerEffect(3).apply(game, source);
final TargetCard target = new TargetCardInYourGraveyard(0, 1, filter, true);
final Player player = game.getPlayer(source.getControllerId());
if (player == null) {
return false;
}
if (!player.choose(Outcome.ReturnToHand, target, source, game)) {
return true;
}
final Card card = game.getCard(target.getFirstTarget());
if (card == null) {
return true;
}
player.moveCards(card, Zone.HAND, source, game);
return true;
}
@Override
public LostMonarchOfIfnirEffect copy() {
return new LostMonarchOfIfnirEffect(this);
}
}
enum LostMonarchOfIfnirCondition implements Condition {
instance;
@Override
public boolean apply(Game game, Ability source) {
final LostMonarchOfIfnirWatcher watcher = game.getState().getWatcher(LostMonarchOfIfnirWatcher.class);
return watcher != null && watcher.wasDealtDamage();
}
}
class LostMonarchOfIfnirWatcher extends Watcher {
private boolean dealtDamage; //by a zombie this turn
LostMonarchOfIfnirWatcher() {
super(WatcherScope.GAME);
this.dealtDamage = false;
}
@Override
public void watch(GameEvent event, Game game) {
Optional.of(event)
.filter(e -> e.getType() == GameEvent.EventType.DAMAGED_PLAYER)
.filter(e -> e instanceof DamagedPlayerEvent)
.map(DamagedPlayerEvent.class::cast)
.filter(DamagedEvent::isCombatDamage)
.map(damagedPlayerEvent -> game.getPermanentOrLKIBattlefield(event.getSourceId()))
.filter(permanent -> permanent.hasSubtype(SubType.ZOMBIE, game))
.ifPresent(ignored -> this.dealtDamage = true);
}
@Override
public void reset() {
super.reset();
this.dealtDamage = false;
}
boolean wasDealtDamage() {
return this.dealtDamage;
}
}

View file

@ -98,6 +98,7 @@ class LuxiorGiadasGiftEffect extends ContinuousEffectImpl {
LuxiorGiadasGiftEffect() {
super(Duration.WhileOnBattlefield, Layer.TypeChangingEffects_4, SubLayer.NA, Outcome.Benefit);
staticText = "equipped permanent isn't a planeswalker and is a creature in addition to its other types";
this.dependencyTypes.add(DependencyType.BecomeCreature);
}
private LuxiorGiadasGiftEffect(final LuxiorGiadasGiftEffect effect) {

View file

@ -46,6 +46,7 @@ class MajesticMetamorphosisEffect extends ContinuousEffectImpl {
super(Duration.EndOfTurn, Outcome.Benefit);
staticText = "until end of turn, target artifact or creature becomes " +
"a 4/4 Angel artifact creature and gains flying";
this.dependencyTypes.add(DependencyType.BecomeCreature);
}
private MajesticMetamorphosisEffect(final MajesticMetamorphosisEffect effect) {

View file

@ -50,6 +50,8 @@ class MarchOfTheMachinesEffect extends ContinuousEffectImpl {
super(Duration.WhileOnBattlefield, Outcome.BecomeCreature);
staticText = "Each noncreature artifact is an artifact creature with power and toughness each equal to its mana value";
dependendToTypes.add(DependencyType.ArtifactAddingRemoving);
dependencyTypes.add(DependencyType.BecomeCreature);
}
private MarchOfTheMachinesEffect(final MarchOfTheMachinesEffect effect) {

View file

@ -0,0 +1,169 @@
package mage.cards.m;
import java.util.UUID;
import mage.MageInt;
import mage.MageObject;
import mage.abilities.Ability;
import mage.abilities.common.AsEntersBattlefieldAbility;
import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.effects.OneShotEffect;
import mage.abilities.effects.common.CopyEffect;
import mage.cards.*;
import mage.constants.*;
import mage.counters.CounterType;
import mage.filter.StaticFilters;
import mage.game.Game;
import mage.game.permanent.Permanent;
import mage.game.permanent.PermanentCard;
import mage.players.Player;
import mage.target.common.TargetCardInExile;
import mage.target.common.TargetCardInYourGraveyard;
import mage.target.targetadjustment.TargetAdjuster;
import mage.util.CardUtil;
import mage.util.functions.CopyApplier;
/**
*
* @author Jmlundeen
*/
public final class MimeoplasmReveredOne extends CardImpl {
public MimeoplasmReveredOne(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{X}{B}{G}{U}");
this.supertype.add(SuperType.LEGENDARY);
this.subtype.add(SubType.OOZE);
this.power = new MageInt(0);
this.toughness = new MageInt(0);
// As Mimeoplasm enters, exile up to X creature cards from your graveyard. It enters with three +1/+1 counters on it for each creature card exiled this way.
this.addAbility(new AsEntersBattlefieldAbility(new MimeoplasmReveredOneEntersEffect()));
// {2}: Mimeoplasm becomes a copy of target creature card exiled with it, except it's 0/0 and has this ability.
Ability ability2 = new SimpleActivatedAbility(new MimeoplasmReveredOneEffect(), new ManaCostsImpl<>("{2}"));
ability2.setTargetAdjuster(MimeoPlasmReveredOneTargetAdjuster.instance);
this.addAbility(ability2);
}
private MimeoplasmReveredOne(final MimeoplasmReveredOne card) {
super(card);
}
@Override
public MimeoplasmReveredOne copy() {
return new MimeoplasmReveredOne(this);
}
}
enum MimeoPlasmReveredOneTargetAdjuster implements TargetAdjuster {
instance;
@Override
public void adjustTargets(Ability ability, Game game) {
ability.getTargets().clear();
ability.addTarget(new TargetCardInExile(StaticFilters.FILTER_CARD_CREATURES, CardUtil.getExileZoneId(game, ability, -1)));
}
}
class MimeoplasmReveredOneEntersEffect extends OneShotEffect {
MimeoplasmReveredOneEntersEffect() {
super(Outcome.Benefit);
staticText = "exile up to X creature cards from your graveyard. " +
"It enters with three +1/+1 counters on it for each creature card exiled this way";
}
private MimeoplasmReveredOneEntersEffect(final MimeoplasmReveredOneEntersEffect effect) {
super(effect);
}
@Override
public MimeoplasmReveredOneEntersEffect copy() {
return new MimeoplasmReveredOneEntersEffect(this);
}
@Override
public boolean apply(Game game, Ability source) {
Player controller = game.getPlayer(source.getControllerId());
Permanent mimeoplasm = game.getPermanentEntering(source.getSourceId());
if (controller == null || controller.getGraveyard().isEmpty() || mimeoplasm == null) {
return false;
}
int xValue = CardUtil.getSourceCostsTag(game, source, "X", 0);
if (xValue == 0) {
return false;
}
TargetCardInYourGraveyard target = new TargetCardInYourGraveyard(0, xValue, StaticFilters.FILTER_CARD_CREATURES);
target.withNotTarget(true);
if (!controller.chooseTarget(Outcome.Exile, target, source, game)) {
return false;
}
Cards cards = new CardsImpl();
for (UUID targetId : target.getTargets()) {
cards.add(controller.getGraveyard().get(targetId, game));
}
int zcc = CardUtil.getActualSourceObjectZoneChangeCounter(game, source);
UUID exileId = CardUtil.getExileZoneId(game, source.getSourceId(), zcc);
if (!controller.moveCardsToExile(cards.getCards(game), source, game, true,
exileId, CardUtil.getSourceName(game, source))) {
return false;
}
int counters = cards.count(StaticFilters.FILTER_CARD_CREATURE, game) * 3;
mimeoplasm.addCounters(CounterType.P1P1.createInstance(counters), controller.getId(), source, game);
return true;
}
}
class MimeoplasmReveredOneEffect extends OneShotEffect {
public MimeoplasmReveredOneEffect() {
super(Outcome.Benefit);
this.staticText = "{this} becomes a copy of target creature card exiled with it, except it's 0/0 and has this ability.";
}
public MimeoplasmReveredOneEffect(final MimeoplasmReveredOneEffect effect) {
super(effect);
}
@Override
public MimeoplasmReveredOneEffect copy() {
return new MimeoplasmReveredOneEffect(this);
}
@Override
public boolean apply(Game game, Ability source) {
Player controller = game.getPlayer(source.getControllerId());
Permanent mimeoplasm = game.getPermanent(source.getSourceId());
if (controller == null || mimeoplasm == null) {
return false;
}
Card chosen = game.getCard(getTargetPointer().getFirst(game, source));
if (chosen == null) {
return false;
}
Permanent newBluePrint = new PermanentCard(chosen, source.getControllerId(), game);
newBluePrint.assignNewId();
CopyApplier applier = new MimeoPlasmReveredOneCopyApplier();
applier.apply(game, newBluePrint, source, mimeoplasm.getId());
CopyEffect copyEffect = new CopyEffect(Duration.Custom, newBluePrint, mimeoplasm.getId());
copyEffect.setApplier(applier);
copyEffect.init(source.copy(), game);
game.addEffect(copyEffect, source);
return true;
}
}
class MimeoPlasmReveredOneCopyApplier extends CopyApplier {
@Override
public boolean apply(Game game, MageObject blueprint, Ability source, UUID targetObjectId) {
Ability ability = new SimpleActivatedAbility(new MimeoplasmReveredOneEffect(), new ManaCostsImpl<>("{2}"));
ability.setTargetAdjuster(MimeoPlasmReveredOneTargetAdjuster.instance);
blueprint.getPower().setModifiedBaseValue(0);
blueprint.getToughness().setModifiedBaseValue(0);
blueprint.getAbilities().add(ability);
return true;
}
}

View file

@ -72,6 +72,7 @@ class OkoThiefOfCrownsEffect extends ContinuousEffectImpl {
super(Duration.Custom, Outcome.Benefit);
staticText = "target artifact or creature loses all abilities " +
"and becomes a green Elk creature with base power and toughness 3/3";
this.dependencyTypes.add(DependencyType.BecomeCreature);
}
private OkoThiefOfCrownsEffect(final OkoThiefOfCrownsEffect effect) {

View file

@ -0,0 +1,117 @@
package mage.cards.p;
import mage.MageInt;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.effects.common.continuous.GainAbilityControlledSpellsEffect;
import mage.abilities.keyword.ConvokeAbility;
import mage.abilities.keyword.DoctorsCompanionAbility;
import mage.cards.Card;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.SuperType;
import mage.constants.WatcherScope;
import mage.filter.common.FilterNonlandCard;
import mage.filter.predicate.ObjectSourcePlayer;
import mage.filter.predicate.ObjectSourcePlayerPredicate;
import mage.game.Game;
import mage.game.events.GameEvent;
import mage.game.stack.Spell;
import mage.watchers.Watcher;
import java.util.HashMap;
import java.util.Map;
import java.util.UUID;
/**
* @author xenohedron
*/
public final class PeriBrown extends CardImpl {
private static final String rule = "The first historic spell you cast each turn has convoke. " +
"<i>(Your creatures can help cast it. Each creature you tap while casting it pays for {1} " +
"or one mana of that creature's color.)</i>";
private static final FilterNonlandCard filter = new FilterNonlandCard("the first historic spell you cast each turn");
static {
filter.add(PeriBrownFirstHistoricCastSpellPredicate.instance);
}
public PeriBrown(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{W}");
this.supertype.add(SuperType.LEGENDARY);
this.subtype.add(SubType.HUMAN);
this.power = new MageInt(2);
this.toughness = new MageInt(3);
// The first historic spell you cast each turn has convoke.
this.addAbility(new SimpleStaticAbility(
new GainAbilityControlledSpellsEffect(new ConvokeAbility(), filter).setText(rule)),
new PeriBrownHistoricSpellWatcher()
);
// Doctor's companion
this.addAbility(DoctorsCompanionAbility.getInstance());
}
private PeriBrown(final PeriBrown card) {
super(card);
}
@Override
public PeriBrown copy() {
return new PeriBrown(this);
}
}
class PeriBrownHistoricSpellWatcher extends Watcher {
// Based on Conduit of Ruin
private final Map<UUID, Integer> historicSpells; // player id -> number
public PeriBrownHistoricSpellWatcher() {
super(WatcherScope.GAME);
historicSpells = new HashMap<>();
}
@Override
public void watch(GameEvent event, Game game) {
if (event.getType() == GameEvent.EventType.SPELL_CAST) {
Spell spell = (Spell) game.getObject(event.getTargetId());
if (spell != null && spell.isHistoric(game)) {
historicSpells.put(event.getPlayerId(), historicSpellsCastThisTurn(event.getPlayerId()) + 1);
}
}
}
public int historicSpellsCastThisTurn(UUID playerId) {
return historicSpells.getOrDefault(playerId, 0);
}
@Override
public void reset() {
super.reset();
historicSpells.clear();
}
}
enum PeriBrownFirstHistoricCastSpellPredicate implements ObjectSourcePlayerPredicate<Card> {
instance;
@Override
public boolean apply(ObjectSourcePlayer<Card> input, Game game) {
if (input.getObject() != null && input.getObject().isHistoric(game)) {
PeriBrownHistoricSpellWatcher watcher = game.getState().getWatcher(PeriBrownHistoricSpellWatcher.class);
return watcher != null && watcher.historicSpellsCastThisTurn(input.getPlayerId()) == 0;
}
return false;
}
@Override
public String toString() {
return "The first historic spell you cast each turn";
}
}

View file

@ -0,0 +1,98 @@
package mage.cards.p;
import java.util.UUID;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.OneOrMoreCombatDamagePlayerTriggeredAbility;
import mage.abilities.costs.Cost;
import mage.abilities.costs.common.PayEnergyCost;
import mage.abilities.effects.OneShotEffect;
import mage.abilities.effects.common.counter.GetEnergyCountersControllerEffect;
import mage.abilities.triggers.BeginningOfEndStepTriggeredAbility;
import mage.constants.*;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.counters.CounterType;
import mage.filter.common.FilterCreaturePermanent;
import mage.game.Game;
import mage.game.permanent.token.NalaarAetherjetToken;
import mage.game.permanent.token.Token;
import mage.players.Player;
/**
*
* @author Jmlundeen
*/
public final class PiaNalaarChiefMechanic extends CardImpl {
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("artifact creatures you control");
static {
filter.add(TargetController.YOU.getControllerPredicate());
}
public PiaNalaarChiefMechanic(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{G}{U}{R}");
this.supertype.add(SuperType.LEGENDARY);
this.subtype.add(SubType.HUMAN);
this.subtype.add(SubType.ARTIFICER);
this.power = new MageInt(2);
this.toughness = new MageInt(4);
// Whenever one or more artifact creatures you control deal combat damage to a player, you get {E}{E}.
this.addAbility(new OneOrMoreCombatDamagePlayerTriggeredAbility(
new GetEnergyCountersControllerEffect(2), filter)
);
// At the beginning of your end step, you may pay one or more {E}. If you do, create an X/X colorless Vehicle artifact token named Nalaar Aetherjet with flying and crew 2, where X is the amount of {E} spent this way.
this.addAbility(new BeginningOfEndStepTriggeredAbility(new PiaNalaarChiefMechanicEffect(), true));
}
private PiaNalaarChiefMechanic(final PiaNalaarChiefMechanic card) {
super(card);
}
@Override
public PiaNalaarChiefMechanic copy() {
return new PiaNalaarChiefMechanic(this);
}
}
class PiaNalaarChiefMechanicEffect extends OneShotEffect {
public PiaNalaarChiefMechanicEffect() {
super(Outcome.Benefit);
staticText = "you may pay one or more {E}. If you do, create an X/X colorless Vehicle artifact token " +
"named Nalaar Aetherjet with flying and crew 2, where X is the amount of {E} spent this way";
}
public PiaNalaarChiefMechanicEffect(final PiaNalaarChiefMechanicEffect effect) {
super(effect);
}
@Override
public PiaNalaarChiefMechanicEffect copy() {
return new PiaNalaarChiefMechanicEffect(this);
}
@Override
public boolean apply(Game game, Ability source) {
Player controller = game.getPlayer(source.getControllerId());
if (controller == null) {
return false;
}
int energyToPay = controller.getAmount(1, controller.getCountersCount(CounterType.ENERGY),
"Pay 1 or more {E}", game);
if (energyToPay == 0) {
return true;
}
Cost cost = new PayEnergyCost(energyToPay);
if (cost.pay(source, game, source, controller.getId(), true)) {
Token token = new NalaarAetherjetToken(energyToPay);
token.putOntoBattlefield(1, game, source);
return true;
}
return false;
}
}

View file

@ -0,0 +1,54 @@
package mage.cards.q;
import mage.MageInt;
import mage.abilities.common.RenewAbility;
import mage.abilities.keyword.DeathtouchAbility;
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 java.util.UUID;
/**
* @author TheElk801
*/
public final class QarsiRevenant extends CardImpl {
public QarsiRevenant(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{B}{B}");
this.subtype.add(SubType.VAMPIRE);
this.power = new MageInt(3);
this.toughness = new MageInt(3);
// Flying
this.addAbility(FlyingAbility.getInstance());
// Deathtouch
this.addAbility(DeathtouchAbility.getInstance());
// Lifelink
this.addAbility(LifelinkAbility.getInstance());
// Renew -- {2}{B}, Exile this card from your graveyard: Put a flying counter, a deathtouch counter, and a lifelink counter on target creature. Activate only as a sorcery.
this.addAbility(new RenewAbility(
"{2}{B}",
CounterType.FLYING.createInstance(),
CounterType.DEATHTOUCH.createInstance(),
CounterType.LIFELINK.createInstance()
));
}
private QarsiRevenant(final QarsiRevenant card) {
super(card);
}
@Override
public QarsiRevenant copy() {
return new QarsiRevenant(this);
}
}

View file

@ -0,0 +1,33 @@
package mage.cards.r;
import mage.abilities.effects.common.LookLibraryAndPickControllerEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.PutCards;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class RakshasasBargain extends CardImpl {
public RakshasasBargain(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{2/B}{2/G}{2/U}");
// Look at the top four cards of your library. Put two of them into your hand and the rest into your graveyard.
this.getSpellAbility().addEffect(new LookLibraryAndPickControllerEffect(
4, 2, PutCards.HAND, PutCards.GRAVEYARD
));
}
private RakshasasBargain(final RakshasasBargain card) {
super(card);
}
@Override
public RakshasasBargain copy() {
return new RakshasasBargain(this);
}
}

View file

@ -0,0 +1,99 @@
package mage.cards.r;
import java.util.UUID;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.costs.Cost;
import mage.abilities.costs.common.PayEnergyCost;
import mage.abilities.effects.OneShotEffect;
import mage.abilities.effects.common.counter.AddCountersSourceEffect;
import mage.abilities.triggers.BeginningOfUpkeepTriggeredAbility;
import mage.constants.Outcome;
import mage.constants.SubType;
import mage.abilities.keyword.TrampleAbility;
import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.keyword.WardAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.counters.CounterType;
import mage.game.Game;
import mage.game.permanent.Permanent;
import mage.players.Player;
/**
*
* @author Jmlundeen
*/
public final class RampagingAetherhood extends CardImpl {
private static final String energyText = "you get an amount of {E} equal to this creature's power.";
public RampagingAetherhood(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{G}");
this.subtype.add(SubType.SNAKE);
this.subtype.add(SubType.HYDRA);
this.power = new MageInt(4);
this.toughness = new MageInt(4);
// Trample
this.addAbility(TrampleAbility.getInstance());
// Ward {2}
this.addAbility(new WardAbility(new ManaCostsImpl<>("{2}")));
// At the beginning of your upkeep, you get an amount of {E} equal to this creature's power. Then you may pay one or more {E}. If you do, put that many +1/+1 counters on this creature.
this.addAbility(new BeginningOfUpkeepTriggeredAbility(new RampagingAetherhoodEffect()));
}
private RampagingAetherhood(final RampagingAetherhood card) {
super(card);
}
@Override
public RampagingAetherhood copy() {
return new RampagingAetherhood(this);
}
}
class RampagingAetherhoodEffect extends OneShotEffect {
public RampagingAetherhoodEffect() {
super(Outcome.Benefit);
this.staticText = "you get an amount of {E} equal to this creature's power. " +
"Then you may pay one or more {E}. If you do, put that many +1/+1 counters on this creature.";
}
public RampagingAetherhoodEffect(final RampagingAetherhoodEffect effect) {
super(effect);
}
@Override
public RampagingAetherhoodEffect copy() {
return new RampagingAetherhoodEffect(this);
}
@Override
public boolean apply(Game game, Ability source) {
Permanent permanent = game.getPermanent(source.getSourceId());
Player controller = game.getPlayer(source.getControllerId());
if (permanent == null || controller == null) {
return false;
}
int amount = permanent.getPower().getValue();
controller.addCounters(CounterType.ENERGY.createInstance(amount), source.getControllerId(), source, game);
int totalEnergy = controller.getCountersCount(CounterType.ENERGY);
if (totalEnergy > 0) {
if (controller.chooseUse(Outcome.Benefit, "Pay one or more {E}? Put that many +1/+1 counters on this creature", source, game)) {
int energyToPay = controller.getAmount(1, totalEnergy, "Pay one or more {E}", game);
Cost cost = new PayEnergyCost(energyToPay);
if (cost.pay(source, game, source, controller.getId(), true)) {
new AddCountersSourceEffect(CounterType.P1P1.createInstance(energyToPay), true).apply(game, source);
return true;
}
}
}
return false;
}
}

View file

@ -0,0 +1,49 @@
package mage.cards.r;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
import mage.abilities.effects.common.continuous.BoostTargetEffect;
import mage.abilities.effects.common.continuous.GainAbilityTargetEffect;
import mage.abilities.keyword.IndestructibleAbility;
import mage.abilities.keyword.MobilizeAbility;
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 ReigningVictor extends CardImpl {
public ReigningVictor(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2/R}{2/W}{2/B}");
this.subtype.add(SubType.ORC);
this.subtype.add(SubType.WARRIOR);
this.power = new MageInt(3);
this.toughness = new MageInt(3);
// Mobilize 1
this.addAbility(new MobilizeAbility(1));
// When this creature enters, target creature gets +1/+0 and gains indestructible until end of turn.
Ability ability = new EntersBattlefieldTriggeredAbility(new BoostTargetEffect(1, 0).setText("target creature gets +1/+0"));
ability.addEffect(new GainAbilityTargetEffect(IndestructibleAbility.getInstance()).setText("and gains indestructible until end of turn"));
ability.addTarget(new TargetCreaturePermanent());
this.addAbility(ability);
}
private ReigningVictor(final ReigningVictor card) {
super(card);
}
@Override
public ReigningVictor copy() {
return new ReigningVictor(this);
}
}

View file

@ -41,6 +41,7 @@ class RelicsRoarEffect extends ContinuousEffectImpl {
super(Duration.EndOfTurn, Outcome.Benefit);
staticText = "until end of turn, target artifact or creature becomes a Dinosaur artifact creature " +
"with base power and toughness 4/3 in addition to its other types";
this.dependencyTypes.add(DependencyType.BecomeCreature);
}
private RelicsRoarEffect(final RelicsRoarEffect effect) {

View file

@ -0,0 +1,101 @@
package mage.cards.r;
import java.util.List;
import java.util.UUID;
import java.util.stream.Collectors;
import mage.abilities.Ability;
import mage.abilities.common.AsEntersBattlefieldAbility;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.effects.OneShotEffect;
import mage.abilities.effects.common.ChooseCreatureTypeEffect;
import mage.abilities.effects.common.CreateTokenCopyTargetEffect;
import mage.abilities.effects.common.continuous.BoostAllOfChosenSubtypeEffect;
import mage.abilities.triggers.BeginningOfEndStepTriggeredAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.*;
import mage.filter.common.FilterControlledPermanent;
import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.permanent.EnteredThisTurnPredicate;
import mage.filter.predicate.permanent.TokenPredicate;
import mage.game.Game;
import mage.game.permanent.Permanent;
import mage.target.targetpointer.FixedTarget;
/**
*
* @author Jmlundeen
*/
public final class RenewedSolidarity extends CardImpl {
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creatures you control of the chosen type");
static {
filter.add(TargetController.YOU.getControllerPredicate());
}
public RenewedSolidarity(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{W}");
// As this enchantment enters, choose a creature type.
this.addAbility(new AsEntersBattlefieldAbility(new ChooseCreatureTypeEffect(Outcome.BoostCreature)));
// Creatures you control of the chosen type get +1/+0.
this.addAbility(new SimpleStaticAbility(new BoostAllOfChosenSubtypeEffect(1, 0, Duration.WhileOnBattlefield, filter, false)));
// At the beginning of your end step, for each token you control of the chosen type that entered this turn, create a token that's a copy of it.
this.addAbility(new BeginningOfEndStepTriggeredAbility(new RenewedSolidarityEffect()));
}
private RenewedSolidarity(final RenewedSolidarity card) {
super(card);
}
@Override
public RenewedSolidarity copy() {
return new RenewedSolidarity(this);
}
}
class RenewedSolidarityEffect extends OneShotEffect {
private static final FilterControlledPermanent filter = new FilterControlledPermanent();
static {
filter.add(TokenPredicate.TRUE);
filter.add(EnteredThisTurnPredicate.instance);
}
public RenewedSolidarityEffect() {
super(Outcome.Benefit);
this.staticText = "for each token you control of the chosen type that entered this turn, create a token that's a copy of it";
}
public RenewedSolidarityEffect(final RenewedSolidarityEffect effect) {
super(effect);
}
@Override
public RenewedSolidarityEffect copy() {
return new RenewedSolidarityEffect(this);
}
@Override
public boolean apply(Game game, Ability source) {
SubType subType = ChooseCreatureTypeEffect.getChosenCreatureType(source.getSourceId(), game);
List<Permanent> tokens = game.getBattlefield()
.getActivePermanents(filter, source.getControllerId(), source, game)
.stream()
.filter(permanent -> permanent.hasSubtype(subType, game))
.collect(Collectors.toList());
boolean result = false;
for (Permanent token : tokens) {
result |= new CreateTokenCopyTargetEffect()
.setTargetPointer(new FixedTarget(token, game))
.apply(game, source);
}
return result;
}
}

View file

@ -0,0 +1,60 @@
package mage.cards.r;
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.costs.mana.GenericManaCost;
import mage.abilities.effects.common.AttachEffect;
import mage.abilities.effects.common.DontUntapInControllersUntapStepEnchantedEffect;
import mage.abilities.effects.common.TapEnchantedEffect;
import mage.abilities.effects.common.UntapSourceEffect;
import mage.abilities.effects.common.continuous.GainAbilityAttachedEffect;
import mage.abilities.keyword.EnchantAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.AttachmentType;
import mage.constants.CardType;
import mage.constants.Outcome;
import mage.constants.SubType;
import mage.target.TargetPermanent;
import mage.target.common.TargetCreaturePermanent;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class RingingStrikeMastery extends CardImpl {
public RingingStrikeMastery(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{U}");
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));
// When this Aura enters, tap enchanted creature.
this.addAbility(new EntersBattlefieldTriggeredAbility(new TapEnchantedEffect()));
// Enchanted creature doesn't untap during its controller's untap step.
this.addAbility(new SimpleStaticAbility(new DontUntapInControllersUntapStepEnchantedEffect()));
// Enchanted creature has "{5}: Untap this creature."
this.addAbility(new SimpleStaticAbility(new GainAbilityAttachedEffect(new SimpleActivatedAbility(
new UntapSourceEffect().setText("untap this creature"), new GenericManaCost(5)
), AttachmentType.AURA)));
}
private RingingStrikeMastery(final RingingStrikeMastery card) {
super(card);
}
@Override
public RingingStrikeMastery copy() {
return new RingingStrikeMastery(this);
}
}

View file

@ -0,0 +1,40 @@
package mage.cards.r;
import java.util.UUID;
import mage.abilities.common.EntersBattlefieldControlledTriggeredAbility;
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
import mage.abilities.effects.common.DrawDiscardControllerEffect;
import mage.abilities.effects.common.ReturnToHandSourceEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.filter.common.FilterControlledPermanent;
/**
* @author balazskristof
*/
public final class RoilingDragonstorm extends CardImpl {
private static final FilterControlledPermanent filter = new FilterControlledPermanent(SubType.DRAGON, "a Dragon");
public RoilingDragonstorm(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{1}{U}");
// When this enchantment enters, draw two cards, then discard a card.
this.addAbility(new EntersBattlefieldTriggeredAbility(new DrawDiscardControllerEffect(2, 1)));
// When a Dragon you control enters, return this enchantment to its owner's hand.
this.addAbility(new EntersBattlefieldControlledTriggeredAbility(new ReturnToHandSourceEffect(), filter));
}
private RoilingDragonstorm(final RoilingDragonstorm card) {
super(card);
}
@Override
public RoilingDragonstorm copy() {
return new RoilingDragonstorm(this);
}
}

View file

@ -0,0 +1,108 @@
package mage.cards.s;
import java.util.UUID;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.SpellCastControllerTriggeredAbility;
import mage.abilities.common.delayed.ReflexiveTriggeredAbility;
import mage.abilities.costs.common.PayEnergyCost;
import mage.abilities.effects.OneShotEffect;
import mage.abilities.effects.common.CreateTokenCopyTargetEffect;
import mage.abilities.effects.common.DoWhenCostPaid;
import mage.abilities.effects.common.counter.GetEnergyCountersControllerEffect;
import mage.abilities.triggers.BeginningOfCombatTriggeredAbility;
import mage.constants.Outcome;
import mage.constants.SubType;
import mage.constants.SuperType;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.filter.FilterSpell;
import mage.filter.StaticFilters;
import mage.filter.predicate.Predicates;
import mage.game.Game;
import mage.target.TargetPermanent;
import mage.target.targetpointer.FixedTarget;
/**
*
* @author Jmlundeen
*/
public final class SaheeliRadiantCreator extends CardImpl {
private static final FilterSpell filter = new FilterSpell("Artificer or artifact spell");
static {
filter.add(Predicates.or(
SubType.ARTIFICER.getPredicate(),
CardType.ARTIFACT.getPredicate())
);
}
public SaheeliRadiantCreator(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{G}{U}{R}");
this.supertype.add(SuperType.LEGENDARY);
this.subtype.add(SubType.HUMAN);
this.subtype.add(SubType.ARTIFICER);
this.power = new MageInt(4);
this.toughness = new MageInt(4);
// Whenever you cast an Artificer or artifact spell, you get {E}.
Ability ability = new SpellCastControllerTriggeredAbility(
new GetEnergyCountersControllerEffect(1),
filter, false);
this.addAbility(ability);
// At the beginning of combat on your turn, you may pay {E}{E}{E}. When you do, create a token that's a copy of target permanent you control, except it's a 5/5 artifact creature in addition to its other types and has haste. Sacrifice it at the beginning of the next end step.
ReflexiveTriggeredAbility reflexiveAbility = new ReflexiveTriggeredAbility(
new SaheeliRadiantCreatorCopyEffect(), false
);
reflexiveAbility.addTarget(new TargetPermanent(StaticFilters.FILTER_CONTROLLED_A_PERMANENT));
Ability combatTriggeredAbility = new BeginningOfCombatTriggeredAbility(
new DoWhenCostPaid(reflexiveAbility, new PayEnergyCost(3),
"Pay {E}{E}{E}?")
);
this.addAbility(combatTriggeredAbility);
}
private SaheeliRadiantCreator(final SaheeliRadiantCreator card) {
super(card);
}
@Override
public SaheeliRadiantCreator copy() {
return new SaheeliRadiantCreator(this);
}
}
class SaheeliRadiantCreatorCopyEffect extends OneShotEffect {
public SaheeliRadiantCreatorCopyEffect() {
super(Outcome.Copy);
staticText = "create a token that's a copy of target permanent you control, " +
"except it's a 5/5 artifact creature in addition to its other types and has haste. " +
"Sacrifice it at the beginning of the next end step.";
}
public SaheeliRadiantCreatorCopyEffect(final SaheeliRadiantCreatorCopyEffect effect) {
super(effect);
}
@Override
public SaheeliRadiantCreatorCopyEffect copy() {
return new SaheeliRadiantCreatorCopyEffect(this);
}
@Override
public boolean apply(Game game, Ability source) {
CreateTokenCopyTargetEffect effect = new CreateTokenCopyTargetEffect(null, CardType.CREATURE,
true, 1, false, false, null,
5, 5, false);
effect.setBecomesArtifact(true);
effect.setTargetPointer(new FixedTarget(source.getFirstTarget()));
effect.apply(game, source);
effect.sacrificeTokensCreatedAtNextEndStep(game, source);
return true;
}
}

View file

@ -65,6 +65,7 @@ class SarkhanTheDragonspeakerEffect extends ContinuousEffectImpl {
SarkhanTheDragonspeakerEffect() {
super(Duration.EndOfTurn, Outcome.BecomeCreature);
staticText = "Until end of turn, {this} becomes a legendary 4/4 red Dragon creature with flying, indestructible, and haste.";
this.dependencyTypes.add(DependencyType.BecomeCreature);
}
private SarkhanTheDragonspeakerEffect(final SarkhanTheDragonspeakerEffect effect) {

View file

@ -91,6 +91,7 @@ class SarkhanTheMasterlessBecomeDragonEffect extends ContinuousEffectImpl {
SarkhanTheMasterlessBecomeDragonEffect() {
super(Duration.EndOfTurn, Outcome.BecomeCreature);
staticText = "Until end of turn, each planeswalker you control becomes a 4/4 red Dragon creature and gains flying.";
this.dependencyTypes.add(DependencyType.BecomeCreature);
}
private SarkhanTheMasterlessBecomeDragonEffect(final SarkhanTheMasterlessBecomeDragonEffect effect) {

View file

@ -0,0 +1,49 @@
package mage.cards.s;
import mage.abilities.Mode;
import mage.abilities.effects.common.DestroyTargetEffect;
import mage.abilities.effects.common.continuous.BoostTargetEffect;
import mage.abilities.keyword.FlyingAbility;
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.mageobject.AbilityPredicate;
import mage.target.TargetPermanent;
import mage.target.common.TargetCreaturePermanent;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class SarkhansResolve extends CardImpl {
private static final FilterPermanent filter = new FilterCreaturePermanent("creature with flying");
static {
filter.add(new AbilityPredicate(FlyingAbility.class));
}
public SarkhansResolve(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{1}{G}");
// Choose one --
// * Target creature gets +3/+3 until end of turn.
this.getSpellAbility().addEffect(new BoostTargetEffect(3, 3));
this.getSpellAbility().addTarget(new TargetCreaturePermanent());
// * Destroy target creature with flying.
this.getSpellAbility().addMode(new Mode(new DestroyTargetEffect()).addTarget(new TargetPermanent(filter)));
}
private SarkhansResolve(final SarkhansResolve card) {
super(card);
}
@Override
public SarkhansResolve copy() {
return new SarkhansResolve(this);
}
}

View file

@ -0,0 +1,58 @@
package mage.cards.s;
import java.util.UUID;
import mage.MageInt;
import mage.constants.SubType;
import mage.constants.SuperType;
import mage.counters.CounterType;
import mage.filter.StaticFilters;
import mage.abilities.common.DiesCreatureTriggeredAbility;
import mage.abilities.common.EntersBattlefieldAbility;
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
import mage.abilities.effects.common.continuous.BoostAllEffect;
import mage.abilities.effects.common.counter.AddCountersSourceEffect;
import mage.abilities.keyword.VigilanceAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Duration;
/**
* @author balazskristof
*/
public final class SephirothPlanetsHeir extends CardImpl {
public SephirothPlanetsHeir(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{U}{B}");
this.supertype.add(SuperType.LEGENDARY);
this.subtype.add(SubType.HUMAN);
this.subtype.add(SubType.AVATAR);
this.subtype.add(SubType.SOLDIER);
this.power = new MageInt(4);
this.toughness = new MageInt(4);
// Vigilance
this.addAbility(VigilanceAbility.getInstance());
// When Sephiroth enters, creatures your opponents control get -2/-2 until end of turn.
this.addAbility(new EntersBattlefieldTriggeredAbility(new BoostAllEffect(
-2, -2, Duration.EndOfTurn, StaticFilters.FILTER_OPPONENTS_PERMANENT_CREATURES, false
)));
// Whenever a creature an opponent controls dies, put a +1/+1 counter on Sephiroth.
this.addAbility(new DiesCreatureTriggeredAbility(
new AddCountersSourceEffect(CounterType.P1P1.createInstance()),
false, StaticFilters.FILTER_OPPONENTS_PERMANENT_A_CREATURE
));
}
private SephirothPlanetsHeir(final SephirothPlanetsHeir card) {
super(card);
}
@Override
public SephirothPlanetsHeir copy() {
return new SephirothPlanetsHeir(this);
}
}

View file

@ -0,0 +1,41 @@
package mage.cards.s;
import mage.MageInt;
import mage.abilities.keyword.MenaceAbility;
import mage.abilities.keyword.MobilizeAbility;
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 ShockBrigade extends CardImpl {
public ShockBrigade(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{R}");
this.subtype.add(SubType.GOBLIN);
this.subtype.add(SubType.SOLDIER);
this.power = new MageInt(1);
this.toughness = new MageInt(3);
// Menace
this.addAbility(new MenaceAbility());
// Mobilize 1
this.addAbility(new MobilizeAbility(1));
}
private ShockBrigade(final ShockBrigade card) {
super(card);
}
@Override
public ShockBrigade copy() {
return new ShockBrigade(this);
}
}

View file

@ -0,0 +1,97 @@
package mage.cards.s;
import java.util.UUID;
import mage.MageInt;
import mage.constants.SubType;
import mage.constants.SuperType;
import mage.constants.Zone;
import mage.filter.StaticFilters;
import mage.game.Game;
import mage.players.Player;
import mage.target.targetpointer.FixedTarget;
import mage.util.RandomUtil;
import mage.abilities.Ability;
import mage.abilities.common.EntersBattlefieldOrAttacksSourceTriggeredAbility;
import mage.abilities.effects.OneShotEffect;
import mage.abilities.effects.common.CreateTokenCopyTargetEffect;
import mage.abilities.keyword.FlyingAbility;
import mage.cards.Card;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Outcome;
/**
* @author balazskristof
*/
public final class SinSpirasPunishment extends CardImpl {
public SinSpirasPunishment(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{B}{G}{U}");
this.supertype.add(SuperType.LEGENDARY);
this.subtype.add(SubType.LEVIATHAN);
this.subtype.add(SubType.AVATAR);
this.power = new MageInt(7);
this.toughness = new MageInt(7);
// Flying
this.addAbility(FlyingAbility.getInstance());
// Whenever Sin enters or attacks, exile a permanent card from your graveyard at random, then create a tapped token that's a copy of that card. If the exiled card is a land card, repeat this process.
this.addAbility(new EntersBattlefieldOrAttacksSourceTriggeredAbility(new SinSpirasPunishmentEffect()));
}
private SinSpirasPunishment(final SinSpirasPunishment card) {
super(card);
}
@Override
public SinSpirasPunishment copy() {
return new SinSpirasPunishment(this);
}
}
class SinSpirasPunishmentEffect extends OneShotEffect {
SinSpirasPunishmentEffect() {
super(Outcome.Exile);
staticText = "exile a permanent card from your graveyard at random, then create a tapped token that's a copy of that card."
+ " If the exiled card is a land card, repeat this process";
}
private SinSpirasPunishmentEffect(final SinSpirasPunishmentEffect effect) {
super(effect);
}
@Override
public SinSpirasPunishmentEffect copy() {
return new SinSpirasPunishmentEffect(this);
}
@Override
public boolean apply(Game game, Ability source) {
Player player = game.getPlayer(source.getControllerId());
if (player == null) {
return false;
}
boolean repeat = true;
while (repeat) {
// Exile a permanent card from your graveyard at random
Card card = RandomUtil.randomFromCollection(player.getGraveyard().getCards(StaticFilters.FILTER_CARD_PERMANENT, game));
if (card == null) {
return true;
}
player.moveCards(card, Zone.EXILED, source, game);
game.processAction();
// Then create a tapped token that's a copy of that card
CreateTokenCopyTargetEffect effect = new CreateTokenCopyTargetEffect(source.getControllerId(), null, false, 1, true, false);
effect.setTargetPointer(new FixedTarget(card, game));
effect.apply(game, source);
game.processAction();
// If the exiled card is a land card, repeat this process
repeat = card.getCardType(game).contains(CardType.LAND);
}
return true;
}
}

View file

@ -57,6 +57,7 @@ class SlumberingToraEffect extends ContinuousEffectImpl {
super(Duration.EndOfTurn, Outcome.BecomeCreature);
staticText = "{this} becomes an X/X Cat artifact creature until end of turn, " +
"where X is the discarded card's mana value";
this.dependencyTypes.add(DependencyType.BecomeCreature);
}
private SlumberingToraEffect(final SlumberingToraEffect effect) {

View file

@ -54,6 +54,7 @@ class SparkRuptureEffect extends ContinuousEffectImpl {
super(Duration.WhileOnBattlefield, Outcome.Detriment);
staticText = "each planeswalker with one or more loyalty counters on it loses all abilities " +
"and is a creature with power and toughness each equal to the number of loyalty counters on it";
this.dependencyTypes.add(DependencyType.BecomeCreature);
}
private SparkRuptureEffect(final SparkRuptureEffect effect) {

View file

@ -0,0 +1,36 @@
package mage.cards.s;
import java.util.UUID;
import mage.abilities.Ability;
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
import mage.abilities.effects.common.ExileUntilSourceLeavesEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.filter.StaticFilters;
import mage.target.TargetPermanent;
/**
* @author balazskristof
*/
public final class StormplainDetainment extends CardImpl {
public StormplainDetainment(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{W}");
// When this enchantment enters, exile target nonland permanent an opponent controls until this enchantment leaves the battlefield.
Ability ability = new EntersBattlefieldTriggeredAbility(new ExileUntilSourceLeavesEffect());
ability.addTarget(new TargetPermanent(StaticFilters.FILTER_OPPONENTS_PERMANENT_NON_LAND));
this.addAbility(ability);
}
private StormplainDetainment(final StormplainDetainment card) {
super(card);
}
@Override
public StormplainDetainment copy() {
return new StormplainDetainment(this);
}
}

View file

@ -0,0 +1,46 @@
package mage.cards.s;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
import mage.abilities.effects.common.combat.CantBlockTargetEffect;
import mage.abilities.keyword.ReachAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.SubType;
import mage.target.common.TargetCreaturePermanent;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class SummitIntimidator extends CardImpl {
public SummitIntimidator(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{R}");
this.subtype.add(SubType.YETI);
this.power = new MageInt(4);
this.toughness = new MageInt(3);
// Reach
this.addAbility(ReachAbility.getInstance());
// When this creature enters, target creature can't block this turn.
Ability ability = new EntersBattlefieldTriggeredAbility(new CantBlockTargetEffect(Duration.EndOfTurn));
ability.addTarget(new TargetCreaturePermanent());
this.addAbility(ability);
}
private SummitIntimidator(final SummitIntimidator card) {
super(card);
}
@Override
public SummitIntimidator copy() {
return new SummitIntimidator(this);
}
}

View file

@ -73,6 +73,7 @@ class SydriGalvanicGeniusEffect extends ContinuousEffectImpl {
SydriGalvanicGeniusEffect() {
super(Duration.EndOfTurn, Outcome.BecomeCreature);
staticText = "Target noncreature artifact becomes an artifact creature with power and toughness each equal to its mana value until end of turn";
this.dependencyTypes.add(DependencyType.BecomeCreature);
}
private SydriGalvanicGeniusEffect(final SydriGalvanicGeniusEffect effect) {

View file

@ -60,6 +60,7 @@ class TangletroveKelpEffect extends ContinuousEffectImpl {
TangletroveKelpEffect() {
super(Duration.EndOfTurn, Outcome.BecomeCreature);
staticText = "other Clues you control become 6/6 Plant creatures in addition to their other types until end of turn";
this.dependencyTypes.add(DependencyType.BecomeCreature);
}
private TangletroveKelpEffect(final TangletroveKelpEffect effect) {

View file

@ -0,0 +1,59 @@
package mage.cards.t;
import mage.MageInt;
import mage.abilities.common.DealsCombatDamageToAPlayerTriggeredAbility;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.effects.common.InfoEffect;
import mage.abilities.effects.common.search.SearchLibraryPutInHandEffect;
import mage.abilities.keyword.FlyingAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.filter.FilterCard;
import mage.filter.predicate.mageobject.NamePredicate;
import mage.target.common.TargetCardInLibrary;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class TempestHawk extends CardImpl {
private static final FilterCard filter = new FilterCard("a card named Tempest Hawk");
static {
filter.add(new NamePredicate("Tempest Hawk"));
}
public TempestHawk(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{W}");
this.subtype.add(SubType.BIRD);
this.power = new MageInt(2);
this.toughness = new MageInt(2);
// Flying
this.addAbility(FlyingAbility.getInstance());
// Whenever this creature deals combat damage to a player, you may search your library for a card named Tempest Hawk, reveal it, put it into your hand, then shuffle.
this.addAbility(new DealsCombatDamageToAPlayerTriggeredAbility(
new SearchLibraryPutInHandEffect(new TargetCardInLibrary(filter), true), true
));
// A deck can have any number of cards named Tempest Hawk.
this.addAbility(new SimpleStaticAbility(
new InfoEffect("a deck can have any number of cards named Tempest Hawk")
));
}
private TempestHawk(final TempestHawk card) {
super(card);
}
@Override
public TempestHawk copy() {
return new TempestHawk(this);
}
}

View file

@ -0,0 +1,58 @@
package mage.cards.t;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.dynamicvalue.DynamicValue;
import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount;
import mage.abilities.effects.common.AttachEffect;
import mage.abilities.effects.common.continuous.BoostEnchantedEffect;
import mage.abilities.hint.Hint;
import mage.abilities.hint.ValueHint;
import mage.abilities.keyword.EnchantAbility;
import mage.abilities.keyword.StormAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Outcome;
import mage.constants.SubType;
import mage.filter.StaticFilters;
import mage.target.TargetPermanent;
import mage.target.common.TargetControlledCreaturePermanent;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class TempestTechnique extends CardImpl {
private static final DynamicValue xValue
= new PermanentsOnBattlefieldCount(StaticFilters.FILTER_CONTROLLED_PERMANENT_ENCHANTMENT, 1);
private static final Hint hint = new ValueHint("Enchantments you control", xValue);
public TempestTechnique(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{3}{W}");
this.subtype.add(SubType.AURA);
// Storm
this.addAbility(new StormAbility());
// Enchant creature you control
TargetPermanent auraTarget = new TargetControlledCreaturePermanent();
this.getSpellAbility().addTarget(auraTarget);
this.getSpellAbility().addEffect(new AttachEffect(Outcome.BoostCreature));
this.addAbility(new EnchantAbility(auraTarget));
// Enchanted creature gets +1/+1 for each enchantment you control.
this.addAbility(new SimpleStaticAbility(new BoostEnchantedEffect(xValue, xValue)).addHint(hint));
}
private TempestTechnique(final TempestTechnique card) {
super(card);
}
@Override
public TempestTechnique copy() {
return new TempestTechnique(this);
}
}

View file

@ -0,0 +1,99 @@
package mage.cards.t;
import java.util.UUID;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
import mage.abilities.costs.Cost;
import mage.abilities.costs.common.PayEnergyCost;
import mage.abilities.effects.OneShotEffect;
import mage.abilities.effects.common.DamageAllEffect;
import mage.abilities.effects.common.counter.GetEnergyCountersControllerEffect;
import mage.constants.Outcome;
import mage.constants.SubType;
import mage.abilities.keyword.FlyingAbility;
import mage.abilities.keyword.HasteAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.counters.CounterType;
import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.mageobject.AnotherPredicate;
import mage.game.Game;
import mage.game.permanent.Permanent;
import mage.players.Player;
/**
*
* @author Jmlundeen
*/
public final class TerritorialAetherkite extends CardImpl {
public TerritorialAetherkite(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{R}{R}");
this.subtype.add(SubType.CAT);
this.subtype.add(SubType.DRAGON);
this.power = new MageInt(6);
this.toughness = new MageInt(5);
// Flying
this.addAbility(FlyingAbility.getInstance());
// Haste
this.addAbility(HasteAbility.getInstance());
// When this creature enters, you get {E}{E}. Then you may pay one or more {E}. When you do, this creature deals that much damage to each other creature.
this.addAbility(new EntersBattlefieldTriggeredAbility(new TerritorialAetherkiteEffect()));
}
private TerritorialAetherkite(final TerritorialAetherkite card) {
super(card);
}
@Override
public TerritorialAetherkite copy() {
return new TerritorialAetherkite(this);
}
}
class TerritorialAetherkiteEffect extends OneShotEffect {
TerritorialAetherkiteEffect() {
super(Outcome.Benefit);
this.staticText = "you get {E}{E}. Then you may pay one or more {E}. " +
"When you do, this creature deals that much damage to each other creature";
}
TerritorialAetherkiteEffect(final TerritorialAetherkiteEffect effect) {
super(effect);
}
@Override
public TerritorialAetherkiteEffect copy() {
return new TerritorialAetherkiteEffect(this);
}
@Override
public boolean apply(Game game, Ability source) {
Player controller = game.getPlayer(source.getControllerId());
Permanent aetherkite = game.getPermanent(source.getSourceId());
if (controller == null || aetherkite == null) {
return false;
}
new GetEnergyCountersControllerEffect(2).apply(game, source);
int energyToPay = controller.getAmount(0, controller.getCountersCount(CounterType.ENERGY),
"Pay any amount of {E}", game);
if (energyToPay == 0) {
return true;
}
Cost cost = new PayEnergyCost(energyToPay);
if (!cost.pay(source, game, source, source.getControllerId(), true)) {
return false;
}
FilterCreaturePermanent filter = new FilterCreaturePermanent("each other creature");
filter.add(AnotherPredicate.instance);
new DamageAllEffect(energyToPay, filter).apply(game, source);
return true;
}
}

View file

@ -51,6 +51,7 @@ class TestamentOfFaithEffect extends ContinuousEffectImpl {
TestamentOfFaithEffect() {
super(Duration.EndOfTurn, Layer.TypeChangingEffects_4, SubLayer.NA, Outcome.BecomeCreature);
staticText = " Wall creature";
this.dependencyTypes.add(DependencyType.BecomeCreature);
}
private TestamentOfFaithEffect(final TestamentOfFaithEffect effect) {

View file

@ -144,6 +144,7 @@ class TezzeretBetrayerOfFleshTypeEffect extends ContinuousEffectImpl {
super(Duration.Custom, Outcome.BecomeCreature);
staticText = "target artifact becomes an artifact creature. " +
"If it isn't a Vehicle, it has base power and toughness 4/4";
this.dependencyTypes.add(DependencyType.BecomeCreature);
}
private TezzeretBetrayerOfFleshTypeEffect(final TezzeretBetrayerOfFleshTypeEffect effect) {

View file

@ -103,6 +103,7 @@ class TezzeretTheSeekerEffect3 extends ContinuousEffectImpl {
public TezzeretTheSeekerEffect3() {
super(Duration.EndOfTurn, Outcome.BecomeCreature);
this.staticText = "Artifacts you control become artifact creatures with base power and toughness 5/5 until end of turn";
this.dependencyTypes.add(DependencyType.BecomeCreature);
}
private TezzeretTheSeekerEffect3(final TezzeretTheSeekerEffect3 effect) {

View file

@ -61,7 +61,7 @@ public final class TheAetherspark extends CardImpl {
), 1);
ability.addEffect(new AddCountersTargetEffect(CounterType.P1P1.createInstance())
.setText("put a +1/+1 counter on that creature"));
ability.addTarget(new TargetControlledCreaturePermanent());
ability.addTarget(new TargetControlledCreaturePermanent(0, 1));
this.addAbility(ability);
// -5: Draw two cards.

View file

@ -54,6 +54,7 @@ class TheAntiquitiesWarEffect extends ContinuousEffectImpl {
TheAntiquitiesWarEffect() {
super(Duration.EndOfTurn, Outcome.BecomeCreature);
this.staticText = "Artifacts you control become artifact creatures with base power and toughness 5/5 until end of turn";
this.dependencyTypes.add(DependencyType.BecomeCreature);
}
private TheAntiquitiesWarEffect(final TheAntiquitiesWarEffect effect) {

View file

@ -65,6 +65,7 @@ class TheBlackstaffOfWaterdeepEffect extends ContinuousEffectImpl {
super(Duration.Custom, Outcome.Benefit);
staticText = "another target nontoken artifact you control becomes " +
"a 4/4 artifact creature for as long as {this} remains tapped";
this.dependencyTypes.add(DependencyType.BecomeCreature);
}
private TheBlackstaffOfWaterdeepEffect(final TheBlackstaffOfWaterdeepEffect effect) {

View file

@ -10,12 +10,7 @@ import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.effects.ContinuousEffectImpl;
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.constants.Zone;
import mage.constants.*;
import mage.filter.common.FilterArtifactPermanent;
import mage.filter.predicate.Predicates;
import mage.game.Game;
@ -56,6 +51,7 @@ class TitaniasSongEffect extends ContinuousEffectImpl {
public TitaniasSongEffect(Duration duration) {
super(duration, Outcome.BecomeCreature);
staticText = "Each noncreature artifact loses its abilities and is an artifact creature with power and toughness each equal to its mana value";
this.dependencyTypes.add(DependencyType.BecomeCreature);
}
private TitaniasSongEffect(final TitaniasSongEffect effect) {

View file

@ -11,13 +11,7 @@ import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.effects.ContinuousEffectImpl;
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.constants.SubType;
import mage.constants.Zone;
import mage.constants.*;
import mage.filter.common.FilterArtifactPermanent;
import mage.filter.predicate.Predicates;
import mage.game.Game;
@ -66,6 +60,7 @@ class ToymakerEffect extends ContinuousEffectImpl {
ToymakerEffect() {
super(Duration.EndOfTurn, Outcome.BecomeCreature);
staticText = "Target noncreature artifact becomes an artifact creature with power and toughness each equal to its mana value until end of turn";
this.dependencyTypes.add(DependencyType.BecomeCreature);
}
private ToymakerEffect(final ToymakerEffect effect) {

View file

@ -3,14 +3,11 @@ package mage.cards.t;
import java.util.UUID;
import mage.abilities.Ability;
import mage.abilities.effects.OneShotEffect;
import mage.abilities.effects.ContinuousEffectImpl;
import mage.abilities.effects.common.ReturnFromGraveyardToBattlefieldTargetEffect;
import mage.abilities.effects.common.ReturnFromYourGraveyardToBattlefieldAllEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Outcome;
import mage.constants.SubType;
import mage.constants.*;
import mage.filter.StaticFilters;
import mage.game.Game;
import mage.game.permanent.Permanent;
@ -42,11 +39,12 @@ public final class TuneUp extends CardImpl {
}
}
class TuneUpEffect extends OneShotEffect {
class TuneUpEffect extends ContinuousEffectImpl {
TuneUpEffect() {
super(Outcome.BecomeCreature);
super(Duration.WhileOnBattlefield, Layer.TypeChangingEffects_4, SubLayer.NA, Outcome.Benefit);
this.staticText = "If it's a Vehicle, it becomes an artifact creature";
this.dependencyTypes.add(DependencyType.BecomeCreature);
}
private TuneUpEffect(final TuneUpEffect effect) {

View file

@ -0,0 +1,49 @@
package mage.cards.u;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.costs.common.SacrificeSourceCost;
import mage.abilities.costs.mana.GenericManaCost;
import mage.abilities.effects.common.DestroyTargetEffect;
import mage.abilities.keyword.VigilanceAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.filter.StaticFilters;
import mage.target.TargetPermanent;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class UndergrowthLeopard extends CardImpl {
public UndergrowthLeopard(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{G}");
this.subtype.add(SubType.CAT);
this.power = new MageInt(2);
this.toughness = new MageInt(2);
// Vigilance
this.addAbility(VigilanceAbility.getInstance());
// {1}, Sacrifice this creature: Destroy target artifact or enchantment.
Ability ability = new SimpleActivatedAbility(new DestroyTargetEffect(), new GenericManaCost(1));
ability.addCost(new SacrificeSourceCost());
ability.addTarget(new TargetPermanent(StaticFilters.FILTER_PERMANENT_ARTIFACT_OR_ENCHANTMENT));
this.addAbility(ability);
}
private UndergrowthLeopard(final UndergrowthLeopard card) {
super(card);
}
@Override
public UndergrowthLeopard copy() {
return new UndergrowthLeopard(this);
}
}

View file

@ -0,0 +1,54 @@
package mage.cards.u;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.costs.common.SacrificeTargetCost;
import mage.abilities.costs.mana.GenericManaCost;
import mage.abilities.effects.common.TapSourceEffect;
import mage.abilities.effects.common.continuous.GainAbilitySourceEffect;
import mage.abilities.keyword.FlashAbility;
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.StaticFilters;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class UnrootedAncestor extends CardImpl {
public UnrootedAncestor(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{B}");
this.subtype.add(SubType.SPIRIT);
this.subtype.add(SubType.CLERIC);
this.power = new MageInt(3);
this.toughness = new MageInt(2);
// Flash
this.addAbility(FlashAbility.getInstance());
// {1}, Sacrifice another creature: This creature gains indestructible until end of turn. Tap it.
Ability ability = new SimpleActivatedAbility(new GainAbilitySourceEffect(
IndestructibleAbility.getInstance(), Duration.EndOfTurn
), new GenericManaCost(1));
ability.addCost(new SacrificeTargetCost(StaticFilters.FILTER_ANOTHER_CREATURE));
ability.addEffect(new TapSourceEffect().setText("tap it"));
this.addAbility(ability);
}
private UnrootedAncestor(final UnrootedAncestor card) {
super(card);
}
@Override
public UnrootedAncestor copy() {
return new UnrootedAncestor(this);
}
}

View file

@ -51,6 +51,7 @@ class VeiledSentryEffect extends ContinuousEffectImpl {
public VeiledSentryEffect() {
super(Duration.Custom, Outcome.BecomeCreature);
staticText = "{this} becomes an Illusion creature with power and toughness equal to that spell's mana value";
this.dependencyTypes.add(DependencyType.BecomeCreature);
}
private VeiledSentryEffect(final VeiledSentryEffect effect) {

View file

@ -0,0 +1,50 @@
package mage.cards.v;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.DiesThisOrAnotherTriggeredAbility;
import mage.abilities.effects.common.GainLifeEffect;
import mage.abilities.effects.common.LoseLifeOpponentsEffect;
import mage.abilities.keyword.MobilizeAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.filter.StaticFilters;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class VeneratedStormsinger extends CardImpl {
public VeneratedStormsinger(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{B}");
this.subtype.add(SubType.ORC);
this.subtype.add(SubType.CLERIC);
this.power = new MageInt(3);
this.toughness = new MageInt(3);
// Mobilize 1
this.addAbility(new MobilizeAbility(1));
// Whenever this creature or another creature you control dies, each opponent loses 1 life and you gain 1 life.
Ability ability = new DiesThisOrAnotherTriggeredAbility(
new LoseLifeOpponentsEffect(1), false,
StaticFilters.FILTER_CONTROLLED_CREATURE
);
ability.addEffect(new GainLifeEffect(1).concatBy("and"));
this.addAbility(ability);
}
private VeneratedStormsinger(final VeneratedStormsinger card) {
super(card);
}
@Override
public VeneratedStormsinger copy() {
return new VeneratedStormsinger(this);
}
}

View file

@ -0,0 +1,41 @@
package mage.cards.v;
import java.util.UUID;
import mage.MageInt;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.effects.common.ruleModifying.CantCastDuringYourTurnEffect;
import mage.abilities.keyword.MobilizeAbility;
import mage.constants.SubType;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
/**
* @author balazskristof
*/
public final class VoiceOfVictory extends CardImpl {
public VoiceOfVictory(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{W}");
this.subtype.add(SubType.HUMAN);
this.subtype.add(SubType.BARD);
this.power = new MageInt(1);
this.toughness = new MageInt(3);
// Mobilize 2
this.addAbility(new MobilizeAbility(2));
// Your opponents can't cast spells during your turn.
this.addAbility(new SimpleStaticAbility(new CantCastDuringYourTurnEffect()));
}
private VoiceOfVictory(final VoiceOfVictory card) {
super(card);
}
@Override
public VoiceOfVictory copy() {
return new VoiceOfVictory(this);
}
}

View file

@ -0,0 +1,43 @@
package mage.cards.w;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
import mage.abilities.effects.common.GainLifeEffect;
import mage.abilities.effects.common.MillCardsTargetEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.target.TargetPlayer;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class WatcherOfTheWayside extends CardImpl {
public WatcherOfTheWayside(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{3}");
this.subtype.add(SubType.GOLEM);
this.power = new MageInt(3);
this.toughness = new MageInt(2);
// When this creature enters, target player mills two cards. You gain 2 life.
Ability ability = new EntersBattlefieldTriggeredAbility(new MillCardsTargetEffect(2));
ability.addEffect(new GainLifeEffect(2));
ability.addTarget(new TargetPlayer());
this.addAbility(ability);
}
private WatcherOfTheWayside(final WatcherOfTheWayside card) {
super(card);
}
@Override
public WatcherOfTheWayside copy() {
return new WatcherOfTheWayside(this);
}
}

View file

@ -71,6 +71,7 @@ class WeatherlightCompleatedEffect extends ContinuousEffectImpl {
super(Duration.WhileOnBattlefield, Layer.TypeChangingEffects_4, SubLayer.NA, Outcome.Benefit);
staticText = "as long as {this} has four or more phyresis counters on it, " +
"it's a Phyrexian creature in addition to its other types";
this.dependencyTypes.add(DependencyType.BecomeCreature);
}
private WeatherlightCompleatedEffect(final WeatherlightCompleatedEffect effect) {

View file

@ -69,6 +69,7 @@ class WeepingAngelMarbleizeEffect extends ContinuousEffectImpl {
WeepingAngelMarbleizeEffect() {
super(Duration.EndOfTurn, Layer.TypeChangingEffects_4, SubLayer.NA, Outcome.Detriment);
staticText = "{this} isn't a creature until end of turn.";
this.dependencyTypes.add(DependencyType.BecomeCreature);
}
private WeepingAngelMarbleizeEffect(final WeepingAngelMarbleizeEffect effect) {

View file

@ -9,14 +9,7 @@ import mage.abilities.costs.common.TapSourceCost;
import mage.abilities.effects.ContinuousEffectImpl;
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.PhaseStep;
import mage.constants.SubLayer;
import mage.constants.SubType;
import mage.constants.Zone;
import mage.constants.*;
import mage.filter.common.FilterArtifactPermanent;
import mage.filter.predicate.Predicates;
import mage.game.Game;
@ -69,6 +62,7 @@ class XenicPoltergeistEffect extends ContinuousEffectImpl {
public XenicPoltergeistEffect() {
super(Duration.Custom, Outcome.BecomeCreature);
staticText = "Until your next upkeep, target noncreature artifact becomes an artifact creature with power and toughness each equal to its mana value";
this.dependencyTypes.add(DependencyType.BecomeCreature);
}
private XenicPoltergeistEffect(final XenicPoltergeistEffect effect) {

View file

@ -45,6 +45,7 @@ class XenograftAddSubtypeEffect extends ContinuousEffectImpl {
XenograftAddSubtypeEffect() {
super(Duration.WhileOnBattlefield, Layer.TypeChangingEffects_4, SubLayer.NA, Outcome.Benefit);
staticText = "Each creature you control is the chosen type in addition to its other types";
this.dependendToTypes.add(DependencyType.BecomeCreature);
}
private XenograftAddSubtypeEffect(final XenograftAddSubtypeEffect effect) {

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