From 68bcccb0002449f95a3d2a30db46d0dd8d8ec97e Mon Sep 17 00:00:00 2001 From: Evan Kranzler Date: Wed, 13 Sep 2017 20:38:29 -0400 Subject: [PATCH 1/8] Skulk is now singleton --- .../src/mage/cards/b/BehindTheScenes.java | 2 +- .../src/mage/cards/f/FarbogRevenant.java | 2 +- Mage.Sets/src/mage/cards/f/Fogwalker.java | 2 +- .../src/mage/cards/f/ForgottenCreation.java | 2 +- .../src/mage/cards/f/FurtiveHomunculus.java | 2 +- .../src/mage/cards/o/OdricLunarchMarshal.java | 2 +- .../src/mage/cards/p/PaleRiderOfTrostad.java | 2 +- .../src/mage/cards/p/PersistentNightmare.java | 2 +- Mage.Sets/src/mage/cards/r/RancidRats.java | 2 +- Mage.Sets/src/mage/cards/s/SkeletonKey.java | 2 +- .../src/mage/cards/u/UninvitedGeist.java | 2 +- .../src/mage/cards/v/VampireCutthroat.java | 2 +- .../src/mage/cards/w/WharfInfiltrator.java | 2 +- .../abilities/add/GainAbilitiesTest.java | 22 ++++++++--------- .../mage/abilities/keyword/SkulkAbility.java | 24 ++++++++++++------- Utils/keywords.txt | 2 +- 16 files changed, 40 insertions(+), 34 deletions(-) diff --git a/Mage.Sets/src/mage/cards/b/BehindTheScenes.java b/Mage.Sets/src/mage/cards/b/BehindTheScenes.java index 2433120f34..49aca371a8 100644 --- a/Mage.Sets/src/mage/cards/b/BehindTheScenes.java +++ b/Mage.Sets/src/mage/cards/b/BehindTheScenes.java @@ -52,7 +52,7 @@ public class BehindTheScenes extends CardImpl { // Creatures you control have skulk. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, - new GainAbilityControlledEffect(new SkulkAbility(), Duration.WhileOnBattlefield, FILTER_PERMANENT_CREATURES))); + new GainAbilityControlledEffect(SkulkAbility.getInstance(), Duration.WhileOnBattlefield, FILTER_PERMANENT_CREATURES))); // {4}{W}: Creatures you control get +1/+1 until end of turn. this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, diff --git a/Mage.Sets/src/mage/cards/f/FarbogRevenant.java b/Mage.Sets/src/mage/cards/f/FarbogRevenant.java index 3bdfb80d93..6e4a727a08 100644 --- a/Mage.Sets/src/mage/cards/f/FarbogRevenant.java +++ b/Mage.Sets/src/mage/cards/f/FarbogRevenant.java @@ -49,7 +49,7 @@ public class FarbogRevenant extends CardImpl { this.toughness = new MageInt(3); // Skulk - this.addAbility(new SkulkAbility()); + this.addAbility(SkulkAbility.getInstance()); // Lifelink this.addAbility(LifelinkAbility.getInstance()); diff --git a/Mage.Sets/src/mage/cards/f/Fogwalker.java b/Mage.Sets/src/mage/cards/f/Fogwalker.java index eaf42be950..5ae2894020 100644 --- a/Mage.Sets/src/mage/cards/f/Fogwalker.java +++ b/Mage.Sets/src/mage/cards/f/Fogwalker.java @@ -60,7 +60,7 @@ public class Fogwalker extends CardImpl { this.toughness = new MageInt(3); // Skulk - this.addAbility(new SkulkAbility()); + this.addAbility(SkulkAbility.getInstance()); // When Fogwalker enters the battlefield, target creature an opponent controls doesn't untap during it controler's next untap step. EntersBattlefieldTriggeredAbility ability = new EntersBattlefieldTriggeredAbility(new DontUntapInControllersNextUntapStepTargetEffect()); ability.addTarget(new TargetCreaturePermanent(filter)); diff --git a/Mage.Sets/src/mage/cards/f/ForgottenCreation.java b/Mage.Sets/src/mage/cards/f/ForgottenCreation.java index 37bfc59efe..f5435fdc02 100644 --- a/Mage.Sets/src/mage/cards/f/ForgottenCreation.java +++ b/Mage.Sets/src/mage/cards/f/ForgottenCreation.java @@ -56,7 +56,7 @@ public class ForgottenCreation extends CardImpl { this.toughness = new MageInt(3); // Skulk - this.addAbility(new SkulkAbility()); + this.addAbility(SkulkAbility.getInstance()); // At the beginning of your upkeep, you may discard all the cards in your hand. If you do, draw that many cards. this.addAbility(new BeginningOfUpkeepTriggeredAbility(new ForgottenCreationEffect(), TargetController.YOU, true)); } diff --git a/Mage.Sets/src/mage/cards/f/FurtiveHomunculus.java b/Mage.Sets/src/mage/cards/f/FurtiveHomunculus.java index de4abdb094..11fc20bf02 100644 --- a/Mage.Sets/src/mage/cards/f/FurtiveHomunculus.java +++ b/Mage.Sets/src/mage/cards/f/FurtiveHomunculus.java @@ -48,7 +48,7 @@ public class FurtiveHomunculus extends CardImpl { this.toughness = new MageInt(1); // Skulk (This creature can't be blocked by creatures with greater power.) - this.addAbility(new SkulkAbility()); + this.addAbility(SkulkAbility.getInstance()); } public FurtiveHomunculus(final FurtiveHomunculus card) { diff --git a/Mage.Sets/src/mage/cards/o/OdricLunarchMarshal.java b/Mage.Sets/src/mage/cards/o/OdricLunarchMarshal.java index ffcdd9be46..b7d535e0d1 100644 --- a/Mage.Sets/src/mage/cards/o/OdricLunarchMarshal.java +++ b/Mage.Sets/src/mage/cards/o/OdricLunarchMarshal.java @@ -171,7 +171,7 @@ class OdricLunarchMarshalEffect extends OneShotEffect { // Skulk if (game.getBattlefield().contains(filterSkulk, source.getControllerId(), 1, game)) { - game.addEffect(new GainAbilityControlledEffect(new SkulkAbility(), Duration.EndOfTurn, filterCreatures), source); + game.addEffect(new GainAbilityControlledEffect(SkulkAbility.getInstance(), Duration.EndOfTurn, filterCreatures), source); } // Trample diff --git a/Mage.Sets/src/mage/cards/p/PaleRiderOfTrostad.java b/Mage.Sets/src/mage/cards/p/PaleRiderOfTrostad.java index f09cf4f27b..e270688f21 100644 --- a/Mage.Sets/src/mage/cards/p/PaleRiderOfTrostad.java +++ b/Mage.Sets/src/mage/cards/p/PaleRiderOfTrostad.java @@ -50,7 +50,7 @@ public class PaleRiderOfTrostad extends CardImpl { this.toughness = new MageInt(3); // Skulk - this.addAbility(new SkulkAbility()); + this.addAbility(SkulkAbility.getInstance()); // When Pale Rider of Trostad enters the battlefield, discard a card. this.addAbility(new EntersBattlefieldTriggeredAbility(new DiscardControllerEffect(1), false)); diff --git a/Mage.Sets/src/mage/cards/p/PersistentNightmare.java b/Mage.Sets/src/mage/cards/p/PersistentNightmare.java index efaf3951a0..59a76bd4ff 100644 --- a/Mage.Sets/src/mage/cards/p/PersistentNightmare.java +++ b/Mage.Sets/src/mage/cards/p/PersistentNightmare.java @@ -54,7 +54,7 @@ public class PersistentNightmare extends CardImpl { this.nightCard = true; // Skulk - this.addAbility(new SkulkAbility()); + this.addAbility(SkulkAbility.getInstance()); // When Persistent Nightmare deals combat damage to a player, return it to its owner's hand. this.addAbility(new DealsCombatDamageToAPlayerTriggeredAbility(new ReturnToHandSourceEffect(), false)); diff --git a/Mage.Sets/src/mage/cards/r/RancidRats.java b/Mage.Sets/src/mage/cards/r/RancidRats.java index 4dfdb9d069..630cf94c5c 100644 --- a/Mage.Sets/src/mage/cards/r/RancidRats.java +++ b/Mage.Sets/src/mage/cards/r/RancidRats.java @@ -50,7 +50,7 @@ public class RancidRats extends CardImpl { this.toughness = new MageInt(1); // Skulk - this.addAbility(new SkulkAbility()); + this.addAbility(SkulkAbility.getInstance()); // Deathtouch this.addAbility(DeathtouchAbility.getInstance()); } diff --git a/Mage.Sets/src/mage/cards/s/SkeletonKey.java b/Mage.Sets/src/mage/cards/s/SkeletonKey.java index 72dc2d91d3..dc3774257d 100644 --- a/Mage.Sets/src/mage/cards/s/SkeletonKey.java +++ b/Mage.Sets/src/mage/cards/s/SkeletonKey.java @@ -57,7 +57,7 @@ public class SkeletonKey extends CardImpl { this.subtype.add(SubType.EQUIPMENT); // Equipped creature has skulk. - this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAttachedEffect(new SkulkAbility(), AttachmentType.EQUIPMENT))); + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAttachedEffect(SkulkAbility.getInstance(), AttachmentType.EQUIPMENT))); // Whenever equipped creature deals combat damage to a player, you may draw a card. if you do, discard a card. Ability ability = new DealsDamageToAPlayerAttachedTriggeredAbility(new DrawCardSourceControllerEffect(1), "equipped creature", true); diff --git a/Mage.Sets/src/mage/cards/u/UninvitedGeist.java b/Mage.Sets/src/mage/cards/u/UninvitedGeist.java index 4dd1c9776e..037328203e 100644 --- a/Mage.Sets/src/mage/cards/u/UninvitedGeist.java +++ b/Mage.Sets/src/mage/cards/u/UninvitedGeist.java @@ -54,7 +54,7 @@ public class UninvitedGeist extends CardImpl { this.secondSideCardClazz = UnimpededTrespasser.class; // Skulk (This creature can't be blocked by creatures with greater power.) - this.addAbility(new SkulkAbility()); + this.addAbility(SkulkAbility.getInstance()); // When Uninvited Geist deals combat damage to a player, transform it. this.addAbility(new TransformAbility()); diff --git a/Mage.Sets/src/mage/cards/v/VampireCutthroat.java b/Mage.Sets/src/mage/cards/v/VampireCutthroat.java index a83227695c..b57163f93c 100644 --- a/Mage.Sets/src/mage/cards/v/VampireCutthroat.java +++ b/Mage.Sets/src/mage/cards/v/VampireCutthroat.java @@ -50,7 +50,7 @@ public class VampireCutthroat extends CardImpl { this.toughness = new MageInt(1); // Skulk - this.addAbility(new SkulkAbility()); + this.addAbility(SkulkAbility.getInstance()); // Lifelink this.addAbility(LifelinkAbility.getInstance()); } diff --git a/Mage.Sets/src/mage/cards/w/WharfInfiltrator.java b/Mage.Sets/src/mage/cards/w/WharfInfiltrator.java index 9e3116fc85..9c49a67b5d 100644 --- a/Mage.Sets/src/mage/cards/w/WharfInfiltrator.java +++ b/Mage.Sets/src/mage/cards/w/WharfInfiltrator.java @@ -62,7 +62,7 @@ public class WharfInfiltrator extends CardImpl { this.toughness = new MageInt(1); // Skulk - this.addAbility(new SkulkAbility()); + this.addAbility(SkulkAbility.getInstance()); // Whenever Wharf Infiltrator deals combat damage to a player, you may draw a card. If you do, discard a card. Effect effect = new DrawDiscardControllerEffect(); diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/abilities/add/GainAbilitiesTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/abilities/add/GainAbilitiesTest.java index 8b519b9416..8096df1ee3 100644 --- a/Mage.Tests/src/test/java/org/mage/test/cards/abilities/add/GainAbilitiesTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/cards/abilities/add/GainAbilitiesTest.java @@ -14,34 +14,34 @@ public class GainAbilitiesTest extends CardTestPlayerBase { /* Reported bug: Behind the Scenes grants skulk to all creatures instead of just ones under owner's control - */ + */ @Test public void behindTheScenesShouldOnlyGrantSkulkToCreaturesYouControl() { - + /* Behind the Scenes {2}{B} Enchantment Creatures you control have skulk. (They can't be blocked by creatures with greater power.) {4}{W}: Creatures you control get +1/+1 until end of turn - */ - String bScenes = "Behind the Scenes"; + */ + String bScenes = "Behind the Scenes"; String hGiant = "Hill Giant"; // {3}{R} 3/3 String bSable = "Bronze Sable"; // {2} 2/1 String memnite = "Memnite"; // {0} 1/1 String gBears = "Grizzly Bears"; // {1}{G} 2/2 - + addCard(Zone.BATTLEFIELD, playerA, bScenes); addCard(Zone.BATTLEFIELD, playerA, hGiant); addCard(Zone.BATTLEFIELD, playerA, bSable); addCard(Zone.BATTLEFIELD, playerB, memnite); addCard(Zone.BATTLEFIELD, playerB, gBears); - + setStopAt(1, PhaseStep.PRECOMBAT_MAIN); execute(); - - assertAbility(playerA, hGiant, new SkulkAbility(), true); - assertAbility(playerA, bSable, new SkulkAbility(), true); - assertAbility(playerB, memnite, new SkulkAbility(), false); - assertAbility(playerB, gBears, new SkulkAbility(), false); + + assertAbility(playerA, hGiant, SkulkAbility.getInstance(), true); + assertAbility(playerA, bSable, SkulkAbility.getInstance(), true); + assertAbility(playerB, memnite, SkulkAbility.getInstance(), false); + assertAbility(playerB, gBears, SkulkAbility.getInstance(), false); } } diff --git a/Mage/src/main/java/mage/abilities/keyword/SkulkAbility.java b/Mage/src/main/java/mage/abilities/keyword/SkulkAbility.java index 2378f0a9db..f97d4763a9 100644 --- a/Mage/src/main/java/mage/abilities/keyword/SkulkAbility.java +++ b/Mage/src/main/java/mage/abilities/keyword/SkulkAbility.java @@ -5,11 +5,12 @@ */ package mage.abilities.keyword; +import java.io.ObjectStreamException; import mage.abilities.Ability; -import mage.abilities.StaticAbility; +import mage.abilities.EvasionAbility; +import mage.abilities.MageSingleton; import mage.abilities.effects.RestrictionEffect; import mage.constants.Duration; -import mage.constants.Zone; import mage.game.Game; import mage.game.permanent.Permanent; @@ -17,26 +18,31 @@ import mage.game.permanent.Permanent; * * @author LevelX2 */ -public class SkulkAbility extends StaticAbility { +public class SkulkAbility extends EvasionAbility implements MageSingleton { - public SkulkAbility() { - super(Zone.BATTLEFIELD, new SkulkEffect(Duration.WhileOnBattlefield)); + private static final SkulkAbility instance = new SkulkAbility(); + + private Object readResolve() throws ObjectStreamException { + return instance; } - public SkulkAbility(final SkulkAbility ability) { - super(ability); + public static SkulkAbility getInstance() { + return instance; + } + + private SkulkAbility() { + this.addEffect(new SkulkEffect(Duration.WhileOnBattlefield)); } @Override public Ability copy() { - return new SkulkAbility(this); + return instance; } @Override public String getRule() { return "Skulk (This creature can't be blocked by creatures with greater power.)"; } - } class SkulkEffect extends RestrictionEffect { diff --git a/Utils/keywords.txt b/Utils/keywords.txt index e5ac39d3b3..fa26cf2924 100644 --- a/Utils/keywords.txt +++ b/Utils/keywords.txt @@ -76,7 +76,7 @@ Shadow|instance| Shroud|instance| Soulbond|instance| Soulshift|number| -Skulk|new| +Skulk|instance| Storm|new| Sunburst|new| Swampcycling|cost| From 6171ac2d7e55fa027673ebaab3f2fcd77a6ec7cf Mon Sep 17 00:00:00 2001 From: Evan Kranzler Date: Wed, 13 Sep 2017 21:43:16 -0400 Subject: [PATCH 2/8] Implemented Axis of Mortality --- .../src/mage/cards/a/AxisOfMortality.java | 116 ++++++++++++++++++ Mage.Sets/src/mage/cards/s/SoulConduit.java | 14 ++- Mage.Sets/src/mage/sets/Ixalan.java | 1 + Utils/mtg-cards-data.txt | 1 + 4 files changed, 127 insertions(+), 5 deletions(-) create mode 100644 Mage.Sets/src/mage/cards/a/AxisOfMortality.java diff --git a/Mage.Sets/src/mage/cards/a/AxisOfMortality.java b/Mage.Sets/src/mage/cards/a/AxisOfMortality.java new file mode 100644 index 0000000000..8470ebf843 --- /dev/null +++ b/Mage.Sets/src/mage/cards/a/AxisOfMortality.java @@ -0,0 +1,116 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.cards.a; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; +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.players.Player; +import mage.target.TargetPlayer; + +/** + * + * @author TheElk801 + */ +public class AxisOfMortality extends CardImpl { + + public AxisOfMortality(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{4}{W}{W}"); + + // At the beginning of your upkeep, you may have two target players exchange life totals. + Ability ability = new BeginningOfUpkeepTriggeredAbility(new AxisOfMortalityEffect(), TargetController.YOU, true); + ability.addTarget(new TargetPlayer()); + ability.addTarget(new TargetPlayer()); + this.addAbility(ability); + } + + public AxisOfMortality(final AxisOfMortality card) { + super(card); + } + + @Override + public AxisOfMortality copy() { + return new AxisOfMortality(this); + } +} + +class AxisOfMortalityEffect extends OneShotEffect { + + public AxisOfMortalityEffect() { + super(Outcome.Neutral); + this.staticText = "two target players exchange life totals"; + } + + public AxisOfMortalityEffect(final AxisOfMortalityEffect effect) { + super(effect); + } + + @Override + public AxisOfMortalityEffect copy() { + return new AxisOfMortalityEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player player1 = game.getPlayer(source.getFirstTarget()); + Player player2 = game.getPlayer(source.getTargets().get(1).getFirstTarget()); + if (player1 != null && player2 != null) { + int lifePlayer1 = player1.getLife(); + int lifePlayer2 = player2.getLife(); + + if (lifePlayer1 == lifePlayer2) { + return false; + } + + if (!player1.isLifeTotalCanChange() || !player2.isLifeTotalCanChange()) { + return false; + } + + // 20110930 - 118.7, 118.8 + if (lifePlayer1 < lifePlayer2 && (!player1.isCanGainLife() || !player2.isCanLoseLife())) { + return false; + } + + if (lifePlayer1 > lifePlayer2 && (!player1.isCanLoseLife() || !player2.isCanGainLife())) { + return false; + } + + player1.setLife(lifePlayer2, game); + player2.setLife(lifePlayer1, game); + return true; + } + return false; + } +} diff --git a/Mage.Sets/src/mage/cards/s/SoulConduit.java b/Mage.Sets/src/mage/cards/s/SoulConduit.java index 0aa841b2fd..0c0f79edf5 100644 --- a/Mage.Sets/src/mage/cards/s/SoulConduit.java +++ b/Mage.Sets/src/mage/cards/s/SoulConduit.java @@ -49,7 +49,7 @@ import mage.target.TargetPlayer; public class SoulConduit extends CardImpl { public SoulConduit(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{6}"); + super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{6}"); // {6}, {tap}: Two target players exchange life totals. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new SoulConduitEffect(), new GenericManaCost(6)); @@ -93,18 +93,22 @@ class SoulConduitEffect extends OneShotEffect { int lifePlayer1 = player1.getLife(); int lifePlayer2 = player2.getLife(); - if (lifePlayer1 == lifePlayer2) + if (lifePlayer1 == lifePlayer2) { return false; + } - if (!player1.isLifeTotalCanChange() || !player2.isLifeTotalCanChange()) + if (!player1.isLifeTotalCanChange() || !player2.isLifeTotalCanChange()) { return false; + } // 20110930 - 118.7, 118.8 - if (lifePlayer1 < lifePlayer2 && (!player1.isCanGainLife() || !player2.isCanLoseLife())) + if (lifePlayer1 < lifePlayer2 && (!player1.isCanGainLife() || !player2.isCanLoseLife())) { return false; + } - if (lifePlayer1 > lifePlayer2 && (!player1.isCanLoseLife() || !player2.isCanGainLife())) + if (lifePlayer1 > lifePlayer2 && (!player1.isCanLoseLife() || !player2.isCanGainLife())) { return false; + } player1.setLife(lifePlayer2, game); player2.setLife(lifePlayer1, game); diff --git a/Mage.Sets/src/mage/sets/Ixalan.java b/Mage.Sets/src/mage/sets/Ixalan.java index 4157a5e0fe..a09dd50f07 100644 --- a/Mage.Sets/src/mage/sets/Ixalan.java +++ b/Mage.Sets/src/mage/sets/Ixalan.java @@ -38,6 +38,7 @@ public class Ixalan extends ExpansionSet { cards.add(new SetCardInfo("Arcane Adaptation", 46, Rarity.RARE, mage.cards.a.ArcaneAdaptation.class)); cards.add(new SetCardInfo("Arguel's Blood Fast", 90, Rarity.RARE, mage.cards.a.ArguelsBloodFast.class)); cards.add(new SetCardInfo("Ashes of the Abhorrent", 2, Rarity.RARE, mage.cards.a.AshesOfTheAbhorrent.class)); + cards.add(new SetCardInfo("Axis of Mortality", 3, Rarity.MYTHIC, mage.cards.a.AxisOfMortality.class)); cards.add(new SetCardInfo("Azcanta, The Sunken Ruin", 74, Rarity.RARE, mage.cards.a.AzcantaTheSunkenRuin.class)); cards.add(new SetCardInfo("Belligerent Brontodon", 218, Rarity.UNCOMMON, mage.cards.b.BelligerentBrontodon.class)); cards.add(new SetCardInfo("Bellowing Aegisaur", 4, Rarity.UNCOMMON, mage.cards.b.BellowingAegisaur.class)); diff --git a/Utils/mtg-cards-data.txt b/Utils/mtg-cards-data.txt index b4d4e47a23..8528fb4e44 100644 --- a/Utils/mtg-cards-data.txt +++ b/Utils/mtg-cards-data.txt @@ -32330,6 +32330,7 @@ Visage of Bolas|Hour of Devastation|208|R|{4}|Artifact|||When Visage of Bolas en Cinder Barrens|Hour of Devastation|209|C||Land|||Cinder Barrens enters the battlefield tapped.${t}: Add {B} or {R} to your mana pool.| Adanto Vanguard|Ixalan|1|U|{1}{W}|Creature - Vampire Soldier|1|1|As long as Adanto Vanguard is attacking, it gets +2/+0.$Pay 4 life: Adanto Vanguard gains indestructible until end of turn.| Ashes of the Abhorrent|Ixalan|2|R|{1}{W}|Enchantment|||Players can't cast spells from graveyards or activate abilities from graveyards.$Whenever a creature dies, you gain 1 life.| +Axis of Mortality|Ixalan|3|M|{4}{W}{W}|Enchantment|||At the beginning of your upkeep, you may have two target players exchange life totals.| Bellowing Aegisaur|Ixalan|4|U|{5}{W}|Creature - Dinosaur|3|5|Enrage - Whenever Bellowing Aegisaur is dealt damage, put a +1/+1 counter on each other creature you control.| Bishop of Rebirth|Ixalan|5|R|Creature - Vampire Cleric|3|4|Vigilance$Whenever Bishop of Rebirth attacks, you may return target creature card with converted mana cost 3 or less from your graveyard to the battlefield.| Duskborne Skymarcher|Ixalan|9|U|{W}|Creature - Vampire Cleric|1|1|Flying${W}, {T}: Target attacking vampire gets +1/+1 until end of turn.| From cb67e6aa20bc4a3a7bb0b1b371c05e2ca43f362e Mon Sep 17 00:00:00 2001 From: Evan Kranzler Date: Wed, 13 Sep 2017 22:29:57 -0400 Subject: [PATCH 3/8] Implemented Sword Point Diplomacy --- .../src/mage/cards/s/SwordPointDiplomacy.java | 121 ++++++++++++++++++ Mage.Sets/src/mage/sets/Ixalan.java | 1 + 2 files changed, 122 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/s/SwordPointDiplomacy.java diff --git a/Mage.Sets/src/mage/cards/s/SwordPointDiplomacy.java b/Mage.Sets/src/mage/cards/s/SwordPointDiplomacy.java new file mode 100644 index 0000000000..7dd227bed8 --- /dev/null +++ b/Mage.Sets/src/mage/cards/s/SwordPointDiplomacy.java @@ -0,0 +1,121 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.cards.s; + +import java.util.Set; +import java.util.UUID; +import mage.MageObject; +import mage.abilities.Ability; +import mage.abilities.costs.Cost; +import mage.abilities.costs.common.PayLifeCost; +import mage.abilities.effects.OneShotEffect; +import mage.cards.Card; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.cards.Cards; +import mage.cards.CardsImpl; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.Zone; +import mage.game.Game; +import mage.players.Player; + +/** + * + * @author TheElk801 + */ +public class SwordPointDiplomacy extends CardImpl { + + public SwordPointDiplomacy(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{2}{B}"); + + // Reveal the top three cards of your library. For each of those cards, put that card into your hand unless any opponent pays 3 life. Then exile the rest. + this.getSpellAbility().addEffect(new SwordPointDiplomacyEffect()); + } + + public SwordPointDiplomacy(final SwordPointDiplomacy card) { + super(card); + } + + @Override + public SwordPointDiplomacy copy() { + return new SwordPointDiplomacy(this); + } +} + +class SwordPointDiplomacyEffect extends OneShotEffect { + + SwordPointDiplomacyEffect() { + super(Outcome.Benefit); + this.staticText = ""; + } + + SwordPointDiplomacyEffect(final SwordPointDiplomacyEffect effect) { + super(effect); + } + + @Override + public SwordPointDiplomacyEffect copy() { + return new SwordPointDiplomacyEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player controller = game.getPlayer(source.getControllerId()); + MageObject sourceObject = game.getObject(source.getSourceId()); + if (controller == null || sourceObject == null) { + return false; + } + int amount = Math.min(controller.getLibrary().size(), 3); + CardsImpl cards = new CardsImpl(); + cards.addAll(controller.getLibrary().getTopCards(game, amount)); + controller.revealCards(sourceObject.getIdName(), cards, game); + Set cardsList = cards.getCards(game); + Cards cardsToHand = new CardsImpl(); + for (Card card : cardsList) { + boolean keepIt = true; + Cost cost = new PayLifeCost(3); + for (UUID oppId : game.getOpponents(controller.getId())) { + Player opponent = game.getPlayer(oppId); + if (!(opponent != null + && cost.canPay(source, source.getSourceId(), opponent.getId(), game) + && opponent.chooseUse(Outcome.Neutral, "Pay 3 life to prevent " + controller.getLogName() + " from getting " + card.getLogName() + "?", source, game) + && cost.pay(source, game, source.getSourceId(), opponent.getId(), true))) { + keepIt = false; + } + } + if (keepIt) { + cardsToHand.add(card); + cards.remove(card); + } + } + controller.moveCards(cardsToHand, Zone.HAND, source, game); + controller.moveCards(cards, Zone.EXILED, source, game); + return true; + } +} diff --git a/Mage.Sets/src/mage/sets/Ixalan.java b/Mage.Sets/src/mage/sets/Ixalan.java index a09dd50f07..a7109d4a4f 100644 --- a/Mage.Sets/src/mage/sets/Ixalan.java +++ b/Mage.Sets/src/mage/sets/Ixalan.java @@ -178,6 +178,7 @@ public class Ixalan extends ExpansionSet { cards.add(new SetCardInfo("Sunbird's Invocation", 165, Rarity.RARE, mage.cards.s.SunbirdsInvocation.class)); cards.add(new SetCardInfo("Sunpetal Grove", 257, Rarity.RARE, mage.cards.s.SunpetalGrove.class)); cards.add(new SetCardInfo("Swamp", 269, Rarity.LAND, mage.cards.basiclands.Swamp.class)); + cards.add(new SetCardInfo("Sword-Point Diplomacy", 126, Rarity.RARE, mage.cards.s.SwordPointDiplomacy.class)); cards.add(new SetCardInfo("Temple of Aclazotz", 90, Rarity.RARE, mage.cards.t.TempleOfAclazotz.class)); cards.add(new SetCardInfo("Thaumatic Compass", 249, Rarity.RARE, mage.cards.t.ThaumaticCompass.class)); cards.add(new SetCardInfo("Thundering Spineback", 210, Rarity.UNCOMMON, mage.cards.t.ThunderingSpineback.class)); From 56d483cc291167d6d8b7353c71431cfee6156ebe Mon Sep 17 00:00:00 2001 From: Evan Kranzler Date: Wed, 13 Sep 2017 22:44:02 -0400 Subject: [PATCH 4/8] added all XLN basics --- Mage.Sets/src/mage/sets/Ixalan.java | 15 +++++++++++++++ Utils/mtg-cards-data.txt | 15 +++++++++++++++ 2 files changed, 30 insertions(+) diff --git a/Mage.Sets/src/mage/sets/Ixalan.java b/Mage.Sets/src/mage/sets/Ixalan.java index a7109d4a4f..4af16f8659 100644 --- a/Mage.Sets/src/mage/sets/Ixalan.java +++ b/Mage.Sets/src/mage/sets/Ixalan.java @@ -84,7 +84,10 @@ public class Ixalan extends ExpansionSet { cards.add(new SetCardInfo("Fathom Fleet Captain", 106, Rarity.RARE, mage.cards.f.FathomFleetCaptain.class)); cards.add(new SetCardInfo("Favorable Winds", 56, Rarity.UNCOMMON, mage.cards.f.FavorableWinds.class)); cards.add(new SetCardInfo("Fell Flagship", 238, Rarity.RARE, mage.cards.f.FellFlagship.class)); + cards.add(new SetCardInfo("Forest", 276, Rarity.LAND, mage.cards.basiclands.Forest.class)); cards.add(new SetCardInfo("Forest", 277, Rarity.LAND, mage.cards.basiclands.Forest.class)); + cards.add(new SetCardInfo("Forest", 278, Rarity.LAND, mage.cards.basiclands.Forest.class)); + cards.add(new SetCardInfo("Forest", 279, Rarity.LAND, mage.cards.basiclands.Forest.class)); cards.add(new SetCardInfo("Gishath, Sun's Avatar", 222, Rarity.MYTHIC, mage.cards.g.GishathSunsAvatar.class)); cards.add(new SetCardInfo("Glacial Fortress", 255, Rarity.RARE, mage.cards.g.GlacialFortress.class)); cards.add(new SetCardInfo("Goring Ceratops", 13, Rarity.RARE, mage.cards.g.GoringCeratops.class)); @@ -99,7 +102,10 @@ public class Ixalan extends ExpansionSet { cards.add(new SetCardInfo("Huatli, Dinosaur Knight", 285, Rarity.MYTHIC, mage.cards.h.HuatliDinosaurKnight.class)); cards.add(new SetCardInfo("Huatli, Warrior Poet", 224, Rarity.MYTHIC, mage.cards.h.HuatliWarriorPoet.class)); cards.add(new SetCardInfo("Imperial Lancer", 15, Rarity.UNCOMMON, mage.cards.i.ImperialLancer.class)); + cards.add(new SetCardInfo("Island", 264, Rarity.LAND, mage.cards.basiclands.Island.class)); cards.add(new SetCardInfo("Island", 265, Rarity.LAND, mage.cards.basiclands.Island.class)); + cards.add(new SetCardInfo("Island", 266, Rarity.LAND, mage.cards.basiclands.Island.class)); + cards.add(new SetCardInfo("Island", 267, Rarity.LAND, mage.cards.basiclands.Island.class)); cards.add(new SetCardInfo("Itlimoc, Cradle of the Sun", 191, Rarity.RARE, mage.cards.i.ItlimocCradleOfTheSun.class)); cards.add(new SetCardInfo("Ixalan's Binding", 17, Rarity.UNCOMMON, mage.cards.i.IxalansBinding.class)); cards.add(new SetCardInfo("Jace's Sentinel", 283, Rarity.UNCOMMON, mage.cards.j.JacesSentinel.class)); @@ -121,14 +127,20 @@ public class Ixalan extends ExpansionSet { cards.add(new SetCardInfo("Marauding Looter", 225, Rarity.UNCOMMON, mage.cards.m.MaraudingLooter.class)); cards.add(new SetCardInfo("Mavren Fein, Dusk Apostle", 24, Rarity.RARE, mage.cards.m.MavrenFeinDuskApostle.class)); cards.add(new SetCardInfo("Merfolk Branchwalker", 197, Rarity.UNCOMMON, mage.cards.m.MerfolkBranchwalker.class)); + cards.add(new SetCardInfo("Mountain", 272, Rarity.LAND, mage.cards.basiclands.Mountain.class)); cards.add(new SetCardInfo("Mountain", 273, Rarity.LAND, mage.cards.basiclands.Mountain.class)); + cards.add(new SetCardInfo("Mountain", 274, Rarity.LAND, mage.cards.basiclands.Mountain.class)); + cards.add(new SetCardInfo("Mountain", 275, Rarity.LAND, mage.cards.basiclands.Mountain.class)); cards.add(new SetCardInfo("Old-Growth Dryads", 199, Rarity.RARE, mage.cards.o.OldGrowthDryads.class)); cards.add(new SetCardInfo("Opt", 65, Rarity.COMMON, mage.cards.o.Opt.class)); cards.add(new SetCardInfo("Otepec Huntmaster", 153, Rarity.UNCOMMON, mage.cards.o.OtepecHuntmaster.class)); cards.add(new SetCardInfo("Overflowing Insight", 64, Rarity.MYTHIC, mage.cards.o.OverflowingInsight.class)); cards.add(new SetCardInfo("Pillar of Origins", 241, Rarity.UNCOMMON, mage.cards.p.PillarOfOrigins.class)); cards.add(new SetCardInfo("Pirate's Cutlass", 242, Rarity.COMMON, mage.cards.p.PiratesCutlass.class)); + cards.add(new SetCardInfo("Plains", 260, Rarity.LAND, mage.cards.basiclands.Plains.class)); cards.add(new SetCardInfo("Plains", 261, Rarity.LAND, mage.cards.basiclands.Plains.class)); + cards.add(new SetCardInfo("Plains", 262, Rarity.LAND, mage.cards.basiclands.Plains.class)); + cards.add(new SetCardInfo("Plains", 263, Rarity.LAND, mage.cards.basiclands.Plains.class)); cards.add(new SetCardInfo("Priest of the Wakening Sun", 27, Rarity.RARE, mage.cards.p.PriestOfTheWakeningSun.class)); cards.add(new SetCardInfo("Primal Amulet", 243, Rarity.RARE, mage.cards.p.PrimalAmulet.class)); cards.add(new SetCardInfo("Primal Wellspring", 243, Rarity.RARE, mage.cards.p.PrimalWellspring.class)); @@ -177,7 +189,10 @@ public class Ixalan extends ExpansionSet { cards.add(new SetCardInfo("Sun-Crowned Hunters", 164, Rarity.COMMON, mage.cards.s.SunCrownedHunters.class)); cards.add(new SetCardInfo("Sunbird's Invocation", 165, Rarity.RARE, mage.cards.s.SunbirdsInvocation.class)); cards.add(new SetCardInfo("Sunpetal Grove", 257, Rarity.RARE, mage.cards.s.SunpetalGrove.class)); + cards.add(new SetCardInfo("Swamp", 268, Rarity.LAND, mage.cards.basiclands.Swamp.class)); cards.add(new SetCardInfo("Swamp", 269, Rarity.LAND, mage.cards.basiclands.Swamp.class)); + cards.add(new SetCardInfo("Swamp", 270, Rarity.LAND, mage.cards.basiclands.Swamp.class)); + cards.add(new SetCardInfo("Swamp", 271, Rarity.LAND, mage.cards.basiclands.Swamp.class)); cards.add(new SetCardInfo("Sword-Point Diplomacy", 126, Rarity.RARE, mage.cards.s.SwordPointDiplomacy.class)); cards.add(new SetCardInfo("Temple of Aclazotz", 90, Rarity.RARE, mage.cards.t.TempleOfAclazotz.class)); cards.add(new SetCardInfo("Thaumatic Compass", 249, Rarity.RARE, mage.cards.t.ThaumaticCompass.class)); diff --git a/Utils/mtg-cards-data.txt b/Utils/mtg-cards-data.txt index 8528fb4e44..e65553aad7 100644 --- a/Utils/mtg-cards-data.txt +++ b/Utils/mtg-cards-data.txt @@ -32487,11 +32487,26 @@ Glacial Fortress|Ixalan|255|R||Land|||Glacial Fortress enters the battlefield ta Rootbound Crag|Ixalan|256|R||Land|||Rootbound Crag enters the battlefield tapped unless you control a Mountain or a Forest.${T}: Add {R} or {G} to your mana pool.| Sunpetal Grove|Ixalan|257|R||Land|||Sunpetal Grove enters the battlefield tapped unless you control a Forest or a Plains.${T}: Add {G} or {W} to your mana pool.| Unclaimed Territory|Ixalan|258|U||Land|||As Unclaimed Territory enters the battlefield, choose a creature type.${T}: Add {C} to your mana pool.${T}: Add one mana of any color to your mana pool. Spend this mana only to cast a creature spell of the chosen type.| +Plains|Ixalan|260|L||Basic Land - Plains|||{T}: Add {W} to your mana pool.| Plains|Ixalan|261|L||Basic Land - Plains|||{T}: Add {W} to your mana pool.| +Plains|Ixalan|262|L||Basic Land - Plains|||{T}: Add {W} to your mana pool.| +Plains|Ixalan|263|L||Basic Land - Plains|||{T}: Add {W} to your mana pool.| +Island|Ixalan|264|L||Basic Land - Island|||{T}: Add {U} to your mana pool.| Island|Ixalan|265|L||Basic Land - Island|||{T}: Add {U} to your mana pool.| +Island|Ixalan|266|L||Basic Land - Island|||{T}: Add {U} to your mana pool.| +Island|Ixalan|267|L||Basic Land - Island|||{T}: Add {U} to your mana pool.| +Swamp|Ixalan|268|L||Basic Land - Swamp|||{T}: Add {B} to your mana pool.| Swamp|Ixalan|269|L||Basic Land - Swamp|||{T}: Add {B} to your mana pool.| +Swamp|Ixalan|270|L||Basic Land - Swamp|||{T}: Add {B} to your mana pool.| +Swamp|Ixalan|271|L||Basic Land - Swamp|||{T}: Add {B} to your mana pool.| +Mountain|Ixalan|272|L||Basic Land - Mountain|||{T}: Add {R} to your mana pool.| Mountain|Ixalan|273|L||Basic Land - Mountain|||{T}: Add {R} to your mana pool.| +Mountain|Ixalan|274|L||Basic Land - Mountain|||{T}: Add {R} to your mana pool.| +Mountain|Ixalan|275|L||Basic Land - Mountain|||{T}: Add {R} to your mana pool.| +Forest|Ixalan|276|L||Basic Land - Forest|||{T}: Add {G} to your mana pool.| Forest|Ixalan|277|L||Basic Land - Forest|||{T}: Add {G} to your mana pool.| +Forest|Ixalan|278|L||Basic Land - Forest|||{T}: Add {G} to your mana pool.| +Forest|Ixalan|279|L||Basic Land - Forest|||{T}: Add {G} to your mana pool.| Jace, Ingenious Mind-Mage|Ixalan|280|M|{4}{U}{U}|Legendary Planeswalker - Jace|||[+1]: Draw a card.$[+1]: Untap all creatures you control.$[-9]: Gain control of up to three target creatures.| Castaway's Despair|Ixalan|281|C|{3}{U}|Enchantment - Aura|||Enchant creature$When Castaway's Despair enters the battlefield, tap enchanted creature.$Enchanted creature doesn't untap during its controller's untap step.| Grasping Current|Ixalan|282|R|{4}{U}|Sorcery|||Return up to two target creature's to their owner's hand.$Search your library and/or graveyard for a card named Jace, Ingenious Mind-Mage, reveal it, then put it into your hand. If you searched your library this way, shuffle it.| From 31826716c8d944bb265a5110fec360849cc7fa71 Mon Sep 17 00:00:00 2001 From: theelk801 Date: Wed, 13 Sep 2017 22:50:02 -0400 Subject: [PATCH 5/8] Revert "added all XLN basics" This reverts commit 56d483cc291167d6d8b7353c71431cfee6156ebe. --- Mage.Sets/src/mage/sets/Ixalan.java | 15 --------------- Utils/mtg-cards-data.txt | 15 --------------- 2 files changed, 30 deletions(-) diff --git a/Mage.Sets/src/mage/sets/Ixalan.java b/Mage.Sets/src/mage/sets/Ixalan.java index 4af16f8659..a7109d4a4f 100644 --- a/Mage.Sets/src/mage/sets/Ixalan.java +++ b/Mage.Sets/src/mage/sets/Ixalan.java @@ -84,10 +84,7 @@ public class Ixalan extends ExpansionSet { cards.add(new SetCardInfo("Fathom Fleet Captain", 106, Rarity.RARE, mage.cards.f.FathomFleetCaptain.class)); cards.add(new SetCardInfo("Favorable Winds", 56, Rarity.UNCOMMON, mage.cards.f.FavorableWinds.class)); cards.add(new SetCardInfo("Fell Flagship", 238, Rarity.RARE, mage.cards.f.FellFlagship.class)); - cards.add(new SetCardInfo("Forest", 276, Rarity.LAND, mage.cards.basiclands.Forest.class)); cards.add(new SetCardInfo("Forest", 277, Rarity.LAND, mage.cards.basiclands.Forest.class)); - cards.add(new SetCardInfo("Forest", 278, Rarity.LAND, mage.cards.basiclands.Forest.class)); - cards.add(new SetCardInfo("Forest", 279, Rarity.LAND, mage.cards.basiclands.Forest.class)); cards.add(new SetCardInfo("Gishath, Sun's Avatar", 222, Rarity.MYTHIC, mage.cards.g.GishathSunsAvatar.class)); cards.add(new SetCardInfo("Glacial Fortress", 255, Rarity.RARE, mage.cards.g.GlacialFortress.class)); cards.add(new SetCardInfo("Goring Ceratops", 13, Rarity.RARE, mage.cards.g.GoringCeratops.class)); @@ -102,10 +99,7 @@ public class Ixalan extends ExpansionSet { cards.add(new SetCardInfo("Huatli, Dinosaur Knight", 285, Rarity.MYTHIC, mage.cards.h.HuatliDinosaurKnight.class)); cards.add(new SetCardInfo("Huatli, Warrior Poet", 224, Rarity.MYTHIC, mage.cards.h.HuatliWarriorPoet.class)); cards.add(new SetCardInfo("Imperial Lancer", 15, Rarity.UNCOMMON, mage.cards.i.ImperialLancer.class)); - cards.add(new SetCardInfo("Island", 264, Rarity.LAND, mage.cards.basiclands.Island.class)); cards.add(new SetCardInfo("Island", 265, Rarity.LAND, mage.cards.basiclands.Island.class)); - cards.add(new SetCardInfo("Island", 266, Rarity.LAND, mage.cards.basiclands.Island.class)); - cards.add(new SetCardInfo("Island", 267, Rarity.LAND, mage.cards.basiclands.Island.class)); cards.add(new SetCardInfo("Itlimoc, Cradle of the Sun", 191, Rarity.RARE, mage.cards.i.ItlimocCradleOfTheSun.class)); cards.add(new SetCardInfo("Ixalan's Binding", 17, Rarity.UNCOMMON, mage.cards.i.IxalansBinding.class)); cards.add(new SetCardInfo("Jace's Sentinel", 283, Rarity.UNCOMMON, mage.cards.j.JacesSentinel.class)); @@ -127,20 +121,14 @@ public class Ixalan extends ExpansionSet { cards.add(new SetCardInfo("Marauding Looter", 225, Rarity.UNCOMMON, mage.cards.m.MaraudingLooter.class)); cards.add(new SetCardInfo("Mavren Fein, Dusk Apostle", 24, Rarity.RARE, mage.cards.m.MavrenFeinDuskApostle.class)); cards.add(new SetCardInfo("Merfolk Branchwalker", 197, Rarity.UNCOMMON, mage.cards.m.MerfolkBranchwalker.class)); - cards.add(new SetCardInfo("Mountain", 272, Rarity.LAND, mage.cards.basiclands.Mountain.class)); cards.add(new SetCardInfo("Mountain", 273, Rarity.LAND, mage.cards.basiclands.Mountain.class)); - cards.add(new SetCardInfo("Mountain", 274, Rarity.LAND, mage.cards.basiclands.Mountain.class)); - cards.add(new SetCardInfo("Mountain", 275, Rarity.LAND, mage.cards.basiclands.Mountain.class)); cards.add(new SetCardInfo("Old-Growth Dryads", 199, Rarity.RARE, mage.cards.o.OldGrowthDryads.class)); cards.add(new SetCardInfo("Opt", 65, Rarity.COMMON, mage.cards.o.Opt.class)); cards.add(new SetCardInfo("Otepec Huntmaster", 153, Rarity.UNCOMMON, mage.cards.o.OtepecHuntmaster.class)); cards.add(new SetCardInfo("Overflowing Insight", 64, Rarity.MYTHIC, mage.cards.o.OverflowingInsight.class)); cards.add(new SetCardInfo("Pillar of Origins", 241, Rarity.UNCOMMON, mage.cards.p.PillarOfOrigins.class)); cards.add(new SetCardInfo("Pirate's Cutlass", 242, Rarity.COMMON, mage.cards.p.PiratesCutlass.class)); - cards.add(new SetCardInfo("Plains", 260, Rarity.LAND, mage.cards.basiclands.Plains.class)); cards.add(new SetCardInfo("Plains", 261, Rarity.LAND, mage.cards.basiclands.Plains.class)); - cards.add(new SetCardInfo("Plains", 262, Rarity.LAND, mage.cards.basiclands.Plains.class)); - cards.add(new SetCardInfo("Plains", 263, Rarity.LAND, mage.cards.basiclands.Plains.class)); cards.add(new SetCardInfo("Priest of the Wakening Sun", 27, Rarity.RARE, mage.cards.p.PriestOfTheWakeningSun.class)); cards.add(new SetCardInfo("Primal Amulet", 243, Rarity.RARE, mage.cards.p.PrimalAmulet.class)); cards.add(new SetCardInfo("Primal Wellspring", 243, Rarity.RARE, mage.cards.p.PrimalWellspring.class)); @@ -189,10 +177,7 @@ public class Ixalan extends ExpansionSet { cards.add(new SetCardInfo("Sun-Crowned Hunters", 164, Rarity.COMMON, mage.cards.s.SunCrownedHunters.class)); cards.add(new SetCardInfo("Sunbird's Invocation", 165, Rarity.RARE, mage.cards.s.SunbirdsInvocation.class)); cards.add(new SetCardInfo("Sunpetal Grove", 257, Rarity.RARE, mage.cards.s.SunpetalGrove.class)); - cards.add(new SetCardInfo("Swamp", 268, Rarity.LAND, mage.cards.basiclands.Swamp.class)); cards.add(new SetCardInfo("Swamp", 269, Rarity.LAND, mage.cards.basiclands.Swamp.class)); - cards.add(new SetCardInfo("Swamp", 270, Rarity.LAND, mage.cards.basiclands.Swamp.class)); - cards.add(new SetCardInfo("Swamp", 271, Rarity.LAND, mage.cards.basiclands.Swamp.class)); cards.add(new SetCardInfo("Sword-Point Diplomacy", 126, Rarity.RARE, mage.cards.s.SwordPointDiplomacy.class)); cards.add(new SetCardInfo("Temple of Aclazotz", 90, Rarity.RARE, mage.cards.t.TempleOfAclazotz.class)); cards.add(new SetCardInfo("Thaumatic Compass", 249, Rarity.RARE, mage.cards.t.ThaumaticCompass.class)); diff --git a/Utils/mtg-cards-data.txt b/Utils/mtg-cards-data.txt index e65553aad7..8528fb4e44 100644 --- a/Utils/mtg-cards-data.txt +++ b/Utils/mtg-cards-data.txt @@ -32487,26 +32487,11 @@ Glacial Fortress|Ixalan|255|R||Land|||Glacial Fortress enters the battlefield ta Rootbound Crag|Ixalan|256|R||Land|||Rootbound Crag enters the battlefield tapped unless you control a Mountain or a Forest.${T}: Add {R} or {G} to your mana pool.| Sunpetal Grove|Ixalan|257|R||Land|||Sunpetal Grove enters the battlefield tapped unless you control a Forest or a Plains.${T}: Add {G} or {W} to your mana pool.| Unclaimed Territory|Ixalan|258|U||Land|||As Unclaimed Territory enters the battlefield, choose a creature type.${T}: Add {C} to your mana pool.${T}: Add one mana of any color to your mana pool. Spend this mana only to cast a creature spell of the chosen type.| -Plains|Ixalan|260|L||Basic Land - Plains|||{T}: Add {W} to your mana pool.| Plains|Ixalan|261|L||Basic Land - Plains|||{T}: Add {W} to your mana pool.| -Plains|Ixalan|262|L||Basic Land - Plains|||{T}: Add {W} to your mana pool.| -Plains|Ixalan|263|L||Basic Land - Plains|||{T}: Add {W} to your mana pool.| -Island|Ixalan|264|L||Basic Land - Island|||{T}: Add {U} to your mana pool.| Island|Ixalan|265|L||Basic Land - Island|||{T}: Add {U} to your mana pool.| -Island|Ixalan|266|L||Basic Land - Island|||{T}: Add {U} to your mana pool.| -Island|Ixalan|267|L||Basic Land - Island|||{T}: Add {U} to your mana pool.| -Swamp|Ixalan|268|L||Basic Land - Swamp|||{T}: Add {B} to your mana pool.| Swamp|Ixalan|269|L||Basic Land - Swamp|||{T}: Add {B} to your mana pool.| -Swamp|Ixalan|270|L||Basic Land - Swamp|||{T}: Add {B} to your mana pool.| -Swamp|Ixalan|271|L||Basic Land - Swamp|||{T}: Add {B} to your mana pool.| -Mountain|Ixalan|272|L||Basic Land - Mountain|||{T}: Add {R} to your mana pool.| Mountain|Ixalan|273|L||Basic Land - Mountain|||{T}: Add {R} to your mana pool.| -Mountain|Ixalan|274|L||Basic Land - Mountain|||{T}: Add {R} to your mana pool.| -Mountain|Ixalan|275|L||Basic Land - Mountain|||{T}: Add {R} to your mana pool.| -Forest|Ixalan|276|L||Basic Land - Forest|||{T}: Add {G} to your mana pool.| Forest|Ixalan|277|L||Basic Land - Forest|||{T}: Add {G} to your mana pool.| -Forest|Ixalan|278|L||Basic Land - Forest|||{T}: Add {G} to your mana pool.| -Forest|Ixalan|279|L||Basic Land - Forest|||{T}: Add {G} to your mana pool.| Jace, Ingenious Mind-Mage|Ixalan|280|M|{4}{U}{U}|Legendary Planeswalker - Jace|||[+1]: Draw a card.$[+1]: Untap all creatures you control.$[-9]: Gain control of up to three target creatures.| Castaway's Despair|Ixalan|281|C|{3}{U}|Enchantment - Aura|||Enchant creature$When Castaway's Despair enters the battlefield, tap enchanted creature.$Enchanted creature doesn't untap during its controller's untap step.| Grasping Current|Ixalan|282|R|{4}{U}|Sorcery|||Return up to two target creature's to their owner's hand.$Search your library and/or graveyard for a card named Jace, Ingenious Mind-Mage, reveal it, then put it into your hand. If you searched your library this way, shuffle it.| From e8512b7f984db6ed20701bada7aca8dcc6f989e4 Mon Sep 17 00:00:00 2001 From: theelk801 Date: Wed, 13 Sep 2017 22:50:02 -0400 Subject: [PATCH 6/8] Revert "Implemented Sword Point Diplomacy" This reverts commit cb67e6aa20bc4a3a7bb0b1b371c05e2ca43f362e. --- .../src/mage/cards/s/SwordPointDiplomacy.java | 121 ------------------ Mage.Sets/src/mage/sets/Ixalan.java | 1 - 2 files changed, 122 deletions(-) delete mode 100644 Mage.Sets/src/mage/cards/s/SwordPointDiplomacy.java diff --git a/Mage.Sets/src/mage/cards/s/SwordPointDiplomacy.java b/Mage.Sets/src/mage/cards/s/SwordPointDiplomacy.java deleted file mode 100644 index 7dd227bed8..0000000000 --- a/Mage.Sets/src/mage/cards/s/SwordPointDiplomacy.java +++ /dev/null @@ -1,121 +0,0 @@ -/* - * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modification, are - * permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this list of - * conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, this list - * of conditions and the following disclaimer in the documentation and/or other materials - * provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON - * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF - * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - * The views and conclusions contained in the software and documentation are those of the - * authors and should not be interpreted as representing official policies, either expressed - * or implied, of BetaSteward_at_googlemail.com. - */ -package mage.cards.s; - -import java.util.Set; -import java.util.UUID; -import mage.MageObject; -import mage.abilities.Ability; -import mage.abilities.costs.Cost; -import mage.abilities.costs.common.PayLifeCost; -import mage.abilities.effects.OneShotEffect; -import mage.cards.Card; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.cards.Cards; -import mage.cards.CardsImpl; -import mage.constants.CardType; -import mage.constants.Outcome; -import mage.constants.Zone; -import mage.game.Game; -import mage.players.Player; - -/** - * - * @author TheElk801 - */ -public class SwordPointDiplomacy extends CardImpl { - - public SwordPointDiplomacy(UUID ownerId, CardSetInfo setInfo) { - super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{2}{B}"); - - // Reveal the top three cards of your library. For each of those cards, put that card into your hand unless any opponent pays 3 life. Then exile the rest. - this.getSpellAbility().addEffect(new SwordPointDiplomacyEffect()); - } - - public SwordPointDiplomacy(final SwordPointDiplomacy card) { - super(card); - } - - @Override - public SwordPointDiplomacy copy() { - return new SwordPointDiplomacy(this); - } -} - -class SwordPointDiplomacyEffect extends OneShotEffect { - - SwordPointDiplomacyEffect() { - super(Outcome.Benefit); - this.staticText = ""; - } - - SwordPointDiplomacyEffect(final SwordPointDiplomacyEffect effect) { - super(effect); - } - - @Override - public SwordPointDiplomacyEffect copy() { - return new SwordPointDiplomacyEffect(this); - } - - @Override - public boolean apply(Game game, Ability source) { - Player controller = game.getPlayer(source.getControllerId()); - MageObject sourceObject = game.getObject(source.getSourceId()); - if (controller == null || sourceObject == null) { - return false; - } - int amount = Math.min(controller.getLibrary().size(), 3); - CardsImpl cards = new CardsImpl(); - cards.addAll(controller.getLibrary().getTopCards(game, amount)); - controller.revealCards(sourceObject.getIdName(), cards, game); - Set cardsList = cards.getCards(game); - Cards cardsToHand = new CardsImpl(); - for (Card card : cardsList) { - boolean keepIt = true; - Cost cost = new PayLifeCost(3); - for (UUID oppId : game.getOpponents(controller.getId())) { - Player opponent = game.getPlayer(oppId); - if (!(opponent != null - && cost.canPay(source, source.getSourceId(), opponent.getId(), game) - && opponent.chooseUse(Outcome.Neutral, "Pay 3 life to prevent " + controller.getLogName() + " from getting " + card.getLogName() + "?", source, game) - && cost.pay(source, game, source.getSourceId(), opponent.getId(), true))) { - keepIt = false; - } - } - if (keepIt) { - cardsToHand.add(card); - cards.remove(card); - } - } - controller.moveCards(cardsToHand, Zone.HAND, source, game); - controller.moveCards(cards, Zone.EXILED, source, game); - return true; - } -} diff --git a/Mage.Sets/src/mage/sets/Ixalan.java b/Mage.Sets/src/mage/sets/Ixalan.java index a7109d4a4f..a09dd50f07 100644 --- a/Mage.Sets/src/mage/sets/Ixalan.java +++ b/Mage.Sets/src/mage/sets/Ixalan.java @@ -178,7 +178,6 @@ public class Ixalan extends ExpansionSet { cards.add(new SetCardInfo("Sunbird's Invocation", 165, Rarity.RARE, mage.cards.s.SunbirdsInvocation.class)); cards.add(new SetCardInfo("Sunpetal Grove", 257, Rarity.RARE, mage.cards.s.SunpetalGrove.class)); cards.add(new SetCardInfo("Swamp", 269, Rarity.LAND, mage.cards.basiclands.Swamp.class)); - cards.add(new SetCardInfo("Sword-Point Diplomacy", 126, Rarity.RARE, mage.cards.s.SwordPointDiplomacy.class)); cards.add(new SetCardInfo("Temple of Aclazotz", 90, Rarity.RARE, mage.cards.t.TempleOfAclazotz.class)); cards.add(new SetCardInfo("Thaumatic Compass", 249, Rarity.RARE, mage.cards.t.ThaumaticCompass.class)); cards.add(new SetCardInfo("Thundering Spineback", 210, Rarity.UNCOMMON, mage.cards.t.ThunderingSpineback.class)); From 505f01ccb0a51395f51e0f9d02d748d945468efb Mon Sep 17 00:00:00 2001 From: theelk801 Date: Wed, 13 Sep 2017 22:50:02 -0400 Subject: [PATCH 7/8] Revert "Implemented Axis of Mortality" This reverts commit 6171ac2d7e55fa027673ebaab3f2fcd77a6ec7cf. --- .../src/mage/cards/a/AxisOfMortality.java | 116 ------------------ Mage.Sets/src/mage/cards/s/SoulConduit.java | 14 +-- Mage.Sets/src/mage/sets/Ixalan.java | 1 - Utils/mtg-cards-data.txt | 1 - 4 files changed, 5 insertions(+), 127 deletions(-) delete mode 100644 Mage.Sets/src/mage/cards/a/AxisOfMortality.java diff --git a/Mage.Sets/src/mage/cards/a/AxisOfMortality.java b/Mage.Sets/src/mage/cards/a/AxisOfMortality.java deleted file mode 100644 index 8470ebf843..0000000000 --- a/Mage.Sets/src/mage/cards/a/AxisOfMortality.java +++ /dev/null @@ -1,116 +0,0 @@ -/* - * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modification, are - * permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this list of - * conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, this list - * of conditions and the following disclaimer in the documentation and/or other materials - * provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON - * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF - * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - * The views and conclusions contained in the software and documentation are those of the - * authors and should not be interpreted as representing official policies, either expressed - * or implied, of BetaSteward_at_googlemail.com. - */ -package mage.cards.a; - -import java.util.UUID; -import mage.abilities.Ability; -import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; -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.players.Player; -import mage.target.TargetPlayer; - -/** - * - * @author TheElk801 - */ -public class AxisOfMortality extends CardImpl { - - public AxisOfMortality(UUID ownerId, CardSetInfo setInfo) { - super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{4}{W}{W}"); - - // At the beginning of your upkeep, you may have two target players exchange life totals. - Ability ability = new BeginningOfUpkeepTriggeredAbility(new AxisOfMortalityEffect(), TargetController.YOU, true); - ability.addTarget(new TargetPlayer()); - ability.addTarget(new TargetPlayer()); - this.addAbility(ability); - } - - public AxisOfMortality(final AxisOfMortality card) { - super(card); - } - - @Override - public AxisOfMortality copy() { - return new AxisOfMortality(this); - } -} - -class AxisOfMortalityEffect extends OneShotEffect { - - public AxisOfMortalityEffect() { - super(Outcome.Neutral); - this.staticText = "two target players exchange life totals"; - } - - public AxisOfMortalityEffect(final AxisOfMortalityEffect effect) { - super(effect); - } - - @Override - public AxisOfMortalityEffect copy() { - return new AxisOfMortalityEffect(this); - } - - @Override - public boolean apply(Game game, Ability source) { - Player player1 = game.getPlayer(source.getFirstTarget()); - Player player2 = game.getPlayer(source.getTargets().get(1).getFirstTarget()); - if (player1 != null && player2 != null) { - int lifePlayer1 = player1.getLife(); - int lifePlayer2 = player2.getLife(); - - if (lifePlayer1 == lifePlayer2) { - return false; - } - - if (!player1.isLifeTotalCanChange() || !player2.isLifeTotalCanChange()) { - return false; - } - - // 20110930 - 118.7, 118.8 - if (lifePlayer1 < lifePlayer2 && (!player1.isCanGainLife() || !player2.isCanLoseLife())) { - return false; - } - - if (lifePlayer1 > lifePlayer2 && (!player1.isCanLoseLife() || !player2.isCanGainLife())) { - return false; - } - - player1.setLife(lifePlayer2, game); - player2.setLife(lifePlayer1, game); - return true; - } - return false; - } -} diff --git a/Mage.Sets/src/mage/cards/s/SoulConduit.java b/Mage.Sets/src/mage/cards/s/SoulConduit.java index 0c0f79edf5..0aa841b2fd 100644 --- a/Mage.Sets/src/mage/cards/s/SoulConduit.java +++ b/Mage.Sets/src/mage/cards/s/SoulConduit.java @@ -49,7 +49,7 @@ import mage.target.TargetPlayer; public class SoulConduit extends CardImpl { public SoulConduit(UUID ownerId, CardSetInfo setInfo) { - super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{6}"); + super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{6}"); // {6}, {tap}: Two target players exchange life totals. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new SoulConduitEffect(), new GenericManaCost(6)); @@ -93,22 +93,18 @@ class SoulConduitEffect extends OneShotEffect { int lifePlayer1 = player1.getLife(); int lifePlayer2 = player2.getLife(); - if (lifePlayer1 == lifePlayer2) { + if (lifePlayer1 == lifePlayer2) return false; - } - if (!player1.isLifeTotalCanChange() || !player2.isLifeTotalCanChange()) { + if (!player1.isLifeTotalCanChange() || !player2.isLifeTotalCanChange()) return false; - } // 20110930 - 118.7, 118.8 - if (lifePlayer1 < lifePlayer2 && (!player1.isCanGainLife() || !player2.isCanLoseLife())) { + if (lifePlayer1 < lifePlayer2 && (!player1.isCanGainLife() || !player2.isCanLoseLife())) return false; - } - if (lifePlayer1 > lifePlayer2 && (!player1.isCanLoseLife() || !player2.isCanGainLife())) { + if (lifePlayer1 > lifePlayer2 && (!player1.isCanLoseLife() || !player2.isCanGainLife())) return false; - } player1.setLife(lifePlayer2, game); player2.setLife(lifePlayer1, game); diff --git a/Mage.Sets/src/mage/sets/Ixalan.java b/Mage.Sets/src/mage/sets/Ixalan.java index a09dd50f07..4157a5e0fe 100644 --- a/Mage.Sets/src/mage/sets/Ixalan.java +++ b/Mage.Sets/src/mage/sets/Ixalan.java @@ -38,7 +38,6 @@ public class Ixalan extends ExpansionSet { cards.add(new SetCardInfo("Arcane Adaptation", 46, Rarity.RARE, mage.cards.a.ArcaneAdaptation.class)); cards.add(new SetCardInfo("Arguel's Blood Fast", 90, Rarity.RARE, mage.cards.a.ArguelsBloodFast.class)); cards.add(new SetCardInfo("Ashes of the Abhorrent", 2, Rarity.RARE, mage.cards.a.AshesOfTheAbhorrent.class)); - cards.add(new SetCardInfo("Axis of Mortality", 3, Rarity.MYTHIC, mage.cards.a.AxisOfMortality.class)); cards.add(new SetCardInfo("Azcanta, The Sunken Ruin", 74, Rarity.RARE, mage.cards.a.AzcantaTheSunkenRuin.class)); cards.add(new SetCardInfo("Belligerent Brontodon", 218, Rarity.UNCOMMON, mage.cards.b.BelligerentBrontodon.class)); cards.add(new SetCardInfo("Bellowing Aegisaur", 4, Rarity.UNCOMMON, mage.cards.b.BellowingAegisaur.class)); diff --git a/Utils/mtg-cards-data.txt b/Utils/mtg-cards-data.txt index 8528fb4e44..b4d4e47a23 100644 --- a/Utils/mtg-cards-data.txt +++ b/Utils/mtg-cards-data.txt @@ -32330,7 +32330,6 @@ Visage of Bolas|Hour of Devastation|208|R|{4}|Artifact|||When Visage of Bolas en Cinder Barrens|Hour of Devastation|209|C||Land|||Cinder Barrens enters the battlefield tapped.${t}: Add {B} or {R} to your mana pool.| Adanto Vanguard|Ixalan|1|U|{1}{W}|Creature - Vampire Soldier|1|1|As long as Adanto Vanguard is attacking, it gets +2/+0.$Pay 4 life: Adanto Vanguard gains indestructible until end of turn.| Ashes of the Abhorrent|Ixalan|2|R|{1}{W}|Enchantment|||Players can't cast spells from graveyards or activate abilities from graveyards.$Whenever a creature dies, you gain 1 life.| -Axis of Mortality|Ixalan|3|M|{4}{W}{W}|Enchantment|||At the beginning of your upkeep, you may have two target players exchange life totals.| Bellowing Aegisaur|Ixalan|4|U|{5}{W}|Creature - Dinosaur|3|5|Enrage - Whenever Bellowing Aegisaur is dealt damage, put a +1/+1 counter on each other creature you control.| Bishop of Rebirth|Ixalan|5|R|Creature - Vampire Cleric|3|4|Vigilance$Whenever Bishop of Rebirth attacks, you may return target creature card with converted mana cost 3 or less from your graveyard to the battlefield.| Duskborne Skymarcher|Ixalan|9|U|{W}|Creature - Vampire Cleric|1|1|Flying${W}, {T}: Target attacking vampire gets +1/+1 until end of turn.| From 86df6917cc760323aa541eb5f85f934dfa9d15e5 Mon Sep 17 00:00:00 2001 From: theelk801 Date: Wed, 13 Sep 2017 22:50:02 -0400 Subject: [PATCH 8/8] Revert "Skulk is now singleton" This reverts commit 68bcccb0002449f95a3d2a30db46d0dd8d8ec97e. --- .../src/mage/cards/b/BehindTheScenes.java | 2 +- .../src/mage/cards/f/FarbogRevenant.java | 2 +- Mage.Sets/src/mage/cards/f/Fogwalker.java | 2 +- .../src/mage/cards/f/ForgottenCreation.java | 2 +- .../src/mage/cards/f/FurtiveHomunculus.java | 2 +- .../src/mage/cards/o/OdricLunarchMarshal.java | 2 +- .../src/mage/cards/p/PaleRiderOfTrostad.java | 2 +- .../src/mage/cards/p/PersistentNightmare.java | 2 +- Mage.Sets/src/mage/cards/r/RancidRats.java | 2 +- Mage.Sets/src/mage/cards/s/SkeletonKey.java | 2 +- .../src/mage/cards/u/UninvitedGeist.java | 2 +- .../src/mage/cards/v/VampireCutthroat.java | 2 +- .../src/mage/cards/w/WharfInfiltrator.java | 2 +- .../abilities/add/GainAbilitiesTest.java | 22 ++++++++--------- .../mage/abilities/keyword/SkulkAbility.java | 24 +++++++------------ Utils/keywords.txt | 2 +- 16 files changed, 34 insertions(+), 40 deletions(-) diff --git a/Mage.Sets/src/mage/cards/b/BehindTheScenes.java b/Mage.Sets/src/mage/cards/b/BehindTheScenes.java index 49aca371a8..2433120f34 100644 --- a/Mage.Sets/src/mage/cards/b/BehindTheScenes.java +++ b/Mage.Sets/src/mage/cards/b/BehindTheScenes.java @@ -52,7 +52,7 @@ public class BehindTheScenes extends CardImpl { // Creatures you control have skulk. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, - new GainAbilityControlledEffect(SkulkAbility.getInstance(), Duration.WhileOnBattlefield, FILTER_PERMANENT_CREATURES))); + new GainAbilityControlledEffect(new SkulkAbility(), Duration.WhileOnBattlefield, FILTER_PERMANENT_CREATURES))); // {4}{W}: Creatures you control get +1/+1 until end of turn. this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, diff --git a/Mage.Sets/src/mage/cards/f/FarbogRevenant.java b/Mage.Sets/src/mage/cards/f/FarbogRevenant.java index 6e4a727a08..3bdfb80d93 100644 --- a/Mage.Sets/src/mage/cards/f/FarbogRevenant.java +++ b/Mage.Sets/src/mage/cards/f/FarbogRevenant.java @@ -49,7 +49,7 @@ public class FarbogRevenant extends CardImpl { this.toughness = new MageInt(3); // Skulk - this.addAbility(SkulkAbility.getInstance()); + this.addAbility(new SkulkAbility()); // Lifelink this.addAbility(LifelinkAbility.getInstance()); diff --git a/Mage.Sets/src/mage/cards/f/Fogwalker.java b/Mage.Sets/src/mage/cards/f/Fogwalker.java index 5ae2894020..eaf42be950 100644 --- a/Mage.Sets/src/mage/cards/f/Fogwalker.java +++ b/Mage.Sets/src/mage/cards/f/Fogwalker.java @@ -60,7 +60,7 @@ public class Fogwalker extends CardImpl { this.toughness = new MageInt(3); // Skulk - this.addAbility(SkulkAbility.getInstance()); + this.addAbility(new SkulkAbility()); // When Fogwalker enters the battlefield, target creature an opponent controls doesn't untap during it controler's next untap step. EntersBattlefieldTriggeredAbility ability = new EntersBattlefieldTriggeredAbility(new DontUntapInControllersNextUntapStepTargetEffect()); ability.addTarget(new TargetCreaturePermanent(filter)); diff --git a/Mage.Sets/src/mage/cards/f/ForgottenCreation.java b/Mage.Sets/src/mage/cards/f/ForgottenCreation.java index f5435fdc02..37bfc59efe 100644 --- a/Mage.Sets/src/mage/cards/f/ForgottenCreation.java +++ b/Mage.Sets/src/mage/cards/f/ForgottenCreation.java @@ -56,7 +56,7 @@ public class ForgottenCreation extends CardImpl { this.toughness = new MageInt(3); // Skulk - this.addAbility(SkulkAbility.getInstance()); + this.addAbility(new SkulkAbility()); // At the beginning of your upkeep, you may discard all the cards in your hand. If you do, draw that many cards. this.addAbility(new BeginningOfUpkeepTriggeredAbility(new ForgottenCreationEffect(), TargetController.YOU, true)); } diff --git a/Mage.Sets/src/mage/cards/f/FurtiveHomunculus.java b/Mage.Sets/src/mage/cards/f/FurtiveHomunculus.java index 11fc20bf02..de4abdb094 100644 --- a/Mage.Sets/src/mage/cards/f/FurtiveHomunculus.java +++ b/Mage.Sets/src/mage/cards/f/FurtiveHomunculus.java @@ -48,7 +48,7 @@ public class FurtiveHomunculus extends CardImpl { this.toughness = new MageInt(1); // Skulk (This creature can't be blocked by creatures with greater power.) - this.addAbility(SkulkAbility.getInstance()); + this.addAbility(new SkulkAbility()); } public FurtiveHomunculus(final FurtiveHomunculus card) { diff --git a/Mage.Sets/src/mage/cards/o/OdricLunarchMarshal.java b/Mage.Sets/src/mage/cards/o/OdricLunarchMarshal.java index b7d535e0d1..ffcdd9be46 100644 --- a/Mage.Sets/src/mage/cards/o/OdricLunarchMarshal.java +++ b/Mage.Sets/src/mage/cards/o/OdricLunarchMarshal.java @@ -171,7 +171,7 @@ class OdricLunarchMarshalEffect extends OneShotEffect { // Skulk if (game.getBattlefield().contains(filterSkulk, source.getControllerId(), 1, game)) { - game.addEffect(new GainAbilityControlledEffect(SkulkAbility.getInstance(), Duration.EndOfTurn, filterCreatures), source); + game.addEffect(new GainAbilityControlledEffect(new SkulkAbility(), Duration.EndOfTurn, filterCreatures), source); } // Trample diff --git a/Mage.Sets/src/mage/cards/p/PaleRiderOfTrostad.java b/Mage.Sets/src/mage/cards/p/PaleRiderOfTrostad.java index e270688f21..f09cf4f27b 100644 --- a/Mage.Sets/src/mage/cards/p/PaleRiderOfTrostad.java +++ b/Mage.Sets/src/mage/cards/p/PaleRiderOfTrostad.java @@ -50,7 +50,7 @@ public class PaleRiderOfTrostad extends CardImpl { this.toughness = new MageInt(3); // Skulk - this.addAbility(SkulkAbility.getInstance()); + this.addAbility(new SkulkAbility()); // When Pale Rider of Trostad enters the battlefield, discard a card. this.addAbility(new EntersBattlefieldTriggeredAbility(new DiscardControllerEffect(1), false)); diff --git a/Mage.Sets/src/mage/cards/p/PersistentNightmare.java b/Mage.Sets/src/mage/cards/p/PersistentNightmare.java index 59a76bd4ff..efaf3951a0 100644 --- a/Mage.Sets/src/mage/cards/p/PersistentNightmare.java +++ b/Mage.Sets/src/mage/cards/p/PersistentNightmare.java @@ -54,7 +54,7 @@ public class PersistentNightmare extends CardImpl { this.nightCard = true; // Skulk - this.addAbility(SkulkAbility.getInstance()); + this.addAbility(new SkulkAbility()); // When Persistent Nightmare deals combat damage to a player, return it to its owner's hand. this.addAbility(new DealsCombatDamageToAPlayerTriggeredAbility(new ReturnToHandSourceEffect(), false)); diff --git a/Mage.Sets/src/mage/cards/r/RancidRats.java b/Mage.Sets/src/mage/cards/r/RancidRats.java index 630cf94c5c..4dfdb9d069 100644 --- a/Mage.Sets/src/mage/cards/r/RancidRats.java +++ b/Mage.Sets/src/mage/cards/r/RancidRats.java @@ -50,7 +50,7 @@ public class RancidRats extends CardImpl { this.toughness = new MageInt(1); // Skulk - this.addAbility(SkulkAbility.getInstance()); + this.addAbility(new SkulkAbility()); // Deathtouch this.addAbility(DeathtouchAbility.getInstance()); } diff --git a/Mage.Sets/src/mage/cards/s/SkeletonKey.java b/Mage.Sets/src/mage/cards/s/SkeletonKey.java index dc3774257d..72dc2d91d3 100644 --- a/Mage.Sets/src/mage/cards/s/SkeletonKey.java +++ b/Mage.Sets/src/mage/cards/s/SkeletonKey.java @@ -57,7 +57,7 @@ public class SkeletonKey extends CardImpl { this.subtype.add(SubType.EQUIPMENT); // Equipped creature has skulk. - this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAttachedEffect(SkulkAbility.getInstance(), AttachmentType.EQUIPMENT))); + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAttachedEffect(new SkulkAbility(), AttachmentType.EQUIPMENT))); // Whenever equipped creature deals combat damage to a player, you may draw a card. if you do, discard a card. Ability ability = new DealsDamageToAPlayerAttachedTriggeredAbility(new DrawCardSourceControllerEffect(1), "equipped creature", true); diff --git a/Mage.Sets/src/mage/cards/u/UninvitedGeist.java b/Mage.Sets/src/mage/cards/u/UninvitedGeist.java index 037328203e..4dd1c9776e 100644 --- a/Mage.Sets/src/mage/cards/u/UninvitedGeist.java +++ b/Mage.Sets/src/mage/cards/u/UninvitedGeist.java @@ -54,7 +54,7 @@ public class UninvitedGeist extends CardImpl { this.secondSideCardClazz = UnimpededTrespasser.class; // Skulk (This creature can't be blocked by creatures with greater power.) - this.addAbility(SkulkAbility.getInstance()); + this.addAbility(new SkulkAbility()); // When Uninvited Geist deals combat damage to a player, transform it. this.addAbility(new TransformAbility()); diff --git a/Mage.Sets/src/mage/cards/v/VampireCutthroat.java b/Mage.Sets/src/mage/cards/v/VampireCutthroat.java index b57163f93c..a83227695c 100644 --- a/Mage.Sets/src/mage/cards/v/VampireCutthroat.java +++ b/Mage.Sets/src/mage/cards/v/VampireCutthroat.java @@ -50,7 +50,7 @@ public class VampireCutthroat extends CardImpl { this.toughness = new MageInt(1); // Skulk - this.addAbility(SkulkAbility.getInstance()); + this.addAbility(new SkulkAbility()); // Lifelink this.addAbility(LifelinkAbility.getInstance()); } diff --git a/Mage.Sets/src/mage/cards/w/WharfInfiltrator.java b/Mage.Sets/src/mage/cards/w/WharfInfiltrator.java index 9c49a67b5d..9e3116fc85 100644 --- a/Mage.Sets/src/mage/cards/w/WharfInfiltrator.java +++ b/Mage.Sets/src/mage/cards/w/WharfInfiltrator.java @@ -62,7 +62,7 @@ public class WharfInfiltrator extends CardImpl { this.toughness = new MageInt(1); // Skulk - this.addAbility(SkulkAbility.getInstance()); + this.addAbility(new SkulkAbility()); // Whenever Wharf Infiltrator deals combat damage to a player, you may draw a card. If you do, discard a card. Effect effect = new DrawDiscardControllerEffect(); diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/abilities/add/GainAbilitiesTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/abilities/add/GainAbilitiesTest.java index 8096df1ee3..8b519b9416 100644 --- a/Mage.Tests/src/test/java/org/mage/test/cards/abilities/add/GainAbilitiesTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/cards/abilities/add/GainAbilitiesTest.java @@ -14,34 +14,34 @@ public class GainAbilitiesTest extends CardTestPlayerBase { /* Reported bug: Behind the Scenes grants skulk to all creatures instead of just ones under owner's control - */ + */ @Test public void behindTheScenesShouldOnlyGrantSkulkToCreaturesYouControl() { - + /* Behind the Scenes {2}{B} Enchantment Creatures you control have skulk. (They can't be blocked by creatures with greater power.) {4}{W}: Creatures you control get +1/+1 until end of turn - */ - String bScenes = "Behind the Scenes"; + */ + String bScenes = "Behind the Scenes"; String hGiant = "Hill Giant"; // {3}{R} 3/3 String bSable = "Bronze Sable"; // {2} 2/1 String memnite = "Memnite"; // {0} 1/1 String gBears = "Grizzly Bears"; // {1}{G} 2/2 - + addCard(Zone.BATTLEFIELD, playerA, bScenes); addCard(Zone.BATTLEFIELD, playerA, hGiant); addCard(Zone.BATTLEFIELD, playerA, bSable); addCard(Zone.BATTLEFIELD, playerB, memnite); addCard(Zone.BATTLEFIELD, playerB, gBears); - + setStopAt(1, PhaseStep.PRECOMBAT_MAIN); execute(); - - assertAbility(playerA, hGiant, SkulkAbility.getInstance(), true); - assertAbility(playerA, bSable, SkulkAbility.getInstance(), true); - assertAbility(playerB, memnite, SkulkAbility.getInstance(), false); - assertAbility(playerB, gBears, SkulkAbility.getInstance(), false); + + assertAbility(playerA, hGiant, new SkulkAbility(), true); + assertAbility(playerA, bSable, new SkulkAbility(), true); + assertAbility(playerB, memnite, new SkulkAbility(), false); + assertAbility(playerB, gBears, new SkulkAbility(), false); } } diff --git a/Mage/src/main/java/mage/abilities/keyword/SkulkAbility.java b/Mage/src/main/java/mage/abilities/keyword/SkulkAbility.java index f97d4763a9..2378f0a9db 100644 --- a/Mage/src/main/java/mage/abilities/keyword/SkulkAbility.java +++ b/Mage/src/main/java/mage/abilities/keyword/SkulkAbility.java @@ -5,12 +5,11 @@ */ package mage.abilities.keyword; -import java.io.ObjectStreamException; import mage.abilities.Ability; -import mage.abilities.EvasionAbility; -import mage.abilities.MageSingleton; +import mage.abilities.StaticAbility; import mage.abilities.effects.RestrictionEffect; import mage.constants.Duration; +import mage.constants.Zone; import mage.game.Game; import mage.game.permanent.Permanent; @@ -18,31 +17,26 @@ import mage.game.permanent.Permanent; * * @author LevelX2 */ -public class SkulkAbility extends EvasionAbility implements MageSingleton { +public class SkulkAbility extends StaticAbility { - private static final SkulkAbility instance = new SkulkAbility(); - - private Object readResolve() throws ObjectStreamException { - return instance; + public SkulkAbility() { + super(Zone.BATTLEFIELD, new SkulkEffect(Duration.WhileOnBattlefield)); } - public static SkulkAbility getInstance() { - return instance; - } - - private SkulkAbility() { - this.addEffect(new SkulkEffect(Duration.WhileOnBattlefield)); + public SkulkAbility(final SkulkAbility ability) { + super(ability); } @Override public Ability copy() { - return instance; + return new SkulkAbility(this); } @Override public String getRule() { return "Skulk (This creature can't be blocked by creatures with greater power.)"; } + } class SkulkEffect extends RestrictionEffect { diff --git a/Utils/keywords.txt b/Utils/keywords.txt index fa26cf2924..e5ac39d3b3 100644 --- a/Utils/keywords.txt +++ b/Utils/keywords.txt @@ -76,7 +76,7 @@ Shadow|instance| Shroud|instance| Soulbond|instance| Soulshift|number| -Skulk|instance| +Skulk|new| Storm|new| Sunburst|new| Swampcycling|cost|