forked from External/mage
refactor: improved search in stack
This commit is contained in:
parent
26adccdfd5
commit
384ce67cc3
20 changed files with 101 additions and 119 deletions
|
|
@ -513,13 +513,10 @@ public abstract class ContinuousEffectImpl extends EffectImpl implements Continu
|
|||
// 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())
|
||||
|| stackObject.getStackAbility().getManaCostsToPay().isPaid(); // mana payment finished
|
||||
}
|
||||
return true;
|
||||
StackObject stackObject = game.getStack().getFirstOrNull();
|
||||
return !(stackObject instanceof Spell)
|
||||
|| !Zone.LIBRARY.equals(((Spell) stackObject).getFromZone())
|
||||
|| stackObject.getStackAbility().getManaCostsToPay().isPaid(); // mana payment finished
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue