Migrated Gandalf cards in set 11 to hjson

This commit is contained in:
MarcinSc
2024-05-17 01:37:34 +07:00
parent 30fa310065
commit 28fec9a8f2
15 changed files with 272 additions and 792 deletions

View File

@@ -1,65 +0,0 @@
package com.gempukku.lotro.cards.set11.gandalf;
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.cardtype.AbstractPermanent;
import com.gempukku.lotro.logic.effects.ChooseAndDiscardCardsFromHandEffect;
import com.gempukku.lotro.logic.effects.PutCardFromStackedIntoHandEffect;
import com.gempukku.lotro.logic.effects.choose.ChooseAndStackCardsFromHandEffect;
import com.gempukku.lotro.logic.effects.choose.ChooseStackedCardsEffect;
import com.gempukku.lotro.logic.timing.PlayConditions;
import java.util.Collection;
import java.util.Collections;
import java.util.List;
/**
* Set: Shadows
* Side: Free
* Culture: Gandalf
* Twilight Cost: 1
* Type: Possession • Support Area
* Game Text: To play, spot a [GANDALF] Wizard. Regroup: Stack a spell from hand here. Fellowship: Discard a [GANDALF]
* card from hand to take a card stacked here into hand.
*/
public class Card11_028 extends AbstractPermanent {
public Card11_028() {
super(Side.FREE_PEOPLE, 1, CardType.POSSESSION, Culture.GANDALF, "The Art of Gandalf");
}
@Override
public boolean checkPlayRequirements(LotroGame game, PhysicalCard self) {
return PlayConditions.canSpot(game, Culture.GANDALF, Race.WIZARD);
}
@Override
public List<? extends ActivateCardAction> getPhaseActionsInPlay(String playerId, LotroGame game, PhysicalCard self) {
if (PlayConditions.canUseFPCardDuringPhase(game, Phase.REGROUP, self)) {
ActivateCardAction action = new ActivateCardAction(self);
action.appendEffect(
new ChooseAndStackCardsFromHandEffect(action, playerId, 1, 1, self, Keyword.SPELL));
return Collections.singletonList(action);
}
if (PlayConditions.canUseFPCardDuringPhase(game, Phase.FELLOWSHIP, self)
&& PlayConditions.canDiscardFromHand(game, playerId, 1, Culture.GANDALF)) {
final ActivateCardAction action = new ActivateCardAction(self);
action.appendCost(
new ChooseAndDiscardCardsFromHandEffect(action, playerId, false, 1, Culture.GANDALF));
action.appendEffect(
new ChooseStackedCardsEffect(action, playerId, 1, 1, self, Filters.any) {
@Override
protected void cardsChosen(LotroGame game, Collection<PhysicalCard> stackedCards) {
for (PhysicalCard stackedCard : stackedCards) {
action.appendEffect(
new PutCardFromStackedIntoHandEffect(stackedCard));
}
}
});
return Collections.singletonList(action);
}
return null;
}
}

View File

@@ -1,40 +0,0 @@
package com.gempukku.lotro.cards.set11.gandalf;
import com.gempukku.lotro.common.*;
import com.gempukku.lotro.game.PhysicalCard;
import com.gempukku.lotro.game.state.LotroGame;
import com.gempukku.lotro.logic.actions.PlayEventAction;
import com.gempukku.lotro.logic.cardtype.AbstractEvent;
import com.gempukku.lotro.logic.effects.RemoveBurdenEffect;
import com.gempukku.lotro.logic.effects.choose.ChooseAndExertCharactersEffect;
import com.gempukku.lotro.logic.timing.PlayConditions;
/**
* Set: Shadows
* Side: Free
* Culture: Gandalf
* Twilight Cost: 2
* Type: Event • Fellowship
* Game Text: Exert a [GANDALF] Wizard to remove a burden (or 2 burdens, if the fellowship is at a dwelling site).
*/
public class Card11_029 extends AbstractEvent {
public Card11_029() {
super(Side.FREE_PEOPLE, 2, Culture.GANDALF, "Ease the Burden", Phase.FELLOWSHIP);
}
@Override
public boolean checkPlayRequirements(LotroGame game, PhysicalCard self) {
return PlayConditions.canExert(self, game, Culture.GANDALF, Race.WIZARD);
}
@Override
public PlayEventAction getPlayEventCardAction(String playerId, LotroGame game, PhysicalCard self) {
PlayEventAction action = new PlayEventAction(self);
action.appendCost(
new ChooseAndExertCharactersEffect(action, playerId, 1, 1, Culture.GANDALF, Race.WIZARD));
int count = PlayConditions.location(game, Keyword.DWELLING) ? 2 : 1;
action.appendEffect(
new RemoveBurdenEffect(playerId, self, count));
return action;
}
}

View File

@@ -1,50 +0,0 @@
package com.gempukku.lotro.cards.set11.gandalf;
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.cardtype.AbstractCompanion;
import com.gempukku.lotro.logic.effects.SelfExertEffect;
import com.gempukku.lotro.logic.effects.choose.ChooseAndPutCardFromDiscardIntoHandEffect;
import com.gempukku.lotro.logic.timing.PlayConditions;
import java.util.Collections;
import java.util.List;
/**
* Set: Shadows
* Side: Free
* Culture: Gandalf
* Twilight Cost: 2
* Type: Companion • Man
* Strength: 5
* Vitality: 3
* Resistance: 6
* Game Text: To play, spot a [GANDALF] companion. Skirmish: Exert Erland to take a [GANDALF] skirmish event from your
* discard pile into hand.
*/
public class Card11_030 extends AbstractCompanion {
public Card11_030() {
super(2, 5, 3, 6, Culture.GANDALF, Race.MAN, null, "Erland", "Dale Counselor", true);
}
@Override
public boolean checkPlayRequirements(LotroGame game, PhysicalCard self) {
return PlayConditions.canSpot(game, Culture.GANDALF, CardType.COMPANION);
}
@Override
public List<? extends ActivateCardAction> getPhaseActionsInPlay(String playerId, LotroGame game, PhysicalCard self) {
if (PlayConditions.canUseFPCardDuringPhase(game, Phase.SKIRMISH, self)
&& PlayConditions.canSelfExert(self, game)) {
ActivateCardAction action = new ActivateCardAction(self);
action.appendCost(
new SelfExertEffect(action, self));
action.appendEffect(
new ChooseAndPutCardFromDiscardIntoHandEffect(action, playerId, 1, 1, Culture.GANDALF, CardType.EVENT, Keyword.SKIRMISH));
return Collections.singletonList(action);
}
return null;
}
}

View File

@@ -1,50 +0,0 @@
package com.gempukku.lotro.cards.set11.gandalf;
import com.gempukku.lotro.common.Culture;
import com.gempukku.lotro.common.Phase;
import com.gempukku.lotro.common.Race;
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.actions.PlayEventAction;
import com.gempukku.lotro.logic.cardtype.AbstractEvent;
import com.gempukku.lotro.logic.effects.ChooseAndDiscardCardsFromHandEffect;
import com.gempukku.lotro.logic.effects.choose.ChooseAndExertCharactersEffect;
import com.gempukku.lotro.logic.effects.choose.ChooseAndPutCardFromDiscardIntoHandEffect;
import com.gempukku.lotro.logic.timing.PlayConditions;
/**
* Set: Shadows
* Side: Free
* Culture: Gandalf
* Twilight Cost: 1
* Type: Event • Fellowship
* Game Text: To play, exert a [GANDALF] Wizard. Discard 2 cards from hand to take a Free Peoples card and a Shadow card
* from your discard pile into hand.
*/
public class Card11_031 extends AbstractEvent {
public Card11_031() {
super(Side.FREE_PEOPLE, 1, Culture.GANDALF, "Final Account", Phase.FELLOWSHIP);
}
@Override
public boolean checkPlayRequirements(LotroGame game, PhysicalCard self) {
return PlayConditions.canExert(self, game, Culture.GANDALF, Race.WIZARD)
&& PlayConditions.canDiscardCardsFromHandToPlay(self, game, self.getOwner(), 2, Filters.any);
}
@Override
public PlayEventAction getPlayEventCardAction(String playerId, LotroGame game, PhysicalCard self) {
PlayEventAction action = new PlayEventAction(self);
action.appendCost(
new ChooseAndExertCharactersEffect(action, playerId, 1, 1, Culture.GANDALF, Race.WIZARD));
action.appendCost(
new ChooseAndDiscardCardsFromHandEffect(action, playerId, false, 2));
action.appendEffect(
new ChooseAndPutCardFromDiscardIntoHandEffect(action, playerId, 1, 1, Side.FREE_PEOPLE));
action.appendEffect(
new ChooseAndPutCardFromDiscardIntoHandEffect(action, playerId, 1, 1, Side.SHADOW));
return action;
}
}

View File

@@ -1,35 +0,0 @@
package com.gempukku.lotro.cards.set11.gandalf;
import com.gempukku.lotro.common.CardType;
import com.gempukku.lotro.common.Culture;
import com.gempukku.lotro.common.Race;
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.cardtype.AbstractPermanent;
import com.gempukku.lotro.logic.modifiers.Modifier;
import com.gempukku.lotro.logic.modifiers.SpotCondition;
import com.gempukku.lotro.logic.modifiers.StrengthModifier;
import java.util.Collections;
import java.util.List;
/**
* Set: Shadows
* Side: Free
* Culture: Gandalf
* Twilight Cost: 3
* Type: Condition • Support Area
* Game Text: While you can spot a [GANDALF] Wizard, each companion who has resistance 6 or more is strength +1.
*/
public class Card11_032 extends AbstractPermanent {
public Card11_032() {
super(Side.FREE_PEOPLE, 3, CardType.CONDITION, Culture.GANDALF, "G for Grand");
}
@Override
public List<? extends Modifier> getInPlayModifiers(LotroGame game, PhysicalCard self) {
return Collections.singletonList(new StrengthModifier(self, Filters.and(CardType.COMPANION, Filters.minResistance(6)), new SpotCondition(Culture.GANDALF, Race.WIZARD), 1));
}
}

View File

@@ -1,45 +0,0 @@
package com.gempukku.lotro.cards.set11.gandalf;
import com.gempukku.lotro.common.CardType;
import com.gempukku.lotro.common.Culture;
import com.gempukku.lotro.common.Race;
import com.gempukku.lotro.filters.Filters;
import com.gempukku.lotro.game.PhysicalCard;
import com.gempukku.lotro.game.state.LotroGame;
import com.gempukku.lotro.logic.cardtype.AbstractCompanion;
import com.gempukku.lotro.logic.modifiers.Modifier;
import com.gempukku.lotro.logic.modifiers.StrengthModifier;
import com.gempukku.lotro.logic.modifiers.condition.LocationCondition;
import java.util.LinkedList;
import java.util.List;
/**
* Set: Shadows
* Side: Free
* Culture: Gandalf
* Twilight Cost: 4
* Type: Companion • Wizard
* Strength: 7
* Vitality: 4
* Resistance: 7
* Game Text: While Gandalf is in region 1, each other companion is strength +2. While Gandalf is in region 2, each
* companion is strength +1. While Gandalf is in region 3, he is strength +2.
*/
public class Card11_033 extends AbstractCompanion {
public Card11_033() {
super(4, 7, 4, 7, Culture.GANDALF, Race.WIZARD, null, "Gandalf", "Leader of the Company", true);
}
@Override
public List<? extends Modifier> getInPlayModifiers(LotroGame game, PhysicalCard self) {
List<Modifier> modifiers = new LinkedList<>();
modifiers.add(
new StrengthModifier(self, Filters.and(CardType.COMPANION, Filters.not(self)), new LocationCondition(Filters.region(1)), 2));
modifiers.add(
new StrengthModifier(self, CardType.COMPANION, new LocationCondition(Filters.region(2)), 1));
modifiers.add(
new StrengthModifier(self, self, new LocationCondition(Filters.region(3)), 2));
return modifiers;
}
}

View File

@@ -1,62 +0,0 @@
package com.gempukku.lotro.cards.set11.gandalf;
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.cardtype.AbstractAttachableFPPossession;
import com.gempukku.lotro.logic.effects.ChooseAndWoundCharactersEffect;
import com.gempukku.lotro.logic.effects.choose.ChooseOpponentEffect;
import com.gempukku.lotro.logic.modifiers.KeywordModifier;
import com.gempukku.lotro.logic.modifiers.Modifier;
import com.gempukku.lotro.logic.timing.EffectResult;
import com.gempukku.lotro.logic.timing.TriggerConditions;
import java.util.Collections;
import java.util.List;
/**
* Set: Shadows
* Side: Free
* Culture: Gandalf
* Twilight Cost: 2
* Type: Artifact • Staff
* Vitality: +1
* Game Text: Bearer must be a Wizard. If bearer is Gandalf, he gains muster. (At the start of the regroup phase, you
* may discard a card from hand to draw a card.) Each time bearer wins a skirmish, choose a Shadow player who must wound
* a minion.
*/
public class Card11_034 extends AbstractAttachableFPPossession {
public Card11_034() {
super(2, 0, 1, Culture.GANDALF, CardType.ARTIFACT, PossessionClass.STAFF, "Gandalf's Staff", "Ash-staff", true);
}
@Override
public Filterable getValidTargetFilter(String playerId, LotroGame game, PhysicalCard self) {
return Race.WIZARD;
}
@Override
public List<? extends Modifier> getInPlayModifiers(LotroGame game, PhysicalCard self) {
return Collections.singletonList(
new KeywordModifier(self, Filters.and(Filters.hasAttached(self), Filters.gandalf), Keyword.MUSTER));
}
@Override
public List<RequiredTriggerAction> getRequiredAfterTriggers(LotroGame game, EffectResult effectResult, PhysicalCard self) {
if (TriggerConditions.winsSkirmish(game, effectResult, Filters.hasAttached(self))) {
final RequiredTriggerAction action = new RequiredTriggerAction(self);
action.appendEffect(
new ChooseOpponentEffect(self.getOwner()) {
@Override
protected void opponentChosen(String opponentId) {
action.appendEffect(
new ChooseAndWoundCharactersEffect(action, opponentId, 1, 1, CardType.MINION));
}
});
return Collections.singletonList(action);
}
return null;
}
}

View File

@@ -1,47 +0,0 @@
package com.gempukku.lotro.cards.set11.gandalf;
import com.gempukku.lotro.logic.cardtype.AbstractAttachableFPPossession;
import com.gempukku.lotro.logic.timing.TriggerConditions;
import com.gempukku.lotro.logic.effects.RemoveBurdenEffect;
import com.gempukku.lotro.common.Culture;
import com.gempukku.lotro.common.Filterable;
import com.gempukku.lotro.common.PossessionClass;
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.OptionalTriggerAction;
import com.gempukku.lotro.logic.timing.EffectResult;
import java.util.Collections;
import java.util.List;
/**
* Set: Shadows
* Side: Free
* Culture: Gandalf
* Twilight Cost: 2
* Type: Possession • Hand Weapon
* Strength: +2
* Game Text: Bearer must be Gandalf. Each time Gandalf wins a skirmish, you may remove a burden.
*/
public class Card11_035 extends AbstractAttachableFPPossession {
public Card11_035() {
super(2, 2, 0, Culture.GANDALF, PossessionClass.HAND_WEAPON, "Glamdring", "Foe-hammer", true);
}
@Override
public Filterable getValidTargetFilter(String playerId, LotroGame game, PhysicalCard self) {
return Filters.gandalf;
}
@Override
public List<OptionalTriggerAction> getOptionalAfterTriggers(String playerId, LotroGame game, EffectResult effectResult, PhysicalCard self) {
if (TriggerConditions.winsSkirmish(game, effectResult, Filters.gandalf)) {
OptionalTriggerAction action = new OptionalTriggerAction(self);
action.appendEffect(
new RemoveBurdenEffect(playerId, self));
return Collections.singletonList(action);
}
return null;
}
}

View File

@@ -1,49 +0,0 @@
package com.gempukku.lotro.cards.set11.gandalf;
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.PlayEventAction;
import com.gempukku.lotro.logic.cardtype.AbstractEvent;
import com.gempukku.lotro.logic.effects.RevealHandEffect;
import com.gempukku.lotro.logic.effects.choose.ChooseAndAddUntilEOPStrengthBonusEffect;
import com.gempukku.lotro.logic.timing.PlayConditions;
import java.util.Collection;
/**
* Set: Shadows
* Side: Free
* Culture: Gandalf
* Twilight Cost: 1
* Type: Event • Skirmish
* Game Text: Spot a [GANDALF] Wizard to reveal your hand and make a minion strength -3 for each companion in your hand
* (or -4 for each if the fellowship is at a battleground site).
*/
public class Card11_036 extends AbstractEvent {
public Card11_036() {
super(Side.FREE_PEOPLE, 1, Culture.GANDALF, "Inspiration", Phase.SKIRMISH);
}
@Override
public boolean checkPlayRequirements(LotroGame game, PhysicalCard self) {
return PlayConditions.canSpot(game, Culture.GANDALF, Race.WIZARD);
}
@Override
public PlayEventAction getPlayEventCardAction(final String playerId, final LotroGame game, final PhysicalCard self) {
final PlayEventAction action = new PlayEventAction(self);
action.appendEffect(
new RevealHandEffect(self, playerId, playerId) {
@Override
protected void cardsRevealed(Collection<? extends PhysicalCard> cards) {
int companionCount = Filters.filter(cards, game, CardType.COMPANION).size();
int penalty = companionCount * (PlayConditions.location(game, Keyword.BATTLEGROUND) ? -4 : -3);
action.appendEffect(
new ChooseAndAddUntilEOPStrengthBonusEffect(action, self, playerId, penalty, CardType.MINION));
}
});
return action;
}
}

View File

@@ -1,66 +0,0 @@
package com.gempukku.lotro.cards.set11.gandalf;
import com.gempukku.lotro.common.CardType;
import com.gempukku.lotro.common.Culture;
import com.gempukku.lotro.common.Race;
import com.gempukku.lotro.common.Side;
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.cardtype.AbstractPermanent;
import com.gempukku.lotro.logic.effects.CancelActivatedEffect;
import com.gempukku.lotro.logic.effects.RemoveTwilightEffect;
import com.gempukku.lotro.logic.effects.SelfDiscardEffect;
import com.gempukku.lotro.logic.timing.EffectResult;
import com.gempukku.lotro.logic.timing.PlayConditions;
import com.gempukku.lotro.logic.timing.TriggerConditions;
import com.gempukku.lotro.logic.timing.results.ActivateCardResult;
import java.util.Collections;
import java.util.List;
/**
* Set: Shadows
* Side: Free
* Culture: Gandalf
* Twilight Cost: 1
* Type: Condition • Support Area
* Game Text: To play, spot a [GANDALF] Wizard. Each time a Shadow card adds a burden, you may remove (3).
* Response: If a minion uses its special ability, discard this condition to cancel the effect of that special ability.
*/
public class Card11_037 extends AbstractPermanent {
public Card11_037() {
super(Side.FREE_PEOPLE, 1, CardType.CONDITION, Culture.GANDALF, "New Authority", null, true);
}
@Override
public boolean checkPlayRequirements(LotroGame game, PhysicalCard self) {
return PlayConditions.canSpot(game, Culture.GANDALF, Race.WIZARD);
}
@Override
public List<OptionalTriggerAction> getOptionalAfterTriggers(String playerId, LotroGame game, EffectResult effectResult, PhysicalCard self) {
if (TriggerConditions.addedBurden(game, effectResult, Side.SHADOW)) {
OptionalTriggerAction action = new OptionalTriggerAction(self);
action.appendEffect(
new RemoveTwilightEffect(3));
return Collections.singletonList(action);
}
return null;
}
@Override
public List<? extends ActivateCardAction> getOptionalInPlayAfterActions(String playerId, LotroGame game, EffectResult effectResult, PhysicalCard self) {
if (TriggerConditions.activated(game, effectResult, CardType.MINION)
&& PlayConditions.canSelfDiscard(self, game)) {
ActivateCardAction action = new ActivateCardAction(self);
action.appendCost(
new SelfDiscardEffect(self));
action.appendEffect(
new CancelActivatedEffect(self, (ActivateCardResult) effectResult));
return Collections.singletonList(action);
}
return null;
}
}

View File

@@ -1,39 +0,0 @@
package com.gempukku.lotro.cards.set11.gandalf;
import com.gempukku.lotro.common.*;
import com.gempukku.lotro.game.PhysicalCard;
import com.gempukku.lotro.game.state.LotroGame;
import com.gempukku.lotro.logic.actions.PlayEventAction;
import com.gempukku.lotro.logic.cardtype.AbstractEvent;
import com.gempukku.lotro.logic.effects.choose.ChooseAndDiscardCardsFromPlayEffect;
import com.gempukku.lotro.logic.timing.PlayConditions;
/**
* Set: Shadows
* Side: Free
* Culture: Gandalf
* Twilight Cost: 6
* Type: Event • Fellowship
* Game Text: Spell. Toil 2. (For each [GANDALF] character you exert when playing this, its twilight cost is -2.)
* Spot a [GANDALF] Wizard to discard 2 conditions from play.
*/
public class Card11_038 extends AbstractEvent {
public Card11_038() {
super(Side.FREE_PEOPLE, 6, Culture.GANDALF, "New-awakened", Phase.FELLOWSHIP);
addKeyword(Keyword.SPELL);
addKeyword(Keyword.TOIL, 2);
}
@Override
public boolean checkPlayRequirements(LotroGame game, PhysicalCard self) {
return PlayConditions.canSpot(game, Culture.GANDALF, Race.WIZARD);
}
@Override
public PlayEventAction getPlayEventCardAction(String playerId, LotroGame game, PhysicalCard self) {
PlayEventAction action = new PlayEventAction(self);
action.appendEffect(
new ChooseAndDiscardCardsFromPlayEffect(action, playerId, 2, 2, CardType.CONDITION));
return action;
}
}

View File

@@ -1,46 +0,0 @@
package com.gempukku.lotro.cards.set11.gandalf;
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.PlayEventAction;
import com.gempukku.lotro.logic.cardtype.AbstractEvent;
import com.gempukku.lotro.logic.effects.ChooseAndWoundCharactersEffect;
import com.gempukku.lotro.logic.effects.choose.ChooseAndExertCharactersEffect;
import com.gempukku.lotro.logic.timing.PlayConditions;
/**
* Set: Shadows
* Side: Free
* Culture: Gandalf
* Twilight Cost: 3
* Type: Event • Skirmish
* Game Text: Exert a [GANDALF] Wizard and spot 2 companions who each have resistance 7 or more to wound a minion that
* Wizard is skirmishing twice.
*/
public class Card11_039 extends AbstractEvent {
public Card11_039() {
super(Side.FREE_PEOPLE, 3, Culture.GANDALF, "Prolonged Struggle", Phase.SKIRMISH);
}
@Override
public boolean checkPlayRequirements(LotroGame game, PhysicalCard self) {
return PlayConditions.canExert(self, game, Culture.GANDALF, Race.WIZARD)
&& PlayConditions.canSpot(game, 2, CardType.COMPANION, Filters.minResistance(7));
}
@Override
public PlayEventAction getPlayEventCardAction(final String playerId, LotroGame game, PhysicalCard self) {
final PlayEventAction action = new PlayEventAction(self);
action.appendCost(
new ChooseAndExertCharactersEffect(action, playerId, 1, 1, Culture.GANDALF, Race.WIZARD) {
@Override
protected void forEachCardExertedCallback(PhysicalCard character) {
action.appendEffect(
new ChooseAndWoundCharactersEffect(action, playerId, 1, 1, 2, CardType.MINION, Filters.inSkirmishAgainst(character)));
}
});
return action;
}
}

View File

@@ -1,56 +0,0 @@
package com.gempukku.lotro.cards.set11.gandalf;
import com.gempukku.lotro.common.Culture;
import com.gempukku.lotro.common.Filterable;
import com.gempukku.lotro.common.PossessionClass;
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.OptionalTriggerAction;
import com.gempukku.lotro.logic.cardtype.AbstractAttachableFPPossession;
import com.gempukku.lotro.logic.effects.AddBurdenEffect;
import com.gempukku.lotro.logic.effects.PreventableCardEffect;
import com.gempukku.lotro.logic.effects.choose.ChooseAndPreventCardEffect;
import com.gempukku.lotro.logic.timing.Effect;
import com.gempukku.lotro.logic.timing.TriggerConditions;
import java.util.Collections;
import java.util.List;
/**
* Set: Shadows
* Side: Free
* Culture: Gandalf
* Twilight Cost: 2
* Type: Possession • Mount
* Resistance: +2
* Game Text: Bearer must be Gandalf. Each time Gandalf is about to take a wound, you may add a burden to prevent that.
*/
public class Card11_040 extends AbstractAttachableFPPossession {
public Card11_040() {
super(2, 0, 0, Culture.GANDALF, PossessionClass.MOUNT, "Shadowfax", "Unequaled Steed", true);
}
@Override
public Filterable getValidTargetFilter(String playerId, LotroGame game, PhysicalCard self) {
return Filters.gandalf;
}
@Override
public int getResistance() {
return 2;
}
@Override
public List<OptionalTriggerAction> getOptionalBeforeTriggers(String playerId, LotroGame game, Effect effect, PhysicalCard self) {
if (TriggerConditions.isGettingWounded(effect, game, Filters.gandalf)) {
OptionalTriggerAction action = new OptionalTriggerAction(self);
action.appendCost(
new AddBurdenEffect(playerId, self, 1));
action.appendEffect(
new ChooseAndPreventCardEffect(self, (PreventableCardEffect) effect, playerId, "Choose Gandalf", Filters.gandalf));
return Collections.singletonList(action);
}
return null;
}
}

View File

@@ -23,17 +23,37 @@
type: Possession
#target:
keywords: Support Area
/*requires: {
}
effects: [
{
}
{
}
]*/
{
type: toPlay
requires: {
type: canSpot
filter: culture(gandalf),wizard
}
}
{
type: activated
phase: regroup
effect: {
type: stackCardsFromHand
filter: choose(spell)
where: self
}
}
{
type: activated
phase: fellowship
cost: {
type: discardFromHand
forced: false
filter: choose(culture(gandalf))
}
effect: {
type: putStackedCardsIntoHand
on: self
}
}
]
gametext: To play, spot a [gandalf] Wizard.<br><b>Regroup:</b> Stack a spell from hand here.<br><b>Fellowship:</b> Discard a [gandalf] card from hand to take a card stacked here into hand.
lore: The fireworks were by Gandalf: they were not only brought by him, but designed and made by him....
promotext: ""
@@ -67,21 +87,25 @@
twilight: 2
type: Event
keywords: Fellowship
/*requires: {
}
*/
effects: {
type: event
cost: {
type: SendMessage
text: Placeholder effect for development.
type: exert
filter: choose(culture(gandalf),wizard)
},
effect: [
{
type: SendMessage
text: Placeholder effect for development.
}
{
type: removeBurdens
amount: {
type: condition
condition: {
type: location
filter: dwelling
}
true: 2
false: 1
}
}
]
}
gametext: Exert a [gandalf] Wizard to remove a burden (or 2 burdens if the fellowship is at a dwelling site).
@@ -121,17 +145,27 @@
strength: 5
vitality: 3
resistance: 6
/*requires: {
}
effects: [
{
}
{
}
]*/
{
type: toPlay
requires: {
type: canSpot
filter: culture(gandalf),companion
}
}
{
type: activated
phase: skirmish
cost: {
type: exert
filter: self
}
effect: {
type: putCardsFromDiscardIntoHand
filter: choose(culture(gandalf),skirmish,event)
}
}
]
gametext: To play, spot a [gandalf] companion.<br><b>Skirmish:</b> Exert Erland to take a [gandalf] skirmish event from your discard pile into hand.
lore: They are valiant men and keep open the High Pass and the Ford of Carrock.'
promotext: ""
@@ -165,21 +199,28 @@
twilight: 1
type: Event
keywords: Fellowship
/*requires: {
}
*/
effects: {
type: event
cost: {
type: SendMessage
text: Placeholder effect for development.
},
cost: [
{
type: exert
filter: choose(culture(gandalf),wizard)
}
{
type: discardFromHand
forced: false
count: 2
}
]
effect: [
{
type: SendMessage
text: Placeholder effect for development.
}
{
type: putCardsFromDiscardIntoHand
filter: choose(side(free people))
}
{
type: putCardsFromDiscardIntoHand
filter: choose(side(shadow))
}
]
}
gametext: To play, exert a [gandalf] Wizard.<br>Discard 2 cards from hand to take a Free Peoples card and a Shadow card from your discard pile into hand.
@@ -215,17 +256,20 @@
twilight: 3
type: Condition
keywords: Support Area
/*requires: {
}
effects: [
{
}
{
}
]*/
{
type: modifier
modifier: {
type: modifyStrength
requires: {
type: canSpot
filter: culture(gandalf),wizard
}
filter: companion,resistanceMoreThan(5)
amount: 1
}
}
]
gametext: While you can spot a [gandalf] Wizard, each companion who has resistance 6 or more is strength +1.
lore: To them he was just one of the 'attractions' at the party. Hence the excitement of the hobbit-children.
promotext: ""
@@ -263,17 +307,44 @@
strength: 7
vitality: 4
resistance: 7
/*requires: {
}
effects: [
{
}
{
}
]*/
{
type: modifier
modifier: {
type: modifyStrength
requires: {
type: location
filter: regionNumber(1)
}
filter: other,companion
amount: 2
}
}
{
type: modifier
modifier: {
type: modifyStrength
requires: {
type: location
filter: regionNumber(2)
}
filter: companion
amount: 1
}
}
{
type: modifier
modifier: {
type: modifyStrength
requires: {
type: location
filter: regionNumber(3)
}
filter: self
amount: 2
}
}
]
gametext: While Gandalf is in region 1, each other companion is strength +2.<br>While Gandalf is in region 2, each companion is strength +1.<br>While Gandalf is in region 3, he is strength +2.
lore: I will help you bear this burden, Frodo Baggins....'
promotext: ""
@@ -309,18 +380,29 @@
type: Artifact
vitality: 1
itemclass: Staff
#target: a Wizard
/*requires: {
}
target: wizard
effects: [
{
}
{
}
]*/
{
type: modifier
modifier: {
type: addKeyword
filter: bearer,name(Gandalf)
keyword: muster
}
}
{
type: trigger
trigger: {
type: winsSkirmish
filter: bearer
}
effect: {
type: wound
player: shadow
filter: choose(minion)
}
}
]
gametext: Bearer must be a Wizard.<br>If bearer is Gandalf, he gains <b>muster</b>. <helper>(At the start of the regroup phase, you may discard a card from hand to draw a card.)</helper><br>Each time bearer wins a skirmish, choose a Shadow player who must wound a minion.
lore: ""
promotext: ""
@@ -356,18 +438,20 @@
type: Possession
strength: 2
itemclass: Hand weapon
#target: title(Gandalf)
/*requires: {
}
target: title(Gandalf)
effects: [
{
}
{
}
]*/
{
type: trigger
optional: true
trigger: {
type: winsSkirmish
filter: bearer
}
effect: {
type: removeBurdens
}
}
]
gametext: Bearer must be Gandalf.<br>Each time Gandalf wins a skirmish, you may remove a burden.
lore: There was a ringing clash and a stab of white fire.
promotext: ""
@@ -401,21 +485,35 @@
twilight: 1
type: Event
keywords: Skirmish
/*requires: {
}
*/
effects: {
type: event
cost: {
type: SendMessage
text: Placeholder effect for development.
},
requires: {
type: canSpot
filter: culture(gandalf),wizard
}
effect: [
{
type: SendMessage
text: Placeholder effect for development.
}
{
type: revealHand
memorize: revealedCards
}
{
type: modifyStrength
filter: choose(minion)
amount: {
type: forEachMatchingInMemory
memory: revealedCards
filter: companion
multiplier: {
type: condition
condition: {
type: location
filter: battleground
}
true: -4
false: -3
}
}
}
]
}
gametext: Spot a [gandalf] Wizard to reveal your hand and make a minion strength -3 for each companion in your hand (or -4 for each if the fellowship is at a battleground site).
@@ -451,17 +549,41 @@
twilight: 1
type: Condition
keywords: Support Area
/*requires: {
}
effects: [
{
}
{
}
]*/
{
type: toPlay
requires: {
type: canSpot
filter: culture(gandalf),wizard
}
}
{
type: trigger
optional: true
trigger: {
type: addsBurden
filter: side(shadow)
}
effect: {
type: removeTwilight
amount: 3
}
}
{
type: activatedTrigger
trigger: {
type: usesSpecialAbility
filter: minion
}
cost: {
type: discard
filter: self
}
effect: {
type: cancelSpecialAbility
}
}
]
gametext: To play, spot a [gandalf] Wizard.<br>Each time a Shadow card adds a burden, you may remove (3).<br><b>Response:</b> If a minion uses its special ability, discard this condition to cancel the effect of that special ability.
lore: Prepare for battle!'
promotext: ""
@@ -499,21 +621,18 @@
Toil 2
Fellowship
]
/*requires: {
}
*/
effects: {
type: event
cost: {
type: SendMessage
text: Placeholder effect for development.
},
requires: {
type: canSpot
filter: culture(gandalf),wizard
}
effect: [
{
type: SendMessage
text: Placeholder effect for development.
}
{
type: discard
filter: choose(condition)
count: 2
}
]
}
gametext: <b>Spell</b>. <b>Toil 2</b>. <helper>(For each [gandalf] character you exert when playing this, its twilight cost is -2.)</helper><br>Spot a [gandalf] Wizard to discard 2 conditions from play.
@@ -549,21 +668,24 @@
twilight: 3
type: Event
keywords: Skirmish
/*requires: {
}
*/
effects: {
type: event
cost: {
type: SendMessage
text: Placeholder effect for development.
},
type: exert
filter: choose(culture(gandalf),wizard)
memorize: exertedWizard
}
requires: {
type: canSpot
filter: companion,resistanceMoreThan(6)
count: 2
}
effect: [
{
type: SendMessage
text: Placeholder effect for development.
}
{
type: wound
filter: choose(minion,inSkirmishAgainst(memory(exertedWizard)))
times: 2
}
]
}
gametext: Exert a [gandalf] Wizard and spot 2 companions who each have resistance 7 or more to wound a minion that Wizard is skirmishing twice.
@@ -601,18 +723,24 @@
type: Possession
resistance: 2
itemclass: Mount
#target: title(Gandalf)
/*requires: {
}
target: title(Gandalf)
effects: [
{
}
{
}
]*/
{
type: trigger
optional: true
trigger: {
type: aboutToTakeWound
filter: name(Gandalf)
}
cost: {
type: addBurdens
}
effect: {
type: preventWound
filter: choose(name(Gandalf))
}
}
]
gametext: Bearer must be Gandalf.<br>Each time Gandalf is about to take a wound, you may add a burden to prevent that.
lore: He has come for me: the horse of the White Rider. We are going to battle together.'
promotext: ""

View File

@@ -151,15 +151,17 @@ public class ValueResolver {
return new ConstantEvaluator(Math.min(limit, multiplier * count));
};
} else if (type.equalsIgnoreCase("forEachMatchingInMemory")) {
FieldUtils.validateAllowedFields(object, "memory", "filter", "limit");
FieldUtils.validateAllowedFields(object, "memory", "filter", "limit", "multiplier");
final ValueSource multiplierSource = ValueResolver.resolveEvaluator(object.get("multiplier"), 1, environment);
final String memory = FieldUtils.getString(object.get("memory"), "memory");
final String filter = FieldUtils.getString(object.get("filter"), "filter");
final int limit = FieldUtils.getInteger(object.get("limit"), "limit", Integer.MAX_VALUE);
final FilterableSource filterableSource = environment.getFilterFactory().generateFilter(filter, environment);
return (actionContext) -> {
final int multiplier = multiplierSource.getEvaluator(actionContext).evaluateExpression(actionContext.getGame(), null);
final int count = Filters.filter(actionContext.getCardsFromMemory(memory), actionContext.getGame(),
filterableSource.getFilterable(actionContext)).size();
return new ConstantEvaluator(Math.min(limit, count));
return new ConstantEvaluator(multiplier * Math.min(limit, count));
};
} else if (type.equalsIgnoreCase("forEachThreat")) {
FieldUtils.validateAllowedFields(object, "multiplier");