Add effects and tests for v2_16
This commit is contained in:
@@ -28,17 +28,48 @@
|
|||||||
signet: Theoden
|
signet: Theoden
|
||||||
resistance: 6
|
resistance: 6
|
||||||
keywords: Valiant
|
keywords: Valiant
|
||||||
/*requires: {
|
|
||||||
|
|
||||||
}
|
|
||||||
effects: [
|
effects: [
|
||||||
{
|
{
|
||||||
|
type: modifier
|
||||||
|
modifier: {
|
||||||
|
type: FPCultureSpot
|
||||||
|
requires: {
|
||||||
|
type: canSpot
|
||||||
|
count: 3
|
||||||
|
filter: valiant,companion
|
||||||
|
}
|
||||||
|
amount: -1
|
||||||
|
}
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
|
type: activated
|
||||||
|
requires: {
|
||||||
|
type: canSpot
|
||||||
|
count: 1
|
||||||
|
filter: valiant,companion,inSkirmish
|
||||||
|
}
|
||||||
|
phase: skirmish
|
||||||
|
cost: {
|
||||||
|
type: exert
|
||||||
|
filter: self
|
||||||
|
}
|
||||||
|
effect: {
|
||||||
|
type: modifyStrength
|
||||||
|
filter: choose(valiant,companion,inSkirmish)
|
||||||
|
memorize: chosenCompanion
|
||||||
|
amount: {
|
||||||
|
type: requires
|
||||||
|
requires: {
|
||||||
|
type: memoryMatches
|
||||||
|
memory: chosenCompanion
|
||||||
|
filter: Exhausted
|
||||||
|
}
|
||||||
|
true: 3
|
||||||
|
false: 2
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
]*/
|
]
|
||||||
gametext: Valiant.<br>While you can spot 3 valiant companions, the number of free peoples cultures that can be counted is-1.<br>Skirmish: If a valiant companion is skirmishing a minion with a strength of 12 or higher, exert Aragorn to make that companion strength +2 (or +3 if that companion is exhausted).
|
gametext: Valiant.<br>While you can spot 3 valiant companions, the number of free peoples cultures that can be counted is-1.<br>Skirmish: If a valiant companion is skirmishing a minion with a strength of 12 or higher, exert Aragorn to make that companion strength +2 (or +3 if that companion is exhausted).
|
||||||
lore: ""
|
lore: ""
|
||||||
promotext: ""
|
promotext: ""
|
||||||
|
|||||||
@@ -5,6 +5,8 @@ import com.gempukku.lotro.common.*;
|
|||||||
import com.gempukku.lotro.game.CardNotFoundException;
|
import com.gempukku.lotro.game.CardNotFoundException;
|
||||||
import com.gempukku.lotro.game.PhysicalCardImpl;
|
import com.gempukku.lotro.game.PhysicalCardImpl;
|
||||||
import com.gempukku.lotro.logic.decisions.DecisionResultInvalidException;
|
import com.gempukku.lotro.logic.decisions.DecisionResultInvalidException;
|
||||||
|
import com.gempukku.lotro.logic.modifiers.FPCulturesSideSpotCountModifier;
|
||||||
|
import com.gempukku.lotro.logic.modifiers.FPCulturesSpotCountModifier;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
|
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
@@ -19,6 +21,12 @@ public class Card_V2_016_Tests
|
|||||||
new HashMap<>()
|
new HashMap<>()
|
||||||
{{
|
{{
|
||||||
put("card", "102_16");
|
put("card", "102_16");
|
||||||
|
put("veowyn", "4_270");
|
||||||
|
put("vgamling", "5_82");
|
||||||
|
put("vrscout", "5_90");
|
||||||
|
put("gandalf", "1_72");
|
||||||
|
put("grima", "5_51");
|
||||||
|
put("twk", "1_237");
|
||||||
// put other cards in here as needed for the test case
|
// put other cards in here as needed for the test case
|
||||||
}},
|
}},
|
||||||
GenericCardTestHelper.FellowshipSites,
|
GenericCardTestHelper.FellowshipSites,
|
||||||
@@ -62,21 +70,135 @@ public class Card_V2_016_Tests
|
|||||||
assertEquals(4, card.getBlueprint().getTwilightCost());
|
assertEquals(4, card.getBlueprint().getTwilightCost());
|
||||||
assertEquals(7, card.getBlueprint().getStrength());
|
assertEquals(7, card.getBlueprint().getStrength());
|
||||||
assertEquals(4, card.getBlueprint().getVitality());
|
assertEquals(4, card.getBlueprint().getVitality());
|
||||||
|
assertEquals(6, card.getBlueprint().getResistance());
|
||||||
assertEquals(Signet.THEODEN, card.getBlueprint().getSignet());
|
assertEquals(Signet.THEODEN, card.getBlueprint().getSignet());
|
||||||
}
|
}
|
||||||
|
|
||||||
// Uncomment any @Test markers below once this is ready to be used
|
// @Test
|
||||||
//@Test
|
public void ReducesFPsCulturesSpottedWhenThreeValiantCompanionsArePresent() throws DecisionResultInvalidException, CardNotFoundException {
|
||||||
public void AragornTest1() throws DecisionResultInvalidException, CardNotFoundException {
|
|
||||||
//Pre-game setup
|
//Pre-game setup
|
||||||
var scn = GetScenario();
|
GenericCardTestHelper scn = GetScenario();
|
||||||
|
|
||||||
var card = scn.GetFreepsCard("card");
|
PhysicalCardImpl card = scn.GetFreepsCard("card");
|
||||||
scn.FreepsMoveCardToHand(card);
|
PhysicalCardImpl veowyn = scn.GetFreepsCard("veowyn");
|
||||||
|
PhysicalCardImpl vgamling = scn.GetFreepsCard("vgamling");
|
||||||
|
PhysicalCardImpl vrscout = scn.GetFreepsCard("vrscout");
|
||||||
|
PhysicalCardImpl gandalf = scn.GetFreepsCard("gandalf");
|
||||||
|
scn.FreepsMoveCardToHand(card, veowyn, gandalf, vgamling, vrscout);
|
||||||
|
|
||||||
scn.StartGame();
|
scn.StartGame();
|
||||||
scn.FreepsPlayCard(card);
|
|
||||||
|
|
||||||
|
// Play Aragorn
|
||||||
|
scn.FreepsPlayCard(card);
|
||||||
assertEquals(4, scn.GetTwilight());
|
assertEquals(4, scn.GetTwilight());
|
||||||
|
|
||||||
|
// Play companions of two additional (non-gondor, non-shire) cultures to get to 4 total to spot
|
||||||
|
scn.FreepsPlayCard(veowyn);
|
||||||
|
scn.FreepsPlayCard(gandalf);
|
||||||
|
|
||||||
|
// TODO assert that there are 4 cultures spotted (2 valiant companions)
|
||||||
|
|
||||||
|
scn.FreepsPlayCard(vgamling);
|
||||||
|
|
||||||
|
// TODO assert that there are 3 cultures spotted even though 4 are on the board (3 valiant companions)
|
||||||
|
|
||||||
|
scn.FreepsPlayCard(vrscout);
|
||||||
|
|
||||||
|
// TODO assert that there are 3 cultures spotted even though 4 are on the board (gt 3 valiant companions)
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void ExertsToBoostValiantCompanions() throws DecisionResultInvalidException, CardNotFoundException {
|
||||||
|
//Pre-game setup
|
||||||
|
GenericCardTestHelper scn = GetScenario();
|
||||||
|
|
||||||
|
PhysicalCardImpl card = scn.GetFreepsCard("card");
|
||||||
|
PhysicalCardImpl veowyn = scn.GetFreepsCard("veowyn");
|
||||||
|
scn.FreepsMoveCardToHand(card, veowyn);
|
||||||
|
|
||||||
|
PhysicalCardImpl twk = scn.GetShadowCard("twk");
|
||||||
|
scn.ShadowMoveCardToHand(twk);
|
||||||
|
|
||||||
|
scn.StartGame();
|
||||||
|
|
||||||
|
// Play Aragorn
|
||||||
|
scn.FreepsPlayCard(card);
|
||||||
|
assertEquals(4, scn.GetTwilight());
|
||||||
|
|
||||||
|
// Play companions of two additional (non-gondor, non-shire) cultures to get to 4 total to spot
|
||||||
|
scn.FreepsPlayCard(veowyn);
|
||||||
|
|
||||||
|
// Get the game state to where Grima is on the table and it's the shadow player's turn during the maneuver phase
|
||||||
|
scn.SkipToPhase(Phase.SHADOW);
|
||||||
|
|
||||||
|
scn.ShadowPlayCard(twk);
|
||||||
|
|
||||||
|
scn.SkipToPhase(Phase.ASSIGNMENT);
|
||||||
|
|
||||||
|
scn.PassCurrentPhaseActions();
|
||||||
|
scn.FreepsAssignToMinions(veowyn, twk);
|
||||||
|
scn.FreepsResolveSkirmish(veowyn);
|
||||||
|
|
||||||
|
assertTrue(scn.FreepsActionAvailable(card));
|
||||||
|
assertEquals(0, scn.GetWoundsOn(card));
|
||||||
|
assertEquals(0, scn.GetWoundsOn(veowyn));
|
||||||
|
assertEquals(6, scn.GetStrength(veowyn));
|
||||||
|
|
||||||
|
scn.FreepsUseCardAction(card);
|
||||||
|
assertEquals(1, scn.GetWoundsOn(card));
|
||||||
|
assertEquals(0, scn.GetWoundsOn(veowyn));
|
||||||
|
// strength +2 because Eowyn isn't exhausted
|
||||||
|
assertEquals(8, scn.GetStrength(veowyn));
|
||||||
|
|
||||||
|
// Wound Eowyn twice and have the shadow player pass their skirmish action
|
||||||
|
scn.AddWoundsToChar(veowyn, 2);
|
||||||
|
scn.ShadowPassCurrentPhaseAction();
|
||||||
|
|
||||||
|
assertTrue(scn.FreepsActionAvailable(card));
|
||||||
|
assertEquals(1, scn.GetWoundsOn(card));
|
||||||
|
assertEquals(2, scn.GetWoundsOn(veowyn));
|
||||||
|
assertEquals(8, scn.GetStrength(veowyn));
|
||||||
|
|
||||||
|
scn.FreepsUseCardAction(card);
|
||||||
|
assertEquals(2, scn.GetWoundsOn(card));
|
||||||
|
assertEquals(2, scn.GetWoundsOn(veowyn));
|
||||||
|
// strength +3 because Eowyn isn't exhausted, now all she needs is Merry with a dagger to help her out
|
||||||
|
assertEquals(11, scn.GetStrength(veowyn));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void CantExertToBoostNonValiantCompanions() throws DecisionResultInvalidException, CardNotFoundException {
|
||||||
|
//Pre-game setup
|
||||||
|
GenericCardTestHelper scn = GetScenario();
|
||||||
|
|
||||||
|
PhysicalCardImpl card = scn.GetFreepsCard("card");
|
||||||
|
PhysicalCardImpl gandalf = scn.GetFreepsCard("gandalf");
|
||||||
|
scn.FreepsMoveCardToHand(card, gandalf);
|
||||||
|
|
||||||
|
PhysicalCardImpl twk = scn.GetShadowCard("twk");
|
||||||
|
scn.ShadowMoveCardToHand(twk);
|
||||||
|
|
||||||
|
scn.StartGame();
|
||||||
|
|
||||||
|
// Play Aragorn
|
||||||
|
scn.FreepsPlayCard(card);
|
||||||
|
assertEquals(4, scn.GetTwilight());
|
||||||
|
|
||||||
|
scn.FreepsPlayCard(gandalf);
|
||||||
|
|
||||||
|
// Get the game state to where Grima is on the table and it's the shadow player's turn during the maneuver phase
|
||||||
|
scn.SkipToPhase(Phase.SHADOW);
|
||||||
|
|
||||||
|
scn.ShadowPlayCard(twk);
|
||||||
|
|
||||||
|
scn.SkipToPhase(Phase.ASSIGNMENT);
|
||||||
|
|
||||||
|
scn.PassCurrentPhaseActions();
|
||||||
|
scn.FreepsAssignToMinions(gandalf, twk);
|
||||||
|
scn.FreepsResolveSkirmish(gandalf);
|
||||||
|
|
||||||
|
// Despite all evidence to the contrary, Gandalf isn't valiant so shouldn't be boostable
|
||||||
|
assertFalse(scn.FreepsActionAvailable(card));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user