Talent For Not Being Seen Errata and tests
This commit is contained in:
@@ -521,17 +521,19 @@
|
||||
"trigger": {
|
||||
"type": "moves"
|
||||
},
|
||||
"cost": {
|
||||
"type": "exert",
|
||||
"filter": "choose(hobbit)"
|
||||
"condition": {
|
||||
"type": "canSpot",
|
||||
"count": 2,
|
||||
"filter": "hobbit,companion"
|
||||
},
|
||||
"effect": {
|
||||
"type": "addKeyword",
|
||||
"filter": "self",
|
||||
"keyword": "defender+1",
|
||||
"filter": "choose(hobbit,companion)",
|
||||
"keyword": "concealed",
|
||||
"until": "start(regroup)"
|
||||
}
|
||||
}
|
||||
|
||||
]
|
||||
},
|
||||
}
|
||||
@@ -61,5 +61,4 @@ var set21 = {
|
||||
'21_2075': 'https://i.lotrtcgpc.net/errata/FOTR/22_75.jpg',
|
||||
'21_3042': 'https://i.lotrtcgpc.net/errata/FOTR/23_42.jpg',
|
||||
'21_3068': 'https://i.lotrtcgpc.net/errata/FOTR/23_68.jpg',
|
||||
'21_10108': 'https://i.lotrtcgpc.net/errata/FOTR/21_108.jpg',
|
||||
}
|
||||
@@ -143,6 +143,8 @@ public class GenericCardTest extends AbstractAtTest {
|
||||
return actions.size() > 0;
|
||||
}
|
||||
|
||||
public List<String> FreepsGetCardChoices() { return FreepsGetADParamAsList("cardId"); }
|
||||
public List<String> ShadowGetCardChoices() { return FreepsGetADParamAsList("cardId"); }
|
||||
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); }
|
||||
@@ -210,30 +212,33 @@ public class GenericCardTest extends AbstractAtTest {
|
||||
|
||||
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 FreepsMoveCharsToTable(PhysicalCardImpl...cards) {
|
||||
for(PhysicalCardImpl card : cards) {
|
||||
FreepsMoveCharToTable(card);
|
||||
}
|
||||
public void FreepsMoveCardToDeck(String cardName) { FreepsMoveCardToDeck(GetFreepsCard(cardName)); }
|
||||
public void FreepsMoveCardToDeck(PhysicalCardImpl...cards) {
|
||||
Arrays.stream(cards).forEach(card -> MoveCardToZone(P1, card, Zone.DECK));
|
||||
}
|
||||
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 ShadowMoveCharsToTable(PhysicalCardImpl...cards) {
|
||||
for(PhysicalCardImpl card : cards) {
|
||||
ShadowMoveCharToTable(card);
|
||||
}
|
||||
public void ShadowMoveCardToDeck(String cardName) { ShadowMoveCardToDeck(GetShadowCard(cardName)); }
|
||||
public void ShadowMoveCardToDeck(PhysicalCardImpl...cards) {
|
||||
Arrays.stream(cards).forEach(card -> MoveCardToZone(P1, card, Zone.DECK));
|
||||
}
|
||||
|
||||
public void FreepsMoveCharToTable(String cardName) { FreepsMoveCharToTable(GetFreepsCard(cardName)); }
|
||||
public void FreepsMoveCharToTable(PhysicalCardImpl...cards) {
|
||||
Arrays.stream(cards).forEach(card -> MoveCardToZone(P1, card, Zone.FREE_CHARACTERS));
|
||||
}
|
||||
public void ShadowMoveCharToTable(String cardName) { FreepsMoveCharToTable(GetShadowCard(cardName)); }
|
||||
public void ShadowMoveCharToTable(PhysicalCardImpl...cards) {
|
||||
Arrays.stream(cards).forEach(card -> MoveCardToZone(P2, card, Zone.FREE_CHARACTERS));
|
||||
}
|
||||
|
||||
public void FreepsMoveCardToSupportArea(String cardName) { FreepsMoveCardToSupportArea(GetFreepsCard(cardName)); }
|
||||
public void FreepsMoveCardToSupportArea(PhysicalCardImpl...cards) {
|
||||
Arrays.stream(cards).forEach(card -> MoveCardToZone(P1, card, Zone.SUPPORT));
|
||||
}
|
||||
public void ShadowMoveCardToSupportArea(String cardName) { ShadowMoveCardToSupportArea(GetShadowCard(cardName)); }
|
||||
public void ShadowMoveCardToSupportArea(PhysicalCardImpl...cards) {
|
||||
Arrays.stream(cards).forEach(card -> MoveCardToZone(P1, card, Zone.SUPPORT));
|
||||
}
|
||||
|
||||
public void FreepsMoveCardToZone(String cardID, Zone zone) { MoveCardToZone(P1, GetFreepsCard(cardID), zone); }
|
||||
public void FreepsMoveCardToZone(PhysicalCardImpl card, Zone zone) { MoveCardToZone(P1, card, zone); }
|
||||
public void ShadowMoveCardToZone(String cardID, Zone zone) { MoveCardToZone(P2, GetShadowCard(cardID), zone); }
|
||||
public void ShadowMoveCardToZone(PhysicalCardImpl card, Zone zone) { MoveCardToZone(P2, card, zone); }
|
||||
public void MoveCardToZone(String player, PhysicalCardImpl card, Zone zone) {
|
||||
if(card.getZone() != null)
|
||||
{
|
||||
@@ -242,23 +247,14 @@ public class GenericCardTest extends AbstractAtTest {
|
||||
_game.getGameState().addCardToZone(_game, card, zone);
|
||||
}
|
||||
|
||||
public void FreepsPlayCharFromHand(String cardName) throws DecisionResultInvalidException {
|
||||
PhysicalCardImpl card = GetFreepsCard(cardName);
|
||||
List<String> availableIds = FreepsGetADParamAsList("cardId");
|
||||
|
||||
Integer index = availableIds.indexOf(String.valueOf(card.getCardId()));
|
||||
playerDecided(P1, index.toString());
|
||||
}
|
||||
|
||||
public void FreepsAddWoundsToChar(String cardName, int count) { AddWoundsToChar(GetFreepsCard(cardName), count); }
|
||||
public void ShadowAddWoundsToChar(String cardName, int count) { AddWoundsToChar(GetShadowCard(cardName), count); }
|
||||
public void AddWoundsToChar(PhysicalCardImpl card, int count) {
|
||||
for(int i = 0; i < count; i++)
|
||||
{
|
||||
AddWoundToChar(card);
|
||||
_game.getGameState().addWound(card);
|
||||
}
|
||||
}
|
||||
public void AddWoundToChar(PhysicalCardImpl card) { _game.getGameState().addWound(card); }
|
||||
|
||||
public int GetTwilight() { return _game.getGameState().getTwilightPool(); }
|
||||
public void SetTwilight(int amount) { _game.getGameState().setTwilight(amount); }
|
||||
@@ -334,8 +330,11 @@ 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(String.valueOf(card.getCardId())); }
|
||||
public boolean ShadowCanChooseCharacter(PhysicalCardImpl card) { return ShadowGetADParamAsList("cardId").contains(String.valueOf(card.getCardId())); }
|
||||
public boolean FreepsCanChooseCharacter(PhysicalCardImpl card) { return FreepsGetCardChoices().contains(String.valueOf(card.getCardId())); }
|
||||
public boolean ShadowCanChooseCharacter(PhysicalCardImpl card) { return ShadowGetCardChoices().contains(String.valueOf(card.getCardId())); }
|
||||
|
||||
public int FreepsCardChoiceCount() { return FreepsGetCardChoices().size(); }
|
||||
public int ShadowCardChoiceCount() { return ShadowGetCardChoices().size(); }
|
||||
|
||||
public boolean IsCharAssigned(PhysicalCardImpl card) {
|
||||
List<Assignment> assigns = _game.getGameState().getAssignments();
|
||||
|
||||
@@ -77,32 +77,38 @@ public class Elrond_LoRErrataTest
|
||||
public void CardCanPlayIfGandalfInPlay() throws DecisionResultInvalidException, CardNotFoundException {
|
||||
//Pre-game setup
|
||||
GenericCardTest scn = GetSimpleSpotScenario();
|
||||
scn.FreepsMoveCardToHand("elrond");
|
||||
scn.FreepsMoveCardToHand("gandalf");
|
||||
PhysicalCardImpl elrond = scn.GetFreepsCard("elrond");
|
||||
PhysicalCardImpl gandalf = scn.GetFreepsCard("gandalf");
|
||||
|
||||
scn.FreepsMoveCardToHand(elrond);
|
||||
scn.FreepsMoveCardToHand(gandalf);
|
||||
|
||||
scn.StartGame();
|
||||
|
||||
assertEquals(Phase.FELLOWSHIP, scn.GetCurrentPhase());
|
||||
assertFalse(scn.FreepsActionAvailable("Play Elrond"));
|
||||
assertFalse(scn.FreepsCardPlayAvailable(elrond));
|
||||
|
||||
scn.FreepsPlayCharFromHand("gandalf");
|
||||
assertTrue(scn.FreepsActionAvailable("Play Elrond"));
|
||||
scn.FreepsPlayCard(gandalf);
|
||||
assertTrue(scn.FreepsCardPlayAvailable(elrond));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void CardCanPlayIfElfInPlay() throws DecisionResultInvalidException, CardNotFoundException {
|
||||
//Pre-game setup
|
||||
GenericCardTest scn = GetSimpleSpotScenario();
|
||||
scn.FreepsMoveCardToHand("elrond");
|
||||
scn.FreepsMoveCardToHand("arwen");
|
||||
PhysicalCardImpl elrond = scn.GetFreepsCard("elrond");
|
||||
PhysicalCardImpl arwen = scn.GetFreepsCard("arwen");
|
||||
|
||||
scn.FreepsMoveCardToHand(elrond);
|
||||
scn.FreepsMoveCardToHand(arwen);
|
||||
|
||||
scn.StartGame();
|
||||
|
||||
assertEquals(Phase.FELLOWSHIP, scn.GetCurrentPhase());
|
||||
assertFalse(scn.FreepsActionAvailable("Play Elrond"));
|
||||
assertFalse(scn.FreepsCardPlayAvailable(elrond));
|
||||
|
||||
scn.FreepsPlayCharFromHand("arwen");
|
||||
assertTrue(scn.FreepsActionAvailable("Play Elrond"));
|
||||
scn.FreepsPlayCard(arwen);
|
||||
assertTrue(scn.FreepsCardPlayAvailable(elrond));
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
@@ -11,7 +11,6 @@ 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;
|
||||
@@ -114,7 +113,7 @@ public class StingErrataTest
|
||||
|
||||
PhysicalCardImpl orc1 = scn.GetShadowCard("orc1");
|
||||
|
||||
scn.FreepsMoveCharsToTable(sam, merry);
|
||||
scn.FreepsMoveCharToTable(sam, merry);
|
||||
scn.AttachCard(sting, frodo);
|
||||
|
||||
scn.ShadowMoveCardToHand(orc1);
|
||||
@@ -154,7 +153,7 @@ public class StingErrataTest
|
||||
|
||||
PhysicalCardImpl orc1 = scn.GetShadowCard("orc1");
|
||||
|
||||
scn.FreepsMoveCharsToTable(sam);
|
||||
scn.FreepsMoveCharToTable(sam);
|
||||
scn.AttachCard(sting, frodo);
|
||||
|
||||
scn.ShadowMoveCardToHand(orc1);
|
||||
|
||||
@@ -0,0 +1,131 @@
|
||||
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.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 static junit.framework.Assert.assertEquals;
|
||||
import static org.junit.Assert.assertFalse;
|
||||
import static org.junit.Assert.assertTrue;
|
||||
|
||||
public class TalentForNBSErrataTest
|
||||
{
|
||||
protected GenericCardTest GetScenario() throws CardNotFoundException, DecisionResultInvalidException {
|
||||
return new GenericCardTest(
|
||||
new HashMap<String, String>()
|
||||
{{
|
||||
put("talent", "21_10316");
|
||||
put("sam", "1_311");
|
||||
put("gaffer", "1_291");
|
||||
put("boromir", "1_97");
|
||||
}}
|
||||
);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void TalentHasStealth() throws DecisionResultInvalidException, CardNotFoundException {
|
||||
//Pre-game setup
|
||||
GenericCardTest scn = GetScenario();
|
||||
|
||||
PhysicalCardImpl talent = scn.GetFreepsCard("talent");
|
||||
|
||||
assertTrue(scn.HasKeyword(talent, Keyword.STEALTH));
|
||||
}
|
||||
|
||||
|
||||
@Test
|
||||
public void TalentExertsAHobbitOnPlay() throws DecisionResultInvalidException, CardNotFoundException {
|
||||
//Pre-game setup
|
||||
GenericCardTest scn = GetScenario();
|
||||
|
||||
PhysicalCardImpl frodo = scn.GetRingBearer();
|
||||
PhysicalCardImpl sam = scn.GetFreepsCard("sam");
|
||||
PhysicalCardImpl gaffer = scn.GetFreepsCard("gaffer");
|
||||
PhysicalCardImpl boromir = scn.GetFreepsCard("boromir");
|
||||
PhysicalCardImpl talent = scn.GetFreepsCard("talent");
|
||||
|
||||
scn.FreepsMoveCharToTable(sam, gaffer, boromir);
|
||||
scn.FreepsMoveCardToHand(talent);
|
||||
|
||||
scn.StartGame();
|
||||
|
||||
scn.FreepsPlayCard(talent);
|
||||
//Frodo, Sam, Gaffer, but not Boromir
|
||||
assertEquals(3, scn.FreepsCardChoiceCount());
|
||||
|
||||
scn.FreepsChooseCard(frodo);
|
||||
assertEquals(1, scn.GetWoundsOn(frodo));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void TalentAbilityTriggersConcealedOnMove() throws DecisionResultInvalidException, CardNotFoundException {
|
||||
//Pre-game setup
|
||||
GenericCardTest scn = GetScenario();
|
||||
|
||||
PhysicalCardImpl frodo = scn.GetRingBearer();
|
||||
PhysicalCardImpl sam = scn.GetFreepsCard("sam");
|
||||
PhysicalCardImpl gaffer = scn.GetFreepsCard("gaffer");
|
||||
PhysicalCardImpl boromir = scn.GetFreepsCard("boromir");
|
||||
PhysicalCardImpl talent = scn.GetFreepsCard("talent");
|
||||
|
||||
scn.FreepsMoveCharToTable(sam, gaffer, boromir);
|
||||
scn.FreepsMoveCardToHand(talent);
|
||||
|
||||
scn.StartGame();
|
||||
|
||||
scn.FreepsPlayCard(talent);
|
||||
scn.FreepsChooseCard(frodo);
|
||||
scn.FreepsSkipCurrentPhaseAction();
|
||||
|
||||
//Sam and Frodo, but not Gaffer or Boromir
|
||||
assertEquals(2, scn.FreepsCardChoiceCount());
|
||||
scn.FreepsChooseCard(frodo);
|
||||
assertTrue(scn.HasKeyword(frodo, Keyword.CONCEALED));
|
||||
|
||||
scn.SkipToPhase(Phase.REGROUP);
|
||||
scn.SkipCurrentPhaseActions();
|
||||
|
||||
scn.FreepsChooseToMove();
|
||||
//Sam and Frodo, but not Gaffer or Boromir
|
||||
assertEquals(2, scn.FreepsCardChoiceCount());
|
||||
scn.FreepsChooseCard(sam);
|
||||
assertEquals(Phase.SHADOW, scn.GetCurrentPhase());
|
||||
assertFalse(scn.HasKeyword(frodo, Keyword.CONCEALED));
|
||||
assertTrue(scn.HasKeyword(sam, Keyword.CONCEALED));
|
||||
|
||||
}
|
||||
|
||||
@Test
|
||||
public void TalentOnlyTriggersWithTwoHobbitCompanions() throws DecisionResultInvalidException, CardNotFoundException {
|
||||
//Pre-game setup
|
||||
GenericCardTest scn = GetScenario();
|
||||
|
||||
PhysicalCardImpl frodo = scn.GetRingBearer();
|
||||
PhysicalCardImpl sam = scn.GetFreepsCard("sam");
|
||||
PhysicalCardImpl gaffer = scn.GetFreepsCard("gaffer");
|
||||
PhysicalCardImpl boromir = scn.GetFreepsCard("boromir");
|
||||
PhysicalCardImpl talent = scn.GetFreepsCard("talent");
|
||||
|
||||
scn.FreepsMoveCharToTable(gaffer, boromir);
|
||||
scn.FreepsMoveCardToHand(talent);
|
||||
|
||||
scn.StartGame();
|
||||
|
||||
scn.FreepsPlayCard(talent);
|
||||
scn.FreepsChooseCard(frodo);
|
||||
scn.FreepsSkipCurrentPhaseAction();
|
||||
|
||||
//neither gaffer nor boromir should permit the move trigger to choose a companion
|
||||
assertEquals(Phase.SHADOW, scn.GetCurrentPhase());
|
||||
assertFalse(scn.HasKeyword(frodo, Keyword.CONCEALED));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user