This commit is contained in:
marcins78@gmail.com
2011-12-08 17:36:35 +00:00
parent 0570fa4d32
commit 6fab472a9c

View File

@@ -0,0 +1,48 @@
package com.gempukku.lotro.cards.set12.elven;
import com.gempukku.lotro.cards.AbstractPermanent;
import com.gempukku.lotro.cards.PlayConditions;
import com.gempukku.lotro.common.*;
import com.gempukku.lotro.game.PhysicalCard;
import com.gempukku.lotro.game.state.LotroGame;
import com.gempukku.lotro.logic.actions.ActivateCardAction;
import com.gempukku.lotro.logic.effects.ChooseAndDiscardCardsFromHandEffect;
import com.gempukku.lotro.logic.effects.ChooseAndHealCharactersEffect;
import com.gempukku.lotro.logic.timing.Action;
import java.util.Collections;
import java.util.List;
/**
* Set: Black Rider
* Side: Free
* Culture: Elven
* Twilight Cost: 0
* Type: Condition • Support Area
* Game Text: To play, spot an Elf. Fellowship: Discard a companion from hand to heal a companion.
*/
public class Card12_021 extends AbstractPermanent {
public Card12_021() {
super(Side.FREE_PEOPLE, 0, CardType.CONDITION, Culture.ELVEN, Zone.SUPPORT, "Refuge");
}
@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, Race.ELF);
}
@Override
protected List<? extends Action> getExtraPhaseActions(String playerId, LotroGame game, PhysicalCard self) {
if (PlayConditions.canUseFPCardDuringPhase(game, Phase.FELLOWSHIP, self)
&& PlayConditions.canDiscardFromHand(game, playerId, 1, CardType.COMPANION)) {
ActivateCardAction action = new ActivateCardAction(self);
action.appendCost(
new ChooseAndDiscardCardsFromHandEffect(action, playerId, false, 1, CardType.CONDITION));
action.appendEffect(
new ChooseAndHealCharactersEffect(action, playerId, CardType.COMPANION));
return Collections.singletonList(action);
}
return null;
}
}