"The Witch-king"

This commit is contained in:
marcins78@gmail.com
2012-03-09 12:44:01 +00:00
parent 83098525f4
commit 728ba326a0

View File

@@ -0,0 +1,60 @@
package com.gempukku.lotro.cards.set19.wraith;
import com.gempukku.lotro.cards.AbstractMinion;
import com.gempukku.lotro.cards.PlayConditions;
import com.gempukku.lotro.cards.effects.AddUntilEndOfPhaseModifierEffect;
import com.gempukku.lotro.common.Culture;
import com.gempukku.lotro.common.Keyword;
import com.gempukku.lotro.common.Phase;
import com.gempukku.lotro.common.Race;
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.ChooseAndDiscardCardsFromHandEffect;
import com.gempukku.lotro.logic.modifiers.StrengthModifier;
import com.gempukku.lotro.logic.timing.Action;
import java.util.Collection;
import java.util.Collections;
import java.util.List;
/**
* Set: Ages End
* Side: Shadow
* Culture: Wraith
* Twilight Cost: 8
* Type: Minion • Nazgul
* Strength: 14
* Vitality: 4
* Site: 3
* Game Text: Fierce. Skirmish: Discard a Nazgul from hand to make The Witch-king strength +1 (or strength +2 if you
* can spot that discarded Nazgul).
*/
public class Card19_040 extends AbstractMinion {
public Card19_040() {
super(8, 14, 4, 3, Race.NAZGUL, Culture.WRAITH, "The Witch-king", true);
addKeyword(Keyword.FIERCE);
}
@Override
protected List<? extends Action> getExtraPhaseActions(String playerId, final LotroGame game, final PhysicalCard self) {
if (PlayConditions.canUseShadowCardDuringPhase(game, Phase.SKIRMISH, self, 0)
&& PlayConditions.canDiscardFromHand(game, playerId, 1, Race.NAZGUL)) {
final ActivateCardAction action = new ActivateCardAction(self);
action.appendCost(
new ChooseAndDiscardCardsFromHandEffect(action, playerId, false, 1, Race.NAZGUL) {
@Override
protected void cardsBeingDiscardedCallback(Collection<PhysicalCard> cardsBeingDiscarded) {
for (PhysicalCard physicalCard : cardsBeingDiscarded) {
action.appendEffect(
new AddUntilEndOfPhaseModifierEffect(
new StrengthModifier(self, self, null, PlayConditions.canSpot(game, Filters.name(physicalCard.getBlueprint().getName())) ? 2 : 1), Phase.SKIRMISH));
}
}
});
return Collections.singletonList(action);
}
return null;
}
}