Migrated Gandalf cards in set 8 to hjson
This commit is contained in:
@@ -1,49 +0,0 @@
|
|||||||
package com.gempukku.lotro.cards.set8.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.AddUntilEndOfPhaseModifierEffect;
|
|
||||||
import com.gempukku.lotro.logic.effects.ChooseActiveCardEffect;
|
|
||||||
import com.gempukku.lotro.logic.effects.HealCharactersEffect;
|
|
||||||
import com.gempukku.lotro.logic.modifiers.OverwhelmedByMultiplierModifier;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Set: Siege of Gondor
|
|
||||||
* Side: Free
|
|
||||||
* Culture: Gandalf
|
|
||||||
* Twilight Cost: 3
|
|
||||||
* Type: Event • Skirmish
|
|
||||||
* Game Text: At sites 1K to 5K, heal Gandalf. At any other site, prevent a Hobbit from being overwhelmed unless his or
|
|
||||||
* her strength is tripled.
|
|
||||||
*/
|
|
||||||
public class Card8_014 extends AbstractEvent {
|
|
||||||
public Card8_014() {
|
|
||||||
super(Side.FREE_PEOPLE, 3, Culture.GANDALF, "A Fool", Phase.SKIRMISH);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public PlayEventAction getPlayEventCardAction(String playerId, LotroGame game, final PhysicalCard self) {
|
|
||||||
final PlayEventAction action = new PlayEventAction(self);
|
|
||||||
final PhysicalCard currentSite = game.getGameState().getCurrentSite();
|
|
||||||
if (currentSite.getBlueprint().getSiteBlock() == SitesBlock.KING
|
|
||||||
&& currentSite.getSiteNumber() >= 1 && currentSite.getSiteNumber() <= 5) {
|
|
||||||
action.appendEffect(
|
|
||||||
new HealCharactersEffect(self, self.getOwner(), Filters.gandalf));
|
|
||||||
} else {
|
|
||||||
action.appendEffect(
|
|
||||||
new ChooseActiveCardEffect(self, playerId, "Choose a Hobbit", Race.HOBBIT) {
|
|
||||||
@Override
|
|
||||||
protected void cardSelected(LotroGame game, PhysicalCard card) {
|
|
||||||
action.insertEffect(
|
|
||||||
new AddUntilEndOfPhaseModifierEffect(
|
|
||||||
new OverwhelmedByMultiplierModifier(self, card, 3)));
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
return action;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,34 +0,0 @@
|
|||||||
package com.gempukku.lotro.cards.set8.gandalf;
|
|
||||||
|
|
||||||
import com.gempukku.lotro.common.Culture;
|
|
||||||
import com.gempukku.lotro.common.Phase;
|
|
||||||
import com.gempukku.lotro.common.Race;
|
|
||||||
import com.gempukku.lotro.common.Signet;
|
|
||||||
import com.gempukku.lotro.game.PhysicalCard;
|
|
||||||
import com.gempukku.lotro.game.state.LotroGame;
|
|
||||||
import com.gempukku.lotro.logic.cardtype.AbstractCompanion;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Set: Siege of Gondor
|
|
||||||
* Side: Free
|
|
||||||
* Culture: Gandalf
|
|
||||||
* Twilight Cost: 4
|
|
||||||
* Type: Companion • Wizard
|
|
||||||
* Strength: 7
|
|
||||||
* Vitality: 4
|
|
||||||
* Resistance: 6
|
|
||||||
* Signet: Aragorn
|
|
||||||
* Game Text: When Gandalf is in your starting fellowship, his twilight cost is -2.
|
|
||||||
*/
|
|
||||||
public class Card8_015 extends AbstractCompanion {
|
|
||||||
public Card8_015() {
|
|
||||||
super(4, 7, 4, 6, Culture.GANDALF, Race.WIZARD, Signet.ARAGORN, "Gandalf", "Leader of Men", true);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public int getTwilightCostModifier(LotroGame game, PhysicalCard self, PhysicalCard target) {
|
|
||||||
if (game.getGameState().getCurrentPhase() == Phase.PLAY_STARTING_FELLOWSHIP)
|
|
||||||
return -2;
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,44 +0,0 @@
|
|||||||
package com.gempukku.lotro.cards.set8.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;
|
|
||||||
import com.gempukku.lotro.logic.effects.choose.ChooseAndExertCharactersEffect;
|
|
||||||
import com.gempukku.lotro.logic.modifiers.evaluator.CountActiveEvaluator;
|
|
||||||
import com.gempukku.lotro.logic.modifiers.evaluator.NegativeEvaluator;
|
|
||||||
import com.gempukku.lotro.logic.timing.PlayConditions;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Set: Siege of Gondor
|
|
||||||
* Side: Free
|
|
||||||
* Culture: Gandalf
|
|
||||||
* Twilight Cost: 2
|
|
||||||
* Type: Event • Skirmish
|
|
||||||
* Game Text: Exert Gandalf to make a minion skirmishing an unbound companion strength -1 for each Gandalf signet
|
|
||||||
* you spot.
|
|
||||||
*/
|
|
||||||
public class Card8_016 extends AbstractEvent {
|
|
||||||
public Card8_016() {
|
|
||||||
super(Side.FREE_PEOPLE, 2, Culture.GANDALF, "Let Us Not Tarry", Phase.SKIRMISH);
|
|
||||||
}
|
|
||||||
|
|
||||||
@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 ChooseAndAddUntilEOPStrengthBonusEffect(action, self, playerId,
|
|
||||||
new NegativeEvaluator(new CountActiveEvaluator(Signet.GANDALF)), CardType.MINION, Filters.inSkirmishAgainst(Filters.unboundCompanion)));
|
|
||||||
return action;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,73 +0,0 @@
|
|||||||
package com.gempukku.lotro.cards.set8.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.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.ChoiceEffect;
|
|
||||||
import com.gempukku.lotro.logic.effects.ChooseActiveCardEffect;
|
|
||||||
import com.gempukku.lotro.logic.effects.ReplaceInSkirmishEffect;
|
|
||||||
import com.gempukku.lotro.logic.effects.SpotEffect;
|
|
||||||
import com.gempukku.lotro.logic.effects.choose.ChooseAndExertCharactersEffect;
|
|
||||||
import com.gempukku.lotro.logic.timing.Effect;
|
|
||||||
import com.gempukku.lotro.logic.timing.PlayConditions;
|
|
||||||
|
|
||||||
import java.util.LinkedList;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Set: Siege of Gondor
|
|
||||||
* Side: Free
|
|
||||||
* Culture: Gandalf
|
|
||||||
* Twilight Cost: 3
|
|
||||||
* Type: Event • Skirmish
|
|
||||||
* Game Text: If Gandalf is not assigned to a skirmish, spot Shadowfax or exert Gandalf to have Gandalf replace
|
|
||||||
* an unbound companion in a skirmish.
|
|
||||||
*/
|
|
||||||
public class Card8_017 extends AbstractEvent {
|
|
||||||
public Card8_017() {
|
|
||||||
super(Side.FREE_PEOPLE, 3, Culture.GANDALF, "Mighty Steed", Phase.SKIRMISH);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean checkPlayRequirements(LotroGame game, PhysicalCard self) {
|
|
||||||
return PlayConditions.canSpot(game, Filters.gandalf, Filters.notAssignedToSkirmish)
|
|
||||||
&& (PlayConditions.canSpot(game, Filters.name("Shadowfax")) || PlayConditions.canExert(self, game, Filters.gandalf));
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public PlayEventAction getPlayEventCardAction(String playerId, LotroGame game, PhysicalCard self) {
|
|
||||||
final PlayEventAction action = new PlayEventAction(self);
|
|
||||||
List<Effect> possibleCosts = new LinkedList<>();
|
|
||||||
possibleCosts.add(
|
|
||||||
new SpotEffect(1, Filters.name("Shadowfax")) {
|
|
||||||
@Override
|
|
||||||
public String getText(LotroGame game) {
|
|
||||||
return "Spot Shadowfax";
|
|
||||||
}
|
|
||||||
});
|
|
||||||
possibleCosts.add(
|
|
||||||
new ChooseAndExertCharactersEffect(action, playerId, 1, 1, Filters.gandalf) {
|
|
||||||
@Override
|
|
||||||
public String getText(LotroGame game) {
|
|
||||||
return "Exert Gandalf";
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
action.appendCost(
|
|
||||||
new ChoiceEffect(action, playerId, possibleCosts));
|
|
||||||
action.appendEffect(
|
|
||||||
new ChooseActiveCardEffect(self, playerId, "Choose Gandalf", Filters.gandalf) {
|
|
||||||
@Override
|
|
||||||
protected void cardSelected(LotroGame game, PhysicalCard card) {
|
|
||||||
action.insertEffect(
|
|
||||||
new ReplaceInSkirmishEffect(card, Filters.unboundCompanion));
|
|
||||||
}
|
|
||||||
});
|
|
||||||
return action;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,59 +0,0 @@
|
|||||||
package com.gempukku.lotro.cards.set8.gandalf;
|
|
||||||
|
|
||||||
import com.gempukku.lotro.common.*;
|
|
||||||
import com.gempukku.lotro.filters.Filters;
|
|
||||||
import com.gempukku.lotro.game.PhysicalCard;
|
|
||||||
import com.gempukku.lotro.game.state.LotroGame;
|
|
||||||
import com.gempukku.lotro.logic.actions.ActivateCardAction;
|
|
||||||
import com.gempukku.lotro.logic.cardtype.AbstractPermanent;
|
|
||||||
import com.gempukku.lotro.logic.effects.AddTokenEffect;
|
|
||||||
import com.gempukku.lotro.logic.effects.RemoveTokenEffect;
|
|
||||||
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;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Set: Siege of Gondor
|
|
||||||
* Side: Free
|
|
||||||
* Culture: Gandalf
|
|
||||||
* Twilight Cost: 1
|
|
||||||
* Type: Condition • Support Area
|
|
||||||
* Game Text: Fellowship: Exert Gandalf and either an [ELVEN] companion or a [SHIRE] companion to add a [GANDALF] token
|
|
||||||
* here. Skirmish: Remove a [GANDALF] token here to make a minion skirmishing an unbound companion strength -2.
|
|
||||||
*/
|
|
||||||
public class Card8_018 extends AbstractPermanent {
|
|
||||||
public Card8_018() {
|
|
||||||
super(Side.FREE_PEOPLE, 1, CardType.CONDITION, Culture.GANDALF, "Not the First Halfling");
|
|
||||||
}
|
|
||||||
|
|
||||||
@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)
|
|
||||||
&& PlayConditions.canExert(self, game, CardType.COMPANION, Filters.or(Culture.ELVEN, Culture.SHIRE))) {
|
|
||||||
ActivateCardAction action = new ActivateCardAction(self);
|
|
||||||
action.appendCost(
|
|
||||||
new ChooseAndExertCharactersEffect(action, playerId, 1, 1, Filters.gandalf));
|
|
||||||
action.appendCost(
|
|
||||||
new ChooseAndExertCharactersEffect(action, playerId, 1, 1, CardType.COMPANION, Filters.or(Culture.ELVEN, Culture.SHIRE)));
|
|
||||||
action.appendEffect(
|
|
||||||
new AddTokenEffect(self, self, Token.GANDALF));
|
|
||||||
return Collections.singletonList(action);
|
|
||||||
}
|
|
||||||
if (PlayConditions.canUseFPCardDuringPhase(game, Phase.SKIRMISH, self)
|
|
||||||
&& PlayConditions.canRemoveTokens(game, self, Token.GANDALF, 1)) {
|
|
||||||
ActivateCardAction action = new ActivateCardAction(self);
|
|
||||||
action.appendCost(
|
|
||||||
new RemoveTokenEffect(self, self, Token.GANDALF));
|
|
||||||
action.appendEffect(
|
|
||||||
new ChooseAndAddUntilEOPStrengthBonusEffect(action, self, playerId, -2, CardType.MINION, Filters.inSkirmishAgainst(Filters.unboundCompanion)));
|
|
||||||
return Collections.singletonList(action);
|
|
||||||
}
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,50 +0,0 @@
|
|||||||
package com.gempukku.lotro.cards.set8.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.ChooseAndExertCharactersEffect;
|
|
||||||
import com.gempukku.lotro.logic.effects.choose.ChooseAndPutCardFromDiscardOnTopOfDeckEffect;
|
|
||||||
import com.gempukku.lotro.logic.timing.PlayConditions;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Set: Siege of Gondor
|
|
||||||
* Side: Free
|
|
||||||
* Culture: Gandalf
|
|
||||||
* Twilight Cost: 1
|
|
||||||
* Type: Event • Fellowship
|
|
||||||
* Game Text: Spot Gandalf and exert a companion to place a card of that companion’s culture from your discard pile on
|
|
||||||
* top of your draw deck.
|
|
||||||
*/
|
|
||||||
public class Card8_019 extends AbstractEvent {
|
|
||||||
public Card8_019() {
|
|
||||||
super(Side.FREE_PEOPLE, 1, Culture.GANDALF, "On Your Doorstep", Phase.FELLOWSHIP);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean checkPlayRequirements(LotroGame game, PhysicalCard self) {
|
|
||||||
return PlayConditions.canSpot(game, Filters.gandalf)
|
|
||||||
&& PlayConditions.canExert(self, game, CardType.COMPANION);
|
|
||||||
}
|
|
||||||
|
|
||||||
@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) {
|
|
||||||
@Override
|
|
||||||
protected void forEachCardExertedCallback(PhysicalCard character) {
|
|
||||||
Culture culture = character.getBlueprint().getCulture();
|
|
||||||
action.appendEffect(
|
|
||||||
new ChooseAndPutCardFromDiscardOnTopOfDeckEffect(action, playerId, 1, 1, culture));
|
|
||||||
}
|
|
||||||
});
|
|
||||||
return action;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,55 +0,0 @@
|
|||||||
package com.gempukku.lotro.cards.set8.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.ChooseActiveCardEffect;
|
|
||||||
import com.gempukku.lotro.logic.effects.KillEffect;
|
|
||||||
import com.gempukku.lotro.logic.effects.ShuffleDeckEffect;
|
|
||||||
import com.gempukku.lotro.logic.effects.choose.ChooseAndPutCardFromDeckIntoHandEffect;
|
|
||||||
import com.gempukku.lotro.logic.timing.PlayConditions;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Set: Siege of Gondor
|
|
||||||
* Side: Free
|
|
||||||
* Culture: Gandalf
|
|
||||||
* Twilight Cost: 3
|
|
||||||
* Type: Event • Fellowship
|
|
||||||
* Game Text: Spot Gandalf and place a companion (except the Ring-bearer) in the dead pile to take 3 cards from that
|
|
||||||
* companion’s culture into hand from your draw deck. Shuffle your draw deck.
|
|
||||||
*/
|
|
||||||
public class Card8_020 extends AbstractEvent {
|
|
||||||
public Card8_020() {
|
|
||||||
super(Side.FREE_PEOPLE, 3, Culture.GANDALF, "Saved From the Fire", Phase.FELLOWSHIP);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean checkPlayRequirements(LotroGame game, PhysicalCard self) {
|
|
||||||
return PlayConditions.canSpot(game, Filters.gandalf);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public PlayEventAction getPlayEventCardAction(final String playerId, LotroGame game, PhysicalCard self) {
|
|
||||||
final PlayEventAction action = new PlayEventAction(self);
|
|
||||||
action.appendCost(
|
|
||||||
new ChooseActiveCardEffect(self, playerId, "Choose a companion", CardType.COMPANION, Filters.not(Filters.ringBearer)) {
|
|
||||||
@Override
|
|
||||||
protected void cardSelected(LotroGame game, final PhysicalCard card) {
|
|
||||||
action.insertCost(
|
|
||||||
new KillEffect(card, self, KillEffect.Cause.CARD_EFFECT));
|
|
||||||
for (int i = 0; i < 3; i++)
|
|
||||||
action.appendEffect(
|
|
||||||
new ChooseAndPutCardFromDeckIntoHandEffect(action, playerId, 0, 1, card.getBlueprint().getCulture()));
|
|
||||||
action.appendEffect(
|
|
||||||
new ShuffleDeckEffect(playerId));
|
|
||||||
}
|
|
||||||
});
|
|
||||||
return action;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,73 +0,0 @@
|
|||||||
package com.gempukku.lotro.cards.set8.gandalf;
|
|
||||||
|
|
||||||
import com.gempukku.lotro.common.Culture;
|
|
||||||
import com.gempukku.lotro.common.Filterable;
|
|
||||||
import com.gempukku.lotro.common.Phase;
|
|
||||||
import com.gempukku.lotro.common.PossessionClass;
|
|
||||||
import com.gempukku.lotro.filters.Filters;
|
|
||||||
import com.gempukku.lotro.game.PhysicalCard;
|
|
||||||
import com.gempukku.lotro.game.state.LotroGame;
|
|
||||||
import com.gempukku.lotro.game.state.Skirmish;
|
|
||||||
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.AddThreatsEffect;
|
|
||||||
import com.gempukku.lotro.logic.effects.AddUntilEndOfPhaseModifierEffect;
|
|
||||||
import com.gempukku.lotro.logic.effects.ExertCharactersEffect;
|
|
||||||
import com.gempukku.lotro.logic.modifiers.StrengthModifier;
|
|
||||||
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;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Set: Siege of Gondor
|
|
||||||
* Side: Free
|
|
||||||
* Culture: Gandalf
|
|
||||||
* Twilight Cost: 2
|
|
||||||
* Type: Possession • Mount
|
|
||||||
* Game Text: Bearer must be Gandalf. At the start of each skirmish involving Gandalf, each minion skirmishing Gandalf
|
|
||||||
* must exert. Skirmish: Add a threat to make Gandalf strength +1.
|
|
||||||
*/
|
|
||||||
public class Card8_021 extends AbstractAttachableFPPossession {
|
|
||||||
public Card8_021() {
|
|
||||||
super(2, 0, 0, Culture.GANDALF, PossessionClass.MOUNT, "Shadowfax", "Greatheart", true);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public Filterable getValidTargetFilter(String playerId, LotroGame game, PhysicalCard self) {
|
|
||||||
return Filters.gandalf;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public List<RequiredTriggerAction> getRequiredAfterTriggers(LotroGame game, EffectResult effectResult, PhysicalCard self) {
|
|
||||||
if (TriggerConditions.startOfPhase(game, effectResult, Phase.SKIRMISH)) {
|
|
||||||
final Skirmish skirmish = game.getGameState().getSkirmish();
|
|
||||||
if (skirmish != null && skirmish.getFellowshipCharacter() != null && skirmish.getFellowshipCharacter().getBlueprint().getTitle().equals("Gandalf")) {
|
|
||||||
RequiredTriggerAction action = new RequiredTriggerAction(self);
|
|
||||||
action.appendEffect(
|
|
||||||
new ExertCharactersEffect(action, self, Filters.inSkirmishAgainst(Filters.gandalf)));
|
|
||||||
return Collections.singletonList(action);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public List<? extends ActivateCardAction> getPhaseActionsInPlay(String playerId, LotroGame game, PhysicalCard self) {
|
|
||||||
if (PlayConditions.canUseFPCardDuringPhase(game, Phase.SKIRMISH, self)
|
|
||||||
&& PlayConditions.canAddThreat(game, self, 1)) {
|
|
||||||
ActivateCardAction action = new ActivateCardAction(self);
|
|
||||||
action.appendCost(
|
|
||||||
new AddThreatsEffect(playerId, self, 1));
|
|
||||||
action.appendEffect(
|
|
||||||
new AddUntilEndOfPhaseModifierEffect(
|
|
||||||
new StrengthModifier(self, Filters.gandalf, 1)));
|
|
||||||
return Collections.singletonList(action);
|
|
||||||
}
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -235,8 +235,8 @@
|
|||||||
type: activated
|
type: activated
|
||||||
phase: skirmish
|
phase: skirmish
|
||||||
requires: {
|
requires: {
|
||||||
type: cantSpot
|
type: canSpot
|
||||||
filter: self,assignedToSkirmish(any)
|
filter: self,notAssignedToSkirmish
|
||||||
}
|
}
|
||||||
cost: {
|
cost: {
|
||||||
type: returnToHand
|
type: returnToHand
|
||||||
@@ -400,8 +400,8 @@
|
|||||||
type: activated
|
type: activated
|
||||||
phase: skirmish
|
phase: skirmish
|
||||||
requires: {
|
requires: {
|
||||||
type: cantSpot
|
type: canSpot
|
||||||
filter: self,assignedToSkirmish(any)
|
filter: self,notAssignedToSkirmish
|
||||||
}
|
}
|
||||||
cost: {
|
cost: {
|
||||||
type: returnToHand
|
type: returnToHand
|
||||||
|
|||||||
@@ -22,20 +22,24 @@
|
|||||||
twilight: 3
|
twilight: 3
|
||||||
type: Event
|
type: Event
|
||||||
keywords: Skirmish
|
keywords: Skirmish
|
||||||
/*requires: {
|
|
||||||
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
effects: {
|
effects: {
|
||||||
type: event
|
type: event
|
||||||
cost: {
|
|
||||||
type: SendMessage
|
|
||||||
text: Placeholder effect for development.
|
|
||||||
},
|
|
||||||
effect: [
|
effect: [
|
||||||
{
|
{
|
||||||
type: SendMessage
|
type: if
|
||||||
text: Placeholder effect for development.
|
condition: {
|
||||||
|
type: location
|
||||||
|
filter: siteBlock(king),siteNumber(1-5)
|
||||||
|
}
|
||||||
|
true: {
|
||||||
|
type: heal
|
||||||
|
filter: choose(name(Gandalf))
|
||||||
|
}
|
||||||
|
false: {
|
||||||
|
type: alterOverwhelmMultiplier
|
||||||
|
filter: choose(hobbit)
|
||||||
|
multiplier: 3
|
||||||
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@@ -77,17 +81,16 @@
|
|||||||
vitality: 4
|
vitality: 4
|
||||||
signet: Aragorn
|
signet: Aragorn
|
||||||
resistance: 6
|
resistance: 6
|
||||||
/*requires: {
|
|
||||||
|
|
||||||
}
|
|
||||||
effects: [
|
effects: [
|
||||||
{
|
{
|
||||||
|
type: modifyOwnCost
|
||||||
}
|
requires: {
|
||||||
{
|
type: phase
|
||||||
|
phase: play starting fellowship
|
||||||
}
|
}
|
||||||
]*/
|
amount: -2
|
||||||
|
}
|
||||||
|
]
|
||||||
gametext: When Gandalf is in your starting fellowship, his twilight cost is -2.
|
gametext: When Gandalf is in your starting fellowship, his twilight cost is -2.
|
||||||
lore: ...the rule of no realm is mine, neither of Gondor nor any other, great or small.'
|
lore: ...the rule of no realm is mine, neither of Gondor nor any other, great or small.'
|
||||||
promotext: ""
|
promotext: ""
|
||||||
@@ -121,20 +124,26 @@
|
|||||||
twilight: 2
|
twilight: 2
|
||||||
type: Event
|
type: Event
|
||||||
keywords: Skirmish
|
keywords: Skirmish
|
||||||
/*requires: {
|
|
||||||
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
effects: {
|
effects: {
|
||||||
type: event
|
type: event
|
||||||
cost: {
|
cost: {
|
||||||
type: SendMessage
|
type: exert
|
||||||
text: Placeholder effect for development.
|
filter: choose(name(Gandalf))
|
||||||
},
|
},
|
||||||
effect: [
|
effect: [
|
||||||
|
{
|
||||||
|
type: chooseHowManyToSpot
|
||||||
|
filter: signet(gandalf)
|
||||||
|
memorize: spotCount
|
||||||
|
}
|
||||||
{
|
{
|
||||||
type: SendMessage
|
type: modifyStrength
|
||||||
text: Placeholder effect for development.
|
filter: choose(minion,inSkirmishAgainst(unbound,companion))
|
||||||
|
amount: {
|
||||||
|
type: fromMemory
|
||||||
|
memory: spotCount
|
||||||
|
multiplier: -1
|
||||||
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@@ -171,20 +180,34 @@
|
|||||||
twilight: 3
|
twilight: 3
|
||||||
type: Event
|
type: Event
|
||||||
keywords: Skirmish
|
keywords: Skirmish
|
||||||
/*requires: {
|
|
||||||
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
effects: {
|
effects: {
|
||||||
type: event
|
type: event
|
||||||
|
requires: {
|
||||||
|
type: canSpot
|
||||||
|
filter: name(Gandalf),notAssignedToSkirmish
|
||||||
|
}
|
||||||
cost: {
|
cost: {
|
||||||
type: SendMessage
|
type: choice
|
||||||
text: Placeholder effect for development.
|
texts: [
|
||||||
|
Spot Shadowfax
|
||||||
|
Exert Gandalf
|
||||||
|
]
|
||||||
|
effects: [
|
||||||
|
{
|
||||||
|
type: spot
|
||||||
|
filter: name(Shadowfax)
|
||||||
|
}
|
||||||
|
{
|
||||||
|
type: exert
|
||||||
|
filter: choose(name(Gandalf))
|
||||||
|
}
|
||||||
|
]
|
||||||
},
|
},
|
||||||
effect: [
|
effect: [
|
||||||
{
|
{
|
||||||
type: SendMessage
|
type: replaceInSkirmish
|
||||||
text: Placeholder effect for development.
|
filter: unbound,companion,not(name(Gandalf))
|
||||||
|
with: choose(name(Gandalf))
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@@ -221,17 +244,41 @@
|
|||||||
twilight: 1
|
twilight: 1
|
||||||
type: Condition
|
type: Condition
|
||||||
keywords: Support Area
|
keywords: Support Area
|
||||||
/*requires: {
|
|
||||||
|
|
||||||
}
|
|
||||||
effects: [
|
effects: [
|
||||||
{
|
{
|
||||||
|
type: activated
|
||||||
}
|
phase: fellowship
|
||||||
{
|
cost: [
|
||||||
|
{
|
||||||
}
|
type: exert
|
||||||
]*/
|
filter: choose(name(Gandalf))
|
||||||
|
}
|
||||||
|
{
|
||||||
|
type: exert
|
||||||
|
filter: choose(or(culture(elven),culture(shire)),companion)
|
||||||
|
}
|
||||||
|
]
|
||||||
|
effect: {
|
||||||
|
type: addTokens
|
||||||
|
culture: gandalf
|
||||||
|
filter: self
|
||||||
|
}
|
||||||
|
}
|
||||||
|
{
|
||||||
|
type: activated
|
||||||
|
phase: skirmish
|
||||||
|
cost: {
|
||||||
|
type: removeTokens
|
||||||
|
culture: gandalf
|
||||||
|
filter: self
|
||||||
|
}
|
||||||
|
effect: {
|
||||||
|
type: modifyStrength
|
||||||
|
filter: choose(minion,inSkirmishAgainst(unbound,companion))
|
||||||
|
amount: -2
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
gametext: <b>Fellowship:</b> Exert Gandalf and either an [elven] companion or a [shire] companion to add a [gandalf] token here.<br><b>Skirmish:</b> Remove a [gandalf] token here to make a minion skirmishing an unbound companion strength -2.
|
gametext: <b>Fellowship:</b> Exert Gandalf and either an [elven] companion or a [shire] companion to add a [gandalf] token here.<br><b>Skirmish:</b> Remove a [gandalf] token here to make a minion skirmishing an unbound companion strength -2.
|
||||||
lore: ""
|
lore: ""
|
||||||
promotext: ""
|
promotext: ""
|
||||||
@@ -265,20 +312,21 @@
|
|||||||
twilight: 1
|
twilight: 1
|
||||||
type: Event
|
type: Event
|
||||||
keywords: Fellowship
|
keywords: Fellowship
|
||||||
/*requires: {
|
|
||||||
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
effects: {
|
effects: {
|
||||||
type: event
|
type: event
|
||||||
|
requires: {
|
||||||
|
type: canSpot
|
||||||
|
filter: name(Gandalf)
|
||||||
|
}
|
||||||
cost: {
|
cost: {
|
||||||
type: SendMessage
|
type: exert
|
||||||
text: Placeholder effect for development.
|
filter: choose(companion)
|
||||||
},
|
memorize: exertedCompanion
|
||||||
|
}
|
||||||
effect: [
|
effect: [
|
||||||
{
|
{
|
||||||
type: SendMessage
|
type: putCardsFromDiscardOnTopOfDeck
|
||||||
text: Placeholder effect for development.
|
filter: choose(cultureFromMemory(exertedCompanion))
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@@ -315,20 +363,25 @@
|
|||||||
twilight: 3
|
twilight: 3
|
||||||
type: Event
|
type: Event
|
||||||
keywords: Fellowship
|
keywords: Fellowship
|
||||||
/*requires: {
|
|
||||||
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
effects: {
|
effects: {
|
||||||
type: event
|
type: event
|
||||||
|
requires: {
|
||||||
|
type: canSpot
|
||||||
|
filter: name(Gandalf)
|
||||||
|
}
|
||||||
cost: {
|
cost: {
|
||||||
type: SendMessage
|
type: kill
|
||||||
text: Placeholder effect for development.
|
filter: choose(companion,not(ringBearer))
|
||||||
|
memorize: killedCompanion
|
||||||
},
|
},
|
||||||
effect: [
|
effect: [
|
||||||
{
|
{
|
||||||
type: SendMessage
|
type: putCardsFromDeckIntoHand
|
||||||
text: Placeholder effect for development.
|
filter: choose(cultureFromMemory(killedCompanion))
|
||||||
|
count: 0-3
|
||||||
|
}
|
||||||
|
{
|
||||||
|
type: shuffleDeck
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@@ -366,18 +419,36 @@
|
|||||||
twilight: 2
|
twilight: 2
|
||||||
type: Possession
|
type: Possession
|
||||||
itemclass: Mount
|
itemclass: Mount
|
||||||
#target: title(Gandalf)
|
target: title(Gandalf)
|
||||||
/*requires: {
|
|
||||||
|
|
||||||
}
|
|
||||||
effects: [
|
effects: [
|
||||||
{
|
{
|
||||||
|
type: trigger
|
||||||
}
|
trigger: {
|
||||||
{
|
type: startOfPhase
|
||||||
|
phase: skirmish
|
||||||
}
|
}
|
||||||
]*/
|
requires: {
|
||||||
|
type: canSpot
|
||||||
|
filter: bearer,inSkirmish
|
||||||
|
}
|
||||||
|
effect: {
|
||||||
|
type: exert
|
||||||
|
filter: all(minion,inSkirmishAgainst(bearer))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
{
|
||||||
|
type: activated
|
||||||
|
phase: skirmish
|
||||||
|
cost: {
|
||||||
|
type: addThreats
|
||||||
|
}
|
||||||
|
effect: {
|
||||||
|
type: modifyStrength
|
||||||
|
filter: bearer
|
||||||
|
amount: 1
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
gametext: Bearer must be Gandalf.<br>At the start of each skirmish involving Gandalf, each minion skirmishing Gandalf must exert.<br><b>Skirmish:</b> Add a threat to make Gandalf strength +1.
|
gametext: Bearer must be Gandalf.<br>At the start of each skirmish involving Gandalf, each minion skirmishing Gandalf must exert.<br><b>Skirmish:</b> Add a threat to make Gandalf strength +1.
|
||||||
lore: ""
|
lore: ""
|
||||||
promotext: ""
|
promotext: ""
|
||||||
@@ -15,6 +15,7 @@ import com.gempukku.lotro.logic.modifiers.Modifier;
|
|||||||
import com.gempukku.lotro.logic.timing.Action;
|
import com.gempukku.lotro.logic.timing.Action;
|
||||||
import com.gempukku.lotro.logic.timing.Effect;
|
import com.gempukku.lotro.logic.timing.Effect;
|
||||||
import com.gempukku.lotro.logic.timing.EffectResult;
|
import com.gempukku.lotro.logic.timing.EffectResult;
|
||||||
|
import com.google.common.collect.Sets;
|
||||||
|
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
|
||||||
@@ -1039,6 +1040,9 @@ public class BuiltLotroCardBlueprint implements LotroCardBlueprint {
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static Set<String> frodosWithNon10Resistance = Sets.newHashSet("Resolute Hobbit");
|
||||||
|
private static Set<String> samsWithNon5Resistance = Sets.newHashSet("Loyal Friend", "Dropper of Eaves", "Humble Halfling");
|
||||||
|
|
||||||
public void validateConsistency() throws InvalidCardDefinitionException {
|
public void validateConsistency() throws InvalidCardDefinitionException {
|
||||||
if (title == null)
|
if (title == null)
|
||||||
throw new InvalidCardDefinitionException("Card has to have a title");
|
throw new InvalidCardDefinitionException("Card has to have a title");
|
||||||
@@ -1091,5 +1095,11 @@ public class BuiltLotroCardBlueprint implements LotroCardBlueprint {
|
|||||||
throw new InvalidCardDefinitionException("Possession, condition or artifact without a filter needs a SUPPORT_AREA keyword");
|
throw new InvalidCardDefinitionException("Possession, condition or artifact without a filter needs a SUPPORT_AREA keyword");
|
||||||
if (cardType == CardType.FOLLOWER && aidCostSource == null)
|
if (cardType == CardType.FOLLOWER && aidCostSource == null)
|
||||||
throw new InvalidCardDefinitionException("Follower requires an aid cost");
|
throw new InvalidCardDefinitionException("Follower requires an aid cost");
|
||||||
|
if (title.equals("Frodo") && resistance != 10 && !frodosWithNon10Resistance.contains(subtitle)) {
|
||||||
|
throw new InvalidCardDefinitionException("Frodo (except some permitted) needs to have resistance of 10");
|
||||||
|
}
|
||||||
|
if (title.equals("Sam") && resistance != 5 && !samsWithNon5Resistance.contains(subtitle)) {
|
||||||
|
throw new InvalidCardDefinitionException("Sam (except some permitted) needs to have resistance of 5");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -21,11 +21,12 @@ import java.util.Collections;
|
|||||||
public class Kill implements EffectAppenderProducer {
|
public class Kill implements EffectAppenderProducer {
|
||||||
@Override
|
@Override
|
||||||
public EffectAppender createEffectAppender(JSONObject effectObject, CardGenerationEnvironment environment) throws InvalidCardDefinitionException {
|
public EffectAppender createEffectAppender(JSONObject effectObject, CardGenerationEnvironment environment) throws InvalidCardDefinitionException {
|
||||||
FieldUtils.validateAllowedFields(effectObject, "count", "filter", "player");
|
FieldUtils.validateAllowedFields(effectObject, "count", "filter", "player", "memorize");
|
||||||
|
|
||||||
final ValueSource valueSource = ValueResolver.resolveEvaluator(effectObject.get("count"), 1, environment);
|
final ValueSource valueSource = ValueResolver.resolveEvaluator(effectObject.get("count"), 1, environment);
|
||||||
final String filter = FieldUtils.getString(effectObject.get("filter"), "filter");
|
final String filter = FieldUtils.getString(effectObject.get("filter"), "filter");
|
||||||
final String player = FieldUtils.getString(effectObject.get("player"), "player", "you");
|
final String player = FieldUtils.getString(effectObject.get("player"), "player", "you");
|
||||||
|
final String memory = FieldUtils.getString(effectObject.get("memorize"), "memorize", "_temp");
|
||||||
|
|
||||||
if (filter == null)
|
if (filter == null)
|
||||||
throw new InvalidCardDefinitionException("Selector is required for a Kill effect.");
|
throw new InvalidCardDefinitionException("Selector is required for a Kill effect.");
|
||||||
@@ -33,12 +34,12 @@ public class Kill implements EffectAppenderProducer {
|
|||||||
MultiEffectAppender result = new MultiEffectAppender();
|
MultiEffectAppender result = new MultiEffectAppender();
|
||||||
|
|
||||||
result.addEffectAppender(
|
result.addEffectAppender(
|
||||||
CardResolver.resolveCards(filter, valueSource, "_temp", player, "Choose cards to kill", environment));
|
CardResolver.resolveCards(filter, valueSource, memory, player, "Choose cards to kill", environment));
|
||||||
result.addEffectAppender(
|
result.addEffectAppender(
|
||||||
new DelayedAppender() {
|
new DelayedAppender() {
|
||||||
@Override
|
@Override
|
||||||
protected Effect createEffect(boolean cost, CostToEffectAction action, ActionContext actionContext) {
|
protected Effect createEffect(boolean cost, CostToEffectAction action, ActionContext actionContext) {
|
||||||
final Collection<? extends PhysicalCard> cardsFromMemory = actionContext.getCardsFromMemory("_temp");
|
final Collection<? extends PhysicalCard> cardsFromMemory = actionContext.getCardsFromMemory(memory);
|
||||||
return new KillEffect(cardsFromMemory, Collections.singleton(action.getActionSource()), KillEffect.Cause.CARD_EFFECT);
|
return new KillEffect(cardsFromMemory, Collections.singleton(action.getActionSource()), KillEffect.Cause.CARD_EFFECT);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user