diff --git a/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set7/elven/Card7_028.java b/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set7/elven/Card7_028.java new file mode 100644 index 000000000..77842f797 --- /dev/null +++ b/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set7/elven/Card7_028.java @@ -0,0 +1,68 @@ +package com.gempukku.lotro.cards.set7.elven; + +import com.gempukku.lotro.cards.AbstractPermanent; +import com.gempukku.lotro.cards.PlayConditions; +import com.gempukku.lotro.cards.effects.ChoiceEffect; +import com.gempukku.lotro.cards.effects.choose.ChooseAndDiscardCardsFromHandEffect; +import com.gempukku.lotro.common.*; +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.effects.ChooseAndHealCharactersEffect; +import com.gempukku.lotro.logic.effects.DiscardCardsFromPlayEffect; +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: The Return of the King + * Side: Free + * Culture: Elven + * Twilight Cost: 2 + * Type: Condition • Support Area + * Game Text: To play, spot an Elf. At the start of your regroup phase, you may discard this condition or a card from + * hand to heal an Elf. + */ +public class Card7_028 extends AbstractPermanent { + public Card7_028() { + super(Side.FREE_PEOPLE, 2, CardType.CONDITION, Culture.ELVEN, Zone.SUPPORT, "Shadow Between", true); + } + + @Override + public boolean checkPlayRequirements(String playerId, LotroGame game, PhysicalCard self, int twilightModifier) { + return super.checkPlayRequirements(playerId, game, self, twilightModifier) + && PlayConditions.canSpot(game, Race.ELF); + } + + @Override + public List getOptionalAfterTriggers(String playerId, LotroGame game, EffectResult effectResult, PhysicalCard self) { + if (effectResult.getType() == EffectResult.Type.START_OF_PHASE + && game.getGameState().getCurrentPhase() == Phase.REGROUP) { + OptionalTriggerAction action = new OptionalTriggerAction(self); + List possibleCosts = new LinkedList(); + possibleCosts.add( + new DiscardCardsFromPlayEffect(self, self) { + @Override + public String getText(LotroGame game) { + return "Discard this condition"; + } + }); + possibleCosts.add( + new ChooseAndDiscardCardsFromHandEffect(action, playerId, false, 1) { + @Override + public String getText(LotroGame game) { + return "Discard a card from hand"; + } + }); + action.appendCost( + new ChoiceEffect(action, playerId, possibleCosts)); + action.appendEffect( + new ChooseAndHealCharactersEffect(action, playerId, Race.ELF)); + return Collections.singletonList(action); + } + return null; + } +}