"Take Cover"

This commit is contained in:
marcins78@gmail.com
2011-10-17 16:18:23 +00:00
parent 72e5b5e7f1
commit c215b893bf

View File

@@ -0,0 +1,44 @@
package com.gempukku.lotro.cards.set5.gondor;
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.choose.ChooseAndExertCharactersEffect;
import com.gempukku.lotro.cards.effects.choose.ChooseAndPlayCardFromDiscardEffect;
import com.gempukku.lotro.common.Culture;
import com.gempukku.lotro.common.Keyword;
import com.gempukku.lotro.common.Phase;
import com.gempukku.lotro.common.Side;
import com.gempukku.lotro.game.PhysicalCard;
import com.gempukku.lotro.game.state.LotroGame;
/**
* Set: Battle of Helm's Deep
* Side: Free
* Culture: Gondor
* Twilight Cost: 0
* Type: Event
* Game Text: Fellowship: Exert a knight to play a [GONDOR] fortification from your discard pile.
*/
public class Card5_040 extends AbstractEvent {
public Card5_040() {
super(Side.FREE_PEOPLE, 0, Culture.GONDOR, "Take Cover", Phase.FELLOWSHIP);
}
@Override
public boolean checkPlayRequirements(String playerId, LotroGame game, PhysicalCard self, int twilightModifier) {
return super.checkPlayRequirements(playerId, game, self, twilightModifier)
&& PlayConditions.canExert(self, game, Keyword.KNIGHT)
&& PlayConditions.canPlayFromDiscard(playerId, game, Culture.GONDOR, Keyword.FORTIFICATION);
}
@Override
public PlayEventAction getPlayCardAction(String playerId, LotroGame game, PhysicalCard self, int twilightModifier) {
PlayEventAction action = new PlayEventAction(self);
action.appendCost(
new ChooseAndExertCharactersEffect(action, playerId, 1, 1, Keyword.KNIGHT));
action.appendEffect(
new ChooseAndPlayCardFromDiscardEffect(playerId, game.getGameState().getDiscard(playerId), Culture.GONDOR, Keyword.FORTIFICATION));
return action;
}
}