"Throne of the Golden Hall"

This commit is contained in:
marcins78@gmail.com
2012-02-16 08:07:55 +00:00
parent 5f89618024
commit e419a0d72b

View File

@@ -0,0 +1,63 @@
package com.gempukku.lotro.cards.set17.rohan;
import com.gempukku.lotro.cards.AbstractPermanent;
import com.gempukku.lotro.cards.PlayConditions;
import com.gempukku.lotro.cards.TriggerConditions;
import com.gempukku.lotro.cards.effects.choose.ChooseAndExertCharactersEffect;
import com.gempukku.lotro.cards.effects.choose.ChooseAndPreventCardEffect;
import com.gempukku.lotro.cards.modifiers.CantBeAssignedToSkirmishModifier;
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.actions.ActivateCardAction;
import com.gempukku.lotro.logic.effects.AddTwilightEffect;
import com.gempukku.lotro.logic.effects.WoundCharactersEffect;
import com.gempukku.lotro.logic.modifiers.Modifier;
import com.gempukku.lotro.logic.timing.Effect;
import java.util.Collections;
import java.util.List;
/**
* Set: Rise of Saruman
* Side: Free
* Culture: Rohan
* Twilight Cost: 2
* Type: Artifact • Support Area
* Game Text: To play, spot Theoden (or 2 [ROHAN] companions). Saruman and Grima cannot be assigned to skirmishes.
* Response: If a [ROHAN] Man is about to take a wound, exert another [ROHAN] Man and add (2) to prevent that.
*/
public class Card17_098 extends AbstractPermanent {
public Card17_098() {
super(Side.FREE_PEOPLE, 2, CardType.ARTIFACT, Culture.ROHAN, Zone.SUPPORT, "Throne of the Golden Hall", true);
}
@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.name("Theoden"))
|| PlayConditions.canSpot(game, 2, Culture.ROHAN, CardType.COMPANION));
}
@Override
public Modifier getAlwaysOnModifier(PhysicalCard self) {
return new CantBeAssignedToSkirmishModifier(self, Filters.or(Filters.saruman, Filters.name("Grima")));
}
@Override
public List<? extends ActivateCardAction> getOptionalInPlayBeforeActions(String playerId, LotroGame game, Effect effect, PhysicalCard self) {
if (TriggerConditions.isGettingWounded(effect, game, Culture.ROHAN, Race.MAN)
&& PlayConditions.canExert(self, game, Culture.ROHAN, Race.MAN)) {
ActivateCardAction action = new ActivateCardAction(self);
action.appendCost(
new AddTwilightEffect(self, 2));
action.appendCost(
new ChooseAndExertCharactersEffect(action, playerId, 1, 1, Culture.ROHAN, Race.MAN));
action.appendEffect(
new ChooseAndPreventCardEffect(self, (WoundCharactersEffect) effect, playerId, "Choose character to prevent wound to", Culture.ROHAN, Race.MAN));
return Collections.singletonList(action);
}
return null;
}
}