mirror of
https://github.com/correl/mage.git
synced 2024-12-26 03:00:11 +00:00
Fix #9690
This commit is contained in:
parent
543c19bd2c
commit
bc2460627e
2 changed files with 22 additions and 14 deletions
|
@ -2,8 +2,10 @@ package mage.cards.l;
|
|||
|
||||
import mage.ConditionalMana;
|
||||
import mage.MageInt;
|
||||
import mage.MageObject;
|
||||
import mage.Mana;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.SpellAbility;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.condition.Condition;
|
||||
import mage.abilities.costs.common.PayLifeCost;
|
||||
|
@ -98,15 +100,17 @@ enum LordOfTheForsakenManaCondition implements Condition {
|
|||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
if (game == null || !game.inCheckPlayableState()
|
||||
|| !source.isControlledBy(game.getOwnerId(source.getSourceId()))) {
|
||||
if (!(source instanceof SpellAbility)) {
|
||||
return false;
|
||||
}
|
||||
if (game.getCard(source.getSourceId()) != null
|
||||
&& game.getState().getZone(source.getSourceId()) == Zone.GRAVEYARD) {
|
||||
return true;
|
||||
MageObject object = game.getObject(source);
|
||||
if (!source.isControlledBy(game.getOwnerId(object))) {
|
||||
return false;
|
||||
}
|
||||
Spell spell = game.getSpell(source.getSourceId());
|
||||
return spell != null && spell.getFromZone() == Zone.GRAVEYARD;
|
||||
if (object instanceof Spell) {
|
||||
return ((Spell) object).getFromZone() == Zone.GRAVEYARD;
|
||||
}
|
||||
// checking mana without real cast
|
||||
return game.inCheckPlayableState() && game.getState().getZone(object.getId()) == Zone.GRAVEYARD;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,8 +2,10 @@ package mage.cards.r;
|
|||
|
||||
import mage.ConditionalMana;
|
||||
import mage.MageInt;
|
||||
import mage.MageObject;
|
||||
import mage.Mana;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.SpellAbility;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.condition.Condition;
|
||||
import mage.abilities.costs.common.ExileSourceCost;
|
||||
|
@ -104,15 +106,17 @@ enum RootcoilCreeperManaCondition implements Condition {
|
|||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
if (game == null || !game.inCheckPlayableState()
|
||||
|| !source.isControlledBy(game.getOwnerId(source.getSourceId()))) {
|
||||
if (!(source instanceof SpellAbility)) {
|
||||
return false;
|
||||
}
|
||||
if (game.getCard(source.getSourceId()) != null
|
||||
&& game.getState().getZone(source.getSourceId()) == Zone.GRAVEYARD) {
|
||||
return true;
|
||||
MageObject object = game.getObject(source);
|
||||
if (!source.isControlledBy(game.getOwnerId(object))) {
|
||||
return false;
|
||||
}
|
||||
Spell spell = game.getSpell(source.getSourceId());
|
||||
return spell != null && spell.getFromZone() == Zone.GRAVEYARD;
|
||||
if (object instanceof Spell) {
|
||||
return ((Spell) object).getFromZone() == Zone.GRAVEYARD;
|
||||
}
|
||||
// checking mana without real cast
|
||||
return game.inCheckPlayableState() && game.getState().getZone(object.getId()) == Zone.GRAVEYARD;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue