From 80e1f519e724a78ebfd509fa8173f6078c270ee4 Mon Sep 17 00:00:00 2001 From: "marcins78@gmail.com" Date: Tue, 6 Dec 2011 15:02:33 +0000 Subject: [PATCH] "Sentinel Uruk" --- .../cards/set11/uruk_hai/Card11_201.java | 58 +++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set11/uruk_hai/Card11_201.java diff --git a/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set11/uruk_hai/Card11_201.java b/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set11/uruk_hai/Card11_201.java new file mode 100644 index 000000000..3841c34bc --- /dev/null +++ b/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set11/uruk_hai/Card11_201.java @@ -0,0 +1,58 @@ +package com.gempukku.lotro.cards.set11.uruk_hai; + +import com.gempukku.lotro.cards.AbstractMinion; +import com.gempukku.lotro.cards.PlayConditions; +import com.gempukku.lotro.cards.TriggerConditions; +import com.gempukku.lotro.cards.effects.ChoiceEffect; +import com.gempukku.lotro.cards.effects.SelfDiscardEffect; +import com.gempukku.lotro.cards.effects.SelfExertEffect; +import com.gempukku.lotro.cards.effects.choose.ChooseAndPreventCardEffect; +import com.gempukku.lotro.common.*; +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.AbstractPreventableCardEffect; +import com.gempukku.lotro.logic.timing.Effect; + +import java.util.Collections; +import java.util.LinkedList; +import java.util.List; + +/** + * Set: Shadows + * Side: Shadow + * Culture: Uruk-hai + * Twilight Cost: 4 + * Type: Minion • Uruk-Hai + * Strength: 8 + * Vitality: 3 + * Site: 5 + * Game Text: Damage +1. Lurker. (Skirmishes involving lurker minions must be resolved after any others.) Response: If + * an [URUK-HAI] minion is about to take a wound in a skirmish, exert or discard this minion to prevent that. + */ +public class Card11_201 extends AbstractMinion { + public Card11_201() { + super(4, 8, 3, 5, Race.URUK_HAI, Culture.URUK_HAI, "Sentinel Uruk"); + addKeyword(Keyword.DAMAGE, 1); + addKeyword(Keyword.LURKER); + } + + @Override + public List getOptionalInPlayBeforeActions(String playerId, LotroGame game, Effect effect, PhysicalCard self) { + if (TriggerConditions.isGettingWounded(effect, game, Culture.URUK_HAI, CardType.MINION) + && PlayConditions.isPhase(game, Phase.SKIRMISH)) { + ActivateCardAction action = new ActivateCardAction(self); + List possibleCosts = new LinkedList(); + possibleCosts.add( + new SelfExertEffect(self)); + possibleCosts.add( + new SelfDiscardEffect(self)); + action.appendCost( + new ChoiceEffect(action, playerId, possibleCosts)); + action.appendEffect( + new ChooseAndPreventCardEffect(self, (AbstractPreventableCardEffect) effect, playerId, "Choose an URUK_HAI minion", Culture.URUK_HAI, CardType.MINION)); + return Collections.singletonList(action); + } + return null; + } +}