From 632becfdcbdb62bc34567a9ef5e9bf03d7ee1be0 Mon Sep 17 00:00:00 2001 From: "marcins78@gmail.com" Date: Fri, 10 Feb 2012 12:22:18 +0000 Subject: [PATCH] "Faramir" --- .../lotro/cards/set17/gondor/Card17_028.java | 83 +++++++++++++++++++ 1 file changed, 83 insertions(+) create mode 100644 gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set17/gondor/Card17_028.java diff --git a/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set17/gondor/Card17_028.java b/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set17/gondor/Card17_028.java new file mode 100644 index 000000000..34f0b57eb --- /dev/null +++ b/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set17/gondor/Card17_028.java @@ -0,0 +1,83 @@ +package com.gempukku.lotro.cards.set17.gondor; + +import com.gempukku.lotro.cards.AbstractCompanion; +import com.gempukku.lotro.cards.PlayConditions; +import com.gempukku.lotro.cards.TriggerConditions; +import com.gempukku.lotro.cards.effects.AddBurdenEffect; +import com.gempukku.lotro.cards.effects.AddUntilEndOfTurnModifierEffect; +import com.gempukku.lotro.cards.effects.ChoiceEffect; +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.actions.RequiredTriggerAction; +import com.gempukku.lotro.logic.effects.AddThreatsEffect; +import com.gempukku.lotro.logic.effects.ChooseActiveCardEffect; +import com.gempukku.lotro.logic.effects.WoundCharactersEffect; +import com.gempukku.lotro.logic.modifiers.KeywordModifier; +import com.gempukku.lotro.logic.timing.Effect; +import com.gempukku.lotro.logic.timing.EffectResult; + +import java.util.Collections; +import java.util.LinkedList; +import java.util.List; + +/** + * Set: Rise of Saruman + * Side: Free + * Culture: Gondor + * Twilight Cost: 3 + * Type: Companion • Man + * Strength: 7 + * Vitality: 3 + * Resistance: 6 + * Game Text: While Faramir is the Ring-bearer, at the start of each skirmish involving him, add 2 burdens or 2 threats. + * Skirmish: While Faramir is the Ring-bearer, you may wound Faramir to make a minion skirmishing a [GONDOR] Man roaming + * until the end of turn. + */ +public class Card17_028 extends AbstractCompanion { + public Card17_028() { + super(3, 7, 3, 6, Culture.GONDOR, Race.MAN, null, "Faramir", true); + addKeyword(Keyword.CAN_START_WITH_RING); + } + + @Override + public List getRequiredAfterTriggers(LotroGame game, EffectResult effectResult, PhysicalCard self) { + if (TriggerConditions.startOfPhase(game, effectResult, Phase.SKIRMISH) + && PlayConditions.canSpot(game, self, Filters.ringBearer, Filters.inSkirmish)) { + RequiredTriggerAction action = new RequiredTriggerAction(self); + List possibleEffects = new LinkedList(); + possibleEffects.add( + new AddBurdenEffect(self, 2)); + possibleEffects.add( + new AddThreatsEffect(self.getOwner(), self, 2)); + action.appendEffect( + new ChoiceEffect(action, self.getOwner(), possibleEffects)); + return Collections.singletonList(action); + } + return null; + } + + @Override + protected List getExtraInPlayPhaseActions(String playerId, LotroGame game, final PhysicalCard self) { + if (PlayConditions.canUseFPCardDuringPhase(game, Phase.SKIRMISH, self) + && PlayConditions.canSpot(game, self, Filters.ringBearer) + && PlayConditions.canWound(self, game, 1, 1, self)) { + final ActivateCardAction action = new ActivateCardAction(self); + action.appendCost( + new WoundCharactersEffect(self, self)); + action.appendEffect( + new ChooseActiveCardEffect(self, playerId, "Choose a minion", CardType.MINION, Filters.inSkirmishAgainst(Culture.GOLLUM, Race.MAN)) { + @Override + protected void cardSelected(LotroGame game, PhysicalCard card) { + action.appendEffect( + new AddUntilEndOfTurnModifierEffect( + new KeywordModifier(self, card, Keyword.ROAMING))); + } + }); + return Collections.singletonList(action); + } + return null; + } +}