From c2a0cfc115b0fe820d0aaa59bef28ac9e3db0d4e Mon Sep 17 00:00:00 2001 From: MarcinSc Date: Fri, 17 May 2024 17:31:19 +0700 Subject: [PATCH] Migrated One-ring cards in set 11 to hjson --- .../lotro/cards/set11/Card11_001.java | 71 ------------ .../official/set11}/set11-Onering.hjson | 102 ++++++++++++++++++ 2 files changed, 102 insertions(+), 71 deletions(-) delete mode 100644 gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set11/Card11_001.java rename gemp-lotr/gemp-lotr-cards/src/main/resources/{card-stubs => cards/official/set11}/set11-Onering.hjson (53%) diff --git a/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set11/Card11_001.java b/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set11/Card11_001.java deleted file mode 100644 index d80585691..000000000 --- a/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set11/Card11_001.java +++ /dev/null @@ -1,71 +0,0 @@ -package com.gempukku.lotro.cards.set11; - -import com.gempukku.lotro.common.CardType; -import com.gempukku.lotro.filters.Filter; -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.RequiredTriggerAction; -import com.gempukku.lotro.logic.cardtype.AbstractAttachable; -import com.gempukku.lotro.logic.effects.AddBurdenEffect; -import com.gempukku.lotro.logic.effects.NegateWoundEffect; -import com.gempukku.lotro.logic.effects.PutOnTheOneRingEffect; -import com.gempukku.lotro.logic.effects.WoundCharactersEffect; -import com.gempukku.lotro.logic.modifiers.ModifierFlag; -import com.gempukku.lotro.logic.timing.Effect; -import com.gempukku.lotro.logic.timing.TriggerConditions; - -import java.util.Collections; -import java.util.List; - -/** - * Set: Shadows - * Type: The One Ring - * Resistance: +2 - * Game Text: Response: If the Ring-bearer is about to take a wound, he or she wears The One Ring until the regroup - * phase. While the Ring-bearer is wearing The One Ring, each time he or she is about to take a wound, add a burden - * instead. - */ -public class Card11_001 extends AbstractAttachable { - public Card11_001() { - super(null, CardType.THE_ONE_RING, 0, null, null, "The One Ring", "The Ring of Rings", true); - } - - @Override - public Filter getValidTargetFilter(String playerId, LotroGame game, PhysicalCard self) { - return Filters.none; - } - - @Override - public int getResistance() { - return 2; - } - - @Override - public List getOptionalInPlayBeforeActions(final String playerId, LotroGame game, Effect effect, final PhysicalCard self) { - if (TriggerConditions.isGettingWounded(effect, game, Filters.hasAttached(self)) - && !game.getModifiersQuerying().hasFlagActive(game, ModifierFlag.RING_TEXT_INACTIVE)) { - ActivateCardAction action = new ActivateCardAction(self); - action.appendEffect(new NegateWoundEffect((WoundCharactersEffect) effect, self.getAttachedTo())); - action.appendEffect(new AddBurdenEffect(playerId, self, 1)); - action.appendEffect(new PutOnTheOneRingEffect()); - - return Collections.singletonList(action); - } - return null; - } - - @Override - public List getRequiredBeforeTriggers(LotroGame game, Effect effect, PhysicalCard self) { - if (TriggerConditions.isGettingWounded(effect, game, Filters.hasAttached(self)) - && game.getGameState().isWearingRing() - && !game.getModifiersQuerying().hasFlagActive(game, ModifierFlag.RING_TEXT_INACTIVE)) { - RequiredTriggerAction action = new RequiredTriggerAction(self); - action.appendEffect(new NegateWoundEffect((WoundCharactersEffect) effect, self.getAttachedTo())); - action.appendEffect(new AddBurdenEffect(self.getOwner(), self, 1)); - return Collections.singletonList(action); - } - return null; - } -} diff --git a/gemp-lotr/gemp-lotr-cards/src/main/resources/card-stubs/set11-Onering.hjson b/gemp-lotr/gemp-lotr-cards/src/main/resources/cards/official/set11/set11-Onering.hjson similarity index 53% rename from gemp-lotr/gemp-lotr-cards/src/main/resources/card-stubs/set11-Onering.hjson rename to gemp-lotr/gemp-lotr-cards/src/main/resources/cards/official/set11/set11-Onering.hjson index d91f6ece2..6dd03daa4 100644 --- a/gemp-lotr/gemp-lotr-cards/src/main/resources/card-stubs/set11-Onering.hjson +++ b/gemp-lotr/gemp-lotr-cards/src/main/resources/cards/official/set11/set11-Onering.hjson @@ -22,6 +22,52 @@ type: The One Ring resistance: 2 effects: [ + { + type: activatedTrigger + requires: { + type: ringIsActive + } + trigger: { + type: aboutToTakeWound + filter: bearer + } + effect: [ + { + type: putOnRing + } + { + type: negateWound + filter: all(bearer) + } + { + type: addBurdens + } + ] + } + { + type: trigger + requires: [ + { + type: ringIsOn + } + { + type: ringIsActive + } + ] + trigger: { + type: aboutToTakeWound + filter: bearer + } + effect: [ + { + type: negateWound + filter: all(bearer) + } + { + type: addBurdens + } + ] + } ] gametext: Response: If the Ring-bearer is about to take a wound, he or she wears The One Ring until the regroup phase.
While the Ring-bearer is wearing The One Ring, each time he or she is about to take a wound, add a burden instead. lore: ...ash nazg thrakatulûk agh burzum-ishi krimpatul.' @@ -56,6 +102,62 @@ type: The One Ring strength: 1 effects: [ + { + type: trigger + requires: [ + { + type: ringIsOn + } + { + type: phase + phase: skirmish + } + { + type: ringIsActive + } + ] + trigger: { + type: aboutToTakeWound + filter: bearer + } + effect: [ + { + type: negateWound + filter: all(bearer) + } + { + type: addBurdens + } + ] + } + { + type: activatedTrigger + trigger: { + type: aboutToTakeWound + filter: bearer + } + requires: [ + { + type: phase + phase: skirmish + } + { + type: ringIsActive + } + ] + effect: [ + { + type: putOnRing + } + { + type: negateWound + filter: all(bearer) + } + { + type: addBurdens + } + ] + } ] gametext: Response: If the Ring-bearer is about to take a wound in a skirmish, he or she wears The One Ring until the regroup phase.
While the Ring-bearer is wearing The One Ring, each time he or she is about to take a wound in a skirmish, add a burden instead. lore: One Ring to rule them all....