diff --git a/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set1/shire/Card1_305.java b/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set1/shire/Card1_305.java new file mode 100644 index 000000000..e4f44ed9c --- /dev/null +++ b/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set1/shire/Card1_305.java @@ -0,0 +1,56 @@ +package com.gempukku.lotro.cards.set1.shire; + +import com.gempukku.lotro.cards.AbstractLotroCardBlueprint; +import com.gempukku.lotro.cards.PlayConditions; +import com.gempukku.lotro.cards.actions.PlayPermanentAction; +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.CostToEffectAction; +import com.gempukku.lotro.logic.effects.DrawCardEffect; +import com.gempukku.lotro.logic.timing.Action; +import com.gempukku.lotro.logic.timing.EffectResult; + +import java.util.Collections; +import java.util.List; + +/** + * Set: The Fellowship of the Ring + * Side: Free + * Culture: Shire + * Twilight Cost: 1 + * Type: Possession + * Game Text: Pipeweed. Plays to your support area. When you play this possession, you may draw a card. + */ +public class Card1_305 extends AbstractLotroCardBlueprint { + public Card1_305() { + super(Side.FREE_PEOPLE, CardType.POSSESSION, Culture.SHIRE, "Old Tobby"); + addKeyword(Keyword.PIPEWEED); + } + + @Override + public int getTwilightCost() { + return 1; + } + + @Override + public List getPhaseActions(String playerId, LotroGame game, PhysicalCard self) { + if (PlayConditions.canPlayFPCardDuringPhase(game, Phase.FELLOWSHIP, self)) { + PlayPermanentAction action = new PlayPermanentAction(self, Zone.FREE_SUPPORT); + return Collections.singletonList(action); + } + return null; + } + + @Override + public List getOptionalAfterTriggers(String playerId, LotroGame game, EffectResult effectResult, PhysicalCard self) { + if (PlayConditions.played(game.getGameState(), game.getModifiersQuerying(), effectResult, Filters.sameCard(self))) { + CostToEffectAction action = new CostToEffectAction(self, null, "Draw a card"); + action.addEffect( + new DrawCardEffect(playerId)); + return Collections.singletonList(action); + } + return null; + } +}