test cases for saruman's staff

This commit is contained in:
Christian 'ketura' McCarty
2025-04-10 23:00:39 -05:00
parent d67ec1161c
commit b94d4efd5c

View File

@@ -3,7 +3,6 @@ package com.gempukku.lotro.cards.official.set04;
import com.gempukku.lotro.cards.GenericCardTestHelper; import com.gempukku.lotro.cards.GenericCardTestHelper;
import com.gempukku.lotro.common.*; import com.gempukku.lotro.common.*;
import com.gempukku.lotro.game.CardNotFoundException; import com.gempukku.lotro.game.CardNotFoundException;
import com.gempukku.lotro.game.PhysicalCardImpl;
import com.gempukku.lotro.logic.decisions.DecisionResultInvalidException; import com.gempukku.lotro.logic.decisions.DecisionResultInvalidException;
import org.junit.Test; import org.junit.Test;
@@ -18,8 +17,11 @@ public class Card_04_174_Tests
return new GenericCardTestHelper( return new GenericCardTestHelper(
new HashMap<>() new HashMap<>()
{{ {{
put("card", "4_174"); put("staff", "4_174");
// put other cards in here as needed for the test case put("saruman", "3_69");
put("orc", "3_58");
put("sam", "1_311");
}}, }},
GenericCardTestHelper.FellowshipSites, GenericCardTestHelper.FellowshipSites,
GenericCardTestHelper.FOTRFrodo, GenericCardTestHelper.FOTRFrodo,
@@ -40,12 +42,14 @@ public class Card_04_174_Tests
* Type: Artifact * Type: Artifact
* Subtype: Staff * Subtype: Staff
* Strength: 2 * Strength: 2
* Game Text: Plays on Saruman.<br>He is <b>fierce</b> and <b>damage +1</b>.<br><b>Maneuver:</b> Make the first sentence of Saruman's game text not apply until the regroup phase. * Game Text: Plays on Saruman.
* He is <b>fierce</b> and <b>damage +1</b>.
* <b>Maneuver:</b> Make the first sentence of Saruman's game text not apply until the regroup phase.
*/ */
var scn = GetScenario(); var scn = GetScenario();
var card = scn.GetFreepsCard("card"); var card = scn.GetFreepsCard("staff");
assertEquals("Saruman's Staff", card.getBlueprint().getTitle()); assertEquals("Saruman's Staff", card.getBlueprint().getTitle());
assertEquals("Wizard's Device", card.getBlueprint().getSubtitle()); assertEquals("Wizard's Device", card.getBlueprint().getSubtitle());
@@ -58,18 +62,76 @@ public class Card_04_174_Tests
assertEquals(2, card.getBlueprint().getStrength()); assertEquals(2, card.getBlueprint().getStrength());
} }
// Uncomment any @Test markers below once this is ready to be used @Test
//@Test public void SarumansStaffMakesSarumanDamagePlus1AndFierce() throws DecisionResultInvalidException, CardNotFoundException {
public void SarumansStaffTest1() throws DecisionResultInvalidException, CardNotFoundException {
//Pre-game setup //Pre-game setup
var scn = GetScenario(); var scn = GetScenario();
var card = scn.GetFreepsCard("card"); var saruman = scn.GetShadowCard("saruman");
scn.FreepsMoveCardToHand(card); var staff = scn.GetShadowCard("staff");
scn.ShadowMoveCharToTable(saruman);
scn.ShadowMoveCardToHand(staff);
scn.StartGame(); scn.StartGame();
scn.FreepsPlayCard(card); scn.FreepsPassCurrentPhaseAction();
assertFalse(scn.hasKeyword(saruman, Keyword.DAMAGE));
assertFalse(scn.hasKeyword(saruman, Keyword.FIERCE));
scn.ShadowPlayCard(staff);
assertTrue(scn.hasKeyword(saruman, Keyword.DAMAGE));
assertTrue(scn.hasKeyword(saruman, Keyword.FIERCE));
}
@Test
public void SarumansStaffManeuverActionPermitsSarumanToSkirmish() throws DecisionResultInvalidException, CardNotFoundException {
//Pre-game setup
var scn = GetScenario();
var saruman = scn.GetShadowCard("saruman");
var staff = scn.GetShadowCard("staff");
scn.ShadowMoveCharToTable(saruman);
scn.AttachCardsTo(saruman, staff);
scn.StartGame();
scn.SkipToPhase(Phase.MANEUVER);
scn.FreepsPassCurrentPhaseAction();
assertTrue(scn.ShadowActionAvailable(staff));
scn.ShadowUseCardAction(staff);
scn.SkipToAssignments();
assertEquals(1, scn.FreepsGetShadowAssignmentTargetCount());
}
@Test
public void SarumansStaffDoesNotImpedeAbilityToUseSarumansAssignmentAbility() throws DecisionResultInvalidException, CardNotFoundException {
//Pre-game setup
var scn = GetScenario();
var saruman = scn.GetShadowCard("saruman");
var staff = scn.GetShadowCard("staff");
var orc = scn.GetShadowCard("orc");
scn.ShadowMoveCharToTable(saruman, orc);
scn.AttachCardsTo(saruman, staff);
var sam = scn.GetFreepsCard("sam");
scn.FreepsMoveCharToTable(sam);
scn.StartGame();
scn.SkipToPhase(Phase.MANEUVER);
scn.FreepsPassCurrentPhaseAction();
scn.ShadowUseCardAction(staff);
scn.SkipToPhase(Phase.ASSIGNMENT);
scn.FreepsPassCurrentPhaseAction();
assertTrue(scn.ShadowActionAvailable(saruman));
scn.ShadowUseCardAction(saruman);
scn.ShadowChooseCard(saruman);
scn.FreepsChooseNo();
assertTrue(scn.IsCharAssigned(saruman));
assertTrue(scn.IsCharAssigned(sam));
assertEquals(2, scn.GetTwilight());
} }
} }