From d78e7ab41c9e1151a1b76ce0bd1bef8e876bf695 Mon Sep 17 00:00:00 2001 From: Christian 'ketura' McCarty Date: Sun, 4 Jun 2023 23:00:58 -0500 Subject: [PATCH] Sent Back and Underfoot errata; spec tests only --- .../set09/set09-Gandalf-errata-playtest.hjson | 81 ++++++++++++++++ .../pc/errata/set10/set10-Raider-errata.hjson | 95 +++++++++++++++++++ .../errata/set09/Card_09_027_ErrataTests.java | 75 +++++++++++++++ .../errata/set10/Card_10_052_ErrataTests.java | 75 +++++++++++++++ 4 files changed, 326 insertions(+) create mode 100644 gemp-lotr/gemp-lotr-cards/src/main/resources/cards/unofficial/pc/errata/set10/set10-Raider-errata.hjson create mode 100644 gemp-lotr/gemp-lotr-server/src/test/java/com/gempukku/lotro/cards/unofficial/pc/errata/set09/Card_09_027_ErrataTests.java create mode 100644 gemp-lotr/gemp-lotr-server/src/test/java/com/gempukku/lotro/cards/unofficial/pc/errata/set10/Card_10_052_ErrataTests.java diff --git a/gemp-lotr/gemp-lotr-cards/src/main/resources/cards/unofficial/pc/errata/set09/set09-Gandalf-errata-playtest.hjson b/gemp-lotr/gemp-lotr-cards/src/main/resources/cards/unofficial/pc/errata/set09/set09-Gandalf-errata-playtest.hjson index 18f399037..201a34db7 100644 --- a/gemp-lotr/gemp-lotr-cards/src/main/resources/cards/unofficial/pc/errata/set09/set09-Gandalf-errata-playtest.hjson +++ b/gemp-lotr/gemp-lotr-cards/src/main/resources/cards/unofficial/pc/errata/set09/set09-Gandalf-errata-playtest.hjson @@ -149,4 +149,85 @@ } } } + + 79_27: { + cardInfo: { + //Either a full URL, or a subpath for the PC image server + imagePath: errata/LOTR-EN09E027.1_card.jpg + //If this is true, then all gameplay-related info outside this cardInfo definition + // will be ignored and the java class loaded instead. + javaClass: false + //This instructs the blueprint generator to insert this card as an alt of the listed + // parent blueprint. Can of course be ommitted if not an errata or promo. + parent: 9_27 + //This is the tree path to use within the alts structure on the parent. + // Can of course be ommitted if parent is null. + parentPath: errata/pc + //Versioning differentiates releases within a particular alt path, such as PC errata + // version 1 vs version 2. PC version 2 will not conflict with, say, Decipher version 2. + //Top-level cards should always be version 0. + version: 1 + collInfo: 9R27 + rarity: R + setNum: "9" + cardNum: 27 + // Standard, Masterwork, Tengwar, FullArt, etc. Top-level cards are always Standard. + style: Standard + } + title: Sent Back + unique: false + side: Free Peoples + culture: Gandalf + twilight: 2 + type: Condition + keyword: support area + effects: [ + { + type: activated + phase: skirmish + cost: { + type: discard + filter: self + } + effect: [ + { + type: chooseActiveCards + text: Choose Wizard to put in dead pile + filter: choose(wizard,inSkirmish) + memorize: chosenWizard + } + { + type: discard + filter: all(minion,inSkirmishAgainst(memory(chosenWizard))) + } + { + type: kill + filter: memory(chosenWizard) + } + ] + } + { + type: activated + phase: [ + fellowship + ] + effect: { + type: play + filter: choose(wizard) + ignoreInDeadPile: true + } + } + ] + gametext: Skirmish: Discard this condition to discard each minion skirmishing your Wizard. Place that Wizard in your dead pile.
Fellowship: Play a Wizard (even if another copy of that Wizard is in your dead pile). + lore: "'The Sun shines through you.'" + promotext: "" + alts: { + //These are just CardInfo objects + promos: { + } + //These are full card definitions, with redundant info that is the same as the original card ommitted + errata: { + } + } + } } diff --git a/gemp-lotr/gemp-lotr-cards/src/main/resources/cards/unofficial/pc/errata/set10/set10-Raider-errata.hjson b/gemp-lotr/gemp-lotr-cards/src/main/resources/cards/unofficial/pc/errata/set10/set10-Raider-errata.hjson new file mode 100644 index 000000000..671e4f97e --- /dev/null +++ b/gemp-lotr/gemp-lotr-cards/src/main/resources/cards/unofficial/pc/errata/set10/set10-Raider-errata.hjson @@ -0,0 +1,95 @@ +{ + + 80_52: { + cardInfo: { + //Either a full URL, or a subpath for the PC image server + imagePath: errata/LOTR-EN10E052.1_card.jpg + //If this is true, then all gameplay-related info outside this cardInfo definition + // will be ignored and the java class loaded instead. + javaClass: false + //This instructs the blueprint generator to insert this card as an alt of the listed + // parent blueprint. Can of course be ommitted if not an errata or promo. + parent: 10_52 + //This is the tree path to use within the alts structure on the parent. + // Can of course be ommitted if parent is null. + parentPath: errata/pc + //Versioning differentiates releases within a particular alt path, such as PC errata + // version 1 vs version 2. PC version 2 will not conflict with, say, Decipher version 2. + //Top-level cards should always be version 0. + version: 1 + collInfo: 10C52 + rarity: C + setNum: "10" + cardNum: 52 + // Standard, Masterwork, Tengwar, FullArt, etc. Top-level cards are always Standard. + style: Standard + } + title: Under Foot + unique: true + side: Shadow + culture: Raider + twilight: 1 + type: Condition + keyword: support area + effects: [ + { + type: activated + phase: shadow + limitPerPhase: 1 + requires: [ + { + type: HaveInitiative + side: shadow + } + { + type: CanSpot + filter: culture(raider),man + } + ] + effect: [ + { + type: ReconcileHand + player: you + } + { + type: AddTrigger + optional: false + until: end(Regroup) + trigger: { + type: StartOfPhase + phase: regroup + } + effect: { + type: discard + filter: self + } + } + ] + }, + { + type: activated + phase: skirmish + cost: { + type: discard + filter: self + } + effect: { + type: modifyStrength + filter: choose(culture(raider),man) + amount: 2 + } + } + ] + gametext: Shadow: If you have initiative, spot a [raider] Man to reconcile your hand (limit once per phase). At the start of the regroup phase, discard this condition.
Skirmish: Discard this condition to make a [raider] Man strength +2. + lore: "'I make the earth shake, / As I tramp through the grass; / Trees crack as I pass.'" + promotext: "" + alts: { + //These are just CardInfo objects + promos: { + } + //These are full card definitions, with redundant info that is the same as the original card ommitted + errata: { + } + } + } +} diff --git a/gemp-lotr/gemp-lotr-server/src/test/java/com/gempukku/lotro/cards/unofficial/pc/errata/set09/Card_09_027_ErrataTests.java b/gemp-lotr/gemp-lotr-server/src/test/java/com/gempukku/lotro/cards/unofficial/pc/errata/set09/Card_09_027_ErrataTests.java new file mode 100644 index 000000000..af94d313a --- /dev/null +++ b/gemp-lotr/gemp-lotr-server/src/test/java/com/gempukku/lotro/cards/unofficial/pc/errata/set09/Card_09_027_ErrataTests.java @@ -0,0 +1,75 @@ +package com.gempukku.lotro.cards.unofficial.pc.errata.set09; + +import com.gempukku.lotro.cards.GenericCardTestHelper; +import com.gempukku.lotro.common.CardType; +import com.gempukku.lotro.common.Culture; +import com.gempukku.lotro.common.Keyword; +import com.gempukku.lotro.common.Side; +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_09_027_ErrataTests +{ + + protected GenericCardTestHelper GetScenario() throws CardNotFoundException, DecisionResultInvalidException { + return new GenericCardTestHelper( + new HashMap<>() + {{ + put("sentback", "79_27"); + // put other cards in here as needed for the test case + }}, + GenericCardTestHelper.FellowshipSites, + GenericCardTestHelper.FOTRFrodo, + GenericCardTestHelper.FOTRRing + ); + } + + @Test + public void SentBackStatsAndKeywordsAreCorrect() throws DecisionResultInvalidException, CardNotFoundException { + + /** + * Set: 9 + * Title: Sent Back + * Unique: False + * Side: FREE_PEOPLE + * Culture: Gandalf + * Twilight Cost: 2 + * Type: condition + * Subtype: Support Area + * Game Text: Skirmish: Discard this condition to discard each minion skirmishing your Wizard. + * Place that Wizard in your dead pile. + * Fellowship: Play a Wizard (even if another copy of that Wizard is in your dead pile). + */ + + //Pre-game setup + var scn = GetScenario(); + + var sentback = scn.GetFreepsCard("sentback"); + + assertFalse(sentback.getBlueprint().isUnique()); + assertEquals(Side.FREE_PEOPLE, sentback.getBlueprint().getSide()); + assertEquals(Culture.GANDALF, sentback.getBlueprint().getCulture()); + assertEquals(CardType.CONDITION, sentback.getBlueprint().getCardType()); + assertTrue(scn.HasKeyword(sentback, Keyword.SUPPORT_AREA)); + assertEquals(2, sentback.getBlueprint().getTwilightCost()); + } + + //@Test + public void SentBackTest1() throws DecisionResultInvalidException, CardNotFoundException { + //Pre-game setup + var scn = GetScenario(); + + var card = scn.GetFreepsCard("card"); + scn.FreepsMoveCardToHand(card); + + scn.StartGame(); + scn.FreepsPlayCard(card); + + assertEquals(2, scn.GetTwilight()); + } +} diff --git a/gemp-lotr/gemp-lotr-server/src/test/java/com/gempukku/lotro/cards/unofficial/pc/errata/set10/Card_10_052_ErrataTests.java b/gemp-lotr/gemp-lotr-server/src/test/java/com/gempukku/lotro/cards/unofficial/pc/errata/set10/Card_10_052_ErrataTests.java new file mode 100644 index 000000000..4d84ac588 --- /dev/null +++ b/gemp-lotr/gemp-lotr-server/src/test/java/com/gempukku/lotro/cards/unofficial/pc/errata/set10/Card_10_052_ErrataTests.java @@ -0,0 +1,75 @@ +package com.gempukku.lotro.cards.unofficial.pc.errata.set10; + +import com.gempukku.lotro.cards.GenericCardTestHelper; +import com.gempukku.lotro.common.CardType; +import com.gempukku.lotro.common.Culture; +import com.gempukku.lotro.common.Keyword; +import com.gempukku.lotro.common.Side; +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.assertEquals; +import static org.junit.Assert.assertTrue; + +public class Card_10_052_ErrataTests +{ + + protected GenericCardTestHelper GetScenario() throws CardNotFoundException, DecisionResultInvalidException { + return new GenericCardTestHelper( + new HashMap<>() + {{ + put("underfoot", "80_52"); + // put other cards in here as needed for the test case + }}, + GenericCardTestHelper.FellowshipSites, + GenericCardTestHelper.FOTRFrodo, + GenericCardTestHelper.FOTRRing + ); + } + + @Test + public void UnderFootStatsAndKeywordsAreCorrect() throws DecisionResultInvalidException, CardNotFoundException { + + /** + * Set: 10 + * Title: Under Foot + * Unique: True + * Side: SHADOW + * Culture: Raider + * Twilight Cost: 1 + * Type: condition + * Subtype: Support Area + * Game Text: Shadow: If you have initiative, spot a [raider] Man to reconcile your hand (limit once per phase). At the start of the regroup phase, discard this condition. + * Skirmish: Discard this condition to make a [raider] Man strength +2. + */ + + //Pre-game setup + var scn = GetScenario(); + + var underfoot = scn.GetFreepsCard("underfoot"); + + assertTrue(underfoot.getBlueprint().isUnique()); + assertEquals(Side.SHADOW, underfoot.getBlueprint().getSide()); + assertEquals(Culture.RAIDER, underfoot.getBlueprint().getCulture()); + assertEquals(CardType.CONDITION, underfoot.getBlueprint().getCardType());; + assertTrue(scn.HasKeyword(underfoot, Keyword.SUPPORT_AREA)); + assertEquals(1, underfoot.getBlueprint().getTwilightCost()); + } + + //@Test + public void UnderFootTest1() throws DecisionResultInvalidException, CardNotFoundException { + //Pre-game setup + var scn = GetScenario(); + + var card = scn.GetFreepsCard("card"); + scn.FreepsMoveCardToHand(card); + + scn.StartGame(); + scn.FreepsPlayCard(card); + + assertEquals(1, scn.GetTwilight()); + } +}