diff --git a/Mage.Sets/src/mage/cards/h/HaldanAvidArcanist.java b/Mage.Sets/src/mage/cards/h/HaldanAvidArcanist.java index 07d37bba48..9a9f4e6c02 100644 --- a/Mage.Sets/src/mage/cards/h/HaldanAvidArcanist.java +++ b/Mage.Sets/src/mage/cards/h/HaldanAvidArcanist.java @@ -50,13 +50,13 @@ public final class HaldanAvidArcanist extends CardImpl { return new HaldanAvidArcanist(this); } - static boolean checkCard(UUID sourceId, Ability source, UUID affectedControllerId, Game game) { - if (!PakoArcaneRetriever.checkWatcher(affectedControllerId, game.getCard(sourceId), game) + static boolean checkCard(UUID objectId, Ability source, UUID affectedControllerId, Game game) { + if (!PakoArcaneRetriever.checkWatcher(affectedControllerId, game.getCard(objectId), game) || !source.isControlledBy(affectedControllerId) - || game.getState().getZone(sourceId) != Zone.EXILED) { + || game.getState().getZone(objectId) != Zone.EXILED) { return false; } - Card card = game.getCard(sourceId); + Card card = game.getCard(objectId); return card != null && !card.isCreature() && card.getCounters(game).containsKey(CounterType.FETCH); diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/single/hou/TormentOfHailfireTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/single/hou/TormentOfHailfireTest.java new file mode 100644 index 0000000000..3085db981a --- /dev/null +++ b/Mage.Tests/src/test/java/org/mage/test/cards/single/hou/TormentOfHailfireTest.java @@ -0,0 +1,88 @@ +package org.mage.test.cards.single.hou; + +import java.io.FileNotFoundException; + +import mage.constants.MultiplayerAttackOption; +import mage.constants.PhaseStep; +import mage.constants.RangeOfInfluence; +import mage.constants.Zone; +import mage.game.FreeForAll; +import mage.game.Game; +import mage.game.GameException; +import mage.game.mulligan.MulliganType; +import org.junit.Assert; +import org.junit.Test; +import org.mage.test.serverside.base.CardTestMultiPlayerBase; + +/** + * + * @author LevelX2 + */ +public class TormentOfHailfireTest extends CardTestMultiPlayerBase { + + @Override + protected Game createNewGameAndPlayers() throws GameException, FileNotFoundException { + // Start Life = 2 + Game game = new FreeForAll(MultiplayerAttackOption.MULTIPLE, RangeOfInfluence.ONE, MulliganType.GAME_DEFAULT.getMulligan(0), 20); + // Player order: A -> D -> C -> B + playerA = createPlayer(game, playerA, "PlayerA"); + playerB = createPlayer(game, playerB, "PlayerB"); + playerC = createPlayer(game, playerC, "PlayerC"); + playerD = createPlayer(game, playerD, "PlayerD"); + return game; + } + + @Test + public void test_Normal() { + setStrictChooseMode(true); + + // Repeat the following process X times. Each opponent loses 3 life unless they sacrifice a nonland permanent or discards a card. + addCard(Zone.HAND, playerA, "Torment of Hailfire", 1); // Sorcery {X}{B}{B} + addCard(Zone.BATTLEFIELD, playerA, "Swamp", 12); + + addCard(Zone.BATTLEFIELD, playerB, "Silvercoat Lion", 2); + addCard(Zone.HAND, playerB, "Plains", 1); + + addCard(Zone.BATTLEFIELD, playerC, "Silvercoat Lion", 3); + + addCard(Zone.BATTLEFIELD, playerD, "Silvercoat Lion", 3); + addCard(Zone.HAND, playerD, "Plains", 1); + + castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Torment of Hailfire"); + setChoice(playerA, "X=10"); + + setChoice(playerD, "Yes");// Sacrifices a nonland permanent? + setChoice(playerD, "Silvercoat Lion"); + + setChoice(playerB, "Yes");// Sacrifices a nonland permanent? + setChoice(playerB, "Silvercoat Lion"); + + setChoice(playerD, "Yes");// Sacrifices a nonland permanent? + setChoice(playerD, "Silvercoat Lion"); + + setChoice(playerB, "Yes");// Sacrifices a nonland permanent? + setChoice(playerB, "Silvercoat Lion"); + + setChoice(playerD, "No");// Sacrifices a nonland permanent? + setChoice(playerD, "Yes");// Discard a card? + + setChoice(playerB, "Yes");// Discard a card? + + setChoice(playerD, "Yes");// Sacrifices a nonland permanent? + setChoice(playerD, "Silvercoat Lion"); + + setStopAt(1, PhaseStep.BEGIN_COMBAT); + execute(); + + assertAllCommandsUsed(); + + assertGraveyardCount(playerA, "Torment of Hailfire", 1); + + assertLife(playerA, 20); + assertLife(playerC, 20); + assertLife(playerD, 2); + assertLife(playerB, -1); + Assert.assertFalse("Player B is dead", playerB.isInGame()); + + } +} diff --git a/Mage/src/main/java/mage/abilities/effects/common/ExileAttachedEffect.java b/Mage/src/main/java/mage/abilities/effects/common/ExileAttachedEffect.java index 1e123ca4cb..040fb241a9 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/ExileAttachedEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/ExileAttachedEffect.java @@ -21,7 +21,7 @@ public class ExileAttachedEffect extends OneShotEffect { public ExileAttachedEffect() { super(Outcome.Exile); - staticText = "Exile enchanted creature"; + staticText = "exile enchanted creature"; } public ExileAttachedEffect(final ExileAttachedEffect effect) {