mirror of
https://github.com/magefree/mage.git
synced 2025-12-23 03:51:58 -08:00
* 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:
parent
71fafb168c
commit
a1dc4ec5b3
1 changed files with 3 additions and 0 deletions
|
|
@ -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;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue