From e65cf8ca6df41aa2e12d8076d421e4a37b291720 Mon Sep 17 00:00:00 2001 From: "marcins78@gmail.com" Date: Mon, 10 Oct 2011 19:50:03 +0000 Subject: [PATCH] "Uruk Besieger" --- .../lotro/cards/set4/isengard/Card4_180.java | 63 +++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set4/isengard/Card4_180.java diff --git a/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set4/isengard/Card4_180.java b/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set4/isengard/Card4_180.java new file mode 100644 index 000000000..1b893f9a8 --- /dev/null +++ b/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set4/isengard/Card4_180.java @@ -0,0 +1,63 @@ +package com.gempukku.lotro.cards.set4.isengard; + +import com.gempukku.lotro.cards.AbstractMinion; +import com.gempukku.lotro.cards.PlayConditions; +import com.gempukku.lotro.cards.effects.StackCardFromPlayEffect; +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.OptionalTriggerAction; +import com.gempukku.lotro.logic.effects.ChooseActiveCardEffect; +import com.gempukku.lotro.logic.timing.Action; + +import java.util.Collections; +import java.util.List; + +/** + * Set: The Two Towers + * Side: Shadow + * Culture: Isengard + * Twilight Cost: 2 + * Type: Minion • Uruk-Hai + * Strength: 6 + * Vitality: 2 + * Site: 5 + * Game Text: Damage +1. Regroup: Stack this minion on a site you control. Shadow: If stacked on a site you control, + * play this minion. Its twilight cost is -1. + */ +public class Card4_180 extends AbstractMinion { + public Card4_180() { + super(2, 6, 2, 5, Race.URUK_HAI, Culture.ISENGARD, "Uruk Besieger"); + addKeyword(Keyword.DAMAGE); + } + + @Override + protected List getExtraPhaseActions(String playerId, LotroGame game, final PhysicalCard self) { + if (PlayConditions.canUseShadowCardDuringPhase(game.getGameState(), Phase.REGROUP, self, 0) + && PlayConditions.controllsSite(game.getGameState(), game.getModifiersQuerying(), playerId)) { + final OptionalTriggerAction action = new OptionalTriggerAction(self); + action.appendEffect( + new ChooseActiveCardEffect(self, playerId, "Choose site you control", Filters.siteControlled(playerId)) { + @Override + protected void cardSelected(PhysicalCard card) { + action.insertEffect( + new StackCardFromPlayEffect(self, card)); + } + }); + return Collections.singletonList(action); + } + return null; + } + + @Override + public List getPhaseActionsFromStacked(String playerId, LotroGame game, PhysicalCard self) { + if (PlayConditions.canUseStackedShadowCardDuringPhase(game.getGameState(), Phase.SHADOW, self, 0) + && self.getStackedOn().getBlueprint().getCardType() == CardType.SITE + && playerId.equals(self.getStackedOn().getCardController()) + && checkPlayRequirements(playerId, game, self, -1)) { + return Collections.singletonList(getPlayCardAction(playerId, game, self, -1)); + } + return null; + } +}