From 7f689a07f4ad7d7dad71c20bd2aa4925e7797063 Mon Sep 17 00:00:00 2001 From: "marcins78@gmail.com" Date: Sat, 12 Nov 2011 01:45:05 +0000 Subject: [PATCH] "Oathbreaker" --- .../lotro/cards/set8/gondor/Card8_041.java | 64 +++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set8/gondor/Card8_041.java diff --git a/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set8/gondor/Card8_041.java b/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set8/gondor/Card8_041.java new file mode 100644 index 000000000..fce3edee1 --- /dev/null +++ b/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set8/gondor/Card8_041.java @@ -0,0 +1,64 @@ +package com.gempukku.lotro.cards.set8.gondor; + +import com.gempukku.lotro.cards.AbstractCompanion; +import com.gempukku.lotro.cards.PlayConditions; +import com.gempukku.lotro.cards.actions.PlayPermanentAction; +import com.gempukku.lotro.cards.effects.choose.ChooseAndDiscardCardsFromHandEffect; +import com.gempukku.lotro.cards.effects.choose.ChooseAndDiscardCardsFromPlayEffect; +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.AddThreatsEffect; + +import java.util.Collections; +import java.util.List; + +/** + * Set: Siege of Gondor + * Side: Free + * Culture: Gondor + * Twilight Cost: 2 + * Type: Companion • Wraith + * Strength: 6 + * Vitality: 3 + * Resistance: 6 + * Signet: Aragorn + * Game Text: Enduring. To play, add a threat. Skirmish: Discard 3 cards from hand to discard a possession borne by + * a minion skirmishing this companion. + */ +public class Card8_041 extends AbstractCompanion { + public Card8_041() { + super(2, 6, 3, Culture.GONDOR, Race.WRAITH, Signet.ARAGORN, "Oathbreaker"); + addKeyword(Keyword.ENDURING); + } + + @Override + public boolean checkPlayRequirements(String playerId, LotroGame game, PhysicalCard self, int twilightModifier, boolean ignoreRoamingPenalty) { + return super.checkPlayRequirements(playerId, game, self, twilightModifier, ignoreRoamingPenalty) + && PlayConditions.canAddThreat(game, self, 1); + } + + @Override + public PlayPermanentAction getPlayCardAction(String playerId, LotroGame game, PhysicalCard self, int twilightModifier, boolean ignoreRoamingPenalty) { + PlayPermanentAction action = super.getPlayCardAction(playerId, game, self, twilightModifier, ignoreRoamingPenalty); + action.appendCost( + new AddThreatsEffect(playerId, self, 1)); + return action; + } + + @Override + protected List getExtraInPlayPhaseActions(String playerId, LotroGame game, PhysicalCard self) { + if (PlayConditions.canUseFPCardDuringPhase(game, Phase.SKIRMISH, self) + && PlayConditions.canDiscardFromHand(game, playerId, 3, Filters.any)) { + ActivateCardAction action = new ActivateCardAction(self); + action.appendCost( + new ChooseAndDiscardCardsFromHandEffect(action, playerId, false, 3)); + action.appendEffect( + new ChooseAndDiscardCardsFromPlayEffect(action, playerId, 1, 1, CardType.POSSESSION, Filters.attachedTo(CardType.MINION, Filters.inSkirmishAgainst(self)))); + return Collections.singletonList(action); + } + return null; + } +}