Migrated Site cards in set 6 to hjson

This commit is contained in:
MarcinSc
2024-04-23 00:05:41 +07:00
parent 43a16b8a1d
commit 7778643846
13 changed files with 93 additions and 703 deletions

View File

@@ -1,75 +0,0 @@
package com.gempukku.lotro.cards.set6.shire;
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.AbstractAttachable;
import com.gempukku.lotro.logic.effects.*;
import com.gempukku.lotro.logic.timing.Effect;
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: Ents of Fangorn
* Side: Free
* Culture: Shire
* Twilight Cost: 1
* Type: Condition
* Game Text: Bearer must be Frodo. Each time Frodo is about to be killed by a wound, add a burden instead. When
* the fellowship moves to site 9, Frodo is corrupted. Regroup: If you can spot no minions, discard this condition.
*/
public class Card6_109 extends AbstractAttachable {
public Card6_109() {
super(Side.FREE_PEOPLE, CardType.CONDITION, 1, Culture.SHIRE, null, "Held");
}
@Override
public Filterable getValidTargetFilter(String playerId, LotroGame game, PhysicalCard self) {
return Filters.frodo;
}
@Override
public List<RequiredTriggerAction> getRequiredBeforeTriggers(LotroGame game, Effect effect, PhysicalCard self) {
if (TriggerConditions.isGettingWounded(effect, game, Filters.hasAttached(self))
&& Filters.exhausted.accepts(game, self.getAttachedTo())) {
RequiredTriggerAction action = new RequiredTriggerAction(self);
action.appendEffect(
new PreventCardEffect((WoundCharactersEffect) effect, self.getAttachedTo()));
action.appendEffect(
new AddBurdenEffect(self.getOwner(), self, 1));
return Collections.singletonList(action);
}
return null;
}
@Override
public List<RequiredTriggerAction> getRequiredAfterTriggers(LotroGame game, EffectResult effectResult, PhysicalCard self) {
if (TriggerConditions.movesTo(game, effectResult, Filters.siteNumber(9))
&& PlayConditions.canSpot(game, Filters.ringBearer, Filters.hasAttached(self))) {
RequiredTriggerAction action = new RequiredTriggerAction(self);
action.appendEffect(
new CorruptRingBearerEffect());
return Collections.singletonList(action);
}
return null;
}
@Override
public List<? extends ActivateCardAction> getPhaseActionsInPlay(String playerId, LotroGame game, PhysicalCard self) {
if (PlayConditions.canUseFPCardDuringPhase(game, Phase.REGROUP, self)
&& !PlayConditions.canSpot(game, CardType.MINION)) {
ActivateCardAction action = new ActivateCardAction(self);
action.appendEffect(
new SelfDiscardEffect(self));
return Collections.singletonList(action);
}
return null;
}
}

View File

@@ -1,64 +0,0 @@
package com.gempukku.lotro.cards.set6.shire;
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.ChooseAndWoundCharactersEffect;
import com.gempukku.lotro.logic.effects.RevealHandEffect;
import com.gempukku.lotro.logic.effects.choose.ChooseOpponentEffect;
import com.gempukku.lotro.logic.timing.PlayConditions;
import java.util.Collection;
import java.util.HashSet;
import java.util.Set;
/**
* Set: Ents of Fangorn
* Side: Free
* Culture: Shire
* Twilight Cost: 1
* Type: Event
* Game Text: Regroup: Spot Sam and Smeagol (or Gollum) to choose an opponent who must reveal his or her hand. Wound
* a minion X times, where X is the number of different cultures revealed.
*/
public class Card6_110 extends AbstractEvent {
public Card6_110() {
super(Side.FREE_PEOPLE, 1, Culture.SHIRE, "It Burns Us", Phase.REGROUP);
}
@Override
public boolean checkPlayRequirements(LotroGame game, PhysicalCard self) {
return PlayConditions.canSpot(game, Filters.sam)
&& PlayConditions.canSpot(game, Filters.gollumOrSmeagol);
}
@Override
public PlayEventAction getPlayEventCardAction(final String playerId, final LotroGame game, final PhysicalCard self) {
final PlayEventAction action = new PlayEventAction(self);
action.appendEffect(
new ChooseOpponentEffect(playerId) {
@Override
protected void opponentChosen(final String opponentId) {
action.insertEffect(
new RevealHandEffect(self, playerId, opponentId) {
@Override
protected void cardsRevealed(Collection<? extends PhysicalCard> cards) {
Set<Culture> cultures = new HashSet<>();
for (PhysicalCard cardInHand : cards)
cultures.add(cardInHand.getBlueprint().getCulture());
action.appendEffect(
new ChooseAndWoundCharactersEffect(action, playerId, 1, 1, cultures.size(), CardType.MINION));
}
});
}
});
return action;
}
}

View File

@@ -1,82 +0,0 @@
package com.gempukku.lotro.cards.set6.shire;
import com.gempukku.lotro.logic.cardtype.AbstractPermanent;
import com.gempukku.lotro.logic.timing.TriggerConditions;
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.effects.*;
import com.gempukku.lotro.logic.timing.Effect;
import com.gempukku.lotro.logic.timing.EffectResult;
import java.util.Collection;
import java.util.Collections;
import java.util.LinkedList;
import java.util.List;
/**
* Set: Ents of Fangorn
* Side: Free
* Culture: Shire
* Twilight Cost: 2
* Type: Condition
* Game Text: Plays to your support area. When you play this condition, place 2 [SHIRE] tokens here. Response: If
* an unbound Hobbit is about to take a wound, discard this condition or remove a [SHIRE] token from here to prevent
* that wound.
*/
public class Card6_111 extends AbstractPermanent {
public Card6_111() {
super(Side.FREE_PEOPLE, 2, CardType.CONDITION, Culture.SHIRE, "Kept Safe", null, true);
}
@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 AddTokenEffect(self, self, Token.SHIRE, 2));
return Collections.singletonList(action);
}
return null;
}
@Override
public List<? extends ActivateCardAction> getOptionalInPlayBeforeActions(String playerId, LotroGame game, Effect effect, PhysicalCard self) {
if (TriggerConditions.isGettingWounded(effect, game, Race.HOBBIT, Filters.unboundCompanion)) {
final WoundCharactersEffect woundEffect = (WoundCharactersEffect) effect;
Collection<PhysicalCard> woundedCharacters = woundEffect.getAffectedCardsMinusPrevented(game);
final ActivateCardAction action = new ActivateCardAction(self);
List<Effect> possibleCosts = new LinkedList<>();
possibleCosts.add(
new RemoveTokenEffect(self, self, Token.SHIRE) {
@Override
public String getText(LotroGame game) {
return "Remove a SHIRE token from here";
}
});
possibleCosts.add(
new SelfDiscardEffect(self) {
@Override
public String getText(LotroGame game) {
return "Discard this condition";
}
});
action.appendCost(
new ChoiceEffect(action, playerId, possibleCosts));
action.appendEffect(
new ChooseActiveCardEffect(self, playerId, "Choose unbound Hobbit", Race.HOBBIT, Filters.unboundCompanion, Filters.in(woundedCharacters)) {
@Override
protected void cardSelected(LotroGame game, PhysicalCard card) {
action.insertEffect(
new PreventCardEffect(woundEffect, card));
}
});
return Collections.singletonList(action);
}
return null;
}
}

View File

@@ -1,52 +0,0 @@
package com.gempukku.lotro.cards.set6.shire;
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.choose.ChooseAndExertCharactersEffect;
import com.gempukku.lotro.logic.modifiers.KeywordModifier;
import com.gempukku.lotro.logic.modifiers.StrengthModifier;
import com.gempukku.lotro.logic.timing.PlayConditions;
/**
* Set: Ents of Fangorn
* Side: Free
* Culture: Shire
* Twilight Cost: 1
* Type: Event
* Game Text: Skirmish: Exert an unbound Hobbit to make him strength +1 and damage +1 for each [GANDALF] companion
* you can spot.
*/
public class Card6_112 extends AbstractEvent {
public Card6_112() {
super(Side.FREE_PEOPLE, 1, Culture.SHIRE, "Long Slow Wrath", Phase.SKIRMISH);
}
@Override
public boolean checkPlayRequirements(LotroGame game, PhysicalCard self) {
return PlayConditions.canExert(self, game, Race.HOBBIT, Filters.unboundCompanion);
}
@Override
public PlayEventAction getPlayEventCardAction(String playerId, final LotroGame game, final PhysicalCard self) {
final PlayEventAction action = new PlayEventAction(self);
action.appendCost(
new ChooseAndExertCharactersEffect(action, playerId, 1, 1, Race.HOBBIT, Filters.unboundCompanion) {
@Override
protected void forEachCardExertedCallback(PhysicalCard character) {
int count = Filters.countActive(game, Culture.GANDALF, CardType.COMPANION);
action.insertEffect(
new AddUntilEndOfPhaseModifierEffect(
new StrengthModifier(self, character, count)));
action.appendEffect(
new AddUntilEndOfPhaseModifierEffect(
new KeywordModifier(self, character, Keyword.DAMAGE, count)));
}
});
return action;
}
}

View File

@@ -1,45 +0,0 @@
package com.gempukku.lotro.cards.set6.shire;
import com.gempukku.lotro.common.*;
import com.gempukku.lotro.game.PhysicalCard;
import com.gempukku.lotro.game.state.LotroGame;
import com.gempukku.lotro.logic.actions.ActivateCardAction;
import com.gempukku.lotro.logic.cardtype.AbstractCompanion;
import com.gempukku.lotro.logic.effects.ChooseAndHealCharactersEffect;
import com.gempukku.lotro.logic.effects.SelfDiscardEffect;
import com.gempukku.lotro.logic.timing.PlayConditions;
import java.util.Collections;
import java.util.List;
/**
* Set: Ents of Fangorn
* Side: Free
* Culture: Shire
* Twilight Cost: 1
* Type: Companion • Hobbit
* Strength: 3
* Vitality: 4
* Resistance: 6
* Signet: Aragorn
* Game Text: Regroup: Discard Merry to heal a [GANDALF] companion.
*/
public class Card6_113 extends AbstractCompanion {
public Card6_113() {
super(1, 3, 4, 6, Culture.SHIRE, Race.HOBBIT, Signet.ARAGORN, "Merry", "Impatient Hobbit", true);
}
@Override
public List<? extends ActivateCardAction> getPhaseActionsInPlay(String playerId, LotroGame game, PhysicalCard self) {
if (PlayConditions.canUseFPCardDuringPhase(game, Phase.REGROUP, self)
&& PlayConditions.canSelfDiscard(self, game)) {
ActivateCardAction action = new ActivateCardAction(self);
action.appendCost(
new SelfDiscardEffect(self));
action.appendEffect(
new ChooseAndHealCharactersEffect(action, playerId, Culture.GANDALF, CardType.COMPANION));
return Collections.singletonList(action);
}
return null;
}
}

View File

@@ -1,53 +0,0 @@
package com.gempukku.lotro.cards.set6.shire;
import com.gempukku.lotro.common.*;
import com.gempukku.lotro.filters.Filters;
import com.gempukku.lotro.game.PhysicalCard;
import com.gempukku.lotro.game.state.LotroGame;
import com.gempukku.lotro.logic.actions.ActivateCardAction;
import com.gempukku.lotro.logic.cardtype.AbstractCompanion;
import com.gempukku.lotro.logic.effects.ChooseAndWoundCharactersEffect;
import com.gempukku.lotro.logic.effects.SelfDiscardEffect;
import com.gempukku.lotro.logic.effects.choose.ChooseOpponentEffect;
import com.gempukku.lotro.logic.timing.PlayConditions;
import java.util.Collections;
import java.util.List;
/**
* Set: Ents of Fangorn
* Side: Free
* Culture: Shire
* Twilight Cost: 1
* Type: Companion • Hobbit
* Strength: 3
* Vitality: 4
* Resistance: 6
* Signet: Aragorn
* Game Text: Regroup: Discard Pippin to choose a Shadow player who must wound one of his or her minions.
*/
public class Card6_114 extends AbstractCompanion {
public Card6_114() {
super(1, 3, 4, 6, Culture.SHIRE, Race.HOBBIT, Signet.ARAGORN, "Pippin", "Hastiest of All", true);
}
@Override
public List<? extends ActivateCardAction> getPhaseActionsInPlay(String playerId, LotroGame game, PhysicalCard self) {
if (PlayConditions.canUseFPCardDuringPhase(game, Phase.REGROUP, self)
&& PlayConditions.canSelfDiscard(self, game)) {
final ActivateCardAction action = new ActivateCardAction(self);
action.appendCost(
new SelfDiscardEffect(self));
action.appendEffect(
new ChooseOpponentEffect(playerId) {
@Override
protected void opponentChosen(String opponentId) {
action.insertEffect(
new ChooseAndWoundCharactersEffect(action, opponentId, 1, 1, Filters.owner(opponentId), CardType.MINION));
}
});
return Collections.singletonList(action);
}
return null;
}
}

View File

@@ -1,42 +0,0 @@
package com.gempukku.lotro.cards.set6.site;
import com.gempukku.lotro.common.CardType;
import com.gempukku.lotro.common.Phase;
import com.gempukku.lotro.common.Signet;
import com.gempukku.lotro.common.SitesBlock;
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.AbstractSite;
import com.gempukku.lotro.logic.effects.RemoveBurdenEffect;
import com.gempukku.lotro.logic.effects.choose.ChooseAndPlayCardFromHandEffect;
import com.gempukku.lotro.logic.timing.PlayConditions;
import java.util.Collections;
import java.util.List;
/**
* Set: Ents of Fangorn
* Type: Site
* Site: 1T
* Game Text: Fellowship: Play a companion with the Frodo signet to remove a burden.
*/
public class Card6_115 extends AbstractSite {
public Card6_115() {
super("Rocks of Emyn Muil", SitesBlock.TWO_TOWERS, 1, 0, Direction.LEFT);
}
@Override
public List<? extends ActivateCardAction> getPhaseActionsInPlay(String playerId, LotroGame game, PhysicalCard self) {
if (PlayConditions.canUseSiteDuringPhase(game, Phase.FELLOWSHIP, self)
&& PlayConditions.canPlayFromHand(playerId, game, CardType.COMPANION, Signet.FRODO)) {
ActivateCardAction action = new ActivateCardAction(self);
action.appendCost(
new ChooseAndPlayCardFromHandEffect(playerId, game, CardType.COMPANION, Signet.FRODO));
action.appendEffect(
new RemoveBurdenEffect(playerId, self));
return Collections.singletonList(action);
}
return null;
}
}

View File

@@ -1,43 +0,0 @@
package com.gempukku.lotro.cards.set6.site;
import com.gempukku.lotro.common.CardType;
import com.gempukku.lotro.common.Phase;
import com.gempukku.lotro.common.Signet;
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.AbstractSite;
import com.gempukku.lotro.logic.effects.choose.ChooseAndExertCharactersEffect;
import com.gempukku.lotro.logic.effects.choose.ChooseAndPlayCardFromDeckEffect;
import com.gempukku.lotro.logic.timing.PlayConditions;
import java.util.Collections;
import java.util.List;
/**
* Set: Ents of Fangorn
* Type: Site
* Site: 1T
* Game Text: Fellowship: Exert Aragorn twice to play a companion with the Aragorn signet from your draw deck.
*/
public class Card6_116 extends AbstractSite {
public Card6_116() {
super("Westfold", SitesBlock.TWO_TOWERS, 1, 0, Direction.LEFT);
}
@Override
public List<? extends ActivateCardAction> getPhaseActionsInPlay(String playerId, LotroGame game, PhysicalCard self) {
if (PlayConditions.canUseSiteDuringPhase(game, Phase.FELLOWSHIP, self)
&& PlayConditions.canExert(self, game, 2, Filters.aragorn)) {
ActivateCardAction action = new ActivateCardAction(self);
action.appendCost(
new ChooseAndExertCharactersEffect(action, playerId, 1, 1, 2, Filters.aragorn));
action.appendEffect(
new ChooseAndPlayCardFromDeckEffect(playerId, CardType.COMPANION, Signet.ARAGORN));
return Collections.singletonList(action);
}
return null;
}
}

View File

@@ -1,43 +0,0 @@
package com.gempukku.lotro.cards.set6.site;
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.AbstractSite;
import com.gempukku.lotro.logic.effects.choose.ChooseAndExertCharactersEffect;
import com.gempukku.lotro.logic.effects.choose.ChooseAndPlayCardFromDeadPileEffect;
import com.gempukku.lotro.logic.timing.PlayConditions;
import java.util.Collections;
import java.util.List;
/**
* Set: Ents of Fangorn
* Twilight Cost: 0
* Type: Site
* Site: 3T
* Game Text: Sanctuary. Fellowship: Exert 3 companions with the Gandalf signet to play an unbound companion from
* your dead pile.
*/
public class Card6_117 extends AbstractSite {
public Card6_117() {
super("Meduseld", SitesBlock.TWO_TOWERS, 3, 0, Direction.RIGHT);
addKeyword(Keyword.SANCTUARY);
}
@Override
public List<? extends ActivateCardAction> getPhaseActionsInPlay(String playerId, LotroGame game, PhysicalCard self) {
if (PlayConditions.canUseSiteDuringPhase(game, Phase.FELLOWSHIP, self)
&& PlayConditions.canExert(self, game, 1, 3, CardType.COMPANION, Signet.GANDALF)) {
ActivateCardAction action = new ActivateCardAction(self);
action.appendCost(
new ChooseAndExertCharactersEffect(action, playerId, 3, 3, CardType.COMPANION, Signet.GANDALF));
action.appendEffect(
new ChooseAndPlayCardFromDeadPileEffect(playerId, game, Filters.unboundCompanion));
return Collections.singletonList(action);
}
return null;
}
}

View File

@@ -1,44 +0,0 @@
package com.gempukku.lotro.cards.set6.site;
import com.gempukku.lotro.common.*;
import com.gempukku.lotro.game.PhysicalCard;
import com.gempukku.lotro.game.state.LotroGame;
import com.gempukku.lotro.logic.actions.ActivateCardAction;
import com.gempukku.lotro.logic.cardtype.AbstractSite;
import com.gempukku.lotro.logic.effects.DiscardCardsFromHandEffect;
import com.gempukku.lotro.logic.effects.DrawCardsEffect;
import com.gempukku.lotro.logic.timing.PlayConditions;
import java.util.Collections;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
/**
* Set: Ents of Fangorn
* Twilight Cost: 3
* Type: Site
* Site: 6T
* Game Text: Sanctuary. Fellowship: Spot 3 companions with the Theoden signet and discard your hand to draw 4 cards.
*/
public class Card6_118 extends AbstractSite {
public Card6_118() {
super("Hornburg Hall", SitesBlock.TWO_TOWERS, 6, 3, Direction.LEFT);
addKeyword(Keyword.SANCTUARY);
}
@Override
public List<? extends ActivateCardAction> getPhaseActionsInPlay(String playerId, LotroGame game, PhysicalCard self) {
if (PlayConditions.canUseSiteDuringPhase(game, Phase.FELLOWSHIP, self)
&& PlayConditions.canSpot(game, 3, CardType.COMPANION, Signet.THEODEN)) {
ActivateCardAction action = new ActivateCardAction(self);
Set<PhysicalCard> hand = new HashSet<>(game.getGameState().getHand(playerId));
action.appendCost(
new DiscardCardsFromHandEffect(self, playerId, hand, false));
action.appendEffect(
new DrawCardsEffect(action, playerId, 4));
return Collections.singletonList(action);
}
return null;
}
}

View File

@@ -1,38 +0,0 @@
package com.gempukku.lotro.cards.set6.site;
import com.gempukku.lotro.common.SitesBlock;
import com.gempukku.lotro.logic.cardtype.AbstractSite;
import com.gempukku.lotro.logic.timing.TriggerConditions;
import com.gempukku.lotro.common.CardType;
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.effects.DiscardCardsFromPlayEffect;
import com.gempukku.lotro.logic.timing.EffectResult;
import java.util.Collections;
import java.util.List;
/**
* Set: Ents of Fangorn
* Twilight Cost: 8
* Type: Site
* Site: 8T
* Game Text: When the fellowship moves to this site, discard all allies.
*/
public class Card6_119 extends AbstractSite {
public Card6_119() {
super("Valley of Saruman", SitesBlock.TWO_TOWERS, 8, 8, Direction.RIGHT);
}
@Override
public List<RequiredTriggerAction> getRequiredAfterTriggers(LotroGame game, EffectResult effectResult, PhysicalCard self) {
if (TriggerConditions.movesTo(game, effectResult, self)) {
RequiredTriggerAction action = new RequiredTriggerAction(self);
action.appendEffect(
new DiscardCardsFromPlayEffect(self.getOwner(), self, CardType.ALLY));
return Collections.singletonList(action);
}
return null;
}
}

View File

@@ -1,56 +0,0 @@
package com.gempukku.lotro.cards.set6.site;
import com.gempukku.lotro.common.CardType;
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.AbstractSite;
import com.gempukku.lotro.logic.effects.ChooseActiveCardEffect;
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.Collection;
import java.util.Collections;
import java.util.List;
/**
* Set: Ents of Fangorn
* Twilight Cost: 9
* Type: Site
* Site: 9T
* Game Text: Response: If your minion is about to take a wound, discard 2 cards from hand to prevent that wound.
*/
public class Card6_120 extends AbstractSite {
public Card6_120() {
super("Saruman's Laboratory", SitesBlock.TWO_TOWERS, 9, 9, Direction.LEFT);
}
@Override
public List<? extends ActivateCardAction> getOptionalInPlayBeforeActions(String playerId, LotroGame game, Effect effect, PhysicalCard self) {
if (TriggerConditions.isGettingWounded(effect, game, CardType.MINION, Filters.owner(playerId))
&& PlayConditions.canDiscardFromHand(game, playerId, 2, Filters.any)) {
final WoundCharactersEffect woundEffect = (WoundCharactersEffect) effect;
Collection<PhysicalCard> woundedCharacters = woundEffect.getAffectedCardsMinusPrevented(game);
final ActivateCardAction action = new ActivateCardAction(self);
action.appendCost(
new ChooseAndDiscardCardsFromHandEffect(action, playerId, false, 2));
action.appendEffect(
new ChooseActiveCardEffect(self, playerId, "Choose minion", CardType.MINION, Filters.owner(playerId), Filters.in(woundedCharacters)) {
@Override
protected void cardSelected(LotroGame game, PhysicalCard card) {
action.insertEffect(
new PreventCardEffect(woundEffect, card));
}
});
return Collections.singletonList(action);
}
return null;
}
}

View File

@@ -19,20 +19,22 @@
unique: false
twilight: 0
type: Site
site: 1T
site: 1
block: Towers
direction: Left
/*requires: {
}
effects: [
{
}
{
}
]*/
{
type: activated
phase: fellowship
cost: {
type: play
filter: choose(companion,signet(Frodo))
}
effect: {
type: removeBurdens
}
}
]
gametext: <b>Fellowship:</b> Play a companion with the Frodo signet to remove a burden.
lore: ""
promotext: ""
@@ -63,20 +65,24 @@
unique: false
twilight: 0
type: Site
site: 1T
site: 1
block: Towers
direction: Left
/*requires: {
}
effects: [
{
}
{
}
]*/
{
type: activated
phase: fellowship
cost: {
type: exert
filter: choose(name(Aragorn))
times: 2
}
effect: {
type: playCardFromDrawDeck
filter: choose(companion,signet(Aragorn))
}
}
]
gametext: <b>Fellowship:</b> Exert Aragorn twice to play a companion with the Aragorn signet from your draw deck.
lore: ""
promotext: ""
@@ -107,21 +113,25 @@
unique: false
twilight: 0
type: Site
site: 3T
site: 3
block: Towers
direction: Left
keywords: Sanctuary
/*requires: {
}
effects: [
{
}
{
}
]*/
{
type: activated
phase: fellowship
cost: {
type: exert
filter: choose(companion,signet(Gandalf))
count: 3
}
effect: {
type: playCardFromDeadPile
filter: choose(unbound,companion)
}
}
]
gametext: <b>Sanctuary</b>. <b>Fellowship:</b> Exert 3 companions with the Gandalf signet to play an unbound companion from your dead pile.
lore: ""
promotext: ""
@@ -152,21 +162,29 @@
unique: false
twilight: 3
type: Site
site: 6T
site: 6
block: Towers
direction: Right
keywords: Sanctuary
/*requires: {
}
effects: [
{
}
{
}
]*/
{
type: activated
phase: fellowship
requires: {
type: canSpot
filter: companion,signet(Théoden)
}
cost: {
type: discardFromHand
forced: false
count: 1000
}
effect: {
type: drawCards
count: 4
}
}
]
gametext: <b>Sanctuary</b>. <b>Fellowship:</b> Spot 3 companions with the Théoden signet and discard your hand to draw 4 cards.
lore: ""
promotext: ""
@@ -197,20 +215,22 @@
unique: false
twilight: 8
type: Site
site: 8T
site: 8
block: Towers
direction: Right
/*requires: {
}
effects: [
{
}
{
}
]*/
{
type: trigger
trigger: {
type: movesTo
filter: self
}
effect: {
type: discard
filter: all(ally)
}
}
]
gametext: When the fellowship moves to this site, discard all allies.
lore: ""
promotext: ""
@@ -241,20 +261,27 @@
unique: false
twilight: 9
type: Site
site: 9T
site: 9
block: Towers
direction: Left
/*requires: {
}
effects: [
{
}
{
}
]*/
{
type: activatedTrigger
trigger: {
type: aboutToTakeWound
filter: your,minion
}
cost: {
type: discardFromHand
forced: false
count: 2
}
effect: {
type: preventWound
filter: choose(your,minion)
}
}
]
gametext: <b>Response:</b> If your minion is about to take a wound, discard 2 cards from hand to prevent that wound.
lore: ""
promotext: ""