diff --git a/gemp-lotr/gemp-lotr-async/src/main/web/cards/set101/set101_moria_playtest.json b/gemp-lotr/gemp-lotr-async/src/main/web/cards/set101/set101_moria_playtest.json index 14b38a42d..11f9595f0 100644 --- a/gemp-lotr/gemp-lotr-async/src/main/web/cards/set101/set101_moria_playtest.json +++ b/gemp-lotr/gemp-lotr-async/src/main/web/cards/set101/set101_moria_playtest.json @@ -126,25 +126,33 @@ "keyword": ["support area"], "effects": [ { - "type": "modifier", - "modifier": { - "type": "addKeyword", - "filter": "dwarf", - "keyword": "damage+1" - } - }, - { - "type": "trigger", - "optional": true, - "trigger": { - "type": "winsSkirmish", - "filter": "dwarf" + "type": "activated", + "phase": "shadow", + "cost": { + "type": "removeTwilight", + "amount": 1 }, "effect": { - "type": "wound", - "filter": "choose(orc)" + "type": "choice", + "texts": [ + "Remove (1) to stack a tentacle from hand here.", + "Remove (1) to play a tentacle stacked here" + ], + "effects": [ + { + "type": "stackCardsFromHand", + "filter": "choose(tentacle)", + "where": "self" + }, + { + "type": "playCardFromStacked", + "filter": "choose(tentacle)", + "on": "self" + } + ] } - } + }, + ] }, @@ -157,25 +165,28 @@ "keyword": ["support area"], "effects": [ { - "type": "modifier", - "modifier": { - "type": "addKeyword", - "filter": "dwarf", - "keyword": "damage+1" + "type": "activated", + "phase": "shadow", + "effect": { + "type": "choice", + "texts": [ + "Stack a [moria] item here.", + "Spot The Balrog to take a [moria] item here into hand." + ], + "effects": [ + { + "type": "stackCardsFromHand", + "filter": "choose(culture(moria),item)", + "where": "self" + }, + { + "type": "putStackedCardsIntoHand", + "filter": "choose(culture(moria),item)", + "on": "self" + } + ] } }, - { - "type": "trigger", - "optional": true, - "trigger": { - "type": "winsSkirmish", - "filter": "dwarf" - }, - "effect": { - "type": "wound", - "filter": "choose(orc)" - } - } ] }, @@ -186,7 +197,7 @@ "cost": 3, "type": "minion", "race": "creature", - "keyword": ["damage+1"], + "keyword": ["tentacle"], "strength": 7, "vitality": 2, "site": 4, @@ -194,23 +205,39 @@ { "type": "modifier", "modifier": { - "type": "addKeyword", - "filter": "dwarf", - "keyword": "damage+1" + "type": "cantBear", + "filter": "self", + "cardFilter": "possession" } }, { - "type": "trigger", - "optional": true, - "trigger": { - "type": "winsSkirmish", - "filter": "dwarf" + "type": "modifier", + "modifier": { + "type": "modifyStrength", + "filter": "self", + "condition": { + "type": "location", + "filter": "not(marsh)" + }, + "amount": -4 + } + }, + { + "type": "activated", + "phase": "shadow", + "cost": { + "type": "discardFromHand", + "forced": false, + "filter": "choose(culture(moria))" }, "effect": { - "type": "wound", - "filter": "choose(orc)" + "type": "addKeyword", + "filter": "choose(currentSite)", + "keyword": "marsh", + "until": "start(regroup)" } - } + }, + ] }, diff --git a/gemp-lotr/gemp-lotr-server/src/test/java/com/gempukku/lotro/cards/unofficial/pc/vset1/vpack1/Card_V1_033Tests.java b/gemp-lotr/gemp-lotr-server/src/test/java/com/gempukku/lotro/cards/unofficial/pc/vset1/vpack1/Card_V1_033Tests.java index f1c0f114b..2c0fffdf0 100644 --- a/gemp-lotr/gemp-lotr-server/src/test/java/com/gempukku/lotro/cards/unofficial/pc/vset1/vpack1/Card_V1_033Tests.java +++ b/gemp-lotr/gemp-lotr-server/src/test/java/com/gempukku/lotro/cards/unofficial/pc/vset1/vpack1/Card_V1_033Tests.java @@ -26,6 +26,9 @@ public class Card_V1_033Tests {{ put("ttent", "151_33"); put("spear", "1_182"); + put("ftentacle1", "2_58"); + put("ftentacle2", "2_58"); + put("ftentacle3", "2_58"); }}, GenericCardTestHelper.FellowshipSites, GenericCardTestHelper.FOTRFrodo, @@ -101,4 +104,37 @@ public class Card_V1_033Tests assertEquals(1, scn.GetShadowDiscardCount()); } + + @Test + public void ThrashingTentaclePlaysFromDiscardIfThreeCreatures() throws DecisionResultInvalidException, CardNotFoundException { + //Pre-game setup + GenericCardTestHelper scn = GetScenario(); + + PhysicalCardImpl ttent = scn.GetShadowCard("ttent"); + scn.ShadowMoveCardToHand(ttent); + + PhysicalCardImpl ftentacle1 = scn.GetShadowCard("ftentacle1"); + PhysicalCardImpl ftentacle2 = scn.GetShadowCard("ftentacle2"); + PhysicalCardImpl ftentacle3 = scn.GetShadowCard("ftentacle3"); + scn.ShadowMoveCardToHand(ftentacle1, ftentacle2, ftentacle3); + scn.ShadowMoveCardToDiscard(ttent); + + scn.StartGame(); + scn.SetTwilight(16); + scn.ApplyAdHocModifier(new KeywordModifier(null, Filters.siteNumber(2), Keyword.MARSH)); + scn.FreepsSkipCurrentPhaseAction(); + + scn.ShadowPlayCard(ftentacle1); + scn.ShadowDeclineOptionalTrigger(); + scn.ShadowPlayCard(ftentacle2); + scn.ShadowDeclineOptionalTrigger(); + + assertFalse(scn.ShadowActionAvailable("Thrashing Tentacle")); + scn.ShadowPlayCard(ftentacle3); + scn.ShadowDeclineOptionalTrigger(); + + assertTrue(scn.ShadowActionAvailable("Thrashing Tentacle")); + scn.ShadowUseCardAction(ttent); + assertEquals(0, scn.GetShadowDiscardCount()); + } } diff --git a/gemp-lotr/gemp-lotr-server/src/test/java/com/gempukku/lotro/cards/unofficial/pc/vset1/vpack1/Card_V1_034Tests.java b/gemp-lotr/gemp-lotr-server/src/test/java/com/gempukku/lotro/cards/unofficial/pc/vset1/vpack1/Card_V1_034Tests.java index 3ee707bff..374f3ba15 100644 --- a/gemp-lotr/gemp-lotr-server/src/test/java/com/gempukku/lotro/cards/unofficial/pc/vset1/vpack1/Card_V1_034Tests.java +++ b/gemp-lotr/gemp-lotr-server/src/test/java/com/gempukku/lotro/cards/unofficial/pc/vset1/vpack1/Card_V1_034Tests.java @@ -3,9 +3,11 @@ package com.gempukku.lotro.cards.unofficial.pc.vset1.vpack1; import com.gempukku.lotro.cards.GenericCardTestHelper; import com.gempukku.lotro.common.*; +import com.gempukku.lotro.filters.Filters; import com.gempukku.lotro.game.CardNotFoundException; import com.gempukku.lotro.game.PhysicalCardImpl; import com.gempukku.lotro.logic.decisions.DecisionResultInvalidException; +import com.gempukku.lotro.logic.modifiers.KeywordModifier; import com.gempukku.lotro.logic.modifiers.MoveLimitModifier; import org.junit.Test; @@ -22,8 +24,9 @@ public class Card_V1_034Tests return new GenericCardTestHelper( new HashMap() {{ - put("card", "151_34"); - // put other cards in here as needed for the test case + put("darkwaters", "151_34"); + put("ftentacle1", "2_58"); + put("ftentacle2", "2_58"); }}, GenericCardTestHelper.FellowshipSites, GenericCardTestHelper.FOTRFrodo, @@ -31,10 +34,8 @@ public class Card_V1_034Tests ); } - // Uncomment both @Test markers below once this is ready to be used - - //@Test - public void OutofDarkWatersStatsAndKeywordsAreCorrect() throws DecisionResultInvalidException, CardNotFoundException { + @Test + public void DarkWatersStatsAndKeywordsAreCorrect() throws DecisionResultInvalidException, CardNotFoundException { /** * Set: V1 @@ -52,32 +53,41 @@ public class Card_V1_034Tests //Pre-game setup GenericCardTestHelper scn = GetScenario(); - PhysicalCardImpl card = scn.GetFreepsCard("card"); + PhysicalCardImpl darkwaters = scn.GetFreepsCard("darkwaters"); - assertFalse(card.getBlueprint().isUnique()); - assertTrue(scn.HasKeyword(card, Keyword.SUPPORT_AREA)); // test for keywords as needed - assertEquals(0, card.getBlueprint().getTwilightCost()); - //assertEquals(, card.getBlueprint().getStrength()); - //assertEquals(, card.getBlueprint().getVitality()); - //assertEquals(, card.getBlueprint().getResistance()); - //assertEquals(Signet., card.getBlueprint().getSignet()); - //assertEquals(, card.getBlueprint().getSiteNumber()); // Change this to getAllyHomeSiteNumbers for allies - assertEquals(CardType.CONDITION, card.getBlueprint().getCardType()); - assertEquals(Culture.MORIA, card.getBlueprint().getCulture()); - assertEquals(Side.FREE_PEOPLE, card.getBlueprint().getSide()); + assertFalse(darkwaters.getBlueprint().isUnique()); + assertTrue(scn.HasKeyword(darkwaters, Keyword.SUPPORT_AREA)); // test for keywords as needed + assertEquals(0, darkwaters.getBlueprint().getTwilightCost()); + assertEquals(CardType.CONDITION, darkwaters.getBlueprint().getCardType()); + assertEquals(Culture.MORIA, darkwaters.getBlueprint().getCulture()); + assertEquals(Side.FREE_PEOPLE, darkwaters.getBlueprint().getSide()); } - //@Test - public void OutofDarkWatersTest1() throws DecisionResultInvalidException, CardNotFoundException { + @Test + public void DarkWatersCanAdd1ToStackOrPlayTentacles() throws DecisionResultInvalidException, CardNotFoundException { //Pre-game setup GenericCardTestHelper scn = GetScenario(); - PhysicalCardImpl card = scn.GetFreepsCard("card"); - scn.FreepsMoveCardToHand(card); + PhysicalCardImpl darkwaters = scn.GetShadowCard("darkwaters"); + PhysicalCardImpl ftentacle1 = scn.GetShadowCard("ftentacle1"); + PhysicalCardImpl ftentacle2 = scn.GetShadowCard("ftentacle2"); + scn.ShadowMoveCardToHand(darkwaters, ftentacle1, ftentacle2); scn.StartGame(); - scn.FreepsPlayCard(card); + scn.SetTwilight(4); + scn.ApplyAdHocModifier(new KeywordModifier(null, Filters.siteNumber(2), Keyword.MARSH)); + scn.FreepsSkipCurrentPhaseAction(); - assertEquals(0, scn.GetTwilight()); + scn.ShadowPlayCard(darkwaters); + + assertTrue(scn.ShadowActionAvailable("Dark Waters")); + assertEquals(7, scn.GetTwilight()); + scn.ShadowUseCardAction(darkwaters); + scn.ShadowChooseCard(ftentacle1); + + assertEquals(6, scn.GetTwilight()); + assertTrue(scn.ShadowActionAvailable("Dark Waters")); + scn.ShadowUseCardAction(darkwaters); + scn.ShadowUseCardAction(darkwaters); } } diff --git a/gemp-lotr/gemp-lotr-server/src/test/java/com/gempukku/lotro/cards/unofficial/pc/vset1/vpack1/Card_V1_036Tests.java b/gemp-lotr/gemp-lotr-server/src/test/java/com/gempukku/lotro/cards/unofficial/pc/vset1/vpack1/Card_V1_036Tests.java index 290a03504..2738f7e5b 100644 --- a/gemp-lotr/gemp-lotr-server/src/test/java/com/gempukku/lotro/cards/unofficial/pc/vset1/vpack1/Card_V1_036Tests.java +++ b/gemp-lotr/gemp-lotr-server/src/test/java/com/gempukku/lotro/cards/unofficial/pc/vset1/vpack1/Card_V1_036Tests.java @@ -3,9 +3,11 @@ package com.gempukku.lotro.cards.unofficial.pc.vset1.vpack1; import com.gempukku.lotro.cards.GenericCardTestHelper; import com.gempukku.lotro.common.*; +import com.gempukku.lotro.filters.Filters; import com.gempukku.lotro.game.CardNotFoundException; import com.gempukku.lotro.game.PhysicalCardImpl; import com.gempukku.lotro.logic.decisions.DecisionResultInvalidException; +import com.gempukku.lotro.logic.modifiers.KeywordModifier; import com.gempukku.lotro.logic.modifiers.MoveLimitModifier; import org.junit.Test; @@ -22,8 +24,8 @@ public class Card_V1_036Tests return new GenericCardTestHelper( new HashMap() {{ - put("card", "151_36"); - // put other cards in here as needed for the test case + put("vile", "151_36"); + put("spear", "1_182"); }}, GenericCardTestHelper.FellowshipSites, GenericCardTestHelper.FOTRFrodo, @@ -31,9 +33,7 @@ public class Card_V1_036Tests ); } - // Uncomment both @Test markers below once this is ready to be used - - //@Test + @Test public void VileTentacleStatsAndKeywordsAreCorrect() throws DecisionResultInvalidException, CardNotFoundException { /** @@ -47,39 +47,90 @@ public class Card_V1_036Tests * Strength: 7 * Vitality: 2 * Site Number: 4 - * Game Text: Tentacle. This minion may not bear possessions and is discarded if not at a marsh. - * Shadow: Discard this minion from hand to make the current site gain marsh until the fellowship moves. + * Game Text: Tentacle. This minion may not bear possessions and is strength -4 while not at a marsh. + * Shadow: Discard a [moria] card from hand to make the current site gain marsh until the regroup phase. */ //Pre-game setup GenericCardTestHelper scn = GetScenario(); - PhysicalCardImpl card = scn.GetFreepsCard("card"); + PhysicalCardImpl vile = scn.GetFreepsCard("vile"); - assertFalse(card.getBlueprint().isUnique()); - assertTrue(scn.HasKeyword(card, Keyword.SUPPORT_AREA)); // test for keywords as needed - assertEquals(3, card.getBlueprint().getTwilightCost()); - assertEquals(7, card.getBlueprint().getStrength()); - assertEquals(2, card.getBlueprint().getVitality()); - //assertEquals(, card.getBlueprint().getResistance()); - //assertEquals(Signet., card.getBlueprint().getSignet()); - assertEquals(4, card.getBlueprint().getSiteNumber()); // Change this to getAllyHomeSiteNumbers for allies - assertEquals(CardType.MINION, card.getBlueprint().getCardType()); - assertEquals(Culture.MORIA, card.getBlueprint().getCulture()); - assertEquals(Side.FREE_PEOPLE, card.getBlueprint().getSide()); + assertFalse(vile.getBlueprint().isUnique()); + assertTrue(scn.HasKeyword(vile, Keyword.TENTACLE)); // test for keywords as needed + assertEquals(3, vile.getBlueprint().getTwilightCost()); + assertEquals(7, vile.getBlueprint().getStrength()); + assertEquals(2, vile.getBlueprint().getVitality()); + assertEquals(4, vile.getBlueprint().getSiteNumber()); // Change this to getAllyHomeSiteNumbers for allies + assertEquals(CardType.MINION, vile.getBlueprint().getCardType()); + assertEquals(Race.CREATURE, vile.getBlueprint().getRace()); + assertEquals(Culture.MORIA, vile.getBlueprint().getCulture()); + assertEquals(Side.SHADOW, vile.getBlueprint().getSide()); } - //@Test - public void VileTentacleTest1() throws DecisionResultInvalidException, CardNotFoundException { + @Test + public void VileTentacleCannotBearPossessions() throws DecisionResultInvalidException, CardNotFoundException { //Pre-game setup GenericCardTestHelper scn = GetScenario(); - PhysicalCardImpl card = scn.GetFreepsCard("card"); - scn.FreepsMoveCardToHand(card); + PhysicalCardImpl vile = scn.GetShadowCard("vile"); + PhysicalCardImpl spear = scn.GetShadowCard("spear"); + scn.ShadowMoveCardToHand(vile, spear); scn.StartGame(); - scn.FreepsPlayCard(card); + scn.SetTwilight(3); + scn.ApplyAdHocModifier(new KeywordModifier(null, Filters.siteNumber(2), Keyword.MARSH)); + scn.FreepsSkipCurrentPhaseAction(); + scn.ShadowPlayCard(vile); - assertEquals(3, scn.GetTwilight()); + assertFalse(scn.ShadowActionAvailable("Goblin Spear")); + } + + @Test + public void VileTentacleDoesNotSelfDiscardAtAMarsh() throws DecisionResultInvalidException, CardNotFoundException { + //Pre-game setup + GenericCardTestHelper scn = GetScenario(); + + PhysicalCardImpl vile = scn.GetShadowCard("vile"); + scn.ShadowMoveCardToHand(vile); + + scn.StartGame(); + scn.SetTwilight(5); + scn.FreepsSkipCurrentPhaseAction(); + scn.ShadowPlayCard(vile); + + assertEquals(0, scn.GetShadowDiscardCount()); + } + + @Test + public void VileTentacleHandDiscardToAddMarsh() throws DecisionResultInvalidException, CardNotFoundException { + //Pre-game setup + GenericCardTestHelper scn = GetScenario(); + + PhysicalCardImpl vile = scn.GetShadowCard("vile"); + PhysicalCardImpl spear = scn.GetShadowCard("spear"); + scn.ShadowMoveCardToHand(vile, spear); + + scn.StartGame(); + scn.SetTwilight(5); + scn.FreepsSkipCurrentPhaseAction(); + scn.ShadowPlayCard(vile); + + assertTrue(scn.ShadowActionAvailable("Vile Tentacle")); + + assertEquals(3, scn.GetStrength(vile)); + assertEquals(0, scn.GetShadowDiscardCount()); + assertEquals(1, scn.GetShadowHandCount()); + assertFalse(scn.HasKeyword(scn.GetCurrentSite(), Keyword.MARSH)); + scn.ShadowUseCardAction(vile); + + assertEquals(7, scn.GetStrength(vile)); + assertEquals(1, scn.GetShadowDiscardCount()); + assertEquals(0, scn.GetShadowHandCount()); + assertTrue(scn.HasKeyword(scn.GetCurrentSite(), Keyword.MARSH)); + + scn.SkipToPhase(Phase.REGROUP); + assertEquals(3, scn.GetStrength(vile)); + assertFalse(scn.HasKeyword(scn.GetCurrentSite(), Keyword.MARSH)); } }