From 33eb217ef25192a23a3e316451cf772805ec11e4 Mon Sep 17 00:00:00 2001 From: Christian 'ketura' McCarty Date: Wed, 10 Mar 2021 01:10:11 -0600 Subject: [PATCH] Updated all errata unit tests to contain the text of the card that it is tested against. Fixed Horn of Boromir not having its regroup duration tested. --- .../main/web/cards/set51/set02-errata.json | 2 +- .../main/web/cards/set51/set03-errata.json | 5 ++- .../pc/errata/set1/Elrond_LoRErrataTests.java | 34 +++++++++++++++ .../errata/set1/Galadriel_LoLErrataTests.java | 35 ++++++++++++++++ .../pc/errata/set1/NoStrangerErrataTests.java | 18 +++++++- .../pc/errata/set1/Sam_SoHErrataTests.java | 42 +++++++++++++++++-- .../pc/errata/set1/StingErrataTests.java | 26 ++++++++++++ .../errata/set1/TalentForNBSErrataTests.java | 17 +++++++- .../errata/set2/FlamingBrandErrataTests.java | 37 +++++++++++++--- .../errata/set2/Gimli_DotMrErrataTests.java | 26 +++++++++++- .../errata/set3/Aragorn_HttWCErrataTests.java | 34 +++++++++++++++ .../errata/set3/BillThePonyErrataTests.java | 36 +++++++++++++--- .../errata/set3/HornOfBoromirErrataTests.java | 30 ++++++++++++- .../errata/set3/Saruman_KoIErrataTests.java | 35 ++++++++++++++++ 14 files changed, 354 insertions(+), 23 deletions(-) diff --git a/gemp-lotr/gemp-lotr-async/src/main/web/cards/set51/set02-errata.json b/gemp-lotr/gemp-lotr-async/src/main/web/cards/set51/set02-errata.json index 77d0acf94..284d29ae6 100644 --- a/gemp-lotr/gemp-lotr-async/src/main/web/cards/set51/set02-errata.json +++ b/gemp-lotr/gemp-lotr-async/src/main/web/cards/set51/set02-errata.json @@ -1,7 +1,7 @@ { "52_32": { "side": "free_people", - "cost": 0, + "cost": 1, "strength": 1, "culture": "Gondor", "possession": "Hand Weapon", 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 e8b63a883..5f981baa7 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 @@ -1,7 +1,7 @@ { "53_42": { "side": "free_people", - "cost": 0, + "cost": 1, "culture": "Gondor", "title": "*Horn of Boromir", "type": "possession", @@ -143,6 +143,9 @@ "cost": 0, "type": "possession", "possession": "Pony", + "keyword": [ + "stealth" + ], "target": "name(Sam)", "effects": [ { 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 dd66e3362..b89d37ea7 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 @@ -1,6 +1,7 @@ package com.gempukku.lotro.cards.unofficial.pc.errata.set1; import com.gempukku.lotro.cards.GenericCardTestHelper; +import com.gempukku.lotro.common.Keyword; import com.gempukku.lotro.common.Phase; import com.gempukku.lotro.game.CardNotFoundException; import com.gempukku.lotro.game.PhysicalCardImpl; @@ -49,6 +50,39 @@ public class Elrond_LoRErrataTests ); } + @Test + public void ElrondStatsAndKeywordsAreCorrect() throws DecisionResultInvalidException, CardNotFoundException { + + /** + * Set: 1E + * Title: *Elrond + * Subtitle: Lord of Rivendell + * Side: Free Peoples + * Culture: Elven + * Twilight Cost: 4 + * Type: Ally + * Subtype: Elf + * Home: 3 + * Strength: 8 + * Vitality: 4 + * Errata Game Text: To play, spot Gandalf or an Elf. + * At the start of each of your turns, heal up to 3 allies whose home is site 3. + * Fellowship: Exert Elrond twice (or once if you can spot 2 other [elven] allies) to draw a card. + */ + + //Pre-game setup + GenericCardTestHelper scn = GetSimpleDeckScenario(); + + PhysicalCardImpl elrond = scn.GetFreepsCard("elrond"); + + assertTrue(elrond.getBlueprint().isUnique()); + assertEquals(4, elrond.getBlueprint().getTwilightCost()); + + assertEquals(8, elrond.getBlueprint().getStrength()); + assertEquals(4, elrond.getBlueprint().getVitality()); + assertEquals(3, Arrays.stream(elrond.getBlueprint().getAllyHomeSiteNumbers()).findFirst().getAsInt()); + } + @Test public void FellowshipActionExertsTwiceToDrawACardIfNoAllies() throws DecisionResultInvalidException, CardNotFoundException { //Pre-game setup diff --git a/gemp-lotr/gemp-lotr-server/src/test/java/com/gempukku/lotro/cards/unofficial/pc/errata/set1/Galadriel_LoLErrataTests.java b/gemp-lotr/gemp-lotr-server/src/test/java/com/gempukku/lotro/cards/unofficial/pc/errata/set1/Galadriel_LoLErrataTests.java index 872c12514..95e435ead 100644 --- a/gemp-lotr/gemp-lotr-server/src/test/java/com/gempukku/lotro/cards/unofficial/pc/errata/set1/Galadriel_LoLErrataTests.java +++ b/gemp-lotr/gemp-lotr-server/src/test/java/com/gempukku/lotro/cards/unofficial/pc/errata/set1/Galadriel_LoLErrataTests.java @@ -5,9 +5,12 @@ import com.gempukku.lotro.common.Phase; import com.gempukku.lotro.game.CardNotFoundException; import com.gempukku.lotro.game.PhysicalCardImpl; import com.gempukku.lotro.logic.decisions.DecisionResultInvalidException; + +import static junit.framework.Assert.assertEquals; import static org.junit.Assert.*; import org.junit.Test; +import java.util.Arrays; import java.util.HashMap; public class Galadriel_LoLErrataTests @@ -35,6 +38,38 @@ public class Galadriel_LoLErrataTests ); } + @Test + public void GaladrielStatsAndKeywordsAreCorrect() throws DecisionResultInvalidException, CardNotFoundException { + + /** + * Set: 1E + * Title: *Galadriel + * Subtitle: Lady of Light + * Side: Free Peoples + * Culture: Elven + * Twilight Cost: 3 + * Type: Ally + * Subtype: Elf + * Home: 6 + * Strength: 3 + * Vitality: 3 + * Errata Game Text: At the start of each of your turns, heal up to 3 allies whose home is site 6. + * Fellowship: Exert Galadriel to play an Elf; that Elf's twilight cost is -1. + */ + + //Pre-game setup + GenericCardTestHelper scn = GetSimplePlayScenario(); + + PhysicalCardImpl galadriel = scn.GetFreepsCard("galadriel"); + + assertTrue(galadriel.getBlueprint().isUnique()); + assertEquals(3, galadriel.getBlueprint().getTwilightCost()); + + assertEquals(3, galadriel.getBlueprint().getStrength()); + assertEquals(3, galadriel.getBlueprint().getVitality()); + assertEquals(6, Arrays.stream(galadriel.getBlueprint().getAllyHomeSiteNumbers()).findFirst().getAsInt()); + } + @Test public void FellowshipActionExertsToDiscountAnElf() throws DecisionResultInvalidException, CardNotFoundException { //Pre-game setup diff --git a/gemp-lotr/gemp-lotr-server/src/test/java/com/gempukku/lotro/cards/unofficial/pc/errata/set1/NoStrangerErrataTests.java b/gemp-lotr/gemp-lotr-server/src/test/java/com/gempukku/lotro/cards/unofficial/pc/errata/set1/NoStrangerErrataTests.java index 874951fce..61ac53d78 100644 --- a/gemp-lotr/gemp-lotr-server/src/test/java/com/gempukku/lotro/cards/unofficial/pc/errata/set1/NoStrangerErrataTests.java +++ b/gemp-lotr/gemp-lotr-server/src/test/java/com/gempukku/lotro/cards/unofficial/pc/errata/set1/NoStrangerErrataTests.java @@ -8,6 +8,7 @@ import com.gempukku.lotro.game.PhysicalCardImpl; import com.gempukku.lotro.logic.decisions.DecisionResultInvalidException; import org.junit.Test; +import java.util.Arrays; import java.util.HashMap; import static junit.framework.Assert.assertEquals; @@ -31,14 +32,27 @@ public class NoStrangerErrataTests @Test - public void NoStrangerIsUniqueAndHasStealth() throws DecisionResultInvalidException, CardNotFoundException { + public void NoStrangerStatsAndKeywordsAreCorrect() throws DecisionResultInvalidException, CardNotFoundException { + + /** + * Set: 1E + * Title: *No Stranger to the Shadows + * Side: Free Peoples + * Culture: Gondor + * Twilight Cost: 0 + * Type: Condition + * Errata Game Text: At the start of each of your turns, heal up to 3 allies whose home is site 6. + * Fellowship: Exert Galadriel to play an Elf; that Elf's twilight cost is -1. + */ + //Pre-game setup GenericCardTestHelper scn = GetScenario(); PhysicalCardImpl nostranger = scn.GetFreepsCard("nostranger"); - assertTrue(scn.HasKeyword(nostranger, Keyword.STEALTH)); assertTrue(nostranger.getBlueprint().isUnique()); + assertEquals(0, nostranger.getBlueprint().getTwilightCost()); + assertTrue(scn.HasKeyword(nostranger, Keyword.STEALTH)); } @Test 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 33b53d897..6116365b8 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 @@ -2,9 +2,12 @@ package com.gempukku.lotro.cards.unofficial.pc.errata.set1; import com.gempukku.lotro.cards.GenericCardTestHelper; import com.gempukku.lotro.common.Phase; +import com.gempukku.lotro.common.Signet; import com.gempukku.lotro.game.CardNotFoundException; import com.gempukku.lotro.game.PhysicalCardImpl; import com.gempukku.lotro.logic.decisions.DecisionResultInvalidException; + +import static junit.framework.Assert.assertEquals; import static org.junit.Assert.*; import org.junit.Test; @@ -12,7 +15,7 @@ import java.util.HashMap; public class Sam_SoHErrataTests { - protected GenericCardTestHelper GetSimpleScenario() throws CardNotFoundException, DecisionResultInvalidException { + protected GenericCardTestHelper GetScenario() throws CardNotFoundException, DecisionResultInvalidException { return new GenericCardTestHelper( new HashMap() {{ @@ -23,10 +26,43 @@ public class Sam_SoHErrataTests ); } + @Test + public void SamStatsAndKeywordsAreCorrect() throws DecisionResultInvalidException, CardNotFoundException { + + /** + * Set: 1E + * Title: *Sam + * Subtitle: Son of Hamfast + * Side: Free Peoples + * Culture: Shire + * Twilight Cost: 2 + * Type: Companion + * Subtype: Hobbit + * Strength: 3 + * Vitality: 4 + * Signet: Aragorn + * Errata Game Text: Fellowship: Exert Sam and another companion to remove a burden. + * Response: If Frodo dies, make Sam the Ring-bearer (resistance 5). + */ + + //Pre-game setup + GenericCardTestHelper scn = GetScenario(); + + PhysicalCardImpl sam = scn.GetFreepsCard("sam"); + + assertTrue(sam.getBlueprint().isUnique()); + assertEquals(2, sam.getBlueprint().getTwilightCost()); + + assertEquals(3, sam.getBlueprint().getStrength()); + assertEquals(4, sam.getBlueprint().getVitality()); + assertEquals(Signet.ARAGORN, sam.getBlueprint().getSignet()); + + } + @Test public void FellowshipActionExertsTwiceToRemoveABurden() throws DecisionResultInvalidException, CardNotFoundException { //Pre-game setup - GenericCardTestHelper scn = GetSimpleScenario(); + GenericCardTestHelper scn = GetScenario(); PhysicalCardImpl frodo = scn.GetRingBearer(); PhysicalCardImpl sam = scn.GetFreepsCard("sam"); @@ -52,7 +88,7 @@ public class Sam_SoHErrataTests @Test public void RBDeathMakesSamTheRB() throws DecisionResultInvalidException, CardNotFoundException { //Pre-game setup - GenericCardTestHelper scn = GetSimpleScenario(); + GenericCardTestHelper scn = GetScenario(); PhysicalCardImpl frodo = scn.GetRingBearer(); PhysicalCardImpl sam = scn.GetFreepsCard("sam"); diff --git a/gemp-lotr/gemp-lotr-server/src/test/java/com/gempukku/lotro/cards/unofficial/pc/errata/set1/StingErrataTests.java b/gemp-lotr/gemp-lotr-server/src/test/java/com/gempukku/lotro/cards/unofficial/pc/errata/set1/StingErrataTests.java index 7a14a7d04..a34ee5cb5 100644 --- a/gemp-lotr/gemp-lotr-server/src/test/java/com/gempukku/lotro/cards/unofficial/pc/errata/set1/StingErrataTests.java +++ b/gemp-lotr/gemp-lotr-server/src/test/java/com/gempukku/lotro/cards/unofficial/pc/errata/set1/StingErrataTests.java @@ -36,6 +36,32 @@ public class StingErrataTests ); } + @Test + public void StingStatsAndKeywordsAreCorrect() throws DecisionResultInvalidException, CardNotFoundException { + + /** + * Set: 1E + * Title: *Sting + * Side: Free Peoples + * Culture: Shire + * Twilight Cost: 1 + * Strength: +2 + * Type: Possession + * Subtype: Hand Weapon + * Errata Game Text: Bearer must be Frodo. + * Fellowship or Regroup: Exert Frodo to reveal 4 cards at random from an opponent's hand. Remove (1) for each Orc revealed (limit (2)). + */ + + //Pre-game setup + GenericCardTestHelper scn = GetScenario(); + + PhysicalCardImpl sting = scn.GetFreepsCard("sting"); + + assertTrue(sting.getBlueprint().isUnique()); + assertEquals(1, sting.getBlueprint().getTwilightCost()); + assertEquals(2, sting.getBlueprint().getStrength()); + } + @Test public void StingCanOnlyBeBorneByFrodo() throws DecisionResultInvalidException, CardNotFoundException { diff --git a/gemp-lotr/gemp-lotr-server/src/test/java/com/gempukku/lotro/cards/unofficial/pc/errata/set1/TalentForNBSErrataTests.java b/gemp-lotr/gemp-lotr-server/src/test/java/com/gempukku/lotro/cards/unofficial/pc/errata/set1/TalentForNBSErrataTests.java index 5a9702568..48a59040d 100644 --- a/gemp-lotr/gemp-lotr-server/src/test/java/com/gempukku/lotro/cards/unofficial/pc/errata/set1/TalentForNBSErrataTests.java +++ b/gemp-lotr/gemp-lotr-server/src/test/java/com/gempukku/lotro/cards/unofficial/pc/errata/set1/TalentForNBSErrataTests.java @@ -32,12 +32,27 @@ public class TalentForNBSErrataTests } @Test - public void TalentHasStealth() throws DecisionResultInvalidException, CardNotFoundException { + public void TalentStatsAndKeywordsAreCorrect() throws DecisionResultInvalidException, CardNotFoundException { + + /** + * Set: 1E + * Title: *A Talent for Not Being Seen + * Side: Free Peoples + * Culture: Shire + * Twilight Cost: 0 + * Type: Condition + * Errata Game Text: Stealth. Bearer must be Merry or Pippin. Limit 1 per character. + * Each site's Shadow number is -1. + */ + //Pre-game setup GenericCardTestHelper scn = GetScenario(); PhysicalCardImpl talent = scn.GetFreepsCard("talent"); + assertTrue(talent.getBlueprint().isUnique()); + assertEquals(0, talent.getBlueprint().getTwilightCost()); + assertTrue(scn.HasKeyword(talent, Keyword.STEALTH)); } diff --git a/gemp-lotr/gemp-lotr-server/src/test/java/com/gempukku/lotro/cards/unofficial/pc/errata/set2/FlamingBrandErrataTests.java b/gemp-lotr/gemp-lotr-server/src/test/java/com/gempukku/lotro/cards/unofficial/pc/errata/set2/FlamingBrandErrataTests.java index 4ca5653bc..5dec844d3 100644 --- a/gemp-lotr/gemp-lotr-server/src/test/java/com/gempukku/lotro/cards/unofficial/pc/errata/set2/FlamingBrandErrataTests.java +++ b/gemp-lotr/gemp-lotr-server/src/test/java/com/gempukku/lotro/cards/unofficial/pc/errata/set2/FlamingBrandErrataTests.java @@ -15,7 +15,7 @@ import static org.junit.Assert.*; public class FlamingBrandErrataTests { - protected GenericCardTestHelper GetSimpleScenario() throws CardNotFoundException, DecisionResultInvalidException { + protected GenericCardTestHelper GetScenario() throws CardNotFoundException, DecisionResultInvalidException { return new GenericCardTestHelper( new HashMap() {{ @@ -31,10 +31,35 @@ public class FlamingBrandErrataTests ); } + @Test + public void BrandStatsAndKeywordsAreCorrect() throws DecisionResultInvalidException, CardNotFoundException { + + /** + * Set: 1E + * Title: Flaming Brand + * Side: Free Peoples + * Culture: Gondor + * Twilight Cost: 1 + * Type: Possession + * Subtype: Hand Weapon + * Errata Game Text: Bearer must be a ranger. This weapon may be borne in addition to 1 other hand weapon. + * Skirmish: If bearer is skirmishing a Nazgul, discard this possession to make bearer strength +3 and damage +1. + */ + + //Pre-game setup + GenericCardTestHelper scn = GetScenario(); + + PhysicalCardImpl brand = scn.GetFreepsCard("brand"); + + assertFalse(brand.getBlueprint().isUnique()); + assertEquals(1, brand.getBlueprint().getTwilightCost()); + assertEquals(1, brand.getBlueprint().getStrength()); + } + @Test public void CanBeBorneByRangers() throws DecisionResultInvalidException, CardNotFoundException { //Pre-game setup - GenericCardTestHelper scn = GetSimpleScenario(); + GenericCardTestHelper scn = GetScenario(); PhysicalCardImpl arwen = scn.GetFreepsCard("arwen"); PhysicalCardImpl boromir = scn.GetFreepsCard("boromir"); @@ -63,7 +88,7 @@ public class FlamingBrandErrataTests @Test public void CanBeBorneTwice() throws DecisionResultInvalidException, CardNotFoundException { //Pre-game setup - GenericCardTestHelper scn = GetSimpleScenario(); + GenericCardTestHelper scn = GetScenario(); PhysicalCardImpl aragorn = scn.GetFreepsCard("aragorn"); PhysicalCardImpl brand = scn.GetFreepsCard("brand"); @@ -85,7 +110,7 @@ public class FlamingBrandErrataTests @Test public void SkirmishAbilityAvailableWhenSkirmishingNazgul() throws DecisionResultInvalidException, CardNotFoundException { //Pre-game setup - GenericCardTestHelper scn = GetSimpleScenario(); + GenericCardTestHelper scn = GetScenario(); PhysicalCardImpl aragorn = scn.GetFreepsCard("aragorn"); PhysicalCardImpl brand = scn.GetFreepsCard("brand"); @@ -106,7 +131,7 @@ public class FlamingBrandErrataTests scn.SkipToPhase(Phase.ASSIGNMENT); scn.SkipCurrentPhaseActions(); - scn.FreepsAssignToMinion(aragorn, runner); + scn.FreepsAssignToMinions(aragorn, runner); //skip assigning the nazgul scn.SkipCurrentPhaseActions(); @@ -119,7 +144,7 @@ public class FlamingBrandErrataTests //assignment for fierce skirmish scn.SkipCurrentPhaseActions(); - scn.FreepsAssignToMinion(aragorn, nazgul); + scn.FreepsAssignToMinions(aragorn, nazgul); scn.FreepsResolveSkirmish(aragorn); assertEquals(1, scn.FreepsGetAvailableActions().size()); diff --git a/gemp-lotr/gemp-lotr-server/src/test/java/com/gempukku/lotro/cards/unofficial/pc/errata/set2/Gimli_DotMrErrataTests.java b/gemp-lotr/gemp-lotr-server/src/test/java/com/gempukku/lotro/cards/unofficial/pc/errata/set2/Gimli_DotMrErrataTests.java index f97bf32ac..f7feea04f 100644 --- a/gemp-lotr/gemp-lotr-server/src/test/java/com/gempukku/lotro/cards/unofficial/pc/errata/set2/Gimli_DotMrErrataTests.java +++ b/gemp-lotr/gemp-lotr-server/src/test/java/com/gempukku/lotro/cards/unofficial/pc/errata/set2/Gimli_DotMrErrataTests.java @@ -3,6 +3,7 @@ package com.gempukku.lotro.cards.unofficial.pc.errata.set2; import com.gempukku.lotro.cards.GenericCardTestHelper; import com.gempukku.lotro.common.Keyword; import com.gempukku.lotro.common.Phase; +import com.gempukku.lotro.common.Signet; import com.gempukku.lotro.filters.Filters; import com.gempukku.lotro.game.CardNotFoundException; import com.gempukku.lotro.game.PhysicalCardImpl; @@ -28,12 +29,35 @@ public class Gimli_DotMrErrataTests } @Test - public void GimliHasDamage() throws DecisionResultInvalidException, CardNotFoundException { + public void GimliStatsAndKeywordsAreCorrect() throws DecisionResultInvalidException, CardNotFoundException { + + /** + * Set: 1E + * Title: *Gimli + * Subtitle: Dwarf of the Mountain-race + * Side: Free Peoples + * Culture: Dwarven + * Twilight Cost: 2 + * Type: Companion + * Subtype: Dwarf + * Strength: 6 + * Vitality: 3 + * Signet: Frodo + * Errata Game Text: Damage +1. Each underground site's Shadow number is -1. While the fellowship is at an underground site, Gimli is strength +1. + */ + //Pre-game setup GenericCardTestHelper scn = GetScenario(); PhysicalCardImpl gimli = scn.GetFreepsCard("gimli"); + assertTrue(gimli.getBlueprint().isUnique()); + assertEquals(2, gimli.getBlueprint().getTwilightCost()); + + assertEquals(6, gimli.getBlueprint().getStrength()); + assertEquals(3, gimli.getBlueprint().getVitality()); + assertEquals(Signet.FRODO, gimli.getBlueprint().getSignet()); + assertTrue(scn.HasKeyword(gimli, Keyword.DAMAGE)); } diff --git a/gemp-lotr/gemp-lotr-server/src/test/java/com/gempukku/lotro/cards/unofficial/pc/errata/set3/Aragorn_HttWCErrataTests.java b/gemp-lotr/gemp-lotr-server/src/test/java/com/gempukku/lotro/cards/unofficial/pc/errata/set3/Aragorn_HttWCErrataTests.java index 83c4c129a..17aa95db5 100644 --- a/gemp-lotr/gemp-lotr-server/src/test/java/com/gempukku/lotro/cards/unofficial/pc/errata/set3/Aragorn_HttWCErrataTests.java +++ b/gemp-lotr/gemp-lotr-server/src/test/java/com/gempukku/lotro/cards/unofficial/pc/errata/set3/Aragorn_HttWCErrataTests.java @@ -3,6 +3,7 @@ package com.gempukku.lotro.cards.unofficial.pc.errata.set3; import com.gempukku.lotro.cards.GenericCardTestHelper; import com.gempukku.lotro.common.Keyword; import com.gempukku.lotro.common.Phase; +import com.gempukku.lotro.common.Signet; import com.gempukku.lotro.game.CardNotFoundException; import com.gempukku.lotro.game.PhysicalCardImpl; import com.gempukku.lotro.logic.decisions.DecisionResultInvalidException; @@ -36,6 +37,39 @@ public class Aragorn_HttWCErrataTests PhysicalCardImpl aragorn = scn.GetFreepsCard("aragorn"); + + } + + @Test + public void AragornStatsAndKeywordsAreCorrect() throws DecisionResultInvalidException, CardNotFoundException { + + /** + * Set: 1E + * Title: *Aragorn + * Subtitle: Heir to the White City + * Side: Free Peoples + * Culture: Gondor + * Twilight Cost: 4 + * Type: Companion + * Subtype: Man + * Strength: 8 + * Vitality: 4 + * Signet: Frodo + * Errata Game Text: Ranger. Each time the fellowship moves during the fellowship phase, remove (1). + */ + + //Pre-game setup + GenericCardTestHelper scn = GetScenario(); + + PhysicalCardImpl aragorn = scn.GetFreepsCard("aragorn"); + + assertTrue(aragorn.getBlueprint().isUnique()); + assertEquals(4, aragorn.getBlueprint().getTwilightCost()); + + assertEquals(8, aragorn.getBlueprint().getStrength()); + assertEquals(4, aragorn.getBlueprint().getVitality()); + assertEquals(Signet.FRODO, aragorn.getBlueprint().getSignet()); + assertTrue(scn.HasKeyword(aragorn, Keyword.RANGER)); } diff --git a/gemp-lotr/gemp-lotr-server/src/test/java/com/gempukku/lotro/cards/unofficial/pc/errata/set3/BillThePonyErrataTests.java b/gemp-lotr/gemp-lotr-server/src/test/java/com/gempukku/lotro/cards/unofficial/pc/errata/set3/BillThePonyErrataTests.java index 6efc95e76..ff577d784 100644 --- a/gemp-lotr/gemp-lotr-server/src/test/java/com/gempukku/lotro/cards/unofficial/pc/errata/set3/BillThePonyErrataTests.java +++ b/gemp-lotr/gemp-lotr-server/src/test/java/com/gempukku/lotro/cards/unofficial/pc/errata/set3/BillThePonyErrataTests.java @@ -1,9 +1,7 @@ package com.gempukku.lotro.cards.unofficial.pc.errata.set3; import com.gempukku.lotro.cards.GenericCardTestHelper; -import com.gempukku.lotro.common.CardType; import com.gempukku.lotro.common.Keyword; -import com.gempukku.lotro.common.Phase; import com.gempukku.lotro.common.Zone; import com.gempukku.lotro.filters.Filters; import com.gempukku.lotro.game.CardNotFoundException; @@ -21,7 +19,7 @@ import static org.junit.Assert.assertTrue; public class BillThePonyErrataTests { - protected GenericCardTestHelper GetSimpleScenario() throws CardNotFoundException, DecisionResultInvalidException { + protected GenericCardTestHelper GetScenario() throws CardNotFoundException, DecisionResultInvalidException { return new GenericCardTestHelper( new HashMap() {{ @@ -31,10 +29,36 @@ public class BillThePonyErrataTests ); } + @Test + public void BillStatsAndKeywordsAreCorrect() throws DecisionResultInvalidException, CardNotFoundException { + + /** + * Set: 1E + * Title: *Bill the Pony + * Side: Free Peoples + * Culture: Shire + * Twilight Cost: 0 + * Type: Possession + * Subtype: Pony + * Errata Game Text: Stealth. Bearer must be Sam. + * Each site's Shadow number is -1. Discard this possession when at an underground site. + */ + + //Pre-game setup + GenericCardTestHelper scn = GetScenario(); + + PhysicalCardImpl bill = scn.GetFreepsCard("bill"); + + assertTrue(bill.getBlueprint().isUnique()); + assertEquals(0, bill.getBlueprint().getTwilightCost()); + + assertTrue(scn.HasKeyword(bill, Keyword.STEALTH)); + } + @Test public void BillCanBeBorneBySam() throws DecisionResultInvalidException, CardNotFoundException { //Pre-game setup - GenericCardTestHelper scn = GetSimpleScenario(); + GenericCardTestHelper scn = GetScenario(); PhysicalCardImpl bill = scn.GetFreepsCard("bill"); PhysicalCardImpl sam = scn.GetFreepsCard("sam"); @@ -56,7 +80,7 @@ public class BillThePonyErrataTests @Test public void BillReducesTwilight() throws DecisionResultInvalidException, CardNotFoundException { //Pre-game setup - GenericCardTestHelper scn = GetSimpleScenario(); + GenericCardTestHelper scn = GetScenario(); PhysicalCardImpl bill = scn.GetFreepsCard("bill"); PhysicalCardImpl sam = scn.GetFreepsCard("sam"); @@ -76,7 +100,7 @@ public class BillThePonyErrataTests @Test public void BillDiscardedWhenMovingToUnderground() throws DecisionResultInvalidException, CardNotFoundException { //Pre-game setup - GenericCardTestHelper scn = GetSimpleScenario(); + GenericCardTestHelper scn = GetScenario(); PhysicalCardImpl bill = scn.GetFreepsCard("bill"); PhysicalCardImpl sam = scn.GetFreepsCard("sam"); 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 424c0132b..16fe9c1fb 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 @@ -1,8 +1,8 @@ package com.gempukku.lotro.cards.unofficial.pc.errata.set3; import com.gempukku.lotro.cards.GenericCardTestHelper; +import com.gempukku.lotro.common.Keyword; import com.gempukku.lotro.common.Phase; -import com.gempukku.lotro.common.Zone; import com.gempukku.lotro.game.CardNotFoundException; import com.gempukku.lotro.game.PhysicalCardImpl; import com.gempukku.lotro.logic.decisions.DecisionResultInvalidException; @@ -43,10 +43,34 @@ public class HornOfBoromirErrataTests put("aragorn", "1_89"); put("runner1", "1_178"); + put("runner2", "1_178"); }} ); } + @Test + public void HornStatsAndKeywordsAreCorrect() throws DecisionResultInvalidException, CardNotFoundException { + + /** + * Set: 1E + * Title: *Horn of Boromir + * Side: Free Peoples + * Culture: Gondor + * Twilight Cost: 1 + * Type: Possession + * Errata Game Text: Bearer must be Boromir. + * Maneuver: Exert Boromir and discard this possession to spot an ally. Until the regroup phase, that ally is strength +3 and participates in archery fire and skirmishes. + */ + + //Pre-game setup + GenericCardTestHelper scn = GetFOTRScenario(); + + PhysicalCardImpl horn = scn.GetFreepsCard("horn"); + + assertTrue(horn.getBlueprint().isUnique()); + assertEquals(1, horn.getBlueprint().getTwilightCost()); + } + @Test public void CanBeBorneByBoromir() throws DecisionResultInvalidException, CardNotFoundException { //Pre-game setup @@ -106,8 +130,10 @@ public class HornOfBoromirErrataTests scn.SkipCurrentPhaseActions(); - scn.FreepsAssignToMinion(elrond, runner1); + scn.FreepsAssignToMinions(elrond, runner1); assertTrue(scn.IsCharAssigned(elrond)); + assertEquals(11, scn.GetStrength(elrond)); + } 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 09a215daf..a1483984e 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 @@ -3,6 +3,7 @@ package com.gempukku.lotro.cards.unofficial.pc.errata.set3; import com.gempukku.lotro.cards.GenericCardTestHelper; import com.gempukku.lotro.common.Keyword; import com.gempukku.lotro.common.Phase; +import com.gempukku.lotro.common.Signet; import com.gempukku.lotro.game.CardNotFoundException; import com.gempukku.lotro.game.PhysicalCardImpl; import com.gempukku.lotro.logic.decisions.DecisionResultInvalidException; @@ -31,6 +32,40 @@ public class Saruman_KoIErrataTests ); } + @Test + public void SarumanStatsAndKeywordsAreCorrect() throws DecisionResultInvalidException, CardNotFoundException { + + /** + * Set: 1E + * Title: *Saruman + * Subtitle: Keeper of Isengard + * Side: Shadow + * Culture: Isengard + * Twilight Cost: 4 + * Type: Minion + * Subtype: Wizard + * Strength: 8 + * Vitality: 4 + * Home Site: 4 + * Errata Game Text: Saruman may not take wounds during the archery phase and may not be assigned to a skirmish. + * Maneuver: Exert Saruman to make an Uruk-hai fierce until the regroup phase. + * Response: If an Uruk-hai is about to take a wound, exert Saruman to prevent that wound. + */ + + //Pre-game setup + GenericCardTestHelper scn = GetScenario(); + + PhysicalCardImpl saruman = scn.GetFreepsCard("saruman"); + + assertTrue(saruman.getBlueprint().isUnique()); + assertEquals(4, saruman.getBlueprint().getTwilightCost()); + + assertEquals(8, saruman.getBlueprint().getStrength()); + assertEquals(4, saruman.getBlueprint().getVitality()); + assertEquals(4, saruman.getBlueprint().getSiteNumber()); + + } + @Test public void SarumanImmunityAndWoundBlock() throws DecisionResultInvalidException, CardNotFoundException { //Pre-game setup