"Burning of Westfold"
This commit is contained in:
@@ -130,6 +130,10 @@ public class PlayConditions {
|
||||
});
|
||||
}
|
||||
|
||||
public static boolean canPlayFromHand(String playerId, LotroGame game, Filter... filters) {
|
||||
return Filters.filter(game.getGameState().getHand(playerId), game.getGameState(), game.getModifiersQuerying(), Filters.and(filters, Filters.playable(game))).size() > 0;
|
||||
}
|
||||
|
||||
public static boolean canExert(final PhysicalCard source, final GameState gameState, final ModifiersQuerying modifiersQuerying, Filter... filters) {
|
||||
return canExert(source, gameState, modifiersQuerying, 1, filters);
|
||||
}
|
||||
|
||||
@@ -29,7 +29,7 @@ public class Card4_137 extends AbstractPermanent {
|
||||
|
||||
@Override
|
||||
protected List<? extends Action> getExtraPhaseActions(String playerId, LotroGame game, PhysicalCard self) {
|
||||
if (PlayConditions.canUseFPCardDuringPhase(game.getGameState(), Phase.SHADOW, self)
|
||||
if (PlayConditions.canUseShadowCardDuringPhase(game.getGameState(), Phase.SHADOW, self, 0)
|
||||
&& Filters.filter(game.getGameState().getHand(playerId), game.getGameState(), game.getModifiersQuerying(), Filters.race(Race.URUK_HAI), Filters.playable(game)).size() > 0) {
|
||||
ActivateCardAction action = new ActivateCardAction(self, Keyword.FELLOWSHIP);
|
||||
action.appendCost(
|
||||
@@ -38,7 +38,7 @@ public class Card4_137 extends AbstractPermanent {
|
||||
new AddTokenEffect(self, self, Token.ISENGARD));
|
||||
return Collections.singletonList(action);
|
||||
}
|
||||
if (PlayConditions.canUseFPCardDuringPhase(game.getGameState(), Phase.REGROUP, self)
|
||||
if (PlayConditions.canUseShadowCardDuringPhase(game.getGameState(), Phase.REGROUP, self, 0)
|
||||
&& game.getGameState().getTokenCount(self, Token.ISENGARD) >= 3
|
||||
&& Filters.countActive(game.getGameState(), game.getModifiersQuerying(), Filters.race(Race.URUK_HAI)) > 0) {
|
||||
ActivateCardAction action = new ActivateCardAction(self, Keyword.REGROUP);
|
||||
|
||||
@@ -0,0 +1,45 @@
|
||||
package com.gempukku.lotro.cards.set4.isengard;
|
||||
|
||||
import com.gempukku.lotro.cards.AbstractPermanent;
|
||||
import com.gempukku.lotro.cards.PlayConditions;
|
||||
import com.gempukku.lotro.cards.effects.ChooseAndDiscardCardsFromPlayEffect;
|
||||
import com.gempukku.lotro.cards.effects.ChooseAndPlayCardFromHandEffect;
|
||||
import com.gempukku.lotro.common.*;
|
||||
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
|
||||
* Side: Shadow
|
||||
* Culture: Isengard
|
||||
* Twilight Cost: 0
|
||||
* Type: Condition
|
||||
* Game Text: Plays to your support area. Shadow: If you control a site, play an Uruk-hai to discard
|
||||
* a Free Peoples condition.
|
||||
*/
|
||||
public class Card4_144 extends AbstractPermanent {
|
||||
public Card4_144() {
|
||||
super(Side.SHADOW, 0, CardType.CONDITION, Culture.ISENGARD, Zone.SUPPORT, "Burning of Westfold");
|
||||
}
|
||||
|
||||
@Override
|
||||
protected List<? extends Action> getExtraPhaseActions(String playerId, LotroGame game, PhysicalCard self) {
|
||||
if (PlayConditions.canUseShadowCardDuringPhase(game.getGameState(), Phase.SHADOW, self, 0)
|
||||
&& Filters.countActive(game.getGameState(), game.getModifiersQuerying(), Filters.siteControlled(playerId)) > 0
|
||||
&& PlayConditions.canPlayFromHand(playerId, game, Filters.race(Race.URUK_HAI))) {
|
||||
ActivateCardAction action = new ActivateCardAction(self, Keyword.SHADOW);
|
||||
action.appendCost(
|
||||
new ChooseAndPlayCardFromHandEffect(playerId, game.getGameState().getHand(playerId), Filters.race(Race.URUK_HAI)));
|
||||
action.appendEffect(
|
||||
new ChooseAndDiscardCardsFromPlayEffect(action, playerId, 1, 1, Filters.side(Side.FREE_PEOPLE), Filters.type(CardType.CONDITION)));
|
||||
return Collections.singletonList(action);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user