diff --git a/Mage.Sets/src/mage/sets/shadowmoor/PrismaticOmen.java b/Mage.Sets/src/mage/sets/shadowmoor/PrismaticOmen.java index f3e7e5bc716..73b5b6ee1b3 100644 --- a/Mage.Sets/src/mage/sets/shadowmoor/PrismaticOmen.java +++ b/Mage.Sets/src/mage/sets/shadowmoor/PrismaticOmen.java @@ -30,13 +30,6 @@ package mage.sets.shadowmoor; import java.util.ArrayList; import java.util.Arrays; import java.util.UUID; -import mage.constants.CardType; -import mage.constants.Duration; -import mage.constants.Layer; -import mage.constants.Outcome; -import mage.constants.Rarity; -import mage.constants.SubLayer; -import mage.constants.Zone; import mage.Mana; import mage.abilities.Ability; import mage.abilities.common.SimpleStaticAbility; @@ -48,6 +41,13 @@ import mage.abilities.mana.GreenManaAbility; import mage.abilities.mana.RedManaAbility; import mage.abilities.mana.WhiteManaAbility; import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Layer; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.constants.SubLayer; +import mage.constants.Zone; import mage.filter.common.FilterLandPermanent; import mage.game.Game; import mage.game.permanent.Permanent; @@ -62,7 +62,6 @@ public class PrismaticOmen extends CardImpl { super(ownerId, 126, "Prismatic Omen", Rarity.RARE, new CardType[]{CardType.ENCHANTMENT}, "{1}{G}"); this.expansionSetCode = "SHM"; - // Lands you control are every basic land type in addition to their other types. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BecomesBasicLandTypeAllEffect("Swamp", "Mountain", "Forest", "Island", "Plains"))); } @@ -109,11 +108,11 @@ class BecomesBasicLandTypeAllEffect extends ContinuousEffectImpl { switch (layer) { case AbilityAddingRemovingEffects_6: Mana mana = new Mana(); - for (Ability ability : land.getAbilities()){ + for (Ability ability : land.getAbilities()) { if (ability instanceof BasicManaAbility) { - for (Mana netMana: ((BasicManaAbility)ability ).getNetMana(game)) { + for (Mana netMana : ((BasicManaAbility) ability).getNetMana(game)) { mana.add(netMana); - } + } } } if (mana.getGreen() == 0 && landTypes.contains("Forest")) { diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/abilities/enters/ValakutTheMoltenPinnacleTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/abilities/enters/ValakutTheMoltenPinnacleTest.java index c29cd7a736b..141e9951328 100644 --- a/Mage.Tests/src/test/java/org/mage/test/cards/abilities/enters/ValakutTheMoltenPinnacleTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/cards/abilities/enters/ValakutTheMoltenPinnacleTest.java @@ -26,13 +26,10 @@ * authors and should not be interpreted as representing official policies, either expressed * or implied, of BetaSteward_at_googlemail.com. */ - package org.mage.test.cards.abilities.enters; import mage.constants.PhaseStep; import mage.constants.Zone; -import mage.game.permanent.Permanent; -import org.junit.Assert; import org.junit.Test; import org.mage.test.serverside.base.CardTestPlayerBase; @@ -40,17 +37,15 @@ import org.mage.test.serverside.base.CardTestPlayerBase; * * @author LevelX2 */ - public class ValakutTheMoltenPinnacleTest extends CardTestPlayerBase { /** - * Valakut, the Molten Pinnacle - * Land - * Valakut, the Molten Pinnacle enters the battlefield tapped. - * Whenever a Mountain enters the battlefield under your control, if you control at least five other Mountains, you may have Valakut, the Molten Pinnacle deal 3 damage to target creature or player. - * {T}: Add {R} to your mana pool. + * Valakut, the Molten Pinnacle Land Valakut, the Molten Pinnacle enters the + * battlefield tapped. Whenever a Mountain enters the battlefield under your + * control, if you control at least five other Mountains, you may have + * Valakut, the Molten Pinnacle deal 3 damage to target creature or player. + * {T}: Add {R} to your mana pool. */ - @Test public void onlyFourMountainsNoDamage() { @@ -85,13 +80,11 @@ public class ValakutTheMoltenPinnacleTest extends CardTestPlayerBase { assertLife(playerA, 20); assertLife(playerB, 17); - } - // Scapeshift {2}{G}{G} - // Sorcery - // Sacrifice any number of lands. Search your library for that many land cards, put them onto the battlefield tapped, then shuffle your library. - + // Scapeshift {2}{G}{G} + // Sorcery + // Sacrifice any number of lands. Search your library for that many land cards, put them onto the battlefield tapped, then shuffle your library. @Test public void sixEnterWithScapeshiftDamageToPlayerB() { @@ -113,7 +106,6 @@ public class ValakutTheMoltenPinnacleTest extends CardTestPlayerBase { assertLife(playerA, 20); assertLife(playerB, 2); // 6 * 3 damage = 18 - } @Test @@ -166,4 +158,36 @@ public class ValakutTheMoltenPinnacleTest extends CardTestPlayerBase { assertLife(playerB, 2); // 6 * 3 damage = 18 } + + /** + * Some lands aren't triggering Valakut, the Molten Pinnacle with Prismatic + * Omen and 6+ lands in play. So far I've noticed that Misty Rainforest and + * basic Island did not trigger Valakut, but an additional copy of Valakut + * did. + */ + @Test + public void withPrismaticOmen() { + // Valakut, the Molten Pinnacle enters the battlefield tapped. + // Whenever a Mountain enters the battlefield under your control, if you control at least five other Mountains, + // you may have Valakut, the Molten Pinnacle deal 3 damage to target creature or player. + // {T}: Add {R} to your mana pool. + addCard(Zone.BATTLEFIELD, playerA, "Valakut, the Molten Pinnacle"); + addCard(Zone.BATTLEFIELD, playerA, "Forest", 4); + + addCard(Zone.HAND, playerA, "Forest", 1); + + // Lands you control are every basic land type in addition to their other types. + addCard(Zone.BATTLEFIELD, playerA, "Prismatic Omen"); + + playLand(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Forest"); + addTarget(playerA, playerB); + + setStopAt(1, PhaseStep.BEGIN_COMBAT); + execute(); + + assertLife(playerA, 20); + assertLife(playerB, 17); + + } + } diff --git a/Mage/src/mage/game/permanent/PermanentImpl.java b/Mage/src/mage/game/permanent/PermanentImpl.java index f5be69ff35f..783801dc7f2 100644 --- a/Mage/src/mage/game/permanent/PermanentImpl.java +++ b/Mage/src/mage/game/permanent/PermanentImpl.java @@ -916,11 +916,7 @@ public abstract class PermanentImpl extends CardImpl implements Permanent { EntersTheBattlefieldEvent event = new EntersTheBattlefieldEvent(this, sourceId, getControllerId(), fromZone); if (!game.replaceEvent(event)) { if (fireEvent) { - if (sourceId == null) { // play lands - game.fireEvent(event); - } else { // from effects - game.addSimultaneousEvent(event); - } + game.addSimultaneousEvent(event); } return true; }