"Moment of Respite"

This commit is contained in:
marcins78@gmail.com
2011-10-28 13:35:33 +00:00
parent 85fb855800
commit 0394efb741

View File

@@ -0,0 +1,44 @@
package com.gempukku.lotro.cards.set7.gandalf;
import com.gempukku.lotro.cards.AbstractPermanent;
import com.gempukku.lotro.cards.PlayConditions;
import com.gempukku.lotro.cards.effects.choose.ChooseAndDiscardCardsFromHandEffect;
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.OptionalTriggerAction;
import com.gempukku.lotro.logic.effects.HealCharactersEffect;
import com.gempukku.lotro.logic.timing.EffectResult;
import java.util.Collections;
import java.util.List;
/**
* Set: The Return of the King
* Side: Free
* Culture: Gandalf
* Twilight Cost: 2
* Type: Condition • Support Area
* Game Text: At the start of the regroup phase, you may discard 2 cards from hand to heal Gandalf.
*/
public class Card7_044 extends AbstractPermanent {
public Card7_044() {
super(Side.FREE_PEOPLE, 2, CardType.CONDITION, Culture.GANDALF, Zone.SUPPORT, "Moment of Respite", true);
}
@Override
public List<OptionalTriggerAction> getOptionalAfterTriggers(String playerId, LotroGame game, EffectResult effectResult, PhysicalCard self) {
if (effectResult.getType() == EffectResult.Type.START_OF_PHASE
&& game.getGameState().getCurrentPhase() == Phase.REGROUP
&& PlayConditions.canDiscardFromHand(game, playerId, 2, Filters.any)) {
OptionalTriggerAction action = new OptionalTriggerAction(self);
action.appendCost(
new ChooseAndDiscardCardsFromHandEffect(action, playerId, false, 2));
action.appendEffect(
new HealCharactersEffect(self, Filters.name("Gandalf")));
return Collections.singletonList(action);
}
return null;
}
}