From b2444c6768b82c8b7153f046a57c45c9184acb16 Mon Sep 17 00:00:00 2001 From: MarcinSc Date: Sat, 25 May 2024 21:10:53 +0700 Subject: [PATCH] Migrated Isengard cards in set 17 to hjson --- .../cards/set17/isengard/Card17_037.java | 69 -------------- .../cards/set17/isengard/Card17_038.java | 55 ----------- .../cards/set17/isengard/Card17_039.java | 62 ------------- .../official/set17}/set17-Isengard.hjson | 91 +++++++++++++++++++ 4 files changed, 91 insertions(+), 186 deletions(-) delete mode 100644 gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set17/isengard/Card17_037.java delete mode 100644 gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set17/isengard/Card17_038.java delete mode 100644 gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set17/isengard/Card17_039.java rename gemp-lotr/gemp-lotr-cards/src/main/resources/{card-stubs => cards/official/set17}/set17-Isengard.hjson (54%) diff --git a/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set17/isengard/Card17_037.java b/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set17/isengard/Card17_037.java deleted file mode 100644 index b46a67983..000000000 --- a/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set17/isengard/Card17_037.java +++ /dev/null @@ -1,69 +0,0 @@ -package com.gempukku.lotro.cards.set17.isengard; - -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.ActivateCardAction; -import com.gempukku.lotro.logic.cardtype.AbstractMinion; -import com.gempukku.lotro.logic.effects.SelfExertEffect; -import com.gempukku.lotro.logic.effects.WoundCharactersEffect; -import com.gempukku.lotro.logic.effects.choose.ChooseAndPreventCardEffect; -import com.gempukku.lotro.logic.modifiers.*; -import com.gempukku.lotro.logic.timing.Effect; -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: Rise of Saruman - * Side: Shadow - * Culture: Isengard - * Twilight Cost: 3 - * Type: Minion • Wizard - * Strength: 8 - * Vitality: 4 - * Site: 4 - * Game Text: Saruman cannot be assigned to a skirmish. While you can spot 6 companions, each minion gains hunter 2. - * Response: If a hunter minion is about to take a wound, exert Saruman to prevent that. - */ -public class Card17_037 extends AbstractMinion { - public Card17_037() { - super(3, 8, 4, 4, Race.WIZARD, Culture.ISENGARD, "Saruman", "Instigator of Insurrection", true); - } - - @Override - public List getInPlayModifiers(LotroGame game, PhysicalCard self) { - List modifiers = new LinkedList<>(); - modifiers.add( - new CantBeAssignedToSkirmishModifier(self, - new Condition() { - @Override - public boolean isFullfilled(LotroGame game) { - return !game.getModifiersQuerying().hasFlagActive(game, ModifierFlag.SARUMAN_FIRST_SENTENCE_INACTIVE); - } - }, self)); - modifiers.add( - new KeywordModifier(self, CardType.MINION, new SpotCondition(6, CardType.COMPANION), Keyword.HUNTER, 2)); - return modifiers; - } - - @Override - public List getOptionalInPlayBeforeActions(String playerId, LotroGame game, Effect effect, PhysicalCard self) { - if (TriggerConditions.isGettingWounded(effect, game, CardType.MINION, Keyword.HUNTER) - && PlayConditions.canSelfExert(self, game)) { - ActivateCardAction action = new ActivateCardAction(self); - action.appendCost( - new SelfExertEffect(action, self)); - action.appendEffect( - new ChooseAndPreventCardEffect(self, (WoundCharactersEffect) effect, playerId, "Choose a hunter minion", CardType.MINION, Keyword.HUNTER)); - return Collections.singletonList(action); - } - return null; - } -} diff --git a/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set17/isengard/Card17_038.java b/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set17/isengard/Card17_038.java deleted file mode 100644 index 6afbb1812..000000000 --- a/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set17/isengard/Card17_038.java +++ /dev/null @@ -1,55 +0,0 @@ -package com.gempukku.lotro.cards.set17.isengard; - -import com.gempukku.lotro.common.CardType; -import com.gempukku.lotro.common.Culture; -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.CostToEffectAction; -import com.gempukku.lotro.logic.actions.OptionalTriggerAction; -import com.gempukku.lotro.logic.cardtype.AbstractFollower; -import com.gempukku.lotro.logic.effects.RemoveTwilightEffect; -import com.gempukku.lotro.logic.effects.choose.ChooseAndExertCharactersEffect; -import com.gempukku.lotro.logic.timing.EffectResult; -import com.gempukku.lotro.logic.timing.TriggerConditions; - -import java.util.Collections; -import java.util.List; - -/** - * Set: Rise of Saruman - * Side: Shadow - * Culture: Isengard - * Twilight Cost: 1 - * Type: Follower - * Strength: +2 - * Game Text: Aid - (1). (At the start of the maneuver phase, you may remove (1) to transfer this to a minion.) - * Each time bearer wins a skirmish, you may exert a companion. - */ -public class Card17_038 extends AbstractFollower { - public Card17_038() { - super(Side.SHADOW, 1, 2, 0, 0, Culture.ISENGARD, "Saruman", "Servant of Sauron", true); - } - - @Override - public boolean canPayAidCost(LotroGame game, PhysicalCard self) { - return game.getGameState().getTwilightPool() >= 1; - } - - @Override - public void appendAidCosts(LotroGame game, CostToEffectAction action, PhysicalCard self) { - action.appendCost(new RemoveTwilightEffect(1)); - } - - @Override - public List getOptionalAfterTriggers(String playerId, LotroGame game, EffectResult effectResult, PhysicalCard self) { - if (TriggerConditions.winsSkirmish(game, effectResult, Filters.hasAttached(self))) { - OptionalTriggerAction action = new OptionalTriggerAction(self); - action.appendEffect( - new ChooseAndExertCharactersEffect(action, playerId, 1, 1, CardType.COMPANION)); - return Collections.singletonList(action); - } - return null; - } -} diff --git a/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set17/isengard/Card17_039.java b/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set17/isengard/Card17_039.java deleted file mode 100644 index ca2f5b7d0..000000000 --- a/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set17/isengard/Card17_039.java +++ /dev/null @@ -1,62 +0,0 @@ -package com.gempukku.lotro.cards.set17.isengard; - -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.RequiredTriggerAction; -import com.gempukku.lotro.logic.cardtype.AbstractPermanent; -import com.gempukku.lotro.logic.effects.AddUntilStartOfPhaseModifierEffect; -import com.gempukku.lotro.logic.effects.ChooseActiveCardEffect; -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.timing.EffectResult; -import com.gempukku.lotro.logic.timing.TriggerConditions; - -import java.util.Collections; -import java.util.LinkedList; -import java.util.List; - -/** - * Set: Rise of Saruman - * Side: Shadow - * Culture: Isengard - * Twilight Cost: 2 - * Type: Artifact • Support Area - * Game Text: Each time you play Saruman, spot a minion. That minion is fierce until the start of the regroup phase. - * Each Wizard is strength +3 and damage +1. - */ -public class Card17_039 extends AbstractPermanent { - public Card17_039() { - super(Side.SHADOW, 2, CardType.ARTIFACT, Culture.ISENGARD, "Throne of Isengard", null, true); - } - - @Override - public List getRequiredAfterTriggers(LotroGame game, EffectResult effectResult, final PhysicalCard self) { - if (TriggerConditions.played(game, effectResult, Filters.saruman)) { - final RequiredTriggerAction action = new RequiredTriggerAction(self); - action.appendEffect( - new ChooseActiveCardEffect(self, self.getOwner(), "Choose a minion", CardType.MINION) { - @Override - protected void cardSelected(LotroGame game, PhysicalCard card) { - action.appendEffect( - new AddUntilStartOfPhaseModifierEffect( - new KeywordModifier(self, card, Keyword.FIERCE), Phase.REGROUP)); - } - }); - return Collections.singletonList(action); - } - return null; - } - - @Override - public List getInPlayModifiers(LotroGame game, PhysicalCard self) { - List modifiers = new LinkedList<>(); - modifiers.add( - new StrengthModifier(self, Race.WIZARD, 3)); - modifiers.add( - new KeywordModifier(self, Race.WIZARD, Keyword.DAMAGE, 1)); - return modifiers; - } -} diff --git a/gemp-lotr/gemp-lotr-cards/src/main/resources/card-stubs/set17-Isengard.hjson b/gemp-lotr/gemp-lotr-cards/src/main/resources/cards/official/set17/set17-Isengard.hjson similarity index 54% rename from gemp-lotr/gemp-lotr-cards/src/main/resources/card-stubs/set17-Isengard.hjson rename to gemp-lotr/gemp-lotr-cards/src/main/resources/cards/official/set17/set17-Isengard.hjson index 9d7fa5d5d..6cef9385e 100644 --- a/gemp-lotr/gemp-lotr-cards/src/main/resources/card-stubs/set17-Isengard.hjson +++ b/gemp-lotr/gemp-lotr-cards/src/main/resources/cards/official/set17/set17-Isengard.hjson @@ -27,6 +27,45 @@ vitality: 4 site: 4 effects: [ + { + type: modifier + modifier: { + type: cantBeAssignedToSkirmish + filter: self + requires: { + type: sarumanFirstSentenceActive + } + } + } + { + type: modifier + modifier: { + type: addKeyword + requires: { + type: canSpot + filter: companion + count: 6 + } + filter: minion + keyword: hunter + amount: 2 + } + } + { + type: activatedTrigger + trigger: { + type: aboutToTakeWound + filter: hunter,minion + } + cost: { + type: exert + filter: self + } + effect: { + type: preventWound + filter: choose(hunter,minion) + } + } ] gametext: Saruman cannot be assigned to a skirmish.
While you can spot 6 companions, each minion gains hunter 2.
Response: If a hunter minion is about to take a wound, exert Saruman to prevent that. lore: "" @@ -63,6 +102,24 @@ type: Follower strength: 2 effects: [ + { + type: aidCost + cost: { + type: addTwilight + } + } + { + type: trigger + optional: true + trigger: { + type: winsSkirmish + filter: bearer + } + effect: { + type: exert + filter: choose(companion) + } + } ] gametext: Aid – (1). (At the start of the maneuver phase, you may remove (1) to transfer this to a minion.)
Each time bearer wins a skirmish, you may exert a companion. lore: I gave you the chance of aiding me willingly, but you have elected the way of pain.' @@ -99,6 +156,40 @@ #target: keywords: Support Area effects: [ + { + type: trigger + trigger: { + type: played + filter: name(Saruman) + } + requires: { + type: canSpot + filter: minion + } + effect: { + type: addKeyword + filter: choose(minion) + keyword: fierce + until: regroup + } + } + { + type: modifier + modifier: { + type: modifyStrength + filter: wizard + amount: 3 + } + } + { + type: modifier + modifier: { + type: addKeyword + filter: wizard + keyword: damage + amount: 1 + } + } ] gametext: Each time you play Saruman, spot a minion. That minion is fierce until the start of the regroup phase.
Each Wizard is strength +3 and damage +1. lore: From the heights of Orthanc, Saruman spied on Middle-earth and plotted his rise to power.