followup fix for Disorder in the Court

This commit is contained in:
xenohedron 2023-10-06 01:10:36 -04:00
parent 8f9359d856
commit a516105899

View file

@ -86,15 +86,16 @@ class DisorderInTheCourtEffect extends OneShotEffect {
.map(game::getPermanent)
.filter(Objects::nonNull)
.collect(Collectors.toCollection(LinkedHashSet::new));
if (toExile.isEmpty()) {
return false;
if (!toExile.isEmpty()) {
controller.moveCardsToExile(toExile, source, game, true, CardUtil.getExileZoneId(game, source), CardUtil.getSourceName(game, source));
game.getState().processAction(game);
}
controller.moveCardsToExile(toExile, source, game, true, CardUtil.getExileZoneId(game, source), CardUtil.getSourceName(game, source));
game.getState().processAction(game);
new InvestigateEffect(ManacostVariableValue.REGULAR).apply(game, source);
Effect effect = new ReturnToBattlefieldUnderOwnerControlTargetEffect(true, true);
effect.setTargetPointer(new FixedTargets(new CardsImpl(toExile), game));
game.addDelayedTriggeredAbility(new AtTheBeginOfNextEndStepDelayedTriggeredAbility(effect), source);
if (!toExile.isEmpty()) {
Effect effect = new ReturnToBattlefieldUnderOwnerControlTargetEffect(true, true);
effect.setTargetPointer(new FixedTargets(new CardsImpl(toExile), game));
game.addDelayedTriggeredAbility(new AtTheBeginOfNextEndStepDelayedTriggeredAbility(effect), source);
}
return true;
}