"Cruel Caradhras"

This commit is contained in:
marcins78@gmail.com
2011-08-30 13:34:53 +00:00
parent 7c2c4a8f47
commit fa10ace6d1
2 changed files with 75 additions and 0 deletions

View File

@@ -0,0 +1,71 @@
package com.gempukku.lotro.cards.set1.isengard;
import com.gempukku.lotro.cards.AbstractLotroCardBlueprint;
import com.gempukku.lotro.cards.PlayConditions;
import com.gempukku.lotro.cards.actions.PlayEventAction;
import com.gempukku.lotro.cards.effects.AddBurdenEffect;
import com.gempukku.lotro.cards.effects.ChoiceEffect;
import com.gempukku.lotro.cards.effects.ExertCharacterEffect;
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.ChooseActiveCardEffect;
import com.gempukku.lotro.logic.timing.Action;
import com.gempukku.lotro.logic.timing.Effect;
import java.util.Collections;
import java.util.LinkedList;
import java.util.List;
/**
* Set: The Fellowship of the Ring
* Side: Shadow
* Culture: Isengard
* Twilight Cost: 2
* Type: Event
* Game Text: Spell. Weather. Maneuver: Exert a [ISENGARD] minion to make the opponent choose to either exert the
* Ring-bearer or add a burden.
*/
public class Card1_124 extends AbstractLotroCardBlueprint {
public Card1_124() {
super(Side.SHADOW, CardType.EVENT, Culture.ISENGARD, "Cruel Caradhras", "1_124");
addKeyword(Keyword.SPELL);
addKeyword(Keyword.WEATHER);
addKeyword(Keyword.MANEUVER);
}
@Override
public int getTwilightCost() {
return 2;
}
@Override
public List<? extends Action> getPlayablePhaseActions(String playerId, LotroGame game, PhysicalCard self) {
if (PlayConditions.canPlayShadowCardDuringPhase(game.getGameState(), game.getModifiersQuerying(), Phase.MANEUVER, self)
&& Filters.canSpot(game.getGameState(), game.getModifiersQuerying(), Filters.culture(Culture.ISENGARD), Filters.type(CardType.MINION), Filters.canExert())) {
final PlayEventAction action = new PlayEventAction(self);
String fpPlayer = game.getGameState().getCurrentPlayerId();
action.addCost(
new ChooseActiveCardEffect(playerId, "Choose an ISENGARD minion", Filters.culture(Culture.ISENGARD), Filters.type(CardType.MINION), Filters.canExert()) {
@Override
protected void cardSelected(LotroGame game, PhysicalCard isengardMinion) {
action.addCost(new ExertCharacterEffect(isengardMinion));
}
}
);
List<Effect> possibleEffects = new LinkedList<Effect>();
possibleEffects.add(new ExertCharacterEffect(game.getGameState().getRingBearer(fpPlayer)));
possibleEffects.add(new AddBurdenEffect(fpPlayer));
action.addEffect(
new ChoiceEffect(action, fpPlayer, possibleEffects, false));
return Collections.singletonList(action);
}
return null;
}
}

View File

@@ -146,6 +146,10 @@ public class GameState {
_ringBearers.put(card.getOwner(), card);
}
public PhysicalCard getRingBearer(String playerId) {
return _ringBearers.get(playerId);
}
private List<PhysicalCardImpl> getZoneCards(String playerId, CardType type, Zone zone) {
if (zone == Zone.DECK && type != CardType.SITE)
return _decks.get(playerId);