From 48035a053e9e73357ad5e26fe21f7b49a2c0a413 Mon Sep 17 00:00:00 2001 From: LevelX2 Date: Sun, 24 Apr 2016 09:38:02 +0200 Subject: [PATCH 1/4] * Myr Superion - Fixed that its mana costs could not be decreased by convoke (fixes #1897). --- Mage.Sets/src/mage/sets/newphyrexia/MyrSuperion.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Mage.Sets/src/mage/sets/newphyrexia/MyrSuperion.java b/Mage.Sets/src/mage/sets/newphyrexia/MyrSuperion.java index 99ee8fe07e..4eb8127c2e 100644 --- a/Mage.Sets/src/mage/sets/newphyrexia/MyrSuperion.java +++ b/Mage.Sets/src/mage/sets/newphyrexia/MyrSuperion.java @@ -35,7 +35,7 @@ import mage.cards.CardImpl; import mage.constants.CardType; import mage.constants.Rarity; import mage.constants.Zone; -import mage.filter.common.FilterCreaturePermanent; +import mage.filter.common.FilterCreatureCard; /** * @@ -43,7 +43,7 @@ import mage.filter.common.FilterCreaturePermanent; */ public class MyrSuperion extends CardImpl { - private static FilterCreaturePermanent filter = new FilterCreaturePermanent(); + private static FilterCreatureCard filter = new FilterCreatureCard(); public MyrSuperion(UUID ownerId) { super(ownerId, 146, "Myr Superion", Rarity.RARE, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{2}"); From 44100968b70a4788146cd21ee23d8d27836410b7 Mon Sep 17 00:00:00 2001 From: LevelX2 Date: Sun, 24 Apr 2016 09:38:39 +0200 Subject: [PATCH 2/4] Fixed internal wrong spelling. --- Mage.Sets/src/mage/sets/magic2015/TheChainVeil.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Mage.Sets/src/mage/sets/magic2015/TheChainVeil.java b/Mage.Sets/src/mage/sets/magic2015/TheChainVeil.java index 4320808697..a3a4fc224b 100644 --- a/Mage.Sets/src/mage/sets/magic2015/TheChainVeil.java +++ b/Mage.Sets/src/mage/sets/magic2015/TheChainVeil.java @@ -124,7 +124,7 @@ class ActivatedLoyaltyAbilityWatcher extends Watcher { return new ActivatedLoyaltyAbilityWatcher(this); } - public boolean activatedLayaltyAbility(UUID playerId) { + public boolean activatedLoyaltyAbility(UUID playerId) { return playerIds.contains(playerId); } } @@ -177,7 +177,7 @@ class TheChainVeilCondition implements Condition { public boolean apply(Game game, Ability source) { ActivatedLoyaltyAbilityWatcher watcher = (ActivatedLoyaltyAbilityWatcher) game.getState().getWatchers().get("ActivatedLoyaltyAbilityWatcher"); if (watcher != null) { - if (!watcher.activatedLayaltyAbility(source.getControllerId())) { + if (!watcher.activatedLoyaltyAbility(source.getControllerId())) { return true; } } From 3cc6d97fbdbe0981b1422440251d85bc08abadbb Mon Sep 17 00:00:00 2001 From: LevelX2 Date: Sun, 24 Apr 2016 09:38:54 +0200 Subject: [PATCH 3/4] Added test. --- .../cards/asthough/SpendOtherManaTest.java | 37 +++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/asthough/SpendOtherManaTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/asthough/SpendOtherManaTest.java index a81a40c044..d649b5b5ae 100644 --- a/Mage.Tests/src/test/java/org/mage/test/cards/asthough/SpendOtherManaTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/cards/asthough/SpendOtherManaTest.java @@ -97,4 +97,41 @@ public class SpendOtherManaTest extends CardTestPlayerBase { assertPermanentCount(playerA, "Chandra, Flamecaller", 1); } + + /** + * I was unable to cast Nissa, Voice of Zendikar using black mana with Oath + * of Nissa in play. Pretty sure Oath is working usually, so here were the + * conditions in my game: + * + * -Cast Dark Petition with spell mastery -Attempt to cast Nissa, Voice of + * Zendikar using the triple black mana from Dark Petition + */ + @Test + public void testOathOfNissaWithDarkPetition() { + addCard(Zone.BATTLEFIELD, playerA, "Swamp", 5); + // When Oath of Nissa enters the battlefield, look at the top three cards of your library. You may reveal a creature, land, or planeswalker card from among them and put it into your hand. Put the rest on the bottom of your library in any order. + // You may spend mana as though it were mana of any color to cast planeswalker spells. + addCard(Zone.BATTLEFIELD, playerA, "Oath of Nissa"); + addCard(Zone.GRAVEYARD, playerA, "Lightning Bolt", 2); + + // Search your library for a card and put that card into your hand. Then shuffle your library. + // Spell mastery - If there are two or more instant and/or sorcery cards in your graveyard, add {B}{B}{B} to your mana pool. + addCard(Zone.HAND, playerA, "Dark Petition"); // {3}{B}{B} + + // +1: Put a 0/1 green Plant creature token onto the battlefield. + // -2: Put a +1/+1 counter on each creature you control. + // -7: You gain X life and draw X cards, where X is the number of lands you control. + addCard(Zone.LIBRARY, playerA, "Nissa, Voice of Zendikar"); // {1}{G}{G} + + castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Dark Petition"); + setChoice(playerA, "Nissa, Voice of Zendikar"); + castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Nissa, Voice of Zendikar"); + + setStopAt(1, PhaseStep.BEGIN_COMBAT); + execute(); + + assertGraveyardCount(playerA, "Dark Petition", 1); + assertHandCount(playerA, "Nissa, Voice of Zendikar", 0); + assertPermanentCount(playerA, "Nissa, Voice of Zendikar", 1); + } } From d626b072cd2048be0c79a4f4a4cde3d225cbb60d Mon Sep 17 00:00:00 2001 From: LevelX2 Date: Sun, 24 Apr 2016 12:34:35 +0200 Subject: [PATCH 4/4] * Myr Superion - Fixed that its mana costs could not be decreased by convoke. --- Mage.Sets/src/mage/sets/newphyrexia/MyrSuperion.java | 4 ++-- Mage/src/main/java/mage/players/ManaPool.java | 6 +++++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/Mage.Sets/src/mage/sets/newphyrexia/MyrSuperion.java b/Mage.Sets/src/mage/sets/newphyrexia/MyrSuperion.java index 4eb8127c2e..99ee8fe07e 100644 --- a/Mage.Sets/src/mage/sets/newphyrexia/MyrSuperion.java +++ b/Mage.Sets/src/mage/sets/newphyrexia/MyrSuperion.java @@ -35,7 +35,7 @@ import mage.cards.CardImpl; import mage.constants.CardType; import mage.constants.Rarity; import mage.constants.Zone; -import mage.filter.common.FilterCreatureCard; +import mage.filter.common.FilterCreaturePermanent; /** * @@ -43,7 +43,7 @@ import mage.filter.common.FilterCreatureCard; */ public class MyrSuperion extends CardImpl { - private static FilterCreatureCard filter = new FilterCreatureCard(); + private static FilterCreaturePermanent filter = new FilterCreaturePermanent(); public MyrSuperion(UUID ownerId) { super(ownerId, 146, "Myr Superion", Rarity.RARE, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{2}"); diff --git a/Mage/src/main/java/mage/players/ManaPool.java b/Mage/src/main/java/mage/players/ManaPool.java index 0655b19af9..0fd3ebad7e 100644 --- a/Mage/src/main/java/mage/players/ManaPool.java +++ b/Mage/src/main/java/mage/players/ManaPool.java @@ -47,6 +47,7 @@ import mage.game.Game; import mage.game.events.GameEvent; import mage.game.events.GameEvent.EventType; import mage.game.events.ManaEvent; +import mage.game.stack.Spell; /** * @@ -130,7 +131,10 @@ public class ManaPool implements Serializable { for (ManaPoolItem mana : manaItems) { if (filter != null) { if (!filter.match(mana.getSourceObject(), game)) { - continue; + // Prevent that cost reduction by convoke is filtered out + if (!(mana.getSourceObject() instanceof Spell) || ability.getSourceId().equals(mana.getSourceId())) { + continue; + } } } if (!manaType.equals(unlockedManaType) && autoPayment && autoPaymentRestricted && mana.count() == mana.getStock()) {