fix #11547 (Scholar of the Lost Trove)

This commit is contained in:
xenohedron 2023-12-21 22:43:28 -05:00
parent 7ff2570024
commit 0862461d6b

View file

@ -95,6 +95,7 @@ class ScholarOfTheLostTroveEffect extends OneShotEffect {
if (!controller.chooseUse(Outcome.PlayForFree, "Cast " + card.getLogName() + '?', source, game)) { if (!controller.chooseUse(Outcome.PlayForFree, "Cast " + card.getLogName() + '?', source, game)) {
return true; return true;
} }
FixedTarget fixedTarget = new FixedTarget(card, game);
game.getState().setValue("PlayFromNotOwnHandZone" + card.getId(), Boolean.TRUE); game.getState().setValue("PlayFromNotOwnHandZone" + card.getId(), Boolean.TRUE);
boolean cardWasCast = controller.cast(controller.chooseAbilityForCast(card, game, true), boolean cardWasCast = controller.cast(controller.chooseAbilityForCast(card, game, true),
game, true, new ApprovingObject(source, game)); game, true, new ApprovingObject(source, game));
@ -103,7 +104,7 @@ class ScholarOfTheLostTroveEffect extends OneShotEffect {
return true; return true;
} }
ContinuousEffect effect = new ThatSpellGraveyardExileReplacementEffect(true); ContinuousEffect effect = new ThatSpellGraveyardExileReplacementEffect(true);
effect.setTargetPointer(new FixedTarget(card.getId(), game.getState().getZoneChangeCounter(card.getId()))); effect.setTargetPointer(fixedTarget);
effect.setText("If an instant or sorcery spell cast this way would be put into your graveyard this turn, exile it instead"); effect.setText("If an instant or sorcery spell cast this way would be put into your graveyard this turn, exile it instead");
game.addEffect(effect, source); game.addEffect(effect, source);
return true; return true;