"Herugrim", "King's Blade"

This commit is contained in:
marcins78
2013-02-06 13:41:18 +00:00
parent 9d44c784e5
commit 2d24db8cac

View File

@@ -0,0 +1,57 @@
package com.gempukku.lotro.cards.set20.rohan;
import com.gempukku.lotro.cards.AbstractAttachableFPPossession;
import com.gempukku.lotro.cards.PlayConditions;
import com.gempukku.lotro.cards.effects.choose.ChooseAndExertCharactersEffect;
import com.gempukku.lotro.cards.effects.choose.ChooseAndPlayCardFromDiscardEffect;
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.KeywordModifier;
import com.gempukku.lotro.logic.modifiers.Modifier;
import com.gempukku.lotro.logic.timing.Action;
import java.util.Collections;
import java.util.List;
/**
* 2
* •Herugrim, King's Blade
* Rohan Possession • Hand Weapon
* 2 1
* Bearer must be Theoden. He is damage +1.
* Regroup: Exert Theoden to play a [Rohan] fortification from your discard pile.
*/
public class Card20_331 extends AbstractAttachableFPPossession {
public Card20_331() {
super(2, 2, 1, Culture.ROHAN, PossessionClass.HAND_WEAPON, "Herugrim", "King's Blade", true);
}
@Override
protected Filterable getValidTargetFilter(String playerId, LotroGame game, PhysicalCard self) {
return Filters.name(Names.theoden);
}
@Override
protected List<? extends Modifier> getNonBasicStatsModifiers(PhysicalCard self) {
return Collections.singletonList(
new KeywordModifier(self, Filters.hasAttached(self), Keyword.DAMAGE, 1));
}
@Override
protected List<? extends Action> getExtraInPlayPhaseActions(String playerId, LotroGame game, PhysicalCard self) {
if (PlayConditions.canUseFPCardDuringPhase(game, Phase.REGROUP, self)
&& PlayConditions.canExert(self, game, Filters.hasAttached(self))
&& PlayConditions.canPlayFromDiscard(playerId, game, Culture.ROHAN, Keyword.FORTIFICATION)) {
ActivateCardAction action = new ActivateCardAction(self);
action.appendCost(
new ChooseAndExertCharactersEffect(action, playerId, 1, 1, Filters.hasAttached(self)));
action.appendEffect(
new ChooseAndPlayCardFromDiscardEffect(playerId, game, Culture.ROHAN, Keyword.FORTIFICATION));
return Collections.singletonList(action);
}
return null;
}
}