Shadow host errata + tests
This commit is contained in:
@@ -1,4 +1,79 @@
|
||||
{
|
||||
|
||||
78_43: {
|
||||
cardInfo: {
|
||||
//Either a full URL, or a subpath for the PC image server
|
||||
imagePath: errata/LOTR-EN08E043.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: 8_43
|
||||
//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: 8R43
|
||||
rarity: R
|
||||
setNum: "8"
|
||||
cardNum: 43
|
||||
// Standard, Masterwork, Tengwar, FullArt, etc. Top-level cards are always Standard.
|
||||
style: Standard
|
||||
}
|
||||
title: Shadow Host
|
||||
unique: true
|
||||
side: Free Peoples
|
||||
culture: Gondor
|
||||
twilight: 5
|
||||
type: Companion
|
||||
race: Wraith
|
||||
keyword: enduring
|
||||
strength: 9
|
||||
vitality: 3
|
||||
signet: Aragorn
|
||||
resistance: 6
|
||||
requires: {
|
||||
type: canSpot
|
||||
filter: culture(gondor),wraith
|
||||
}
|
||||
effects: [
|
||||
{
|
||||
type: ExtraCost
|
||||
cost: {
|
||||
type: AddThreats
|
||||
amount: 2
|
||||
}
|
||||
}
|
||||
{
|
||||
type: modifier
|
||||
modifier: {
|
||||
type: addKeyword
|
||||
requires: {
|
||||
type: CanSpot
|
||||
filter: self,exhausted
|
||||
}
|
||||
filter: self
|
||||
keyword: defender+1
|
||||
}
|
||||
}
|
||||
]
|
||||
gametext: <b>Enduring.</b> To play, spot 2 [gondor] Wraiths and add 2 threats. <br>While Shadow Host is exhausted, it is defender +1.
|
||||
lore: “...fear went on before them, until they came to Calembel upon Ciril, and the sun went down like blood behind Pinnath Gelin....”
|
||||
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: {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
58_48: {
|
||||
cardInfo: {
|
||||
//Either a full URL, or a subpath for the PC image server
|
||||
|
||||
@@ -0,0 +1,113 @@
|
||||
package com.gempukku.lotro.cards.unofficial.pc.errata.set08;
|
||||
|
||||
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_08_043_ErrataTests
|
||||
{
|
||||
|
||||
protected GenericCardTestHelper GetScenario() throws CardNotFoundException, DecisionResultInvalidException {
|
||||
return new GenericCardTestHelper(
|
||||
new HashMap<>()
|
||||
{{
|
||||
put("host", "78_43");
|
||||
put("wraith1", "8_41");
|
||||
put("wraith2", "8_41");
|
||||
}},
|
||||
GenericCardTestHelper.FellowshipSites,
|
||||
GenericCardTestHelper.FOTRFrodo,
|
||||
GenericCardTestHelper.FOTRRing
|
||||
);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void ShadowHostStatsAndKeywordsAreCorrect() throws DecisionResultInvalidException, CardNotFoundException {
|
||||
|
||||
/**
|
||||
* Set: 8
|
||||
* Title: Shadow Host
|
||||
* Unique: True
|
||||
* Side: FREE_PEOPLE
|
||||
* Culture: Gondor
|
||||
* Twilight Cost: 5
|
||||
* Type: companion
|
||||
* Subtype: Wraith
|
||||
* Strength: 9
|
||||
* Vitality: 3
|
||||
* Signet: Aragorn
|
||||
* Game Text: <b>Enduring.</b> To play, spot 2 [gondor] Wraiths and add 2 threats.
|
||||
* While Shadow Host is exhausted, it is defender +1.
|
||||
*/
|
||||
|
||||
//Pre-game setup
|
||||
var scn = GetScenario();
|
||||
|
||||
var host = scn.GetFreepsCard("host");
|
||||
|
||||
assertTrue(host.getBlueprint().isUnique());
|
||||
assertEquals(Side.FREE_PEOPLE, host.getBlueprint().getSide());
|
||||
assertEquals(Culture.GONDOR, host.getBlueprint().getCulture());
|
||||
assertEquals(CardType.COMPANION, host.getBlueprint().getCardType());
|
||||
assertEquals(Race.WRAITH, host.getBlueprint().getRace());
|
||||
assertTrue(scn.HasKeyword(host, Keyword.ENDURING));
|
||||
assertEquals(5, host.getBlueprint().getTwilightCost());
|
||||
assertEquals(9, host.getBlueprint().getStrength());
|
||||
assertEquals(3, host.getBlueprint().getVitality());
|
||||
assertEquals(6, host.getBlueprint().getResistance());
|
||||
assertEquals(Signet.ARAGORN, host.getBlueprint().getSignet());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void HostRequires2GondorWraithsAnd2ThreatsToPlay() throws DecisionResultInvalidException, CardNotFoundException {
|
||||
//Pre-game setup
|
||||
var scn = GetScenario();
|
||||
|
||||
var host = scn.GetFreepsCard("host");
|
||||
var wraith1 = scn.GetFreepsCard("wraith1");
|
||||
var wraith2 = scn.GetFreepsCard("wraith2");
|
||||
scn.FreepsMoveCardToHand(host, wraith1, wraith2);
|
||||
|
||||
scn.StartGame();
|
||||
|
||||
assertFalse(scn.FreepsPlayAvailable(host));
|
||||
scn.FreepsPlayCard(wraith1);
|
||||
scn.RemoveThreats(1);
|
||||
assertFalse(scn.FreepsPlayAvailable(host));
|
||||
scn.FreepsPlayCard(wraith2);
|
||||
scn.RemoveThreats(1);
|
||||
assertTrue(scn.FreepsPlayAvailable(host));
|
||||
|
||||
assertEquals(0, scn.GetThreats());
|
||||
assertEquals(0, scn.GetWoundsOn(wraith1));
|
||||
assertEquals(0, scn.GetWoundsOn(wraith2));
|
||||
scn.FreepsPlayCard(host);
|
||||
assertEquals(2, scn.GetThreats());
|
||||
assertEquals(0, scn.GetWoundsOn(wraith1));
|
||||
assertEquals(0, scn.GetWoundsOn(wraith2));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void HostIsDefenderPlus1IfExhausted() throws DecisionResultInvalidException, CardNotFoundException {
|
||||
//Pre-game setup
|
||||
var scn = GetScenario();
|
||||
|
||||
var host = scn.GetFreepsCard("host");
|
||||
scn.FreepsMoveCharToTable(host);
|
||||
|
||||
scn.StartGame();
|
||||
|
||||
assertFalse(scn.HasKeyword(host, Keyword.DEFENDER));
|
||||
scn.AddWoundsToChar(host, 1);
|
||||
assertFalse(scn.HasKeyword(host, Keyword.DEFENDER));
|
||||
scn.AddWoundsToChar(host, 1);
|
||||
assertTrue(scn.HasKeyword(host, Keyword.DEFENDER));
|
||||
assertEquals(1, scn.GetKeywordCount(host, Keyword.DEFENDER));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user