Migrated Dwarven cards in set 13 to hjson

This commit is contained in:
MarcinSc
2024-05-20 15:32:16 +07:00
parent 004564f575
commit ee43e52653
13 changed files with 348 additions and 497 deletions

View File

@@ -1,74 +0,0 @@
package com.gempukku.lotro.cards.set13.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.actions.OptionalTriggerAction;
import com.gempukku.lotro.logic.cardtype.AbstractAttachableFPPossession;
import com.gempukku.lotro.logic.effects.PreventCardEffect;
import com.gempukku.lotro.logic.effects.PreventableCardEffect;
import com.gempukku.lotro.logic.effects.ReinforceTokenEffect;
import com.gempukku.lotro.logic.effects.choose.ChooseAndRemoveCultureTokensFromCardEffect;
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: Bloodlines
* Side: Free
* Culture: Dwarven
* Twilight Cost: 1
* Type: Possession • Mount
* Resistance: +1
* Game Text: Bearer must be a Dwarf. When you play Arod, you may reinforce a [DWARVEN] token. Response: If bearer is
* about to take a wound during a skirmish, remove 2 [DWARVEN] tokens to prevent that.
*/
public class Card13_001 extends AbstractAttachableFPPossession {
public Card13_001() {
super(1, 0, 0, Culture.DWARVEN, PossessionClass.MOUNT, "Arod", "Rohirrim Steed", true);
}
@Override
public Filterable getValidTargetFilter(String playerId, LotroGame game, PhysicalCard self) {
return Race.DWARF;
}
@Override
public int getResistance() {
return 1;
}
@Override
public List<OptionalTriggerAction> getOptionalAfterTriggers(String playerId, LotroGame game, EffectResult effectResult, PhysicalCard self) {
if (TriggerConditions.played(game, effectResult, self)) {
OptionalTriggerAction action = new OptionalTriggerAction(self);
action.appendEffect(
new ReinforceTokenEffect(self, playerId, Token.DWARVEN));
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, self.getAttachedTo())
&& PlayConditions.isPhase(game, Phase.SKIRMISH)
&& PlayConditions.canRemoveTokensFromAnything(game, Token.DWARVEN, 2)) {
ActivateCardAction action = new ActivateCardAction(self);
action.appendCost(
new ChooseAndRemoveCultureTokensFromCardEffect(self, playerId, Token.DWARVEN, 1, Filters.any));
action.appendCost(
new ChooseAndRemoveCultureTokensFromCardEffect(self, playerId, Token.DWARVEN, 1, Filters.any));
action.appendEffect(
new PreventCardEffect((PreventableCardEffect) effect, self.getAttachedTo()));
return Collections.singletonList(action);
}
return null;
}
}

View File

@@ -1,47 +0,0 @@
package com.gempukku.lotro.cards.set13.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.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;
import com.gempukku.lotro.logic.timing.PlayConditions;
/**
* Set: Bloodlines
* Side: Free
* Culture: Dwarven
* Twilight Cost: 1
* Type: Event • Skirmish
* Game Text: Make a Dwarf strength +3 (or +4 and damage +1 if you can spot a [DWARVEN] token).
*/
public class Card13_002 extends AbstractEvent {
public Card13_002() {
super(Side.FREE_PEOPLE, 1, Culture.DWARVEN, "Awkward Moment", 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) {
boolean canSpotCultureToken = PlayConditions.canSpot(game, Filters.hasToken(Token.DWARVEN));
action.appendEffect(
new AddUntilEndOfPhaseModifierEffect(
new StrengthModifier(self, card, canSpotCultureToken ? 4 : 3)));
if (canSpotCultureToken)
action.appendEffect(
new AddUntilEndOfPhaseModifierEffect(
new KeywordModifier(self, card, Keyword.DAMAGE, 1)));
}
});
return action;
}
}

View File

@@ -1,67 +0,0 @@
package com.gempukku.lotro.cards.set13.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.actions.RequiredTriggerAction;
import com.gempukku.lotro.logic.cardtype.AbstractPermanent;
import com.gempukku.lotro.logic.effects.AddTwilightEffect;
import com.gempukku.lotro.logic.effects.ChooseAndWoundCharactersEffect;
import com.gempukku.lotro.logic.effects.SelfDiscardEffect;
import com.gempukku.lotro.logic.effects.choose.ChooseAndExertCharactersEffect;
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: Bloodlines
* Side: Free
* Culture: Dwarven
* Twilight Cost: 0
* Type: Condition • Support Area
* Game Text: Each time the fellowship moves, add (2). Skirmish: Exert a Dwarf who is not assigned to a skirmish
* to wound 2 Orcs (or to wound 1 Orc twice). Discard this from play if the fellowship is ahead on the adventure path.
*/
public class Card13_003 extends AbstractPermanent {
public Card13_003() {
super(Side.FREE_PEOPLE, 0, CardType.CONDITION, Culture.DWARVEN, "Deep Hatred");
}
@Override
public List<RequiredTriggerAction> getRequiredAfterTriggers(LotroGame game, EffectResult effectResult, PhysicalCard self) {
if (PlayConditions.isAhead(game)) {
RequiredTriggerAction action = new RequiredTriggerAction(self);
action.appendEffect(
new SelfDiscardEffect(self));
return Collections.singletonList(action);
}
if (TriggerConditions.moves(game, effectResult)) {
RequiredTriggerAction action = new RequiredTriggerAction(self);
action.appendEffect(
new AddTwilightEffect(self, 2));
return Collections.singletonList(action);
}
return null;
}
@Override
public List<? extends ActivateCardAction> getPhaseActionsInPlay(String playerId, LotroGame game, PhysicalCard self) {
if (PlayConditions.canUseFPCardDuringPhase(game, Phase.SKIRMISH, self)
&& PlayConditions.canExert(self, game, Race.DWARF, Filters.notAssignedToSkirmish)) {
ActivateCardAction action = new ActivateCardAction(self);
action.appendCost(
new ChooseAndExertCharactersEffect(action, playerId, 1, 1, Race.DWARF, Filters.notAssignedToSkirmish));
action.appendEffect(
new ChooseAndWoundCharactersEffect(action, playerId, 1, 1, Race.ORC));
action.appendEffect(
new ChooseAndWoundCharactersEffect(action, playerId, 1, 1, Race.ORC));
return Collections.singletonList(action);
}
return null;
}
}

View File

@@ -1,54 +0,0 @@
package com.gempukku.lotro.cards.set13.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.PlayEventAction;
import com.gempukku.lotro.logic.cardtype.AbstractEvent;
import com.gempukku.lotro.logic.effects.RemovePlayedEventFromGameEffect;
import com.gempukku.lotro.logic.effects.choose.ChooseAndAddUntilEOPStrengthBonusEffect;
import com.gempukku.lotro.logic.effects.choose.ChooseAndRemoveFromTheGameCardsInDiscardEffect;
import com.gempukku.lotro.logic.timing.Action;
import com.gempukku.lotro.logic.timing.PlayConditions;
import java.util.Collections;
import java.util.List;
/**
* Set: Bloodlines
* Side: Free
* Culture: Dwarven
* Twilight Cost: 2
* Type: Event • Skirmish
* Game Text: You may remove from the game 4 other [DWARVEN] cards in your discard pile to play this event from your
* discard pile. Then remove this event from the game. Make your Dwarf bearing a hand weapon strength +3.
*/
public class Card13_004 extends AbstractEvent {
public Card13_004() {
super(Side.FREE_PEOPLE, 2, Culture.DWARVEN, "Dwarf-lords", Phase.SKIRMISH);
}
@Override
public PlayEventAction getPlayEventCardAction(String playerId, LotroGame game, PhysicalCard self) {
PlayEventAction action = new PlayEventAction(self);
action.appendEffect(
new ChooseAndAddUntilEOPStrengthBonusEffect(action, self, playerId, 3, Filters.owner(playerId), Race.DWARF, Filters.hasAttached(PossessionClass.HAND_WEAPON)));
return action;
}
@Override
public List<? extends Action> getPhaseActionsFromDiscard(String playerId, LotroGame game, PhysicalCard self) {
if (PlayConditions.isPhase(game, Phase.SKIRMISH)
&& PlayConditions.canPlayFromDiscard(playerId, game, self)
&& PlayConditions.canRemoveFromDiscardToPlay(self, game, playerId, 4, Culture.DWARVEN)) {
final PlayEventAction action = getPlayEventCardAction(playerId, game, self);
action.appendCost(
new ChooseAndRemoveFromTheGameCardsInDiscardEffect(action, self, playerId, 4, 4, Culture.DWARVEN));
action.appendEffect(
new RemovePlayedEventFromGameEffect(action));
return Collections.singletonList(action);
}
return null;
}
}

View File

@@ -1,65 +0,0 @@
package com.gempukku.lotro.cards.set13.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.AbstractCompanion;
import com.gempukku.lotro.logic.effects.AddUntilStartOfPhaseModifierEffect;
import com.gempukku.lotro.logic.effects.ChooseActiveCardEffect;
import com.gempukku.lotro.logic.effects.SelfExertEffect;
import com.gempukku.lotro.logic.modifiers.Modifier;
import com.gempukku.lotro.logic.modifiers.RemoveKeywordModifier;
import com.gempukku.lotro.logic.modifiers.StrengthModifier;
import com.gempukku.lotro.logic.modifiers.evaluator.CountActiveEvaluator;
import com.gempukku.lotro.logic.timing.PlayConditions;
import java.util.Collections;
import java.util.List;
/**
* Set: Bloodlines
* Side: Free
* Culture: Dwarven
* Twilight Cost: 2
* Type: Companion • Dwarf
* Strength: 6
* Vitality: 3
* Resistance: 6
* Game Text: Damage +1. Gimli is strength +1 for each minion assigned to a skirmish. Assignment: Exert Gimli and spot
* a lurker minion to make that minion lose lurker until the regroup phase.
*/
public class Card13_005 extends AbstractCompanion {
public Card13_005() {
super(2, 6, 3, 6, Culture.DWARVEN, Race.DWARF, null, "Gimli", "Lord of the Glittering Caves", true);
addKeyword(Keyword.DAMAGE, 1);
}
@Override
public List<? extends Modifier> getInPlayModifiers(LotroGame game, PhysicalCard self) {
return Collections.singletonList(new StrengthModifier(self, self, null, new CountActiveEvaluator(CardType.MINION, Filters.assignedToSkirmish)));
}
@Override
public List<? extends ActivateCardAction> getPhaseActionsInPlay(String playerId, LotroGame game, final PhysicalCard self) {
if (PlayConditions.canUseFPCardDuringPhase(game, Phase.ASSIGNMENT, self)
&& PlayConditions.canSelfExert(self, game)
&& PlayConditions.canSpot(game, CardType.MINION, Keyword.LURKER)) {
final ActivateCardAction action = new ActivateCardAction(self);
action.appendCost(
new SelfExertEffect(action, self));
action.appendEffect(
new ChooseActiveCardEffect(self, playerId, "Choose a lurker minion", CardType.MINION, Keyword.LURKER) {
@Override
protected void cardSelected(LotroGame game, PhysicalCard card) {
action.appendEffect(
new AddUntilStartOfPhaseModifierEffect(
new RemoveKeywordModifier(self, card, Keyword.LURKER), Phase.REGROUP));
}
});
return Collections.singletonList(action);
}
return null;
}
}

View File

@@ -1,50 +0,0 @@
package com.gempukku.lotro.cards.set13.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.PlayUtils;
import com.gempukku.lotro.logic.actions.PlayEventAction;
import com.gempukku.lotro.logic.cardtype.AbstractResponseEvent;
import com.gempukku.lotro.logic.effects.OptionalEffect;
import com.gempukku.lotro.logic.effects.ReinforceTokenEffect;
import com.gempukku.lotro.logic.effects.choose.ChooseAndPlayCardFromDiscardEffect;
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: Bloodlines
* Side: Free
* Culture: Dwarven
* Twilight Cost: 1
* Type: Event • Response
* Game Text: If a Dwarf wins a fierce skirmish, play a [DWARVEN] possession from your discard pile and you may
* reinforce a [DWARVEN] token.
*/
public class Card13_006 extends AbstractResponseEvent {
public Card13_006() {
super(Side.FREE_PEOPLE, 1, Culture.DWARVEN, "Honoring His Kinfolk");
}
@Override
public List<PlayEventAction> getPlayResponseEventAfterActions(String playerId, LotroGame game, EffectResult effectResult, PhysicalCard self) {
if (TriggerConditions.winsSkirmish(game, effectResult, Race.DWARF)
&& PlayUtils.checkPlayRequirements(game, self, Filters.any, 0, 0, false, false)
&& game.getGameState().isFierceSkirmishes()
&& PlayConditions.canPlayFromDiscard(playerId, game, Culture.DWARVEN, CardType.POSSESSION)) {
PlayEventAction action = new PlayEventAction(self);
action.appendEffect(
new ChooseAndPlayCardFromDiscardEffect(playerId, game, Culture.DWARVEN, CardType.POSSESSION));
action.appendEffect(
new OptionalEffect(action, playerId,
new ReinforceTokenEffect(self, playerId, Token.DWARVEN)));
return Collections.singletonList(action);
}
return null;
}
}

View File

@@ -1,40 +0,0 @@
package com.gempukku.lotro.cards.set13.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.PlayEventAction;
import com.gempukku.lotro.logic.cardtype.AbstractEvent;
import com.gempukku.lotro.logic.effects.ChooseAndHealCharactersEffect;
import com.gempukku.lotro.logic.effects.choose.ChooseAndRemoveCultureTokensFromCardEffect;
import com.gempukku.lotro.logic.timing.PlayConditions;
/**
* Set: Bloodlines
* Side: Free
* Culture: Dwarven
* Twilight Cost: 1
* Type: Event • Maneuver
* Game Text: Remove a [DWARVEN] token to heal a Dwarf.
*/
public class Card13_007 extends AbstractEvent {
public Card13_007() {
super(Side.FREE_PEOPLE, 1, Culture.DWARVEN, "Sorrow Shared", Phase.MANEUVER);
}
@Override
public boolean checkPlayRequirements(LotroGame game, PhysicalCard self) {
return PlayConditions.canRemoveTokens(game, Token.DWARVEN, 1, Filters.any);
}
@Override
public PlayEventAction getPlayEventCardAction(String playerId, LotroGame game, PhysicalCard self) {
PlayEventAction action = new PlayEventAction(self);
action.appendCost(
new ChooseAndRemoveCultureTokensFromCardEffect(self, playerId, Token.DWARVEN, 1, Filters.any));
action.appendEffect(
new ChooseAndHealCharactersEffect(action, playerId, 1, 1, Race.DWARF));
return action;
}
}

View File

@@ -1,81 +0,0 @@
package com.gempukku.lotro.cards.set13.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.actions.RequiredTriggerAction;
import com.gempukku.lotro.logic.cardtype.AbstractPermanent;
import com.gempukku.lotro.logic.effects.*;
import com.gempukku.lotro.logic.effects.choose.ChooseOpponentEffect;
import com.gempukku.lotro.logic.modifiers.AbstractExtraPlayCostModifier;
import com.gempukku.lotro.logic.modifiers.cost.ExertExtraPlayCostModifier;
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.LinkedList;
import java.util.List;
/**
* Set: Bloodlines
* Side: Free
* Culture: Dwarven
* Twilight Cost: 2
* Type: Condition • Support Area
* Game Text: To play, exert 2 Dwarves. When you play this, add a [DWARVEN] token here for each mountain site and each
* underground site on the adventure path. Skirmish: Discard this from play or remove 2 tokens from here to make
* a Shadow player discard the top card of his or her draw deck.
*/
public class Card13_008 extends AbstractPermanent {
public Card13_008() {
super(Side.FREE_PEOPLE, 2, CardType.CONDITION, Culture.DWARVEN, "Subterranean Homestead", null, true);
}
@Override
public List<? extends AbstractExtraPlayCostModifier> getExtraCostToPlay(LotroGame game, PhysicalCard self) {
return Collections.singletonList(
new ExertExtraPlayCostModifier(self, self, null, 2, Race.DWARF));
}
@Override
public List<RequiredTriggerAction> getRequiredAfterTriggers(LotroGame game, EffectResult effectResult, PhysicalCard self) {
if (TriggerConditions.played(game, effectResult, self)) {
RequiredTriggerAction action = new RequiredTriggerAction(self);
int count = Filters.countActive(game, CardType.SITE, Zone.ADVENTURE_PATH, Filters.or(Keyword.MOUNTAIN, Keyword.UNDERGROUND));
if (count > 0)
action.appendEffect(
new AddTokenEffect(self, self, Token.DWARVEN, count));
return Collections.singletonList(action);
}
return null;
}
@Override
public List<? extends ActivateCardAction> getPhaseActionsInPlay(String playerId, LotroGame game, final PhysicalCard self) {
if (PlayConditions.canUseFPCardDuringPhase(game, Phase.SKIRMISH, self)
&& (PlayConditions.canRemoveTokens(game, self, Token.DWARVEN, 2) || PlayConditions.canSelfDiscard(self, game))) {
final ActivateCardAction action = new ActivateCardAction(self);
List<Effect> possibleCosts = new LinkedList<>();
possibleCosts.add(
new RemoveTokenEffect(self, self, Token.DWARVEN, 2));
possibleCosts.add(
new SelfDiscardEffect(self));
action.appendCost(
new ChoiceEffect(action, playerId, possibleCosts));
action.appendEffect(
new ChooseOpponentEffect(playerId) {
@Override
protected void opponentChosen(String opponentId) {
action.appendEffect(
new DiscardTopCardFromDeckEffect(self, opponentId, true));
}
});
return Collections.singletonList(action);
}
return null;
}
}

View File

@@ -24,8 +24,40 @@
type: Possession
resistance: 1
itemclass: Mount
#target: a Dwarf
target: dwarf
effects: [
{
type: trigger
optional: true
trigger: {
type: played
filter: self
}
effect: {
type: reinforceTokens
culture: dwarven
}
}
{
type: activatedTrigger
trigger: {
type: aboutToTakeWound
filter: bearer
}
requires: {
type: phase
phase: skirmish
}
cost: {
type: removeTokensCumulative
count: 2
culture: dwarven
}
effect: {
type: preventWound
filter: choose(bearer)
}
}
]
gametext: Bearer must be a Dwarf.<br>When you play Arod, you may reinforce a [dwarven] token.<br><b>Response:</b> If bearer is about to take a wound during a skirmish, remove 2 [dwarven] tokens to prevent that.
lore: A smaller and lighter horse, but restive and fiery....
@@ -60,13 +92,35 @@
twilight: 1
type: Event
keywords: Skirmish
effects: {
type: event
cost: {
},
effect: [
{
type: modifyStrength
filter: choose(dwarf)
memorize: chosenDwarf
amount: {
type: condition
condition: {
type: canSpotCultureTokens
culture: dwarven
}
true: 4
false: 3
}
}
{
type: conditional
requires: {
type: canSpotCultureTokens
culture: dwarven
}
effect: {
type: addKeyword
filter: memory(chosenDwarf)
keyword: damage
amount: 1
}
}
]
}
@@ -104,6 +158,56 @@
type: Condition
keywords: Support Area
effects: [
{
type: trigger
trigger: {
type: moves
}
effect: {
type: addTwilight
amount: 2
}
}
{
type: activated
phase: skirmish
cost: {
type: exert
filter: choose(dwarf,notAssignedToSkirmish)
}
effect: {
type: choice
texts: [
Wound 2 Orcs
Wound 1 Orc twice
]
effects: [
{
type: wound
filter: choose(orc)
count: 2
}
{
type: wound
filter: choose(orc)
times: 2
}
]
}
}
{
type: trigger
trigger: {
type: constantlyCheck
}
requires: {
type: isAhead
}
effect: {
type: discard
filter: self
}
}
]
gametext: Each time the fellowship moves, add (2).<br><b>Skirmish:</b> Exert a Dwarf who is not assigned to a skirmish to wound 2 Orcs (or to wound 1 Orc twice).<br>Discard this from play if the fellowship is ahead on the adventure path.
lore: ...the War of the Dwarves and the Orcs....
@@ -138,16 +242,36 @@
twilight: 2
type: Event
keywords: Skirmish
effects: {
type: event
cost: {
},
effect: [
{
}
]
}
effects: [
{
type: activatedInDiscard
phase: skirmish
cost: {
type: removeCardsInDiscardFromGame
filter: choose(other,culture(dwarven))
count: 4
}
effect:
{
type: playCardFromDiscard
filter: self
extraEffects: {
type: removeFromTheGame
filter: self
}
}
}
{
type: event
effect: [
{
type: modifyStrength
filter: choose(dwarf,hasAttached(hand weapon))
amount: 3
}
]
}
]
gametext: You may remove from the game 4 other [dwarven] cards in your discard pile to play this event from your discard pile. Then remove this event from the game.<br>Make your Dwarf bearing a hand weapon strength +3.
lore: ...Seven for the Dwarf-lords in their halls of stone....
promotext: ""
@@ -187,6 +311,37 @@
resistance: 6
keywords: Damage+1
effects: [
{
type: modifier
modifier: {
type: modifyStrength
filter: self
amount: {
type: forEachYouCanSpot
filter: minion,assignedToSkirmish(any)
}
}
}
{
type: activated
phase: assignment
cost: [
{
type: exert
filter: self
}
{
type: spot
filter: choose(minion,lurker)
memorize: spottedLurker
}
]
effect: {
type: removeKeyword
filter: memory(spottedLurker)
until: regroup
}
}
]
gametext: <b>Damage +1</b>.<br>Gimli is strength +1 for each minion assigned to a skirmish.<br><b>Assignment:</b> Exert Gimli and spot a lurker minion to make that minion lose <b>lurker</b> until the regroup phase.
lore: <span style="word-spacing:-0.01em;font-size:97%">"He and his people did great works in Gondor and Rohan."</span>
@@ -221,19 +376,30 @@
twilight: 1
type: Event
keywords: Response
effects: {
type: responseEvent
trigger: {
type: winsSkirmish
filter: dwarf
}
cost: {
requires: {
type: fierceSkirmish
}
effect: [
{
type: playCardFromDiscard
filter: choose(culture(dwarven),possession)
}
{
type: optional
text: Would you like to reinforce {dwarven} token
effect: {
type: reinforceTokens
culture: dwarven
}
}
]
]
}
gametext: If a Dwarf wins a fierce skirmish, play a [dwarven] possession from your discard pile and you may reinforce a [dwarven] token.
lore: ...but Gimli had to be dragged away by Legolas....
promotext: ""
@@ -267,13 +433,17 @@
twilight: 1
type: Event
keywords: Maneuver
effects: {
type: event
cost: {
type: removeTokens
culture: dwarven
filter: choose(any)
},
effect: [
{
type: heal
filter: choose(dwarf)
}
]
}
@@ -311,6 +481,58 @@
type: Condition
keywords: Support Area
effects: [
{
type: extraCost
cost: {
type: exert
filter: choose(dwarf)
count: 2
}
}
{
type: trigger
trigger: {
type: played
filter: self
}
effect: {
type: addTokens
culture: dwarven
filter: self
count: {
type: forEachYouCanSpot
filter: or(mountain,underground),zone(adventure path)
}
}
}
{
type: activated
phase: skirmish
cost: {
type: choice
texts: [
Discard this from play
Remove 2 tokens from here
]
effects: [
{
type: discard
filter: self
}
{
type: removeTokens
culture: dwarven
count: 2
filter: self
}
]
}
effect: {
type: discardTopCardsFromDeck
forced: true
deck: shadow
}
}
]
gametext: To play, exert 2 Dwarves.<br>When you play this, add a [dwarven] token here for each mountain site and each underground site on the adventure path.<br><b>Skirmish:</b> Discard this from play or remove 2 tokens from here to make a Shadow player discard the top card of his or her draw deck.
lore: ""

View File

@@ -151,6 +151,7 @@ public class EffectAppenderFactory {
effectAppenderProducers.put("removetext", new RemoveText());
effectAppenderProducers.put("removethreats", new RemoveThreats());
effectAppenderProducers.put("removetokens", new RemoveTokens());
effectAppenderProducers.put("removetokenscumulative", new RemoveTokensCumulative());
effectAppenderProducers.put("removetwilight", new RemoveTwilight());
effectAppenderProducers.put("reordertopcardsofdrawdeck", new ReorderTopCardsOfDrawDeck());
effectAppenderProducers.put("repeat", new Repeat());

View File

@@ -0,0 +1,88 @@
package com.gempukku.lotro.cards.build.field.effect.appender;
import com.gempukku.lotro.cards.build.ActionContext;
import com.gempukku.lotro.cards.build.CardGenerationEnvironment;
import com.gempukku.lotro.cards.build.FilterableSource;
import com.gempukku.lotro.cards.build.InvalidCardDefinitionException;
import com.gempukku.lotro.cards.build.field.FieldUtils;
import com.gempukku.lotro.cards.build.field.effect.EffectAppender;
import com.gempukku.lotro.cards.build.field.effect.EffectAppenderProducer;
import com.gempukku.lotro.cards.build.field.effect.appender.resolver.CardResolver;
import com.gempukku.lotro.common.Culture;
import com.gempukku.lotro.common.Token;
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.CostToEffectAction;
import com.gempukku.lotro.logic.actions.SubAction;
import com.gempukku.lotro.logic.effects.RemoveTokenEffect;
import com.gempukku.lotro.logic.effects.StackActionEffect;
import com.gempukku.lotro.logic.modifiers.ModifierFlag;
import com.gempukku.lotro.logic.timing.Effect;
import org.json.simple.JSONObject;
public class RemoveTokensCumulative implements EffectAppenderProducer {
@Override
public EffectAppender createEffectAppender(JSONObject effectObject, CardGenerationEnvironment environment) throws InvalidCardDefinitionException {
FieldUtils.validateAllowedFields(effectObject, "count", "culture", "filter");
final int requiredCount = FieldUtils.getInteger(effectObject.get("count"), "count");
final Culture culture = FieldUtils.getEnum(Culture.class, effectObject.get("culture"), "culture");
final String filter = FieldUtils.getString(effectObject.get("filter"), "filter", "any");
final Token token = Token.findTokenForCulture(culture);
FilterableSource filterableSource = environment.getFilterFactory().generateFilter(filter, environment);
String memory = "_temp";
EffectAppender resolveCardEffect = CardResolver.resolveCard("choose(" + filter + ")",
actionContext -> Filters.hasToken(token, 1),
memory, "you", "Choose card to remove a token from", environment);
EffectAppender removeTokenEffect = new DelayedAppender() {
@Override
protected Effect createEffect(boolean cost, CostToEffectAction action, ActionContext actionContext) {
PhysicalCard cardFromMemory = actionContext.getCardFromMemory(memory);
if (cardFromMemory != null) {
return new RemoveTokenEffect(actionContext.getSource(), cardFromMemory, token, 1);
} else {
return null;
}
}
};
return new DelayedAppender() {
@Override
public boolean isPlayableInFull(ActionContext actionContext) {
final LotroGame game = actionContext.getGame();
if (game.getModifiersQuerying().hasFlagActive(game, ModifierFlag.CANT_TOUCH_CULTURE_TOKENS))
return false;
int totalCount = 0;
for (PhysicalCard physicalCard : Filters.filterActive(actionContext.getGame(), Filters.hasToken(token), filterableSource.getFilterable(actionContext))) {
Integer count = actionContext.getGame().getGameState().getTokens(physicalCard).get(token);
if (count != null) {
totalCount += count;
if (totalCount >= requiredCount)
return true;
}
}
return false;
}
@Override
protected Effect createEffect(boolean cost, CostToEffectAction action, ActionContext actionContext) {
SubAction subAction = new SubAction(action);
for (int i = 0; i < requiredCount; i++) {
resolveCardEffect.appendEffect(cost, subAction, actionContext);
removeTokenEffect.appendEffect(cost, subAction, actionContext);
}
return new StackActionEffect(subAction);
}
};
}
}

View File

@@ -0,0 +1,17 @@
package com.gempukku.lotro.cards.build.field.effect.requirement;
import com.gempukku.lotro.cards.build.CardGenerationEnvironment;
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.logic.timing.PlayConditions;
import org.json.simple.JSONObject;
public class IsAhead implements RequirementProducer {
@Override
public Requirement getPlayRequirement(JSONObject object, CardGenerationEnvironment environment) throws InvalidCardDefinitionException {
FieldUtils.validateAllowedFields(object);
return actionContext -> PlayConditions.isAhead(actionContext.getGame());
}
}

View File

@@ -43,6 +43,7 @@ public class RequirementFactory {
requirementProducers.put("hasinmemory", new HasInMemory());
requirementProducers.put("hasinzonedata", new HasInZoneData());
requirementProducers.put("haveinitiative", new HaveInitiative());
requirementProducers.put("isahead", new IsAhead());
requirementProducers.put("isequal", new IsEqual());
requirementProducers.put("isgreaterthan", new IsGreaterThan());
requirementProducers.put("isgreaterthanorequal", new IsGreaterThanOrEqual());