From 6a9176ce7a82bb778543e053ff8d7e6103034888 Mon Sep 17 00:00:00 2001 From: "marcins78@gmail.com" Date: Mon, 5 Dec 2011 00:23:07 +0000 Subject: [PATCH] "Oath Sworn" --- .../lotro/cards/set11/men/Card11_091.java | 46 +++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set11/men/Card11_091.java diff --git a/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set11/men/Card11_091.java b/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set11/men/Card11_091.java new file mode 100644 index 000000000..e1df3fa2d --- /dev/null +++ b/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set11/men/Card11_091.java @@ -0,0 +1,46 @@ +package com.gempukku.lotro.cards.set11.men; + +import com.gempukku.lotro.cards.AbstractPermanent; +import com.gempukku.lotro.cards.PlayConditions; +import com.gempukku.lotro.cards.TriggerConditions; +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.AddTwilightEffect; +import com.gempukku.lotro.logic.effects.DiscardCardsFromHandEffect; +import com.gempukku.lotro.logic.timing.EffectResult; + +import java.util.Collections; +import java.util.HashSet; +import java.util.List; + +/** + * Set: Shadows + * Side: Shadow + * Culture: Men + * Twilight Cost: 4 + * Type: Condition • Support Area + * Game Text: At the start of the maneuver phase, if you have 2 or more cards in hand, you may spot 2 [MEN] minions + * and discard your hand to add (8). + */ +public class Card11_091 extends AbstractPermanent { + public Card11_091() { + super(Side.SHADOW, 4, CardType.CONDITION, Culture.MEN, Zone.SUPPORT, "Oath Sworn"); + } + + @Override + public List getOptionalAfterTriggers(String playerId, LotroGame game, EffectResult effectResult, PhysicalCard self) { + if (TriggerConditions.startOfPhase(game, effectResult, Phase.MANEUVER) + && game.getGameState().getHand(playerId).size() >= 2 + && PlayConditions.canSpot(game, 2, Culture.MEN, CardType.MINION)) { + OptionalTriggerAction action = new OptionalTriggerAction(self); + action.appendCost( + new DiscardCardsFromHandEffect(self, playerId, new HashSet(game.getGameState().getHand(playerId)), false)); + action.appendEffect( + new AddTwilightEffect(self, 8)); + return Collections.singletonList(action); + } + return null; + } +}