From 61e2e5a981840e3fec65782b63bbc6989a9f21af Mon Sep 17 00:00:00 2001 From: MarcinSc Date: Mon, 20 May 2024 21:14:45 +0700 Subject: [PATCH] Migrated Isengard cards in set 13 to hjson --- .../cards/set13/isengard/Card13_078.java | 94 ------ .../cards/set13/isengard/Card13_079.java | 102 ------- .../cards/set13/isengard/Card13_080.java | 91 ------ .../cards/set13/isengard/Card13_081.java | 61 ---- .../resources/card-stubs/set13-Isengard.hjson | 146 --------- .../cards/official/set13/set13-Isengard.hjson | 284 ++++++++++++++++++ .../field/effect/appender/TurnIntoMinion.java | 16 +- .../build/field/effect/modifier/CantBear.java | 2 +- 8 files changed, 296 insertions(+), 500 deletions(-) delete mode 100644 gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set13/isengard/Card13_078.java delete mode 100644 gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set13/isengard/Card13_079.java delete mode 100644 gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set13/isengard/Card13_080.java delete mode 100644 gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set13/isengard/Card13_081.java delete mode 100644 gemp-lotr/gemp-lotr-cards/src/main/resources/card-stubs/set13-Isengard.hjson create mode 100644 gemp-lotr/gemp-lotr-cards/src/main/resources/cards/official/set13/set13-Isengard.hjson diff --git a/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set13/isengard/Card13_078.java b/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set13/isengard/Card13_078.java deleted file mode 100644 index 0059781a1..000000000 --- a/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set13/isengard/Card13_078.java +++ /dev/null @@ -1,94 +0,0 @@ -package com.gempukku.lotro.cards.set13.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.TransferToShadowEffect; -import com.gempukku.lotro.logic.effects.TransferToSupportEffect; -import com.gempukku.lotro.logic.modifiers.*; -import com.gempukku.lotro.logic.timing.EffectResult; -import com.gempukku.lotro.logic.timing.TriggerConditions; -import com.gempukku.lotro.logic.timing.UnrespondableEffect; - -import java.util.Collections; -import java.util.List; -import java.util.Map; - -/** - * Set: Bloodlines - * Side: Shadow - * Culture: Isengard - * Twilight Cost: 3 - * Type: Condition • Support Area - * Game Text: Each time a Wizard wins a skirmish, this condition becomes a fierce, damage +1 Wizard minion until the - * start of the regroup phase that has 11 strength and 1 vitality, and cannot take wounds or bear other cards. - * This card is still a condition. - */ -public class Card13_078 extends AbstractPermanent { - public Card13_078() { - super(Side.SHADOW, 3, CardType.CONDITION, Culture.ISENGARD, "Alatar Deceived", null, true); - } - - @Override - public List getRequiredAfterTriggers(LotroGame game, EffectResult effectResult, final PhysicalCard self) { - if (TriggerConditions.winsSkirmish(game, effectResult, Race.WIZARD) - && self.getZone() != Zone.SHADOW_CHARACTERS) { - final RequiredTriggerAction action = new RequiredTriggerAction(self); - action.appendEffect( - new TransferToShadowEffect(self) { - @Override - protected void cardTransferredCallback() { - action.appendEffect( - new AddUntilStartOfPhaseModifierEffect( - new VitalityModifier(self, self, 1), Phase.REGROUP)); - action.appendEffect( - new AddUntilStartOfPhaseModifierEffect( - new StrengthModifier(self, self, 11), Phase.REGROUP)); - action.appendEffect( - new AddUntilStartOfPhaseModifierEffect( - new IsAdditionalCardTypeModifier(self, self, CardType.MINION), Phase.REGROUP)); - action.appendEffect( - new AddUntilStartOfPhaseModifierEffect( - new KeywordModifier(self, self, Keyword.FIERCE), Phase.REGROUP)); - action.appendEffect( - new AddUntilStartOfPhaseModifierEffect( - new KeywordModifier(self, self, Keyword.DAMAGE, 1), Phase.REGROUP)); - action.appendEffect( - new AddUntilStartOfPhaseModifierEffect( - new MayNotBearModifier(self, self, Filters.any), Phase.REGROUP)); - action.appendEffect( - new AddUntilStartOfPhaseModifierEffect( - new CantTakeWoundsModifier(self, self), Phase.REGROUP)); - } - }); - return Collections.singletonList(action); - } - if (TriggerConditions.startOfPhase(game, effectResult, Phase.REGROUP) - && self.getZone() == Zone.SHADOW_CHARACTERS) { - RequiredTriggerAction action = new RequiredTriggerAction(self); - action.appendEffect( - new UnrespondableEffect() { - @Override - protected void doPlayEffect(LotroGame game) { - for (Map.Entry tokenCount : game.getGameState().getTokens(self).entrySet()) { - if (tokenCount.getValue() > 0) - game.getGameState().removeTokens(self, tokenCount.getKey(), tokenCount.getValue()); - } - } - }); - action.appendEffect( - new TransferToSupportEffect(self)); - return Collections.singletonList(action); - } - return null; - } - - @Override - public Race getRace() { - return Race.WIZARD; - } -} diff --git a/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set13/isengard/Card13_079.java b/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set13/isengard/Card13_079.java deleted file mode 100644 index 3805db3bb..000000000 --- a/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set13/isengard/Card13_079.java +++ /dev/null @@ -1,102 +0,0 @@ -package com.gempukku.lotro.cards.set13.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.OptionalTriggerAction; -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.TransferToShadowEffect; -import com.gempukku.lotro.logic.effects.TransferToSupportEffect; -import com.gempukku.lotro.logic.effects.choose.ChooseAndExertCharactersEffect; -import com.gempukku.lotro.logic.modifiers.*; -import com.gempukku.lotro.logic.timing.EffectResult; -import com.gempukku.lotro.logic.timing.PlayConditions; -import com.gempukku.lotro.logic.timing.TriggerConditions; -import com.gempukku.lotro.logic.timing.UnrespondableEffect; - -import java.util.Collections; -import java.util.List; -import java.util.Map; - -/** - * Set: Bloodlines - * Side: Shadow - * Culture: Isengard - * Twilight Cost: 3 - * Type: Condition • Support Area - * Game Text: At the start of the maneuver phase, you may exert a Wizard to make this condition a fierce Wizard minion - * until the start of the regroup phase that has 10 strength and 1 vitality, and cannot take wounds or bear other cards. - * This card is still a condition. - */ -public class Card13_079 extends AbstractPermanent { - public Card13_079() { - super(Side.SHADOW, 3, CardType.CONDITION, Culture.ISENGARD, "Pallando Deceived", null, true); - } - - @Override - public List getOptionalAfterTriggers(String playerId, LotroGame game, EffectResult effectResult, final PhysicalCard self) { - if (TriggerConditions.startOfPhase(game, effectResult, Phase.MANEUVER) - && PlayConditions.canExert(self, game, Race.WIZARD) - && self.getZone() != Zone.SHADOW_CHARACTERS) { - final OptionalTriggerAction action = new OptionalTriggerAction(self); - action.appendCost( - new ChooseAndExertCharactersEffect(action, playerId, 1, 1, Race.WIZARD)); - action.appendEffect( - new TransferToShadowEffect(self) { - @Override - protected void cardTransferredCallback() { - action.appendEffect( - new AddUntilStartOfPhaseModifierEffect( - new VitalityModifier(self, self, 1), Phase.REGROUP)); - action.appendEffect( - new AddUntilStartOfPhaseModifierEffect( - new StrengthModifier(self, self, 10), Phase.REGROUP)); - action.appendEffect( - new AddUntilStartOfPhaseModifierEffect( - new IsAdditionalCardTypeModifier(self, self, CardType.MINION), Phase.REGROUP)); - action.appendEffect( - new AddUntilStartOfPhaseModifierEffect( - new KeywordModifier(self, self, Keyword.FIERCE), Phase.REGROUP)); - action.appendEffect( - new AddUntilStartOfPhaseModifierEffect( - new MayNotBearModifier(self, self, Filters.any), Phase.REGROUP)); - action.appendEffect( - new AddUntilStartOfPhaseModifierEffect( - new CantTakeWoundsModifier(self, self), Phase.REGROUP)); - } - }); - return Collections.singletonList(action); - } - return null; - } - - @Override - public List getRequiredAfterTriggers(LotroGame game, EffectResult effectResult, final PhysicalCard self) { - if (TriggerConditions.startOfPhase(game, effectResult, Phase.REGROUP) - && self.getZone() == Zone.SHADOW_CHARACTERS) { - RequiredTriggerAction action = new RequiredTriggerAction(self); - action.appendEffect( - new UnrespondableEffect() { - @Override - protected void doPlayEffect(LotroGame game) { - for (Map.Entry tokenCount : game.getGameState().getTokens(self).entrySet()) { - if (tokenCount.getValue() > 0) - game.getGameState().removeTokens(self, tokenCount.getKey(), tokenCount.getValue()); - } - } - }); - action.appendEffect( - new TransferToSupportEffect(self)); - return Collections.singletonList(action); - } - return null; - } - - @Override - public Race getRace() { - return Race.WIZARD; - } -} diff --git a/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set13/isengard/Card13_080.java b/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set13/isengard/Card13_080.java deleted file mode 100644 index 4940f723a..000000000 --- a/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set13/isengard/Card13_080.java +++ /dev/null @@ -1,91 +0,0 @@ -package com.gempukku.lotro.cards.set13.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.TransferToShadowEffect; -import com.gempukku.lotro.logic.effects.TransferToSupportEffect; -import com.gempukku.lotro.logic.modifiers.*; -import com.gempukku.lotro.logic.timing.EffectResult; -import com.gempukku.lotro.logic.timing.TriggerConditions; -import com.gempukku.lotro.logic.timing.UnrespondableEffect; - -import java.util.Collections; -import java.util.List; -import java.util.Map; - -/** - * Set: Bloodlines - * Side: Shadow - * Culture: Isengard - * Twilight Cost: 3 - * Type: Condition • Support Area - * Game Text: Each time a Wizard heals, this condition becomes a fierce Wizard minion until the start of the regroup - * phase that has 12 strength and 1 vitality, and cannot take wounds or bear other cards. - * This card is still a condition. - */ -public class Card13_080 extends AbstractPermanent { - public Card13_080() { - super(Side.SHADOW, 3, CardType.CONDITION, Culture.ISENGARD, "Radagast Deceived", null, true); - } - - @Override - public List getRequiredAfterTriggers(LotroGame game, EffectResult effectResult, final PhysicalCard self) { - if (TriggerConditions.forEachHealed(game, effectResult, null, Race.WIZARD) - && self.getZone() != Zone.SHADOW_CHARACTERS) { - final RequiredTriggerAction action = new RequiredTriggerAction(self); - action.appendEffect( - new TransferToShadowEffect(self) { - @Override - protected void cardTransferredCallback() { - action.appendEffect( - new AddUntilStartOfPhaseModifierEffect( - new VitalityModifier(self, self, 1), Phase.REGROUP)); - action.appendEffect( - new AddUntilStartOfPhaseModifierEffect( - new StrengthModifier(self, self, 12), Phase.REGROUP)); - action.appendEffect( - new AddUntilStartOfPhaseModifierEffect( - new IsAdditionalCardTypeModifier(self, self, CardType.MINION), Phase.REGROUP)); - action.appendEffect( - new AddUntilStartOfPhaseModifierEffect( - new KeywordModifier(self, self, Keyword.FIERCE), Phase.REGROUP)); - action.appendEffect( - new AddUntilStartOfPhaseModifierEffect( - new MayNotBearModifier(self, self, Filters.any), Phase.REGROUP)); - action.appendEffect( - new AddUntilStartOfPhaseModifierEffect( - new CantTakeWoundsModifier(self, self), Phase.REGROUP)); - } - }); - return Collections.singletonList(action); - } - if (TriggerConditions.startOfPhase(game, effectResult, Phase.REGROUP) - && self.getZone() == Zone.SHADOW_CHARACTERS) { - RequiredTriggerAction action = new RequiredTriggerAction(self); - action.appendEffect( - new UnrespondableEffect() { - @Override - protected void doPlayEffect(LotroGame game) { - for (Map.Entry tokenCount : game.getGameState().getTokens(self).entrySet()) { - if (tokenCount.getValue() > 0) - game.getGameState().removeTokens(self, tokenCount.getKey(), tokenCount.getValue()); - } - } - }); - action.appendEffect( - new TransferToSupportEffect(self)); - return Collections.singletonList(action); - } - return null; - } - - @Override - public Race getRace() { - return Race.WIZARD; - } -} diff --git a/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set13/isengard/Card13_081.java b/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set13/isengard/Card13_081.java deleted file mode 100644 index 596f7977f..000000000 --- a/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set13/isengard/Card13_081.java +++ /dev/null @@ -1,61 +0,0 @@ -package com.gempukku.lotro.cards.set13.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.ActivateCardAction; -import com.gempukku.lotro.logic.cardtype.AbstractAttachable; -import com.gempukku.lotro.logic.effects.SelfDiscardEffect; -import com.gempukku.lotro.logic.effects.choose.ChooseAndReturnCardsToHandEffect; -import com.gempukku.lotro.logic.timing.PlayConditions; - -import java.util.Collections; -import java.util.List; - -/** - * Set: Bloodlines - * Side: Shadow - * Culture: Isengard - * Twilight Cost: 2 - * Type: Artifact • Staff - * Strength: +2 - * Vitality: +1 - * Game Text: Bearer must be a Wizard. Regroup: If Saruman is the only minion you can spot, discard this artifact from - * play to return him to your hand. - */ -public class Card13_081 extends AbstractAttachable { - public Card13_081() { - super(Side.SHADOW, CardType.ARTIFACT, 2, Culture.ISENGARD, PossessionClass.STAFF, "Staff of Saruman", "Fallen Istar's Stave", true); - } - - @Override - public Filterable getValidTargetFilter(String playerId, LotroGame game, PhysicalCard self) { - return Race.WIZARD; - } - - @Override - public int getStrength() { - return 2; - } - - @Override - public int getVitality() { - return 1; - } - - @Override - public List getPhaseActionsInPlay(String playerId, LotroGame game, PhysicalCard self) { - if (PlayConditions.canUseShadowCardDuringPhase(game, Phase.REGROUP, self, 0) - && PlayConditions.canSpot(game, Filters.saruman) && !PlayConditions.canSpot(game, 2, CardType.MINION) - && PlayConditions.canSelfDiscard(self, game)) { - ActivateCardAction action = new ActivateCardAction(self); - action.appendCost( - new SelfDiscardEffect(self)); - action.appendEffect( - new ChooseAndReturnCardsToHandEffect(action, playerId, 1, 1, Filters.saruman)); - return Collections.singletonList(action); - } - return null; - } -} diff --git a/gemp-lotr/gemp-lotr-cards/src/main/resources/card-stubs/set13-Isengard.hjson b/gemp-lotr/gemp-lotr-cards/src/main/resources/card-stubs/set13-Isengard.hjson deleted file mode 100644 index fcb6d86d0..000000000 --- a/gemp-lotr/gemp-lotr-cards/src/main/resources/card-stubs/set13-Isengard.hjson +++ /dev/null @@ -1,146 +0,0 @@ -{ - - 13_78: { - cardInfo: { - imagePath: decipher/LOTR13078.jpg - javaClass: true - //parentId: 13_78 - //One of: Variant, Errata, Reprint - //parentType: Variant - //parentPath: alts/promo - version: 0 - collInfo: 13R78 - rarity: R - setNum: "13" - cardNum: 78 - style: Standard - } - title: Alatar Deceived - unique: true - side: Shadow - culture: Isengard - twilight: 3 - type: Condition - keywords: Support Area - effects: [ - ] - gametext: Each time a Wizard wins a skirmish, this condition becomes a fierce, damage +1 Wizard minion until the start of the regroup phase that has 11 strength and 1 vitality, and cannot take wounds or bear other cards. This card is still a condition. - lore: ...the world of Men, which We must rule.' - promotext: "" - alts: { - promos: { - } - errata: { - } - } - } - - 13_79: { - cardInfo: { - imagePath: decipher/LOTR13079.jpg - javaClass: true - //parentId: 13_79 - //One of: Variant, Errata, Reprint - //parentType: Variant - //parentPath: alts/promo - version: 0 - collInfo: 13U79 - rarity: U - setNum: "13" - cardNum: 79 - style: Standard - } - title: Pallando Deceived - unique: true - side: Shadow - culture: Isengard - twilight: 3 - type: Condition - keywords: Support Area - effects: [ - ] - gametext: At the start of the maneuver phase, you may exert a Wizard to make this condition a fierce Wizard minion until the start of the regroup phase that has 10 strength and 1 vitality, and cannot take wounds or bear other cards. This card is still a condition. - lore: We may join with that Power.' - promotext: "" - alts: { - promos: { - } - errata: { - } - } - } - - 13_80: { - cardInfo: { - imagePath: decipher/LOTR13080.jpg - javaClass: true - //parentId: 13_80 - //One of: Variant, Errata, Reprint - //parentType: Variant - //parentPath: alts/promo - version: 0 - collInfo: 13R80 - rarity: R - setNum: "13" - cardNum: 80 - style: Standard - } - title: Radagast Deceived - unique: true - side: Shadow - culture: Isengard - twilight: 3 - type: Condition - keywords: Support Area - effects: [ - ] - gametext: Each time a Wizard heals, this condition becomes a fierce Wizard minion until the start of the regroup phase that has 12 strength and 1 vitality, and cannot take wounds or bear other cards. This card is still a condition. - lore: Radagast the Simple! Radagast the Fool!' - promotext: "" - alts: { - promos: { - } - errata: { - } - } - } - - 13_81: { - cardInfo: { - imagePath: decipher/LOTR13081.jpg - javaClass: true - //parentId: 13_81 - //One of: Variant, Errata, Reprint - //parentType: Variant - //parentPath: alts/promo - version: 0 - collInfo: 13R81 - rarity: R - setNum: "13" - cardNum: 81 - style: Standard - } - title: Staff of Saruman - subtitle: Fallen Istar's Stave - unique: true - side: Shadow - culture: Isengard - twilight: 2 - type: Artifact - strength: 2 - vitality: 1 - itemclass: Staff - #target: a Wizard - effects: [ - ] - gametext: Bearer must be a Wizard.
Regroup: If Saruman is the only minion you can spot, discard this artifact from play to return him to your hand. - lore: He raised his staff and it engulfed Gandalf in flames. - promotext: "" - alts: { - promos: { - } - errata: { - } - } - } -} diff --git a/gemp-lotr/gemp-lotr-cards/src/main/resources/cards/official/set13/set13-Isengard.hjson b/gemp-lotr/gemp-lotr-cards/src/main/resources/cards/official/set13/set13-Isengard.hjson new file mode 100644 index 000000000..07549bca1 --- /dev/null +++ b/gemp-lotr/gemp-lotr-cards/src/main/resources/cards/official/set13/set13-Isengard.hjson @@ -0,0 +1,284 @@ +{ + + 13_78: { + cardInfo: { + imagePath: decipher/LOTR13078.jpg + javaClass: true + //parentId: 13_78 + //One of: Variant, Errata, Reprint + //parentType: Variant + //parentPath: alts/promo + version: 0 + collInfo: 13R78 + rarity: R + setNum: "13" + cardNum: 78 + style: Standard + } + title: Alatar Deceived + unique: true + side: Shadow + culture: Isengard + twilight: 3 + type: Condition + keywords: Support Area + effects: [ + { + type: trigger + trigger: { + type: winsSkirmish + filter: wizard + } + requires: { + type: canSpot + filter: self,zone(support) + } + effect: [ + { + type: turnIntoMinion + filter: self + strength: 11 + vitality: 1 + keywords: fierce + until: regroup + } + { + type: addModifier + modifier: { + type: cantTakeWounds + filter: self + } + until: regroup + } + { + type: addModifier + modifier: { + type: cantBear + filter: self + } + until: regroup + } + ] + } + ] + gametext: Each time a Wizard wins a skirmish, this condition becomes a fierce, damage +1 Wizard minion until the start of the regroup phase that has 11 strength and 1 vitality, and cannot take wounds or bear other cards. This card is still a condition. + lore: ...the world of Men, which We must rule.' + promotext: "" + alts: { + promos: { + } + errata: { + } + } + } + + 13_79: { + cardInfo: { + imagePath: decipher/LOTR13079.jpg + javaClass: true + //parentId: 13_79 + //One of: Variant, Errata, Reprint + //parentType: Variant + //parentPath: alts/promo + version: 0 + collInfo: 13U79 + rarity: U + setNum: "13" + cardNum: 79 + style: Standard + } + title: Pallando Deceived + unique: true + side: Shadow + culture: Isengard + twilight: 3 + type: Condition + keywords: Support Area + effects: [ + { + type: trigger + optional: true + trigger: { + type: startOfPhase + phase: maneuver + } + cost: { + type: exert + filter: choose(wizard) + } + requires: { + type: canSpot + filter: self,zone(support) + } + effect: [ + { + type: turnIntoMinion + filter: self + strength: 10 + vitality: 1 + keywords: fierce + until: regroup + } + { + type: addModifier + modifier: { + type: cantTakeWounds + filter: self + } + until: regroup + } + { + type: addModifier + modifier: { + type: cantBear + filter: self + } + until: regroup + } + ] + } + ] + gametext: At the start of the maneuver phase, you may exert a Wizard to make this condition a fierce Wizard minion until the start of the regroup phase that has 10 strength and 1 vitality, and cannot take wounds or bear other cards. This card is still a condition. + lore: We may join with that Power.' + promotext: "" + alts: { + promos: { + } + errata: { + } + } + } + + 13_80: { + cardInfo: { + imagePath: decipher/LOTR13080.jpg + javaClass: true + //parentId: 13_80 + //One of: Variant, Errata, Reprint + //parentType: Variant + //parentPath: alts/promo + version: 0 + collInfo: 13R80 + rarity: R + setNum: "13" + cardNum: 80 + style: Standard + } + title: Radagast Deceived + unique: true + side: Shadow + culture: Isengard + twilight: 3 + type: Condition + keywords: Support Area + effects: [ + { + type: trigger + trigger: { + type: heals + filter: wizard + } + requires: { + type: canSpot + filter: self,zone(support) + } + effect: [ + { + type: turnIntoMinion + filter: self + strength: 12 + vitality: 1 + keywords: fierce + until: regroup + } + { + type: addModifier + modifier: { + type: cantTakeWounds + filter: self + } + until: regroup + } + { + type: addModifier + modifier: { + type: cantBear + filter: self + } + until: regroup + } + ] + } + ] + gametext: Each time a Wizard heals, this condition becomes a fierce Wizard minion until the start of the regroup phase that has 12 strength and 1 vitality, and cannot take wounds or bear other cards. This card is still a condition. + lore: Radagast the Simple! Radagast the Fool!' + promotext: "" + alts: { + promos: { + } + errata: { + } + } + } + + 13_81: { + cardInfo: { + imagePath: decipher/LOTR13081.jpg + javaClass: true + //parentId: 13_81 + //One of: Variant, Errata, Reprint + //parentType: Variant + //parentPath: alts/promo + version: 0 + collInfo: 13R81 + rarity: R + setNum: "13" + cardNum: 81 + style: Standard + } + title: Staff of Saruman + subtitle: Fallen Istar's Stave + unique: true + side: Shadow + culture: Isengard + twilight: 2 + type: Artifact + strength: 2 + vitality: 1 + itemclass: Staff + target: wizard + effects: [ + { + type: activated + phase: regroup + requires: [ + { + type: canSpot + filter: name(Saruman) + } + { + type: cantSpot + filter: minion,not(name(Saruman)) + } + ] + cost: { + type: discard + filter: self + } + effect: { + type: returnToHand + filter: choose(name(Saruman)) + } + } + ] + gametext: Bearer must be a Wizard.
Regroup: If Saruman is the only minion you can spot, discard this artifact from play to return him to your hand. + lore: He raised his staff and it engulfed Gandalf in flames. + promotext: "" + alts: { + promos: { + } + errata: { + } + } + } +} diff --git a/gemp-lotr/gemp-lotr-logic/src/main/java/com/gempukku/lotro/cards/build/field/effect/appender/TurnIntoMinion.java b/gemp-lotr/gemp-lotr-logic/src/main/java/com/gempukku/lotro/cards/build/field/effect/appender/TurnIntoMinion.java index 5872b0f44..3caca7fa2 100644 --- a/gemp-lotr/gemp-lotr-logic/src/main/java/com/gempukku/lotro/cards/build/field/effect/appender/TurnIntoMinion.java +++ b/gemp-lotr/gemp-lotr-logic/src/main/java/com/gempukku/lotro/cards/build/field/effect/appender/TurnIntoMinion.java @@ -34,7 +34,7 @@ import java.util.List; public class TurnIntoMinion implements EffectAppenderProducer { @Override public EffectAppender createEffectAppender(JSONObject effectObject, CardGenerationEnvironment environment) throws InvalidCardDefinitionException { - FieldUtils.validateAllowedFields(effectObject, "filter", "count", "strength", "vitality", "keywords", "until"); + FieldUtils.validateAllowedFields(effectObject, "filter", "count", "strength", "vitality", "keywords", "until", "memorize"); final String filter = FieldUtils.getString(effectObject.get("filter"), "filter", "choose(any)"); final ValueSource valueSource = ValueResolver.resolveEvaluator(effectObject.get("count"), 1, environment); @@ -43,7 +43,14 @@ public class TurnIntoMinion implements EffectAppenderProducer { String keywords = FieldUtils.getString(effectObject.get("keywords"), "keywords"); final TimeResolver.Time until = TimeResolver.resolveTime(effectObject.get("until"), "end(current)"); - String memory = "_temp"; + String memory = FieldUtils.getString(effectObject.get("memorize"), "memorize", "_temp"); + + List keywordsList = new ArrayList<>(); + if (keywords != null) { + for (String key : keywords.split(",")) { + keywordsList.add(FieldUtils.getEnum(Keyword.class, key, "keyword")); + } + } MultiEffectAppender result = new MultiEffectAppender(); result.addEffectAppender( @@ -67,9 +74,8 @@ public class TurnIntoMinion implements EffectAppenderProducer { addModifier(action, new VitalityModifier(card, card, vitalityValue), until); addModifier(action, new IsAdditionalCardTypeModifier(card, card, CardType.MINION), until); if (keywords != null) { - String[] keywordSplit = keywords.split(","); - for (String keyword : keywordSplit) { - addModifier(action, new KeywordModifier(card, card, Keyword.valueOf(keyword)), until); + for (Keyword keyword : keywordsList) { + addModifier(action, new KeywordModifier(card, card, keyword), until); } } addModifier(action, new MayNotBearModifier(card, card, Filters.any), until); diff --git a/gemp-lotr/gemp-lotr-logic/src/main/java/com/gempukku/lotro/cards/build/field/effect/modifier/CantBear.java b/gemp-lotr/gemp-lotr-logic/src/main/java/com/gempukku/lotro/cards/build/field/effect/modifier/CantBear.java index dfccdf399..487640041 100644 --- a/gemp-lotr/gemp-lotr-logic/src/main/java/com/gempukku/lotro/cards/build/field/effect/modifier/CantBear.java +++ b/gemp-lotr/gemp-lotr-logic/src/main/java/com/gempukku/lotro/cards/build/field/effect/modifier/CantBear.java @@ -12,7 +12,7 @@ public class CantBear implements ModifierSourceProducer { FieldUtils.validateAllowedFields(object, "filter", "cardFilter"); final String filter = FieldUtils.getString(object.get("filter"), "filter"); - final String cardFilter = FieldUtils.getString(object.get("cardFilter"), "cardFilter"); + final String cardFilter = FieldUtils.getString(object.get("cardFilter"), "cardFilter", "any"); final FilterableSource filterableSource = environment.getFilterFactory().generateFilter(filter, environment); final FilterableSource cardFilterSource = environment.getFilterFactory().generateFilter(cardFilter, environment);