* Fixed a bug of PlayTheTopCardEffect that alloed all players to play the card. (Concerns Oracle of Mul-Daya, Garruk's Horde, Future Sight, Courser of Kruphix, Melek Izzet Paragon, Magus of the Future).

This commit is contained in:
LevelX2 2014-12-31 14:26:57 +01:00
parent d0c0a7391d
commit 41b6a41fda
2 changed files with 19 additions and 11 deletions

View file

@ -73,11 +73,13 @@ public class PlayTheTopCardEffect extends AsThoughEffectImpl {
}
@Override
public boolean applies(UUID sourceId, Ability source, UUID affectedControllerId, Game game) {
Card card = game.getCard(sourceId);
if (card != null && filter.match(card, game)) {
Player player = game.getPlayer(card.getOwnerId());
if (player != null && card.equals(player.getLibrary().getFromTop(game))) {
public boolean applies(UUID objectId, Ability source, UUID affectedControllerId, Game game) {
Card cardOnTop = game.getCard(objectId);
if (cardOnTop != null &&
affectedControllerId.equals(source.getControllerId()) &&
filter.match(cardOnTop, game)) {
Player player = game.getPlayer(cardOnTop.getOwnerId());
if (player != null && cardOnTop.equals(player.getLibrary().getFromTop(game))) {
return true;
}
}