Vilya errata + tests
This commit is contained in:
@@ -174,4 +174,88 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
73_27: {
|
||||
cardInfo: {
|
||||
//Either a full URL, or a subpath for the PC image server
|
||||
imagePath: errata/LOTR-EN03E027.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: 3_27
|
||||
//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: 3R27
|
||||
rarity: R
|
||||
setNum: "3"
|
||||
cardNum: 27
|
||||
// Standard, Masterwork, Tengwar, FullArt, etc. Top-level cards are always Standard.
|
||||
style: Standard
|
||||
}
|
||||
title: Vilya
|
||||
unique: true
|
||||
side: Free Peoples
|
||||
culture: Elven
|
||||
twilight: 0
|
||||
vitality: 1
|
||||
type: Artifact
|
||||
itemclass: Ring
|
||||
target: name(Elrond)
|
||||
effects: [
|
||||
{
|
||||
type: Activated
|
||||
phase: Maneuver
|
||||
requires: {
|
||||
type: CanSpot
|
||||
filter: condition,side(shadow)
|
||||
}
|
||||
effect: [
|
||||
{
|
||||
type: ChooseActiveCards
|
||||
filter: choose(condition,side(shadow))
|
||||
memorize: chosenShadowCondition
|
||||
text: Choose a Shadow condition to return to its owner's hand.
|
||||
}
|
||||
{
|
||||
type: ReturnToHand
|
||||
filter: memory(chosenShadowCondition)
|
||||
}
|
||||
{
|
||||
type: optional
|
||||
player: shadow
|
||||
text: Would you like to discard a card from hand?
|
||||
effect: {
|
||||
type: DiscardFromHand
|
||||
forced: false
|
||||
player: OwnerFromMemory(chosenShadowCondition)
|
||||
hand: OwnerFromMemory(chosenShadowCondition)
|
||||
count: 1
|
||||
}
|
||||
}
|
||||
{
|
||||
type: ReturnToHand
|
||||
filter: self
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
gametext: Bearer must be Elrond.<br><b>Maneuver:</b> Spot a Shadow condition to return that condition to its owner's hand. That player may discard a card from hand. Return Vilya to your hand.
|
||||
lore: “Upon his finger was a ring of gold with a great blue stone, Vilya, mightiest of the Three."
|
||||
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: {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,123 @@
|
||||
package com.gempukku.lotro.cards.unofficial.pc.errata.set03;
|
||||
|
||||
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_03_027_ErrataTests
|
||||
{
|
||||
|
||||
protected GenericCardTestHelper GetScenario() throws CardNotFoundException, DecisionResultInvalidException {
|
||||
return new GenericCardTestHelper(
|
||||
new HashMap<>()
|
||||
{{
|
||||
put("vilya", "73_27");
|
||||
put("elrond", "3_13");
|
||||
put("rumil", "1_57");
|
||||
put("thrarin", "1_27");
|
||||
|
||||
put("runner", "1_178");
|
||||
put("armory", "1_173");
|
||||
put("bladetip", "1_209");
|
||||
}},
|
||||
GenericCardTestHelper.FellowshipSites,
|
||||
GenericCardTestHelper.FOTRFrodo,
|
||||
GenericCardTestHelper.FOTRRing
|
||||
);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void VilyaStatsAndKeywordsAreCorrect() throws DecisionResultInvalidException, CardNotFoundException {
|
||||
|
||||
/**
|
||||
* Set: 3
|
||||
* Title: Vilya
|
||||
* Unique: True
|
||||
* Side: FREE_PEOPLE
|
||||
* Culture: Elven
|
||||
* Twilight Cost: 0
|
||||
* Type: artifact
|
||||
* Subtype: Ring
|
||||
* Vitality: 1
|
||||
* Game Text: Bearer must be Elrond.
|
||||
* <b>Maneuver:</b> Exert Elrond and spot a Shadow condition to return that condition to its owner's hand. That player may discard a vilya from hand. Return Vilya to your hand.
|
||||
*/
|
||||
|
||||
//Pre-game setup
|
||||
var scn = GetScenario();
|
||||
|
||||
var vilya = scn.GetFreepsCard("vilya");
|
||||
|
||||
assertTrue(vilya.getBlueprint().isUnique());
|
||||
assertEquals(Side.FREE_PEOPLE, vilya.getBlueprint().getSide());
|
||||
assertEquals(Culture.ELVEN, vilya.getBlueprint().getCulture());
|
||||
assertEquals(CardType.ARTIFACT, vilya.getBlueprint().getCardType());
|
||||
assertTrue(vilya.getBlueprint().getPossessionClasses().contains(PossessionClass.RING));
|
||||
assertEquals(0, vilya.getBlueprint().getTwilightCost());
|
||||
assertEquals(1, vilya.getBlueprint().getVitality());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void VilyaBorneByElrond() throws DecisionResultInvalidException, CardNotFoundException {
|
||||
//Pre-game setup
|
||||
var scn = GetScenario();
|
||||
|
||||
var vilya = scn.GetFreepsCard("vilya");
|
||||
var elrond = scn.GetFreepsCard("elrond");
|
||||
var rumil = scn.GetFreepsCard("rumil");
|
||||
var thrarin = scn.GetFreepsCard("thrarin");
|
||||
scn.FreepsMoveCardToHand(vilya, elrond);
|
||||
scn.FreepsMoveCharToTable(rumil, thrarin);
|
||||
|
||||
scn.StartGame();
|
||||
|
||||
assertFalse(scn.FreepsPlayAvailable(vilya));
|
||||
scn.FreepsPlayCard(elrond);
|
||||
assertTrue(scn.FreepsPlayAvailable(vilya));
|
||||
assertEquals(Zone.HAND, vilya.getZone());
|
||||
scn.FreepsPlayCard(vilya);
|
||||
assertEquals(Zone.ATTACHED, vilya.getZone());
|
||||
assertSame(elrond, vilya.getAttachedTo());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void ManeuverActionReturnsShadowConditionToHandAndSelfReturnsToHand() throws DecisionResultInvalidException, CardNotFoundException {
|
||||
//Pre-game setup
|
||||
var scn = GetScenario();
|
||||
|
||||
var frodo = scn.GetRingBearer();
|
||||
var vilya = scn.GetFreepsCard("vilya");
|
||||
var elrond = scn.GetFreepsCard("elrond");
|
||||
scn.FreepsMoveCharToTable(elrond);
|
||||
scn.FreepsAttachCardsTo(elrond, vilya);
|
||||
|
||||
var runner = scn.GetShadowCard("runner");
|
||||
var armory = scn.GetShadowCard("armory");
|
||||
var bladetip = scn.GetShadowCard("bladetip");
|
||||
scn.ShadowMoveCharToTable(runner);
|
||||
scn.ShadowMoveCardToSupportArea(armory);
|
||||
scn.AttachCardsTo(frodo, bladetip);
|
||||
|
||||
scn.StartGame();
|
||||
|
||||
scn.SkipToPhase(Phase.MANEUVER);
|
||||
assertTrue(scn.FreepsActionAvailable(vilya));
|
||||
scn.FreepsUseCardAction(vilya);
|
||||
assertEquals(2, scn.GetFreepsCardChoiceCount());
|
||||
assertEquals(Zone.ATTACHED, bladetip.getZone());
|
||||
assertEquals(Zone.ATTACHED, vilya.getZone());
|
||||
scn.FreepsChooseCard(bladetip);
|
||||
assertEquals(Zone.HAND, bladetip.getZone());
|
||||
|
||||
assertTrue(scn.ShadowDecisionAvailable("Discard"));
|
||||
scn.ShadowChooseYes();
|
||||
assertEquals(Zone.DISCARD, bladetip.getZone());
|
||||
assertEquals(Zone.HAND, vilya.getZone());
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user