From 570a35b38f222dd9258f6e75feb4ed6c1f847161 Mon Sep 17 00:00:00 2001 From: Christian 'ketura' McCarty Date: Thu, 22 Dec 2022 12:59:36 -0600 Subject: [PATCH] Fixing Band of the Eye not being optional. Fixing His Cruelty not being able to trigger --- .../pc/errata/set01/set01-Sauron-errata.hjson | 1 + .../pc/errata/set03/set03-Sauron-errata.hjson | 4 +- .../errata/set03/Card_03_091_ErrataTests.java | 87 +++++++++++++++++++ 3 files changed, 90 insertions(+), 2 deletions(-) create mode 100644 gemp-lotr/gemp-lotr-server/src/test/java/com/gempukku/lotro/cards/unofficial/pc/errata/set03/Card_03_091_ErrataTests.java diff --git a/gemp-lotr/gemp-lotr-cards/src/main/resources/cards/unofficial/pc/errata/set01/set01-Sauron-errata.hjson b/gemp-lotr/gemp-lotr-cards/src/main/resources/cards/unofficial/pc/errata/set01/set01-Sauron-errata.hjson index e55f1411e..b0f42f12b 100644 --- a/gemp-lotr/gemp-lotr-cards/src/main/resources/cards/unofficial/pc/errata/set01/set01-Sauron-errata.hjson +++ b/gemp-lotr/gemp-lotr-cards/src/main/resources/cards/unofficial/pc/errata/set01/set01-Sauron-errata.hjson @@ -33,6 +33,7 @@ site: 6 effects: { type: trigger + optional: true trigger: { type: winsSkirmish filter: self diff --git a/gemp-lotr/gemp-lotr-cards/src/main/resources/cards/unofficial/pc/errata/set03/set03-Sauron-errata.hjson b/gemp-lotr/gemp-lotr-cards/src/main/resources/cards/unofficial/pc/errata/set03/set03-Sauron-errata.hjson index 0c4e6bb8f..a76f592ab 100644 --- a/gemp-lotr/gemp-lotr-cards/src/main/resources/cards/unofficial/pc/errata/set03/set03-Sauron-errata.hjson +++ b/gemp-lotr/gemp-lotr-cards/src/main/resources/cards/unofficial/pc/errata/set03/set03-Sauron-errata.hjson @@ -291,6 +291,8 @@ memorize: chosenMinion text: Choose a [Sauron] minion to exert or discard } + ] + effect: [ { type: choice texts: [ @@ -308,8 +310,6 @@ } ] } - ] - effect: [ { type: chooseActiveCards filter: choose(companion,not(exhausted)) diff --git a/gemp-lotr/gemp-lotr-server/src/test/java/com/gempukku/lotro/cards/unofficial/pc/errata/set03/Card_03_091_ErrataTests.java b/gemp-lotr/gemp-lotr-server/src/test/java/com/gempukku/lotro/cards/unofficial/pc/errata/set03/Card_03_091_ErrataTests.java new file mode 100644 index 000000000..d1430372c --- /dev/null +++ b/gemp-lotr/gemp-lotr-server/src/test/java/com/gempukku/lotro/cards/unofficial/pc/errata/set03/Card_03_091_ErrataTests.java @@ -0,0 +1,87 @@ +package com.gempukku.lotro.cards.unofficial.pc.errata.set03; + +import com.gempukku.lotro.cards.GenericCardTestHelper; +import com.gempukku.lotro.common.*; +import com.gempukku.lotro.game.CardNotFoundException; +import com.gempukku.lotro.logic.decisions.DecisionResultInvalidException; +import org.junit.Test; + +import java.util.HashMap; + +import static org.junit.Assert.*; + +public class Card_03_091_ErrataTests +{ + + protected GenericCardTestHelper GetScenario() throws CardNotFoundException, DecisionResultInvalidException { + return new GenericCardTestHelper( + new HashMap() + {{ + put("cruelty", "73_91"); + put("soldier1", "1_271"); + put("soldier2", "1_271"); + }}, + GenericCardTestHelper.FellowshipSites, + GenericCardTestHelper.FOTRFrodo, + GenericCardTestHelper.FOTRRing + ); + } + + @Test + public void HisCrueltyandMaliceStatsAndKeywordsAreCorrect() throws DecisionResultInvalidException, CardNotFoundException { + + /** + * Set: 3 + * Title: His Cruelty and Malice + * Unique: False + * Side: SHADOW + * Culture: Sauron + * Twilight Cost: 1 + * Type: condition + * Subtype: Support Area + * Game Text: Regroup: Exert or discard a [sauron] minion to exert a companion. The Free Peoples player may discard the top 2 cards from their draw deck to prevent this. + */ + + //Pre-game setup + var scn = GetScenario(); + + var cruelty = scn.GetFreepsCard("cruelty"); + + assertFalse(cruelty.getBlueprint().isUnique()); + assertEquals(Side.SHADOW, cruelty.getBlueprint().getSide()); + assertEquals(Culture.SAURON, cruelty.getBlueprint().getCulture()); + assertEquals(CardType.CONDITION, cruelty.getBlueprint().getCardType()); + assertTrue(scn.HasKeyword(cruelty, Keyword.SUPPORT_AREA)); + assertEquals(1, cruelty.getBlueprint().getTwilightCost()); + } + + @Test + public void HisCrueltyandMaliceGivesTheChoiceToExertOrDiscard() throws DecisionResultInvalidException, CardNotFoundException { + //Pre-game setup + var scn = GetScenario(); + + var cruelty = scn.GetShadowCard("cruelty"); + var soldier1 = scn.GetShadowCard("soldier1"); + var soldier2 = scn.GetShadowCard("soldier2"); + scn.ShadowMoveCardToSupportArea(cruelty); + scn.ShadowMoveCharToTable(soldier1, soldier2); + scn.AddWoundsToChar(soldier1, 1); + + scn.StartGame(); + + scn.SkipToPhase(Phase.ASSIGNMENT); + scn.PassCurrentPhaseActions(); + scn.FreepsDeclineAssignments(); + scn.ShadowDeclineAssignments(); + + //Regroup phase + scn.FreepsPassCurrentPhaseAction(); + assertTrue(scn.ShadowActionAvailable(cruelty)); + scn.ShadowUseCardAction(cruelty); + assertEquals(2, scn.GetShadowCardChoiceCount()); + assertEquals(Zone.SHADOW_CHARACTERS, soldier1.getZone()); + scn.ShadowChooseCard(soldier1); + assertEquals(Zone.DISCARD, soldier1.getZone()); + assertTrue(scn.FreepsDecisionAvailable("Discard")); + } +}