From ce5dc88ee490b6431f743ed16f1047f76677e1c8 Mon Sep 17 00:00:00 2001 From: "marcins78@gmail.com" Date: Fri, 9 Sep 2011 14:04:52 +0000 Subject: [PATCH] "Drawn to Its Power" --- .../lotro/cards/set1/wraith/Card1_211.java | 59 +++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set1/wraith/Card1_211.java diff --git a/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set1/wraith/Card1_211.java b/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set1/wraith/Card1_211.java new file mode 100644 index 000000000..50f825f27 --- /dev/null +++ b/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set1/wraith/Card1_211.java @@ -0,0 +1,59 @@ +package com.gempukku.lotro.cards.set1.wraith; + +import com.gempukku.lotro.cards.AbstractLotroCardBlueprint; +import com.gempukku.lotro.cards.PlayConditions; +import com.gempukku.lotro.cards.actions.PlayPermanentAction; +import com.gempukku.lotro.cards.effects.AddBurdenEffect; +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.DefaultCostToEffectAction; +import com.gempukku.lotro.logic.timing.Action; +import com.gempukku.lotro.logic.timing.EffectResult; + +import java.util.Collections; +import java.util.List; + +/** + * Set: The Fellowship of the Ring + * Side: Shadow + * Culture: Wraith + * Twilight Cost: 2 + * Type: Condition + * Game Text: Plays to your support area. Each time a companion is killed in a skirmish involving a Nazgul, add + * a burden. + */ +public class Card1_211 extends AbstractLotroCardBlueprint { + public Card1_211() { + super(Side.SHADOW, CardType.CONDITION, Culture.WRAITH, "Drawn to Its Power"); + } + + @Override + public boolean checkPlayRequirements(String playerId, LotroGame game, PhysicalCard self, int twilightModifier) { + return PlayConditions.canPayForShadowCard(game, self, twilightModifier); + } + + @Override + public Action getPlayCardAction(String playerId, LotroGame game, PhysicalCard self, int twilightModifier) { + return new PlayPermanentAction(self, Zone.SHADOW_SUPPORT, twilightModifier); + } + + @Override + public int getTwilightCost() { + return 2; + } + + @Override + public List getRequiredAfterTriggers(LotroGame game, EffectResult effectResult, PhysicalCard self) { + if (effectResult.getType() == EffectResult.Type.KILL + && game.getGameState().getSkirmish() != null + && Filters.filter(game.getGameState().getSkirmish().getShadowCharacters(), game.getGameState(), game.getModifiersQuerying(), Filters.keyword(Keyword.NAZGUL)).size() > 0) { + DefaultCostToEffectAction action = new DefaultCostToEffectAction(self, null, "Add a burden"); + action.addEffect( + new AddBurdenEffect(game.getGameState().getCurrentPlayerId())); + return Collections.singletonList(action); + } + return null; + } +}