"Rally the Host"

This commit is contained in:
marcins78@gmail.com
2011-11-10 12:26:54 +00:00
parent 9408da9c2f
commit 329c6afdbf

View File

@@ -0,0 +1,61 @@
package com.gempukku.lotro.cards.set7.sauron;
import com.gempukku.lotro.cards.AbstractPermanent;
import com.gempukku.lotro.cards.PlayConditions;
import com.gempukku.lotro.cards.effects.ShuffleCardsFromPlayAndStackedOnItIntoDeckEffect;
import com.gempukku.lotro.cards.effects.choose.ChooseAndExertCharactersEffect;
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.ChooseActiveCardEffect;
import com.gempukku.lotro.logic.effects.RemoveThreatsEffect;
import com.gempukku.lotro.logic.timing.Action;
import java.util.Collections;
import java.util.List;
/**
* Set: The Return of the King
* Side: Shadow
* Culture: Sauron
* Twilight Cost: 0
* Type: Condition • Support Area
* Game Text: To play, spot 2 [SAURON] Orcs. Regroup: Exert a [SAURON] Orc and remove a threat to shuffle a [SAURON] Orc
* from play into your draw deck.
*/
public class Card7_308 extends AbstractPermanent {
public Card7_308() {
super(Side.SHADOW, 0, CardType.CONDITION, Culture.SAURON, Zone.SUPPORT, "Rally the Host");
}
@Override
public boolean checkPlayRequirements(String playerId, LotroGame game, PhysicalCard self, int twilightModifier) {
return super.checkPlayRequirements(playerId, game, self, twilightModifier)
&& PlayConditions.canSpot(game, 2, Culture.SAURON, Race.ORC);
}
@Override
protected List<? extends Action> getExtraPhaseActions(final String playerId, LotroGame game, final PhysicalCard self) {
if (PlayConditions.canUseShadowCardDuringPhase(game, Phase.REGROUP, self, 0)
&& PlayConditions.canExert(self, game, Culture.SAURON, Race.ORC)
&& PlayConditions.canRemoveThreat(game, self, 1)) {
final ActivateCardAction action = new ActivateCardAction(self);
action.appendCost(
new ChooseAndExertCharactersEffect(action, playerId, 1, 1, Culture.SAURON, Race.ORC));
action.appendCost(
new RemoveThreatsEffect(self, 1));
action.appendEffect(
new ChooseActiveCardEffect(self, playerId, "Choose a SAURON Orc", Filters.owner(playerId), Culture.SAURON, Race.ORC) {
@Override
protected void cardSelected(LotroGame game, PhysicalCard card) {
action.insertEffect(
new ShuffleCardsFromPlayAndStackedOnItIntoDeckEffect(self, playerId, Collections.singleton(card)));
}
});
return Collections.singletonList(action);
}
return null;
}
}