Playing cards from dead pile, or playing ignoring dead pile uniquness.
This commit is contained in:
@@ -217,6 +217,10 @@ public class PlayConditions {
|
||||
return Filters.filter(game.getGameState().getHand(playerId), game.getGameState(), game.getModifiersQuerying(), Filters.and(filters, Filters.playable(game, twilightModifier, ignoreRoamingPenalty))).size() > 0;
|
||||
}
|
||||
|
||||
public static boolean canPlayFromHand(String playerId, LotroGame game, int twilightModifier, boolean ignoreRoamingPenalty, boolean ignoreCheckingDeadPile, Filterable... filters) {
|
||||
return Filters.filter(game.getGameState().getHand(playerId), game.getGameState(), game.getModifiersQuerying(), Filters.and(filters, Filters.playable(game, twilightModifier, ignoreRoamingPenalty, ignoreCheckingDeadPile))).size() > 0;
|
||||
}
|
||||
|
||||
public static boolean canPlayFromDeadPile(String playerId, LotroGame game, Filterable... filters) {
|
||||
return Filters.filter(game.getGameState().getDeadPile(playerId), game.getGameState(), game.getModifiersQuerying(), Filters.and(filters, Filters.playable(game, 0, false, true))).size() > 0;
|
||||
}
|
||||
|
||||
@@ -49,7 +49,7 @@ public class ChooseAndPlayCardFromDeadPileEffect implements Effect {
|
||||
}
|
||||
|
||||
private Collection<PhysicalCard> getPlayableInDeadPile(LotroGame game) {
|
||||
return Filters.filter(game.getGameState().getDiscard(_playerId), game.getGameState(), game.getModifiersQuerying(), _filter, Filters.playable(game, _twilightModifier));
|
||||
return Filters.filter(game.getGameState().getDiscard(_playerId), game.getGameState(), game.getModifiersQuerying(), _filter, Filters.playable(game, _twilightModifier, false, true));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -52,7 +52,7 @@ public class Card9_027 extends AbstractPermanent {
|
||||
return Collections.singletonList(action);
|
||||
}
|
||||
if ((PlayConditions.canUseFPCardDuringPhase(game, Phase.FELLOWSHIP, self) || PlayConditions.canUseFPCardDuringPhase(game, Phase.REGROUP, self))
|
||||
&& PlayConditions.canPlayFromHand(playerId, game, Side.FREE_PEOPLE, Race.WIZARD, Filters.playable(game, 0, false, true))) {
|
||||
&& PlayConditions.canPlayFromHand(playerId, game, 0, false, true, Side.FREE_PEOPLE, Race.WIZARD)) {
|
||||
ActivateCardAction action = new ActivateCardAction(self);
|
||||
action.appendEffect(
|
||||
new ChooseAndPlayCardFromHandEffect(playerId, game, 0, false, true, Side.FREE_PEOPLE, Race.WIZARD));
|
||||
|
||||
Reference in New Issue
Block a user