diff --git a/Mage.Server.Plugins/Mage.Player.Human/src/mage/player/human/HumanPlayer.java b/Mage.Server.Plugins/Mage.Player.Human/src/mage/player/human/HumanPlayer.java index 3c46ffe05f..81ee232f83 100644 --- a/Mage.Server.Plugins/Mage.Player.Human/src/mage/player/human/HumanPlayer.java +++ b/Mage.Server.Plugins/Mage.Player.Human/src/mage/player/human/HumanPlayer.java @@ -188,7 +188,6 @@ public class HumanPlayer extends PlayerImpl { synchronized (response) { try { response.wait(); - logger.info("Got response from player: " + response.toString()); } catch (InterruptedException ex) { logger.error("Response error for player " + getName() + " gameId: " + game.getId(), ex); } finally { diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/single/FracturingGustTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/single/FracturingGustTest.java index 7389b0856a..9ae98477f5 100644 --- a/Mage.Tests/src/test/java/org/mage/test/cards/single/FracturingGustTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/cards/single/FracturingGustTest.java @@ -85,4 +85,54 @@ public class FracturingGustTest extends CardTestPlayerBase { assertLife(playerB, 20); } + + @Test + public void testWithIndestructible() { + addCard(Zone.BATTLEFIELD, playerA, "Forest", 5); + // Destroy all artifacts and enchantments. You gain 2 life for each permanent destroyed this way. + addCard(Zone.HAND, playerA, "Fracturing Gust", 1); + + // Flying + // Indestructible (Damage and effects that say "destroy" don't destroy this creature.) + addCard(Zone.BATTLEFIELD, playerB, "Darksteel Gargoyle", 1); // Artifact Creature - Gargoyle + + castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Fracturing Gust"); + + setStopAt(1, PhaseStep.BEGIN_COMBAT); + execute(); + + assertGraveyardCount(playerA, "Fracturing Gust", 1); + assertPermanentCount(playerB, "Darksteel Gargoyle", 1); + + // No life because Darksteel Gargoyle is Indestructible + assertLife(playerA, 20); + assertLife(playerB, 20); + + } + + @Test + public void testWithRestInPeace() { + addCard(Zone.BATTLEFIELD, playerA, "Forest", 5); + // Destroy all artifacts and enchantments. You gain 2 life for each permanent destroyed this way. + addCard(Zone.HAND, playerA, "Fracturing Gust", 1); + + addCard(Zone.BATTLEFIELD, playerB, "Ornithopter", 1); // Artifact Creature 2/2 + + // When Rest in Peace enters the battlefield, exile all cards from all graveyards. + // If a card or token would be put into a graveyard from anywhere, exile it instead. + addCard(Zone.BATTLEFIELD, playerB, "Rest in Peace"); // Artifact + + castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Fracturing Gust"); + + setStopAt(1, PhaseStep.BEGIN_COMBAT); + execute(); + + assertGraveyardCount(playerA, "Fracturing Gust", 1); + assertGraveyardCount(playerB, "Ornithopter", 0); + assertExileCount(playerB, "Ornithopter", 1); + + assertLife(playerA, 24); + assertLife(playerB, 20); + + } } diff --git a/Mage.Tests/src/test/java/org/mage/test/commander/duel/CommanderReplaceEffectTest.java b/Mage.Tests/src/test/java/org/mage/test/commander/duel/CommanderReplaceEffectTest.java index bda7e66293..71c9e14da8 100644 --- a/Mage.Tests/src/test/java/org/mage/test/commander/duel/CommanderReplaceEffectTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/commander/duel/CommanderReplaceEffectTest.java @@ -59,7 +59,8 @@ public class CommanderReplaceEffectTest extends CardTestCommanderDuelBase { addCard(Zone.HAND, playerB, "Phyrexian Rebirth", 1); // Daxos of Meletis can't be blocked by creatures with power 3 or greater. - // Whenever Daxos of Meletis deals combat damage to a player, exile the top card of that player's library. You gain life equal to that card's converted mana cost. Until end of turn, you may cast that card and you may spend mana as though it were mana of any color to cast it. + // Whenever Daxos of Meletis deals combat damage to a player, exile the top card of that player's library. You gain life equal to that card's converted mana cost. + // Until end of turn, you may cast that card and you may spend mana as though it were mana of any color to cast it. castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Daxos of Meletis"); // Destroy all creatures, then put an X/X colorless Horror artifact creature token onto the battlefield, where X is the number of creatures destroyed this way. diff --git a/Mage/src/main/java/mage/game/permanent/PermanentImpl.java b/Mage/src/main/java/mage/game/permanent/PermanentImpl.java index 2cd47edadc..86ed0b59fd 100644 --- a/Mage/src/main/java/mage/game/permanent/PermanentImpl.java +++ b/Mage/src/main/java/mage/game/permanent/PermanentImpl.java @@ -27,6 +27,7 @@ */ package mage.game.permanent; +import java.util.*; import mage.MageObject; import mage.MageObjectReference; import mage.ObjectColor; @@ -55,8 +56,6 @@ import mage.players.Player; import mage.util.GameLog; import mage.util.ThreadLocalStringBuilder; -import java.util.*; - /** * @author BetaSteward_at_googlemail.com */ @@ -972,8 +971,8 @@ public abstract class PermanentImpl extends CardImpl implements Permanent { } } game.fireEvent(GameEvent.getEvent(EventType.DESTROYED_PERMANENT, objectId, sourceId, controllerId)); - return true; } + return true; } return false; }