diff --git a/gemp-lotr/gemp-lotr-cards/src/main/resources/cards/official/set01/set1-shire.hjson b/gemp-lotr/gemp-lotr-cards/src/main/resources/cards/official/set01/set1-shire.hjson index ef8faf1e3..0cb4443cd 100644 --- a/gemp-lotr/gemp-lotr-cards/src/main/resources/cards/official/set01/set1-shire.hjson +++ b/gemp-lotr/gemp-lotr-cards/src/main/resources/cards/official/set01/set1-shire.hjson @@ -712,7 +712,7 @@ } } { - type: trigger + type: ActivatedTrigger optional: true trigger: { type: killed @@ -750,8 +750,7 @@ } } { - type: trigger - optional: true + type: ActivatedTrigger trigger: { type: killed filter: name(Frodo),ring bearer diff --git a/gemp-lotr/gemp-lotr-cards/src/main/resources/cards/official/set19/set19.hjson b/gemp-lotr/gemp-lotr-cards/src/main/resources/cards/official/set19/set19.hjson index b541b94e4..b7ff5bcf4 100644 --- a/gemp-lotr/gemp-lotr-cards/src/main/resources/cards/official/set19/set19.hjson +++ b/gemp-lotr/gemp-lotr-cards/src/main/resources/cards/official/set19/set19.hjson @@ -1221,7 +1221,7 @@ } } { - type: trigger + type: ActivatedTrigger optional: true trigger: { type: killed diff --git a/gemp-lotr/gemp-lotr-cards/src/main/resources/cards/unofficial/pc/errata/set01/set01-Shire-errata.hjson b/gemp-lotr/gemp-lotr-cards/src/main/resources/cards/unofficial/pc/errata/set01/set01-Shire-errata.hjson index 7b93ae557..8480ba670 100644 --- a/gemp-lotr/gemp-lotr-cards/src/main/resources/cards/unofficial/pc/errata/set01/set01-Shire-errata.hjson +++ b/gemp-lotr/gemp-lotr-cards/src/main/resources/cards/unofficial/pc/errata/set01/set01-Shire-errata.hjson @@ -152,8 +152,7 @@ ] } { - type: trigger - optional: true + type: ActivatedTrigger trigger: { type: killed filter: name(Frodo),ring bearer diff --git a/gemp-lotr/gemp-lotr-cards/src/main/resources/cards/unofficial/pc/setV01/V1_shire.hjson b/gemp-lotr/gemp-lotr-cards/src/main/resources/cards/unofficial/pc/setV01/V1_shire.hjson index 29ce22b04..748a75e56 100644 --- a/gemp-lotr/gemp-lotr-cards/src/main/resources/cards/unofficial/pc/setV01/V1_shire.hjson +++ b/gemp-lotr/gemp-lotr-cards/src/main/resources/cards/unofficial/pc/setV01/V1_shire.hjson @@ -207,7 +207,7 @@ } } { - type: trigger + type: ActivatedTrigger optional: true trigger: { type: killed diff --git a/gemp-lotr/gemp-lotr-server/src/test/java/com/gempukku/lotro/cards/unofficial/pc/errata/set02/Card_02_076_ErrataTests.java b/gemp-lotr/gemp-lotr-server/src/test/java/com/gempukku/lotro/cards/unofficial/pc/errata/set02/Card_02_076_ErrataTests.java index 2e964e858..dedeaf2c9 100644 --- a/gemp-lotr/gemp-lotr-server/src/test/java/com/gempukku/lotro/cards/unofficial/pc/errata/set02/Card_02_076_ErrataTests.java +++ b/gemp-lotr/gemp-lotr-server/src/test/java/com/gempukku/lotro/cards/unofficial/pc/errata/set02/Card_02_076_ErrataTests.java @@ -18,8 +18,10 @@ public class Card_02_076_ErrataTests return new GenericCardTestHelper( new HashMap<>() {{ - put("card", "52_76"); - // put other cards in here as needed for the test case + put("sam", "1_311"); + put("helpless", "52_76"); + put("toto", "10_68"); + put("nelya","1_233"); }}, GenericCardTestHelper.FellowshipSites, GenericCardTestHelper.FOTRFrodo, @@ -35,18 +37,18 @@ public class Card_02_076_ErrataTests * Name: Helpless * Unique: False * Side: Shadow - * Culture: Wraith + * Culture: Ringwraith * Twilight Cost: 1 * Type: Condition * Subtype: Support area * Game Text: Bearer's special abilities cannot be used. - * Maneuver: Exert a non-enduring Nazgul to transfer this to a Ring-bound companion. - * Response: If a burden is removed, spot or reveal a Nazgul from hand to transfer this to a Ring-bound companion. + * Maneuver: Exert a non-enduring Nazgul to transfer this to a Ring-bound companion. + * Response: If a burden is removed, spot or reveal a Nazgul from hand to transfer this to a Ring-bound companion. */ var scn = GetScenario(); - var card = scn.GetFreepsCard("card"); + var card = scn.GetFreepsCard("helpless"); assertEquals("Helpless", card.getBlueprint().getTitle()); assertNull(card.getBlueprint().getSubtitle()); @@ -58,18 +60,161 @@ public class Card_02_076_ErrataTests assertEquals(1, card.getBlueprint().getTwilightCost()); } - // Uncomment any @Test markers below once this is ready to be used - //@Test - public void HelplessTest1() throws DecisionResultInvalidException, CardNotFoundException { + @Test + public void HelplessBlocksSpecialAbilities() throws DecisionResultInvalidException, CardNotFoundException { //Pre-game setup var scn = GetScenario(); - var card = scn.GetFreepsCard("card"); - scn.FreepsMoveCardToHand(card); + var frodo = scn.GetRingBearer(); + var sam = scn.GetFreepsCard("sam"); + scn.FreepsMoveCharToTable(sam); + + var helpless = scn.GetShadowCard("helpless"); + var nelya = scn.GetShadowCard("nelya"); + scn.ShadowAttachCardsTo(sam, helpless); + scn.ShadowMoveCharToTable(nelya); scn.StartGame(); - scn.FreepsPlayCard(card); + //The Fellowship burden-removing special ability should be blocked + assertFalse(scn.FreepsActionAvailable(sam)); - assertEquals(1, scn.GetTwilight()); + scn.SkipToAssignments(); + scn.FreepsAssignToMinions(frodo, nelya); + scn.FreepsResolveSkirmish(frodo); + scn.PassCurrentPhaseActions(); + + //The Response ring-bearer special ability should also be blocked + assertFalse(scn.FreepsHasOptionalTriggerAvailable()); + } + + @Test + public void HelplessDoesNotBlockAbilitiesWhileInSupportArea() throws DecisionResultInvalidException, CardNotFoundException { + //Pre-game setup + var scn = GetScenario(); + + var frodo = scn.GetRingBearer(); + var sam = scn.GetFreepsCard("sam"); + scn.FreepsMoveCharToTable(sam); + + var helpless = scn.GetShadowCard("helpless"); + var nelya = scn.GetShadowCard("nelya"); + scn.ShadowMoveCardToSupportArea(helpless); + scn.ShadowMoveCharToTable(nelya); + + scn.StartGame(); + //The Fellowship burden-removing special ability should NOT be blocked + assertTrue(scn.FreepsActionAvailable(sam)); + + scn.SkipToAssignments(); + scn.FreepsAssignToMinions(frodo, nelya); + scn.FreepsResolveSkirmish(frodo); + scn.PassCurrentPhaseActions(); + + //The Response ring-bearer special ability should also NOT be blocked + assertTrue(scn.FreepsHasOptionalTriggerAvailable()); + } + + @Test + public void HelplessManeuverActionTransfersToRingBoundCompanion() throws DecisionResultInvalidException, CardNotFoundException { + //Pre-game setup + var scn = GetScenario(); + + var frodo = scn.GetRingBearer(); + var sam = scn.GetFreepsCard("sam"); + scn.FreepsMoveCharToTable(sam); + + var helpless = scn.GetShadowCard("helpless"); + var toto = scn.GetShadowCard("toto"); + var nelya = scn.GetShadowCard("nelya"); + scn.ShadowMoveCardToSupportArea(helpless); + scn.ShadowMoveCharToTable(toto, nelya); + + scn.StartGame(); + + scn.SkipToPhase(Phase.MANEUVER); + scn.FreepsPassCurrentPhaseAction(); + + assertTrue(scn.ShadowActionAvailable(helpless)); + assertEquals(0, scn.GetWoundsOn(toto)); + assertEquals(0, scn.GetWoundsOn(nelya)); + assertEquals(Zone.SUPPORT, helpless.getZone()); + + scn.ShadowUseCardAction(helpless); + // Exert automatically put on Nelya as the only non-enduring nazgul option + assertEquals(0, scn.GetWoundsOn(toto)); + assertEquals(1, scn.GetWoundsOn(nelya)); + + //Can go on either Sam or Frodo + assertEquals(2, scn.GetShadowCardChoiceCount()); + scn.ShadowChooseCard(frodo); + assertEquals(Zone.ATTACHED, helpless.getZone()); + assertEquals(frodo, helpless.getAttachedTo()); + } + + @Test + public void HelplessResponseCanSpotNazgulToTransfer() throws DecisionResultInvalidException, CardNotFoundException { + //Pre-game setup + var scn = GetScenario(); + + var sam = scn.GetFreepsCard("sam"); + scn.FreepsMoveCharToTable(sam); + + var helpless = scn.GetShadowCard("helpless"); + var toto = scn.GetShadowCard("toto"); + var nelya = scn.GetShadowCard("nelya"); + scn.ShadowMoveCardToSupportArea(helpless); + scn.ShadowMoveCharToTable(nelya); + scn.ShadowMoveCardToDiscard(toto); + + scn.StartGame(); + + //1 added from bid + assertEquals(1, scn.GetBurdens()); + + scn.FreepsUseCardAction(sam); + + assertEquals(Zone.SUPPORT, helpless.getZone()); + assertTrue(scn.ShadowHasOptionalTriggerAvailable()); + scn.ShadowAcceptOptionalTrigger(); + + scn.ShadowChooseCard(sam); + assertEquals(Zone.ATTACHED, helpless.getZone()); + assertEquals(sam, helpless.getAttachedTo()); + + assertFalse(scn.FreepsActionAvailable(sam)); + } + + @Test + public void HelplessResponseCanRevealNazgulToTransfer() throws DecisionResultInvalidException, CardNotFoundException { + //Pre-game setup + var scn = GetScenario(); + + var sam = scn.GetFreepsCard("sam"); + scn.FreepsMoveCharToTable(sam); + + var helpless = scn.GetShadowCard("helpless"); + var toto = scn.GetShadowCard("toto"); + var nelya = scn.GetShadowCard("nelya"); + scn.ShadowMoveCardToSupportArea(helpless); + scn.ShadowMoveCardToHand(nelya); + scn.ShadowMoveCardToDiscard(toto); + + scn.StartGame(); + + //1 added from bid + assertEquals(1, scn.GetBurdens()); + + scn.FreepsUseCardAction(sam); + + assertEquals(Zone.SUPPORT, helpless.getZone()); + assertTrue(scn.ShadowHasOptionalTriggerAvailable()); + scn.ShadowAcceptOptionalTrigger(); + scn.FreepsDismissRevealedCards(); + + scn.ShadowChooseCard(sam); + assertEquals(Zone.ATTACHED, helpless.getZone()); + assertEquals(sam, helpless.getAttachedTo()); + + assertFalse(scn.FreepsActionAvailable(sam)); } }