"The Hour Grows Late"

This commit is contained in:
marcins78
2013-01-30 14:40:22 +00:00
parent 704065d5e9
commit fd06a0e3e4

View File

@@ -0,0 +1,47 @@
package com.gempukku.lotro.cards.set20.isengard;
import com.gempukku.lotro.cards.AbstractEvent;
import com.gempukku.lotro.cards.PlayConditions;
import com.gempukku.lotro.cards.actions.PlayEventAction;
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.effects.AddThreatsEffect;
import com.gempukku.lotro.logic.effects.ChooseActiveCardEffect;
/**
* 2
* The Hour Grows Late
* Isengard Event • Maneuver
* Spell.
* Spot Saruman and an exhausted companion to add a threat for each wound on that companion.
*/
public class Card20_248 extends AbstractEvent {
public Card20_248() {
super(Side.SHADOW, 2, Culture.ISENGARD, "The Hour Grows Late", Phase.MANEUVER);
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.saruman)
&& PlayConditions.canSpot(game, CardType.COMPANION, Filters.exhausted);
}
@Override
public PlayEventAction getPlayCardAction(final String playerId, LotroGame game, final PhysicalCard self, int twilightModifier, boolean ignoreRoamingPenalty) {
final PlayEventAction action= new PlayEventAction(self);
action.appendCost(
new ChooseActiveCardEffect(self, playerId, "Choose an exhausted companion", CardType.COMPANION, Filters.exhausted) {
@Override
protected void cardSelected(LotroGame game, PhysicalCard card) {
int wounds = game.getGameState().getWounds(card);
action.appendEffect(
new AddThreatsEffect(playerId, self, wounds));
}
});
return action;
}
}