Updated Bilbo to (hopefully) the final version. Minor adjustments to V1 cards to prefer skirmish pumps going on "skirmishing" characters
This commit is contained in:
@@ -238,7 +238,7 @@
|
||||
},
|
||||
"effect": {
|
||||
"type": "modifyStrength",
|
||||
"filter": "choose(companion,signet(aragorn))",
|
||||
"filter": "choose(companion,signet(aragorn),inSkirmish)",
|
||||
"amount": {
|
||||
"type": "forEachInMemory",
|
||||
"memory": "discardedCards",
|
||||
|
||||
@@ -258,7 +258,7 @@
|
||||
"effect": [
|
||||
{
|
||||
"type": "modifyStrength",
|
||||
"filter": "choose(twilight,nazgul)",
|
||||
"filter": "choose(twilight,nazgul,inSkirmish)",
|
||||
"memorize": "chosenNazzy",
|
||||
"amount": {
|
||||
"type": "forEachWound",
|
||||
|
||||
@@ -18,10 +18,13 @@ import com.gempukku.lotro.logic.modifiers.cost.DiscardFromPlayExtraPlayCostModif
|
||||
import com.gempukku.lotro.logic.timing.EffectResult;
|
||||
import com.gempukku.lotro.logic.timing.RuleUtils;
|
||||
import com.gempukku.lotro.logic.vo.LotroDeck;
|
||||
import junit.framework.Assert;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
import static junit.framework.Assert.assertFalse;
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.assertTrue;
|
||||
|
||||
public class GenericCardTestHelper extends AbstractAtTest {
|
||||
|
||||
@@ -135,12 +138,11 @@ public class GenericCardTestHelper extends AbstractAtTest {
|
||||
public PhysicalCardImpl GetShadowSite(int siteNum) { return GetSite(P2, siteNum); }
|
||||
public PhysicalCardImpl GetSite(String playerID, int siteNum)
|
||||
{
|
||||
PhysicalCardImpl site = (PhysicalCardImpl)_game.getGameState().getSite(siteNum);
|
||||
if(site != null && site.getOwner() == playerID)
|
||||
return site;
|
||||
|
||||
List<PhysicalCardImpl> advDeck = (List<PhysicalCardImpl>)_game.getGameState().getAdventureDeck(playerID);
|
||||
// for (PhysicalCardImpl card : advDeck) {
|
||||
// if (card.getSiteNumber() == siteNum){
|
||||
// return card;
|
||||
// }
|
||||
// }
|
||||
return advDeck.stream().filter(x -> x.getBlueprint().getSiteNumber() == siteNum).findFirst().get();
|
||||
}
|
||||
|
||||
|
||||
@@ -196,8 +196,7 @@ public class Card_V1_023_Tests
|
||||
assertTrue(scn.FreepsDecisionAvailable("Choose stacked cards to discard"));
|
||||
assertEquals(3, scn.GetStrength(sam));
|
||||
scn.FreepsChooseCards(gandalfE, elfE, dwarfE);
|
||||
assertEquals(5, scn.GetFreepsCardChoiceCount());
|
||||
scn.FreepsChooseCard(sam);
|
||||
//lots of candidates, but only one skirmishing, so Sam gets auto-picked
|
||||
assertEquals(6, scn.GetStrength(sam));
|
||||
assertEquals(1, scn.GetStackedCards(gone).size());
|
||||
assertTrue(scn.GetStackedCards(gone).stream().anyMatch(x -> x.getBlueprintId() == gondorE.getBlueprintId()));
|
||||
|
||||
@@ -27,7 +27,7 @@ public class Card_V1_050_Tests
|
||||
put("bilbo", "151_50");
|
||||
put("sam", "1_311");
|
||||
put("coat", "13_153");
|
||||
put("sting", "8_113");
|
||||
put("sting", "1_313");
|
||||
|
||||
put("phial", "3_24");
|
||||
put("greenleaf", "1_50");
|
||||
@@ -91,32 +91,22 @@ public class Card_V1_050_Tests
|
||||
|
||||
scn.StartGame();
|
||||
|
||||
for(int i = 1; i <= 8; i++)
|
||||
for(int i = 1; i < 8; i++)
|
||||
{
|
||||
PhysicalCardImpl site = scn.GetCurrentSite();
|
||||
if(i == 3 || i == 6 || scn.HasKeyword(scn.GetCurrentSite(), Keyword.SANCTUARY)) {
|
||||
if(scn.HasKeyword(site, Keyword.SANCTUARY)) {
|
||||
assertTrue(scn.FreepsCardActionAvailable(bilbo));
|
||||
}
|
||||
else {
|
||||
assertFalse(scn.FreepsCardActionAvailable(bilbo));
|
||||
}
|
||||
|
||||
scn.SkipToPhase(Phase.REGROUP);
|
||||
if(i == 8)
|
||||
break; // Game finished
|
||||
scn.PassCurrentPhaseActions();
|
||||
scn.FreepsChooseToStay();
|
||||
|
||||
//Shadow player
|
||||
scn.SkipToPhase(Phase.REGROUP);
|
||||
scn.FreepsPassCurrentPhaseAction(); // actually shadow with the swap
|
||||
scn.ShadowChoose("1"); // Choose to stay
|
||||
assertEquals(Phase.FELLOWSHIP, scn.GetCurrentPhase());
|
||||
scn.SkipToSite(i+1);
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
public void FellowshipAbilityExertsTwiceToTutor2ItemsOnFrodoSignetCompanions() throws DecisionResultInvalidException, CardNotFoundException {
|
||||
public void FellowshipAbilityExertsTwiceToTutor2ItemsOnFrodoSignetShireCompanions() throws DecisionResultInvalidException, CardNotFoundException {
|
||||
//Pre-game setup
|
||||
GenericCardTestHelper scn = GetScenario();
|
||||
|
||||
@@ -141,17 +131,17 @@ public class Card_V1_050_Tests
|
||||
scn.FreepsUseCardAction(bilbo);
|
||||
assertEquals(2, scn.GetWoundsOn(bilbo));
|
||||
assertTrue(scn.FreepsDecisionAvailable("Choose card from deck"));
|
||||
assertEquals(2, scn.GetFreepsCardChoiceCount());
|
||||
assertEquals(3, scn.GetFreepsCardChoiceCount()); // coat, sting, and phial
|
||||
|
||||
scn.FreepsChooseCardBPFromSelection(coat);
|
||||
assertEquals(Zone.ATTACHED, coat.getZone());
|
||||
assertEquals(frodo, coat.getAttachedTo());
|
||||
|
||||
assertTrue(scn.FreepsDecisionAvailable("Choose card from deck"));
|
||||
assertEquals(1, scn.GetFreepsCardChoiceCount());
|
||||
scn.FreepsChooseCardBPFromSelection(sting);
|
||||
assertEquals(Zone.ATTACHED, sting.getZone());
|
||||
assertEquals(frodo, sting.getAttachedTo());
|
||||
|
||||
assertTrue(scn.FreepsDecisionAvailable("Choose card from deck"));
|
||||
assertEquals(2, scn.GetFreepsCardChoiceCount());
|
||||
scn.FreepsChooseCardBPFromSelection(phial);
|
||||
assertEquals(Zone.ATTACHED, phial.getZone());
|
||||
assertEquals(frodo, phial.getAttachedTo());
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user