Some FotR cards
This commit is contained in:
@@ -169,5 +169,422 @@
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"1_74": {
|
||||
"title": "*Gandalf's Pipe",
|
||||
"culture": "gandalf",
|
||||
"cost": 0,
|
||||
"type": "possession",
|
||||
"possession": "pipe",
|
||||
"target": "name(Gandalf)",
|
||||
"effects": {
|
||||
"type": "activated",
|
||||
"phase": "fellowship",
|
||||
"cost": [
|
||||
{
|
||||
"type": "discard",
|
||||
"filter": "choose(pipeweed,possession)"
|
||||
},
|
||||
{
|
||||
"type": "chooseHowManyToSpot",
|
||||
"filter": "pipe",
|
||||
"memorize": "spottedPipes"
|
||||
}
|
||||
],
|
||||
"effect": {
|
||||
"type": "removeBurdens",
|
||||
"amount": {
|
||||
"type": "fromMemory",
|
||||
"memory": "spottedPipes"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"1_75": {
|
||||
"title": "*Glamdring",
|
||||
"culture": "gandalf",
|
||||
"cost": 2,
|
||||
"type": "possession",
|
||||
"possession": "hand weapon",
|
||||
"strength": 2,
|
||||
"target": "name(Gandalf)",
|
||||
"effects": [
|
||||
{
|
||||
"type": "modifier",
|
||||
"modifier": {
|
||||
"type": "addKeyword",
|
||||
"filter": "bearer",
|
||||
"keyword": "damage+1"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "activated",
|
||||
"phase": [
|
||||
"fellowship",
|
||||
"regroup"
|
||||
],
|
||||
"cost": {
|
||||
"type": "exert",
|
||||
"filter": "choose(bearer)"
|
||||
},
|
||||
"effect": [
|
||||
{
|
||||
"type": "revealHand",
|
||||
"hand": "shadowPlayer",
|
||||
"memorize": "revealedCards"
|
||||
},
|
||||
{
|
||||
"type": "filterCardsInMemory",
|
||||
"memory": "revealedCards",
|
||||
"filter": "orc",
|
||||
"memorizeMatching": "revealedOrcs"
|
||||
},
|
||||
{
|
||||
"type": "removeTwilight",
|
||||
"amount": {
|
||||
"type": "forEachInMemory",
|
||||
"memory": "revealedOrcs"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"1_76": {
|
||||
"title": "Intimidate",
|
||||
"culture": "gandalf",
|
||||
"cost": 2,
|
||||
"type": "event",
|
||||
"keyword": [
|
||||
"spell",
|
||||
"response"
|
||||
],
|
||||
"condition": {
|
||||
"type": "canSpot",
|
||||
"filter": "name(Gandalf)"
|
||||
},
|
||||
"effects": {
|
||||
"type": "responseEvent",
|
||||
"trigger": {
|
||||
"type": "aboutToTakeWound",
|
||||
"filter": "companion"
|
||||
},
|
||||
"effect": {
|
||||
"type": "preventWound",
|
||||
"filter": "choose(companion)"
|
||||
}
|
||||
}
|
||||
},
|
||||
"1_77": {
|
||||
"title": "Let Folly Be Our Cloak",
|
||||
"culture": "gandalf",
|
||||
"cost": 0,
|
||||
"type": "event",
|
||||
"keyword": "fellowship",
|
||||
"effects": {
|
||||
"type": "event",
|
||||
"cost": {
|
||||
"type": "exert",
|
||||
"filter": "choose(companion)",
|
||||
"count": "0-100",
|
||||
"memorize": "exertedCompanions"
|
||||
},
|
||||
"effect": {
|
||||
"type": "removeTwilight",
|
||||
"amount": {
|
||||
"type": "forEachInMemory",
|
||||
"memory": "exertedCompanions"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"1_78": {
|
||||
"title": "Mysterious Wizard",
|
||||
"culture": "gandalf",
|
||||
"cost": 2,
|
||||
"type": "event",
|
||||
"keyword": [
|
||||
"skirmish",
|
||||
"spell"
|
||||
],
|
||||
"effects": {
|
||||
"type": "event",
|
||||
"effect": {
|
||||
"type": "modifyStrength",
|
||||
"filter": "choose(name(Gandalf))",
|
||||
"amount": {
|
||||
"type": "condition",
|
||||
"condition": {
|
||||
"type": "canSpotBurdens",
|
||||
"amount": 5
|
||||
},
|
||||
"true": 2,
|
||||
"false": 4
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"1_79": {
|
||||
"title": "The Nine Walkers",
|
||||
"culture": "gandalf",
|
||||
"cost": 1,
|
||||
"type": "condition",
|
||||
"condition": {
|
||||
"type": "canSpot",
|
||||
"filter": "name(Gandalf)"
|
||||
},
|
||||
"keyword": "support area",
|
||||
"effects": {
|
||||
"type": "modifier",
|
||||
"modifier": {
|
||||
"type": "modifyCost",
|
||||
"filter": "companion,race(cannotSpot)",
|
||||
"amount": -2
|
||||
}
|
||||
}
|
||||
},
|
||||
"1_80": {
|
||||
"title": "*Ottar",
|
||||
"subtitle": "Man of Laketown",
|
||||
"culture": "gandalf",
|
||||
"cost": 1,
|
||||
"type": "ally",
|
||||
"allyHome": "fellowship,3",
|
||||
"race": "man",
|
||||
"strength": 2,
|
||||
"vitality": 2,
|
||||
"condition": {
|
||||
"type": "canSpot",
|
||||
"filter": "name(Gandalf)"
|
||||
},
|
||||
"effects": {
|
||||
"type": "activated",
|
||||
"phase": "fellowship",
|
||||
"cost": {
|
||||
"type": "exert",
|
||||
"filter": "self"
|
||||
},
|
||||
"effect": [
|
||||
{
|
||||
"type": "discardFromHand",
|
||||
"forced": false,
|
||||
"count": "0-3",
|
||||
"memorize": "discardedCards"
|
||||
},
|
||||
{
|
||||
"type": "drawCards",
|
||||
"count": {
|
||||
"type": "forEachInMemory",
|
||||
"memory": "discardedCards"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"1_81": {
|
||||
"title": "Questions That Need Answering",
|
||||
"culture": "gandalf",
|
||||
"cost": 3,
|
||||
"type": "event",
|
||||
"keyword": [
|
||||
"spell",
|
||||
"fellowship"
|
||||
],
|
||||
"condition": [
|
||||
{
|
||||
"type": "twilightPoolLessThan",
|
||||
"amount": 3
|
||||
},
|
||||
{
|
||||
"type": "canSpot",
|
||||
"filter": "name(Gandalf)"
|
||||
}
|
||||
],
|
||||
"effects": {
|
||||
"type": "event",
|
||||
"effect": [
|
||||
{
|
||||
"type": "lookAtTopCardsOfDrawDeck",
|
||||
"count": 4,
|
||||
"memorize": "cardsOnTop"
|
||||
},
|
||||
{
|
||||
"type": "putCardsFromDeckIntoHand",
|
||||
"count": 2,
|
||||
"filter": "memory(cardsOnTop)"
|
||||
},
|
||||
{
|
||||
"type": "discardCardsFromDrawDeck",
|
||||
"filter": "memory(cardsOnTop),zone(deck)"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"1_82": {
|
||||
"title": "Risk a Little Light",
|
||||
"culture": "gandalf",
|
||||
"cost": 1,
|
||||
"type": "event",
|
||||
"keyword": [
|
||||
"spell",
|
||||
"fellowship"
|
||||
],
|
||||
"condition": [
|
||||
{
|
||||
"type": "twilightPoolLessThan",
|
||||
"amount": 2
|
||||
},
|
||||
{
|
||||
"type": "canSpot",
|
||||
"filter": "name(Gandalf)"
|
||||
}
|
||||
],
|
||||
"effects": {
|
||||
"type": "event",
|
||||
"effect": [
|
||||
{
|
||||
"type": "lookAtTopCardsOfDrawDeck",
|
||||
"count": 2,
|
||||
"memorize": "cardsOnTop"
|
||||
},
|
||||
{
|
||||
"type": "putCardsFromDeckIntoHand",
|
||||
"count": 1,
|
||||
"filter": "memory(cardsOnTop)"
|
||||
},
|
||||
{
|
||||
"type": "discardCardsFromDrawDeck",
|
||||
"filter": "memory(cardsOnTop),zone(deck)"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"1_83": {
|
||||
"title": "Servant of the Secret Fire",
|
||||
"culture": "gandalf",
|
||||
"cost": 1,
|
||||
"type": "event",
|
||||
"keyword": [
|
||||
"spell",
|
||||
"skirmish"
|
||||
],
|
||||
"condition": {
|
||||
"type": "canSpot",
|
||||
"filter": "name(Gandalf)"
|
||||
},
|
||||
"effects": {
|
||||
"type": "event",
|
||||
"effect": {
|
||||
"type": "modifyStrength",
|
||||
"filter": "choose(minion)",
|
||||
"amount": -3
|
||||
}
|
||||
}
|
||||
},
|
||||
"1_84": {
|
||||
"title": "Sleep Caradhas",
|
||||
"culture": "gandalf",
|
||||
"cost": 3,
|
||||
"type": "event",
|
||||
"keyword": [
|
||||
"spell",
|
||||
"fellowship"
|
||||
],
|
||||
"effects": {
|
||||
"type": "event",
|
||||
"cost": {
|
||||
"type": "exert",
|
||||
"filter": "choose(name(Gandalf))"
|
||||
},
|
||||
"effect": {
|
||||
"type": "discard",
|
||||
"filter": "all(condition)"
|
||||
}
|
||||
}
|
||||
},
|
||||
"1_85": {
|
||||
"title": "Strength of Spirit",
|
||||
"culture": "gandalf",
|
||||
"cost": 1,
|
||||
"type": "event",
|
||||
"keyword": [
|
||||
"spell",
|
||||
"response"
|
||||
],
|
||||
"condition": {
|
||||
"type": "canSpot",
|
||||
"filter": "name(Gandalf)"
|
||||
},
|
||||
"effects": {
|
||||
"type": "responseEvent",
|
||||
"trigger": {
|
||||
"type": "aboutToExert",
|
||||
"filter": "companion"
|
||||
},
|
||||
"effect": {
|
||||
"type": "placeNoWoundForExert",
|
||||
"filter": "choose(companion)"
|
||||
}
|
||||
}
|
||||
},
|
||||
"1_86": {
|
||||
"title": "Treachery Deeper Than You Know",
|
||||
"culture": "gandalf",
|
||||
"cost": 1,
|
||||
"type": "event",
|
||||
"keyword": [
|
||||
"spell",
|
||||
"fellowship"
|
||||
],
|
||||
"condition": {
|
||||
"type": "canSpot",
|
||||
"filter": "name(Gandalf)"
|
||||
},
|
||||
"effects": {
|
||||
"type": "event",
|
||||
"effect": {
|
||||
"type": "revealHand",
|
||||
"hand": "shadowPlayer"
|
||||
}
|
||||
}
|
||||
},
|
||||
"1_87": {
|
||||
"title": "A Wizard is Never Late",
|
||||
"culture": "gandalf",
|
||||
"cost": 1,
|
||||
"type": "event",
|
||||
"keyword": "fellowship",
|
||||
"effects": {
|
||||
"type": "event",
|
||||
"effect": {
|
||||
"type": "playCardFromDrawDeck",
|
||||
"filter": "choose(culture(gandalf),character)"
|
||||
}
|
||||
}
|
||||
},
|
||||
"1_364": {
|
||||
"title": "*Gandalf",
|
||||
"subtitle": "The Grey Wizard",
|
||||
"culture": "gandalf",
|
||||
"cost": 4,
|
||||
"type": "companion",
|
||||
"race": "wizard",
|
||||
"strength": 7,
|
||||
"vitality": 4,
|
||||
"resistance": 6,
|
||||
"signet": "Gandalf",
|
||||
"effects": {
|
||||
"type": "activated",
|
||||
"phase": "fellowship",
|
||||
"cost": {
|
||||
"type": "exert",
|
||||
"filter": "self"
|
||||
},
|
||||
"effect": {
|
||||
"type": "play",
|
||||
"filter": "choose(companion,signet(Gandalf))",
|
||||
"cost": -2
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -374,7 +374,7 @@
|
||||
},
|
||||
{
|
||||
"type": "wound",
|
||||
"filter": "choose(Gandalf)"
|
||||
"filter": "choose(name(Gandalf))"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -1,58 +0,0 @@
|
||||
package com.gempukku.lotro.cards.set1.gandalf;
|
||||
|
||||
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.cardtype.AbstractAttachableFPPossession;
|
||||
import com.gempukku.lotro.logic.decisions.DecisionResultInvalidException;
|
||||
import com.gempukku.lotro.logic.decisions.ForEachYouSpotDecision;
|
||||
import com.gempukku.lotro.logic.effects.PlayoutDecisionEffect;
|
||||
import com.gempukku.lotro.logic.effects.RemoveBurdenEffect;
|
||||
import com.gempukku.lotro.logic.effects.choose.ChooseAndDiscardCardsFromPlayEffect;
|
||||
import com.gempukku.lotro.logic.timing.PlayConditions;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Set: The Fellowship of the Ring
|
||||
* Side: Free
|
||||
* Culture: Gandalf
|
||||
* Twilight Cost: 0
|
||||
* Type: Possession • Pipe
|
||||
* Game Text: Bearer must be Gandalf. Fellowship: Discard a pipeweed possession and spot X pipes to remove X burdens.
|
||||
*/
|
||||
public class Card1_074 extends AbstractAttachableFPPossession {
|
||||
public Card1_074() {
|
||||
super(0, 0, 0, Culture.GANDALF, PossessionClass.PIPE, "Gandalf's Pipe", null, true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Filter getValidTargetFilter(String playerId, LotroGame game, PhysicalCard self) {
|
||||
return Filters.gandalf;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<? extends ActivateCardAction> getPhaseActionsInPlay(final String playerId, LotroGame game, final PhysicalCard self) {
|
||||
if (PlayConditions.canUseFPCardDuringPhase(game, Phase.FELLOWSHIP, self)
|
||||
&& Filters.canSpot(game, Keyword.PIPEWEED, CardType.POSSESSION)) {
|
||||
final ActivateCardAction action = new ActivateCardAction(self);
|
||||
action.appendCost(
|
||||
new ChooseAndDiscardCardsFromPlayEffect(action, playerId, 1, 1, Keyword.PIPEWEED, CardType.POSSESSION));
|
||||
action.appendEffect(
|
||||
new PlayoutDecisionEffect(playerId,
|
||||
new ForEachYouSpotDecision(1, "Choose number of pipes you wish to spot", game, Integer.MAX_VALUE, PossessionClass.PIPE) {
|
||||
@Override
|
||||
public void decisionMade(String result) throws DecisionResultInvalidException {
|
||||
int spotCount = getValidatedResult(result);
|
||||
action.appendEffect(new RemoveBurdenEffect(playerId, self, spotCount));
|
||||
}
|
||||
}));
|
||||
return Collections.singletonList(action);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -1,73 +0,0 @@
|
||||
package com.gempukku.lotro.cards.set1.gandalf;
|
||||
|
||||
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.cardtype.AbstractAttachableFPPossession;
|
||||
import com.gempukku.lotro.logic.effects.ExertCharactersEffect;
|
||||
import com.gempukku.lotro.logic.effects.RemoveTwilightEffect;
|
||||
import com.gempukku.lotro.logic.effects.RevealHandEffect;
|
||||
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.PlayConditions;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Set: The Fellowship of the Ring
|
||||
* Side: Free
|
||||
* Culture: Gandalf
|
||||
* Twilight Cost: 2
|
||||
* Type: Possession • Hand Weapon
|
||||
* Strength: +2
|
||||
* Game Text: Bearer must be Gandalf. He is damage +1. Fellowship or Regroup: Exert Gandalf to reveal an opponent's
|
||||
* hand. Remove (1) for each Orc revealed.
|
||||
*/
|
||||
public class Card1_075 extends AbstractAttachableFPPossession {
|
||||
public Card1_075() {
|
||||
super(2, 2, 0, Culture.GANDALF, PossessionClass.HAND_WEAPON, "Glamdring", null, true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Filter getValidTargetFilter(String playerId, LotroGame game, PhysicalCard self) {
|
||||
return Filters.gandalf;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<? extends Modifier> getInPlayModifiers(LotroGame game, PhysicalCard self) {
|
||||
return Collections.singletonList(new KeywordModifier(self, Filters.hasAttached(self), Keyword.DAMAGE));
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<? extends ActivateCardAction> getPhaseActionsInPlay(final String playerId, final LotroGame game, final PhysicalCard self) {
|
||||
if ((PlayConditions.canUseFPCardDuringPhase(game, Phase.FELLOWSHIP, self)
|
||||
|| PlayConditions.canUseFPCardDuringPhase(game, Phase.REGROUP, self))
|
||||
&& PlayConditions.canExert(self, game, self.getAttachedTo())) {
|
||||
final ActivateCardAction action = new ActivateCardAction(self);
|
||||
action.appendCost(new ExertCharactersEffect(action, self, self.getAttachedTo()));
|
||||
action.appendEffect(
|
||||
new ChooseOpponentEffect(playerId) {
|
||||
@Override
|
||||
protected void opponentChosen(final String opponentId) {
|
||||
action.appendEffect(
|
||||
new RevealHandEffect(self, playerId, opponentId) {
|
||||
@Override
|
||||
protected void cardsRevealed(Collection<? extends PhysicalCard> cards) {
|
||||
Collection<PhysicalCard> orcs = Filters.filter(game.getGameState().getHand(opponentId), game, Race.ORC);
|
||||
|
||||
action.appendEffect(new RemoveTwilightEffect(orcs.size()));
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
return Collections.singletonList(action);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -1,51 +0,0 @@
|
||||
package com.gempukku.lotro.cards.set1.gandalf;
|
||||
|
||||
import com.gempukku.lotro.common.CardType;
|
||||
import com.gempukku.lotro.common.Culture;
|
||||
import com.gempukku.lotro.common.Keyword;
|
||||
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.PlayUtils;
|
||||
import com.gempukku.lotro.logic.actions.PlayEventAction;
|
||||
import com.gempukku.lotro.logic.cardtype.AbstractResponseEvent;
|
||||
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: The Fellowship of the Ring
|
||||
* Side: Free
|
||||
* Culture: Gandalf
|
||||
* Twilight Cost: 2
|
||||
* Type: Event
|
||||
* Game Text: Spell. Response: If a companion is about to take a wound, spot Gandalf to prevent that wound.
|
||||
*/
|
||||
public class Card1_076 extends AbstractResponseEvent {
|
||||
public Card1_076() {
|
||||
super(Side.FREE_PEOPLE, 2, Culture.GANDALF, "Intimidate");
|
||||
addKeyword(Keyword.SPELL);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkPlayRequirements(LotroGame game, PhysicalCard self) {
|
||||
return Filters.canSpot(game, Filters.gandalf);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<PlayEventAction> getOptionalInHandBeforeActions(String playerId, LotroGame game, Effect effect, final PhysicalCard self) {
|
||||
if (TriggerConditions.isGettingWounded(effect, game, CardType.COMPANION)
|
||||
&& PlayUtils.checkPlayRequirements(game, self, Filters.any, 0, 0, false, false)) {
|
||||
final PlayEventAction action = new PlayEventAction(self);
|
||||
action.appendEffect(
|
||||
new ChooseAndPreventCardEffect(self, (PreventableCardEffect) effect, playerId, "Choose companion", CardType.COMPANION));
|
||||
return Collections.singletonList(action);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -1,39 +0,0 @@
|
||||
package com.gempukku.lotro.cards.set1.gandalf;
|
||||
|
||||
import com.gempukku.lotro.common.CardType;
|
||||
import com.gempukku.lotro.common.Culture;
|
||||
import com.gempukku.lotro.common.Phase;
|
||||
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.PlayEventAction;
|
||||
import com.gempukku.lotro.logic.cardtype.AbstractEvent;
|
||||
import com.gempukku.lotro.logic.effects.RemoveTwilightEffect;
|
||||
import com.gempukku.lotro.logic.effects.choose.ChooseAndExertCharactersEffect;
|
||||
|
||||
/**
|
||||
* Set: The Fellowship of the Ring
|
||||
* Side: Free
|
||||
* Culture: Gandalf
|
||||
* Twilight Cost: 0
|
||||
* Type: Event
|
||||
* Game Text: Fellowship: Exert X companions to remove (X).
|
||||
*/
|
||||
public class Card1_077 extends AbstractEvent {
|
||||
public Card1_077() {
|
||||
super(Side.FREE_PEOPLE, 0, Culture.GANDALF, "Let Folly Be Our Cloak", Phase.FELLOWSHIP);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PlayEventAction getPlayEventCardAction(final String playerId, LotroGame game, PhysicalCard self) {
|
||||
final PlayEventAction action = new PlayEventAction(self);
|
||||
action.appendCost(
|
||||
new ChooseAndExertCharactersEffect(action, playerId, 0, Integer.MAX_VALUE, CardType.COMPANION) {
|
||||
@Override
|
||||
protected void forEachCardExertedCallback(PhysicalCard character) {
|
||||
action.appendEffect(new RemoveTwilightEffect(1));
|
||||
}
|
||||
});
|
||||
return action;
|
||||
}
|
||||
}
|
||||
@@ -1,38 +0,0 @@
|
||||
package com.gempukku.lotro.cards.set1.gandalf;
|
||||
|
||||
import com.gempukku.lotro.common.Culture;
|
||||
import com.gempukku.lotro.common.Keyword;
|
||||
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.actions.PlayEventAction;
|
||||
import com.gempukku.lotro.logic.cardtype.AbstractEvent;
|
||||
import com.gempukku.lotro.logic.effects.SnapshotAndApplyStrengthModifierUntilEndOfCurrentPhaseEffect;
|
||||
import com.gempukku.lotro.logic.modifiers.SpotBurdensCondition;
|
||||
import com.gempukku.lotro.logic.modifiers.evaluator.ConditionEvaluator;
|
||||
|
||||
/**
|
||||
* Set: The Fellowship of the Ring
|
||||
* Side: Free
|
||||
* Culture: Gandalf
|
||||
* Twilight Cost: 2
|
||||
* Type: Event
|
||||
* Game Text: Spell. Skirmish: Make Gandalf strength +2 (or +4 if there are 4 or fewer burdens on the Ring-bearer).
|
||||
*/
|
||||
public class Card1_078 extends AbstractEvent {
|
||||
public Card1_078() {
|
||||
super(Side.FREE_PEOPLE, 2, Culture.GANDALF, "Mysterious Wizard", Phase.SKIRMISH);
|
||||
addKeyword(Keyword.SPELL);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PlayEventAction getPlayEventCardAction(String playerId, LotroGame game, PhysicalCard self) {
|
||||
PlayEventAction action = new PlayEventAction(self);
|
||||
action.appendEffect(
|
||||
new SnapshotAndApplyStrengthModifierUntilEndOfCurrentPhaseEffect(
|
||||
self, new ConditionEvaluator(4, 2, new SpotBurdensCondition(5)), Filters.gandalf));
|
||||
return action;
|
||||
}
|
||||
}
|
||||
@@ -1,55 +0,0 @@
|
||||
package com.gempukku.lotro.cards.set1.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.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.cardtype.AbstractCompanion;
|
||||
import com.gempukku.lotro.logic.cardtype.AbstractPermanent;
|
||||
import com.gempukku.lotro.logic.modifiers.Modifier;
|
||||
import com.gempukku.lotro.logic.modifiers.TwilightCostModifier;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Set: The Fellowship of the Ring
|
||||
* Side: Free
|
||||
* Culture: Gandalf
|
||||
* Twilight Cost: 1
|
||||
* Type: Condition
|
||||
* Game Text: To play, spot Gandalf. Plays to your support area. Each time you play a companion whose race you cannot
|
||||
* spot, that companion's twilight cost is -2.
|
||||
*/
|
||||
public class Card1_079 extends AbstractPermanent {
|
||||
public Card1_079() {
|
||||
super(Side.FREE_PEOPLE, 1, CardType.CONDITION, Culture.GANDALF, "The Nine Walkers");
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkPlayRequirements(LotroGame game, PhysicalCard self) {
|
||||
return Filters.canSpot(game, Filters.gandalf);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<? extends Modifier> getInPlayModifiers(LotroGame game, PhysicalCard self) {
|
||||
return Collections.singletonList(new TwilightCostModifier(self,
|
||||
Filters.and(
|
||||
CardType.COMPANION,
|
||||
new Filter() {
|
||||
@Override
|
||||
public boolean accepts(LotroGame game, PhysicalCard physicalCard) {
|
||||
final Race race = physicalCard.getBlueprint().getRace();
|
||||
if (race != null) {
|
||||
return !Filters.canSpot(game, race);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
), -2));
|
||||
}
|
||||
}
|
||||
@@ -1,62 +0,0 @@
|
||||
package com.gempukku.lotro.cards.set1.gandalf;
|
||||
|
||||
import com.gempukku.lotro.common.Culture;
|
||||
import com.gempukku.lotro.common.Phase;
|
||||
import com.gempukku.lotro.common.Race;
|
||||
import com.gempukku.lotro.common.SitesBlock;
|
||||
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.AbstractAlly;
|
||||
import com.gempukku.lotro.logic.effects.DiscardCardsFromHandEffect;
|
||||
import com.gempukku.lotro.logic.effects.DrawCardsEffect;
|
||||
import com.gempukku.lotro.logic.effects.SelfExertEffect;
|
||||
import com.gempukku.lotro.logic.effects.choose.ChooseCardsFromHandEffect;
|
||||
import com.gempukku.lotro.logic.timing.PlayConditions;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Set: The Fellowship of the Ring
|
||||
* Side: Free
|
||||
* Culture: Gandalf
|
||||
* Twilight Cost: 1
|
||||
* Type: Ally • Home 3 • Man
|
||||
* Strength: 2
|
||||
* Vitality: 2
|
||||
* Site: 3
|
||||
* Game Text: To play, spot Gandalf. Fellowship: Exert Ottar to discard up to 3 cards from hand and draw an equal
|
||||
* number of cards.
|
||||
*/
|
||||
public class Card1_080 extends AbstractAlly {
|
||||
public Card1_080() {
|
||||
super(1, SitesBlock.FELLOWSHIP, 3, 2, 2, Race.MAN, Culture.GANDALF, "Ottar", "Man of Laketown", true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkPlayRequirements(LotroGame game, PhysicalCard self) {
|
||||
return Filters.canSpot(game, Filters.gandalf);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<? extends ActivateCardAction> getPhaseActionsInPlay(final String playerId, final LotroGame game, final PhysicalCard self) {
|
||||
if (PlayConditions.canUseFPCardDuringPhase(game, Phase.FELLOWSHIP, self)
|
||||
&& PlayConditions.canExert(self, game, self)) {
|
||||
final ActivateCardAction action = new ActivateCardAction(self);
|
||||
action.appendCost(new SelfExertEffect(action, self));
|
||||
action.appendEffect(
|
||||
new ChooseCardsFromHandEffect(playerId, 0, 3, Filters.any) {
|
||||
@Override
|
||||
protected void cardsSelected(LotroGame game, Collection<PhysicalCard> selectedCards) {
|
||||
action.appendEffect(new DiscardCardsFromHandEffect(self, playerId, selectedCards, false));
|
||||
action.appendEffect(new DrawCardsEffect(action, playerId, selectedCards.size()));
|
||||
}
|
||||
});
|
||||
return Collections.singletonList(action);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -1,47 +0,0 @@
|
||||
package com.gempukku.lotro.cards.set1.gandalf;
|
||||
|
||||
import com.gempukku.lotro.common.Culture;
|
||||
import com.gempukku.lotro.common.Keyword;
|
||||
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.actions.PlayEventAction;
|
||||
import com.gempukku.lotro.logic.cardtype.AbstractEvent;
|
||||
import com.gempukku.lotro.logic.effects.PutCardsFromDeckIntoHandDiscardRestEffect;
|
||||
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Set: The Fellowship of the Ring
|
||||
* Side: Free
|
||||
* Culture: Gandalf
|
||||
* Twilight Cost: 3
|
||||
* Type: Event
|
||||
* Game Text: Spell. Fellowship: If the twilight pool has fewer than 3 twilight tokens, spot Gandalf to look at the top
|
||||
* 4 cards of your draw deck. Take 2 of those cards into hand and discard the rest.
|
||||
*/
|
||||
public class Card1_081 extends AbstractEvent {
|
||||
public Card1_081() {
|
||||
super(Side.FREE_PEOPLE, 3, Culture.GANDALF, "Questions That Need Answering", Phase.FELLOWSHIP);
|
||||
addKeyword(Keyword.SPELL);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkPlayRequirements(LotroGame game, PhysicalCard self) {
|
||||
return game.getGameState().getTwilightPool() < 3
|
||||
&& Filters.canSpot(game, Filters.gandalf);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PlayEventAction getPlayEventCardAction(final String playerId, LotroGame game, PhysicalCard self) {
|
||||
final PlayEventAction action = new PlayEventAction(self);
|
||||
List<? extends PhysicalCard> deck = game.getGameState().getDeck(playerId);
|
||||
final List<PhysicalCard> cards = new LinkedList<PhysicalCard>(deck.subList(0, Math.min(deck.size(), 4)));
|
||||
action.appendEffect(
|
||||
new PutCardsFromDeckIntoHandDiscardRestEffect(action, self, playerId, cards, 2, Filters.any));
|
||||
return action;
|
||||
}
|
||||
}
|
||||
@@ -1,47 +0,0 @@
|
||||
package com.gempukku.lotro.cards.set1.gandalf;
|
||||
|
||||
import com.gempukku.lotro.common.Culture;
|
||||
import com.gempukku.lotro.common.Keyword;
|
||||
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.actions.PlayEventAction;
|
||||
import com.gempukku.lotro.logic.cardtype.AbstractEvent;
|
||||
import com.gempukku.lotro.logic.effects.PutCardsFromDeckIntoHandDiscardRestEffect;
|
||||
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Set: The Fellowship of the Ring
|
||||
* Side: Free
|
||||
* Culture: Gandalf
|
||||
* Twilight Cost: 1
|
||||
* Type: Event
|
||||
* Game Text: Spell. Fellowship: If the twilight pool has fewer than 2 twilight tokens, spot Gandalf to look at the top
|
||||
* 2 cards of your draw deck. Take one into hand and discard the other.
|
||||
*/
|
||||
public class Card1_082 extends AbstractEvent {
|
||||
public Card1_082() {
|
||||
super(Side.FREE_PEOPLE, 1, Culture.GANDALF, "Risk a Little Light", Phase.FELLOWSHIP);
|
||||
addKeyword(Keyword.SPELL);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkPlayRequirements(LotroGame game, PhysicalCard self) {
|
||||
return game.getGameState().getTwilightPool() < 2
|
||||
&& Filters.canSpot(game, Filters.gandalf);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PlayEventAction getPlayEventCardAction(final String playerId, LotroGame game, PhysicalCard self) {
|
||||
final PlayEventAction action = new PlayEventAction(self);
|
||||
List<? extends PhysicalCard> deck = game.getGameState().getDeck(playerId);
|
||||
final List<PhysicalCard> cards = new LinkedList<PhysicalCard>(deck.subList(0, Math.min(deck.size(), 2)));
|
||||
action.appendEffect(
|
||||
new PutCardsFromDeckIntoHandDiscardRestEffect(action, self, playerId, cards, 1, Filters.any));
|
||||
return action;
|
||||
}
|
||||
}
|
||||
@@ -1,37 +0,0 @@
|
||||
package com.gempukku.lotro.cards.set1.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.choose.ChooseAndAddUntilEOPStrengthBonusEffect;
|
||||
|
||||
/**
|
||||
* Set: The Fellowship of the Ring
|
||||
* Side: Free
|
||||
* Culture: Gandalf
|
||||
* Twilight Cost: 1
|
||||
* Type: Event
|
||||
* Game Text: Spell. Skirmish: Spot Gandalf to make a minion strength -3.
|
||||
*/
|
||||
public class Card1_083 extends AbstractEvent {
|
||||
public Card1_083() {
|
||||
super(Side.FREE_PEOPLE, 1, Culture.GANDALF, "Servant of the Secret Fire", Phase.SKIRMISH);
|
||||
addKeyword(Keyword.SPELL);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkPlayRequirements(LotroGame game, PhysicalCard self) {
|
||||
return Filters.canSpot(game, Filters.gandalf);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PlayEventAction getPlayEventCardAction(String playerId, LotroGame game, final PhysicalCard self) {
|
||||
final PlayEventAction action = new PlayEventAction(self);
|
||||
action.appendEffect(
|
||||
new ChooseAndAddUntilEOPStrengthBonusEffect(action, self, playerId, -3, CardType.MINION));
|
||||
return action;
|
||||
}
|
||||
}
|
||||
@@ -1,41 +0,0 @@
|
||||
package com.gempukku.lotro.cards.set1.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.DiscardCardsFromPlayEffect;
|
||||
import com.gempukku.lotro.logic.effects.ExertCharactersEffect;
|
||||
import com.gempukku.lotro.logic.timing.PlayConditions;
|
||||
|
||||
/**
|
||||
* Set: The Fellowship of the Ring
|
||||
* Side: Free
|
||||
* Culture: Gandalf
|
||||
* Twilight Cost: 3
|
||||
* Type: Event
|
||||
* Game Text: Spell. Fellowship: Exert Gandalf to discard every condition.
|
||||
*/
|
||||
public class Card1_084 extends AbstractEvent {
|
||||
public Card1_084() {
|
||||
super(Side.FREE_PEOPLE, 3, Culture.GANDALF, "Sleep Caradhras", Phase.FELLOWSHIP);
|
||||
addKeyword(Keyword.SPELL);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkPlayRequirements(LotroGame game, PhysicalCard self) {
|
||||
return PlayConditions.canExert(self, game, Filters.gandalf);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PlayEventAction getPlayEventCardAction(String playerId, LotroGame game, PhysicalCard self) {
|
||||
PlayEventAction action = new PlayEventAction(self);
|
||||
PhysicalCard gandalf = Filters.findFirstActive(game, Filters.gandalf);
|
||||
action.appendCost(new ExertCharactersEffect(action, self, gandalf));
|
||||
action.appendEffect(
|
||||
new DiscardCardsFromPlayEffect(self.getOwner(), self, CardType.CONDITION));
|
||||
return action;
|
||||
}
|
||||
}
|
||||
@@ -1,55 +0,0 @@
|
||||
package com.gempukku.lotro.cards.set1.gandalf;
|
||||
|
||||
import com.gempukku.lotro.common.CardType;
|
||||
import com.gempukku.lotro.common.Culture;
|
||||
import com.gempukku.lotro.common.Keyword;
|
||||
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.PlayUtils;
|
||||
import com.gempukku.lotro.logic.actions.PlayEventAction;
|
||||
import com.gempukku.lotro.logic.cardtype.AbstractResponseEvent;
|
||||
import com.gempukku.lotro.logic.effects.ChooseActiveCardEffect;
|
||||
import com.gempukku.lotro.logic.effects.ExertCharactersEffect;
|
||||
import com.gempukku.lotro.logic.timing.Effect;
|
||||
import com.gempukku.lotro.logic.timing.TriggerConditions;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Set: The Fellowship of the Ring
|
||||
* Side: Free
|
||||
* Culture: Gandalf
|
||||
* Twilight Cost: 1
|
||||
* Type: Event
|
||||
* Game Text: Spell. Response: If a companion is about to exert, spot Gandalf to place no token for that exertion.
|
||||
*/
|
||||
public class Card1_085 extends AbstractResponseEvent {
|
||||
public Card1_085() {
|
||||
super(Side.FREE_PEOPLE, 1, Culture.GANDALF, "Strength of Spirit");
|
||||
addKeyword(Keyword.SPELL);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<PlayEventAction> getOptionalInHandBeforeActions(final String playerId, LotroGame game, final Effect effect, final PhysicalCard self) {
|
||||
if (TriggerConditions.isGettingExerted(effect, game, CardType.COMPANION)
|
||||
&& Filters.canSpot(game, Filters.gandalf)
|
||||
&& PlayUtils.checkPlayRequirements(game, self, Filters.any, 0, 0, false, false)) {
|
||||
final ExertCharactersEffect exertEffect = (ExertCharactersEffect) effect;
|
||||
Collection<PhysicalCard> exertedCharacters = exertEffect.getAffectedCardsMinusPrevented(game);
|
||||
final PlayEventAction action = new PlayEventAction(self);
|
||||
action.appendEffect(
|
||||
new ChooseActiveCardEffect(self, playerId, "Choose character", CardType.COMPANION, Filters.in(exertedCharacters)) {
|
||||
@Override
|
||||
protected void cardSelected(LotroGame game, PhysicalCard card) {
|
||||
exertEffect.placeNoWoundOn(card);
|
||||
}
|
||||
});
|
||||
return Collections.singletonList(action);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -1,47 +0,0 @@
|
||||
package com.gempukku.lotro.cards.set1.gandalf;
|
||||
|
||||
import com.gempukku.lotro.common.Culture;
|
||||
import com.gempukku.lotro.common.Keyword;
|
||||
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.actions.PlayEventAction;
|
||||
import com.gempukku.lotro.logic.cardtype.AbstractEvent;
|
||||
import com.gempukku.lotro.logic.effects.RevealHandEffect;
|
||||
import com.gempukku.lotro.logic.effects.choose.ChooseOpponentEffect;
|
||||
|
||||
/**
|
||||
* Set: The Fellowship of the Ring
|
||||
* Side: Free
|
||||
* Culture: Gandalf
|
||||
* Twilight Cost: 1
|
||||
* Type: Event
|
||||
* Game Text: Spell. Fellowship: Spot Gandalf to reveal an opponent's hand.
|
||||
*/
|
||||
public class Card1_086 extends AbstractEvent {
|
||||
public Card1_086() {
|
||||
super(Side.FREE_PEOPLE, 1, Culture.GANDALF, "Treachery Deeper Than You Know", Phase.FELLOWSHIP);
|
||||
addKeyword(Keyword.SPELL);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkPlayRequirements(LotroGame game, PhysicalCard self) {
|
||||
return Filters.canSpot(game, Filters.gandalf);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PlayEventAction getPlayEventCardAction(final String playerId, LotroGame game, final PhysicalCard self) {
|
||||
final PlayEventAction action = new PlayEventAction(self);
|
||||
action.appendEffect(
|
||||
new ChooseOpponentEffect(playerId) {
|
||||
@Override
|
||||
protected void opponentChosen(String opponentId) {
|
||||
action.appendEffect(
|
||||
new RevealHandEffect(self, playerId, opponentId));
|
||||
}
|
||||
});
|
||||
return action;
|
||||
}
|
||||
}
|
||||
@@ -1,34 +0,0 @@
|
||||
package com.gempukku.lotro.cards.set1.gandalf;
|
||||
|
||||
import com.gempukku.lotro.common.CardType;
|
||||
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.actions.PlayEventAction;
|
||||
import com.gempukku.lotro.logic.cardtype.AbstractEvent;
|
||||
import com.gempukku.lotro.logic.effects.choose.ChooseAndPlayCardFromDeckEffect;
|
||||
|
||||
/**
|
||||
* Set: The Fellowship of the Ring
|
||||
* Side: Free
|
||||
* Culture: Gandalf
|
||||
* Twilight Cost: 1
|
||||
* Type: Event
|
||||
* Game Text: Fellowship: Play a [GANDALF] character from your draw deck.
|
||||
*/
|
||||
public class Card1_087 extends AbstractEvent {
|
||||
public Card1_087() {
|
||||
super(Side.FREE_PEOPLE, 1, Culture.GANDALF, "A Wizard Is Never Late", Phase.FELLOWSHIP);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PlayEventAction getPlayEventCardAction(final String playerId, final LotroGame game, PhysicalCard self) {
|
||||
PlayEventAction action = new PlayEventAction(self);
|
||||
action.appendEffect(
|
||||
new ChooseAndPlayCardFromDeckEffect(playerId, Filters.and(Culture.GANDALF, Filters.or(CardType.COMPANION, CardType.ALLY))));
|
||||
return action;
|
||||
}
|
||||
}
|
||||
@@ -1,47 +0,0 @@
|
||||
package com.gempukku.lotro.cards.set1.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.AbstractCompanion;
|
||||
import com.gempukku.lotro.logic.effects.SelfExertEffect;
|
||||
import com.gempukku.lotro.logic.effects.choose.ChooseAndPlayCardFromHandEffect;
|
||||
import com.gempukku.lotro.logic.timing.PlayConditions;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Set: The Fellowship of the Ring
|
||||
* Side: Free
|
||||
* Culture: Gandalf
|
||||
* Twilight Cost: 4
|
||||
* Type: Companion • Wizard
|
||||
* Strength: 7
|
||||
* Vitality: 4
|
||||
* Resistance: 6
|
||||
* Signet: Gandalf
|
||||
* Game Text: Fellowship: Exert Gandalf to play a companion who has the Gandalf signet. The twilight cost of that
|
||||
* companion is -2.
|
||||
*/
|
||||
public class Card1_364 extends AbstractCompanion {
|
||||
public Card1_364() {
|
||||
super(4, 7, 4, 6, Culture.GANDALF, Race.WIZARD, Signet.GANDALF, "Gandalf", "The Grey Wizard", true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<? extends ActivateCardAction> getPhaseActionsInPlay(final String playerId, final LotroGame game, PhysicalCard self) {
|
||||
if (PlayConditions.canUseFPCardDuringPhase(game, Phase.FELLOWSHIP, self)
|
||||
&& PlayConditions.canExert(self, game, self)
|
||||
&& Filters.filter(game.getGameState().getHand(playerId), game, CardType.COMPANION, Signet.GANDALF, Filters.playable(game, -2)).size() > 0) {
|
||||
ActivateCardAction action = new ActivateCardAction(self);
|
||||
action.appendCost(new SelfExertEffect(action, self));
|
||||
action.appendEffect(
|
||||
new ChooseAndPlayCardFromHandEffect(playerId, game, -2, CardType.COMPANION, Signet.GANDALF));
|
||||
return Collections.singletonList(action);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -111,6 +111,7 @@ public class EffectAppenderFactory {
|
||||
effectAppenderProducers.put("discardcardsfromdrawdeck", new DiscardCardsFromDrawDeck());
|
||||
effectAppenderProducers.put("incrementperturnlimit", new IncrementPerTurnLimit());
|
||||
effectAppenderProducers.put("revealhand", new RevealHand());
|
||||
effectAppenderProducers.put("placenowoundforexert", new PlaceNoWoundForExert());
|
||||
}
|
||||
|
||||
public EffectAppender getEffectAppender(JSONObject effectObject, CardGenerationEnvironment environment) throws InvalidCardDefinitionException {
|
||||
|
||||
@@ -8,11 +8,14 @@ import com.gempukku.lotro.cards.build.field.FieldUtils;
|
||||
import com.gempukku.lotro.cards.build.field.effect.EffectAppender;
|
||||
import com.gempukku.lotro.cards.build.field.effect.EffectAppenderProducer;
|
||||
import com.gempukku.lotro.cards.build.field.effect.appender.resolver.PlayerResolver;
|
||||
import com.gempukku.lotro.game.PhysicalCard;
|
||||
import com.gempukku.lotro.logic.actions.CostToEffectAction;
|
||||
import com.gempukku.lotro.logic.effects.LookAtTopCardOfADeckEffect;
|
||||
import com.gempukku.lotro.logic.timing.Effect;
|
||||
import org.json.simple.JSONObject;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class LookAtTopCardsOfDrawDeck implements EffectAppenderProducer {
|
||||
@Override
|
||||
public EffectAppender createEffectAppender(JSONObject effectObject, CardGenerationEnvironment environment) throws InvalidCardDefinitionException {
|
||||
@@ -20,6 +23,7 @@ public class LookAtTopCardsOfDrawDeck implements EffectAppenderProducer {
|
||||
|
||||
final String deck = FieldUtils.getString(effectObject.get("deck"), "deck", "you");
|
||||
final int count = FieldUtils.getInteger(effectObject.get("count"), "count", 1);
|
||||
final String memorize = FieldUtils.getString(effectObject.get("memorize"), "memorize");
|
||||
|
||||
final PlayerSource playerSource = PlayerResolver.resolvePlayer(deck, environment);
|
||||
|
||||
@@ -35,7 +39,13 @@ public class LookAtTopCardsOfDrawDeck implements EffectAppenderProducer {
|
||||
protected Effect createEffect(boolean cost, CostToEffectAction action, ActionContext actionContext) {
|
||||
final String deckId = playerSource.getPlayer(actionContext);
|
||||
|
||||
return new LookAtTopCardOfADeckEffect(actionContext.getPerformingPlayer(), count, deckId);
|
||||
return new LookAtTopCardOfADeckEffect(actionContext.getPerformingPlayer(), count, deckId) {
|
||||
@Override
|
||||
protected void cardsLookedAt(List<? extends PhysicalCard> cards) {
|
||||
if (memorize != null)
|
||||
actionContext.setCardMemory(memorize, cards);
|
||||
}
|
||||
};
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
@@ -0,0 +1,64 @@
|
||||
package com.gempukku.lotro.cards.build.field.effect.appender;
|
||||
|
||||
import com.gempukku.lotro.cards.build.ActionContext;
|
||||
import com.gempukku.lotro.cards.build.CardGenerationEnvironment;
|
||||
import com.gempukku.lotro.cards.build.InvalidCardDefinitionException;
|
||||
import com.gempukku.lotro.cards.build.field.FieldUtils;
|
||||
import com.gempukku.lotro.cards.build.field.effect.EffectAppender;
|
||||
import com.gempukku.lotro.cards.build.field.effect.EffectAppenderProducer;
|
||||
import com.gempukku.lotro.cards.build.field.effect.appender.resolver.CardResolver;
|
||||
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.CostToEffectAction;
|
||||
import com.gempukku.lotro.logic.effects.ExertCharactersEffect;
|
||||
import com.gempukku.lotro.logic.modifiers.evaluator.ConstantEvaluator;
|
||||
import com.gempukku.lotro.logic.timing.Effect;
|
||||
import com.gempukku.lotro.logic.timing.UnrespondableEffect;
|
||||
import org.json.simple.JSONObject;
|
||||
|
||||
import java.util.Collection;
|
||||
|
||||
public class PlaceNoWoundForExert implements EffectAppenderProducer {
|
||||
@Override
|
||||
public EffectAppender createEffectAppender(JSONObject effectObject, CardGenerationEnvironment environment) throws InvalidCardDefinitionException {
|
||||
FieldUtils.validateAllowedFields(effectObject, "filter");
|
||||
|
||||
final String filter = FieldUtils.getString(effectObject.get("filter"), "filter", "all(any)");
|
||||
|
||||
MultiEffectAppender result = new MultiEffectAppender();
|
||||
|
||||
result.addEffectAppender(
|
||||
CardResolver.resolveCards(filter,
|
||||
(actionContext) -> {
|
||||
final ExertCharactersEffect exertEffect = (ExertCharactersEffect) actionContext.getEffect();
|
||||
return Filters.in(exertEffect.getAffectedCardsMinusPrevented(actionContext.getGame()));
|
||||
}, new ConstantEvaluator(1), "_temp", "you", "Choose characters to not place wound on", environment));
|
||||
result.addEffectAppender(
|
||||
new DelayedAppender() {
|
||||
@Override
|
||||
protected Effect createEffect(boolean cost, CostToEffectAction action, ActionContext actionContext) {
|
||||
final Collection<? extends PhysicalCard> cards = actionContext.getCardsFromMemory("_temp");
|
||||
final ExertCharactersEffect exertEffect = (ExertCharactersEffect) actionContext.getEffect();
|
||||
|
||||
return new UnrespondableEffect() {
|
||||
@Override
|
||||
protected void doPlayEffect(LotroGame game) {
|
||||
for (PhysicalCard card : cards) {
|
||||
exertEffect.placeNoWoundOn(card);
|
||||
}
|
||||
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isPlayableInFull(ActionContext actionContext) {
|
||||
return true;
|
||||
}
|
||||
});
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -26,8 +26,6 @@ public class FilterFactory {
|
||||
appendFilter(value);
|
||||
for (Race value : Race.values())
|
||||
appendFilter(value);
|
||||
for (Signet value : Signet.values())
|
||||
appendFilter(value);
|
||||
|
||||
simpleFilters.put("ring bearer", (actionContext) -> Filters.ringBearer);
|
||||
simpleFilters.put("any", (actionContext) -> Filters.any);
|
||||
@@ -89,6 +87,13 @@ public class FilterFactory {
|
||||
|
||||
return (actionContext) -> culture;
|
||||
});
|
||||
parameterFilters.put("signet", (parameter, environment) -> {
|
||||
final Signet signet = Signet.valueOf(parameter.toUpperCase());
|
||||
if (signet == null)
|
||||
throw new InvalidCardDefinitionException("Unable to find culture for: " + parameter);
|
||||
|
||||
return (actionContext) -> signet;
|
||||
});
|
||||
parameterFilters.put("cultureFromMemory", ((parameter, environment) -> actionContext -> {
|
||||
Set<Culture> cultures = new HashSet<>();
|
||||
for (PhysicalCard physicalCard : actionContext.getCardsFromMemory(parameter)) {
|
||||
@@ -268,28 +273,24 @@ public class FilterFactory {
|
||||
};
|
||||
});
|
||||
parameterFilters.put("race",
|
||||
new FilterableSourceProducer() {
|
||||
@Override
|
||||
public FilterableSource createFilterableSource(String parameter, CardGenerationEnvironment environment) throws InvalidCardDefinitionException {
|
||||
if (parameter.equals("stored")) {
|
||||
return new FilterableSource() {
|
||||
@Override
|
||||
public Filterable getFilterable(ActionContext actionContext) {
|
||||
return new Filter() {
|
||||
@Override
|
||||
public boolean accepts(LotroGame game, PhysicalCard physicalCard) {
|
||||
final String value = (String) actionContext.getSource().getWhileInZoneData();
|
||||
if (value == null)
|
||||
return false;
|
||||
else
|
||||
return Race.valueOf(value) == physicalCard.getBlueprint().getRace();
|
||||
}
|
||||
};
|
||||
}
|
||||
};
|
||||
}
|
||||
throw new InvalidCardDefinitionException("Unknown race definition in filter");
|
||||
(parameter, environment) -> {
|
||||
if (parameter.equals("stored")) {
|
||||
return actionContext -> (Filter) (game, physicalCard) -> {
|
||||
final String value = (String) actionContext.getSource().getWhileInZoneData();
|
||||
if (value == null)
|
||||
return false;
|
||||
else
|
||||
return Race.valueOf(value) == physicalCard.getBlueprint().getRace();
|
||||
};
|
||||
} else if (parameter.equals("cannotSpot")) {
|
||||
return actionContext -> (Filter) (game, physicalCard) -> {
|
||||
final Race race = physicalCard.getBlueprint().getRace();
|
||||
if (race != null)
|
||||
return !Filters.canSpot(game, race);
|
||||
return false;
|
||||
};
|
||||
}
|
||||
throw new InvalidCardDefinitionException("Unknown race definition in filter");
|
||||
});
|
||||
parameterFilters.put("nameFromMemory",
|
||||
new FilterableSourceProducer() {
|
||||
|
||||
@@ -47,6 +47,11 @@ public class LookAtTopCardOfADeckEffect extends AbstractEffect {
|
||||
public void decisionMade(String result) throws DecisionResultInvalidException {
|
||||
}
|
||||
});
|
||||
cardsLookedAt(cards);
|
||||
return new FullEffectResult(deck.size() >= _count);
|
||||
}
|
||||
|
||||
protected void cardsLookedAt(List<? extends PhysicalCard> cards) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user