"Curse Their Foul Feet!"

This commit is contained in:
marcins78@gmail.com
2011-08-31 17:12:41 +00:00
parent 39765e5fc6
commit c31aab5d62

View File

@@ -3,12 +3,13 @@ package com.gempukku.lotro.cards.set1.elven;
import com.gempukku.lotro.cards.AbstractLotroCardBlueprint;
import com.gempukku.lotro.cards.GameUtils;
import com.gempukku.lotro.cards.PlayConditions;
import com.gempukku.lotro.cards.actions.PlayEventAction;
import com.gempukku.lotro.cards.effects.ChooseAndDiscardCardFromHandEffect;
import com.gempukku.lotro.cards.effects.ExertCharacterEffect;
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.actions.CostToEffectAction;
import com.gempukku.lotro.logic.decisions.MultipleChoiceAwaitingDecision;
import com.gempukku.lotro.logic.effects.ChooseActiveCardEffect;
import com.gempukku.lotro.logic.effects.PlayoutDecisionEffect;
@@ -38,25 +39,28 @@ public class Card1_036 extends AbstractLotroCardBlueprint {
}
@Override
public List<? extends Action> getPlayablePhaseActions(final String playerId, LotroGame game, PhysicalCard self) {
public List<? extends Action> getPlayablePhaseActions(final String playerId, final LotroGame game, PhysicalCard self) {
if (PlayConditions.canPlayFPCardDuringPhase(game, Phase.FELLOWSHIP, self)
&& Filters.canSpot(game.getGameState(), game.getModifiersQuerying(), Filters.keyword(Keyword.ELF), Filters.canExert())) {
final CostToEffectAction action = new CostToEffectAction(self, "Exert an Elf to reveal an opponent's hand. That player discards a card from hand for each Orc revealed.");
final PlayEventAction action = new PlayEventAction(self);
action.addCost(
new ChooseActiveCardEffect(playerId, "Choose an Elf", Filters.keyword(Keyword.ELF), Filters.canExert()) {
@Override
protected void cardSelected(LotroGame game, PhysicalCard elf) {
action.addCost(new ExertCharacterEffect(elf));
action.addEffect(new PlayoutDecisionEffect(game.getUserFeedback(), playerId,
new MultipleChoiceAwaitingDecision(1, "Choose an opponent", GameUtils.getOpponents(game, playerId)) {
@Override
protected void validDecisionMade(int index, String result) {
// TODO
}
})
);
}
});
action.addEffect(new PlayoutDecisionEffect(game.getUserFeedback(), playerId,
new MultipleChoiceAwaitingDecision(1, "Choose an opponent", GameUtils.getOpponents(game, playerId)) {
@Override
protected void validDecisionMade(int index, String chosenOpponent) {
List<? extends PhysicalCard> hand = game.getGameState().getHand(chosenOpponent);
int orcsCount = Filters.filter(hand, game.getGameState(), game.getModifiersQuerying(), Filters.keyword(Keyword.ORC)).size();
for (int i = 0; i < orcsCount; i++)
action.addEffect(new ChooseAndDiscardCardFromHandEffect(action, chosenOpponent, false));
}
})
);
return Collections.singletonList(action);
}
return null;