diff --git a/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set3/elven/Card3_013.java b/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set3/elven/Card3_013.java new file mode 100644 index 000000000..a6af0dbdc --- /dev/null +++ b/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set3/elven/Card3_013.java @@ -0,0 +1,72 @@ +package com.gempukku.lotro.cards.set3.elven; + +import com.gempukku.lotro.cards.AbstractAlly; +import com.gempukku.lotro.cards.PlayConditions; +import com.gempukku.lotro.cards.costs.ExertCharactersCost; +import com.gempukku.lotro.cards.effects.ChooseAndHealCharacterEffect; +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.ActivateCardAction; +import com.gempukku.lotro.logic.actions.OptionalTriggerAction; +import com.gempukku.lotro.logic.effects.ChooseActiveCardEffect; +import com.gempukku.lotro.logic.effects.HealCharacterEffect; +import com.gempukku.lotro.logic.timing.Action; +import com.gempukku.lotro.logic.timing.EffectResult; + +import java.util.Collections; +import java.util.List; + +/** + * Set: Realms of Elf-lords + * Side: Free + * Culture: Elven + * Twilight Cost: 4 + * Type: Ally • Home 3 • Elf + * Strength: 8 + * Vitality: 4 + * Site: 3 + * Game Text: At the start of each of your turns, you may spot an ally whose home is site 3 to heal that ally twice. + * Regroup: Exert Elrond twice to heal a companion. + */ +public class Card3_013 extends AbstractAlly { + public Card3_013() { + super(4, 3, 8, 4, Race.ELF, Culture.ELVEN, "Elrond", true); + } + + @Override + public List getOptionalAfterTriggers(final String playerId, LotroGame game, EffectResult effectResult, PhysicalCard self) { + if (effectResult.getType() == EffectResult.Type.START_OF_TURN) { + final OptionalTriggerAction action = new OptionalTriggerAction(self); + action.appendEffect( + new ChooseActiveCardEffect(playerId, "Choose an ally", Filters.type(CardType.ALLY), Filters.siteNumber(3)) { + @Override + protected void cardSelected(PhysicalCard ally) { + action.insertEffect( + new HealCharacterEffect(playerId, ally)); + action.insertEffect( + new HealCharacterEffect(playerId, ally)); + } + }); + return Collections.singletonList(action); + } + return null; + } + + @Override + protected List getExtraInPlayPhaseActions(String playerId, LotroGame game, PhysicalCard self) { + if (PlayConditions.canUseFPCardDuringPhase(game.getGameState(), Phase.REGROUP, self) + && PlayConditions.canExert(self, game.getGameState(), game.getModifiersQuerying(), 2, Filters.sameCard(self))) { + ActivateCardAction action = new ActivateCardAction(self, Keyword.REGROUP); + action.appendCost( + new ExertCharactersCost(self, self)); + action.appendCost( + new ExertCharactersCost(self, self)); + action.appendEffect( + new ChooseAndHealCharacterEffect(action, playerId, Filters.type(CardType.COMPANION))); + return Collections.singletonList(action); + } + return null; + } +}