From 91932938b752ba2a82fc5fd8666bd9190167b6ac Mon Sep 17 00:00:00 2001 From: "marcins78@gmail.com" Date: Tue, 18 Oct 2011 23:17:26 +0000 Subject: [PATCH] "No Rest for the Weary" --- .../lotro/cards/set5/rohan/Card5_086.java | 47 +++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set5/rohan/Card5_086.java diff --git a/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set5/rohan/Card5_086.java b/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set5/rohan/Card5_086.java new file mode 100644 index 000000000..49a1639fe --- /dev/null +++ b/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set5/rohan/Card5_086.java @@ -0,0 +1,47 @@ +package com.gempukku.lotro.cards.set5.rohan; + +import com.gempukku.lotro.cards.AbstractEvent; +import com.gempukku.lotro.cards.PlayConditions; +import com.gempukku.lotro.cards.actions.PlayEventAction; +import com.gempukku.lotro.cards.effects.AddUntilStartOfPhaseModifierEffect; +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.ChooseActiveCardEffect; +import com.gempukku.lotro.logic.modifiers.KeywordModifier; + +/** + * Set: Battle of Helm's Deep + * Side: Free + * Culture: Rohan + * Twilight Cost: 1 + * Type: Event + * Game Text: Maneuver: Spot 3 valiant Men to make one of those Men defender +1 until the regroup phase. + */ +public class Card5_086 extends AbstractEvent { + public Card5_086() { + super(Side.FREE_PEOPLE, 1, Culture.ROHAN, "No Rest for the Weary", Phase.MANEUVER); + } + + @Override + public boolean checkPlayRequirements(String playerId, LotroGame game, PhysicalCard self, int twilightModifier) { + return super.checkPlayRequirements(playerId, game, self, twilightModifier) + && PlayConditions.canSpot(game, 3, Race.MAN, Keyword.VALIANT); + } + + @Override + public PlayEventAction getPlayCardAction(String playerId, LotroGame game, final PhysicalCard self, int twilightModifier) { + final PlayEventAction action = new PlayEventAction(self); + action.appendEffect( + new ChooseActiveCardEffect(self, playerId, "Choose Valiant Man", Race.MAN, Keyword.VALIANT) { + @Override + protected void cardSelected(LotroGame game, PhysicalCard card) { + action.insertEffect( + new AddUntilStartOfPhaseModifierEffect( + new KeywordModifier(self, Filters.sameCard(card), Keyword.DEFENDER, 1), Phase.REGROUP)); + } + }); + return action; + } +}