Sting Errata. Exposed testing fleshed out.
Introduced Sting errata and unit tests. Pulled out the concealed/exposed specific parts of the No Stranger tests and put them in their own place, replacing the No Stranger tests with ones that are more specific to that card.
This commit is contained in:
@@ -485,7 +485,7 @@
|
||||
},
|
||||
{
|
||||
"type": "addKeyword",
|
||||
"filter": "choose(companion)",
|
||||
"filter": "choose(companion,not(concealed))",
|
||||
"keyword": "concealed",
|
||||
"until": "start(regroup)",
|
||||
"amount": {
|
||||
|
||||
@@ -0,0 +1,125 @@
|
||||
package com.gempukku.lotro.at;
|
||||
|
||||
import com.gempukku.lotro.cards.GenericCardTest;
|
||||
import com.gempukku.lotro.common.CardType;
|
||||
import com.gempukku.lotro.common.Keyword;
|
||||
import com.gempukku.lotro.common.Zone;
|
||||
import com.gempukku.lotro.game.CardNotFoundException;
|
||||
import com.gempukku.lotro.game.PhysicalCardImpl;
|
||||
import com.gempukku.lotro.logic.decisions.AwaitingDecision;
|
||||
import com.gempukku.lotro.logic.decisions.AwaitingDecisionType;
|
||||
import com.gempukku.lotro.logic.decisions.DecisionResultInvalidException;
|
||||
import com.gempukku.lotro.logic.modifiers.KeywordModifier;
|
||||
import org.junit.Test;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import static junit.framework.Assert.*;
|
||||
import static org.junit.Assert.assertTrue;
|
||||
|
||||
public class ConcealedExposedAtTest extends AbstractAtTest {
|
||||
protected GenericCardTest GetScenario() throws CardNotFoundException, DecisionResultInvalidException {
|
||||
return new GenericCardTest(
|
||||
new HashMap<String, String>()
|
||||
{{
|
||||
put("aragorn", "1_89");
|
||||
put("arwen", "1_30");
|
||||
}}
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@Test
|
||||
public void ConcealedDoesNothingIfNoTwilight() throws DecisionResultInvalidException, CardNotFoundException {
|
||||
//Pre-game setup
|
||||
GenericCardTest scn = GetScenario();
|
||||
|
||||
PhysicalCardImpl aragorn = scn.GetFreepsCard("aragorn");
|
||||
|
||||
scn.FreepsMoveCharToTable(aragorn);
|
||||
|
||||
scn.StartGame();
|
||||
|
||||
scn.InsertAdHocModifier(new KeywordModifier(aragorn, aragorn, Keyword.CONCEALED));
|
||||
|
||||
assertEquals(0, scn.GetTwilight());
|
||||
scn.FreepsSkipCurrentPhaseAction();
|
||||
|
||||
//1 for the ring-bearer, 1 for aragorn, 1 for the site (King's Tent)
|
||||
assertEquals(3, scn.GetTwilight());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void ConcealedRemovesOneIfAvailable() throws DecisionResultInvalidException, CardNotFoundException {
|
||||
//Pre-game setup
|
||||
GenericCardTest scn = GetScenario();
|
||||
|
||||
PhysicalCardImpl aragorn = scn.GetFreepsCard("aragorn");
|
||||
PhysicalCardImpl nostranger = scn.GetFreepsCard("nostranger");
|
||||
|
||||
scn.FreepsMoveCardToHand(aragorn);
|
||||
|
||||
scn.StartGame();
|
||||
|
||||
scn.FreepsPlayCard(aragorn);
|
||||
scn.InsertAdHocModifier(new KeywordModifier(aragorn, aragorn, Keyword.CONCEALED));
|
||||
|
||||
//4 from playing aragorn
|
||||
assertEquals(4, scn.GetTwilight());
|
||||
scn.FreepsSkipCurrentPhaseAction();
|
||||
|
||||
//4 from playing aragorn, 1 for the ring-bearer, 1 for aragorn, 1 for the site (King's Tent), -1 for concealed
|
||||
assertEquals(6, scn.GetTwilight());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void TwoConcealedRemovesTwoIfAvailable() throws DecisionResultInvalidException, CardNotFoundException {
|
||||
//Pre-game setup
|
||||
GenericCardTest scn = GetScenario();
|
||||
|
||||
PhysicalCardImpl aragorn = scn.GetFreepsCard("aragorn");
|
||||
PhysicalCardImpl arwen = scn.GetFreepsCard("arwen");
|
||||
|
||||
scn.FreepsMoveCardToHand(aragorn);
|
||||
scn.FreepsMoveCharToTable(arwen);
|
||||
|
||||
scn.StartGame();
|
||||
|
||||
scn.FreepsPlayCard(aragorn);
|
||||
scn.InsertAdHocModifier(new KeywordModifier(aragorn, Keyword.RANGER, Keyword.CONCEALED));
|
||||
|
||||
|
||||
//4 from playing aragorn
|
||||
assertEquals(4, scn.GetTwilight());
|
||||
scn.FreepsSkipCurrentPhaseAction();
|
||||
|
||||
//4 from playing aragorn, 1+1+1 for companions, 1 for the site (King's Tent), -2 for concealed
|
||||
assertEquals(6, scn.GetTwilight());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void ConcealedRemovesNothingIfExposed() throws DecisionResultInvalidException, CardNotFoundException {
|
||||
//Pre-game setup
|
||||
GenericCardTest scn = GetScenario();
|
||||
|
||||
PhysicalCardImpl aragorn = scn.GetFreepsCard("aragorn");
|
||||
|
||||
scn.FreepsMoveCardToHand(aragorn);
|
||||
|
||||
scn.StartGame();
|
||||
|
||||
scn.FreepsPlayCard(aragorn);
|
||||
scn.InsertAdHocModifier(new KeywordModifier(aragorn, Keyword.RANGER, Keyword.CONCEALED));
|
||||
|
||||
scn.InsertAdHocModifier(new KeywordModifier(null, CardType.SITE, Keyword.EXPOSED));
|
||||
|
||||
//4 from playing aragorn
|
||||
assertEquals(4, scn.GetTwilight());
|
||||
scn.FreepsSkipCurrentPhaseAction();
|
||||
|
||||
//4 from playing aragorn, 1 for the ring-bearer, 1 for aragorn, 1 for the site (King's Tent), 0 for exposed concealed
|
||||
assertEquals(7, scn.GetTwilight());
|
||||
}
|
||||
}
|
||||
@@ -136,6 +136,13 @@ public class GenericCardTest extends AbstractAtTest {
|
||||
return actions.stream().anyMatch(x -> x.toLowerCase().startsWith(lowerAction));
|
||||
}
|
||||
|
||||
public Boolean FreepsAnyActionsAvailable() { return AnyActionsAvailable(P1); }
|
||||
public Boolean ShadowAnyActionsAvailable() { return AnyActionsAvailable(P2); }
|
||||
public Boolean AnyActionsAvailable(String player) {
|
||||
List<String> actions = GetAvailableActions(player);
|
||||
return actions.size() > 0;
|
||||
}
|
||||
|
||||
public List<String> FreepsGetADParamAsList(String paramName) { return Arrays.asList((String[])GetAwaitingDecisionParam(P1, paramName)); }
|
||||
public List<String> ShadowGetADParamAsList(String paramName) { return Arrays.asList((String[])GetAwaitingDecisionParam(P2, paramName)); }
|
||||
public Object FreepsGetADParam(String paramName) { return GetAwaitingDecisionParam(P1, paramName); }
|
||||
@@ -186,23 +193,41 @@ public class GenericCardTest extends AbstractAtTest {
|
||||
|
||||
public void FreepsMoveCardToHand(String cardName) { MoveCardToZone(P1, GetFreepsCard(cardName), Zone.HAND); }
|
||||
public void FreepsMoveCardToHand(PhysicalCardImpl card) { MoveCardToZone(P1, card, Zone.HAND); }
|
||||
public void FreepsMoveCardsToHand(PhysicalCardImpl...cards) {
|
||||
for(PhysicalCardImpl card : cards) {
|
||||
FreepsMoveCardToHand(card);
|
||||
}
|
||||
}
|
||||
public void ShadowMoveCardToHand(String cardName) { MoveCardToZone(P2, GetShadowCard(cardName), Zone.HAND); }
|
||||
public void ShadowMoveCardToHand(PhysicalCardImpl card) { MoveCardToZone(P2, card, Zone.HAND); }
|
||||
|
||||
public void ShadowMoveCardsToHand(PhysicalCardImpl...cards) {
|
||||
for(PhysicalCardImpl card : cards) {
|
||||
ShadowMoveCardToHand(card);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public void AttachCard(PhysicalCardImpl card, PhysicalCardImpl bearer) { _game.getGameState().attachCard(_game, card, bearer); }
|
||||
|
||||
public void FreepsMoveCardToDeck(String cardName) { MoveCardToZone(P1, GetFreepsCard(cardName), Zone.DECK); }
|
||||
public void FreepsMoveCardToDeck(PhysicalCardImpl card) { MoveCardToZone(P1, card, Zone.DECK); }
|
||||
public void ShadowMoveCardToDeck(String cardName) { MoveCardToZone(P2, GetShadowCard(cardName), Zone.DECK); }
|
||||
public void ShadowMoveCardToDeck(PhysicalCardImpl card) { MoveCardToZone(P2, card, Zone.DECK); }
|
||||
|
||||
public void FreepsMoveCharToTable(String cardName) { MoveCardToZone(P1, GetFreepsCard(cardName), Zone.FREE_CHARACTERS); }
|
||||
public void FreepsMoveCharToTable(PhysicalCardImpl card)
|
||||
{
|
||||
MoveCardToZone(P1, card, Zone.FREE_CHARACTERS);
|
||||
public void FreepsMoveCharToTable(PhysicalCardImpl card) { MoveCardToZone(P1, card, Zone.FREE_CHARACTERS); }
|
||||
public void FreepsMoveCharsToTable(PhysicalCardImpl...cards) {
|
||||
for(PhysicalCardImpl card : cards) {
|
||||
FreepsMoveCharToTable(card);
|
||||
}
|
||||
}
|
||||
public void ShadowMoveCharToTable(String cardName) { MoveCardToZone(P2, GetShadowCard(cardName), Zone.SHADOW_CHARACTERS); }
|
||||
public void ShadowMoveCharToTable(PhysicalCardImpl card)
|
||||
{
|
||||
MoveCardToZone(P2, card, Zone.SHADOW_CHARACTERS);
|
||||
public void ShadowMoveCharToTable(PhysicalCardImpl card) { MoveCardToZone(P2, card, Zone.SHADOW_CHARACTERS); }
|
||||
public void ShadowMoveCharsToTable(PhysicalCardImpl...cards) {
|
||||
for(PhysicalCardImpl card : cards) {
|
||||
ShadowMoveCharToTable(card);
|
||||
}
|
||||
}
|
||||
|
||||
public void FreepsMoveCardToZone(String cardID, Zone zone) { MoveCardToZone(P1, GetFreepsCard(cardID), zone); }
|
||||
@@ -309,8 +334,8 @@ public class GenericCardTest extends AbstractAtTest {
|
||||
public void ShadowChooseCard(PhysicalCardImpl card) throws DecisionResultInvalidException {
|
||||
playerDecided(P2, String.valueOf(card.getCardId()));
|
||||
}
|
||||
public boolean FreepsCanChooseCharacter(PhysicalCardImpl card) { return FreepsGetADParamAsList("cardId").contains(card.getCardId()); }
|
||||
public boolean ShadowCanChooseCharacter(PhysicalCardImpl card) { return ShadowGetADParamAsList("cardId").contains(card.getCardId()); }
|
||||
public boolean FreepsCanChooseCharacter(PhysicalCardImpl card) { return FreepsGetADParamAsList("cardId").contains(String.valueOf(card.getCardId())); }
|
||||
public boolean ShadowCanChooseCharacter(PhysicalCardImpl card) { return ShadowGetADParamAsList("cardId").contains(String.valueOf(card.getCardId())); }
|
||||
|
||||
public boolean IsCharAssigned(PhysicalCardImpl card) {
|
||||
List<Assignment> assigns = _game.getGameState().getAssignments();
|
||||
@@ -336,4 +361,12 @@ public class GenericCardTest extends AbstractAtTest {
|
||||
_game.getModifiersEnvironment().addUntilEndOfTurnModifier(mod);
|
||||
}
|
||||
|
||||
public void FreepsChooseToMove() throws DecisionResultInvalidException {
|
||||
playerDecided(P1, "0");
|
||||
}
|
||||
|
||||
public void FreepsChooseToStay() throws DecisionResultInvalidException {
|
||||
playerDecided(P1, "1");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -24,6 +24,7 @@ public class NoStrangerErrataTest
|
||||
{{
|
||||
put("aragorn", "1_89");
|
||||
put("arwen", "1_30");
|
||||
put("boromir", "1_97");
|
||||
put("nostranger", "21_10108");
|
||||
put("nostranger2", "21_10108");
|
||||
}}
|
||||
@@ -32,7 +33,68 @@ public class NoStrangerErrataTest
|
||||
|
||||
|
||||
@Test
|
||||
public void ConcealedDoesNothingIfNoTwilight() throws DecisionResultInvalidException, CardNotFoundException {
|
||||
public void NoStrangerHasStealth() throws DecisionResultInvalidException, CardNotFoundException {
|
||||
//Pre-game setup
|
||||
GenericCardTest scn = GetScenario();
|
||||
|
||||
PhysicalCardImpl nostranger = scn.GetFreepsCard("nostranger");
|
||||
|
||||
assertTrue(scn.HasKeyword(nostranger, Keyword.STEALTH));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void NoStrangerCanOnlyPlayOnRanger() throws DecisionResultInvalidException, CardNotFoundException {
|
||||
//Pre-game setup
|
||||
GenericCardTest scn = GetScenario();
|
||||
|
||||
PhysicalCardImpl aragorn = scn.GetFreepsCard("aragorn");
|
||||
PhysicalCardImpl arwen = scn.GetFreepsCard("arwen");
|
||||
PhysicalCardImpl boromir = scn.GetFreepsCard("boromir");
|
||||
PhysicalCardImpl nostranger = scn.GetFreepsCard("nostranger");
|
||||
|
||||
scn.FreepsMoveCharToTable(aragorn);
|
||||
scn.FreepsMoveCharToTable(arwen);
|
||||
scn.FreepsMoveCharToTable(boromir);
|
||||
scn.FreepsMoveCardToHand(nostranger);
|
||||
|
||||
scn.StartGame();
|
||||
|
||||
assertTrue(scn.FreepsCardPlayAvailable(nostranger));
|
||||
|
||||
scn.FreepsPlayCard(nostranger);
|
||||
|
||||
//There are 3 companions in play, but only 2 rangers, so we should only see 2 options
|
||||
assertEquals(2, scn.FreepsGetADParamAsList("cardId").size());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void NoStrangerLimitOnePerBearer() throws DecisionResultInvalidException, CardNotFoundException {
|
||||
//Pre-game setup
|
||||
GenericCardTest scn = GetScenario();
|
||||
|
||||
PhysicalCardImpl aragorn = scn.GetFreepsCard("aragorn");
|
||||
PhysicalCardImpl arwen = scn.GetFreepsCard("arwen");
|
||||
PhysicalCardImpl nostranger = scn.GetFreepsCard("nostranger");
|
||||
PhysicalCardImpl nostranger2 = scn.GetFreepsCard("nostranger2");
|
||||
|
||||
scn.FreepsMoveCharToTable(aragorn);
|
||||
scn.FreepsMoveCharToTable(arwen);
|
||||
scn.FreepsMoveCardToHand(nostranger);
|
||||
scn.FreepsMoveCardToHand(nostranger2);
|
||||
|
||||
scn.StartGame();
|
||||
|
||||
scn.FreepsPlayCard(nostranger);
|
||||
scn.FreepsChooseCard(aragorn);
|
||||
scn.FreepsPlayCard(nostranger2);
|
||||
|
||||
//No prompt means it was placed automatically on Arwen, with no choice between Arwen and Aragorn
|
||||
assertFalse(scn.FreepsAnyActionsAvailable());
|
||||
|
||||
}
|
||||
|
||||
@Test
|
||||
public void NoStrangerAddsConcealed() throws DecisionResultInvalidException, CardNotFoundException {
|
||||
//Pre-game setup
|
||||
GenericCardTest scn = GetScenario();
|
||||
|
||||
@@ -44,96 +106,8 @@ public class NoStrangerErrataTest
|
||||
|
||||
scn.StartGame();
|
||||
|
||||
assertTrue(scn.FreepsCardPlayAvailable(nostranger));
|
||||
scn.FreepsPlayCard(nostranger);
|
||||
|
||||
assertTrue(scn.HasKeyword(aragorn, Keyword.CONCEALED));
|
||||
|
||||
assertEquals(0, scn.GetTwilight());
|
||||
scn.FreepsSkipCurrentPhaseAction();
|
||||
|
||||
//1 for the ring-bearer, 1 for aragorn, 1 for the site (King's Tent)
|
||||
assertEquals(3, scn.GetTwilight());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void ConcealedRemovesOneIfAvailable() throws DecisionResultInvalidException, CardNotFoundException {
|
||||
//Pre-game setup
|
||||
GenericCardTest scn = GetScenario();
|
||||
|
||||
PhysicalCardImpl aragorn = scn.GetFreepsCard("aragorn");
|
||||
PhysicalCardImpl nostranger = scn.GetFreepsCard("nostranger");
|
||||
|
||||
scn.FreepsMoveCardToHand(aragorn);
|
||||
scn.FreepsMoveCardToHand(nostranger);
|
||||
|
||||
scn.StartGame();
|
||||
|
||||
scn.FreepsPlayCard(aragorn);
|
||||
scn.FreepsPlayCard(nostranger);
|
||||
|
||||
//4 from playing aragorn
|
||||
assertEquals(4, scn.GetTwilight());
|
||||
scn.FreepsSkipCurrentPhaseAction();
|
||||
|
||||
//4 from playing aragorn, 1 for the ring-bearer, 1 for aragorn, 1 for the site (King's Tent), -1 for concealed
|
||||
assertEquals(6, scn.GetTwilight());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void TwoConcealedRemovesTwoIfAvailable() throws DecisionResultInvalidException, CardNotFoundException {
|
||||
//Pre-game setup
|
||||
GenericCardTest scn = GetScenario();
|
||||
|
||||
PhysicalCardImpl aragorn = scn.GetFreepsCard("aragorn");
|
||||
PhysicalCardImpl arwen = scn.GetFreepsCard("arwen");
|
||||
PhysicalCardImpl nostranger = scn.GetFreepsCard("nostranger");
|
||||
PhysicalCardImpl nostranger2 = scn.GetFreepsCard("nostranger2");
|
||||
|
||||
scn.FreepsMoveCardToHand(aragorn);
|
||||
scn.FreepsMoveCharToTable(arwen);
|
||||
scn.FreepsMoveCardToHand(nostranger);
|
||||
scn.FreepsMoveCardToHand(nostranger2);
|
||||
|
||||
scn.StartGame();
|
||||
|
||||
scn.FreepsPlayCard(aragorn);
|
||||
scn.FreepsPlayCard(nostranger);
|
||||
scn.FreepsChooseCard(aragorn);
|
||||
scn.FreepsPlayCard(nostranger2);
|
||||
|
||||
|
||||
//4 from playing aragorn
|
||||
assertEquals(4, scn.GetTwilight());
|
||||
scn.FreepsSkipCurrentPhaseAction();
|
||||
|
||||
//4 from playing aragorn, 1+1+1 for companions, 1 for the site (King's Tent), -2 for concealed
|
||||
assertEquals(6, scn.GetTwilight());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void ConcealedRemovesNothingIfExposed() throws DecisionResultInvalidException, CardNotFoundException {
|
||||
//Pre-game setup
|
||||
GenericCardTest scn = GetScenario();
|
||||
|
||||
PhysicalCardImpl aragorn = scn.GetFreepsCard("aragorn");
|
||||
PhysicalCardImpl nostranger = scn.GetFreepsCard("nostranger");
|
||||
|
||||
scn.FreepsMoveCardToHand(aragorn);
|
||||
scn.FreepsMoveCardToHand(nostranger);
|
||||
|
||||
scn.StartGame();
|
||||
|
||||
scn.FreepsPlayCard(aragorn);
|
||||
scn.FreepsPlayCard(nostranger);
|
||||
|
||||
scn.InsertAdHocModifier(new KeywordModifier(null, CardType.SITE, Keyword.EXPOSED));
|
||||
|
||||
//4 from playing aragorn
|
||||
assertEquals(4, scn.GetTwilight());
|
||||
scn.FreepsSkipCurrentPhaseAction();
|
||||
|
||||
//4 from playing aragorn, 1 for the ring-bearer, 1 for aragorn, 1 for the site (King's Tent), 0 for exposed concealed
|
||||
assertEquals(7, scn.GetTwilight());
|
||||
scn.HasKeyword(aragorn, Keyword.CONCEALED);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,183 @@
|
||||
package com.gempukku.lotro.cards.unofficial.pc.errata;
|
||||
|
||||
import com.gempukku.lotro.cards.GenericCardTest;
|
||||
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;
|
||||
import java.util.List;
|
||||
|
||||
import static junit.framework.Assert.assertEquals;
|
||||
import static org.junit.Assert.assertFalse;
|
||||
import static org.junit.Assert.assertTrue;
|
||||
|
||||
public class StingErrataTest
|
||||
{
|
||||
protected GenericCardTest GetScenario() throws CardNotFoundException, DecisionResultInvalidException {
|
||||
return new GenericCardTest(
|
||||
new HashMap<String, String>()
|
||||
{{
|
||||
put("sting", "21_10313");
|
||||
put("sam", "1_311");
|
||||
put("merry", "1_302");
|
||||
|
||||
put("orc1", "1_178");
|
||||
put("orc2", "1_178");
|
||||
put("orc3", "1_178");
|
||||
put("scimitar1", "1_180");
|
||||
put("scimitar2", "1_180");
|
||||
put("scimitar3", "1_180");
|
||||
}}
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@Test
|
||||
public void StingCanOnlyBeBorneByFrodo() throws DecisionResultInvalidException, CardNotFoundException {
|
||||
//Pre-game setup
|
||||
GenericCardTest scn = GetScenario();
|
||||
|
||||
PhysicalCardImpl frodo = scn.GetRingBearer();
|
||||
PhysicalCardImpl sam = scn.GetFreepsCard("sam");
|
||||
PhysicalCardImpl sting = scn.GetFreepsCard("sting");
|
||||
|
||||
scn.FreepsMoveCharToTable(sam);
|
||||
scn.FreepsMoveCardToHand(sting);
|
||||
|
||||
scn.StartGame();
|
||||
|
||||
scn.FreepsPlayCard(sting);
|
||||
|
||||
//should have automatically gone to frodo as the only valid target
|
||||
Assert.assertEquals(Zone.ATTACHED, sting.getZone());
|
||||
Assert.assertEquals(frodo, sting.getAttachedTo());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void StingAbilityAvailableInBothFellowshipAndRegroup() throws DecisionResultInvalidException, CardNotFoundException {
|
||||
//Pre-game setup
|
||||
GenericCardTest scn = GetScenario();
|
||||
|
||||
PhysicalCardImpl frodo = scn.GetRingBearer();
|
||||
PhysicalCardImpl sting = scn.GetFreepsCard("sting");
|
||||
|
||||
scn.AttachCard(sting, frodo);
|
||||
|
||||
scn.StartGame();
|
||||
|
||||
assertTrue(scn.FreepsCardActionAvailable(sting));
|
||||
|
||||
scn.SkipToPhase(Phase.REGROUP);
|
||||
|
||||
assertTrue(scn.FreepsCardActionAvailable(sting));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void StingAbilityExertsFrodoAndRevealsThreeCards() throws DecisionResultInvalidException, CardNotFoundException {
|
||||
GenericCardTest scn = GetScenario();
|
||||
|
||||
PhysicalCardImpl frodo = scn.GetRingBearer();
|
||||
PhysicalCardImpl sting = scn.GetFreepsCard("sting");
|
||||
|
||||
PhysicalCardImpl orc1 = scn.GetShadowCard("orc1");
|
||||
PhysicalCardImpl orc2 = scn.GetShadowCard("orc2");
|
||||
PhysicalCardImpl orc3 = scn.GetShadowCard("orc3");
|
||||
PhysicalCardImpl scimitar1 = scn.GetShadowCard("scimitar1");
|
||||
|
||||
scn.AttachCard(sting, frodo);
|
||||
|
||||
scn.ShadowMoveCardsToHand(orc1, orc2, orc3, scimitar1);
|
||||
|
||||
scn.StartGame();
|
||||
|
||||
scn.FreepsUseCardAction(sting);
|
||||
|
||||
//Reveals 3 cards
|
||||
assertEquals(3, scn.FreepsGetADParamAsList("blueprintId").size());
|
||||
assertEquals(1, scn.GetWoundsOn(frodo));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void StingAbilityMakesConcealedIfOrcRevealed() throws DecisionResultInvalidException, CardNotFoundException {
|
||||
GenericCardTest scn = GetScenario();
|
||||
|
||||
PhysicalCardImpl frodo = scn.GetRingBearer();
|
||||
PhysicalCardImpl sting = scn.GetFreepsCard("sting");
|
||||
PhysicalCardImpl sam = scn.GetFreepsCard("sam");
|
||||
PhysicalCardImpl merry = scn.GetFreepsCard("merry");
|
||||
|
||||
PhysicalCardImpl orc1 = scn.GetShadowCard("orc1");
|
||||
|
||||
scn.FreepsMoveCharsToTable(sam, merry);
|
||||
scn.AttachCard(sting, frodo);
|
||||
|
||||
scn.ShadowMoveCardToHand(orc1);
|
||||
|
||||
scn.StartGame();
|
||||
|
||||
scn.FreepsUseCardAction(sting);
|
||||
|
||||
//Both players have revealed cards as an action to dismiss
|
||||
scn.SkipCurrentPhaseActions();
|
||||
|
||||
assertTrue(scn.FreepsCanChooseCharacter(frodo));
|
||||
assertTrue(scn.FreepsCanChooseCharacter(sam));
|
||||
assertTrue(scn.FreepsCanChooseCharacter(merry));
|
||||
|
||||
scn.FreepsChooseCard(frodo);
|
||||
assertTrue(scn.HasKeyword(frodo, Keyword.CONCEALED));
|
||||
|
||||
scn.FreepsUseCardAction(sting);
|
||||
scn.SkipCurrentPhaseActions();
|
||||
assertFalse(scn.FreepsCanChooseCharacter(frodo));
|
||||
assertTrue(scn.FreepsCanChooseCharacter(sam));
|
||||
assertTrue(scn.FreepsCanChooseCharacter(merry));
|
||||
|
||||
scn.FreepsChooseCard(sam);
|
||||
assertTrue(scn.HasKeyword(sam, Keyword.CONCEALED));
|
||||
}
|
||||
|
||||
|
||||
@Test
|
||||
public void StingConcealedLastsUntilNextRegroup() throws DecisionResultInvalidException, CardNotFoundException {
|
||||
GenericCardTest scn = GetScenario();
|
||||
|
||||
PhysicalCardImpl frodo = scn.GetRingBearer();
|
||||
PhysicalCardImpl sting = scn.GetFreepsCard("sting");
|
||||
PhysicalCardImpl sam = scn.GetFreepsCard("sam");
|
||||
|
||||
PhysicalCardImpl orc1 = scn.GetShadowCard("orc1");
|
||||
|
||||
scn.FreepsMoveCharsToTable(sam);
|
||||
scn.AttachCard(sting, frodo);
|
||||
|
||||
scn.ShadowMoveCardToHand(orc1);
|
||||
|
||||
scn.StartGame();
|
||||
|
||||
scn.SkipToPhase(Phase.REGROUP);
|
||||
|
||||
scn.FreepsUseCardAction(sting);
|
||||
scn.FreepsChooseCard(frodo);
|
||||
//Both players have revealed cards as an action to dismiss
|
||||
scn.SkipCurrentPhaseActions();
|
||||
|
||||
scn.FreepsChooseCard(frodo);
|
||||
assertTrue(scn.HasKeyword(frodo, Keyword.CONCEALED));
|
||||
|
||||
scn.ShadowSkipCurrentPhaseAction();
|
||||
scn.FreepsSkipCurrentPhaseAction();
|
||||
//shadow reconcile
|
||||
scn.ShadowSkipCurrentPhaseAction();
|
||||
|
||||
scn.FreepsChooseToMove();
|
||||
|
||||
assertTrue(scn.HasKeyword(frodo, Keyword.CONCEALED));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user