"Boromir's Shield"

This commit is contained in:
marcins78
2013-01-25 14:12:50 +00:00
parent 2d5ac94c1d
commit 9f55f08bdc

View File

@@ -0,0 +1,56 @@
package com.gempukku.lotro.cards.set20.gondor;
import com.gempukku.lotro.cards.AbstractAttachableFPPossession;
import com.gempukku.lotro.cards.PlayConditions;
import com.gempukku.lotro.cards.effects.SelfDiscardEffect;
import com.gempukku.lotro.cards.effects.choose.ChooseAndDiscardCardsFromPlayEffect;
import com.gempukku.lotro.cards.modifiers.ArcheryTotalModifier;
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.modifiers.Modifier;
import com.gempukku.lotro.logic.timing.Action;
import java.util.Collections;
import java.util.List;
/**
* 1
* •Boromir's Shield
* Gondor Possession • Shield
* Bearer must be a [Gondor] man.
* The minion archery total is -1 .
* Regroup: Discard this possession to discard a shadow possession.
*/
public class Card20_186 extends AbstractAttachableFPPossession {
public Card20_186() {
super(1, 0, 0, Culture.GONDOR, PossessionClass.SHIELD, "Boromir's Shield", null, true);
}
@Override
protected Filterable getValidTargetFilter(String playerId, LotroGame game, PhysicalCard self) {
return Filters.and(Culture.GONDOR, Race.MAN);
}
@Override
protected List<? extends Modifier> getNonBasicStatsModifiers(PhysicalCard self) {
return Collections.singletonList(
new ArcheryTotalModifier(self, Side.SHADOW, -1));
}
@Override
protected List<? extends Action> getExtraInPlayPhaseActions(String playerId, LotroGame game, PhysicalCard self) {
if (PlayConditions.canUseFPCardDuringPhase(game, Phase.REGROUP, self)
&& PlayConditions.canSelfDiscard(self, game)) {
ActivateCardAction action = new ActivateCardAction(self);
action.appendCost(
new SelfDiscardEffect(self));
action.appendEffect(
new ChooseAndDiscardCardsFromPlayEffect(action, playerId, 1, 1, Side.SHADOW, CardType.POSSESSION));
return Collections.singletonList(action);
}
return null;
}
}