diff --git a/Mage.Sets/src/mage/cards/a/AdaptiveAutomaton.java b/Mage.Sets/src/mage/cards/a/AdaptiveAutomaton.java index c1e338aceaa..cb47c035047 100644 --- a/Mage.Sets/src/mage/cards/a/AdaptiveAutomaton.java +++ b/Mage.Sets/src/mage/cards/a/AdaptiveAutomaton.java @@ -38,7 +38,7 @@ public final class AdaptiveAutomaton extends CardImpl { // As Adaptive Automaton enters the battlefield, choose a creature type. // Adaptive Automaton is the chosen type in addition to its other types. - AsEntersBattlefieldAbility ability = new AsEntersBattlefieldAbility(new ChooseCreatureTypeEffect(Outcome.BoostCreature), null, EnterEventType.SELF); + AsEntersBattlefieldAbility ability = new AsEntersBattlefieldAbility(new ChooseCreatureTypeEffect(Outcome.BoostCreature)); ability.addEffect(new EnterAttributeAddChosenSubtypeEffect()); this.addAbility(ability); diff --git a/Mage.Sets/src/mage/cards/e/EnchantersBane.java b/Mage.Sets/src/mage/cards/e/EnchantersBane.java new file mode 100644 index 00000000000..1faac01ac74 --- /dev/null +++ b/Mage.Sets/src/mage/cards/e/EnchantersBane.java @@ -0,0 +1,79 @@ +package mage.cards.e; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.BeginningOfEndStepTriggeredAbility; +import mage.abilities.effects.OneShotEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.TargetController; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.players.Player; +import mage.target.common.TargetEnchantmentPermanent; + +/** + * + * @author TheElk801 + */ +public final class EnchantersBane extends CardImpl { + + public EnchantersBane(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{1}{R}"); + + // At the beginning of your end step, target enchantment deals damage equal to its converted mana cost to its controller unless that player sacrifices it. + Ability ability = new BeginningOfEndStepTriggeredAbility( + new EnchantersBaneEffect(), TargetController.YOU, false + ); + ability.addTarget(new TargetEnchantmentPermanent()); + this.addAbility(ability); + } + + public EnchantersBane(final EnchantersBane card) { + super(card); + } + + @Override + public EnchantersBane copy() { + return new EnchantersBane(this); + } +} + +class EnchantersBaneEffect extends OneShotEffect { + + public EnchantersBaneEffect() { + super(Outcome.Benefit); + this.staticText = "target enchantment deals damage equal to " + + "its converted mana cost to its controller " + + "unless that player sacrifices it"; + } + + public EnchantersBaneEffect(final EnchantersBaneEffect effect) { + super(effect); + } + + @Override + public EnchantersBaneEffect copy() { + return new EnchantersBaneEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Permanent permanent = game.getPermanent(source.getFirstTarget()); + if (permanent == null) { + return false; + } + Player player = game.getPlayer(permanent.getControllerId()); + if (player == null) { + return false; + } + if (player.chooseUse(Outcome.GainLife, "Sacrifice " + permanent.getLogName() + "?", source, game)) { + permanent.sacrifice(source.getSourceId(), game); + } else { + player.damage(permanent.getConvertedManaCost(), permanent.getId(), game, false, true); + } + return true; + } +} diff --git a/Mage.Sets/src/mage/cards/f/ForgeOfHeroes.java b/Mage.Sets/src/mage/cards/f/ForgeOfHeroes.java new file mode 100644 index 00000000000..532f5d829c5 --- /dev/null +++ b/Mage.Sets/src/mage/cards/f/ForgeOfHeroes.java @@ -0,0 +1,97 @@ +package mage.cards.f; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.counter.AddCountersTargetEffect; +import mage.abilities.mana.ColorlessManaAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.counters.CounterType; +import mage.filter.FilterPermanent; +import mage.filter.predicate.permanent.CommanderPredicate; +import mage.filter.predicate.permanent.EnteredThisTurnPredicate; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.target.TargetPermanent; + +/** + * + * @author TheElk801 + */ +public final class ForgeOfHeroes extends CardImpl { + + private static final FilterPermanent filter + = new FilterPermanent("commander that entered the battlefield this turn"); + + static { + filter.add(new CommanderPredicate()); + filter.add(new EnteredThisTurnPredicate()); + } + + public ForgeOfHeroes(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.LAND}, ""); + + // {T}: Add {C}. + this.addAbility(new ColorlessManaAbility()); + + // {T}: Choose target commander that entered the battlefield this turn. Put a +1/+1 counter on it if it's a creature and a loyalty counter on it if it's a planeswalker. + Ability ability = new SimpleActivatedAbility( + new ForgeOfHeroesEffect(), + new TapSourceCost() + ); + ability.addTarget(new TargetPermanent(filter)); + this.addAbility(ability); + } + + public ForgeOfHeroes(final ForgeOfHeroes card) { + super(card); + } + + @Override + public ForgeOfHeroes copy() { + return new ForgeOfHeroes(this); + } +} + +class ForgeOfHeroesEffect extends OneShotEffect { + + public ForgeOfHeroesEffect() { + super(Outcome.Benefit); + this.staticText = "choose target commander that entered the battlefield this turn. " + + "Put a +1/+1 counter on it if it's a creature " + + "and a loyalty counter on it if it's a planeswalker"; + } + + public ForgeOfHeroesEffect(final ForgeOfHeroesEffect effect) { + super(effect); + } + + @Override + public ForgeOfHeroesEffect copy() { + return new ForgeOfHeroesEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Permanent permanent = game.getPermanent(source.getFirstTarget()); + if (permanent == null) { + return false; + } + if (permanent.isCreature()) { + new AddCountersTargetEffect( + CounterType.P1P1.createInstance() + ).apply(game, source); + } + if (permanent.isPlaneswalker()) { + new AddCountersTargetEffect( + CounterType.LOYALTY.createInstance() + ).apply(game, source); + } + return true; + } +} diff --git a/Mage.Sets/src/mage/cards/l/LoyalDrake.java b/Mage.Sets/src/mage/cards/l/LoyalDrake.java new file mode 100644 index 00000000000..e2e27052ed1 --- /dev/null +++ b/Mage.Sets/src/mage/cards/l/LoyalDrake.java @@ -0,0 +1,51 @@ +package mage.cards.l; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.BeginningOfCombatTriggeredAbility; +import mage.abilities.condition.common.CommanderInPlayCondition; +import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.effects.common.DrawCardSourceControllerEffect; +import mage.constants.SubType; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.TargetController; + +/** + * + * @author TheElk801 + */ +public final class LoyalDrake extends CardImpl { + + public LoyalDrake(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{U}"); + + this.subtype.add(SubType.DRAKE); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // Flying + this.addAbility(FlyingAbility.getInstance()); + + // Lieutenant — At the beginning of combat on your turn, if you control your commander, draw a card. + this.addAbility(new ConditionalTriggeredAbility( + new BeginningOfCombatTriggeredAbility( + new DrawCardSourceControllerEffect(1), + TargetController.YOU, false + ), CommanderInPlayCondition.instance, + "Lieutenant — At the beginning of combat " + + "on your turn, if you control your commander, draw a card." + )); + } + + public LoyalDrake(final LoyalDrake card) { + super(card); + } + + @Override + public LoyalDrake copy() { + return new LoyalDrake(this); + } +} diff --git a/Mage.Sets/src/mage/cards/m/MetallicMimic.java b/Mage.Sets/src/mage/cards/m/MetallicMimic.java index 8788555ab1a..58c8282e391 100644 --- a/Mage.Sets/src/mage/cards/m/MetallicMimic.java +++ b/Mage.Sets/src/mage/cards/m/MetallicMimic.java @@ -32,7 +32,7 @@ public final class MetallicMimic extends CardImpl { this.toughness = new MageInt(1); // As Metallic Mimic enters the battlefield, choose a creature type. - AsEntersBattlefieldAbility ability = new AsEntersBattlefieldAbility(new ChooseCreatureTypeEffect(Outcome.BoostCreature), null, EnterEventType.SELF); + AsEntersBattlefieldAbility ability = new AsEntersBattlefieldAbility(new ChooseCreatureTypeEffect(Outcome.BoostCreature)); // Metallic Mimic is the chosen type in addition to its other types. ability.addEffect(new EnterAttributeAddChosenSubtypeEffect()); this.addAbility(ability); diff --git a/Mage.Sets/src/mage/cards/r/RetrofitterFoundry.java b/Mage.Sets/src/mage/cards/r/RetrofitterFoundry.java new file mode 100644 index 00000000000..56c55ec9f0b --- /dev/null +++ b/Mage.Sets/src/mage/cards/r/RetrofitterFoundry.java @@ -0,0 +1,81 @@ +package mage.cards.r; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.SacrificeTargetCost; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.costs.mana.GenericManaCost; +import mage.abilities.effects.common.CreateTokenEffect; +import mage.abilities.effects.common.UntapSourceEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.Zone; +import mage.filter.common.FilterControlledPermanent; +import mage.filter.predicate.mageobject.SubtypePredicate; +import mage.game.permanent.token.RetrofitterFoundryToken; +import mage.game.permanent.token.ServoToken; +import mage.game.permanent.token.ThopterColorlessToken; +import mage.target.common.TargetControlledPermanent; + +/** + * + * @author TheElk801 + */ +public final class RetrofitterFoundry extends CardImpl { + + private static final FilterControlledPermanent filter1 = new FilterControlledPermanent("a Servo"); + private static final FilterControlledPermanent filter2 = new FilterControlledPermanent("a Thopter"); + + static { + filter1.add(new SubtypePredicate(SubType.SERVO)); + filter2.add(new SubtypePredicate(SubType.THOPTER)); + } + + public RetrofitterFoundry(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{1}"); + + // {3}: Untap Retrofitter Foundry. + this.addAbility(new SimpleActivatedAbility( + Zone.BATTLEFIELD, + new UntapSourceEffect(), + new GenericManaCost(3)) + ); + + // {2}, {T}: Create a 1/1 colorless Servo artifact creature token. + Ability ability = new SimpleActivatedAbility( + new CreateTokenEffect(new ServoToken()), + new GenericManaCost(2) + ); + ability.addCost(new TapSourceCost()); + this.addAbility(ability); + + // {1}, {T}, Sacrifice a Servo: Create a 1/1 colorless Thopter artifact creature token with flying. + ability = new SimpleActivatedAbility( + new CreateTokenEffect(new ThopterColorlessToken()), + new GenericManaCost(1) + ); + ability.addCost(new TapSourceCost()); + ability.addCost(new SacrificeTargetCost(new TargetControlledPermanent(filter1))); + this.addAbility(ability); + + // {T}, Sacrifice a Thopter: Create a 4/4 colorless Construct artifact creature token. + ability = new SimpleActivatedAbility( + new CreateTokenEffect(new RetrofitterFoundryToken()), + new TapSourceCost() + ); + ability.addCost(new SacrificeTargetCost(new TargetControlledPermanent(filter2))); + this.addAbility(ability); + } + + public RetrofitterFoundry(final RetrofitterFoundry card) { + super(card); + } + + @Override + public RetrofitterFoundry copy() { + return new RetrofitterFoundry(this); + } +} diff --git a/Mage.Sets/src/mage/cards/s/SaheelisDirective.java b/Mage.Sets/src/mage/cards/s/SaheelisDirective.java new file mode 100644 index 00000000000..4f3c0b21c89 --- /dev/null +++ b/Mage.Sets/src/mage/cards/s/SaheelisDirective.java @@ -0,0 +1,91 @@ +package mage.cards.s; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.keyword.ImproviseAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.cards.Cards; +import mage.cards.CardsImpl; +import mage.constants.CardType; +import mage.constants.ComparisonType; +import mage.constants.Outcome; +import mage.constants.Zone; +import mage.filter.FilterCard; +import mage.filter.common.FilterArtifactCard; +import mage.filter.predicate.mageobject.ConvertedManaCostPredicate; +import mage.game.Game; +import mage.players.Player; +import mage.target.TargetCard; + +/** + * + * @author TheElk801 + */ +public final class SaheelisDirective extends CardImpl { + + public SaheelisDirective(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{X}{R}{R}{R}"); + + + // Improvise + this.addAbility(new ImproviseAbility()); + + // Reveal the top X cards of your library. You may put any number of artifact cards with converted mana cost X or less from among them onto the battlefield. Then put all cards revealed this way that weren't put onto the battlefield into your graveyard. + this.getSpellAbility().addEffect(new SaheelisDirectiveEffect()); + } + + public SaheelisDirective(final SaheelisDirective card) { + super(card); + } + + @Override + public SaheelisDirective copy() { + return new SaheelisDirective(this); + } +} +class SaheelisDirectiveEffect extends OneShotEffect { + + public SaheelisDirectiveEffect() { + super(Outcome.PutCardInPlay); + staticText = "Reveal the top X cards of your library. " + + "You may put any number of artifact cards with " + + "converted mana cost X or less from among them onto the battlefield. " + + "Then put all cards revealed this way that weren't " + + "put onto the battlefield into your graveyard."; + } + + public SaheelisDirectiveEffect(final SaheelisDirectiveEffect effect) { + super(effect); + } + + @Override + public boolean apply(Game game, Ability source) { + Player controller = game.getPlayer(source.getControllerId()); + if (controller == null) { + return false; + } + int xValue = source.getManaCostsToPay().getX(); + Cards cards = new CardsImpl(controller.getLibrary().getTopCards(game, xValue)); + if (!cards.isEmpty()) { + controller.revealCards(source, cards, game); + FilterCard filter = new FilterArtifactCard("artifact cards with converted mana cost " + xValue + " or less to put onto the battlefield"); + filter.add(new ConvertedManaCostPredicate(ComparisonType.FEWER_THAN, xValue + 1)); + TargetCard target1 = new TargetCard(0, Integer.MAX_VALUE, Zone.LIBRARY, filter); + target1.setNotTarget(true); + controller.choose(Outcome.PutCardInPlay, cards, target1, game); + Cards toBattlefield = new CardsImpl(target1.getTargets()); + cards.removeAll(toBattlefield); + controller.moveCards(toBattlefield.getCards(game), Zone.BATTLEFIELD, source, game, false, false, false, null); + controller.moveCards(cards, Zone.GRAVEYARD, source, game); + } + return true; + } + + @Override + public SaheelisDirectiveEffect copy() { + return new SaheelisDirectiveEffect(this); + } + +} diff --git a/Mage.Sets/src/mage/cards/t/TawnosUrzasApprentice.java b/Mage.Sets/src/mage/cards/t/TawnosUrzasApprentice.java new file mode 100644 index 00000000000..e4db5140e72 --- /dev/null +++ b/Mage.Sets/src/mage/cards/t/TawnosUrzasApprentice.java @@ -0,0 +1,101 @@ +package mage.cards.t; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.OneShotEffect; +import mage.constants.SubType; +import mage.constants.SuperType; +import mage.abilities.keyword.HasteAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.TargetController; +import mage.constants.Zone; +import mage.filter.FilterStackObject; +import mage.filter.predicate.ability.ArtifactSourcePredicate; +import mage.filter.predicate.permanent.ControllerPredicate; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.game.stack.StackAbility; +import mage.players.Player; +import mage.target.common.TargetActivatedOrTriggeredAbility; + +/** + * + * @author TheElk801 + */ +public final class TawnosUrzasApprentice extends CardImpl { + + private final static FilterStackObject filter = new FilterStackObject("activated or triggered ability you control from an artifact source"); + + static { + filter.add(new ArtifactSourcePredicate()); + filter.add(new ControllerPredicate(TargetController.YOU)); + } + + public TawnosUrzasApprentice(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{U}{R}"); + + this.addSuperType(SuperType.LEGENDARY); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.ARTIFICER); + this.power = new MageInt(1); + this.toughness = new MageInt(3); + + // Haste + this.addAbility(HasteAbility.getInstance()); + + // {U}{R}, {T}: Copy target activated or triggered ability you control from an artifact source. You may choose new targets for the copy. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new TawnosUrzasApprenticeEffect(), new ManaCostsImpl("{U}{R}")); + ability.addCost(new TapSourceCost()); + ability.addTarget(new TargetActivatedOrTriggeredAbility(filter)); + this.addAbility(ability); + } + + public TawnosUrzasApprentice(final TawnosUrzasApprentice card) { + super(card); + } + + @Override + public TawnosUrzasApprentice copy() { + return new TawnosUrzasApprentice(this); + } +} + +class TawnosUrzasApprenticeEffect extends OneShotEffect { + + public TawnosUrzasApprenticeEffect() { + super(Outcome.Copy); + this.staticText = "copy target activated or triggered ability you control from an artifact source. You may choose new targets for the copy"; + } + + public TawnosUrzasApprenticeEffect(final TawnosUrzasApprenticeEffect effect) { + super(effect); + } + + @Override + public boolean apply(Game game, Ability source) { + StackAbility stackAbility = (StackAbility) game.getStack().getStackObject(targetPointer.getFirst(game, source)); + if (stackAbility != null) { + Player controller = game.getPlayer(source.getControllerId()); + Permanent sourcePermanent = game.getPermanent(source.getSourceId()); + if (controller != null && sourcePermanent != null) { + stackAbility.createCopyOnStack(game, source, source.getControllerId(), true); + game.informPlayers(sourcePermanent.getIdName() + ": " + controller.getLogName() + " copied an ability"); + return true; + } + } + return false; + + } + + @Override + public TawnosUrzasApprenticeEffect copy() { + return new TawnosUrzasApprenticeEffect(this); + } +} diff --git a/Mage.Sets/src/mage/sets/Commander2018.java b/Mage.Sets/src/mage/sets/Commander2018.java new file mode 100644 index 00000000000..a7684a575a0 --- /dev/null +++ b/Mage.Sets/src/mage/sets/Commander2018.java @@ -0,0 +1,32 @@ +package mage.sets; + +import mage.cards.ExpansionSet; +import mage.constants.Rarity; +import mage.constants.SetType; + +/** + * + * @author TheElk801 + */ +public final class Commander2018 extends ExpansionSet { + + private static final Commander2018 instance = new Commander2018(); + + public static Commander2018 getInstance() { + return instance; + } + + private Commander2018() { + super("Commander 2018 Edition", "C18", ExpansionSet.buildDate(2018, 8, 10), SetType.SUPPLEMENTAL); + this.blockName = "Command Zone"; + + cards.add(new SetCardInfo("Chaos Warp", 122, Rarity.RARE, mage.cards.c.ChaosWarp.class)); + cards.add(new SetCardInfo("Enchanter's Bane", 21, Rarity.RARE, mage.cards.e.EnchantersBane.class)); + cards.add(new SetCardInfo("Forge of Heroes", 58, Rarity.COMMON, mage.cards.f.ForgeOfHeroes.class)); + cards.add(new SetCardInfo("Loyal Drake", 10, Rarity.UNCOMMON, mage.cards.l.LoyalDrake.class)); + cards.add(new SetCardInfo("Retrofitter Foundry", 57, Rarity.RARE, mage.cards.r.RetrofitterFoundry.class)); + cards.add(new SetCardInfo("Saheeli's Directive", 26, Rarity.RARE, mage.cards.s.SaheelisDirective.class)); + cards.add(new SetCardInfo("Tawnos, Urza's Apprentice", 45, Rarity.MYTHIC, mage.cards.t.TawnosUrzasApprentice.class)); + cards.add(new SetCardInfo("Thopter Spy Network", 107, Rarity.RARE, mage.cards.t.ThopterSpyNetwork.class)); + } +} diff --git a/Mage/src/main/java/mage/abilities/effects/common/SacrificeOpponentsEffect.java b/Mage/src/main/java/mage/abilities/effects/common/SacrificeOpponentsEffect.java index 308264e35de..243c524d5c8 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/SacrificeOpponentsEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/SacrificeOpponentsEffect.java @@ -8,7 +8,9 @@ import mage.abilities.dynamicvalue.DynamicValue; import mage.abilities.dynamicvalue.common.StaticValue; import mage.abilities.effects.OneShotEffect; import mage.constants.Outcome; +import mage.constants.TargetController; import mage.filter.FilterPermanent; +import mage.filter.predicate.permanent.ControllerPredicate; import mage.game.Game; import mage.game.permanent.Permanent; import mage.players.Player; @@ -36,7 +38,8 @@ public class SacrificeOpponentsEffect extends OneShotEffect { public SacrificeOpponentsEffect(DynamicValue amount, FilterPermanent filter) { super(Outcome.Sacrifice); this.amount = amount; - this.filter = filter; + this.filter = filter.copy(); + this.filter.add(new ControllerPredicate(TargetController.YOU)); setText(); } diff --git a/Mage/src/main/java/mage/game/permanent/token/RetrofitterFoundryToken.java b/Mage/src/main/java/mage/game/permanent/token/RetrofitterFoundryToken.java new file mode 100644 index 00000000000..c413d20bcac --- /dev/null +++ b/Mage/src/main/java/mage/game/permanent/token/RetrofitterFoundryToken.java @@ -0,0 +1,34 @@ +package mage.game.permanent.token; + +import mage.constants.CardType; +import mage.constants.SubType; +import mage.MageInt; + +/** + * + * @author TheElk801 + */ +public final class RetrofitterFoundryToken extends TokenImpl { + + public RetrofitterFoundryToken() { + this("C18"); + } + + public RetrofitterFoundryToken(String setCode) { + super("Construct", "4/4 colorless Construct artifact creature token"); + this.setOriginalExpansionSetCode(setCode); + cardType.add(CardType.ARTIFACT); + cardType.add(CardType.CREATURE); + subtype.add(SubType.CONSTRUCT); + power = new MageInt(4); + toughness = new MageInt(4); + } + + public RetrofitterFoundryToken(final RetrofitterFoundryToken token) { + super(token); + } + + public RetrofitterFoundryToken copy() { + return new RetrofitterFoundryToken(this); + } +} diff --git a/Utils/known-sets.txt b/Utils/known-sets.txt index 0a3e6716835..896efb1671f 100644 --- a/Utils/known-sets.txt +++ b/Utils/known-sets.txt @@ -25,6 +25,7 @@ Commander 2014 Edition|Commander2014| Commander 2015 Edition|Commander2015| Commander 2016 Edition|Commander2016| Commander 2017 Edition|Commander2017| +Commander 2018|Commander2018| Commander Anthology|CommanderAnthology| Commander Anthology 2018|CommanderAnthology2018| Commander's Arsenal|CommandersArsenal| diff --git a/Utils/mtg-cards-data.txt b/Utils/mtg-cards-data.txt index 7e4d1458e2c..cf70702e450 100644 --- a/Utils/mtg-cards-data.txt +++ b/Utils/mtg-cards-data.txt @@ -33925,69 +33925,20 @@ Cleansing Screech|Global Series: Jiang Yanggu & Mu Yanling|37|C|{4}{R}|Sorcery|| Timber Gorge|Global Series: Jiang Yanggu & Mu Yanling|38|C||Land|||Timber Gorge enters the battlefield tapped.${T}: Add {R} or {G}.| Mountain|Global Series: Jiang Yanggu & Mu Yanling|39|C||Basic Land - Mountain|||({T}: Add {R}.)| Forest|Global Series: Jiang Yanggu & Mu Yanling|40|C||Basic Land - Forest|||({T}: Add {G}.)| -Bludgeoning Pain|Star Wars|300|C|{1}{B}|Instant|||Target creature gets -2/-2 until end of turn. Tap that creature.| -Bor Gullet|Star Wars|301|U|{3}{U}{B}|Creature - Horror Cephalid|4|4|When Bor Gullet enters the battlefield, target opponent reveals his or her hand. You choose a card from it. That player discards that card.| -Chirrut Imwe|Star Wars|302|R|{G}{W}{U}|Legendary Creature - Human Monk|3|3|Chirrut Imwe can block up to two additional creatures.${1}{W}: Prevent all combat damage that would be dealt to Chirrut Imwe until end of turn.| -Director Krennic|Star Wars|303|R|{3}{B}{B}|Legendary Creature - Human Advisor|3|4|When Director Krennic enters the battlefield, create two 1/1 black Trooper creature tokens.$When Director Krennic leaves the battlefield, destroy target basic land.| -Force Protection|Star Wars|304|C|{W}|Instant|||Target creature you control gains protection from color of your choice until end of turn. Scry 1.| -Gerrera's Revolutionary|Star Wars|305|C|{R}|Creature - Barabel Rebel|2|1|Gerrera's Revolutionary attacks each turn if able.| -Hammerhead Corvette|Star Wars|306|U|{3}{G}|Artifact Creature - Rebel Starship|3|3|Spaceflight$Whenever Hammerhead Corvette attacks, you may untap target Starship creature defending player controls and have that creature block Hammerhead Corvette this turn if able.| -Imperial Hovertank|Star Wars|307|U|{4}{W}{B}|Artifact Creature - Trooper Construct|4|4|Whenever a Trooper creature you control attacks, defending player loses 1 life and you gain 1 life.| -Jyn Erso and Cassian Andor|Star Wars|308|R|{2}{R}{W}|Legendary Creature - Human Rebel|4|4|At the beginning of combat on your turn, target creature gets +1/+0 and gains haste until end of turn.| -Occupation|Star Wars|309|U|{W}{B}|Enchantment|||Creatures your opponents control enter the battlefield tapped.${W}{B}: Target creature can't attack or block this turn, and its activated abilities can't be activated until end of turn.| -Resistance|Star Wars|310|U|{R}{W}|Enchantment|||Whenever a creature enters the battlefield under your control, Resistance deals 1 damage to each opponent.${R}{W}: Target creature gains haste until end of turn and must attack or block this turn if able.| -Thermal Detonator|Star Wars|311|C|{1}|Artifact|||{2}, Sacrifice Thermal Detonator: Thermal Detonator deals 2 damage to target creature without spaceflight or target player.| -TIE Striker|Star Wars|312|C|{1}{B}|Artifact Creature - Starship|2|1|Spaceflight| -U-Wing|Star Wars|313|U|{2}{U}|Artifact Creature - Rebel Starship|2|2|Spaceflight$As long as U-Wing is tapped, it gets +1/+0.$As long as U-Wing is untapped, it gets +0/+1.| -Vader's Command|Star Wars|314|R|{2}{B}{B}|Instant|||Choose two -$ Counter target spell unless its controller pays 5 life.$ Destroy target planeswalker.$ Destroy target nonartifact creature.$ Gain 5 life.| -Astromech Droid|Star Wars|400|C|{W}|Artifact Creature - Droid|0|1|{T}: Target starship creature you control gets +1/+1 and gains vigilance until end of turn.$Repair 4| -Buried Ruin|Star Wars|401|C||Land|||{T}: Add {1} to your mana pool.${2}, {T}, Sacrifice Buried Ruin: Return target artifact card from your graveyard to your hand.| -Finn|Star Wars|402|U|{3}{G}|Legendary Creature - Human Trooper Soldier|3|3|Whenever Finn or another nontoken creature you control enters the battlefield under your control, you gain 1 life for each nontoken creature you control.| -Flame Trooper|Star Wars|403|C|{2}{R}|Creature - Human Trooper|2|2|Trooper creatures you control have menace.| -Force Stasis|Star Wars|404|C|{1}{U}|Instant|||Choose one -$ Tap target creature. It doesn't untap during its controller's next untap step.$ Return target instant or sorcery spell you don't control to its owner's hand.| -General Hux|Star Wars|405|U|{3}{B}|Legendary Creature - Human Advisor|3|3|Whenever General Hux or another nontoken creature enters the battlefield under your control, until end of turn, target creature gains "{B}: This creature gets +1/+1 until end of turn."| -Kylo Ren|Star Wars|406|M|{1}{U}{B}{R}|Legendary Creature - Human Sith|3|3|Haste, first strike$Kylo Ren attacks each turn if able.$Whenever Kylo Ren attacks, it gets +1/+0 for each creature in your graveyard and you may tap target creature defending player controls.| -Outer Rim Gang|Star Wars|407|C|{2}{B}{R}{G}|Creature - Human Rogue Hunter|4|4|When Outer Rim Gang enters the battlefield, each creature with a bounty counter on it gets -2/-2 until end of turn.| -Poe Dameron|Star Wars|408|U|{3}{W}|Legendary Creature - Human Soldier|3|3|Whenever Poe Dameron or another nontoken creature enters the battlefield under your control, starship creatures you control get +1/+1 until end of turn.| -Rathtar|Star Wars|409|C|{2}{R}{G}|Creature - Beast|4|4|{5}{G}{G}: Monstrosity 2.$When Rathtar becomes monstrous, any number of target creatures must block it this turn if able.| -Rey|Star Wars|410|R|{G}{W}{U}|Legendary Creature - Human Knight|3|3|Vigilance, first strike$Whenever Rey enters or leaves the battlefield, reveal the top card of target player's library. You gain life equal to that card's converted mana cost.| -Riot Trooper|Star Wars|411|C|{2}{W}|Creature - Human Trooper|2|2|Each trooper creature you control can block an additional creature each combat.| -Salvage Trader|Star Wars|412|C|{3}{U}|Creature - Crolute|2|3|{T}: Exchange control of target artifact you control and target artifact an opponent controls with the same converted mana cost.| -Sins of the Father|Star Wars|413|C|{1}{B}|Sorcery|||Exile target player's graveyard. That player loses 1 life for each instant or sorcery card exiled this way.| -Upsilon-class Shuttle|Star Wars|414|C|{5}|Artifact Creature - Starship|2|3|Spaceflight$Whenever Upsilon-class Shuttle attacks, target creature you control gains spaceflight until end of turn.| -Canto Bight Enforcer|Star Wars|500|U|{1}{B}|Creature - Human Hunter|2|2|When Canto Bight Enforcer enters the battlefield, you may put a bounty counter on target creature.$Bounty - Whenever a creature an opponent controls with a bounty counter on it dies, put a +1/+1 counter on Canto Bight Enforcer.| -Cantonica Casino|Star Wars|501|R|{2}|Artifact|||{T}: Roll two six-sided dice. If you roll doubles, gain 10 life. Otherwise, lose 1 life.| -Captain Phasma|Star Wars|502|R|{4}{W}|Legendary Creature - Human Trooper|4|4|Nontoken Trooper creatures you control have "When this creature enters the battlefield, creature 1/1/ white Trooper creature token."${W}{U}{B}{R}{G}: Search your library for a Trooper creature card, reveal it, put it into your hand, then shuffle your library.| -Code Slice|Star Wars|503|C|{R}|Sorcery|||Put a bounty counter on target creature.$Artifact creatures with bounty counters on them can't block this turn.| -Delay Tactic|Star Wars|504|C|{1}{U}|Instant|||Choose one -$ Creatures you control gain hexproof until end of turn.$ Creatures target opponent controls don't untap during his or her next untap step.| -Fathier|Star Wars|505|C|{2}{R}{R}|Creature - Beast|3|3|Haste${4}{R}{R}: Monstrosity 2.| -First Order Dreadnought|Star Wars|506|M|{4}{B}{B}|Artifact Creature - Starship|5|6|Spaceflight${2}{B}, {T}: Destroy target creature.| -Force Projection|Star Wars|507|R|{1}{U}{U}|Sorcery|||Create a token that is a copy of target creature except that it is an Illusion in addition to its other types and gains "When this creature becomes the target of a spell, sacrifice it."$Scry 2.| -Force Telepathy|Star Wars|508|C|{UB}|Instant|||Target player reveals his or her hand.$Scry 2| -Glorious Charge|Star Wars|509|C|{1}{W}|Instant|||Creatures you control get +1/+1 until end of turn.| -Inspire|Star Wars|510|C|{1}{U}|Instant|||Untap target creature.$Draw a card.| -Luke Skywalker, the Last Jedi|Star Wars|511|M|{2}{G}{W}|Legendary Planeswalker - Luke|||+1: Put two +1/+1 counters on up to one target creature.$-3: Put target noncreature permanent on top of its owner's library.$-6: You get an emblem with "Prevent all damage that would be dealt to you during combat." Exile Luke Skywalker, the Last Jedi.| -Mouse Droid|Star Wars|512|C|{1}{U}|Artifact Creature - Droid|0|1|When Mouse Droid dies, draw a card.$Repair 3| -Porg Nest|Star Wars|513|U|{2}{G}|Creature - Bird|0|2|Defender$At the beginning of your upkeep, create a 0/1 green Bird creature token named Porg with "{G}: Monstrosity 1."| -Praetorian Trooper|Star Wars|514|R|{3}{R}|Creature - Human Trooper|2|2|Trooper creatures you control have double strike.| -Resistance Bomber|Star Wars|515|U|{3}{R}|Artifact Creature - Rebel Starship|2|2|Spaceflight$Resistance Bomber enters the battlefield with a charge counter on it.$Remove a charge counter from Resistance Bomber: Resistance Bomber deals 5 damage to target creature. Activate this ability only if Resistance Bomber is attacking.| -Sai Tok|Star Wars|516|U|{B}{B}|Instant|||Destroy target creature or planeswalker if it has converted mana cost 4 or less.| -Supreme Leader Snoke|Star Wars|517|M|{U}{B}{R}|Legendary Planeswalker - Snoke|||+1: Put a loyalty counter on Supreme Leader Snoke for each life lost by all opponents from noncombat sources this turn.$-1: Draw a card and lose 1 life.$-X: Gain control of target creature with converted mana cost X. Untap that creature. It gains haste. Sacrifice that creature at the beginning of the next end step.| -TIE Silencer|Star Wars|518|R|{1}{B}{R}|Artifact Creature - Starship|2|2|Haste$Spaceflight$Whenever TIE Silencer attacks, it deals 1 damage to defending player and 1 damage to up to one target creature that player controls.| -Vulptex|Star Wars|519|C|{1}{W}|Creature - Fox|1|1|When Vulptex enters the battlefield, put a +1/+1 counter on target creature.| -Afterburn|Star Wars|600|C|{R}|Instant|||Choose One -$ Target creature gains haste and first strike until end of turn.$ Remove target creature from combat.| -Chewbacca, the Beast|Star Wars|601|R|{1}{G}{G}|Legendary Creature - Wookie Warrior|3|3|Partner with Han Solo, Scrumrat$Whenever Chewbacca, the Beast attacks, another target attacking creature you control gains indestructible until end of turn.| -Conscription|Star Wars|602|U|{2}{U}{U}|Sorcery|||Gain control of target creature with power 2 or less. It becomes a Trooper in addition to its other types.| -Corellian Gunship|Star Wars|603|C|{R}|Artifact Creature - Starship|1|1|Spaceflight$When Corellian Gunship enters the battlefield, it deals 1 damage to target player or planeswalker.| -Despair|Star Wars|604|U|{B}{B}|Instant|||Each opponent sacrifices a creature.| -Droid Uprising|Star Wars|605|U|{2}{W}{W}|Instant|||Tap all nonartifact creatures.$Create two colorless 1/1 Droid artifact creature tokens.| -Dryden Vos|Star Wars|606|R|{1}{B}{R}|Legendary Creature - Human Rogue|2|3|Menace$When Dryden Vos enters the battlefield, put a bounty counter on target creature.$Bounty - Whenever a creature an opponent controls with a bounty counter on it dies, Dryden Vos deals 2 damage to any target.| -Enfys Nest|Star Wars|607|M|{G}{W}|Legendary Creature - Human Rebel|2|1|Vigilance$Whenever Enfys Nest enters the battlefield, you may exile target creature an opponent controls. If you do, that player gains life equal to that creature's power.| -Gamble|Star Wars|608|R|{R}|Sorcery|||Search you library for a card, put that card into your hand, discard a card at random, then shuffle your library.| -Han Solo, Scrumrat|Star Wars|609|R|{2}{W}|Legendary Creature - Human Rogue|2|2|Partner with Chewbacca, the Beast$R: Han Solo, Scrumrat gains first strike until end of turn.$Whenever Han Solo, Scrumrat deals damage during your turn, put a +1/+1 counter on another target creature you control.| -Kalevan Star Yacht|Star Wars|610|U|{3}{B}|Artifact Creature - Starship|2|3|Spaceflight$When Kalevan Star Yacht enters the battlefield, lose 1 life, draw a card, and put a bounty counter on up to one target creature.| -Maelstrom Blockade|Star Wars|611|C|{2}{WB}|Instant|||Exile target attacking creature.| -Mud Trooper|Star Wars|612|U|{B}|Creature - Human Trooper|1|1|Trooper creatures you control have "2: This creature gets +1/+1 until end of turn."| -Range Trooper|Star Wars|613|U|{3}{W}|Creature - Human Trooper|2|2|Trooper creatures you control have "When this creature enters that battlefield, you may exile target creature. Return that creature to the battlefield at the beginning of the next end step."| -Tobias Beckett|Star Wars|614|R|{3}{B}|Legendary Creature - Human Hunter|4|3|When Tobias Becket enters the battlefield, put a bounty counter on target creature an opponent controls.$Bounty - Whenever a creature an opponent controls with a bounty counter on it dies, exile the top card of that player's library. You may cast cards exiled this way and spend mana as though it were mana of any type to cast that spell.| -Underground Forum|Star Wars|615|U||Land|||T: Add {1}.${1}, {T}: Add {B}, {R}, or {G}.${2}, {T}: Put a bounty counter on target creature.| \ No newline at end of file +Echo Storm|Commander 2018|7|R|{3}{U}{U}|Sorcery|||When you cast this spell, copy it for each time you've cast your commander from the command zone this game. You may choose new targets for the copies.$Create a token that's a copy of target artifact.| +Loyal Drake|Commander 2018|10|U|{2}{U}|Creature - Drake|2|2|Flying$Lieutenant — At the beginning of combat on your turn, if you control your commander, draw a card.| +Vedalken Humiliator|Commander 2018|13|R|{3}{U}|Creature - Vedalken Wizard|3|4|Metalcraft — Whenever Vedalken Humiliator attacks, if you control three or more artifacts, creatures your opponents control lose all abilities and have base power and toughness 1/1 until end of turn.| +Enchanter's Bane|Commander 2018|21|R|{1}{R}|Enchantment|||At the beginning of your end step, target enchantment deals damage equal to its converted mana cost to its controller unless that player sacrifices it.| +Saheeli's Directive|Commander 2018|26|R|{X}{R}{R}{R}|Sorcery|||Improvise$Reveal the top X cards of your library. You may put any number of artifact cards with converted mana cost X or less from among them onto the battlefield. Then put all cards revealed this way that weren't put onto the battlefield into your graveyard.| +Treasure Nabber|Commander 2018|27|R|{2}{R}|Creature - Goblin Rogue|3|2|Whenever an opponent taps an artifact for mana, gain control of that artifact until the end of your next turn.| +Varchild, Betrayer of Kjeldor|Commander 2018|28|R|{2}{R}|Legendary Creature - Human Knight|3|3|Whenever Varchild, Betrayer of Kjeldor deals combat damage to a player, that player creates that many 1/1 red Survivor creature tokens.$Survivors your opponents control can't block, and they can't attack you or a planeswalker you control.$When Varchild leaves the battlefield, gain control of all Survivors.| +Brudiclad, Telchor Engineer|Commander 2018|39|M|{4}{U}{R}|Legendary Artifact Creature - Artificer|4|4|Creature tokens you control have haste.$At the beginning of combat on your turn, create a 2/1 blue Myr artifact creature token. Then you may choose a token you control. If you do, each other token you control becomes a copy of that token.| +Saheeli, the Gifted|Commander 2018|44|M|{2}{U}{R}|Legendary Planeswalker - Saheeli|4|+1: Create a 1/1 colorless Servo artifact creature token.$+1: The next spell you cast this turn costs {1} less to cast for each artifact you control as you cast it.$-7: For each artifact you control, create a token that's a copy of it. Those tokens gain haste. Exile those tokens at the beginning of the next end step.$Saheeli, the Gifted can be your commander.| +Tawnos, Urza's Apprentice|Commander 2018|45|M|{U}{R}|Legendary Creature - Human Artificer|1|3|Haste${U}{R}, {T}: Copy target activated or triggered ability you control from an artifact source. You may choose new targets for the copy.| +Ancient Stone Idol|Commander 2018|53|R|{10}|Artifact Creature - Golem|12|12|Flash$This spell costs {1} less to cast for each attacking creature.$Trample$When Ancient Stone Idol dies, create a colorless 6/12 Construct artifact creature token with trample.| +Coveted Jewel|Commander 2018|54|R|{6}|Artifact|||When Coveted Jewel enters the battlefield, draw three cards.${T}: Add three mana of any one color.$Whenever one or more creatures an opponent controls attack you and aren't blocked, that player draws three cards and gains control of Coveted Jewel. Untap it.| +Geode Golem|Commander 2018|56|U|{5}|Artifact Creature - Golem|5|3|Trample$Whenever Geode Golem deals combat damage to a player, you may cast your commander from the command zone without paying its mana cost.| +Retrofitter Foundry|Commander 2018|57|R|{1}|Artifact|||{3}: Untap Retrofitter Foundry.${2}, {T}: Create a 1/1 colorless Servo artifact creature token.${1}, {T}, Sacrifice a Servo: Create a 1/1 colorless Thopter artifact creature token with flying.${T}, Sacrifice a Thopter: Create a 4/4 colorless Construct artifact creature token.| +Forge of Heroes|Commander 2018|58|C||Land|||{T}: Add {C}.${T}: Choose target commander that entered the battlefield this turn. Put a +1/+1 counter on it if it's a creature and a loyalty counter on it if it's a planeswalker.| +Thopter Spy Network|Commander 2018|107|R|{2}{U}{U}|Enchantment|||At the beginning of your upkeep, if you control an artifact, create a 1/1 colorless Thopter artifact creature token with flying.$Whenever one or more artifact creatures you control deal combat damage to a player, draw a card.| +Chaos Warp|Commander 2018|122|R|{2}{R}|Instant|||The owner of target permanent shuffles it into their library, then reveals the top card of their library. If it's a permanent card, they put it onto the battlefield.| diff --git a/Utils/mtg-sets-data.txt b/Utils/mtg-sets-data.txt index 4ed1a4a131b..6cbde344ad8 100644 --- a/Utils/mtg-sets-data.txt +++ b/Utils/mtg-sets-data.txt @@ -32,6 +32,7 @@ Commander 2014 Edition|C14| Commander 2015 Edition|C15| Commander 2016 Edition|C16| Commander 2017 Edition|C17| +Commander 2018 Edition|C18| Champions of Kamigawa|CHK| Chronicles|CHR| Clash Pack|CLASH|