Migrated Dwarven cards in set 11 to hjson

This commit is contained in:
MarcinSc
2024-05-17 00:39:55 +07:00
parent 040ddcd827
commit 4d01f08256
23 changed files with 322 additions and 707 deletions

View File

@@ -1,39 +0,0 @@
package com.gempukku.lotro.cards.set11.dwarven;
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.cardtype.AbstractAttachableFPPossession;
import com.gempukku.lotro.logic.modifiers.KeywordModifier;
import com.gempukku.lotro.logic.modifiers.Modifier;
import com.gempukku.lotro.logic.modifiers.condition.LocationCondition;
import java.util.Collections;
import java.util.List;
/**
* Set: Shadows
* Side: Free
* Culture: Dwarven
* Twilight Cost: 1
* Type: Possession • Hand Weapon
* Strength: +2
* Game Text: Bearer must be a Dwarf. While bearer is at a mountain site, he is damage +1.
*/
public class Card11_003 extends AbstractAttachableFPPossession {
public Card11_003() {
super(1, 2, 0, Culture.DWARVEN, PossessionClass.HAND_WEAPON, "Axe of Khazad-dûm");
}
@Override
public Filterable getValidTargetFilter(String playerId, LotroGame game, PhysicalCard self) {
return Race.DWARF;
}
@Override
public List<? extends Modifier> getInPlayModifiers(LotroGame game, PhysicalCard self) {
return Collections.singletonList(
new KeywordModifier(self, Filters.hasAttached(self), new LocationCondition(Keyword.MOUNTAIN), Keyword.DAMAGE, 1));
}
}

View File

@@ -1,46 +0,0 @@
package com.gempukku.lotro.cards.set11.dwarven;
import com.gempukku.lotro.common.*;
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: Shadows
* Side: Free
* Culture: Dwarven
* Twilight Cost: 0
* Type: Event • Skirmish
* Game Text: Spot a Dwarf. For each wound on that Dwarf, make him strength +2 and damage +1.
*/
public class Card11_004 extends AbstractEvent {
public Card11_004() {
super(Side.FREE_PEOPLE, 0, Culture.DWARVEN, "Battle to the Last", Phase.SKIRMISH);
}
@Override
public PlayEventAction getPlayEventCardAction(String playerId, LotroGame game, final PhysicalCard self) {
final PlayEventAction action = new PlayEventAction(self);
action.appendEffect(
new ChooseActiveCardEffect(self, playerId, "Choose a Dwarf", Race.DWARF) {
@Override
protected void cardSelected(LotroGame game, PhysicalCard card) {
int wounds = game.getGameState().getWounds(card);
if (wounds > 0) {
action.insertEffect(
new AddUntilEndOfPhaseModifierEffect(
new StrengthModifier(self, card, wounds * 2)));
action.insertEffect(
new AddUntilEndOfPhaseModifierEffect(
new KeywordModifier(self, card, Keyword.DAMAGE, wounds)));
}
}
});
return action;
}
}

View File

@@ -1,52 +0,0 @@
package com.gempukku.lotro.cards.set11.dwarven;
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.cardtype.AbstractPermanent;
import com.gempukku.lotro.logic.effects.SelfDiscardEffect;
import com.gempukku.lotro.logic.modifiers.KeywordModifier;
import com.gempukku.lotro.logic.modifiers.Modifier;
import com.gempukku.lotro.logic.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: Shadows
* Side: Free
* Culture: Dwarven
* Twilight Cost: 0
* Type: Condition • Support Area
* Game Text: To play, spot a Dwarf. Each companion is damage +1. Discard this condition at the end of your turn.
*/
public class Card11_005 extends AbstractPermanent {
public Card11_005() {
super(Side.FREE_PEOPLE, 0, CardType.CONDITION, Culture.DWARVEN, "Dwarven Embassy");
}
@Override
public boolean checkPlayRequirements(LotroGame game, PhysicalCard self) {
return PlayConditions.canSpot(game, Race.DWARF);
}
@Override
public List<? extends Modifier> getInPlayModifiers(LotroGame game, PhysicalCard self) {
return Collections.singletonList(
new KeywordModifier(self, CardType.COMPANION, Keyword.DAMAGE, 1));
}
@Override
public List<RequiredTriggerAction> getRequiredAfterTriggers(LotroGame game, EffectResult effectResult, PhysicalCard self) {
if (TriggerConditions.endOfTurn(game, effectResult)) {
RequiredTriggerAction action = new RequiredTriggerAction(self);
action.appendEffect(
new SelfDiscardEffect(self));
return Collections.singletonList(action);
}
return null;
}
}

View File

@@ -1,53 +0,0 @@
package com.gempukku.lotro.cards.set11.dwarven;
import com.gempukku.lotro.common.Culture;
import com.gempukku.lotro.common.Phase;
import com.gempukku.lotro.common.Race;
import com.gempukku.lotro.common.Side;
import com.gempukku.lotro.filters.Filters;
import com.gempukku.lotro.game.PhysicalCard;
import com.gempukku.lotro.game.state.LotroGame;
import com.gempukku.lotro.logic.actions.PlayEventAction;
import com.gempukku.lotro.logic.cardtype.AbstractEvent;
import com.gempukku.lotro.logic.effects.AddUntilEndOfPhaseModifierEffect;
import com.gempukku.lotro.logic.effects.choose.ChooseAndExertCharactersEffect;
import com.gempukku.lotro.logic.modifiers.StrengthModifier;
import com.gempukku.lotro.logic.timing.PlayConditions;
/**
* Set: Shadows
* Side: Free
* Culture: Dwarven
* Twilight Cost: 1
* Type: Event • Skirmish
* Game Text: Exert the Ring-bearer and a Dwarf to make that Dwarf strength +X, where X equals that Dwarf's resistance.
*/
public class Card11_006 extends AbstractEvent {
public Card11_006() {
super(Side.FREE_PEOPLE, 1, Culture.DWARVEN, "Fallen Lord", Phase.SKIRMISH);
}
@Override
public boolean checkPlayRequirements(LotroGame game, PhysicalCard self) {
return PlayConditions.canExert(self, game, Filters.ringBearer) && PlayConditions.canExert(self, game, Race.DWARF, Filters.not(Filters.ringBearer));
}
@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, Filters.ringBearer));
action.appendCost(
new ChooseAndExertCharactersEffect(action, playerId, 1, 1, Race.DWARF, Filters.not(Filters.ringBearer)) {
@Override
protected void forEachCardExertedCallback(PhysicalCard character) {
int resistance = game.getModifiersQuerying().getResistance(game, character);
if (resistance > 0)
action.appendEffect(
new AddUntilEndOfPhaseModifierEffect(
new StrengthModifier(self, character, resistance)));
}
});
return action;
}
}

View File

@@ -1,39 +0,0 @@
package com.gempukku.lotro.cards.set11.dwarven;
import com.gempukku.lotro.common.Culture;
import com.gempukku.lotro.common.Keyword;
import com.gempukku.lotro.common.Race;
import com.gempukku.lotro.filters.Filters;
import com.gempukku.lotro.game.PhysicalCard;
import com.gempukku.lotro.game.state.LotroGame;
import com.gempukku.lotro.logic.cardtype.AbstractCompanion;
import com.gempukku.lotro.logic.modifiers.KeywordModifier;
import com.gempukku.lotro.logic.modifiers.Modifier;
import com.gempukku.lotro.logic.modifiers.condition.LocationCondition;
import java.util.Collections;
import java.util.List;
/**
* Set: Shadows
* Side: Free
* Culture: Dwarven
* Twilight Cost: 2
* Type: Companion • Dwarf
* Strength: 5
* Vitality: 3
* Resistance: 6
* Game Text: While Farin is at a battleground or underground site, he gains muster. (At the start of the regroup phase,
* you may discard a card from hand to draw a card.)
*/
public class Card11_007 extends AbstractCompanion {
public Card11_007() {
super(2, 5, 3, 6, Culture.DWARVEN, Race.DWARF, null, "Farin", "Emissary of Erebor", true);
}
@Override
public List<? extends Modifier> getInPlayModifiers(LotroGame game, PhysicalCard self) {
return Collections.singletonList(
new KeywordModifier(self, self, new LocationCondition(Filters.or(Keyword.BATTLEGROUND, Keyword.UNDERGROUND)), Keyword.MUSTER, 1));
}
}

View File

@@ -1,44 +0,0 @@
package com.gempukku.lotro.cards.set11.dwarven;
import com.gempukku.lotro.logic.cardtype.AbstractCompanion;
import com.gempukku.lotro.logic.timing.TriggerConditions;
import com.gempukku.lotro.common.Culture;
import com.gempukku.lotro.common.Keyword;
import com.gempukku.lotro.common.Race;
import com.gempukku.lotro.game.PhysicalCard;
import com.gempukku.lotro.game.state.LotroGame;
import com.gempukku.lotro.logic.actions.OptionalTriggerAction;
import com.gempukku.lotro.logic.effects.DrawCardsEffect;
import com.gempukku.lotro.logic.timing.EffectResult;
import java.util.Collections;
import java.util.List;
/**
* Set: Shadows
* Side: Free
* Culture: Dwarven
* Twilight Cost: 2
* Type: Companion • Dwarf
* Strength: 6
* Vitality: 3
* Resistance: 7
* Game Text: Damage +1. Each time Gimli wins a skirmish, you may draw a card.
*/
public class Card11_008 extends AbstractCompanion {
public Card11_008() {
super(2, 6, 3, 7, Culture.DWARVEN, Race.DWARF, null, "Gimli", "Lively Combatant", true);
addKeyword(Keyword.DAMAGE, 1);
}
@Override
public List<OptionalTriggerAction> getOptionalAfterTriggers(String playerId, LotroGame game, EffectResult effectResult, PhysicalCard self) {
if (TriggerConditions.winsSkirmish(game, effectResult, self)) {
OptionalTriggerAction action = new OptionalTriggerAction(self);
action.appendEffect(
new DrawCardsEffect(action, playerId, 1));
return Collections.singletonList(action);
}
return null;
}
}

View File

@@ -1,59 +0,0 @@
package com.gempukku.lotro.cards.set11.dwarven;
import com.gempukku.lotro.common.*;
import com.gempukku.lotro.filters.Filters;
import com.gempukku.lotro.game.PhysicalCard;
import com.gempukku.lotro.game.state.LotroGame;
import com.gempukku.lotro.logic.actions.ActivateCardAction;
import com.gempukku.lotro.logic.cardtype.AbstractAttachableFPPossession;
import com.gempukku.lotro.logic.effects.ChooseAndWoundCharactersEffect;
import com.gempukku.lotro.logic.effects.choose.ChooseAndExertCharactersEffect;
import com.gempukku.lotro.logic.modifiers.KeywordModifier;
import com.gempukku.lotro.logic.modifiers.Modifier;
import com.gempukku.lotro.logic.timing.PlayConditions;
import java.util.Collections;
import java.util.List;
/**
* Set: Shadows
* Side: Free
* Culture: Dwarven
* Twilight Cost: 2
* Type: Possession • Hand Weapon
* Strength: +2
* Game Text: Bearer must be a Dwarf. Bearer gains muster. (At the start of the regroup phase, you may discard a card
* from hand to draw a card.) Skirmish: If bearer is Gimli and he is at a battleground site, exert him to wound a minion
* he is skirmishing.
*/
public class Card11_009 extends AbstractAttachableFPPossession {
public Card11_009() {
super(2, 2, 0, Culture.DWARVEN, PossessionClass.HAND_WEAPON, "Gimli's Battle Axe", "Vicious Weapon", true);
}
@Override
public Filterable getValidTargetFilter(String playerId, LotroGame game, PhysicalCard self) {
return Race.DWARF;
}
@Override
public List<? extends Modifier> getInPlayModifiers(LotroGame game, PhysicalCard self) {
return Collections.singletonList(
new KeywordModifier(self, Filters.hasAttached(self), Keyword.MUSTER));
}
@Override
public List<? extends ActivateCardAction> getPhaseActionsInPlay(String playerId, LotroGame game, PhysicalCard self) {
if (PlayConditions.canUseFPCardDuringPhase(game, Phase.SKIRMISH, self)
&& PlayConditions.canExert(self, game, Filters.hasAttached(self), Filters.gimli)
&& PlayConditions.location(game, Keyword.BATTLEGROUND)) {
ActivateCardAction action = new ActivateCardAction(self);
action.appendCost(
new ChooseAndExertCharactersEffect(action, playerId, 1, 1, Filters.hasAttached(self)));
action.appendEffect(
new ChooseAndWoundCharactersEffect(action, playerId, 1, 1, CardType.MINION, Filters.inSkirmishAgainst(Filters.hasAttached(self))));
return Collections.singletonList(action);
}
return null;
}
}

View File

@@ -1,53 +0,0 @@
package com.gempukku.lotro.cards.set11.dwarven;
import com.gempukku.lotro.common.CardType;
import com.gempukku.lotro.common.Culture;
import com.gempukku.lotro.common.Phase;
import com.gempukku.lotro.common.Race;
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.PreventableCardEffect;
import com.gempukku.lotro.logic.effects.choose.ChooseAndDiscardCardsFromPlayEffect;
import com.gempukku.lotro.logic.effects.choose.ChooseAndPreventCardEffect;
import com.gempukku.lotro.logic.timing.Effect;
import com.gempukku.lotro.logic.timing.PlayConditions;
import com.gempukku.lotro.logic.timing.TriggerConditions;
import java.util.Collections;
import java.util.List;
/**
* Set: Shadows
* Side: Free
* Culture: Dwarven
* Twilight Cost: 3
* Type: Companion • Dwarf
* Strength: 7
* Vitality: 3
* Resistance: 7
* Game Text: Response: If a [DWARVEN] companion is about to take a wound in a skirmish, discard 2 [DWARVEN] cards from
* play (except characters) to prevent that.
*/
public class Card11_010 extends AbstractCompanion {
public Card11_010() {
super(3, 7, 3, 7, Culture.DWARVEN, Race.DWARF, null, "Grimir", "Dwarven Emissary", true);
}
@Override
public List<? extends ActivateCardAction> getOptionalInPlayBeforeActions(String playerId, LotroGame game, Effect effect, PhysicalCard self) {
if (TriggerConditions.isGettingWounded(effect, game, Race.DWARF, CardType.COMPANION)
&& PlayConditions.isPhase(game, Phase.SKIRMISH)
&& PlayConditions.canDiscardFromPlay(self, game, 2, Culture.DWARVEN, Filters.not(Filters.character))) {
final ActivateCardAction action = new ActivateCardAction(self);
action.appendCost(
new ChooseAndDiscardCardsFromPlayEffect(action, playerId, 2, 2, Culture.DWARVEN, Filters.not(Filters.character)));
action.appendEffect(
new ChooseAndPreventCardEffect(self, (PreventableCardEffect) effect, playerId, "Choose a DWARVEN companion", Culture.DWARVEN, CardType.COMPANION));
return Collections.singletonList(action);
}
return null;
}
}

View File

@@ -1,54 +0,0 @@
package com.gempukku.lotro.cards.set11.dwarven;
import com.gempukku.lotro.logic.cardtype.AbstractPermanent;
import com.gempukku.lotro.logic.timing.PlayConditions;
import com.gempukku.lotro.logic.timing.TriggerConditions;
import com.gempukku.lotro.logic.effects.ExchangeCardsInHandWithStackedOnEffect;
import com.gempukku.lotro.logic.effects.StackTopCardsFromDeckEffect;
import com.gempukku.lotro.common.*;
import com.gempukku.lotro.game.PhysicalCard;
import com.gempukku.lotro.game.state.LotroGame;
import com.gempukku.lotro.logic.actions.OptionalTriggerAction;
import com.gempukku.lotro.logic.actions.RequiredTriggerAction;
import com.gempukku.lotro.logic.timing.EffectResult;
import java.util.Collections;
import java.util.List;
/**
* Set: Shadows
* Side: Free
* Culture: Dwarven
* Twilight Cost: 2
* Type: Condition • Support Area
* Game Text: When you play this condition, stack the top 8 cards of your draw deck here. At the start of your maneuver
* phase, you may spot a Dwarf to exchange the cards stacked here with your hand.
*/
public class Card11_011 extends AbstractPermanent {
public Card11_011() {
super(Side.FREE_PEOPLE, 2, CardType.CONDITION, Culture.DWARVEN, "Hall of Our Fathers", 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 StackTopCardsFromDeckEffect(self, self.getOwner(), 8, self));
return Collections.singletonList(action);
}
return null;
}
@Override
public List<OptionalTriggerAction> getOptionalAfterTriggers(String playerId, LotroGame game, EffectResult effectResult, PhysicalCard self) {
if (TriggerConditions.startOfPhase(game, effectResult, Phase.MANEUVER)
&& PlayConditions.canSpot(game, Race.DWARF)) {
OptionalTriggerAction action = new OptionalTriggerAction(self);
action.appendEffect(
new ExchangeCardsInHandWithStackedOnEffect(playerId, self, playerId, self));
return Collections.singletonList(action);
}
return null;
}
}

View File

@@ -1,38 +0,0 @@
package com.gempukku.lotro.cards.set11.dwarven;
import com.gempukku.lotro.common.*;
import com.gempukku.lotro.game.PhysicalCard;
import com.gempukku.lotro.game.state.LotroGame;
import com.gempukku.lotro.logic.cardtype.AbstractPermanent;
import com.gempukku.lotro.logic.modifiers.Modifier;
import com.gempukku.lotro.logic.modifiers.StrengthModifier;
import com.gempukku.lotro.logic.modifiers.condition.LocationCondition;
import com.gempukku.lotro.logic.timing.PlayConditions;
import java.util.Collections;
import java.util.List;
/**
* Set: Shadows
* Side: Free
* Culture: Dwarven
* Twilight Cost: 3
* Type: Condition • Support Area
* Game Text: To play, spot 2 Dwarf companions. While the fellowship is at a mountain site, each Dwarf is strength +2.
*/
public class Card11_012 extends AbstractPermanent {
public Card11_012() {
super(Side.FREE_PEOPLE, 3, CardType.CONDITION, Culture.DWARVEN, "Mountain Homestead");
}
@Override
public boolean checkPlayRequirements(LotroGame game, PhysicalCard self) {
return PlayConditions.canSpot(game, 2, Race.DWARF, CardType.COMPANION);
}
@Override
public List<? extends Modifier> getInPlayModifiers(LotroGame game, PhysicalCard self) {
return Collections.singletonList(
new StrengthModifier(self, Race.DWARF, new LocationCondition(Keyword.MOUNTAIN), 2));
}
}

View File

@@ -1,44 +0,0 @@
package com.gempukku.lotro.cards.set11.dwarven;
import com.gempukku.lotro.common.Culture;
import com.gempukku.lotro.common.Race;
import com.gempukku.lotro.common.Side;
import com.gempukku.lotro.filters.Filters;
import com.gempukku.lotro.game.PhysicalCard;
import com.gempukku.lotro.game.state.LotroGame;
import com.gempukku.lotro.logic.PlayUtils;
import com.gempukku.lotro.logic.actions.PlayEventAction;
import com.gempukku.lotro.logic.cardtype.AbstractResponseEvent;
import com.gempukku.lotro.logic.effects.PreventableCardEffect;
import com.gempukku.lotro.logic.effects.choose.ChooseAndPreventCardEffect;
import com.gempukku.lotro.logic.timing.Effect;
import com.gempukku.lotro.logic.timing.TriggerConditions;
import java.util.Collections;
import java.util.List;
/**
* Set: Shadows
* Side: Free
* Culture: Dwarven
* Twilight Cost: 1
* Type: Event • Response
* Game Text: If a Dwarf who has resistance 3 or more is about to take a wound, prevent that.
*/
public class Card11_013 extends AbstractResponseEvent {
public Card11_013() {
super(Side.FREE_PEOPLE, 1, Culture.DWARVEN, "On Guard");
}
@Override
public List<PlayEventAction> getPlayResponseEventBeforeActions(String playerId, LotroGame game, Effect effect, PhysicalCard self) {
if (TriggerConditions.isGettingWounded(effect, game, Race.DWARF, Filters.minResistance(3))
&& PlayUtils.checkPlayRequirements(game, self, Filters.any, 0, 0, false, false)) {
final PlayEventAction action = new PlayEventAction(self);
action.appendEffect(
new ChooseAndPreventCardEffect(self, (PreventableCardEffect) effect, playerId, "Choose a Dwarf", Race.DWARF, Filters.minResistance(3)));
return Collections.singletonList(action);
}
return null;
}
}

View File

@@ -1,56 +0,0 @@
package com.gempukku.lotro.cards.set11.dwarven;
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.AbstractEvent;
import com.gempukku.lotro.logic.effects.ChooseAndDiscardCardsFromHandEffect;
import com.gempukku.lotro.logic.effects.ChooseArbitraryCardsEffect;
import com.gempukku.lotro.logic.timing.ExtraFilters;
import com.gempukku.lotro.logic.timing.PlayConditions;
import java.util.Collection;
/**
* Set: Shadows
* Side: Free
* Culture: Dwarven
* Twilight Cost: 1
* Type: Event • Fellowship
* Game Text: Discard a [DWARVEN] card from hand to play a [DWARVEN] possession from your draw deck on a [DWARVEN]
* companion who has resistance 5 or more.
*/
public class Card11_014 extends AbstractEvent {
public Card11_014() {
super(Side.FREE_PEOPLE, 1, Culture.DWARVEN, "Well-equipped", Phase.FELLOWSHIP);
}
@Override
public boolean checkPlayRequirements(LotroGame game, PhysicalCard self) {
return PlayConditions.canDiscardCardsFromHandToPlay(self, game, self.getOwner(), 1, Culture.DWARVEN);
}
@Override
public PlayEventAction getPlayEventCardAction(final String playerId, LotroGame game, final PhysicalCard self) {
PlayEventAction action = new PlayEventAction(self);
action.appendCost(
new ChooseAndDiscardCardsFromHandEffect(action, playerId, false, 1, Culture.DWARVEN));
action.appendEffect(
new ChooseArbitraryCardsEffect(playerId, "Choose card to play", game.getGameState().getDeck(playerId), Filters.and(Culture.DWARVEN, CardType.POSSESSION, ExtraFilters.attachableTo(game, Culture.DWARVEN, CardType.COMPANION, Filters.minResistance(5))), 0, 1) {
@Override
protected void cardsSelected(LotroGame game, Collection<PhysicalCard> selectedCards) {
if (selectedCards.size() > 0) {
PhysicalCard selectedCard = selectedCards.iterator().next();
game.getActionsEnvironment().addActionToStack(PlayUtils.getPlayCardAction(game, selectedCard, 0, Filters.and(Culture.DWARVEN, CardType.COMPANION, Filters.minResistance(5)), false));
}
}
});
return action;
}
}

View File

@@ -157,7 +157,6 @@
player: you
forced: true
filter: all(any)
count: 1000
}
}
}

View File

@@ -121,7 +121,7 @@
effect: {
type: heal
filter: choose(hobbit,companion)
count: 1000
count: any
}
player: fp
}

View File

@@ -748,7 +748,7 @@
effect: [
{
type: putCardsFromHandOnBottomOfDeck
count: 1000
filter: all(any)
}
{
type: drawCards

View File

@@ -177,7 +177,7 @@
cost: {
type: discardFromHand
forced: false
count: 1000
filter: all(any)
}
effect: {
type: drawCards

View File

@@ -870,7 +870,7 @@
{
type: discardFromHand
forced: false
count: 1000
filter: all(any)
}
{
type: addBurdens

View File

@@ -104,7 +104,7 @@
effect: {
type: putCardsFromHandOnBottomOfDeck
player: free people
count: 1000
filter: all(any)
}
}
]

View File

@@ -23,18 +23,22 @@
type: Possession
strength: 2
itemclass: Hand weapon
#target: a Dwarf
/*requires: {
}
target: dwarf
effects: [
{
}
{
}
]*/
{
type: modifier
modifier: {
type: addKeyword
requires: {
type: location
filter: mountain
}
filter: bearer
keyword: damage
amount: 1
}
}
]
gametext: Bearer must be a Dwarf.<br>While bearer is at a mountain site, he is <b>damage +1</b>.
lore: The Dwarves led by Balin to the great Dwarf-hall of old, though ill-prepared, were well-armed.
promotext: ""
@@ -68,20 +72,27 @@
twilight: 0
type: Event
keywords: Skirmish
/*requires: {
}
*/
effects: {
type: event
cost: {
type: SendMessage
text: Placeholder effect for development.
},
effect: [
{
type: SendMessage
text: Placeholder effect for development.
type: modifyStrength
filter: choose(dwarf)
memorize: chosenDwarf
amount: {
type: forEachWound
filter: memory(chosenDwarf)
multiplier: 2
}
}
{
type: addKeyword
filter: memory(chosenDwarf)
keyword: damage
amount: {
type: forEachWound
filter: memory(chosenDwarf)
}
}
]
}
@@ -118,17 +129,34 @@
twilight: 0
type: Condition
keywords: Support Area
/*requires: {
}
effects: [
{
}
{
}
]*/
{
type: toPlay
requires:{
type: canSpot
filter: dwarf
}
}
{
type: modifier
modifier: {
type: addKeyword
filter: companion
keyword: damage
amount: 1
}
}
{
type: trigger
trigger: {
type: endOfTurn
}
effect: {
type: discard
filter: self
}
}
]
gametext: To play, spot a Dwarf.<br>Each companion is <b>damage +1</b>.<br>Discard this condition at the end of your turn.
lore: Glóin and his countrymen stood as reassurance that the Dwarves would also stand against the will of the Dark Lord.
promotext: ""
@@ -162,20 +190,27 @@
twilight: 1
type: Event
keywords: Skirmish
/*requires: {
}
*/
effects: {
type: event
cost: {
type: SendMessage
text: Placeholder effect for development.
},
cost: [
{
type: exert
filter: choose(ringBearer)
}
{
type: exert
filter: choose(dwarf)
memorize: exertedDwarf
}
]
effect: [
{
type: SendMessage
text: Placeholder effect for development.
type: modifyStrength
filter: memory(exertedDwarf)
amount: {
type: forEachResistance
filter: memory(exertedDwarf)
}
}
]
}
@@ -216,17 +251,20 @@
strength: 5
vitality: 3
resistance: 6
/*requires: {
}
effects: [
{
}
{
}
]*/
{
type: modifier
modifier: {
type: addKeyword
requires: {
type: location
filter: or(battleground,underground)
}
filter: self
keyword: muster
}
}
]
gametext: While Farin is at a battleground or underground site, he gains <b>muster</b>. <helper>(At the start of the regroup phase, you may discard a card from hand to draw a card.)</helper>
lore: If we make no answer, the Enemy may move Men of his rule to assail King Brand, and Dáin also.'
promotext: ""
@@ -265,17 +303,19 @@
vitality: 3
resistance: 7
keywords: Damage+1
/*requires: {
}
effects: [
{
}
{
}
]*/
{
type: trigger
optional: true
trigger: {
type: winsSkirmish
filter: self
}
effect: {
type: drawCards
}
}
]
gametext: <b>Damage +1</b>.<br>Each time Gimli wins a skirmish, you may draw a card.
lore: ...I am content. Till now I have hewn naught but wood since I left Moria.'
promotext: ""
@@ -311,18 +351,33 @@
type: Possession
strength: 2
itemclass: Hand weapon
#target: a Dwarf
/*requires: {
}
target: dwarf
effects: [
{
}
{
}
]*/
{
type: modifier
modifier: {
type: addKeyword
filter: bearer
keyword: muster
}
}
{
type: activated
phase: skirmish
requires: {
type: location
filter: battleground
}
cost: {
type: exert
filter: choose(bearer,name(Gimli))
}
effect: {
type: wound
filter: choose(minion,inSkirmishAgainst(bearer))
}
}
]
gametext: Bearer must be a Dwarf.<br>Bearer gains <b>muster</b>. <helper>(At the start of the regroup phase, you may discard a card from hand to draw a card.)</helper><br><b>Skirmish:</b> If bearer is Gimli and he is at a battleground site, exert him to wound a minion he is skirmishing.
lore: ""
promotext: ""
@@ -360,17 +415,28 @@
strength: 7
vitality: 3
resistance: 7
/*requires: {
}
effects: [
{
}
{
}
]*/
{
type: activatedTrigger
trigger: {
type: aboutToTakeWound
filter: culture(dwarven),companion
}
requires: {
type: phase
phase: skirmish
}
cost: {
type: discard
filter: choose(culture(dwarven),not(character))
count: 2
}
effect: {
type: preventWound
filter: choose(culture(dwarven),companion)
}
}
]
gametext: <b>Response:</b> If a [dwarven] companion is about to take a wound in a skirmish, discard 2 [dwarven] cards from play (except characters) to prevent that.
lore: ...we crave the advice of Elrond. For the Shadow grows and draws nearer.'
promotext: ""
@@ -404,17 +470,37 @@
twilight: 2
type: Condition
keywords: Support Area
/*requires: {
}
effects: [
{
}
{
}
]*/
{
type: trigger
trigger: {
type: played
filter: self
}
effect: {
type: stackTopCardsOfDrawDeck
where: self
count: 8
}
}
{
type: trigger
optional: true
trigger: {
type: startOfPhase
phase: maneuver
}
requires: {
type: canSpot
filter: dwarf
}
effect: {
type: exchangeCardsInHandWithCardsStacked
filterInHand: all(any)
filterInStacked: self
}
}
]
gametext: When you play this condition, stack the top 8 cards of your draw deck here.<br>At the start of your maneuver phase, you may spot a Dwarf to exchange the cards stacked here with your hand.
lore: ...at last we had the power and numbers to return.'
promotext: ""
@@ -448,17 +534,28 @@
twilight: 3
type: Condition
keywords: Support Area
/*requires: {
}
effects: [
{
}
{
}
]*/
{
type: toPlay
requires: {
type: canSpot
filter: dwarf,companion
count: 2
}
}
{
type: modifier
modifier: {
type: modifyStrength
requires: {
type: location
filter: mountain
}
filter: dwarf
amount: 2
}
}
]
gametext: To play, spot 2 Dwarf companions.<br>While the fellowship is at a mountain site, each Dwarf is strength +2.
lore: The Dwarves are as hard and stalwart as the lands in which they've made their homes.
promotext: ""
@@ -492,26 +589,19 @@
twilight: 1
type: Event
keywords: Response
/*requires: {
}
*/
effects: {
type: responseEvent
trigger: {
}
cost: {
type: SendMessage
text: Placeholder effect for development.
type: aboutToTakeWound
filter: dwarf,resistanceMoreThan(2)
}
effect: [
{
type: SendMessage
text: Placeholder effect for development.
type: preventWound
filter: choose(dwarf,resistanceMoreThan(2))
}
]
]
}
gametext: If a Dwarf who has resistance 3 or more is about to take a wound, prevent that.
lore: Well, here's one Dwarf she won't ensnare so easily.'
promotext: ""
@@ -545,20 +635,18 @@
twilight: 1
type: Event
keywords: Fellowship
/*requires: {
}
*/
effects: {
type: event
cost: {
type: SendMessage
text: Placeholder effect for development.
type: discardFromHand
forced: false
filter: choose(culture(dwarven))
},
effect: [
{
type: SendMessage
text: Placeholder effect for development.
type: playCardFromDrawDeck
filter: choose(culture(dwarven),possession)
on: culture(dwarven),companion,resistanceMoreThan(4)
}
]
}

View File

@@ -42,9 +42,8 @@
{
type: addModifier
modifier: {
type: CantBeOverwhelmedMultiplier
type: CantBeOverwhelmed
filter: InSkirmish
multiplier: 100
}
}
]

View File

@@ -69,6 +69,7 @@ public class EffectAppenderFactory {
effectAppenderProducers.put("endphase", new EndPhase());
effectAppenderProducers.put("exchangecardsinhandwithcardsindeadpile", new ExchangeCardsInHandWithCardsInDeadPile());
effectAppenderProducers.put("exchangecardsinhandwithcardsindiscard", new ExchangeCardsInHandWithCardsInDiscard());
effectAppenderProducers.put("exchangecardsinhandwithcardsstacked", new ExchangeCardsInHandWithCardsStacked());
effectAppenderProducers.put("exert", new Exert());
effectAppenderProducers.put("exhaust", new Exhaust());
effectAppenderProducers.put("filtercardsinmemory", new FilterCardsInMemory());

View File

@@ -0,0 +1,80 @@
package com.gempukku.lotro.cards.build.field.effect.appender;
import com.gempukku.lotro.cards.build.ActionContext;
import com.gempukku.lotro.cards.build.CardGenerationEnvironment;
import com.gempukku.lotro.cards.build.InvalidCardDefinitionException;
import com.gempukku.lotro.cards.build.ValueSource;
import com.gempukku.lotro.cards.build.field.FieldUtils;
import com.gempukku.lotro.cards.build.field.effect.EffectAppender;
import com.gempukku.lotro.cards.build.field.effect.EffectAppenderProducer;
import com.gempukku.lotro.cards.build.field.effect.appender.resolver.CardResolver;
import com.gempukku.lotro.cards.build.field.effect.appender.resolver.ValueResolver;
import com.gempukku.lotro.common.Zone;
import com.gempukku.lotro.game.PhysicalCard;
import com.gempukku.lotro.game.state.LotroGame;
import com.gempukku.lotro.logic.GameUtils;
import com.gempukku.lotro.logic.actions.CostToEffectAction;
import com.gempukku.lotro.logic.timing.AbstractEffect;
import com.gempukku.lotro.logic.timing.Effect;
import org.json.simple.JSONObject;
import java.util.Collection;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
public class ExchangeCardsInHandWithCardsStacked implements EffectAppenderProducer {
@Override
public EffectAppender createEffectAppender(JSONObject effectObject, CardGenerationEnvironment environment) throws InvalidCardDefinitionException {
FieldUtils.validateAllowedFields(effectObject, "filterInHand", "filterInStacked", "countInHand", "countInStacked");
final String filterHand = FieldUtils.getString(effectObject.get("filterInHand"), "filterInHand");
final ValueSource countHand = ValueResolver.resolveEvaluator(effectObject.get("countInHand"), 1, environment);
final String filterStacked = FieldUtils.getString(effectObject.get("filterInStacked"), "filterInDiscard");
final ValueSource stackedCardCount = ValueResolver.resolveEvaluator("1", environment);
MultiEffectAppender result = new MultiEffectAppender();
result.addEffectAppender(
CardResolver.resolveCardsInHand(filterHand, countHand, "_tempHand", "you", "you", "Choose cards to exchange in hand", environment));
result.addEffectAppender(
CardResolver.resolveCards(filterStacked, stackedCardCount, "_tempStacked", "you", "Choose card to exchange stacked cards from", environment));
result.addEffectAppender(
new DelayedAppender() {
@Override
protected Effect createEffect(boolean cost, CostToEffectAction action, ActionContext actionContext) {
String performingPlayer = actionContext.getPerformingPlayer();
Collection<? extends PhysicalCard> handCards = actionContext.getCardsFromMemory("_tempHand");
PhysicalCard stackedCard = actionContext.getCardFromMemory("_tempStacked");
if (stackedCard == null)
return null;
List<PhysicalCard> stackedCards = actionContext.getGame().getGameState().getStackedCards(stackedCard);
return new AbstractEffect() {
@Override
protected FullEffectResult playEffectReturningResult(LotroGame game) {
Set<PhysicalCard> cardsToRemove = new HashSet<>();
cardsToRemove.addAll(handCards);
cardsToRemove.addAll(stackedCards);
game.getGameState().sendMessage(performingPlayer + " exchanges " + GameUtils.getAppendedNames(stackedCards) + " from stacked with " + GameUtils.getAppendedNames(handCards) + " in hand");
game.getGameState().removeCardsFromZone(performingPlayer, cardsToRemove);
for (PhysicalCard stackedCard : stackedCards) {
game.getGameState().addCardToZone(game, stackedCard, Zone.HAND);
}
for (PhysicalCard handCard : handCards) {
game.getGameState().stackCard(game, handCard, stackedCard);
}
return null;
}
@Override
public boolean isPlayableInFull(LotroGame game) {
return true;
}
};
}
});
return result;
}
}

View File

@@ -383,6 +383,31 @@ public class ValueResolver {
});
}
};
} else if (type.equalsIgnoreCase("forEachResistance")) {
FieldUtils.validateAllowedFields(object, "multiplier", "over", "filter");
final int multiplier = FieldUtils.getInteger(object.get("multiplier"), "multiplier", 1);
final int over = FieldUtils.getInteger(object.get("over"), "over", 0);
final String filter = FieldUtils.getString(object.get("filter"), "filter", "any");
final FilterableSource resistanceSource = environment.getFilterFactory().generateFilter(filter, environment);
return (actionContext) -> {
if (filter.equals("any")) {
return new MultiplyEvaluator(multiplier,
(game, cardAffected) -> Math.max(0, game.getModifiersQuerying().getResistance(game, cardAffected) - over));
} else {
return new MultiplyEvaluator(multiplier,
(game, cardAffected) -> {
final Filterable filterable = resistanceSource.getFilterable(actionContext);
int resistance = 0;
for (PhysicalCard physicalCard : Filters.filterActive(game, filterable)) {
resistance += game.getModifiersQuerying().getResistance(game, physicalCard);
}
return Math.max(0, resistance - over);
});
}
};
} else if (type.equalsIgnoreCase("forEachVitality")) {
FieldUtils.validateAllowedFields(object, "multiplier", "over", "filter");
final int multiplier = FieldUtils.getInteger(object.get("multiplier"), "multiplier", 1);