[KHM] Fixed Draugr Necromancer being unable to cast Adventures

This commit is contained in:
Daniel Bomar 2021-02-26 16:06:08 -06:00
parent 287aab5564
commit 73f594583f
No known key found for this signature in database
GPG key ID: C86C8658F4023918
2 changed files with 13 additions and 12 deletions

View file

@ -125,15 +125,18 @@ class DraugrNecromancerCastFromExileEffect extends AsThoughEffectImpl {
@Override
public boolean applies(UUID sourceId, Ability source, UUID affectedControllerId, Game game) {
if (!source.isControlledBy(affectedControllerId)
|| game.getState().getZone(sourceId) != Zone.EXILED) {
Card card = game.getCard(sourceId);
if (card == null) {
return false;
}
Card card = game.getCard(sourceId);
return card != null
&& !card.isLand()
card = card.getMainCard();
if (!source.isControlledBy(affectedControllerId)
|| game.getState().getZone(card.getId()) != Zone.EXILED) {
return false;
}
return !card.isLand()
&& game.getOpponents(card.getOwnerId()).contains(source.getControllerId())
&& card.getMainCard().getCounters(game).getCount(CounterType.ICE) > 0;
&& card.getCounters(game).getCount(CounterType.ICE) > 0;
}
}

View file

@ -118,7 +118,6 @@ public class DraugrNecromancerTest extends CardTestPlayerBase {
assertPermanentCount(playerA, pair, 1);
}
@Ignore
@Test
public void testCastAdventureSpellFromExile() {
addCard(Zone.BATTLEFIELD, playerA, necromancer);
@ -136,8 +135,8 @@ public class DraugrNecromancerTest extends CardTestPlayerBase {
execute();
assertAllCommandsUsed();
assertExileCount(playerB, pair, 0);
assertGraveyardCount(playerB, pair, 1);
assertExileCount(playerB, pair, 1);
assertGraveyardCount(playerB, pair, 0);
assertPermanentCount(playerA, "Food", 1);
}
@ -162,7 +161,6 @@ public class DraugrNecromancerTest extends CardTestPlayerBase {
assertPermanentCount(playerA, pair, 1);
}
@Ignore
@Test
public void testCastAdventureSpellFromExileWithSnow() {
addCard(Zone.BATTLEFIELD, playerA, necromancer);
@ -180,8 +178,8 @@ public class DraugrNecromancerTest extends CardTestPlayerBase {
execute();
assertAllCommandsUsed();
assertExileCount(playerB, pair, 0);
assertGraveyardCount(playerB, pair, 1);
assertExileCount(playerB, pair, 1);
assertGraveyardCount(playerB, pair, 0);
assertPermanentCount(playerA, "Food", 1);
}