Adjusted Castamir/War Galley errata. Added some additional errata unit tests

This commit is contained in:
Christian 'ketura' McCarty
2022-07-07 14:08:30 -05:00
parent fdbde02865
commit 7ef469ab98
21 changed files with 630 additions and 37 deletions

View File

@@ -29,22 +29,10 @@
"vitality": 4,
"site": 4,
"keyword": [
"Fierce",
"Enduring",
"Corsair"
],
"effects": [
{
"type": "modifier",
"modifier": {
"type": "modifyStrength",
"filter": "self",
"amount": {
"type": "forEachWound",
"filter": "self",
"multiplier": 1
}
}
},
{
"type": "activated",
"phase": "shadow",
@@ -127,7 +115,7 @@
"condition": [
{
"type": "canSpot",
"filter": "self,hasTokenCount(6,raider)"
"filter": "self,hasTokenCount(4,raider)"
},
{
"type": "canSpot",

View File

@@ -410,7 +410,7 @@
{
"type": "choice",
"texts": [
"Reveal top 3 cards of your deck."
"Reveal top 3 cards of your deck.",
"Reveal top 3 cards of your opponent's deck."
],
"effects": [
@@ -427,7 +427,7 @@
"deck": "shadowPlayer"
}
]
}
},
{
"type": "optional",

View File

@@ -320,6 +320,14 @@ public class GenericCardTestHelper extends AbstractAtTest {
}
}
public void AddBurdens(int count) {
_game.getGameState().addBurdens(count);
}
public void RemoveBurdens(int count) {
_game.getGameState().removeBurdens(count);
}
public int GetTwilight() { return _game.getGameState().getTwilightPool(); }
public void SetTwilight(int amount) { _game.getGameState().setTwilight(amount); }
@@ -491,7 +499,9 @@ public class GenericCardTestHelper extends AbstractAtTest {
}
public void FreepsChoose(String choice) throws DecisionResultInvalidException { playerDecided(P1, choice); }
public void FreepsChoose(String...choices) throws DecisionResultInvalidException { playerDecided(P1, String.join(",", choices)); }
public void ShadowChoose(String choice) throws DecisionResultInvalidException { playerDecided(P2, choice); }
public void ShadowChoose(String...choices) throws DecisionResultInvalidException { playerDecided(P2, String.join(",", choices)); }
public void FreepsChooseToMove() throws DecisionResultInvalidException { playerDecided(P1, "0"); }

View File

@@ -0,0 +1,177 @@
package com.gempukku.lotro.cards.unofficial.pc.errata.set01;
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 org.junit.Test;
import java.util.HashMap;
import static junit.framework.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
public class Card_01_138_ErrataTests
{
protected GenericCardTestHelper GetScenario() throws CardNotFoundException, DecisionResultInvalidException {
return new GenericCardTestHelper(
new HashMap<String, String>()
{{
put("boromir", "1_97");
put("event", "1_116");
put("snows", "51_138");
put("uruk", "1_151");
put("runner", "1_178");
}}
);
}
@Test
public void SnowsStatsAndKeywordsAreCorrect() throws DecisionResultInvalidException, CardNotFoundException {
/**
* Set: 1E
* Title: Saruman's Snows
* Side: Shadow
* Culture: Isengard
* Twilight Cost: 2
* Type: Condition
* Errata Game Text: Spell. Weather. To play, exert an [ISENGARD] minion. Plays on a site.
* No player may play skirmish events or use skirmish special abilities during skirmishes involving an [ISENGARD]
* minion at this site.
* Discard this condition at the end of the turn.
*/
//Pre-game setup
GenericCardTestHelper scn = GetScenario();
PhysicalCardImpl snows = scn.GetFreepsCard("snows");
assertFalse(snows.getBlueprint().isUnique());
assertEquals(2, snows.getBlueprint().getTwilightCost());
assertEquals(CardType.CONDITION, snows.getBlueprint().getCardType());
assertEquals(Culture.ISENGARD, snows.getBlueprint().getCulture());
assertTrue(scn.HasKeyword(snows, Keyword.SPELL));
assertTrue(scn.HasKeyword(snows, Keyword.WEATHER));
}
@Test
public void ExertsMinionWhenPlayed() throws DecisionResultInvalidException, CardNotFoundException {
//Pre-game setup
GenericCardTestHelper scn = GetScenario();
PhysicalCardImpl snows = scn.GetShadowCard("snows");
PhysicalCardImpl uruk = scn.GetShadowCard("uruk");
scn.ShadowMoveCardToHand(snows);
scn.ShadowMoveCardToHand(uruk);
scn.StartGame();
scn.SetTwilight(10);
scn.FreepsSkipCurrentPhaseAction();
assertFalse(scn.ShadowActionAvailable("Saruman's Snows"));
scn.ShadowPlayCard(uruk);
assertTrue(scn.ShadowActionAvailable("Saruman's Snows"));
assertEquals(0, scn.GetWoundsOn(uruk));
scn.ShadowPlayCard(snows);
assertTrue(scn.ShadowDecisionAvailable("Attach"));
scn.ShadowChoose(scn.ShadowGetCardChoices().get(1));
assertEquals(1, scn.GetWoundsOn(uruk));
assertEquals(Zone.ATTACHED, snows.getZone());
}
@Test
public void DiscardsAtEndOfTurn() throws DecisionResultInvalidException, CardNotFoundException {
//Pre-game setup
GenericCardTestHelper scn = GetScenario();
PhysicalCardImpl snows = scn.GetShadowCard("snows");
PhysicalCardImpl uruk = scn.GetShadowCard("uruk");
scn.ShadowMoveCardToHand(snows);
scn.ShadowMoveCharToTable(uruk);
scn.StartGame();
scn.SetTwilight(10);
scn.FreepsSkipCurrentPhaseAction();
scn.ShadowPlayCard(snows);
scn.ShadowChoose(scn.ShadowGetCardChoices().get(1));
scn.ShadowMoveCardToDiscard(uruk);
scn.SkipToPhase(Phase.REGROUP);
scn.FreepsSkipCurrentPhaseAction();
scn.ShadowSkipCurrentPhaseAction();
scn.FreepsChooseToMove();
//After moving, Snows should still be attached
assertEquals(Zone.ATTACHED, snows.getZone());
scn.SkipToPhase(Phase.REGROUP);
scn.SkipToPhase(Phase.FELLOWSHIP);
//Now that it's the end of the turn, snows should be discarded
assertEquals(Zone.DISCARD, snows.getZone());
}
@Test
public void OnlyBlocksSkirmishStuffAgainstAnIsengardMinion() throws DecisionResultInvalidException, CardNotFoundException {
//Pre-game setup
GenericCardTestHelper scn = GetScenario();
PhysicalCardImpl snows = scn.GetShadowCard("snows");
PhysicalCardImpl uruk = scn.GetShadowCard("uruk");
PhysicalCardImpl runner = scn.GetShadowCard("runner");
PhysicalCardImpl boromir = scn.GetFreepsCard("boromir");
PhysicalCardImpl event = scn.GetFreepsCard("event");
scn.ShadowMoveCardToHand(snows);
scn.ShadowMoveCharToTable(uruk);
scn.ShadowMoveCharToTable(runner);
scn.FreepsMoveCardToHand(event);
scn.FreepsMoveCharToTable(boromir);
scn.StartGame();
scn.SetTwilight(10);
scn.FreepsSkipCurrentPhaseAction();
scn.ShadowPlayCard(snows);
scn.ShadowChoose(scn.ShadowGetCardChoices().get(0));
scn.ApplyAdHocModifier(new KeywordModifier(null, Filters.name("Uruk Savage"), Keyword.FIERCE));
scn.SkipToPhase(Phase.ASSIGNMENT);
scn.SkipCurrentPhaseActions();
scn.FreepsAssignToMinions(boromir, runner);
//skip assigning the uruk
scn.SkipCurrentPhaseActions();
//start goblin skirmish
scn.FreepsResolveSkirmish(boromir);
assertTrue(scn.FreepsActionAvailable("Play Swordarm"));
assertTrue(scn.FreepsActionAvailable("Use Boromir"));
scn.SkipCurrentPhaseActions();
//fierce skirmish
scn.SkipCurrentPhaseActions();
scn.FreepsAssignToMinions(boromir, uruk);
//actions should be disallowed by snows as the skirmish involves an isengard minion
scn.FreepsResolveSkirmish(boromir);
assertFalse(scn.FreepsActionAvailable("Play Swordarm"));
assertFalse(scn.FreepsActionAvailable("Use Boromir"));
}
}

View File

@@ -0,0 +1,37 @@
package com.gempukku.lotro.cards.unofficial.pc.errata.set01;
import com.gempukku.lotro.cards.GenericCardTestHelper;
import com.gempukku.lotro.game.CardNotFoundException;
import com.gempukku.lotro.logic.decisions.DecisionResultInvalidException;
import org.junit.Test;
import java.util.HashMap;
import static junit.framework.Assert.assertEquals;
import static junit.framework.Assert.assertTrue;
public class Card_01_195_ErrataTests
{
protected GenericCardTestHelper GetSimpleDeckScenario() throws CardNotFoundException, DecisionResultInvalidException {
return new GenericCardTestHelper(
new HashMap<String, String>()
{{
put("relics", "51_195");
}}
);
}
@Test
public void DwarfStatsAndKeywordsAreCorrect() throws DecisionResultInvalidException, CardNotFoundException {
// Each of these dwarves (and lorien elf) had their strength boosted by 1.
//Pre-game setup
GenericCardTestHelper scn = GetSimpleDeckScenario();
assertTrue( scn.GetFreepsCard("relics").getBlueprint().isUnique());
}
}

View File

@@ -0,0 +1,97 @@
package com.gempukku.lotro.cards.unofficial.pc.errata.set01;
import com.gempukku.lotro.cards.GenericCardTestHelper;
import com.gempukku.lotro.common.*;
import com.gempukku.lotro.game.CardNotFoundException;
import com.gempukku.lotro.game.PhysicalCardImpl;
import com.gempukku.lotro.logic.decisions.DecisionResultInvalidException;
import org.junit.Test;
import java.util.HashMap;
import static junit.framework.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
public class Card_01_248_ErrataTests
{
protected GenericCardTestHelper GetScenario() throws CardNotFoundException, DecisionResultInvalidException {
return new GenericCardTestHelper(
new HashMap<String, String>()
{{
put("forces1", "51_248");
put("forces2", "51_248");
put("troll", "6_103");
put("orc1", "6_102");
put("orc2", "6_102");
put("orc3", "6_102");
put("orc4", "6_102");
}}
);
}
@Test
public void ForcesStatsAndKeywordsAreCorrect() throws DecisionResultInvalidException, CardNotFoundException {
/**
* Set: 1E
* Title: Forces of Mordor
* Side: Shadow
* Culture: Sauron
* Twilight Cost: 0
* Type: Event
* Phase: Shadow
* Errata Game Text: Shadow: Exert a [SAURON] minion to add (1) for each [SAURON] Orc you can spot (limit (3)).
*/
//Pre-game setup
GenericCardTestHelper scn = GetScenario();
PhysicalCardImpl forces = scn.GetFreepsCard("forces1");
assertEquals(0, forces.getBlueprint().getTwilightCost());
assertEquals(CardType.EVENT, forces.getBlueprint().getCardType());
assertEquals(Culture.SAURON, forces.getBlueprint().getCulture());
}
@Test
public void ExertsMinionWhenPlayed() throws DecisionResultInvalidException, CardNotFoundException {
//Pre-game setup
GenericCardTestHelper scn = GetScenario();
PhysicalCardImpl forces1 = scn.GetShadowCard("forces1");
PhysicalCardImpl forces2 = scn.GetShadowCard("forces2");
PhysicalCardImpl troll = scn.GetShadowCard("troll");
PhysicalCardImpl orc1 = scn.GetShadowCard("orc1");
PhysicalCardImpl orc2 = scn.GetShadowCard("orc2");
PhysicalCardImpl orc3 = scn.GetShadowCard("orc3");
PhysicalCardImpl orc4 = scn.GetShadowCard("orc4");
scn.ShadowMoveCardToHand(forces1,forces2);
scn.ShadowMoveCharToTable(troll, orc1, orc2);
scn.StartGame();
scn.FreepsSkipCurrentPhaseAction();
assertTrue(scn.ShadowActionAvailable("Forces of Mordor"));
assertEquals(2, scn.GetTwilight());
scn.ShadowPlayCard(forces1);
assertTrue(scn.ShadowDecisionAvailable("Exert"));
assertEquals(3, scn.GetShadowCardChoiceCount());
scn.ShadowChoose(scn.ShadowGetCardChoices().get(1));
//There are 3 minions, but only 2 orcs
assertEquals(4, scn.GetTwilight());
scn.ShadowMoveCharToTable(orc3, orc4);
scn.ShadowPlayCard(forces2);
scn.ShadowChoose(scn.ShadowGetCardChoices().get(1));
//There are 5 minions, but only 4 orcs which should hit the limit of 3.
assertEquals(7, scn.GetTwilight());
}
}

View File

@@ -0,0 +1,47 @@
package com.gempukku.lotro.cards.unofficial.pc.errata.set01;
import com.gempukku.lotro.cards.GenericCardTestHelper;
import com.gempukku.lotro.game.CardNotFoundException;
import com.gempukku.lotro.logic.decisions.DecisionResultInvalidException;
import org.junit.Test;
import java.util.HashMap;
import static junit.framework.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
public class DwarfErrataTests
{
protected GenericCardTestHelper GetSimpleDeckScenario() throws CardNotFoundException, DecisionResultInvalidException {
return new GenericCardTestHelper(
new HashMap<String, String>()
{{
put("guard", "71_7");
put("farin", "71_11");
put("elf", "71_53");
put("fror", "72_6");
put("gloin", "72_7");
}}
);
}
@Test
public void DwarfStatsAndKeywordsAreCorrect() throws DecisionResultInvalidException, CardNotFoundException {
// Each of these dwarves (and lorien elf) had their strength boosted by 1.
//Pre-game setup
GenericCardTestHelper scn = GetSimpleDeckScenario();
assertEquals(5, scn.GetFreepsCard("guard").getBlueprint().getStrength());
assertEquals(5, scn.GetFreepsCard("elf").getBlueprint().getStrength());
assertEquals(6, scn.GetFreepsCard("farin").getBlueprint().getStrength());
assertEquals(6, scn.GetFreepsCard("fror").getBlueprint().getStrength());
assertEquals(6, scn.GetFreepsCard("gloin").getBlueprint().getStrength());
}
}

View File

@@ -1,7 +1,6 @@
package com.gempukku.lotro.cards.unofficial.pc.errata.set1;
package com.gempukku.lotro.cards.unofficial.pc.errata.set01;
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;

View File

@@ -1,4 +1,4 @@
package com.gempukku.lotro.cards.unofficial.pc.errata.set1;
package com.gempukku.lotro.cards.unofficial.pc.errata.set01;
import com.gempukku.lotro.cards.GenericCardTestHelper;
import com.gempukku.lotro.common.Phase;

View File

@@ -1,14 +1,12 @@
package com.gempukku.lotro.cards.unofficial.pc.errata.set1;
package com.gempukku.lotro.cards.unofficial.pc.errata.set01;
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;
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;

View File

@@ -1,4 +1,4 @@
package com.gempukku.lotro.cards.unofficial.pc.errata.set1;
package com.gempukku.lotro.cards.unofficial.pc.errata.set01;
import com.gempukku.lotro.cards.GenericCardTestHelper;
import com.gempukku.lotro.common.Phase;

View File

@@ -1,7 +1,6 @@
package com.gempukku.lotro.cards.unofficial.pc.errata.set1;
package com.gempukku.lotro.cards.unofficial.pc.errata.set01;
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;

View File

@@ -1,13 +1,10 @@
package com.gempukku.lotro.cards.unofficial.pc.errata.set1;
package com.gempukku.lotro.cards.unofficial.pc.errata.set01;
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;
import junit.framework.Assert;
import org.junit.Test;
import java.util.HashMap;

View File

@@ -1,4 +1,4 @@
package com.gempukku.lotro.cards.unofficial.pc.errata.set2;
package com.gempukku.lotro.cards.unofficial.pc.errata.set02;
import com.gempukku.lotro.cards.GenericCardTestHelper;
import com.gempukku.lotro.common.Keyword;

View File

@@ -1,4 +1,4 @@
package com.gempukku.lotro.cards.unofficial.pc.errata.set2;
package com.gempukku.lotro.cards.unofficial.pc.errata.set02;
import com.gempukku.lotro.cards.GenericCardTestHelper;
import com.gempukku.lotro.common.Keyword;

View File

@@ -1,4 +1,4 @@
package com.gempukku.lotro.cards.unofficial.pc.errata.set3;
package com.gempukku.lotro.cards.unofficial.pc.errata.set03;
import com.gempukku.lotro.cards.GenericCardTestHelper;
import com.gempukku.lotro.common.Keyword;

View File

@@ -1,4 +1,4 @@
package com.gempukku.lotro.cards.unofficial.pc.errata.set3;
package com.gempukku.lotro.cards.unofficial.pc.errata.set03;
import com.gempukku.lotro.cards.GenericCardTestHelper;
import com.gempukku.lotro.common.Keyword;

View File

@@ -1,7 +1,6 @@
package com.gempukku.lotro.cards.unofficial.pc.errata.set3;
package com.gempukku.lotro.cards.unofficial.pc.errata.set03;
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;

View File

@@ -1,9 +1,8 @@
package com.gempukku.lotro.cards.unofficial.pc.errata.set3;
package com.gempukku.lotro.cards.unofficial.pc.errata.set03;
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;

View File

@@ -0,0 +1,123 @@
package com.gempukku.lotro.cards.unofficial.pc.errata.set10;
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 org.junit.Test;
import java.util.HashMap;
import static junit.framework.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
public class Card_10_008_ErrataTests
{
protected GenericCardTestHelper GetScenario() throws CardNotFoundException, DecisionResultInvalidException {
return new GenericCardTestHelper(
new HashMap<String, String>()
{{
put("cirdan", "80_8");
put("event1", "1_37");
put("event2", "1_37");
put("event3", "1_37");
put("event4", "1_37");
put("nazgul", "1_233");
}}
);
}
@Test
public void CirdanStatsAndKeywordsAreCorrect() throws DecisionResultInvalidException, CardNotFoundException {
/**
* Set: 10E
* Title: Cirdan
* Subtitle: The Shipwright
* Side: Free Peoples
* Culture: Elven
* Twilight Cost: 4
* Type: Companion
* Race: Elf
* Strength: 7
* Vitality: 4
* Resistance: 6
* Signet: None
* Errata Game Text: To play, spot 2 Elves.
* Skirmish: Exert Cirdan to make a minion he is skirmishing strength -1 for each [ELVEN] event in your discard pile.
* If that minion is now strength 6 or less, remove 3 [ELVEN] events in your discard pile from the game.
*/
//Pre-game setup
GenericCardTestHelper scn = GetScenario();
PhysicalCardImpl cirdan = scn.GetFreepsCard("cirdan");
assertTrue(cirdan.getBlueprint().isUnique());
assertEquals(4, cirdan.getBlueprint().getTwilightCost());
assertEquals(CardType.COMPANION, cirdan.getBlueprint().getCardType());
assertEquals(Culture.ELVEN, cirdan.getBlueprint().getCulture());
assertEquals(Race.ELF, cirdan.getBlueprint().getRace());
assertEquals(7, cirdan.getBlueprint().getStrength());
assertEquals(4, cirdan.getBlueprint().getVitality());
assertEquals(6, cirdan.getBlueprint().getResistance());
}
@Test
public void ReducesMinionStrengthAndRemovesEvents() throws DecisionResultInvalidException, CardNotFoundException {
//Pre-game setup
GenericCardTestHelper scn = GetScenario();
PhysicalCardImpl cirdan = scn.GetFreepsCard("cirdan");
PhysicalCardImpl nazgul = scn.GetShadowCard("nazgul");
scn.ShadowMoveCharToTable(cirdan);
scn.FreepsMoveCardToDiscard("event1");
scn.FreepsMoveCardToDiscard("event2");
scn.FreepsMoveCardToDiscard("event3");
scn.FreepsMoveCardToDiscard("event4");
scn.ShadowMoveCharToTable(nazgul);
scn.StartGame();
scn.SkipToPhase(Phase.ASSIGNMENT);
scn.SkipCurrentPhaseActions();
scn.FreepsAssignToMinions(cirdan, nazgul);
//this nazgul should be strength 10, -4 = 6, enough to trigger Cirdan's secondary effect
scn.FreepsResolveSkirmish(cirdan);
assertTrue(scn.FreepsActionAvailable("Use Cirdan"));
scn.FreepsUseCardAction(cirdan);
assertTrue(scn.FreepsDecisionAvailable("Choose card from discard"));
scn.FreepsChoose(scn.FreepsGetCardChoices().get(0), scn.FreepsGetCardChoices().get(1), scn.FreepsGetCardChoices().get(2));
assertEquals(6, scn.GetStrength(nazgul));
scn.ShadowSkipCurrentPhaseAction();
scn.FreepsSkipCurrentPhaseAction();
assertEquals(1, scn.GetWoundsOn(cirdan));
assertEquals(1, scn.GetWoundsOn(nazgul));
//fierce skirmish
scn.SkipCurrentPhaseActions();
scn.FreepsAssignToMinions(cirdan, nazgul);
scn.FreepsResolveSkirmish(cirdan);
//There is now only one elven event in the discard pile, so cirdan's ability should only make
// the nazgul 10 - 1 = 9, not triggering the removal clause.
assertTrue(scn.FreepsActionAvailable("Use Cirdan"));
scn.FreepsUseCardAction(cirdan);
assertEquals(9, scn.GetStrength(nazgul));
assertFalse(scn.FreepsDecisionAvailable("Choose card from discard"));
}
}

View File

@@ -0,0 +1,123 @@
package com.gempukku.lotro.cards.unofficial.pc.errata.set19;
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 org.junit.Test;
import java.util.HashMap;
import static junit.framework.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
public class Card_19_038_ErrataTests
{
protected GenericCardTestHelper GetScenario() throws CardNotFoundException, DecisionResultInvalidException {
return new GenericCardTestHelper(
new HashMap<String, String>()
{{
put("nertea", "89_38");
put("boromir", "1_96");
put("aragorn", "1_89");
put("arwen", "1_30");
put("legolas", "1_50");
}}
);
}
@Test
public void NerteaStatsAndKeywordsAreCorrect() throws DecisionResultInvalidException, CardNotFoundException {
/**
* Set: 19E
* Title: Ulaire Nertea
* Subtitle: Dark Horseman
* Side: Shadow
* Culture: Ringwraith
* Twilight Cost: 4
* Type: Minion
* Race: Nazgul
* Strength: 9
* Vitality: 2
* Site: 3
* Errata Game Text: Fierce. When you play Ulaire Nertea, name a race. The Free Peoples player must add a
* burden to assign Ulaire Nertea to skirmish a companion of the named race.
*/
//Pre-game setup
GenericCardTestHelper scn = GetScenario();
PhysicalCardImpl nertea = scn.GetFreepsCard("nertea");
assertTrue(nertea.getBlueprint().isUnique());
assertEquals(4, nertea.getBlueprint().getTwilightCost());
assertEquals(CardType.MINION, nertea.getBlueprint().getCardType());
assertEquals(Culture.WRAITH, nertea.getBlueprint().getCulture());
assertEquals(Race.NAZGUL, nertea.getBlueprint().getRace());
assertTrue(scn.HasKeyword(nertea, Keyword.FIERCE));
assertEquals(9, nertea.getBlueprint().getStrength());
assertEquals(2, nertea.getBlueprint().getVitality());
assertEquals(3, nertea.getBlueprint().getSiteNumber());
}
@Test
public void FreepsAddsABurdenToSkirmishNamedRace() throws DecisionResultInvalidException, CardNotFoundException {
//Pre-game setup
GenericCardTestHelper scn = GetScenario();
PhysicalCardImpl nertea = scn.GetShadowCard("nertea");
PhysicalCardImpl aragorn = scn.GetFreepsCard("aragorn");
PhysicalCardImpl boromir = scn.GetFreepsCard("boromir");
PhysicalCardImpl arwen = scn.GetFreepsCard("arwen");
PhysicalCardImpl legolas = scn.GetFreepsCard("legolas");
scn.ShadowMoveCardToHand(nertea);
scn.FreepsMoveCharToTable(aragorn, boromir, arwen, legolas);
scn.StartGame();
scn.SetTwilight(10);
scn.RemoveBurdens(1); //To compensate for the bid
scn.FreepsSkipCurrentPhaseAction();
scn.ShadowPlayCard(nertea);
scn.ShadowChoose("14"); // Man
scn.SkipToPhase(Phase.ASSIGNMENT);
scn.SkipCurrentPhaseActions();
assertEquals(0, scn.GetBurdens());
assertTrue(scn.FreepsDecisionAvailable("Would you like to add a burden to be able to assign Ulaire Nertea to a"));
scn.FreepsChooseNo();
assertEquals(0, scn.GetBurdens());
Boolean exc = false;
try {
scn.FreepsAssignToMinions(boromir, nertea);
}
catch (DecisionResultInvalidException ex) {
exc = true;
}
assertTrue(exc); // If an exception wasn't thrown, then assigning to a Man was permitted.
scn.FreepsAssignToMinions(legolas, nertea);
scn.FreepsResolveSkirmish(legolas);
scn.SkipCurrentPhaseActions();
//fierce skirmish
scn.SkipCurrentPhaseActions();
assertEquals(0, scn.GetBurdens());
assertTrue(scn.FreepsDecisionAvailable("Would you like to add a burden to be able to assign Ulaire Nertea to a"));
scn.FreepsChooseYes();
assertEquals(1, scn.GetBurdens());
scn.FreepsAssignToMinions(boromir, nertea);
}
}