Couple of Gandalf cards
This commit is contained in:
@@ -0,0 +1,66 @@
|
||||
package com.gempukku.lotro.cards.set40.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.SelfDiscardEffect;
|
||||
import com.gempukku.lotro.cards.effects.ShuffleDeckEffect;
|
||||
import com.gempukku.lotro.cards.effects.choose.ChooseAndExertCharactersEffect;
|
||||
import com.gempukku.lotro.cards.effects.choose.ChooseAndPutCardFromDeckIntoHandEffect;
|
||||
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.OptionalTriggerAction;
|
||||
import com.gempukku.lotro.logic.effects.DrawCardsEffect;
|
||||
import com.gempukku.lotro.logic.timing.Action;
|
||||
import com.gempukku.lotro.logic.timing.EffectResult;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Title: *Introspection
|
||||
* Set: Second Edition
|
||||
* Side: Free
|
||||
* Culture: Gandalf
|
||||
* Twilight Cost: 2
|
||||
* Type: Condition - Support Area
|
||||
* Card Number: 1U79
|
||||
* Game Text: At the start of each of your turns, you may spot Gandalf to draw a card.
|
||||
* Fellowship: Exert Gandalf to take a [GANDALF] card from your draw deck into hand. Discard this condition.
|
||||
*/
|
||||
public class Card40_079 extends AbstractPermanent {
|
||||
public Card40_079() {
|
||||
super(Side.FREE_PEOPLE, 2, CardType.CONDITION, Culture.GANDALF, Zone.SUPPORT, "Introspection", null, true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<OptionalTriggerAction> getOptionalAfterTriggers(String playerId, LotroGame game, EffectResult effectResult, PhysicalCard self) {
|
||||
if (TriggerConditions.startOfTurn(game, effectResult)
|
||||
&& PlayConditions.canSpot(game, Filters.gandalf)) {
|
||||
OptionalTriggerAction action = new OptionalTriggerAction(self);
|
||||
action.appendEffect(new DrawCardsEffect(action, playerId, 1));
|
||||
return Collections.singletonList(action);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected List<? extends Action> getExtraPhaseActions(String playerId, LotroGame game, PhysicalCard self) {
|
||||
if (PlayConditions.canUseFPCardDuringPhase(game, Phase.FELLOWSHIP, self)
|
||||
&& PlayConditions.canExert(self, game, Filters.gandalf)) {
|
||||
ActivateCardAction action = new ActivateCardAction(self);
|
||||
action.appendCost(new ChooseAndExertCharactersEffect(action, playerId, 1, 1, Filters.gandalf));
|
||||
action.appendEffect(
|
||||
new ChooseAndPutCardFromDeckIntoHandEffect(action, playerId, 1, 1, Culture.GANDALF));
|
||||
action.appendEffect(
|
||||
new ShuffleDeckEffect(playerId));
|
||||
action.appendEffect(
|
||||
new SelfDiscardEffect(self));
|
||||
return Collections.singletonList(action);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,76 @@
|
||||
package com.gempukku.lotro.cards.set40.gandalf;
|
||||
|
||||
import com.gempukku.lotro.cards.AbstractPermanent;
|
||||
import com.gempukku.lotro.cards.PlayConditions;
|
||||
import com.gempukku.lotro.cards.TriggerConditions;
|
||||
import com.gempukku.lotro.cards.actions.PlayPermanentAction;
|
||||
import com.gempukku.lotro.cards.effects.SelfDiscardEffect;
|
||||
import com.gempukku.lotro.cards.effects.choose.ChooseAndExertCharactersEffect;
|
||||
import com.gempukku.lotro.cards.modifiers.conditions.AndCondition;
|
||||
import com.gempukku.lotro.cards.modifiers.conditions.InitiativeCondition;
|
||||
import com.gempukku.lotro.common.CardType;
|
||||
import com.gempukku.lotro.common.Culture;
|
||||
import com.gempukku.lotro.common.Side;
|
||||
import com.gempukku.lotro.common.Zone;
|
||||
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.RequiredTriggerAction;
|
||||
import com.gempukku.lotro.logic.modifiers.Modifier;
|
||||
import com.gempukku.lotro.logic.modifiers.SpotCondition;
|
||||
import com.gempukku.lotro.logic.modifiers.TwilightCostModifier;
|
||||
import com.gempukku.lotro.logic.timing.EffectResult;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Title: *Keep it Secret, Keep it Safe
|
||||
* Set: Second Edition
|
||||
* Side: Free
|
||||
* Culture: Gandalf
|
||||
* Twilight Cost: 1
|
||||
* Type: Condition - Support Area
|
||||
* Card Number: 1U80
|
||||
* Game Text: To play, exert Gandalf.
|
||||
* While you can spot Gandalf and have initiative, the twilight cost of each Free Peoples artifact, condition,
|
||||
* and possession is -1. Discard this condition if you lose initiative.
|
||||
*/
|
||||
public class Card40_080 extends AbstractPermanent {
|
||||
public Card40_080() {
|
||||
super(Side.FREE_PEOPLE, 1, CardType.CONDITION, Culture.GANDALF, Zone.SUPPORT, "Keep it Secret, Keep it Safe", null, true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkPlayRequirements(String playerId, LotroGame game, PhysicalCard self, int withTwilightRemoved, int twilightModifier, boolean ignoreRoamingPenalty, boolean ignoreCheckingDeadPile) {
|
||||
return super.checkPlayRequirements(playerId, game, self, withTwilightRemoved, twilightModifier, ignoreRoamingPenalty, ignoreCheckingDeadPile)
|
||||
&& PlayConditions.canExert(self, game, Filters.gandalf);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PlayPermanentAction getPlayCardAction(String playerId, LotroGame game, PhysicalCard self, int twilightModifier, boolean ignoreRoamingPenalty) {
|
||||
final PlayPermanentAction playCardAction = super.getPlayCardAction(playerId, game, self, twilightModifier, ignoreRoamingPenalty);
|
||||
playCardAction.appendCost(
|
||||
new ChooseAndExertCharactersEffect(playCardAction, playerId, 1, 1, Filters.gandalf));
|
||||
return playCardAction;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<? extends Modifier> getAlwaysOnModifiers(LotroGame game, PhysicalCard self) {
|
||||
TwilightCostModifier modifier = new TwilightCostModifier(
|
||||
self, Filters.and(Side.FREE_PEOPLE, Filters.or(CardType.ARTIFACT, CardType.CONDITION, CardType.POSSESSION)),
|
||||
new AndCondition(new SpotCondition(Filters.gandalf), new InitiativeCondition(Side.FREE_PEOPLE)),
|
||||
-1);
|
||||
return Collections.singletonList(modifier);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<RequiredTriggerAction> getRequiredAfterTriggers(LotroGame game, EffectResult effectResult, PhysicalCard self) {
|
||||
if (TriggerConditions.losesInitiative(effectResult, Side.FREE_PEOPLE)) {
|
||||
RequiredTriggerAction action = new RequiredTriggerAction(self);
|
||||
action.appendEffect(new SelfDiscardEffect(self));
|
||||
return Collections.singletonList(action);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,64 @@
|
||||
package com.gempukku.lotro.cards.set40.gandalf;
|
||||
|
||||
import com.gempukku.lotro.cards.AbstractAttachable;
|
||||
import com.gempukku.lotro.cards.TriggerConditions;
|
||||
import com.gempukku.lotro.cards.effects.AddUntilStartOfPhaseModifierEffect;
|
||||
import com.gempukku.lotro.cards.effects.SelfDiscardEffect;
|
||||
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.RequiredTriggerAction;
|
||||
import com.gempukku.lotro.logic.modifiers.KeywordModifier;
|
||||
import com.gempukku.lotro.logic.modifiers.Modifier;
|
||||
import com.gempukku.lotro.logic.modifiers.StrengthModifier;
|
||||
import com.gempukku.lotro.logic.timing.EffectResult;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Title: *Might of the Maiar
|
||||
* Set: Second Edition
|
||||
* Side: Free
|
||||
* Culture: Gandalf
|
||||
* Twilight Cost: 1
|
||||
* Type: Condition - Companion
|
||||
* Strength: +1
|
||||
* Card Number: 1R81
|
||||
* Game Text: Spell. Bearer must be Gandalf. He is damage +1.
|
||||
* If you lose initiative, discard this condition and make Gandalf strength -2 until the regroup phase.
|
||||
*/
|
||||
public class Card40_081 extends AbstractAttachable {
|
||||
public Card40_081() {
|
||||
super(Side.FREE_PEOPLE, CardType.CONDITION, 1, Culture.GANDALF, null, "Might of the Maiar", null, true);
|
||||
addKeyword(Keyword.SPELL);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Filterable getValidTargetFilter(String playerId, LotroGame game, PhysicalCard self) {
|
||||
return Filters.gandalf;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<? extends Modifier> getAlwaysOnModifiers(LotroGame game, PhysicalCard self) {
|
||||
KeywordModifier damage = new KeywordModifier(self, Filters.hasAttached(self), Keyword.DAMAGE, 1);
|
||||
StrengthModifier strength = new StrengthModifier(self, Filters.hasAttached(self), 1);
|
||||
return Arrays.asList(damage, strength);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<RequiredTriggerAction> getRequiredAfterTriggers(LotroGame game, EffectResult effectResult, PhysicalCard self) {
|
||||
if (TriggerConditions.losesInitiative(effectResult, Side.FREE_PEOPLE)) {
|
||||
RequiredTriggerAction action = new RequiredTriggerAction(self);
|
||||
action.appendEffect(
|
||||
new SelfDiscardEffect(self));
|
||||
action.appendEffect(
|
||||
new AddUntilStartOfPhaseModifierEffect(
|
||||
new StrengthModifier(self, self.getAttachedTo(), -2), Phase.REGROUP));
|
||||
return Collections.singletonList(action);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,72 @@
|
||||
package com.gempukku.lotro.cards.set40.gandalf;
|
||||
|
||||
import com.gempukku.lotro.cards.AbstractAttachable;
|
||||
import com.gempukku.lotro.cards.PlayConditions;
|
||||
import com.gempukku.lotro.cards.TriggerConditions;
|
||||
import com.gempukku.lotro.cards.effects.PreventCardEffect;
|
||||
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.ActivateCardAction;
|
||||
import com.gempukku.lotro.logic.effects.ChooseAndDiscardCardsFromHandEffect;
|
||||
import com.gempukku.lotro.logic.effects.WoundCharactersEffect;
|
||||
import com.gempukku.lotro.logic.modifiers.Modifier;
|
||||
import com.gempukku.lotro.logic.timing.Action;
|
||||
import com.gempukku.lotro.logic.timing.Effect;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Title: *Mithrandir's Touch
|
||||
* Set: Second Edition
|
||||
* Side: Free
|
||||
* Culture: Gandalf
|
||||
* Twilight Cost: 1
|
||||
* Type: Condition - Companion
|
||||
* Vitality: +1
|
||||
* Card Number: 1R82
|
||||
* Game Text: To play, spot Gandalf. Bearer must be an unbound companion (except Gandalf).
|
||||
* Response: If bearer is about to take a wound in a skirmish, discard 2 [GANDALF] cards from hand to prevent that wound.
|
||||
*/
|
||||
public class Card40_082 extends AbstractAttachable {
|
||||
public Card40_082() {
|
||||
super(Side.FREE_PEOPLE, CardType.CONDITION, 1, Culture.GANDALF, null, "Mithrandir's Touch", null, true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkPlayRequirements(String playerId, LotroGame game, PhysicalCard self, int withTwilightRemoved, Filter additionalAttachmentFilter, int twilightModifier) {
|
||||
return super.checkPlayRequirements(playerId, game, self, withTwilightRemoved, additionalAttachmentFilter, twilightModifier)
|
||||
&& PlayConditions.canSpot(game, Filters.gandalf);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Filterable getValidTargetFilter(String playerId, LotroGame game, PhysicalCard self) {
|
||||
return Filters.and(Filters.unboundCompanion, Filters.not(Filters.gandalf));
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<? extends Modifier> getAlwaysOnModifiers(LotroGame game, PhysicalCard self) {
|
||||
VitalityModifier vitality = new VitalityModifier(self, Filters.hasAttached(self), 1);
|
||||
return Collections.singletonList(vitality);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<? extends Action> getOptionalInPlayBeforeActions(String playerId, LotroGame game, Effect effect, PhysicalCard self) {
|
||||
if (TriggerConditions.isGettingWounded(effect, game, Filters.hasAttached(self))
|
||||
&& PlayConditions.isPhase(game, Phase.SKIRMISH)
|
||||
&& PlayConditions.canDiscardFromHand(game, playerId, 2, Culture.GANDALF)) {
|
||||
WoundCharactersEffect woundEffect = (WoundCharactersEffect) effect;
|
||||
ActivateCardAction action = new ActivateCardAction(self);
|
||||
action.appendCost(
|
||||
new ChooseAndDiscardCardsFromHandEffect(action, playerId, false, 2, Culture.GANDALF));
|
||||
action.appendEffect(
|
||||
new PreventCardEffect(woundEffect, self.getAttachedTo()));
|
||||
return Collections.singletonList(action);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,52 @@
|
||||
package com.gempukku.lotro.cards.set40.gandalf;
|
||||
|
||||
import com.gempukku.lotro.cards.AbstractEvent;
|
||||
import com.gempukku.lotro.cards.PlayConditions;
|
||||
import com.gempukku.lotro.cards.actions.PlayEventAction;
|
||||
import com.gempukku.lotro.cards.effects.AddUntilStartOfPhaseModifierEffect;
|
||||
import com.gempukku.lotro.cards.effects.choose.ChooseAndExertCharactersEffect;
|
||||
import com.gempukku.lotro.cards.modifiers.CantTakeMoreThanXWoundsModifier;
|
||||
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.modifiers.StrengthModifier;
|
||||
|
||||
/**
|
||||
* Title: My Brave Hobbits
|
||||
* Set: Second Edition
|
||||
* Side: Free
|
||||
* Culture: Gandalf
|
||||
* Twilight Cost: 2
|
||||
* Type: Event - Maneuver
|
||||
* Card Number: 1C83
|
||||
* Game Text: Spell. To play, spot 2 Hobbit companions and exert Gandalf twice.
|
||||
* Until the regroup phase, Hobbit companions are strength +3 and take no more than one wound in a skirmish.
|
||||
*/
|
||||
public class Card40_083 extends AbstractEvent {
|
||||
public Card40_083() {
|
||||
super(Side.FREE_PEOPLE, 2, Culture.GANDALF, "My Brave Hobbits", Phase.MANEUVER);
|
||||
addKeyword(Keyword.SPELL);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkPlayRequirements(String playerId, LotroGame game, PhysicalCard self, int withTwilightRemoved, int twilightModifier, boolean ignoreRoamingPenalty, boolean ignoreCheckingDeadPile) {
|
||||
return super.checkPlayRequirements(playerId, game, self, withTwilightRemoved, twilightModifier, ignoreRoamingPenalty, ignoreCheckingDeadPile)
|
||||
&& PlayConditions.canSpot(game, 2, Race.HOBBIT, CardType.COMPANION)
|
||||
&& PlayConditions.canExert(self, game, 2, Filters.gandalf);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PlayEventAction getPlayCardAction(String playerId, LotroGame game, PhysicalCard self, int twilightModifier, boolean ignoreRoamingPenalty) {
|
||||
PlayEventAction action = new PlayEventAction(self);
|
||||
action.appendCost(
|
||||
new ChooseAndExertCharactersEffect(action, playerId, 1, 1, 2, Filters.gandalf));
|
||||
action.appendEffect(
|
||||
new AddUntilStartOfPhaseModifierEffect(
|
||||
new StrengthModifier(self, Filters.and(Race.HOBBIT, CardType.COMPANION), 3), Phase.REGROUP));
|
||||
action.appendEffect(
|
||||
new AddUntilStartOfPhaseModifierEffect(
|
||||
new CantTakeMoreThanXWoundsModifier(self, Phase.SKIRMISH, 1, Race.HOBBIT, CardType.COMPANION), Phase.REGROUP));
|
||||
return action;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,67 @@
|
||||
package com.gempukku.lotro.cards.set40.gandalf;
|
||||
|
||||
import com.gempukku.lotro.cards.AbstractEvent;
|
||||
import com.gempukku.lotro.cards.PlayConditions;
|
||||
import com.gempukku.lotro.cards.actions.PlayEventAction;
|
||||
import com.gempukku.lotro.cards.effects.CancelSkirmishEffect;
|
||||
import com.gempukku.lotro.cards.effects.ChoiceEffect;
|
||||
import com.gempukku.lotro.common.Culture;
|
||||
import com.gempukku.lotro.common.Phase;
|
||||
import com.gempukku.lotro.common.Side;
|
||||
import com.gempukku.lotro.filters.Filters;
|
||||
import com.gempukku.lotro.game.PhysicalCard;
|
||||
import com.gempukku.lotro.game.state.LotroGame;
|
||||
import com.gempukku.lotro.logic.effects.ChooseAndHealCharactersEffect;
|
||||
import com.gempukku.lotro.logic.timing.Effect;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Title: Narrow Escape
|
||||
* Set: Second Edition
|
||||
* Side: Free
|
||||
* Culture: Gandalf
|
||||
* Twilight Cost: 2
|
||||
* Type: Event - Skirmish
|
||||
* Card Number: 1C85
|
||||
* Game Text: Spot Saruman to cancel a skirmish involving Gandalf or spot Gandalf to heal him once for each threat.
|
||||
*/
|
||||
public class Card40_085 extends AbstractEvent {
|
||||
public Card40_085() {
|
||||
super(Side.FREE_PEOPLE, 2, Culture.GANDALF, "Narrow Escape", Phase.SKIRMISH);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkPlayRequirements(String playerId, LotroGame game, PhysicalCard self, int withTwilightRemoved, int twilightModifier, boolean ignoreRoamingPenalty, boolean ignoreCheckingDeadPile) {
|
||||
return super.checkPlayRequirements(playerId, game, self, withTwilightRemoved, twilightModifier, ignoreRoamingPenalty, ignoreCheckingDeadPile)
|
||||
&& PlayConditions.canSpot(game, Filters.or(Filters.gandalf, Filters.saruman));
|
||||
}
|
||||
|
||||
@Override
|
||||
public PlayEventAction getPlayCardAction(String playerId, LotroGame game, PhysicalCard self, int twilightModifier, boolean ignoreRoamingPenalty) {
|
||||
PlayEventAction action = new PlayEventAction(self);
|
||||
List<Effect> possibleEffects = new ArrayList<Effect>(2);
|
||||
if (PlayConditions.canSpot(game, Filters.saruman)) {
|
||||
possibleEffects.add(
|
||||
new CancelSkirmishEffect(Filters.gandalf) {
|
||||
@Override
|
||||
public String getText(LotroGame game) {
|
||||
return "Cancel skirmish involving Gandalf";
|
||||
}
|
||||
});
|
||||
}
|
||||
if (PlayConditions.canSpot(game, Filters.gandalf)) {
|
||||
possibleEffects.add(
|
||||
new ChooseAndHealCharactersEffect(action, playerId, 1, 1, game.getGameState().getThreats(), Filters.gandalf) {
|
||||
@Override
|
||||
public String getText(LotroGame game) {
|
||||
return "Heal Gandalf once for each threat";
|
||||
}
|
||||
});
|
||||
}
|
||||
action.appendEffect(
|
||||
new ChoiceEffect(action, playerId, possibleEffects));
|
||||
return action;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,72 @@
|
||||
package com.gempukku.lotro.cards.set40.gandalf;
|
||||
|
||||
import com.gempukku.lotro.cards.AbstractEvent;
|
||||
import com.gempukku.lotro.cards.TriggerConditions;
|
||||
import com.gempukku.lotro.cards.actions.PlayEventAction;
|
||||
import com.gempukku.lotro.cards.effects.AddUntilEndOfPhaseActionProxyEffect;
|
||||
import com.gempukku.lotro.cards.effects.ReplaceInSkirmishEffect;
|
||||
import com.gempukku.lotro.cards.effects.choose.ChooseAndAddUntilEOPStrengthBonusEffect;
|
||||
import com.gempukku.lotro.common.Culture;
|
||||
import com.gempukku.lotro.common.Phase;
|
||||
import com.gempukku.lotro.common.Side;
|
||||
import com.gempukku.lotro.filters.Filters;
|
||||
import com.gempukku.lotro.game.AbstractActionProxy;
|
||||
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.ChooseActiveCardEffect;
|
||||
import com.gempukku.lotro.logic.timing.EffectResult;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Title: Protector of the West
|
||||
* Set: Second Edition
|
||||
* Side: Free
|
||||
* Culture: Gandalf
|
||||
* Twilight Cost: 2
|
||||
* Type: Event - Skirmish
|
||||
* Card Number: 1U86
|
||||
* Game Text: Make Gandalf strength +2. If he wins this skirmish, you may have him replace another unbound companion assigned to a skirmish.
|
||||
*/
|
||||
public class Card40_086 extends AbstractEvent {
|
||||
public Card40_086() {
|
||||
super(Side.FREE_PEOPLE, 2, Culture.GANDALF, "Protector of the West", Phase.SKIRMISH);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PlayEventAction getPlayCardAction(String playerId, LotroGame game, final PhysicalCard self, int twilightModifier, boolean ignoreRoamingPenalty) {
|
||||
final PlayEventAction action = new PlayEventAction(self);
|
||||
action.appendEffect(
|
||||
new ChooseAndAddUntilEOPStrengthBonusEffect(action, self, playerId, 2, Filters.gandalf) {
|
||||
@Override
|
||||
protected void selectedCharacterCallback(final PhysicalCard gandalf) {
|
||||
action.appendEffect(
|
||||
new AddUntilEndOfPhaseActionProxyEffect(
|
||||
new AbstractActionProxy() {
|
||||
@Override
|
||||
public List<? extends OptionalTriggerAction> getOptionalAfterTriggers(String playerId, LotroGame game, EffectResult effectResult) {
|
||||
if (playerId.equals(self.getOwner())
|
||||
&& TriggerConditions.winsSkirmish(game, effectResult, gandalf)) {
|
||||
final OptionalTriggerAction action = new OptionalTriggerAction(self);
|
||||
action.setVirtualCardAction(true);
|
||||
action.appendEffect(
|
||||
new ChooseActiveCardEffect(self, playerId, "Choose unbound companion assigned to skirmish",
|
||||
Filters.unboundCompanion, Filters.not(gandalf), Filters.assignedToSkirmish) {
|
||||
@Override
|
||||
protected void cardSelected(LotroGame game, PhysicalCard card) {
|
||||
action.appendEffect(
|
||||
new ReplaceInSkirmishEffect(gandalf, card));
|
||||
}
|
||||
});
|
||||
return Collections.singletonList(action);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}));
|
||||
}
|
||||
});
|
||||
return action;
|
||||
}
|
||||
}
|
||||
@@ -231,3 +231,4 @@ gl_theOneRing,1_2
|
||||
# Second edition
|
||||
40_2,1_2
|
||||
40_59,1_66
|
||||
40_84,1_78
|
||||
|
||||
Reference in New Issue
Block a user