From aaae161a0bb118cd9eb1ee342baa4c722a443375 Mon Sep 17 00:00:00 2001 From: "marcins78@gmail.com" Date: Sun, 20 Nov 2011 03:02:46 +0000 Subject: [PATCH] "Ring of Ire" --- .../lotro/cards/set9/wraith/Card9_043.java | 80 +++++++++++++++++++ 1 file changed, 80 insertions(+) create mode 100644 gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set9/wraith/Card9_043.java diff --git a/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set9/wraith/Card9_043.java b/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set9/wraith/Card9_043.java new file mode 100644 index 000000000..79d733976 --- /dev/null +++ b/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set9/wraith/Card9_043.java @@ -0,0 +1,80 @@ +package com.gempukku.lotro.cards.set9.wraith; + +import com.gempukku.lotro.cards.AbstractAttachable; +import com.gempukku.lotro.cards.PlayConditions; +import com.gempukku.lotro.cards.effects.AddUntilEndOfPhaseModifierEffect; +import com.gempukku.lotro.cards.effects.ReturnCardsToHandEffect; +import com.gempukku.lotro.cards.effects.choose.ChooseAndExertCharactersEffect; +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.effects.ChooseActiveCardEffect; +import com.gempukku.lotro.logic.modifiers.KeywordModifier; +import com.gempukku.lotro.logic.modifiers.Modifier; +import com.gempukku.lotro.logic.modifiers.StrengthModifier; +import com.gempukku.lotro.logic.timing.Action; +import com.gempukku.lotro.logic.timing.EffectResult; + +import java.util.Collections; +import java.util.List; + +/** + * Set: Reflections + * Side: Shadow + * Culture: Wraith + * Twilight Cost: 0 + * Type: Artifact • Ring + * Strength: +1 + * Game Text: Bearer must be The Witch-king. Skirmish: Exert bearer twice to make a [WRAITH] minion damage +1. + * Response: If a player reconciles, return bearer to his owner's hand. + */ +public class Card9_043 extends AbstractAttachable { + public Card9_043() { + super(Side.SHADOW, CardType.ARTIFACT, 0, Culture.WRAITH, PossessionClass.RING, "Ring of Ire", true); + } + + @Override + protected Filterable getValidTargetFilter(String playerId, LotroGame game, PhysicalCard self) { + return Filters.witchKing; + } + + @Override + public List getAlwaysOnModifiers(LotroGame game, PhysicalCard self) { + return Collections.singletonList( + new StrengthModifier(self, Filters.hasAttached(self), 1)); + } + + @Override + protected List getExtraPhaseActions(String playerId, LotroGame game, final PhysicalCard self) { + if (PlayConditions.canUseShadowCardDuringPhase(game, Phase.SKIRMISH, self, 0) + && PlayConditions.canExert(self, game, 2, self.getAttachedTo())) { + final ActivateCardAction action = new ActivateCardAction(self); + action.appendCost( + new ChooseAndExertCharactersEffect(action, playerId, 1, 1, 2, Filters.hasAttached(self))); + action.appendEffect( + new ChooseActiveCardEffect(self, playerId, "Choose a WRAITH minion", Culture.WRAITH, CardType.MINION) { + @Override + protected void cardSelected(LotroGame game, PhysicalCard card) { + action.appendEffect( + new AddUntilEndOfPhaseModifierEffect( + new KeywordModifier(self, card, Keyword.DAMAGE, 1), Phase.SKIRMISH)); + } + }); + return Collections.singletonList(action); + } + return null; + } + + @Override + public List getOptionalInPlayAfterActions(String playerId, LotroGame game, EffectResult effectResult, PhysicalCard self) { + if (effectResult.getType() == EffectResult.Type.RECONCILE) { + ActivateCardAction action = new ActivateCardAction(self); + action.appendEffect( + new ReturnCardsToHandEffect(self, self.getAttachedTo())); + return Collections.singletonList(action); + } + return null; + } +}