diff --git a/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set13/elven/Card13_027.java b/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set13/elven/Card13_027.java new file mode 100644 index 000000000..860fadfbe --- /dev/null +++ b/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set13/elven/Card13_027.java @@ -0,0 +1,59 @@ +package com.gempukku.lotro.cards.set13.elven; + +import com.gempukku.lotro.cards.AbstractPermanent; +import com.gempukku.lotro.cards.PlayConditions; +import com.gempukku.lotro.cards.TriggerConditions; +import com.gempukku.lotro.cards.effects.SelfDiscardEffect; +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.OptionalTriggerAction; +import com.gempukku.lotro.logic.actions.RequiredTriggerAction; +import com.gempukku.lotro.logic.effects.DrawCardsEffect; +import com.gempukku.lotro.logic.timing.EffectResult; + +import java.util.Collections; +import java.util.List; + +/** + * Set: Bloodlines + * Side: Free + * Culture: Elven + * Twilight Cost: 2 + * Type: Condition • Support Area + * Game Text: At the end of your turn, discard this from play if the fellowship did not move more than once this turn. + * Each time the fellowship moves during the regroup phase, you may draw a card for each of the following you can spot: + * Arwen, Celeborn, or Galadriel. + */ +public class Card13_027 extends AbstractPermanent { + public Card13_027() { + super(Side.FREE_PEOPLE, 2, CardType.CONDITION, Culture.ELVEN, Zone.SUPPORT, "Wells of Deep Memory", true); + } + + @Override + public List getRequiredAfterTriggers(LotroGame game, EffectResult effectResult, PhysicalCard self) { + if (TriggerConditions.endOfTurn(game, effectResult) + && game.getGameState().getMoveCount() < 2) { + RequiredTriggerAction action = new RequiredTriggerAction(self); + action.appendEffect( + new SelfDiscardEffect(self)); + return Collections.singletonList(action); + } + return null; + } + + @Override + public List getOptionalAfterTriggers(String playerId, LotroGame game, EffectResult effectResult, PhysicalCard self) { + if (TriggerConditions.moves(game, effectResult) + && PlayConditions.isPhase(game, Phase.REGROUP) + && PlayConditions.canSpot(game, Filters.or(Filters.arwen, Filters.name("Celeborn"), Filters.galadriel))) { + int count = Filters.countSpottable(game.getGameState(), game.getModifiersQuerying(), Filters.or(Filters.arwen, Filters.name("Celeborn"), Filters.galadriel)); + OptionalTriggerAction action = new OptionalTriggerAction(self); + action.appendEffect( + new DrawCardsEffect(playerId, count)); + return Collections.singletonList(action); + } + return null; + } +}