"They Will Find the Ring"

This commit is contained in:
marcins78@gmail.com
2011-09-30 00:00:12 +00:00
parent e94a2afccb
commit 5aa946fd66

View File

@@ -0,0 +1,57 @@
package com.gempukku.lotro.cards.set2.wraith;
import com.gempukku.lotro.cards.AbstractEvent;
import com.gempukku.lotro.cards.PlayConditions;
import com.gempukku.lotro.cards.actions.PlayEventAction;
import com.gempukku.lotro.cards.costs.ChooseAndExertCharactersCost;
import com.gempukku.lotro.cards.effects.ChooseAndExertCharactersEffect;
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.decisions.DecisionResultInvalidException;
import com.gempukku.lotro.logic.decisions.IntegerAwaitingDecision;
import com.gempukku.lotro.logic.effects.PlayoutDecisionEffect;
/**
* Set: Mines of Moria
* Side: Shadow
* Culture: Wraith
* Twilight Cost: 1
* Type: Event
* Game Text: Maneuver: Exert 2 Nazgul and spot X burdens to exert X companions.
*/
public class Card2_081 extends AbstractEvent {
public Card2_081() {
super(Side.SHADOW, Culture.WRAITH, "They Will Find the Ring", Phase.MANEUVER);
}
@Override
public boolean checkPlayRequirements(String playerId, LotroGame game, PhysicalCard self, int twilightModifier) {
return super.checkPlayRequirements(playerId, game, self, twilightModifier)
&& PlayConditions.canExertMultiple(self, game.getGameState(), game.getModifiersQuerying(), 1, 2, Filters.race(Race.NAZGUL));
}
@Override
public int getTwilightCost() {
return 1;
}
@Override
public PlayEventAction getPlayCardAction(final String playerId, LotroGame game, PhysicalCard self, int twilightModifier) {
final PlayEventAction action = new PlayEventAction(self);
action.appendCost(
new ChooseAndExertCharactersCost(action, playerId, 2, 2, Filters.race(Race.NAZGUL)));
action.appendEffect(
new PlayoutDecisionEffect(game.getUserFeedback(), playerId,
new IntegerAwaitingDecision(1, "Choose number of burdens you wish to spot", 0, game.getGameState().getBurdens()) {
@Override
public void decisionMade(String result) throws DecisionResultInvalidException {
int spottedBurdens = getValidatedResult(result);
action.insertEffect(
new ChooseAndExertCharactersEffect(action, playerId, spottedBurdens, spottedBurdens, Filters.type(CardType.COMPANION)));
}
}));
return action;
}
}