Adding tests for Cirdan errata (converted from older tests)
This commit is contained in:
@@ -16,14 +16,18 @@ public class Card_10_008_ErrataTests
|
||||
|
||||
protected GenericCardTestHelper GetScenario() throws CardNotFoundException, DecisionResultInvalidException {
|
||||
return new GenericCardTestHelper(
|
||||
new HashMap<>()
|
||||
{{
|
||||
put("card", "60_8");
|
||||
// put other cards in here as needed for the test case
|
||||
}},
|
||||
GenericCardTestHelper.FellowshipSites,
|
||||
GenericCardTestHelper.FOTRFrodo,
|
||||
GenericCardTestHelper.RulingRing
|
||||
new HashMap<>() {{
|
||||
put("cirdan", "60_8");
|
||||
put("event1", "1_37");
|
||||
put("event2", "1_37");
|
||||
put("event3", "1_37");
|
||||
put("event4", "1_37");
|
||||
put("event5", "1_37");
|
||||
put("event6", "1_37");
|
||||
put("event7", "1_37");
|
||||
|
||||
put("nazgul", "1_233");
|
||||
}}
|
||||
);
|
||||
}
|
||||
|
||||
@@ -48,7 +52,7 @@ public class Card_10_008_ErrataTests
|
||||
|
||||
var scn = GetScenario();
|
||||
|
||||
var card = scn.GetFreepsCard("card");
|
||||
var card = scn.GetFreepsCard("cirdan");
|
||||
|
||||
assertEquals("Cirdan", card.getBlueprint().getTitle());
|
||||
assertEquals("The Shipwright", card.getBlueprint().getSubtitle());
|
||||
@@ -63,18 +67,41 @@ public class Card_10_008_ErrataTests
|
||||
assertEquals(6, card.getBlueprint().getResistance());
|
||||
}
|
||||
|
||||
// Uncomment any @Test markers below once this is ready to be used
|
||||
//@Test
|
||||
public void CirdanTest1() throws DecisionResultInvalidException, CardNotFoundException {
|
||||
@Test
|
||||
public void CirdanReducesMinionStrengthAndRemovesEventsIfOverwhelming() throws DecisionResultInvalidException, CardNotFoundException {
|
||||
//Pre-game setup
|
||||
var scn = GetScenario();
|
||||
GenericCardTestHelper scn = GetScenario();
|
||||
|
||||
var card = scn.GetFreepsCard("card");
|
||||
scn.FreepsMoveCardToHand(card);
|
||||
PhysicalCardImpl cirdan = scn.GetFreepsCard("cirdan");
|
||||
PhysicalCardImpl nazgul = scn.GetShadowCard("nazgul");
|
||||
|
||||
scn.ShadowMoveCharToTable(cirdan);
|
||||
scn.FreepsMoveCardToDiscard("event1", "event2", "event3", "event4", "event5", "event6", "event7");
|
||||
|
||||
scn.ShadowMoveCharToTable(nazgul);
|
||||
|
||||
scn.StartGame();
|
||||
scn.FreepsPlayCard(card);
|
||||
|
||||
assertEquals(4, scn.GetTwilight());
|
||||
scn.SkipToPhase(Phase.ASSIGNMENT);
|
||||
scn.PassCurrentPhaseActions();
|
||||
scn.FreepsAssignToMinions(cirdan, nazgul);
|
||||
|
||||
//this nazgul should be strength 10, -5 = 5, enough to trigger Cirdan's secondary effect after the skirmish ends
|
||||
scn.FreepsResolveSkirmish(cirdan);
|
||||
assertTrue(scn.FreepsActionAvailable("Use Cirdan"));
|
||||
scn.FreepsUseCardAction(cirdan);
|
||||
|
||||
assertEquals(1, scn.GetWoundsOn(cirdan));
|
||||
assertEquals(3, scn.GetStrength(nazgul));
|
||||
scn.ShadowPassCurrentPhaseAction();
|
||||
scn.FreepsPassCurrentPhaseAction();
|
||||
|
||||
scn.FreepsResolveRuleFirst(); //Skirmish result first
|
||||
assertEquals(Zone.DISCARD, nazgul.getZone());
|
||||
assertTrue(scn.FreepsDecisionAvailable("Choose card from discard"));
|
||||
assertEquals(3, scn.FreepsGetChoiceMin());
|
||||
scn.FreepsChoose(scn.FreepsGetCardChoices().get(0), scn.FreepsGetCardChoices().get(1), scn.FreepsGetCardChoices().get(2));
|
||||
|
||||
assertEquals(4, scn.GetFreepsDiscardCount());
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user