continuing work on vcards
This commit is contained in:
@@ -57,13 +57,25 @@
|
||||
},
|
||||
"cost":{
|
||||
"type": "addTwilight",
|
||||
"amount": 2
|
||||
"amount": 1
|
||||
},
|
||||
"effect": {
|
||||
"type": "stackcardsfromdiscard",
|
||||
"where": "self",
|
||||
"filter": "memory(topcard)"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "activated",
|
||||
"phase": "maneuver",
|
||||
"cost": {
|
||||
"type": "exert",
|
||||
"filter": "choose(dwarf)"
|
||||
},
|
||||
"effect": {
|
||||
"type": "playCardFromStacked",
|
||||
"on": "self"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
@@ -28,7 +28,7 @@ public class PutStackedCardsIntoHand implements EffectAppenderProducer {
|
||||
|
||||
MultiEffectAppender result = new MultiEffectAppender();
|
||||
result.addEffectAppender(
|
||||
CardResolver.resolveStackedCards(filter, valueSource, onFilterSource, "_temp", "you", "Choose cards to discard", environment));
|
||||
CardResolver.resolveStackedCards(filter, valueSource, onFilterSource, "_temp", "you", "Choose cards to take into hand", environment));
|
||||
result.addEffectAppender(
|
||||
new DelayedAppender() {
|
||||
@Override
|
||||
|
||||
@@ -7,7 +7,6 @@ import com.gempukku.lotro.game.state.LotroGame;
|
||||
import com.gempukku.lotro.logic.timing.AbstractEffect;
|
||||
import com.gempukku.lotro.logic.timing.Effect;
|
||||
import com.gempukku.lotro.logic.timing.results.DiscardCardFromDeckResult;
|
||||
import com.gempukku.lotro.logic.timing.results.DiscardCardFromPlayResult;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.LinkedList;
|
||||
|
||||
@@ -237,9 +237,12 @@ public class GenericCardTestHelper extends AbstractAtTest {
|
||||
}
|
||||
|
||||
|
||||
public void AttachCard(PhysicalCardImpl card, PhysicalCardImpl bearer) { _game.getGameState().attachCard(_game, card, bearer); }
|
||||
public void AttachCardsTo(PhysicalCardImpl holder, PhysicalCardImpl...cards) {
|
||||
Arrays.stream(cards).forEach(card -> _game.getGameState().attachCard(_game, card, holder));
|
||||
public void AttachCardsTo(PhysicalCardImpl bearer, PhysicalCardImpl...cards) {
|
||||
Arrays.stream(cards).forEach(card -> _game.getGameState().attachCard(_game, card, bearer));
|
||||
}
|
||||
|
||||
public void StackCardsOn(PhysicalCardImpl on, PhysicalCardImpl...cards) {
|
||||
Arrays.stream(cards).forEach(card -> _game.getGameState().stackCard(_game, card, on));
|
||||
}
|
||||
|
||||
public void FreepsMoveCardToDeck(String...cardNames) {
|
||||
@@ -375,10 +378,17 @@ public class GenericCardTestHelper extends AbstractAtTest {
|
||||
|
||||
|
||||
public List<PhysicalCardImpl> FreepsGetAttachedCards(String name) { return GetAttachedCards(GetFreepsCard(name)); }
|
||||
public List<PhysicalCardImpl> ShadowGetAttachedCards(String name) { return GetAttachedCards(GetShadowCard(name)); }
|
||||
public List<PhysicalCardImpl> GetAttachedCards(PhysicalCardImpl card) {
|
||||
return (List<PhysicalCardImpl>)(List<?>)_game.getGameState().getAttachedCards(card);
|
||||
}
|
||||
|
||||
public List<PhysicalCardImpl> FreepsGetStackedCards(String name) { return GetStackedCards(GetFreepsCard(name)); }
|
||||
public List<PhysicalCardImpl> ShadowGetStackedCards(String name) { return GetStackedCards(GetShadowCard(name)); }
|
||||
public List<PhysicalCardImpl> GetStackedCards(PhysicalCardImpl card) {
|
||||
return (List<PhysicalCardImpl>)(List<?>)_game.getGameState().getStackedCards(card);
|
||||
}
|
||||
|
||||
public void FreepsResolveSkirmish(String name) throws DecisionResultInvalidException { FreepsResolveSkirmish(GetFreepsCard(name)); }
|
||||
public void FreepsResolveSkirmish(PhysicalCardImpl comp) throws DecisionResultInvalidException { FreepsChooseCard(comp); }
|
||||
public void FreepsChooseCard(PhysicalCardImpl card) throws DecisionResultInvalidException {
|
||||
|
||||
@@ -92,7 +92,7 @@ public class StingErrataTests
|
||||
PhysicalCardImpl frodo = scn.GetRingBearer();
|
||||
PhysicalCardImpl sting = scn.GetFreepsCard("sting");
|
||||
|
||||
scn.AttachCard(sting, frodo);
|
||||
scn.AttachCardsTo(frodo, sting);
|
||||
|
||||
scn.StartGame();
|
||||
|
||||
@@ -115,7 +115,7 @@ public class StingErrataTests
|
||||
PhysicalCardImpl orc3 = scn.GetShadowCard("orc3");
|
||||
PhysicalCardImpl scimitar1 = scn.GetShadowCard("scimitar1");
|
||||
|
||||
scn.AttachCard(sting, frodo);
|
||||
scn.AttachCardsTo(frodo, sting);
|
||||
|
||||
scn.ShadowMoveCardToHand(orc1, orc2, orc3, scimitar1);
|
||||
|
||||
@@ -140,7 +140,7 @@ public class StingErrataTests
|
||||
PhysicalCardImpl orc1 = scn.GetShadowCard("orc1");
|
||||
|
||||
scn.FreepsMoveCharToTable(sam, merry);
|
||||
scn.AttachCard(sting, frodo);
|
||||
scn.AttachCardsTo(frodo, sting);
|
||||
|
||||
scn.ShadowMoveCardToHand(orc1);
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@ public class Card_V1_002Tests
|
||||
|
||||
|
||||
@Test
|
||||
public void WhiteCityStatsAndKeywordsAreCorrect() throws DecisionResultInvalidException, CardNotFoundException {
|
||||
public void DeepestDelvingsStatsAndKeywordsAreCorrect() throws DecisionResultInvalidException, CardNotFoundException {
|
||||
|
||||
/**
|
||||
* Set: VSet1, VPack1
|
||||
@@ -52,35 +52,75 @@ public class Card_V1_002Tests
|
||||
//Pre-game setup
|
||||
GenericCardTestHelper scn = GetScenario();
|
||||
|
||||
PhysicalCardImpl whitecity = scn.GetFreepsCard("whitecity");
|
||||
PhysicalCardImpl deep = scn.GetFreepsCard("deep");
|
||||
|
||||
assertTrue(scn.HasKeyword(whitecity, Keyword.SUPPORT_AREA));
|
||||
assertEquals(2, whitecity.getBlueprint().getTwilightCost());
|
||||
assertTrue(whitecity.getBlueprint().isUnique());
|
||||
assertTrue(scn.HasKeyword(deep, Keyword.SUPPORT_AREA));
|
||||
assertEquals(1, deep.getBlueprint().getTwilightCost());
|
||||
assertTrue(deep.getBlueprint().isUnique());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void topdecktest() throws DecisionResultInvalidException, CardNotFoundException {
|
||||
public void DiscardingDwarvenCardFromDeckTriggersOptionalStack() throws DecisionResultInvalidException, CardNotFoundException {
|
||||
//Pre-game setup
|
||||
GenericCardTestHelper scn = GetScenario();
|
||||
|
||||
PhysicalCardImpl beneath = scn.GetFreepsCard("beneath");
|
||||
PhysicalCardImpl deep = scn.GetFreepsCard("deep");
|
||||
PhysicalCardImpl gimli = scn.GetFreepsCard("gimli");
|
||||
PhysicalCardImpl axe = scn.GetFreepsCard("axe2");
|
||||
scn.FreepsMoveCardToSupportArea(beneath);
|
||||
scn.FreepsMoveCardToSupportArea(deep);
|
||||
scn.FreepsMoveCharToTable("gimli");
|
||||
scn.FreepsMoveCharToTable(gimli);
|
||||
scn.FreepsMoveCardToDiscard("axe");
|
||||
|
||||
scn.StartGame();
|
||||
|
||||
scn.FreepsUseCardAction(beneath);
|
||||
|
||||
|
||||
scn.SkipToPhase(Phase.ASSIGNMENT);
|
||||
scn.SkipCurrentPhaseActions();
|
||||
|
||||
assertTrue(scn.FreepsHasOptionalTriggerAvailable());
|
||||
scn.FreepsAcceptOptionalTrigger();
|
||||
assertEquals(1, scn.GetTwilight());
|
||||
assertEquals(deep, axe.getStackedOn());
|
||||
|
||||
}
|
||||
|
||||
@Test
|
||||
public void ManeuverAbilityExertsToTakeStackedCardIntoHand() throws DecisionResultInvalidException, CardNotFoundException {
|
||||
//Pre-game setup
|
||||
GenericCardTestHelper scn = GetScenario();
|
||||
|
||||
PhysicalCardImpl deep = scn.GetFreepsCard("deep");
|
||||
PhysicalCardImpl gimli = scn.GetFreepsCard("gimli");
|
||||
PhysicalCardImpl axe = scn.GetFreepsCard("axe");
|
||||
PhysicalCardImpl axe2 = scn.GetFreepsCard("axe2");
|
||||
|
||||
scn.FreepsMoveCardToSupportArea(deep);
|
||||
scn.FreepsMoveCharToTable(gimli);
|
||||
|
||||
|
||||
scn.ShadowMoveCharToTable("runner");
|
||||
|
||||
scn.StartGame();
|
||||
|
||||
scn.StackCardsOn(deep, axe, axe2);
|
||||
|
||||
scn.SkipToPhase(Phase.MANEUVER);
|
||||
|
||||
assertEquals(0, scn.GetWoundsOn(gimli));
|
||||
assertEquals(0, scn.GetFreepsHandCount());
|
||||
assertEquals(2, scn.GetStackedCards(deep).size());
|
||||
assertTrue(scn.FreepsActionAvailable("Deepest"));
|
||||
|
||||
scn.FreepsUseCardAction(deep);
|
||||
|
||||
//assertTrue(scn.FreepsDecisionAvailable("Choose"));
|
||||
//scn.FreepsChooseCard(axe);
|
||||
assertEquals(1, scn.GetWoundsOn(gimli));
|
||||
assertEquals(1, scn.GetFreepsHandCount());
|
||||
assertEquals(1, scn.GetStackedCards(deep).size());
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user