Merge pull request #7154 from weirddan455/luts-adventure-fix

Fix Light up the Stage and Escape to the Wilds not being able to cast adventures
This commit is contained in:
Oleg Agafonov 2020-11-01 10:21:05 +01:00 committed by GitHub
commit 03cbee7bfe
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
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);
}
}