From cc77db87625123007919db7612f40986a191921f Mon Sep 17 00:00:00 2001 From: Christian 'ketura' McCarty Date: Sun, 28 Feb 2021 23:22:31 -0600 Subject: [PATCH] Updated April errata batch to the latest design. Updated tests to match. --- .../main/web/cards/set51/set01-errata.json | 34 ++++++---- .../main/web/cards/set51/set03-errata.json | 59 ++++++++--------- .../pc/errata/set1/Elrond_LoRErrataTests.java | 34 ++++++++-- .../pc/errata/set1/Sam_SoHErrataTests.java | 4 +- .../errata/set3/HornOfBoromirErrataTests.java | 46 +++---------- .../errata/set3/Saruman_KoIErrataTests.java | 65 ++++++++++--------- 6 files changed, 126 insertions(+), 116 deletions(-) diff --git a/gemp-lotr/gemp-lotr-async/src/main/web/cards/set51/set01-errata.json b/gemp-lotr/gemp-lotr-async/src/main/web/cards/set51/set01-errata.json index d72e9e029..2a4b25294 100644 --- a/gemp-lotr/gemp-lotr-async/src/main/web/cards/set51/set01-errata.json +++ b/gemp-lotr/gemp-lotr-async/src/main/web/cards/set51/set01-errata.json @@ -22,7 +22,7 @@ "effect": { "type": "heal", "filter": "choose(ally,allyHome(fellowship,3))", - "count": "0-2" + "count": "0-3" } }, { @@ -31,7 +31,16 @@ "cost": { "type": "exert", "filter": "self", - "times": 2 + "times": { + "type": "condition", + "condition": { + "type": "canSpot", + "count": 2, + "filter": "not(self),culture(elven),ally" + }, + "true": 1, + "false": 2 + } }, "effect": { "type": "drawCards" @@ -261,15 +270,18 @@ { "type": "activated", "phase": "fellowship", - "condition": { - "type": "canSpot", - "filter": "name(Frodo)" - }, - "cost": { - "type": "exert", - "filter": "self", - "times": 2 - }, + "cost": [ + { + "type": "exert", + "filter": "self", + "times": 1 + }, + { + "type": "exert", + "filter": "choose(another,companion)", + "times": 1 + } + ], "effect": { "type": "removeBurdens", "amount": 1 diff --git a/gemp-lotr/gemp-lotr-async/src/main/web/cards/set51/set03-errata.json b/gemp-lotr/gemp-lotr-async/src/main/web/cards/set51/set03-errata.json index dff2ee944..ad682cb9f 100644 --- a/gemp-lotr/gemp-lotr-async/src/main/web/cards/set51/set03-errata.json +++ b/gemp-lotr/gemp-lotr-async/src/main/web/cards/set51/set03-errata.json @@ -8,31 +8,21 @@ "target": "name(Boromir)", "effects": { "type": "activated", - "phase": "assignment", - "condition": { - "type": "canSpot", - "filter": "bearer,notAssignedToSkirmish" - }, + "phase": "maneuver", "cost": [ { "type": "exert", - "filter": "bearer" + "filter": "bearer", + "times": 1 + }, + { + "type": "exert", + "filter": "choose(ally)", + "memorize": "summonedAlly", + "times": 1 } ], "effect":[ - { - "type": "assignFpCharacterToSkirmish", - "player": "fp", - "fpCharacter": "bearer", - "against": "choose(minion)" - }, - { - "type": "modifyStrength", - "filter": "choose(ally,allyInCurrentRegion)", - "amount": 3, - "until": "start(regroup)", - "memorize": "summonedAlly" - }, { "type": "allyCanParticipateInArcheryFireAndSkirmishes", "filter": "memory(summonedAlly)", @@ -83,18 +73,25 @@ "filter": "self", "times": 1 }, - "effect": [ - { - "type": "preventWound", - "filter": "choose(uruk-hai)", - "memorize": "uruk" - }, - { - "type": "addKeyword", - "filter": "memory(uruk)", - "keyword": "fierce" - } - ] + "effect": + { + "type": "preventWound", + "filter": "choose(uruk-hai)" + } + }, + { + "type": "activated", + "phase": "maneuver", + "cost": { + "type": "exert", + "filter": "self", + "times": 1 + }, + "effect": { + "type": "addKeyword", + "filter": "choose(uruk-hai)", + "keyword": "fierce" + } }, ] }, diff --git a/gemp-lotr/gemp-lotr-server/src/test/java/com/gempukku/lotro/cards/unofficial/pc/errata/set1/Elrond_LoRErrataTests.java b/gemp-lotr/gemp-lotr-server/src/test/java/com/gempukku/lotro/cards/unofficial/pc/errata/set1/Elrond_LoRErrataTests.java index 220648842..afd4be1de 100644 --- a/gemp-lotr/gemp-lotr-server/src/test/java/com/gempukku/lotro/cards/unofficial/pc/errata/set1/Elrond_LoRErrataTests.java +++ b/gemp-lotr/gemp-lotr-server/src/test/java/com/gempukku/lotro/cards/unofficial/pc/errata/set1/Elrond_LoRErrataTests.java @@ -42,7 +42,7 @@ public class Elrond_LoRErrataTests {{ put("elrond", "51_1040"); put("allyHome3_1", "1_60"); - put("allyHome3_2", "1_27"); + put("allyHome3_2", "1_27"); // tharin put("allyHome6_1", "1_56"); put("allyHome6_2", "1_57"); }} @@ -50,7 +50,7 @@ public class Elrond_LoRErrataTests } @Test - public void FellowshipActionExertsTwiceToDrawACard() throws DecisionResultInvalidException, CardNotFoundException { + public void FellowshipActionExertsTwiceToDrawACardIfNoAllies() throws DecisionResultInvalidException, CardNotFoundException { //Pre-game setup GenericCardTestHelper scn = GetSimpleDeckScenario(); PhysicalCardImpl elrond = scn.GetFreepsCard("elrond"); @@ -73,6 +73,32 @@ public class Elrond_LoRErrataTests assertEquals(0, scn.GetFreepsDeckCount()); } + @Test + public void FellowshipActionExertsOnceToDrawACardIf2Allies() throws DecisionResultInvalidException, CardNotFoundException { + //Pre-game setup + GenericCardTestHelper scn = GetHome3AllyScenario(); + PhysicalCardImpl elrond = scn.GetFreepsCard("elrond"); + scn.FreepsMoveCharToTable("allyHome3_1"); + scn.FreepsMoveCharToTable("allyHome6_1"); + + scn.FreepsMoveCharToTable(elrond); + + scn.StartGame(); + + assertEquals(Phase.FELLOWSHIP, scn.GetCurrentPhase()); + assertTrue(scn.FreepsCardActionAvailable(elrond)); + + assertEquals(0, scn.GetWoundsOn(elrond)); + assertEquals(0, scn.GetFreepsHandCount()); + //assertEquals(2, scn.GetFreepsDeckCount()); + + scn.FreepsUseCardAction(elrond); + + assertEquals(1, scn.GetWoundsOn(elrond)); + assertEquals(1, scn.GetFreepsHandCount()); + //assertEquals(1, scn.GetFreepsDeckCount()); + } + @Test public void CardCanPlayIfGandalfInPlay() throws DecisionResultInvalidException, CardNotFoundException { //Pre-game setup @@ -112,7 +138,7 @@ public class Elrond_LoRErrataTests } @Test - public void AllyHealsCappedAt2() throws DecisionResultInvalidException, CardNotFoundException { + public void AllyHealsCappedAt3() throws DecisionResultInvalidException, CardNotFoundException { //Pre-game setup GenericCardTestHelper scn = GetHome3AllyScenario(); scn.FreepsMoveCharToTable("elrond"); @@ -133,6 +159,6 @@ public class Elrond_LoRErrataTests assertEquals(3, scn.FreepsGetADParamAsList("cardId").size()); assertEquals("0", scn.FreepsGetADParam("min")); - assertEquals("2", scn.FreepsGetADParam("max")); + assertEquals("3", scn.FreepsGetADParam("max")); } } diff --git a/gemp-lotr/gemp-lotr-server/src/test/java/com/gempukku/lotro/cards/unofficial/pc/errata/set1/Sam_SoHErrataTests.java b/gemp-lotr/gemp-lotr-server/src/test/java/com/gempukku/lotro/cards/unofficial/pc/errata/set1/Sam_SoHErrataTests.java index f76a955cb..844f92fb9 100644 --- a/gemp-lotr/gemp-lotr-server/src/test/java/com/gempukku/lotro/cards/unofficial/pc/errata/set1/Sam_SoHErrataTests.java +++ b/gemp-lotr/gemp-lotr-server/src/test/java/com/gempukku/lotro/cards/unofficial/pc/errata/set1/Sam_SoHErrataTests.java @@ -38,11 +38,13 @@ public class Sam_SoHErrataTests assertTrue(scn.FreepsCardActionAvailable(sam)); assertEquals(0, scn.GetWoundsOn(sam)); + assertEquals(0, scn.GetWoundsOn(frodo)); assertEquals(1, scn.GetBurdens()); scn.FreepsUseCardAction(sam); - assertEquals(2, scn.GetWoundsOn(sam)); + assertEquals(1, scn.GetWoundsOn(sam)); + assertEquals(1, scn.GetWoundsOn(frodo)); assertEquals(0, scn.GetBurdens()); } diff --git a/gemp-lotr/gemp-lotr-server/src/test/java/com/gempukku/lotro/cards/unofficial/pc/errata/set3/HornOfBoromirErrataTests.java b/gemp-lotr/gemp-lotr-server/src/test/java/com/gempukku/lotro/cards/unofficial/pc/errata/set3/HornOfBoromirErrataTests.java index 1cea03749..1e495e97e 100644 --- a/gemp-lotr/gemp-lotr-server/src/test/java/com/gempukku/lotro/cards/unofficial/pc/errata/set3/HornOfBoromirErrataTests.java +++ b/gemp-lotr/gemp-lotr-server/src/test/java/com/gempukku/lotro/cards/unofficial/pc/errata/set3/HornOfBoromirErrataTests.java @@ -76,7 +76,7 @@ public class HornOfBoromirErrataTests } @Test - public void AbilityExertsAndAssignsBoromir() throws DecisionResultInvalidException, CardNotFoundException { + public void AbilityExertsAndBoromirAndAllyToSkirmish() throws DecisionResultInvalidException, CardNotFoundException { //Pre-game setup GenericCardTestHelper scn = GetFOTRScenario(); @@ -97,52 +97,22 @@ public class HornOfBoromirErrataTests scn.FreepsPlayCard(horn); - scn.SkipToPhase(Phase.ASSIGNMENT); + scn.SkipToPhase(Phase.MANEUVER); assertTrue(scn.FreepsCardActionAvailable(horn)); scn.FreepsUseCardAction(horn); - scn.FreepsChooseCard(runner1); assertEquals(1, scn.GetWoundsOn(boromir)); - assertEquals(11, scn.GetStrength(elrond)); - //Skip shadow player's action + assertEquals(1, scn.GetWoundsOn(elrond)); + //Base version pumps strength, ensure that's not the case here. + assertEquals(8, scn.GetStrength(elrond)); + + scn.SkipToPhase(Phase.ASSIGNMENT); + scn.SkipCurrentPhaseActions(); - assertFalse(scn.FreepsCardActionAvailable(horn)); - scn.SkipCurrentPhaseActions(); - assertTrue(scn.IsCharAssigned(boromir)); scn.FreepsAssignToMinion(elrond, runner2); assertTrue(scn.IsCharAssigned(elrond)); } - @Test - public void AbilityDoesNotPumpFarAwayAllies() throws DecisionResultInvalidException, CardNotFoundException { - GenericCardTestHelper scn = GetMovieScenario(); - PhysicalCardImpl elrond = scn.GetFreepsCard("elrond"); - PhysicalCardImpl boromir = scn.GetFreepsCard("boromir"); - PhysicalCardImpl horn = scn.GetFreepsCard("horn"); - PhysicalCardImpl runner1 = scn.GetShadowCard("runner1"); - PhysicalCardImpl runner2 = scn.GetShadowCard("runner2"); - - scn.FreepsMoveCharToTable(elrond); - scn.FreepsMoveCharToTable(boromir); - scn.FreepsMoveCardToHand(horn); - - scn.ShadowMoveCharToTable(runner1); - scn.ShadowMoveCharToTable(runner2); - - scn.StartGame(); - - scn.FreepsPlayCard(horn); - - scn.SkipToPhase(Phase.ASSIGNMENT); - scn.FreepsUseCardAction(horn); - scn.FreepsChooseCard(runner1); - - assertEquals(1, scn.GetWoundsOn(boromir)); - assertEquals(8, scn.GetStrength(elrond)); - //Skip shadow player's action - scn.SkipCurrentPhaseActions(); - - } } diff --git a/gemp-lotr/gemp-lotr-server/src/test/java/com/gempukku/lotro/cards/unofficial/pc/errata/set3/Saruman_KoIErrataTests.java b/gemp-lotr/gemp-lotr-server/src/test/java/com/gempukku/lotro/cards/unofficial/pc/errata/set3/Saruman_KoIErrataTests.java index f05ec2222..469dbcf27 100644 --- a/gemp-lotr/gemp-lotr-server/src/test/java/com/gempukku/lotro/cards/unofficial/pc/errata/set3/Saruman_KoIErrataTests.java +++ b/gemp-lotr/gemp-lotr-server/src/test/java/com/gempukku/lotro/cards/unofficial/pc/errata/set3/Saruman_KoIErrataTests.java @@ -31,33 +31,26 @@ public class Saruman_KoIErrataTests ); } - @Test - public void SarumanWorks() throws DecisionResultInvalidException, CardNotFoundException { + public void SarumanImmunityAndWoundBlock() throws DecisionResultInvalidException, CardNotFoundException { //Pre-game setup GenericCardTestHelper scn = GetScenario(); PhysicalCardImpl legolas = scn.GetFreepsCard("legolas"); - PhysicalCardImpl tale = scn.GetFreepsCard("tale"); - PhysicalCardImpl doubleshot = scn.GetFreepsCard("doubleshot"); PhysicalCardImpl saruman = scn.GetShadowCard("saruman"); PhysicalCardImpl uruk1 = scn.GetShadowCard("uruk1"); PhysicalCardImpl uruk2 = scn.GetShadowCard("uruk2"); + scn.FreepsMoveCharToTable(legolas); - scn.FreepsMoveCardToHand(tale); - scn.FreepsMoveCardToHand(doubleshot); scn.ShadowMoveCharToTable(saruman); scn.ShadowMoveCharToTable(uruk1); scn.ShadowMoveCharToTable(uruk2); - scn.StartGame(); - scn.FreepsPlayCard(tale); - scn.SkipToPhase(Phase.ARCHERY); //can't hit saruman @@ -72,33 +65,15 @@ public class Saruman_KoIErrataTests assertEquals(0, scn.GetWoundsOn(uruk1)); assertEquals(1, scn.GetWoundsOn(saruman)); - assertTrue(scn.HasKeyword(uruk1, Keyword.FIERCE)); + //Old version made them fierc, ensure that was removed + assertFalse(scn.HasKeyword(uruk1, Keyword.FIERCE)); //shadow has to skip archery actions scn.ShadowSkipCurrentPhaseAction(); - //Repeat the greenleaf ability to ensure the last can't be blocked by saruman - scn.FreepsUseCardAction(legolas); - scn.FreepsChooseCard(uruk1); - scn.ShadowUseCardAction(saruman); - scn.ShadowSkipCurrentPhaseAction(); - scn.FreepsUseCardAction(legolas); - scn.FreepsChooseCard(uruk1); - scn.ShadowUseCardAction(saruman); - scn.ShadowSkipCurrentPhaseAction(); - - //greenleaf is out of vitality, so play doubleshot - scn.FreepsPlayCard(doubleshot); - scn.ShadowSkipCurrentPhaseAction(); - scn.FreepsSkipCurrentPhaseAction(); - - //Archery wound - scn.ShadowChooseCard(uruk1); - - //Now that we've done 4 total wounds, we should see an exhausted saruman and an uruk1 with 1 wound - assertEquals(1, scn.GetWoundsOn(uruk1)); - assertEquals(3, scn.GetWoundsOn(saruman)); + assertEquals(0, scn.GetWoundsOn(uruk1)); + assertEquals(1, scn.GetWoundsOn(saruman)); scn.SkipToPhase(Phase.ASSIGNMENT); @@ -108,4 +83,32 @@ public class Saruman_KoIErrataTests assertEquals(2, scn.FreepsGetADParamAsList("minions").size()); } + + + @Test + public void SarumanAbilityGrantsFierce() throws DecisionResultInvalidException, CardNotFoundException { + //Pre-game setup + GenericCardTestHelper scn = GetScenario(); + + PhysicalCardImpl saruman = scn.GetShadowCard("saruman"); + PhysicalCardImpl uruk1 = scn.GetShadowCard("uruk1"); + + scn.ShadowMoveCharToTable(saruman); + scn.ShadowMoveCharToTable(uruk1); + + scn.StartGame(); + + scn.SkipToPhase(Phase.MANEUVER); + scn.FreepsSkipCurrentPhaseAction(); + + assertTrue(scn.ShadowCardActionAvailable(saruman)); + + scn.ShadowUseCardAction(saruman); + + assertTrue(scn.HasKeyword(uruk1, Keyword.FIERCE)); + + assertEquals(0, scn.GetWoundsOn(uruk1)); + assertEquals(1, scn.GetWoundsOn(saruman)); + + } }