This commit is contained in:
marcins78@gmail.com
2011-12-08 17:27:37 +00:00
parent c21d8b0d73
commit 531e619355

View File

@@ -0,0 +1,56 @@
package com.gempukku.lotro.cards.set12.elven;
import com.gempukku.lotro.cards.AbstractCompanion;
import com.gempukku.lotro.cards.PlayConditions;
import com.gempukku.lotro.cards.effects.SelfExertEffect;
import com.gempukku.lotro.cards.effects.choose.ChooseAndPutCardFromDiscardOnTopOfDeckEffect;
import com.gempukku.lotro.common.CardType;
import com.gempukku.lotro.common.Culture;
import com.gempukku.lotro.common.Phase;
import com.gempukku.lotro.common.Race;
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.ActivateCardAction;
import java.util.Collections;
import java.util.List;
/**
* Set: Black Rider
* Side: Free
* Culture: Elven
* Twilight Cost: 4
* Type: Companion • Elf
* Strength: 8
* Vitality: 4
* Resistance: 7
* Game Text: To play, spot an Elf. Skirmish: If Elrond is skirmishing a minion, exert him to place an [ELVEN] card from
* your discard pile on top of your draw deck.
*/
public class Card12_017 extends AbstractCompanion {
public Card12_017() {
super(4, 8, 4, 7, Culture.ELVEN, Race.ELF, null, "Elrond", true);
}
@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<ActivateCardAction> getExtraInPlayPhaseActions(String playerId, LotroGame game, PhysicalCard self) {
if (PlayConditions.canUseFPCardDuringPhase(game, Phase.SKIRMISH, self)
&& Filters.inSkirmishAgainst(CardType.MINION).accepts(game.getGameState(), game.getModifiersQuerying(), self)
&& PlayConditions.canSelfExert(self, game)) {
ActivateCardAction action = new ActivateCardAction(self);
action.appendCost(
new SelfExertEffect(self));
action.appendEffect(
new ChooseAndPutCardFromDiscardOnTopOfDeckEffect(action, playerId, 1, 1, Culture.ELVEN));
return Collections.singletonList(action);
}
return null;
}
}