From d2f3fb37efb0be1e2c51939a9ebb12f2a9ac9e9f Mon Sep 17 00:00:00 2001 From: "marcins78@gmail.com" Date: Tue, 27 Sep 2011 12:46:15 +0000 Subject: [PATCH] "Demands of the Sackville-Bagginses" --- .../lotro/cards/set2/isengard/Card2_040.java | 55 +++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set2/isengard/Card2_040.java diff --git a/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set2/isengard/Card2_040.java b/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set2/isengard/Card2_040.java new file mode 100644 index 000000000..487292e25 --- /dev/null +++ b/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set2/isengard/Card2_040.java @@ -0,0 +1,55 @@ +package com.gempukku.lotro.cards.set2.isengard; + +import com.gempukku.lotro.cards.AbstractPermanent; +import com.gempukku.lotro.cards.effects.AddTwilightEffect; +import com.gempukku.lotro.common.CardType; +import com.gempukku.lotro.common.Culture; +import com.gempukku.lotro.common.Side; +import com.gempukku.lotro.common.Zone; +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.RequiredTriggerAction; +import com.gempukku.lotro.logic.timing.EffectResult; +import com.gempukku.lotro.logic.timing.results.ExertResult; + +import java.util.Collection; +import java.util.LinkedList; +import java.util.List; + +/** + * Set: Mines of Moria + * Side: Shadow + * Culture: Isengard + * Twilight Cost: 1 + * Type: Condition + * Game Text: To play, spot an [ISENGARD] minion. Plays to your support area. Each time a [SHIRE] ally exerts, add (1). + */ +public class Card2_040 extends AbstractPermanent { + public Card2_040() { + super(Side.SHADOW, 1, CardType.CONDITION, Culture.ISENGARD, Zone.SHADOW_SUPPORT, "Demands of the Sackville-Bagginses"); + } + + @Override + public boolean checkPlayRequirements(String playerId, LotroGame game, PhysicalCard self, int twilightModifier) { + return super.checkPlayRequirements(playerId, game, self, twilightModifier) + && Filters.canSpot(game.getGameState(), game.getModifiersQuerying(), Filters.culture(Culture.ISENGARD), Filters.type(CardType.MINION)); + } + + @Override + public List getRequiredAfterTriggers(LotroGame game, EffectResult effectResult, PhysicalCard self) { + if (effectResult.getType() == EffectResult.Type.EXERT) { + ExertResult exertResult = (ExertResult) effectResult; + Collection exertedShireAllies = Filters.filter(exertResult.getExertedCards(), game.getGameState(), game.getModifiersQuerying(), Filters.culture(Culture.SHIRE), Filters.type(CardType.ALLY)); + List actions = new LinkedList(); + for (PhysicalCard exertedShireAlly : exertedShireAllies) { + RequiredTriggerAction action = new RequiredTriggerAction(self); + action.appendEffect( + new AddTwilightEffect(1)); + actions.add(action); + } + return actions; + } + return null; + } +}