From 9705f7228cdc3cb57f9af479b4305c3d71e975f4 Mon Sep 17 00:00:00 2001 From: Samuel Sandeen Date: Sun, 22 Jul 2018 10:49:16 -0400 Subject: [PATCH 01/16] Fix a bug with clones of Adaptive Automaton and Metallic Mimic Copies of Adaptive Automaton and Metallic Mimic don't get to choose a creature type. --- Mage.Sets/src/mage/cards/a/AdaptiveAutomaton.java | 2 +- Mage.Sets/src/mage/cards/m/MetallicMimic.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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/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); From 9fbadd2dd174142074024f74b359507de2809b6a Mon Sep 17 00:00:00 2001 From: Evan Kranzler Date: Mon, 23 Jul 2018 10:50:56 -0400 Subject: [PATCH 02/16] added C18 spoiler --- Utils/mtg-cards-data.txt | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Utils/mtg-cards-data.txt b/Utils/mtg-cards-data.txt index 8a284e2497a..112d46a6b41 100644 --- a/Utils/mtg-cards-data.txt +++ b/Utils/mtg-cards-data.txt @@ -33925,3 +33925,10 @@ 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}.)| +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.| +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 creature 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.| +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.| + From 5c28c52b4c18df0c6472c7b90bf37ce4a0e5a0d0 Mon Sep 17 00:00:00 2001 From: Evan Kranzler Date: Mon, 23 Jul 2018 10:54:44 -0400 Subject: [PATCH 03/16] added C18 file --- Mage.Sets/src/mage/sets/Commander2018.java | 23 ++++++++++++++++++++++ Utils/known-sets.txt | 1 + Utils/mtg-sets-data.txt | 1 + 3 files changed, 25 insertions(+) create mode 100644 Mage.Sets/src/mage/sets/Commander2018.java diff --git a/Mage.Sets/src/mage/sets/Commander2018.java b/Mage.Sets/src/mage/sets/Commander2018.java new file mode 100644 index 00000000000..342b15c6259 --- /dev/null +++ b/Mage.Sets/src/mage/sets/Commander2018.java @@ -0,0 +1,23 @@ + +package mage.sets; + +import mage.cards.ExpansionSet; +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"; + } +} diff --git a/Utils/known-sets.txt b/Utils/known-sets.txt index 0a3e6716835..e524527ab60 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 Edition|Commander 2018| Commander Anthology|CommanderAnthology| Commander Anthology 2018|CommanderAnthology2018| Commander's Arsenal|CommandersArsenal| 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| From 0392c99675385a5e9857f080bbc88ab3de432490 Mon Sep 17 00:00:00 2001 From: Evan Kranzler Date: Mon, 23 Jul 2018 11:44:07 -0400 Subject: [PATCH 04/16] updated C19 spoiler --- Utils/mtg-cards-data.txt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Utils/mtg-cards-data.txt b/Utils/mtg-cards-data.txt index 112d46a6b41..9d514643935 100644 --- a/Utils/mtg-cards-data.txt +++ b/Utils/mtg-cards-data.txt @@ -33925,8 +33925,13 @@ 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}.)| +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.| 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 creature 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, creature 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.| 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.| From 7a501511da74be6c67e6c1bf12e7cdba79c111ce Mon Sep 17 00:00:00 2001 From: Evan Kranzler Date: Mon, 23 Jul 2018 13:18:40 -0400 Subject: [PATCH 05/16] small fix to formatting --- Utils/known-sets.txt | 2 +- Utils/mtg-cards-data.txt | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/Utils/known-sets.txt b/Utils/known-sets.txt index e524527ab60..14ab5b66b4e 100644 --- a/Utils/known-sets.txt +++ b/Utils/known-sets.txt @@ -25,7 +25,7 @@ Commander 2014 Edition|Commander2014| Commander 2015 Edition|Commander2015| Commander 2016 Edition|Commander2016| Commander 2017 Edition|Commander2017| -Commander 2018 Edition|Commander 2018| +Commander 2018 Edition|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 9d514643935..4571be2c8cc 100644 --- a/Utils/mtg-cards-data.txt +++ b/Utils/mtg-cards-data.txt @@ -33936,4 +33936,3 @@ Coveted Jewel|Commander 2018|54|R|{6}|Artifact|||When Coveted Jewel enters the b 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.| - From 28b524ca1389cfa93005ab89629fcbd22f833a12 Mon Sep 17 00:00:00 2001 From: Evan Kranzler Date: Mon, 23 Jul 2018 13:42:31 -0400 Subject: [PATCH 06/16] Implemented Saheeli's Directive --- .../src/mage/cards/s/SaheelisDirective.java | 91 +++++++++++++++++++ Mage.Sets/src/mage/sets/Commander2018.java | 4 +- Utils/known-sets.txt | 2 +- 3 files changed, 95 insertions(+), 2 deletions(-) create mode 100644 Mage.Sets/src/mage/cards/s/SaheelisDirective.java 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/sets/Commander2018.java b/Mage.Sets/src/mage/sets/Commander2018.java index 342b15c6259..fa3ff924dab 100644 --- a/Mage.Sets/src/mage/sets/Commander2018.java +++ b/Mage.Sets/src/mage/sets/Commander2018.java @@ -1,7 +1,7 @@ - package mage.sets; import mage.cards.ExpansionSet; +import mage.constants.Rarity; import mage.constants.SetType; /** @@ -19,5 +19,7 @@ public final class Commander2018 extends ExpansionSet { private Commander2018() { super("Commander 2018 Edition", "C18", ExpansionSet.buildDate(2018, 8, 10), SetType.SUPPLEMENTAL); this.blockName = "Command Zone"; + + cards.add(new SetCardInfo("Saheeli's Directive", 26, Rarity.RARE, mage.cards.s.SaheelisDirective.class)); } } diff --git a/Utils/known-sets.txt b/Utils/known-sets.txt index 14ab5b66b4e..896efb1671f 100644 --- a/Utils/known-sets.txt +++ b/Utils/known-sets.txt @@ -25,7 +25,7 @@ Commander 2014 Edition|Commander2014| Commander 2015 Edition|Commander2015| Commander 2016 Edition|Commander2016| Commander 2017 Edition|Commander2017| -Commander 2018 Edition|Commander2018| +Commander 2018|Commander2018| Commander Anthology|CommanderAnthology| Commander Anthology 2018|CommanderAnthology2018| Commander's Arsenal|CommandersArsenal| From 982616dbaa690724465f303ae284a68e11e2ee61 Mon Sep 17 00:00:00 2001 From: Evan Kranzler Date: Mon, 23 Jul 2018 15:36:26 -0400 Subject: [PATCH 07/16] Implemented Tawnos, Urza's Apprentice --- .../mage/cards/t/TawnosUrzasApprentice.java | 101 ++++++++++++++++++ Mage.Sets/src/mage/sets/Commander2018.java | 1 + 2 files changed, 102 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/t/TawnosUrzasApprentice.java 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 index fa3ff924dab..3c08832562e 100644 --- a/Mage.Sets/src/mage/sets/Commander2018.java +++ b/Mage.Sets/src/mage/sets/Commander2018.java @@ -21,5 +21,6 @@ public final class Commander2018 extends ExpansionSet { this.blockName = "Command Zone"; 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)); } } From dca3237d6d701773d5e45b6dcb1d4b83aea54673 Mon Sep 17 00:00:00 2001 From: Evan Kranzler Date: Mon, 23 Jul 2018 15:38:13 -0400 Subject: [PATCH 08/16] updated C18 spoiler and reprints --- Mage.Sets/src/mage/sets/Commander2018.java | 2 ++ Utils/mtg-cards-data.txt | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/Mage.Sets/src/mage/sets/Commander2018.java b/Mage.Sets/src/mage/sets/Commander2018.java index 3c08832562e..a42947adeec 100644 --- a/Mage.Sets/src/mage/sets/Commander2018.java +++ b/Mage.Sets/src/mage/sets/Commander2018.java @@ -20,7 +20,9 @@ public final class Commander2018 extends ExpansionSet { 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("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/Utils/mtg-cards-data.txt b/Utils/mtg-cards-data.txt index 4571be2c8cc..1e75a5323e8 100644 --- a/Utils/mtg-cards-data.txt +++ b/Utils/mtg-cards-data.txt @@ -33926,6 +33926,8 @@ Timber Gorge|Global Series: Jiang Yanggu & Mu Yanling|38|C||Land|||Timber Gorge 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}.)| 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.| +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 creature 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.| @@ -33936,3 +33938,5 @@ Coveted Jewel|Commander 2018|54|R|{6}|Artifact|||When Coveted Jewel enters the b 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.| From fdf8c99d8a7d346a5c5795ed469ac3298fe4e695 Mon Sep 17 00:00:00 2001 From: Evan Kranzler Date: Mon, 23 Jul 2018 15:59:47 -0400 Subject: [PATCH 09/16] Implemented Retrofitter Foundry --- .../src/mage/cards/r/RetrofitterFoundry.java | 81 +++++++++++++++++++ Mage.Sets/src/mage/sets/Commander2018.java | 1 + .../token/RetrofitterFoundryToken.java | 34 ++++++++ 3 files changed, 116 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/r/RetrofitterFoundry.java create mode 100644 Mage/src/main/java/mage/game/permanent/token/RetrofitterFoundryToken.java 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/sets/Commander2018.java b/Mage.Sets/src/mage/sets/Commander2018.java index a42947adeec..7deaf9fcc4b 100644 --- a/Mage.Sets/src/mage/sets/Commander2018.java +++ b/Mage.Sets/src/mage/sets/Commander2018.java @@ -21,6 +21,7 @@ public final class Commander2018 extends ExpansionSet { this.blockName = "Command Zone"; cards.add(new SetCardInfo("Chaos Warp", 122, Rarity.RARE, mage.cards.c.ChaosWarp.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/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); + } +} From cc92ea370af1769935923fa6f0bbad6d97500fde Mon Sep 17 00:00:00 2001 From: Evan Kranzler Date: Mon, 23 Jul 2018 16:06:18 -0400 Subject: [PATCH 10/16] updated C18 spoilers --- Utils/mtg-cards-data.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Utils/mtg-cards-data.txt b/Utils/mtg-cards-data.txt index 1e75a5323e8..77fb9007693 100644 --- a/Utils/mtg-cards-data.txt +++ b/Utils/mtg-cards-data.txt @@ -33926,11 +33926,12 @@ Timber Gorge|Global Series: Jiang Yanggu & Mu Yanling|38|C||Land|||Timber Gorge 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}.)| 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 creature 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.| +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, creature 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.| From 45285bd16e59d03193278f0858f1952fad5d35ce Mon Sep 17 00:00:00 2001 From: Evan Kranzler Date: Mon, 23 Jul 2018 16:15:01 -0400 Subject: [PATCH 11/16] Implemented Loyal Drake --- Mage.Sets/src/mage/cards/l/LoyalDrake.java | 51 ++++++++++++++++++++++ Mage.Sets/src/mage/sets/Commander2018.java | 1 + 2 files changed, 52 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/l/LoyalDrake.java 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/sets/Commander2018.java b/Mage.Sets/src/mage/sets/Commander2018.java index 7deaf9fcc4b..ab34648118f 100644 --- a/Mage.Sets/src/mage/sets/Commander2018.java +++ b/Mage.Sets/src/mage/sets/Commander2018.java @@ -21,6 +21,7 @@ public final class Commander2018 extends ExpansionSet { this.blockName = "Command Zone"; cards.add(new SetCardInfo("Chaos Warp", 122, Rarity.RARE, mage.cards.c.ChaosWarp.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)); From c6c3f60c21fbd135b1f162152f6ab0658ac0242b Mon Sep 17 00:00:00 2001 From: Evan Kranzler Date: Mon, 23 Jul 2018 16:30:31 -0400 Subject: [PATCH 12/16] Implemented Enchanter's Bane --- .../src/mage/cards/e/EnchantersBane.java | 79 +++++++++++++++++++ Mage.Sets/src/mage/sets/Commander2018.java | 1 + 2 files changed, 80 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/e/EnchantersBane.java 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..b21e3fecfd7 --- /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.getSourceId()); + 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/sets/Commander2018.java b/Mage.Sets/src/mage/sets/Commander2018.java index ab34648118f..75e650a5cf7 100644 --- a/Mage.Sets/src/mage/sets/Commander2018.java +++ b/Mage.Sets/src/mage/sets/Commander2018.java @@ -21,6 +21,7 @@ public final class Commander2018 extends ExpansionSet { 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("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)); From 3e82ba4c2f3de22fae0bfaeaa6b7f176d1679a98 Mon Sep 17 00:00:00 2001 From: Evan Kranzler Date: Mon, 23 Jul 2018 16:47:01 -0400 Subject: [PATCH 13/16] fixed an error with Enchanter's Bane --- Mage.Sets/src/mage/cards/e/EnchantersBane.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Mage.Sets/src/mage/cards/e/EnchantersBane.java b/Mage.Sets/src/mage/cards/e/EnchantersBane.java index b21e3fecfd7..1faac01ac74 100644 --- a/Mage.Sets/src/mage/cards/e/EnchantersBane.java +++ b/Mage.Sets/src/mage/cards/e/EnchantersBane.java @@ -61,7 +61,7 @@ class EnchantersBaneEffect extends OneShotEffect { @Override public boolean apply(Game game, Ability source) { - Permanent permanent = game.getPermanent(source.getSourceId()); + Permanent permanent = game.getPermanent(source.getFirstTarget()); if (permanent == null) { return false; } From d419fbbae162bf77412e943b95e18850c2db8ca8 Mon Sep 17 00:00:00 2001 From: Evan Kranzler Date: Mon, 23 Jul 2018 16:52:50 -0400 Subject: [PATCH 14/16] Implemented Forge of Heroes --- Mage.Sets/src/mage/cards/f/ForgeOfHeroes.java | 97 +++++++++++++++++++ Mage.Sets/src/mage/sets/Commander2018.java | 1 + 2 files changed, 98 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/f/ForgeOfHeroes.java 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/sets/Commander2018.java b/Mage.Sets/src/mage/sets/Commander2018.java index 75e650a5cf7..a7684a575a0 100644 --- a/Mage.Sets/src/mage/sets/Commander2018.java +++ b/Mage.Sets/src/mage/sets/Commander2018.java @@ -22,6 +22,7 @@ public final class Commander2018 extends ExpansionSet { 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)); From 452a5251943fe8dd86dbea1540ca7df898883231 Mon Sep 17 00:00:00 2001 From: Evan Kranzler Date: Mon, 23 Jul 2018 17:42:03 -0400 Subject: [PATCH 15/16] fixed Silverclad Ferocidons (and likely other cards) allowing players to sacrifice creatures they don't control (fixes #5166) --- .../abilities/effects/common/SacrificeOpponentsEffect.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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(); } From 6eb976204177c16e10603918c729e6ae6a65443c Mon Sep 17 00:00:00 2001 From: Evan Kranzler Date: Mon, 23 Jul 2018 18:02:25 -0400 Subject: [PATCH 16/16] updated C18 spoiler --- Utils/mtg-cards-data.txt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Utils/mtg-cards-data.txt b/Utils/mtg-cards-data.txt index 77fb9007693..cf70702e450 100644 --- a/Utils/mtg-cards-data.txt +++ b/Utils/mtg-cards-data.txt @@ -33927,14 +33927,15 @@ Mountain|Global Series: Jiang Yanggu & Mu Yanling|39|C||Basic Land - Mountain||| Forest|Global Series: Jiang Yanggu & Mu Yanling|40|C||Basic Land - Forest|||({T}: Add {G}.)| 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.| +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, creature 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.| +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.|