"Teeth of Mordor"

This commit is contained in:
marcins78@gmail.com
2011-10-19 15:02:55 +00:00
parent 8bd045d6fc
commit ff0ce1d86f

View File

@@ -0,0 +1,69 @@
package com.gempukku.lotro.cards.set5.sauron;
import com.gempukku.lotro.cards.AbstractPermanent;
import com.gempukku.lotro.cards.PlayConditions;
import com.gempukku.lotro.cards.effects.RemoveTwilightEffect;
import com.gempukku.lotro.cards.effects.StackCardFromPlayEffect;
import com.gempukku.lotro.cards.effects.choose.ChooseArbitraryCardsEffect;
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.ChooseActiveCardEffect;
import com.gempukku.lotro.logic.timing.Action;
import java.util.Collection;
import java.util.Collections;
import java.util.List;
/**
* Set: Battle of Helm's Deep
* Side: Shadow
* Culture: Sauron
* Twilight Cost: 1
* Type: Condition
* Game Text: Plays to your support area. Regroup: Spot a [SAURON] Orc and remove (3) to stack that minion here.
* Shadow: Play a [SAURON] Orc stacked here as if played from hand.
*/
public class Card5_110 extends AbstractPermanent {
public Card5_110() {
super(Side.SHADOW, 1, CardType.CONDITION, Culture.SAURON, Zone.SUPPORT, "Teeth of Mordor");
}
@Override
public List<? extends Action> getExtraPhaseActions(final String playerId, final LotroGame game, final PhysicalCard self) {
List<PhysicalCard> stackedCards = game.getGameState().getStackedCards(self);
if (PlayConditions.canUseShadowCardDuringPhase(game.getGameState(), Phase.SHADOW, self, 0)
&& Filters.filter(stackedCards, game.getGameState(), game.getModifiersQuerying(), Filters.playable(game)).size() > 0) {
ActivateCardAction action = new ActivateCardAction(self);
action.appendEffect(
new ChooseArbitraryCardsEffect(playerId, "Choose an Orc to play", stackedCards, Filters.playable(game), 1, 1) {
@Override
protected void cardsSelected(LotroGame game, Collection<PhysicalCard> stackedOrcs) {
if (stackedOrcs.size() > 0) {
PhysicalCard stackedOrc = stackedOrcs.iterator().next();
game.getActionsEnvironment().addActionToStack(stackedOrc.getBlueprint().getPlayCardAction(playerId, game, stackedOrc, 0));
}
}
});
return Collections.singletonList(action);
}
if (PlayConditions.canUseShadowCardDuringPhase(game.getGameState(), Phase.REGROUP, self, 3)
&& PlayConditions.canSpot(game, Culture.SAURON, Race.ORC)) {
final ActivateCardAction action = new ActivateCardAction(self);
action.appendCost(
new RemoveTwilightEffect(3));
action.appendEffect(
new ChooseActiveCardEffect(self, playerId, "Choose SAURON Orc", Culture.SAURON, Race.ORC) {
@Override
protected void cardSelected(LotroGame game, PhysicalCard card) {
action.appendEffect(new StackCardFromPlayEffect(card, self));
}
});
return Collections.singletonList(action);
}
return null;
}
}