"The Saga of Elendil"

This commit is contained in:
marcins78@gmail.com
2011-09-08 11:15:55 +00:00
parent 475e976439
commit b199b2b07a

View File

@@ -0,0 +1,58 @@
package com.gempukku.lotro.cards.set1.gondor;
import com.gempukku.lotro.cards.AbstractAttachable;
import com.gempukku.lotro.cards.PlayConditions;
import com.gempukku.lotro.cards.effects.AddUntilEndOfPhaseModifierEffect;
import com.gempukku.lotro.cards.modifiers.StrengthModifier;
import com.gempukku.lotro.cards.modifiers.VitalityModifier;
import com.gempukku.lotro.common.*;
import com.gempukku.lotro.filters.Filter;
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.DefaultCostToEffectAction;
import com.gempukku.lotro.logic.effects.DiscardCardFromPlayEffect;
import com.gempukku.lotro.logic.modifiers.Modifier;
import com.gempukku.lotro.logic.timing.Action;
import java.util.Collections;
import java.util.List;
/**
* Set: The Fellowship of the Ring
* Side: Free
* Culture: Gondor
* Twilight Cost: 1
* Type: Condition
* Vitality: +1
* Game Text: Tale. Bearer must be a [GONDOR] companion. Skirmish: Discard this condition to make bearer strength +2.
*/
public class Card1_114 extends AbstractAttachable {
public Card1_114() {
super(Side.FREE_PEOPLE, CardType.CONDITION, 1, Culture.GONDOR, "The Saga of Elendil", true);
}
@Override
protected Filter getValidTargetFilter(String playerId, LotroGame game, PhysicalCard self) {
return Filters.and(Filters.culture(Culture.GONDOR), Filters.type(CardType.COMPANION));
}
@Override
protected List<? extends Action> getExtraPhaseActions(String playerId, LotroGame game, PhysicalCard self) {
if (PlayConditions.canUseFPCardDuringPhase(game.getGameState(), Phase.SKIRMISH, self)) {
DefaultCostToEffectAction action = new DefaultCostToEffectAction(self, Keyword.SKIRMISH, "Discard this condition to make bearer strength +2");
action.addCost(new DiscardCardFromPlayEffect(self, self));
action.addEffect(
new AddUntilEndOfPhaseModifierEffect(
new StrengthModifier(self, Filters.sameCard(self.getAttachedTo()), 2), Phase.SKIRMISH));
return Collections.singletonList(action);
}
return null;
}
@Override
public Modifier getAlwaysOnEffect(PhysicalCard self) {
return new VitalityModifier(self, Filters.attachedTo(self), 1);
}
}