Shoulder to Shoulder errata + tests complete

This commit is contained in:
Christian 'ketura' McCarty
2023-05-22 20:32:25 -05:00
parent 9029dbf2a0
commit 9350300d3d
2 changed files with 273 additions and 0 deletions

View File

@@ -545,6 +545,95 @@
}
}
71_59: {
cardInfo: {
//Either a full URL, or a subpath for the PC image server
imagePath: errata/LOTR-EN01E059.1_card.jpg
//If this is true, then all gameplay-related info outside this cardInfo definition
// will be ignored and the java class loaded instead.
javaClass: false
//This instructs the blueprint generator to insert this card as an alt of the listed
// parent blueprint. Can of course be ommitted if not an errata or promo.
parent: 1_59
//This is the tree path to use within the alts structure on the parent.
// Can of course be ommitted if parent is null.
parentPath: errata/pc
//Versioning differentiates releases within a particular alt path, such as PC errata
// version 1 vs version 2. PC version 2 will not conflict with, say, Decipher version 2.
//Top-level cards should always be version 0.
version: 1
collInfo: 1C59
rarity: C
setNum: "1"
cardNum: 59
// Standard, Masterwork, Tengwar, FullArt, etc. Top-level cards are always Standard.
style: Standard
}
title: Shoulder to Shoulder
unique: false
side: Free Peoples
culture: Elven
twilight: 1
type: Condition
keyword: support area
effects: {
type: activated
phase: fellowship
effect: {
type: choice
texts: [
Exert a Dwarf to heal an Elf
Exert an Elf to heal a Dwarf
]
effects: [
{
type: costToEffect
cost: [
{
type: addTwilight
}
{
type: exert
filter: choose(dwarf)
}
]
effect: {
type: heal
filter: choose(elf)
}
}
{
type: costToEffect
cost: [
{
type: addTwilight
}
{
type: exert
filter: choose(elf)
}
]
effect: {
type: heal
filter: choose(dwarf)
}
}
]
}
}
gametext: <b>Fellowship:</b> Add (1) and exert a Dwarf to heal an Elf, or add (1) and exert an Elf to heal a Dwarf.
lore: “May it be a sign that though the world is now dark better days are at hand, and that friendship shall be renewed between our peoples.'”
promotext: ""
alts: {
//These are just CardInfo objects
promos: {
}
//These are full card definitions, with redundant info that is the same as the original card ommitted
errata: {
}
}
}
51_68: {
cardInfo: {
//Either a full URL, or a subpath for the PC image server

View File

@@ -0,0 +1,184 @@
package com.gempukku.lotro.cards.unofficial.pc.errata.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_059_ErrataTests
{
protected GenericCardTestHelper GetScenario() throws CardNotFoundException, DecisionResultInvalidException {
return new GenericCardTestHelper(
new HashMap<>()
{{
put("sts", "71_59");
put("legolas", "1_50");
put("gimli", "1_13");
put("rumil", "1_57");
put("grimir", "1_17");
put("runner", "1_178");
}},
GenericCardTestHelper.FellowshipSites,
GenericCardTestHelper.FOTRFrodo,
GenericCardTestHelper.FOTRRing
);
}
@Test
public void ShouldertoShoulderStatsAndKeywordsAreCorrect() throws DecisionResultInvalidException, CardNotFoundException {
/**
* Set: 1
* Title: Shoulder to Shoulder
* Unique: False
* Side: FREE_PEOPLE
* Culture: Elven
* Twilight Cost: 1
* Type: condition
* Subtype: Support Area
* Game Text: <b>Fellowship:</b> Add (1) and exert a Dwarf to heal an Elf, or add (1) and exert an Elf to heal a Dwarf.
*/
//Pre-game setup
var scn = GetScenario();
var sts = scn.GetFreepsCard("sts");
assertFalse(sts.getBlueprint().isUnique());
assertEquals(Side.FREE_PEOPLE, sts.getBlueprint().getSide());
assertEquals(Culture.ELVEN, sts.getBlueprint().getCulture());
assertEquals(CardType.CONDITION, sts.getBlueprint().getCardType());
assertTrue(scn.HasKeyword(sts, Keyword.SUPPORT_AREA));
assertEquals(1, sts.getBlueprint().getTwilightCost());
}
@Test
public void FellowshipActionWorksOnDwarves() throws DecisionResultInvalidException, CardNotFoundException {
//Pre-game setup
var scn = GetScenario();
var sts = scn.GetFreepsCard("sts");
var legolas = scn.GetFreepsCard("legolas");
var gimli = scn.GetFreepsCard("gimli");
var rumil = scn.GetFreepsCard("rumil");
var grimir = scn.GetFreepsCard("grimir");
scn.FreepsMoveCharToTable(legolas, gimli);
scn.FreepsMoveCardToSupportArea(rumil, grimir, sts);
scn.StartGame();
scn.AddWoundsToChar(legolas, 1);
scn.AddWoundsToChar(gimli, 1);
scn.AddWoundsToChar(rumil, 1);
scn.AddWoundsToChar(grimir, 1);
assertEquals(0, scn.GetTwilight());
assertEquals(1, scn.GetWoundsOn(legolas));
assertEquals(1, scn.GetWoundsOn(gimli));
assertEquals(1, scn.GetWoundsOn(rumil));
assertEquals(1, scn.GetWoundsOn(grimir));
assertTrue(scn.FreepsActionAvailable(sts));
scn.FreepsUseCardAction(sts);
assertEquals(2, scn.FreepsGetMultipleChoices().size());
scn.FreepsChooseMultipleChoiceOption("Exert a Dwarf to heal an Elf");
assertEquals(2, scn.GetFreepsCardChoiceCount());
scn.FreepsChooseCard(gimli);
scn.FreepsChooseCard(rumil);
assertEquals(1, scn.GetTwilight());
assertEquals(2, scn.GetWoundsOn(gimli));
assertEquals(0, scn.GetWoundsOn(rumil));
assertTrue(scn.FreepsActionAvailable(sts));
scn.FreepsUseCardAction(sts);
assertEquals(2, scn.FreepsGetMultipleChoices().size());
scn.FreepsChooseMultipleChoiceOption("Exert a Dwarf to heal an Elf");
assertEquals(2, scn.GetFreepsCardChoiceCount());
//only one choice of each left
assertEquals(2, scn.GetTwilight());
assertEquals(2, scn.GetWoundsOn(grimir));
assertEquals(0, scn.GetWoundsOn(legolas));
}
@Test
public void FellowshipActionWorksOnElves() throws DecisionResultInvalidException, CardNotFoundException {
//Pre-game setup
var scn = GetScenario();
var sts = scn.GetFreepsCard("sts");
var legolas = scn.GetFreepsCard("legolas");
var gimli = scn.GetFreepsCard("gimli");
var rumil = scn.GetFreepsCard("rumil");
var grimir = scn.GetFreepsCard("grimir");
scn.FreepsMoveCharToTable(legolas, gimli);
scn.FreepsMoveCardToSupportArea(rumil, grimir, sts);
scn.StartGame();
scn.AddWoundsToChar(legolas, 1);
scn.AddWoundsToChar(gimli, 1);
scn.AddWoundsToChar(rumil, 1);
scn.AddWoundsToChar(grimir, 1);
assertEquals(0, scn.GetTwilight());
assertEquals(1, scn.GetWoundsOn(legolas));
assertEquals(1, scn.GetWoundsOn(gimli));
assertEquals(1, scn.GetWoundsOn(rumil));
assertEquals(1, scn.GetWoundsOn(grimir));
assertTrue(scn.FreepsActionAvailable(sts));
scn.FreepsUseCardAction(sts);
assertEquals(2, scn.FreepsGetMultipleChoices().size());
scn.FreepsChooseMultipleChoiceOption("Exert an Elf to heal a Dwarf");
assertEquals(2, scn.GetFreepsCardChoiceCount());
scn.FreepsChooseCard(legolas);
scn.FreepsChooseCard(gimli);
assertEquals(1, scn.GetTwilight());
assertEquals(2, scn.GetWoundsOn(legolas));
assertEquals(0, scn.GetWoundsOn(gimli));
assertTrue(scn.FreepsActionAvailable(sts));
scn.FreepsUseCardAction(sts);
assertEquals(2, scn.FreepsGetMultipleChoices().size());
scn.FreepsChooseMultipleChoiceOption("Exert an Elf to heal a Dwarf");
assertEquals(2, scn.GetFreepsCardChoiceCount());
//only one choice of each left
assertEquals(2, scn.GetTwilight());
assertEquals(2, scn.GetWoundsOn(rumil));
assertEquals(0, scn.GetWoundsOn(grimir));
}
@Test
public void NoManeuverAction() throws DecisionResultInvalidException, CardNotFoundException {
//Pre-game setup
var scn = GetScenario();
var sts = scn.GetFreepsCard("sts");
var legolas = scn.GetFreepsCard("legolas");
var gimli = scn.GetFreepsCard("gimli");
var rumil = scn.GetFreepsCard("rumil");
var grimir = scn.GetFreepsCard("grimir");
scn.FreepsMoveCharToTable(legolas, gimli);
scn.FreepsMoveCardToSupportArea(rumil, grimir, sts);
var runner = scn.GetShadowCard("runner");
scn.ShadowMoveCharToTable(runner);
scn.StartGame();
scn.SkipToPhase(Phase.MANEUVER);
assertTrue(scn.FreepsAnyDecisionsAvailable());
assertFalse(scn.FreepsAnyActionsAvailable());
}
}