"Our Inspiration"

This commit is contained in:
marcins78@gmail.com
2012-02-03 16:36:45 +00:00
parent 99409a49c0
commit 2cbb1d1c88

View File

@@ -0,0 +1,41 @@
package com.gempukku.lotro.cards.set15.rohan;
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.ChooseAndPlayCardFromDiscardEffect;
import com.gempukku.lotro.common.*;
import com.gempukku.lotro.filters.Filters;
import com.gempukku.lotro.game.PhysicalCard;
import com.gempukku.lotro.game.state.LotroGame;
/**
* Set: The Hunters
* Side: Free
* Culture: Rohan
* Twilight Cost: 2
* Type: Event • Maneuver
* Game Text: Spot a [ROHAN] Man to play a possession from your discard pile for each hunter character you can spot.
*/
public class Card15_131 extends AbstractEvent {
public Card15_131() {
super(Side.FREE_PEOPLE, 2, Culture.ROHAN, "Our Inspiration", Phase.MANEUVER);
}
@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, Culture.ROHAN, Race.MAN)
&& PlayConditions.canPlayFromDiscard(playerId, game, CardType.POSSESSION);
}
@Override
public PlayEventAction getPlayCardAction(String playerId, LotroGame game, PhysicalCard self, int twilightModifier, boolean ignoreRoamingPenalty) {
PlayEventAction action = new PlayEventAction(self);
int huntersCount = Filters.countSpottable(game.getGameState(), game.getModifiersQuerying(), Filters.character, Keyword.HUNTER);
for (int i = 0; i < huntersCount; i++)
action.appendEffect(
new ChooseAndPlayCardFromDiscardEffect(playerId, game, CardType.POSSESSION));
return action;
}
}