diff --git a/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/effects/ReconcileHandEffect.java b/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/effects/ReconcileHandEffect.java new file mode 100644 index 000000000..7c8b8c48b --- /dev/null +++ b/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/effects/ReconcileHandEffect.java @@ -0,0 +1,35 @@ +package com.gempukku.lotro.cards.effects; + +import com.gempukku.lotro.game.state.LotroGame; +import com.gempukku.lotro.logic.timing.AbstractEffect; +import com.gempukku.lotro.logic.timing.actions.PlayerReconcilesAction; + +public class ReconcileHandEffect extends AbstractEffect { + private String _playerId; + + public ReconcileHandEffect(String playerId) { + _playerId = playerId; + } + + @Override + public String getText(LotroGame game) { + return "Reconcile hand"; + } + + @Override + public Type getType() { + return null; + } + + @Override + public boolean isPlayableInFull(LotroGame game) { + return true; + } + + @Override + protected FullEffectResult playEffectReturningResult(LotroGame game) { + PlayerReconcilesAction action = new PlayerReconcilesAction(game, _playerId); + game.getActionsEnvironment().addActionToStack(action); + return new FullEffectResult(null, true, true); + } +} diff --git a/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set7/elven/Card7_019.java b/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set7/elven/Card7_019.java new file mode 100644 index 000000000..770d190d6 --- /dev/null +++ b/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set7/elven/Card7_019.java @@ -0,0 +1,45 @@ +package com.gempukku.lotro.cards.set7.elven; + +import com.gempukku.lotro.cards.AbstractEvent; +import com.gempukku.lotro.cards.PlayConditions; +import com.gempukku.lotro.cards.actions.PlayEventAction; +import com.gempukku.lotro.cards.effects.ReconcileHandEffect; +import com.gempukku.lotro.cards.effects.choose.ChooseAndDiscardCardsFromHandEffect; +import com.gempukku.lotro.common.Culture; +import com.gempukku.lotro.common.Phase; +import com.gempukku.lotro.common.Race; +import com.gempukku.lotro.common.Side; +import com.gempukku.lotro.filters.Filters; +import com.gempukku.lotro.game.PhysicalCard; +import com.gempukku.lotro.game.state.LotroGame; + +/** + * Set: The Return of the King + * Side: Free + * Culture: Elven + * Twilight Cost: 1 + * Type: Event • Regroup + * Game Text: Spot an Elf and discard 3 cards from hand to reconcile your hand. + */ +public class Card7_019 extends AbstractEvent { + public Card7_019() { + super(Side.FREE_PEOPLE, 1, Culture.ELVEN, "Careful Study", Phase.REGROUP); + } + + @Override + public boolean checkPlayRequirements(String playerId, LotroGame game, PhysicalCard self, int twilightModifier) { + return super.checkPlayRequirements(playerId, game, self, twilightModifier) + && PlayConditions.canSpot(game, Race.ELF) + && PlayConditions.canDiscardCardsFromHandToPlay(self, game, playerId, 3, Filters.any); + } + + @Override + public PlayEventAction getPlayCardAction(String playerId, LotroGame game, PhysicalCard self, int twilightModifier) { + PlayEventAction action = new PlayEventAction(self); + action.appendCost( + new ChooseAndDiscardCardsFromHandEffect(action, playerId, false, 3)); + action.appendEffect( + new ReconcileHandEffect(playerId)); + return action; + } +}