"Miners of Mithril"

This commit is contained in:
marcins78@gmail.com
2013-01-06 23:36:13 +00:00
parent fdbb280b3d
commit 04d1af631d

View File

@@ -0,0 +1,47 @@
package com.gempukku.lotro.cards.set20.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.ChooseAndStackCardsFromHandEffect;
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.effects.ChooseActiveCardEffect;
import com.gempukku.lotro.logic.effects.DrawCardsEffect;
/**
* 0
* Miners of Mithril
* Dwarven Event • Fellowship
* Stack a Free Peoples card from your hand on a [Dwarven] support area condition to draw a card.
*/
public class Card20_062 extends AbstractEvent {
public Card20_062() {
super(Side.FREE_PEOPLE, 0, Culture.DWARVEN, "Miners of Mithril", Phase.FELLOWSHIP);
}
@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.hasCardInHand(game, playerId, 1, Filters.not(self), Side.FREE_PEOPLE)
&& PlayConditions.canSpot(game, Culture.DWARVEN, CardType.CONDITION, Zone.SUPPORT);
}
@Override
public PlayEventAction getPlayCardAction(final String playerId, LotroGame game, PhysicalCard self, int twilightModifier, boolean ignoreRoamingPenalty) {
final PlayEventAction action = new PlayEventAction(self);
action.appendCost(
new ChooseActiveCardEffect(self, playerId, "Choose a DWARVEN condition in your support area", Culture.DWARVEN, CardType.CONDITION, Zone.SUPPORT) {
@Override
protected void cardSelected(LotroGame game, PhysicalCard card) {
action.appendCost(
new ChooseAndStackCardsFromHandEffect(action, playerId, 1, 1, card, Side.FREE_PEOPLE));
}
});
action.appendEffect(
new DrawCardsEffect(action, playerId, 1));
return action;
}
}