Updates
- Fixed PC errata not showing when a block or set filter was applied within PC formats in the deckbuilder - Added V1 Boromir, Redeemed errata - Updated Terrible as the Dawn errata to specify "discard another companion"
This commit is contained in:
@@ -934,6 +934,8 @@ var PCCards = {
|
||||
'55_121' : 'https://i.lotrtcgpc.net/errata/LOTR-EN05E121.1_card.jpg',
|
||||
// Gimli, Skilled Defender (5R7) [Errata]
|
||||
'55_7' : 'https://i.lotrtcgpc.net/errata/LOTR-EN05E007.1_card.jpg',
|
||||
// Boromir, Redeemed (V1 20) [Errata]
|
||||
'101_20' : 'https://i.lotrtcgpc.net/errata/LOTR-ENV1E020.1_card.jpg',
|
||||
|
||||
//V1 additions:
|
||||
// Sirannon Dam (V165)
|
||||
|
||||
@@ -734,7 +734,7 @@
|
||||
}
|
||||
effect: {
|
||||
type: Preventable
|
||||
text: Would you like to discard a companion to prevent wounding {target}?
|
||||
text: Would you like to discard another companion to prevent wounding {target}?
|
||||
player: freeps
|
||||
effect: {
|
||||
type: Wound
|
||||
@@ -743,11 +743,11 @@
|
||||
cost: {
|
||||
type: Discard
|
||||
player: freeps
|
||||
select: choose(companion,not(ring-bearer))
|
||||
select: choose(companion,not(ring-bearer),not(bearer))
|
||||
}
|
||||
}
|
||||
}
|
||||
gametext: If a companion or ally's special ability is used, you may spot a [sauron] card to wound that character. The Free Peoples player may discard a companion to prevent this.
|
||||
gametext: If a companion or ally's special ability is used, you may spot a [sauron] card to wound that character. The Free Peoples player may discard another companion to prevent this.
|
||||
lore: “‘In the place of the Dark Lord, you would have a Queen... All shall love me and despair!'”
|
||||
promotext: ""
|
||||
alts: {
|
||||
|
||||
@@ -207,11 +207,77 @@
|
||||
}
|
||||
}
|
||||
|
||||
# 101_20: {
|
||||
# cardInfo: {
|
||||
# //id: 101_20
|
||||
# image: sets/vset1/LOTR-ENV1S020.0_card.jpg
|
||||
# collInfo: V1R20
|
||||
# rarity: R
|
||||
# }
|
||||
# title: Boromir
|
||||
# subtitle: Redeemed
|
||||
# unique: true
|
||||
# side: Free Peoples
|
||||
# culture: Gondor
|
||||
# twilight: 3
|
||||
# type: Companion
|
||||
# race: Man
|
||||
# strength: 5
|
||||
# vitality: 3
|
||||
# signet: Aragorn
|
||||
# resistance: 6
|
||||
# effects: [
|
||||
# {
|
||||
# type: modifier
|
||||
# modifier: {
|
||||
# type: modifyStrength
|
||||
# filter: name(Boromir)
|
||||
# amount: {
|
||||
# type: forEachYouCanSpot
|
||||
# filter: minion,inSkirmishAgainst(name(Boromir))
|
||||
# multiplier: 2
|
||||
# }
|
||||
# }
|
||||
# }
|
||||
# {
|
||||
# type: Trigger
|
||||
# optional: true
|
||||
# trigger: {
|
||||
# type: startOfPhase
|
||||
# phase: assignment
|
||||
# }
|
||||
# cost: {
|
||||
# type: exert
|
||||
# select: choose(another,companion,signet(aragorn))
|
||||
# }
|
||||
# effect: {
|
||||
# type: addModifier
|
||||
# modifier: {
|
||||
# type: addKeyword
|
||||
# filter: name(Boromir)
|
||||
# keyword: defender+1
|
||||
# }
|
||||
# until: start(regroup)
|
||||
# }
|
||||
# }
|
||||
# ]
|
||||
# gametext: Boromir is strength +2 for each minion he is skirmishing.<br>At the start of each assignment phase, you may exert another companion with the Aragorn signet to make Boromir defender +1 until the regroup phase.
|
||||
# lore: "'Few have gained such a victory. Be at peace!'"
|
||||
# promotext: ""
|
||||
# alts: {
|
||||
# promos: {
|
||||
# }
|
||||
# errata: {
|
||||
# }
|
||||
# }
|
||||
# }
|
||||
|
||||
101_20: {
|
||||
cardInfo: {
|
||||
//id: 101_20
|
||||
image: sets/vset1/LOTR-ENV1S020.0_card.jpg
|
||||
image: sets/vset1/LOTR-ENV1S020.1_card.jpg
|
||||
collInfo: V1R20
|
||||
revision: 1
|
||||
rarity: R
|
||||
}
|
||||
title: Boromir
|
||||
@@ -247,8 +313,8 @@
|
||||
phase: assignment
|
||||
}
|
||||
cost: {
|
||||
type: exert
|
||||
select: choose(another,companion,signet(aragorn))
|
||||
type: Spot
|
||||
filter: or(and(unbound,Hobbit),and(another,companion,signet(aragorn)))
|
||||
}
|
||||
effect: {
|
||||
type: addModifier
|
||||
@@ -261,7 +327,7 @@
|
||||
}
|
||||
}
|
||||
]
|
||||
gametext: Boromir is strength +2 for each minion he is skirmishing.<br>At the start of each assignment phase, you may exert another companion with the Aragorn signet to make Boromir defender +1 until the regroup phase.
|
||||
gametext: Boromir is strength +2 for each minion he is skirmishing.<br>At the start of each assignment phase, make Boromir <b>defender +1</b> if you can spot an unbound Hobbit or another companion with the Aragorn signet.
|
||||
lore: "'Few have gained such a victory. Be at peace!'"
|
||||
promotext: ""
|
||||
alts: {
|
||||
|
||||
@@ -92,6 +92,10 @@ public class JSONDefs {
|
||||
public String Name;
|
||||
public String LinkText;
|
||||
public Map<String, String> ErrataIDs;
|
||||
|
||||
public String getPCErrata() {
|
||||
return ErrataIDs.get(PC_Errata);
|
||||
}
|
||||
}
|
||||
|
||||
public static class PlayHistoryStats {
|
||||
|
||||
@@ -276,6 +276,28 @@ public class LotroCardBlueprintLibrary {
|
||||
}
|
||||
}
|
||||
|
||||
public String getErrataSet(String setNum) {
|
||||
return String.valueOf(getErrataSet(Integer.parseInt(setNum)));
|
||||
}
|
||||
|
||||
public int getErrataSet(int setNum) {
|
||||
if(setNum > 19)
|
||||
return setNum;
|
||||
|
||||
return setNum + 50;
|
||||
}
|
||||
|
||||
public String getErrataBase(String setNum) {
|
||||
return String.valueOf(getErrataBase(Integer.parseInt(setNum)));
|
||||
}
|
||||
|
||||
public int getErrataBase(int setNum) {
|
||||
if(setNum > 69 || setNum < 50)
|
||||
return setNum;
|
||||
|
||||
return setNum - 50;
|
||||
}
|
||||
|
||||
private Map<String, JSONDefs.ErrataInfo> errataMappings = null;
|
||||
|
||||
public Map<String, JSONDefs.ErrataInfo> getErrata() {
|
||||
|
||||
@@ -62,6 +62,7 @@ public interface LotroFormat {
|
||||
|
||||
List<String> getRestrictedCardNames();
|
||||
|
||||
boolean hasErrata();
|
||||
Map<String,String> getErrataCardMap();
|
||||
|
||||
String applyErrata(String bpID);
|
||||
|
||||
@@ -20,6 +20,10 @@ public class SortAndFilterCards {
|
||||
var sort = params.getOrDefault("sort", new ArrayList<>());
|
||||
|
||||
var formats = params.getOrDefault("format", new ArrayList<>());
|
||||
LotroFormat currentFormat = null;
|
||||
if(formats.size() == 1) {
|
||||
currentFormat = formatLibrary.getFormat(formats.getFirst());
|
||||
}
|
||||
var blocks = params.getOrDefault("block", new ArrayList<>());
|
||||
var sets = params.getOrDefault("set", new ArrayList<>());
|
||||
|
||||
@@ -80,13 +84,13 @@ public class SortAndFilterCards {
|
||||
var card = cardBPCache.get(blueprintId);
|
||||
boolean valid = true;
|
||||
|
||||
if(!formats.isEmpty() && !isInSetOrFormat(blueprintId, card, formats, cardLibrary, formatLibrary))
|
||||
if(!formats.isEmpty() && !isInSetOrFormat(blueprintId, card, formats, currentFormat, cardLibrary, formatLibrary))
|
||||
continue;
|
||||
|
||||
if(!blocks.isEmpty() && !isInSetOrFormat(blueprintId, card, blocks, cardLibrary, formatLibrary))
|
||||
if(!blocks.isEmpty() && !isInSetOrFormat(blueprintId, card, blocks, currentFormat, cardLibrary, formatLibrary))
|
||||
continue;
|
||||
|
||||
if(!sets.isEmpty() && !isInSetOrFormat(blueprintId, card, sets, cardLibrary, formatLibrary))
|
||||
if(!sets.isEmpty() && !isInSetOrFormat(blueprintId, card, sets, currentFormat, cardLibrary, formatLibrary))
|
||||
continue;
|
||||
|
||||
if(!isFlagAccepted(canStartWithRing, card.canStartWithRing()))
|
||||
@@ -259,7 +263,8 @@ public class SortAndFilterCards {
|
||||
return result;
|
||||
}
|
||||
|
||||
private boolean isInSetOrFormat(String blueprintId, LotroCardBlueprint card, List<String> setFilters, LotroCardBlueprintLibrary library, LotroFormatLibrary formatLibrary) {
|
||||
private boolean isInSetOrFormat(String blueprintId, LotroCardBlueprint card, List<String> setFilters,
|
||||
LotroFormat currentFormat, LotroCardBlueprintLibrary library, LotroFormatLibrary formatLibrary) {
|
||||
boolean isInAnySet = false;
|
||||
|
||||
for (String set : setFilters) {
|
||||
@@ -283,19 +288,31 @@ public class SortAndFilterCards {
|
||||
continue;
|
||||
}
|
||||
|
||||
int min = 0;
|
||||
int max = 0;
|
||||
|
||||
var errata = library.getErrata();
|
||||
|
||||
if (set.contains("-")) {
|
||||
final String[] split = set.split("-", 2);
|
||||
int min = Integer.parseInt(split[0]);
|
||||
int max = Integer.parseInt(split[1]);
|
||||
for (int setNo = min; setNo <= max; setNo++) {
|
||||
if (blueprintId.startsWith(setNo + "_") || library.hasAlternateInSet(blueprintId, String.valueOf(setNo))) {
|
||||
min = Integer.parseInt(split[0]);
|
||||
max = Integer.parseInt(split[1]);
|
||||
}
|
||||
else {
|
||||
min = Integer.parseInt(set);
|
||||
max = min;
|
||||
}
|
||||
|
||||
for (int setNo = min; setNo <= max; setNo++) {
|
||||
if (blueprintId.startsWith(setNo + "_") || library.hasAlternateInSet(blueprintId, String.valueOf(setNo))) {
|
||||
isInAnySet = true;
|
||||
}
|
||||
else if (currentFormat != null && currentFormat.hasErrata()) {
|
||||
int errataSetNo = library.getErrataSet(setNo);
|
||||
if (blueprintId.startsWith(errataSetNo + "_") || library.hasAlternateInSet(blueprintId, String.valueOf(errataSetNo))) {
|
||||
isInAnySet = true;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (blueprintId.startsWith(set + "_") || library.hasAlternateInSet(blueprintId, set)) {
|
||||
isInAnySet = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -248,6 +248,11 @@ public class DefaultLotroFormat implements LotroFormat {
|
||||
return Collections.unmodifiableList(_limit3Cards);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasErrata() {
|
||||
return !_errataCardMap.isEmpty();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String,String> getErrataCardMap() {
|
||||
return Collections.unmodifiableMap(_errataCardMap);
|
||||
|
||||
@@ -0,0 +1,135 @@
|
||||
|
||||
package com.gempukku.lotro.cards.unofficial.pc.vsets.set_v01;
|
||||
|
||||
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.assertEquals;
|
||||
import static org.junit.Assert.assertTrue;
|
||||
|
||||
public class Card_V1_019_Tests
|
||||
{
|
||||
|
||||
protected GenericCardTestHelper GetScenario() throws CardNotFoundException, DecisionResultInvalidException {
|
||||
return new GenericCardTestHelper(
|
||||
new HashMap<>() {{
|
||||
put("aragorn", "101_19");
|
||||
put("elrond", "1_40");
|
||||
put("galadriel", "1_45");
|
||||
put("celeborn", "1_34");
|
||||
put("orophin", "1_56");
|
||||
put("defiance", "1_37");
|
||||
|
||||
put("runner", "1_178");
|
||||
}},
|
||||
GenericCardTestHelper.FellowshipSites,
|
||||
GenericCardTestHelper.FOTRFrodo,
|
||||
GenericCardTestHelper.RulingRing
|
||||
);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void AragornStatsAndKeywordsAreCorrect() throws DecisionResultInvalidException, CardNotFoundException {
|
||||
|
||||
/**
|
||||
* Set: V1
|
||||
* Title: *Aragorn, Estel
|
||||
* Side: Free Peoples
|
||||
* Culture: gondor
|
||||
* Twilight Cost: 4
|
||||
* Type: companion
|
||||
* Subtype: Man
|
||||
* Strength: 8
|
||||
* Vitality: 4
|
||||
* Signet: Gandalf
|
||||
* Game Text: When you play Aragorn, you may take an [elven] ally with a twilight cost of 2 or less into hand from your draw deck.
|
||||
* Skirmish: Discard an [elven] skirmish event from hand to make Aragorn strength +2.
|
||||
*/
|
||||
|
||||
//Pre-game setup
|
||||
GenericCardTestHelper scn = GetScenario();
|
||||
|
||||
PhysicalCardImpl aragorn = scn.GetFreepsCard("aragorn");
|
||||
|
||||
assertTrue(aragorn.getBlueprint().isUnique());
|
||||
assertEquals(Side.FREE_PEOPLE, aragorn.getBlueprint().getSide());
|
||||
assertEquals(Culture.GONDOR, aragorn.getBlueprint().getCulture());
|
||||
assertEquals(CardType.COMPANION, aragorn.getBlueprint().getCardType());
|
||||
assertEquals(Race.MAN, aragorn.getBlueprint().getRace());
|
||||
//assertTrue(scn.HasKeyword(aragorn, Keyword.SUPPORT_AREA)); // test for keywords as needed
|
||||
assertEquals(4, aragorn.getBlueprint().getTwilightCost());
|
||||
assertEquals(8, aragorn.getBlueprint().getStrength());
|
||||
assertEquals(4, aragorn.getBlueprint().getVitality());
|
||||
//assertEquals(, aragorn.getBlueprint().getResistance());
|
||||
assertEquals(Signet.GANDALF, aragorn.getBlueprint().getSignet());
|
||||
//assertEquals(, aragorn.getBlueprint().getSiteNumber()); // Change this to getAllyHomeSiteNumbers for allies
|
||||
|
||||
}
|
||||
|
||||
@Test
|
||||
public void OnPlayTutorsAnElvenAllyOfCost2OrLess() throws DecisionResultInvalidException, CardNotFoundException {
|
||||
//Pre-game setup
|
||||
GenericCardTestHelper scn = GetScenario();
|
||||
|
||||
PhysicalCardImpl aragorn = scn.GetFreepsCard("aragorn");
|
||||
PhysicalCardImpl elrond = scn.GetFreepsCard("elrond");
|
||||
PhysicalCardImpl galadriel = scn.GetFreepsCard("galadriel");
|
||||
PhysicalCardImpl celeborn = scn.GetFreepsCard("celeborn");
|
||||
PhysicalCardImpl orophin = scn.GetFreepsCard("orophin");
|
||||
|
||||
scn.FreepsMoveCardToHand(aragorn);
|
||||
|
||||
scn.StartGame();
|
||||
|
||||
scn.FreepsPlayCard(aragorn);
|
||||
assertTrue(scn.FreepsHasOptionalTriggerAvailable());
|
||||
scn.FreepsAcceptOptionalTrigger();
|
||||
assertEquals(2, scn.GetFreepsCardChoiceCount());
|
||||
assertEquals(Zone.DECK, orophin.getZone());
|
||||
assertEquals(0, scn.GetFreepsHandCount());
|
||||
assertEquals(6, scn.GetFreepsDeckCount());
|
||||
|
||||
scn.FreepsChooseCardBPFromSelection(orophin);
|
||||
assertEquals(Zone.HAND, orophin.getZone());
|
||||
assertEquals(1, scn.GetFreepsHandCount());
|
||||
assertEquals(5, scn.GetFreepsDeckCount());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void SkirmishAbilityDiscardsElvenEventToPumpAragorn() throws DecisionResultInvalidException, CardNotFoundException {
|
||||
//Pre-game setup
|
||||
GenericCardTestHelper scn = GetScenario();
|
||||
|
||||
PhysicalCardImpl aragorn = scn.GetFreepsCard("aragorn");
|
||||
PhysicalCardImpl defiance = scn.GetFreepsCard("defiance");
|
||||
|
||||
scn.FreepsMoveCharToTable(aragorn);
|
||||
scn.FreepsMoveCardToHand(defiance);
|
||||
|
||||
PhysicalCardImpl runner = scn.GetShadowCard("runner");
|
||||
|
||||
scn.ShadowMoveCharToTable(runner);
|
||||
|
||||
scn.StartGame();
|
||||
|
||||
scn.SkipToPhase(Phase.ASSIGNMENT);
|
||||
scn.PassCurrentPhaseActions();
|
||||
scn.FreepsAssignToMinions(aragorn, runner);
|
||||
scn.FreepsResolveSkirmish(aragorn);
|
||||
|
||||
assertTrue(scn.FreepsActionAvailable(aragorn));
|
||||
assertEquals(Zone.HAND, defiance.getZone());
|
||||
assertEquals(8, scn.GetStrength(aragorn));
|
||||
|
||||
scn.FreepsUseCardAction(aragorn);
|
||||
assertEquals(Zone.DISCARD, defiance.getZone());
|
||||
assertEquals(10, scn.GetStrength(aragorn));
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,3 @@
|
||||
|
||||
package com.gempukku.lotro.cards.unofficial.pc.vsets.set_v01;
|
||||
|
||||
import com.gempukku.lotro.cards.GenericCardTestHelper;
|
||||
@@ -10,8 +9,7 @@ import org.junit.Test;
|
||||
|
||||
import java.util.HashMap;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.assertTrue;
|
||||
import static org.junit.Assert.*;
|
||||
|
||||
public class Card_V1_019_Tests
|
||||
{
|
||||
@@ -20,6 +18,7 @@ public class Card_V1_019_Tests
|
||||
return new GenericCardTestHelper(
|
||||
new HashMap<>() {{
|
||||
put("aragorn", "101_19");
|
||||
put("arwen", "1_30");
|
||||
put("elrond", "1_40");
|
||||
put("galadriel", "1_45");
|
||||
put("celeborn", "1_34");
|
||||
@@ -38,50 +37,49 @@ public class Card_V1_019_Tests
|
||||
public void AragornStatsAndKeywordsAreCorrect() throws DecisionResultInvalidException, CardNotFoundException {
|
||||
|
||||
/**
|
||||
* Set: V1
|
||||
* Title: *Aragorn, Estel
|
||||
* Side: Free Peoples
|
||||
* Culture: gondor
|
||||
* Twilight Cost: 4
|
||||
* Type: companion
|
||||
* Subtype: Man
|
||||
* Strength: 8
|
||||
* Vitality: 4
|
||||
* Signet: Gandalf
|
||||
* Game Text: When you play Aragorn, you may take an [elven] ally with a twilight cost of 2 or less into hand from your draw deck.
|
||||
* Skirmish: Discard an [elven] skirmish event from hand to make Aragorn strength +2.
|
||||
* Set: V1
|
||||
* Name: Aragorn, Estel
|
||||
* Unique: True
|
||||
* Side: Free Peoples
|
||||
* Culture: Gondor
|
||||
* Twilight Cost: 4
|
||||
* Type: Companion
|
||||
* Subtype: Man
|
||||
* Strength: 8
|
||||
* Vitality: 4
|
||||
* Signet: Gandalf
|
||||
* Game Text: When you play Aragorn, you may take an Elf with a twilight cost of 2 or less into hand from your draw deck.
|
||||
* Maneuver: Discard an [elven] card from hand to make Aragorn <b>damage +1</b>, <b>archer</b>, or strength +2 until the regroup phase.
|
||||
*/
|
||||
|
||||
//Pre-game setup
|
||||
GenericCardTestHelper scn = GetScenario();
|
||||
var scn = GetScenario();
|
||||
|
||||
PhysicalCardImpl aragorn = scn.GetFreepsCard("aragorn");
|
||||
|
||||
assertTrue(aragorn.getBlueprint().isUnique());
|
||||
assertEquals(Side.FREE_PEOPLE, aragorn.getBlueprint().getSide());
|
||||
assertEquals(Culture.GONDOR, aragorn.getBlueprint().getCulture());
|
||||
assertEquals(CardType.COMPANION, aragorn.getBlueprint().getCardType());
|
||||
assertEquals(Race.MAN, aragorn.getBlueprint().getRace());
|
||||
//assertTrue(scn.HasKeyword(aragorn, Keyword.SUPPORT_AREA)); // test for keywords as needed
|
||||
assertEquals(4, aragorn.getBlueprint().getTwilightCost());
|
||||
assertEquals(8, aragorn.getBlueprint().getStrength());
|
||||
assertEquals(4, aragorn.getBlueprint().getVitality());
|
||||
//assertEquals(, aragorn.getBlueprint().getResistance());
|
||||
assertEquals(Signet.GANDALF, aragorn.getBlueprint().getSignet());
|
||||
//assertEquals(, aragorn.getBlueprint().getSiteNumber()); // Change this to getAllyHomeSiteNumbers for allies
|
||||
var card = scn.GetFreepsCard("aragorn");
|
||||
|
||||
assertEquals("Aragorn", card.getBlueprint().getTitle());
|
||||
assertEquals("Estel", card.getBlueprint().getSubtitle());
|
||||
assertTrue(card.getBlueprint().isUnique());
|
||||
assertEquals(Side.FREE_PEOPLE, card.getBlueprint().getSide());
|
||||
assertEquals(Culture.GONDOR, card.getBlueprint().getCulture());
|
||||
assertEquals(CardType.COMPANION, card.getBlueprint().getCardType());
|
||||
assertEquals(Race.MAN, card.getBlueprint().getRace());
|
||||
assertEquals(4, card.getBlueprint().getTwilightCost());
|
||||
assertEquals(8, card.getBlueprint().getStrength());
|
||||
assertEquals(4, card.getBlueprint().getVitality());
|
||||
assertEquals(Signet.GANDALF, card.getBlueprint().getSignet());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void OnPlayTutorsAnElvenAllyOfCost2OrLess() throws DecisionResultInvalidException, CardNotFoundException {
|
||||
//@Test
|
||||
public void OnPlayTutorsAnElfOfCost2OrLess() throws DecisionResultInvalidException, CardNotFoundException {
|
||||
//Pre-game setup
|
||||
GenericCardTestHelper scn = GetScenario();
|
||||
var scn = GetScenario();
|
||||
|
||||
PhysicalCardImpl aragorn = scn.GetFreepsCard("aragorn");
|
||||
PhysicalCardImpl elrond = scn.GetFreepsCard("elrond");
|
||||
PhysicalCardImpl galadriel = scn.GetFreepsCard("galadriel");
|
||||
PhysicalCardImpl celeborn = scn.GetFreepsCard("celeborn");
|
||||
PhysicalCardImpl orophin = scn.GetFreepsCard("orophin");
|
||||
var aragorn = scn.GetFreepsCard("aragorn");
|
||||
var arwen = scn.GetFreepsCard("arwen");
|
||||
var elrond = scn.GetFreepsCard("elrond");
|
||||
var galadriel = scn.GetFreepsCard("galadriel");
|
||||
var celeborn = scn.GetFreepsCard("celeborn");
|
||||
var orophin = scn.GetFreepsCard("orophin");
|
||||
|
||||
scn.FreepsMoveCardToHand(aragorn);
|
||||
|
||||
@@ -90,7 +88,9 @@ public class Card_V1_019_Tests
|
||||
scn.FreepsPlayCard(aragorn);
|
||||
assertTrue(scn.FreepsHasOptionalTriggerAvailable());
|
||||
scn.FreepsAcceptOptionalTrigger();
|
||||
assertEquals(2, scn.GetFreepsCardChoiceCount());
|
||||
|
||||
//Orophin, Celeborn, or Arwen, but not Elrond (4) or Galadriel (3)
|
||||
assertEquals(3, scn.GetFreepsCardChoiceCount());
|
||||
assertEquals(Zone.DECK, orophin.getZone());
|
||||
assertEquals(0, scn.GetFreepsHandCount());
|
||||
assertEquals(6, scn.GetFreepsDeckCount());
|
||||
@@ -101,23 +101,28 @@ public class Card_V1_019_Tests
|
||||
assertEquals(5, scn.GetFreepsDeckCount());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void SkirmishAbilityDiscardsElvenEventToPumpAragorn() throws DecisionResultInvalidException, CardNotFoundException {
|
||||
//@Test
|
||||
public void ManeuverAbilityCanDiscardsElvenCardToPumpAragornUntilRegroup() throws DecisionResultInvalidException, CardNotFoundException {
|
||||
//Pre-game setup
|
||||
GenericCardTestHelper scn = GetScenario();
|
||||
var scn = GetScenario();
|
||||
|
||||
PhysicalCardImpl aragorn = scn.GetFreepsCard("aragorn");
|
||||
PhysicalCardImpl defiance = scn.GetFreepsCard("defiance");
|
||||
var aragorn = scn.GetFreepsCard("aragorn");
|
||||
var defiance = scn.GetFreepsCard("defiance");
|
||||
var arwen = scn.GetFreepsCard("arwen");
|
||||
|
||||
scn.FreepsMoveCharToTable(aragorn);
|
||||
scn.FreepsMoveCardToHand(defiance);
|
||||
scn.FreepsMoveCardToHand(defiance, arwen);
|
||||
|
||||
PhysicalCardImpl runner = scn.GetShadowCard("runner");
|
||||
var runner = scn.GetShadowCard("runner");
|
||||
|
||||
scn.ShadowMoveCharToTable(runner);
|
||||
|
||||
scn.StartGame();
|
||||
|
||||
scn.SkipToPhase(Phase.MANEUVER);
|
||||
|
||||
assertTrue(scn.FreepsActionAvailable(aragorn));
|
||||
|
||||
scn.SkipToPhase(Phase.ASSIGNMENT);
|
||||
scn.PassCurrentPhaseActions();
|
||||
scn.FreepsAssignToMinions(aragorn, runner);
|
||||
|
||||
@@ -1,140 +0,0 @@
|
||||
package com.gempukku.lotro.cards.unofficial.pc.vsets.set_v01;
|
||||
|
||||
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_V1_019_Tests
|
||||
{
|
||||
|
||||
protected GenericCardTestHelper GetScenario() throws CardNotFoundException, DecisionResultInvalidException {
|
||||
return new GenericCardTestHelper(
|
||||
new HashMap<>() {{
|
||||
put("aragorn", "101_19");
|
||||
put("arwen", "1_30");
|
||||
put("elrond", "1_40");
|
||||
put("galadriel", "1_45");
|
||||
put("celeborn", "1_34");
|
||||
put("orophin", "1_56");
|
||||
put("defiance", "1_37");
|
||||
|
||||
put("runner", "1_178");
|
||||
}},
|
||||
GenericCardTestHelper.FellowshipSites,
|
||||
GenericCardTestHelper.FOTRFrodo,
|
||||
GenericCardTestHelper.RulingRing
|
||||
);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void AragornStatsAndKeywordsAreCorrect() throws DecisionResultInvalidException, CardNotFoundException {
|
||||
|
||||
/**
|
||||
* Set: V1
|
||||
* Name: Aragorn, Estel
|
||||
* Unique: True
|
||||
* Side: Free Peoples
|
||||
* Culture: Gondor
|
||||
* Twilight Cost: 4
|
||||
* Type: Companion
|
||||
* Subtype: Man
|
||||
* Strength: 8
|
||||
* Vitality: 4
|
||||
* Signet: Gandalf
|
||||
* Game Text: When you play Aragorn, you may take an Elf with a twilight cost of 2 or less into hand from your draw deck.
|
||||
* Maneuver: Discard an [elven] card from hand to make Aragorn <b>damage +1</b>, <b>archer</b>, or strength +2 until the regroup phase.
|
||||
*/
|
||||
|
||||
var scn = GetScenario();
|
||||
|
||||
var card = scn.GetFreepsCard("aragorn");
|
||||
|
||||
assertEquals("Aragorn", card.getBlueprint().getTitle());
|
||||
assertEquals("Estel", card.getBlueprint().getSubtitle());
|
||||
assertTrue(card.getBlueprint().isUnique());
|
||||
assertEquals(Side.FREE_PEOPLE, card.getBlueprint().getSide());
|
||||
assertEquals(Culture.GONDOR, card.getBlueprint().getCulture());
|
||||
assertEquals(CardType.COMPANION, card.getBlueprint().getCardType());
|
||||
assertEquals(Race.MAN, card.getBlueprint().getRace());
|
||||
assertEquals(4, card.getBlueprint().getTwilightCost());
|
||||
assertEquals(8, card.getBlueprint().getStrength());
|
||||
assertEquals(4, card.getBlueprint().getVitality());
|
||||
assertEquals(Signet.GANDALF, card.getBlueprint().getSignet());
|
||||
}
|
||||
|
||||
//@Test
|
||||
public void OnPlayTutorsAnElfOfCost2OrLess() throws DecisionResultInvalidException, CardNotFoundException {
|
||||
//Pre-game setup
|
||||
var scn = GetScenario();
|
||||
|
||||
var aragorn = scn.GetFreepsCard("aragorn");
|
||||
var arwen = scn.GetFreepsCard("arwen");
|
||||
var elrond = scn.GetFreepsCard("elrond");
|
||||
var galadriel = scn.GetFreepsCard("galadriel");
|
||||
var celeborn = scn.GetFreepsCard("celeborn");
|
||||
var orophin = scn.GetFreepsCard("orophin");
|
||||
|
||||
scn.FreepsMoveCardToHand(aragorn);
|
||||
|
||||
scn.StartGame();
|
||||
|
||||
scn.FreepsPlayCard(aragorn);
|
||||
assertTrue(scn.FreepsHasOptionalTriggerAvailable());
|
||||
scn.FreepsAcceptOptionalTrigger();
|
||||
|
||||
//Orophin, Celeborn, or Arwen, but not Elrond (4) or Galadriel (3)
|
||||
assertEquals(3, scn.GetFreepsCardChoiceCount());
|
||||
assertEquals(Zone.DECK, orophin.getZone());
|
||||
assertEquals(0, scn.GetFreepsHandCount());
|
||||
assertEquals(6, scn.GetFreepsDeckCount());
|
||||
|
||||
scn.FreepsChooseCardBPFromSelection(orophin);
|
||||
assertEquals(Zone.HAND, orophin.getZone());
|
||||
assertEquals(1, scn.GetFreepsHandCount());
|
||||
assertEquals(5, scn.GetFreepsDeckCount());
|
||||
}
|
||||
|
||||
//@Test
|
||||
public void ManeuverAbilityCanDiscardsElvenCardToPumpAragornUntilRegroup() throws DecisionResultInvalidException, CardNotFoundException {
|
||||
//Pre-game setup
|
||||
var scn = GetScenario();
|
||||
|
||||
var aragorn = scn.GetFreepsCard("aragorn");
|
||||
var defiance = scn.GetFreepsCard("defiance");
|
||||
var arwen = scn.GetFreepsCard("arwen");
|
||||
|
||||
scn.FreepsMoveCharToTable(aragorn);
|
||||
scn.FreepsMoveCardToHand(defiance, arwen);
|
||||
|
||||
var runner = scn.GetShadowCard("runner");
|
||||
|
||||
scn.ShadowMoveCharToTable(runner);
|
||||
|
||||
scn.StartGame();
|
||||
|
||||
scn.SkipToPhase(Phase.MANEUVER);
|
||||
|
||||
assertTrue(scn.FreepsActionAvailable(aragorn));
|
||||
|
||||
scn.SkipToPhase(Phase.ASSIGNMENT);
|
||||
scn.PassCurrentPhaseActions();
|
||||
scn.FreepsAssignToMinions(aragorn, runner);
|
||||
scn.FreepsResolveSkirmish(aragorn);
|
||||
|
||||
assertTrue(scn.FreepsActionAvailable(aragorn));
|
||||
assertEquals(Zone.HAND, defiance.getZone());
|
||||
assertEquals(8, scn.GetStrength(aragorn));
|
||||
|
||||
scn.FreepsUseCardAction(aragorn);
|
||||
assertEquals(Zone.DISCARD, defiance.getZone());
|
||||
assertEquals(10, scn.GetStrength(aragorn));
|
||||
|
||||
}
|
||||
}
|
||||
@@ -100,7 +100,7 @@ public class Card_V1_020_Tests
|
||||
}
|
||||
|
||||
@Test
|
||||
public void AssignmentActionExertsAragornSignetToMakeBoromirDefenderPlus1() throws DecisionResultInvalidException, CardNotFoundException {
|
||||
public void AssignmentActionSpotsAragornSignetToMakeBoromirDefenderPlus1() throws DecisionResultInvalidException, CardNotFoundException {
|
||||
//Pre-game setup
|
||||
GenericCardTestHelper scn = GetScenario();
|
||||
|
||||
@@ -121,7 +121,7 @@ public class Card_V1_020_Tests
|
||||
scn.FreepsAcceptOptionalTrigger();
|
||||
assertTrue(scn.hasKeyword(boromir, Keyword.DEFENDER));
|
||||
assertEquals(1, scn.GetKeywordCount(boromir, Keyword.DEFENDER));
|
||||
assertEquals(1, scn.GetWoundsOn(sam));
|
||||
assertEquals(0, scn.GetWoundsOn(sam));
|
||||
|
||||
scn.PassCurrentPhaseActions();
|
||||
scn.FreepsAssignToMinions(boromir, nelya);
|
||||
|
||||
@@ -0,0 +1,135 @@
|
||||
|
||||
package com.gempukku.lotro.cards.unofficial.pc.vsets.set_v01;
|
||||
|
||||
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.assertEquals;
|
||||
import static org.junit.Assert.assertFalse;
|
||||
import static org.junit.Assert.assertTrue;
|
||||
|
||||
public class Card_V1_020_Tests
|
||||
{
|
||||
|
||||
protected GenericCardTestHelper GetScenario() throws CardNotFoundException, DecisionResultInvalidException {
|
||||
return new GenericCardTestHelper(
|
||||
new HashMap<>() {{
|
||||
put("boromir", "101_20");
|
||||
put("sam", "1_311");
|
||||
|
||||
put("runner1", "1_178");
|
||||
put("runner2", "1_178");
|
||||
put("runner3", "1_178");
|
||||
put("nelya", "1_233");
|
||||
}},
|
||||
GenericCardTestHelper.FellowshipSites,
|
||||
GenericCardTestHelper.FOTRFrodo,
|
||||
GenericCardTestHelper.RulingRing
|
||||
);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void BoromirStatsAndKeywordsAreCorrect() throws DecisionResultInvalidException, CardNotFoundException {
|
||||
|
||||
/**
|
||||
* Set: V1
|
||||
* Title: *Boromir, Redeemed
|
||||
* Side: Free Peoples
|
||||
* Culture: gondor
|
||||
* Twilight Cost: 3
|
||||
* Type: companion
|
||||
* Subtype: Man
|
||||
* Strength: 5
|
||||
* Vitality: 3
|
||||
* Signet: Aragorn
|
||||
* Game Text: Boromir is strength +2 for each minion he is skirmishing.
|
||||
* At the start of the assignment phase, you may exert another companion with the Aragorn signet to make Boromir defender +1 until the regroup phase.
|
||||
*/
|
||||
|
||||
//Pre-game setup
|
||||
GenericCardTestHelper scn = GetScenario();
|
||||
|
||||
PhysicalCardImpl boromir = scn.GetFreepsCard("boromir");
|
||||
|
||||
assertTrue(boromir.getBlueprint().isUnique());
|
||||
assertEquals(Side.FREE_PEOPLE, boromir.getBlueprint().getSide());
|
||||
assertEquals(Culture.GONDOR, boromir.getBlueprint().getCulture());
|
||||
assertEquals(CardType.COMPANION, boromir.getBlueprint().getCardType());
|
||||
assertEquals(Race.MAN, boromir.getBlueprint().getRace());
|
||||
//assertTrue(scn.HasKeyword(boromir, Keyword.SUPPORT_AREA)); // test for keywords as needed
|
||||
assertEquals(3, boromir.getBlueprint().getTwilightCost());
|
||||
assertEquals(5, boromir.getBlueprint().getStrength());
|
||||
assertEquals(3, boromir.getBlueprint().getVitality());
|
||||
//assertEquals(, boromir.getBlueprint().getResistance());
|
||||
assertEquals(Signet.ARAGORN, boromir.getBlueprint().getSignet());
|
||||
//assertEquals(, boromir.getBlueprint().getSiteNumber()); // Change this to getAllyHomeSiteNumbers for allies
|
||||
|
||||
}
|
||||
|
||||
@Test
|
||||
public void BoromirIsStrengthPlus2PerMinionHeIsSkirmishing() throws DecisionResultInvalidException, CardNotFoundException {
|
||||
//Pre-game setup
|
||||
GenericCardTestHelper scn = GetScenario();
|
||||
|
||||
PhysicalCardImpl boromir = scn.GetFreepsCard("boromir");
|
||||
scn.FreepsMoveCharToTable(boromir);
|
||||
|
||||
PhysicalCardImpl runner1 = scn.GetShadowCard("runner1");
|
||||
PhysicalCardImpl runner2 = scn.GetShadowCard("runner2");
|
||||
PhysicalCardImpl runner3 = scn.GetShadowCard("runner3");
|
||||
scn.ShadowMoveCharToTable(runner1, runner2, runner3);
|
||||
|
||||
scn.StartGame();
|
||||
|
||||
scn.SkipToPhase(Phase.ASSIGNMENT);
|
||||
scn.PassCurrentPhaseActions();
|
||||
|
||||
assertEquals(5, scn.GetStrength(boromir));
|
||||
scn.FreepsAssignToMinions(boromir, runner1);
|
||||
scn.ShadowAssignToMinions(boromir, runner2, runner3);
|
||||
|
||||
scn.FreepsResolveSkirmish(boromir);
|
||||
|
||||
assertEquals(11, scn.GetStrength(boromir));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void AssignmentActionExertsAragornSignetToMakeBoromirDefenderPlus1() throws DecisionResultInvalidException, CardNotFoundException {
|
||||
//Pre-game setup
|
||||
GenericCardTestHelper scn = GetScenario();
|
||||
|
||||
PhysicalCardImpl boromir = scn.GetFreepsCard("boromir");
|
||||
PhysicalCardImpl sam = scn.GetFreepsCard("sam");
|
||||
scn.FreepsMoveCharToTable(boromir, sam);
|
||||
|
||||
PhysicalCardImpl nelya = scn.GetShadowCard("nelya");
|
||||
scn.ShadowMoveCharToTable(nelya);
|
||||
|
||||
scn.StartGame();
|
||||
|
||||
scn.SkipToPhase(Phase.ASSIGNMENT);
|
||||
assertTrue(scn.FreepsHasOptionalTriggerAvailable());
|
||||
assertFalse(scn.hasKeyword(boromir, Keyword.DEFENDER));
|
||||
assertEquals(0, scn.GetWoundsOn(sam));
|
||||
|
||||
scn.FreepsAcceptOptionalTrigger();
|
||||
assertTrue(scn.hasKeyword(boromir, Keyword.DEFENDER));
|
||||
assertEquals(1, scn.GetKeywordCount(boromir, Keyword.DEFENDER));
|
||||
assertEquals(1, scn.GetWoundsOn(sam));
|
||||
|
||||
scn.PassCurrentPhaseActions();
|
||||
scn.FreepsAssignToMinions(boromir, nelya);
|
||||
scn.FreepsResolveSkirmish(boromir);
|
||||
scn.PassCurrentPhaseActions();
|
||||
|
||||
assertEquals(Phase.ASSIGNMENT, scn.GetCurrentPhase());
|
||||
assertTrue(scn.hasKeyword(boromir, Keyword.DEFENDER));
|
||||
assertEquals(1, scn.GetKeywordCount(boromir, Keyword.DEFENDER));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user