* Scry - Fixed that if you play with the top card of library revealed you didn't reveal the next card during scry effect.

This commit is contained in:
LevelX2 2014-02-04 22:54:59 +01:00
parent 71fafb168c
commit a1dc4ec5b3

View file

@ -68,6 +68,8 @@ public class ScryEffect extends OneShotEffect<ScryEffect> {
public boolean apply(Game game, Ability source) { public boolean apply(Game game, Ability source) {
Player player = game.getPlayer(source.getControllerId()); Player player = game.getPlayer(source.getControllerId());
if (player != null) { if (player != null) {
boolean revealed = player.isTopCardRevealed(); // by looking at the cards with scry you have not to reveal the next card
player.setTopCardRevealed(false);
Cards cards = new CardsImpl(Zone.PICK); Cards cards = new CardsImpl(Zone.PICK);
int count = Math.min(scryNumber, player.getLibrary().size()); int count = Math.min(scryNumber, player.getLibrary().size());
if (count == 0) { if (count == 0) {
@ -112,6 +114,7 @@ public class ScryEffect extends OneShotEffect<ScryEffect> {
.append(" on the bottom of his or her library (scry ") .append(" on the bottom of his or her library (scry ")
.append(scryNumber).append(")").toString()); .append(scryNumber).append(")").toString());
game.fireEvent(new GameEvent(GameEvent.EventType.SCRY, source.getControllerId(), source.getSourceId(), source.getControllerId())); game.fireEvent(new GameEvent(GameEvent.EventType.SCRY, source.getControllerId(), source.getSourceId(), source.getControllerId()));
player.setTopCardRevealed(revealed);
return true; return true;
} }
return false; return false;