Couple of Gondor cards
This commit is contained in:
@@ -1,4 +1,161 @@
|
||||
{
|
||||
"40_93": {
|
||||
"title": "Alliance of Old",
|
||||
"culture": "gondor",
|
||||
"cost": 1,
|
||||
"type": "condition",
|
||||
"target": "companion,elf",
|
||||
"keyword": "tale",
|
||||
"effects": {
|
||||
"type": "activated",
|
||||
"phase": "skirmish",
|
||||
"cost": {
|
||||
"type": "exert",
|
||||
"filter": "choose(culture(gondor),man)"
|
||||
},
|
||||
"effect": {
|
||||
"type": "modifyStrength",
|
||||
"filter": "choose(bearer)",
|
||||
"amount": 2
|
||||
}
|
||||
}
|
||||
},
|
||||
"40_94": {
|
||||
"title": "*Aragorn",
|
||||
"subtitle": "Dunedain Ranger",
|
||||
"culture": "gondor",
|
||||
"cost": 4,
|
||||
"type": "companion",
|
||||
"race": "man",
|
||||
"strength": 8,
|
||||
"vitality": 4,
|
||||
"resistance": 8,
|
||||
"keyword": "ranger",
|
||||
"effects": {
|
||||
"type": "modifier",
|
||||
"modifier": {
|
||||
"type": "addKeyword",
|
||||
"condition": {
|
||||
"type": "location",
|
||||
"filter": "your"
|
||||
},
|
||||
"keyword": "defender+1"
|
||||
}
|
||||
}
|
||||
},
|
||||
"40_95": {
|
||||
"title": "*Aragorn",
|
||||
"subtitle": "Isildur's Heir",
|
||||
"culture": "gondor",
|
||||
"cost": 4,
|
||||
"type": "companion",
|
||||
"race": "man",
|
||||
"strength": 8,
|
||||
"vitality": 4,
|
||||
"resistance": 8,
|
||||
"keyword": "ranger",
|
||||
"effects": {
|
||||
"type": "activated",
|
||||
"phase": "maneuver",
|
||||
"cost": {
|
||||
"type": "play",
|
||||
"filter": "choose(or(artifact,possession))",
|
||||
"on": "self"
|
||||
},
|
||||
"effect": {
|
||||
"type": "heal",
|
||||
"filter": "self"
|
||||
}
|
||||
}
|
||||
},
|
||||
"40_96": {
|
||||
"title": "*Aragorn's Bow",
|
||||
"subtitle": "Swift and True",
|
||||
"culture": "gondor",
|
||||
"cost": 1,
|
||||
"type": "possession",
|
||||
"possession": "ranged weapon",
|
||||
"target": "name(Aragorn)",
|
||||
"effects": [
|
||||
{
|
||||
"type": "modifier",
|
||||
"modifier": {
|
||||
"type": "addKeyword",
|
||||
"filter": "bearer",
|
||||
"keyword": "archer"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "trigger",
|
||||
"trigger": {
|
||||
"type": "startOfPhase",
|
||||
"phase": "archery"
|
||||
},
|
||||
"optional": true,
|
||||
"cost": {
|
||||
"type": "exert",
|
||||
"filter": "choose(name(Aragorn))"
|
||||
},
|
||||
"effect": [
|
||||
{
|
||||
"type": "wound",
|
||||
"filter": "choose(minion)"
|
||||
},
|
||||
{
|
||||
"type": "doesNotAddToArcheryTotal",
|
||||
"filter": "choose(name(Aragorn))"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"40_97": {
|
||||
"title": "*Aragorn's Pipe",
|
||||
"culture": "gondor",
|
||||
"cost": 1,
|
||||
"type": "possession",
|
||||
"possession": "pipe",
|
||||
"target": "culture(gondor),man",
|
||||
"effects": {
|
||||
"type": "activated",
|
||||
"phase": "skirmish",
|
||||
"limitPerPhase": 1,
|
||||
"cost": [
|
||||
{
|
||||
"type": "discard",
|
||||
"filter": "choose(pipeweed,possession)"
|
||||
},
|
||||
{
|
||||
"type": "chooseHowManyToSpot",
|
||||
"filter": "pipe",
|
||||
"memorize": "numberOfPipes"
|
||||
}
|
||||
],
|
||||
"effect": {
|
||||
"type": "modifyStrength",
|
||||
"filter": "choose(companion,hasAttached(pipe))",
|
||||
"amount": {
|
||||
"type": "fromMemory",
|
||||
"memory": "numberOfPipes"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"40_98": {
|
||||
"title": "Armor",
|
||||
"culture": "gondor",
|
||||
"cost": 1,
|
||||
"type": "possession",
|
||||
"possession": "armor",
|
||||
"target": "man",
|
||||
"effects": {
|
||||
"type": "modifier",
|
||||
"modifier": {
|
||||
"type": "cantTakeMoreWoundsThan",
|
||||
"filter": "bearer"
|
||||
}
|
||||
}
|
||||
},
|
||||
"40_313": {
|
||||
"title": "Athelas",
|
||||
"subtitle": "Asëa Aranion",
|
||||
|
||||
@@ -1,67 +0,0 @@
|
||||
package com.gempukku.lotro.cards.set40.gandalf;
|
||||
|
||||
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.actions.PlayEventAction;
|
||||
import com.gempukku.lotro.logic.cardtype.AbstractEvent;
|
||||
import com.gempukku.lotro.logic.effects.AddUntilEndOfPhaseActionProxyEffect;
|
||||
import com.gempukku.lotro.logic.effects.DrawCardsEffect;
|
||||
import com.gempukku.lotro.logic.effects.OptionalEffect;
|
||||
import com.gempukku.lotro.logic.effects.choose.ChooseAndAddUntilEOPStrengthBonusEffect;
|
||||
import com.gempukku.lotro.logic.timing.EffectResult;
|
||||
import com.gempukku.lotro.logic.timing.TriggerConditions;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Title: Answers in the Fire
|
||||
* Set: Second Edition
|
||||
* Side: Free
|
||||
* Culture: Gandalf
|
||||
* Twilight Cost: 0
|
||||
* Type: Event - Skirmish
|
||||
* Card Number: 1R64
|
||||
* Game Text: Make Gandalf strength +1. If Gandalf wins this skirmish, you may draw 2 cards.
|
||||
*/
|
||||
public class Card40_064 extends AbstractEvent{
|
||||
public Card40_064() {
|
||||
super(Side.FREE_PEOPLE, 0, Culture.GANDALF, "Answers in the Fire", Phase.SKIRMISH);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PlayEventAction getPlayEventCardAction(String playerId, LotroGame game, final PhysicalCard self) {
|
||||
final PlayEventAction action = new PlayEventAction(self);
|
||||
action.appendEffect(
|
||||
new ChooseAndAddUntilEOPStrengthBonusEffect(
|
||||
action, self, playerId, 1, Filters.gandalf) {
|
||||
@Override
|
||||
protected void selectedCharacterCallback(final PhysicalCard selectedCharacter) {
|
||||
action.appendEffect(
|
||||
new AddUntilEndOfPhaseActionProxyEffect(
|
||||
new AbstractActionProxy() {
|
||||
@Override
|
||||
public List<? extends OptionalTriggerAction> getOptionalAfterTriggers(String playerId, LotroGame game, EffectResult effectResult) {
|
||||
if (TriggerConditions.winsSkirmish(game, effectResult, selectedCharacter)
|
||||
&& playerId.equals(selectedCharacter.getOwner())) {
|
||||
OptionalTriggerAction action = new OptionalTriggerAction(self);
|
||||
action.setVirtualCardAction(true);
|
||||
action.appendEffect(
|
||||
new OptionalEffect(action, playerId,
|
||||
new DrawCardsEffect(action, playerId, 2)));
|
||||
return Collections.singletonList(action);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}));
|
||||
}
|
||||
});
|
||||
return action;
|
||||
}
|
||||
}
|
||||
@@ -1,47 +0,0 @@
|
||||
package com.gempukku.lotro.cards.set40.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.AddUntilEndOfPhaseModifierEffect;
|
||||
import com.gempukku.lotro.logic.modifiers.SidePlayerCantPlayPhaseEventsOrSpecialAbilitiesModifier;
|
||||
import com.gempukku.lotro.logic.timing.PlayConditions;
|
||||
|
||||
/**
|
||||
* Title: Binding Light
|
||||
* Set: Second Edition
|
||||
* Side: Free
|
||||
* Culture: Gandalf
|
||||
* Twilight Cost: 3
|
||||
* Type: Event - Skirmish
|
||||
* Card Number: 1U66
|
||||
* Game Text: Spell. To play, spot Gandalf and another unbound companion.
|
||||
* The Shadow player may not play skirmish events or use skirmish special abilities during that companion's skirmish.
|
||||
*/
|
||||
public class Card40_066 extends AbstractEvent {
|
||||
public Card40_066() {
|
||||
super(Side.FREE_PEOPLE, 3, Culture.GANDALF, "Binding Light", Phase.SKIRMISH);
|
||||
addKeyword(Keyword.SPELL);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkPlayRequirements(LotroGame game, PhysicalCard self) {
|
||||
return PlayConditions.canSpot(game, Filters.gandalf)
|
||||
&& PlayConditions.canSpot(game, Filters.inSkirmish, Filters.unboundCompanion, Filters.not(Filters.gandalf));
|
||||
}
|
||||
|
||||
@Override
|
||||
public PlayEventAction getPlayEventCardAction(String playerId, LotroGame game, PhysicalCard self) {
|
||||
PlayEventAction action = new PlayEventAction(self);
|
||||
action.appendEffect(
|
||||
new AddUntilEndOfPhaseModifierEffect(
|
||||
new SidePlayerCantPlayPhaseEventsOrSpecialAbilitiesModifier(self, Side.SHADOW, Phase.SKIRMISH), Phase.SKIRMISH));
|
||||
return action;
|
||||
}
|
||||
}
|
||||
@@ -1,53 +0,0 @@
|
||||
package com.gempukku.lotro.cards.set40.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.AddUntilEndOfPhaseModifierEffect;
|
||||
import com.gempukku.lotro.logic.effects.ChooseActiveCardEffect;
|
||||
import com.gempukku.lotro.logic.modifiers.StrengthModifier;
|
||||
import com.gempukku.lotro.logic.timing.PlayConditions;
|
||||
|
||||
/**
|
||||
* Title: Bolstered Spirits
|
||||
* Set: Second Edition
|
||||
* Side: Free
|
||||
* Culture: Gandalf
|
||||
* Twilight Cost: 1
|
||||
* Type: Event - Skirmish
|
||||
* Card Number: 1C67
|
||||
* Game Text: Spell. Spot Gandalf to make an unbound companion strength +2 (or strength +3 if that companion has 4 or more resistance).
|
||||
*/
|
||||
public class Card40_067 extends AbstractEvent {
|
||||
public Card40_067() {
|
||||
super(Side.FREE_PEOPLE, 1, Culture.GANDALF, "Bolstered Spirits", Phase.SKIRMISH);
|
||||
addKeyword(Keyword.SPELL);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkPlayRequirements(LotroGame game, PhysicalCard self) {
|
||||
return PlayConditions.canSpot(game, Filters.gandalf);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PlayEventAction getPlayEventCardAction(String playerId, LotroGame game, final PhysicalCard self) {
|
||||
final PlayEventAction action = new PlayEventAction(self);
|
||||
action.appendEffect(
|
||||
new ChooseActiveCardEffect(self, playerId, "Choose an unbound companion", Filters.unboundCompanion) {
|
||||
@Override
|
||||
protected void cardSelected(LotroGame game, PhysicalCard card) {
|
||||
int bonus = (game.getModifiersQuerying().getResistance(game, card)>=4)?3:2;
|
||||
action.appendEffect(
|
||||
new AddUntilEndOfPhaseModifierEffect(
|
||||
new StrengthModifier(self, card, bonus)));
|
||||
}
|
||||
});
|
||||
return action;
|
||||
}
|
||||
}
|
||||
@@ -1,70 +0,0 @@
|
||||
package com.gempukku.lotro.cards.set40.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.decisions.DecisionResultInvalidException;
|
||||
import com.gempukku.lotro.logic.decisions.IntegerAwaitingDecision;
|
||||
import com.gempukku.lotro.logic.effects.AddTwilightEffect;
|
||||
import com.gempukku.lotro.logic.effects.PlayoutDecisionEffect;
|
||||
import com.gempukku.lotro.logic.effects.choose.ChooseAndDiscardCardsFromPlayEffect;
|
||||
import com.gempukku.lotro.logic.effects.choose.ChooseAndExertCharactersEffect;
|
||||
import com.gempukku.lotro.logic.timing.PlayConditions;
|
||||
|
||||
import java.util.Collection;
|
||||
|
||||
/**
|
||||
* Title: Discernment
|
||||
* Set: Second Edition
|
||||
* Side: Free
|
||||
* Culture: Gandalf
|
||||
* Twilight Cost: 0
|
||||
* Type: Event - Fellowship
|
||||
* Card Number: 1C68
|
||||
* Game Text: Spell. Exert Gandalf and add (X) to discard up to two Shadow conditions with a combined twilight cost of X or less.
|
||||
*/
|
||||
public class Card40_068 extends AbstractEvent {
|
||||
public Card40_068() {
|
||||
super(Side.FREE_PEOPLE, 0, Culture.GANDALF, "Discernment", Phase.FELLOWSHIP);
|
||||
addKeyword(Keyword.SPELL);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkPlayRequirements(LotroGame game, PhysicalCard self) {
|
||||
return PlayConditions.canExert(self, game, Filters.gandalf);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PlayEventAction getPlayEventCardAction(final String playerId, LotroGame game, final PhysicalCard self) {
|
||||
final PlayEventAction action = new PlayEventAction(self);
|
||||
action.appendCost(
|
||||
new ChooseAndExertCharactersEffect(action, playerId, 1, 1, Filters.gandalf));
|
||||
action.appendCost(
|
||||
new PlayoutDecisionEffect(playerId,
|
||||
new IntegerAwaitingDecision(1, "Choose number of twilight to add", 0) {
|
||||
@Override
|
||||
public void decisionMade(String result) throws DecisionResultInvalidException {
|
||||
final int twilightCount = getValidatedResult(result);
|
||||
if (twilightCount > 0)
|
||||
action.appendCost(
|
||||
new AddTwilightEffect(self, twilightCount));
|
||||
action.appendEffect(
|
||||
new ChooseAndDiscardCardsFromPlayEffect(action, playerId, 1, 1, Side.SHADOW, CardType.CONDITION, Filters.maxPrintedTwilightCost(twilightCount)) {
|
||||
@Override
|
||||
protected void cardsToBeDiscardedCallback(Collection<PhysicalCard> cards) {
|
||||
int remainingTwilight = twilightCount;
|
||||
for (PhysicalCard card : cards)
|
||||
remainingTwilight -= card.getBlueprint().getTwilightCost();
|
||||
|
||||
action.appendEffect(
|
||||
new ChooseAndDiscardCardsFromPlayEffect(action, playerId, 1, 1, Side.SHADOW, CardType.CONDITION, Filters.maxPrintedTwilightCost(remainingTwilight)));
|
||||
}
|
||||
});
|
||||
}
|
||||
}));
|
||||
return action;
|
||||
}
|
||||
}
|
||||
@@ -1,41 +0,0 @@
|
||||
package com.gempukku.lotro.cards.set40.gandalf;
|
||||
|
||||
import com.gempukku.lotro.common.CardType;
|
||||
import com.gempukku.lotro.common.Culture;
|
||||
import com.gempukku.lotro.common.Race;
|
||||
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.evaluator.CountSpottableEvaluator;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Title: *Gandalf, Disturber of the Peace
|
||||
* Set: Second Edition
|
||||
* Side: Free
|
||||
* Culture: Gandalf
|
||||
* Twilight Cost: 4
|
||||
* Type: Companion - Wizard
|
||||
* Strength: 6
|
||||
* Vitality: 4
|
||||
* Resistance: 8
|
||||
* Card Number: 1C69
|
||||
* Game Text: Gandalf is strength +1 for each Hobbit companion you can spot.
|
||||
*/
|
||||
public class Card40_069 extends AbstractCompanion{
|
||||
public Card40_069() {
|
||||
super(4, 6, 4, 8, Culture.GANDALF, Race.WIZARD, null, "Gandalf",
|
||||
"Disturber of the Peace", true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<? extends Modifier> getInPlayModifiers(LotroGame game, PhysicalCard self) {
|
||||
StrengthModifier modifier = new StrengthModifier(self, self, null,
|
||||
new CountSpottableEvaluator(Race.HOBBIT, CardType.COMPANION));
|
||||
return Collections.singletonList(modifier);
|
||||
}
|
||||
}
|
||||
@@ -1,46 +0,0 @@
|
||||
package com.gempukku.lotro.cards.set40.gandalf;
|
||||
|
||||
import com.gempukku.lotro.logic.cardtype.AbstractCompanion;
|
||||
import com.gempukku.lotro.logic.timing.TriggerConditions;
|
||||
import com.gempukku.lotro.common.Culture;
|
||||
import com.gempukku.lotro.common.Keyword;
|
||||
import com.gempukku.lotro.common.Race;
|
||||
import com.gempukku.lotro.game.PhysicalCard;
|
||||
import com.gempukku.lotro.game.state.LotroGame;
|
||||
import com.gempukku.lotro.logic.actions.OptionalTriggerAction;
|
||||
import com.gempukku.lotro.logic.effects.DrawCardsEffect;
|
||||
import com.gempukku.lotro.logic.timing.EffectResult;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Title: *Gandalf, Wisest of the Istari
|
||||
* Set: Second Edition
|
||||
* Side: Free
|
||||
* Culture: Gandalf
|
||||
* Twilight Cost: 4
|
||||
* Type: Companion - Wizard
|
||||
* Strength: 7
|
||||
* Vitality: 4
|
||||
* Resistance: 8
|
||||
* Card Number: 1R70
|
||||
* Game Text: Each time you play a [GANDALF] spell, you may draw a card.
|
||||
*/
|
||||
public class Card40_070 extends AbstractCompanion{
|
||||
public Card40_070() {
|
||||
super(4, 7, 4, 8, Culture.GANDALF, Race.WIZARD, null, "Gandalf",
|
||||
"Wisest of the Istari", true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<OptionalTriggerAction> getOptionalAfterTriggers(String playerId, LotroGame game, EffectResult effectResult, PhysicalCard self) {
|
||||
if (TriggerConditions.played(game, effectResult, Culture.GANDALF, Keyword.SPELL)) {
|
||||
OptionalTriggerAction action = new OptionalTriggerAction(self);
|
||||
action.appendEffect(
|
||||
new DrawCardsEffect(action, playerId, 1));
|
||||
return Collections.singletonList(action);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -1,54 +0,0 @@
|
||||
package com.gempukku.lotro.cards.set40.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.AbstractAttachableFPPossession;
|
||||
import com.gempukku.lotro.logic.effects.DrawCardsEffect;
|
||||
import com.gempukku.lotro.logic.effects.IncrementPhaseLimitEffect;
|
||||
import com.gempukku.lotro.logic.effects.choose.ChooseAndDiscardCardsFromPlayEffect;
|
||||
import com.gempukku.lotro.logic.timing.PlayConditions;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Title: *Gandalf's Pipe
|
||||
* Set: Second Edition
|
||||
* Side: Free
|
||||
* Culture: Gandalf
|
||||
* Twilight Cost: 1
|
||||
* Type: Possession - Pipe
|
||||
* Card Number: 1U71
|
||||
* Game Text: Bearer must be Gandalf;
|
||||
* Maneuver: Discard a pipeweed possession and spot X pipes to draw X cards (limit once per phase).
|
||||
*/
|
||||
public class Card40_071 extends AbstractAttachableFPPossession {
|
||||
public Card40_071() {
|
||||
super(1, 0, 0, Culture.GANDALF, PossessionClass.PIPE, "Gandalf's Pipe", null, true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Filterable getValidTargetFilter(String playerId, LotroGame game, PhysicalCard self) {
|
||||
return Filters.gandalf;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<? extends ActivateCardAction> getPhaseActionsInPlay(String playerId, LotroGame game, PhysicalCard self) {
|
||||
if (PlayConditions.canUseFPCardDuringPhase(game, Phase.MANEUVER, self)
|
||||
&& PlayConditions.canDiscardFromPlay(self, game, CardType.POSSESSION, Keyword.PIPEWEED)
|
||||
&& PlayConditions.checkPhaseLimit(game, self, 1)) {
|
||||
ActivateCardAction action = new ActivateCardAction(self);
|
||||
action.appendCost(
|
||||
new IncrementPhaseLimitEffect(self, 1));
|
||||
action.appendCost(
|
||||
new ChooseAndDiscardCardsFromPlayEffect(action, playerId, 1, 1, CardType.POSSESSION, Keyword.PIPEWEED));
|
||||
action.appendEffect(
|
||||
new DrawCardsEffect(action, playerId, Filters.countSpottable(game, PossessionClass.PIPE)));
|
||||
return Collections.singletonList(action);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -1,76 +0,0 @@
|
||||
package com.gempukku.lotro.cards.set40.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.actions.RequiredTriggerAction;
|
||||
import com.gempukku.lotro.logic.cardtype.AbstractAttachableFPPossession;
|
||||
import com.gempukku.lotro.logic.effects.AddUntilEndOfTurnModifierEffect;
|
||||
import com.gempukku.lotro.logic.effects.choose.ChooseAndDiscardCardsFromPlayEffect;
|
||||
import com.gempukku.lotro.logic.effects.choose.ChooseAndExertCharactersEffect;
|
||||
import com.gempukku.lotro.logic.modifiers.ShadowCantHaveInitiativeModifier;
|
||||
import com.gempukku.lotro.logic.timing.EffectResult;
|
||||
import com.gempukku.lotro.logic.timing.PlayConditions;
|
||||
import com.gempukku.lotro.logic.timing.TriggerConditions;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Title: *Gandalf's Staff, Dispeller of Darkness
|
||||
* Set: Second Edition
|
||||
* Side: Free
|
||||
* Culture: Gandalf
|
||||
* Twilight Cost: 2
|
||||
* Type: Artifact - Staff
|
||||
* Vitality: +1
|
||||
* Resistance: +1
|
||||
* Card Number: 1R72
|
||||
* Game Text: Bearer must be Gandalf.
|
||||
* During the turn Gandalf's staff is played, the Shadow player may not have initiative.
|
||||
* Maneuver: Exert Gandalf twice to discard a Shadow condition.
|
||||
*/
|
||||
public class Card40_072 extends AbstractAttachableFPPossession{
|
||||
public Card40_072() {
|
||||
super(2, 0, 1, Culture.GANDALF, PossessionClass.STAFF, "Gandalf's Staff",
|
||||
"Dispeller of Darkness", true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Filterable getValidTargetFilter(String playerId, LotroGame game, PhysicalCard self) {
|
||||
return Filters.gandalf;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getResistance() {
|
||||
return 1;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<RequiredTriggerAction> getRequiredAfterTriggers(LotroGame game, EffectResult effectResult, PhysicalCard self) {
|
||||
if (TriggerConditions.played(game, effectResult, self)) {
|
||||
RequiredTriggerAction action = new RequiredTriggerAction(self);
|
||||
action.appendEffect(
|
||||
new AddUntilEndOfTurnModifierEffect(
|
||||
new ShadowCantHaveInitiativeModifier(self, null)));
|
||||
return Collections.singletonList(action);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<? extends ActivateCardAction> getPhaseActionsInPlay(String playerId, LotroGame game, PhysicalCard self) {
|
||||
if (PlayConditions.canUseFPCardDuringPhase(game, Phase.MANEUVER, self)
|
||||
&& PlayConditions.canExert(self, game, 2, Filters.gandalf)) {
|
||||
ActivateCardAction action = new ActivateCardAction(self);
|
||||
action.appendCost(
|
||||
new ChooseAndExertCharactersEffect(action, playerId, 1, 1, 2, Filters.gandalf));
|
||||
action.appendEffect(
|
||||
new ChooseAndDiscardCardsFromPlayEffect(action, playerId, 1, 1, Side.SHADOW, CardType.CONDITION));
|
||||
return Collections.singletonList(action);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -1,45 +0,0 @@
|
||||
package com.gempukku.lotro.cards.set40.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.cardtype.AbstractAttachableFPPossession;
|
||||
import com.gempukku.lotro.logic.modifiers.KeywordModifier;
|
||||
import com.gempukku.lotro.logic.modifiers.Modifier;
|
||||
import com.gempukku.lotro.logic.modifiers.StrengthModifier;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Title: *Glamdring, Turgon's Blade
|
||||
* Set: Second Edition
|
||||
* Side: Free
|
||||
* Culture: Gandalf
|
||||
* Twilight Cost: 2
|
||||
* Type: Possession - Hand Weapon
|
||||
* Strength: +2
|
||||
* Card Number: 1R73
|
||||
* Game Text: Bearer must be Gandalf. While skirmishing an Orc or Goblin, Gandalf is strength +2 and damage +1.
|
||||
*/
|
||||
public class Card40_073 extends AbstractAttachableFPPossession{
|
||||
public Card40_073() {
|
||||
super(2, 2, 0, Culture.GANDALF, PossessionClass.HAND_WEAPON, "Glamdring",
|
||||
"Turgon's Blade", true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Filterable getValidTargetFilter(String playerId, LotroGame game, PhysicalCard self) {
|
||||
return Filters.gandalf;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<? extends Modifier> getInPlayModifiers(LotroGame game, PhysicalCard self) {
|
||||
Filter skirmishingOrcOrGoblin = Filters.and(Filters.hasAttached(self), Filters.inSkirmishAgainst(Filters.or(Race.ORC, Race.GOBLIN)));
|
||||
StrengthModifier modifier1 = new StrengthModifier(self,skirmishingOrcOrGoblin, 2);
|
||||
KeywordModifier modifier2 = new KeywordModifier(self, skirmishingOrcOrGoblin, Keyword.DAMAGE, 1);
|
||||
return Arrays.asList(modifier1, modifier2);
|
||||
}
|
||||
}
|
||||
@@ -1,65 +0,0 @@
|
||||
package com.gempukku.lotro.cards.set40.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.AbstractAttachable;
|
||||
import com.gempukku.lotro.logic.effects.ChooseAndWoundCharactersEffect;
|
||||
import com.gempukku.lotro.logic.effects.SelfDiscardEffect;
|
||||
import com.gempukku.lotro.logic.modifiers.CantTakeMoreThanXWoundsModifier;
|
||||
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;
|
||||
|
||||
/**
|
||||
* Title: *Grace of the Valar
|
||||
* Set: Second Edition
|
||||
* Side: Free
|
||||
* Culture: Gandalf
|
||||
* Twilight Cost: 1
|
||||
* Type: Condition - Companion
|
||||
* Card Number: 1R74
|
||||
* Strength: +1
|
||||
* Game Text: Spell. Bearer must be Gandalf.
|
||||
* Gandalf takes no more than one wound in a skirmish. If you lose initiative, discard this condition and wound Gandalf.
|
||||
*/
|
||||
public class Card40_074 extends AbstractAttachable{
|
||||
public Card40_074() {
|
||||
super(Side.FREE_PEOPLE, CardType.CONDITION, 1, Culture.GANDALF, null, "Grace of the Valar", null, true);
|
||||
addKeyword(Keyword.SPELL);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Filterable getValidTargetFilter(String playerId, LotroGame game, PhysicalCard self) {
|
||||
return Filters.gandalf;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<? extends Modifier> getInPlayModifiers(LotroGame game, PhysicalCard self) {
|
||||
CantTakeMoreThanXWoundsModifier modifier = new CantTakeMoreThanXWoundsModifier(self, Phase.SKIRMISH, 1, Filters.hasAttached(self));
|
||||
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));
|
||||
action.appendEffect(
|
||||
new ChooseAndWoundCharactersEffect(action, self.getOwner(), 1, 1, self.getAttachedTo()));
|
||||
return Collections.singletonList(action);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getStrength() {
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
@@ -1,73 +0,0 @@
|
||||
package com.gempukku.lotro.cards.set40.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.AddUntilEndOfTurnModifierEffect;
|
||||
import com.gempukku.lotro.logic.effects.CancelSkirmishEffect;
|
||||
import com.gempukku.lotro.logic.effects.SelfExertEffect;
|
||||
import com.gempukku.lotro.logic.effects.choose.ChooseAndExertCharactersEffect;
|
||||
import com.gempukku.lotro.logic.modifiers.AllyParticipatesInArcheryFireAndSkirmishesModifier;
|
||||
import com.gempukku.lotro.logic.timing.PlayConditions;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Title: *Gwaihir, Great Eagle
|
||||
* Set: Second Edition
|
||||
* Side: Free
|
||||
* Culture: Gandalf
|
||||
* Twilight Cost: 4
|
||||
* Type: Ally - Eagle
|
||||
* Strength: 7
|
||||
* Vitality: 4
|
||||
* Card Number: 1R75
|
||||
* Game Text: To play, spot Gandalf.
|
||||
* Maneuver: At sites 1-5, exert Gandalf twice to allow Gwaihir to participate in archery fire and skirmishes.
|
||||
* Skirmish: At sites 6-9, exert Gwaihir twice to cancel a skirmish involving Gandalf.
|
||||
*/
|
||||
public class Card40_075 extends AbstractAlly{
|
||||
public Card40_075() {
|
||||
super(4, SitesBlock.SECOND_ED, 0, 7, 4, Race.EAGLE, Culture.GANDALF, "Gwaihir", "Great Eagle", true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkPlayRequirements(LotroGame game, PhysicalCard self) {
|
||||
return PlayConditions.canSpot(game, Filters.gandalf);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<? extends ActivateCardAction> getPhaseActionsInPlay(String playerId, LotroGame game, PhysicalCard self) {
|
||||
if (PlayConditions.canUseFPCardDuringPhase(game, Phase.MANEUVER, self)
|
||||
&& PlayConditions.location(game, Filters.siteNumberBetweenInclusive(1, 5))
|
||||
&& PlayConditions.canExert(self, game, 2, Filters.gandalf)) {
|
||||
ActivateCardAction action = new ActivateCardAction(self);
|
||||
action.appendCost(
|
||||
new ChooseAndExertCharactersEffect(action, playerId, 1, 1, 2, Filters.gandalf));
|
||||
action.appendEffect(
|
||||
new AddUntilEndOfTurnModifierEffect(
|
||||
new AllyParticipatesInArcheryFireAndSkirmishesModifier(self, self)));
|
||||
return Collections.singletonList(action);
|
||||
}
|
||||
if (PlayConditions.canUseFPCardDuringPhase(game, Phase.SKIRMISH, self)
|
||||
&& PlayConditions.location(game, Filters.siteNumberBetweenInclusive(6, 9))
|
||||
&& PlayConditions.canSelfExert(self, 2, game)) {
|
||||
ActivateCardAction action = new ActivateCardAction(self);
|
||||
action.appendCost(
|
||||
new SelfExertEffect(action, self));
|
||||
action.appendCost(
|
||||
new SelfExertEffect(action, self));
|
||||
action.appendEffect(
|
||||
new CancelSkirmishEffect(Filters.gandalf));
|
||||
return Collections.singletonList(action);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -1,46 +0,0 @@
|
||||
package com.gempukku.lotro.cards.set40.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.choose.ChooseAndExertCharactersEffect;
|
||||
import com.gempukku.lotro.logic.effects.choose.ChooseAndPutCardFromDiscardIntoHandEffect;
|
||||
import com.gempukku.lotro.logic.timing.PlayConditions;
|
||||
|
||||
/**
|
||||
* Title: He's Remembered!
|
||||
* Set: Second Edition
|
||||
* Side: Free
|
||||
* Culture: Gandalf
|
||||
* Twilight Cost: 0
|
||||
* Type: Event- Regroup
|
||||
* Card Number: 1C76
|
||||
* Game Text: Spell. Exert Gandalf to take a [GANDALF] card from your discard pile into hand.
|
||||
*/
|
||||
public class Card40_076 extends AbstractEvent {
|
||||
public Card40_076() {
|
||||
super(Side.FREE_PEOPLE, 0, Culture.GANDALF, "He's Remembered!", Phase.REGROUP);
|
||||
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);
|
||||
action.appendCost(
|
||||
new ChooseAndExertCharactersEffect(action, playerId, 1, 1, Filters.gandalf));
|
||||
action.appendEffect(
|
||||
new ChooseAndPutCardFromDiscardIntoHandEffect(action, playerId, 1, 1, Culture.GANDALF));
|
||||
return action;
|
||||
}
|
||||
}
|
||||
@@ -1,77 +0,0 @@
|
||||
package com.gempukku.lotro.cards.set40.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.AbstractAttachable;
|
||||
import com.gempukku.lotro.logic.effects.ChooseAndDiscardCardsFromHandEffect;
|
||||
import com.gempukku.lotro.logic.effects.RemoveBurdenEffect;
|
||||
import com.gempukku.lotro.logic.modifiers.AbstractExtraPlayCostModifier;
|
||||
import com.gempukku.lotro.logic.modifiers.cost.ExertExtraPlayCostModifier;
|
||||
import com.gempukku.lotro.logic.timing.PlayConditions;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Title: *I Will Help You Bear This Burden
|
||||
* Set: Second Edition
|
||||
* Side: Free
|
||||
* Culture: Gandalf
|
||||
* Twilight Cost: 2
|
||||
* Type: Condition - Companion
|
||||
* Strength: +1
|
||||
* Resistance: +1
|
||||
* Card Number: 1U77
|
||||
* Game Text: Spell. To play, exert Gandalf. Plays on Frodo.
|
||||
* Fellowship or Regroup: Discard 2 [GANDALF] cards from hand to remove a burden.
|
||||
*/
|
||||
public class Card40_077 extends AbstractAttachable{
|
||||
public Card40_077() {
|
||||
super(Side.FREE_PEOPLE, CardType.CONDITION, 2, Culture.GANDALF, null, "I Will Help You Bear This Burden", null, true);
|
||||
addKeyword(Keyword.SPELL);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkPlayRequirements(LotroGame game, PhysicalCard self) {
|
||||
return PlayConditions.canExert(self, game, Filters.gandalf);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Filterable getValidTargetFilter(String playerId, LotroGame game, PhysicalCard self) {
|
||||
return Filters.frodo;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<? extends AbstractExtraPlayCostModifier> getExtraCostToPlay(LotroGame game, PhysicalCard self) {
|
||||
return Collections.singletonList(
|
||||
new ExertExtraPlayCostModifier(self, self, null, 1, Filters.gandalf));
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<? extends ActivateCardAction> getPhaseActionsInPlay(String playerId, LotroGame game, PhysicalCard self) {
|
||||
if ((PlayConditions.canUseFPCardDuringPhase(game, Phase.FELLOWSHIP, self)
|
||||
|| PlayConditions.canUseFPCardDuringPhase(game, Phase.REGROUP, self))
|
||||
&& PlayConditions.canDiscardFromHand(game, playerId, 2, Culture.GANDALF)) {
|
||||
ActivateCardAction action = new ActivateCardAction(self);
|
||||
action.appendCost(
|
||||
new ChooseAndDiscardCardsFromHandEffect(action,playerId, false, 2, Culture.GANDALF));
|
||||
action.appendEffect(
|
||||
new RemoveBurdenEffect(playerId, self, 1));
|
||||
return Collections.singletonList(action);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getStrength() {
|
||||
return 1;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getResistance() {
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
@@ -1,60 +0,0 @@
|
||||
package com.gempukku.lotro.cards.set40.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.GameUtils;
|
||||
import com.gempukku.lotro.logic.actions.PlayEventAction;
|
||||
import com.gempukku.lotro.logic.cardtype.AbstractEvent;
|
||||
import com.gempukku.lotro.logic.effects.ChooseAndHealCharactersEffect;
|
||||
import com.gempukku.lotro.logic.effects.RevealRandomCardsFromHandEffect;
|
||||
import com.gempukku.lotro.logic.effects.choose.ChooseAndExertCharactersEffect;
|
||||
import com.gempukku.lotro.logic.timing.PlayConditions;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Title: Illuminate
|
||||
* Set: Second Edition
|
||||
* Side: Free
|
||||
* Culture: Gandalf
|
||||
* Twilight Cost: 1
|
||||
* Type: Event - Maneuver
|
||||
* Card Number: 1C78
|
||||
* Game Text: Spell.
|
||||
* Spot Gandalf to reveal a card at random from your opponent's hand. If it is a Free Peoples card, heal a companion.
|
||||
* If it is a Shadow card, exert a minion.
|
||||
*/
|
||||
public class Card40_078 extends AbstractEvent{
|
||||
public Card40_078() {
|
||||
super(Side.FREE_PEOPLE, 1, Culture.GANDALF, "Illuminate", Phase.MANEUVER);
|
||||
addKeyword(Keyword.SPELL);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkPlayRequirements(LotroGame game, PhysicalCard self) {
|
||||
return PlayConditions.canSpot(game, Filters.gandalf);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PlayEventAction getPlayEventCardAction(final String playerId, final LotroGame game, PhysicalCard self) {
|
||||
final PlayEventAction action = new PlayEventAction(self);
|
||||
action.appendEffect(
|
||||
new RevealRandomCardsFromHandEffect(playerId, GameUtils.getFirstShadowPlayer(game), self, 1) {
|
||||
@Override
|
||||
protected void cardsRevealed(List<PhysicalCard> revealedCards) {
|
||||
if (revealedCards.size()>0) {
|
||||
PhysicalCard revealedCard = revealedCards.get(0);
|
||||
if (Filters.and(Side.FREE_PEOPLE).accepts(game, revealedCard))
|
||||
action.appendEffect(
|
||||
new ChooseAndHealCharactersEffect(action, playerId, CardType.COMPANION));
|
||||
if (Filters.and(Side.SHADOW).accepts(game, revealedCard))
|
||||
action.appendEffect(
|
||||
new ChooseAndExertCharactersEffect(action, playerId, 1, 1, CardType.MINION));
|
||||
}
|
||||
}
|
||||
});
|
||||
return action;
|
||||
}
|
||||
}
|
||||
@@ -1,68 +0,0 @@
|
||||
package com.gempukku.lotro.cards.set40.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.ActivateCardAction;
|
||||
import com.gempukku.lotro.logic.actions.OptionalTriggerAction;
|
||||
import com.gempukku.lotro.logic.cardtype.AbstractPermanent;
|
||||
import com.gempukku.lotro.logic.effects.DrawCardsEffect;
|
||||
import com.gempukku.lotro.logic.effects.SelfDiscardEffect;
|
||||
import com.gempukku.lotro.logic.effects.ShuffleDeckEffect;
|
||||
import com.gempukku.lotro.logic.effects.choose.ChooseAndExertCharactersEffect;
|
||||
import com.gempukku.lotro.logic.effects.choose.ChooseAndPutCardFromDeckIntoHandEffect;
|
||||
import com.gempukku.lotro.logic.timing.EffectResult;
|
||||
import com.gempukku.lotro.logic.timing.PlayConditions;
|
||||
import com.gempukku.lotro.logic.timing.TriggerConditions;
|
||||
|
||||
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, "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
|
||||
public List<? extends ActivateCardAction> getPhaseActionsInPlay(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;
|
||||
}
|
||||
}
|
||||
@@ -1,67 +0,0 @@
|
||||
package com.gempukku.lotro.cards.set40.gandalf;
|
||||
|
||||
import com.gempukku.lotro.common.CardType;
|
||||
import com.gempukku.lotro.common.Culture;
|
||||
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.RequiredTriggerAction;
|
||||
import com.gempukku.lotro.logic.cardtype.AbstractPermanent;
|
||||
import com.gempukku.lotro.logic.effects.SelfDiscardEffect;
|
||||
import com.gempukku.lotro.logic.modifiers.AbstractExtraPlayCostModifier;
|
||||
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.modifiers.condition.AndCondition;
|
||||
import com.gempukku.lotro.logic.modifiers.condition.InitiativeCondition;
|
||||
import com.gempukku.lotro.logic.modifiers.cost.ExertExtraPlayCostModifier;
|
||||
import com.gempukku.lotro.logic.timing.EffectResult;
|
||||
import com.gempukku.lotro.logic.timing.TriggerConditions;
|
||||
|
||||
import java.util.Arrays;
|
||||
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, "Keep it Secret, Keep it Safe", null, true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<? extends AbstractExtraPlayCostModifier> getExtraCostToPlay(LotroGame game, PhysicalCard self) {
|
||||
return Collections.singletonList(
|
||||
new ExertExtraPlayCostModifier(self, self, null, Filters.gandalf));
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<? extends Modifier> getInPlayModifiers(LotroGame game, PhysicalCard self) {
|
||||
return Arrays.asList(
|
||||
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));
|
||||
}
|
||||
|
||||
@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;
|
||||
}
|
||||
}
|
||||
@@ -1,68 +0,0 @@
|
||||
package com.gempukku.lotro.cards.set40.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.AbstractAttachable;
|
||||
import com.gempukku.lotro.logic.effects.AddUntilStartOfPhaseModifierEffect;
|
||||
import com.gempukku.lotro.logic.effects.SelfDiscardEffect;
|
||||
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 com.gempukku.lotro.logic.timing.TriggerConditions;
|
||||
|
||||
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
|
||||
public Filterable getValidTargetFilter(String playerId, LotroGame game, PhysicalCard self) {
|
||||
return Filters.gandalf;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getStrength() {
|
||||
return 1;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<? extends Modifier> getInPlayModifiers(LotroGame game, PhysicalCard self) {
|
||||
KeywordModifier damage = new KeywordModifier(self, Filters.hasAttached(self), Keyword.DAMAGE, 1);
|
||||
return Arrays.asList(damage);
|
||||
}
|
||||
|
||||
@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;
|
||||
}
|
||||
}
|
||||
@@ -1,66 +0,0 @@
|
||||
package com.gempukku.lotro.cards.set40.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.AbstractAttachable;
|
||||
import com.gempukku.lotro.logic.effects.ChooseAndDiscardCardsFromHandEffect;
|
||||
import com.gempukku.lotro.logic.effects.PreventCardEffect;
|
||||
import com.gempukku.lotro.logic.effects.WoundCharactersEffect;
|
||||
import com.gempukku.lotro.logic.timing.Effect;
|
||||
import com.gempukku.lotro.logic.timing.PlayConditions;
|
||||
import com.gempukku.lotro.logic.timing.TriggerConditions;
|
||||
|
||||
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(LotroGame game, PhysicalCard self) {
|
||||
return PlayConditions.canSpot(game, Filters.gandalf);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Filterable getValidTargetFilter(String playerId, LotroGame game, PhysicalCard self) {
|
||||
return Filters.and(Filters.unboundCompanion, Filters.not(Filters.gandalf));
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getVitality() {
|
||||
return 1;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<? extends ActivateCardAction> 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;
|
||||
}
|
||||
}
|
||||
@@ -1,51 +0,0 @@
|
||||
package com.gempukku.lotro.cards.set40.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.AddUntilStartOfPhaseModifierEffect;
|
||||
import com.gempukku.lotro.logic.effects.choose.ChooseAndExertCharactersEffect;
|
||||
import com.gempukku.lotro.logic.modifiers.CantTakeMoreThanXWoundsModifier;
|
||||
import com.gempukku.lotro.logic.modifiers.StrengthModifier;
|
||||
import com.gempukku.lotro.logic.timing.PlayConditions;
|
||||
|
||||
/**
|
||||
* 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(LotroGame game, PhysicalCard self) {
|
||||
return PlayConditions.canSpot(game, 2, Race.HOBBIT, CardType.COMPANION)
|
||||
&& PlayConditions.canExert(self, game, 2, Filters.gandalf);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PlayEventAction getPlayEventCardAction(String playerId, LotroGame game, PhysicalCard self) {
|
||||
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;
|
||||
}
|
||||
}
|
||||
@@ -1,40 +0,0 @@
|
||||
package com.gempukku.lotro.cards.set40.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;
|
||||
|
||||
/**
|
||||
* Title: Mysterious Wizard
|
||||
* Set: Second Edition
|
||||
* Side: Free
|
||||
* Culture: Gandalf
|
||||
* Twilight Cost: 2
|
||||
* Type: Event - Skirmish
|
||||
* Card Number: 1C84
|
||||
* Game Text: Spell. Make Gandalf strength +2 (or +4 if you can spot 4 or fewer burdens).
|
||||
*/
|
||||
public class Card40_084 extends AbstractEvent {
|
||||
public Card40_084() {
|
||||
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,41 +0,0 @@
|
||||
package com.gempukku.lotro.cards.set40.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.ChooseAndDiscardCardsFromPlayEffect;
|
||||
|
||||
/**
|
||||
* Title: Roll of Thunder
|
||||
* Set: Second Edition
|
||||
* Side: Free
|
||||
* Culture: Gandalf
|
||||
* Twilight Cost: 3
|
||||
* Type: Event - Fellowship or Maneuver
|
||||
* Card Number: 1U87
|
||||
* Game Text: Spot Gandalf to discard a Shadow possession or Shadow artifact.
|
||||
*/
|
||||
public class Card40_087 extends AbstractEvent {
|
||||
public Card40_087() {
|
||||
super(Side.FREE_PEOPLE, 3, Culture.GANDALF, "Roll of Thunder", Phase.FELLOWSHIP, Phase.MANEUVER);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkPlayRequirements(LotroGame game, PhysicalCard self) {
|
||||
return Filters.canSpot(game, Filters.gandalf);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PlayEventAction getPlayEventCardAction(String playerId, LotroGame game, PhysicalCard self) {
|
||||
PlayEventAction action = new PlayEventAction(self);
|
||||
action.appendEffect(
|
||||
new ChooseAndDiscardCardsFromPlayEffect(action, playerId, 1, 1, Side.SHADOW, Filters.or(CardType.POSSESSION, CardType.ARTIFACT)));
|
||||
return action;
|
||||
}
|
||||
}
|
||||
@@ -1,50 +0,0 @@
|
||||
package com.gempukku.lotro.cards.set40.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.DrawCardsEffect;
|
||||
import com.gempukku.lotro.logic.effects.PlaySiteEffect;
|
||||
|
||||
/**
|
||||
* Title: Speak "Friend" and Enter
|
||||
* Set: Second Edition
|
||||
* Side: Free
|
||||
* Culture: Gandalf
|
||||
* Twilight Cost: 1
|
||||
* Type: Event - Fellowship or Regroup
|
||||
* Card Number: 1C88
|
||||
* Game Text: Spot Gandalf to play the fellowship's next site (replacing opponent's site if necessary).
|
||||
* Draw a card if you play an underground site.
|
||||
*/
|
||||
public class Card40_088 extends AbstractEvent {
|
||||
public Card40_088() {
|
||||
super(Side.FREE_PEOPLE, 1, Culture.GANDALF, "Speak \"Friend\" and Enter", Phase.FELLOWSHIP, Phase.REGROUP);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkPlayRequirements(LotroGame game, PhysicalCard self) {
|
||||
return Filters.canSpot(game, Filters.gandalf);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PlayEventAction getPlayEventCardAction(final String playerId, final LotroGame game, PhysicalCard self) {
|
||||
final PlayEventAction action = new PlayEventAction(self);
|
||||
action.appendEffect(
|
||||
new PlaySiteEffect(action, playerId, null, game.getGameState().getCurrentSiteNumber() + 1) {
|
||||
@Override
|
||||
protected void sitePlayedCallback(PhysicalCard site) {
|
||||
if (game.getModifiersQuerying().hasKeyword(game, site, Keyword.UNDERGROUND))
|
||||
action.appendEffect(
|
||||
new DrawCardsEffect(action, playerId, 1));
|
||||
}
|
||||
});
|
||||
return action;
|
||||
}
|
||||
}
|
||||
@@ -1,54 +0,0 @@
|
||||
package com.gempukku.lotro.cards.set40.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.ShuffleDeckEffect;
|
||||
import com.gempukku.lotro.logic.effects.choose.ChooseAndExertCharactersEffect;
|
||||
import com.gempukku.lotro.logic.effects.choose.ChooseAndPutCardFromDeckIntoHandEffect;
|
||||
import com.gempukku.lotro.logic.timing.PlayConditions;
|
||||
|
||||
/**
|
||||
* Title: Trusted Advisor
|
||||
* Set: Second Edition
|
||||
* Side: Free
|
||||
* Culture: Gandalf
|
||||
* Twilight Cost: 1
|
||||
* Type: Event - Fellowship
|
||||
* Card Number: 1R89
|
||||
* Game Text: Spot Gandalf and exert a companion of another culture to take a card from that companion's culture into hand from your draw deck.
|
||||
*/
|
||||
public class Card40_089 extends AbstractEvent {
|
||||
public Card40_089() {
|
||||
super(Side.FREE_PEOPLE, 1, Culture.GANDALF, "Trusted Advisor", Phase.FELLOWSHIP);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkPlayRequirements(LotroGame game, PhysicalCard self) {
|
||||
return PlayConditions.canSpot(game, Filters.gandalf)
|
||||
&& PlayConditions.canExert(self, game, CardType.COMPANION, Filters.not(Culture.GANDALF));
|
||||
}
|
||||
|
||||
@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, CardType.COMPANION,
|
||||
Filters.not(Culture.GANDALF)) {
|
||||
@Override
|
||||
protected void forEachCardExertedCallback(PhysicalCard character) {
|
||||
action.appendEffect(
|
||||
new ChooseAndPutCardFromDeckIntoHandEffect(action, playerId, 1, 1, character.getBlueprint().getCulture()));
|
||||
action.appendEffect(
|
||||
new ShuffleDeckEffect(playerId));
|
||||
}
|
||||
});
|
||||
return action;
|
||||
}
|
||||
}
|
||||
@@ -1,36 +0,0 @@
|
||||
package com.gempukku.lotro.cards.set40.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;
|
||||
|
||||
/**
|
||||
* Title: A Wizard is Never Late
|
||||
* Set: Second Edition
|
||||
* Side: Free
|
||||
* Culture: Gandalf
|
||||
* Twilight Cost: 1
|
||||
* Type: Event - Fellowship
|
||||
* Card Number: 1R90
|
||||
* Game Text: Play a [GANDALF] character from your draw deck.
|
||||
*/
|
||||
public class Card40_090 extends AbstractEvent {
|
||||
public Card40_090() {
|
||||
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,50 +0,0 @@
|
||||
package com.gempukku.lotro.cards.set40.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.AbstractAttachableFPPossession;
|
||||
import com.gempukku.lotro.logic.effects.choose.ChooseAndAddUntilEOPStrengthBonusEffect;
|
||||
import com.gempukku.lotro.logic.effects.choose.ChooseAndExertCharactersEffect;
|
||||
import com.gempukku.lotro.logic.timing.PlayConditions;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Title: Wizard Staff
|
||||
* Set: Second Edition
|
||||
* Side: Free
|
||||
* Culture: Gandalf
|
||||
* Twilight Cost: 2
|
||||
* Type: Possession - Hand Weapon
|
||||
* Strength: +1
|
||||
* Card Number: 1C91
|
||||
* Game Text: Bearer must be a Wizard. Skirmish: Exert bearer twice to make a minion strength -3.
|
||||
*/
|
||||
public class Card40_091 extends AbstractAttachableFPPossession {
|
||||
public Card40_091() {
|
||||
super(2, 1, 0, Culture.GANDALF, PossessionClass.HAND_WEAPON, "Wizard Staff");
|
||||
}
|
||||
|
||||
@Override
|
||||
public Filterable getValidTargetFilter(String playerId, LotroGame game, PhysicalCard self) {
|
||||
return Race.WIZARD;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<? extends ActivateCardAction> getPhaseActionsInPlay(String playerId, LotroGame game, PhysicalCard self) {
|
||||
if (PlayConditions.canUseFPCardDuringPhase(game, Phase.SKIRMISH, self)
|
||||
&& PlayConditions.canExert(self, game, 2, Filters.hasAttached(self))) {
|
||||
ActivateCardAction action = new ActivateCardAction(self);
|
||||
action.appendCost(
|
||||
new ChooseAndExertCharactersEffect(action, playerId, 1, 1, 2, Filters.hasAttached(self)));
|
||||
action.appendEffect(
|
||||
new ChooseAndAddUntilEOPStrengthBonusEffect(action, self, playerId, -3, CardType.MINION));
|
||||
return Collections.singletonList(action);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -1,46 +0,0 @@
|
||||
package com.gempukku.lotro.cards.set40.gandalf;
|
||||
|
||||
import com.gempukku.lotro.logic.cardtype.AbstractCompanion;
|
||||
import com.gempukku.lotro.logic.timing.TriggerConditions;
|
||||
import com.gempukku.lotro.common.Culture;
|
||||
import com.gempukku.lotro.common.Keyword;
|
||||
import com.gempukku.lotro.common.Race;
|
||||
import com.gempukku.lotro.game.PhysicalCard;
|
||||
import com.gempukku.lotro.game.state.LotroGame;
|
||||
import com.gempukku.lotro.logic.actions.OptionalTriggerAction;
|
||||
import com.gempukku.lotro.logic.effects.DrawCardsEffect;
|
||||
import com.gempukku.lotro.logic.timing.EffectResult;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Title: *Gandalf, Wisest of the Istari
|
||||
* Set: Second Edition
|
||||
* Side: Free
|
||||
* Culture: Gandalf
|
||||
* Twilight Cost: 4
|
||||
* Type: Companion - Wizard
|
||||
* Strength: 7
|
||||
* Vitality: 4
|
||||
* Resistance: 8
|
||||
* Card Number: 1P311
|
||||
* Game Text: Each time you play a [GANDALF] spell, you may draw a card.
|
||||
*/
|
||||
public class Card40_311 extends AbstractCompanion {
|
||||
public Card40_311() {
|
||||
super(4, 7, 4, 8, Culture.GANDALF, Race.WIZARD, null, "Gandalf",
|
||||
"Wisest of the Istari", true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<OptionalTriggerAction> getOptionalAfterTriggers(String playerId, LotroGame game, EffectResult effectResult, PhysicalCard self) {
|
||||
if (TriggerConditions.played(game, effectResult, Culture.GANDALF, Keyword.SPELL)) {
|
||||
OptionalTriggerAction action = new OptionalTriggerAction(self);
|
||||
action.appendEffect(
|
||||
new DrawCardsEffect(action, playerId, 1));
|
||||
return Collections.singletonList(action);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -2,11 +2,13 @@ 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.FilterableSource;
|
||||
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.common.Filterable;
|
||||
import com.gempukku.lotro.filters.Filters;
|
||||
import com.gempukku.lotro.game.PhysicalCard;
|
||||
import com.gempukku.lotro.game.state.LotroGame;
|
||||
@@ -15,6 +17,7 @@ import com.gempukku.lotro.logic.actions.CostToEffectAction;
|
||||
import com.gempukku.lotro.logic.effects.StackActionEffect;
|
||||
import com.gempukku.lotro.logic.modifiers.evaluator.ConstantEvaluator;
|
||||
import com.gempukku.lotro.logic.timing.Effect;
|
||||
import com.gempukku.lotro.logic.timing.ExtraFilters;
|
||||
import com.gempukku.lotro.logic.timing.UnrespondableEffect;
|
||||
import org.json.simple.JSONObject;
|
||||
|
||||
@@ -23,16 +26,25 @@ import java.util.Collection;
|
||||
public class PlayCardFromHand implements EffectAppenderProducer {
|
||||
@Override
|
||||
public EffectAppender createEffectAppender(JSONObject effectObject, CardGenerationEnvironment environment) throws InvalidCardDefinitionException {
|
||||
FieldUtils.validateAllowedFields(effectObject, "filter");
|
||||
FieldUtils.validateAllowedFields(effectObject, "filter", "on");
|
||||
|
||||
final String filter = FieldUtils.getString(effectObject.get("filter"), "filter");
|
||||
final String onFilter = FieldUtils.getString(effectObject.get("on"), "on");
|
||||
|
||||
final FilterableSource onFilterableSource = (onFilter != null) ? environment.getFilterFactory().generateFilter(onFilter, environment) : null;
|
||||
|
||||
MultiEffectAppender result = new MultiEffectAppender();
|
||||
result.setPlayabilityCheckedForEffect(true);
|
||||
|
||||
result.addEffectAppender(
|
||||
CardResolver.resolveCardsInHand(filter,
|
||||
(actionContext) -> Filters.playable(actionContext.getGame()),
|
||||
(actionContext) -> {
|
||||
if (onFilterableSource != null) {
|
||||
final Filterable onFilterable = onFilterableSource.getFilterable(actionContext);
|
||||
return Filters.and(Filters.playable(actionContext.getGame()), ExtraFilters.attachableTo(actionContext.getGame(), onFilterable));
|
||||
}
|
||||
return Filters.playable(actionContext.getGame());
|
||||
},
|
||||
new ConstantEvaluator(1), "_temp", "you", "Choose card to play", environment));
|
||||
result.addEffectAppender(
|
||||
new DelayedAppender() {
|
||||
@@ -40,7 +52,9 @@ public class PlayCardFromHand implements EffectAppenderProducer {
|
||||
protected Effect createEffect(boolean cost, CostToEffectAction action, ActionContext actionContext) {
|
||||
final Collection<? extends PhysicalCard> cardsToPlay = actionContext.getCardsFromMemory("_temp");
|
||||
if (cardsToPlay.size() == 1) {
|
||||
final CostToEffectAction playCardAction = PlayUtils.getPlayCardAction(actionContext.getGame(), cardsToPlay.iterator().next(), 0, Filters.any, false);
|
||||
Filterable onFilterable = (onFilterableSource != null) ? onFilterableSource.getFilterable(actionContext) : Filters.any;
|
||||
|
||||
final CostToEffectAction playCardAction = PlayUtils.getPlayCardAction(actionContext.getGame(), cardsToPlay.iterator().next(), 0, onFilterable, false);
|
||||
return new StackActionEffect(playCardAction);
|
||||
} else {
|
||||
return new UnrespondableEffect() {
|
||||
|
||||
Reference in New Issue
Block a user