From 4b9107659b17c3e6b77591ecf135e2a9047b9586 Mon Sep 17 00:00:00 2001 From: "marcins78@gmail.com" Date: Wed, 19 Oct 2011 21:47:06 +0000 Subject: [PATCH] "Dunlending Headman" --- .../lotro/cards/set6/dunland/Card6_004.java | 55 +++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set6/dunland/Card6_004.java diff --git a/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set6/dunland/Card6_004.java b/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set6/dunland/Card6_004.java new file mode 100644 index 000000000..30bfa6f73 --- /dev/null +++ b/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set6/dunland/Card6_004.java @@ -0,0 +1,55 @@ +package com.gempukku.lotro.cards.set6.dunland; + +import com.gempukku.lotro.cards.AbstractMinion; +import com.gempukku.lotro.cards.PlayConditions; +import com.gempukku.lotro.cards.effects.PreventableEffect; +import com.gempukku.lotro.cards.effects.TakeControlOfASiteEffect; +import com.gempukku.lotro.cards.effects.choose.ChooseAndDiscardCardsFromHandEffect; +import com.gempukku.lotro.common.Culture; +import com.gempukku.lotro.common.Race; +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.OptionalTriggerAction; +import com.gempukku.lotro.logic.timing.EffectResult; + +import java.util.Collections; +import java.util.List; + +/** + * Set: Ents of Fangorn + * Side: Shadow + * Culture: Dunland + * Twilight Cost: 4 + * Type: Minion • Man + * Strength: 10 + * Vitality: 1 + * Site: 3 + * Game Text: When you play this minion, you may spot 2 other [DUNLAND] Men to take control of a site. The Free Peoples + * player may discard 2 cards from hand to prevent this. + */ +public class Card6_004 extends AbstractMinion { + public Card6_004() { + super(4, 10, 1, 3, Race.MAN, Culture.DUNLAND, "Dunlending Headman"); + } + + @Override + public List getOptionalAfterTriggers(String playerId, LotroGame game, EffectResult effectResult, PhysicalCard self) { + if (PlayConditions.played(game, effectResult, self) + && PlayConditions.canSpot(game, 2, Culture.DUNLAND, Race.MAN, Filters.not(self))) { + OptionalTriggerAction action = new OptionalTriggerAction(self); + action.appendEffect( + new PreventableEffect(action, + new TakeControlOfASiteEffect(self, playerId), + game.getGameState().getCurrentPlayerId(), + new ChooseAndDiscardCardsFromHandEffect(action, game.getGameState().getCurrentPlayerId(), false, 2) { + @Override + public String getText(LotroGame game) { + return "Discard 2 cards from hand"; + } + })); + return Collections.singletonList(action); + } + return null; + } +}