"King's Advisor"

This commit is contained in:
marcins78@gmail.com
2011-10-28 11:11:37 +00:00
parent f424b49ba5
commit 122f3a5687

View File

@@ -0,0 +1,58 @@
package com.gempukku.lotro.cards.set7.gandalf;
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.ForEachYouSpotEffect;
import com.gempukku.lotro.cards.effects.choose.ChooseAndExertCharactersEffect;
import com.gempukku.lotro.cards.effects.choose.ChooseOpponentEffect;
import com.gempukku.lotro.common.CardType;
import com.gempukku.lotro.common.Culture;
import com.gempukku.lotro.common.Phase;
import com.gempukku.lotro.common.Side;
import com.gempukku.lotro.filters.Filters;
import com.gempukku.lotro.game.PhysicalCard;
import com.gempukku.lotro.game.state.LotroGame;
/**
* Set: The Return of the King
* Side: Free
* Culture: Gandalf
* Twilight Cost: 2
* Type: Event • Maneuver
* Game Text: Exert Gandalf twice to make an opponent exert a minion for each [ROHAN] companion you spot.
*/
public class Card7_042 extends AbstractEvent {
public Card7_042() {
super(Side.FREE_PEOPLE, 2, Culture.GANDALF, "King's Advisor", Phase.MANEUVER);
}
@Override
public boolean checkPlayRequirements(String playerId, LotroGame game, PhysicalCard self, int twilightModifier) {
return super.checkPlayRequirements(playerId, game, self, twilightModifier)
&& PlayConditions.canExert(self, game, 2, Filters.name("Gandalf"));
}
@Override
public PlayEventAction getPlayCardAction(final String playerId, LotroGame game, PhysicalCard self, int twilightModifier) {
final PlayEventAction action = new PlayEventAction(self);
action.appendCost(
new ChooseAndExertCharactersEffect(action, playerId, 1, 1, 2, Filters.name("Gandalf")));
action.appendEffect(
new ChooseOpponentEffect(playerId) {
@Override
protected void opponentChosen(final String opponentId) {
action.insertEffect(
new ForEachYouSpotEffect(playerId, Culture.ROHAN, CardType.COMPANION) {
@Override
protected void spottedCards(int spotCount) {
for (int i = 0; i < spotCount; i++)
action.appendEffect(
new ChooseAndExertCharactersEffect(action, opponentId, 1, 1, CardType.MINION));
}
});
}
});
return action;
}
}