mirror of
https://github.com/correl/mage.git
synced 2025-03-16 17:00:13 -09: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.ConditionalMana;
|
||||||
import mage.MageInt;
|
import mage.MageInt;
|
||||||
|
import mage.MageObject;
|
||||||
import mage.Mana;
|
import mage.Mana;
|
||||||
import mage.abilities.Ability;
|
import mage.abilities.Ability;
|
||||||
|
import mage.abilities.SpellAbility;
|
||||||
import mage.abilities.common.SimpleActivatedAbility;
|
import mage.abilities.common.SimpleActivatedAbility;
|
||||||
import mage.abilities.condition.Condition;
|
import mage.abilities.condition.Condition;
|
||||||
import mage.abilities.costs.common.PayLifeCost;
|
import mage.abilities.costs.common.PayLifeCost;
|
||||||
|
@ -98,15 +100,17 @@ enum LordOfTheForsakenManaCondition implements Condition {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean apply(Game game, Ability source) {
|
public boolean apply(Game game, Ability source) {
|
||||||
if (game == null || !game.inCheckPlayableState()
|
if (!(source instanceof SpellAbility)) {
|
||||||
|| !source.isControlledBy(game.getOwnerId(source.getSourceId()))) {
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (game.getCard(source.getSourceId()) != null
|
MageObject object = game.getObject(source);
|
||||||
&& game.getState().getZone(source.getSourceId()) == Zone.GRAVEYARD) {
|
if (!source.isControlledBy(game.getOwnerId(object))) {
|
||||||
return true;
|
return false;
|
||||||
}
|
}
|
||||||
Spell spell = game.getSpell(source.getSourceId());
|
if (object instanceof Spell) {
|
||||||
return spell != null && spell.getFromZone() == Zone.GRAVEYARD;
|
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.ConditionalMana;
|
||||||
import mage.MageInt;
|
import mage.MageInt;
|
||||||
|
import mage.MageObject;
|
||||||
import mage.Mana;
|
import mage.Mana;
|
||||||
import mage.abilities.Ability;
|
import mage.abilities.Ability;
|
||||||
|
import mage.abilities.SpellAbility;
|
||||||
import mage.abilities.common.SimpleActivatedAbility;
|
import mage.abilities.common.SimpleActivatedAbility;
|
||||||
import mage.abilities.condition.Condition;
|
import mage.abilities.condition.Condition;
|
||||||
import mage.abilities.costs.common.ExileSourceCost;
|
import mage.abilities.costs.common.ExileSourceCost;
|
||||||
|
@ -104,15 +106,17 @@ enum RootcoilCreeperManaCondition implements Condition {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean apply(Game game, Ability source) {
|
public boolean apply(Game game, Ability source) {
|
||||||
if (game == null || !game.inCheckPlayableState()
|
if (!(source instanceof SpellAbility)) {
|
||||||
|| !source.isControlledBy(game.getOwnerId(source.getSourceId()))) {
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (game.getCard(source.getSourceId()) != null
|
MageObject object = game.getObject(source);
|
||||||
&& game.getState().getZone(source.getSourceId()) == Zone.GRAVEYARD) {
|
if (!source.isControlledBy(game.getOwnerId(object))) {
|
||||||
return true;
|
return false;
|
||||||
}
|
}
|
||||||
Spell spell = game.getSpell(source.getSourceId());
|
if (object instanceof Spell) {
|
||||||
return spell != null && spell.getFromZone() == Zone.GRAVEYARD;
|
return ((Spell) object).getFromZone() == Zone.GRAVEYARD;
|
||||||
|
}
|
||||||
|
// checking mana without real cast
|
||||||
|
return game.inCheckPlayableState() && game.getState().getZone(object.getId()) == Zone.GRAVEYARD;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue