Migrated Gondor cards in set 3 to hjson

This commit is contained in:
MarcinSc
2024-04-10 21:47:51 +07:00
parent ae6d5671fd
commit c3f6517922
16 changed files with 434 additions and 662 deletions

View File

@@ -1,52 +0,0 @@
package com.gempukku.lotro.cards.set3.gondor;
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.AddUntilEndOfPhaseModifierEffect;
import com.gempukku.lotro.logic.effects.ChooseActiveCardEffect;
import com.gempukku.lotro.logic.effects.ChooseAndDiscardCardsFromHandEffect;
import com.gempukku.lotro.logic.modifiers.StrengthModifier;
import com.gempukku.lotro.logic.timing.PlayConditions;
import java.util.Collections;
import java.util.List;
/**
* Set: Realms of Elf-lords
* Side: Free
* Culture: Gondor
* Twilight Cost: 0
* Type: Condition
* Game Text: Plays to your support area. Skirmish: Discard a [GONDOR] tale from hand to make a [GONDOR] companion
* strength +2.
*/
public class Card3_037 extends AbstractPermanent {
public Card3_037() {
super(Side.FREE_PEOPLE, 0, CardType.CONDITION, Culture.GONDOR, "Answering the Cries");
}
@Override
public List<? extends ActivateCardAction> getPhaseActionsInPlay(String playerId, LotroGame game, final PhysicalCard self) {
if (PlayConditions.canUseFPCardDuringPhase(game, Phase.SKIRMISH, self)
&& PlayConditions.canDiscardFromHand(game, playerId, 1, Culture.GONDOR, Keyword.TALE)) {
final ActivateCardAction action = new ActivateCardAction(self);
action.appendCost(
new ChooseAndDiscardCardsFromHandEffect(action, playerId, false, 1, Filters.and(Culture.GONDOR, Keyword.TALE)));
action.appendEffect(
new ChooseActiveCardEffect(self, playerId, "Choose GONDOR companion", Culture.GONDOR, CardType.COMPANION) {
@Override
protected void cardSelected(LotroGame game, PhysicalCard card) {
action.insertEffect(
new AddUntilEndOfPhaseModifierEffect(
new StrengthModifier(self, Filters.sameCard(card), 2)));
}
});
return Collections.singletonList(action);
}
return null;
}
}

View File

@@ -1,44 +0,0 @@
package com.gempukku.lotro.cards.set3.gondor;
import com.gempukku.lotro.logic.cardtype.AbstractCompanion;
import com.gempukku.lotro.logic.timing.TriggerConditions;
import com.gempukku.lotro.logic.effects.RemoveTwilightEffect;
import com.gempukku.lotro.common.*;
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.timing.EffectResult;
import java.util.Collections;
import java.util.List;
/**
* Set: Realms of Elf-lords
* Side: Free
* Culture: Gondor
* Twilight Cost: 4
* Type: Companion • Man
* Strength: 8
* Vitality: 4
* Resistance: 6
* Signet: Frodo
* Game Text: Ranger. Each time the fellowship moves during the fellowship phase, remove (2).
*/
public class Card3_038 extends AbstractCompanion {
public Card3_038() {
super(4, 8, 4, 6, Culture.GONDOR, Race.MAN, Signet.FRODO, "Aragorn", "Heir to the White City", true);
addKeyword(Keyword.RANGER);
}
@Override
public List<RequiredTriggerAction> getRequiredAfterTriggers(LotroGame game, EffectResult effectResult, PhysicalCard self) {
if (TriggerConditions.moves(game, effectResult)
&& game.getGameState().getCurrentPhase() == Phase.FELLOWSHIP) {
RequiredTriggerAction action = new RequiredTriggerAction(self);
action.appendEffect(
new RemoveTwilightEffect(2));
return Collections.singletonList(action);
}
return null;
}
}

View File

@@ -1,52 +0,0 @@
package com.gempukku.lotro.cards.set3.gondor;
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.KeywordModifier;
import com.gempukku.lotro.logic.modifiers.StrengthModifier;
import com.gempukku.lotro.logic.timing.PlayConditions;
/**
* Set: Realms of Elf-lords
* Side: Free
* Culture: Gondor
* Twilight Cost: 0
* Type: Event
* Game Text: Tale. Maneuver: Exert a [GONDOR] companion to make that companion strength +3 and defender +1 until
* the regroup phase.
*/
public class Card3_039 extends AbstractEvent {
public Card3_039() {
super(Side.FREE_PEOPLE, 0, Culture.GONDOR, "Banner of the White Tree", Phase.MANEUVER);
addKeyword(Keyword.TALE);
}
@Override
public boolean checkPlayRequirements(LotroGame game, PhysicalCard self) {
return PlayConditions.canExert(self, game, Culture.GONDOR, CardType.COMPANION);
}
@Override
public PlayEventAction getPlayEventCardAction(String playerId, LotroGame game, final PhysicalCard self) {
final PlayEventAction action = new PlayEventAction(self);
action.appendCost(
new ChooseAndExertCharactersEffect(action, playerId, 1, 1, Culture.GONDOR, CardType.COMPANION) {
@Override
protected void forEachCardExertedCallback(PhysicalCard gondorCompanion) {
action.appendEffect(
new AddUntilStartOfPhaseModifierEffect(
new StrengthModifier(self, Filters.sameCard(gondorCompanion), 3), Phase.REGROUP));
action.appendEffect(
new AddUntilStartOfPhaseModifierEffect(
new KeywordModifier(self, Filters.sameCard(gondorCompanion), Keyword.DEFENDER), Phase.REGROUP));
}
});
return action;
}
}

View File

@@ -1,44 +0,0 @@
package com.gempukku.lotro.cards.set3.gondor;
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.OptionalTriggerAction;
import com.gempukku.lotro.logic.cardtype.AbstractPermanent;
import com.gempukku.lotro.logic.effects.ChooseAndHealCharactersEffect;
import com.gempukku.lotro.logic.modifiers.condition.LostSkirmishThisTurnCondition;
import com.gempukku.lotro.logic.timing.EffectResult;
import com.gempukku.lotro.logic.timing.TriggerConditions;
import java.util.Collections;
import java.util.List;
/**
* Set: Realms of Elf-lords
* Side: Free
* Culture: Gondor
* Twilight Cost: 1
* Type: Condition
* Game Text: Plays to your support area. You may heal a [GONDOR] companion at the end of each turn during which
* no companion or ally lost a skirmish.
*/
public class Card3_040 extends AbstractPermanent {
public Card3_040() {
super(Side.FREE_PEOPLE, 1, CardType.CONDITION, Culture.GONDOR, "Citadel of Minas Tirith");
}
@Override
public List<OptionalTriggerAction> getOptionalAfterTriggers(String playerId, LotroGame game, EffectResult effectResult, PhysicalCard self) {
if (TriggerConditions.endOfTurn(game, effectResult)
&& !(new LostSkirmishThisTurnCondition(Filters.or(CardType.COMPANION, CardType.ALLY)).isFullfilled(game))) {
OptionalTriggerAction action = new OptionalTriggerAction(self);
action.appendEffect(
new ChooseAndHealCharactersEffect(action, playerId, Culture.GONDOR, CardType.COMPANION));
return Collections.singletonList(action);
}
return null;
}
}

View File

@@ -1,48 +0,0 @@
package com.gempukku.lotro.cards.set3.gondor;
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.AbstractPermanent;
import com.gempukku.lotro.logic.effects.AddUntilEndOfPhaseModifierEffect;
import com.gempukku.lotro.logic.effects.SelfDiscardEffect;
import com.gempukku.lotro.logic.effects.choose.ChooseAndExertCharactersEffect;
import com.gempukku.lotro.logic.modifiers.ArcheryTotalModifier;
import com.gempukku.lotro.logic.timing.PlayConditions;
import java.util.Collections;
import java.util.List;
/**
* Set: Realms of Elf-lords
* Side: Free
* Culture: Gondor
* Twilight Cost: 0
* Type: Condition
* Game Text: Tale. Plays to your support area. Archery: Exert a [GONDOR] companion and discard this condition to make
* the fellowship archery total +2.
*/
public class Card3_041 extends AbstractPermanent {
public Card3_041() {
super(Side.FREE_PEOPLE, 0, CardType.CONDITION, Culture.GONDOR, "Gondor Bowmen");
addKeyword(Keyword.TALE);
}
@Override
public List<? extends ActivateCardAction> getPhaseActionsInPlay(String playerId, LotroGame game, PhysicalCard self) {
if (PlayConditions.canUseFPCardDuringPhase(game, Phase.ARCHERY, self)
&& PlayConditions.canExert(self, game, Culture.GONDOR, CardType.COMPANION)) {
ActivateCardAction action = new ActivateCardAction(self);
action.appendCost(
new ChooseAndExertCharactersEffect(action, playerId, 1, 1, Culture.GONDOR, CardType.COMPANION));
action.appendCost(
new SelfDiscardEffect(self));
action.appendEffect(
new AddUntilEndOfPhaseModifierEffect(
new ArcheryTotalModifier(self, Side.FREE_PEOPLE, 2)));
return Collections.singletonList(action);
}
return null;
}
}

View File

@@ -1,65 +0,0 @@
package com.gempukku.lotro.cards.set3.gondor;
import com.gempukku.lotro.common.CardType;
import com.gempukku.lotro.common.Culture;
import com.gempukku.lotro.common.Phase;
import com.gempukku.lotro.filters.Filter;
import com.gempukku.lotro.filters.Filters;
import com.gempukku.lotro.game.PhysicalCard;
import com.gempukku.lotro.game.state.LotroGame;
import com.gempukku.lotro.logic.actions.ActivateCardAction;
import com.gempukku.lotro.logic.cardtype.AbstractAttachableFPPossession;
import com.gempukku.lotro.logic.effects.AddUntilStartOfPhaseModifierEffect;
import com.gempukku.lotro.logic.effects.ChooseActiveCardEffect;
import com.gempukku.lotro.logic.effects.choose.ChooseAndExertCharactersEffect;
import com.gempukku.lotro.logic.modifiers.AllyParticipatesInArcheryFireAndSkirmishesModifier;
import com.gempukku.lotro.logic.modifiers.StrengthModifier;
import com.gempukku.lotro.logic.timing.PlayConditions;
import java.util.Collections;
import java.util.List;
/**
* Set: Realms of Elf-lords
* Side: Free
* Culture: Gondor
* Twilight Cost: 0
* Type: Possession
* Game Text: Bearer must be Boromir. Maneuver: Exert Boromir and spot an ally. Until the regroup phase, that ally is
* strength +3 and participates in archery fire and skirmishes.
*/
public class Card3_042 extends AbstractAttachableFPPossession {
public Card3_042() {
super(0, 0, 0, Culture.GONDOR, null, "Horn of Boromir", null, true);
}
@Override
public Filter getValidTargetFilter(String playerId, LotroGame game, PhysicalCard self) {
return Filters.boromir;
}
@Override
public List<? extends ActivateCardAction> getPhaseActionsInPlay(String playerId, LotroGame game, final PhysicalCard self) {
if (PlayConditions.canUseFPCardDuringPhase(game, Phase.MANEUVER, self)
&& PlayConditions.canExert(self, game, Filters.boromir)
&& Filters.canSpot(game, CardType.ALLY)) {
final ActivateCardAction action = new ActivateCardAction(self);
action.appendCost(
new ChooseAndExertCharactersEffect(action, playerId, 1, 1, Filters.boromir));
action.appendEffect(
new ChooseActiveCardEffect(self, playerId, "Choose an Ally", CardType.ALLY) {
@Override
protected void cardSelected(LotroGame game, PhysicalCard card) {
action.insertEffect(
new AddUntilStartOfPhaseModifierEffect(
new StrengthModifier(self, Filters.sameCard(card), 3), Phase.REGROUP));
action.insertEffect(
new AddUntilStartOfPhaseModifierEffect(
new AllyParticipatesInArcheryFireAndSkirmishesModifier(self, Filters.sameCard(card)), Phase.REGROUP));
}
});
return Collections.singletonList(action);
}
return null;
}
}

View File

@@ -1,58 +0,0 @@
package com.gempukku.lotro.cards.set3.gondor;
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.ChooseAndHealCharactersEffect;
import com.gempukku.lotro.logic.effects.RevealRandomCardsFromHandEffect;
import com.gempukku.lotro.logic.effects.choose.ChooseOpponentEffect;
import java.util.List;
/**
* Set: Realms of Elf-lords
* Side: Free
* Culture: Gondor
* Twilight Cost: 1
* Type: Event
* Game Text: Tale. Maneuver: Spot a [GONDOR] companion to reveal a card at random from an opponent's hand. Heal
* X companions, where X is the twilight cost of the card revealed.
*/
public class Card3_043 extends AbstractEvent {
public Card3_043() {
super(Side.FREE_PEOPLE, 1, Culture.GONDOR, "Might of Numenor", Phase.MANEUVER);
addKeyword(Keyword.TALE);
}
@Override
public boolean checkPlayRequirements(LotroGame game, PhysicalCard self) {
return Filters.canSpot(game, Culture.GONDOR, CardType.COMPANION);
}
@Override
public PlayEventAction getPlayEventCardAction(final String playerId, LotroGame game, final PhysicalCard self) {
final PlayEventAction action = new PlayEventAction(self);
action.appendEffect(
new ChooseOpponentEffect(playerId) {
@Override
protected void opponentChosen(String opponentId) {
action.insertEffect(
new RevealRandomCardsFromHandEffect(playerId, opponentId, self, 1) {
@Override
protected void cardsRevealed(List<PhysicalCard> revealedCards) {
if (revealedCards.size() > 0) {
PhysicalCard revealedCard = revealedCards.get(0);
int twilightCost = revealedCard.getBlueprint().getTwilightCost();
action.appendEffect(
new ChooseAndHealCharactersEffect(action, playerId, twilightCost, twilightCost, CardType.COMPANION));
}
}
});
}
});
return action;
}
}

View File

@@ -1,71 +0,0 @@
package com.gempukku.lotro.cards.set3.gondor;
import com.gempukku.lotro.common.CardType;
import com.gempukku.lotro.common.Culture;
import com.gempukku.lotro.common.Phase;
import com.gempukku.lotro.common.Side;
import com.gempukku.lotro.game.PhysicalCard;
import com.gempukku.lotro.game.state.LotroGame;
import com.gempukku.lotro.logic.actions.ActivateCardAction;
import com.gempukku.lotro.logic.cardtype.AbstractPermanent;
import com.gempukku.lotro.logic.effects.AddTwilightEffect;
import com.gempukku.lotro.logic.effects.ChooseArbitraryCardsEffect;
import com.gempukku.lotro.logic.effects.PutCardFromStackedIntoHandEffect;
import com.gempukku.lotro.logic.effects.choose.ChooseAndStackCardsFromHandEffect;
import com.gempukku.lotro.logic.timing.PlayConditions;
import java.util.Collection;
import java.util.LinkedList;
import java.util.List;
/**
* Set: Realms of Elf-lords
* Side: Free
* Culture: Gondor
* Twilight Cost: 1
* Type: Artifact
* Game Text: Plays to your support area. Fellowship: Stack a [GONDOR] card from hand here. Fellowship: Add (1) to take
* a card stacked here into hand.
*/
public class Card3_044 extends AbstractPermanent {
public Card3_044() {
super(Side.FREE_PEOPLE, 1, CardType.ARTIFACT, Culture.GONDOR, "The Shards of Narsil", null, true);
}
@Override
public List<? extends ActivateCardAction> getPhaseActionsInPlay(String playerId, LotroGame game, final PhysicalCard self) {
List<ActivateCardAction> actions = new LinkedList<>();
if (PlayConditions.canUseFPCardDuringPhase(game, Phase.FELLOWSHIP, self)) {
if (PlayConditions.canStackCardFromHand(self, game, playerId, 1, self, Culture.GONDOR)) {
final ActivateCardAction action = new ActivateCardAction(self);
action.setText("Stack a GONDOR card from hand here");
action.appendEffect(
new ChooseAndStackCardsFromHandEffect(action, playerId, 1, 1, self, Culture.GONDOR));
actions.add(action);
}
List<PhysicalCard> stackedCards = game.getGameState().getStackedCards(self);
if (stackedCards.size() > 0) {
final ActivateCardAction action = new ActivateCardAction(self);
action.setText("Add (1) to take card stacked here into hand");
action.appendCost(
new AddTwilightEffect(self, 1));
action.appendEffect(
new ChooseArbitraryCardsEffect(playerId, "Choose card", stackedCards, 1, 1) {
@Override
protected void cardsSelected(LotroGame game, Collection<PhysicalCard> selectedCards) {
for (PhysicalCard selectedCard : selectedCards) {
action.appendEffect(
new PutCardFromStackedIntoHandEffect(selectedCard));
}
}
});
actions.add(action);
}
}
return actions;
}
}

View File

@@ -1,39 +0,0 @@
package com.gempukku.lotro.cards.set3.gondor;
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.modifiers.TwilightCostModifier;
/**
* Set: Realms of Elf-lords
* Side: Free
* Culture: Gondor
* Twilight Cost: 0
* Type: Event
* Game Text: Tale. Maneuver: Spot a [GONDOR] companion to make the twilight cost of each maneuver event +2.
*/
public class Card3_045 extends AbstractEvent {
public Card3_045() {
super(Side.FREE_PEOPLE, 0, Culture.GONDOR, "Some Who Resisted", Phase.MANEUVER);
addKeyword(Keyword.TALE);
}
@Override
public boolean checkPlayRequirements(LotroGame game, PhysicalCard self) {
return Filters.canSpot(game, Culture.GONDOR, CardType.COMPANION);
}
@Override
public PlayEventAction getPlayEventCardAction(String playerId, LotroGame game, PhysicalCard self) {
PlayEventAction action = new PlayEventAction(self);
action.appendEffect(
new AddUntilEndOfPhaseModifierEffect(
new TwilightCostModifier(self, Filters.and(CardType.EVENT, Keyword.MANEUVER), 2)));
return action;
}
}

View File

@@ -1,49 +0,0 @@
package com.gempukku.lotro.cards.set3.gondor;
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.modifiers.KeywordModifier;
import com.gempukku.lotro.logic.modifiers.StrengthModifier;
/**
* Set: Realms of Elf-lords
* Side: Free
* Culture: Gondor
* Twilight Cost: 0
* Type: Event
* Game Text: Skirmish: Spot The Shards of Narsil to make a [GONDOR] companion strength +3 and damage +1.
*/
public class Card3_046 extends AbstractEvent {
public Card3_046() {
super(Side.FREE_PEOPLE, 0, Culture.GONDOR, "Still Sharp", Phase.SKIRMISH);
}
@Override
public boolean checkPlayRequirements(LotroGame game, PhysicalCard self) {
return Filters.canSpot(game, Filters.name("The Shards of Narsil"));
}
@Override
public PlayEventAction getPlayEventCardAction(String playerId, LotroGame game, final PhysicalCard self) {
final PlayEventAction action = new PlayEventAction(self);
action.appendEffect(
new ChooseActiveCardEffect(self, playerId, "Choose GONDOR companion", Culture.GONDOR, CardType.COMPANION) {
@Override
protected void cardSelected(LotroGame game, PhysicalCard card) {
action.insertEffect(
new AddUntilEndOfPhaseModifierEffect(
new StrengthModifier(self, Filters.sameCard(card), 3)));
action.insertEffect(
new AddUntilEndOfPhaseModifierEffect(
new KeywordModifier(self, Filters.sameCard(card), Keyword.DAMAGE)));
}
});
return action;
}
}

View File

@@ -1,42 +0,0 @@
package com.gempukku.lotro.cards.set3.gondor;
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.KeywordModifier;
import com.gempukku.lotro.logic.timing.PlayConditions;
/**
* Set: Realms of Elf-lords
* Side: Free
* Culture: Gondor
* Twilight Cost: 0
* Type: Event
* Game Text: Maneuver: Exert Aragorn to make each companion with the Aragorn signet damage +1 until the regroup phase.
*/
public class Card3_047 extends AbstractEvent {
public Card3_047() {
super(Side.FREE_PEOPLE, 0, Culture.GONDOR, "Voice of Rauros", Phase.MANEUVER);
}
@Override
public boolean checkPlayRequirements(LotroGame game, PhysicalCard self) {
return PlayConditions.canExert(self, game, Filters.aragorn);
}
@Override
public PlayEventAction getPlayEventCardAction(String playerId, LotroGame game, PhysicalCard self) {
PlayEventAction action = new PlayEventAction(self);
action.appendCost(
new ChooseAndExertCharactersEffect(action, playerId, 1, 1, Filters.aragorn));
action.appendEffect(
new AddUntilStartOfPhaseModifierEffect(
new KeywordModifier(self, Filters.and(CardType.COMPANION, Signet.ARAGORN), Keyword.DAMAGE), Phase.REGROUP));
return action;
}
}

View File

@@ -1,53 +0,0 @@
package com.gempukku.lotro.cards.set3.gondor;
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.PlayUtils;
import com.gempukku.lotro.logic.actions.PlayEventAction;
import com.gempukku.lotro.logic.cardtype.AbstractResponseEvent;
import com.gempukku.lotro.logic.effects.AddUntilStartOfPhaseModifierEffect;
import com.gempukku.lotro.logic.effects.choose.ChooseAndExertCharactersEffect;
import com.gempukku.lotro.logic.modifiers.TwilightCostModifier;
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: Realms of Elf-lords
* Side: Free
* Culture: Gondor
* Twilight Cost: 0
* Type: Event
* Game Text: Response: If the fellowship moves in the regroup phase, exert a [GONDOR] companion twice to make each
* minion's twilight cost +1 until the next regroup phase.
*/
public class Card3_048 extends AbstractResponseEvent {
public Card3_048() {
super(Side.FREE_PEOPLE, 0, Culture.GONDOR, "We Must Go Warily");
}
@Override
public List<PlayEventAction> getPlayResponseEventAfterActions(String playerId, LotroGame game, EffectResult effectResult, PhysicalCard self) {
if (TriggerConditions.moves(game, effectResult)
&& PlayConditions.isPhase(game, Phase.REGROUP)
&& PlayUtils.checkPlayRequirements(game, self, Filters.any, 0, 0, false, false)
&& PlayConditions.canExert(self, game, 2, Culture.GONDOR, CardType.COMPANION)) {
PlayEventAction action = new PlayEventAction(self);
action.appendCost(
new ChooseAndExertCharactersEffect(action, playerId, 1, 1, 2, Culture.GONDOR, CardType.COMPANION));
action.appendEffect(
new AddUntilStartOfPhaseModifierEffect(
new TwilightCostModifier(self, CardType.MINION, 1), Phase.REGROUP));
return Collections.singletonList(action);
}
return null;
}
}

View File

@@ -1,45 +0,0 @@
package com.gempukku.lotro.cards.set3.gondor;
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.AddTwilightEffect;
import com.gempukku.lotro.logic.effects.HealCharactersEffect;
import com.gempukku.lotro.logic.timing.PlayConditions;
import java.util.Collections;
import java.util.List;
/**
* Set: Realms of Elf-lords
* Side: Free
* Culture: Gondor
* Twilight Cost: 3
* Type: Companion • Man
* Strength: 7
* Vitality: 3
* Resistance: 6
* Signet: Gandalf
* Game Text: Ranger. Fellowship: Add (2) to heal Boromir.
*/
public class Card3_122 extends AbstractCompanion {
public Card3_122() {
super(3, 7, 3, 6, Culture.GONDOR, Race.MAN, Signet.GANDALF, "Boromir", "Defender of Minas Tirith", true);
addKeyword(Keyword.RANGER);
}
@Override
public List<? extends ActivateCardAction> getPhaseActionsInPlay(String playerId, LotroGame game, PhysicalCard self) {
if (PlayConditions.canUseFPCardDuringPhase(game, Phase.FELLOWSHIP, self)) {
ActivateCardAction action = new ActivateCardAction(self);
action.appendCost(
new AddTwilightEffect(self, 2));
action.appendEffect(
new HealCharactersEffect(self, self.getOwner(), self));
return Collections.singletonList(action);
}
return null;
}
}

View File

@@ -0,0 +1,395 @@
{
3_37: {
title: Answering the Cries
side: free_people
culture: Gondor
twilight: 0
type: condition
keyword: Support Area
effects: {
type: activated
phase: skirmish
cost: {
type: discardFromHand
forced: false
filter: choose(culture(gondor),tale)
}
effect: {
type: modifyStrength
filter: choose(culture(gondor),companion)
amount: 2
}
}
}
3_38: {
title: Aragorn
subtitle: Heir to the White City
unique: true
side: free_people
culture: Gondor
twilight: 4
type: companion
race: Man
signet: frodo
strength: 8
vitality: 4
resistance: 6
keyword: Ranger
effects: {
type: trigger
trigger: {
type: moves
}
requires: {
type: phase
phase: fellowship
}
effect: {
type: removeTwilight
amount: 2
}
}
}
3_39: {
title: Banner of the White Tree
side: free_people
culture: Gondor
twilight: 0
type: event
keyword:
[
Maneuver
Tale
]
effects: {
type: event
cost: {
type: exert
filter: choose(culture(gondor),companion)
memorize: exertedCompanion
}
effect: [
{
type: modifyStrength
filter: memory(exertedCompanion)
amount: 3
until: start(regroup)
}
{
type: addKeyword
filter: memory(exertedCompanion)
keyword: defender
amount: 1
until: start(regroup)
}
]
}
}
3_40: {
title: Citadel of Minas Tirith
side: free_people
culture: Gondor
twilight: 1
type: condition
keyword: Support Area
effects: {
type: trigger
optional: true
trigger: {
type: endOfTurn
}
requires: {
type: not
requires: {
type: lostSkirmishThisTurn
filter: or(companion,ally)
}
}
effect: {
type: heal
filter: choose(companion)
}
}
}
3_41: {
title: Gondor Bowmen
side: free_people
culture: Gondor
twilight: 0
type: condition
keyword:
[
Support Area
Tale
]
effects: {
type: activated
phase: archery
cost: [
{
type: exert
filter: choose(culture(gondor),companion)
}
{
type: discard
filter: self
}
]
effect: {
type: modifyArcheryTotal
side: free
amount: 2
}
}
}
3_42: {
title: Horn of Boromir
unique: true
side: free_people
culture: Gondor
twilight: 0
type: possession
target: name(Boromir)
effects: {
type: activated
phase: maneuver
cost: {
type: exert
filter: bearer
}
effect: [
{
type: chooseActiveCards
filter: choose(ally)
text: Choose ally to have it participate in archery and skirmishes
memorize: chosenAlly
}
{
type: modifyStrength
filter: memory(chosenAlly)
amount: 3
until: start(regroup)
}
{
type: addModifier
modifier: {
type: allyCanParticipateInArcheryFireAndSkirmishes
filter: memory(chosenAlly)
}
until: start(regroup)
}
]
}
}
3_43: {
title: Might of Numenor
side: free_people
culture: Gondor
twilight: 1
type: event
keyword:
[
Maneuver
Tale
]
effects: {
type: event
requires: {
type: canSpot
filter: culture(gondor),companion
}
effect: [
{
type: revealRandomCardsFromHand
forced: true
hand: shadow
memorize: revealedCard
}
{
type: heal
filter: choose(companion)
count: {
type: twilightCostInMemory
memory: revealedCard
}
}
]
}
}
3_44: {
title: The Shards of Narsil
unique: true
side: free_people
culture: Gondor
twilight: 1
type: artifact
keyword: Support Area
effects: [
{
type: activated
phase: fellowship
text: Stack a GONDOR card from hand here
effect: {
type: stackCardsFromHand
filter: choose(culture(gondor))
where: self
}
}
{
type: activated
phase: fellowship
text: Add (1) to take a card from here
cost: {
type: addTwilight
amount: 1
}
effect: {
type: putStackedCardsIntoHand
on: self
}
}
]
}
3_45: {
title: Some Who Resisted
side: free_people
culture: Gondor
twilight: 0
type: event
keyword:
[
Maneuver
Tale
]
effects: {
type: event
requires: {
type: canSpot
filter: culture(gondor),companion
}
effect: {
type: addModifier
modifier: {
type: modifyCost
filter: maneuver,event
amount: 2
}
}
}
}
3_46: {
title: Still Sharp
side: free_people
culture: Gondor
twilight: 0
type: event
keyword: Skirmish
effects: {
type: event
requires: {
type: canSpot
filter: name(The Shards of Narsil)
}
effect: [
{
type: chooseActiveCards
filter: choose(culture(gondor),companion)
text: Choose GONDOR companion to strengthen
memorize: chosenCompanion
}
{
type: modifyStrength
filter: memory(chosenCompanion)
amount: 3
}
{
type: addKeyword
filter: memory(chosenCompanion)
keyword: damage
amount: 1
}
]
}
}
3_47: {
title: Voice of Rauros
side: free_people
culture: Gondor
twilight: 0
type: event
keyword: Maneuver
effects: {
type: event
cost: {
type: exert
filter: choose(name(Aragorn))
}
effect: {
type: addKeyword
filter: all(companion,signet(Aragorn))
keyword: damage
amount: 1
until: start(regroup)
}
}
}
3_48: {
title: We Must Go Warily
side: free_people
culture: Gondor
twilight: 0
type: event
keyword: Response
effects: {
type: responseEvent
trigger: {
type: moves
}
requires: {
type: phase
phase: regroup
}
cost: {
type: exert
filter: choose(culture(gondor),companion)
}
effect: {
type: addModifier
modifier: {
type: modifyCost
filter: minion
amount: 1
}
until: start(regroup)
}
}
}
3_122: {
title: Boromir
subtitle: Defender of Minas Tirith
unique: true
side: free_people
culture: Gondor
twilight: 3
type: companion
race: Man
signet: gandalf
strength: 7
vitality: 3
resistance: 6
keyword: Ranger
effects: {
type: activated
phase: fellowship
cost: {
type: addTwilight
amount: 2
}
effect: {
type: heal
filter: self
}
}
}
}

View File

@@ -0,0 +1,38 @@
package com.gempukku.lotro.cards.build.field.effect.requirement;
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.Requirement;
import com.gempukku.lotro.cards.build.field.FieldUtils;
import com.gempukku.lotro.filters.Filter;
import com.gempukku.lotro.filters.Filters;
import com.gempukku.lotro.game.state.LotroGame;
import com.gempukku.lotro.logic.timing.EffectResult;
import com.gempukku.lotro.logic.timing.results.CharacterLostSkirmishResult;
import org.json.simple.JSONObject;
public class LostSkirmishThisTurn implements RequirementProducer {
@Override
public Requirement getPlayRequirement(JSONObject object, CardGenerationEnvironment environment) throws InvalidCardDefinitionException {
FieldUtils.validateAllowedFields(object, "filter");
final String filter = FieldUtils.getString(object.get("filter"), "filter");
final FilterableSource filterableSource = environment.getFilterFactory().generateFilter(filter, environment);
return (actionContext) -> {
Filter filterable = Filters.and(filterableSource.getFilterable(actionContext));
LotroGame game = actionContext.getGame();
for (EffectResult effectResult : game.getActionsEnvironment().getTurnEffectResults()) {
if (effectResult.getType() == EffectResult.Type.CHARACTER_LOST_SKIRMISH) {
CharacterLostSkirmishResult lostResult = (CharacterLostSkirmishResult) effectResult;
if (filterable.accepts(game, lostResult.getLoser()))
return true;
}
}
return false;
};
}
}

View File

@@ -45,6 +45,7 @@ public class RequirementFactory {
requirementProducers.put("isowner", new IsOwnerRequirementProducer());
requirementProducers.put("isside", new IsSideRequirementProducer());
requirementProducers.put("location", new Location());
requirementProducers.put("lostskirmishthisturn", new LostSkirmishThisTurn());
requirementProducers.put("memoryis", new MemoryIs());
requirementProducers.put("memorylike", new MemoryLike());
requirementProducers.put("memorymatches", new MemoryMatches());