"Not Easily Destroyed"

This commit is contained in:
marcins78@gmail.com
2011-09-09 19:59:53 +00:00
parent 8d60ee795f
commit 20d2c97f2f

View File

@@ -0,0 +1,69 @@
package com.gempukku.lotro.cards.set1.wraith;
import com.gempukku.lotro.cards.AbstractLotroCardBlueprint;
import com.gempukku.lotro.cards.PlayConditions;
import com.gempukku.lotro.cards.actions.PlayPermanentAction;
import com.gempukku.lotro.cards.effects.RemoveTwilightEffect;
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.DefaultCostToEffectAction;
import com.gempukku.lotro.logic.effects.ChooseActiveCardEffect;
import com.gempukku.lotro.logic.effects.HealCharacterEffect;
import com.gempukku.lotro.logic.timing.Action;
import java.util.Collections;
import java.util.List;
/**
* Set: The Fellowship of the Ring
* Side: Shadow
* Culture: Wraith
* Twilight Cost: 1
* Type: Condition
* Game Text: Plays to your support area. Maneuver or Skirmish: Remove (3) to heal a Nazgul.
*/
public class Card1_220 extends AbstractLotroCardBlueprint {
public Card1_220() {
super(Side.SHADOW, CardType.CONDITION, Culture.WRAITH, "Not Easily Destroyed");
}
@Override
public boolean checkPlayRequirements(String playerId, LotroGame game, PhysicalCard self, int twilightModifier) {
return PlayConditions.canPayForShadowCard(game, self, twilightModifier);
}
@Override
public Action getPlayCardAction(String playerId, LotroGame game, PhysicalCard self, int twilightModifier) {
return new PlayPermanentAction(self, Zone.SHADOW_SUPPORT);
}
@Override
public int getTwilightCost() {
return 1;
}
@Override
public List<? extends Action> getPhaseActions(String playerId, LotroGame game, PhysicalCard self) {
if (PlayConditions.canPlayCardDuringPhase(game, Phase.SHADOW, self)
&& checkPlayRequirements(playerId, game, self, 0))
return Collections.singletonList(getPlayCardAction(playerId, game, self, 0));
if (PlayConditions.canUseShadowCardDuringPhase(game.getGameState(), Phase.MANEUVER, self, 3)
|| PlayConditions.canUseShadowCardDuringPhase(game.getGameState(), Phase.SKIRMISH, self, 3)) {
final DefaultCostToEffectAction action = new DefaultCostToEffectAction(self, (game.getGameState().getCurrentPhase() == Phase.MANEUVER) ? Keyword.MANEUVER : Keyword.SKIRMISH, "Remove (3) to heal a Nazgul.");
action.addCost(new RemoveTwilightEffect(3));
action.addEffect(
new ChooseActiveCardEffect(playerId, "Choose a Nazgul", Filters.keyword(Keyword.NAZGUL)) {
@Override
protected void cardSelected(PhysicalCard nazgul) {
action.addEffect(
new HealCharacterEffect(nazgul));
}
});
return Collections.singletonList(action);
}
return null;
}
}