Fix adventures not being castable with Omniscience

This commit is contained in:
Daniel Bomar 2020-10-27 13:49:07 -05:00
parent bce7efb8cf
commit 6380e80a5e

View file

@ -7,6 +7,7 @@ import mage.abilities.condition.Condition;
import mage.abilities.condition.common.SourceIsSpellCondition;
import mage.abilities.costs.AlternativeCostSourceAbility;
import mage.abilities.effects.ContinuousEffectImpl;
import mage.cards.AdventureCardSpell;
import mage.cards.Card;
import mage.cards.SplitCardHalf;
import mage.constants.*;
@ -87,7 +88,7 @@ enum IsBeingCastFromHandCondition implements Condition {
@Override
public boolean apply(Game game, Ability source) {
MageObject object = game.getObject(source.getSourceId());
if (object instanceof SplitCardHalf) {
if (object instanceof SplitCardHalf || object instanceof AdventureCardSpell) {
UUID splitCardId = ((Card) object).getMainCard().getId();
object = game.getObject(splitCardId);
}