From 9c316afe660c204d3dd34f4966afa7afd5b42ae1 Mon Sep 17 00:00:00 2001 From: MarcinSc Date: Sun, 26 May 2024 23:08:22 +0700 Subject: [PATCH] Migrated Dwarven cards in set 18 to hjson --- .../lotro/cards/set18/dwarven/Card18_001.java | 70 ---------------- .../lotro/cards/set18/dwarven/Card18_002.java | 69 ---------------- .../lotro/cards/set18/dwarven/Card18_003.java | 45 ----------- .../official/set18}/set18-Dwarven.hjson | 81 +++++++++++++++++++ 4 files changed, 81 insertions(+), 184 deletions(-) delete mode 100644 gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set18/dwarven/Card18_001.java delete mode 100644 gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set18/dwarven/Card18_002.java delete mode 100644 gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set18/dwarven/Card18_003.java rename gemp-lotr/gemp-lotr-cards/src/main/resources/{card-stubs => cards/official/set18}/set18-Dwarven.hjson (52%) diff --git a/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set18/dwarven/Card18_001.java b/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set18/dwarven/Card18_001.java deleted file mode 100644 index 8d67e77a1..000000000 --- a/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set18/dwarven/Card18_001.java +++ /dev/null @@ -1,70 +0,0 @@ -package com.gempukku.lotro.cards.set18.dwarven; - -import com.gempukku.lotro.logic.cardtype.AbstractCompanion; -import com.gempukku.lotro.logic.timing.PlayConditions; -import com.gempukku.lotro.logic.timing.TriggerConditions; -import com.gempukku.lotro.logic.effects.ChoiceEffect; -import com.gempukku.lotro.common.CardType; -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.AddThreatsEffect; -import com.gempukku.lotro.logic.effects.ChooseAndWoundCharactersEffect; -import com.gempukku.lotro.logic.timing.Effect; -import com.gempukku.lotro.logic.timing.EffectResult; - -import java.util.Collections; -import java.util.LinkedList; -import java.util.List; - -/** - * Set: Treachery & Deceit - * Side: Free - * Culture: Dwarven - * Twilight Cost: 2 - * Type: Companion • Dwarf - * Strength: 6 - * Vitality: 3 - * Resistance: 6 - * Game Text: Damage +1. Hunter 1. (While skirmishing a non-hunter character, this character is strength +1.) Each time - * Gimli wins a skirmish, you may add a threat to wound a minion (or wound a hunter minion twice). - */ -public class Card18_001 extends AbstractCompanion { - public Card18_001() { - super(2, 6, 3, 6, Culture.DWARVEN, Race.DWARF, null, "Gimli", "Sprinter", true); - addKeyword(Keyword.DAMAGE, 1); - addKeyword(Keyword.HUNTER, 1); - } - - @Override - public List getOptionalAfterTriggers(String playerId, LotroGame game, EffectResult effectResult, PhysicalCard self) { - if (TriggerConditions.winsSkirmish(game, effectResult, self) - && PlayConditions.canAddThreat(game, self, 1)) { - OptionalTriggerAction action = new OptionalTriggerAction(self); - action.appendCost( - new AddThreatsEffect(playerId, self, 1)); - List possibleEffects = new LinkedList<>(); - possibleEffects.add( - new ChooseAndWoundCharactersEffect(action, playerId, 1, 1, CardType.MINION) { - @Override - public String getText(LotroGame game) { - return "Wound a minion"; - } - }); - possibleEffects.add( - new ChooseAndWoundCharactersEffect(action, playerId, 1, 1, 2, CardType.MINION, Keyword.HUNTER) { - @Override - public String getText(LotroGame game) { - return "Wound a hunter minion twice"; - } - }); - action.appendEffect( - new ChoiceEffect(action, playerId, possibleEffects)); - return Collections.singletonList(action); - } - return null; - } -} diff --git a/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set18/dwarven/Card18_002.java b/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set18/dwarven/Card18_002.java deleted file mode 100644 index e2e540046..000000000 --- a/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set18/dwarven/Card18_002.java +++ /dev/null @@ -1,69 +0,0 @@ -package com.gempukku.lotro.cards.set18.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.actions.RequiredTriggerAction; -import com.gempukku.lotro.logic.cardtype.AbstractPermanent; -import com.gempukku.lotro.logic.effects.*; -import com.gempukku.lotro.logic.modifiers.AddKeywordModifier; -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: Treachery & Deceit - * Side: Free - * Culture: Dwarven - * Twilight Cost: 0 - * Type: Condition • Support Area - * Game Text: When you play this condition, place a [DWARVEN] token here. Skirmish: Discard this condition from play - * or remove a [DWARVEN] token from here to make a [DWARVEN] companion gain hunter 1. - */ -public class Card18_002 extends AbstractPermanent { - public Card18_002() { - super(Side.FREE_PEOPLE, 0, CardType.CONDITION, Culture.DWARVEN, "Run Until Found"); - } - - @Override - public List getRequiredAfterTriggers(LotroGame game, EffectResult effectResult, PhysicalCard self) { - if (TriggerConditions.played(game, effectResult, self)) { - RequiredTriggerAction action = new RequiredTriggerAction(self); - action.appendEffect( - new AddTokenEffect(self, self, Token.DWARVEN)); - return Collections.singletonList(action); - } - return null; - } - - @Override - public List getPhaseActionsInPlay(String playerId, LotroGame game, final PhysicalCard self) { - if (PlayConditions.canUseFPCardDuringPhase(game, Phase.SKIRMISH, self)) { - final ActivateCardAction action = new ActivateCardAction(self); - List possibleCosts = new LinkedList<>(); - possibleCosts.add( - new RemoveTokenEffect(self, self, Token.DWARVEN)); - possibleCosts.add( - new SelfDiscardEffect(self)); - action.appendCost( - new ChoiceEffect(action, playerId, possibleCosts)); - action.appendEffect( - new ChooseActiveCardEffect(self, playerId, "Choose a DWARVEN companion", Culture.DWARVEN, CardType.COMPANION) { - @Override - protected void cardSelected(LotroGame game, PhysicalCard card) { - action.appendEffect( - new AddUntilEndOfPhaseModifierEffect( - new AddKeywordModifier(self, card, Keyword.HUNTER, 1))); - } - }); - return Collections.singletonList(action); - } - return null; - } -} diff --git a/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set18/dwarven/Card18_003.java b/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set18/dwarven/Card18_003.java deleted file mode 100644 index e1b81b65f..000000000 --- a/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set18/dwarven/Card18_003.java +++ /dev/null @@ -1,45 +0,0 @@ -package com.gempukku.lotro.cards.set18.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.AddUntilStartOfPhaseModifierEffect; -import com.gempukku.lotro.logic.effects.choose.ChooseAndExertCharactersEffect; -import com.gempukku.lotro.logic.modifiers.AddKeywordModifier; -import com.gempukku.lotro.logic.timing.PlayConditions; - -import java.util.Collections; -import java.util.List; - -/** - * Set: Treachery & Deceit - * Side: Free - * Culture: Dwarven - * Twilight Cost: 0 - * Type: Condition • Support Area - * Game Text: Tale. Maneuver: Exert a [DWARVEN] companion to make the fellowship's current site gain mountain until - * the regroup phase. - */ -public class Card18_003 extends AbstractPermanent { - public Card18_003() { - super(Side.FREE_PEOPLE, 0, CardType.CONDITION, Culture.DWARVEN, "Thorin's Harp"); - addKeyword(Keyword.TALE); - } - - @Override - public List getPhaseActionsInPlay(String playerId, LotroGame game, PhysicalCard self) { - if (PlayConditions.canUseFPCardDuringPhase(game, Phase.MANEUVER, self) - && PlayConditions.canExert(self, game, Culture.DWARVEN, CardType.COMPANION)) { - ActivateCardAction action = new ActivateCardAction(self); - action.appendCost( - new ChooseAndExertCharactersEffect(action, playerId, 1, 1, Culture.DWARVEN, CardType.COMPANION)); - action.appendEffect( - new AddUntilStartOfPhaseModifierEffect( - new AddKeywordModifier(self, game.getGameState().getCurrentSite(), Keyword.MOUNTAIN), Phase.REGROUP)); - return Collections.singletonList(action); - } - return null; - } -} diff --git a/gemp-lotr/gemp-lotr-cards/src/main/resources/card-stubs/set18-Dwarven.hjson b/gemp-lotr/gemp-lotr-cards/src/main/resources/cards/official/set18/set18-Dwarven.hjson similarity index 52% rename from gemp-lotr/gemp-lotr-cards/src/main/resources/card-stubs/set18-Dwarven.hjson rename to gemp-lotr/gemp-lotr-cards/src/main/resources/cards/official/set18/set18-Dwarven.hjson index e183603c5..83b7fdc39 100644 --- a/gemp-lotr/gemp-lotr-cards/src/main/resources/card-stubs/set18-Dwarven.hjson +++ b/gemp-lotr/gemp-lotr-cards/src/main/resources/cards/official/set18/set18-Dwarven.hjson @@ -31,6 +31,32 @@ Hunter 1 ] effects: [ + { + type: trigger + optional: true + trigger: { + type: winsSkirmish + filter: self + } + cost: { + type: addThreats + } + effect: { + type: wound + filter: choose(minion) + memorize: chosenMinion + times: { + type: condition + condition: { + type: memoryMatches + memory: chosenMinion + filter: hunter,minion + } + true: 2 + false: 1 + } + } + } ] gametext: Damage +1. Hunter 1. (While skirmishing a non-hunter character, this character is strength +1.)
Each time Gimli wins a skirmish, you may add a threat to wound a minion (or wound a hunter minion twice). lore: "" @@ -66,6 +92,47 @@ type: Condition keywords: Support Area effects: [ + { + type: trigger + trigger: { + type: played + player: you + filter: self + } + effect: { + type: addTokens + culture: dwarven + filter: self + } + } + { + type: activated + phase: skirmish + cost: { + type: choice + texts: [ + Discard this condition + Remove a {dwarven} token here + ] + effects: [ + { + type: discard + filter: self + } + { + type: removeTokens + culture: dwarven + filter: self + } + ] + } + effect: { + type: addKeyword + filter: choose(culture(dwarven),companion) + keyword: hunter + amount: 1 + } + } ] gametext: When you play this condition, place a [dwarven] token here.
Skirmish: Discard this condition from play or remove a [dwarven] token from here to make a [dwarven] companion gain hunter 1. lore: Let us hunt some Orc! @@ -104,6 +171,20 @@ Support Area ] effects: [ + { + type: activated + phase: maneuver + cost: { + type: exert + filter: choose(culture(dwarven),companion) + } + effect: { + type: addKeyword + filter: choose(currentSite) + keyword: mountain + until: regroup + } + } ] gametext: Tale.
Maneuver: Exert a [dwarven] companion to make the fellowship's current site gain mountain until the regroup phase. lore: ""