From fdb6fcd82a2dca10b0623378a2c9f85059bc7220 Mon Sep 17 00:00:00 2001 From: marcins78 Date: Tue, 5 Feb 2013 12:04:00 +0000 Subject: [PATCH] "Ominous Landscape" --- .../lotro/cards/set20/wraith/Card20_297.java | 62 +++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set20/wraith/Card20_297.java diff --git a/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set20/wraith/Card20_297.java b/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set20/wraith/Card20_297.java new file mode 100644 index 000000000..a6c83da77 --- /dev/null +++ b/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set20/wraith/Card20_297.java @@ -0,0 +1,62 @@ +package com.gempukku.lotro.cards.set20.wraith; + +import com.gempukku.lotro.cards.AbstractPermanent; +import com.gempukku.lotro.cards.PlayConditions; +import com.gempukku.lotro.cards.TriggerConditions; +import com.gempukku.lotro.cards.actions.PlayPermanentAction; +import com.gempukku.lotro.cards.effects.SelfDiscardEffect; +import com.gempukku.lotro.cards.effects.choose.ChooseAndExertCharactersEffect; +import com.gempukku.lotro.cards.modifiers.ResistanceModifier; +import com.gempukku.lotro.common.*; +import com.gempukku.lotro.game.PhysicalCard; +import com.gempukku.lotro.game.state.LotroGame; +import com.gempukku.lotro.logic.actions.RequiredTriggerAction; +import com.gempukku.lotro.logic.modifiers.Modifier; +import com.gempukku.lotro.logic.timing.EffectResult; + +import java.util.Collections; +import java.util.List; + +/** + * 1 + * •Ominous Landscape + * Ringwraith Condition • Support Area + * To play, exert a Nazgul. + * Each companion is resistance -2. + * Discard this condition at the beginning of the regroup phase. + */ +public class Card20_297 extends AbstractPermanent { + public Card20_297() { + super(Side.SHADOW, 1, CardType.CONDITION, Culture.WRAITH, Zone.SUPPORT, "Ominous Landscape", null, true); + } + + @Override + public boolean checkPlayRequirements(String playerId, LotroGame game, PhysicalCard self, int withTwilightRemoved, int twilightModifier, boolean ignoreRoamingPenalty, boolean ignoreCheckingDeadPile) { + return super.checkPlayRequirements(playerId, game, self, withTwilightRemoved, twilightModifier, ignoreRoamingPenalty, ignoreCheckingDeadPile) + && PlayConditions.canExert(self, game, Race.NAZGUL); + } + + @Override + public PlayPermanentAction getPlayCardAction(String playerId, LotroGame game, PhysicalCard self, int twilightModifier, boolean ignoreRoamingPenalty) { + PlayPermanentAction action = super.getPlayCardAction(playerId, game, self, twilightModifier, ignoreRoamingPenalty); + action.appendCost( + new ChooseAndExertCharactersEffect(action, playerId, 1, 1, Race.NAZGUL)); + return action; + } + + @Override + public Modifier getAlwaysOnModifier(PhysicalCard self) { + return new ResistanceModifier(self, CardType.COMPANION, -2); + } + + @Override + public List getRequiredAfterTriggers(LotroGame game, EffectResult effectResult, PhysicalCard self) { + if (TriggerConditions.startOfPhase(game, effectResult, Phase.REGROUP)) { + RequiredTriggerAction action = new RequiredTriggerAction(self); + action.appendEffect( + new SelfDiscardEffect(self)); + return Collections.singletonList(action); + } + return null; + } +}