"Trusted Advisor"

This commit is contained in:
marcins78
2013-01-25 11:21:32 +00:00
parent 60b6334afb
commit 957b5d5a3d

View File

@@ -0,0 +1,48 @@
package com.gempukku.lotro.cards.set20.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.ShuffleDeckEffect;
import com.gempukku.lotro.cards.effects.choose.ChooseAndExertCharactersEffect;
import com.gempukku.lotro.cards.effects.choose.ChooseAndPutCardFromDeckIntoHandEffect;
import com.gempukku.lotro.common.*;
import com.gempukku.lotro.filters.Filters;
import com.gempukku.lotro.game.PhysicalCard;
import com.gempukku.lotro.game.state.LotroGame;
/**
* 1
* Trusted Advisor
* Gandalf Event • Fellowship
* Spell.
* Spot Gandalf and Exert a companion of another culture to take a card from that companion's culture into hand from your draw deck.
*/
public class Card20_170 extends AbstractEvent {
public Card20_170() {
super(Side.FREE_PEOPLE, 1, Culture.GANDALF, "Trusted Advisor", Phase.FELLOWSHIP);
addKeyword(Keyword.SPELL);
}
@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.canSpot(game, Filters.gandalf)
&& PlayConditions.canExert(self, game, CardType.COMPANION, Filters.not(Culture.GANDALF));
}
@Override
public PlayEventAction getPlayCardAction(final String playerId, LotroGame game, PhysicalCard self, int twilightModifier, boolean ignoreRoamingPenalty) {
final PlayEventAction action = new PlayEventAction(self);
action.appendCost(
new ChooseAndExertCharactersEffect(action, playerId, 1, 1, CardType.COMPANION, Filters.not(Culture.GANDALF)) {
@Override
protected void forEachCardExertedCallback(PhysicalCard character) {
action.appendEffect(
new ChooseAndPutCardFromDeckIntoHandEffect(action, playerId, 1, 1, character.getBlueprint().getCulture()));
action.appendEffect(
new ShuffleDeckEffect(playerId)); }
});
return action;
}
}