Fixing One Dwarf in Moria not offering the discard if the chosen dwarf has no wounds
This commit is contained in:
@@ -203,22 +203,28 @@
|
|||||||
type: event
|
type: event
|
||||||
effect: [
|
effect: [
|
||||||
{
|
{
|
||||||
type: heal
|
type: chooseActiveCards
|
||||||
|
count: 1
|
||||||
filter: choose(dwarf,hasAttachedCount(2,item))
|
filter: choose(dwarf,hasAttachedCount(2,item))
|
||||||
|
memorize: chosenDwarf
|
||||||
|
text: Choose a Dwarf with 2 or more items to heal
|
||||||
|
}
|
||||||
|
{
|
||||||
|
type: heal
|
||||||
|
filter: memory(chosenDwarf)
|
||||||
times: 1
|
times: 1
|
||||||
memorize: healedDwarf
|
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
type: memorizenumber
|
type: memorizenumber
|
||||||
memory: originalItemCount
|
memory: originalItemCount
|
||||||
amount: {
|
amount: {
|
||||||
type: forEachYouCanSpot
|
type: forEachYouCanSpot
|
||||||
filter: item,attachedTo(memory(healedDwarf))
|
filter: item,attachedTo(memory(chosenDwarf))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
type: returntohand
|
type: returntohand
|
||||||
filter: choose(item,attachedTo(memory(healedDwarf)))
|
filter: choose(item,attachedTo(memory(chosenDwarf)))
|
||||||
count: 0-50
|
count: 0-50
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
@@ -232,7 +238,7 @@
|
|||||||
}
|
}
|
||||||
secondNumber: {
|
secondNumber: {
|
||||||
type: forEachYouCanSpot
|
type: forEachYouCanSpot
|
||||||
filter: item,attachedTo(memory(healedDwarf))
|
filter: item,attachedTo(memory(chosenDwarf))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -129,6 +129,44 @@ public class Card_V1_005_Tests
|
|||||||
assertEquals(Zone.SHADOW_CHARACTERS, scn.GetShadowCardByID(choices[5]).getZone());
|
assertEquals(Zone.SHADOW_CHARACTERS, scn.GetShadowCardByID(choices[5]).getZone());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void OneDwarfDiscardsAndWoundsEvenIfDwarfIsFullyHealed() throws DecisionResultInvalidException, CardNotFoundException {
|
||||||
|
//Pre-game setup
|
||||||
|
GenericCardTestHelper scn = GetScenario();
|
||||||
|
|
||||||
|
PhysicalCardImpl onedwarf = scn.GetFreepsCard("onedwarf");
|
||||||
|
PhysicalCardImpl gimli = scn.GetFreepsCard("gimli");
|
||||||
|
scn.FreepsMoveCardToHand(onedwarf);
|
||||||
|
scn.FreepsMoveCharToTable(gimli);
|
||||||
|
scn.FreepsMoveCharToTable("guard");
|
||||||
|
scn.FreepsAttachCardsTo(gimli, "handaxe1", "handaxe2", "armor", "bracers", "ring");
|
||||||
|
|
||||||
|
scn.ShadowMoveCharToTable("runner", "runner2", "runner3", "runner4", "runner5", "runner6");
|
||||||
|
|
||||||
|
scn.StartGame();
|
||||||
|
scn.SkipToPhase(Phase.MANEUVER);
|
||||||
|
assertTrue(scn.FreepsActionAvailable("One Dwarf"));
|
||||||
|
|
||||||
|
assertEquals(0, scn.GetWoundsOn(gimli));
|
||||||
|
scn.FreepsPlayCard(onedwarf);
|
||||||
|
assertTrue(scn.FreepsDecisionAvailable("Choose cards to return to hand"));
|
||||||
|
assertEquals(5, scn.GetFreepsCardChoiceCount()); // There are 5 items on gimli
|
||||||
|
String[] choices = scn.FreepsGetCardChoices().toArray(new String[0]);
|
||||||
|
scn.FreepsChoose(choices[0], choices[1], choices[2], choices[3], choices[4]);
|
||||||
|
|
||||||
|
assertTrue(scn.FreepsDecisionAvailable("Choose cards to wound"));
|
||||||
|
choices = scn.FreepsGetCardChoices().toArray(new String[0]);
|
||||||
|
scn.FreepsChoose(choices[0], choices[1], choices[2], choices[3], choices[4]);
|
||||||
|
|
||||||
|
assertEquals(Zone.DISCARD, scn.GetShadowCardByID(choices[0]).getZone());
|
||||||
|
assertEquals(Zone.DISCARD, scn.GetShadowCardByID(choices[1]).getZone());
|
||||||
|
assertEquals(Zone.DISCARD, scn.GetShadowCardByID(choices[2]).getZone());
|
||||||
|
assertEquals(Zone.DISCARD, scn.GetShadowCardByID(choices[3]).getZone());
|
||||||
|
assertEquals(Zone.DISCARD, scn.GetShadowCardByID(choices[4]).getZone());
|
||||||
|
|
||||||
|
assertEquals(Zone.SHADOW_CHARACTERS, scn.GetShadowCardByID(choices[5]).getZone());
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void OneDwarfCantBePlayedIfNoDwarvesWithTwoItems() throws DecisionResultInvalidException, CardNotFoundException {
|
public void OneDwarfCantBePlayedIfNoDwarvesWithTwoItems() throws DecisionResultInvalidException, CardNotFoundException {
|
||||||
//Pre-game setup
|
//Pre-game setup
|
||||||
|
|||||||
Reference in New Issue
Block a user