From 556209e97ead413657e72bc5157a4d67daa7bdc7 Mon Sep 17 00:00:00 2001 From: "marcins78@gmail.com" Date: Tue, 13 Dec 2011 23:13:29 +0000 Subject: [PATCH] "Merciless Uruk" --- .../PutCardFromPlayOnBottomOfDeckEffect.java | 44 +++++++++++++++++ .../cards/set12/uruk_hai/Card12_142.java | 49 +++++++++++++++++++ 2 files changed, 93 insertions(+) create mode 100644 gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/effects/PutCardFromPlayOnBottomOfDeckEffect.java create mode 100644 gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set12/uruk_hai/Card12_142.java diff --git a/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/effects/PutCardFromPlayOnBottomOfDeckEffect.java b/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/effects/PutCardFromPlayOnBottomOfDeckEffect.java new file mode 100644 index 000000000..9c85d8ed8 --- /dev/null +++ b/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/effects/PutCardFromPlayOnBottomOfDeckEffect.java @@ -0,0 +1,44 @@ +package com.gempukku.lotro.cards.effects; + +import com.gempukku.lotro.game.PhysicalCard; +import com.gempukku.lotro.game.state.GameState; +import com.gempukku.lotro.game.state.LotroGame; +import com.gempukku.lotro.logic.GameUtils; +import com.gempukku.lotro.logic.timing.AbstractEffect; + +import java.util.Collections; + +public class PutCardFromPlayOnBottomOfDeckEffect extends AbstractEffect { + private PhysicalCard _physicalCard; + + public PutCardFromPlayOnBottomOfDeckEffect(PhysicalCard physicalCard) { + _physicalCard = physicalCard; + } + + @Override + public boolean isPlayableInFull(LotroGame game) { + return _physicalCard.getZone().isInPlay(); + } + + @Override + protected FullEffectResult playEffectReturningResult(LotroGame game) { + if (isPlayableInFull(game)) { + GameState gameState = game.getGameState(); + gameState.sendMessage(_physicalCard.getOwner() + " puts " + GameUtils.getCardLink(_physicalCard) + " from play on the bottom of deck"); + gameState.removeCardsFromZone(_physicalCard.getOwner(), Collections.singleton(_physicalCard)); + gameState.putCardOnBottomOfDeck(_physicalCard); + return new FullEffectResult(true, true); + } + return new FullEffectResult(false, false); + } + + @Override + public String getText(LotroGame game) { + return "Put " + GameUtils.getCardLink(_physicalCard) + " from play on bottom of deck"; + } + + @Override + public Type getType() { + return null; + } +} \ No newline at end of file diff --git a/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set12/uruk_hai/Card12_142.java b/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set12/uruk_hai/Card12_142.java new file mode 100644 index 000000000..95be7d60e --- /dev/null +++ b/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set12/uruk_hai/Card12_142.java @@ -0,0 +1,49 @@ +package com.gempukku.lotro.cards.set12.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.PutCardFromPlayOnBottomOfDeckEffect; +import com.gempukku.lotro.common.CardType; +import com.gempukku.lotro.common.Culture; +import com.gempukku.lotro.common.Keyword; +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: Black Rider + * Side: Shadow + * Culture: Uruk-hai + * Twilight Cost: 4 + * Type: Minion • Uruk-Hai + * Strength: 11 + * Vitality: 3 + * Site: 5 + * Game Text: Damage +1. Each time this minion wins a skirmish, you may spot a companion who has resistance 4 or less + * to place this minion on the bottom of your draw deck. + */ +public class Card12_142 extends AbstractMinion { + public Card12_142() { + super(4, 11, 3, 5, Race.URUK_HAI, Culture.URUK_HAI, "Merciless Uruk"); + addKeyword(Keyword.DAMAGE, 1); + } + + @Override + public List getOptionalAfterTriggers(String playerId, LotroGame game, EffectResult effectResult, PhysicalCard self) { + if (TriggerConditions.winsSkirmish(game, effectResult, self) + && PlayConditions.canSpot(game, CardType.COMPANION, Filters.maxResistance(4))) { + OptionalTriggerAction action = new OptionalTriggerAction(self); + action.appendEffect( + new PutCardFromPlayOnBottomOfDeckEffect(self)); + return Collections.singletonList(action); + } + return null; + } +}