Fix Light up the Stage and Escape to the Wilds not being able to cast adventures

This commit is contained in:
Daniel Bomar 2020-10-27 18:19:09 -05:00
parent bce7efb8cf
commit 01bd43f544
2 changed files with 5 additions and 2 deletions

View file

@ -10,6 +10,7 @@ import mage.constants.*;
import mage.game.Game;
import mage.players.Player;
import mage.target.targetpointer.FixedTarget;
import mage.util.CardUtil;
import java.util.UUID;
@ -113,7 +114,8 @@ class EscapeToTheWildsMayPlayEffect extends AsThoughEffectImpl {
@Override
public boolean applies(UUID sourceId, Ability source, UUID affectedControllerId, Game game) {
UUID objectIdToCast = CardUtil.getMainCardId(game, sourceId);
return source.isControlledBy(affectedControllerId)
&& getTargetPointer().getTargets(game, source).contains(sourceId);
&& getTargetPointer().getTargets(game, source).contains(objectIdToCast);
}
}

View file

@ -119,7 +119,8 @@ class LightUpTheStageMayPlayEffect extends AsThoughEffectImpl {
@Override
public boolean applies(UUID sourceId, Ability source, UUID affectedControllerId, Game game) {
UUID objectIdToCast = CardUtil.getMainCardId(game, sourceId);
return source.isControlledBy(affectedControllerId)
&& getTargetPointer().getTargets(game, source).contains(sourceId);
&& getTargetPointer().getTargets(game, source).contains(objectIdToCast);
}
}