From 42a3ca80836e0693adc202a28b39e0790c3777c8 Mon Sep 17 00:00:00 2001 From: LevelX2 Date: Tue, 31 Mar 2015 00:07:35 +0200 Subject: [PATCH] * Dryad Militant Test updated. --- .../src/mage/sets/returntoravnica/DryadMilitant.java | 9 ++++++--- .../mage/test/cards/replacement/DryadMilitantTest.java | 7 ++++--- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/Mage.Sets/src/mage/sets/returntoravnica/DryadMilitant.java b/Mage.Sets/src/mage/sets/returntoravnica/DryadMilitant.java index 0649915a4a..ef147ed386 100644 --- a/Mage.Sets/src/mage/sets/returntoravnica/DryadMilitant.java +++ b/Mage.Sets/src/mage/sets/returntoravnica/DryadMilitant.java @@ -56,8 +56,6 @@ public class DryadMilitant extends CardImpl { this.subtype.add("Dryad"); this.subtype.add("Soldier"); - this.color.setGreen(true); - this.color.setWhite(true); this.power = new MageInt(2); this.toughness = new MageInt(1); @@ -108,9 +106,14 @@ class DryadMilitantReplacementEffect extends ReplacementEffectImpl { return false; } + @Override + public boolean checksEventType(GameEvent event, Game game) { + return event.getType() == GameEvent.EventType.ZONE_CHANGE; + } + @Override public boolean applies(GameEvent event, Ability source, Game game) { - if (event.getType() == GameEvent.EventType.ZONE_CHANGE && ((ZoneChangeEvent)event).getToZone() == Zone.GRAVEYARD) { + if (((ZoneChangeEvent)event).getToZone() == Zone.GRAVEYARD) { Card card = game.getCard(event.getTargetId()); if (card != null && (card.getCardType().contains(CardType.SORCERY) || card.getCardType().contains(CardType.INSTANT))) { return true; diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/replacement/DryadMilitantTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/replacement/DryadMilitantTest.java index 1b2ce7f42e..451d18381c 100644 --- a/Mage.Tests/src/test/java/org/mage/test/cards/replacement/DryadMilitantTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/cards/replacement/DryadMilitantTest.java @@ -80,12 +80,12 @@ public class DryadMilitantTest extends CardTestPlayerBase { /** * Tests if Dryad Militant dies by damage spell, the - * spell don't gets exiled + * spell don't get exiled */ @Test public void testDiesByDestroy() { addCard(Zone.BATTLEFIELD, playerA, "Mountain", 1); - addCard(Zone.BATTLEFIELD, playerA, "Plains", 1); + addCard(Zone.BATTLEFIELD, playerA, "Swamp", 1); addCard(Zone.HAND, playerA, "Terminate"); addCard(Zone.BATTLEFIELD, playerB, "Dryad Militant"); @@ -95,7 +95,8 @@ public class DryadMilitantTest extends CardTestPlayerBase { execute(); assertLife(playerB, 20); - + + assertHandCount(playerA, "Terminate", 0); assertGraveyardCount(playerB, "Terminate", 1); } }