"Orthanc Balcony"
This commit is contained in:
@@ -147,6 +147,10 @@ public class PlayConditions {
|
|||||||
return Filters.filter(game.getGameState().getDiscard(playerId), game.getGameState(), game.getModifiersQuerying(), Filters.and(filters, Filters.playable(game))).size() > 0;
|
return Filters.filter(game.getGameState().getDiscard(playerId), game.getGameState(), game.getModifiersQuerying(), Filters.and(filters, Filters.playable(game))).size() > 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static boolean canPlayFromDiscard(String playerId, LotroGame game, int modifier, Filterable... filters) {
|
||||||
|
return Filters.filter(game.getGameState().getDiscard(playerId), game.getGameState(), game.getModifiersQuerying(), Filters.and(filters, Filters.playable(game, modifier))).size() > 0;
|
||||||
|
}
|
||||||
|
|
||||||
public static boolean canBeDiscarded(final PhysicalCard source, LotroGame game, final PhysicalCard card) {
|
public static boolean canBeDiscarded(final PhysicalCard source, LotroGame game, final PhysicalCard card) {
|
||||||
return game.getModifiersQuerying().canBeDiscardedFromPlay(game.getGameState(), card, source);
|
return game.getModifiersQuerying().canBeDiscardedFromPlay(game.getGameState(), card, source);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,42 @@
|
|||||||
|
package com.gempukku.lotro.cards.set4.site;
|
||||||
|
|
||||||
|
import com.gempukku.lotro.cards.AbstractSite;
|
||||||
|
import com.gempukku.lotro.cards.PlayConditions;
|
||||||
|
import com.gempukku.lotro.cards.effects.choose.ChooseAndPlayCardFromDiscardEffect;
|
||||||
|
import com.gempukku.lotro.common.Block;
|
||||||
|
import com.gempukku.lotro.common.Keyword;
|
||||||
|
import com.gempukku.lotro.common.Phase;
|
||||||
|
import com.gempukku.lotro.filters.Filters;
|
||||||
|
import com.gempukku.lotro.game.PhysicalCard;
|
||||||
|
import com.gempukku.lotro.game.state.LotroGame;
|
||||||
|
import com.gempukku.lotro.logic.actions.ActivateCardAction;
|
||||||
|
import com.gempukku.lotro.logic.timing.Action;
|
||||||
|
|
||||||
|
import java.util.Collections;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set: The Two Towers
|
||||||
|
* Twilight Cost: 8
|
||||||
|
* Type: Site
|
||||||
|
* Site: 9T
|
||||||
|
* Game Text: Battleground. Shadow: Play Saruman from your discard pile; his twilight cost is -2.
|
||||||
|
*/
|
||||||
|
public class Card4_361 extends AbstractSite {
|
||||||
|
public Card4_361() {
|
||||||
|
super("Orthanc Balcony", Block.TWO_TOWERS, 9, 8, Direction.LEFT);
|
||||||
|
addKeyword(Keyword.BATTLEGROUND);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<? extends Action> getPhaseActions(String playerId, LotroGame game, PhysicalCard self) {
|
||||||
|
if (PlayConditions.canUseSiteDuringPhase(game.getGameState(), Phase.SHADOW, self)
|
||||||
|
&& PlayConditions.canPlayFromDiscard(playerId, game, -2, Filters.name("Saruman"))) {
|
||||||
|
ActivateCardAction action = new ActivateCardAction(self);
|
||||||
|
action.appendEffect(
|
||||||
|
new ChooseAndPlayCardFromDiscardEffect(playerId, game.getGameState().getDiscard(playerId), -2, Filters.name("Saruman")));
|
||||||
|
return Collections.singletonList(action);
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user