"Ancestral Knowledge"

This commit is contained in:
PhallenCassidy
2016-11-30 12:41:07 -05:00
committed by GitHub
parent 410f7b87bb
commit 4850b5be04

View File

@@ -0,0 +1,42 @@
package com.gempukku.lotro.cards.set30.dwarven;
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.ChooseAndDiscardCardsFromPlayEffect;
import com.gempukku.lotro.cards.effects.choose.ChooseAndExertCharactersEffect;
import com.gempukku.lotro.common.*;
import com.gempukku.lotro.game.PhysicalCard;
import com.gempukku.lotro.game.state.LotroGame;
/**
* Set: Main Deck
* Side: Free
* Culture: Dwarven
* Twilight Cost: 2
* Type: Event • Maneuver
* Game Text: Exert a Dwarf character to discard a condition (or 2 conditions if you
* can spot 4 Shadow conditions).
*/
public class Card30_001 extends AbstractEvent {
public Card30_001() {
super(Side.FREE_PEOPLE, 2, Culture.DWARVEN, "Ancestral Knowledge", Phase.MANEUVER);
}
@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.canExert(self, game, Race.DWARF);
}
@Override
public PlayEventAction getPlayCardAction(String playerId, LotroGame game, PhysicalCard self, int twilightModifier, boolean ignoreRoamingPenalty) {
int count = PlayConditions.canSpot(game, 4, Side.SHADOW, CardType.CONDITION) ? 2 : 1;
final PlayEventAction action = new PlayEventAction(self);
action.appendCost(
new ChooseAndExertCharactersEffect(action, playerId, 1, 1, Race.DWARF));
action.appendEffect(
new ChooseAndDiscardCardsFromPlayEffect(action, playerId, count, count, CardType.CONDITION));
return action;
}
}