New Sam, Son of Hamfast errata + tests
This commit is contained in:
@@ -79,6 +79,114 @@
|
||||
}
|
||||
}
|
||||
|
||||
71_311: {
|
||||
cardInfo: {
|
||||
//Either a full URL, or a subpath for the PC image server
|
||||
imagePath: errata/LOTR-EN01S311.2_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_311
|
||||
//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: 2
|
||||
collInfo: 1C311
|
||||
rarity: C
|
||||
setNum: "1"
|
||||
cardNum: 311
|
||||
// Standard, Masterwork, Tengwar, FullArt, etc. Top-level cards are always Standard.
|
||||
style: Standard
|
||||
}
|
||||
title: Sam
|
||||
subtitle: Son of Hamfast
|
||||
unique: true
|
||||
side: Free Peoples
|
||||
culture: Shire
|
||||
twilight: 2
|
||||
type: Companion
|
||||
race: Hobbit
|
||||
#keyword: damage+1
|
||||
strength: 3
|
||||
vitality: 4
|
||||
signet: aragorn
|
||||
resistance: 5
|
||||
effects: [
|
||||
{
|
||||
type: activated
|
||||
phase: fellowship
|
||||
cost: [
|
||||
{
|
||||
type: exert
|
||||
filter: self
|
||||
}
|
||||
{
|
||||
type: exert
|
||||
filter: choose(another,companion)
|
||||
}
|
||||
]
|
||||
effect: [
|
||||
{
|
||||
type: removeBurdens
|
||||
amount: 1
|
||||
}
|
||||
{
|
||||
type: conditional
|
||||
requires: {
|
||||
type: not
|
||||
requires: {
|
||||
type: or
|
||||
requires: [
|
||||
{
|
||||
type: CanSpot
|
||||
count: 2
|
||||
filter: culture(shire),ally
|
||||
}
|
||||
{
|
||||
type: CanSpot
|
||||
count: 1
|
||||
filter: title(Rosie Cotton)
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
effect: {
|
||||
type: exert
|
||||
filter: self
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
{
|
||||
type: trigger
|
||||
optional: true
|
||||
trigger: {
|
||||
type: killed
|
||||
filter: name(Frodo),ring bearer
|
||||
}
|
||||
effect: {
|
||||
type: makeSelfRingBearer
|
||||
}
|
||||
}
|
||||
]
|
||||
gametext: <b>Fellowship:</b> Exert Sam and another companion to remove a burden. Then, exert Sam again unless you can spot 2 [shire] allies (or Rosie Cotton).<br><b>Response:</b> If Frodo dies, make Sam the <b>Ring-bearer (resistance 5).</b>
|
||||
lore: “‘Oh, I've never held a girl's hand before. I... I think I might just have myself another ale.'”
|
||||
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_313: {
|
||||
cardInfo: {
|
||||
//Either a full URL, or a subpath for the PC image server
|
||||
|
||||
@@ -12,13 +12,20 @@ import static org.junit.Assert.*;
|
||||
|
||||
public class Card_01_311_ErrataTests
|
||||
{
|
||||
|
||||
protected GenericCardTestHelper GetScenario() throws CardNotFoundException, DecisionResultInvalidException {
|
||||
return new GenericCardTestHelper(
|
||||
new HashMap<>() {{
|
||||
put("sam", "51_311");
|
||||
put("sam", "71_311");
|
||||
put("rosie", "1_309");
|
||||
put("proudfoot", "1_301");
|
||||
put("gaffer", "1_291");
|
||||
|
||||
put("orc", "1_272");
|
||||
}}
|
||||
}},
|
||||
GenericCardTestHelper.FellowshipSites,
|
||||
GenericCardTestHelper.FOTRFrodo,
|
||||
GenericCardTestHelper.FOTRRing
|
||||
);
|
||||
}
|
||||
|
||||
@@ -26,23 +33,23 @@ public class Card_01_311_ErrataTests
|
||||
public void SamStatsAndKeywordsAreCorrect() throws DecisionResultInvalidException, CardNotFoundException {
|
||||
|
||||
/**
|
||||
* Set: 1E
|
||||
* Title: *Sam
|
||||
* Subtitle: Son of Hamfast
|
||||
* Side: Free Peoples
|
||||
* Set: 1
|
||||
* Title: Sam, Son of Hamfast
|
||||
* Unique: True
|
||||
* Side: FREE_PEOPLE
|
||||
* Culture: Shire
|
||||
* Twilight Cost: 2
|
||||
* Type: Companion
|
||||
* Type: companion
|
||||
* Subtype: Hobbit
|
||||
* Strength: 3
|
||||
* Vitality: 4
|
||||
* Signet: Aragorn
|
||||
* Errata Game Text: Fellowship: Exert Sam and another companion to remove a burden.
|
||||
* Response: If Frodo dies, make Sam the Ring-bearer (resistance 5).
|
||||
* Game Text: <b>Fellowship:</b> Exert Sam and another companion to remove a burden. Then, exert Sam again unless you can spot 2 [shire] allies (or Rosie Cotton).
|
||||
* <b>Response:</b> If Frodo dies, make Sam the <b>Ring-bearer (resistance 5).</b>
|
||||
*/
|
||||
|
||||
//Pre-game setup
|
||||
GenericCardTestHelper scn = GetScenario();
|
||||
var scn = GetScenario();
|
||||
|
||||
var sam = scn.GetFreepsCard("sam");
|
||||
|
||||
@@ -54,11 +61,12 @@ public class Card_01_311_ErrataTests
|
||||
assertEquals(2, sam.getBlueprint().getTwilightCost());
|
||||
assertEquals(3, sam.getBlueprint().getStrength());
|
||||
assertEquals(4, sam.getBlueprint().getVitality());
|
||||
assertEquals(5, sam.getBlueprint().getResistance());
|
||||
assertEquals(Signet.ARAGORN, sam.getBlueprint().getSignet());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void FellowshipActionExertsTwiceToRemoveABurden() throws DecisionResultInvalidException, CardNotFoundException {
|
||||
public void FellowshipActionExertsTwicePlusOneToRemoveABurden() throws DecisionResultInvalidException, CardNotFoundException {
|
||||
//Pre-game setup
|
||||
GenericCardTestHelper scn = GetScenario();
|
||||
|
||||
@@ -77,6 +85,61 @@ public class Card_01_311_ErrataTests
|
||||
|
||||
scn.FreepsUseCardAction(sam);
|
||||
|
||||
assertEquals(2, scn.GetWoundsOn(sam));
|
||||
assertEquals(1, scn.GetWoundsOn(frodo));
|
||||
assertEquals(0, scn.GetBurdens());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void FellowshipActionExertsTwiceToRemoveABurdenIf2ShireAllies() throws DecisionResultInvalidException, CardNotFoundException {
|
||||
//Pre-game setup
|
||||
GenericCardTestHelper scn = GetScenario();
|
||||
|
||||
var frodo = scn.GetRingBearer();
|
||||
var sam = scn.GetFreepsCard("sam");
|
||||
var proudfoot = scn.GetFreepsCard("proudfoot");
|
||||
var gaffer = scn.GetFreepsCard("gaffer");
|
||||
scn.FreepsMoveCharToTable(sam);
|
||||
scn.FreepsMoveCardToSupportArea(proudfoot, gaffer);
|
||||
|
||||
scn.StartGame();
|
||||
|
||||
assertEquals(Phase.FELLOWSHIP, scn.GetCurrentPhase());
|
||||
assertTrue(scn.FreepsActionAvailable(sam));
|
||||
|
||||
assertEquals(0, scn.GetWoundsOn(sam));
|
||||
assertEquals(0, scn.GetWoundsOn(frodo));
|
||||
assertEquals(1, scn.GetBurdens());
|
||||
|
||||
scn.FreepsUseCardAction(sam);
|
||||
|
||||
assertEquals(1, scn.GetWoundsOn(sam));
|
||||
assertEquals(1, scn.GetWoundsOn(frodo));
|
||||
assertEquals(0, scn.GetBurdens());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void FellowshipActionExertsTwiceToRemoveABurdenIfRosie() throws DecisionResultInvalidException, CardNotFoundException {
|
||||
//Pre-game setup
|
||||
GenericCardTestHelper scn = GetScenario();
|
||||
|
||||
var frodo = scn.GetRingBearer();
|
||||
var sam = scn.GetFreepsCard("sam");
|
||||
var rosie = scn.GetFreepsCard("rosie");
|
||||
scn.FreepsMoveCharToTable(sam);
|
||||
scn.FreepsMoveCardToSupportArea(rosie);
|
||||
|
||||
scn.StartGame();
|
||||
|
||||
assertEquals(Phase.FELLOWSHIP, scn.GetCurrentPhase());
|
||||
assertTrue(scn.FreepsActionAvailable(sam));
|
||||
|
||||
assertEquals(0, scn.GetWoundsOn(sam));
|
||||
assertEquals(0, scn.GetWoundsOn(frodo));
|
||||
assertEquals(1, scn.GetBurdens());
|
||||
|
||||
scn.FreepsUseCardAction(sam);
|
||||
|
||||
assertEquals(1, scn.GetWoundsOn(sam));
|
||||
assertEquals(1, scn.GetWoundsOn(frodo));
|
||||
assertEquals(0, scn.GetBurdens());
|
||||
@@ -90,7 +153,6 @@ public class Card_01_311_ErrataTests
|
||||
|
||||
var frodo = scn.GetRingBearer();
|
||||
var sam = scn.GetFreepsCard("sam");
|
||||
var orc = scn.GetShadowCard("orc");
|
||||
scn.FreepsMoveCharToTable(sam);
|
||||
|
||||
scn.StartGame();
|
||||
|
||||
@@ -0,0 +1,107 @@
|
||||
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_311_ErrataTests
|
||||
{
|
||||
protected GenericCardTestHelper GetScenario() throws CardNotFoundException, DecisionResultInvalidException {
|
||||
return new GenericCardTestHelper(
|
||||
new HashMap<>() {{
|
||||
put("sam", "51_311");
|
||||
|
||||
put("orc", "1_272");
|
||||
}}
|
||||
);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void SamStatsAndKeywordsAreCorrect() throws DecisionResultInvalidException, CardNotFoundException {
|
||||
|
||||
/**
|
||||
* Set: 1E
|
||||
* Title: *Sam
|
||||
* Subtitle: Son of Hamfast
|
||||
* Side: Free Peoples
|
||||
* Culture: Shire
|
||||
* Twilight Cost: 2
|
||||
* Type: Companion
|
||||
* Subtype: Hobbit
|
||||
* Strength: 3
|
||||
* Vitality: 4
|
||||
* Signet: Aragorn
|
||||
* Errata Game Text: Fellowship: Exert Sam and another companion to remove a burden.
|
||||
* Response: If Frodo dies, make Sam the Ring-bearer (resistance 5).
|
||||
*/
|
||||
|
||||
//Pre-game setup
|
||||
GenericCardTestHelper scn = GetScenario();
|
||||
|
||||
var sam = scn.GetFreepsCard("sam");
|
||||
|
||||
assertTrue(sam.getBlueprint().isUnique());
|
||||
assertEquals(Side.FREE_PEOPLE, sam.getBlueprint().getSide());
|
||||
assertEquals(Culture.SHIRE, sam.getBlueprint().getCulture());
|
||||
assertEquals(CardType.COMPANION, sam.getBlueprint().getCardType());
|
||||
assertEquals(Race.HOBBIT, sam.getBlueprint().getRace());
|
||||
assertEquals(2, sam.getBlueprint().getTwilightCost());
|
||||
assertEquals(3, sam.getBlueprint().getStrength());
|
||||
assertEquals(4, sam.getBlueprint().getVitality());
|
||||
assertEquals(Signet.ARAGORN, sam.getBlueprint().getSignet());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void FellowshipActionExertsTwiceToRemoveABurden() throws DecisionResultInvalidException, CardNotFoundException {
|
||||
//Pre-game setup
|
||||
GenericCardTestHelper scn = GetScenario();
|
||||
|
||||
var frodo = scn.GetRingBearer();
|
||||
var sam = scn.GetFreepsCard("sam");
|
||||
scn.FreepsMoveCharToTable(sam);
|
||||
|
||||
scn.StartGame();
|
||||
|
||||
assertEquals(Phase.FELLOWSHIP, scn.GetCurrentPhase());
|
||||
assertTrue(scn.FreepsActionAvailable(sam));
|
||||
|
||||
assertEquals(0, scn.GetWoundsOn(sam));
|
||||
assertEquals(0, scn.GetWoundsOn(frodo));
|
||||
assertEquals(1, scn.GetBurdens());
|
||||
|
||||
scn.FreepsUseCardAction(sam);
|
||||
|
||||
assertEquals(1, scn.GetWoundsOn(sam));
|
||||
assertEquals(1, scn.GetWoundsOn(frodo));
|
||||
assertEquals(0, scn.GetBurdens());
|
||||
}
|
||||
|
||||
|
||||
@Test
|
||||
public void RBDeathMakesSamTheRB() throws DecisionResultInvalidException, CardNotFoundException {
|
||||
//Pre-game setup
|
||||
GenericCardTestHelper scn = GetScenario();
|
||||
|
||||
var frodo = scn.GetRingBearer();
|
||||
var sam = scn.GetFreepsCard("sam");
|
||||
var orc = scn.GetShadowCard("orc");
|
||||
scn.FreepsMoveCharToTable(sam);
|
||||
|
||||
scn.StartGame();
|
||||
|
||||
assertNotSame(scn.GetRingBearer(), sam);
|
||||
scn.AddWoundsToChar(frodo, 4);
|
||||
|
||||
scn.PassCurrentPhaseActions();
|
||||
|
||||
assertTrue(scn.FreepsActionAvailable("Optional Trigger"));
|
||||
scn.FreepsAcceptOptionalTrigger();
|
||||
assertSame(scn.GetRingBearer(), sam);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user