Migrated Dwarven cards in set 8 to hjson

This commit is contained in:
MarcinSc
2024-05-13 18:09:18 +07:00
parent ef7b427dd5
commit 035a859594
9 changed files with 152 additions and 509 deletions

View File

@@ -1,60 +0,0 @@
package com.gempukku.lotro.cards.set8.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.ActivateCardAction;
import com.gempukku.lotro.logic.cardtype.AbstractPermanent;
import com.gempukku.lotro.logic.effects.ChooseActiveCardEffect;
import com.gempukku.lotro.logic.effects.DrawCardsEffect;
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.modifiers.condition.InitiativeCondition;
import com.gempukku.lotro.logic.timing.PlayConditions;
import java.util.Collections;
import java.util.List;
/**
* Set: Siege of Gondor
* Side: Free
* Culture: Dwarven
* Twilight Cost: 1
* Type: Condition • Support Area
* Game Text: While you have initiative, each Dwarf is damage +1. Fellowship: Spot a Dwarf who is damage +X to draw
* X cards. Discard this condition.
*/
public class Card8_001 extends AbstractPermanent {
public Card8_001() {
super(Side.FREE_PEOPLE, 1, CardType.CONDITION, Culture.DWARVEN, "Aggression");
}
@Override
public List<? extends Modifier> getInPlayModifiers(LotroGame game, PhysicalCard self) {
return Collections.singletonList(
new KeywordModifier(self, Race.DWARF, new InitiativeCondition(Side.FREE_PEOPLE), Keyword.DAMAGE, 1));
}
@Override
public List<? extends ActivateCardAction> getPhaseActionsInPlay(final String playerId, LotroGame game, PhysicalCard self) {
if (PlayConditions.canUseFPCardDuringPhase(game, Phase.FELLOWSHIP, self)
&& PlayConditions.canSpot(game, Race.DWARF, Keyword.DAMAGE)) {
final ActivateCardAction action = new ActivateCardAction(self);
action.appendCost(
new ChooseActiveCardEffect(self, playerId, "Choose a Dwarf", Race.DWARF, Keyword.DAMAGE) {
@Override
protected void cardSelected(LotroGame game, PhysicalCard card) {
int count = game.getModifiersQuerying().getKeywordCount(game, card, Keyword.DAMAGE);
action.insertEffect(
new DrawCardsEffect(action, playerId, count));
}
}
);
action.appendEffect(
new SelfDiscardEffect(self));
return Collections.singletonList(action);
}
return null;
}
}

View File

@@ -1,45 +0,0 @@
package com.gempukku.lotro.cards.set8.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.ChooseActiveCardEffect;
import com.gempukku.lotro.logic.effects.ChooseAndWoundCharactersEffect;
import com.gempukku.lotro.logic.timing.PlayConditions;
/**
* Set: Siege of Gondor
* Side: Free
* Culture: Dwarven
* Twilight Cost: 1
* Type: Event • Regroup
* Game Text: Spot a Dwarf who is damage +X to place X wounds on minions.
*/
public class Card8_002 extends AbstractEvent {
public Card8_002() {
super(Side.FREE_PEOPLE, 1, Culture.DWARVEN, "Battle in Earnest", Phase.REGROUP);
}
@Override
public boolean checkPlayRequirements(LotroGame game, PhysicalCard self) {
return PlayConditions.canSpot(game, Race.DWARF, Keyword.DAMAGE);
}
@Override
public PlayEventAction getPlayEventCardAction(final String playerId, LotroGame game, PhysicalCard self) {
final PlayEventAction action = new PlayEventAction(self);
action.appendCost(
new ChooseActiveCardEffect(self, playerId, "Choose a Dwarf", Race.DWARF, Keyword.DAMAGE) {
@Override
protected void cardSelected(LotroGame game, PhysicalCard card) {
int count = game.getModifiersQuerying().getKeywordCount(game, card, Keyword.DAMAGE);
for (int i = 0; i < count; i++)
action.appendEffect(
new ChooseAndWoundCharactersEffect(action, playerId, 1, 1, CardType.MINION));
}
});
return action;
}
}

View File

@@ -1,58 +0,0 @@
package com.gempukku.lotro.cards.set8.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.choose.ChooseAndDiscardCardsFromPlayEffect;
import com.gempukku.lotro.logic.effects.choose.ChooseAndExertCharactersEffect;
import com.gempukku.lotro.logic.effects.choose.ChooseOpponentEffect;
import com.gempukku.lotro.logic.timing.PlayConditions;
import java.util.Collection;
/**
* Set: Siege of Gondor
* Side: Free
* Culture: Dwarven
* Twilight Cost: 2
* Type: Event • Regroup
* Game Text: Spot a Dwarf who is damage +X and exert that Dwarf twice to make an opponent discard X Shadow cards.
*/
public class Card8_003 extends AbstractEvent {
public Card8_003() {
super(Side.FREE_PEOPLE, 2, Culture.DWARVEN, "Blood Runs Chill", Phase.REGROUP);
}
@Override
public boolean checkPlayRequirements(LotroGame game, PhysicalCard self) {
return PlayConditions.canExert(self, game, 2, Race.DWARF, Keyword.DAMAGE);
}
@Override
public PlayEventAction getPlayEventCardAction(final String playerId, final LotroGame game, PhysicalCard self) {
final PlayEventAction action = new PlayEventAction(self);
action.appendCost(
new ChooseAndExertCharactersEffect(action, playerId, 1, 1, 2, Race.DWARF, Keyword.DAMAGE) {
@Override
protected void cardsToBeExertedCallback(Collection<PhysicalCard> characters) {
int count = game.getModifiersQuerying().getKeywordCount(game, characters.iterator().next(), Keyword.DAMAGE);
this.setIntToRemember(count);
}
@Override
protected void forEachCardExertedCallback(PhysicalCard character) {
final int count = this.getIntToRemember();
action.appendEffect(
new ChooseOpponentEffect(playerId) {
@Override
protected void opponentChosen(String opponentId) {
action.insertEffect(
new ChooseAndDiscardCardsFromPlayEffect(action, opponentId, count, count, Side.SHADOW));
}
});
}
});
return action;
}
}

View File

@@ -1,51 +0,0 @@
package com.gempukku.lotro.cards.set8.dwarven;
import com.gempukku.lotro.common.Culture;
import com.gempukku.lotro.common.Phase;
import com.gempukku.lotro.common.Side;
import com.gempukku.lotro.filters.Filters;
import com.gempukku.lotro.game.PhysicalCard;
import com.gempukku.lotro.game.state.LotroGame;
import com.gempukku.lotro.logic.actions.PlayEventAction;
import com.gempukku.lotro.logic.cardtype.AbstractEvent;
import com.gempukku.lotro.logic.effects.AddThreatsEffect;
import com.gempukku.lotro.logic.effects.ChooseActiveCardEffect;
import com.gempukku.lotro.logic.effects.ReplaceInSkirmishEffect;
import com.gempukku.lotro.logic.timing.PlayConditions;
/**
* Set: Siege of Gondor
* Side: Free
* Culture: Dwarven
* Twilight Cost: 2
* Type: Event • Skirmish
* Game Text: If Gimli is not assigned to a skirmish, add a threat to have him replace an unbound companion in
* a skirmish.
*/
public class Card8_004 extends AbstractEvent {
public Card8_004() {
super(Side.FREE_PEOPLE, 2, Culture.DWARVEN, "Counts But One", Phase.SKIRMISH);
}
@Override
public boolean checkPlayRequirements(LotroGame game, PhysicalCard self) {
return PlayConditions.canSpot(game, Filters.gimli, Filters.notAssignedToSkirmish)
&& PlayConditions.canAddThreat(game, self, 1);
}
@Override
public PlayEventAction getPlayEventCardAction(String playerId, LotroGame game, PhysicalCard self) {
final PlayEventAction action = new PlayEventAction(self);
action.appendCost(
new AddThreatsEffect(playerId, self, 1));
action.appendEffect(
new ChooseActiveCardEffect(self, playerId, "Choose Gimli", Filters.gimli) {
@Override
protected void cardSelected(LotroGame game, PhysicalCard card) {
action.insertEffect(
new ReplaceInSkirmishEffect(card, Filters.unboundCompanion));
}
});
return action;
}
}

View File

@@ -1,55 +0,0 @@
package com.gempukku.lotro.cards.set8.dwarven;
import com.gempukku.lotro.common.Culture;
import com.gempukku.lotro.common.Keyword;
import com.gempukku.lotro.common.Race;
import com.gempukku.lotro.common.Signet;
import com.gempukku.lotro.game.PhysicalCard;
import com.gempukku.lotro.game.state.LotroGame;
import com.gempukku.lotro.logic.cardtype.AbstractCompanion;
import com.gempukku.lotro.logic.modifiers.KeywordModifier;
import com.gempukku.lotro.logic.modifiers.Modifier;
import com.gempukku.lotro.logic.modifiers.StrengthModifier;
import com.gempukku.lotro.logic.modifiers.evaluator.Evaluator;
import java.util.LinkedList;
import java.util.List;
/**
* Set: Siege of Gondor
* Side: Free
* Culture: Dwarven
* Twilight Cost: 2
* Type: Companion • Dwarf
* Strength: 6
* Vitality: 3
* Resistance: 6
* Signet: Gandalf
* Game Text: Damage +1. For each wound on Gimli, he is strength +1 and damage +1.
*/
public class Card8_005 extends AbstractCompanion {
public Card8_005() {
super(2, 6, 3, 6, Culture.DWARVEN, Race.DWARF, Signet.GANDALF, "Gimli", "Counter of Foes", true);
addKeyword(Keyword.DAMAGE, 1);
}
@Override
public List<? extends Modifier> getInPlayModifiers(LotroGame game, PhysicalCard self) {
List<Modifier> modifiers = new LinkedList<>();
modifiers.add(
new StrengthModifier(self, self, null, new Evaluator() {
@Override
public int evaluateExpression(LotroGame game, PhysicalCard cardAffected) {
return game.getGameState().getWounds(cardAffected);
}
}));
modifiers.add(
new KeywordModifier(self, self, null, Keyword.DAMAGE, new Evaluator() {
@Override
public int evaluateExpression(LotroGame game, PhysicalCard cardAffected) {
return game.getGameState().getWounds(cardAffected);
}
}));
return modifiers;
}
}

View File

@@ -1,43 +0,0 @@
package com.gempukku.lotro.cards.set8.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.choose.ChooseAndAddUntilEOPStrengthBonusEffect;
import com.gempukku.lotro.logic.modifiers.evaluator.Evaluator;
import com.gempukku.lotro.logic.timing.PlayConditions;
/**
* Set: Siege of Gondor
* Side: Free
* Culture: Dwarven
* Twilight Cost: 0
* Type: Event • Skirmish
* Game Text: Spot a Dwarf who is damage +X to make him strength +X.
*/
public class Card8_006 extends AbstractEvent {
public Card8_006() {
super(Side.FREE_PEOPLE, 0, Culture.DWARVEN, "Honed", Phase.SKIRMISH);
}
@Override
public boolean checkPlayRequirements(LotroGame game, PhysicalCard self) {
return PlayConditions.canSpot(game, Race.DWARF, Keyword.DAMAGE);
}
@Override
public PlayEventAction getPlayEventCardAction(String playerId, LotroGame game, PhysicalCard self) {
PlayEventAction action = new PlayEventAction(self);
action.appendEffect(
new ChooseAndAddUntilEOPStrengthBonusEffect(action, self, playerId,
new Evaluator() {
@Override
public int evaluateExpression(LotroGame game, PhysicalCard cardAffected) {
return game.getModifiersQuerying().getKeywordCount(game, cardAffected, Keyword.DAMAGE);
}
}, Race.DWARF, Keyword.DAMAGE));
return action;
}
}

View File

@@ -1,49 +0,0 @@
package com.gempukku.lotro.cards.set8.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.ChooseActiveCardEffect;
import com.gempukku.lotro.logic.effects.ChooseAndWoundCharactersEffect;
import com.gempukku.lotro.logic.timing.EffectResult;
import com.gempukku.lotro.logic.timing.TriggerConditions;
import java.util.Collections;
import java.util.List;
/**
* Set: Siege of Gondor
* Side: Free
* Culture: Dwarven
* Twilight Cost: 1
* Type: Event • Response
* Game Text: If a Dwarf who is damage +X wins a skirmish, wound a minion not assigned to a skirmish X times.
*/
public class Card8_007 extends AbstractResponseEvent {
public Card8_007() {
super(Side.FREE_PEOPLE, 1, Culture.DWARVEN, "Unheard of");
}
@Override
public List<PlayEventAction> getPlayResponseEventAfterActions(final String playerId, LotroGame game, EffectResult effectResult, PhysicalCard self) {
if (TriggerConditions.winsSkirmish(game, effectResult, Race.DWARF, Keyword.DAMAGE)
&& PlayUtils.checkPlayRequirements(game, self, Filters.any, 0, 0, false, false)) {
final PlayEventAction action = new PlayEventAction(self);
action.appendEffect(
new ChooseActiveCardEffect(self, playerId, "Choose a Dwarf", Race.DWARF, Keyword.DAMAGE, Filters.inSkirmish) {
@Override
protected void cardSelected(LotroGame game, PhysicalCard card) {
int count = game.getModifiersQuerying().getKeywordCount(game, card, Keyword.DAMAGE);
action.insertEffect(
new ChooseAndWoundCharactersEffect(action, playerId, 1, 1, count, CardType.MINION, Filters.notAssignedToSkirmish));
}
});
return Collections.singletonList(action);
}
return null;
}
}

View File

@@ -1,71 +0,0 @@
package com.gempukku.lotro.cards.set8.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.AbstractPermanent;
import com.gempukku.lotro.logic.effects.AddTokenEffect;
import com.gempukku.lotro.logic.effects.AddUntilEndOfPhaseModifierEffect;
import com.gempukku.lotro.logic.effects.ChooseActiveCardEffect;
import com.gempukku.lotro.logic.effects.RemoveTokenEffect;
import com.gempukku.lotro.logic.effects.choose.ChooseAndExertCharactersEffect;
import com.gempukku.lotro.logic.modifiers.KeywordModifier;
import com.gempukku.lotro.logic.timing.PlayConditions;
import java.util.Collections;
import java.util.List;
/**
* Set: Siege of Gondor
* Side: Free
* Culture: Dwarven
* Twilight Cost: 1
* Type: Condition • Support Area
* Game Text: Fellowship: Exert a Dwarf companion and either an [ELVEN] companion or a [GONDOR] Man to add a [DWARVEN]
* token here. Skirmish: Remove a [DWARVEN] token here to make a companion damage +1.
*/
public class Card8_008 extends AbstractPermanent {
public Card8_008() {
super(Side.FREE_PEOPLE, 1, CardType.CONDITION, Culture.DWARVEN, "Wish For Our Kinfolk");
}
@Override
public List<? extends ActivateCardAction> getPhaseActionsInPlay(String playerId, LotroGame game, final PhysicalCard self) {
if (PlayConditions.canUseFPCardDuringPhase(game, Phase.FELLOWSHIP, self)
&& PlayConditions.canExert(self, game, Race.DWARF, CardType.COMPANION)
&& PlayConditions.canExert(self, game,
Filters.or(
Filters.and(CardType.COMPANION, Culture.ELVEN),
Filters.and(Culture.GONDOR, Race.MAN)))) {
ActivateCardAction action = new ActivateCardAction(self);
action.appendCost(
new ChooseAndExertCharactersEffect(action, playerId, 1, 1, Race.DWARF, CardType.COMPANION));
action.appendCost(
new ChooseAndExertCharactersEffect(action, playerId, 1, 1, Filters.or(
Filters.and(CardType.COMPANION, Culture.ELVEN),
Filters.and(Culture.GONDOR, Race.MAN))));
action.appendEffect(
new AddTokenEffect(self, self, Token.DWARVEN));
return Collections.singletonList(action);
}
if (PlayConditions.canUseFPCardDuringPhase(game, Phase.SKIRMISH, self)
&& PlayConditions.canRemoveTokens(game, self, Token.DWARVEN, 1)) {
final ActivateCardAction action = new ActivateCardAction(self);
action.appendCost(
new RemoveTokenEffect(self, self, Token.DWARVEN));
action.appendEffect(
new ChooseActiveCardEffect(self, playerId, "Choose a companion", CardType.COMPANION) {
@Override
protected void cardSelected(LotroGame game, PhysicalCard card) {
action.insertEffect(
new AddUntilEndOfPhaseModifierEffect(
new KeywordModifier(self, card, Keyword.DAMAGE, 1)));
}
});
return Collections.singletonList(action);
}
return null;
}
}

View File

@@ -22,17 +22,45 @@
twilight: 1
type: Condition
keywords: Support Area
/*requires: {
}
effects: [
{
}
{
}
]*/
{
type: modifier
modifier: {
type: addKeyword
requires: {
type: haveInitiative
side: free people
}
filter: dwarf
keyword: damage
amount: 1
}
}
{
type: activated
phase: fellowship
cost: {
type: spot
text: Choose a Dwarf to spot
filter: choose(dwarf)
memorize: chosenDwarf
}
effect: [
{
type: drawCards
count: {
type: forEachKeywordOnCardInMemory
memory: chosenDwarf
keyword: damage
}
}
{
type: discard
filter: self
}
]
}
]
gametext: While you have initiative, each Dwarf is <b>damage +1</b>.<br><b>Fellowship:</b> Spot a Dwarf who is damage +X to draw X cards. Discard this condition.
lore: Certainty of death, small chance of success....'
promotext: ""
@@ -66,20 +94,26 @@
twilight: 1
type: Event
keywords: Regroup
/*requires: {
}
*/
effects: {
type: event
cost: {
type: SendMessage
text: Placeholder effect for development.
},
type: spot
text: Choose a Dwarf to spot
filter: choose(dwarf)
memorize: chosenDwarf
}
effect: [
{
type: SendMessage
text: Placeholder effect for development.
type: repeat
times: {
type: forEachKeywordOnCardInMemory
memory: chosenDwarf
keyword: damage
}
effect: {
type: wound
filter: choose(minion)
}
}
]
}
@@ -116,20 +150,25 @@
twilight: 2
type: Event
keywords: Regroup
/*requires: {
}
*/
effects: {
type: event
cost: {
type: SendMessage
text: Placeholder effect for development.
type: exert
filter: choose(dwarf)
times: 2
memorize: exertedDwarf
},
effect: [
{
type: SendMessage
text: Placeholder effect for development.
type: discardFromHand
forced: true
hand: shadow
player: shadow
count: {
type: forEachKeywordOnCardInMemory
memory: exertedDwarf
keyword: damage
}
}
]
}
@@ -166,20 +205,20 @@
twilight: 2
type: Event
keywords: Skirmish
/*requires: {
}
*/
effects: {
type: event
requires: {
type: canSpot
filter: name(Gimli),notAssignedToSkirmish
}
cost: {
type: SendMessage
text: Placeholder effect for development.
type: addThreats
},
effect: [
{
type: SendMessage
text: Placeholder effect for development.
type: replaceInSkirmish
filter: unbound,companion,not(name(Gimli))
with: choose(name(Gimli))
}
]
}
@@ -222,17 +261,31 @@
signet: Gandalf
resistance: 6
keywords: Damage+1
/*requires: {
}
effects: [
{
}
{
}
]*/
{
type: modifier
modifier: {
type: modifyStrength
filter: self
amount: {
type: forEachWound
filter: self
}
}
}
{
type: modifier
modifier: {
type: addKeyword
filter: self
keyword: damage
amount: {
type: forEachWound
filter: self
}
}
}
]
gametext: <b>Damage +1</b>.<br>For each wound on Gimli, he is strength +1 and <b>damage +1</b>.
lore: Twenty, twenty-one, twenty-two....
promotext: ""
@@ -266,20 +319,18 @@
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: forEachKeywordOnCardInMemory
memory: chosenDwarf
keyword: damage
}
}
]
}
@@ -316,26 +367,25 @@
twilight: 1
type: Event
keywords: Response
/*requires: {
}
*/
effects: {
type: responseEvent
trigger: {
}
cost: {
type: SendMessage
text: Placeholder effect for development.
type: winsSkirmish
filter: dwarf
memorize: winningDwarf
}
effect: [
{
type: SendMessage
text: Placeholder effect for development.
type: wound
filter: choose(minion,notAssignedToSkirmish)
times: {
type: forEachKeywordOnCardInMemory
memory: winningDwarf
keyword: damage
}
}
]
]
}
gametext: If a Dwarf who is damage +X wins a skirmish, wound a minion not assigned to a skirmish X times.
lore: ...an Elf will go underground and a Dwarf dare not.'
promotext: ""
@@ -369,17 +419,42 @@
twilight: 1
type: Condition
keywords: Support Area
/*requires: {
}
effects: [
{
}
{
}
]*/
{
type: activated
phase: fellowship
cost: [
{
type: exert
filter: choose(dwarf)
}
{
type: exert
filter: choose(or(and(culture(elven),companion),and(culture(gondor),man)))
}
]
effect: {
type: addTokens
culture: dwarven
filter: self
}
}
{
type: activated
phase: skirmish
cost: {
type: removeTokens
culture: dwarven
filter: self
}
effect: {
type: addKeyword
filter: choose(companion)
keyword: damage
amount: 1
}
}
]
gametext: <b>Fellowship:</b> Exert a Dwarf companion and either an [elven] companion or a [gondor] Man to add a [dwarven] token here.<br><b>Skirmish:</b> Remove a [dwarven] token here to make a companion <b>damage +1</b>.
lore: ...war already marches on their own lands.'
promotext: ""