Backported and converted all the dwarven set 1 errata unit tests into tests for their original Decipher counterparts.
This commit is contained in:
@@ -0,0 +1,76 @@
|
||||
package com.gempukku.lotro.cards.official.set01;
|
||||
|
||||
import com.gempukku.lotro.cards.GenericCardTestHelper;
|
||||
import com.gempukku.lotro.common.*;
|
||||
import com.gempukku.lotro.game.CardNotFoundException;
|
||||
import com.gempukku.lotro.game.PhysicalCardImpl;
|
||||
import com.gempukku.lotro.logic.decisions.DecisionResultInvalidException;
|
||||
import org.junit.Test;
|
||||
|
||||
import java.util.HashMap;
|
||||
|
||||
import static org.junit.Assert.*;
|
||||
|
||||
public class Card_01_007_Tests
|
||||
{
|
||||
|
||||
protected GenericCardTestHelper GetScenario() throws CardNotFoundException, DecisionResultInvalidException {
|
||||
return new GenericCardTestHelper(
|
||||
new HashMap<>()
|
||||
{{
|
||||
put("guard", "1_7");
|
||||
put("gimli", "1_13");
|
||||
}},
|
||||
GenericCardTestHelper.FellowshipSites,
|
||||
GenericCardTestHelper.FOTRFrodo,
|
||||
GenericCardTestHelper.FOTRRing
|
||||
);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void DwarfGuardStatsAndKeywordsAreCorrect() throws DecisionResultInvalidException, CardNotFoundException {
|
||||
|
||||
/**
|
||||
* Set: 1
|
||||
* Title: Dwarf Guard
|
||||
* Side: Free Peoples
|
||||
* Culture: Dwarven
|
||||
* Twilight Cost: 1
|
||||
* Type: companion
|
||||
* Subtype: Dwarf
|
||||
* Strength: 4
|
||||
* Vitality: 2
|
||||
* Game Text: To play, spot a Dwarf.
|
||||
*/
|
||||
|
||||
//Pre-game setup
|
||||
GenericCardTestHelper scn = GetScenario();
|
||||
|
||||
PhysicalCardImpl guard = scn.GetFreepsCard("guard");
|
||||
|
||||
assertFalse(guard.getBlueprint().isUnique());
|
||||
assertEquals(Side.FREE_PEOPLE, guard.getBlueprint().getSide());
|
||||
assertEquals(Culture.DWARVEN, guard.getBlueprint().getCulture());
|
||||
assertEquals(CardType.COMPANION, guard.getBlueprint().getCardType());
|
||||
assertEquals(Race.DWARF, guard.getBlueprint().getRace());
|
||||
assertEquals(1, guard.getBlueprint().getTwilightCost());
|
||||
assertEquals(4, guard.getBlueprint().getStrength());
|
||||
assertEquals(2, guard.getBlueprint().getVitality());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void DwarfGuardRequiresDwarf() throws DecisionResultInvalidException, CardNotFoundException {
|
||||
//Pre-game setup
|
||||
GenericCardTestHelper scn = GetScenario();
|
||||
|
||||
PhysicalCardImpl guard = scn.GetFreepsCard("guard");
|
||||
PhysicalCardImpl gimli = scn.GetFreepsCard("gimli");
|
||||
scn.FreepsMoveCardToHand(guard, gimli);
|
||||
|
||||
scn.StartGame();
|
||||
|
||||
assertFalse(scn.FreepsPlayAvailable(guard));
|
||||
scn.FreepsPlayCard(gimli);
|
||||
assertTrue(scn.FreepsPlayAvailable(guard));
|
||||
}
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
package com.gempukku.lotro.cards.official.set01;
|
||||
|
||||
import com.gempukku.lotro.cards.GenericCardTestHelper;
|
||||
import com.gempukku.lotro.common.Phase;
|
||||
import com.gempukku.lotro.common.*;
|
||||
import com.gempukku.lotro.game.CardNotFoundException;
|
||||
import com.gempukku.lotro.game.PhysicalCardImpl;
|
||||
import com.gempukku.lotro.logic.decisions.DecisionResultInvalidException;
|
||||
@@ -9,46 +9,102 @@ import org.junit.Test;
|
||||
|
||||
import java.util.HashMap;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.*;
|
||||
|
||||
// Tidings of Erebor
|
||||
public class Card_01_011_Tests
|
||||
{
|
||||
protected GenericCardTestHelper GetScenario() throws CardNotFoundException, DecisionResultInvalidException {
|
||||
return new GenericCardTestHelper(
|
||||
new HashMap<>() {{
|
||||
put("farin", "1_11");
|
||||
|
||||
put("goblin", "1_178");
|
||||
}}
|
||||
);
|
||||
}
|
||||
protected GenericCardTestHelper GetScenario() throws CardNotFoundException, DecisionResultInvalidException {
|
||||
return new GenericCardTestHelper(
|
||||
new HashMap<>()
|
||||
{{
|
||||
put("farin", "1_11");
|
||||
put("gimli", "1_13");
|
||||
|
||||
@Test
|
||||
public void FarinStrengthBoostWhileSkirmishingOrc() throws DecisionResultInvalidException, CardNotFoundException {
|
||||
//Pre-game setup
|
||||
GenericCardTestHelper scn = GetScenario();
|
||||
put("runner", "1_178");
|
||||
put("nazgul", "1_230");
|
||||
}},
|
||||
GenericCardTestHelper.FellowshipSites,
|
||||
GenericCardTestHelper.FOTRFrodo,
|
||||
GenericCardTestHelper.FOTRRing
|
||||
);
|
||||
}
|
||||
|
||||
PhysicalCardImpl farin = scn.GetFreepsCard("farin");
|
||||
scn.FreepsMoveCharToTable(farin);
|
||||
@Test
|
||||
public void FarinStatsAndKeywordsAreCorrect() throws DecisionResultInvalidException, CardNotFoundException {
|
||||
|
||||
PhysicalCardImpl goblin = scn.GetShadowCard("goblin");
|
||||
scn.ShadowMoveCharToTable(goblin);
|
||||
/**
|
||||
* Set: 1
|
||||
* Title: *Farin, Dwarven Emissary
|
||||
* Side: Free Peoples
|
||||
* Culture: Dwarven
|
||||
* Twilight Cost: 2
|
||||
* Type: companion
|
||||
* Subtype: Dwarf
|
||||
* Strength: 5
|
||||
* Vitality: 3
|
||||
* Game Text: To play, spot a Dwarf.
|
||||
* While skirmishing an Orc, Farin is strength +2.
|
||||
*/
|
||||
|
||||
scn.StartGame();
|
||||
scn.FreepsPassCurrentPhaseAction();
|
||||
//Pre-game setup
|
||||
GenericCardTestHelper scn = GetScenario();
|
||||
|
||||
scn.SkipToPhase(Phase.ASSIGNMENT);
|
||||
PhysicalCardImpl farin = scn.GetFreepsCard("farin");
|
||||
|
||||
scn.PassCurrentPhaseActions();
|
||||
assertTrue(farin.getBlueprint().isUnique());
|
||||
assertEquals(Side.FREE_PEOPLE, farin.getBlueprint().getSide());
|
||||
assertEquals(Culture.DWARVEN, farin.getBlueprint().getCulture());
|
||||
assertEquals(CardType.COMPANION, farin.getBlueprint().getCardType());
|
||||
assertEquals(Race.DWARF, farin.getBlueprint().getRace());
|
||||
assertEquals(2, farin.getBlueprint().getTwilightCost());
|
||||
assertEquals(5, farin.getBlueprint().getStrength());
|
||||
assertEquals(3, farin.getBlueprint().getVitality());
|
||||
}
|
||||
|
||||
scn.FreepsAssignToMinions(farin, goblin);
|
||||
scn.FreepsResolveSkirmish(farin);
|
||||
@Test
|
||||
public void FarinRequiresDwarf() throws DecisionResultInvalidException, CardNotFoundException {
|
||||
//Pre-game setup
|
||||
GenericCardTestHelper scn = GetScenario();
|
||||
|
||||
assertEquals(7, scn.GetStrength(farin));
|
||||
PhysicalCardImpl farin = scn.GetFreepsCard("farin");
|
||||
PhysicalCardImpl gimli = scn.GetFreepsCard("gimli");
|
||||
scn.FreepsMoveCardToHand(farin, gimli);
|
||||
|
||||
}
|
||||
scn.StartGame();
|
||||
|
||||
assertFalse(scn.FreepsPlayAvailable(farin));
|
||||
scn.FreepsPlayCard(gimli);
|
||||
assertTrue(scn.FreepsPlayAvailable(farin));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void FarinStrengthBonusAgainstOrcs() throws DecisionResultInvalidException, CardNotFoundException {
|
||||
//Pre-game setup
|
||||
GenericCardTestHelper scn = GetScenario();
|
||||
|
||||
}
|
||||
PhysicalCardImpl farin = scn.GetFreepsCard("farin");
|
||||
scn.FreepsMoveCharToTable(farin);
|
||||
|
||||
PhysicalCardImpl orc = scn.GetShadowCard("runner");
|
||||
PhysicalCardImpl nazgul = scn.GetShadowCard("nazgul");
|
||||
scn.ShadowMoveCharToTable(orc, nazgul);
|
||||
|
||||
scn.StartGame();
|
||||
|
||||
scn.SkipToAssignments();
|
||||
scn.FreepsAssignToMinions(farin, orc);
|
||||
scn.ShadowDeclineAssignments();
|
||||
|
||||
assertEquals(5, scn.GetStrength(farin));
|
||||
scn.FreepsResolveSkirmish(farin);
|
||||
assertEquals(7, scn.GetStrength(farin));
|
||||
scn.PassCurrentPhaseActions();
|
||||
|
||||
//fierce
|
||||
scn.SkipToAssignments();
|
||||
scn.FreepsAssignToMinions(farin, nazgul);
|
||||
scn.FreepsResolveSkirmish(farin);
|
||||
assertEquals(5, scn.GetStrength(farin));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,117 @@
|
||||
package com.gempukku.lotro.cards.official.set01;
|
||||
|
||||
import com.gempukku.lotro.cards.GenericCardTestHelper;
|
||||
import com.gempukku.lotro.common.*;
|
||||
import com.gempukku.lotro.game.CardNotFoundException;
|
||||
import com.gempukku.lotro.game.PhysicalCardImpl;
|
||||
import com.gempukku.lotro.logic.decisions.DecisionResultInvalidException;
|
||||
import org.junit.Test;
|
||||
|
||||
import java.util.HashMap;
|
||||
|
||||
import static org.junit.Assert.*;
|
||||
|
||||
public class Card_01_012_Tests
|
||||
{
|
||||
|
||||
protected GenericCardTestHelper GetScenario() throws CardNotFoundException, DecisionResultInvalidException {
|
||||
return new GenericCardTestHelper(
|
||||
new HashMap<>()
|
||||
{{
|
||||
put("gimli", "1_12");
|
||||
|
||||
put("card1", "1_191");
|
||||
put("card2", "1_178");
|
||||
put("card3", "1_179");
|
||||
}},
|
||||
GenericCardTestHelper.FellowshipSites,
|
||||
GenericCardTestHelper.FOTRFrodo,
|
||||
GenericCardTestHelper.FOTRRing
|
||||
);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void GimliStatsAndKeywordsAreCorrect() throws DecisionResultInvalidException, CardNotFoundException {
|
||||
|
||||
/**
|
||||
* Set: 1
|
||||
* Title: *Gimli, Dwarf of Erebor
|
||||
* Side: Free Peoples
|
||||
* Culture: Dwarven
|
||||
* Twilight Cost: 2
|
||||
* Type: companion
|
||||
* Subtype: Dwarf
|
||||
* Strength: 6
|
||||
* Vitality: 3
|
||||
* Signet: aragorn
|
||||
* Game Text: <b>Damage +1</b>
|
||||
* <b>Fellowship: </b> If the twilight pool has fewer than 2 twilight tokens, add (2) and place a gimli from hand beneath your draw deck to draw a gimli.
|
||||
*/
|
||||
|
||||
//Pre-game setup
|
||||
GenericCardTestHelper scn = GetScenario();
|
||||
|
||||
PhysicalCardImpl gimli = scn.GetFreepsCard("gimli");
|
||||
|
||||
assertTrue(gimli.getBlueprint().isUnique());
|
||||
assertEquals(Side.FREE_PEOPLE, gimli.getBlueprint().getSide());
|
||||
assertEquals(Culture.DWARVEN, gimli.getBlueprint().getCulture());
|
||||
assertEquals(CardType.COMPANION, gimli.getBlueprint().getCardType());
|
||||
assertEquals(Race.DWARF, gimli.getBlueprint().getRace());
|
||||
assertTrue(scn.HasKeyword(gimli, Keyword.DAMAGE));
|
||||
assertEquals(1, scn.GetKeywordCount(gimli, Keyword.DAMAGE));
|
||||
assertEquals(2, gimli.getBlueprint().getTwilightCost());
|
||||
assertEquals(6, gimli.getBlueprint().getStrength());
|
||||
assertEquals(3, gimli.getBlueprint().getVitality());
|
||||
assertEquals(6, gimli.getBlueprint().getResistance());
|
||||
assertEquals(Signet.ARAGORN, gimli.getBlueprint().getSignet());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void GimliAbilityDoesntWorkWith2Twilight() throws DecisionResultInvalidException, CardNotFoundException {
|
||||
//Pre-game setup
|
||||
GenericCardTestHelper scn = GetScenario();
|
||||
|
||||
PhysicalCardImpl gimli = scn.GetFreepsCard("gimli");
|
||||
PhysicalCardImpl card1 = scn.GetFreepsCard("card1");
|
||||
PhysicalCardImpl card2 = scn.GetFreepsCard("card2");
|
||||
scn.FreepsMoveCardToHand(gimli);
|
||||
scn.FreepsMoveCardToHand(card1);
|
||||
|
||||
scn.StartGame();
|
||||
|
||||
scn.FreepsPlayCard(gimli);
|
||||
//the 2 twilight from his cost should disqualify his own action
|
||||
assertFalse(scn.FreepsActionAvailable(gimli));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void GimliAbilityAdds2TwilightAndPlacesOnBottom() throws DecisionResultInvalidException, CardNotFoundException {
|
||||
//Pre-game setup
|
||||
GenericCardTestHelper scn = GetScenario();
|
||||
|
||||
PhysicalCardImpl gimli = scn.GetFreepsCard("gimli");
|
||||
PhysicalCardImpl card1 = scn.GetFreepsCard("card1");
|
||||
PhysicalCardImpl card2 = scn.GetFreepsCard("card2");
|
||||
PhysicalCardImpl card3 = scn.GetFreepsCard("card3");
|
||||
scn.FreepsMoveCharToTable(gimli);
|
||||
scn.FreepsMoveCardToHand(card1);
|
||||
scn.FreepsMoveCardsToBottomOfDeck(card3);
|
||||
|
||||
scn.StartGame();
|
||||
|
||||
assertTrue(scn.FreepsActionAvailable(gimli));
|
||||
assertEquals(Zone.HAND, card1.getZone());
|
||||
assertEquals(Zone.DECK, card2.getZone());
|
||||
assertEquals(scn.GetFreepsTopOfDeck().getBlueprintId(), card2.getBlueprintId());
|
||||
assertEquals(Zone.DECK, card3.getZone());
|
||||
assertEquals(scn.GetFreepsBottomOfDeck().getBlueprintId(), card3.getBlueprintId());
|
||||
|
||||
scn.FreepsUseCardAction(gimli);
|
||||
//card from hand placed on the bottom of the deck
|
||||
assertEquals(Zone.DECK, card1.getZone());
|
||||
assertEquals(scn.GetFreepsBottomOfDeck().getBlueprintId(), card1.getBlueprintId());
|
||||
//card from the deck was not drawn (as it is in the errata)
|
||||
assertEquals(Zone.DECK, card2.getZone());
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,128 @@
|
||||
package com.gempukku.lotro.cards.official.set01;
|
||||
|
||||
import com.gempukku.lotro.cards.GenericCardTestHelper;
|
||||
import com.gempukku.lotro.common.*;
|
||||
import com.gempukku.lotro.game.CardNotFoundException;
|
||||
import com.gempukku.lotro.logic.decisions.DecisionResultInvalidException;
|
||||
import org.junit.Test;
|
||||
|
||||
import java.util.HashMap;
|
||||
|
||||
import static org.junit.Assert.*;
|
||||
|
||||
public class Card_01_016_Tests
|
||||
{
|
||||
|
||||
protected GenericCardTestHelper GetScenario() throws CardNotFoundException, DecisionResultInvalidException {
|
||||
return new GenericCardTestHelper(
|
||||
new HashMap<>()
|
||||
{{
|
||||
put("kingdom", "1_16");
|
||||
put("gimli", "1_13");
|
||||
put("guard", "1_7");
|
||||
|
||||
put("runner1", "1_178");
|
||||
put("runner2", "1_178");
|
||||
put("runner3", "1_178");
|
||||
}},
|
||||
GenericCardTestHelper.FellowshipSites,
|
||||
GenericCardTestHelper.FOTRFrodo,
|
||||
GenericCardTestHelper.FOTRRing
|
||||
);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void GreatestKingdomofMyPeopleStatsAndKeywordsAreCorrect() throws DecisionResultInvalidException, CardNotFoundException {
|
||||
|
||||
/**
|
||||
* Set: 1
|
||||
* Title: Greatest Kingdom of My People
|
||||
* Unique: True
|
||||
* Side: FREE_PEOPLE
|
||||
* Culture: Dwarven
|
||||
* Twilight Cost: 1
|
||||
* Type: condition
|
||||
* Subtype: Support Area
|
||||
* Game Text: <b>Tale.</b> To play, exert a Dwarf.
|
||||
* The first time your opponent plays an Orc each turn, you may take a [dwarven] kingdom into hand from your discard pile. The Shadow player may discard the bottom 2 cards of their draw deck to prevent this.
|
||||
*/
|
||||
|
||||
//Pre-game setup
|
||||
var scn = GetScenario();
|
||||
|
||||
var kingdom = scn.GetFreepsCard("kingdom");
|
||||
|
||||
assertTrue(kingdom.getBlueprint().isUnique());
|
||||
assertEquals(Side.FREE_PEOPLE, kingdom.getBlueprint().getSide());
|
||||
assertEquals(Culture.DWARVEN, kingdom.getBlueprint().getCulture());
|
||||
assertEquals(CardType.CONDITION, kingdom.getBlueprint().getCardType());
|
||||
assertTrue(scn.HasKeyword(kingdom, Keyword.SUPPORT_AREA));
|
||||
assertTrue(scn.HasKeyword(kingdom, Keyword.TALE));
|
||||
assertEquals(0, kingdom.getBlueprint().getTwilightCost());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void GreatestKingdomExertsADwarfToPlay() throws DecisionResultInvalidException, CardNotFoundException {
|
||||
//Pre-game setup
|
||||
var scn = GetScenario();
|
||||
|
||||
var kingdom = scn.GetFreepsCard("kingdom");
|
||||
var gimli = scn.GetFreepsCard("gimli");
|
||||
var guard = scn.GetFreepsCard("guard");
|
||||
scn.FreepsMoveCharToTable(gimli);
|
||||
scn.FreepsMoveCardToHand(kingdom, guard);
|
||||
|
||||
scn.AddWoundsToChar(gimli, 2);
|
||||
|
||||
scn.StartGame();
|
||||
|
||||
assertFalse(scn.FreepsPlayAvailable(kingdom));
|
||||
scn.FreepsPlayCard(guard);
|
||||
assertEquals(0, scn.GetWoundsOn(guard));
|
||||
scn.FreepsPlayCard(kingdom);
|
||||
assertEquals(1, scn.GetWoundsOn(guard));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void GreatestKingdomTriggerDiscardsFromShadowTopDeckEachTime() throws DecisionResultInvalidException, CardNotFoundException {
|
||||
//Pre-game setup
|
||||
var scn = GetScenario();
|
||||
|
||||
var kingdom = scn.GetFreepsCard("kingdom");
|
||||
var gimli = scn.GetFreepsCard("gimli");
|
||||
var guard = scn.GetFreepsCard("guard");
|
||||
scn.FreepsMoveCardToSupportArea(kingdom);
|
||||
scn.FreepsMoveCardToDiscard(gimli, guard);
|
||||
scn.FreepsMoveCardToDiscard("runner1", "runner2");
|
||||
|
||||
var runner1 = scn.GetShadowCard("runner1");
|
||||
var runner2 = scn.GetShadowCard("runner2");
|
||||
scn.ShadowMoveCardToHand(runner1, runner2);
|
||||
|
||||
scn.StartGame();
|
||||
scn.SetTwilight(20);
|
||||
scn.FreepsPassCurrentPhaseAction();
|
||||
|
||||
var top1 = scn.GetFromTopOfShadowDeck(1);
|
||||
var top2 = scn.GetFromTopOfShadowDeck(2);
|
||||
var top3 = scn.GetFromTopOfShadowDeck(3);
|
||||
|
||||
assertEquals(Zone.DECK, top1.getZone());
|
||||
assertEquals(Zone.DECK, top2.getZone());
|
||||
assertEquals(Zone.DECK, top3.getZone());
|
||||
scn.ShadowPlayCard(runner1);
|
||||
scn.FreepsResolveActionOrder("0");
|
||||
|
||||
assertEquals(Zone.DISCARD, top1.getZone());
|
||||
assertEquals(Zone.DECK, top2.getZone());
|
||||
assertEquals(Zone.DECK, top3.getZone());
|
||||
|
||||
scn.ShadowPlayCard(runner2);
|
||||
scn.FreepsResolveActionOrder("0");
|
||||
|
||||
assertEquals(Zone.DISCARD, top1.getZone());
|
||||
assertEquals(Zone.DISCARD, top2.getZone());
|
||||
assertEquals(Zone.DECK, top3.getZone());
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,92 @@
|
||||
package com.gempukku.lotro.cards.official.set01;
|
||||
|
||||
import com.gempukku.lotro.cards.GenericCardTestHelper;
|
||||
import com.gempukku.lotro.common.*;
|
||||
import com.gempukku.lotro.game.CardNotFoundException;
|
||||
import com.gempukku.lotro.logic.decisions.DecisionResultInvalidException;
|
||||
import org.junit.Test;
|
||||
|
||||
import java.util.HashMap;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.assertTrue;
|
||||
|
||||
public class Card_01_017_Tests
|
||||
{
|
||||
|
||||
protected GenericCardTestHelper GetScenario() throws CardNotFoundException, DecisionResultInvalidException {
|
||||
return new GenericCardTestHelper(
|
||||
new HashMap<>()
|
||||
{{
|
||||
put("grimir", "1_17");
|
||||
put("guard", "1_7");
|
||||
put("event", "1_3");
|
||||
|
||||
put("runner1", "1_178");
|
||||
put("runner2", "1_178");
|
||||
|
||||
}},
|
||||
GenericCardTestHelper.FellowshipSites,
|
||||
GenericCardTestHelper.FOTRFrodo,
|
||||
GenericCardTestHelper.FOTRRing
|
||||
);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void GrimirStatsAndKeywordsAreCorrect() throws DecisionResultInvalidException, CardNotFoundException {
|
||||
|
||||
/**
|
||||
* Set: 1
|
||||
* Title: Grimir, Dwarven Elder
|
||||
* Unique: True
|
||||
* Side: FREE_PEOPLE
|
||||
* Culture: Dwarven
|
||||
* Twilight Cost: 1
|
||||
* Type: ally
|
||||
* Subtype: Dwarf
|
||||
* Strength: 3
|
||||
* Vitality: 3
|
||||
* Site Number: 3
|
||||
* Game Text: <b>Fellowship:</b> Exert Grimir and discard the top grimir of your draw deck to place a [dwarven] event from your discard pile on top of your draw deck.
|
||||
*/
|
||||
|
||||
//Pre-game setup
|
||||
var scn = GetScenario();
|
||||
|
||||
var grimir = scn.GetFreepsCard("grimir");
|
||||
|
||||
assertTrue(grimir.getBlueprint().isUnique());
|
||||
assertEquals(Side.FREE_PEOPLE, grimir.getBlueprint().getSide());
|
||||
assertEquals(Culture.DWARVEN, grimir.getBlueprint().getCulture());
|
||||
assertEquals(CardType.ALLY, grimir.getBlueprint().getCardType());
|
||||
assertEquals(Race.DWARF, grimir.getBlueprint().getRace());
|
||||
assertEquals(1, grimir.getBlueprint().getTwilightCost());
|
||||
assertEquals(3, grimir.getBlueprint().getStrength());
|
||||
assertEquals(3, grimir.getBlueprint().getVitality());
|
||||
assertEquals(3, grimir.getBlueprint().getAllyHomeSiteNumbers()[0]);
|
||||
assertEquals(SitesBlock.FELLOWSHIP, grimir.getBlueprint().getAllyHomeSiteBlock());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void GrimirAbilityExertsAndDiscardsTopDeckToRetrieveDwarvenEvent() throws DecisionResultInvalidException, CardNotFoundException {
|
||||
//Pre-game setup
|
||||
var scn = GetScenario();
|
||||
|
||||
var grimir = scn.GetFreepsCard("grimir");
|
||||
var guard = scn.GetFreepsCard("guard");
|
||||
var event = scn.GetFreepsCard("event");
|
||||
scn.FreepsMoveCharToTable(grimir);
|
||||
scn.FreepsMoveCardToDiscard(guard, event);
|
||||
|
||||
scn.StartGame();
|
||||
|
||||
assertTrue(scn.FreepsActionAvailable(grimir));
|
||||
|
||||
assertEquals(Zone.DISCARD, event.getZone());
|
||||
assertEquals(0, scn.GetWoundsOn(grimir));
|
||||
scn.FreepsUseCardAction(grimir);
|
||||
|
||||
assertEquals(Zone.DECK, event.getZone());
|
||||
assertEquals(1, scn.GetWoundsOn(grimir));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,128 @@
|
||||
package com.gempukku.lotro.cards.official.set01;
|
||||
|
||||
import com.gempukku.lotro.cards.GenericCardTestHelper;
|
||||
import com.gempukku.lotro.common.*;
|
||||
import com.gempukku.lotro.game.CardNotFoundException;
|
||||
import com.gempukku.lotro.logic.decisions.DecisionResultInvalidException;
|
||||
import org.junit.Test;
|
||||
|
||||
import java.util.HashMap;
|
||||
|
||||
import static org.junit.Assert.*;
|
||||
|
||||
public class Card_01_023_Tests
|
||||
{
|
||||
|
||||
protected GenericCardTestHelper GetScenario() throws CardNotFoundException, DecisionResultInvalidException {
|
||||
return new GenericCardTestHelper(
|
||||
new HashMap<>()
|
||||
{{
|
||||
put("nobody", "1_23");
|
||||
put("gimli", "1_13");
|
||||
|
||||
put("uruk", "1_154");
|
||||
put("deck1", "1_126");
|
||||
put("deck2", "1_127");
|
||||
put("deck3", "1_128");
|
||||
put("deck4", "1_129");
|
||||
put("deck5", "1_130");
|
||||
put("deck6", "1_131");
|
||||
}},
|
||||
GenericCardTestHelper.FellowshipSites,
|
||||
GenericCardTestHelper.FOTRFrodo,
|
||||
GenericCardTestHelper.FOTRRing
|
||||
);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void NobodyTossesaDwarfStatsAndKeywordsAreCorrect() throws DecisionResultInvalidException, CardNotFoundException {
|
||||
|
||||
/**
|
||||
* Set: 1
|
||||
* Title: Nobody Tosses a Dwarf
|
||||
* Unique: False
|
||||
* Side: FREE_PEOPLE
|
||||
* Culture: Dwarven
|
||||
* Twilight Cost: 0
|
||||
* Type: event
|
||||
* Subtype: Response
|
||||
* Game Text: If a Dwarf wins a skirmish, discard a Shadow card. Its owner may discard 3 cards from the bottom of their draw deck to prevent this.
|
||||
*/
|
||||
|
||||
//Pre-game setup
|
||||
var scn = GetScenario();
|
||||
|
||||
var nobody = scn.GetFreepsCard("nobody");
|
||||
|
||||
assertFalse(nobody.getBlueprint().isUnique());
|
||||
assertEquals(Side.FREE_PEOPLE, nobody.getBlueprint().getSide());
|
||||
assertEquals(Culture.DWARVEN, nobody.getBlueprint().getCulture());
|
||||
assertEquals(CardType.EVENT, nobody.getBlueprint().getCardType());
|
||||
assertTrue(scn.HasKeyword(nobody, Keyword.RESPONSE));
|
||||
assertEquals(0, nobody.getBlueprint().getTwilightCost());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void NobodyDoesNotTriggerIfSkirmishLost() throws DecisionResultInvalidException, CardNotFoundException {
|
||||
//Pre-game setup
|
||||
var scn = GetScenario();
|
||||
|
||||
var nobody = scn.GetFreepsCard("nobody");
|
||||
var gimli = scn.GetFreepsCard("gimli");
|
||||
scn.FreepsMoveCardToHand(nobody);
|
||||
scn.FreepsMoveCharToTable(gimli);
|
||||
|
||||
var uruk = scn.GetShadowCard("uruk");
|
||||
scn.ShadowMoveCharToTable(uruk);
|
||||
|
||||
scn.StartGame();
|
||||
|
||||
scn.SkipToAssignments();
|
||||
scn.FreepsAssignToMinions(gimli, uruk);
|
||||
scn.FreepsResolveSkirmish(gimli);
|
||||
scn.PassCurrentPhaseActions();
|
||||
assertFalse(scn.FreepsHasOptionalTriggerAvailable());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void NobodyTriggerDiscardsShadowTopDecks() throws DecisionResultInvalidException, CardNotFoundException {
|
||||
//Pre-game setup
|
||||
var scn = GetScenario();
|
||||
|
||||
var nobody = scn.GetFreepsCard("nobody");
|
||||
var gimli = scn.GetFreepsCard("gimli");
|
||||
scn.FreepsMoveCardToHand(nobody);
|
||||
scn.FreepsMoveCharToTable(gimli);
|
||||
|
||||
var uruk = scn.GetShadowCard("uruk");
|
||||
scn.ShadowMoveCharToTable(uruk);
|
||||
scn.StartGame();
|
||||
|
||||
scn.SkipToAssignments();
|
||||
scn.FreepsAssignToMinions(gimli, uruk);
|
||||
scn.FreepsResolveSkirmish(gimli);
|
||||
//pump gimli to beat the uruk
|
||||
scn.FreepsUseCardAction(gimli);
|
||||
scn.ShadowPassCurrentPhaseAction();
|
||||
scn.FreepsPassCurrentPhaseAction();
|
||||
|
||||
var top1 = scn.GetFromTopOfShadowDeck(1);
|
||||
var top2 = scn.GetFromTopOfShadowDeck(2);
|
||||
var top3 = scn.GetFromTopOfShadowDeck(3);
|
||||
var top4 = scn.GetFromTopOfShadowDeck(4);
|
||||
|
||||
assertEquals(Zone.DECK, top1.getZone());
|
||||
assertEquals(Zone.DECK, top2.getZone());
|
||||
assertEquals(Zone.DECK, top3.getZone());
|
||||
assertEquals(Zone.DECK, top4.getZone());
|
||||
|
||||
assertTrue(scn.FreepsHasOptionalTriggerAvailable());
|
||||
scn.FreepsAcceptOptionalTrigger();
|
||||
|
||||
assertEquals(Zone.DISCARD, top1.getZone());
|
||||
assertEquals(Zone.DISCARD, top2.getZone());
|
||||
assertEquals(Zone.DISCARD, top3.getZone());
|
||||
assertEquals(Zone.DECK, top4.getZone());
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user