Migrated Dunland cards in set 6 to hjson

This commit is contained in:
MarcinSc
2024-04-22 13:50:04 +07:00
parent 4b6ebc8a68
commit 887b723faf
9 changed files with 192 additions and 482 deletions

View File

@@ -1,83 +0,0 @@
package com.gempukku.lotro.cards.set6.dunland;
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.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.effects.*;
import com.gempukku.lotro.logic.timing.Effect;
import com.gempukku.lotro.logic.timing.EffectResult;
import java.util.Collection;
import java.util.Collections;
import java.util.LinkedList;
import java.util.List;
/**
* Set: Ents of Fangorn
* Side: Shadow
* Culture: Dunland
* Twilight Cost: 3
* Type: Condition
* Game Text: Plays to your support area. When you play this condition, you may spot 2 [DUNLAND] Men to place
* 2 [DUNLAND] tokens here. Response: If a [DUNLAND] Man is about to take a wound, discard this condition or remove
* a [DUNLAND] token from here to prevent that wound.
*/
public class Card6_001 extends AbstractPermanent {
public Card6_001() {
super(Side.SHADOW, 3, CardType.CONDITION, Culture.DUNLAND, "Bound By Rage", null, true);
}
@Override
public List<OptionalTriggerAction> getOptionalAfterTriggers(String playerId, LotroGame game, EffectResult effectResult, PhysicalCard self) {
if (TriggerConditions.played(game, effectResult, self)
&& PlayConditions.canSpot(game, 2, Culture.DUNLAND, Race.MAN)) {
OptionalTriggerAction action = new OptionalTriggerAction(self);
action.appendEffect(
new AddTokenEffect(self, self, Token.DUNLAND, 2));
return Collections.singletonList(action);
}
return null;
}
@Override
public List<? extends ActivateCardAction> getOptionalInPlayBeforeActions(String playerId, LotroGame game, final Effect effect, final PhysicalCard self) {
if (TriggerConditions.isGettingWounded(effect, game, Culture.DUNLAND, Race.MAN)) {
final WoundCharactersEffect woundEffect = (WoundCharactersEffect) effect;
final Collection<PhysicalCard> cardsToBeWounded = woundEffect.getAffectedCardsMinusPrevented(game);
final ActivateCardAction action = new ActivateCardAction(self);
List<Effect> possibleCosts = new LinkedList<>();
possibleCosts.add(
new RemoveTokenEffect(self, self, Token.DUNLAND) {
@Override
public String getText(LotroGame game) {
return "Remove a DUNLAND token from here";
}
});
possibleCosts.add(
new SelfDiscardEffect(self) {
@Override
public String getText(LotroGame game) {
return "Discard this condition";
}
});
action.appendCost(
new ChoiceEffect(action, playerId, possibleCosts));
action.appendEffect(
new ChooseActiveCardEffect(self, playerId, "Choose DUNLAND Man", Culture.DUNLAND, Race.MAN, Filters.in(cardsToBeWounded)) {
@Override
protected void cardSelected(LotroGame game, PhysicalCard dunlandMan) {
action.appendEffect(
new PreventCardEffect(woundEffect, dunlandMan));
}
});
return Collections.singletonList(action);
}
return null;
}
}

View File

@@ -1,45 +0,0 @@
package com.gempukku.lotro.cards.set6.dunland;
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.AbstractMinion;
import com.gempukku.lotro.logic.modifiers.KeywordModifier;
import com.gempukku.lotro.logic.modifiers.Modifier;
import com.gempukku.lotro.logic.modifiers.SpotCondition;
import com.gempukku.lotro.logic.modifiers.StrengthModifier;
import java.util.LinkedList;
import java.util.List;
/**
* Set: Ents of Fangorn
* Side: Shadow
* Culture: Dunland
* Twilight Cost: 2
* Type: Minion • Man
* Strength: 7
* Vitality: 1
* Site: 3
* Game Text: While you control 2 sites, this minion is strength +5, fierce and damage +1.
*/
public class Card6_002 extends AbstractMinion {
public Card6_002() {
super(2, 7, 1, 3, Race.MAN, Culture.DUNLAND, "Dunlending Elder");
}
@Override
public List<? extends Modifier> getInPlayModifiers(LotroGame game, PhysicalCard self) {
List<Modifier> modifiers = new LinkedList<>();
modifiers.add(
new StrengthModifier(self, self, new SpotCondition(2, Filters.siteControlled(self.getOwner())), 5));
modifiers.add(
new KeywordModifier(self, self, new SpotCondition(2, Filters.siteControlled(self.getOwner())), Keyword.FIERCE, 1));
modifiers.add(
new KeywordModifier(self, self, new SpotCondition(2, Filters.siteControlled(self.getOwner())), Keyword.DAMAGE, 1));
return modifiers;
}
}

View File

@@ -1,32 +0,0 @@
package com.gempukku.lotro.cards.set6.dunland;
import com.gempukku.lotro.common.Culture;
import com.gempukku.lotro.common.Phase;
import com.gempukku.lotro.common.Race;
import com.gempukku.lotro.game.PhysicalCard;
import com.gempukku.lotro.game.state.LotroGame;
import com.gempukku.lotro.logic.cardtype.AbstractMinion;
/**
* Set: Ents of Fangorn
* Side: Shadow
* Culture: Dunland
* Twilight Cost: 5
* Type: Minion • Man
* Strength: 11
* Vitality: 2
* Site: 3
* Game Text: The twilight cost of this minion during a skirmish phase is -2.
*/
public class Card6_003 extends AbstractMinion {
public Card6_003() {
super(5, 11, 2, 3, Race.MAN, Culture.DUNLAND, "Dunlending Footmen");
}
@Override
public int getTwilightCostModifier(LotroGame game, PhysicalCard self, PhysicalCard target) {
if (game.getGameState().getCurrentPhase() == Phase.SKIRMISH)
return -2;
return 0;
}
}

View File

@@ -1,64 +0,0 @@
package com.gempukku.lotro.cards.set6.dunland;
import com.gempukku.lotro.common.Culture;
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.CostToEffectAction;
import com.gempukku.lotro.logic.actions.OptionalTriggerAction;
import com.gempukku.lotro.logic.cardtype.AbstractMinion;
import com.gempukku.lotro.logic.effects.ChooseAndDiscardCardsFromHandEffect;
import com.gempukku.lotro.logic.effects.PreventableEffect;
import com.gempukku.lotro.logic.effects.TakeControlOfASiteEffect;
import com.gempukku.lotro.logic.timing.Effect;
import com.gempukku.lotro.logic.timing.EffectResult;
import com.gempukku.lotro.logic.timing.PlayConditions;
import com.gempukku.lotro.logic.timing.TriggerConditions;
import java.util.Collections;
import java.util.List;
/**
* Set: Ents of Fangorn
* Side: Shadow
* Culture: Dunland
* Twilight Cost: 4
* Type: Minion • Man
* Strength: 10
* Vitality: 1
* Site: 3
* Game Text: When you play this minion, you may spot 2 other [DUNLAND] Men to take control of a site. The Free Peoples
* player may discard 2 cards from hand to prevent this.
*/
public class Card6_004 extends AbstractMinion {
public Card6_004() {
super(4, 10, 1, 3, Race.MAN, Culture.DUNLAND, "Dunlending Headman");
}
@Override
public List<OptionalTriggerAction> getOptionalAfterTriggers(String playerId, final LotroGame game, EffectResult effectResult, PhysicalCard self) {
if (TriggerConditions.played(game, effectResult, self)
&& PlayConditions.canSpot(game, 2, Culture.DUNLAND, Race.MAN, Filters.not(self))) {
final OptionalTriggerAction action = new OptionalTriggerAction(self);
action.appendEffect(
new PreventableEffect(action,
new TakeControlOfASiteEffect(self, playerId),
game.getGameState().getCurrentPlayerId(),
new PreventableEffect.PreventionCost() {
@Override
public Effect createPreventionCostForPlayer(CostToEffectAction subAction, String playerId) {
return new ChooseAndDiscardCardsFromHandEffect(subAction, playerId, false, 2) {
@Override
public String getText(LotroGame game) {
return "Discard 2 cards from hand";
}
};
}
}
));
return Collections.singletonList(action);
}
return null;
}
}

View File

@@ -1,32 +0,0 @@
package com.gempukku.lotro.cards.set6.dunland;
import com.gempukku.lotro.common.Culture;
import com.gempukku.lotro.common.Phase;
import com.gempukku.lotro.common.Race;
import com.gempukku.lotro.game.PhysicalCard;
import com.gempukku.lotro.game.state.LotroGame;
import com.gempukku.lotro.logic.cardtype.AbstractMinion;
/**
* Set: Ents of Fangorn
* Side: Shadow
* Culture: Dunland
* Twilight Cost: 4
* Type: Minion • Man
* Strength: 10
* Vitality: 1
* Site: 3
* Game Text: The twilight cost of this minion during a skirmish phase is -2.
*/
public class Card6_005 extends AbstractMinion {
public Card6_005() {
super(4, 10, 1, 3, Race.MAN, Culture.DUNLAND, "Dunlending Reserve");
}
@Override
public int getTwilightCostModifier(LotroGame game, PhysicalCard self, PhysicalCard target) {
if (game.getGameState().getCurrentPhase() == Phase.SKIRMISH)
return -2;
return 0;
}
}

View File

@@ -1,59 +0,0 @@
package com.gempukku.lotro.cards.set6.dunland;
import com.gempukku.lotro.logic.cardtype.AbstractMinion;
import com.gempukku.lotro.logic.timing.TriggerConditions;
import com.gempukku.lotro.logic.effects.AddUntilStartOfPhaseModifierEffect;
import com.gempukku.lotro.logic.effects.choose.ChooseAndPlayCardFromHandEffect;
import com.gempukku.lotro.common.Culture;
import com.gempukku.lotro.common.Keyword;
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.OptionalTriggerAction;
import com.gempukku.lotro.logic.modifiers.KeywordModifier;
import com.gempukku.lotro.logic.timing.EffectResult;
import java.util.Collections;
import java.util.List;
/**
* Set: Ents of Fangorn
* Side: Shadow
* Culture: Dunland
* Twilight Cost: 8
* Type: Minion • Man
* Strength: 17
* Vitality: 2
* Site: 3
* Game Text: Each time this minion wins a skirmish, you may play a [DUNLAND] Man from hand. That Man is fierce
* and damage +2 until the regroup phase.
*/
public class Card6_006 extends AbstractMinion {
public Card6_006() {
super(8, 17, 2, 3, Race.MAN, Culture.DUNLAND, "Hill Clan");
}
@Override
public List<OptionalTriggerAction> getOptionalAfterTriggers(String playerId, LotroGame game, EffectResult effectResult, final PhysicalCard self) {
if (TriggerConditions.winsSkirmish(game, effectResult, self)
&& Filters.filter(game.getGameState().getHand(playerId), game, Culture.DUNLAND, Race.MAN, Filters.playable(game)).size() > 0) {
final OptionalTriggerAction action = new OptionalTriggerAction(self);
action.appendEffect(
new ChooseAndPlayCardFromHandEffect(playerId, game, Filters.and(Culture.DUNLAND, Race.MAN)) {
@Override
protected void afterCardPlayed(PhysicalCard cardPlayed) {
action.appendEffect(
new AddUntilStartOfPhaseModifierEffect(
new KeywordModifier(self, Filters.sameCard(cardPlayed), Keyword.FIERCE), Phase.REGROUP));
action.appendEffect(
new AddUntilStartOfPhaseModifierEffect(
new KeywordModifier(self, Filters.sameCard(cardPlayed), Keyword.DAMAGE, 2), Phase.REGROUP));
}
});
return Collections.singletonList(action);
}
return null;
}
}

View File

@@ -1,44 +0,0 @@
package com.gempukku.lotro.cards.set6.dunland;
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.RemoveTwilightEffect;
import com.gempukku.lotro.logic.effects.choose.ChooseAndPlayCardFromDiscardEffect;
import com.gempukku.lotro.logic.timing.PlayConditions;
import java.util.Collections;
import java.util.List;
/**
* Set: Ents of Fangorn
* Side: Shadow
* Culture: Dunland
* Twilight Cost: 1
* Type: Condition
* Game Text: Plays to your support area. Shadow: Spot 2 sites you control and remove (2) to play a [DUNLAND] Man
* from your discard pile.
*/
public class Card6_007 extends AbstractPermanent {
public Card6_007() {
super(Side.SHADOW, 1, CardType.CONDITION, Culture.DUNLAND, "Ready to Fall");
}
@Override
public List<? extends ActivateCardAction> getPhaseActionsInPlay(String playerId, LotroGame game, PhysicalCard self) {
if (PlayConditions.canUseShadowCardDuringPhase(game, Phase.SHADOW, self, 2)
&& PlayConditions.canSpot(game, 2, Filters.siteControlled(playerId))
&& PlayConditions.canPlayFromDiscard(playerId, game, 2, 0, Culture.DUNLAND, Race.MAN)) {
ActivateCardAction action = new ActivateCardAction(self);
action.appendCost(
new RemoveTwilightEffect(2));
action.appendEffect(
new ChooseAndPlayCardFromDiscardEffect(playerId, game, Culture.DUNLAND, Race.MAN));
return Collections.singletonList(action);
}
return null;
}
}

View File

@@ -1,44 +0,0 @@
package com.gempukku.lotro.cards.set6.dunland;
import com.gempukku.lotro.common.CardType;
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.DiscardCardsFromPlayEffect;
import com.gempukku.lotro.logic.timing.EffectResult;
import com.gempukku.lotro.logic.timing.TriggerConditions;
import java.util.Collections;
import java.util.List;
/**
* Set: Ents of Fangorn
* Side: Shadow
* Culture: Dunland
* Twilight Cost: 2
* Type: Event
* Game Text: Response: If a [DUNLAND] Man wins a skirmish, discard all conditions.
*/
public class Card6_008 extends AbstractResponseEvent {
public Card6_008() {
super(Side.SHADOW, 2, Culture.DUNLAND, "Too Long Have These Peasants Stood");
}
@Override
public List<PlayEventAction> getPlayResponseEventAfterActions(String playerId, LotroGame game, EffectResult effectResult, PhysicalCard self) {
if (TriggerConditions.winsSkirmish(game, effectResult, Culture.DUNLAND, Race.MAN)
&& PlayUtils.checkPlayRequirements(game, self, Filters.any, 0, 0, false, false)) {
PlayEventAction action = new PlayEventAction(self);
action.appendEffect(
new DiscardCardsFromPlayEffect(self.getOwner(), self, CardType.CONDITION));
return Collections.singletonList(action);
}
return null;
}
}

View File

@@ -22,17 +22,56 @@
twilight: 3
type: Condition
keywords: Support Area
/*requires: {
}
effects: [
{
}
{
}
]*/
{
type: trigger
optional: true
trigger: {
type: played
filter: self
}
requires: {
type: canSpot
filter: culture(dunland),man
count: 2
}
effect: {
type: addTokens
culture: dunland
filter: self
count: 2
}
}
{
type: activatedTrigger
trigger: {
type: aboutToTakeWound
filter: culture(dunland),man
}
cost: {
type: choice
texts: [
Discard this condition
Remove a {dunland} token from here
]
effects: [
{
type: discard
filter: self
}
{
type: removeTokens
culture: dunland
filter: self
}
]
}
effect: {
type: preventWound
filter: choose(culture(dunland),man)
}
}
]
gametext: Plays to your support area. When you play this condition, you may spot 2 [dunland] Men to place 2 [dunland] tokens here.<br><b>Response:</b> If a [dunland] Man is about to take a wound, discard this condition or remove a [dunland] token from here to prevent that wound.
lore: ""
promotext: ""
@@ -69,17 +108,48 @@
strength: 7
vitality: 1
site: 3
/*requires: {
}
effects: [
{
}
{
}
]*/
{
type: modifier
modifier: {
type: modifyStrength
filter: self
requires: {
type: canSpot
filter: controlledSite
count: 2
}
amount: 5
}
}
{
type: modifier
modifier: {
type: addKeyword
filter: self
requires: {
type: canSpot
filter: controlledSite
count: 2
}
keyword: fierce
}
}
{
type: modifier
modifier: {
type: addKeyword
filter: self
requires: {
type: canSpot
filter: controlledSite
count: 2
}
keyword: damage
amount: 1
}
}
]
gametext: While you control 2 sites, this minion is strength +5, <b>fierce</b> and <b>damage +1</b>.
lore: Hatred of the Rohirrim is passed from generation to generation.
promotext: ""
@@ -116,17 +186,16 @@
strength: 11
vitality: 2
site: 3
/*requires: {
}
effects: [
{
}
{
}
]*/
{
type: modifyOwnCost
requires: {
type: phase
phase: skirmish
}
amount: -2
}
]
gametext: The twilight cost of this minion during a skirmish phase is -2.
lore: Driven by Saruman's ranting, waves of Dunlendings descended upon the holdings of Rohan.
promotext: ""
@@ -163,17 +232,35 @@
strength: 10
vitality: 1
site: 3
/*requires: {
}
effects: [
{
}
{
}
]*/
{
type: trigger
optional: true
trigger: {
type: played
filter: self
}
requires: {
type: canSpot
filter: another,culture(dunland),man
count: 2
}
effect: {
type: preventable
player: fp
text: Would you like to discard 2 cards from hand to prevent taking control of a site?
cost: {
type: discardFromHand
player: fp
forced: false
count: 2
}
effect: {
type: takeControlOfSite
}
}
}
]
gametext: When you play this minion, you may spot 2 other [dunland] Men to take control of a site. The Free Peoples player may discard 2 cards from hand to prevent this.
lore: The diminished Rohirrim offered little resistance to the advancing Dunland horde.
promotext: ""
@@ -210,17 +297,16 @@
strength: 10
vitality: 1
site: 3
/*requires: {
}
effects: [
{
}
{
}
]*/
{
type: modifyOwnCost
requires: {
type: phase
phase: skirmish
}
amount: -2
}
]
gametext: The twilight cost of this minion during a skirmish phase is -2.
lore: The relentless campaign of the hillmen drove citizens of the Westfold to the shelter of their capital.
promotext: ""
@@ -257,17 +343,36 @@
strength: 17
vitality: 2
site: 3
/*requires: {
}
effects: [
{
}
{
}
]*/
{
type: trigger
optional: true
trigger: {
type: winsSkirmish
filter: self
}
effect: [
{
type: play
filter: choose(culture(dunland),man)
memorize: playedMan
}
{
type: addKeyword
filter: memory(playedMan)
keyword: fierce
until: regroup
}
{
type: addKeyword
filter: memory(playedMan)
keyword: damage
amount: 1
until: regroup
}
]
}
]
gametext: Each time this minion wins a skirmish, you may play a [dunland] Man from hand. That Man is <b>fierce</b> and <b>damage +2</b> until the regroup phase.
lore: We will take their king.'
promotext: ""
@@ -301,17 +406,26 @@
twilight: 1
type: Condition
keywords: Support Area
/*requires: {
}
effects: [
{
}
{
}
]*/
{
type: activated
phase: shadow
requires: {
type: canSpot
filter: controlledSite
count: 2
}
cost: {
type: removeTwilight
amount: 2
}
effect: {
type: playCardFromDiscard
removedTwilight: 2
filter: choose(culture(dunland),man)
}
}
]
gametext: Plays to your support area.<br><b>Shadow:</b> Spot 2 sites you control and remove (2) to play a [dunland] Man from your discard pile.
lore: Why do you lay these troubles on an already troubled mind?'
promotext: ""
@@ -345,20 +459,19 @@
twilight: 2
type: Event
keywords: Response
/*requires: {
}
effects: {
type: event
cost: {
},
type: responseEvent
trigger: {
type: winsSkirmish
filter: culture(dunland),man
}
effect: [
{
type: discard
filter: all(condition)
}
]
}*/
}
gametext: <b>Response:</b> If a [dunland] Man wins a skirmish, discard all conditions.
lore: The rabble of Dunland pillaged their way across the Mark.
promotext: ""