"Gandalf", "Wisest of the Istari"
This commit is contained in:
@@ -11,6 +11,7 @@ import com.gempukku.lotro.game.state.LotroGame;
|
||||
import com.gempukku.lotro.logic.decisions.CardsSelectionDecision;
|
||||
import com.gempukku.lotro.logic.decisions.DecisionResultInvalidException;
|
||||
import com.gempukku.lotro.logic.decisions.IntegerAwaitingDecision;
|
||||
import com.gempukku.lotro.logic.effects.AddTwilightEffect;
|
||||
import com.gempukku.lotro.logic.effects.DiscardCardsFromPlayEffect;
|
||||
import com.gempukku.lotro.logic.effects.PlayoutDecisionEffect;
|
||||
|
||||
@@ -46,6 +47,8 @@ public class Card20_155 extends AbstractEvent {
|
||||
@Override
|
||||
public void decisionMade(String result) throws DecisionResultInvalidException {
|
||||
final int x = getValidatedResult(result);
|
||||
action.appendCost(
|
||||
new AddTwilightEffect(self, x));
|
||||
action.appendEffect(
|
||||
new PlayoutDecisionEffect(playerId,
|
||||
new CardsSelectionDecision(1, "Choose up to 4 Shadow conditions with combined twilight cost of up to "+x,
|
||||
|
||||
@@ -0,0 +1,44 @@
|
||||
package com.gempukku.lotro.cards.set20.gandalf;
|
||||
|
||||
import com.gempukku.lotro.cards.AbstractCompanion;
|
||||
import com.gempukku.lotro.cards.PlayConditions;
|
||||
import com.gempukku.lotro.cards.TriggerConditions;
|
||||
import com.gempukku.lotro.cards.effects.SelfExertEffect;
|
||||
import com.gempukku.lotro.common.Culture;
|
||||
import com.gempukku.lotro.common.Keyword;
|
||||
import com.gempukku.lotro.common.Race;
|
||||
import com.gempukku.lotro.game.PhysicalCard;
|
||||
import com.gempukku.lotro.game.state.LotroGame;
|
||||
import com.gempukku.lotro.logic.actions.OptionalTriggerAction;
|
||||
import com.gempukku.lotro.logic.effects.DrawCardsEffect;
|
||||
import com.gempukku.lotro.logic.timing.EffectResult;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 4
|
||||
* •Gandalf, Wisest of the Istari
|
||||
* Gandalf Companion • Wizard
|
||||
* 7 4 7
|
||||
* Each time you play a [Gandalf] spell, you may exert Gandalf to draw a card.
|
||||
*/
|
||||
public class Card20_157 extends AbstractCompanion {
|
||||
public Card20_157() {
|
||||
super(4, 7, 4, 7, Culture.GANDALF, Race.WIZARD, null, "Gandalf", "Wisest of the Istari", true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<OptionalTriggerAction> getOptionalAfterTriggers(String playerId, LotroGame game, EffectResult effectResult, PhysicalCard self) {
|
||||
if (TriggerConditions.played(game, effectResult, Culture.GANDALF, Keyword.SPELL)
|
||||
&& PlayConditions.canSelfExert(self, game)) {
|
||||
OptionalTriggerAction action = new OptionalTriggerAction(self);
|
||||
action.appendCost(
|
||||
new SelfExertEffect(action, self));
|
||||
action.appendEffect(
|
||||
new DrawCardsEffect(action, playerId, 1));
|
||||
return Collections.singletonList(action);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user