From fd06a0e3e46c006d7d5c398f055bd8badb381329 Mon Sep 17 00:00:00 2001 From: marcins78 Date: Wed, 30 Jan 2013 14:40:22 +0000 Subject: [PATCH] "The Hour Grows Late" --- .../cards/set20/isengard/Card20_248.java | 47 +++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set20/isengard/Card20_248.java diff --git a/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set20/isengard/Card20_248.java b/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set20/isengard/Card20_248.java new file mode 100644 index 000000000..1f43fcaca --- /dev/null +++ b/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set20/isengard/Card20_248.java @@ -0,0 +1,47 @@ +package com.gempukku.lotro.cards.set20.isengard; + +import com.gempukku.lotro.cards.AbstractEvent; +import com.gempukku.lotro.cards.PlayConditions; +import com.gempukku.lotro.cards.actions.PlayEventAction; +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.effects.AddThreatsEffect; +import com.gempukku.lotro.logic.effects.ChooseActiveCardEffect; + +/** + * 2 + * The Hour Grows Late + * Isengard Event • Maneuver + * Spell. + * Spot Saruman and an exhausted companion to add a threat for each wound on that companion. + */ +public class Card20_248 extends AbstractEvent { + public Card20_248() { + super(Side.SHADOW, 2, Culture.ISENGARD, "The Hour Grows Late", Phase.MANEUVER); + addKeyword(Keyword.SPELL); + } + + @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.canSpot(game, Filters.saruman) + && PlayConditions.canSpot(game, CardType.COMPANION, Filters.exhausted); + } + + @Override + public PlayEventAction getPlayCardAction(final String playerId, LotroGame game, final PhysicalCard self, int twilightModifier, boolean ignoreRoamingPenalty) { + final PlayEventAction action= new PlayEventAction(self); + action.appendCost( + new ChooseActiveCardEffect(self, playerId, "Choose an exhausted companion", CardType.COMPANION, Filters.exhausted) { + @Override + protected void cardSelected(LotroGame game, PhysicalCard card) { + int wounds = game.getGameState().getWounds(card); + action.appendEffect( + new AddThreatsEffect(playerId, self, wounds)); + } + }); + return action; + } +}