* Goblin Guide - Fixed a bug that the ability did not trigger if a planeswalker was attacked.

This commit is contained in:
LevelX2 2014-09-04 19:08:15 +02:00
parent 6199884b70
commit 0122937fbc

View file

@ -92,7 +92,7 @@ class GoblinGuideEffect extends OneShotEffect {
@Override @Override
public boolean apply(Game game, Ability source) { public boolean apply(Game game, Ability source) {
UUID defenderId = game.getCombat().getDefenderId(source.getSourceId()); UUID defenderId = game.getCombat().getDefendingPlayerId(source.getSourceId(), game);
Player defender = game.getPlayer(defenderId); Player defender = game.getPlayer(defenderId);
if (defender != null) { if (defender != null) {
Cards cards = new CardsImpl(); Cards cards = new CardsImpl();
@ -101,7 +101,6 @@ class GoblinGuideEffect extends OneShotEffect {
cards.add(card); cards.add(card);
defender.revealCards("Goblin Guide", cards, game); defender.revealCards("Goblin Guide", cards, game);
if (card.getCardType().contains(CardType.LAND)) { if (card.getCardType().contains(CardType.LAND)) {
defender.getLibrary().removeFromTop(game);
defender.moveCardToHandWithInfo(card, source.getSourceId(), game, Zone.LIBRARY); defender.moveCardToHandWithInfo(card, source.getSourceId(), game, Zone.LIBRARY);
} }
} }