From 77a9a1ad86b102ae68a2a9bafad52add48077fba Mon Sep 17 00:00:00 2001 From: "marcins78@gmail.com" Date: Fri, 17 Feb 2012 10:16:45 +0000 Subject: [PATCH] "Southfarthing Leaf" --- .../lotro/cards/set17/shire/Card17_110.java | 63 +++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set17/shire/Card17_110.java diff --git a/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set17/shire/Card17_110.java b/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set17/shire/Card17_110.java new file mode 100644 index 000000000..4dd5a2242 --- /dev/null +++ b/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set17/shire/Card17_110.java @@ -0,0 +1,63 @@ +package com.gempukku.lotro.cards.set17.shire; + +import com.gempukku.lotro.cards.AbstractPermanent; +import com.gempukku.lotro.cards.PlayConditions; +import com.gempukku.lotro.cards.effects.SelfDiscardEffect; +import com.gempukku.lotro.cards.effects.choose.ChooseAndAddUntilEOPStrengthBonusEffect; +import com.gempukku.lotro.cards.effects.choose.ChooseAndDiscardCardsFromPlayEffect; +import com.gempukku.lotro.cards.effects.choose.ChooseAndPlayCardFromDeckEffect; +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: Rise of Saruman + * Side: Free + * Culture: Shire + * Twilight Cost: 1 + * Type: Condition • Support Area + * Game Text: Pipeweed. To play, spot an unbound Hobbit. Skirmish: Discard a pipeweed from play to make an unbound + * Hobbit strength +2. Regroup: Discard this pipeweed from play to play a pipeweed from your draw deck. Reshuffle your + * draw deck. + */ +public class Card17_110 extends AbstractPermanent { + public Card17_110() { + super(Side.FREE_PEOPLE, 1, CardType.CONDITION, Culture.SHIRE, Zone.SUPPORT, "Southfarthing Leaf"); + addKeyword(Keyword.PIPEWEED); + } + + @Override + public boolean checkPlayRequirements(String playerId, LotroGame game, PhysicalCard self, int withTwilightRemoved, int twilightModifier, boolean ignoreRoamingPenalty, boolean ignoreCheckingDeadPile) { + return super.checkPlayRequirements(playerId, game, self, withTwilightRemoved, twilightModifier, ignoreRoamingPenalty, ignoreCheckingDeadPile) + && PlayConditions.canSpot(game, Filters.unboundCompanion, Race.HOBBIT); + } + + @Override + protected List getExtraPhaseActions(String playerId, LotroGame game, PhysicalCard self) { + if (PlayConditions.canUseFPCardDuringPhase(game, Phase.SKIRMISH, self) + && PlayConditions.canDiscardFromPlay(self, game, Keyword.PIPEWEED)) { + ActivateCardAction action = new ActivateCardAction(self); + action.appendCost( + new ChooseAndDiscardCardsFromPlayEffect(action, playerId, 1, 1, Keyword.PIPEWEED)); + action.appendEffect( + new ChooseAndAddUntilEOPStrengthBonusEffect(action, self, playerId, 2, Filters.unboundCompanion, Race.HOBBIT)); + return Collections.singletonList(action); + } + if (PlayConditions.canUseFPCardDuringPhase(game, Phase.REGROUP, self) + && PlayConditions.canSelfDiscard(self, game)) { + ActivateCardAction action = new ActivateCardAction(self); + action.appendCost( + new SelfDiscardEffect(self)); + action.appendEffect( + new ChooseAndPlayCardFromDeckEffect(playerId, Keyword.PIPEWEED)); + return Collections.singletonList(action); + } + return null; + } +}