"Heirs of Gondor"

This commit is contained in:
marcins78@gmail.com
2012-01-07 14:37:15 +00:00
parent de8a8f0dae
commit 614c12815a

View File

@@ -0,0 +1,67 @@
package com.gempukku.lotro.cards.set13.gondor;
import com.gempukku.lotro.cards.AbstractPermanent;
import com.gempukku.lotro.cards.PlayConditions;
import com.gempukku.lotro.cards.TriggerConditions;
import com.gempukku.lotro.cards.effects.AddTokenEffect;
import com.gempukku.lotro.cards.effects.ChoiceEffect;
import com.gempukku.lotro.cards.effects.RemoveTokenEffect;
import com.gempukku.lotro.cards.effects.SelfDiscardEffect;
import com.gempukku.lotro.cards.effects.choose.ChooseAndAddUntilEOPStrengthBonusEffect;
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.actions.RequiredTriggerAction;
import com.gempukku.lotro.logic.timing.Action;
import com.gempukku.lotro.logic.timing.Effect;
import com.gempukku.lotro.logic.timing.EffectResult;
import java.util.Collections;
import java.util.LinkedList;
import java.util.List;
/**
* Set: Bloodlines
* Side: Free
* Culture: Gondor
* Twilight Cost: 1
* Type: Condition • Support Area
* Game Text: When you play this, add a [GONDOR] token here. Skirmish: Discard this from play or remove a token from
* here to make a [GONDOR] companion bearing a hand weapon strength +2.
*/
public class Card13_069 extends AbstractPermanent {
public Card13_069() {
super(Side.FREE_PEOPLE, 1, CardType.CONDITION, Culture.GONDOR, Zone.SUPPORT, "Heirs of Gondor", true);
}
@Override
public List<RequiredTriggerAction> getRequiredAfterTriggers(LotroGame game, EffectResult effectResult, PhysicalCard self) {
if (TriggerConditions.played(game, effectResult, self)) {
RequiredTriggerAction action = new RequiredTriggerAction(self);
action.appendEffect(
new AddTokenEffect(self, self, Token.GONDOR));
return Collections.singletonList(action);
}
return null;
}
@Override
protected List<? extends Action> getExtraPhaseActions(String playerId, LotroGame game, PhysicalCard self) {
if (PlayConditions.canUseFPCardDuringPhase(game, Phase.SKIRMISH, self)) {
ActivateCardAction action = new ActivateCardAction(self);
List<Effect> possibleCosts = new LinkedList<Effect>();
possibleCosts.add(
new RemoveTokenEffect(self, self, Token.GONDOR));
possibleCosts.add(
new SelfDiscardEffect(self));
action.appendCost(
new ChoiceEffect(action, playerId, possibleCosts));
action.appendEffect(
new ChooseAndAddUntilEOPStrengthBonusEffect(action, self, playerId, 2, Culture.GONDOR, CardType.COMPANION, Filters.hasAttached(PossessionClass.HAND_WEAPON)));
return Collections.singletonList(action);
}
return null;
}
}