"Rohirrim Shield"

This commit is contained in:
marcins78@gmail.com
2011-10-19 00:01:20 +00:00
parent cf55cb0104
commit 871e8e699c

View File

@@ -0,0 +1,57 @@
package com.gempukku.lotro.cards.set5.rohan;
import com.gempukku.lotro.cards.AbstractAttachableFPPossession;
import com.gempukku.lotro.cards.PlayConditions;
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.effects.DiscardCardsFromPlayEffect;
import com.gempukku.lotro.logic.effects.HealCharactersEffect;
import com.gempukku.lotro.logic.modifiers.Modifier;
import com.gempukku.lotro.logic.timing.Action;
import java.util.Collections;
import java.util.List;
/**
* Set: Battle of Helm's Deep
* Side: Free
* Culture: Rohan
* Twilight Cost: 1
* Type: Possession • Shield
* Game Text: Bearer must be a [ROHAN] Man. The minion archery total is -1. Regroup: Discard this possession
* to heal bearer.
*/
public class Card5_091 extends AbstractAttachableFPPossession {
public Card5_091() {
super(1, 0, 0, Culture.ROHAN, PossessionClass.SHIELD, "Rohirrim Shield");
}
@Override
protected Filterable getValidTargetFilter(String playerId, LotroGame game, PhysicalCard self) {
return Filters.and(Culture.ROHAN, 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.getGameState(), Phase.REGROUP, self)
&& PlayConditions.canSelfDiscard(self, game)) {
ActivateCardAction action = new ActivateCardAction(self);
action.appendCost(
new DiscardCardsFromPlayEffect(self, self));
action.appendEffect(
new HealCharactersEffect(playerId, self.getAttachedTo()));
return Collections.singletonList(action);
}
return null;
}
}