"City of the Dead"

This commit is contained in:
marcins78@gmail.com
2011-11-15 13:16:55 +00:00
parent 13ea2146b7
commit 1243d9ed68

View File

@@ -0,0 +1,66 @@
package com.gempukku.lotro.cards.set8.site;
import com.gempukku.lotro.cards.AbstractSite;
import com.gempukku.lotro.cards.PlayConditions;
import com.gempukku.lotro.cards.effects.ChoiceEffect;
import com.gempukku.lotro.cards.effects.RemoveBurdenEffect;
import com.gempukku.lotro.cards.effects.choose.ChooseAndPlayCardFromDeckEffect;
import com.gempukku.lotro.cards.effects.choose.ChooseAndPlayCardFromDiscardEffect;
import com.gempukku.lotro.common.Block;
import com.gempukku.lotro.common.CardType;
import com.gempukku.lotro.common.Keyword;
import com.gempukku.lotro.common.Phase;
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.timing.Action;
import com.gempukku.lotro.logic.timing.Effect;
import java.util.Collections;
import java.util.LinkedList;
import java.util.List;
/**
* Set: Siege of Gondor
* Twilight Cost: 4
* Type: Site
* Site: 4K
* Game Text: Underground. Shadow: Remove 2 burdens to play an enduring minion from your draw deck or discard pile.
*/
public class Card8_118 extends AbstractSite {
public Card8_118() {
super("City of the Dead", Block.KING, 4, 4, Direction.RIGHT);
addKeyword(Keyword.UNDERGROUND);
}
@Override
public List<? extends Action> getPhaseActions(String playerId, LotroGame game, PhysicalCard self) {
if (PlayConditions.canUseSiteDuringPhase(game, Phase.SHADOW, self)
&& PlayConditions.canRemoveBurdens(game, self, 2)) {
ActivateCardAction action = new ActivateCardAction(self);
action.appendCost(
new RemoveBurdenEffect(self));
action.appendCost(
new RemoveBurdenEffect(self));
List<Effect> possibleEffects = new LinkedList<Effect>();
possibleEffects.add(
new ChooseAndPlayCardFromDeckEffect(playerId, CardType.MINION, Keyword.ENDURING) {
@Override
public String getText(LotroGame game) {
return "Play from deck";
}
});
possibleEffects.add(
new ChooseAndPlayCardFromDiscardEffect(playerId, game.getGameState().getDiscard(playerId), CardType.MINION, Keyword.ENDURING) {
@Override
public String getText(LotroGame game) {
return "Play from discard";
}
});
action.appendEffect(
new ChoiceEffect(action, playerId, possibleEffects));
return Collections.singletonList(action);
}
return null;
}
}