You should technically be able to play an effect that requires playing from draw deck, even if you don't have the card in deck.
This commit is contained in:
@@ -6,6 +6,7 @@ import com.gempukku.lotro.common.*;
|
||||
import com.gempukku.lotro.filters.Filter;
|
||||
import com.gempukku.lotro.filters.Filters;
|
||||
import com.gempukku.lotro.game.PhysicalCard;
|
||||
import com.gempukku.lotro.logic.GameUtils;
|
||||
import com.gempukku.lotro.logic.timing.results.CharacterLostSkirmishResult;
|
||||
|
||||
import java.util.*;
|
||||
@@ -46,6 +47,13 @@ public class FilterFactory {
|
||||
});
|
||||
simpleFilters.put("unbound",
|
||||
(actionContext) -> Filters.not(Keyword.RING_BOUND));
|
||||
simpleFilters.put("attachedtoinsameregion",
|
||||
actionContext -> {
|
||||
final PhysicalCard attachedTo = actionContext.getSource().getAttachedTo();
|
||||
return Filters.region(GameUtils.getRegion(attachedTo.getSiteNumber()));
|
||||
});
|
||||
simpleFilters.put("currentsite",
|
||||
(actionContext) -> Filters.currentSite);
|
||||
|
||||
parameterFilters.put("culture", (parameter, environment) -> {
|
||||
final Culture culture = Culture.valueOf(parameter.toUpperCase());
|
||||
|
||||
@@ -86,7 +86,7 @@ public class ChooseAndPlayCardFromDeckEffect implements Effect {
|
||||
if (_playCardAction == null)
|
||||
return false;
|
||||
if (_playCardAction instanceof PlayPermanentAction)
|
||||
return ((PlayPermanentAction) _playCardAction).wasCarriedOut();
|
||||
return _playCardAction.wasCarriedOut();
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -313,7 +313,7 @@ public class PlayConditions {
|
||||
public static boolean canPlayFromDeck(String playerId, LotroGame game, Filterable... filters) {
|
||||
if (game.getModifiersQuerying().hasFlagActive(game, ModifierFlag.CANT_PLAY_FROM_DISCARD_OR_DECK))
|
||||
return false;
|
||||
return Filters.filter(game.getGameState().getDeck(playerId), game, Filters.and(filters, Filters.playable(game))).size() > 0;
|
||||
return true;
|
||||
}
|
||||
|
||||
public static boolean canPlayFromHand(String playerId, LotroGame game, Filterable... filters) {
|
||||
|
||||
Reference in New Issue
Block a user