Finished up revamp for all Gandalf cards in set V1
This commit is contained in:
@@ -234,7 +234,7 @@
|
||||
}
|
||||
},
|
||||
"151_18": {
|
||||
"title": "The White Council",
|
||||
"title": "*The White Council",
|
||||
"culture": "gandalf",
|
||||
"cost": 1,
|
||||
"type": "condition",
|
||||
@@ -243,44 +243,56 @@
|
||||
{
|
||||
"type": "modifier",
|
||||
"modifier": {
|
||||
"type": "modifyStrength",
|
||||
"condition": {
|
||||
"type": "canspot",
|
||||
"filter": "name(Saruman)"
|
||||
},
|
||||
"filter": "name(Gandalf)",
|
||||
"amount": -1
|
||||
"type": "SarumanFirstSentenceInactive",
|
||||
"condition": [
|
||||
{
|
||||
"type": "canspot",
|
||||
"filter": "name(Gandalf)"
|
||||
},
|
||||
{
|
||||
"type": "canspot",
|
||||
"filter": "culture(elven),ally",
|
||||
"count": 2
|
||||
}
|
||||
],
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "activated",
|
||||
"phase": "skirmish",
|
||||
"condition": {
|
||||
"type": "perPhaseLimit",
|
||||
"limit": 3
|
||||
},
|
||||
"phase": "regroup",
|
||||
"condition": [
|
||||
{
|
||||
"type": "perPhaseLimit",
|
||||
"limit": 2
|
||||
},
|
||||
{
|
||||
"type": "canSpot",
|
||||
"count": 2,
|
||||
"filter": "culture(elven),not(exhausted)"
|
||||
}
|
||||
],
|
||||
"cost": {
|
||||
"type": "exert",
|
||||
"filter": "choose(name(Gandalf))"
|
||||
"filter": "choose(culture(elven),ally)",
|
||||
"count": 2
|
||||
},
|
||||
"effect": [
|
||||
{
|
||||
"type": "modifyStrength",
|
||||
"filter": "choose(or(culture(gandalf),culture(elven)),companion)",
|
||||
"amount": {
|
||||
"type": "forEachYouCanSpot",
|
||||
"filter": "culture(elven),ally",
|
||||
"limit": 3
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "incrementPerPhaseLimit",
|
||||
"limit": {
|
||||
"type": "forEachYouCanSpot",
|
||||
"filter": "culture(elven),ally",
|
||||
}
|
||||
},
|
||||
]
|
||||
"effect": {
|
||||
"type": "conditional",
|
||||
"condition": {
|
||||
"type": "perPhaseLimit",
|
||||
"limit": 2
|
||||
},
|
||||
"effect": [
|
||||
{
|
||||
"type": "incrementPerPhaseLimit",
|
||||
"limit": 1
|
||||
},
|
||||
{
|
||||
"type": "heal",
|
||||
"filter": "choose(companion,or(name(Gandalf),signet(gandalf)))"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
package com.gempukku.lotro.cards.build.field.effect.modifier;
|
||||
|
||||
import com.gempukku.lotro.cards.build.CardGenerationEnvironment;
|
||||
import com.gempukku.lotro.cards.build.InvalidCardDefinitionException;
|
||||
import com.gempukku.lotro.cards.build.ModifierSource;
|
||||
import com.gempukku.lotro.cards.build.*;
|
||||
import com.gempukku.lotro.cards.build.field.FieldUtils;
|
||||
import com.gempukku.lotro.logic.modifiers.Modifier;
|
||||
import com.gempukku.lotro.logic.modifiers.ModifierFlag;
|
||||
import com.gempukku.lotro.logic.modifiers.SpecialFlagModifier;
|
||||
import org.json.simple.JSONObject;
|
||||
@@ -11,8 +10,17 @@ import org.json.simple.JSONObject;
|
||||
public class SarumanFirstSentenceInactive implements ModifierSourceProducer {
|
||||
@Override
|
||||
public ModifierSource getModifierSource(JSONObject object, CardGenerationEnvironment environment) throws InvalidCardDefinitionException {
|
||||
FieldUtils.validateAllowedFields(object);
|
||||
FieldUtils.validateAllowedFields(object,"condition");
|
||||
|
||||
return actionContext -> new SpecialFlagModifier(actionContext.getSource(), ModifierFlag.SARUMAN_FIRST_SENTENCE_INACTIVE);
|
||||
final JSONObject[] conditionArray = FieldUtils.getObjectArray(object.get("condition"), "condition");
|
||||
final Requirement[] requirements = environment.getRequirementFactory().getRequirements(conditionArray, environment);
|
||||
|
||||
return new ModifierSource() {
|
||||
@Override
|
||||
public Modifier getModifier(ActionContext actionContext) {
|
||||
return new SpecialFlagModifier(actionContext.getSource(),
|
||||
new RequirementCondition(requirements, actionContext), ModifierFlag.SARUMAN_FIRST_SENTENCE_INACTIVE);
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,6 +3,7 @@ package com.gempukku.lotro.cards;
|
||||
import com.gempukku.lotro.at.AbstractAtTest;
|
||||
import com.gempukku.lotro.common.Keyword;
|
||||
import com.gempukku.lotro.common.Phase;
|
||||
import com.gempukku.lotro.common.Side;
|
||||
import com.gempukku.lotro.common.Zone;
|
||||
import com.gempukku.lotro.game.CardNotFoundException;
|
||||
import com.gempukku.lotro.game.PhysicalCard;
|
||||
@@ -653,6 +654,18 @@ public class GenericCardTestHelper extends AbstractAtTest {
|
||||
return _game.getModifiersQuerying().getKeywordCount(_game, card, keyword);
|
||||
}
|
||||
|
||||
public Boolean CanBeAssigned(PhysicalCardImpl card)
|
||||
{
|
||||
return CanBeAssigned(card, Side.SHADOW) || CanBeAssigned(card, Side.FREE_PEOPLE);
|
||||
}
|
||||
|
||||
public Boolean CanBeAssigned(PhysicalCardImpl card, Side side)
|
||||
{
|
||||
return _game.getModifiersQuerying().canBeAssignedToSkirmish(_game, side, card);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public void ApplyAdHocModifier(Modifier mod)
|
||||
{
|
||||
|
||||
@@ -72,7 +72,7 @@ public class Card_V1_015_Tests
|
||||
assertEquals(2, gwaihir.getBlueprint().getVitality());
|
||||
//assertEquals(, gwaihir.getBlueprint().getResistance());
|
||||
//assertEquals(Signet., gwaihir.getBlueprint().getSignet());
|
||||
assertEquals(4, gwaihir.getBlueprint().getAllyHomeSiteNumbers()); // Change this to getAllyHomeSiteNumbers for allies
|
||||
assertEquals(4, gwaihir.getBlueprint().getAllyHomeSiteNumbers()[0]); // Change this to getAllyHomeSiteNumbers for allies
|
||||
|
||||
}
|
||||
|
||||
@@ -91,8 +91,9 @@ public class Card_V1_015_Tests
|
||||
scn.FreepsPlayCard(gandalf);
|
||||
assertTrue(scn.FreepsCardPlayAvailable(gwaihir));
|
||||
|
||||
scn.FreepsPlayCard(gwaihir);
|
||||
assertEquals(4, scn.GetTwilight());
|
||||
scn.FreepsPlayCard(gwaihir);
|
||||
assertEquals(8, scn.GetTwilight());
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
@@ -22,8 +22,13 @@ public class Card_V1_016_Tests
|
||||
return new GenericCardTestHelper(
|
||||
new HashMap<String, String>()
|
||||
{{
|
||||
put("card", "151_16");
|
||||
// put other cards in here as needed for the test case
|
||||
put("myheart", "151_16");
|
||||
put("gandalf", "1_364");
|
||||
put("greenleaf", "1_50");
|
||||
|
||||
put("runner1", "1_178");
|
||||
put("runner2", "1_178");
|
||||
put("runner3", "1_178");
|
||||
}},
|
||||
GenericCardTestHelper.FellowshipSites,
|
||||
GenericCardTestHelper.FOTRFrodo,
|
||||
@@ -31,9 +36,7 @@ public class Card_V1_016_Tests
|
||||
);
|
||||
}
|
||||
|
||||
// Uncomment both @Test markers below once this is ready to be used
|
||||
|
||||
//@Test
|
||||
@Test
|
||||
public void MyHeartTellsMeStatsAndKeywordsAreCorrect() throws DecisionResultInvalidException, CardNotFoundException {
|
||||
|
||||
/**
|
||||
@@ -50,34 +53,92 @@ public class Card_V1_016_Tests
|
||||
//Pre-game setup
|
||||
GenericCardTestHelper scn = GetScenario();
|
||||
|
||||
PhysicalCardImpl card = scn.GetFreepsCard("card");
|
||||
PhysicalCardImpl myheart = scn.GetFreepsCard("myheart");
|
||||
|
||||
assertTrue(card.getBlueprint().isUnique());
|
||||
assertEquals(Side.FREE_PEOPLE, card.getBlueprint().getSide());
|
||||
assertEquals(Culture.GANDALF, card.getBlueprint().getCulture());
|
||||
assertEquals(CardType.CONDITION, card.getBlueprint().getCardType());
|
||||
//assertEquals(Race.CREATURE, card.getBlueprint().getRace());
|
||||
assertTrue(scn.HasKeyword(card, Keyword.SUPPORT_AREA)); // test for keywords as needed
|
||||
assertEquals(1, card.getBlueprint().getTwilightCost());
|
||||
//assertEquals(, card.getBlueprint().getStrength());
|
||||
//assertEquals(, card.getBlueprint().getVitality());
|
||||
//assertEquals(, card.getBlueprint().getResistance());
|
||||
//assertEquals(Signet., card.getBlueprint().getSignet());
|
||||
//assertEquals(, card.getBlueprint().getSiteNumber()); // Change this to getAllyHomeSiteNumbers for allies
|
||||
assertTrue(myheart.getBlueprint().isUnique());
|
||||
assertEquals(Side.FREE_PEOPLE, myheart.getBlueprint().getSide());
|
||||
assertEquals(Culture.GANDALF, myheart.getBlueprint().getCulture());
|
||||
assertEquals(CardType.CONDITION, myheart.getBlueprint().getCardType());
|
||||
//assertEquals(Race.CREATURE, myheart.getBlueprint().getRace());
|
||||
assertTrue(scn.HasKeyword(myheart, Keyword.SUPPORT_AREA)); // test for keywords as needed
|
||||
assertEquals(1, myheart.getBlueprint().getTwilightCost());
|
||||
//assertEquals(, myheart.getBlueprint().getStrength());
|
||||
//assertEquals(, myheart.getBlueprint().getVitality());
|
||||
//assertEquals(, myheart.getBlueprint().getResistance());
|
||||
//assertEquals(Signet., myheart.getBlueprint().getSignet());
|
||||
//assertEquals(, myheart.getBlueprint().getSiteNumber()); // Change this to getAllyHomeSiteNumbers for allies
|
||||
|
||||
}
|
||||
|
||||
//@Test
|
||||
public void MyHeartTellsMeTest1() throws DecisionResultInvalidException, CardNotFoundException {
|
||||
@Test
|
||||
public void MyHeartSpotsGandalfToTrigger() throws DecisionResultInvalidException, CardNotFoundException {
|
||||
//Pre-game setup
|
||||
GenericCardTestHelper scn = GetScenario();
|
||||
|
||||
PhysicalCardImpl card = scn.GetFreepsCard("card");
|
||||
scn.FreepsMoveCardToHand(card);
|
||||
PhysicalCardImpl myheart = scn.GetFreepsCard("myheart");
|
||||
PhysicalCardImpl gandalf = scn.GetFreepsCard("gandalf");
|
||||
PhysicalCardImpl greenleaf = scn.GetFreepsCard("greenleaf");
|
||||
|
||||
scn.FreepsMoveCardToHand(gandalf);
|
||||
scn.FreepsMoveCharToTable(greenleaf);
|
||||
scn.FreepsMoveCardToSupportArea(myheart);
|
||||
|
||||
PhysicalCardImpl runner1 = scn.GetShadowCard("runner1");
|
||||
PhysicalCardImpl runner2 = scn.GetShadowCard("runner2");
|
||||
|
||||
scn.ShadowMoveCharToTable(runner1, runner2);
|
||||
|
||||
scn.StartGame();
|
||||
scn.FreepsPlayCard(card);
|
||||
scn.SkipToPhase(Phase.ARCHERY);
|
||||
|
||||
assertEquals(1, scn.GetTwilight());
|
||||
scn.FreepsUseCardAction(greenleaf);
|
||||
scn.FreepsChooseCard(runner1);
|
||||
assertFalse(scn.FreepsHasOptionalTriggerAvailable());
|
||||
|
||||
scn.FreepsMoveCharToTable(gandalf);
|
||||
scn.ShadowPassCurrentPhaseAction();
|
||||
scn.FreepsUseCardAction(greenleaf);
|
||||
//scn.FreepsChooseCard(runner2); //Only one choice, so it's made for us
|
||||
|
||||
assertTrue(scn.FreepsHasOptionalTriggerAvailable());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void MyHeartConvertsWoundToHealLimitOncePerTurn() throws DecisionResultInvalidException, CardNotFoundException {
|
||||
//Pre-game setup
|
||||
GenericCardTestHelper scn = GetScenario();
|
||||
|
||||
PhysicalCardImpl myheart = scn.GetFreepsCard("myheart");
|
||||
PhysicalCardImpl gandalf = scn.GetFreepsCard("gandalf");
|
||||
PhysicalCardImpl greenleaf = scn.GetFreepsCard("greenleaf");
|
||||
|
||||
scn.FreepsMoveCardToHand(gandalf);
|
||||
scn.FreepsMoveCharToTable(greenleaf, gandalf);
|
||||
scn.FreepsMoveCardToSupportArea(myheart);
|
||||
|
||||
PhysicalCardImpl runner1 = scn.GetShadowCard("runner1");
|
||||
PhysicalCardImpl runner2 = scn.GetShadowCard("runner2");
|
||||
|
||||
scn.ShadowMoveCharToTable(runner1, runner2);
|
||||
|
||||
scn.StartGame();
|
||||
scn.SkipToPhase(Phase.ARCHERY);
|
||||
|
||||
assertEquals(0, scn.GetWoundsOn(greenleaf));
|
||||
|
||||
scn.FreepsUseCardAction(greenleaf);
|
||||
scn.FreepsChooseCard(runner1);
|
||||
assertTrue(scn.FreepsHasOptionalTriggerAvailable());
|
||||
|
||||
assertEquals(1, scn.GetWoundsOn(greenleaf));
|
||||
scn.FreepsAcceptOptionalTrigger();
|
||||
assertEquals(0, scn.GetWoundsOn(greenleaf));
|
||||
|
||||
scn.ShadowPassCurrentPhaseAction();
|
||||
scn.FreepsUseCardAction(greenleaf);
|
||||
scn.FreepsChooseCard(runner1);
|
||||
|
||||
assertFalse(scn.FreepsHasOptionalTriggerAvailable());
|
||||
assertEquals(1, scn.GetWoundsOn(greenleaf));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -22,19 +22,23 @@ public class Card_V1_017_Tests
|
||||
return new GenericCardTestHelper(
|
||||
new HashMap<String, String>()
|
||||
{{
|
||||
put("card", "151_17");
|
||||
// put other cards in here as needed for the test case
|
||||
put("twoeyes", "151_17");
|
||||
put("gandalf", "151_14");
|
||||
put("frodo", "13_149");
|
||||
|
||||
put("filler1", "1_7");
|
||||
put("filler2", "1_7");
|
||||
put("filler3", "1_7");
|
||||
put("filler4", "1_7");
|
||||
}},
|
||||
GenericCardTestHelper.FellowshipSites,
|
||||
GenericCardTestHelper.FOTRFrodo,
|
||||
GenericCardTestHelper.GimliRB,
|
||||
GenericCardTestHelper.FOTRRing
|
||||
);
|
||||
}
|
||||
|
||||
// Uncomment both @Test markers below once this is ready to be used
|
||||
|
||||
//@Test
|
||||
public void TwoEyesasOftenasICanSpareThemStatsAndKeywordsAreCorrect() throws DecisionResultInvalidException, CardNotFoundException {
|
||||
@Test
|
||||
public void TwoEyesStatsAndKeywordsAreCorrect() throws DecisionResultInvalidException, CardNotFoundException {
|
||||
|
||||
/**
|
||||
* Set: V1
|
||||
@@ -51,34 +55,67 @@ public class Card_V1_017_Tests
|
||||
//Pre-game setup
|
||||
GenericCardTestHelper scn = GetScenario();
|
||||
|
||||
PhysicalCardImpl card = scn.GetFreepsCard("card");
|
||||
PhysicalCardImpl twoeyes = scn.GetFreepsCard("twoeyes");
|
||||
|
||||
assertFalse(card.getBlueprint().isUnique());
|
||||
assertEquals(Side.FREE_PEOPLE, card.getBlueprint().getSide());
|
||||
assertEquals(Culture.GANDALF, card.getBlueprint().getCulture());
|
||||
assertEquals(CardType.EVENT, card.getBlueprint().getCardType());
|
||||
//assertEquals(Race.CREATURE, card.getBlueprint().getRace());
|
||||
assertTrue(scn.HasKeyword(card, Keyword.SUPPORT_AREA)); // test for keywords as needed
|
||||
assertEquals(3, card.getBlueprint().getTwilightCost());
|
||||
//assertEquals(, card.getBlueprint().getStrength());
|
||||
//assertEquals(, card.getBlueprint().getVitality());
|
||||
//assertEquals(, card.getBlueprint().getResistance());
|
||||
//assertEquals(Signet., card.getBlueprint().getSignet());
|
||||
//assertEquals(, card.getBlueprint().getSiteNumber()); // Change this to getAllyHomeSiteNumbers for allies
|
||||
assertFalse(twoeyes.getBlueprint().isUnique());
|
||||
assertEquals(Side.FREE_PEOPLE, twoeyes.getBlueprint().getSide());
|
||||
assertEquals(Culture.GANDALF, twoeyes.getBlueprint().getCulture());
|
||||
assertEquals(CardType.EVENT, twoeyes.getBlueprint().getCardType());
|
||||
//assertEquals(Race.CREATURE, twoeyes.getBlueprint().getRace());
|
||||
assertTrue(scn.HasKeyword(twoeyes, Keyword.FELLOWSHIP)); // test for keywords as needed
|
||||
assertEquals(3, twoeyes.getBlueprint().getTwilightCost());
|
||||
//assertEquals(, twoeyes.getBlueprint().getStrength());
|
||||
//assertEquals(, twoeyes.getBlueprint().getVitality());
|
||||
//assertEquals(, twoeyes.getBlueprint().getResistance());
|
||||
//assertEquals(Signet., twoeyes.getBlueprint().getSignet());
|
||||
//assertEquals(, twoeyes.getBlueprint().getSiteNumber()); // Change this to getAllyHomeSiteNumbers for allies
|
||||
|
||||
}
|
||||
|
||||
//@Test
|
||||
public void TwoEyesasOftenasICanSpareThemTest1() throws DecisionResultInvalidException, CardNotFoundException {
|
||||
@Test
|
||||
public void TwoEyesRequiresBothFrodoAndGandalf() throws DecisionResultInvalidException, CardNotFoundException {
|
||||
//Pre-game setup
|
||||
GenericCardTestHelper scn = GetScenario();
|
||||
|
||||
PhysicalCardImpl card = scn.GetFreepsCard("card");
|
||||
scn.FreepsMoveCardToHand(card);
|
||||
PhysicalCardImpl twoeyes = scn.GetFreepsCard("twoeyes");
|
||||
PhysicalCardImpl frodo = scn.GetFreepsCard("frodo");
|
||||
PhysicalCardImpl gandalf = scn.GetFreepsCard("gandalf");
|
||||
|
||||
scn.FreepsMoveCardToHand(twoeyes, frodo, gandalf);
|
||||
|
||||
scn.StartGame();
|
||||
scn.FreepsPlayCard(card);
|
||||
|
||||
assertEquals(3, scn.GetTwilight());
|
||||
assertFalse(scn.FreepsCardPlayAvailable(twoeyes));
|
||||
scn.FreepsPlayCard(gandalf);
|
||||
assertFalse(scn.FreepsCardPlayAvailable(twoeyes));
|
||||
scn.FreepsPlayCard(frodo);
|
||||
assertTrue(scn.FreepsCardPlayAvailable(twoeyes));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void TwoEyesDrawsBasedOnFrodosVitality() throws DecisionResultInvalidException, CardNotFoundException {
|
||||
//Pre-game setup
|
||||
GenericCardTestHelper scn = GetScenario();
|
||||
|
||||
PhysicalCardImpl twoeyes = scn.GetFreepsCard("twoeyes");
|
||||
PhysicalCardImpl frodo = scn.GetFreepsCard("frodo");
|
||||
PhysicalCardImpl gandalf = scn.GetFreepsCard("gandalf");
|
||||
|
||||
scn.FreepsMoveCharToTable(frodo, gandalf);
|
||||
scn.FreepsMoveCardToHand(twoeyes);
|
||||
|
||||
scn.AddWoundsToChar(frodo, 1);
|
||||
|
||||
scn.StartGame();
|
||||
|
||||
assertTrue(scn.FreepsCardPlayAvailable(twoeyes));
|
||||
assertEquals(3, scn.GetVitality(frodo));
|
||||
assertEquals(1, scn.GetFreepsHandCount()); //only Two Eyes itself
|
||||
assertEquals(4, scn.GetFreepsDeckCount());
|
||||
|
||||
scn.FreepsPlayCard(twoeyes);
|
||||
|
||||
assertEquals(3, scn.GetFreepsHandCount());
|
||||
assertEquals(1, scn.GetFreepsDeckCount());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,7 +6,10 @@ 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 com.gempukku.lotro.logic.modifiers.KeywordModifier;
|
||||
import com.gempukku.lotro.logic.modifiers.ModifierFlag;
|
||||
import com.gempukku.lotro.logic.modifiers.MoveLimitModifier;
|
||||
import com.gempukku.lotro.logic.modifiers.SpecialFlagModifier;
|
||||
import org.junit.Test;
|
||||
|
||||
import java.util.HashMap;
|
||||
@@ -22,8 +25,13 @@ public class Card_V1_018_Tests
|
||||
return new GenericCardTestHelper(
|
||||
new HashMap<String, String>()
|
||||
{{
|
||||
put("card", "151_18");
|
||||
// put other cards in here as needed for the test case
|
||||
put("council", "151_18");
|
||||
put("gandalf", "151_14");
|
||||
put("elrond", "3_13");
|
||||
put("galadriel", "1_45");
|
||||
put("aragorn", "1_89");
|
||||
|
||||
put("saruman", "3_69");
|
||||
}},
|
||||
GenericCardTestHelper.FellowshipSites,
|
||||
GenericCardTestHelper.FOTRFrodo,
|
||||
@@ -31,9 +39,7 @@ public class Card_V1_018_Tests
|
||||
);
|
||||
}
|
||||
|
||||
// Uncomment both @Test markers below once this is ready to be used
|
||||
|
||||
//@Test
|
||||
@Test
|
||||
public void TheWhiteCouncilStatsAndKeywordsAreCorrect() throws DecisionResultInvalidException, CardNotFoundException {
|
||||
|
||||
/**
|
||||
@@ -51,34 +57,135 @@ public class Card_V1_018_Tests
|
||||
//Pre-game setup
|
||||
GenericCardTestHelper scn = GetScenario();
|
||||
|
||||
PhysicalCardImpl card = scn.GetFreepsCard("card");
|
||||
PhysicalCardImpl council = scn.GetFreepsCard("council");
|
||||
|
||||
assertTrue(card.getBlueprint().isUnique());
|
||||
assertEquals(Side.FREE_PEOPLE, card.getBlueprint().getSide());
|
||||
assertEquals(Culture.GANDALF, card.getBlueprint().getCulture());
|
||||
assertEquals(CardType.CONDITION, card.getBlueprint().getCardType());
|
||||
//assertEquals(Race.CREATURE, card.getBlueprint().getRace());
|
||||
assertTrue(scn.HasKeyword(card, Keyword.SUPPORT_AREA)); // test for keywords as needed
|
||||
assertEquals(1, card.getBlueprint().getTwilightCost());
|
||||
//assertEquals(, card.getBlueprint().getStrength());
|
||||
//assertEquals(, card.getBlueprint().getVitality());
|
||||
//assertEquals(, card.getBlueprint().getResistance());
|
||||
//assertEquals(Signet., card.getBlueprint().getSignet());
|
||||
//assertEquals(, card.getBlueprint().getSiteNumber()); // Change this to getAllyHomeSiteNumbers for allies
|
||||
assertTrue(council.getBlueprint().isUnique());
|
||||
assertEquals(Side.FREE_PEOPLE, council.getBlueprint().getSide());
|
||||
assertEquals(Culture.GANDALF, council.getBlueprint().getCulture());
|
||||
assertEquals(CardType.CONDITION, council.getBlueprint().getCardType());
|
||||
//assertEquals(Race.CREATURE, council.getBlueprint().getRace());
|
||||
assertTrue(scn.HasKeyword(council, Keyword.SUPPORT_AREA)); // test for keywords as needed
|
||||
assertEquals(1, council.getBlueprint().getTwilightCost());
|
||||
//assertEquals(, council.getBlueprint().getStrength());
|
||||
//assertEquals(, council.getBlueprint().getVitality());
|
||||
//assertEquals(, council.getBlueprint().getResistance());
|
||||
//assertEquals(Signet., council.getBlueprint().getSignet());
|
||||
//assertEquals(, council.getBlueprint().getSiteNumber()); // Change this to getAllyHomeSiteNumbers for allies
|
||||
|
||||
}
|
||||
|
||||
//@Test
|
||||
public void TheWhiteCouncilTest1() throws DecisionResultInvalidException, CardNotFoundException {
|
||||
@Test
|
||||
public void SpottingGandalfAndTwoAlliesNegatesSarumansFirstSentence() throws DecisionResultInvalidException, CardNotFoundException {
|
||||
//Pre-game setup
|
||||
GenericCardTestHelper scn = GetScenario();
|
||||
|
||||
PhysicalCardImpl card = scn.GetFreepsCard("card");
|
||||
scn.FreepsMoveCardToHand(card);
|
||||
PhysicalCardImpl council = scn.GetFreepsCard("council");
|
||||
PhysicalCardImpl gandalf = scn.GetFreepsCard("gandalf");
|
||||
PhysicalCardImpl elrond = scn.GetFreepsCard("elrond");
|
||||
PhysicalCardImpl galadriel = scn.GetFreepsCard("galadriel");
|
||||
PhysicalCardImpl aragorn = scn.GetFreepsCard("aragorn");
|
||||
scn.FreepsMoveCardToHand(gandalf, elrond, galadriel);
|
||||
scn.FreepsMoveCardToSupportArea(council);
|
||||
scn.FreepsMoveCharToTable(aragorn);
|
||||
|
||||
PhysicalCardImpl saruman = scn.GetShadowCard("saruman");
|
||||
scn.ShadowMoveCharToTable(saruman);
|
||||
|
||||
scn.StartGame();
|
||||
scn.FreepsPlayCard(card);
|
||||
|
||||
assertEquals(1, scn.GetTwilight());
|
||||
assertFalse(scn.CanBeAssigned(saruman));
|
||||
scn.FreepsPlayCard(elrond);
|
||||
assertFalse(scn.CanBeAssigned(saruman));
|
||||
scn.FreepsPlayCard(galadriel);
|
||||
assertFalse(scn.CanBeAssigned(saruman));
|
||||
scn.FreepsPlayCard(gandalf);
|
||||
assertTrue(scn.CanBeAssigned(saruman));
|
||||
|
||||
scn.SkipToPhase(Phase.ASSIGNMENT);
|
||||
scn.PassCurrentPhaseActions();
|
||||
scn.FreepsAssignToMinions(gandalf, saruman);
|
||||
scn.FreepsResolveSkirmish(gandalf);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void RegroupActionUnavailableWithoutHealthyElvenAllies() throws DecisionResultInvalidException, CardNotFoundException {
|
||||
//Pre-game setup
|
||||
GenericCardTestHelper scn = GetScenario();
|
||||
|
||||
PhysicalCardImpl council = scn.GetFreepsCard("council");
|
||||
PhysicalCardImpl gandalf = scn.GetFreepsCard("gandalf");
|
||||
PhysicalCardImpl elrond = scn.GetFreepsCard("elrond");
|
||||
PhysicalCardImpl galadriel = scn.GetFreepsCard("galadriel");
|
||||
PhysicalCardImpl aragorn = scn.GetFreepsCard("aragorn");
|
||||
scn.FreepsMoveCardToSupportArea(council);
|
||||
scn.FreepsMoveCharToTable(aragorn, gandalf, elrond, galadriel);
|
||||
|
||||
|
||||
scn.StartGame();
|
||||
|
||||
scn.AddWoundsToChar(galadriel, 2);
|
||||
|
||||
scn.SkipToPhase(Phase.REGROUP);
|
||||
assertFalse(scn.FreepsCardActionAvailable(council));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void RegroupActionExertsAlliesToHeal() throws DecisionResultInvalidException, CardNotFoundException {
|
||||
//Pre-game setup
|
||||
GenericCardTestHelper scn = GetScenario();
|
||||
|
||||
PhysicalCardImpl council = scn.GetFreepsCard("council");
|
||||
PhysicalCardImpl gandalf = scn.GetFreepsCard("gandalf");
|
||||
PhysicalCardImpl elrond = scn.GetFreepsCard("elrond");
|
||||
PhysicalCardImpl galadriel = scn.GetFreepsCard("galadriel");
|
||||
PhysicalCardImpl aragorn = scn.GetFreepsCard("aragorn");
|
||||
scn.FreepsMoveCardToSupportArea(council);
|
||||
scn.FreepsMoveCharToTable(aragorn, gandalf, elrond, galadriel);
|
||||
|
||||
|
||||
scn.StartGame();
|
||||
|
||||
scn.AddWoundsToChar(aragorn, 3);
|
||||
scn.AddWoundsToChar(gandalf, 3);
|
||||
|
||||
scn.SkipToPhase(Phase.REGROUP);
|
||||
assertTrue(scn.FreepsCardActionAvailable(council));
|
||||
assertEquals(0, scn.GetWoundsOn(galadriel));
|
||||
assertEquals(0, scn.GetWoundsOn(elrond));
|
||||
assertEquals(3, scn.GetWoundsOn(gandalf));
|
||||
assertEquals(3, scn.GetWoundsOn(aragorn));
|
||||
|
||||
scn.FreepsUseCardAction(council);
|
||||
//the only 2 elven allies are chosen automatically
|
||||
assertEquals(2, scn.GetFreepsCardChoiceCount());
|
||||
scn.FreepsChooseCard(aragorn);
|
||||
assertEquals(1, scn.GetWoundsOn(galadriel));
|
||||
assertEquals(1, scn.GetWoundsOn(elrond));
|
||||
assertEquals(3, scn.GetWoundsOn(gandalf));
|
||||
assertEquals(2, scn.GetWoundsOn(aragorn));
|
||||
|
||||
scn.ShadowPassCurrentPhaseAction();
|
||||
|
||||
assertTrue(scn.FreepsCardActionAvailable(council));
|
||||
scn.FreepsUseCardAction(council);
|
||||
assertEquals(2, scn.GetFreepsCardChoiceCount());
|
||||
scn.FreepsChooseCard(aragorn);
|
||||
assertEquals(2, scn.GetWoundsOn(galadriel));
|
||||
assertEquals(2, scn.GetWoundsOn(elrond));
|
||||
assertEquals(3, scn.GetWoundsOn(gandalf));
|
||||
assertEquals(1, scn.GetWoundsOn(aragorn));
|
||||
|
||||
scn.RemoveWoundsFromChar(galadriel, 1);
|
||||
|
||||
scn.ShadowPassCurrentPhaseAction();
|
||||
|
||||
//limit of 2 means it won't let us even with healthy allies
|
||||
assertEquals(1, scn.GetWoundsOn(galadriel));
|
||||
assertEquals(2, scn.GetWoundsOn(elrond));
|
||||
assertTrue(scn.FreepsCardActionAvailable(council));
|
||||
|
||||
scn.SkipToPhase(Phase.REGROUP);
|
||||
|
||||
assertTrue(scn.FreepsCardActionAvailable(council));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user