"Eastemnet Downs"
This commit is contained in:
@@ -257,10 +257,14 @@ public class PlayConditions {
|
||||
return false;
|
||||
}
|
||||
|
||||
public static boolean played(LotroGame game, EffectResult effectResult, Filter... filters) {
|
||||
public static boolean played(LotroGame game, EffectResult effectResult, Filterable... filters) {
|
||||
return played(game.getGameState(), game.getModifiersQuerying(), effectResult, Filters.and(filters));
|
||||
}
|
||||
|
||||
public static boolean played(LotroGame game, Effect effect, Filterable... filters) {
|
||||
return played(game.getGameState(), game.getModifiersQuerying(), effect, Filters.and(filters));
|
||||
}
|
||||
|
||||
public static boolean played(GameState gameState, ModifiersQuerying modifiersQuerying, Effect effect, Filter filter) {
|
||||
if (effect.getType() == EffectResult.Type.PLAY) {
|
||||
PhysicalCard playedCard = ((PlayCardEffect) effect).getPlayedCard();
|
||||
|
||||
@@ -0,0 +1,38 @@
|
||||
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.ChooseAndDiscardCardsFromHandEffect;
|
||||
import com.gempukku.lotro.common.Block;
|
||||
import com.gempukku.lotro.common.CardType;
|
||||
import com.gempukku.lotro.game.PhysicalCard;
|
||||
import com.gempukku.lotro.game.state.LotroGame;
|
||||
import com.gempukku.lotro.logic.actions.RequiredTriggerAction;
|
||||
import com.gempukku.lotro.logic.timing.EffectResult;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Set: The Two Towers
|
||||
* Type: Site
|
||||
* Site: 1T
|
||||
* Game Text: Each time you play a companion here, you must discard 2 cards from hand.
|
||||
*/
|
||||
public class Card4_324 extends AbstractSite {
|
||||
public Card4_324() {
|
||||
super("Eastemnet Downs", Block.TWO_TOWERS, 1, 0, Direction.LEFT);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<RequiredTriggerAction> getRequiredAfterTriggers(LotroGame game, EffectResult effectResult, PhysicalCard self) {
|
||||
if (PlayConditions.played(game, effectResult, CardType.COMPANION)
|
||||
&& game.getGameState().getCurrentSite() == self) {
|
||||
RequiredTriggerAction action = new RequiredTriggerAction(self);
|
||||
action.appendEffect(
|
||||
new ChooseAndDiscardCardsFromHandEffect(action, game.getGameState().getCurrentPlayerId(), true, 2));
|
||||
return Collections.singletonList(action);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user