forked from External/mage
* Play with top card library - fixed that player can see next top card before casting current top card;
This commit is contained in:
parent
d3b1be2f75
commit
ca4a4528fb
3 changed files with 24 additions and 22 deletions
|
|
@ -14,6 +14,8 @@ import mage.filter.Filter;
|
|||
import mage.filter.predicate.Predicate;
|
||||
import mage.filter.predicate.Predicates;
|
||||
import mage.game.Game;
|
||||
import mage.game.stack.Spell;
|
||||
import mage.game.stack.StackObject;
|
||||
import mage.players.Player;
|
||||
import mage.target.targetpointer.TargetPointer;
|
||||
|
||||
|
|
@ -395,4 +397,17 @@ public abstract class ContinuousEffectImpl extends EffectImpl implements Continu
|
|||
this.addDependedToType(DependencyType.AddingCreatureType);
|
||||
}
|
||||
}
|
||||
|
||||
public boolean isCanLookAtNextTopLibraryCard(Game game) {
|
||||
// If the top card of your library changes while you’re casting a spell, playing a land, or activating an ability,
|
||||
// you can’t look at the new top card until you finish doing so. This means that if you cast the top card of
|
||||
// your library, you can’t look at the next one until you’re done paying for that spell. (2019-05-03)
|
||||
if (!game.getStack().isEmpty()) {
|
||||
StackObject stackObject = game.getStack().getFirst();
|
||||
return !(stackObject instanceof Spell)
|
||||
|| !Zone.LIBRARY.equals(((Spell) stackObject).getFromZone())
|
||||
|| ((Spell) stackObject).isDoneActivatingManaAbilities();
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue