"Gondorian Sword"

This commit is contained in:
marcins78@gmail.com
2011-11-02 16:20:04 +00:00
parent 0680187b2c
commit f120dc5743

View File

@@ -0,0 +1,51 @@
package com.gempukku.lotro.cards.set7.gondor;
import com.gempukku.lotro.cards.AbstractAttachableFPPossession;
import com.gempukku.lotro.cards.PlayConditions;
import com.gempukku.lotro.cards.effects.AddUntilEndOfPhaseModifierEffect;
import com.gempukku.lotro.cards.effects.choose.ChooseAndDiscardCardsFromHandEffect;
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.timing.Action;
import java.util.Collections;
import java.util.List;
/**
* Set: The Return of the King
* Side: Free
* Culture: Gondor
* Twilight Cost: 1
* Type: Possession • Hand Weapon
* Strength: +2
* Game Text: Bearer must be a [GONDOR] Man. Skirmish: Discard 3 cards from hand to make bearer damage +1.
*/
public class Card7_098 extends AbstractAttachableFPPossession {
public Card7_098() {
super(1, 2, 0, Culture.GONDOR, PossessionClass.HAND_WEAPON, "Gondorian Sword");
}
@Override
protected Filterable getValidTargetFilter(String playerId, LotroGame game, PhysicalCard self) {
return Filters.and(Culture.GONDOR, Race.MAN);
}
@Override
protected List<? extends Action> getExtraInPlayPhaseActions(String playerId, LotroGame game, PhysicalCard self) {
if (PlayConditions.canUseFPCardDuringPhase(game.getGameState(), Phase.SKIRMISH, self)
&& PlayConditions.canDiscardFromHand(game, playerId, 3, Filters.any)) {
ActivateCardAction action = new ActivateCardAction(self);
action.appendCost(
new ChooseAndDiscardCardsFromHandEffect(action, playerId, false, 3));
action.appendEffect(
new AddUntilEndOfPhaseModifierEffect(
new KeywordModifier(self, Filters.hasAttached(self), Keyword.DAMAGE, 1), Phase.SKIRMISH));
return Collections.singletonList(action);
}
return null;
}
}