"Fear and Great Wonder"

This commit is contained in:
marcins78@gmail.com
2011-12-29 06:45:16 +00:00
parent f13cab2727
commit fd165753dc

View File

@@ -0,0 +1,71 @@
package com.gempukku.lotro.cards.set13.gandalf;
import com.gempukku.lotro.cards.AbstractPermanent;
import com.gempukku.lotro.cards.PlayConditions;
import com.gempukku.lotro.cards.TriggerConditions;
import com.gempukku.lotro.cards.effects.*;
import com.gempukku.lotro.common.*;
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.effects.ChooseActiveCardEffect;
import com.gempukku.lotro.logic.modifiers.KeywordModifier;
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: Gandalf
* Twilight Cost: 1
* Type: Condition • Support Area
* Game Text: When you play this, add a [GANDALF] token here. Maneuver: Discard this from play or remove a token from
* here to spot a [GANDALF] companion. That companion gains muster until end of turn.
*/
public class Card13_030 extends AbstractPermanent {
public Card13_030() {
super(Side.FREE_PEOPLE, 1, CardType.CONDITION, Culture.GANDALF, Zone.SUPPORT, "Fear and Great Wonder", 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.GANDALF));
return Collections.singletonList(action);
}
return null;
}
@Override
protected List<? extends Action> getExtraPhaseActions(String playerId, LotroGame game, final PhysicalCard self) {
if (PlayConditions.canUseFPCardDuringPhase(game, Phase.MANEUVER, self)) {
final ActivateCardAction action = new ActivateCardAction(self);
List<Effect> possibleCosts = new LinkedList<Effect>();
possibleCosts.add(
new RemoveTokenEffect(self, self, Token.GANDALF));
possibleCosts.add(
new SelfDiscardEffect(self));
action.appendCost(
new ChoiceEffect(action, playerId, possibleCosts));
action.appendEffect(
new ChooseActiveCardEffect(self, playerId, "Choose a GANDALF companion", Culture.GANDALF, CardType.COMPANION) {
@Override
protected void cardSelected(LotroGame game, PhysicalCard card) {
action.appendEffect(
new AddUntilEndOfTurnModifierEffect(
new KeywordModifier(self, card, Keyword.MUSTER)));
}
});
return Collections.singletonList(action);
}
return null;
}
}