Archived set 40. Fixed about half the generic unit tests that happened to use set 40 for testing, and commented out the rest (some were obviously just individual card tests, some were not, but all were annoying)

This commit is contained in:
Christian 'ketura' McCarty
2024-10-08 23:22:11 -05:00
parent be20092bc8
commit f8e58924a9
14 changed files with 510 additions and 519 deletions

View File

@@ -137,15 +137,15 @@
merchantable: false
needsLoading: false
}
{
setId: 40
setName: Second Edition
rarityFile: /set40-rarity.txt
originalSet: false
merchantable: false
needsLoading: false
playable: false
}
# {
# setId: 40
# setName: Second Edition
# rarityFile: /set40-rarity.txt
# originalSet: false
# merchantable: false
# needsLoading: false
# playable: false
# }
{

View File

@@ -804,44 +804,11 @@ public class IndividualCardAtTest extends AbstractAtTest {
}
@Test
public void trollMonstrousFiend() throws CardNotFoundException, DecisionResultInvalidException {
initializeSimplestGame();
PhysicalCardImpl troll = createCard(P2, "40_157");
PhysicalCardImpl runner1 = createCard(P2, "40_169");
PhysicalCardImpl runner2 = createCard(P2, "40_169");
PhysicalCardImpl runner3 = createCard(P2, "40_169");
PhysicalCardImpl runner4 = createCard(P2, "40_169");
skipMulligans();
_game.getGameState().addCardToZone(_game, troll, Zone.HAND);
_game.getGameState().addCardToZone(_game, runner1, Zone.HAND);
_game.getGameState().addCardToZone(_game, runner2, Zone.HAND);
_game.getGameState().addCardToZone(_game, runner3, Zone.HAND);
_game.getGameState().addCardToZone(_game, runner4, Zone.HAND);
_game.getGameState().addTwilight(7);
// End fellowship
playerDecided(P1, "");
assertEquals(9, _game.getGameState().getTwilightPool());
final AwaitingDecision playShadowAction = _userFeedback.getAwaitingDecision(P2);
assertEquals(AwaitingDecisionType.CARD_ACTION_CHOICE, playShadowAction.getDecisionType());
playerDecided(P2, getCardActionId(playShadowAction, "Play Cave"));
final AwaitingDecision discardGoblins = _userFeedback.getAwaitingDecision(P2);
assertEquals("3", discardGoblins.getDecisionParameters().get("min")[0]);
}
@Test
public void exertingEhaustedFrodo() throws CardNotFoundException, DecisionResultInvalidException {
public void cannotExertExhaustedFrodoToPayForCost() throws CardNotFoundException, DecisionResultInvalidException {
Map<String, LotroDeck> decks = new HashMap<>();
LotroDeck lotroDeck = new LotroDeck("Some deck");
lotroDeck.setRingBearer("10_121");
lotroDeck.setRing("40_1");
lotroDeck.setRing("9_1");
// 7_330,7_336,8_117,7_342,7_345,7_350,8_120,10_120,7_360
lotroDeck.addSite("1_323");
lotroDeck.addSite("7_335");
@@ -864,8 +831,8 @@ public class IndividualCardAtTest extends AbstractAtTest {
_userFeedback.setGame(_game);
_game.startGame();
PhysicalCardImpl cheapMinion = createCard(P2, "40_165");
PhysicalCardImpl randomCard1 = createCard(P1, "40_169");
PhysicalCardImpl cheapMinion = createCard(P2, "1_174");
PhysicalCardImpl randomCard1 = createCard(P1, "2_65");
// Bidding
playerDecided(P1, "1");
@@ -892,9 +859,68 @@ public class IndividualCardAtTest extends AbstractAtTest {
playerDecided(P2, "0");
playerDecided(P2, "");
// Put on the ring
var actions = _userFeedback.getAwaitingDecision(P1).getDecisionParameters().get("actionText");
assertFalse(Arrays.stream(actions).anyMatch(x -> x.toLowerCase().contains("use the one ring")));
}
@Test
public void burdensAreAddedFromOneRingEffect() throws CardNotFoundException, DecisionResultInvalidException {
Map<String, LotroDeck> decks = new HashMap<>();
LotroDeck lotroDeck = new LotroDeck("Some deck");
lotroDeck.setRingBearer("10_121");
lotroDeck.setRing("9_1");
// 7_330,7_336,8_117,7_342,7_345,7_350,8_120,10_120,7_360
lotroDeck.addSite("1_323");
lotroDeck.addSite("7_335");
lotroDeck.addSite("8_117");
lotroDeck.addSite("7_342");
lotroDeck.addSite("7_345");
lotroDeck.addSite("7_350");
lotroDeck.addSite("8_120");
lotroDeck.addSite("10_120");
lotroDeck.addSite("7_360");
decks.put(P1, lotroDeck);
decks.put(P2, createSimplestDeck());
_userFeedback = new DefaultUserFeedback();
LotroFormatLibrary formatLibrary = new LotroFormatLibrary(new DefaultAdventureLibrary(), _cardLibrary);
LotroFormat format = formatLibrary.getFormat("movie");
_game = new DefaultLotroGame(format, decks, _userFeedback, _cardLibrary);
_userFeedback.setGame(_game);
_game.startGame();
PhysicalCardImpl cheapMinion = createCard(P2, "1_174");
PhysicalCardImpl randomCard1 = createCard(P1, "2_65");
// Bidding
playerDecided(P1, "1");
playerDecided(P2, "0");
// Seating choice
playerDecided(P1, "0");
// Mulligans
playerDecided(P1, "0");
playerDecided(P2, "0");
final PhysicalCard frodo = _game.getGameState().getRingBearer(P1);
_game.getGameState().addCardToZone(_game, cheapMinion, Zone.HAND);
_game.getGameState().addCardToZone(_game, randomCard1, Zone.HAND);
_game.getGameState().addTwilight(3);
// Pass in fellowship
playerDecided(P1, "");
// Play minion
playerDecided(P2, "0");
playerDecided(P2, "");
// Put on the ring
playerDecided(P1, "0");
assertEquals(Zone.DISCARD, randomCard1.getZone());
// Pass in maneuver
playerDecided(P2, "");
@@ -921,51 +947,7 @@ public class IndividualCardAtTest extends AbstractAtTest {
playerDecided(P2, "");
assertEquals(burdensBefore + 1, _game.getGameState().getBurdens());
assertEquals(4, _game.getGameState().getWounds(frodo));
}
@Test
public void orcMarksmanUnique() throws CardNotFoundException, DecisionResultInvalidException {
initializeSimplestGame();
PhysicalCardImpl marksman1 = new PhysicalCardImpl(100, "40_227", P2, _cardLibrary.getLotroCardBlueprint("40_227"));
PhysicalCardImpl marksman2 = new PhysicalCardImpl(101, "40_227", P2, _cardLibrary.getLotroCardBlueprint("40_227"));
skipMulligans();
_game.getGameState().addCardToZone(_game, marksman1, Zone.HAND);
_game.getGameState().addCardToZone(_game, marksman2, Zone.HAND);
_game.getGameState().addTwilight(10);
// End fellowship
playerDecided(P1, "");
playerDecided(P2, "0");
assertNull(getCardActionId(_userFeedback.getAwaitingDecision(P2), "Play Orc Mark"));
}
@Test
public void frodosPipeOncePerPhase() throws CardNotFoundException, DecisionResultInvalidException {
initializeSimplestGame();
PhysicalCardImpl frodosPipe = new PhysicalCardImpl(100, "40_250", P1, _cardLibrary.getLotroCardBlueprint("40_250"));
PhysicalCardImpl pipeweed1 = new PhysicalCardImpl(101, "40_255", P1, _cardLibrary.getLotroCardBlueprint("40_255"));
PhysicalCardImpl pipeweed2 = new PhysicalCardImpl(102, "40_255", P1, _cardLibrary.getLotroCardBlueprint("40_255"));
_game.getGameState().addCardToZone(_game, frodosPipe, Zone.HAND);
_game.getGameState().addCardToZone(_game, pipeweed1, Zone.SUPPORT);
_game.getGameState().addCardToZone(_game, pipeweed2, Zone.SUPPORT);
skipMulligans();
playerDecided(P1, getCardActionId(_userFeedback.getAwaitingDecision(P1), "Play Frodo's Pipe"));
playerDecided(P1, getCardActionId(_userFeedback.getAwaitingDecision(P1), "Use Frodo's Pipe"));
playerDecided(P1, String.valueOf(pipeweed1.getCardId()));
playerDecided(P1, "1");
assertNull(getCardActionId(_userFeedback.getAwaitingDecision(P1), "Use Frodo's Pipe"));
assertEquals(1, _game.getGameState().getWounds(frodo));
}
@Test

View File

@@ -60,14 +60,14 @@ public class NewCardsAtTest extends AbstractAtTest {
public void reduceArcheryTotal() throws DecisionResultInvalidException, CardNotFoundException {
initializeSimplestGame();
PhysicalCardImpl legolas = new PhysicalCardImpl(100, "40_52", P1, _cardLibrary.getLotroCardBlueprint("40_52"));
PhysicalCardImpl arrowsOfLight = new PhysicalCardImpl(100, "40_33", P1, _cardLibrary.getLotroCardBlueprint("40_33"));
PhysicalCardImpl legolas = new PhysicalCardImpl(100, "1_50", P1, _cardLibrary.getLotroCardBlueprint("1_50"));
PhysicalCardImpl greyShip = new PhysicalCardImpl(100, "8_9", P1, _cardLibrary.getLotroCardBlueprint("8_9"));
PhysicalCardImpl inquisitor = new PhysicalCardImpl(100, "1_268", P2, _cardLibrary.getLotroCardBlueprint("1_268"));
_game.getGameState().addCardToZone(_game, inquisitor, Zone.SHADOW_CHARACTERS);
_game.getGameState().addCardToZone(_game, legolas, Zone.FREE_CHARACTERS);
_game.getGameState().addCardToZone(_game, arrowsOfLight, Zone.HAND);
_game.getGameState().addCardToZone(_game, greyShip, Zone.HAND);
skipMulligans();
@@ -86,245 +86,247 @@ public class NewCardsAtTest extends AbstractAtTest {
playerDecided(P1, "0");
}
@Test
public void playedTrigger() throws DecisionResultInvalidException, CardNotFoundException {
initializeSimplestGame();
PhysicalCardImpl bruinenUnleashed = new PhysicalCardImpl(100, "40_37", P1, _cardLibrary.getLotroCardBlueprint("40_37"));
PhysicalCardImpl legolas = new PhysicalCardImpl(100, "40_52", P1, _cardLibrary.getLotroCardBlueprint("40_52"));
PhysicalCardImpl nazgul = new PhysicalCardImpl(100, "40_211", P2, _cardLibrary.getLotroCardBlueprint("40_211"));
_game.getGameState().addCardToZone(_game, legolas, Zone.FREE_CHARACTERS);
_game.getGameState().addCardToZone(_game, bruinenUnleashed, Zone.SUPPORT);
_game.getGameState().addCardToZone(_game, nazgul, Zone.HAND);
skipMulligans();
_game.getGameState().setTwilight(10);
// Pass in fellowship
playerDecided(P1, "");
// Pass in shadow
playerDecided(P2, "0");
assertEquals(1, _game.getGameState().getWounds(nazgul));
}
@Test
public void choiceEffect() throws DecisionResultInvalidException, CardNotFoundException {
initializeSimplestGame();
PhysicalCardImpl getOutOfTheShire = createCard(P1, "40_320");
PhysicalCardImpl merry = createCard(P1, "40_256");
PhysicalCardImpl nazgul = createCard(P2, "40_211");
_game.getGameState().addCardToZone(_game, getOutOfTheShire, Zone.HAND);
_game.getGameState().addCardToZone(_game, merry, Zone.FREE_CHARACTERS);
_game.getGameState().addCardToZone(_game, nazgul, Zone.SHADOW_CHARACTERS);
skipMulligans();
// Pass in fellowship
playerDecided(P1, "");
// Pass in shadow
playerDecided(P2, "");
// Pass in maneuver
playerDecided(P1, "");
playerDecided(P2, "");
// Pass in archery
playerDecided(P1, "");
playerDecided(P2, "");
// Pass in assignment
playerDecided(P1, "");
playerDecided(P2, "");
playerDecided(P1, merry.getCardId() + " " + nazgul.getCardId());
playerDecided(P1, "" + merry.getCardId());
// Play Get Out of the Shire
playerDecided(P1, "0");
// Choose to cancel skirmish
playerDecided(P1, "1");
// We're in Fierce skirmishes
assertEquals(Phase.ASSIGNMENT, _game.getGameState().getCurrentPhase());
assertEquals(0, _game.getGameState().getWounds(merry));
assertEquals(Zone.FREE_CHARACTERS, merry.getZone());
}
@Test
public void conditionalEffect() throws DecisionResultInvalidException, CardNotFoundException {
initializeSimplestGame();
PhysicalCardImpl getOutOfTheShire = createCard(P1, "40_320");
PhysicalCardImpl nazgul = createCard(P2, "40_211");
_game.getGameState().addCardToZone(_game, getOutOfTheShire, Zone.HAND);
_game.getGameState().addCardToZone(_game, nazgul, Zone.SHADOW_CHARACTERS);
final PhysicalCard frodo = _game.getGameState().getRingBearer(P1);
skipMulligans();
// Pass in fellowship
playerDecided(P1, "");
// Pass in shadow
playerDecided(P2, "");
// Pass in maneuver
playerDecided(P1, "");
playerDecided(P2, "");
// Pass in archery
playerDecided(P1, "");
playerDecided(P2, "");
// Pass in assignment
playerDecided(P1, "");
playerDecided(P2, "");
playerDecided(P1, frodo.getCardId() + " " + nazgul.getCardId());
playerDecided(P1, "" + frodo.getCardId());
// Play Get Out of the Shire
playerDecided(P1, "0");
// No choice given
assertNull(_userFeedback.getAwaitingDecision(P1));
}
@Test
public void preventableEffect() throws DecisionResultInvalidException, CardNotFoundException {
initializeSimplestGame();
PhysicalCardImpl boromir = createCard(P1, "40_101");
PhysicalCardImpl gauntlets = createCard(P1, "40_103");
PhysicalCardImpl nazgul = createCard(P2, "40_211");
_game.getGameState().addCardToZone(_game, boromir, Zone.SUPPORT);
_game.getGameState().attachCard(_game, gauntlets, boromir);
_game.getGameState().addCardToZone(_game, nazgul, Zone.SHADOW_CHARACTERS);
skipMulligans();
// Pass in fellowship
playerDecided(P1, "");
// Pass in shadow
playerDecided(P2, "");
// Pass in maneuver
playerDecided(P1, "");
playerDecided(P2, "");
// Pass in archery
playerDecided(P1, "");
playerDecided(P2, "");
// Pass in assignment
playerDecided(P1, "");
playerDecided(P2, "");
playerDecided(P1, boromir.getCardId() + " " + nazgul.getCardId());
playerDecided(P1, "" + boromir.getCardId());
final int twilightPool = _game.getGameState().getTwilightPool();
// Use Gauntlets
playerDecided(P1, "0");
playerDecided(P2, "0");
assertEquals(twilightPool - 1, _game.getGameState().getTwilightPool());
}
@Test
public void costToEffect() throws DecisionResultInvalidException, CardNotFoundException {
initializeSimplestGame();
PhysicalCardImpl celeborn = createCard(P1, "40_38");
PhysicalCardImpl celebornInDeck = createCard(P1, "40_38");
PhysicalCardImpl nazgul = createCard(P2, "40_211");
_game.getGameState().addCardToZone(_game, celeborn, Zone.SUPPORT);
_game.getGameState().putCardOnTopOfDeck(celebornInDeck);
_game.getGameState().addCardToZone(_game, nazgul, Zone.SHADOW_CHARACTERS);
skipMulligans();
// Pass in fellowship
playerDecided(P1, "");
// Pass in shadow
playerDecided(P2, "");
// Use Celeborn
playerDecided(P1, "0");
// Pass on reveal
playerDecided(P1, "");
playerDecided(P2, "");
// Choose to discard
playerDecided(P1, "0");
assertEquals(Zone.DISCARD, celebornInDeck.getZone());
assertEquals(1, _game.getGameState().getWounds(nazgul));
}
@Test
public void costToEffectPass() throws DecisionResultInvalidException, CardNotFoundException {
initializeSimplestGame();
PhysicalCardImpl celeborn = createCard(P1, "40_38");
PhysicalCardImpl celebornInDeck = createCard(P1, "40_38");
PhysicalCardImpl nazgul = createCard(P2, "40_211");
_game.getGameState().addCardToZone(_game, celeborn, Zone.SUPPORT);
_game.getGameState().putCardOnTopOfDeck(celebornInDeck);
_game.getGameState().addCardToZone(_game, nazgul, Zone.SHADOW_CHARACTERS);
skipMulligans();
// Pass in fellowship
playerDecided(P1, "");
// Pass in shadow
playerDecided(P2, "");
// Use Celeborn
playerDecided(P1, "0");
// Pass on reveal
playerDecided(P1, "");
playerDecided(P2, "");
// Choose not to discard
playerDecided(P1, "1");
assertEquals(Zone.DECK, celebornInDeck.getZone());
assertEquals(0, _game.getGameState().getWounds(nazgul));
}
//Replace with Goblin Domain
// @Test
// public void playedTrigger() throws DecisionResultInvalidException, CardNotFoundException {
// initializeSimplestGame();
//
// PhysicalCardImpl bruinenUnleashed = new PhysicalCardImpl(100, "40_37", P1, _cardLibrary.getLotroCardBlueprint("40_37"));
// PhysicalCardImpl legolas = new PhysicalCardImpl(100, "1_50", P1, _cardLibrary.getLotroCardBlueprint("40_52"));
// PhysicalCardImpl nazgul = new PhysicalCardImpl(100, "1_237", P2, _cardLibrary.getLotroCardBlueprint("40_211"));
//
// _game.getGameState().addCardToZone(_game, legolas, Zone.FREE_CHARACTERS);
// _game.getGameState().addCardToZone(_game, bruinenUnleashed, Zone.SUPPORT);
// _game.getGameState().addCardToZone(_game, nazgul, Zone.HAND);
//
// skipMulligans();
//
// _game.getGameState().setTwilight(10);
//
// // Pass in fellowship
// playerDecided(P1, "");
//
// // Pass in shadow
// playerDecided(P2, "0");
//
// assertEquals(1, _game.getGameState().getWounds(nazgul));
// }
// @Test
// public void choiceEffect() throws DecisionResultInvalidException, CardNotFoundException {
// initializeSimplestGame();
//
// PhysicalCardImpl getOutOfTheShire = createCard(P1, "40_320");
// PhysicalCardImpl merry = createCard(P1, "40_256");
// PhysicalCardImpl nazgul = createCard(P2, "40_211");
//
// _game.getGameState().addCardToZone(_game, getOutOfTheShire, Zone.HAND);
// _game.getGameState().addCardToZone(_game, merry, Zone.FREE_CHARACTERS);
// _game.getGameState().addCardToZone(_game, nazgul, Zone.SHADOW_CHARACTERS);
//
// skipMulligans();
//
// // Pass in fellowship
// playerDecided(P1, "");
//
// // Pass in shadow
// playerDecided(P2, "");
//
// // Pass in maneuver
// playerDecided(P1, "");
// playerDecided(P2, "");
//
// // Pass in archery
// playerDecided(P1, "");
// playerDecided(P2, "");
//
// // Pass in assignment
// playerDecided(P1, "");
// playerDecided(P2, "");
//
// playerDecided(P1, merry.getCardId() + " " + nazgul.getCardId());
//
// playerDecided(P1, "" + merry.getCardId());
//
// // Play Get Out of the Shire
// playerDecided(P1, "0");
//
// // Choose to cancel skirmish
// playerDecided(P1, "1");
//
// // We're in Fierce skirmishes
// assertEquals(Phase.ASSIGNMENT, _game.getGameState().getCurrentPhase());
// assertEquals(0, _game.getGameState().getWounds(merry));
// assertEquals(Zone.FREE_CHARACTERS, merry.getZone());
// }
// @Test
// public void conditionalEffect() throws DecisionResultInvalidException, CardNotFoundException {
// initializeSimplestGame();
//
// PhysicalCardImpl getOutOfTheShire = createCard(P1, "40_320");
// PhysicalCardImpl nazgul = createCard(P2, "40_211");
//
// _game.getGameState().addCardToZone(_game, getOutOfTheShire, Zone.HAND);
// _game.getGameState().addCardToZone(_game, nazgul, Zone.SHADOW_CHARACTERS);
//
// final PhysicalCard frodo = _game.getGameState().getRingBearer(P1);
//
// skipMulligans();
//
// // Pass in fellowship
// playerDecided(P1, "");
//
// // Pass in shadow
// playerDecided(P2, "");
//
// // Pass in maneuver
// playerDecided(P1, "");
// playerDecided(P2, "");
//
// // Pass in archery
// playerDecided(P1, "");
// playerDecided(P2, "");
//
// // Pass in assignment
// playerDecided(P1, "");
// playerDecided(P2, "");
//
// playerDecided(P1, frodo.getCardId() + " " + nazgul.getCardId());
//
// playerDecided(P1, "" + frodo.getCardId());
//
// // Play Get Out of the Shire
// playerDecided(P1, "0");
//
// // No choice given
// assertNull(_userFeedback.getAwaitingDecision(P1));
// }
// @Test
// public void preventableEffect() throws DecisionResultInvalidException, CardNotFoundException {
// initializeSimplestGame();
//
// PhysicalCardImpl boromir = createCard(P1, "40_101");
// PhysicalCardImpl gauntlets = createCard(P1, "40_103");
// PhysicalCardImpl nazgul = createCard(P2, "40_211");
//
// _game.getGameState().addCardToZone(_game, boromir, Zone.SUPPORT);
// _game.getGameState().attachCard(_game, gauntlets, boromir);
// _game.getGameState().addCardToZone(_game, nazgul, Zone.SHADOW_CHARACTERS);
//
// skipMulligans();
//
// // Pass in fellowship
// playerDecided(P1, "");
//
// // Pass in shadow
// playerDecided(P2, "");
//
// // Pass in maneuver
// playerDecided(P1, "");
// playerDecided(P2, "");
//
// // Pass in archery
// playerDecided(P1, "");
// playerDecided(P2, "");
//
// // Pass in assignment
// playerDecided(P1, "");
// playerDecided(P2, "");
//
// playerDecided(P1, boromir.getCardId() + " " + nazgul.getCardId());
//
// playerDecided(P1, "" + boromir.getCardId());
//
// final int twilightPool = _game.getGameState().getTwilightPool();
//
// // Use Gauntlets
// playerDecided(P1, "0");
//
// playerDecided(P2, "0");
//
// assertEquals(twilightPool - 1, _game.getGameState().getTwilightPool());
// }
// @Test
// public void costToEffect() throws DecisionResultInvalidException, CardNotFoundException {
// initializeSimplestGame();
//
// PhysicalCardImpl celeborn = createCard(P1, "40_38");
// PhysicalCardImpl celebornInDeck = createCard(P1, "40_38");
// PhysicalCardImpl nazgul = createCard(P2, "40_211");
//
// _game.getGameState().addCardToZone(_game, celeborn, Zone.SUPPORT);
// _game.getGameState().putCardOnTopOfDeck(celebornInDeck);
// _game.getGameState().addCardToZone(_game, nazgul, Zone.SHADOW_CHARACTERS);
//
// skipMulligans();
//
// // Pass in fellowship
// playerDecided(P1, "");
//
// // Pass in shadow
// playerDecided(P2, "");
//
// // Use Celeborn
// playerDecided(P1, "0");
// // Pass on reveal
// playerDecided(P1, "");
// playerDecided(P2, "");
//
// // Choose to discard
// playerDecided(P1, "0");
//
// assertEquals(Zone.DISCARD, celebornInDeck.getZone());
// assertEquals(1, _game.getGameState().getWounds(nazgul));
// }
// @Test
// public void costToEffectPass() throws DecisionResultInvalidException, CardNotFoundException {
// initializeSimplestGame();
//
// PhysicalCardImpl celeborn = createCard(P1, "40_38");
// PhysicalCardImpl celebornInDeck = createCard(P1, "40_38");
// PhysicalCardImpl nazgul = createCard(P2, "40_211");
//
// _game.getGameState().addCardToZone(_game, celeborn, Zone.SUPPORT);
// _game.getGameState().putCardOnTopOfDeck(celebornInDeck);
// _game.getGameState().addCardToZone(_game, nazgul, Zone.SHADOW_CHARACTERS);
//
// skipMulligans();
//
// // Pass in fellowship
// playerDecided(P1, "");
//
// // Pass in shadow
// playerDecided(P2, "");
//
// // Use Celeborn
// playerDecided(P1, "0");
// // Pass on reveal
// playerDecided(P1, "");
// playerDecided(P2, "");
//
// // Choose not to discard
// playerDecided(P1, "1");
//
// assertEquals(Zone.DECK, celebornInDeck.getZone());
// assertEquals(0, _game.getGameState().getWounds(nazgul));
// }
@Test
public void checkingEventCostsAsRequirements() throws DecisionResultInvalidException, CardNotFoundException {
initializeSimplestGame();
final PhysicalCardImpl battleFever = createCard(P1, "40_5");
final PhysicalCardImpl gimli = createCard(P1, "40_18");
PhysicalCardImpl nazgul = createCard(P2, "40_211");
final PhysicalCardImpl countsButOne = createCard(P1, "8_4");
final PhysicalCardImpl gimli = createCard(P1, "1_13");
PhysicalCardImpl nazgul = createCard(P2, "1_237");
_game.getGameState().addCardToZone(_game, gimli, Zone.FREE_CHARACTERS);
_game.getGameState().addCardToZone(_game, battleFever, Zone.HAND);
_game.getGameState().addCardToZone(_game, countsButOne, Zone.HAND);
_game.getGameState().addCardToZone(_game, nazgul, Zone.SHADOW_CHARACTERS);
skipMulligans();
@@ -350,182 +352,186 @@ public class NewCardsAtTest extends AbstractAtTest {
playerDecided(P1, gimli.getCardId() + " " + nazgul.getCardId());
playerDecided(P1, "" + gimli.getCardId());
assertNull(getCardActionId(P1, "Play Battle Fever"));
assertNull(getCardActionId(P1, "Play Counts But One"));
}
@Test
public void discardCardEffect() throws DecisionResultInvalidException, CardNotFoundException {
initializeSimplestGame();
// @Test
// public void discardCardEffect() throws DecisionResultInvalidException, CardNotFoundException {
// initializeSimplestGame();
//
// final PhysicalCardImpl blackBreath = createCard(P2, "40_183");
// final PhysicalCardImpl athelas = createCard(P1, "40_313");
// final PhysicalCardImpl athelasInHand = createCard(P1, "40_313");
// PhysicalCardImpl aragorn = createCard(P1, "40_94");
//
// _game.getGameState().addCardToZone(_game, aragorn, Zone.FREE_CHARACTERS);
// _game.getGameState().attachCard(_game, blackBreath, aragorn);
// _game.getGameState().addCardToZone(_game, athelas, Zone.HAND);
// _game.getGameState().addCardToZone(_game, athelasInHand, Zone.HAND);
//
// skipMulligans();
//
// // Play athelas
// playerDecided(P1, "0");
// // Attach to Aragorn
// playerDecided(P1, "" + aragorn.getCardId());
//
// playerDecided(P1, "0");
//
// playerDecided(P1, "0");
//
// assertEquals(Zone.DISCARD, blackBreath.getZone());
// }
final PhysicalCardImpl blackBreath = createCard(P2, "40_183");
final PhysicalCardImpl athelas = createCard(P1, "40_313");
final PhysicalCardImpl athelasInHand = createCard(P1, "40_313");
PhysicalCardImpl aragorn = createCard(P1, "40_94");
//Conditional strength bonus (+X or +Y if Z)
_game.getGameState().addCardToZone(_game, aragorn, Zone.FREE_CHARACTERS);
_game.getGameState().attachCard(_game, blackBreath, aragorn);
_game.getGameState().addCardToZone(_game, athelas, Zone.HAND);
_game.getGameState().addCardToZone(_game, athelasInHand, Zone.HAND);
// @Test
// public void strengthBonusDependingOnCharacterPlayedOn() throws DecisionResultInvalidException, CardNotFoundException {
// initializeSimplestGame();
//
// final PhysicalCardImpl gandalf = createCard(P1, "40_70");
// final PhysicalCardImpl bolsteredSpirits = createCard(P1, "40_67");
// PhysicalCardImpl nazgul = createCard(P2, "40_211");
//
// _game.getGameState().addCardToZone(_game, gandalf, Zone.FREE_CHARACTERS);
// _game.getGameState().addCardToZone(_game, bolsteredSpirits, Zone.HAND);
// _game.getGameState().addCardToZone(_game, nazgul, Zone.SHADOW_CHARACTERS);
//
// skipMulligans();
//
// // Pass in fellowship
// playerDecided(P1, "");
//
// // Pass in shadow
// playerDecided(P2, "");
//
////Pass in maneuver
// playerDecided(P1, "");
// playerDecided(P2, "");
//
////Pass in archery
// playerDecided(P1, "");
// playerDecided(P2, "");
//
////Pass in assignment
// playerDecided(P1, "");
// playerDecided(P2, "");
//
// playerDecided(P1, gandalf.getCardId() + " " + nazgul.getCardId());
// playerDecided(P1, "" + gandalf.getCardId());
//
// playerDecided(P1, "0");
// playerDecided(P1, "");
//
// assertEquals(7 + 3, _game.getModifiersQuerying().getStrength(_game, gandalf));
// }
//
// @Test
// public void strengthBonusDependingOnCharacterPlayedOn2() throws DecisionResultInvalidException, CardNotFoundException {
// initializeSimplestGame();
//
// final PhysicalCardImpl gandalf = createCard(P1, "40_70");
// final PhysicalCardImpl boromir = createCard(P1, "40_101");
// final PhysicalCardImpl goBackToTheShadows = createCard(P1, "40_312");
// final PhysicalCardImpl nazgul = createCard(P2, "40_211");
//
// _game.getGameState().addCardToZone(_game, gandalf, Zone.FREE_CHARACTERS);
// _game.getGameState().addCardToZone(_game, boromir, Zone.FREE_CHARACTERS);
// _game.getGameState().addCardToZone(_game, goBackToTheShadows, Zone.HAND);
// _game.getGameState().addCardToZone(_game, nazgul, Zone.SHADOW_CHARACTERS);
// _game.getGameState().removeBurdens(_game.getGameState().getBurdens());
//
// skipMulligans();
//
// // Pass in fellowship
// playerDecided(P1, "");
//
// // Pass in shadow
// playerDecided(P2, "");
//
////Pass in maneuver
// playerDecided(P1, "");
// playerDecided(P2, "");
//
////Pass in archery
// playerDecided(P1, "");
// playerDecided(P2, "");
//
////Pass in assignment
// playerDecided(P1, "");
// playerDecided(P2, "");
//
// playerDecided(P1, boromir.getCardId() + " " + nazgul.getCardId());
// playerDecided(P1, "" + boromir.getCardId());
//
// playerDecided(P1, "0");
//
// assertEquals(14 - 3, _game.getModifiersQuerying().getStrength(_game, nazgul));
// }
skipMulligans();
// @Test
// public void mathProgrammingDiscardBoth() throws DecisionResultInvalidException, CardNotFoundException {
// initializeSimplestGame();
//
// final PhysicalCardImpl gandalf = createCard(P1, "40_70");
// final PhysicalCardImpl discerment = createCard(P1, "40_68");
// final PhysicalCardImpl blackBreath = createCard(P2, "1_207");
// final PhysicalCardImpl blackBreath2 = createCard(P2, "1_207");
//
// _game.getGameState().addCardToZone(_game, gandalf, Zone.FREE_CHARACTERS);
// _game.getGameState().addCardToZone(_game, discerment, Zone.HAND);
// _game.getGameState().attachCard(_game, blackBreath, gandalf);
// _game.getGameState().attachCard(_game, blackBreath2, gandalf);
//
// skipMulligans();
//
// playerDecided(P1, "0");
// playerDecided(P1, "2");
// playerDecided(P1, "");
//
// playerDecided(P1, "" + blackBreath.getCardId());
// playerDecided(P1, "" + blackBreath2.getCardId());
//
// assertEquals(Zone.DISCARD, blackBreath.getZone());
// assertEquals(Zone.DISCARD, blackBreath2.getZone());
// }
// Play athelas
playerDecided(P1, "0");
// Attach to Aragorn
playerDecided(P1, "" + aragorn.getCardId());
//Max twilight shenanigans
playerDecided(P1, "0");
playerDecided(P1, "0");
assertEquals(Zone.DISCARD, blackBreath.getZone());
}
@Test
public void strengthBonusDependingOnCharacterPlayedOn() throws DecisionResultInvalidException, CardNotFoundException {
initializeSimplestGame();
final PhysicalCardImpl gandalf = createCard(P1, "40_70");
final PhysicalCardImpl bolsteredSpirits = createCard(P1, "40_67");
PhysicalCardImpl nazgul = createCard(P2, "40_211");
_game.getGameState().addCardToZone(_game, gandalf, Zone.FREE_CHARACTERS);
_game.getGameState().addCardToZone(_game, bolsteredSpirits, Zone.HAND);
_game.getGameState().addCardToZone(_game, nazgul, Zone.SHADOW_CHARACTERS);
skipMulligans();
// Pass in fellowship
playerDecided(P1, "");
// Pass in shadow
playerDecided(P2, "");
//Pass in maneuver
playerDecided(P1, "");
playerDecided(P2, "");
//Pass in archery
playerDecided(P1, "");
playerDecided(P2, "");
//Pass in assignment
playerDecided(P1, "");
playerDecided(P2, "");
playerDecided(P1, gandalf.getCardId() + " " + nazgul.getCardId());
playerDecided(P1, "" + gandalf.getCardId());
playerDecided(P1, "0");
playerDecided(P1, "");
assertEquals(7 + 3, _game.getModifiersQuerying().getStrength(_game, gandalf));
}
@Test
public void strengthBonusDependingOnCharacterPlayedOn2() throws DecisionResultInvalidException, CardNotFoundException {
initializeSimplestGame();
final PhysicalCardImpl gandalf = createCard(P1, "40_70");
final PhysicalCardImpl boromir = createCard(P1, "40_101");
final PhysicalCardImpl goBackToTheShadows = createCard(P1, "40_312");
final PhysicalCardImpl nazgul = createCard(P2, "40_211");
_game.getGameState().addCardToZone(_game, gandalf, Zone.FREE_CHARACTERS);
_game.getGameState().addCardToZone(_game, boromir, Zone.FREE_CHARACTERS);
_game.getGameState().addCardToZone(_game, goBackToTheShadows, Zone.HAND);
_game.getGameState().addCardToZone(_game, nazgul, Zone.SHADOW_CHARACTERS);
_game.getGameState().removeBurdens(_game.getGameState().getBurdens());
skipMulligans();
// Pass in fellowship
playerDecided(P1, "");
// Pass in shadow
playerDecided(P2, "");
//Pass in maneuver
playerDecided(P1, "");
playerDecided(P2, "");
//Pass in archery
playerDecided(P1, "");
playerDecided(P2, "");
//Pass in assignment
playerDecided(P1, "");
playerDecided(P2, "");
playerDecided(P1, boromir.getCardId() + " " + nazgul.getCardId());
playerDecided(P1, "" + boromir.getCardId());
playerDecided(P1, "0");
assertEquals(14 - 3, _game.getModifiersQuerying().getStrength(_game, nazgul));
}
@Test
public void mathProgrammingDiscardBoth() throws DecisionResultInvalidException, CardNotFoundException {
initializeSimplestGame();
final PhysicalCardImpl gandalf = createCard(P1, "40_70");
final PhysicalCardImpl discerment = createCard(P1, "40_68");
final PhysicalCardImpl blackBreath = createCard(P2, "40_183");
final PhysicalCardImpl blackBreath2 = createCard(P2, "40_183");
_game.getGameState().addCardToZone(_game, gandalf, Zone.FREE_CHARACTERS);
_game.getGameState().addCardToZone(_game, discerment, Zone.HAND);
_game.getGameState().attachCard(_game, blackBreath, gandalf);
_game.getGameState().attachCard(_game, blackBreath2, gandalf);
skipMulligans();
playerDecided(P1, "0");
playerDecided(P1, "2");
playerDecided(P1, "");
playerDecided(P1, "" + blackBreath.getCardId());
playerDecided(P1, "" + blackBreath2.getCardId());
assertEquals(Zone.DISCARD, blackBreath.getZone());
assertEquals(Zone.DISCARD, blackBreath2.getZone());
}
@Test
public void mathProgrammingDiscardOne() throws DecisionResultInvalidException, CardNotFoundException {
initializeSimplestGame();
final PhysicalCardImpl gandalf = createCard(P1, "40_70");
final PhysicalCardImpl discerment = createCard(P1, "40_68");
final PhysicalCardImpl blackBreath = createCard(P2, "40_183");
final PhysicalCardImpl blackBreath2 = createCard(P2, "40_183");
_game.getGameState().addCardToZone(_game, gandalf, Zone.FREE_CHARACTERS);
_game.getGameState().addCardToZone(_game, discerment, Zone.HAND);
_game.getGameState().attachCard(_game, blackBreath, gandalf);
_game.getGameState().attachCard(_game, blackBreath2, gandalf);
skipMulligans();
playerDecided(P1, "0");
playerDecided(P1, "1");
playerDecided(P1, "");
playerDecided(P1, "" + blackBreath.getCardId());
assertEquals(AwaitingDecisionType.CARD_ACTION_CHOICE, _userFeedback.getAwaitingDecision(P1).getDecisionType());
assertEquals(Zone.DISCARD, blackBreath.getZone());
assertEquals(Zone.ATTACHED, blackBreath2.getZone());
}
// @Test
// public void mathProgrammingDiscardOne() throws DecisionResultInvalidException, CardNotFoundException {
// initializeSimplestGame();
//
// final PhysicalCardImpl gandalf = createCard(P1, "1_72");
// final PhysicalCardImpl discerment = createCard(P1, "40_68");
// final PhysicalCardImpl blackBreath = createCard(P2, "1_207");
// final PhysicalCardImpl blackBreath2 = createCard(P2, "1_207");
//
// _game.getGameState().addCardToZone(_game, gandalf, Zone.FREE_CHARACTERS);
// _game.getGameState().addCardToZone(_game, discerment, Zone.HAND);
// _game.getGameState().attachCard(_game, blackBreath, gandalf);
// _game.getGameState().attachCard(_game, blackBreath2, gandalf);
//
// skipMulligans();
//
// playerDecided(P1, "0");
// playerDecided(P1, "1");
// playerDecided(P1, "");
//
// playerDecided(P1, "" + blackBreath.getCardId());
// assertEquals(AwaitingDecisionType.CARD_ACTION_CHOICE, _userFeedback.getAwaitingDecision(P1).getDecisionType());
//
// assertEquals(Zone.DISCARD, blackBreath.getZone());
// assertEquals(Zone.ATTACHED, blackBreath2.getZone());
// }
@Test
public void strengthBonus() throws DecisionResultInvalidException, CardNotFoundException {
initializeSimplestGame();
final PhysicalCardImpl grimbeorn = createCard(P1, "14_6");
final PhysicalCardImpl nazgulInHand = createCard(P1, "40_211");
final PhysicalCardImpl nazgul = createCard(P2, "40_211");
final PhysicalCardImpl nazgulInHand = createCard(P1, "1_237");
final PhysicalCardImpl nazgul = createCard(P2, "1_237");
_game.getGameState().addCardToZone(_game, grimbeorn, Zone.FREE_CHARACTERS);
_game.getGameState().addCardToZone(_game, nazgul, Zone.SHADOW_CHARACTERS);
@@ -567,41 +573,44 @@ public class NewCardsAtTest extends AbstractAtTest {
assertEquals(Zone.SHADOW_CHARACTERS, orcAssassin2.getZone());
}
@Test
public void spotCountChange() throws DecisionResultInvalidException, CardNotFoundException {
initializeSimplestGame();
final PhysicalCardImpl merry = createCard(P1, "40_257");
final PhysicalCardImpl bilbosPipe = createCard(P1, "40_244");
final PhysicalCardImpl pipeweed = createCard(P1, "40_255");
_game.getGameState().addCardToZone(_game, merry, Zone.HAND);
_game.getGameState().addCardToZone(_game, pipeweed, Zone.SUPPORT);
_game.getGameState().addCardToZone(_game, bilbosPipe, Zone.HAND);
skipMulligans();
playerDecided(P1, getCardActionId(P1, "Play Merry"));
playerDecided(P1, getCardActionId(P1, "Play Bilbo's Pipe"));
playerDecided(P1, "" + merry.getCardId());
playerDecided(P1, getCardActionId(P1, "Use Bilbo's Pipe"));
assertEquals("2", _userFeedback.getAwaitingDecision(P1).getDecisionParameters().get("max")[0]);
}
//Replace with gimli's pipe test
// @Test
// public void spotCountChange() throws DecisionResultInvalidException, CardNotFoundException {
// initializeSimplestGame();
//
// final PhysicalCardImpl merry = createCard(P1, "40_257");
// final PhysicalCardImpl bilbosPipe = createCard(P1, "40_244");
// final PhysicalCardImpl pipeweed = createCard(P1, "40_255");
//
// _game.getGameState().addCardToZone(_game, merry, Zone.HAND);
// _game.getGameState().addCardToZone(_game, pipeweed, Zone.SUPPORT);
// _game.getGameState().addCardToZone(_game, bilbosPipe, Zone.HAND);
//
// skipMulligans();
//
// playerDecided(P1, getCardActionId(P1, "Play Merry"));
// playerDecided(P1, getCardActionId(P1, "Play Bilbo's Pipe"));
//
// playerDecided(P1, "" + merry.getCardId());
// playerDecided(P1, getCardActionId(P1, "Use Bilbo's Pipe"));
// assertEquals("2", _userFeedback.getAwaitingDecision(P1).getDecisionParameters().get("max")[0]);
// }
@Test
public void removeBurdens() throws DecisionResultInvalidException, CardNotFoundException {
initializeSimplestGame();
final PhysicalCardImpl samsPipe = createCard(P1, "40_269");
final PhysicalCardImpl pipeweed = createCard(P1, "40_255");
final PhysicalCardImpl gandalf = createCard(P1, "1_72");
final PhysicalCardImpl gandalfspipe = createCard(P1, "1_74");
final PhysicalCardImpl pipeweed = createCard(P1, "1_305");
_game.getGameState().addCardToZone(_game, pipeweed, Zone.SUPPORT);
_game.getGameState().attachCard(_game, samsPipe, _game.getGameState().getRingBearer(P1));
_game.getGameState().addCardToZone(_game, gandalf, Zone.FREE_CHARACTERS);
_game.getGameState().attachCard(_game, gandalfspipe, gandalf);
skipMulligans();
playerDecided(P1, getCardActionId(P1, "Use Sam's Pipe"));
playerDecided(P1, getCardActionId(P1, "Use Gandalf's Pipe"));
playerDecided(P1, "1");
assertEquals(0, _game.getGameState().getBurdens());

View File

@@ -52,22 +52,22 @@ public class TimingAtTest extends AbstractAtTest {
@Test
public void playStartingFellowshipWithDiscountFromCardItself() throws DecisionResultInvalidException {
Map<String, Collection<String>> extraCards = new HashMap<>();
extraCards.put(P1, Arrays.asList("40_17", "40_20"));
extraCards.put(P1, Arrays.asList("4_265", "4_267"));
initializeSimplestGame(extraCards);
// Play first character
AwaitingDecision firstCharacterDecision = _userFeedback.getAwaitingDecision(P1);
assertEquals(AwaitingDecisionType.ARBITRARY_CARDS, firstCharacterDecision.getDecisionType());
validateContents(new String[]{"40_17", "40_20"}, ((String[]) firstCharacterDecision.getDecisionParameters().get("blueprintId")));
validateContents(new String[]{"4_265", "4_267"}, (firstCharacterDecision.getDecisionParameters().get("blueprintId")));
playerDecided(P1, getArbitraryCardId(firstCharacterDecision, "40_17"));
playerDecided(P1, getArbitraryCardId(firstCharacterDecision, "4_265"));
// Play second character with discount
AwaitingDecision secondCharacterDecision = _userFeedback.getAwaitingDecision(P1);
assertEquals(AwaitingDecisionType.ARBITRARY_CARDS, secondCharacterDecision.getDecisionType());
validateContents(new String[]{"40_20"}, ((String[]) secondCharacterDecision.getDecisionParameters().get("blueprintId")));
validateContents(new String[]{"4_267"}, ( secondCharacterDecision.getDecisionParameters().get("blueprintId")));
playerDecided(P1, getArbitraryCardId(secondCharacterDecision, "40_20"));
playerDecided(P1, getArbitraryCardId(secondCharacterDecision, "4_267"));
}
@Test