Migrated Wraith cards in set 15 to hjson

This commit is contained in:
MarcinSc
2024-05-25 19:08:17 +07:00
parent c45bd1296b
commit 754e42b9f3
8 changed files with 149 additions and 334 deletions

View File

@@ -1,50 +0,0 @@
package com.gempukku.lotro.cards.set15.wraith;
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.AddUntilStartOfPhaseModifierEffect;
import com.gempukku.lotro.logic.effects.RemoveThreatsEffect;
import com.gempukku.lotro.logic.effects.choose.ChooseAndPlayCardFromHandEffect;
import com.gempukku.lotro.logic.modifiers.KeywordModifier;
import com.gempukku.lotro.logic.timing.PlayConditions;
/**
* Set: The Hunters
* Side: Shadow
* Culture: Wraith
* Twilight Cost: 0
* Type: Event • Shadow
* Game Text: Remove 2 threats to play a Nazgul. That Nazgul is twilight cost -2 and gains hunter 2
* (While skirmishing a non-hunter character, this character is strength +2.) until the start of the regroup phase.
*/
public class Card15_181 extends AbstractEvent {
public Card15_181() {
super(Side.SHADOW, 0, Culture.WRAITH, "Later Than You Think", Phase.SHADOW);
}
@Override
public boolean checkPlayRequirements(LotroGame game, PhysicalCard self) {
return PlayConditions.canRemoveThreat(game, self, 2)
&& PlayConditions.canPlayFromHand(self.getOwner(), game, -2, Race.NAZGUL);
}
@Override
public PlayEventAction getPlayEventCardAction(String playerId, LotroGame game, final PhysicalCard self) {
final PlayEventAction action = new PlayEventAction(self);
action.appendCost(
new RemoveThreatsEffect(self, 2));
action.appendEffect(
new ChooseAndPlayCardFromHandEffect(playerId, game, -2, Race.NAZGUL) {
@Override
protected void afterCardPlayed(PhysicalCard cardPlayed) {
action.appendEffect(
new AddUntilStartOfPhaseModifierEffect(
new KeywordModifier(self, cardPlayed, Keyword.HUNTER, 2), Phase.REGROUP));
}
});
return action;
}
}

View File

@@ -1,81 +0,0 @@
package com.gempukku.lotro.cards.set15.wraith;
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.actions.OptionalTriggerAction;
import com.gempukku.lotro.logic.cardtype.AbstractPermanent;
import com.gempukku.lotro.logic.effects.AddThreatsEffect;
import com.gempukku.lotro.logic.effects.ChoiceEffect;
import com.gempukku.lotro.logic.effects.RemoveTwilightEffect;
import com.gempukku.lotro.logic.effects.choose.ChooseAndExertCharactersEffect;
import com.gempukku.lotro.logic.effects.choose.ChooseAndPlayCardFromDiscardEffect;
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: The Hunters
* Side: Shadow
* Culture: Wraith
* Twilight Cost: 1
* Type: Condition • Support Area
* Game Text: Each time a Nazgul wins a skirmish, you may exert 2 Nazgul (or a Nazgul twice) to add a threat.
* Assignment: Spot a Nazgul and remove (4) to play a Nazgul from your discard pile.
*/
public class Card15_182 extends AbstractPermanent {
public Card15_182() {
super(Side.SHADOW, 1, CardType.CONDITION, Culture.WRAITH, "A Shadow Fell Over Them");
}
@Override
public List<OptionalTriggerAction> getOptionalAfterTriggers(String playerId, LotroGame game, EffectResult effectResult, PhysicalCard self) {
if (TriggerConditions.winsSkirmish(game, effectResult, Race.NAZGUL)
&& (PlayConditions.canExert(self, game, 1, 2, Race.NAZGUL)
|| PlayConditions.canExert(self, game, 2, 1, Race.NAZGUL))) {
OptionalTriggerAction action = new OptionalTriggerAction(self);
List<Effect> possibleCosts = new LinkedList<>();
possibleCosts.add(
new ChooseAndExertCharactersEffect(action, playerId, 2, 2, 1, Race.NAZGUL) {
@Override
public String getText(LotroGame game) {
return "Exert 2 Nazgul";
}
});
possibleCosts.add(
new ChooseAndExertCharactersEffect(action, playerId, 1, 1, 2, Race.NAZGUL) {
@Override
public String getText(LotroGame game) {
return "Exert a Nazgul twice";
}
});
action.appendCost(
new ChoiceEffect(action, playerId, possibleCosts));
action.appendEffect(
new AddThreatsEffect(playerId, self, 1));
return Collections.singletonList(action);
}
return null;
}
@Override
public List<? extends ActivateCardAction> getPhaseActionsInPlay(String playerId, LotroGame game, PhysicalCard self) {
if (PlayConditions.canUseShadowCardDuringPhase(game, Phase.ASSIGNMENT, self, 4)
&& PlayConditions.canSpot(game, Race.NAZGUL)
&& PlayConditions.canPlayFromDiscard(playerId, game, 4, 0, Race.NAZGUL)) {
ActivateCardAction action = new ActivateCardAction(self);
action.appendCost(
new RemoveTwilightEffect(4));
action.appendEffect(
new ChooseAndPlayCardFromDiscardEffect(playerId, game, Race.NAZGUL));
return Collections.singletonList(action);
}
return null;
}
}

View File

@@ -1,44 +0,0 @@
package com.gempukku.lotro.cards.set15.wraith;
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.choose.ChooseAndPreventCardEffect;
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.effects.RemoveThreatsEffect;
import com.gempukku.lotro.logic.effects.WoundCharactersEffect;
import com.gempukku.lotro.logic.timing.Effect;
import java.util.Collections;
import java.util.List;
/**
* Set: The Hunters
* Side: Shadow
* Culture: Wraith
* Twilight Cost: 2
* Type: Condition • Support Area
* Game Text: Response: If a Nazgul is about to take a wound, remove a threat to prevent that wound.
*/
public class Card15_183 extends AbstractPermanent {
public Card15_183() {
super(Side.SHADOW, 2, CardType.CONDITION, Culture.WRAITH, "They Feel The Precious");
}
@Override
public List<? extends ActivateCardAction> getOptionalInPlayBeforeActions(String playerId, LotroGame game, Effect effect, PhysicalCard self) {
if (TriggerConditions.isGettingWounded(effect, game, Race.NAZGUL)
&& PlayConditions.canRemoveThreat(game, self, 1)) {
ActivateCardAction action = new ActivateCardAction(self);
action.appendCost(
new RemoveThreatsEffect(self, 1));
action.appendEffect(
new ChooseAndPreventCardEffect(self, (WoundCharactersEffect) effect, playerId, "Choose a Nazgul", Race.NAZGUL));
return Collections.singletonList(action);
}
return null;
}
}

View File

@@ -1,41 +0,0 @@
package com.gempukku.lotro.cards.set15.wraith;
import com.gempukku.lotro.common.Culture;
import com.gempukku.lotro.common.Keyword;
import com.gempukku.lotro.common.Names;
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;
import com.gempukku.lotro.logic.modifiers.Modifier;
import com.gempukku.lotro.logic.modifiers.StrengthModifier;
import com.gempukku.lotro.logic.modifiers.evaluator.Evaluator;
/**
* Set: The Hunters
* Side: Shadow
* Culture: Wraith
* Twilight Cost: 6
* Type: Minion • Nazgul
* Strength: 12
* Vitality: 3
* Site: 3
* Game Text: Fierce. Ulaire Attea is strength +1 for every 3 twilight tokens you can spot.
*/
public class Card15_184 extends AbstractMinion {
public Card15_184() {
super(6, 12, 3, 3, Race.NAZGUL, Culture.WRAITH, Names.attea, "Desirous of Power", true);
addKeyword(Keyword.FIERCE);
}
@Override
public java.util.List<? extends Modifier> getInPlayModifiers(LotroGame game, PhysicalCard self) {
return java.util.Collections.singletonList(new StrengthModifier(self, self, null,
new Evaluator() {
@Override
public int evaluateExpression(LotroGame game, PhysicalCard cardAffected) {
return game.getGameState().getTwilightPool() / 3;
}
}));
}
}

View File

@@ -1,48 +0,0 @@
package com.gempukku.lotro.cards.set15.wraith;
import com.gempukku.lotro.logic.cardtype.AbstractMinion;
import com.gempukku.lotro.logic.timing.TriggerConditions;
import com.gempukku.lotro.logic.effects.RemoveTwilightEffect;
import com.gempukku.lotro.logic.modifiers.evaluator.CountCulturesEvaluator;
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.effects.AddThreatsEffect;
import com.gempukku.lotro.logic.timing.EffectResult;
import java.util.Collections;
import java.util.List;
/**
* Set: The Hunters
* Side: Shadow
* Culture: Wraith
* Twilight Cost: 4
* Type: Minion • Nazgul
* Strength: 9
* Vitality: 2
* Site: 3
* Game Text: Fierce. When you play Ulaire Lemenya, you may remove (1) to add a threat for each Free Peoples culture
* you can spot.
*/
public class Card15_185 extends AbstractMinion {
public Card15_185() {
super(4, 9, 2, 3, Race.NAZGUL, Culture.WRAITH, Names.lemenya, "Eternally Threatening", true);
addKeyword(Keyword.FIERCE);
}
@Override
public List<OptionalTriggerAction> getOptionalAfterTriggers(String playerId, LotroGame game, EffectResult effectResult, PhysicalCard self) {
if (TriggerConditions.played(game, effectResult, self)
&& game.getGameState().getTwilightPool() >= 1) {
OptionalTriggerAction action = new OptionalTriggerAction(self);
action.appendCost(
new RemoveTwilightEffect(1));
action.appendEffect(
new AddThreatsEffect(playerId, self, new CountCulturesEvaluator(Side.FREE_PEOPLE)));
return Collections.singletonList(action);
}
return null;
}
}

View File

@@ -1,65 +0,0 @@
package com.gempukku.lotro.cards.set15.wraith;
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.AbstractMinion;
import com.gempukku.lotro.logic.effects.ChooseAndWoundCharactersEffect;
import com.gempukku.lotro.logic.effects.SelfExertEffect;
import com.gempukku.lotro.logic.modifiers.CantTakeWoundsModifier;
import com.gempukku.lotro.logic.modifiers.Modifier;
import com.gempukku.lotro.logic.modifiers.SpotCondition;
import com.gempukku.lotro.logic.modifiers.condition.AndCondition;
import com.gempukku.lotro.logic.modifiers.condition.NotCondition;
import com.gempukku.lotro.logic.modifiers.condition.PhaseCondition;
import com.gempukku.lotro.logic.timing.PlayConditions;
import java.util.Collections;
import java.util.List;
/**
* Set: The Hunters
* Side: Shadow
* Culture: Wraith
* Twilight Cost: 5
* Type: Minion • Nazgul
* Strength: 10
* Vitality: 3
* Site: 3
* Game Text: Fierce. While you can spot 6 companions, [WRAITH] minions cannot take wounds
* (except during skirmish phases).
* Skirmish: If this minion is mounted, exert him twice to wound a companion bearing a [WRAITH] condition.
*/
public class Card15_186 extends AbstractMinion {
public Card15_186() {
super(5, 10, 3, 3, Race.NAZGUL, Culture.WRAITH, Names.nelya, "Fell Rider", true);
addKeyword(Keyword.FIERCE);
}
@Override
public java.util.List<? extends Modifier> getInPlayModifiers(LotroGame game, PhysicalCard self) {
return java.util.Collections.singletonList(new CantTakeWoundsModifier(self,
new AndCondition(
new NotCondition(new PhaseCondition(Phase.SKIRMISH)),
new SpotCondition(6, CardType.COMPANION)), Filters.and(Culture.WRAITH, CardType.MINION)));
}
@Override
public List<? extends ActivateCardAction> getPhaseActionsInPlay(String playerId, LotroGame game, PhysicalCard self) {
if (PlayConditions.canUseShadowCardDuringPhase(game, Phase.SKIRMISH, self, 0)
&& PlayConditions.canSpot(game, self, Filters.mounted)
&& PlayConditions.canSelfExert(self, 2, game)) {
ActivateCardAction action = new ActivateCardAction(self);
action.appendCost(
new SelfExertEffect(action, self));
action.appendCost(
new SelfExertEffect(action, self));
action.appendEffect(
new ChooseAndWoundCharactersEffect(action, playerId, 1, 1, CardType.COMPANION, Filters.hasAttached(Culture.WRAITH, CardType.CONDITION)));
return Collections.singletonList(action);
}
return null;
}
}

View File

@@ -22,13 +22,25 @@
twilight: 0
type: Event
keywords: Shadow
effects: {
type: event
cost: {
},
type: removeThreats
amount: 2
}
effect: [
{
type: play
filter: choose(nazgul)
cost: -2
memorize: playedNazgul
}
{
type: addKeyword
filter: memory(playedNazgul)
keyword: hunter
amount: 2
until: regroup
}
]
}
@@ -66,6 +78,53 @@
type: Condition
keywords: Support Area
effects: [
{
type: trigger
optional: true
trigger: {
type: winsSkirmish
filter: nazgul
}
cost: {
type: choice
texts: [
Exert 2 Nazgul
Exert a Nazgul twice
]
effects: [
{
type: exert
filter: choose(nazgul)
count: 2
}
{
type: exert
filter: choose(nazgul)
times: 2
}
]
}
effect: {
type: addThreats
}
}
{
type: activated
phase: assignment
requires: {
type: canSpot
filter: nazgul
}
cost: {
type: removeTwilight
amount: 4
}
effect: {
type: playCardFromDiscard
filter: choose(nazgul)
removedTwilight: 4
}
}
]
gametext: Each time a Nazgûl wins a skirmish, you may exert 2 Nazgûl (or a Nazgûl twice) to add a threat.<br><b>Assignment:</b> Spot a Nazgûl and remove (4) to play a Nazgûl from your discard pile.
lore: ...a blind fear and a deadly cold fell on them. Cowering they looked up.
@@ -101,6 +160,20 @@
type: Condition
keywords: Support Area
effects: [
{
type: activatedTrigger
trigger: {
type: aboutToTakeWound
filter: nazgul
}
cost: {
type: removeThreats
}
effect: {
type: preventWound
filter: choose(nazgul)
}
}
]
gametext: <b>Response:</b> If a Nazgûl is about to take a wound, remove a threat to prevent that wound.
lore: Three times is a threat. They feel us here....'
@@ -135,12 +208,23 @@
culture: Wraith
twilight: 6
type: Minion
race: Nazgûl
race: Nazgul
strength: 12
vitality: 3
site: 3
keywords: Fierce
effects: [
{
type: modifier
modifier: {
type: modifyStrength
filter: self
amount: {
type: forEachTwilight
divider: 3
}
}
}
]
gametext: <b>Fierce</b>.<br>Úlairë Attëa is strength +1 for every 3 twilight tokens you can spot.
lore: The Nazgûl were strongest, and most terrifying, at night.
@@ -175,12 +259,29 @@
culture: Wraith
twilight: 4
type: Minion
race: Nazgûl
race: Nazgul
strength: 9
vitality: 2
site: 3
keywords: Fierce
effects: [
{
type: trigger
optional: true
trigger: {
type: played
filter: self
}
cost: {
type: removeTwilight
}
effect: {
type: addThreats
amount: {
type: forEachFPCulture
}
}
}
]
gametext: <b>Fierce</b>.<br>When you play Úlairë Lemenya, you may remove (1) to add a threat for each Free Peoples culture you can spot.
lore: Soon there could be no doubt: three or four tall black figures were standing on the slope, looking down on them.
@@ -215,12 +316,50 @@
culture: Wraith
twilight: 5
type: Minion
race: Nazgûl
race: Nazgul
strength: 10
vitality: 3
site: 3
keywords: Fierce
effects: [
{
type: modifier
modifier: {
type: cantTakeWounds
requires: [
{
type: canSpot
filter: companion
count: 6
}
{
type: not
requires: {
type: phase
phase: skirmish
}
}
]
filter: culture(wraith),minion
}
}
{
type: activated
phase: skirmish
requires: {
type: canSpot
filter: self,mounted
}
cost: {
type: exert
filter: self
times: 2
}
effect: {
type: wound
filter: choose(companion,hasAttached(culture(wraith),condition))
}
}
]
gametext: <b>Fierce</b>.<br>While you can spot 6 companions, [wraith] minions cannot take wounds (except during skirmish phases).<br><b>Skirmish:</b> If this minion is mounted, exert him twice to wound a companion bearing a [wraith] condition.
lore: ""

View File

@@ -412,6 +412,11 @@ public class ValueResolver {
});
}
};
} else if (type.equalsIgnoreCase("forEachTwilight")) {
FieldUtils.validateAllowedFields(object, "limit", "over", "multiplier", "divider");
return new SmartValueSource(environment, object,
actionContext -> (game, cardAffected) -> game.getGameState().getTwilightPool());
} else if (type.equalsIgnoreCase("forEachResistance")) {
FieldUtils.validateAllowedFields(object, "multiplier", "over", "filter");
final int multiplier = FieldUtils.getInteger(object.get("multiplier"), "multiplier", 1);