From 31ee50e5c9a35d0a1ea320ad68309a77be9ef800 Mon Sep 17 00:00:00 2001 From: "marcins78@gmail.com" Date: Fri, 10 Feb 2012 12:30:15 +0000 Subject: [PATCH] "Madril" --- .../lotro/cards/set17/gondor/Card17_030.java | 67 +++++++++++++++++++ 1 file changed, 67 insertions(+) create mode 100644 gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set17/gondor/Card17_030.java diff --git a/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set17/gondor/Card17_030.java b/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set17/gondor/Card17_030.java new file mode 100644 index 000000000..79e383f89 --- /dev/null +++ b/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set17/gondor/Card17_030.java @@ -0,0 +1,67 @@ +package com.gempukku.lotro.cards.set17.gondor; + +import com.gempukku.lotro.cards.AbstractCompanion; +import com.gempukku.lotro.cards.PlayConditions; +import com.gempukku.lotro.cards.effects.AddUntilStartOfPhaseModifierEffect; +import com.gempukku.lotro.cards.effects.choose.ChooseAndExertCharactersEffect; +import com.gempukku.lotro.cards.modifiers.MinionSiteNumberModifier; +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.effects.ChooseActiveCardEffect; +import com.gempukku.lotro.logic.modifiers.CantDiscardFromPlayModifier; +import com.gempukku.lotro.logic.modifiers.Modifier; +import com.gempukku.lotro.logic.modifiers.SpotCondition; + +import java.util.Collections; +import java.util.List; + +/** + * Set: Rise of Saruman + * Side: Free + * Culture: Gondor + * Twilight Cost: 3 + * Type: Companion • Man + * Strength: 6 + * Vitality: 3 + * Resistance: 6 + * Game Text: Ranger. Hunter 1. While you can spot a roaming minion, your [GONDOR] conditions cannot be discarded from + * play by Shadow cards. Maneuver: Exert 2 rangers to make a minion site number +2 until the regroup phase. + */ +public class Card17_030 extends AbstractCompanion { + public Card17_030() { + super(3, 6, 3, 6, Culture.GONDOR, Race.MAN, null, "Madril", true); + addKeyword(Keyword.RANGER); + addKeyword(Keyword.HUNTER, 1); + } + + @Override + public Modifier getAlwaysOnModifier(PhysicalCard self) { + return new CantDiscardFromPlayModifier(self, "Cannot be discarded from play by Shadow cards", + new SpotCondition(CardType.MINION, Keyword.ROAMING), + Filters.and(Filters.owner(self.getOwner()), Culture.GONDOR, CardType.CONDITION), Side.SHADOW); + } + + @Override + protected List getExtraInPlayPhaseActions(String playerId, LotroGame game, final PhysicalCard self) { + if (PlayConditions.canUseFPCardDuringPhase(game, Phase.MANEUVER, self) + && PlayConditions.canExert(self, game, 1, 2, Keyword.RANGER)) { + final ActivateCardAction action = new ActivateCardAction(self); + action.appendCost( + new ChooseAndExertCharactersEffect(action, playerId, 2, 2, Keyword.RANGER)); + action.appendEffect( + new ChooseActiveCardEffect(self, playerId, "Choose a minion", CardType.MINION) { + @Override + protected void cardSelected(LotroGame game, PhysicalCard card) { + action.appendEffect( + new AddUntilStartOfPhaseModifierEffect( + new MinionSiteNumberModifier(self, card, null, 2), Phase.REGROUP)); + } + }); + return Collections.singletonList(action); + } + return null; + } +}