diff --git a/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set1/shire/Card1_284.java b/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set1/shire/Card1_284.java new file mode 100644 index 000000000..a285c2e0d --- /dev/null +++ b/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set1/shire/Card1_284.java @@ -0,0 +1,62 @@ +package com.gempukku.lotro.cards.set1.shire; + +import com.gempukku.lotro.cards.AbstractAlly; +import com.gempukku.lotro.cards.PlayConditions; +import com.gempukku.lotro.cards.effects.ExertCharacterEffect; +import com.gempukku.lotro.cards.effects.PutCardFromDiscardOnBottomOfDeckEffect; +import com.gempukku.lotro.cards.effects.ShuffleDeckEffect; +import com.gempukku.lotro.common.Culture; +import com.gempukku.lotro.common.Keyword; +import com.gempukku.lotro.common.Phase; +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.ChooseArbitraryCardsEffect; +import com.gempukku.lotro.logic.timing.Action; + +import java.util.LinkedList; +import java.util.List; + +/** + * Set: The Fellowship of the Ring + * Side: Free + * Culture: Shire + * Twilight Cost: 2 + * Type: Ally • Home 3 • Hobbit + * Strength: 2 + * Vitality: 3 + * Site: 3 + * Game Text: Fellowship: Exert Bilbo to shuffle a [SHIRE] card from your discard pile into your draw deck. + */ +public class Card1_284 extends AbstractAlly { + public Card1_284() { + super(2, 3, 2, 3, Culture.SHIRE, "Bilbo", true); + addKeyword(Keyword.HOBBIT); + } + + @Override + public List getPlayablePhaseActions(final String playerId, LotroGame game, PhysicalCard self) { + List actions = new LinkedList(); + appendPlayAllyActions(actions, game, self); + appendHealAllyActions(actions, game, self); + + if (PlayConditions.canUseFPCardDuringPhase(game.getGameState(), Phase.FELLOWSHIP, self) + && PlayConditions.canExert(game.getGameState(), game.getModifiersQuerying(), self)) { + final CostToEffectAction action = new CostToEffectAction(self, Keyword.FELLOWSHIP, "Exert Bilbo to shuffle a SHIRE card from your discard pile into your draw deck."); + action.addCost(new ExertCharacterEffect(self)); + action.addEffect( + new ChooseArbitraryCardsEffect(playerId, "Choose SHIRE card", game.getGameState().getDiscard(playerId), Filters.culture(Culture.SHIRE), 1, 1) { + @Override + protected void cardsSelected(List selectedCards) { + PhysicalCard card = selectedCards.get(0); + action.addEffect(new PutCardFromDiscardOnBottomOfDeckEffect(card)); + action.addEffect(new ShuffleDeckEffect(playerId)); + } + } + ); + actions.add(action); + } + return null; + } +} diff --git a/gemp-lotr/gemp-lotr-logic/src/main/java/com/gempukku/lotro/logic/effects/ChooseArbitraryCardsEffect.java b/gemp-lotr/gemp-lotr-logic/src/main/java/com/gempukku/lotro/logic/effects/ChooseArbitraryCardsEffect.java index 1c0868b61..bef1e0b3c 100644 --- a/gemp-lotr/gemp-lotr-logic/src/main/java/com/gempukku/lotro/logic/effects/ChooseArbitraryCardsEffect.java +++ b/gemp-lotr/gemp-lotr-logic/src/main/java/com/gempukku/lotro/logic/effects/ChooseArbitraryCardsEffect.java @@ -13,16 +13,16 @@ import java.util.List; public abstract class ChooseArbitraryCardsEffect extends UnrespondableEffect { private String _playerId; private String _choiceText; - private List _cards; + private List _cards; private Filter _filter; private int _minimum; private int _maximum; - public ChooseArbitraryCardsEffect(String playerId, String choiceText, List cards, int minimum, int maximum) { + public ChooseArbitraryCardsEffect(String playerId, String choiceText, List cards, int minimum, int maximum) { this(playerId, choiceText, cards, Filters.any(), minimum, maximum); } - public ChooseArbitraryCardsEffect(String playerId, String choiceText, List cards, Filter filter, int minimum, int maximum) { + public ChooseArbitraryCardsEffect(String playerId, String choiceText, List cards, Filter filter, int minimum, int maximum) { _playerId = playerId; _choiceText = choiceText; _cards = cards;